Compare commits

...
Author SHA1 Message Date
StandardNotes CI 6a6cbe57a1 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].2
2023-07-02 15:46:14 +00:00
Aman Harwara a8bc20e99e fix: Fixed issue where subfolders would show one extra item count 2023-07-02 20:46:33 +05:30
StandardNotes CI d42acab032 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-07-02 10:59:59 +00:00
Aman Harwara efa0669dbc chore: show non-editable link bar to allow opening auto-links 2023-07-02 15:29:02 +05:30
StandardNotes CI a6d7844ad4 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-07-02 09:43:13 +00:00
Aman Harwara 929642195d feat: Link and formatting toolbars for super are now unified on web/desktop to allow formatting existing links and updated link editor on mobile (#2342) 2023-07-02 14:45:49 +05:30
StandardNotes CI f354a50c26 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-06-30 18:25:33 +00:00
Aman Harwara ab1937226f chore: make "potentially out of sync" warning more visible on mobile 2023-06-30 23:22:15 +05:30
StandardNotes CI 64729a816c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-06-30 16:30:45 +00:00
Aman Harwara c9a95c818b chore: fix session modal error after revoking session 2023-06-30 20:57:57 +05:30
StandardNotes CI a0bc6153d6 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
2023-06-30 14:51:02 +00:00
Aman Harwara 89849c9f90 fix: Fixed issue where clicking in file dialog context menu closed the dialog 2023-06-30 19:51:08 +05:30
Mo b032eb9c9b internal: incomplete vault systems behind feature flag (#2340) 2023-06-30 09:01:56 -05:00
StandardNotes CI d16e401bb9 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].9
2023-06-29 12:58:00 +00:00
Aman Harwara 476c5b4bdb chore: remove Labs status from Super 2023-06-29 17:57:07 +05:30
Aman Harwara 69de0e448f fix: Fixed issue where Conflicts view is shown but the list is empty 2023-06-29 17:54:38 +05:30
StandardNotes CI efe069db06 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
2023-06-27 20:39:44 +00:00
Aman Harwara edd3232c77 chore: update spreadsheets 2023-06-28 01:39:29 +05:30
StandardNotes CI 9ca0604352 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
2023-06-27 17:09:34 +00:00
Aman Harwara d3378a704a refactor: fix conflicts view when conflicted copies are already in trash (#2339) 2023-06-27 22:08:46 +05:30
StandardNotes CI f858f31492 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
2023-06-26 15:24:21 +00:00
Aman Harwara dffeb7e710 chore: fix signin menu closing on incorrect mfa 2023-06-26 19:56:00 +05:30
Aman Harwara c378288d6e chore: fix ios height issue 2023-06-26 19:37:49 +05:30
StandardNotes CI 65a09b77d3 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2023-06-26 11:19:38 +00:00
Aman Harwara 24d159f6d8 chore: remove unused code 2023-06-26 16:20:03 +05:30
Aman Harwara 59fbf6f4c3 refactor: readonly note content 2023-06-26 16:12:35 +05:30
StandardNotes CI 28a52cb998 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2023-06-26 10:12:21 +00:00
Mo 7f5041c4a8 chore: check for external request 2023-06-26 04:40:46 -05:00
StandardNotes CI 4b93dc35a8 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2023-06-25 20:42:27 +00:00
Mo bb804fff45 fix: fixes issue where a renewed session would in some cases would not save to disk, causing a reauthentication prompt to occur 2023-06-25 15:12:22 -05:00
StandardNotes CI 8362c4e92c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].2
2023-06-25 18:50:31 +00:00
Aman Harwara b8481dfbe3 Merge branch 'main' of github.com:standardnotes/app 2023-06-25 23:53:31 +05:30
Aman Harwara 046eaac548 refactor: packageprovider 2023-06-25 23:53:23 +05:30
StandardNotes CI 747ba1b342 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].1
2023-06-25 12:46:27 +00:00
Aman Harwara 7c3b8d4534 chore: fix test 2023-06-25 17:47:35 +05:30
Aman Harwara 0613436198 chore: select current result when closing super search dialog 2023-06-25 16:37:05 +05:30
Aman Harwara 63b95391a6 refactor: use actual maps for uuidmap 2023-06-25 16:14:52 +05:30
Aman Harwara 195420101a chore: fix conflict map addition/removal 2023-06-25 16:05:50 +05:30
StandardNotes CI 74ba220982 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
2023-06-25 09:26:54 +00:00
Aman Harwara e0e9249334 feat: Added a conflict resolution dialog and a Conflicts view for easier management of conflicts (#2337) 2023-06-25 14:27:51 +05:30
StandardNotes CI 49d43fd14b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2023-06-23 20:59:33 +00:00
Shane Duffy 1ff34cf1a2 refactor: fix accessibility issue with note list items (#2338) 2023-06-24 02:01:05 +05:30
StandardNotes CI c6d30976e0 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2023-06-16 19:05:16 +00:00
Aman Harwara 26a9f8c497 chore: dayjs fix 2023-06-17 00:07:20 +05:30
StandardNotes CI d129d51bfe chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-06-06 17:18:30 +00:00
Aman Harwara 6e6402da81 chore: backup service test 2023-06-06 22:15:06 +05:30
Aman Harwara 0e938c5596 chore: context menu path 2023-06-06 21:51:12 +05:30
Aman Harwara db997955af refactor(desktop): backup paths 2023-06-06 20:58:08 +05:30
StandardNotes CI 9cae641693 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-06-02 20:48:54 +00:00
Aman Harwara 08c38fc7cf feat: You can now drag-n-drop notes onto tags to move them from one tag to another (#2334) 2023-06-03 01:46:29 +05:30
StandardNotes CI 153ec272d2 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-31 16:13:07 +00:00
Aman Harwara 7d691aa409 fix(desktop): Fixed issue where local backup location would default to "[object Promise]" 2023-05-31 21:16:14 +05:30
StandardNotes CI 9141da0832 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-30 14:50:20 +00:00
Aman Harwara 39414e6cab fix: Fixed issue where pane gestures on Android would break scroll in a daily journal tag 2023-05-30 19:52:41 +05:30
StandardNotes CI 1738485777 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-29 11:58:09 +00:00
Aman Harwara 0cb73b5d18 fix: Fixed issue on Android where pressing backspace in Super notes would delete characters on both side of the cursor (#2336) 2023-05-29 17:00:01 +05:30
StandardNotes CI 5d98c86592 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-26 08:31:36 +00:00
Aman Harwara ba828f31ad Merge branch 'main' of github.com:standardnotes/app 2023-05-26 13:28:38 +05:30
Aman Harwara c29832ab77 chore: buttons in dark themes 2023-05-26 13:28:28 +05:30
StandardNotes CI 6f10d88dee chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-25 11:08:56 +00:00
Karol Sójko 7b66ee1d40 chore: enable e2e for history tests (#2335) 2023-05-25 12:41:49 +02:00
StandardNotes CI 6c785e8565 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-25 08:29:21 +00:00
Aman Harwara c21ed0a8b6 chore: normal button color 2023-05-25 13:28:48 +05:30
Aman Harwara a89d182612 chore: non-primary button colors 2023-05-25 13:03:18 +05:30
StandardNotes CI 4403fc3515 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-24 19:04:32 +00:00
Aman Harwara 47b0ff42a0 Merge branch 'main' of github.com:standardnotes/app 2023-05-25 00:08:11 +05:30
Aman Harwara d9e0261c80 chore: adjust notes list swipe gesture on android 2023-05-25 00:08:03 +05:30
StandardNotes CI 8c3868a9d4 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-24 17:12:29 +00:00
Aman Harwara 77b60d920d chore: comments 2023-05-24 22:15:50 +05:30
Aman Harwara 22cedc1321 chore: upgrade lexical 2023-05-24 21:43:17 +05:30
Aman Harwara 502289aa50 chore: let system figure slashes for paths 2023-05-24 21:32:07 +05:30
StandardNotes CI 4ef8992d43 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-24 07:30:04 +00:00
Aman Harwara 228889c75c Merge branch 'main' of github.com:standardnotes/app 2023-05-24 12:24:09 +05:30
Aman Harwara 210d747a05 chore: fix backup copy error 2023-05-24 12:24:01 +05:30
StandardNotes CI 0d5833af3c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-05-23 16:35:24 +00:00
Aman Harwara 87410f7e34 Merge branch 'main' of github.com:standardnotes/app 2023-05-23 21:29:30 +05:30
Aman Harwara aaa8016792 chore: fix pane gestures breaking items list on android 2023-05-23 21:29:21 +05:30
StandardNotes CI 356a3751de chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
2023-05-23 14:14:40 +00:00
Aman Harwara 1d7079e90c fix: Fixed issue where some dialogs would become unresponsive 2023-05-23 19:15:30 +05:30
StandardNotes CI 390ea45865 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
2023-05-22 18:28:30 +00:00
Aman Harwara 68214b14b6 Merge branch 'main' of github.com:standardnotes/app 2023-05-22 23:24:47 +05:30
Aman Harwara 22297ff514 chore: pinned note ui change 2023-05-22 23:24:16 +05:30
783 changed files with 24009 additions and 5874 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1
View File
@@ -26,7 +26,6 @@
"build:snjs": "yarn workspaces foreach -p --topological-dev --verbose -R --from @standardnotes/snjs run build",
"build:services": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/services run build",
"build:api": "yarn workspaces foreach -pt --topological-dev --verbose -R --from @standardnotes/api run build",
"start:server:web": "lerna run start --scope=@standardnotes/web",
"e2e": "lerna run start:test-server --scope=@standardnotes/snjs",
"reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock && yarn install",
"release:prod": "lerna version --conventional-commits --yes -m \"chore(release): publish\"",
+38
View File
@@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.26.18](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-06-30)
**Note:** Version bump only for package @standardnotes/api
## [1.26.17](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-06-29)
**Note:** Version bump only for package @standardnotes/api
## [1.26.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-06-27)
**Note:** Version bump only for package @standardnotes/api
## [1.26.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-06-26)
**Note:** Version bump only for package @standardnotes/api
## [1.26.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-06-25)
### Bug Fixes
* fixes issue where a renewed session would in some cases would not save to disk, causing a reauthentication prompt to occur ([bb804ff](https://github.com/standardnotes/app/commit/bb804fff45328eef3c66ec3a48dc000c21e37020))
## [1.26.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-06-25)
**Note:** Version bump only for package @standardnotes/api
## [1.26.12](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-06-25)
**Note:** Version bump only for package @standardnotes/api
## [1.26.11](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-06-25)
**Note:** Version bump only for package @standardnotes/api
## [1.26.10](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-05-22)
**Note:** Version bump only for package @standardnotes/api
## [1.26.9](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-05-22)
**Note:** Version bump only for package @standardnotes/api
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.26.9",
"version": "1.26.18",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -36,7 +36,7 @@
"typescript": "*"
},
"dependencies": {
"@standardnotes/common": "^1.46.6",
"@standardnotes/common": "^1.48.3",
"@standardnotes/domain-core": "^1.12.0",
"@standardnotes/encryption": "workspace:*",
"@standardnotes/models": "workspace:*",
@@ -1,14 +1,14 @@
import { ErrorMessage } from '../../Error/ErrorMessage'
import { ApiCallError } from '../../Error/ApiCallError'
import { ApiVersion } from '../../Api/ApiVersion'
import { ApiEndpointParam } from '../../Request/ApiEndpointParam'
import { SubscriptionServerInterface } from '../../Server/Subscription/SubscriptionServerInterface'
import { AppleIAPConfirmResponseBody } from './../../Response/Subscription/AppleIAPConfirmResponseBody'
import { SubscriptionInviteAcceptResponseBody } from '../../Response/Subscription/SubscriptionInviteAcceptResponseBody'
import { SubscriptionInviteCancelResponseBody } from '../../Response/Subscription/SubscriptionInviteCancelResponseBody'
import { SubscriptionInviteListResponseBody } from '../../Response/Subscription/SubscriptionInviteListResponseBody'
import { SubscriptionInviteResponseBody } from '../../Response/Subscription/SubscriptionInviteResponseBody'
import { HttpResponse } from '@standardnotes/responses'
import { HttpResponse, ApiEndpointParam } from '@standardnotes/responses'
import { SubscriptionApiServiceInterface } from './SubscriptionApiServiceInterface'
import { SubscriptionApiOperations } from './SubscriptionApiOperations'
@@ -2,4 +2,5 @@ export enum UserApiOperations {
Registering,
SubmittingRequest,
DeletingAccount,
UpdatingUser,
}
@@ -5,8 +5,7 @@ import { ErrorMessage } from '../../Error/ErrorMessage'
import { ApiCallError } from '../../Error/ApiCallError'
import { UserServerInterface } from '../../Server/User/UserServerInterface'
import { ApiVersion } from '../../Api/ApiVersion'
import { ApiEndpointParam } from '../../Request/ApiEndpointParam'
import { HttpResponse } from '@standardnotes/responses'
import { HttpResponse, ApiEndpointParam } from '@standardnotes/responses'
import { UserDeletionResponseBody } from '../../Response/User/UserDeletionResponseBody'
import { UserRegistrationResponseBody } from '../../Response/User/UserRegistrationResponseBody'
@@ -15,6 +14,7 @@ import { UserRequestServerInterface } from '../../Server/UserRequest/UserRequest
import { UserApiOperations } from './UserApiOperations'
import { UserApiServiceInterface } from './UserApiServiceInterface'
import { UserUpdateResponse } from '../../Response/User/UserUpdateResponse'
export class UserApiService implements UserApiServiceInterface {
private operationsInProgress: Map<UserApiOperations, boolean>
@@ -35,7 +35,7 @@ export class UserApiService implements UserApiServiceInterface {
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericRegistrationFail)
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
@@ -84,6 +84,23 @@ export class UserApiService implements UserApiServiceInterface {
}
}
async updateUser(updateDTO: { userUuid: string }): Promise<HttpResponse<UserUpdateResponse>> {
this.lockOperation(UserApiOperations.UpdatingUser)
try {
const response = await this.userServer.update({
[ApiEndpointParam.ApiVersion]: ApiVersion.v0,
user_uuid: updateDTO.userUuid,
})
this.unlockOperation(UserApiOperations.UpdatingUser)
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
private lockOperation(operation: UserApiOperations): void {
if (this.operationsInProgress.get(operation)) {
throw new ApiCallError(ErrorMessage.GenericInProgress)
@@ -5,6 +5,7 @@ import { HttpResponse } from '@standardnotes/responses'
import { UserDeletionResponseBody } from '../../Response/User/UserDeletionResponseBody'
import { UserRegistrationResponseBody } from '../../Response/User/UserRegistrationResponseBody'
import { UserRequestResponseBody } from '../../Response/UserRequest/UserRequestResponseBody'
import { UserUpdateResponse } from '../../Response/User/UserUpdateResponse'
export interface UserApiServiceInterface {
register(registerDTO: {
@@ -13,9 +14,12 @@ export interface UserApiServiceInterface {
keyParams: RootKeyParamsInterface
ephemeral: boolean
}): Promise<HttpResponse<UserRegistrationResponseBody>>
updateUser(updateDTO: { userUuid: string }): Promise<HttpResponse<UserUpdateResponse>>
submitUserRequest(dto: {
userUuid: string
requestType: UserRequestType
}): Promise<HttpResponse<UserRequestResponseBody>>
deleteAccount(userUuid: string): Promise<HttpResponse<UserDeletionResponseBody>>
}
+29 -7
View File
@@ -53,7 +53,15 @@ export class HttpService implements HttpServiceInterface {
this.host = host
}
getHost(): string {
return this.host
}
async get<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>> {
if (!this.host) {
throw new Error('Attempting to make network request before host is set')
}
return this.runHttp({
url: joinPaths(this.host, path),
params,
@@ -62,7 +70,20 @@ export class HttpService implements HttpServiceInterface {
})
}
async getExternal<T>(url: string, params?: HttpRequestParams): Promise<HttpResponse<T>> {
return this.runHttp({
url,
params,
verb: HttpVerb.Get,
external: true,
})
}
async post<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>> {
if (!this.host) {
throw new Error('Attempting to make network request before host is set')
}
return this.runHttp({
url: joinPaths(this.host, path),
params,
@@ -99,7 +120,12 @@ export class HttpService implements HttpServiceInterface {
}
async runHttp<T>(httpRequest: HttpRequest): Promise<HttpResponse<T>> {
if (this.inProgressRefreshSessionPromise) {
if (this.__latencySimulatorMs) {
await sleep(this.__latencySimulatorMs, true)
}
const isRefreshRequest = httpRequest.url === joinPaths(this.host, Paths.v1.refreshSession)
if (this.inProgressRefreshSessionPromise && !isRefreshRequest) {
await this.inProgressRefreshSessionPromise
httpRequest.authentication = this.session?.accessToken.value
@@ -107,17 +133,13 @@ export class HttpService implements HttpServiceInterface {
const request = this.createXmlRequest(httpRequest)
if (this.__latencySimulatorMs) {
await sleep(this.__latencySimulatorMs, true)
}
const response = await this.runRequest<T>(request, this.createRequestBody(httpRequest))
if (response.meta) {
if (response.meta && !httpRequest.external) {
this.updateMetaCallback?.(response.meta)
}
if (response.status === HttpStatusCode.ExpiredAccessToken) {
if (response.status === HttpStatusCode.ExpiredAccessToken && !isRefreshRequest && !httpRequest.external) {
if (this.inProgressRefreshSessionPromise) {
await this.inProgressRefreshSessionPromise
} else {
@@ -3,8 +3,10 @@ import { HttpRequest, HttpRequestParams, HttpResponse, HttpResponseMeta } from '
export interface HttpServiceInterface {
setHost(host: string): void
getHost(): string
setSession(session: Session): void
get<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>>
getExternal<T>(url: string, params?: HttpRequestParams): Promise<HttpResponse<T>>
post<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>>
put<T>(path: string, params?: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>>
patch<T>(path: string, params: HttpRequestParams, authentication?: string): Promise<HttpResponse<T>>
@@ -1,7 +0,0 @@
export enum ApiEndpointParam {
LastSyncToken = 'sync_token',
PaginationToken = 'cursor_token',
SyncDlLimit = 'limit',
SyncPayloads = 'items',
ApiVersion = 'api',
}
@@ -0,0 +1,5 @@
export type CreateAsymmetricMessageParams = {
recipientUuid: string
encryptedMessage: string
replaceabilityIdentifier?: string
}
@@ -0,0 +1,3 @@
export type DeleteAsymmetricMessageRequestParams = {
messageUuid: string
}
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/ban-types
export type GetOutboundAsymmetricMessagesRequestParams = {}
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/ban-types
export type GetUserAsymmetricMessagesRequestParams = {}
@@ -0,0 +1,4 @@
export type UpdateAsymmetricMessageParams = {
messageUuid: string
encryptedMessage: string
}
@@ -0,0 +1,12 @@
import { ValetTokenOperation } from '@standardnotes/responses'
import { SharedVaultMoveType } from './SharedVaultMoveType'
export type CreateSharedVaultValetTokenParams = {
sharedVaultUuid: string
fileUuid?: string
remoteIdentifier: string
operation: ValetTokenOperation
unencryptedFileSize?: number
moveOperationType?: SharedVaultMoveType
sharedVaultToSharedVaultMoveTargetUuid?: string
}
@@ -0,0 +1 @@
export type SharedVaultMoveType = 'shared-vault-to-user' | 'user-to-shared-vault' | 'shared-vault-to-shared-vault'
@@ -0,0 +1,4 @@
export type AcceptInviteRequestParams = {
sharedVaultUuid: string
inviteUuid: string
}
@@ -0,0 +1,8 @@
import { SharedVaultPermission } from '@standardnotes/responses'
export type CreateSharedVaultInviteParams = {
sharedVaultUuid: string
recipientUuid: string
encryptedMessage: string
permissions: SharedVaultPermission
}
@@ -0,0 +1,4 @@
export type DeclineInviteRequestParams = {
sharedVaultUuid: string
inviteUuid: string
}
@@ -0,0 +1,3 @@
export type DeleteAllSharedVaultInvitesRequestParams = {
sharedVaultUuid: string
}
@@ -0,0 +1,4 @@
export type DeleteInviteRequestParams = {
sharedVaultUuid: string
inviteUuid: string
}
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/ban-types
export type GetOutboundUserInvitesRequestParams = {}
@@ -0,0 +1,3 @@
export type GetSharedVaultInvitesRequestParams = {
sharedVaultUuid: string
}
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/ban-types
export type GetUserInvitesRequestParams = {}
@@ -0,0 +1,8 @@
import { SharedVaultPermission } from '@standardnotes/responses'
export type UpdateSharedVaultInviteParams = {
sharedVaultUuid: string
inviteUuid: string
encryptedMessage: string
permissions?: SharedVaultPermission
}
@@ -0,0 +1,4 @@
export type DeleteSharedVaultUserRequestParams = {
sharedVaultUuid: string
userUuid: string
}
@@ -0,0 +1,3 @@
export type GetSharedVaultUsersRequestParams = {
sharedVaultUuid: string
}
@@ -1,4 +1,4 @@
import { ApiEndpointParam } from '../ApiEndpointParam'
import { ApiEndpointParam } from '@standardnotes/responses'
import { ApiVersion } from '../../Api/ApiVersion'
export type SubscriptionInviteCancelRequestParams = {
@@ -1,4 +1,4 @@
import { ApiEndpointParam } from '../ApiEndpointParam'
import { ApiEndpointParam } from '@standardnotes/responses'
import { ApiVersion } from '../../Api/ApiVersion'
export type SubscriptionInviteDeclineRequestParams = {
@@ -1,4 +1,4 @@
import { ApiEndpointParam } from '../ApiEndpointParam'
import { ApiEndpointParam } from '@standardnotes/responses'
import { ApiVersion } from '../../Api/ApiVersion'
export type SubscriptionInviteListRequestParams = {
@@ -1,4 +1,4 @@
import { ApiEndpointParam } from '../ApiEndpointParam'
import { ApiEndpointParam } from '@standardnotes/responses'
import { ApiVersion } from '../../Api/ApiVersion'
export type SubscriptionInviteRequestParams = {
@@ -1,13 +1,11 @@
import { AnyKeyParamsContent } from '@standardnotes/common'
import { ApiEndpointParam } from '../ApiEndpointParam'
import { ApiEndpointParam } from '@standardnotes/responses'
import { ApiVersion } from '../../Api/ApiVersion'
export type UserRegistrationRequestParams = AnyKeyParamsContent & {
[ApiEndpointParam.ApiVersion]: ApiVersion.v0
[additionalParam: string]: unknown
password: string
email: string
ephemeral: boolean
[additionalParam: string]: unknown
pkcPublicKey?: string
pkcEncryptedPrivateKey?: string
}
@@ -0,0 +1,7 @@
import { ApiEndpointParam } from '@standardnotes/responses'
import { ApiVersion } from '../../Api/ApiVersion'
export type UserUpdateRequestParams = {
[ApiEndpointParam.ApiVersion]: ApiVersion.v0
user_uuid: string
}
+1 -1
View File
@@ -1,4 +1,3 @@
export * from './ApiEndpointParam'
export * from './Authenticator/DeleteAuthenticatorRequestParams'
export * from './Authenticator/GenerateAuthenticatorAuthenticationOptionsRequestParams'
export * from './Authenticator/ListAuthenticatorsRequestParams'
@@ -17,3 +16,4 @@ export * from './Subscription/SubscriptionInviteRequestParams'
export * from './User/UserRegistrationRequestParams'
export * from './UserRequest/UserRequestRequestParams'
export * from './WebSocket/WebSocketConnectionTokenRequestParams'
export * from './SharedVault/SharedVaultMoveType'
@@ -0,0 +1,5 @@
import { AsymmetricMessageServerHash } from '@standardnotes/responses'
export type CreateAsymmetricMessageResponse = {
message: AsymmetricMessageServerHash
}
@@ -0,0 +1,3 @@
export type DeleteAsymmetricMessageResponse = {
success: boolean
}
@@ -0,0 +1,5 @@
import { AsymmetricMessageServerHash } from '@standardnotes/responses'
export type GetOutboundAsymmetricMessagesResponse = {
messages: AsymmetricMessageServerHash[]
}
@@ -0,0 +1,5 @@
import { AsymmetricMessageServerHash } from '@standardnotes/responses'
export type GetUserAsymmetricMessagesResponse = {
messages: AsymmetricMessageServerHash[]
}
@@ -0,0 +1,5 @@
import { AsymmetricMessageServerHash } from '@standardnotes/responses'
export type UpdateAsymmetricMessageResponse = {
message: AsymmetricMessageServerHash
}
@@ -7,6 +7,9 @@ export interface GetRevisionResponseBody {
items_key_id: string | null
enc_item_key: string | null
auth_hash: string | null
user_uuid: string
key_system_identifier: string | null
shared_vault_uuid: string | null
created_at: string
updated_at: string
}
@@ -0,0 +1,6 @@
import { SharedVaultUserServerHash, SharedVaultServerHash } from '@standardnotes/responses'
export type CreateSharedVaultResponse = {
sharedVault: SharedVaultServerHash
sharedVaultUser: SharedVaultUserServerHash
}
@@ -0,0 +1,3 @@
export type CreateSharedVaultValetTokenResponse = {
valetToken: string
}
@@ -0,0 +1,5 @@
import { SharedVaultServerHash } from '@standardnotes/responses'
export type GetSharedVaultsResponse = {
sharedVaults: SharedVaultServerHash[]
}
@@ -0,0 +1,3 @@
export type AcceptInviteResponse = {
success: boolean
}
@@ -0,0 +1,5 @@
import { SharedVaultInviteServerHash } from '@standardnotes/responses'
export type CreateSharedVaultInviteResponse = {
invite: SharedVaultInviteServerHash
}
@@ -0,0 +1,3 @@
export type DeclineInviteResponse = {
success: boolean
}
@@ -0,0 +1,3 @@
export type DeleteAllSharedVaultInvitesResponse = {
success: boolean
}
@@ -0,0 +1,3 @@
export type DeleteInviteResponse = {
success: boolean
}
@@ -0,0 +1,5 @@
import { SharedVaultInviteServerHash } from '@standardnotes/responses'
export type GetOutboundUserInvitesResponse = {
invites: SharedVaultInviteServerHash[]
}

Some files were not shown because too many files have changed in this diff Show More