* inbox: use pgp encryption && other fixes
* fix inbox key last used at time
* remove inbox items if keys change or same item id syncs
* inbox:update inbox sync item
* rename item field to sync
* add alg field
* sync: delete inbox items after commit succeeds
* user: merge if conditions
---------
Co-authored-by: Abdullah Atta <abdullahatta@streetwriters.co>
* feat: get, add, & delete user's inbox api tokens
* inbox: generate inbox api key on the server
* inbox: use nanoid to generate api key && set created date on server
* inbox: set api key in constructor && increase default expiry date to 1 year
this adds a new UserId index in all the notesnook collections which
helps to speed up the deletion time during account reset & delete.
This fixes the request timeout issues during both of these processes.
This exposes a few more env vars for configuration &
bypasses the Subscription backend
so each user is Pro by default. This is required because there won't be
any mechanism for the user to upgrade. We'll also have to disable a few
things on the client side to avoid confusion.