From 953cc5f8954f56874131b63f33db1a33797bba00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Thu, 19 Jan 2023 15:43:13 +0100 Subject: [PATCH] refactor: remove Uuid and RoleName from @standardnotes/common in favour of @standardnotes/domain-core value objects --- ...ommon-npm-1.46.3-a99a2b97e2-0fa509e304.zip | Bin 0 -> 39911 bytes ...core-npm-1.11.1-c16df67772-98af016a83.zip} | Bin 44686 -> 45421 bytes packages/api/package.json | 4 +- .../Subscription/SubscriptionApiService.ts | 3 +- .../SubscriptionApiServiceInterface.ts | 6 +- .../Client/User/UserApiServiceInterface.ts | 4 +- .../Client/Workspace/WorkspaceApiService.ts | 4 +- .../Workspace/WorkspaceApiServiceInterface.ts | 14 +-- .../Domain/Client/Workspace/WorkspaceUser.ts | 8 +- .../api/src/Domain/Http/HttpResponseMeta.ts | 3 +- .../SubscriptionInviteAcceptRequestParams.ts | 4 +- .../SubscriptionInviteCancelRequestParams.ts | 4 +- .../SubscriptionInviteDeclineRequestParams.ts | 4 +- .../Request/User/UserDeletionRequestParams.ts | 4 +- .../UserRequest/UserRequestRequestParams.ts | 4 +- ...rkspaceInvitationAcceptingRequestParams.ts | 6 +- .../WorkspaceInvitationRequestParams.ts | 4 +- ...orkspaceKeyshareInitiatingRequestParams.ts | 6 +- .../WorkspaceUserListRequestParams.ts | 4 +- .../SubscriptionInviteResponseBody.ts | 4 +- .../User/UserRegistrationResponseBody.ts | 3 +- .../src/Domain/Server/Subscription/Paths.ts | 8 +- packages/api/src/Domain/Server/User/Paths.ts | 4 +- .../src/Domain/Server/UserRequest/Paths.ts | 4 +- .../api/src/Domain/Server/Workspace/Paths.ts | 10 +- packages/encryption/package.json | 2 +- .../src/Domain/Split/EncryptionSplit.ts | 5 +- .../src/Domain/Types/ItemAuthenticatedData.ts | 4 +- packages/features/package.json | 3 +- .../src/Domain/Feature/FeatureDescription.ts | 6 +- .../src/Domain/Lists/ClientFeatures.ts | 5 +- .../src/Domain/Permission/Permission.ts | 4 +- packages/filepicker/package.json | 2 +- packages/files/package.json | 2 +- .../files/src/Domain/Cache/FileMemoryCache.ts | 11 +- .../src/Domain/Device/FileBackupsDevice.ts | 3 +- .../src/Domain/Device/FileBackupsMapping.ts | 3 +- packages/models/package.json | 2 +- .../Domain/Abstract/Component/MessageData.ts | 4 +- .../Domain/Abstract/Content/ItemContent.ts | 3 +- .../BackupFileDecryptedContextualPayload.ts | 3 +- .../BackupFileEncryptedContextualPayload.ts | 3 +- .../Abstract/Contextual/LocalStorage.ts | 7 +- .../Abstract/Contextual/OfflineSyncPush.ts | 3 +- .../Abstract/Contextual/ServerSyncPush.ts | 3 +- .../Item/Implementations/DecryptedItem.ts | 3 +- .../Item/Implementations/GenericItem.ts | 4 +- .../Abstract/Item/Interfaces/DecryptedItem.ts | 5 +- .../Abstract/Item/Interfaces/ItemInterface.ts | 8 +- .../Item/Mutator/DecryptedItemMutator.ts | 3 +- .../Item/Mutator/TransactionalMutation.ts | 4 +- .../Implementations/DecryptedPayload.ts | 3 +- .../Payload/Interfaces/DecryptedPayload.ts | 3 +- .../Payload/Interfaces/PayloadInterface.ts | 6 +- .../Interfaces/TransferPayload.ts | 6 +- .../Domain/Runtime/Collection/Collection.ts | 32 +++--- .../Runtime/Collection/CollectionSort.ts | 4 +- .../Runtime/Collection/Item/ItemCollection.ts | 8 +- .../Runtime/Collection/Item/TagItemsIndex.ts | 14 +-- .../Domain/Runtime/Deltas/RemoteRetrieved.ts | 4 +- .../src/Domain/Runtime/Display/Types.ts | 3 +- .../src/Domain/Runtime/History/HistoryMap.ts | 3 +- .../Domain/Syncable/Component/Component.ts | 6 +- .../Syncable/Component/ComponentContent.ts | 3 +- .../Syncable/Component/ComponentMutator.ts | 9 +- .../models/src/Domain/Syncable/Tag/Tag.ts | 4 +- .../src/Domain/Utilities/Item/FindItem.ts | 5 +- .../Domain/Utilities/Payload/FindPayload.ts | 5 +- ...sByUpdatingReferencingPayloadReferences.ts | 3 +- packages/responses/package.json | 2 +- .../responses/src/Domain/Http/ResponseMeta.ts | 3 +- .../src/Domain/Item/IntegrityPayload.ts | 4 +- .../src/Domain/Item/ServerItemResponse.ts | 4 +- packages/services/package.json | 4 +- .../src/Domain/Api/ApiServiceInterface.ts | 4 +- .../src/Domain/Backups/BackupService.ts | 4 +- .../Component/ComponentManagerInterface.ts | 3 +- .../src/Domain/Device/DatabaseLoadSorter.ts | 4 +- .../Domain/Feature/FeaturesClientInterface.ts | 3 +- .../src/Domain/Item/ItemsClientInterface.ts | 8 +- .../src/Domain/Item/ItemsServerInterface.ts | 3 +- .../SubscriptionClientInterface.ts | 5 +- .../Subscription/SubscriptionManager.ts | 3 +- .../Workspace/WorkspaceClientInterface.ts | 14 +-- .../src/Domain/Workspace/WorkspaceManager.ts | 4 +- packages/snjs/lib/Services/Api/ApiService.ts | 4 +- packages/snjs/lib/Services/Api/Paths.ts | 15 ++- .../Services/Features/FeaturesService.spec.ts | 95 +++++++++--------- .../lib/Services/Features/FeaturesService.ts | 27 ++--- .../snjs/lib/Services/Items/ItemManager.ts | 4 +- .../KeyRecovery/KeyRecoveryService.ts | 4 +- .../Services/Listed/ListedClientInterface.ts | 3 +- .../lib/Services/Payloads/PayloadManager.ts | 8 +- .../lib/Services/Session/Sessions/Types.ts | 4 +- .../Services/Storage/DiskStorageService.ts | 4 +- packages/snjs/lib/index.ts | 1 + packages/snjs/package.json | 4 +- packages/ui-services/package.json | 2 +- .../Route/Params/SubscriptionInviteParams.ts | 4 +- packages/ui-services/src/Route/RouteParser.ts | 4 +- .../ui-services/src/Theme/ThemeManager.ts | 4 +- packages/utils/package.json | 2 +- packages/utils/src/Domain/Uuid/UuidMap.ts | 25 +++-- .../SubscriptionSharing/InvitationsList.tsx | 4 +- .../RemoteHistoryList.tsx | 4 +- .../NoteHistory/NoteHistoryController.ts | 3 +- .../Subscription/SubscriptionController.ts | 3 +- yarn.lock | 48 +++++---- 108 files changed, 319 insertions(+), 374 deletions(-) create mode 100644 .yarn/cache/@standardnotes-common-npm-1.46.3-a99a2b97e2-0fa509e304.zip rename .yarn/cache/{@standardnotes-domain-core-npm-1.11.0-f473ba8bc0-cf4c9b7534.zip => @standardnotes-domain-core-npm-1.11.1-c16df67772-98af016a83.zip} (82%) diff --git a/.yarn/cache/@standardnotes-common-npm-1.46.3-a99a2b97e2-0fa509e304.zip b/.yarn/cache/@standardnotes-common-npm-1.46.3-a99a2b97e2-0fa509e304.zip new file mode 100644 index 0000000000000000000000000000000000000000..9bf1e154e37273d8a995f5ba687747e20313aa52 GIT binary patch literal 39911 zcmdSB1&}1oktN*B%rHI8%*@Qp%*@Qp%#72_%*@QpJk8A04F5FjjU-tDK=Z?FF8qI5EOtvz4)q^A^v>vmlN#ocN<$HV_j=oBWEjPM_Rdm`qgiL z|5ZLmCw&_ueFq~OTc`i@PQw4oorbp7*0wf(X&MLs;y+k&o2E+80su&d0{~F`zX3>z z3ku693J-Z}I&O$1TzP&#f#^~R&z`wFNzF{VQz%xYLaVbWqdF(RGwLp%GPwgJAXY0bOgD(8OL z1UDm(<}Q0X+a%J%IsU_O;i=;am-oH)Y8hSn?RlVvB$Ic|WoNeBIQ7!1gZgb7O?}6R zQiEsWoPct?+IHe_b|WfVdp?am`dnp5Rn?oh$c$-)v<`2| zFGH0_wQieNs+#hnH8k|2MfaDUjpd^aW8>S!fnlh1E9;HUahp)$%M|U?m`0oIs?$xy zkktNYsSJZf41 z9}r8Er#SI|lOPsppJ4QP9x_Ap-`8Q*C~Dk^-(f50njhYAaPrL4kh-m`esCibxUhVI z+4%v&&!G7Bzi4zcTSKptOp;HR>uFwNqL3h~@0ZHN_hXF!<}wIv^(N7+cVl*2>xmapbd_+rzF?d`v| zJ4r+6CGZj%o&?vJ@R@1ph*d!2q-d}WRtpRG5cNL zC}Sk(P-Ci1IF3FlPJ^E0{kXvXGfOCF79Av!p~syn=i8R@V|);>U9OdbuuU1gf0&Wj=iu$J@Jca&ou>v>%L8XQ+~F%Tk|ZjCkbc> zM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C)E?<@GM6O zNm$CGz%^3?k&%rp8Pe8Ei*ns9@#&JvaAuc}Xu@L|LF#H|g6XO){FCIQqT$t|4bN<#}mnfL6o@qx`;Moea|Yu>uJqhdDmAh zWYlHQ+569XiXXpNs7*NQXbESUtabnVI3czC_pWw+Lu>Lt?h$*o%T9+s)$UbfIg~B+ zf0mxLxTh(^Tj6BSFJ1ypQVYju;J;4xt+D2F0kOKz1%eQ}-{LNA(f2xUF6bC*NzJLojZ8zsdZWyab8dkK$2dx3OWIyEUv59* zW}EKz#ou$Xp^WByvDEDjL)kH_o&0#&<8!OBEnELW^EOe!A)K^mTabo~oU;EUWhowq z88^(H{UaJ&d%A_1)!E5vMFAzCn*JcwbX?}?tit1SHAS5%#>_QQ zJ&p3cdCkd7Hg+o8|t!XsLBZx zuDigkG!if`Qt$`B|6&CC<^q#3OjvQr5MK$bOVKEC2Nu{4%d_do))ia84EU}~0kWy6 z@Nbj@;!YJ%yG%nlZVMUnAtk6tQ-$&z3JTsOuFS8TghGzO-E+&~!DV?QbO(h5TTsne z4ig@dve=JKyj_cz^}tTJil6Jo6$<*z1H0M=SX>z(=F-tYFEPFr%0nuKTHazjd{vTn zRTs7FULX_1-GfOBP*0MB<_r=@7q#g1yq8OJkr9q?MEIN83d%q z)4-ZgVsy_kSFKvU?8(2v(Skw(@Sd#)vDX2e2yg1)=-UwuPRmwp2asLV_L2wxbmc$eP zHFg?D+!McYYqaV=m;>CgnrV0q$S*hNB#Lo<@Ew(UNH=K#HRN4!uDBR29PWG4e6#-tcn?1S diff --git a/packages/api/package.json b/packages/api/package.json index b02a9abdf62..51aabd49230 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -36,8 +36,8 @@ "typescript": "*" }, "dependencies": { - "@standardnotes/common": "^1.45.0", - "@standardnotes/domain-core": "^1.11.0", + "@standardnotes/common": "^1.46.3", + "@standardnotes/domain-core": "^1.11.1", "@standardnotes/encryption": "workspace:*", "@standardnotes/models": "workspace:*", "@standardnotes/responses": "workspace:*", diff --git a/packages/api/src/Domain/Client/Subscription/SubscriptionApiService.ts b/packages/api/src/Domain/Client/Subscription/SubscriptionApiService.ts index 2ab8d6edba9..81e7546433a 100644 --- a/packages/api/src/Domain/Client/Subscription/SubscriptionApiService.ts +++ b/packages/api/src/Domain/Client/Subscription/SubscriptionApiService.ts @@ -10,7 +10,6 @@ import { SubscriptionInviteAcceptResponse } from '../../Response/Subscription/Su import { SubscriptionApiServiceInterface } from './SubscriptionApiServiceInterface' import { SubscriptionApiOperations } from './SubscriptionApiOperations' -import { Uuid } from '@standardnotes/common' import { AppleIAPConfirmResponse } from './../../Response/Subscription/AppleIAPConfirmResponse' import { AppleIAPConfirmRequestParams } from '../../Request' @@ -83,7 +82,7 @@ export class SubscriptionApiService implements SubscriptionApiServiceInterface { } } - async acceptInvite(inviteUuid: Uuid): Promise { + async acceptInvite(inviteUuid: string): Promise { if (this.operationsInProgress.get(SubscriptionApiOperations.AcceptingInvite)) { throw new ApiCallError(ErrorMessage.GenericInProgress) } diff --git a/packages/api/src/Domain/Client/Subscription/SubscriptionApiServiceInterface.ts b/packages/api/src/Domain/Client/Subscription/SubscriptionApiServiceInterface.ts index bfb76bea1a9..1f5df672de5 100644 --- a/packages/api/src/Domain/Client/Subscription/SubscriptionApiServiceInterface.ts +++ b/packages/api/src/Domain/Client/Subscription/SubscriptionApiServiceInterface.ts @@ -1,5 +1,3 @@ -import { Uuid } from '@standardnotes/common' - import { AppleIAPConfirmResponse } from './../../Response/Subscription/AppleIAPConfirmResponse' import { AppleIAPConfirmRequestParams } from '../../Request' import { SubscriptionInviteAcceptResponse } from '../../Response/Subscription/SubscriptionInviteAcceptResponse' @@ -10,7 +8,7 @@ import { SubscriptionInviteResponse } from '../../Response/Subscription/Subscrip export interface SubscriptionApiServiceInterface { invite(inviteeEmail: string): Promise listInvites(): Promise - cancelInvite(inviteUuid: Uuid): Promise - acceptInvite(inviteUuid: Uuid): Promise + cancelInvite(inviteUuid: string): Promise + acceptInvite(inviteUuid: string): Promise confirmAppleIAP(params: AppleIAPConfirmRequestParams): Promise } diff --git a/packages/api/src/Domain/Client/User/UserApiServiceInterface.ts b/packages/api/src/Domain/Client/User/UserApiServiceInterface.ts index 81d4d2d1978..fc8c17d4600 100644 --- a/packages/api/src/Domain/Client/User/UserApiServiceInterface.ts +++ b/packages/api/src/Domain/Client/User/UserApiServiceInterface.ts @@ -1,4 +1,4 @@ -import { UserRequestType, Uuid } from '@standardnotes/common' +import { UserRequestType } from '@standardnotes/common' import { type RootKeyParamsInterface } from '@standardnotes/models' import { UserDeletionResponse } from '../../Response/User/UserDeletionResponse' @@ -12,6 +12,6 @@ export interface UserApiServiceInterface { keyParams: RootKeyParamsInterface ephemeral: boolean }): Promise - submitUserRequest(dto: { userUuid: Uuid; requestType: UserRequestType }): Promise + submitUserRequest(dto: { userUuid: string; requestType: UserRequestType }): Promise deleteAccount(userUuid: string): Promise } diff --git a/packages/api/src/Domain/Client/Workspace/WorkspaceApiService.ts b/packages/api/src/Domain/Client/Workspace/WorkspaceApiService.ts index 92f9f02cd90..af43c91e2a0 100644 --- a/packages/api/src/Domain/Client/Workspace/WorkspaceApiService.ts +++ b/packages/api/src/Domain/Client/Workspace/WorkspaceApiService.ts @@ -1,4 +1,4 @@ -import { Uuid, WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common' +import { WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common' import { ErrorMessage } from '../../Error/ErrorMessage' import { ApiCallError } from '../../Error/ApiCallError' @@ -96,7 +96,7 @@ export class WorkspaceApiService implements WorkspaceApiServiceInterface { async inviteToWorkspace(dto: { inviteeEmail: string - workspaceUuid: Uuid + workspaceUuid: string accessLevel: WorkspaceAccessLevel }): Promise { this.lockOperation(WorkspaceApiOperations.Inviting) diff --git a/packages/api/src/Domain/Client/Workspace/WorkspaceApiServiceInterface.ts b/packages/api/src/Domain/Client/Workspace/WorkspaceApiServiceInterface.ts index fed57f388bc..95be52d4295 100644 --- a/packages/api/src/Domain/Client/Workspace/WorkspaceApiServiceInterface.ts +++ b/packages/api/src/Domain/Client/Workspace/WorkspaceApiServiceInterface.ts @@ -1,4 +1,4 @@ -import { Uuid, WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common' +import { WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common' import { WorkspaceKeyshareInitiatingResponse } from '../../Response/Workspace/WorkspaceKeyshareInitiatingResponse' import { WorkspaceCreationResponse } from '../../Response/Workspace/WorkspaceCreationResponse' @@ -17,20 +17,20 @@ export interface WorkspaceApiServiceInterface { }): Promise inviteToWorkspace(dto: { inviteeEmail: string - workspaceUuid: Uuid + workspaceUuid: string accessLevel: WorkspaceAccessLevel }): Promise acceptInvite(dto: { - inviteUuid: Uuid - userUuid: Uuid + inviteUuid: string + userUuid: string publicKey: string encryptedPrivateKey: string }): Promise listWorkspaces(): Promise - listWorkspaceUsers(dto: { workspaceUuid: Uuid }): Promise + listWorkspaceUsers(dto: { workspaceUuid: string }): Promise initiateKeyshare(dto: { - workspaceUuid: Uuid - userUuid: Uuid + workspaceUuid: string + userUuid: string encryptedWorkspaceKey: string }): Promise } diff --git a/packages/api/src/Domain/Client/Workspace/WorkspaceUser.ts b/packages/api/src/Domain/Client/Workspace/WorkspaceUser.ts index 16fcb8e5de9..bcad3c4e266 100644 --- a/packages/api/src/Domain/Client/Workspace/WorkspaceUser.ts +++ b/packages/api/src/Domain/Client/Workspace/WorkspaceUser.ts @@ -1,11 +1,11 @@ -import { Uuid, WorkspaceAccessLevel, WorkspaceUserStatus } from '@standardnotes/common' +import { WorkspaceAccessLevel, WorkspaceUserStatus } from '@standardnotes/common' export type WorkspaceUser = { - uuid: Uuid + uuid: string accessLevel: WorkspaceAccessLevel - userUuid: Uuid + userUuid: string userDisplayName: string | null - workspaceUuid: Uuid + workspaceUuid: string encryptedWorkspaceKey: string | null publicKey: string | null encryptedPrivateKey: string | null diff --git a/packages/api/src/Domain/Http/HttpResponseMeta.ts b/packages/api/src/Domain/Http/HttpResponseMeta.ts index baebf9db6fc..4850c108ecd 100644 --- a/packages/api/src/Domain/Http/HttpResponseMeta.ts +++ b/packages/api/src/Domain/Http/HttpResponseMeta.ts @@ -1,9 +1,8 @@ import { Role } from '@standardnotes/security' -import { Uuid } from '@standardnotes/common' export type HttpResponseMeta = { auth: { - userUuid?: Uuid + userUuid?: string roles?: Role[] } server: { diff --git a/packages/api/src/Domain/Request/Subscription/SubscriptionInviteAcceptRequestParams.ts b/packages/api/src/Domain/Request/Subscription/SubscriptionInviteAcceptRequestParams.ts index c72da5b6b95..2b4707b905e 100644 --- a/packages/api/src/Domain/Request/Subscription/SubscriptionInviteAcceptRequestParams.ts +++ b/packages/api/src/Domain/Request/Subscription/SubscriptionInviteAcceptRequestParams.ts @@ -1,6 +1,4 @@ -import { Uuid } from '@standardnotes/common' - export type SubscriptionInviteAcceptRequestParams = { - inviteUuid: Uuid + inviteUuid: string [additionalParam: string]: unknown } diff --git a/packages/api/src/Domain/Request/Subscription/SubscriptionInviteCancelRequestParams.ts b/packages/api/src/Domain/Request/Subscription/SubscriptionInviteCancelRequestParams.ts index f00b6912cf3..b68f1b4209f 100644 --- a/packages/api/src/Domain/Request/Subscription/SubscriptionInviteCancelRequestParams.ts +++ b/packages/api/src/Domain/Request/Subscription/SubscriptionInviteCancelRequestParams.ts @@ -1,10 +1,8 @@ -import { Uuid } from '@standardnotes/common' - import { ApiEndpointParam } from '../ApiEndpointParam' import { ApiVersion } from '../../Api/ApiVersion' export type SubscriptionInviteCancelRequestParams = { [ApiEndpointParam.ApiVersion]: ApiVersion.v0 - inviteUuid: Uuid + inviteUuid: string [additionalParam: string]: unknown } diff --git a/packages/api/src/Domain/Request/Subscription/SubscriptionInviteDeclineRequestParams.ts b/packages/api/src/Domain/Request/Subscription/SubscriptionInviteDeclineRequestParams.ts index bd771f304de..67968c4042a 100644 --- a/packages/api/src/Domain/Request/Subscription/SubscriptionInviteDeclineRequestParams.ts +++ b/packages/api/src/Domain/Request/Subscription/SubscriptionInviteDeclineRequestParams.ts @@ -1,10 +1,8 @@ -import { Uuid } from '@standardnotes/common' - import { ApiEndpointParam } from '../ApiEndpointParam' import { ApiVersion } from '../../Api/ApiVersion' export type SubscriptionInviteDeclineRequestParams = { [ApiEndpointParam.ApiVersion]: ApiVersion.v0 - inviteUuid: Uuid + inviteUuid: string [additionalParam: string]: unknown } diff --git a/packages/api/src/Domain/Request/User/UserDeletionRequestParams.ts b/packages/api/src/Domain/Request/User/UserDeletionRequestParams.ts index 4b82aeb68f3..21b77caca56 100644 --- a/packages/api/src/Domain/Request/User/UserDeletionRequestParams.ts +++ b/packages/api/src/Domain/Request/User/UserDeletionRequestParams.ts @@ -1,6 +1,4 @@ -import { Uuid } from '@standardnotes/common' - export type UserDeletionRequestParams = { - userUuid: Uuid + userUuid: string [additionalParam: string]: unknown } diff --git a/packages/api/src/Domain/Request/UserRequest/UserRequestRequestParams.ts b/packages/api/src/Domain/Request/UserRequest/UserRequestRequestParams.ts index 9a7cda71979..02214ba7b97 100644 --- a/packages/api/src/Domain/Request/UserRequest/UserRequestRequestParams.ts +++ b/packages/api/src/Domain/Request/UserRequest/UserRequestRequestParams.ts @@ -1,7 +1,7 @@ -import { UserRequestType, Uuid } from '@standardnotes/common' +import { UserRequestType } from '@standardnotes/common' export type UserRequestRequestParams = { - userUuid: Uuid + userUuid: string requestType: UserRequestType [additionalParam: string]: unknown } diff --git a/packages/api/src/Domain/Request/Workspace/WorkspaceInvitationAcceptingRequestParams.ts b/packages/api/src/Domain/Request/Workspace/WorkspaceInvitationAcceptingRequestParams.ts index 4349e670885..8a7e89a8cc3 100644 --- a/packages/api/src/Domain/Request/Workspace/WorkspaceInvitationAcceptingRequestParams.ts +++ b/packages/api/src/Domain/Request/Workspace/WorkspaceInvitationAcceptingRequestParams.ts @@ -1,8 +1,6 @@ -import { Uuid } from '@standardnotes/common' - export type WorkspaceInvitationAcceptingRequestParams = { - inviteUuid: Uuid - userUuid: Uuid + inviteUuid: string + userUuid: string publicKey: string encryptedPrivateKey: string [additionalParam: string]: unknown diff --git a/packages/api/src/Domain/Request/Workspace/WorkspaceInvitationRequestParams.ts b/packages/api/src/Domain/Request/Workspace/WorkspaceInvitationRequestParams.ts index 3f9cdced3f3..327a8d82004 100644 --- a/packages/api/src/Domain/Request/Workspace/WorkspaceInvitationRequestParams.ts +++ b/packages/api/src/Domain/Request/Workspace/WorkspaceInvitationRequestParams.ts @@ -1,7 +1,7 @@ -import { Uuid, WorkspaceAccessLevel } from '@standardnotes/common' +import { WorkspaceAccessLevel } from '@standardnotes/common' export type WorkspaceInvitationRequestParams = { - workspaceUuid: Uuid + workspaceUuid: string inviteeEmail: string accessLevel: WorkspaceAccessLevel [additionalParam: string]: unknown diff --git a/packages/api/src/Domain/Request/Workspace/WorkspaceKeyshareInitiatingRequestParams.ts b/packages/api/src/Domain/Request/Workspace/WorkspaceKeyshareInitiatingRequestParams.ts index 786c432039a..ae3a6416091 100644 --- a/packages/api/src/Domain/Request/Workspace/WorkspaceKeyshareInitiatingRequestParams.ts +++ b/packages/api/src/Domain/Request/Workspace/WorkspaceKeyshareInitiatingRequestParams.ts @@ -1,8 +1,6 @@ -import { Uuid } from '@standardnotes/common' - export type WorkspaceKeyshareInitiatingRequestParams = { - userUuid: Uuid - workspaceUuid: Uuid + userUuid: string + workspaceUuid: string encryptedWorkspaceKey: string [additionalParam: string]: unknown } diff --git a/packages/api/src/Domain/Request/Workspace/WorkspaceUserListRequestParams.ts b/packages/api/src/Domain/Request/Workspace/WorkspaceUserListRequestParams.ts index cef93740dc3..2381ca40799 100644 --- a/packages/api/src/Domain/Request/Workspace/WorkspaceUserListRequestParams.ts +++ b/packages/api/src/Domain/Request/Workspace/WorkspaceUserListRequestParams.ts @@ -1,6 +1,4 @@ -import { Uuid } from '@standardnotes/common' - export type WorkspaceUserListRequestParams = { - workspaceUuid: Uuid + workspaceUuid: string [additionalParam: string]: unknown } diff --git a/packages/api/src/Domain/Response/Subscription/SubscriptionInviteResponseBody.ts b/packages/api/src/Domain/Response/Subscription/SubscriptionInviteResponseBody.ts index 7c78bf3fb86..3035233d0fe 100644 --- a/packages/api/src/Domain/Response/Subscription/SubscriptionInviteResponseBody.ts +++ b/packages/api/src/Domain/Response/Subscription/SubscriptionInviteResponseBody.ts @@ -1,9 +1,7 @@ -import { Uuid } from '@standardnotes/common' - export type SubscriptionInviteResponseBody = | { success: true - sharedSubscriptionInvitationUuid: Uuid + sharedSubscriptionInvitationUuid: string } | { success: false diff --git a/packages/api/src/Domain/Response/User/UserRegistrationResponseBody.ts b/packages/api/src/Domain/Response/User/UserRegistrationResponseBody.ts index 57cbd340f58..0e99172be5e 100644 --- a/packages/api/src/Domain/Response/User/UserRegistrationResponseBody.ts +++ b/packages/api/src/Domain/Response/User/UserRegistrationResponseBody.ts @@ -1,11 +1,10 @@ -import { Uuid } from '@standardnotes/common' import { KeyParamsData, SessionBody } from '@standardnotes/responses' export type UserRegistrationResponseBody = { session: SessionBody key_params: KeyParamsData user: { - uuid: Uuid + uuid: string email: string } } diff --git a/packages/api/src/Domain/Server/Subscription/Paths.ts b/packages/api/src/Domain/Server/Subscription/Paths.ts index 73cbca6cf7a..60783541e28 100644 --- a/packages/api/src/Domain/Server/Subscription/Paths.ts +++ b/packages/api/src/Domain/Server/Subscription/Paths.ts @@ -1,10 +1,8 @@ -import { Uuid } from '@standardnotes/common' - const SharingPaths = { invite: '/v1/subscription-invites', - acceptInvite: (inviteUuid: Uuid) => `/v1/subscription-invites/${inviteUuid}/accept`, - declineInvite: (inviteUuid: Uuid) => `/v1/subscription-invites/${inviteUuid}/decline`, - cancelInvite: (inviteUuid: Uuid) => `/v1/subscription-invites/${inviteUuid}`, + acceptInvite: (inviteUuid: string) => `/v1/subscription-invites/${inviteUuid}/accept`, + declineInvite: (inviteUuid: string) => `/v1/subscription-invites/${inviteUuid}/decline`, + cancelInvite: (inviteUuid: string) => `/v1/subscription-invites/${inviteUuid}`, listInvites: '/v1/subscription-invites', } diff --git a/packages/api/src/Domain/Server/User/Paths.ts b/packages/api/src/Domain/Server/User/Paths.ts index 00e735241c8..9c92527753a 100644 --- a/packages/api/src/Domain/Server/User/Paths.ts +++ b/packages/api/src/Domain/Server/User/Paths.ts @@ -1,8 +1,6 @@ -import { Uuid } from '@standardnotes/common' - const UserPaths = { register: '/v1/users', - deleteAccount: (userUuid: Uuid) => `/v1/users/${userUuid}`, + deleteAccount: (userUuid: string) => `/v1/users/${userUuid}`, } export const Paths = { diff --git a/packages/api/src/Domain/Server/UserRequest/Paths.ts b/packages/api/src/Domain/Server/UserRequest/Paths.ts index dde53858049..c807713cd49 100644 --- a/packages/api/src/Domain/Server/UserRequest/Paths.ts +++ b/packages/api/src/Domain/Server/UserRequest/Paths.ts @@ -1,7 +1,5 @@ -import { Uuid } from '@standardnotes/common' - const UserRequestPaths = { - submitUserRequest: (userUuid: Uuid) => `/v1/users/${userUuid}/requests`, + submitUserRequest: (userUuid: string) => `/v1/users/${userUuid}/requests`, } export const Paths = { diff --git a/packages/api/src/Domain/Server/Workspace/Paths.ts b/packages/api/src/Domain/Server/Workspace/Paths.ts index d9495e22f0d..7f766f94122 100644 --- a/packages/api/src/Domain/Server/Workspace/Paths.ts +++ b/packages/api/src/Domain/Server/Workspace/Paths.ts @@ -1,13 +1,11 @@ -import { Uuid } from '@standardnotes/common' - const WorkspacePaths = { createWorkspace: '/v1/workspaces', listWorkspaces: '/v1/workspaces', - listWorkspaceUsers: (uuid: Uuid) => `/v1/workspaces/${uuid}/users`, - initiateKeyshare: (worksapceUuid: Uuid, userUuid: Uuid) => + listWorkspaceUsers: (uuid: string) => `/v1/workspaces/${uuid}/users`, + initiateKeyshare: (worksapceUuid: string, userUuid: string) => `/v1/workspaces/${worksapceUuid}/users/${userUuid}/keyshare`, - inviteToWorkspace: (uuid: Uuid) => `/v1/workspaces/${uuid}/invites`, - acceptInvite: (uuid: Uuid) => `/v1/invites/${uuid}/accept`, + inviteToWorkspace: (uuid: string) => `/v1/workspaces/${uuid}/invites`, + acceptInvite: (uuid: string) => `/v1/invites/${uuid}/accept`, } export const Paths = { diff --git a/packages/encryption/package.json b/packages/encryption/package.json index fb15cbc9d57..242a0cb0ff7 100644 --- a/packages/encryption/package.json +++ b/packages/encryption/package.json @@ -35,7 +35,7 @@ "typescript": "*" }, "dependencies": { - "@standardnotes/common": "^1.45.0", + "@standardnotes/common": "^1.46.3", "@standardnotes/models": "workspace:*", "@standardnotes/responses": "workspace:*", "@standardnotes/sncrypto-common": "workspace:*", diff --git a/packages/encryption/src/Domain/Split/EncryptionSplit.ts b/packages/encryption/src/Domain/Split/EncryptionSplit.ts index c3094844ae9..3736a15c060 100644 --- a/packages/encryption/src/Domain/Split/EncryptionSplit.ts +++ b/packages/encryption/src/Domain/Split/EncryptionSplit.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { DecryptedPayloadInterface, EncryptedPayloadInterface, PayloadInterface } from '@standardnotes/models' import { EncryptionTypeSplit } from './EncryptionTypeSplit' import { KeyedDecryptionSplit } from './KeyedDecryptionSplit' @@ -36,7 +35,7 @@ export function CreateDecryptionSplitWithKeyLookup( return result } -export function FindPayloadInEncryptionSplit(uuid: Uuid, split: KeyedEncryptionSplit): DecryptedPayloadInterface { +export function FindPayloadInEncryptionSplit(uuid: string, split: KeyedEncryptionSplit): DecryptedPayloadInterface { const inUsesItemsKey = split.usesItemsKey?.items.find((item: PayloadInterface) => item.uuid === uuid) if (inUsesItemsKey) { return inUsesItemsKey @@ -60,7 +59,7 @@ export function FindPayloadInEncryptionSplit(uuid: Uuid, split: KeyedEncryptionS throw Error('Cannot find payload in encryption split') } -export function FindPayloadInDecryptionSplit(uuid: Uuid, split: KeyedDecryptionSplit): EncryptedPayloadInterface { +export function FindPayloadInDecryptionSplit(uuid: string, split: KeyedDecryptionSplit): EncryptedPayloadInterface { const inUsesItemsKey = split.usesItemsKey?.items.find((item: PayloadInterface) => item.uuid === uuid) if (inUsesItemsKey) { return inUsesItemsKey diff --git a/packages/encryption/src/Domain/Types/ItemAuthenticatedData.ts b/packages/encryption/src/Domain/Types/ItemAuthenticatedData.ts index 2b75da6080a..92fc430790a 100644 --- a/packages/encryption/src/Domain/Types/ItemAuthenticatedData.ts +++ b/packages/encryption/src/Domain/Types/ItemAuthenticatedData.ts @@ -1,6 +1,6 @@ -import { ProtocolVersion, Uuid } from '@standardnotes/common' +import { ProtocolVersion } from '@standardnotes/common' export type ItemAuthenticatedData = { - u: Uuid + u: string v: ProtocolVersion } diff --git a/packages/features/package.json b/packages/features/package.json index c05f303db22..fb533e2f0dc 100644 --- a/packages/features/package.json +++ b/packages/features/package.json @@ -26,7 +26,8 @@ }, "dependencies": { "@standardnotes/auth": "^3.19.4", - "@standardnotes/common": "^1.45.0", + "@standardnotes/common": "^1.46.3", + "@standardnotes/domain-core": "^1.11.1", "@standardnotes/security": "^1.7.0", "reflect-metadata": "^0.1.13" }, diff --git a/packages/features/src/Domain/Feature/FeatureDescription.ts b/packages/features/src/Domain/Feature/FeatureDescription.ts index 5d30abdd8aa..adafc6b05f6 100644 --- a/packages/features/src/Domain/Feature/FeatureDescription.ts +++ b/packages/features/src/Domain/Feature/FeatureDescription.ts @@ -1,5 +1,5 @@ import { ComponentPermission } from '../Component/ComponentPermission' -import { ContentType, RoleName, SubscriptionName } from '@standardnotes/common' +import { ContentType, SubscriptionName } from '@standardnotes/common' import { ComponentArea } from '../Component/ComponentArea' import { PermissionName } from '../Permission/PermissionName' import { FeatureIdentifier } from './FeatureIdentifier' @@ -9,11 +9,11 @@ import { ThemeDockIcon } from '../Component/ThemeDockIcon' type RoleFields = { /** Server populated */ - role_name?: RoleName + role_name?: string /** Statically populated. Non-influencing; used as a reference by other static consumers (such as email service) */ availableInSubscriptions: SubscriptionName[] - availableInRoles?: RoleName[] + availableInRoles?: string[] } export type BaseFeatureDescription = RoleFields & { diff --git a/packages/features/src/Domain/Lists/ClientFeatures.ts b/packages/features/src/Domain/Lists/ClientFeatures.ts index ff404c96bc8..2a67eabd0b3 100644 --- a/packages/features/src/Domain/Lists/ClientFeatures.ts +++ b/packages/features/src/Domain/Lists/ClientFeatures.ts @@ -1,7 +1,8 @@ import { ClientFeatureDescription } from '../Feature/FeatureDescription' import { PermissionName } from '../Permission/PermissionName' import { FeatureIdentifier } from '../Feature/FeatureIdentifier' -import { RoleName, SubscriptionName } from '@standardnotes/common' +import { SubscriptionName } from '@standardnotes/common' +import { RoleName } from '@standardnotes/domain-core' export function clientFeatures(): ClientFeatureDescription[] { return [ @@ -19,7 +20,7 @@ export function clientFeatures(): ClientFeatureDescription[] { permission_name: PermissionName.SuperEditor, description: 'Type / to bring up the block selection menu, or @ to embed images or link other tags and notes. Type - then space to start a list, or [] then space to start a checklist. Drag and drop an image or file to embed it in your note.', - availableInRoles: [RoleName.PlusUser, RoleName.ProUser], + availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser], }, { availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan], diff --git a/packages/features/src/Domain/Permission/Permission.ts b/packages/features/src/Domain/Permission/Permission.ts index 47b43d7ad44..e7549c20007 100644 --- a/packages/features/src/Domain/Permission/Permission.ts +++ b/packages/features/src/Domain/Permission/Permission.ts @@ -1,8 +1,6 @@ -import { Uuid } from '@standardnotes/common' - import { PermissionName } from './PermissionName' export type Permission = { - uuid: Uuid + uuid: string name: PermissionName } diff --git a/packages/filepicker/package.json b/packages/filepicker/package.json index 1b379c20a41..5d65e64f553 100644 --- a/packages/filepicker/package.json +++ b/packages/filepicker/package.json @@ -26,7 +26,7 @@ "typescript": "*" }, "dependencies": { - "@standardnotes/common": "^1.45.0", + "@standardnotes/common": "^1.46.3", "@standardnotes/files": "workspace:*", "@standardnotes/utils": "workspace:*", "@types/wicg-file-system-access": "^2020.9.5", diff --git a/packages/files/package.json b/packages/files/package.json index cff26b6235e..4aa4ab17f34 100644 --- a/packages/files/package.json +++ b/packages/files/package.json @@ -28,7 +28,7 @@ "typescript": "*" }, "dependencies": { - "@standardnotes/common": "^1.45.0", + "@standardnotes/common": "^1.46.3", "@standardnotes/encryption": "workspace:*", "@standardnotes/models": "workspace:*", "@standardnotes/responses": "workspace:*", diff --git a/packages/files/src/Domain/Cache/FileMemoryCache.ts b/packages/files/src/Domain/Cache/FileMemoryCache.ts index c809992e2e8..153f689b7dc 100644 --- a/packages/files/src/Domain/Cache/FileMemoryCache.ts +++ b/packages/files/src/Domain/Cache/FileMemoryCache.ts @@ -1,15 +1,14 @@ import { removeFromArray } from '@standardnotes/utils' -import { Uuid } from '@standardnotes/common' import { EncryptedBytes } from '../Types/EncryptedBytes' export class FileMemoryCache { - private cache: Record = {} - private orderedQueue: Uuid[] = [] + private cache: Record = {} + private orderedQueue: string[] = [] constructor(public readonly maxSize: number) {} - add(uuid: Uuid, data: EncryptedBytes): boolean { + add(uuid: string, data: EncryptedBytes): boolean { if (data.encryptedBytes.length > this.maxSize) { return false } @@ -31,11 +30,11 @@ export class FileMemoryCache { .reduce((total, fileLength) => total + fileLength, 0) } - get(uuid: Uuid): EncryptedBytes | undefined { + get(uuid: string): EncryptedBytes | undefined { return this.cache[uuid] } - remove(uuid: Uuid): void { + remove(uuid: string): void { delete this.cache[uuid] removeFromArray(this.orderedQueue, uuid) diff --git a/packages/files/src/Domain/Device/FileBackupsDevice.ts b/packages/files/src/Domain/Device/FileBackupsDevice.ts index b192d60cc56..d0a9bb208ed 100644 --- a/packages/files/src/Domain/Device/FileBackupsDevice.ts +++ b/packages/files/src/Domain/Device/FileBackupsDevice.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { FileDownloadProgress } from '../Types/FileDownloadProgress' import { FileBackupRecord, FileBackupsMapping } from './FileBackupsMapping' @@ -8,7 +7,7 @@ export type FileBackupReadChunkResponse = { chunk: Uint8Array; isLast: boolean; export interface FileBackupsDevice { getFilesBackupsMappingFile(): Promise saveFilesBackupsFile( - uuid: Uuid, + uuid: string, metaFile: string, downloadRequest: { chunkSizes: number[] diff --git a/packages/files/src/Domain/Device/FileBackupsMapping.ts b/packages/files/src/Domain/Device/FileBackupsMapping.ts index 4af25e32303..a2b7ff1ec2b 100644 --- a/packages/files/src/Domain/Device/FileBackupsMapping.ts +++ b/packages/files/src/Domain/Device/FileBackupsMapping.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { FileBackupsConstantsV1 } from './FileBackupsConstantsV1' export type FileBackupRecord = { @@ -12,5 +11,5 @@ export type FileBackupRecord = { export interface FileBackupsMapping { version: typeof FileBackupsConstantsV1.Version - files: Record + files: Record } diff --git a/packages/models/package.json b/packages/models/package.json index 2049fef8664..42b11a0819c 100644 --- a/packages/models/package.json +++ b/packages/models/package.json @@ -22,7 +22,7 @@ "test": "jest" }, "devDependencies": { - "@standardnotes/common": "^1.45.0", + "@standardnotes/common": "^1.46.3", "@standardnotes/features": "workspace:*", "@standardnotes/responses": "workspace:*", "@standardnotes/utils": "workspace:*", diff --git a/packages/models/src/Domain/Abstract/Component/MessageData.ts b/packages/models/src/Domain/Abstract/Component/MessageData.ts index e18ef578281..02a970c51f7 100644 --- a/packages/models/src/Domain/Abstract/Component/MessageData.ts +++ b/packages/models/src/Domain/Abstract/Component/MessageData.ts @@ -1,4 +1,4 @@ -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { ComponentPermission } from '@standardnotes/features' import { IncomingComponentItemPayload } from './IncomingComponentItemPayload' @@ -14,7 +14,7 @@ export type MessageData = Partial<{ permissions?: ComponentPermission[] /** Related to the component-registered action */ componentData?: Record - uuid?: Uuid + uuid?: string environment?: string platform?: string activeThemeUrls?: string[] diff --git a/packages/models/src/Domain/Abstract/Content/ItemContent.ts b/packages/models/src/Domain/Abstract/Content/ItemContent.ts index 06a45bda7c9..ffb07bacb61 100644 --- a/packages/models/src/Domain/Abstract/Content/ItemContent.ts +++ b/packages/models/src/Domain/Abstract/Content/ItemContent.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { AppData, DefaultAppDomain } from '../Item/Types/DefaultAppDomain' import { ContentReference } from '../Reference/ContentReference' import { AppDataField } from '../Item/Types/AppDataField' @@ -8,7 +7,7 @@ export interface SpecializedContent {} export interface ItemContent { references: ContentReference[] - conflict_of?: Uuid + conflict_of?: string protected?: boolean trashed?: boolean pinned?: boolean diff --git a/packages/models/src/Domain/Abstract/Contextual/BackupFileDecryptedContextualPayload.ts b/packages/models/src/Domain/Abstract/Contextual/BackupFileDecryptedContextualPayload.ts index 9de4eadde61..b3dd4d58741 100644 --- a/packages/models/src/Domain/Abstract/Contextual/BackupFileDecryptedContextualPayload.ts +++ b/packages/models/src/Domain/Abstract/Contextual/BackupFileDecryptedContextualPayload.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { ItemContent } from '../Content/ItemContent' import { ContextPayload } from './ContextPayload' @@ -6,7 +5,7 @@ export interface BackupFileDecryptedContextualPayload extends GenericItem> implements DecryptedItemInterface { - public readonly conflictOf?: Uuid + public readonly conflictOf?: string public readonly protected: boolean = false public readonly trashed: boolean = false public readonly pinned: boolean = false diff --git a/packages/models/src/Domain/Abstract/Item/Implementations/GenericItem.ts b/packages/models/src/Domain/Abstract/Item/Implementations/GenericItem.ts index 42a1c7b7232..327478860fd 100644 --- a/packages/models/src/Domain/Abstract/Item/Implementations/GenericItem.ts +++ b/packages/models/src/Domain/Abstract/Item/Implementations/GenericItem.ts @@ -1,4 +1,4 @@ -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { dateToLocalizedString, deepFreeze } from '@standardnotes/utils' import { TransferPayload } from './../../TransferPayload/Interfaces/TransferPayload' import { ItemContentsDiffer } from '../../../Utilities/Item/ItemContentsDiffer' @@ -13,7 +13,7 @@ import { isDecryptedItem, isDeletedItem, isEncryptedErroredItem } from '../Inter export abstract class GenericItem

implements ItemInterface

{ payload: P - public readonly duplicateOf?: Uuid + public readonly duplicateOf?: string public readonly createdAtString?: string public updatedAtString?: string public userModifiedDate: Date diff --git a/packages/models/src/Domain/Abstract/Item/Interfaces/DecryptedItem.ts b/packages/models/src/Domain/Abstract/Item/Interfaces/DecryptedItem.ts index 79e13c13690..68ed08d10b1 100644 --- a/packages/models/src/Domain/Abstract/Item/Interfaces/DecryptedItem.ts +++ b/packages/models/src/Domain/Abstract/Item/Interfaces/DecryptedItem.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { AppDataField } from '../Types/AppDataField' import { ComponentDataDomain, DefaultAppDomain } from '../Types/DefaultAppDomain' import { ContentReference } from '../../Reference/ContentReference' @@ -15,8 +14,8 @@ export interface DecryptedItemInterface SortableItem, SearchableItem { readonly content: C - readonly conflictOf?: Uuid - readonly duplicateOf?: Uuid + readonly conflictOf?: string + readonly duplicateOf?: string readonly protected: boolean readonly trashed: boolean readonly pinned: boolean diff --git a/packages/models/src/Domain/Abstract/Item/Interfaces/ItemInterface.ts b/packages/models/src/Domain/Abstract/Item/Interfaces/ItemInterface.ts index d6087b83c8d..393cf7ac5be 100644 --- a/packages/models/src/Domain/Abstract/Item/Interfaces/ItemInterface.ts +++ b/packages/models/src/Domain/Abstract/Item/Interfaces/ItemInterface.ts @@ -1,4 +1,4 @@ -import { Uuid, ContentType } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { TransferPayload } from './../../TransferPayload/Interfaces/TransferPayload' import { PayloadInterface } from '../../Payload/Interfaces/PayloadInterface' import { PredicateInterface } from '../../../Runtime/Predicate/Interface' @@ -8,12 +8,12 @@ import { SingletonStrategy } from '../Types/SingletonStrategy' export interface ItemInterface

{ payload: P - readonly conflictOf?: Uuid - readonly duplicateOf?: Uuid + readonly conflictOf?: string + readonly duplicateOf?: string readonly createdAtString?: string readonly updatedAtString?: string - uuid: Uuid + uuid: string content_type: ContentType created_at: Date diff --git a/packages/models/src/Domain/Abstract/Item/Mutator/DecryptedItemMutator.ts b/packages/models/src/Domain/Abstract/Item/Mutator/DecryptedItemMutator.ts index ce136a68659..deb44e9699b 100644 --- a/packages/models/src/Domain/Abstract/Item/Mutator/DecryptedItemMutator.ts +++ b/packages/models/src/Domain/Abstract/Item/Mutator/DecryptedItemMutator.ts @@ -2,7 +2,6 @@ import { DecryptedItemInterface } from './../Interfaces/DecryptedItem' import { Copy } from '@standardnotes/utils' import { MutationType } from '../Types/MutationType' import { PrefKey } from '../../../Syncable/UserPrefs/PrefKey' -import { Uuid } from '@standardnotes/common' import { ItemContent } from '../../Content/ItemContent' import { AppDataField } from '../Types/AppDataField' import { DefaultAppDomain, DomainDataValueType, ItemDomainKey } from '../Types/DefaultAppDomain' @@ -66,7 +65,7 @@ export class DecryptedItemMutator extends I this.setAppDataItem(AppDataField.UserModifiedDate, date) } - public set conflictOf(conflictOf: Uuid | undefined) { + public set conflictOf(conflictOf: string | undefined) { this.mutableContent.conflict_of = conflictOf } diff --git a/packages/models/src/Domain/Abstract/Item/Mutator/TransactionalMutation.ts b/packages/models/src/Domain/Abstract/Item/Mutator/TransactionalMutation.ts index c484fb0bd3d..c6c649dc829 100644 --- a/packages/models/src/Domain/Abstract/Item/Mutator/TransactionalMutation.ts +++ b/packages/models/src/Domain/Abstract/Item/Mutator/TransactionalMutation.ts @@ -1,11 +1,9 @@ -import { Uuid } from '@standardnotes/common' - import { MutationType } from '../Types/MutationType' import { ItemMutator } from './ItemMutator' export type TransactionalMutation = { - itemUuid: Uuid + itemUuid: string mutate: (mutator: ItemMutator) => void mutationType?: MutationType } diff --git a/packages/models/src/Domain/Abstract/Payload/Implementations/DecryptedPayload.ts b/packages/models/src/Domain/Abstract/Payload/Implementations/DecryptedPayload.ts index da52b7e9671..b74acee89c2 100644 --- a/packages/models/src/Domain/Abstract/Payload/Implementations/DecryptedPayload.ts +++ b/packages/models/src/Domain/Abstract/Payload/Implementations/DecryptedPayload.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { Copy } from '@standardnotes/utils' import { SyncResolvedParams, SyncResolvedPayload } from '../../../Runtime/Deltas/Utilities/SyncResolvedPayload' import { FillItemContent, ItemContent } from '../../Content/ItemContent' @@ -29,7 +28,7 @@ export class DecryptedPayload< return this.content.references || [] } - public getReference(uuid: Uuid): ContentReference { + public getReference(uuid: string): ContentReference { const result = this.references.find((ref) => ref.uuid === uuid) if (!result) { diff --git a/packages/models/src/Domain/Abstract/Payload/Interfaces/DecryptedPayload.ts b/packages/models/src/Domain/Abstract/Payload/Interfaces/DecryptedPayload.ts index 28bde92c755..0ce47b371fb 100644 --- a/packages/models/src/Domain/Abstract/Payload/Interfaces/DecryptedPayload.ts +++ b/packages/models/src/Domain/Abstract/Payload/Interfaces/DecryptedPayload.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { DecryptedTransferPayload } from './../../TransferPayload/Interfaces/DecryptedTransferPayload' import { ItemContent } from '../../Content/ItemContent' import { ContentReference } from '../../Reference/ContentReference' @@ -11,5 +10,5 @@ export interface DecryptedPayloadInterface ejected(): DecryptedTransferPayload get references(): ContentReference[] - getReference(uuid: Uuid): ContentReference + getReference(uuid: string): ContentReference } diff --git a/packages/models/src/Domain/Abstract/Payload/Interfaces/PayloadInterface.ts b/packages/models/src/Domain/Abstract/Payload/Interfaces/PayloadInterface.ts index 73bf6a4d06f..42d65a0be51 100644 --- a/packages/models/src/Domain/Abstract/Payload/Interfaces/PayloadInterface.ts +++ b/packages/models/src/Domain/Abstract/Payload/Interfaces/PayloadInterface.ts @@ -1,12 +1,12 @@ import { SyncResolvedParams, SyncResolvedPayload } from './../../../Runtime/Deltas/Utilities/SyncResolvedPayload' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { ItemContent } from '../../Content/ItemContent' import { TransferPayload } from '../../TransferPayload/Interfaces/TransferPayload' import { PayloadSource } from '../Types/PayloadSource' export interface PayloadInterface { readonly source: PayloadSource - readonly uuid: Uuid + readonly uuid: string readonly content_type: ContentType content: C | string | undefined deleted: boolean @@ -26,7 +26,7 @@ export interface PayloadInterface { - uuid: Uuid + uuid: string content_type: ContentType content: C | string | undefined deleted?: boolean @@ -19,5 +19,5 @@ export interface TransferPayload { lastSyncBegan?: Date lastSyncEnd?: Date - duplicate_of?: Uuid + duplicate_of?: string } diff --git a/packages/models/src/Domain/Runtime/Collection/Collection.ts b/packages/models/src/Domain/Runtime/Collection/Collection.ts index 5ab28a1a5b3..7b1afd1da31 100644 --- a/packages/models/src/Domain/Runtime/Collection/Collection.ts +++ b/packages/models/src/Domain/Runtime/Collection/Collection.ts @@ -1,11 +1,11 @@ import { extendArray, isObject, isString, UuidMap } from '@standardnotes/utils' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { remove } from 'lodash' import { ItemContent } from '../../Abstract/Content/ItemContent' import { ContentReference } from '../../Abstract/Item' export interface CollectionElement { - uuid: Uuid + uuid: string content_type: ContentType dirty?: boolean deleted?: boolean @@ -32,17 +32,17 @@ export abstract class Collection< Encrypted extends EncryptedCollectionElement, Deleted extends DeletedCollectionElement, > { - readonly map: Partial> = {} + readonly map: Partial> = {} readonly typedMap: Partial> = {} /** An array of uuids of items that are dirty */ - dirtyIndex: Set = new Set() + dirtyIndex: Set = new Set() /** An array of uuids of items that are not marked as deleted */ - nondeletedIndex: Set = new Set() + nondeletedIndex: Set = new Set() /** An array of uuids of items that are errorDecrypting or waitingForKey */ - invalidsIndex: Set = new Set() + invalidsIndex: Set = new Set() readonly referenceMap: UuidMap @@ -73,7 +73,7 @@ export abstract class Collection< constructor( copy = false, - mapCopy?: Partial>, + mapCopy?: Partial>, typedMapCopy?: Partial>, referenceMapCopy?: UuidMap, conflictMapCopy?: UuidMap, @@ -89,7 +89,7 @@ export abstract class Collection< } } - public uuids(): Uuid[] { + public uuids(): string[] { return Object.keys(this.map) } @@ -105,7 +105,7 @@ export abstract class Collection< return this.typedMap[contentType]?.slice() || [] } } else { - return Object.keys(this.map).map((uuid: Uuid) => { + return Object.keys(this.map).map((uuid: string) => { return this.map[uuid] }) as Element[] } @@ -129,7 +129,7 @@ export abstract class Collection< return this.findAll(uuids) } - public findAll(uuids: Uuid[]): Element[] { + public findAll(uuids: string[]): Element[] { const results: Element[] = [] for (const id of uuids) { @@ -142,11 +142,11 @@ export abstract class Collection< return results } - public find(uuid: Uuid): Element | undefined { + public find(uuid: string): Element | undefined { return this.map[uuid] } - public has(uuid: Uuid): boolean { + public has(uuid: string): boolean { return this.find(uuid) != undefined } @@ -154,7 +154,7 @@ export abstract class Collection< * If an item is not found, an `undefined` element * will be inserted into the array. */ - public findAllIncludingBlanks(uuids: Uuid[]): (E | Deleted | undefined)[] { + public findAllIncludingBlanks(uuids: string[]): (E | Deleted | undefined)[] { const results: (E | Deleted | undefined)[] = [] for (const id of uuids) { @@ -219,11 +219,11 @@ export abstract class Collection< } } - public uuidReferencesForUuid(uuid: Uuid): Uuid[] { + public uuidReferencesForUuid(uuid: string): string[] { return this.referenceMap.getDirectRelationships(uuid) } - public uuidsThatReferenceUuid(uuid: Uuid): Uuid[] { + public uuidsThatReferenceUuid(uuid: string): string[] { return this.referenceMap.getInverseRelationships(uuid) } @@ -232,7 +232,7 @@ export abstract class Collection< return this.findAll(uuids) } - public conflictsOf(uuid: Uuid): Element[] { + public conflictsOf(uuid: string): Element[] { const uuids = this.conflictMap.getDirectRelationships(uuid) return this.findAll(uuids) } diff --git a/packages/models/src/Domain/Runtime/Collection/CollectionSort.ts b/packages/models/src/Domain/Runtime/Collection/CollectionSort.ts index 517475e0134..d409f40b654 100644 --- a/packages/models/src/Domain/Runtime/Collection/CollectionSort.ts +++ b/packages/models/src/Domain/Runtime/Collection/CollectionSort.ts @@ -1,7 +1,7 @@ -import { Uuid, ContentType } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' export interface SortableItem { - uuid: Uuid + uuid: string content_type: ContentType created_at: Date userModifiedDate: Date diff --git a/packages/models/src/Domain/Runtime/Collection/Item/ItemCollection.ts b/packages/models/src/Domain/Runtime/Collection/Item/ItemCollection.ts index 8a553d3d472..ee5868afc74 100644 --- a/packages/models/src/Domain/Runtime/Collection/Item/ItemCollection.ts +++ b/packages/models/src/Domain/Runtime/Collection/Item/ItemCollection.ts @@ -1,6 +1,6 @@ import { ItemContent } from './../../../Abstract/Content/ItemContent' import { EncryptedItemInterface } from './../../../Abstract/Item/Interfaces/EncryptedItem' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { SNIndex } from '../../Index/SNIndex' import { isDecryptedItem } from '../../../Abstract/Item/Interfaces/TypeCheck' import { DecryptedItemInterface } from '../../../Abstract/Item/Interfaces/DecryptedItem' @@ -24,7 +24,7 @@ export class ItemCollection this.discard(delta.discarded) } - public findDecrypted(uuid: Uuid): T | undefined { + public findDecrypted(uuid: string): T | undefined { const result = this.find(uuid) if (!result) { @@ -34,12 +34,12 @@ export class ItemCollection return isDecryptedItem(result) ? (result as T) : undefined } - public findAllDecrypted(uuids: Uuid[]): T[] { + public findAllDecrypted(uuids: string[]): T[] { return this.findAll(uuids).filter(isDecryptedItem) as T[] } public findAllDecryptedWithBlanks( - uuids: Uuid[], + uuids: string[], ): (DecryptedItemInterface | undefined)[] { const results = this.findAllIncludingBlanks(uuids) const mapped = results.map((i) => { diff --git a/packages/models/src/Domain/Runtime/Collection/Item/TagItemsIndex.ts b/packages/models/src/Domain/Runtime/Collection/Item/TagItemsIndex.ts index 81bbabe9cb2..2662b493b02 100644 --- a/packages/models/src/Domain/Runtime/Collection/Item/TagItemsIndex.ts +++ b/packages/models/src/Domain/Runtime/Collection/Item/TagItemsIndex.ts @@ -1,5 +1,5 @@ import { removeFromArray } from '@standardnotes/utils' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { isTag, SNTag } from '../../../Syncable/Tag/Tag' import { SNIndex } from '../../Index/SNIndex' import { ItemCollection } from './ItemCollection' @@ -7,12 +7,12 @@ import { ItemDelta } from '../../Index/ItemDelta' import { isDecryptedItem, ItemInterface } from '../../../Abstract/Item' type AllNotesUuidSignifier = undefined -export type TagItemCountChangeObserver = (tagUuid: Uuid | AllNotesUuidSignifier) => void +export type TagItemCountChangeObserver = (tagUuid: string | AllNotesUuidSignifier) => void export class TagItemsIndex implements SNIndex { - private tagToItemsMap: Partial>> = {} - private allCountableItems = new Set() - private countableItemsByType = new Map>() + private tagToItemsMap: Partial>> = {} + private allCountableItems = new Set() + private countableItemsByType = new Map>() constructor(private collection: ItemCollection, public observers: TagItemCountChangeObserver[] = []) {} @@ -32,7 +32,7 @@ export class TagItemsIndex implements SNIndex { } } - private notifyObservers(tagUuid: Uuid | undefined) { + private notifyObservers(tagUuid: string | undefined) { for (const observer of this.observers) { observer(tagUuid) } @@ -119,7 +119,7 @@ export class TagItemsIndex implements SNIndex { } } - private setForTag(uuid: Uuid): Set { + private setForTag(uuid: string): Set { let set = this.tagToItemsMap[uuid] if (!set) { set = new Set() diff --git a/packages/models/src/Domain/Runtime/Deltas/RemoteRetrieved.ts b/packages/models/src/Domain/Runtime/Deltas/RemoteRetrieved.ts index 571098a9cff..273b15cfcc9 100644 --- a/packages/models/src/Domain/Runtime/Deltas/RemoteRetrieved.ts +++ b/packages/models/src/Domain/Runtime/Deltas/RemoteRetrieved.ts @@ -2,7 +2,7 @@ import { ImmutablePayloadCollection } from './../Collection/Payload/ImmutablePay import { ConflictDelta } from './Conflict' import { isErrorDecryptingPayload, isDecryptedPayload } from '../../Abstract/Payload/Interfaces/TypeCheck' import { FullyFormedPayloadInterface, PayloadEmitSource } from '../../Abstract/Payload' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { HistoryMap } from '../History' import { ServerSyncPushContextualPayload } from '../../Abstract/Contextual/ServerSyncPush' import { payloadByFinalizingSyncState } from './Utilities/ApplyDirtyState' @@ -18,7 +18,7 @@ export class DeltaRemoteRetrieved implements SyncDeltaInterface { readonly historyMap: HistoryMap, ) {} - private isUuidOfPayloadCurrentlySavingOrSaved(uuid: Uuid): boolean { + private isUuidOfPayloadCurrentlySavingOrSaved(uuid: string): boolean { return this.itemsSavedOrSaving.find((i) => i.uuid === uuid) != undefined } diff --git a/packages/models/src/Domain/Runtime/Display/Types.ts b/packages/models/src/Domain/Runtime/Display/Types.ts index feb607fc77e..9727c456178 100644 --- a/packages/models/src/Domain/Runtime/Display/Types.ts +++ b/packages/models/src/Domain/Runtime/Display/Types.ts @@ -1,10 +1,9 @@ -import { Uuid } from '@standardnotes/common' import { DecryptedItemInterface } from '../../Abstract/Item' import { SortableItem } from '../Collection/CollectionSort' import { ItemCollection } from '../Collection/Item/ItemCollection' export type DisplayControllerCustomFilter = (element: DisplayItem) => boolean -export type UuidToSortedPositionMap = Record +export type UuidToSortedPositionMap = Record export type DisplayItem = SortableItem & DecryptedItemInterface export interface ReadonlyItemCollection { diff --git a/packages/models/src/Domain/Runtime/History/HistoryMap.ts b/packages/models/src/Domain/Runtime/History/HistoryMap.ts index 826415f8031..dcfc808d14d 100644 --- a/packages/models/src/Domain/Runtime/History/HistoryMap.ts +++ b/packages/models/src/Domain/Runtime/History/HistoryMap.ts @@ -1,7 +1,6 @@ -import { Uuid } from '@standardnotes/common' import { HistoryEntry } from './HistoryEntry' -export type HistoryMap = Record +export type HistoryMap = Record export const historyMapFunctions = { getNewestRevision: (history: HistoryEntry[]): HistoryEntry | undefined => { diff --git a/packages/models/src/Domain/Syncable/Component/Component.ts b/packages/models/src/Domain/Syncable/Component/Component.ts index 7383e2c5503..509f28bc950 100644 --- a/packages/models/src/Domain/Syncable/Component/Component.ts +++ b/packages/models/src/Domain/Syncable/Component/Component.ts @@ -1,5 +1,5 @@ import { isValidUrl } from '@standardnotes/utils' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { FeatureIdentifier, ThirdPartyFeatureDescription, @@ -159,11 +159,11 @@ export class SNComponent extends DecryptedItem implements Comp return SNComponent.associativeAreas().includes(this.area) } - public isExplicitlyEnabledForItem(uuid: Uuid): boolean { + public isExplicitlyEnabledForItem(uuid: string): boolean { return this.associatedItemIds.indexOf(uuid) !== -1 } - public isExplicitlyDisabledForItem(uuid: Uuid): boolean { + public isExplicitlyDisabledForItem(uuid: string): boolean { return this.disassociatedItemIds.indexOf(uuid) !== -1 } diff --git a/packages/models/src/Domain/Syncable/Component/ComponentContent.ts b/packages/models/src/Domain/Syncable/Component/ComponentContent.ts index 9e6787e420e..5d7ee4bba15 100644 --- a/packages/models/src/Domain/Syncable/Component/ComponentContent.ts +++ b/packages/models/src/Domain/Syncable/Component/ComponentContent.ts @@ -1,5 +1,4 @@ import { ComponentArea, ComponentPermission } from '@standardnotes/features' -import { Uuid } from '@standardnotes/common' import { ItemContent } from '../../Abstract/Content/ItemContent' import { ComponentPackageInfo } from './PackageInfo' @@ -30,7 +29,7 @@ export interface ComponentInterface { legacy_url?: string isMobileDefault: boolean isDeprecated: boolean - isExplicitlyEnabledForItem(uuid: Uuid): boolean + isExplicitlyEnabledForItem(uuid: string): boolean } export type ComponentContent = ComponentInterface & ItemContent diff --git a/packages/models/src/Domain/Syncable/Component/ComponentMutator.ts b/packages/models/src/Domain/Syncable/Component/ComponentMutator.ts index 2a0e6f05000..f4a5a34b641 100644 --- a/packages/models/src/Domain/Syncable/Component/ComponentMutator.ts +++ b/packages/models/src/Domain/Syncable/Component/ComponentMutator.ts @@ -1,5 +1,4 @@ import { addIfUnique, removeFromArray } from '@standardnotes/utils' -import { Uuid } from '@standardnotes/common' import { ComponentPermission, FeatureDescription } from '@standardnotes/features' import { AppDataField } from '../../Abstract/Item/Types/AppDataField' import { ComponentContent } from './ComponentContent' @@ -46,23 +45,23 @@ export class ComponentMutator extends DecryptedItemMutator { this.mutableContent.offlineOnly = offlineOnly } - public associateWithItem(uuid: Uuid): void { + public associateWithItem(uuid: string): void { const associated = this.mutableContent.associatedItemIds || [] addIfUnique(associated, uuid) this.mutableContent.associatedItemIds = associated } - public disassociateWithItem(uuid: Uuid): void { + public disassociateWithItem(uuid: string): void { const disassociated = this.mutableContent.disassociatedItemIds || [] addIfUnique(disassociated, uuid) this.mutableContent.disassociatedItemIds = disassociated } - public removeAssociatedItemId(uuid: Uuid): void { + public removeAssociatedItemId(uuid: string): void { removeFromArray(this.mutableContent.associatedItemIds || [], uuid) } - public removeDisassociatedItemId(uuid: Uuid): void { + public removeDisassociatedItemId(uuid: string): void { removeFromArray(this.mutableContent.disassociatedItemIds || [], uuid) } diff --git a/packages/models/src/Domain/Syncable/Tag/Tag.ts b/packages/models/src/Domain/Syncable/Tag/Tag.ts index 4c6c693a385..380280cbc38 100644 --- a/packages/models/src/Domain/Syncable/Tag/Tag.ts +++ b/packages/models/src/Domain/Syncable/Tag/Tag.ts @@ -1,5 +1,5 @@ import { VectorIconNameOrEmoji, IconType } from './../../Utilities/Icon/IconType' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { DecryptedItem } from '../../Abstract/Item/Implementations/DecryptedItem' import { ItemInterface } from '../../Abstract/Item/Interfaces/ItemInterface' import { ContentReference } from '../../Abstract/Reference/ContentReference' @@ -41,7 +41,7 @@ export class SNTag extends DecryptedItem implements TagContentSpecia return this.noteReferences.length } - public get parentId(): Uuid | undefined { + public get parentId(): string | undefined { const reference = this.references.find(isTagToParentTagReference) return reference?.uuid } diff --git a/packages/models/src/Domain/Utilities/Item/FindItem.ts b/packages/models/src/Domain/Utilities/Item/FindItem.ts index 13092e2ca00..6364eb768ae 100644 --- a/packages/models/src/Domain/Utilities/Item/FindItem.ts +++ b/packages/models/src/Domain/Utilities/Item/FindItem.ts @@ -1,10 +1,9 @@ -import { Uuid } from '@standardnotes/common' import { ItemInterface } from '../../Abstract/Item/Interfaces/ItemInterface' -export function FindItem(items: I[], uuid: Uuid): I | undefined { +export function FindItem(items: I[], uuid: string): I | undefined { return items.find((item) => item.uuid === uuid) } -export function SureFindItem(items: I[], uuid: Uuid): I { +export function SureFindItem(items: I[], uuid: string): I { return FindItem(items, uuid) as I } diff --git a/packages/models/src/Domain/Utilities/Payload/FindPayload.ts b/packages/models/src/Domain/Utilities/Payload/FindPayload.ts index edce5103f8d..0251801380a 100644 --- a/packages/models/src/Domain/Utilities/Payload/FindPayload.ts +++ b/packages/models/src/Domain/Utilities/Payload/FindPayload.ts @@ -1,10 +1,9 @@ -import { Uuid } from '@standardnotes/common' import { PayloadInterface } from '../../Abstract/Payload/Interfaces/PayloadInterface' -export function FindPayload

(payloads: P[], uuid: Uuid): P | undefined { +export function FindPayload

(payloads: P[], uuid: string): P | undefined { return payloads.find((payload) => payload.uuid === uuid) } -export function SureFindPayload

(payloads: P[], uuid: Uuid): P { +export function SureFindPayload

(payloads: P[], uuid: string): P { return FindPayload(payloads, uuid) as P } diff --git a/packages/models/src/Domain/Utilities/Payload/PayloadsByUpdatingReferencingPayloadReferences.ts b/packages/models/src/Domain/Utilities/Payload/PayloadsByUpdatingReferencingPayloadReferences.ts index 0c06d83d70b..ca45fc34ce8 100644 --- a/packages/models/src/Domain/Utilities/Payload/PayloadsByUpdatingReferencingPayloadReferences.ts +++ b/packages/models/src/Domain/Utilities/Payload/PayloadsByUpdatingReferencingPayloadReferences.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { remove } from 'lodash' import { ImmutablePayloadCollection } from '../../Runtime/Collection/Payload/ImmutablePayloadCollection' import { ContentReference } from '../../Abstract/Reference/ContentReference' @@ -12,7 +11,7 @@ export function PayloadsByUpdatingReferencingPayloadReferences( payload: DecryptedPayloadInterface, baseCollection: ImmutablePayloadCollection, add: FullyFormedPayloadInterface[] = [], - removeIds: Uuid[] = [], + removeIds: string[] = [], ): SyncResolvedPayload[] { const referencingPayloads = baseCollection.elementsReferencingElement(payload).filter(isDecryptedPayload) diff --git a/packages/responses/package.json b/packages/responses/package.json index 3c441cbda04..6b86b4cda09 100644 --- a/packages/responses/package.json +++ b/packages/responses/package.json @@ -33,7 +33,7 @@ "typescript": "*" }, "dependencies": { - "@standardnotes/common": "^1.45.0", + "@standardnotes/common": "^1.46.3", "@standardnotes/features": "workspace:*", "@standardnotes/security": "^1.7.0", "reflect-metadata": "^0.1.13" diff --git a/packages/responses/src/Domain/Http/ResponseMeta.ts b/packages/responses/src/Domain/Http/ResponseMeta.ts index 61edb11f4bf..e21278419ea 100644 --- a/packages/responses/src/Domain/Http/ResponseMeta.ts +++ b/packages/responses/src/Domain/Http/ResponseMeta.ts @@ -1,9 +1,8 @@ import { Role } from '@standardnotes/security' -import { Uuid } from '@standardnotes/common' export type ResponseMeta = { auth: { - userUuid?: Uuid + userUuid?: string roles?: Role[] } server: { diff --git a/packages/responses/src/Domain/Item/IntegrityPayload.ts b/packages/responses/src/Domain/Item/IntegrityPayload.ts index c7f17347181..f22e0d3ebc7 100644 --- a/packages/responses/src/Domain/Item/IntegrityPayload.ts +++ b/packages/responses/src/Domain/Item/IntegrityPayload.ts @@ -1,6 +1,6 @@ -import { MicrosecondsTimestamp, Uuid } from '@standardnotes/common' +import { MicrosecondsTimestamp } from '@standardnotes/common' export type IntegrityPayload = { - uuid: Uuid + uuid: string updated_at_timestamp: MicrosecondsTimestamp } diff --git a/packages/responses/src/Domain/Item/ServerItemResponse.ts b/packages/responses/src/Domain/Item/ServerItemResponse.ts index 14ee3b7f14c..7d6a27cdc46 100644 --- a/packages/responses/src/Domain/Item/ServerItemResponse.ts +++ b/packages/responses/src/Domain/Item/ServerItemResponse.ts @@ -1,4 +1,4 @@ -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' export interface ServerItemResponse { content_type: ContentType @@ -6,7 +6,7 @@ export interface ServerItemResponse { created_at_timestamp: number created_at: Date deleted: boolean - duplicate_of?: Uuid + duplicate_of?: string enc_item_key: string items_key_id?: string updated_at_timestamp: number diff --git a/packages/services/package.json b/packages/services/package.json index 41c191f17d7..98c4e1e9e2f 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -18,8 +18,8 @@ "dependencies": { "@standardnotes/api": "workspace:^", "@standardnotes/auth": "^3.19.4", - "@standardnotes/common": "^1.45.0", - "@standardnotes/domain-core": "^1.11.0", + "@standardnotes/common": "^1.46.3", + "@standardnotes/domain-core": "^1.11.1", "@standardnotes/encryption": "workspace:^", "@standardnotes/files": "workspace:^", "@standardnotes/models": "workspace:^", diff --git a/packages/services/src/Domain/Api/ApiServiceInterface.ts b/packages/services/src/Domain/Api/ApiServiceInterface.ts index 598f618383b..24c71ba0142 100644 --- a/packages/services/src/Domain/Api/ApiServiceInterface.ts +++ b/packages/services/src/Domain/Api/ApiServiceInterface.ts @@ -1,4 +1,4 @@ -import { Either, Uuid } from '@standardnotes/common' +import { Either } from '@standardnotes/common' import { Role } from '@standardnotes/auth' import { FilesApiInterface } from '@standardnotes/files' import { Session } from '@standardnotes/domain-core' @@ -13,7 +13,7 @@ export enum ApiServiceEvent { } export type MetaReceivedData = { - userUuid: Uuid + userUuid: string userRoles: Role[] } diff --git a/packages/services/src/Domain/Backups/BackupService.ts b/packages/services/src/Domain/Backups/BackupService.ts index 16d113eef1f..2ab240e1403 100644 --- a/packages/services/src/Domain/Backups/BackupService.ts +++ b/packages/services/src/Domain/Backups/BackupService.ts @@ -1,4 +1,4 @@ -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { EncryptionProviderInterface } from '@standardnotes/encryption' import { PayloadEmitSource, FileItem, CreateEncryptedBackupFileContextPayload } from '@standardnotes/models' import { ClientDisplayableError } from '@standardnotes/responses' @@ -20,7 +20,7 @@ import { log, LoggingDomain } from '../Logging' export class FilesBackupService extends AbstractService implements BackupServiceInterface { private itemsObserverDisposer: () => void - private pendingFiles = new Set() + private pendingFiles = new Set() private mappingCache?: FileBackupsMapping['files'] constructor( diff --git a/packages/services/src/Domain/Component/ComponentManagerInterface.ts b/packages/services/src/Domain/Component/ComponentManagerInterface.ts index e4332be4f16..ad19279a822 100644 --- a/packages/services/src/Domain/Component/ComponentManagerInterface.ts +++ b/packages/services/src/Domain/Component/ComponentManagerInterface.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { ComponentArea, FeatureIdentifier } from '@standardnotes/features' import { ActionObserver, PermissionDialog, SNComponent, SNNote } from '@standardnotes/models' @@ -15,7 +14,7 @@ export interface ComponentManagerInterface { destroyComponentViewer(viewer: ComponentViewerInterface): void createComponentViewer( component: SNComponent, - contextItem?: Uuid, + contextItem?: string, actionObserver?: ActionObserver, urlOverride?: string, ): ComponentViewerInterface diff --git a/packages/services/src/Domain/Device/DatabaseLoadSorter.ts b/packages/services/src/Domain/Device/DatabaseLoadSorter.ts index 12a05fd638a..6aa87468061 100644 --- a/packages/services/src/Domain/Device/DatabaseLoadSorter.ts +++ b/packages/services/src/Domain/Device/DatabaseLoadSorter.ts @@ -1,6 +1,6 @@ import { DatabaseItemMetadata } from './DatabaseItemMetadata' import { DatabaseLoadOptions } from './DatabaseLoadOptions' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' /** * Sorts payloads according by most recently modified first, according to the priority, @@ -47,7 +47,7 @@ function SortPayloadsByRecentAndContentPriority( payloads: T[], - uuidPriorityList: Uuid[], + uuidPriorityList: string[], ): T[] { return payloads.sort((a, b) => { const dateResult = new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime() diff --git a/packages/services/src/Domain/Feature/FeaturesClientInterface.ts b/packages/services/src/Domain/Feature/FeaturesClientInterface.ts index 39ddd8bdc57..21db88300f3 100644 --- a/packages/services/src/Domain/Feature/FeaturesClientInterface.ts +++ b/packages/services/src/Domain/Feature/FeaturesClientInterface.ts @@ -1,6 +1,5 @@ import { FeatureDescription, FeatureIdentifier } from '@standardnotes/features' import { SNComponent } from '@standardnotes/models' -import { RoleName } from '@standardnotes/common' import { FeatureStatus } from './FeatureStatus' import { SetOfflineFeaturesFunctionResponse } from './SetOfflineFeaturesFunctionResponse' @@ -12,7 +11,7 @@ export interface FeaturesClientInterface { getFeatureStatus(featureId: FeatureIdentifier): FeatureStatus - hasMinimumRole(role: RoleName): boolean + hasMinimumRole(role: string): boolean setOfflineFeaturesCode(code: string): Promise diff --git a/packages/services/src/Domain/Item/ItemsClientInterface.ts b/packages/services/src/Domain/Item/ItemsClientInterface.ts index 39957b281d8..27e7d0ce035 100644 --- a/packages/services/src/Domain/Item/ItemsClientInterface.ts +++ b/packages/services/src/Domain/Item/ItemsClientInterface.ts @@ -1,6 +1,6 @@ /* istanbul ignore file */ -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { SNNote, FileItem, @@ -129,14 +129,14 @@ export interface ItemsClientInterface { /** * Finds an item by UUID. */ - findItem(uuid: Uuid): T | undefined + findItem(uuid: string): T | undefined /** * Finds an item by predicate. */ - findItems(uuids: Uuid[]): T[] + findItems(uuids: string[]): T[] - findSureItem(uuid: Uuid): T + findSureItem(uuid: string): T /** * Finds an item by predicate. diff --git a/packages/services/src/Domain/Item/ItemsServerInterface.ts b/packages/services/src/Domain/Item/ItemsServerInterface.ts index 973d6990246..80b06cb37fd 100644 --- a/packages/services/src/Domain/Item/ItemsServerInterface.ts +++ b/packages/services/src/Domain/Item/ItemsServerInterface.ts @@ -1,6 +1,5 @@ -import { Uuid } from '@standardnotes/common' import { GetSingleItemResponse } from '@standardnotes/responses' export interface ItemsServerInterface { - getSingleItem(itemUuid: Uuid): Promise + getSingleItem(itemUuid: string): Promise } diff --git a/packages/services/src/Domain/Subscription/SubscriptionClientInterface.ts b/packages/services/src/Domain/Subscription/SubscriptionClientInterface.ts index de20c323c46..05b1872c376 100644 --- a/packages/services/src/Domain/Subscription/SubscriptionClientInterface.ts +++ b/packages/services/src/Domain/Subscription/SubscriptionClientInterface.ts @@ -1,12 +1,11 @@ -import { Uuid } from '@standardnotes/common' import { Invitation } from '@standardnotes/models' import { AppleIAPReceipt } from './AppleIAPReceipt' export interface SubscriptionClientInterface { listSubscriptionInvitations(): Promise inviteToSubscription(inviteeEmail: string): Promise - cancelInvitation(inviteUuid: Uuid): Promise - acceptInvitation(inviteUuid: Uuid): Promise<{ success: true } | { success: false; message: string }> + cancelInvitation(inviteUuid: string): Promise + acceptInvitation(inviteUuid: string): Promise<{ success: true } | { success: false; message: string }> confirmAppleIAP( receipt: AppleIAPReceipt, subscriptionToken: string, diff --git a/packages/services/src/Domain/Subscription/SubscriptionManager.ts b/packages/services/src/Domain/Subscription/SubscriptionManager.ts index 0c08d213d0d..11d3dec0163 100644 --- a/packages/services/src/Domain/Subscription/SubscriptionManager.ts +++ b/packages/services/src/Domain/Subscription/SubscriptionManager.ts @@ -3,7 +3,6 @@ import { SubscriptionApiServiceInterface } from '@standardnotes/api' import { InternalEventBusInterface } from '../Internal/InternalEventBusInterface' import { AbstractService } from '../Service/AbstractService' import { SubscriptionClientInterface } from './SubscriptionClientInterface' -import { Uuid } from '@standardnotes/common' import { AppleIAPReceipt } from './AppleIAPReceipt' export class SubscriptionManager extends AbstractService implements SubscriptionClientInterface { @@ -48,7 +47,7 @@ export class SubscriptionManager extends AbstractService implements Subscription } } - async cancelInvitation(inviteUuid: Uuid): Promise { + async cancelInvitation(inviteUuid: string): Promise { try { const result = await this.subscriptionApiService.cancelInvite(inviteUuid) diff --git a/packages/services/src/Domain/Workspace/WorkspaceClientInterface.ts b/packages/services/src/Domain/Workspace/WorkspaceClientInterface.ts index c7417116191..40a2a419939 100644 --- a/packages/services/src/Domain/Workspace/WorkspaceClientInterface.ts +++ b/packages/services/src/Domain/Workspace/WorkspaceClientInterface.ts @@ -1,4 +1,4 @@ -import { Uuid, WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common' +import { WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common' import { Workspace, WorkspaceUser } from '@standardnotes/api' export interface WorkspaceClientInterface { @@ -11,20 +11,20 @@ export interface WorkspaceClientInterface { }): Promise<{ uuid: string } | null> inviteToWorkspace(dto: { inviteeEmail: string - workspaceUuid: Uuid + workspaceUuid: string accessLevel: WorkspaceAccessLevel }): Promise<{ uuid: string } | null> acceptInvite(dto: { - inviteUuid: Uuid - userUuid: Uuid + inviteUuid: string + userUuid: string publicKey: string encryptedPrivateKey: string }): Promise<{ success: boolean }> listWorkspaces(): Promise<{ ownedWorkspaces: Array; joinedWorkspaces: Array }> - listWorkspaceUsers(dto: { workspaceUuid: Uuid }): Promise<{ users: Array }> + listWorkspaceUsers(dto: { workspaceUuid: string }): Promise<{ users: Array }> initiateKeyshare(dto: { - workspaceUuid: Uuid - userUuid: Uuid + workspaceUuid: string + userUuid: string encryptedWorkspaceKey: string }): Promise<{ success: boolean }> } diff --git a/packages/services/src/Domain/Workspace/WorkspaceManager.ts b/packages/services/src/Domain/Workspace/WorkspaceManager.ts index fca97be4a4e..8f363694d93 100644 --- a/packages/services/src/Domain/Workspace/WorkspaceManager.ts +++ b/packages/services/src/Domain/Workspace/WorkspaceManager.ts @@ -1,5 +1,5 @@ import { WorkspaceApiServiceInterface, Workspace, WorkspaceUser } from '@standardnotes/api' -import { Uuid, WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common' +import { WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common' import { InternalEventBusInterface } from '../Internal/InternalEventBusInterface' import { AbstractService } from '../Service/AbstractService' import { WorkspaceClientInterface } from './WorkspaceClientInterface' @@ -79,7 +79,7 @@ export class WorkspaceManager extends AbstractService implements WorkspaceClient async inviteToWorkspace(dto: { inviteeEmail: string - workspaceUuid: Uuid + workspaceUuid: string accessLevel: WorkspaceAccessLevel }): Promise<{ uuid: string } | null> { try { diff --git a/packages/snjs/lib/Services/Api/ApiService.ts b/packages/snjs/lib/Services/Api/ApiService.ts index 65fd1283f64..60b60e9e010 100644 --- a/packages/snjs/lib/Services/Api/ApiService.ts +++ b/packages/snjs/lib/Services/Api/ApiService.ts @@ -1,7 +1,7 @@ import { FeatureDescription } from '@standardnotes/features' import { isNullOrUndefined, joinPaths } from '@standardnotes/utils' import { SettingName, SubscriptionSettingName } from '@standardnotes/settings' -import { Uuid, ErrorTag } from '@standardnotes/common' +import { ErrorTag } from '@standardnotes/common' import { AbstractService, ApiServiceInterface, @@ -852,7 +852,7 @@ export class SNApiService }) } - async getSingleItem(itemUuid: Uuid): Promise { + async getSingleItem(itemUuid: string): Promise { return await this.tokenRefreshableRequest({ verb: HttpVerb.Get, url: joinPaths(this.host, Paths.v1.getSingleItem(itemUuid)), diff --git a/packages/snjs/lib/Services/Api/Paths.ts b/packages/snjs/lib/Services/Api/Paths.ts index 07f273ac68f..96a8fe3e850 100644 --- a/packages/snjs/lib/Services/Api/Paths.ts +++ b/packages/snjs/lib/Services/Api/Paths.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { SettingName, SubscriptionSettingName } from '@standardnotes/settings' const FilesPaths = { @@ -12,7 +11,7 @@ const FilesPaths = { const UserPaths = { changeCredentials: (userUuid: string) => `/v1/users/${userUuid}/attributes/credentials`, - deleteAccount: (userUuid: Uuid) => `/v1/users/${userUuid}`, + deleteAccount: (userUuid: string) => `/v1/users/${userUuid}`, keyParams: '/v1/login-params', refreshSession: '/v1/sessions/refresh', register: '/v1/users', @@ -24,23 +23,23 @@ const UserPaths = { const ItemsPaths = { checkIntegrity: '/v1/items/check-integrity', - getSingleItem: (uuid: Uuid) => `/v1/items/${uuid}`, + getSingleItem: (uuid: string) => `/v1/items/${uuid}`, itemRevisions: (itemUuid: string) => `/v1/items/${itemUuid}/revisions`, itemRevision: (itemUuid: string, revisionUuid: string) => `/v1/items/${itemUuid}/revisions/${revisionUuid}`, sync: '/v1/items', } const SettingsPaths = { - settings: (userUuid: Uuid) => `/v1/users/${userUuid}/settings`, - setting: (userUuid: Uuid, settingName: SettingName) => `/v1/users/${userUuid}/settings/${settingName}`, - subscriptionSetting: (userUuid: Uuid, settingName: SubscriptionSettingName) => + settings: (userUuid: string) => `/v1/users/${userUuid}/settings`, + setting: (userUuid: string, settingName: SettingName) => `/v1/users/${userUuid}/settings/${settingName}`, + subscriptionSetting: (userUuid: string, settingName: SubscriptionSettingName) => `/v1/users/${userUuid}/subscription-settings/${settingName}`, } const SubscriptionPaths = { offlineFeatures: '/v1/offline/features', purchase: '/v1/purchase', - subscription: (userUuid: Uuid) => `/v1/users/${userUuid}/subscription`, + subscription: (userUuid: string) => `/v1/users/${userUuid}/subscription`, subscriptionTokens: '/v1/subscription-tokens', userFeatures: (userUuid: string) => `/v1/users/${userUuid}/features`, } @@ -55,7 +54,7 @@ const UserPathsV2 = { } const ListedPaths = { - listedRegistration: (userUuid: Uuid) => `/v1/users/${userUuid}/integrations/listed`, + listedRegistration: (userUuid: string) => `/v1/users/${userUuid}/integrations/listed`, } export const Paths = { diff --git a/packages/snjs/lib/Services/Features/FeaturesService.spec.ts b/packages/snjs/lib/Services/Features/FeaturesService.spec.ts index e6beb749579..8f6f7e78864 100644 --- a/packages/snjs/lib/Services/Features/FeaturesService.spec.ts +++ b/packages/snjs/lib/Services/Features/FeaturesService.spec.ts @@ -2,7 +2,8 @@ import { ItemInterface, SNComponent, SNFeatureRepo } from '@standardnotes/models import { SNSyncService } from '../Sync/SyncService' import { SettingName } from '@standardnotes/settings' import { SNFeaturesService } from '@Lib/Services/Features' -import { ContentType, RoleName } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' +import { RoleName } from '@standardnotes/domain-core' import { FeatureDescription, FeatureIdentifier, GetFeatures } from '@standardnotes/features' import { SNWebSocketsService } from '../Api/WebsocketsService' import { SNSettingsService } from '../Settings' @@ -31,7 +32,7 @@ describe('featuresService', () => { let alertService: AlertService let sessionManager: SNSessionManager let crypto: PureCryptoInterface - let roles: RoleName[] + let roles: string[] let features: FeatureDescription[] let items: ItemInterface[] let now: Date @@ -57,7 +58,7 @@ describe('featuresService', () => { } beforeEach(() => { - roles = [RoleName.CoreUser, RoleName.PlusUser] + roles = [RoleName.NAMES.CoreUser, RoleName.NAMES.PlusUser] now = new Date() tomorrow_client = now.setDate(now.getDate() + 1) @@ -161,7 +162,7 @@ describe('featuresService', () => { }, }) - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] storageService.getValue = jest.fn().mockReturnValue(roles) @@ -180,7 +181,7 @@ describe('featuresService', () => { }, }) - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] storageService.getValue = jest.fn().mockReturnValue(roles) @@ -211,7 +212,7 @@ describe('featuresService', () => { const mock = (featuresService['notifyEvent'] = jest.fn()) - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] await featuresService.setRoles(newRoles) expect(mock.mock.calls[0][0]).toEqual(FeaturesEvent.UserRolesChanged) @@ -224,7 +225,7 @@ describe('featuresService', () => { const spy = jest.spyOn(featuresService, 'notifyEvent' as never) - const newRoles = [...roles, RoleName.ProUser] + const newRoles = [...roles, RoleName.NAMES.ProUser] await featuresService.updateRolesAndFetchFeatures('123', newRoles) expect(spy.mock.calls[2][0]).toEqual(FeaturesEvent.DidPurchaseSubscription) @@ -238,7 +239,7 @@ describe('featuresService', () => { const spy = jest.spyOn(featuresService, 'notifyEvent' as never) - const newRoles = [...roles, RoleName.ProUser] + const newRoles = [...roles, RoleName.NAMES.ProUser] await featuresService.updateRolesAndFetchFeatures('123', newRoles) const triggeredEvents = spy.mock.calls.map((call) => call[0]) @@ -246,7 +247,7 @@ describe('featuresService', () => { }) it('saves new roles to storage and fetches features if a role has been added', async () => { - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] storageService.getValue = jest.fn().mockReturnValue(roles) const featuresService = createService() @@ -257,7 +258,7 @@ describe('featuresService', () => { }) it('saves new roles to storage and fetches features if a role has been removed', async () => { - const newRoles = [RoleName.CoreUser] + const newRoles = [RoleName.NAMES.CoreUser] storageService.getValue = jest.fn().mockReturnValue(roles) const featuresService = createService() @@ -268,7 +269,7 @@ describe('featuresService', () => { }) it('saves features to storage when roles change', async () => { - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] storageService.getValue = jest.fn().mockReturnValue(roles) const featuresService = createService() @@ -278,7 +279,7 @@ describe('featuresService', () => { }) it('creates items for non-expired features with content type if they do not exist', async () => { - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] storageService.getValue = jest.fn().mockReturnValue(roles) const featuresService = createService() @@ -321,7 +322,7 @@ describe('featuresService', () => { }, } as never) - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] storageService.getValue = jest.fn().mockReturnValue(roles) itemManager.getItems = jest.fn().mockReturnValue([existingItem]) @@ -333,7 +334,7 @@ describe('featuresService', () => { }) it('creates items for expired components if they do not exist', async () => { - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] const now = new Date() const yesterday_client = now.setDate(now.getDate() - 1) @@ -379,7 +380,7 @@ describe('featuresService', () => { }, } as never) - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] const now = new Date() const yesterday = now.setDate(now.getDate() - 1) @@ -418,7 +419,7 @@ describe('featuresService', () => { }, }) - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] storageService.getValue = jest.fn().mockReturnValue(roles) const featuresService = createService() @@ -441,7 +442,7 @@ describe('featuresService', () => { }, }) - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] storageService.getValue = jest.fn().mockReturnValue(roles) const featuresService = createService() @@ -468,7 +469,7 @@ describe('featuresService', () => { expires_at: tomorrow_server, } as FeatureDescription - const newRoles = [...roles, RoleName.PlusUser] + const newRoles = [...roles, RoleName.NAMES.PlusUser] storageService.getValue = jest.fn().mockReturnValue(roles) apiService.getUserFeatures = jest.fn().mockReturnValue({ @@ -516,13 +517,13 @@ describe('featuresService', () => { identifier: FeatureIdentifier.MidnightTheme, content_type: ContentType.Theme, expires_at: tomorrow_server, - role_name: RoleName.PlusUser, + role_name: RoleName.NAMES.PlusUser, }, { identifier: FeatureIdentifier.PlusEditor, content_type: ContentType.Component, expires_at: expiredDate, - role_name: RoleName.ProUser, + role_name: RoleName.NAMES.ProUser, }, ] as jest.Mocked @@ -534,13 +535,13 @@ describe('featuresService', () => { sessionManager.isSignedIntoFirstPartyServer = jest.fn().mockReturnValue(true) - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser, RoleName.PlusUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser, RoleName.NAMES.PlusUser]) expect(featuresService.getFeatureStatus(FeatureIdentifier.MidnightTheme)).toBe(FeatureStatus.Entitled) expect(featuresService.getFeatureStatus(FeatureIdentifier.PlusEditor)).toBe(FeatureStatus.NotInCurrentPlan) expect(featuresService.getFeatureStatus(FeatureIdentifier.SheetsEditor)).toBe(FeatureStatus.NotInCurrentPlan) - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser]) expect(featuresService.getFeatureStatus(FeatureIdentifier.MidnightTheme)).toBe(FeatureStatus.NoUserSubscription) expect(featuresService.getFeatureStatus(FeatureIdentifier.PlusEditor)).toBe(FeatureStatus.NoUserSubscription) @@ -551,13 +552,13 @@ describe('featuresService', () => { identifier: FeatureIdentifier.MidnightTheme, content_type: ContentType.Theme, expires_at: expiredDate, - role_name: RoleName.PlusUser, + role_name: RoleName.NAMES.PlusUser, }, { identifier: FeatureIdentifier.PlusEditor, content_type: ContentType.Component, expires_at: expiredDate, - role_name: RoleName.ProUser, + role_name: RoleName.NAMES.ProUser, }, ] as jest.Mocked @@ -567,7 +568,7 @@ describe('featuresService', () => { }, }) - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.PlusUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.PlusUser]) expect(featuresService.getFeatureStatus(FeatureIdentifier.MidnightTheme)).toBe( FeatureStatus.InCurrentPlanButExpired, @@ -579,7 +580,7 @@ describe('featuresService', () => { it('availableInRoles-based features', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.ProUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.ProUser]) expect(featuresService.getFeatureStatus(FeatureIdentifier.SuperEditor)).toBe(FeatureStatus.Entitled) }) @@ -591,14 +592,14 @@ describe('featuresService', () => { identifier: 'third-party-theme' as FeatureIdentifier, content_type: ContentType.Theme, expires_at: tomorrow_server, - role_name: RoleName.CoreUser, + role_name: RoleName.NAMES.CoreUser, } const editorFeature = { identifier: 'third-party-editor' as FeatureIdentifier, content_type: ContentType.Component, expires_at: expiredDate, - role_name: RoleName.PlusUser, + role_name: RoleName.NAMES.PlusUser, } features = [themeFeature, editorFeature] as jest.Mocked @@ -628,7 +629,7 @@ describe('featuresService', () => { } as never), ]) - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser]) expect(featuresService.getFeatureStatus(themeFeature.identifier)).toBe(FeatureStatus.Entitled) expect(featuresService.getFeatureStatus(editorFeature.identifier)).toBe(FeatureStatus.InCurrentPlanButExpired) @@ -640,7 +641,7 @@ describe('featuresService', () => { it('feature status should be not entitled if no account or offline repo', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser]) sessionManager.isSignedIntoFirstPartyServer = jest.fn().mockReturnValue(false) @@ -661,7 +662,7 @@ describe('featuresService', () => { }, }) - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser, RoleName.PlusUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser, RoleName.NAMES.PlusUser]) sessionManager.isSignedIntoFirstPartyServer = jest.fn().mockReturnValue(true) @@ -689,7 +690,7 @@ describe('featuresService', () => { it('feature status should be dynamic for subscriber if cached features and no successful features request made yet', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser, RoleName.PlusUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser, RoleName.NAMES.PlusUser]) featuresService['completedSuccessfulFeaturesRetrieval'] = false @@ -707,7 +708,7 @@ describe('featuresService', () => { it('feature status for offline subscription', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser, RoleName.PlusUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser, RoleName.NAMES.PlusUser]) sessionManager.isSignedIntoFirstPartyServer = jest.fn().mockReturnValue(false) featuresService.rolesIncludePaidSubscription = jest.fn().mockReturnValue(false) @@ -733,7 +734,7 @@ describe('featuresService', () => { FeatureStatus.NoUserSubscription, ) - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser, RoleName.PlusUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser, RoleName.NAMES.PlusUser]) expect(featuresService.getFeatureStatus(FeatureIdentifier.DeprecatedFileSafe as FeatureIdentifier)).toBe( FeatureStatus.Entitled, @@ -743,12 +744,12 @@ describe('featuresService', () => { it('has paid subscription', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser]) sessionManager.isSignedIntoFirstPartyServer = jest.fn().mockReturnValue(true) expect(featuresService.hasPaidOnlineOrOfflineSubscription()).toBeFalsy - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser, RoleName.PlusUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser, RoleName.NAMES.PlusUser]) expect(featuresService.hasPaidOnlineOrOfflineSubscription()).toEqual(true) }) @@ -756,7 +757,7 @@ describe('featuresService', () => { it('has paid subscription should be true if offline repo and signed into third party server', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser]) featuresService.hasOfflineRepo = jest.fn().mockReturnValue(true) sessionManager.isSignedIntoFirstPartyServer = jest.fn().mockReturnValue(false) @@ -828,9 +829,9 @@ describe('featuresService', () => { it('should sort given roles according to role hierarchy', () => { const featuresService = createService() - const sortedRoles = featuresService.rolesBySorting([RoleName.ProUser, RoleName.CoreUser, RoleName.PlusUser]) + const sortedRoles = featuresService.rolesBySorting([RoleName.NAMES.ProUser, RoleName.NAMES.CoreUser, RoleName.NAMES.PlusUser]) - expect(sortedRoles).toStrictEqual([RoleName.CoreUser, RoleName.PlusUser, RoleName.ProUser]) + expect(sortedRoles).toStrictEqual([RoleName.NAMES.CoreUser, RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser]) }) }) @@ -838,9 +839,9 @@ describe('featuresService', () => { it('should be false if core user checks for plus role', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.CoreUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.CoreUser]) - const hasPlusUserRole = featuresService.hasMinimumRole(RoleName.PlusUser) + const hasPlusUserRole = featuresService.hasMinimumRole(RoleName.NAMES.PlusUser) expect(hasPlusUserRole).toBe(false) }) @@ -848,9 +849,9 @@ describe('featuresService', () => { it('should be false if plus user checks for pro role', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.PlusUser, RoleName.CoreUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.PlusUser, RoleName.NAMES.CoreUser]) - const hasProUserRole = featuresService.hasMinimumRole(RoleName.ProUser) + const hasProUserRole = featuresService.hasMinimumRole(RoleName.NAMES.ProUser) expect(hasProUserRole).toBe(false) }) @@ -858,9 +859,9 @@ describe('featuresService', () => { it('should be true if pro user checks for core user', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.ProUser, RoleName.PlusUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.ProUser, RoleName.NAMES.PlusUser]) - const hasCoreUserRole = featuresService.hasMinimumRole(RoleName.CoreUser) + const hasCoreUserRole = featuresService.hasMinimumRole(RoleName.NAMES.CoreUser) expect(hasCoreUserRole).toBe(true) }) @@ -868,9 +869,9 @@ describe('featuresService', () => { it('should be true if pro user checks for pro user', async () => { const featuresService = createService() - await featuresService.updateRolesAndFetchFeatures('123', [RoleName.ProUser, RoleName.PlusUser]) + await featuresService.updateRolesAndFetchFeatures('123', [RoleName.NAMES.ProUser, RoleName.NAMES.PlusUser]) - const hasProUserRole = featuresService.hasMinimumRole(RoleName.ProUser) + const hasProUserRole = featuresService.hasMinimumRole(RoleName.NAMES.ProUser) expect(hasProUserRole).toBe(true) }) diff --git a/packages/snjs/lib/Services/Features/FeaturesService.ts b/packages/snjs/lib/Services/Features/FeaturesService.ts index c5dfbb6c5bc..dc57038bfb4 100644 --- a/packages/snjs/lib/Services/Features/FeaturesService.ts +++ b/packages/snjs/lib/Services/Features/FeaturesService.ts @@ -8,7 +8,8 @@ import { isString, } from '@standardnotes/utils' import { ClientDisplayableError, UserFeaturesResponse } from '@standardnotes/responses' -import { ContentType, RoleName } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' +import { RoleName } from '@standardnotes/domain-core' import { FillItemContent, PayloadEmitSource } from '@standardnotes/models' import { ItemManager } from '../Items/ItemManager' import { LEGACY_PROD_EXT_ORIGIN, PROD_OFFLINE_FEATURES_URL } from '../../Hosts' @@ -57,7 +58,7 @@ export class SNFeaturesService implements FeaturesClientInterface, InternalEventHandlerInterface { private deinited = false - private roles: RoleName[] = [] + private roles: string[] = [] private features: FeaturesImports.FeatureDescription[] = [] private enabledExperimentalFeatures: FeaturesImports.FeatureIdentifier[] = [] private removeWebSocketsServiceObserver: () => void @@ -363,14 +364,14 @@ export class SNFeaturesService } public initializeFromDisk(): void { - this.roles = this.storageService.getValue(StorageKey.UserRoles, undefined, []) + this.roles = this.storageService.getValue(StorageKey.UserRoles, undefined, []) this.features = this.storageService.getValue(StorageKey.UserFeatures, undefined, []) this.enabledExperimentalFeatures = this.storageService.getValue(StorageKey.ExperimentalFeatures, undefined, []) } - public async updateRolesAndFetchFeatures(userUuid: UuidString, roles: RoleName[]): Promise { + public async updateRolesAndFetchFeatures(userUuid: UuidString, roles: string[]): Promise { const previousRoles = this.roles const userRolesChanged = this.haveRolesChanged(roles) @@ -403,7 +404,7 @@ export class SNFeaturesService } } - async setRoles(roles: RoleName[]): Promise { + async setRoles(roles: string[]): Promise { const rolesChanged = !arraysEqual(this.roles, roles) this.roles = roles @@ -469,7 +470,7 @@ export class SNFeaturesService } rolesIncludePaidSubscription(): boolean { - const unpaidRoles = [RoleName.CoreUser] + const unpaidRoles = [RoleName.NAMES.CoreUser] return this.roles.some((role) => !unpaidRoles.includes(role)) } @@ -477,16 +478,16 @@ export class SNFeaturesService return this.rolesIncludePaidSubscription() || this.hasOfflineRepo() } - public rolesBySorting(roles: RoleName[]): RoleName[] { - return Object.values(RoleName).filter((role) => roles.includes(role)) + public rolesBySorting(roles: string[]): string[] { + return Object.values(RoleName.NAMES).filter((role) => roles.includes(role)) } - public hasMinimumRole(role: RoleName): boolean { - const sortedAllRoles = Object.values(RoleName) + public hasMinimumRole(role: string): boolean { + const sortedAllRoles = Object.values(RoleName.NAMES) const sortedUserRoles = this.rolesBySorting(this.roles) - const highestUserRoleIndex = sortedAllRoles.indexOf(lastElement(sortedUserRoles) as RoleName) + const highestUserRoleIndex = sortedAllRoles.indexOf(lastElement(sortedUserRoles) as string) const indexOfRoleToCheck = sortedAllRoles.indexOf(role) @@ -556,7 +557,7 @@ export class SNFeaturesService const expired = feature.expires_at && new Date(feature.expires_at).getTime() < new Date().getTime() if (expired) { - if (!this.roles.includes(feature.role_name as RoleName)) { + if (!this.roles.includes(feature.role_name as string)) { return FeatureStatus.NotInCurrentPlan } else { return FeatureStatus.InCurrentPlanButExpired @@ -566,7 +567,7 @@ export class SNFeaturesService return FeatureStatus.Entitled } - private haveRolesChanged(roles: RoleName[]): boolean { + private haveRolesChanged(roles: string[]): boolean { return roles.some((role) => !this.roles.includes(role)) || this.roles.some((role) => !roles.includes(role)) } diff --git a/packages/snjs/lib/Services/Items/ItemManager.ts b/packages/snjs/lib/Services/Items/ItemManager.ts index b2592c9b3d6..eee33c739a3 100644 --- a/packages/snjs/lib/Services/Items/ItemManager.ts +++ b/packages/snjs/lib/Services/Items/ItemManager.ts @@ -1,4 +1,4 @@ -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { assert, naturalSort, removeFromArray, UuidGenerator, Uuids } from '@standardnotes/utils' import { ItemsKeyMutator, SNItemsKey } from '@standardnotes/encryption' import { PayloadManager } from '../Payloads/PayloadManager' @@ -240,7 +240,7 @@ export class ItemManager return this.collection.findAll(uuids) } - private findSystemSmartView(uuid: Uuid): Models.SmartView | undefined { + private findSystemSmartView(uuid: string): Models.SmartView | undefined { return this.systemSmartViews.find((view) => view.uuid === uuid) } diff --git a/packages/snjs/lib/Services/KeyRecovery/KeyRecoveryService.ts b/packages/snjs/lib/Services/KeyRecovery/KeyRecoveryService.ts index 2da7f193a8c..62cc56f011d 100644 --- a/packages/snjs/lib/Services/KeyRecovery/KeyRecoveryService.ts +++ b/packages/snjs/lib/Services/KeyRecovery/KeyRecoveryService.ts @@ -15,7 +15,7 @@ import { DiskStorageService } from '../Storage/DiskStorageService' import { PayloadManager } from '../Payloads/PayloadManager' import { ChallengeService } from '../Challenge' import { SNApiService } from '@Lib/Services/Api/ApiService' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { ItemManager } from '../Items/ItemManager' import { removeFromArray, Uuids } from '@standardnotes/utils' import { ClientDisplayableError, KeyParamsResponse } from '@standardnotes/responses' @@ -240,7 +240,7 @@ export class SNKeyRecoveryService extends AbstractService boolean requestNewListedAccount: () => Promise getListedAccounts(): Promise - getListedAccountInfo(account: ListedAccount, inContextOfItem?: Uuid): Promise + getListedAccountInfo(account: ListedAccount, inContextOfItem?: string): Promise isNoteAuthorizedForListed(note: SNNote): boolean authorizeNoteForListed(note: SNNote): Promise } diff --git a/packages/snjs/lib/Services/Payloads/PayloadManager.ts b/packages/snjs/lib/Services/Payloads/PayloadManager.ts index d7b086cf008..6ab84667bcd 100644 --- a/packages/snjs/lib/Services/Payloads/PayloadManager.ts +++ b/packages/snjs/lib/Services/Payloads/PayloadManager.ts @@ -1,4 +1,4 @@ -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { PayloadsChangeObserver, QueueElement, PayloadsChangeObserverCallback, EmitQueue } from './Types' import { removeFromArray, Uuids } from '@standardnotes/utils' import { @@ -66,11 +66,11 @@ export class PayloadManager extends AbstractService implements PayloadManagerInt this.collection = new PayloadCollection() } - public find(uuids: Uuid[]): FullyFormedPayloadInterface[] { + public find(uuids: string[]): FullyFormedPayloadInterface[] { return this.collection.findAll(uuids) } - public findOne(uuid: Uuid): FullyFormedPayloadInterface | undefined { + public findOne(uuid: string): FullyFormedPayloadInterface | undefined { return this.collection.findAll([uuid])[0] } @@ -288,7 +288,7 @@ export class PayloadManager extends AbstractService implements PayloadManagerInt * and marks the items as dirty. * @returns Resulting items */ - public async importPayloads(payloads: DecryptedPayloadInterface[], historyMap: HistoryMap): Promise { + public async importPayloads(payloads: DecryptedPayloadInterface[], historyMap: HistoryMap): Promise { const sourcedPayloads = payloads.map((p) => p.copy(undefined, PayloadSource.FileImport)) const delta = new DeltaFileImport(this.getMasterCollection(), sourcedPayloads, historyMap) diff --git a/packages/snjs/lib/Services/Session/Sessions/Types.ts b/packages/snjs/lib/Services/Session/Sessions/Types.ts index ddcb4f447f4..6fea67bc53f 100644 --- a/packages/snjs/lib/Services/Session/Sessions/Types.ts +++ b/packages/snjs/lib/Services/Session/Sessions/Types.ts @@ -1,5 +1,3 @@ -import { Uuid } from '@standardnotes/common' - export type RawJwtPayload = { jwt?: string } @@ -15,7 +13,7 @@ export type RawSessionPayload = { export type RawStorageValue = RawJwtPayload | RawSessionPayload export type RemoteSession = { - uuid: Uuid + uuid: string updated_at: Date device_info: string current: boolean diff --git a/packages/snjs/lib/Services/Storage/DiskStorageService.ts b/packages/snjs/lib/Services/Storage/DiskStorageService.ts index 4a01cb0d956..25bb88581a1 100644 --- a/packages/snjs/lib/Services/Storage/DiskStorageService.ts +++ b/packages/snjs/lib/Services/Storage/DiskStorageService.ts @@ -1,4 +1,4 @@ -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { Copy, extendArray, UuidGenerator } from '@standardnotes/utils' import { SNLog } from '../../Log' import { isErrorDecryptingParameters, SNRootKey } from '@standardnotes/encryption' @@ -448,7 +448,7 @@ export class DiskStorageService extends Services.AbstractService implements Serv await Promise.all(payloads.map((payload) => this.deletePayloadWithId(payload.uuid))) } - public async deletePayloadWithId(uuid: Uuid) { + public async deletePayloadWithId(uuid: string) { return this.executeCriticalFunction(async () => { return this.deviceInterface.removeDatabaseEntry(uuid, this.identifier) }) diff --git a/packages/snjs/lib/index.ts b/packages/snjs/lib/index.ts index d3821b4a67f..92d8f264a36 100644 --- a/packages/snjs/lib/index.ts +++ b/packages/snjs/lib/index.ts @@ -8,6 +8,7 @@ export * from './Services' export * from './Types' export * from './Version' export * from '@standardnotes/common' +export * from '@standardnotes/domain-core' export * from '@standardnotes/encryption' export * from '@standardnotes/features' export * from '@standardnotes/files' diff --git a/packages/snjs/package.json b/packages/snjs/package.json index f19e26232fb..1888c33823a 100644 --- a/packages/snjs/package.json +++ b/packages/snjs/package.json @@ -36,7 +36,7 @@ "@babel/core": "*", "@babel/preset-env": "*", "@standardnotes/api": "workspace:*", - "@standardnotes/common": "^1.45.0", + "@standardnotes/common": "^1.46.3", "@standardnotes/domain-events": "^2.88.0", "@standardnotes/encryption": "workspace:*", "@standardnotes/features": "workspace:*", @@ -86,6 +86,6 @@ "webpack-merge": "^5.8.0" }, "dependencies": { - "@standardnotes/domain-core": "^1.11.0" + "@standardnotes/domain-core": "^1.11.1" } } diff --git a/packages/ui-services/package.json b/packages/ui-services/package.json index adb2754848f..e0d2f590c65 100644 --- a/packages/ui-services/package.json +++ b/packages/ui-services/package.json @@ -15,7 +15,7 @@ "test": "jest spec" }, "dependencies": { - "@standardnotes/common": "^1.45.0", + "@standardnotes/common": "^1.46.3", "@standardnotes/features": "workspace:^", "@standardnotes/filepicker": "workspace:^", "@standardnotes/services": "workspace:^", diff --git a/packages/ui-services/src/Route/Params/SubscriptionInviteParams.ts b/packages/ui-services/src/Route/Params/SubscriptionInviteParams.ts index 979f70ea9b7..90052a5d6a5 100644 --- a/packages/ui-services/src/Route/Params/SubscriptionInviteParams.ts +++ b/packages/ui-services/src/Route/Params/SubscriptionInviteParams.ts @@ -1,5 +1,3 @@ -import { Uuid } from '@standardnotes/common' - export type SubscriptionInviteParams = { - inviteUuid: Uuid + inviteUuid: string } diff --git a/packages/ui-services/src/Route/RouteParser.ts b/packages/ui-services/src/Route/RouteParser.ts index cd753e43add..83cc4fb78bc 100644 --- a/packages/ui-services/src/Route/RouteParser.ts +++ b/packages/ui-services/src/Route/RouteParser.ts @@ -1,4 +1,4 @@ -import { UserRequestType, Uuid } from '@standardnotes/common' +import { UserRequestType } from '@standardnotes/common' import { PreferenceId } from './../Preferences/PreferenceId' import { DemoParams } from './Params/DemoParams' import { OnboardingParams } from './Params/OnboardingParams' @@ -41,7 +41,7 @@ export class RouteParser implements RouteParserInterface { this.checkForProperRouteType(RouteType.AcceptSubscriptionInvite) return { - inviteUuid: this.searchParams.get(RootQueryParam.AcceptSubscriptionInvite) as Uuid, + inviteUuid: this.searchParams.get(RootQueryParam.AcceptSubscriptionInvite) as string, } } diff --git a/packages/ui-services/src/Theme/ThemeManager.ts b/packages/ui-services/src/Theme/ThemeManager.ts index fa027e20279..9f819127de5 100644 --- a/packages/ui-services/src/Theme/ThemeManager.ts +++ b/packages/ui-services/src/Theme/ThemeManager.ts @@ -1,5 +1,5 @@ import { dismissToast, ToastType, addTimedToast } from '@standardnotes/toast' -import { ContentType, Uuid } from '@standardnotes/common' +import { ContentType } from '@standardnotes/common' import { CreateDecryptedLocalStorageContextPayload, LocalStorageDecryptedContextualPayload, @@ -23,7 +23,7 @@ const TimeBeforeApplyingColorScheme = 5 const DefaultThemeIdentifier = 'Default' export class ThemeManager extends AbstractService { - private activeThemes: Uuid[] = [] + private activeThemes: string[] = [] private unregisterDesktop?: () => void private unregisterStream!: () => void private lastUseDeviceThemeSettings = false diff --git a/packages/utils/package.json b/packages/utils/package.json index 0ea6d8c5487..734649b1428 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -25,7 +25,7 @@ "test": "jest spec" }, "dependencies": { - "@standardnotes/common": "^1.45.0", + "@standardnotes/common": "^1.46.3", "dompurify": "^2.4.1", "lodash": "^4.17.21", "reflect-metadata": "^0.1.13" diff --git a/packages/utils/src/Domain/Uuid/UuidMap.ts b/packages/utils/src/Domain/Uuid/UuidMap.ts index bcd58586e3b..917ae4eed28 100644 --- a/packages/utils/src/Domain/Uuid/UuidMap.ts +++ b/packages/utils/src/Domain/Uuid/UuidMap.ts @@ -1,4 +1,3 @@ -import { Uuid } from '@standardnotes/common' import { addIfUnique, removeFromArray } from '../Utils/Utils' /** @@ -7,9 +6,9 @@ import { addIfUnique, removeFromArray } from '../Utils/Utils' */ export class UuidMap { /** uuid to uuids that we have a relationship with */ - private directMap: Partial> = {} + private directMap: Partial> = {} /** uuid to uuids that have a relationship with us */ - private inverseMap: Partial> = {} + private inverseMap: Partial> = {} public makeCopy(): UuidMap { const copy = new UuidMap() @@ -18,25 +17,25 @@ export class UuidMap { return copy } - public getDirectRelationships(uuid: Uuid): Uuid[] { + public getDirectRelationships(uuid: string): string[] { return this.directMap[uuid] || [] } - public getInverseRelationships(uuid: Uuid): Uuid[] { + public getInverseRelationships(uuid: string): string[] { return this.inverseMap[uuid] || [] } - public establishRelationship(uuidA: Uuid, uuidB: Uuid): void { + public establishRelationship(uuidA: string, uuidB: string): void { this.establishDirectRelationship(uuidA, uuidB) this.establishInverseRelationship(uuidA, uuidB) } - public deestablishRelationship(uuidA: Uuid, uuidB: Uuid): void { + public deestablishRelationship(uuidA: string, uuidB: string): void { this.deestablishDirectRelationship(uuidA, uuidB) this.deestablishInverseRelationship(uuidA, uuidB) } - public setAllRelationships(uuid: Uuid, relationships: Uuid[]): void { + public setAllRelationships(uuid: string, relationships: string[]): void { const previousDirect = this.directMap[uuid] || [] this.directMap[uuid] = relationships @@ -53,7 +52,7 @@ export class UuidMap { } } - public removeFromMap(uuid: Uuid): void { + public removeFromMap(uuid: string): void { /** Items that we reference */ const directReferences = this.directMap[uuid] || [] for (const directReference of directReferences) { @@ -69,25 +68,25 @@ export class UuidMap { delete this.inverseMap[uuid] } - private establishDirectRelationship(uuidA: Uuid, uuidB: Uuid): void { + private establishDirectRelationship(uuidA: string, uuidB: string): void { const index = this.directMap[uuidA] || [] addIfUnique(index, uuidB) this.directMap[uuidA] = index } - private establishInverseRelationship(uuidA: Uuid, uuidB: Uuid): void { + private establishInverseRelationship(uuidA: string, uuidB: string): void { const inverseIndex = this.inverseMap[uuidB] || [] addIfUnique(inverseIndex, uuidA) this.inverseMap[uuidB] = inverseIndex } - private deestablishDirectRelationship(uuidA: Uuid, uuidB: Uuid): void { + private deestablishDirectRelationship(uuidA: string, uuidB: string): void { const index = this.directMap[uuidA] || [] removeFromArray(index, uuidB) this.directMap[uuidA] = index } - private deestablishInverseRelationship(uuidA: Uuid, uuidB: Uuid): void { + private deestablishInverseRelationship(uuidA: string, uuidB: string): void { const inverseIndex = this.inverseMap[uuidB] || [] removeFromArray(inverseIndex, uuidA) this.inverseMap[uuidB] = inverseIndex diff --git a/packages/web/src/javascripts/Components/Preferences/Panes/Account/SubscriptionSharing/InvitationsList.tsx b/packages/web/src/javascripts/Components/Preferences/Panes/Account/SubscriptionSharing/InvitationsList.tsx index d10d8f6b58b..36c906f8f44 100644 --- a/packages/web/src/javascripts/Components/Preferences/Panes/Account/SubscriptionSharing/InvitationsList.tsx +++ b/packages/web/src/javascripts/Components/Preferences/Panes/Account/SubscriptionSharing/InvitationsList.tsx @@ -1,6 +1,6 @@ import { useState } from 'react' import { observer } from 'mobx-react-lite' -import { InvitationStatus, Uuid } from '@standardnotes/snjs' +import { InvitationStatus } from '@standardnotes/snjs' import { SubtitleLight, Text } from '@/Components/Preferences/PreferencesComponents/Content' import { SubscriptionController } from '@/Controllers/Subscription/SubscriptionController' @@ -25,7 +25,7 @@ const InvitationsList = ({ subscriptionState, application }: Props) => { [InvitationStatus.Declined, InvitationStatus.Canceled].includes(invitation.status), ) - const handleCancel = async (invitationUuid: Uuid) => { + const handleCancel = async (invitationUuid: string) => { if (lockContinue) { application.alertService.alert('Cancelation already in progress.').catch(console.error) diff --git a/packages/web/src/javascripts/Components/RevisionHistoryModal/RemoteHistoryList.tsx b/packages/web/src/javascripts/Components/RevisionHistoryModal/RemoteHistoryList.tsx index 4b00a5bc2ab..7ce497bca77 100644 --- a/packages/web/src/javascripts/Components/RevisionHistoryModal/RemoteHistoryList.tsx +++ b/packages/web/src/javascripts/Components/RevisionHistoryModal/RemoteHistoryList.tsx @@ -4,7 +4,7 @@ import Icon from '@/Components/Icon/Icon' import { useListKeyboardNavigation } from '@/Hooks/useListKeyboardNavigation' import HistoryListItem from './HistoryListItem' import { previewHistoryEntryTitle } from './utils' -import { FeaturesClientInterface, RevisionMetadata, RoleName } from '@standardnotes/snjs' +import { FeaturesClientInterface, RevisionMetadata } from '@standardnotes/snjs' import { NoteHistoryController } from '@/Controllers/NoteHistory/NoteHistoryController' import Spinner from '@/Components/Spinner/Spinner' import { PremiumFeatureIconClass, PremiumFeatureIconName } from '../Icon/PremiumFeatureIcon' @@ -54,7 +54,7 @@ const RemoteHistoryList: FunctionComponent = ({ >

{previewHistoryEntryTitle(entry)}
- {!features.hasMinimumRole(entry.required_role as RoleName) && ( + {!features.hasMinimumRole(entry.required_role) && ( )}
diff --git a/packages/web/src/javascripts/Controllers/NoteHistory/NoteHistoryController.ts b/packages/web/src/javascripts/Controllers/NoteHistory/NoteHistoryController.ts index ec3c6d3bbfb..4616ce8629f 100644 --- a/packages/web/src/javascripts/Controllers/NoteHistory/NoteHistoryController.ts +++ b/packages/web/src/javascripts/Controllers/NoteHistory/NoteHistoryController.ts @@ -16,7 +16,6 @@ import { NoteHistoryEntry, PayloadEmitSource, RevisionMetadata, - RoleName, SNNote, } from '@standardnotes/snjs' import { makeObservable, observable, action } from 'mobx' @@ -120,7 +119,7 @@ export class NoteHistoryController { return } - if (!this.application.features.hasMinimumRole(entry.required_role as RoleName)) { + if (!this.application.features.hasMinimumRole(entry.required_role)) { this.setContentState(RevisionContentState.NotEntitled) this.setSelectedRevision(undefined) return diff --git a/packages/web/src/javascripts/Controllers/Subscription/SubscriptionController.ts b/packages/web/src/javascripts/Controllers/Subscription/SubscriptionController.ts index dbd14b8d874..4c26f5fe146 100644 --- a/packages/web/src/javascripts/Controllers/Subscription/SubscriptionController.ts +++ b/packages/web/src/javascripts/Controllers/Subscription/SubscriptionController.ts @@ -7,7 +7,6 @@ import { Invitation, InvitationStatus, SubscriptionClientInterface, - Uuid, } from '@standardnotes/snjs' import { action, computed, makeObservable, observable, runInAction } from 'mobx' import { WebApplication } from '../../Application/Application' @@ -157,7 +156,7 @@ export class SubscriptionController extends AbstractViewController { return success } - async cancelSubscriptionInvitation(invitationUuid: Uuid): Promise { + async cancelSubscriptionInvitation(invitationUuid: string): Promise { const success = await this.subscriptionManager.cancelInvitation(invitationUuid) if (success) { diff --git a/yarn.lock b/yarn.lock index 5e758e9ce90..47201be67d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4372,8 +4372,8 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/api@workspace:packages/api" dependencies: - "@standardnotes/common": ^1.45.0 - "@standardnotes/domain-core": ^1.11.0 + "@standardnotes/common": ^1.46.3 + "@standardnotes/domain-core": ^1.11.1 "@standardnotes/encryption": "workspace:*" "@standardnotes/models": "workspace:*" "@standardnotes/responses": "workspace:*" @@ -4494,7 +4494,7 @@ __metadata: languageName: node linkType: hard -"@standardnotes/common@npm:1.45.0, @standardnotes/common@npm:^1.45.0": +"@standardnotes/common@npm:1.45.0": version: 1.45.0 resolution: "@standardnotes/common@npm:1.45.0" dependencies: @@ -4512,6 +4512,15 @@ __metadata: languageName: node linkType: hard +"@standardnotes/common@npm:^1.46.3": + version: 1.46.3 + resolution: "@standardnotes/common@npm:1.46.3" + dependencies: + reflect-metadata: ^0.1.13 + checksum: 0fa509e30431a740ed142274c4f21ae03d74b6e05bcd4f028d89a3f1a6566de792bbd7c37b1b92587138dd6ea10459eead5a8cad2150f9f2268481615d390dee + languageName: node + linkType: hard + "@standardnotes/component-relay@github:standardnotes/component-relay#839ff5db9bc92db9d42cad8d202ddc4df729597d, @standardnotes/component-relay@standardnotes/component-relay#839ff5db9bc92db9d42cad8d202ddc4df729597d": version: 2.3.0 resolution: "@standardnotes/component-relay@https://github.com/standardnotes/component-relay.git#commit=839ff5db9bc92db9d42cad8d202ddc4df729597d" @@ -4586,14 +4595,14 @@ __metadata: languageName: unknown linkType: soft -"@standardnotes/domain-core@npm:^1.11.0": - version: 1.11.0 - resolution: "@standardnotes/domain-core@npm:1.11.0" +"@standardnotes/domain-core@npm:^1.11.1": + version: 1.11.1 + resolution: "@standardnotes/domain-core@npm:1.11.1" dependencies: reflect-metadata: ^0.1.13 shallow-equal-object: ^1.1.1 uuid: ^9.0.0 - checksum: cf4c9b7534338a8d5b8322a472621a2b2dde3cc3fe2d3c3c0eb12a3bdb7ba5f58bdfcc900338e5ba509311eeca6f163d95bffd46c40301532d974f397b57554e + checksum: 98af016a83bab8a60001bea9aa1c13607b2ecfff72bb901d709ac6b3d2c3d7f33e5e1289158c03d2a91ad5aa5afc586bfcc3efa3e0dda776ecddc10f3eb4eff9 languageName: node linkType: hard @@ -4641,7 +4650,7 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/encryption@workspace:packages/encryption" dependencies: - "@standardnotes/common": ^1.45.0 + "@standardnotes/common": ^1.46.3 "@standardnotes/config": 2.4.3 "@standardnotes/models": "workspace:*" "@standardnotes/responses": "workspace:*" @@ -4665,7 +4674,8 @@ __metadata: resolution: "@standardnotes/features@workspace:packages/features" dependencies: "@standardnotes/auth": ^3.19.4 - "@standardnotes/common": ^1.45.0 + "@standardnotes/common": ^1.46.3 + "@standardnotes/domain-core": ^1.11.1 "@standardnotes/security": ^1.7.0 "@types/jest": ^29.2.3 "@typescript-eslint/eslint-plugin": "*" @@ -4694,7 +4704,7 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/filepicker@workspace:packages/filepicker" dependencies: - "@standardnotes/common": ^1.45.0 + "@standardnotes/common": ^1.46.3 "@standardnotes/files": "workspace:*" "@standardnotes/utils": "workspace:*" "@types/jest": ^29.2.3 @@ -4714,7 +4724,7 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/files@workspace:packages/files" dependencies: - "@standardnotes/common": ^1.45.0 + "@standardnotes/common": ^1.46.3 "@standardnotes/encryption": "workspace:*" "@standardnotes/models": "workspace:*" "@standardnotes/responses": "workspace:*" @@ -4878,7 +4888,7 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/models@workspace:packages/models" dependencies: - "@standardnotes/common": ^1.45.0 + "@standardnotes/common": ^1.46.3 "@standardnotes/features": "workspace:*" "@standardnotes/responses": "workspace:*" "@standardnotes/utils": "workspace:*" @@ -4928,7 +4938,7 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/responses@workspace:packages/responses" dependencies: - "@standardnotes/common": ^1.45.0 + "@standardnotes/common": ^1.46.3 "@standardnotes/features": "workspace:*" "@standardnotes/security": ^1.7.0 "@types/jest": ^29.2.3 @@ -4979,8 +4989,8 @@ __metadata: dependencies: "@standardnotes/api": "workspace:^" "@standardnotes/auth": ^3.19.4 - "@standardnotes/common": ^1.45.0 - "@standardnotes/domain-core": ^1.11.0 + "@standardnotes/common": ^1.46.3 + "@standardnotes/domain-core": ^1.11.1 "@standardnotes/encryption": "workspace:^" "@standardnotes/files": "workspace:^" "@standardnotes/models": "workspace:^" @@ -5076,8 +5086,8 @@ __metadata: "@babel/core": "*" "@babel/preset-env": "*" "@standardnotes/api": "workspace:*" - "@standardnotes/common": ^1.45.0 - "@standardnotes/domain-core": ^1.11.0 + "@standardnotes/common": ^1.46.3 + "@standardnotes/domain-core": ^1.11.1 "@standardnotes/domain-events": ^2.88.0 "@standardnotes/encryption": "workspace:*" "@standardnotes/features": "workspace:*" @@ -5204,7 +5214,7 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/ui-services@workspace:packages/ui-services" dependencies: - "@standardnotes/common": ^1.45.0 + "@standardnotes/common": ^1.46.3 "@standardnotes/features": "workspace:^" "@standardnotes/filepicker": "workspace:^" "@standardnotes/services": "workspace:^" @@ -5226,7 +5236,7 @@ __metadata: version: 0.0.0-use.local resolution: "@standardnotes/utils@workspace:packages/utils" dependencies: - "@standardnotes/common": ^1.45.0 + "@standardnotes/common": ^1.46.3 "@types/dompurify": ^2.4.0 "@types/jest": ^29.2.3 "@types/jsdom": ^20.0.1