Compare commits

...
Author SHA1 Message Date
StandardNotes CI 5ba39577e1 chore(release): publish
- @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-02-27 09:24:52 +00:00
Aman Harwara a1de560a2c chore: remove comment 2023-02-27 14:21:28 +05:30
Aman Harwara 6c120ffde2 fix: Fixes issue where preferences view would not close after pressing Escape 2023-02-27 14:13:39 +05:30
StandardNotes CI 3c1dc10504 chore(release): publish
- @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-02-25 06:26:40 +00:00
Aman Harwara a15fc1ed1d feat: Added "Image from URL" option and markdown image syntax support to Super. Also allows pasting images from copied web content (#2218) 2023-02-25 11:27:03 +05:30
StandardNotes CI adff5979be chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-02-24 14:50:08 +00:00
Aman Harwara b130fc76cb chore: fix super auto-embed menu style 2023-02-24 19:52:14 +05:30
StandardNotes CI 8286867b75 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
2023-02-23 19:17:43 +00:00
Aman Harwara db14a75f65 chore: upgrade lexical 2023-02-24 00:15:41 +05:30
StandardNotes CI 66fabf76d2 chore(release): publish
- @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].9
2023-02-23 13:29:03 +00:00
Karol Sójko 70e3ba3fa5 chore: remove workspaces from code base (#2220) 2023-02-23 14:01:55 +01:00
Aman Harwara 8e784d3495 refactor: revert action change 2023-02-17 21:43:37 +05:30
Aman Harwara 081ac6d107 fix: action 2023-02-17 20:29:13 +05:30
Aman Harwara f13c987843 fix: action 2023-02-17 20:23:21 +05:30
Aman Harwara a6b13c82fa fix: action 2023-02-17 19:56:44 +05:30
Aman Harwara bafda4e8ce fix: action 2023-02-17 19:36:51 +05:30
Aman Harwara 2d83f9a339 fix: action 2023-02-17 19:35:45 +05:30
Aman Harwara e4d0aee2d1 refactor: fix action 2023-02-17 19:32:21 +05:30
Aman Harwara 41eb119030 refactor: Publish Packages action 2023-02-17 19:30:41 +05:30
Aman Harwara 7bf76b51c5 refactor: merge blocks-editor package with web (#2217) 2023-02-17 18:35:17 +05:30
StandardNotes CI 135956ce73 chore(release): publish
- @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
2023-02-16 09:38:41 +00:00
Aman Harwara 91a8023fa4 fix: Fixes issue where pasting in a new Super note would not save it 2023-02-16 14:40:32 +05:30
StandardNotes CI ed5a189745 chore(release): publish
- @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].7
2023-02-15 11:14:18 +00:00
Karol Sójko 734a38ab1f chore: upgrade @standardnotes/domain-core with less 3rd party dependencies (#2214) 2023-02-15 11:42:55 +01:00
StandardNotes CI 06c07d3b3e chore(release): publish
- @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
2023-02-13 14:02:13 +00:00
Aman Harwara a0c4a403cb chore: fix super embed modal on mobile screens 2023-02-13 19:04:35 +05:30
StandardNotes CI 5d97276e06 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2023-02-13 11:33:57 +00:00
Aman Harwara 74384ba322 fix: Fixed issue where scrollbar theming would not be correctly applied in some sections 2023-02-13 16:35:23 +05:30
StandardNotes CI f30868dab1 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2023-02-11 21:00:56 +00:00
Mo 088804dee1 fix(mobile): fixes issue where app would not load on iOS 13 + 14 2023-02-11 14:29:11 -06:00
StandardNotes CI ad74cde42b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2023-02-10 17:04:34 +00:00
Mo 83db277115 chore: fix copy 2023-02-10 10:32:00 -06:00
StandardNotes CI 0dba3256c4 chore(release): publish
- @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2023-02-10 10:54:39 +00:00
Aman Harwara 033e73b189 feat: Added markdown horizontal rule syntax to Super notes 2023-02-10 15:56:34 +05:30
StandardNotes CI 5443ad37f4 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-02-10 10:07:37 +00:00
Aman Harwara 2c54554325 chore: upgrade lexical 2023-02-10 15:10:50 +05:30
Aman Harwara 7c84b77a62 refactor: pane gesture overlay animation 2023-02-10 15:06:08 +05:30
StandardNotes CI 9fcaed4395 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-02-09 16:52:18 +00:00
Aman Harwara e6e5cf4900 chore: fix copy 2023-02-09 21:54:00 +05:30
Aman Harwara ae6bd4c07f fix: Fixed issue where keyboard navigation in file preview modal would not work until you clicked inside 2023-02-09 21:38:38 +05:30
Aman Harwara ab39618533 Merge branch 'main' of github.com:standardnotes/app 2023-02-09 21:34:07 +05:30
Aman Harwara 82b092673e feat: Added button to allow collapsing the linked items container 2023-02-09 21:33:58 +05:30
StandardNotes CI 18e3a2c39a chore(release): publish
- @standardnotes/[email protected].9
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2023-02-09 11:29:11 +00:00
Aman Harwara 3293c8b47b Merge branch 'main' of github.com:standardnotes/app 2023-02-09 16:30:58 +05:30
Aman Harwara 3932363797 refactor: rollback lexical update 2023-02-09 16:30:50 +05:30
StandardNotes CI 6c2024becb chore(release): publish
- @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2023-02-09 10:06:41 +00:00
Aman Harwara 663603973d refactor: fix overlay cleanup 2023-02-09 15:08:16 +05:30
Aman Harwara 3c068656e0 refactor: potential perf improvement for pane gesture 2023-02-09 15:01:32 +05:30
Aman Harwara 73adcd2e11 chore: upgrade lexical 2023-02-09 14:58:48 +05:30
StandardNotes CI 8e6ddbc598 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2023-02-08 13:21:19 +00:00
Aman Harwara e794b873a5 chore: fix cleanup function 2023-02-08 18:23:14 +05:30
Karol Sójko cf975cfed3 chore: fix running e2e test suite against server setup 2023-02-07 14:21:12 +01:00
StandardNotes CI fe53a70a6f chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2023-02-07 12:49:56 +00:00
Aman Harwara 5f28fc9773 chore: fix per-tag preferences for offline subscriptions 2023-02-07 17:53:29 +05:30
StandardNotes CI 625e522234 chore(release): publish
- @standardnotes/[email protected].7
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-02-07 10:59:01 +00:00
Aman Harwara 461551fdf7 fix: Fixed issue in Super notes where collapsible block title alignment would not persist 2023-02-07 16:02:57 +05:30
StandardNotes CI 1bf899bb2b chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-02-07 08:29:03 +00:00
Aman Harwara 1d052c3dd1 feat: Added swipe gestures for dismissing panes on mobile (#2201) 2023-02-07 12:51:16 +05:30
Aman Harwara f0d49f6b21 fix(desktop): Fixed issue where some links on desktop would not correctly open in the browser 2023-02-07 12:36:37 +05:30
StandardNotes CI 7ad9eab4d8 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-02-06 08:28:38 +00:00
Aman Harwara cfc6022fbb fix: Fixed issue where toggling a link from Super mobile toolbar didn't work 2023-02-06 13:32:14 +05:30
Aman Harwara 9808262e9e feat: Added search button to Super mobile toolbar 2023-02-06 13:31:37 +05:30
StandardNotes CI 56ae3616e8 chore(release): publish
- @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2023-02-03 19:42:38 +00:00
Aman Harwara cc959738c7 chore: upgrade Lexical and fix list style position 2023-02-04 00:42:20 +05:30
StandardNotes CI 449199195c chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].9
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-02-03 15:43:28 +00:00
Mo 1a395f5a4c chore: edit release notes 2023-02-03 09:15:08 -06:00
StandardNotes CI d29d021b24 chore(release): publish
- @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].8
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected].0
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-02-03 07:53:25 +00:00
Karol SójkoandAman Harwara 9414774e89 feat(dev): add u2f ui for managing devices and signing in (#2182)
* feat: add u2f ui for managing devices and signing in

* refactor: change unnecessary useState to derived constant

* fix: modal refactor

* fix(web): hide u2f under feature trunk

* fix(web): jest setup

---------

Co-authored-by: Aman Harwara <[email protected]>
2023-02-03 07:54:56 +01:00
StandardNotes CI b4f14c668d chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].7
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-02-03 06:10:04 +00:00
Karol Sójko 9e15ea78f8 fix(web): remove unused import 2023-02-03 06:43:58 +01:00
Karol Sójko de5973e15f fix(web): disable subscription sharing on demo 2023-02-03 06:41:00 +01:00
StandardNotes CI 361c75502e chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected].6
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].0
2023-02-02 14:10:42 +00:00
Aman Harwara 999119d292 Merge branch 'main' of github.com:standardnotes/app 2023-02-02 19:07:33 +05:30
Aman Harwara 0785ea6531 feat: Added language selection dropdown in Super when cursor is in a code block 2023-02-02 19:07:18 +05:30
StandardNotes CI 1bba453e51 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].5
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].5
2023-02-02 08:23:20 +00:00
Aman Harwara 7a3f3761fc fix: Fixed issue where Super toolbar would close on clicking on iOS 2023-02-02 13:24:55 +05:30
StandardNotes CI 5a5012fc60 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected].2
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].4
2023-02-01 19:08:40 +00:00
Aman Harwara f0e7957b2f Merge branch 'main' of github.com:standardnotes/app 2023-02-02 00:11:47 +05:30
Aman Harwara 6829c15159 chore: upgrade electron 2023-02-02 00:11:38 +05:30
StandardNotes CI 72a86da7f8 chore(release): publish
- @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected].1
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
 - @standardnotes/[email protected]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].3
2023-02-01 16:22:51 +00:00
Aman Harwara 039f04c10f Merge branch 'main' of github.com:standardnotes/app 2023-02-01 21:25:19 +05:30
Aman Harwara cf4e34858f fix: Fixed issue where converting to Super would result in empty note 2023-02-01 21:25:12 +05:30
Mo b3cfb87c7f fix(models): filter out items with unknown content type (#2192) 2023-02-01 09:40:42 -06:00
Aman Harwara 0a72e8f609 chore: fix dropdowns 2023-02-01 20:41:40 +05:30
Aman Harwara 808827a64d Merge branch 'main' of github.com:standardnotes/app 2023-02-01 20:24:12 +05:30
Aman Harwara 9da8f4e419 fix: Fixed issue where clicking on the toolbar would dismiss the keyboard & toolbar 2023-02-01 20:24:03 +05:30
StandardNotes CI 14bb9326ec chore(release): publish
- @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]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].2
2023-02-01 14:05:20 +00:00
Aman Harwara 712047d6f9 Merge branch 'main' of github.com:standardnotes/app 2023-02-01 19:07:54 +05:30
Aman Harwara 9be4f5b4cd fix: Fixed issue where the first input in the challenge modal would get focused when typing in another input 2023-02-01 19:07:44 +05:30
StandardNotes CI d82c496669 chore(release): publish
- @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]
 - @standardnotes/[email protected]
 - @standardnotes/[email protected].1
2023-02-01 10:30:02 +00:00
Aman Harwara 841b208684 Merge branch 'main' of github.com:standardnotes/app 2023-02-01 15:30:21 +05:30
Aman Harwara f51d234596 chore: fix select dropdown border on dark themes 2023-02-01 15:30:12 +05:30
383 changed files with 3127 additions and 2077 deletions
+2 -2
View File
@@ -67,9 +67,9 @@ jobs:
uses: convictional/trigger-workflow-and-wait@master
with:
owner: standardnotes
repo: self-hosted
repo: server
github_token: ${{ secrets.CI_PAT_TOKEN }}
workflow_file_name: testing-with-updating-client-and-server.yml
workflow_file_name: e2e-test-suite.yml
wait_interval: 30
client_payload: '{"snjs_image_tag": "${{ github.sha }}"}'
propagate_failure: true
+2 -2
View File
@@ -43,9 +43,9 @@ jobs:
uses: convictional/trigger-workflow-and-wait@master
with:
owner: standardnotes
repo: self-hosted
repo: server
github_token: ${{ secrets.CI_PAT_TOKEN }}
workflow_file_name: testing-with-updating-client-and-server.yml
workflow_file_name: e2e-test-suite.yml
wait_interval: 30
client_payload: '{"snjs_image_tag": "${{ github.sha }}"}'
propagate_failure: true
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.
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.
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.
+26
View File
@@ -3,6 +3,32 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.25.2](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-02-23)
**Note:** Version bump only for package @standardnotes/api
## [1.25.1](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-02-15)
**Note:** Version bump only for package @standardnotes/api
# [1.25.0](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-02-03)
### Features
* **dev:** add u2f ui for managing devices and signing in ([#2182](https://github.com/standardnotes/app/issues/2182)) ([9414774](https://github.com/standardnotes/app/commit/9414774e89c5c21b0c2178652ded72033065e8d2))
## [1.24.16](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-02-02)
**Note:** Version bump only for package @standardnotes/api
## [1.24.15](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-02-01)
**Note:** Version bump only for package @standardnotes/api
## [1.24.14](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-02-01)
**Note:** Version bump only for package @standardnotes/api
## [1.24.13](https://github.com/standardnotes/app/compare/@standardnotes/[email protected]...@standardnotes/[email protected]) (2023-01-31)
**Note:** Version bump only for package @standardnotes/api
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api",
"version": "1.24.13",
"version": "1.25.2",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -37,7 +37,7 @@
},
"dependencies": {
"@standardnotes/common": "^1.46.4",
"@standardnotes/domain-core": "^1.11.1",
"@standardnotes/domain-core": "^1.11.3",
"@standardnotes/encryption": "workspace:*",
"@standardnotes/models": "workspace:*",
"@standardnotes/responses": "workspace:*",
@@ -4,5 +4,4 @@ export enum AuthenticatorApiOperations {
GenerateRegistrationOptions,
GenerateAuthenticationOptions,
VerifyRegistrationResponse,
VerifyAuthenticationResponse,
}
@@ -9,7 +9,6 @@ import {
GenerateAuthenticatorRegistrationOptionsResponse,
VerifyAuthenticatorRegistrationResponseResponse,
GenerateAuthenticatorAuthenticationOptionsResponse,
VerifyAuthenticatorAuthenticationResponseResponse,
} from '../../Response'
import { AuthenticatorServerInterface } from '../../Server/Authenticator/AuthenticatorServerInterface'
@@ -79,7 +78,7 @@ export class AuthenticatorApiService implements AuthenticatorApiServiceInterface
async verifyRegistrationResponse(
userUuid: string,
name: string,
registrationCredential: Record<string, unknown>,
attestationResponse: Record<string, unknown>,
): Promise<VerifyAuthenticatorRegistrationResponseResponse> {
if (this.operationsInProgress.get(AuthenticatorApiOperations.VerifyRegistrationResponse)) {
throw new ApiCallError(ErrorMessage.GenericInProgress)
@@ -91,7 +90,7 @@ export class AuthenticatorApiService implements AuthenticatorApiServiceInterface
const response = await this.authenticatorServer.verifyRegistrationResponse({
userUuid,
name,
registrationCredential,
attestationResponse,
})
return response
@@ -102,7 +101,7 @@ export class AuthenticatorApiService implements AuthenticatorApiServiceInterface
}
}
async generateAuthenticationOptions(): Promise<GenerateAuthenticatorAuthenticationOptionsResponse> {
async generateAuthenticationOptions(username: string): Promise<GenerateAuthenticatorAuthenticationOptionsResponse> {
if (this.operationsInProgress.get(AuthenticatorApiOperations.GenerateAuthenticationOptions)) {
throw new ApiCallError(ErrorMessage.GenericInProgress)
}
@@ -110,7 +109,9 @@ export class AuthenticatorApiService implements AuthenticatorApiServiceInterface
this.operationsInProgress.set(AuthenticatorApiOperations.GenerateAuthenticationOptions, true)
try {
const response = await this.authenticatorServer.generateAuthenticationOptions()
const response = await this.authenticatorServer.generateAuthenticationOptions({
username,
})
return response
} catch (error) {
@@ -119,28 +120,4 @@ export class AuthenticatorApiService implements AuthenticatorApiServiceInterface
this.operationsInProgress.set(AuthenticatorApiOperations.GenerateAuthenticationOptions, false)
}
}
async verifyAuthenticationResponse(
userUuid: string,
authenticationCredential: Record<string, unknown>,
): Promise<VerifyAuthenticatorAuthenticationResponseResponse> {
if (this.operationsInProgress.get(AuthenticatorApiOperations.VerifyAuthenticationResponse)) {
throw new ApiCallError(ErrorMessage.GenericInProgress)
}
this.operationsInProgress.set(AuthenticatorApiOperations.VerifyAuthenticationResponse, true)
try {
const response = await this.authenticatorServer.verifyAuthenticationResponse({
authenticationCredential,
userUuid,
})
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericFail)
} finally {
this.operationsInProgress.set(AuthenticatorApiOperations.VerifyAuthenticationResponse, false)
}
}
}
@@ -4,7 +4,6 @@ import {
GenerateAuthenticatorRegistrationOptionsResponse,
VerifyAuthenticatorRegistrationResponseResponse,
GenerateAuthenticatorAuthenticationOptionsResponse,
VerifyAuthenticatorAuthenticationResponseResponse,
} from '../../Response'
export interface AuthenticatorApiServiceInterface {
@@ -14,11 +13,7 @@ export interface AuthenticatorApiServiceInterface {
verifyRegistrationResponse(
userUuid: string,
name: string,
registrationCredential: Record<string, unknown>,
attestationResponse: Record<string, unknown>,
): Promise<VerifyAuthenticatorRegistrationResponseResponse>
generateAuthenticationOptions(): Promise<GenerateAuthenticatorAuthenticationOptionsResponse>
verifyAuthenticationResponse(
userUuid: string,
authenticationCredential: Record<string, unknown>,
): Promise<VerifyAuthenticatorAuthenticationResponseResponse>
generateAuthenticationOptions(username: string): Promise<GenerateAuthenticatorAuthenticationOptionsResponse>
}
@@ -1,10 +0,0 @@
import { WorkspaceType } from '@standardnotes/common'
export type Workspace = {
uuid: string
type: WorkspaceType
name: string | null
keyRotationIndex: number
createdAt: number
updatedAt: number
}
@@ -1,8 +0,0 @@
export enum WorkspaceApiOperations {
Creating,
Inviting,
Accepting,
ListingWorkspaces,
ListingWorkspaceUsers,
InitiatingKeyshare,
}
@@ -1,156 +0,0 @@
import { WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common'
import { ErrorMessage } from '../../Error/ErrorMessage'
import { ApiCallError } from '../../Error/ApiCallError'
import { WorkspaceCreationResponse } from '../../Response/Workspace/WorkspaceCreationResponse'
import { WorkspaceInvitationAcceptingResponse } from '../../Response/Workspace/WorkspaceInvitationAcceptingResponse'
import { WorkspaceInvitationResponse } from '../../Response/Workspace/WorkspaceInvitationResponse'
import { WorkspaceServerInterface } from '../../Server/Workspace/WorkspaceServerInterface'
import { WorkspaceListResponse } from '../../Response/Workspace/WorkspaceListResponse'
import { WorkspaceUserListResponse } from '../../Response/Workspace/WorkspaceUserListResponse'
import { WorkspaceKeyshareInitiatingResponse } from '../../Response/Workspace/WorkspaceKeyshareInitiatingResponse'
import { WorkspaceApiServiceInterface } from './WorkspaceApiServiceInterface'
import { WorkspaceApiOperations } from './WorkspaceApiOperations'
export class WorkspaceApiService implements WorkspaceApiServiceInterface {
private operationsInProgress: Map<WorkspaceApiOperations, boolean>
constructor(private workspaceServer: WorkspaceServerInterface) {
this.operationsInProgress = new Map()
}
async initiateKeyshare(dto: {
workspaceUuid: string
userUuid: string
encryptedWorkspaceKey: string
}): Promise<WorkspaceKeyshareInitiatingResponse> {
this.lockOperation(WorkspaceApiOperations.InitiatingKeyshare)
try {
const response = await this.workspaceServer.initiateKeyshare({
workspaceUuid: dto.workspaceUuid,
userUuid: dto.userUuid,
encryptedWorkspaceKey: dto.encryptedWorkspaceKey,
})
this.unlockOperation(WorkspaceApiOperations.InitiatingKeyshare)
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
async listWorkspaceUsers(dto: { workspaceUuid: string }): Promise<WorkspaceUserListResponse> {
this.lockOperation(WorkspaceApiOperations.ListingWorkspaceUsers)
try {
const response = await this.workspaceServer.listWorkspaceUsers({ workspaceUuid: dto.workspaceUuid })
this.unlockOperation(WorkspaceApiOperations.ListingWorkspaceUsers)
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
async listWorkspaces(): Promise<WorkspaceListResponse> {
this.lockOperation(WorkspaceApiOperations.ListingWorkspaces)
try {
const response = await this.workspaceServer.listWorkspaces({})
this.unlockOperation(WorkspaceApiOperations.ListingWorkspaces)
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
async acceptInvite(dto: {
inviteUuid: string
userUuid: string
publicKey: string
encryptedPrivateKey: string
}): Promise<WorkspaceInvitationAcceptingResponse> {
this.lockOperation(WorkspaceApiOperations.Accepting)
try {
const response = await this.workspaceServer.acceptInvite({
encryptedPrivateKey: dto.encryptedPrivateKey,
publicKey: dto.publicKey,
inviteUuid: dto.inviteUuid,
userUuid: dto.userUuid,
})
this.unlockOperation(WorkspaceApiOperations.Accepting)
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
async inviteToWorkspace(dto: {
inviteeEmail: string
workspaceUuid: string
accessLevel: WorkspaceAccessLevel
}): Promise<WorkspaceInvitationResponse> {
this.lockOperation(WorkspaceApiOperations.Inviting)
try {
const response = await this.workspaceServer.inviteToWorkspace({
inviteeEmail: dto.inviteeEmail,
workspaceUuid: dto.workspaceUuid,
accessLevel: dto.accessLevel,
})
this.unlockOperation(WorkspaceApiOperations.Inviting)
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
async createWorkspace(dto: {
workspaceType: WorkspaceType
encryptedWorkspaceKey?: string
encryptedPrivateKey?: string
publicKey?: string
workspaceName?: string
}): Promise<WorkspaceCreationResponse> {
this.lockOperation(WorkspaceApiOperations.Creating)
try {
const response = await this.workspaceServer.createWorkspace({
workspaceType: dto.workspaceType,
encryptedPrivateKey: dto.encryptedPrivateKey,
encryptedWorkspaceKey: dto.encryptedWorkspaceKey,
publicKey: dto.publicKey,
workspaceName: dto.workspaceName,
})
this.unlockOperation(WorkspaceApiOperations.Creating)
return response
} catch (error) {
throw new ApiCallError(ErrorMessage.GenericFail)
}
}
private lockOperation(operation: WorkspaceApiOperations): void {
if (this.operationsInProgress.get(operation)) {
throw new ApiCallError(ErrorMessage.GenericInProgress)
}
this.operationsInProgress.set(operation, true)
}
private unlockOperation(operation: WorkspaceApiOperations): void {
this.operationsInProgress.set(operation, false)
}
}
@@ -1,36 +0,0 @@
import { WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common'
import { WorkspaceKeyshareInitiatingResponse } from '../../Response/Workspace/WorkspaceKeyshareInitiatingResponse'
import { WorkspaceCreationResponse } from '../../Response/Workspace/WorkspaceCreationResponse'
import { WorkspaceInvitationAcceptingResponse } from '../../Response/Workspace/WorkspaceInvitationAcceptingResponse'
import { WorkspaceInvitationResponse } from '../../Response/Workspace/WorkspaceInvitationResponse'
import { WorkspaceListResponse } from '../../Response/Workspace/WorkspaceListResponse'
import { WorkspaceUserListResponse } from '../../Response/Workspace/WorkspaceUserListResponse'
export interface WorkspaceApiServiceInterface {
createWorkspace(dto: {
workspaceType: WorkspaceType
encryptedWorkspaceKey?: string
encryptedPrivateKey?: string
publicKey?: string
workspaceName?: string
}): Promise<WorkspaceCreationResponse>
inviteToWorkspace(dto: {
inviteeEmail: string
workspaceUuid: string
accessLevel: WorkspaceAccessLevel
}): Promise<WorkspaceInvitationResponse>
acceptInvite(dto: {
inviteUuid: string
userUuid: string
publicKey: string
encryptedPrivateKey: string
}): Promise<WorkspaceInvitationAcceptingResponse>
listWorkspaces(): Promise<WorkspaceListResponse>
listWorkspaceUsers(dto: { workspaceUuid: string }): Promise<WorkspaceUserListResponse>
initiateKeyshare(dto: {
workspaceUuid: string
userUuid: string
encryptedWorkspaceKey: string
}): Promise<WorkspaceKeyshareInitiatingResponse>
}
@@ -1,16 +0,0 @@
import { WorkspaceAccessLevel, WorkspaceUserStatus } from '@standardnotes/common'
export type WorkspaceUser = {
uuid: string
accessLevel: WorkspaceAccessLevel
userUuid: string
userDisplayName: string | null
workspaceUuid: string
encryptedWorkspaceKey: string | null
publicKey: string | null
encryptedPrivateKey: string | null
status: WorkspaceUserStatus
keyRotationIndex: number
createdAt: number
updatedAt: number
}
-4
View File
@@ -15,7 +15,3 @@ export * from './User/UserApiService'
export * from './User/UserApiServiceInterface'
export * from './WebSocket/WebSocketApiService'
export * from './WebSocket/WebSocketApiServiceInterface'
export * from './Workspace/WorkspaceApiService'
export * from './Workspace/WorkspaceApiServiceInterface'
export * from './Workspace/WorkspaceUser'
export * from './Workspace/Workspace'
@@ -0,0 +1,3 @@
export interface GenerateAuthenticatorAuthenticationOptionsRequestParams {
username: string
}
@@ -1,5 +0,0 @@
export interface VerifyAuthenticatorAuthenticationResponseRequestParams {
userUuid: string
authenticationCredential: Record<string, unknown>
[additionalParam: string]: unknown
}
@@ -1,6 +1,6 @@
export interface VerifyAuthenticatorRegistrationResponseRequestParams {
userUuid: string
name: string
registrationCredential: Record<string, unknown>
attestationResponse: Record<string, unknown>
[additionalParam: string]: unknown
}
@@ -1,10 +0,0 @@
import { WorkspaceType } from '@standardnotes/common'
export type WorkspaceCreationRequestParams = {
workspaceType: WorkspaceType
encryptedWorkspaceKey?: string
encryptedPrivateKey?: string
publicKey?: string
workspaceName?: string
[additionalParam: string]: unknown
}
@@ -1,7 +0,0 @@
export type WorkspaceInvitationAcceptingRequestParams = {
inviteUuid: string
userUuid: string
publicKey: string
encryptedPrivateKey: string
[additionalParam: string]: unknown
}
@@ -1,8 +0,0 @@
import { WorkspaceAccessLevel } from '@standardnotes/common'
export type WorkspaceInvitationRequestParams = {
workspaceUuid: string
inviteeEmail: string
accessLevel: WorkspaceAccessLevel
[additionalParam: string]: unknown
}
@@ -1,6 +0,0 @@
export type WorkspaceKeyshareInitiatingRequestParams = {
userUuid: string
workspaceUuid: string
encryptedWorkspaceKey: string
[additionalParam: string]: unknown
}
@@ -1,3 +0,0 @@
export type WorkspaceListRequestParams = {
[additionalParam: string]: unknown
}
@@ -1,4 +0,0 @@
export type WorkspaceUserListRequestParams = {
workspaceUuid: string
[additionalParam: string]: unknown
}
+1 -7
View File
@@ -1,7 +1,7 @@
export * from './ApiEndpointParam'
export * from './Authenticator/DeleteAuthenticatorRequestParams'
export * from './Authenticator/GenerateAuthenticatorAuthenticationOptionsRequestParams'
export * from './Authenticator/ListAuthenticatorsRequestParams'
export * from './Authenticator/VerifyAuthenticatorAuthenticationResponseRequestParams'
export * from './Authenticator/VerifyAuthenticatorRegistrationResponseRequestParams'
export * from './Recovery/RecoveryKeyParamsRequestParams'
export * from './Recovery/SignInWithRecoveryCodesRequestParams'
@@ -17,9 +17,3 @@ export * from './Subscription/SubscriptionInviteRequestParams'
export * from './User/UserRegistrationRequestParams'
export * from './UserRequest/UserRequestRequestParams'
export * from './WebSocket/WebSocketConnectionTokenRequestParams'
export * from './Workspace/WorkspaceCreationRequestParams'
export * from './Workspace/WorkspaceInvitationAcceptingRequestParams'
export * from './Workspace/WorkspaceInvitationRequestParams'
export * from './Workspace/WorkspaceKeyshareInitiatingRequestParams'
export * from './Workspace/WorkspaceListRequestParams'
export * from './Workspace/WorkspaceUserListRequestParams'

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