Merge branch 'main' of github.com:standardnotes/app
This commit is contained in:
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/@standardnotes-domain-events-npm-2.106.0-e3526437e9-db98a6b4ef.zip
vendored
Normal file
BIN
.yarn/cache/@standardnotes-domain-events-npm-2.106.0-e3526437e9-db98a6b4ef.zip
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
.yarn/cache/jsonwebtoken-npm-9.0.0-36fd1594c0-b9181cecf9.zip
vendored
Normal file
BIN
.yarn/cache/jsonwebtoken-npm-9.0.0-36fd1594c0-b9181cecf9.zip
vendored
Normal file
Binary file not shown.
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.24.6](https://github.com/standardnotes/app/compare/@standardnotes/api@1.24.5...@standardnotes/api@1.24.6) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/api
|
||||||
|
|
||||||
|
## [1.24.5](https://github.com/standardnotes/app/compare/@standardnotes/api@1.24.4...@standardnotes/api@1.24.5) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/api
|
||||||
|
|
||||||
|
## [1.24.4](https://github.com/standardnotes/app/compare/@standardnotes/api@1.24.3...@standardnotes/api@1.24.4) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/api
|
||||||
|
|
||||||
|
## [1.24.3](https://github.com/standardnotes/app/compare/@standardnotes/api@1.24.2...@standardnotes/api@1.24.3) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/api
|
||||||
|
|
||||||
|
## [1.24.2](https://github.com/standardnotes/app/compare/@standardnotes/api@1.24.1...@standardnotes/api@1.24.2) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/api
|
||||||
|
|
||||||
|
## [1.24.1](https://github.com/standardnotes/app/compare/@standardnotes/api@1.24.0...@standardnotes/api@1.24.1) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/api
|
||||||
|
|
||||||
# [1.24.0](https://github.com/standardnotes/app/compare/@standardnotes/api@1.23.2...@standardnotes/api@1.24.0) (2023-01-18)
|
# [1.24.0](https://github.com/standardnotes/app/compare/@standardnotes/api@1.23.2...@standardnotes/api@1.24.0) (2023-01-18)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/api",
|
"name": "@standardnotes/api",
|
||||||
"version": "1.24.0",
|
"version": "1.24.6",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0 <17.0.0"
|
"node": ">=16.0.0 <17.0.0"
|
||||||
},
|
},
|
||||||
@@ -36,12 +36,12 @@
|
|||||||
"typescript": "*"
|
"typescript": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/common": "^1.45.0",
|
"@standardnotes/common": "^1.46.4",
|
||||||
"@standardnotes/domain-core": "^1.11.0",
|
"@standardnotes/domain-core": "^1.11.1",
|
||||||
"@standardnotes/encryption": "workspace:*",
|
"@standardnotes/encryption": "workspace:*",
|
||||||
"@standardnotes/models": "workspace:*",
|
"@standardnotes/models": "workspace:*",
|
||||||
"@standardnotes/responses": "workspace:*",
|
"@standardnotes/responses": "workspace:*",
|
||||||
"@standardnotes/security": "^1.7.0",
|
"@standardnotes/security": "^1.7.5",
|
||||||
"@standardnotes/utils": "workspace:*",
|
"@standardnotes/utils": "workspace:*",
|
||||||
"reflect-metadata": "^0.1.13"
|
"reflect-metadata": "^0.1.13"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { SubscriptionInviteAcceptResponse } from '../../Response/Subscription/Su
|
|||||||
|
|
||||||
import { SubscriptionApiServiceInterface } from './SubscriptionApiServiceInterface'
|
import { SubscriptionApiServiceInterface } from './SubscriptionApiServiceInterface'
|
||||||
import { SubscriptionApiOperations } from './SubscriptionApiOperations'
|
import { SubscriptionApiOperations } from './SubscriptionApiOperations'
|
||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { AppleIAPConfirmResponse } from './../../Response/Subscription/AppleIAPConfirmResponse'
|
import { AppleIAPConfirmResponse } from './../../Response/Subscription/AppleIAPConfirmResponse'
|
||||||
import { AppleIAPConfirmRequestParams } from '../../Request'
|
import { AppleIAPConfirmRequestParams } from '../../Request'
|
||||||
|
|
||||||
@@ -83,7 +82,7 @@ export class SubscriptionApiService implements SubscriptionApiServiceInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async acceptInvite(inviteUuid: Uuid): Promise<SubscriptionInviteAcceptResponse> {
|
async acceptInvite(inviteUuid: string): Promise<SubscriptionInviteAcceptResponse> {
|
||||||
if (this.operationsInProgress.get(SubscriptionApiOperations.AcceptingInvite)) {
|
if (this.operationsInProgress.get(SubscriptionApiOperations.AcceptingInvite)) {
|
||||||
throw new ApiCallError(ErrorMessage.GenericInProgress)
|
throw new ApiCallError(ErrorMessage.GenericInProgress)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
import { AppleIAPConfirmResponse } from './../../Response/Subscription/AppleIAPConfirmResponse'
|
import { AppleIAPConfirmResponse } from './../../Response/Subscription/AppleIAPConfirmResponse'
|
||||||
import { AppleIAPConfirmRequestParams } from '../../Request'
|
import { AppleIAPConfirmRequestParams } from '../../Request'
|
||||||
import { SubscriptionInviteAcceptResponse } from '../../Response/Subscription/SubscriptionInviteAcceptResponse'
|
import { SubscriptionInviteAcceptResponse } from '../../Response/Subscription/SubscriptionInviteAcceptResponse'
|
||||||
@@ -10,7 +8,7 @@ import { SubscriptionInviteResponse } from '../../Response/Subscription/Subscrip
|
|||||||
export interface SubscriptionApiServiceInterface {
|
export interface SubscriptionApiServiceInterface {
|
||||||
invite(inviteeEmail: string): Promise<SubscriptionInviteResponse>
|
invite(inviteeEmail: string): Promise<SubscriptionInviteResponse>
|
||||||
listInvites(): Promise<SubscriptionInviteListResponse>
|
listInvites(): Promise<SubscriptionInviteListResponse>
|
||||||
cancelInvite(inviteUuid: Uuid): Promise<SubscriptionInviteCancelResponse>
|
cancelInvite(inviteUuid: string): Promise<SubscriptionInviteCancelResponse>
|
||||||
acceptInvite(inviteUuid: Uuid): Promise<SubscriptionInviteAcceptResponse>
|
acceptInvite(inviteUuid: string): Promise<SubscriptionInviteAcceptResponse>
|
||||||
confirmAppleIAP(params: AppleIAPConfirmRequestParams): Promise<AppleIAPConfirmResponse>
|
confirmAppleIAP(params: AppleIAPConfirmRequestParams): Promise<AppleIAPConfirmResponse>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { UserRequestType, Uuid } from '@standardnotes/common'
|
import { UserRequestType } from '@standardnotes/common'
|
||||||
import { type RootKeyParamsInterface } from '@standardnotes/models'
|
import { type RootKeyParamsInterface } from '@standardnotes/models'
|
||||||
|
|
||||||
import { UserDeletionResponse } from '../../Response/User/UserDeletionResponse'
|
import { UserDeletionResponse } from '../../Response/User/UserDeletionResponse'
|
||||||
@@ -12,6 +12,6 @@ export interface UserApiServiceInterface {
|
|||||||
keyParams: RootKeyParamsInterface
|
keyParams: RootKeyParamsInterface
|
||||||
ephemeral: boolean
|
ephemeral: boolean
|
||||||
}): Promise<UserRegistrationResponse>
|
}): Promise<UserRegistrationResponse>
|
||||||
submitUserRequest(dto: { userUuid: Uuid; requestType: UserRequestType }): Promise<UserRequestResponse>
|
submitUserRequest(dto: { userUuid: string; requestType: UserRequestType }): Promise<UserRequestResponse>
|
||||||
deleteAccount(userUuid: string): Promise<UserDeletionResponse>
|
deleteAccount(userUuid: string): Promise<UserDeletionResponse>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Uuid, WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common'
|
import { WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common'
|
||||||
|
|
||||||
import { ErrorMessage } from '../../Error/ErrorMessage'
|
import { ErrorMessage } from '../../Error/ErrorMessage'
|
||||||
import { ApiCallError } from '../../Error/ApiCallError'
|
import { ApiCallError } from '../../Error/ApiCallError'
|
||||||
@@ -96,7 +96,7 @@ export class WorkspaceApiService implements WorkspaceApiServiceInterface {
|
|||||||
|
|
||||||
async inviteToWorkspace(dto: {
|
async inviteToWorkspace(dto: {
|
||||||
inviteeEmail: string
|
inviteeEmail: string
|
||||||
workspaceUuid: Uuid
|
workspaceUuid: string
|
||||||
accessLevel: WorkspaceAccessLevel
|
accessLevel: WorkspaceAccessLevel
|
||||||
}): Promise<WorkspaceInvitationResponse> {
|
}): Promise<WorkspaceInvitationResponse> {
|
||||||
this.lockOperation(WorkspaceApiOperations.Inviting)
|
this.lockOperation(WorkspaceApiOperations.Inviting)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Uuid, WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common'
|
import { WorkspaceAccessLevel, WorkspaceType } from '@standardnotes/common'
|
||||||
|
|
||||||
import { WorkspaceKeyshareInitiatingResponse } from '../../Response/Workspace/WorkspaceKeyshareInitiatingResponse'
|
import { WorkspaceKeyshareInitiatingResponse } from '../../Response/Workspace/WorkspaceKeyshareInitiatingResponse'
|
||||||
import { WorkspaceCreationResponse } from '../../Response/Workspace/WorkspaceCreationResponse'
|
import { WorkspaceCreationResponse } from '../../Response/Workspace/WorkspaceCreationResponse'
|
||||||
@@ -17,20 +17,20 @@ export interface WorkspaceApiServiceInterface {
|
|||||||
}): Promise<WorkspaceCreationResponse>
|
}): Promise<WorkspaceCreationResponse>
|
||||||
inviteToWorkspace(dto: {
|
inviteToWorkspace(dto: {
|
||||||
inviteeEmail: string
|
inviteeEmail: string
|
||||||
workspaceUuid: Uuid
|
workspaceUuid: string
|
||||||
accessLevel: WorkspaceAccessLevel
|
accessLevel: WorkspaceAccessLevel
|
||||||
}): Promise<WorkspaceInvitationResponse>
|
}): Promise<WorkspaceInvitationResponse>
|
||||||
acceptInvite(dto: {
|
acceptInvite(dto: {
|
||||||
inviteUuid: Uuid
|
inviteUuid: string
|
||||||
userUuid: Uuid
|
userUuid: string
|
||||||
publicKey: string
|
publicKey: string
|
||||||
encryptedPrivateKey: string
|
encryptedPrivateKey: string
|
||||||
}): Promise<WorkspaceInvitationAcceptingResponse>
|
}): Promise<WorkspaceInvitationAcceptingResponse>
|
||||||
listWorkspaces(): Promise<WorkspaceListResponse>
|
listWorkspaces(): Promise<WorkspaceListResponse>
|
||||||
listWorkspaceUsers(dto: { workspaceUuid: Uuid }): Promise<WorkspaceUserListResponse>
|
listWorkspaceUsers(dto: { workspaceUuid: string }): Promise<WorkspaceUserListResponse>
|
||||||
initiateKeyshare(dto: {
|
initiateKeyshare(dto: {
|
||||||
workspaceUuid: Uuid
|
workspaceUuid: string
|
||||||
userUuid: Uuid
|
userUuid: string
|
||||||
encryptedWorkspaceKey: string
|
encryptedWorkspaceKey: string
|
||||||
}): Promise<WorkspaceKeyshareInitiatingResponse>
|
}): Promise<WorkspaceKeyshareInitiatingResponse>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Uuid, WorkspaceAccessLevel, WorkspaceUserStatus } from '@standardnotes/common'
|
import { WorkspaceAccessLevel, WorkspaceUserStatus } from '@standardnotes/common'
|
||||||
|
|
||||||
export type WorkspaceUser = {
|
export type WorkspaceUser = {
|
||||||
uuid: Uuid
|
uuid: string
|
||||||
accessLevel: WorkspaceAccessLevel
|
accessLevel: WorkspaceAccessLevel
|
||||||
userUuid: Uuid
|
userUuid: string
|
||||||
userDisplayName: string | null
|
userDisplayName: string | null
|
||||||
workspaceUuid: Uuid
|
workspaceUuid: string
|
||||||
encryptedWorkspaceKey: string | null
|
encryptedWorkspaceKey: string | null
|
||||||
publicKey: string | null
|
publicKey: string | null
|
||||||
encryptedPrivateKey: string | null
|
encryptedPrivateKey: string | null
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { Role } from '@standardnotes/security'
|
import { Role } from '@standardnotes/security'
|
||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
export type HttpResponseMeta = {
|
export type HttpResponseMeta = {
|
||||||
auth: {
|
auth: {
|
||||||
userUuid?: Uuid
|
userUuid?: string
|
||||||
roles?: Role[]
|
roles?: Role[]
|
||||||
}
|
}
|
||||||
server: {
|
server: {
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
export type SubscriptionInviteAcceptRequestParams = {
|
export type SubscriptionInviteAcceptRequestParams = {
|
||||||
inviteUuid: Uuid
|
inviteUuid: string
|
||||||
[additionalParam: string]: unknown
|
[additionalParam: string]: unknown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
import { ApiEndpointParam } from '../ApiEndpointParam'
|
import { ApiEndpointParam } from '../ApiEndpointParam'
|
||||||
import { ApiVersion } from '../../Api/ApiVersion'
|
import { ApiVersion } from '../../Api/ApiVersion'
|
||||||
|
|
||||||
export type SubscriptionInviteCancelRequestParams = {
|
export type SubscriptionInviteCancelRequestParams = {
|
||||||
[ApiEndpointParam.ApiVersion]: ApiVersion.v0
|
[ApiEndpointParam.ApiVersion]: ApiVersion.v0
|
||||||
inviteUuid: Uuid
|
inviteUuid: string
|
||||||
[additionalParam: string]: unknown
|
[additionalParam: string]: unknown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
import { ApiEndpointParam } from '../ApiEndpointParam'
|
import { ApiEndpointParam } from '../ApiEndpointParam'
|
||||||
import { ApiVersion } from '../../Api/ApiVersion'
|
import { ApiVersion } from '../../Api/ApiVersion'
|
||||||
|
|
||||||
export type SubscriptionInviteDeclineRequestParams = {
|
export type SubscriptionInviteDeclineRequestParams = {
|
||||||
[ApiEndpointParam.ApiVersion]: ApiVersion.v0
|
[ApiEndpointParam.ApiVersion]: ApiVersion.v0
|
||||||
inviteUuid: Uuid
|
inviteUuid: string
|
||||||
[additionalParam: string]: unknown
|
[additionalParam: string]: unknown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
export type UserDeletionRequestParams = {
|
export type UserDeletionRequestParams = {
|
||||||
userUuid: Uuid
|
userUuid: string
|
||||||
[additionalParam: string]: unknown
|
[additionalParam: string]: unknown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { UserRequestType, Uuid } from '@standardnotes/common'
|
import { UserRequestType } from '@standardnotes/common'
|
||||||
|
|
||||||
export type UserRequestRequestParams = {
|
export type UserRequestRequestParams = {
|
||||||
userUuid: Uuid
|
userUuid: string
|
||||||
requestType: UserRequestType
|
requestType: UserRequestType
|
||||||
[additionalParam: string]: unknown
|
[additionalParam: string]: unknown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
export type WorkspaceInvitationAcceptingRequestParams = {
|
export type WorkspaceInvitationAcceptingRequestParams = {
|
||||||
inviteUuid: Uuid
|
inviteUuid: string
|
||||||
userUuid: Uuid
|
userUuid: string
|
||||||
publicKey: string
|
publicKey: string
|
||||||
encryptedPrivateKey: string
|
encryptedPrivateKey: string
|
||||||
[additionalParam: string]: unknown
|
[additionalParam: string]: unknown
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Uuid, WorkspaceAccessLevel } from '@standardnotes/common'
|
import { WorkspaceAccessLevel } from '@standardnotes/common'
|
||||||
|
|
||||||
export type WorkspaceInvitationRequestParams = {
|
export type WorkspaceInvitationRequestParams = {
|
||||||
workspaceUuid: Uuid
|
workspaceUuid: string
|
||||||
inviteeEmail: string
|
inviteeEmail: string
|
||||||
accessLevel: WorkspaceAccessLevel
|
accessLevel: WorkspaceAccessLevel
|
||||||
[additionalParam: string]: unknown
|
[additionalParam: string]: unknown
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
export type WorkspaceKeyshareInitiatingRequestParams = {
|
export type WorkspaceKeyshareInitiatingRequestParams = {
|
||||||
userUuid: Uuid
|
userUuid: string
|
||||||
workspaceUuid: Uuid
|
workspaceUuid: string
|
||||||
encryptedWorkspaceKey: string
|
encryptedWorkspaceKey: string
|
||||||
[additionalParam: string]: unknown
|
[additionalParam: string]: unknown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
export type WorkspaceUserListRequestParams = {
|
export type WorkspaceUserListRequestParams = {
|
||||||
workspaceUuid: Uuid
|
workspaceUuid: string
|
||||||
[additionalParam: string]: unknown
|
[additionalParam: string]: unknown
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
export type SubscriptionInviteResponseBody =
|
export type SubscriptionInviteResponseBody =
|
||||||
| {
|
| {
|
||||||
success: true
|
success: true
|
||||||
sharedSubscriptionInvitationUuid: Uuid
|
sharedSubscriptionInvitationUuid: string
|
||||||
}
|
}
|
||||||
| {
|
| {
|
||||||
success: false
|
success: false
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { KeyParamsData, SessionBody } from '@standardnotes/responses'
|
import { KeyParamsData, SessionBody } from '@standardnotes/responses'
|
||||||
|
|
||||||
export type UserRegistrationResponseBody = {
|
export type UserRegistrationResponseBody = {
|
||||||
session: SessionBody
|
session: SessionBody
|
||||||
key_params: KeyParamsData
|
key_params: KeyParamsData
|
||||||
user: {
|
user: {
|
||||||
uuid: Uuid
|
uuid: string
|
||||||
email: string
|
email: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
const SharingPaths = {
|
const SharingPaths = {
|
||||||
invite: '/v1/subscription-invites',
|
invite: '/v1/subscription-invites',
|
||||||
acceptInvite: (inviteUuid: Uuid) => `/v1/subscription-invites/${inviteUuid}/accept`,
|
acceptInvite: (inviteUuid: string) => `/v1/subscription-invites/${inviteUuid}/accept`,
|
||||||
declineInvite: (inviteUuid: Uuid) => `/v1/subscription-invites/${inviteUuid}/decline`,
|
declineInvite: (inviteUuid: string) => `/v1/subscription-invites/${inviteUuid}/decline`,
|
||||||
cancelInvite: (inviteUuid: Uuid) => `/v1/subscription-invites/${inviteUuid}`,
|
cancelInvite: (inviteUuid: string) => `/v1/subscription-invites/${inviteUuid}`,
|
||||||
listInvites: '/v1/subscription-invites',
|
listInvites: '/v1/subscription-invites',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
const UserPaths = {
|
const UserPaths = {
|
||||||
register: '/v1/users',
|
register: '/v1/users',
|
||||||
deleteAccount: (userUuid: Uuid) => `/v1/users/${userUuid}`,
|
deleteAccount: (userUuid: string) => `/v1/users/${userUuid}`,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Paths = {
|
export const Paths = {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
const UserRequestPaths = {
|
const UserRequestPaths = {
|
||||||
submitUserRequest: (userUuid: Uuid) => `/v1/users/${userUuid}/requests`,
|
submitUserRequest: (userUuid: string) => `/v1/users/${userUuid}/requests`,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Paths = {
|
export const Paths = {
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
const WorkspacePaths = {
|
const WorkspacePaths = {
|
||||||
createWorkspace: '/v1/workspaces',
|
createWorkspace: '/v1/workspaces',
|
||||||
listWorkspaces: '/v1/workspaces',
|
listWorkspaces: '/v1/workspaces',
|
||||||
listWorkspaceUsers: (uuid: Uuid) => `/v1/workspaces/${uuid}/users`,
|
listWorkspaceUsers: (uuid: string) => `/v1/workspaces/${uuid}/users`,
|
||||||
initiateKeyshare: (worksapceUuid: Uuid, userUuid: Uuid) =>
|
initiateKeyshare: (worksapceUuid: string, userUuid: string) =>
|
||||||
`/v1/workspaces/${worksapceUuid}/users/${userUuid}/keyshare`,
|
`/v1/workspaces/${worksapceUuid}/users/${userUuid}/keyshare`,
|
||||||
inviteToWorkspace: (uuid: Uuid) => `/v1/workspaces/${uuid}/invites`,
|
inviteToWorkspace: (uuid: string) => `/v1/workspaces/${uuid}/invites`,
|
||||||
acceptInvite: (uuid: Uuid) => `/v1/invites/${uuid}/accept`,
|
acceptInvite: (uuid: string) => `/v1/invites/${uuid}/accept`,
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Paths = {
|
export const Paths = {
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [3.104.100](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.140.6...@standardnotes/desktop@3.104.100) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/desktop
|
||||||
|
|
||||||
|
## [3.104.99](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.140.5...@standardnotes/desktop@3.104.99) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/desktop
|
||||||
|
|
||||||
|
## [3.104.98](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.140.4...@standardnotes/desktop@3.104.98) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/desktop
|
||||||
|
|
||||||
|
## [3.104.97](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.140.3...@standardnotes/desktop@3.104.97) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/desktop
|
||||||
|
|
||||||
|
## [3.104.96](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.140.2...@standardnotes/desktop@3.104.96) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/desktop
|
||||||
|
|
||||||
|
## [3.104.95](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.140.1...@standardnotes/desktop@3.104.95) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/desktop
|
||||||
|
|
||||||
|
## [3.104.94](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.140.0...@standardnotes/desktop@3.104.94) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/desktop
|
||||||
|
|
||||||
## [3.104.93](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.139.0...@standardnotes/desktop@3.104.93) (2023-01-18)
|
## [3.104.93](https://github.com/standardnotes/app/compare/@standardnotes/desktop@3.139.0...@standardnotes/desktop@3.104.93) (2023-01-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/desktop
|
**Note:** Version bump only for package @standardnotes/desktop
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/desktop",
|
"name": "@standardnotes/desktop",
|
||||||
"main": "./app/dist/index.js",
|
"main": "./app/dist/index.js",
|
||||||
"version": "3.104.93",
|
"version": "3.104.100",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"author": "Standard Notes.",
|
"author": "Standard Notes.",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.21.6](https://github.com/standardnotes/app/compare/@standardnotes/encryption@1.21.5...@standardnotes/encryption@1.21.6) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/encryption
|
||||||
|
|
||||||
|
## [1.21.5](https://github.com/standardnotes/app/compare/@standardnotes/encryption@1.21.4...@standardnotes/encryption@1.21.5) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/encryption
|
||||||
|
|
||||||
|
## [1.21.4](https://github.com/standardnotes/app/compare/@standardnotes/encryption@1.21.3...@standardnotes/encryption@1.21.4) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/encryption
|
||||||
|
|
||||||
|
## [1.21.3](https://github.com/standardnotes/app/compare/@standardnotes/encryption@1.21.2...@standardnotes/encryption@1.21.3) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/encryption
|
||||||
|
|
||||||
|
## [1.21.2](https://github.com/standardnotes/app/compare/@standardnotes/encryption@1.21.1...@standardnotes/encryption@1.21.2) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/encryption
|
||||||
|
|
||||||
|
## [1.21.1](https://github.com/standardnotes/app/compare/@standardnotes/encryption@1.21.0...@standardnotes/encryption@1.21.1) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/encryption
|
||||||
|
|
||||||
# [1.21.0](https://github.com/standardnotes/app/compare/@standardnotes/encryption@1.20.1...@standardnotes/encryption@1.21.0) (2023-01-18)
|
# [1.21.0](https://github.com/standardnotes/app/compare/@standardnotes/encryption@1.20.1...@standardnotes/encryption@1.21.0) (2023-01-18)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/encryption",
|
"name": "@standardnotes/encryption",
|
||||||
"version": "1.21.0",
|
"version": "1.21.6",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0 <17.0.0"
|
"node": ">=16.0.0 <17.0.0"
|
||||||
},
|
},
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
"typescript": "*"
|
"typescript": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/common": "^1.45.0",
|
"@standardnotes/common": "^1.46.4",
|
||||||
"@standardnotes/models": "workspace:*",
|
"@standardnotes/models": "workspace:*",
|
||||||
"@standardnotes/responses": "workspace:*",
|
"@standardnotes/responses": "workspace:*",
|
||||||
"@standardnotes/sncrypto-common": "workspace:*",
|
"@standardnotes/sncrypto-common": "workspace:*",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { DecryptedPayloadInterface, EncryptedPayloadInterface, PayloadInterface } from '@standardnotes/models'
|
import { DecryptedPayloadInterface, EncryptedPayloadInterface, PayloadInterface } from '@standardnotes/models'
|
||||||
import { EncryptionTypeSplit } from './EncryptionTypeSplit'
|
import { EncryptionTypeSplit } from './EncryptionTypeSplit'
|
||||||
import { KeyedDecryptionSplit } from './KeyedDecryptionSplit'
|
import { KeyedDecryptionSplit } from './KeyedDecryptionSplit'
|
||||||
@@ -36,7 +35,7 @@ export function CreateDecryptionSplitWithKeyLookup(
|
|||||||
return result
|
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)
|
const inUsesItemsKey = split.usesItemsKey?.items.find((item: PayloadInterface) => item.uuid === uuid)
|
||||||
if (inUsesItemsKey) {
|
if (inUsesItemsKey) {
|
||||||
return inUsesItemsKey
|
return inUsesItemsKey
|
||||||
@@ -60,7 +59,7 @@ export function FindPayloadInEncryptionSplit(uuid: Uuid, split: KeyedEncryptionS
|
|||||||
throw Error('Cannot find payload in encryption split')
|
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)
|
const inUsesItemsKey = split.usesItemsKey?.items.find((item: PayloadInterface) => item.uuid === uuid)
|
||||||
if (inUsesItemsKey) {
|
if (inUsesItemsKey) {
|
||||||
return inUsesItemsKey
|
return inUsesItemsKey
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ProtocolVersion, Uuid } from '@standardnotes/common'
|
import { ProtocolVersion } from '@standardnotes/common'
|
||||||
|
|
||||||
export type ItemAuthenticatedData = {
|
export type ItemAuthenticatedData = {
|
||||||
u: Uuid
|
u: string
|
||||||
v: ProtocolVersion
|
v: ProtocolVersion
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,28 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.58.5](https://github.com/standardnotes/app/compare/@standardnotes/features@1.58.4...@standardnotes/features@1.58.5) (2023-01-20)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fixed issue with third party editors not loading ([#2174](https://github.com/standardnotes/app/issues/2174)) ([e7214ea](https://github.com/standardnotes/app/commit/e7214ea73ad5d3026d958c79022d2238a4d1cfdc))
|
||||||
|
|
||||||
|
## [1.58.4](https://github.com/standardnotes/app/compare/@standardnotes/features@1.58.3...@standardnotes/features@1.58.4) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/features
|
||||||
|
|
||||||
|
## [1.58.3](https://github.com/standardnotes/app/compare/@standardnotes/features@1.58.2...@standardnotes/features@1.58.3) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/features
|
||||||
|
|
||||||
|
## [1.58.2](https://github.com/standardnotes/app/compare/@standardnotes/features@1.58.1...@standardnotes/features@1.58.2) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/features
|
||||||
|
|
||||||
|
## [1.58.1](https://github.com/standardnotes/app/compare/@standardnotes/features@1.58.0...@standardnotes/features@1.58.1) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/features
|
||||||
|
|
||||||
# [1.58.0](https://github.com/standardnotes/app/compare/@standardnotes/features@1.57.1...@standardnotes/features@1.58.0) (2023-01-06)
|
# [1.58.0](https://github.com/standardnotes/app/compare/@standardnotes/features@1.57.1...@standardnotes/features@1.58.0) (2023-01-06)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/features",
|
"name": "@standardnotes/features",
|
||||||
"version": "1.58.0",
|
"version": "1.58.5",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0 <17.0.0"
|
"node": ">=16.0.0 <17.0.0"
|
||||||
},
|
},
|
||||||
@@ -25,9 +25,9 @@
|
|||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/auth": "^3.19.4",
|
"@standardnotes/common": "^1.46.4",
|
||||||
"@standardnotes/common": "^1.45.0",
|
"@standardnotes/domain-core": "^1.11.1",
|
||||||
"@standardnotes/security": "^1.7.0",
|
"@standardnotes/security": "^1.7.5",
|
||||||
"reflect-metadata": "^0.1.13"
|
"reflect-metadata": "^0.1.13"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ describe('note type', () => {
|
|||||||
it('should return the correct note type for editor identifier', () => {
|
it('should return the correct note type for editor identifier', () => {
|
||||||
expect(noteTypeForEditorIdentifier(FeatureIdentifier.PlainEditor)).toEqual(NoteType.Plain)
|
expect(noteTypeForEditorIdentifier(FeatureIdentifier.PlainEditor)).toEqual(NoteType.Plain)
|
||||||
expect(noteTypeForEditorIdentifier(FeatureIdentifier.SuperEditor)).toEqual(NoteType.Super)
|
expect(noteTypeForEditorIdentifier(FeatureIdentifier.SuperEditor)).toEqual(NoteType.Super)
|
||||||
expect(noteTypeForEditorIdentifier(FeatureIdentifier.MarkdownVisualEditor)).toEqual(NoteType.Markdown)
|
|
||||||
expect(noteTypeForEditorIdentifier(FeatureIdentifier.MarkdownProEditor)).toEqual(NoteType.Markdown)
|
expect(noteTypeForEditorIdentifier(FeatureIdentifier.MarkdownProEditor)).toEqual(NoteType.Markdown)
|
||||||
expect(noteTypeForEditorIdentifier(FeatureIdentifier.PlusEditor)).toEqual(NoteType.RichText)
|
expect(noteTypeForEditorIdentifier(FeatureIdentifier.PlusEditor)).toEqual(NoteType.RichText)
|
||||||
expect(noteTypeForEditorIdentifier(FeatureIdentifier.CodeEditor)).toEqual(NoteType.Code)
|
expect(noteTypeForEditorIdentifier(FeatureIdentifier.CodeEditor)).toEqual(NoteType.Code)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ComponentPermission } from '../Component/ComponentPermission'
|
import { ComponentPermission } from '../Component/ComponentPermission'
|
||||||
import { ContentType, RoleName, SubscriptionName } from '@standardnotes/common'
|
import { ContentType, SubscriptionName } from '@standardnotes/common'
|
||||||
import { ComponentArea } from '../Component/ComponentArea'
|
import { ComponentArea } from '../Component/ComponentArea'
|
||||||
import { PermissionName } from '../Permission/PermissionName'
|
import { PermissionName } from '../Permission/PermissionName'
|
||||||
import { FeatureIdentifier } from './FeatureIdentifier'
|
import { FeatureIdentifier } from './FeatureIdentifier'
|
||||||
@@ -9,11 +9,11 @@ import { ThemeDockIcon } from '../Component/ThemeDockIcon'
|
|||||||
|
|
||||||
type RoleFields = {
|
type RoleFields = {
|
||||||
/** Server populated */
|
/** Server populated */
|
||||||
role_name?: RoleName
|
role_name?: string
|
||||||
|
|
||||||
/** Statically populated. Non-influencing; used as a reference by other static consumers (such as email service) */
|
/** Statically populated. Non-influencing; used as a reference by other static consumers (such as email service) */
|
||||||
availableInSubscriptions: SubscriptionName[]
|
availableInSubscriptions: SubscriptionName[]
|
||||||
availableInRoles?: RoleName[]
|
availableInRoles?: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BaseFeatureDescription = RoleFields & {
|
export type BaseFeatureDescription = RoleFields & {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
export enum FeatureIdentifier {
|
export enum FeatureIdentifier {
|
||||||
AccountSwitcher = 'com.standardnotes.account-switcher',
|
|
||||||
CloudLink = 'org.standardnotes.cloudlink',
|
CloudLink = 'org.standardnotes.cloudlink',
|
||||||
DailyDropboxBackup = 'org.standardnotes.daily-dropbox-backup',
|
DailyDropboxBackup = 'org.standardnotes.daily-dropbox-backup',
|
||||||
DailyEmailBackup = 'org.standardnotes.daily-email-backup',
|
DailyEmailBackup = 'org.standardnotes.daily-email-backup',
|
||||||
@@ -21,7 +20,6 @@ export enum FeatureIdentifier {
|
|||||||
AutobiographyTheme = 'org.standardnotes.theme-autobiography',
|
AutobiographyTheme = 'org.standardnotes.theme-autobiography',
|
||||||
DynamicTheme = 'org.standardnotes.theme-dynamic',
|
DynamicTheme = 'org.standardnotes.theme-dynamic',
|
||||||
DarkTheme = 'org.standardnotes.theme-focus',
|
DarkTheme = 'org.standardnotes.theme-focus',
|
||||||
FocusMode = 'org.standardnotes.focus-mode',
|
|
||||||
FuturaTheme = 'org.standardnotes.theme-futura',
|
FuturaTheme = 'org.standardnotes.theme-futura',
|
||||||
MidnightTheme = 'org.standardnotes.theme-midnight',
|
MidnightTheme = 'org.standardnotes.theme-midnight',
|
||||||
SolarizedDarkTheme = 'org.standardnotes.theme-solarized-dark',
|
SolarizedDarkTheme = 'org.standardnotes.theme-solarized-dark',
|
||||||
@@ -32,12 +30,12 @@ export enum FeatureIdentifier {
|
|||||||
|
|
||||||
CodeEditor = 'org.standardnotes.code-editor',
|
CodeEditor = 'org.standardnotes.code-editor',
|
||||||
MarkdownProEditor = 'org.standardnotes.advanced-markdown-editor',
|
MarkdownProEditor = 'org.standardnotes.advanced-markdown-editor',
|
||||||
MarkdownVisualEditor = 'org.standardnotes.markdown-visual-editor',
|
|
||||||
PlusEditor = 'org.standardnotes.plus-editor',
|
PlusEditor = 'org.standardnotes.plus-editor',
|
||||||
SheetsEditor = 'org.standardnotes.standard-sheets',
|
SheetsEditor = 'org.standardnotes.standard-sheets',
|
||||||
TaskEditor = 'org.standardnotes.simple-task-editor',
|
TaskEditor = 'org.standardnotes.simple-task-editor',
|
||||||
TokenVaultEditor = 'org.standardnotes.token-vault',
|
TokenVaultEditor = 'org.standardnotes.token-vault',
|
||||||
|
|
||||||
|
DeprecatedMarkdownVisualEditor = 'org.standardnotes.markdown-visual-editor',
|
||||||
DeprecatedBoldEditor = 'org.standardnotes.bold-editor',
|
DeprecatedBoldEditor = 'org.standardnotes.bold-editor',
|
||||||
DeprecatedMarkdownBasicEditor = 'org.standardnotes.simple-markdown-editor',
|
DeprecatedMarkdownBasicEditor = 'org.standardnotes.simple-markdown-editor',
|
||||||
DeprecatedMarkdownMathEditor = 'org.standardnotes.fancy-markdown-editor',
|
DeprecatedMarkdownMathEditor = 'org.standardnotes.fancy-markdown-editor',
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { FeatureDescription } from './FeatureDescription'
|
import { FeatureDescription } from './FeatureDescription'
|
||||||
import { FeatureIdentifier } from './FeatureIdentifier'
|
import { FeatureIdentifier } from './FeatureIdentifier'
|
||||||
import { editors } from '../Lists/Editors'
|
|
||||||
import { themes } from '../Lists/Themes'
|
|
||||||
import { serverFeatures } from '../Lists/ServerFeatures'
|
import { serverFeatures } from '../Lists/ServerFeatures'
|
||||||
import { clientFeatures } from '../Lists/ClientFeatures'
|
import { clientFeatures } from '../Lists/ClientFeatures'
|
||||||
import { GetDeprecatedFeatures } from '../Lists/DeprecatedFeatures'
|
import { GetDeprecatedFeatures } from '../Lists/DeprecatedFeatures'
|
||||||
@@ -9,14 +7,7 @@ import { experimentalFeatures } from '../Lists/ExperimentalFeatures'
|
|||||||
import { SubscriptionName } from '@standardnotes/common'
|
import { SubscriptionName } from '@standardnotes/common'
|
||||||
|
|
||||||
export function GetFeatures(): FeatureDescription[] {
|
export function GetFeatures(): FeatureDescription[] {
|
||||||
return [
|
return [...serverFeatures(), ...clientFeatures(), ...experimentalFeatures(), ...GetDeprecatedFeatures()]
|
||||||
...themes(),
|
|
||||||
...editors(),
|
|
||||||
...serverFeatures(),
|
|
||||||
...clientFeatures(),
|
|
||||||
...experimentalFeatures(),
|
|
||||||
...GetDeprecatedFeatures(),
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function GetFeaturesForSubscription(subscription: SubscriptionName): FeatureDescription[] {
|
export function GetFeaturesForSubscription(subscription: SubscriptionName): FeatureDescription[] {
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
import { ClientFeatureDescription } from '../Feature/FeatureDescription'
|
import { FeatureDescription } from '../Feature/FeatureDescription'
|
||||||
import { PermissionName } from '../Permission/PermissionName'
|
import { PermissionName } from '../Permission/PermissionName'
|
||||||
import { FeatureIdentifier } from '../Feature/FeatureIdentifier'
|
import { FeatureIdentifier } from '../Feature/FeatureIdentifier'
|
||||||
import { RoleName, SubscriptionName } from '@standardnotes/common'
|
import { SubscriptionName } from '@standardnotes/common'
|
||||||
|
import { RoleName } from '@standardnotes/domain-core'
|
||||||
|
import { themes } from './Themes'
|
||||||
|
import { editors } from './Editors'
|
||||||
|
|
||||||
export function clientFeatures(): ClientFeatureDescription[] {
|
export function clientFeatures(): FeatureDescription[] {
|
||||||
return [
|
return [
|
||||||
|
...themes(),
|
||||||
|
...editors(),
|
||||||
{
|
{
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
name: 'Tag Nesting',
|
name: 'Tag Nesting',
|
||||||
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
identifier: FeatureIdentifier.TagNesting,
|
identifier: FeatureIdentifier.TagNesting,
|
||||||
permission_name: PermissionName.TagNesting,
|
permission_name: PermissionName.TagNesting,
|
||||||
description: 'Organize your tags into folders.',
|
description: 'Organize your tags into folders.',
|
||||||
@@ -16,45 +22,26 @@ export function clientFeatures(): ClientFeatureDescription[] {
|
|||||||
name: 'Super Notes',
|
name: 'Super Notes',
|
||||||
identifier: FeatureIdentifier.SuperEditor,
|
identifier: FeatureIdentifier.SuperEditor,
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
permission_name: PermissionName.SuperEditor,
|
permission_name: PermissionName.SuperEditor,
|
||||||
description:
|
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.',
|
'A new way to edit notes. 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. Cmd/Ctrl + F to bring up search and replace.',
|
||||||
availableInRoles: [RoleName.PlusUser, RoleName.ProUser],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
name: 'Smart Filters',
|
name: 'Smart Filters',
|
||||||
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
identifier: FeatureIdentifier.SmartFilters,
|
identifier: FeatureIdentifier.SmartFilters,
|
||||||
permission_name: PermissionName.SmartFilters,
|
permission_name: PermissionName.SmartFilters,
|
||||||
description: 'Create smart filters for viewing notes matching specific criteria.',
|
description: 'Create smart filters for viewing notes matching specific criteria.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
name: 'Encrypted files',
|
name: 'Encrypted files',
|
||||||
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
availableInRoles: [RoleName.NAMES.ProUser],
|
||||||
identifier: FeatureIdentifier.Files,
|
identifier: FeatureIdentifier.Files,
|
||||||
permission_name: PermissionName.Files,
|
permission_name: PermissionName.Files,
|
||||||
description: '',
|
description: '',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
name: 'Focus Mode',
|
|
||||||
identifier: FeatureIdentifier.FocusMode,
|
|
||||||
permission_name: PermissionName.FocusMode,
|
|
||||||
description: '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
name: 'Listed Custom Domain',
|
|
||||||
identifier: FeatureIdentifier.ListedCustomDomain,
|
|
||||||
permission_name: PermissionName.ListedCustomDomain,
|
|
||||||
description: '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
name: 'Multiple accounts',
|
|
||||||
identifier: FeatureIdentifier.AccountSwitcher,
|
|
||||||
permission_name: PermissionName.AccountSwitcher,
|
|
||||||
description: '',
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { NoteType } from '../Component/NoteType'
|
|||||||
import { FillEditorComponentDefaults } from './Utilities/FillEditorComponentDefaults'
|
import { FillEditorComponentDefaults } from './Utilities/FillEditorComponentDefaults'
|
||||||
import { ComponentAction } from '../Component/ComponentAction'
|
import { ComponentAction } from '../Component/ComponentAction'
|
||||||
import { ComponentArea } from '../Component/ComponentArea'
|
import { ComponentArea } from '../Component/ComponentArea'
|
||||||
|
import { RoleName } from '@standardnotes/domain-core'
|
||||||
|
|
||||||
export function GetDeprecatedFeatures(): FeatureDescription[] {
|
export function GetDeprecatedFeatures(): FeatureDescription[] {
|
||||||
const bold: EditorFeatureDescription = FillEditorComponentDefaults({
|
const bold: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -37,6 +38,7 @@ export function GetDeprecatedFeatures(): FeatureDescription[] {
|
|||||||
permission_name: PermissionName.BoldEditor,
|
permission_name: PermissionName.BoldEditor,
|
||||||
description: 'A simple and peaceful rich editor that helps you write and think clearly.',
|
description: 'A simple and peaceful rich editor that helps you write and think clearly.',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/bold.jpg',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/bold.jpg',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
const markdownBasic: EditorFeatureDescription = FillEditorComponentDefaults({
|
const markdownBasic: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -50,6 +52,22 @@ export function GetDeprecatedFeatures(): FeatureDescription[] {
|
|||||||
permission_name: PermissionName.MarkdownBasicEditor,
|
permission_name: PermissionName.MarkdownBasicEditor,
|
||||||
description: 'A Markdown editor with dynamic split-pane preview.',
|
description: 'A Markdown editor with dynamic split-pane preview.',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/simple-markdown.jpg',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/simple-markdown.jpg',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
|
})
|
||||||
|
|
||||||
|
const markdownAlt: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
name: 'Markdown Alternative',
|
||||||
|
identifier: FeatureIdentifier.DeprecatedMarkdownVisualEditor,
|
||||||
|
note_type: NoteType.Markdown,
|
||||||
|
file_type: 'md',
|
||||||
|
deprecated: true,
|
||||||
|
permission_name: PermissionName.MarkdownVisualEditor,
|
||||||
|
spellcheckControl: true,
|
||||||
|
description:
|
||||||
|
'A WYSIWYG-style Markdown editor that renders Markdown in preview-mode while you type without displaying any syntax.',
|
||||||
|
index_path: 'build/index.html',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
const markdownMinimist: EditorFeatureDescription = FillEditorComponentDefaults({
|
const markdownMinimist: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -64,6 +82,7 @@ export function GetDeprecatedFeatures(): FeatureDescription[] {
|
|||||||
deprecated: true,
|
deprecated: true,
|
||||||
description: 'A minimal Markdown editor with live rendering and in-text search via Ctrl/Cmd + F',
|
description: 'A minimal Markdown editor with live rendering and in-text search via Ctrl/Cmd + F',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/min-markdown.jpg',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/min-markdown.jpg',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
const markdownMath: EditorFeatureDescription = FillEditorComponentDefaults({
|
const markdownMath: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -78,6 +97,7 @@ export function GetDeprecatedFeatures(): FeatureDescription[] {
|
|||||||
index_path: 'index.html',
|
index_path: 'index.html',
|
||||||
description: 'A beautiful split-pane Markdown editor with synced-scroll, LaTeX support, and colorful syntax.',
|
description: 'A beautiful split-pane Markdown editor with synced-scroll, LaTeX support, and colorful syntax.',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/fancy-markdown.jpg',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/fancy-markdown.jpg',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
const filesafe: IframeComponentFeatureDescription = FillEditorComponentDefaults({
|
const filesafe: IframeComponentFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -104,7 +124,8 @@ export function GetDeprecatedFeatures(): FeatureDescription[] {
|
|||||||
description:
|
description:
|
||||||
'Encrypted attachments for your notes using your Dropbox, Google Drive, or WebDAV server. Limited to 50MB per file.',
|
'Encrypted attachments for your notes using your Dropbox, Google Drive, or WebDAV server. Limited to 50MB per file.',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/FileSafe-banner.png',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/FileSafe-banner.png',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
return [bold, markdownBasic, markdownMinimist, markdownMath, filesafe]
|
return [bold, markdownBasic, markdownMinimist, markdownMath, markdownAlt, filesafe]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { PermissionName } from '../Permission/PermissionName'
|
|||||||
import { FeatureIdentifier } from '../Feature/FeatureIdentifier'
|
import { FeatureIdentifier } from '../Feature/FeatureIdentifier'
|
||||||
import { NoteType } from '../Component/NoteType'
|
import { NoteType } from '../Component/NoteType'
|
||||||
import { FillEditorComponentDefaults } from './Utilities/FillEditorComponentDefaults'
|
import { FillEditorComponentDefaults } from './Utilities/FillEditorComponentDefaults'
|
||||||
|
import { RoleName } from '@standardnotes/domain-core'
|
||||||
|
|
||||||
export function editors(): EditorFeatureDescription[] {
|
export function editors(): EditorFeatureDescription[] {
|
||||||
const code: EditorFeatureDescription = FillEditorComponentDefaults({
|
const code: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -20,6 +21,7 @@ export function editors(): EditorFeatureDescription[] {
|
|||||||
'Syntax highlighting and convenient keyboard shortcuts for over 120 programming' +
|
'Syntax highlighting and convenient keyboard shortcuts for over 120 programming' +
|
||||||
' languages. Ideal for code snippets and procedures.',
|
' languages. Ideal for code snippets and procedures.',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/code.jpg',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/code.jpg',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
const plus: EditorFeatureDescription = FillEditorComponentDefaults({
|
const plus: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -33,6 +35,7 @@ export function editors(): EditorFeatureDescription[] {
|
|||||||
description:
|
description:
|
||||||
'From highlighting to custom font sizes and colors, to tables and lists, this editor is perfect for crafting any document.',
|
'From highlighting to custom font sizes and colors, to tables and lists, this editor is perfect for crafting any document.',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/plus-editor.jpg',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/plus-editor.jpg',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
const markdown: EditorFeatureDescription = FillEditorComponentDefaults({
|
const markdown: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -46,19 +49,7 @@ export function editors(): EditorFeatureDescription[] {
|
|||||||
description:
|
description:
|
||||||
'A fully featured Markdown editor that supports live preview, a styling toolbar, and split pane support.',
|
'A fully featured Markdown editor that supports live preview, a styling toolbar, and split pane support.',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/adv-markdown.jpg',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/adv-markdown.jpg',
|
||||||
})
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
|
|
||||||
const markdownAlt: EditorFeatureDescription = FillEditorComponentDefaults({
|
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
|
||||||
name: 'Markdown Alternative',
|
|
||||||
identifier: FeatureIdentifier.MarkdownVisualEditor,
|
|
||||||
note_type: NoteType.Markdown,
|
|
||||||
file_type: 'md',
|
|
||||||
permission_name: PermissionName.MarkdownVisualEditor,
|
|
||||||
spellcheckControl: true,
|
|
||||||
description:
|
|
||||||
'A WYSIWYG-style Markdown editor that renders Markdown in preview-mode while you type without displaying any syntax.',
|
|
||||||
index_path: 'build/index.html',
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const task: EditorFeatureDescription = FillEditorComponentDefaults({
|
const task: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -73,6 +64,7 @@ export function editors(): EditorFeatureDescription[] {
|
|||||||
description:
|
description:
|
||||||
'A great way to manage short-term and long-term to-do"s. You can mark tasks as completed, change their order, and edit the text naturally in place.',
|
'A great way to manage short-term and long-term to-do"s. You can mark tasks as completed, change their order, and edit the text naturally in place.',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/task-editor.jpg',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/task-editor.jpg',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
const tokenvault: EditorFeatureDescription = FillEditorComponentDefaults({
|
const tokenvault: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -86,6 +78,7 @@ export function editors(): EditorFeatureDescription[] {
|
|||||||
description:
|
description:
|
||||||
'Encrypt and protect your 2FA secrets for all your internet accounts. Authenticator handles your 2FA secrets so that you never lose them again, or have to start over when you get a new device.',
|
'Encrypt and protect your 2FA secrets for all your internet accounts. Authenticator handles your 2FA secrets so that you never lose them again, or have to start over when you get a new device.',
|
||||||
thumbnail_url: 'https://standard-notes.s3.amazonaws.com/screenshots/models/editors/token-vault.png',
|
thumbnail_url: 'https://standard-notes.s3.amazonaws.com/screenshots/models/editors/token-vault.png',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
const spreadsheets: EditorFeatureDescription = FillEditorComponentDefaults({
|
const spreadsheets: EditorFeatureDescription = FillEditorComponentDefaults({
|
||||||
@@ -99,7 +92,8 @@ export function editors(): EditorFeatureDescription[] {
|
|||||||
description:
|
description:
|
||||||
'A powerful spreadsheet editor with formatting and formula support. Not recommended for large data sets, as encryption of such data may decrease editor performance.',
|
'A powerful spreadsheet editor with formatting and formula support. Not recommended for large data sets, as encryption of such data may decrease editor performance.',
|
||||||
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/spreadsheets.png',
|
thumbnail_url: 'https://s3.amazonaws.com/standard-notes/screenshots/models/editors/spreadsheets.png',
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
return [code, plus, markdown, markdownAlt, task, tokenvault, spreadsheets]
|
return [code, plus, markdown, task, tokenvault, spreadsheets]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,5 +65,11 @@ export function serverFeatures(): ServerFeatureDescription[] {
|
|||||||
identifier: FeatureIdentifier.SubscriptionSharing,
|
identifier: FeatureIdentifier.SubscriptionSharing,
|
||||||
permission_name: PermissionName.SubscriptionSharing,
|
permission_name: PermissionName.SubscriptionSharing,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
name: 'Listed Custom Domain',
|
||||||
|
identifier: FeatureIdentifier.ListedCustomDomain,
|
||||||
|
permission_name: PermissionName.ListedCustomDomain,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { PermissionName } from '../Permission/PermissionName'
|
|||||||
import { FeatureIdentifier } from '../Feature/FeatureIdentifier'
|
import { FeatureIdentifier } from '../Feature/FeatureIdentifier'
|
||||||
import { FillThemeComponentDefaults } from './Utilities/FillThemeComponentDefaults'
|
import { FillThemeComponentDefaults } from './Utilities/FillThemeComponentDefaults'
|
||||||
import { SubscriptionName } from '@standardnotes/common'
|
import { SubscriptionName } from '@standardnotes/common'
|
||||||
|
import { RoleName } from '@standardnotes/domain-core'
|
||||||
|
|
||||||
export function themes(): ThemeFeatureDescription[] {
|
export function themes(): ThemeFeatureDescription[] {
|
||||||
const midnight: ThemeFeatureDescription = FillThemeComponentDefaults({
|
const midnight: ThemeFeatureDescription = FillThemeComponentDefaults({
|
||||||
@@ -17,10 +18,12 @@ export function themes(): ThemeFeatureDescription[] {
|
|||||||
foreground_color: '#ffffff',
|
foreground_color: '#ffffff',
|
||||||
border_color: '#086DD6',
|
border_color: '#086DD6',
|
||||||
},
|
},
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
})
|
})
|
||||||
|
|
||||||
const futura: ThemeFeatureDescription = FillThemeComponentDefaults({
|
const futura: ThemeFeatureDescription = FillThemeComponentDefaults({
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
name: 'Futura',
|
name: 'Futura',
|
||||||
identifier: FeatureIdentifier.FuturaTheme,
|
identifier: FeatureIdentifier.FuturaTheme,
|
||||||
permission_name: PermissionName.FuturaTheme,
|
permission_name: PermissionName.FuturaTheme,
|
||||||
@@ -35,6 +38,7 @@ export function themes(): ThemeFeatureDescription[] {
|
|||||||
|
|
||||||
const solarizedDark: ThemeFeatureDescription = FillThemeComponentDefaults({
|
const solarizedDark: ThemeFeatureDescription = FillThemeComponentDefaults({
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
name: 'Solarized Dark',
|
name: 'Solarized Dark',
|
||||||
identifier: FeatureIdentifier.SolarizedDarkTheme,
|
identifier: FeatureIdentifier.SolarizedDarkTheme,
|
||||||
permission_name: PermissionName.SolarizedDarkTheme,
|
permission_name: PermissionName.SolarizedDarkTheme,
|
||||||
@@ -49,6 +53,7 @@ export function themes(): ThemeFeatureDescription[] {
|
|||||||
|
|
||||||
const autobiography: ThemeFeatureDescription = FillThemeComponentDefaults({
|
const autobiography: ThemeFeatureDescription = FillThemeComponentDefaults({
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
name: 'Autobiography',
|
name: 'Autobiography',
|
||||||
identifier: FeatureIdentifier.AutobiographyTheme,
|
identifier: FeatureIdentifier.AutobiographyTheme,
|
||||||
permission_name: PermissionName.AutobiographyTheme,
|
permission_name: PermissionName.AutobiographyTheme,
|
||||||
@@ -77,6 +82,7 @@ export function themes(): ThemeFeatureDescription[] {
|
|||||||
|
|
||||||
const titanium: ThemeFeatureDescription = FillThemeComponentDefaults({
|
const titanium: ThemeFeatureDescription = FillThemeComponentDefaults({
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
name: 'Titanium',
|
name: 'Titanium',
|
||||||
identifier: FeatureIdentifier.TitaniumTheme,
|
identifier: FeatureIdentifier.TitaniumTheme,
|
||||||
permission_name: PermissionName.TitaniumTheme,
|
permission_name: PermissionName.TitaniumTheme,
|
||||||
@@ -90,6 +96,7 @@ export function themes(): ThemeFeatureDescription[] {
|
|||||||
|
|
||||||
const dynamic: ThemeFeatureDescription = FillThemeComponentDefaults({
|
const dynamic: ThemeFeatureDescription = FillThemeComponentDefaults({
|
||||||
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
availableInSubscriptions: [SubscriptionName.PlusPlan, SubscriptionName.ProPlan],
|
||||||
|
availableInRoles: [RoleName.NAMES.PlusUser, RoleName.NAMES.ProUser],
|
||||||
name: 'Dynamic Panels',
|
name: 'Dynamic Panels',
|
||||||
identifier: FeatureIdentifier.DynamicTheme,
|
identifier: FeatureIdentifier.DynamicTheme,
|
||||||
permission_name: PermissionName.ThemeDynamic,
|
permission_name: PermissionName.ThemeDynamic,
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
import { PermissionName } from './PermissionName'
|
import { PermissionName } from './PermissionName'
|
||||||
|
|
||||||
export type Permission = {
|
export type Permission = {
|
||||||
uuid: Uuid
|
uuid: string
|
||||||
name: PermissionName
|
name: PermissionName
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.28.11](https://github.com/standardnotes/app/compare/@standardnotes/filepicker@1.28.10...@standardnotes/filepicker@1.28.11) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/filepicker
|
||||||
|
|
||||||
|
## [1.28.10](https://github.com/standardnotes/app/compare/@standardnotes/filepicker@1.28.9...@standardnotes/filepicker@1.28.10) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/filepicker
|
||||||
|
|
||||||
|
## [1.28.9](https://github.com/standardnotes/app/compare/@standardnotes/filepicker@1.28.8...@standardnotes/filepicker@1.28.9) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/filepicker
|
||||||
|
|
||||||
|
## [1.28.8](https://github.com/standardnotes/app/compare/@standardnotes/filepicker@1.28.7...@standardnotes/filepicker@1.28.8) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/filepicker
|
||||||
|
|
||||||
|
## [1.28.7](https://github.com/standardnotes/app/compare/@standardnotes/filepicker@1.28.6...@standardnotes/filepicker@1.28.7) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/filepicker
|
||||||
|
|
||||||
|
## [1.28.6](https://github.com/standardnotes/app/compare/@standardnotes/filepicker@1.28.5...@standardnotes/filepicker@1.28.6) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/filepicker
|
||||||
|
|
||||||
## [1.28.5](https://github.com/standardnotes/app/compare/@standardnotes/filepicker@1.28.4...@standardnotes/filepicker@1.28.5) (2023-01-18)
|
## [1.28.5](https://github.com/standardnotes/app/compare/@standardnotes/filepicker@1.28.4...@standardnotes/filepicker@1.28.5) (2023-01-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/filepicker
|
**Note:** Version bump only for package @standardnotes/filepicker
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/filepicker",
|
"name": "@standardnotes/filepicker",
|
||||||
"version": "1.28.5",
|
"version": "1.28.11",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0 <17.0.0"
|
"node": ">=16.0.0 <17.0.0"
|
||||||
},
|
},
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
"typescript": "*"
|
"typescript": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/common": "^1.45.0",
|
"@standardnotes/common": "^1.46.4",
|
||||||
"@standardnotes/files": "workspace:*",
|
"@standardnotes/files": "workspace:*",
|
||||||
"@standardnotes/utils": "workspace:*",
|
"@standardnotes/utils": "workspace:*",
|
||||||
"@types/wicg-file-system-access": "^2020.9.5",
|
"@types/wicg-file-system-access": "^2020.9.5",
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.14.21](https://github.com/standardnotes/app/compare/@standardnotes/files@1.14.20...@standardnotes/files@1.14.21) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/files
|
||||||
|
|
||||||
|
## [1.14.20](https://github.com/standardnotes/app/compare/@standardnotes/files@1.14.19...@standardnotes/files@1.14.20) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/files
|
||||||
|
|
||||||
|
## [1.14.19](https://github.com/standardnotes/app/compare/@standardnotes/files@1.14.18...@standardnotes/files@1.14.19) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/files
|
||||||
|
|
||||||
|
## [1.14.18](https://github.com/standardnotes/app/compare/@standardnotes/files@1.14.17...@standardnotes/files@1.14.18) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/files
|
||||||
|
|
||||||
|
## [1.14.17](https://github.com/standardnotes/app/compare/@standardnotes/files@1.14.16...@standardnotes/files@1.14.17) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/files
|
||||||
|
|
||||||
|
## [1.14.16](https://github.com/standardnotes/app/compare/@standardnotes/files@1.14.15...@standardnotes/files@1.14.16) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/files
|
||||||
|
|
||||||
## [1.14.15](https://github.com/standardnotes/app/compare/@standardnotes/files@1.14.14...@standardnotes/files@1.14.15) (2023-01-18)
|
## [1.14.15](https://github.com/standardnotes/app/compare/@standardnotes/files@1.14.14...@standardnotes/files@1.14.15) (2023-01-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/files
|
**Note:** Version bump only for package @standardnotes/files
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/files",
|
"name": "@standardnotes/files",
|
||||||
"version": "1.14.15",
|
"version": "1.14.21",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0 <17.0.0"
|
"node": ">=16.0.0 <17.0.0"
|
||||||
},
|
},
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"typescript": "*"
|
"typescript": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/common": "^1.45.0",
|
"@standardnotes/common": "^1.46.4",
|
||||||
"@standardnotes/encryption": "workspace:*",
|
"@standardnotes/encryption": "workspace:*",
|
||||||
"@standardnotes/models": "workspace:*",
|
"@standardnotes/models": "workspace:*",
|
||||||
"@standardnotes/responses": "workspace:*",
|
"@standardnotes/responses": "workspace:*",
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
import { removeFromArray } from '@standardnotes/utils'
|
import { removeFromArray } from '@standardnotes/utils'
|
||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
import { EncryptedBytes } from '../Types/EncryptedBytes'
|
import { EncryptedBytes } from '../Types/EncryptedBytes'
|
||||||
|
|
||||||
export class FileMemoryCache {
|
export class FileMemoryCache {
|
||||||
private cache: Record<Uuid, EncryptedBytes> = {}
|
private cache: Record<string, EncryptedBytes> = {}
|
||||||
private orderedQueue: Uuid[] = []
|
private orderedQueue: string[] = []
|
||||||
|
|
||||||
constructor(public readonly maxSize: number) {}
|
constructor(public readonly maxSize: number) {}
|
||||||
|
|
||||||
add(uuid: Uuid, data: EncryptedBytes): boolean {
|
add(uuid: string, data: EncryptedBytes): boolean {
|
||||||
if (data.encryptedBytes.length > this.maxSize) {
|
if (data.encryptedBytes.length > this.maxSize) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -31,11 +30,11 @@ export class FileMemoryCache {
|
|||||||
.reduce((total, fileLength) => total + fileLength, 0)
|
.reduce((total, fileLength) => total + fileLength, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
get(uuid: Uuid): EncryptedBytes | undefined {
|
get(uuid: string): EncryptedBytes | undefined {
|
||||||
return this.cache[uuid]
|
return this.cache[uuid]
|
||||||
}
|
}
|
||||||
|
|
||||||
remove(uuid: Uuid): void {
|
remove(uuid: string): void {
|
||||||
delete this.cache[uuid]
|
delete this.cache[uuid]
|
||||||
|
|
||||||
removeFromArray(this.orderedQueue, uuid)
|
removeFromArray(this.orderedQueue, uuid)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { FileDownloadProgress } from '../Types/FileDownloadProgress'
|
import { FileDownloadProgress } from '../Types/FileDownloadProgress'
|
||||||
import { FileBackupRecord, FileBackupsMapping } from './FileBackupsMapping'
|
import { FileBackupRecord, FileBackupsMapping } from './FileBackupsMapping'
|
||||||
|
|
||||||
@@ -8,7 +7,7 @@ export type FileBackupReadChunkResponse = { chunk: Uint8Array; isLast: boolean;
|
|||||||
export interface FileBackupsDevice {
|
export interface FileBackupsDevice {
|
||||||
getFilesBackupsMappingFile(): Promise<FileBackupsMapping>
|
getFilesBackupsMappingFile(): Promise<FileBackupsMapping>
|
||||||
saveFilesBackupsFile(
|
saveFilesBackupsFile(
|
||||||
uuid: Uuid,
|
uuid: string,
|
||||||
metaFile: string,
|
metaFile: string,
|
||||||
downloadRequest: {
|
downloadRequest: {
|
||||||
chunkSizes: number[]
|
chunkSizes: number[]
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { FileBackupsConstantsV1 } from './FileBackupsConstantsV1'
|
import { FileBackupsConstantsV1 } from './FileBackupsConstantsV1'
|
||||||
|
|
||||||
export type FileBackupRecord = {
|
export type FileBackupRecord = {
|
||||||
@@ -12,5 +11,5 @@ export type FileBackupRecord = {
|
|||||||
|
|
||||||
export interface FileBackupsMapping {
|
export interface FileBackupsMapping {
|
||||||
version: typeof FileBackupsConstantsV1.Version
|
version: typeof FileBackupsConstantsV1.Version
|
||||||
files: Record<Uuid, FileBackupRecord>
|
files: Record<string, FileBackupRecord>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [3.50.36](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.50.35...@standardnotes/mobile@3.50.36) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/mobile
|
||||||
|
|
||||||
|
## [3.50.35](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.50.34...@standardnotes/mobile@3.50.35) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/mobile
|
||||||
|
|
||||||
|
## [3.50.34](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.50.33...@standardnotes/mobile@3.50.34) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/mobile
|
||||||
|
|
||||||
|
## [3.50.33](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.50.32...@standardnotes/mobile@3.50.33) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/mobile
|
||||||
|
|
||||||
|
## [3.50.32](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.50.31...@standardnotes/mobile@3.50.32) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/mobile
|
||||||
|
|
||||||
|
## [3.50.31](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.50.30...@standardnotes/mobile@3.50.31) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/mobile
|
||||||
|
|
||||||
|
## [3.50.30](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.50.29...@standardnotes/mobile@3.50.30) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/mobile
|
||||||
|
|
||||||
## [3.50.29](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.50.28...@standardnotes/mobile@3.50.29) (2023-01-18)
|
## [3.50.29](https://github.com/standardnotes/app/compare/@standardnotes/mobile@3.50.28...@standardnotes/mobile@3.50.29) (2023-01-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/mobile
|
**Note:** Version bump only for package @standardnotes/mobile
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/mobile",
|
"name": "@standardnotes/mobile",
|
||||||
"version": "3.50.29",
|
"version": "3.50.36",
|
||||||
"author": "Standard Notes.",
|
"author": "Standard Notes.",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
|||||||
@@ -3,6 +3,35 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.42.8](https://github.com/standardnotes/app/compare/@standardnotes/models@1.42.7...@standardnotes/models@1.42.8) (2023-01-20)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fixed issue with third party editors not loading ([#2174](https://github.com/standardnotes/app/issues/2174)) ([e7214ea](https://github.com/standardnotes/app/commit/e7214ea73ad5d3026d958c79022d2238a4d1cfdc))
|
||||||
|
|
||||||
|
## [1.42.7](https://github.com/standardnotes/app/compare/@standardnotes/models@1.42.6...@standardnotes/models@1.42.7) (2023-01-20)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **models:** dependency declaration ([beccfb1](https://github.com/standardnotes/app/commit/beccfb16b361ba70bd4f7c09d5840d73ed6e85da))
|
||||||
|
* **models:** dependency on utils declaration ([e9a1012](https://github.com/standardnotes/app/commit/e9a10123fed9e2883e3d2af38939b1608d7b2ffa))
|
||||||
|
|
||||||
|
## [1.42.6](https://github.com/standardnotes/app/compare/@standardnotes/models@1.42.5...@standardnotes/models@1.42.6) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/models
|
||||||
|
|
||||||
|
## [1.42.5](https://github.com/standardnotes/app/compare/@standardnotes/models@1.42.4...@standardnotes/models@1.42.5) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/models
|
||||||
|
|
||||||
|
## [1.42.4](https://github.com/standardnotes/app/compare/@standardnotes/models@1.42.3...@standardnotes/models@1.42.4) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/models
|
||||||
|
|
||||||
|
## [1.42.3](https://github.com/standardnotes/app/compare/@standardnotes/models@1.42.2...@standardnotes/models@1.42.3) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/models
|
||||||
|
|
||||||
## [1.42.2](https://github.com/standardnotes/app/compare/@standardnotes/models@1.42.1...@standardnotes/models@1.42.2) (2023-01-18)
|
## [1.42.2](https://github.com/standardnotes/app/compare/@standardnotes/models@1.42.1...@standardnotes/models@1.42.2) (2023-01-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/models
|
**Note:** Version bump only for package @standardnotes/models
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/models",
|
"name": "@standardnotes/models",
|
||||||
"version": "1.42.2",
|
"version": "1.42.8",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0 <17.0.0"
|
"node": ">=16.0.0 <17.0.0"
|
||||||
},
|
},
|
||||||
@@ -21,11 +21,13 @@
|
|||||||
"lint": "eslint src --ext .ts",
|
"lint": "eslint src --ext .ts",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@standardnotes/utils": "workspace:^"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@standardnotes/common": "^1.45.0",
|
"@standardnotes/common": "^1.46.4",
|
||||||
"@standardnotes/features": "workspace:*",
|
"@standardnotes/features": "workspace:*",
|
||||||
"@standardnotes/responses": "workspace:*",
|
"@standardnotes/responses": "workspace:*",
|
||||||
"@standardnotes/utils": "workspace:*",
|
|
||||||
"@types/jest": "^29.2.3",
|
"@types/jest": "^29.2.3",
|
||||||
"@types/lodash": "^4.14.189",
|
"@types/lodash": "^4.14.189",
|
||||||
"@typescript-eslint/eslint-plugin": "*",
|
"@typescript-eslint/eslint-plugin": "*",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ContentType, Uuid } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
import { ComponentPermission } from '@standardnotes/features'
|
import { ComponentPermission } from '@standardnotes/features'
|
||||||
|
|
||||||
import { IncomingComponentItemPayload } from './IncomingComponentItemPayload'
|
import { IncomingComponentItemPayload } from './IncomingComponentItemPayload'
|
||||||
@@ -14,7 +14,7 @@ export type MessageData = Partial<{
|
|||||||
permissions?: ComponentPermission[]
|
permissions?: ComponentPermission[]
|
||||||
/** Related to the component-registered action */
|
/** Related to the component-registered action */
|
||||||
componentData?: Record<string, unknown>
|
componentData?: Record<string, unknown>
|
||||||
uuid?: Uuid
|
uuid?: string
|
||||||
environment?: string
|
environment?: string
|
||||||
platform?: string
|
platform?: string
|
||||||
activeThemeUrls?: string[]
|
activeThemeUrls?: string[]
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { AppData, DefaultAppDomain } from '../Item/Types/DefaultAppDomain'
|
import { AppData, DefaultAppDomain } from '../Item/Types/DefaultAppDomain'
|
||||||
import { ContentReference } from '../Reference/ContentReference'
|
import { ContentReference } from '../Reference/ContentReference'
|
||||||
import { AppDataField } from '../Item/Types/AppDataField'
|
import { AppDataField } from '../Item/Types/AppDataField'
|
||||||
@@ -8,7 +7,7 @@ export interface SpecializedContent {}
|
|||||||
|
|
||||||
export interface ItemContent {
|
export interface ItemContent {
|
||||||
references: ContentReference[]
|
references: ContentReference[]
|
||||||
conflict_of?: Uuid
|
conflict_of?: string
|
||||||
protected?: boolean
|
protected?: boolean
|
||||||
trashed?: boolean
|
trashed?: boolean
|
||||||
pinned?: boolean
|
pinned?: boolean
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { ItemContent } from '../Content/ItemContent'
|
import { ItemContent } from '../Content/ItemContent'
|
||||||
import { ContextPayload } from './ContextPayload'
|
import { ContextPayload } from './ContextPayload'
|
||||||
|
|
||||||
@@ -6,7 +5,7 @@ export interface BackupFileDecryptedContextualPayload<C extends ItemContent = It
|
|||||||
content: C
|
content: C
|
||||||
created_at_timestamp: number
|
created_at_timestamp: number
|
||||||
created_at: Date
|
created_at: Date
|
||||||
duplicate_of?: Uuid
|
duplicate_of?: string
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
updated_at_timestamp: number
|
updated_at_timestamp: number
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { ContextPayload } from './ContextPayload'
|
import { ContextPayload } from './ContextPayload'
|
||||||
|
|
||||||
export interface BackupFileEncryptedContextualPayload extends ContextPayload {
|
export interface BackupFileEncryptedContextualPayload extends ContextPayload {
|
||||||
@@ -6,7 +5,7 @@ export interface BackupFileEncryptedContextualPayload extends ContextPayload {
|
|||||||
content: string
|
content: string
|
||||||
created_at_timestamp: number
|
created_at_timestamp: number
|
||||||
created_at: Date
|
created_at: Date
|
||||||
duplicate_of?: Uuid
|
duplicate_of?: string
|
||||||
enc_item_key: string
|
enc_item_key: string
|
||||||
items_key_id: string | undefined
|
items_key_id: string | undefined
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { ContextPayload } from './ContextPayload'
|
import { ContextPayload } from './ContextPayload'
|
||||||
import { ItemContent } from '../Content/ItemContent'
|
import { ItemContent } from '../Content/ItemContent'
|
||||||
import { DecryptedPayloadInterface, DeletedPayloadInterface, EncryptedPayloadInterface } from '../Payload'
|
import { DecryptedPayloadInterface, DeletedPayloadInterface, EncryptedPayloadInterface } from '../Payload'
|
||||||
@@ -19,7 +18,7 @@ export interface LocalStorageEncryptedContextualPayload extends ContextPayload {
|
|||||||
created_at_timestamp: number
|
created_at_timestamp: number
|
||||||
created_at: Date
|
created_at: Date
|
||||||
dirty: boolean
|
dirty: boolean
|
||||||
duplicate_of: Uuid | undefined
|
duplicate_of: string | undefined
|
||||||
enc_item_key: string
|
enc_item_key: string
|
||||||
errorDecrypting: boolean
|
errorDecrypting: boolean
|
||||||
items_key_id: string | undefined
|
items_key_id: string | undefined
|
||||||
@@ -34,7 +33,7 @@ export interface LocalStorageDecryptedContextualPayload<C extends ItemContent =
|
|||||||
created_at: Date
|
created_at: Date
|
||||||
deleted: false
|
deleted: false
|
||||||
dirty: boolean
|
dirty: boolean
|
||||||
duplicate_of?: Uuid
|
duplicate_of?: string
|
||||||
updated_at_timestamp: number
|
updated_at_timestamp: number
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
}
|
}
|
||||||
@@ -45,7 +44,7 @@ export interface LocalStorageDeletedContextualPayload extends ContextPayload {
|
|||||||
created_at: Date
|
created_at: Date
|
||||||
deleted: true
|
deleted: true
|
||||||
dirty: true
|
dirty: true
|
||||||
duplicate_of?: Uuid
|
duplicate_of?: string
|
||||||
updated_at_timestamp: number
|
updated_at_timestamp: number
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { ItemContent } from '../Content/ItemContent'
|
import { ItemContent } from '../Content/ItemContent'
|
||||||
import { DecryptedPayloadInterface, DeletedPayloadInterface, isDecryptedPayload } from '../Payload'
|
import { DecryptedPayloadInterface, DeletedPayloadInterface, isDecryptedPayload } from '../Payload'
|
||||||
import { ContextPayload } from './ContextPayload'
|
import { ContextPayload } from './ContextPayload'
|
||||||
@@ -7,7 +6,7 @@ export interface OfflineSyncPushContextualPayload extends ContextPayload {
|
|||||||
content: ItemContent | undefined
|
content: ItemContent | undefined
|
||||||
created_at_timestamp: number
|
created_at_timestamp: number
|
||||||
created_at: Date
|
created_at: Date
|
||||||
duplicate_of?: Uuid
|
duplicate_of?: string
|
||||||
updated_at_timestamp: number
|
updated_at_timestamp: number
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { DeletedPayloadInterface, EncryptedPayloadInterface } from '../Payload'
|
import { DeletedPayloadInterface, EncryptedPayloadInterface } from '../Payload'
|
||||||
import { ContextPayload } from './ContextPayload'
|
import { ContextPayload } from './ContextPayload'
|
||||||
|
|
||||||
@@ -7,7 +6,7 @@ export interface ServerSyncPushContextualPayload extends ContextPayload {
|
|||||||
content: string | undefined
|
content: string | undefined
|
||||||
created_at_timestamp: number
|
created_at_timestamp: number
|
||||||
created_at: Date
|
created_at: Date
|
||||||
duplicate_of?: Uuid
|
duplicate_of?: string
|
||||||
enc_item_key?: string
|
enc_item_key?: string
|
||||||
items_key_id?: string
|
items_key_id?: string
|
||||||
updated_at_timestamp: number
|
updated_at_timestamp: number
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { dateToLocalizedString, useBoolean } from '@standardnotes/utils'
|
import { dateToLocalizedString, useBoolean } from '@standardnotes/utils'
|
||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { DecryptedTransferPayload } from './../../TransferPayload/Interfaces/DecryptedTransferPayload'
|
import { DecryptedTransferPayload } from './../../TransferPayload/Interfaces/DecryptedTransferPayload'
|
||||||
import { AppDataField } from '../Types/AppDataField'
|
import { AppDataField } from '../Types/AppDataField'
|
||||||
import { ComponentDataDomain, DefaultAppDomain } from '../Types/DefaultAppDomain'
|
import { ComponentDataDomain, DefaultAppDomain } from '../Types/DefaultAppDomain'
|
||||||
@@ -15,7 +14,7 @@ export class DecryptedItem<C extends ItemContent = ItemContent>
|
|||||||
extends GenericItem<DecryptedPayloadInterface<C>>
|
extends GenericItem<DecryptedPayloadInterface<C>>
|
||||||
implements DecryptedItemInterface<C>
|
implements DecryptedItemInterface<C>
|
||||||
{
|
{
|
||||||
public readonly conflictOf?: Uuid
|
public readonly conflictOf?: string
|
||||||
public readonly protected: boolean = false
|
public readonly protected: boolean = false
|
||||||
public readonly trashed: boolean = false
|
public readonly trashed: boolean = false
|
||||||
public readonly pinned: boolean = false
|
public readonly pinned: boolean = false
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ContentType, Uuid } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
import { dateToLocalizedString, deepFreeze } from '@standardnotes/utils'
|
import { dateToLocalizedString, deepFreeze } from '@standardnotes/utils'
|
||||||
import { TransferPayload } from './../../TransferPayload/Interfaces/TransferPayload'
|
import { TransferPayload } from './../../TransferPayload/Interfaces/TransferPayload'
|
||||||
import { ItemContentsDiffer } from '../../../Utilities/Item/ItemContentsDiffer'
|
import { ItemContentsDiffer } from '../../../Utilities/Item/ItemContentsDiffer'
|
||||||
@@ -13,7 +13,7 @@ import { isDecryptedItem, isDeletedItem, isEncryptedErroredItem } from '../Inter
|
|||||||
|
|
||||||
export abstract class GenericItem<P extends PayloadInterface = PayloadInterface> implements ItemInterface<P> {
|
export abstract class GenericItem<P extends PayloadInterface = PayloadInterface> implements ItemInterface<P> {
|
||||||
payload: P
|
payload: P
|
||||||
public readonly duplicateOf?: Uuid
|
public readonly duplicateOf?: string
|
||||||
public readonly createdAtString?: string
|
public readonly createdAtString?: string
|
||||||
public updatedAtString?: string
|
public updatedAtString?: string
|
||||||
public userModifiedDate: Date
|
public userModifiedDate: Date
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { AppDataField } from '../Types/AppDataField'
|
import { AppDataField } from '../Types/AppDataField'
|
||||||
import { ComponentDataDomain, DefaultAppDomain } from '../Types/DefaultAppDomain'
|
import { ComponentDataDomain, DefaultAppDomain } from '../Types/DefaultAppDomain'
|
||||||
import { ContentReference } from '../../Reference/ContentReference'
|
import { ContentReference } from '../../Reference/ContentReference'
|
||||||
@@ -15,8 +14,8 @@ export interface DecryptedItemInterface<C extends ItemContent = ItemContent>
|
|||||||
SortableItem,
|
SortableItem,
|
||||||
SearchableItem {
|
SearchableItem {
|
||||||
readonly content: C
|
readonly content: C
|
||||||
readonly conflictOf?: Uuid
|
readonly conflictOf?: string
|
||||||
readonly duplicateOf?: Uuid
|
readonly duplicateOf?: string
|
||||||
readonly protected: boolean
|
readonly protected: boolean
|
||||||
readonly trashed: boolean
|
readonly trashed: boolean
|
||||||
readonly pinned: boolean
|
readonly pinned: boolean
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Uuid, ContentType } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
import { TransferPayload } from './../../TransferPayload/Interfaces/TransferPayload'
|
import { TransferPayload } from './../../TransferPayload/Interfaces/TransferPayload'
|
||||||
import { PayloadInterface } from '../../Payload/Interfaces/PayloadInterface'
|
import { PayloadInterface } from '../../Payload/Interfaces/PayloadInterface'
|
||||||
import { PredicateInterface } from '../../../Runtime/Predicate/Interface'
|
import { PredicateInterface } from '../../../Runtime/Predicate/Interface'
|
||||||
@@ -8,12 +8,12 @@ import { SingletonStrategy } from '../Types/SingletonStrategy'
|
|||||||
|
|
||||||
export interface ItemInterface<P extends PayloadInterface = PayloadInterface> {
|
export interface ItemInterface<P extends PayloadInterface = PayloadInterface> {
|
||||||
payload: P
|
payload: P
|
||||||
readonly conflictOf?: Uuid
|
readonly conflictOf?: string
|
||||||
readonly duplicateOf?: Uuid
|
readonly duplicateOf?: string
|
||||||
readonly createdAtString?: string
|
readonly createdAtString?: string
|
||||||
readonly updatedAtString?: string
|
readonly updatedAtString?: string
|
||||||
|
|
||||||
uuid: Uuid
|
uuid: string
|
||||||
|
|
||||||
content_type: ContentType
|
content_type: ContentType
|
||||||
created_at: Date
|
created_at: Date
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { DecryptedItemInterface } from './../Interfaces/DecryptedItem'
|
|||||||
import { Copy } from '@standardnotes/utils'
|
import { Copy } from '@standardnotes/utils'
|
||||||
import { MutationType } from '../Types/MutationType'
|
import { MutationType } from '../Types/MutationType'
|
||||||
import { PrefKey } from '../../../Syncable/UserPrefs/PrefKey'
|
import { PrefKey } from '../../../Syncable/UserPrefs/PrefKey'
|
||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { ItemContent } from '../../Content/ItemContent'
|
import { ItemContent } from '../../Content/ItemContent'
|
||||||
import { AppDataField } from '../Types/AppDataField'
|
import { AppDataField } from '../Types/AppDataField'
|
||||||
import { DefaultAppDomain, DomainDataValueType, ItemDomainKey } from '../Types/DefaultAppDomain'
|
import { DefaultAppDomain, DomainDataValueType, ItemDomainKey } from '../Types/DefaultAppDomain'
|
||||||
@@ -66,7 +65,7 @@ export class DecryptedItemMutator<C extends ItemContent = ItemContent> extends I
|
|||||||
this.setAppDataItem(AppDataField.UserModifiedDate, date)
|
this.setAppDataItem(AppDataField.UserModifiedDate, date)
|
||||||
}
|
}
|
||||||
|
|
||||||
public set conflictOf(conflictOf: Uuid | undefined) {
|
public set conflictOf(conflictOf: string | undefined) {
|
||||||
this.mutableContent.conflict_of = conflictOf
|
this.mutableContent.conflict_of = conflictOf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
import { MutationType } from '../Types/MutationType'
|
import { MutationType } from '../Types/MutationType'
|
||||||
|
|
||||||
import { ItemMutator } from './ItemMutator'
|
import { ItemMutator } from './ItemMutator'
|
||||||
|
|
||||||
export type TransactionalMutation = {
|
export type TransactionalMutation = {
|
||||||
itemUuid: Uuid
|
itemUuid: string
|
||||||
mutate: (mutator: ItemMutator) => void
|
mutate: (mutator: ItemMutator) => void
|
||||||
mutationType?: MutationType
|
mutationType?: MutationType
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { Copy } from '@standardnotes/utils'
|
import { Copy } from '@standardnotes/utils'
|
||||||
import { SyncResolvedParams, SyncResolvedPayload } from '../../../Runtime/Deltas/Utilities/SyncResolvedPayload'
|
import { SyncResolvedParams, SyncResolvedPayload } from '../../../Runtime/Deltas/Utilities/SyncResolvedPayload'
|
||||||
import { FillItemContent, ItemContent } from '../../Content/ItemContent'
|
import { FillItemContent, ItemContent } from '../../Content/ItemContent'
|
||||||
@@ -29,7 +28,7 @@ export class DecryptedPayload<
|
|||||||
return this.content.references || []
|
return this.content.references || []
|
||||||
}
|
}
|
||||||
|
|
||||||
public getReference(uuid: Uuid): ContentReference {
|
public getReference(uuid: string): ContentReference {
|
||||||
const result = this.references.find((ref) => ref.uuid === uuid)
|
const result = this.references.find((ref) => ref.uuid === uuid)
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { DecryptedTransferPayload } from './../../TransferPayload/Interfaces/DecryptedTransferPayload'
|
import { DecryptedTransferPayload } from './../../TransferPayload/Interfaces/DecryptedTransferPayload'
|
||||||
import { ItemContent } from '../../Content/ItemContent'
|
import { ItemContent } from '../../Content/ItemContent'
|
||||||
import { ContentReference } from '../../Reference/ContentReference'
|
import { ContentReference } from '../../Reference/ContentReference'
|
||||||
@@ -11,5 +10,5 @@ export interface DecryptedPayloadInterface<C extends ItemContent = ItemContent>
|
|||||||
|
|
||||||
ejected(): DecryptedTransferPayload<C>
|
ejected(): DecryptedTransferPayload<C>
|
||||||
get references(): ContentReference[]
|
get references(): ContentReference[]
|
||||||
getReference(uuid: Uuid): ContentReference
|
getReference(uuid: string): ContentReference
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { SyncResolvedParams, SyncResolvedPayload } from './../../../Runtime/Deltas/Utilities/SyncResolvedPayload'
|
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 { ItemContent } from '../../Content/ItemContent'
|
||||||
import { TransferPayload } from '../../TransferPayload/Interfaces/TransferPayload'
|
import { TransferPayload } from '../../TransferPayload/Interfaces/TransferPayload'
|
||||||
import { PayloadSource } from '../Types/PayloadSource'
|
import { PayloadSource } from '../Types/PayloadSource'
|
||||||
|
|
||||||
export interface PayloadInterface<T extends TransferPayload = TransferPayload, C extends ItemContent = ItemContent> {
|
export interface PayloadInterface<T extends TransferPayload = TransferPayload, C extends ItemContent = ItemContent> {
|
||||||
readonly source: PayloadSource
|
readonly source: PayloadSource
|
||||||
readonly uuid: Uuid
|
readonly uuid: string
|
||||||
readonly content_type: ContentType
|
readonly content_type: ContentType
|
||||||
content: C | string | undefined
|
content: C | string | undefined
|
||||||
deleted: boolean
|
deleted: boolean
|
||||||
@@ -26,7 +26,7 @@ export interface PayloadInterface<T extends TransferPayload = TransferPayload, C
|
|||||||
readonly lastSyncBegan?: Date
|
readonly lastSyncBegan?: Date
|
||||||
readonly lastSyncEnd?: Date
|
readonly lastSyncEnd?: Date
|
||||||
|
|
||||||
readonly duplicate_of?: Uuid
|
readonly duplicate_of?: string
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "Ejected" means a payload for
|
* "Ejected" means a payload for
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { ContentType, Uuid } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
import { ItemContent } from '../../Content/ItemContent'
|
import { ItemContent } from '../../Content/ItemContent'
|
||||||
|
|
||||||
export interface TransferPayload<C extends ItemContent = ItemContent> {
|
export interface TransferPayload<C extends ItemContent = ItemContent> {
|
||||||
uuid: Uuid
|
uuid: string
|
||||||
content_type: ContentType
|
content_type: ContentType
|
||||||
content: C | string | undefined
|
content: C | string | undefined
|
||||||
deleted?: boolean
|
deleted?: boolean
|
||||||
@@ -19,5 +19,5 @@ export interface TransferPayload<C extends ItemContent = ItemContent> {
|
|||||||
lastSyncBegan?: Date
|
lastSyncBegan?: Date
|
||||||
lastSyncEnd?: Date
|
lastSyncEnd?: Date
|
||||||
|
|
||||||
duplicate_of?: Uuid
|
duplicate_of?: string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { extendArray, isObject, isString, UuidMap } from '@standardnotes/utils'
|
import { extendArray, isObject, isString, UuidMap } from '@standardnotes/utils'
|
||||||
import { ContentType, Uuid } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
import { remove } from 'lodash'
|
import { remove } from 'lodash'
|
||||||
import { ItemContent } from '../../Abstract/Content/ItemContent'
|
import { ItemContent } from '../../Abstract/Content/ItemContent'
|
||||||
import { ContentReference } from '../../Abstract/Item'
|
import { ContentReference } from '../../Abstract/Item'
|
||||||
|
|
||||||
export interface CollectionElement {
|
export interface CollectionElement {
|
||||||
uuid: Uuid
|
uuid: string
|
||||||
content_type: ContentType
|
content_type: ContentType
|
||||||
dirty?: boolean
|
dirty?: boolean
|
||||||
deleted?: boolean
|
deleted?: boolean
|
||||||
@@ -32,17 +32,17 @@ export abstract class Collection<
|
|||||||
Encrypted extends EncryptedCollectionElement,
|
Encrypted extends EncryptedCollectionElement,
|
||||||
Deleted extends DeletedCollectionElement,
|
Deleted extends DeletedCollectionElement,
|
||||||
> {
|
> {
|
||||||
readonly map: Partial<Record<Uuid, Element>> = {}
|
readonly map: Partial<Record<string, Element>> = {}
|
||||||
readonly typedMap: Partial<Record<ContentType, Element[]>> = {}
|
readonly typedMap: Partial<Record<ContentType, Element[]>> = {}
|
||||||
|
|
||||||
/** An array of uuids of items that are dirty */
|
/** An array of uuids of items that are dirty */
|
||||||
dirtyIndex: Set<Uuid> = new Set()
|
dirtyIndex: Set<string> = new Set()
|
||||||
|
|
||||||
/** An array of uuids of items that are not marked as deleted */
|
/** An array of uuids of items that are not marked as deleted */
|
||||||
nondeletedIndex: Set<Uuid> = new Set()
|
nondeletedIndex: Set<string> = new Set()
|
||||||
|
|
||||||
/** An array of uuids of items that are errorDecrypting or waitingForKey */
|
/** An array of uuids of items that are errorDecrypting or waitingForKey */
|
||||||
invalidsIndex: Set<Uuid> = new Set()
|
invalidsIndex: Set<string> = new Set()
|
||||||
|
|
||||||
readonly referenceMap: UuidMap
|
readonly referenceMap: UuidMap
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ export abstract class Collection<
|
|||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
copy = false,
|
copy = false,
|
||||||
mapCopy?: Partial<Record<Uuid, Element>>,
|
mapCopy?: Partial<Record<string, Element>>,
|
||||||
typedMapCopy?: Partial<Record<ContentType, Element[]>>,
|
typedMapCopy?: Partial<Record<ContentType, Element[]>>,
|
||||||
referenceMapCopy?: UuidMap,
|
referenceMapCopy?: UuidMap,
|
||||||
conflictMapCopy?: UuidMap,
|
conflictMapCopy?: UuidMap,
|
||||||
@@ -89,7 +89,7 @@ export abstract class Collection<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public uuids(): Uuid[] {
|
public uuids(): string[] {
|
||||||
return Object.keys(this.map)
|
return Object.keys(this.map)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ export abstract class Collection<
|
|||||||
return this.typedMap[contentType]?.slice() || []
|
return this.typedMap[contentType]?.slice() || []
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Object.keys(this.map).map((uuid: Uuid) => {
|
return Object.keys(this.map).map((uuid: string) => {
|
||||||
return this.map[uuid]
|
return this.map[uuid]
|
||||||
}) as Element[]
|
}) as Element[]
|
||||||
}
|
}
|
||||||
@@ -129,7 +129,7 @@ export abstract class Collection<
|
|||||||
return this.findAll(uuids)
|
return this.findAll(uuids)
|
||||||
}
|
}
|
||||||
|
|
||||||
public findAll(uuids: Uuid[]): Element[] {
|
public findAll(uuids: string[]): Element[] {
|
||||||
const results: Element[] = []
|
const results: Element[] = []
|
||||||
|
|
||||||
for (const id of uuids) {
|
for (const id of uuids) {
|
||||||
@@ -142,11 +142,11 @@ export abstract class Collection<
|
|||||||
return results
|
return results
|
||||||
}
|
}
|
||||||
|
|
||||||
public find(uuid: Uuid): Element | undefined {
|
public find(uuid: string): Element | undefined {
|
||||||
return this.map[uuid]
|
return this.map[uuid]
|
||||||
}
|
}
|
||||||
|
|
||||||
public has(uuid: Uuid): boolean {
|
public has(uuid: string): boolean {
|
||||||
return this.find(uuid) != undefined
|
return this.find(uuid) != undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ export abstract class Collection<
|
|||||||
* If an item is not found, an `undefined` element
|
* If an item is not found, an `undefined` element
|
||||||
* will be inserted into the array.
|
* will be inserted into the array.
|
||||||
*/
|
*/
|
||||||
public findAllIncludingBlanks<E extends Element>(uuids: Uuid[]): (E | Deleted | undefined)[] {
|
public findAllIncludingBlanks<E extends Element>(uuids: string[]): (E | Deleted | undefined)[] {
|
||||||
const results: (E | Deleted | undefined)[] = []
|
const results: (E | Deleted | undefined)[] = []
|
||||||
|
|
||||||
for (const id of uuids) {
|
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)
|
return this.referenceMap.getDirectRelationships(uuid)
|
||||||
}
|
}
|
||||||
|
|
||||||
public uuidsThatReferenceUuid(uuid: Uuid): Uuid[] {
|
public uuidsThatReferenceUuid(uuid: string): string[] {
|
||||||
return this.referenceMap.getInverseRelationships(uuid)
|
return this.referenceMap.getInverseRelationships(uuid)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ export abstract class Collection<
|
|||||||
return this.findAll(uuids)
|
return this.findAll(uuids)
|
||||||
}
|
}
|
||||||
|
|
||||||
public conflictsOf(uuid: Uuid): Element[] {
|
public conflictsOf(uuid: string): Element[] {
|
||||||
const uuids = this.conflictMap.getDirectRelationships(uuid)
|
const uuids = this.conflictMap.getDirectRelationships(uuid)
|
||||||
return this.findAll(uuids)
|
return this.findAll(uuids)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Uuid, ContentType } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
|
|
||||||
export interface SortableItem {
|
export interface SortableItem {
|
||||||
uuid: Uuid
|
uuid: string
|
||||||
content_type: ContentType
|
content_type: ContentType
|
||||||
created_at: Date
|
created_at: Date
|
||||||
userModifiedDate: Date
|
userModifiedDate: Date
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { ItemContent } from './../../../Abstract/Content/ItemContent'
|
import { ItemContent } from './../../../Abstract/Content/ItemContent'
|
||||||
import { EncryptedItemInterface } from './../../../Abstract/Item/Interfaces/EncryptedItem'
|
import { EncryptedItemInterface } from './../../../Abstract/Item/Interfaces/EncryptedItem'
|
||||||
import { ContentType, Uuid } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
import { SNIndex } from '../../Index/SNIndex'
|
import { SNIndex } from '../../Index/SNIndex'
|
||||||
import { isDecryptedItem } from '../../../Abstract/Item/Interfaces/TypeCheck'
|
import { isDecryptedItem } from '../../../Abstract/Item/Interfaces/TypeCheck'
|
||||||
import { DecryptedItemInterface } from '../../../Abstract/Item/Interfaces/DecryptedItem'
|
import { DecryptedItemInterface } from '../../../Abstract/Item/Interfaces/DecryptedItem'
|
||||||
@@ -24,7 +24,7 @@ export class ItemCollection
|
|||||||
this.discard(delta.discarded)
|
this.discard(delta.discarded)
|
||||||
}
|
}
|
||||||
|
|
||||||
public findDecrypted<T extends DecryptedItemInterface = DecryptedItemInterface>(uuid: Uuid): T | undefined {
|
public findDecrypted<T extends DecryptedItemInterface = DecryptedItemInterface>(uuid: string): T | undefined {
|
||||||
const result = this.find(uuid)
|
const result = this.find(uuid)
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
@@ -34,12 +34,12 @@ export class ItemCollection
|
|||||||
return isDecryptedItem(result) ? (result as T) : undefined
|
return isDecryptedItem(result) ? (result as T) : undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
public findAllDecrypted<T extends DecryptedItemInterface = DecryptedItemInterface>(uuids: Uuid[]): T[] {
|
public findAllDecrypted<T extends DecryptedItemInterface = DecryptedItemInterface>(uuids: string[]): T[] {
|
||||||
return this.findAll(uuids).filter(isDecryptedItem) as T[]
|
return this.findAll(uuids).filter(isDecryptedItem) as T[]
|
||||||
}
|
}
|
||||||
|
|
||||||
public findAllDecryptedWithBlanks<C extends ItemContent = ItemContent>(
|
public findAllDecryptedWithBlanks<C extends ItemContent = ItemContent>(
|
||||||
uuids: Uuid[],
|
uuids: string[],
|
||||||
): (DecryptedItemInterface<C> | undefined)[] {
|
): (DecryptedItemInterface<C> | undefined)[] {
|
||||||
const results = this.findAllIncludingBlanks(uuids)
|
const results = this.findAllIncludingBlanks(uuids)
|
||||||
const mapped = results.map((i) => {
|
const mapped = results.map((i) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { removeFromArray } from '@standardnotes/utils'
|
import { removeFromArray } from '@standardnotes/utils'
|
||||||
import { ContentType, Uuid } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
import { isTag, SNTag } from '../../../Syncable/Tag/Tag'
|
import { isTag, SNTag } from '../../../Syncable/Tag/Tag'
|
||||||
import { SNIndex } from '../../Index/SNIndex'
|
import { SNIndex } from '../../Index/SNIndex'
|
||||||
import { ItemCollection } from './ItemCollection'
|
import { ItemCollection } from './ItemCollection'
|
||||||
@@ -7,12 +7,12 @@ import { ItemDelta } from '../../Index/ItemDelta'
|
|||||||
import { isDecryptedItem, ItemInterface } from '../../../Abstract/Item'
|
import { isDecryptedItem, ItemInterface } from '../../../Abstract/Item'
|
||||||
|
|
||||||
type AllNotesUuidSignifier = undefined
|
type AllNotesUuidSignifier = undefined
|
||||||
export type TagItemCountChangeObserver = (tagUuid: Uuid | AllNotesUuidSignifier) => void
|
export type TagItemCountChangeObserver = (tagUuid: string | AllNotesUuidSignifier) => void
|
||||||
|
|
||||||
export class TagItemsIndex implements SNIndex {
|
export class TagItemsIndex implements SNIndex {
|
||||||
private tagToItemsMap: Partial<Record<Uuid, Set<Uuid>>> = {}
|
private tagToItemsMap: Partial<Record<string, Set<string>>> = {}
|
||||||
private allCountableItems = new Set<Uuid>()
|
private allCountableItems = new Set<string>()
|
||||||
private countableItemsByType = new Map<ContentType, Set<Uuid>>()
|
private countableItemsByType = new Map<ContentType, Set<string>>()
|
||||||
|
|
||||||
constructor(private collection: ItemCollection, public observers: TagItemCountChangeObserver[] = []) {}
|
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) {
|
for (const observer of this.observers) {
|
||||||
observer(tagUuid)
|
observer(tagUuid)
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ export class TagItemsIndex implements SNIndex {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private setForTag(uuid: Uuid): Set<Uuid> {
|
private setForTag(uuid: string): Set<string> {
|
||||||
let set = this.tagToItemsMap[uuid]
|
let set = this.tagToItemsMap[uuid]
|
||||||
if (!set) {
|
if (!set) {
|
||||||
set = new Set()
|
set = new Set()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { ImmutablePayloadCollection } from './../Collection/Payload/ImmutablePay
|
|||||||
import { ConflictDelta } from './Conflict'
|
import { ConflictDelta } from './Conflict'
|
||||||
import { isErrorDecryptingPayload, isDecryptedPayload } from '../../Abstract/Payload/Interfaces/TypeCheck'
|
import { isErrorDecryptingPayload, isDecryptedPayload } from '../../Abstract/Payload/Interfaces/TypeCheck'
|
||||||
import { FullyFormedPayloadInterface, PayloadEmitSource } from '../../Abstract/Payload'
|
import { FullyFormedPayloadInterface, PayloadEmitSource } from '../../Abstract/Payload'
|
||||||
import { ContentType, Uuid } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
import { HistoryMap } from '../History'
|
import { HistoryMap } from '../History'
|
||||||
import { ServerSyncPushContextualPayload } from '../../Abstract/Contextual/ServerSyncPush'
|
import { ServerSyncPushContextualPayload } from '../../Abstract/Contextual/ServerSyncPush'
|
||||||
import { payloadByFinalizingSyncState } from './Utilities/ApplyDirtyState'
|
import { payloadByFinalizingSyncState } from './Utilities/ApplyDirtyState'
|
||||||
@@ -18,7 +18,7 @@ export class DeltaRemoteRetrieved implements SyncDeltaInterface {
|
|||||||
readonly historyMap: HistoryMap,
|
readonly historyMap: HistoryMap,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
private isUuidOfPayloadCurrentlySavingOrSaved(uuid: Uuid): boolean {
|
private isUuidOfPayloadCurrentlySavingOrSaved(uuid: string): boolean {
|
||||||
return this.itemsSavedOrSaving.find((i) => i.uuid === uuid) != undefined
|
return this.itemsSavedOrSaving.find((i) => i.uuid === uuid) != undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { DecryptedItemInterface } from '../../Abstract/Item'
|
import { DecryptedItemInterface } from '../../Abstract/Item'
|
||||||
import { SortableItem } from '../Collection/CollectionSort'
|
import { SortableItem } from '../Collection/CollectionSort'
|
||||||
import { ItemCollection } from '../Collection/Item/ItemCollection'
|
import { ItemCollection } from '../Collection/Item/ItemCollection'
|
||||||
|
|
||||||
export type DisplayControllerCustomFilter = (element: DisplayItem) => boolean
|
export type DisplayControllerCustomFilter = (element: DisplayItem) => boolean
|
||||||
export type UuidToSortedPositionMap = Record<Uuid, number>
|
export type UuidToSortedPositionMap = Record<string, number>
|
||||||
export type DisplayItem = SortableItem & DecryptedItemInterface
|
export type DisplayItem = SortableItem & DecryptedItemInterface
|
||||||
|
|
||||||
export interface ReadonlyItemCollection {
|
export interface ReadonlyItemCollection {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { HistoryEntry } from './HistoryEntry'
|
import { HistoryEntry } from './HistoryEntry'
|
||||||
|
|
||||||
export type HistoryMap = Record<Uuid, HistoryEntry[]>
|
export type HistoryMap = Record<string, HistoryEntry[]>
|
||||||
|
|
||||||
export const historyMapFunctions = {
|
export const historyMapFunctions = {
|
||||||
getNewestRevision: (history: HistoryEntry[]): HistoryEntry | undefined => {
|
getNewestRevision: (history: HistoryEntry[]): HistoryEntry | undefined => {
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ describe('component model', () => {
|
|||||||
expect(component.noteType).toEqual(NoteType.Authentication)
|
expect(component.noteType).toEqual(NoteType.Authentication)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should return plain as noteType if no note type defined in package_info', () => {
|
it('should return unknown as noteType if no note type defined in package_info', () => {
|
||||||
const component = new SNComponent(
|
const component = new SNComponent(
|
||||||
new DecryptedPayload(
|
new DecryptedPayload(
|
||||||
{
|
{
|
||||||
@@ -83,6 +83,6 @@ describe('component model', () => {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(component.noteType).toEqual(NoteType.Plain)
|
expect(component.noteType).toEqual(NoteType.Unknown)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { isValidUrl } from '@standardnotes/utils'
|
import { isValidUrl } from '@standardnotes/utils'
|
||||||
import { ContentType, Uuid } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
import {
|
import {
|
||||||
FeatureIdentifier,
|
FeatureIdentifier,
|
||||||
ThirdPartyFeatureDescription,
|
ThirdPartyFeatureDescription,
|
||||||
@@ -159,11 +159,11 @@ export class SNComponent extends DecryptedItem<ComponentContent> implements Comp
|
|||||||
return SNComponent.associativeAreas().includes(this.area)
|
return SNComponent.associativeAreas().includes(this.area)
|
||||||
}
|
}
|
||||||
|
|
||||||
public isExplicitlyEnabledForItem(uuid: Uuid): boolean {
|
public isExplicitlyEnabledForItem(uuid: string): boolean {
|
||||||
return this.associatedItemIds.indexOf(uuid) !== -1
|
return this.associatedItemIds.indexOf(uuid) !== -1
|
||||||
}
|
}
|
||||||
|
|
||||||
public isExplicitlyDisabledForItem(uuid: Uuid): boolean {
|
public isExplicitlyDisabledForItem(uuid: string): boolean {
|
||||||
return this.disassociatedItemIds.indexOf(uuid) !== -1
|
return this.disassociatedItemIds.indexOf(uuid) !== -1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ export class SNComponent extends DecryptedItem<ComponentContent> implements Comp
|
|||||||
}
|
}
|
||||||
|
|
||||||
public get noteType(): NoteType {
|
public get noteType(): NoteType {
|
||||||
return this.package_info.note_type || NoteType.Plain
|
return this.package_info.note_type || NoteType.Unknown
|
||||||
}
|
}
|
||||||
|
|
||||||
public get isDeprecated(): boolean {
|
public get isDeprecated(): boolean {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { ComponentArea, ComponentPermission } from '@standardnotes/features'
|
import { ComponentArea, ComponentPermission } from '@standardnotes/features'
|
||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { ItemContent } from '../../Abstract/Content/ItemContent'
|
import { ItemContent } from '../../Abstract/Content/ItemContent'
|
||||||
import { ComponentPackageInfo } from './PackageInfo'
|
import { ComponentPackageInfo } from './PackageInfo'
|
||||||
|
|
||||||
@@ -30,7 +29,7 @@ export interface ComponentInterface {
|
|||||||
legacy_url?: string
|
legacy_url?: string
|
||||||
isMobileDefault: boolean
|
isMobileDefault: boolean
|
||||||
isDeprecated: boolean
|
isDeprecated: boolean
|
||||||
isExplicitlyEnabledForItem(uuid: Uuid): boolean
|
isExplicitlyEnabledForItem(uuid: string): boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ComponentContent = ComponentInterface & ItemContent
|
export type ComponentContent = ComponentInterface & ItemContent
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { addIfUnique, removeFromArray } from '@standardnotes/utils'
|
import { addIfUnique, removeFromArray } from '@standardnotes/utils'
|
||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { ComponentPermission, FeatureDescription } from '@standardnotes/features'
|
import { ComponentPermission, FeatureDescription } from '@standardnotes/features'
|
||||||
import { AppDataField } from '../../Abstract/Item/Types/AppDataField'
|
import { AppDataField } from '../../Abstract/Item/Types/AppDataField'
|
||||||
import { ComponentContent } from './ComponentContent'
|
import { ComponentContent } from './ComponentContent'
|
||||||
@@ -46,23 +45,23 @@ export class ComponentMutator extends DecryptedItemMutator<ComponentContent> {
|
|||||||
this.mutableContent.offlineOnly = offlineOnly
|
this.mutableContent.offlineOnly = offlineOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
public associateWithItem(uuid: Uuid): void {
|
public associateWithItem(uuid: string): void {
|
||||||
const associated = this.mutableContent.associatedItemIds || []
|
const associated = this.mutableContent.associatedItemIds || []
|
||||||
addIfUnique(associated, uuid)
|
addIfUnique(associated, uuid)
|
||||||
this.mutableContent.associatedItemIds = associated
|
this.mutableContent.associatedItemIds = associated
|
||||||
}
|
}
|
||||||
|
|
||||||
public disassociateWithItem(uuid: Uuid): void {
|
public disassociateWithItem(uuid: string): void {
|
||||||
const disassociated = this.mutableContent.disassociatedItemIds || []
|
const disassociated = this.mutableContent.disassociatedItemIds || []
|
||||||
addIfUnique(disassociated, uuid)
|
addIfUnique(disassociated, uuid)
|
||||||
this.mutableContent.disassociatedItemIds = disassociated
|
this.mutableContent.disassociatedItemIds = disassociated
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeAssociatedItemId(uuid: Uuid): void {
|
public removeAssociatedItemId(uuid: string): void {
|
||||||
removeFromArray(this.mutableContent.associatedItemIds || [], uuid)
|
removeFromArray(this.mutableContent.associatedItemIds || [], uuid)
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeDisassociatedItemId(uuid: Uuid): void {
|
public removeDisassociatedItemId(uuid: string): void {
|
||||||
removeFromArray(this.mutableContent.disassociatedItemIds || [], uuid)
|
removeFromArray(this.mutableContent.disassociatedItemIds || [], uuid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { VectorIconNameOrEmoji, IconType } from './../../Utilities/Icon/IconType'
|
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 { DecryptedItem } from '../../Abstract/Item/Implementations/DecryptedItem'
|
||||||
import { ItemInterface } from '../../Abstract/Item/Interfaces/ItemInterface'
|
import { ItemInterface } from '../../Abstract/Item/Interfaces/ItemInterface'
|
||||||
import { ContentReference } from '../../Abstract/Reference/ContentReference'
|
import { ContentReference } from '../../Abstract/Reference/ContentReference'
|
||||||
@@ -41,7 +41,7 @@ export class SNTag extends DecryptedItem<TagContent> implements TagContentSpecia
|
|||||||
return this.noteReferences.length
|
return this.noteReferences.length
|
||||||
}
|
}
|
||||||
|
|
||||||
public get parentId(): Uuid | undefined {
|
public get parentId(): string | undefined {
|
||||||
const reference = this.references.find(isTagToParentTagReference)
|
const reference = this.references.find(isTagToParentTagReference)
|
||||||
return reference?.uuid
|
return reference?.uuid
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { ItemInterface } from '../../Abstract/Item/Interfaces/ItemInterface'
|
import { ItemInterface } from '../../Abstract/Item/Interfaces/ItemInterface'
|
||||||
|
|
||||||
export function FindItem<I extends ItemInterface = ItemInterface>(items: I[], uuid: Uuid): I | undefined {
|
export function FindItem<I extends ItemInterface = ItemInterface>(items: I[], uuid: string): I | undefined {
|
||||||
return items.find((item) => item.uuid === uuid)
|
return items.find((item) => item.uuid === uuid)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SureFindItem<I extends ItemInterface = ItemInterface>(items: I[], uuid: Uuid): I {
|
export function SureFindItem<I extends ItemInterface = ItemInterface>(items: I[], uuid: string): I {
|
||||||
return FindItem(items, uuid) as I
|
return FindItem(items, uuid) as I
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { PayloadInterface } from '../../Abstract/Payload/Interfaces/PayloadInterface'
|
import { PayloadInterface } from '../../Abstract/Payload/Interfaces/PayloadInterface'
|
||||||
|
|
||||||
export function FindPayload<P extends PayloadInterface = PayloadInterface>(payloads: P[], uuid: Uuid): P | undefined {
|
export function FindPayload<P extends PayloadInterface = PayloadInterface>(payloads: P[], uuid: string): P | undefined {
|
||||||
return payloads.find((payload) => payload.uuid === uuid)
|
return payloads.find((payload) => payload.uuid === uuid)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function SureFindPayload<P extends PayloadInterface = PayloadInterface>(payloads: P[], uuid: Uuid): P {
|
export function SureFindPayload<P extends PayloadInterface = PayloadInterface>(payloads: P[], uuid: string): P {
|
||||||
return FindPayload(payloads, uuid) as P
|
return FindPayload(payloads, uuid) as P
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
import { remove } from 'lodash'
|
import { remove } from 'lodash'
|
||||||
import { ImmutablePayloadCollection } from '../../Runtime/Collection/Payload/ImmutablePayloadCollection'
|
import { ImmutablePayloadCollection } from '../../Runtime/Collection/Payload/ImmutablePayloadCollection'
|
||||||
import { ContentReference } from '../../Abstract/Reference/ContentReference'
|
import { ContentReference } from '../../Abstract/Reference/ContentReference'
|
||||||
@@ -12,7 +11,7 @@ export function PayloadsByUpdatingReferencingPayloadReferences(
|
|||||||
payload: DecryptedPayloadInterface,
|
payload: DecryptedPayloadInterface,
|
||||||
baseCollection: ImmutablePayloadCollection<FullyFormedPayloadInterface>,
|
baseCollection: ImmutablePayloadCollection<FullyFormedPayloadInterface>,
|
||||||
add: FullyFormedPayloadInterface[] = [],
|
add: FullyFormedPayloadInterface[] = [],
|
||||||
removeIds: Uuid[] = [],
|
removeIds: string[] = [],
|
||||||
): SyncResolvedPayload[] {
|
): SyncResolvedPayload[] {
|
||||||
const referencingPayloads = baseCollection.elementsReferencingElement(payload).filter(isDecryptedPayload)
|
const referencingPayloads = baseCollection.elementsReferencingElement(payload).filter(isDecryptedPayload)
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.4.123](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.122...@standardnotes/releases@1.4.123) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/releases
|
||||||
|
|
||||||
|
## [1.4.122](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.121...@standardnotes/releases@1.4.122) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/releases
|
||||||
|
|
||||||
|
## [1.4.121](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.120...@standardnotes/releases@1.4.121) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/releases
|
||||||
|
|
||||||
|
## [1.4.120](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.119...@standardnotes/releases@1.4.120) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/releases
|
||||||
|
|
||||||
|
## [1.4.119](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.118...@standardnotes/releases@1.4.119) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/releases
|
||||||
|
|
||||||
|
## [1.4.118](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.117...@standardnotes/releases@1.4.118) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/releases
|
||||||
|
|
||||||
|
## [1.4.117](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.116...@standardnotes/releases@1.4.117) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/releases
|
||||||
|
|
||||||
## [1.4.116](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.115...@standardnotes/releases@1.4.116) (2023-01-18)
|
## [1.4.116](https://github.com/standardnotes/app/compare/@standardnotes/releases@1.4.115...@standardnotes/releases@1.4.116) (2023-01-18)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/releases
|
**Note:** Version bump only for package @standardnotes/releases
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/releases",
|
"name": "@standardnotes/releases",
|
||||||
"version": "1.4.116",
|
"version": "1.4.123",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"main": "dist/releases.json",
|
"main": "dist/releases.json",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.13.5](https://github.com/standardnotes/app/compare/@standardnotes/responses@1.13.4...@standardnotes/responses@1.13.5) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/responses
|
||||||
|
|
||||||
|
## [1.13.4](https://github.com/standardnotes/app/compare/@standardnotes/responses@1.13.3...@standardnotes/responses@1.13.4) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/responses
|
||||||
|
|
||||||
|
## [1.13.3](https://github.com/standardnotes/app/compare/@standardnotes/responses@1.13.2...@standardnotes/responses@1.13.3) (2023-01-20)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/responses
|
||||||
|
|
||||||
|
## [1.13.2](https://github.com/standardnotes/app/compare/@standardnotes/responses@1.13.1...@standardnotes/responses@1.13.2) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/responses
|
||||||
|
|
||||||
|
## [1.13.1](https://github.com/standardnotes/app/compare/@standardnotes/responses@1.13.0...@standardnotes/responses@1.13.1) (2023-01-19)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/responses
|
||||||
|
|
||||||
# [1.13.0](https://github.com/standardnotes/app/compare/@standardnotes/responses@1.12.13...@standardnotes/responses@1.13.0) (2023-01-18)
|
# [1.13.0](https://github.com/standardnotes/app/compare/@standardnotes/responses@1.12.13...@standardnotes/responses@1.13.0) (2023-01-18)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/responses",
|
"name": "@standardnotes/responses",
|
||||||
"version": "1.13.0",
|
"version": "1.13.5",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0 <17.0.0"
|
"node": ">=16.0.0 <17.0.0"
|
||||||
},
|
},
|
||||||
@@ -33,9 +33,9 @@
|
|||||||
"typescript": "*"
|
"typescript": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@standardnotes/common": "^1.45.0",
|
"@standardnotes/common": "^1.46.4",
|
||||||
"@standardnotes/features": "workspace:*",
|
"@standardnotes/features": "workspace:*",
|
||||||
"@standardnotes/security": "^1.7.0",
|
"@standardnotes/security": "^1.7.5",
|
||||||
"reflect-metadata": "^0.1.13"
|
"reflect-metadata": "^0.1.13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { Role } from '@standardnotes/security'
|
import { Role } from '@standardnotes/security'
|
||||||
import { Uuid } from '@standardnotes/common'
|
|
||||||
|
|
||||||
export type ResponseMeta = {
|
export type ResponseMeta = {
|
||||||
auth: {
|
auth: {
|
||||||
userUuid?: Uuid
|
userUuid?: string
|
||||||
roles?: Role[]
|
roles?: Role[]
|
||||||
}
|
}
|
||||||
server: {
|
server: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { MicrosecondsTimestamp, Uuid } from '@standardnotes/common'
|
import { MicrosecondsTimestamp } from '@standardnotes/common'
|
||||||
|
|
||||||
export type IntegrityPayload = {
|
export type IntegrityPayload = {
|
||||||
uuid: Uuid
|
uuid: string
|
||||||
updated_at_timestamp: MicrosecondsTimestamp
|
updated_at_timestamp: MicrosecondsTimestamp
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ContentType, Uuid } from '@standardnotes/common'
|
import { ContentType } from '@standardnotes/common'
|
||||||
|
|
||||||
export interface ServerItemResponse {
|
export interface ServerItemResponse {
|
||||||
content_type: ContentType
|
content_type: ContentType
|
||||||
@@ -6,7 +6,7 @@ export interface ServerItemResponse {
|
|||||||
created_at_timestamp: number
|
created_at_timestamp: number
|
||||||
created_at: Date
|
created_at: Date
|
||||||
deleted: boolean
|
deleted: boolean
|
||||||
duplicate_of?: Uuid
|
duplicate_of?: string
|
||||||
enc_item_key: string
|
enc_item_key: string
|
||||||
items_key_id?: string
|
items_key_id?: string
|
||||||
updated_at_timestamp: number
|
updated_at_timestamp: number
|
||||||
|
|||||||
@@ -4,5 +4,6 @@ import { MinimalHttpResponse } from '../Http/MinimalHttpResponses'
|
|||||||
export type GetOfflineFeaturesResponse = MinimalHttpResponse & {
|
export type GetOfflineFeaturesResponse = MinimalHttpResponse & {
|
||||||
data?: {
|
data?: {
|
||||||
features: FeatureDescription[]
|
features: FeatureDescription[]
|
||||||
|
roles: string[]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user