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 000000000..9bf1e154e Binary files /dev/null and b/.yarn/cache/@standardnotes-common-npm-1.46.3-a99a2b97e2-0fa509e304.zip differ diff --git a/.yarn/cache/@standardnotes-domain-core-npm-1.11.0-f473ba8bc0-cf4c9b7534.zip b/.yarn/cache/@standardnotes-domain-core-npm-1.11.1-c16df67772-98af016a83.zip similarity index 82% rename from .yarn/cache/@standardnotes-domain-core-npm-1.11.0-f473ba8bc0-cf4c9b7534.zip rename to .yarn/cache/@standardnotes-domain-core-npm-1.11.1-c16df67772-98af016a83.zip index b61ac92a5..9722b9c6c 100644 Binary files a/.yarn/cache/@standardnotes-domain-core-npm-1.11.0-f473ba8bc0-cf4c9b7534.zip and b/.yarn/cache/@standardnotes-domain-core-npm-1.11.1-c16df67772-98af016a83.zip differ diff --git a/packages/api/package.json b/packages/api/package.json index b02a9abdf..51aabd492 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 2ab8d6edb..81e754643 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 bfb76bea1..1f5df672d 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 81d4d2d19..fc8c17d46 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 92f9f02cd..af43c91e2 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 fed57f388..95be52d42 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 16fcb8e5d..bcad3c4e2 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 baebf9db6..4850c108e 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 c72da5b6b..2b4707b90 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 f00b6912c..b68f1b420 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 bd771f304..67968c404 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 4b82aeb68..21b77caca 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 9a7cda719..02214ba7b 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 4349e6708..8a7e89a8c 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 3f9cdced3..327a8d820 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 786c43203..ae3a64160 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 cef93740d..2381ca407 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 7c78bf3fb..3035233d0 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 57cbd340f..0e99172be 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 73cbca6cf..60783541e 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 00e735241..9c9252775 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 dde538580..c807713cd 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 d9495e22f..7f766f941 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 fb15cbc9d..242a0cb0f 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 c3094844a..3736a15c0 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 2b75da608..92fc43079 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 c05f303db..fb533e2f0 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 5d30abdd8..adafc6b05 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 ff404c96b..2a67eabd0 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 47b43d7ad..e7549c200 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 1b379c20a..5d65e64f5 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 cff26b623..4aa4ab17f 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 c809992e2..153f689b7 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 b192d60cc..d0a9bb208 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 4af25e323..a2b7ff1ec 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 2049fef86..42b11a081 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 e18ef5782..02a970c51 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 06a45bda7..ffb07bacb 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 9de4eadde..b3dd4d587 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 42a1c7b72..327478860 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 79e13c136..68ed08d10 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 d6087b83c..393cf7ac5 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 ce136a686..deb44e969 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 c484fb0bd..c6c649dc8 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 da52b7e96..b74acee89 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 28bde92c7..0ce47b371 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 73bf6a4d0..42d65a0be 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 5ab28a1a5..7b1afd1da 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 517475e01..d409f40b6 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 8a553d3d4..ee5868afc 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 81bbabe9c..2662b493b 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 571098a9c..273b15cfc 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 feb607fc7..9727c4561 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 826415f80..dcfc808d1 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 7383e2c55..509f28bc9 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 9e6787e42..5d7ee4bba 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 2a0e6f050..f4a5a34b6 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 4c6c693a3..380280cbc 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 13092e2ca..6364eb768 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 edce5103f..025180138 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 0c06d83d7..ca45fc34c 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 3c441cbda..6b86b4cda 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 61edb11f4..e21278419 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 c7f173471..f22e0d3eb 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 14ee3b7f1..7d6a27cdc 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 41c191f17..98c4e1e9e 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 598f61838..24c71ba01 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 16d113eef..2ab240e14 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 e4332be4f..ad19279a8 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 12a05fd63..6aa874680 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 39ddd8bdc..21db88300 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 39957b281..27e7d0ce0 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 973d69902..80b06cb37 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 de20c323c..05b1872c3 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 0c08d213d..11d3dec01 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 c74171161..40a2a4199 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 fca97be4a..8f363694d 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 65fd1283f..60b60e9e0 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 07f273ac6..96a8fe3e8 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 e6beb7495..8f6f7e788 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 c5dfbb6c5..dc57038bf 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 b2592c9b3..eee33c739 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 2da7f193a..62cc56f01 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 d7b086cf0..6ab84667b 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 ddcb4f447..6fea67bc5 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 4a01cb0d9..25bb88581 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 d3821b4a6..92d8f264a 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 f19e26232..1888c3382 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 adb275484..e0d2f590c 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 979f70ea9..90052a5d6 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 cd753e43a..83cc4fb78 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 fa027e202..9f819127d 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 0ea6d8c54..734649b14 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 bcd58586e..917ae4eed 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 d10d8f6b5..36c906f8f 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 4b00a5bc2..7ce497bca 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 ec3c6d3bb..4616ce862 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 dbd14b8d8..4c26f5fe1 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 5e758e9ce..47201be67 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