refactor: remove Uuid and RoleName from @standardnotes/common in favour of @standardnotes/domain-core value objects (#2167)

This commit is contained in:
Karol Sójko
2023-01-19 16:17:59 +01:00
committed by GitHub
parent 2d63b7431a
commit 856a7e3500
108 changed files with 319 additions and 374 deletions

View File

@@ -1,4 +1,3 @@
import { Uuid } from '@standardnotes/common'
import { Copy } from '@standardnotes/utils'
import { SyncResolvedParams, SyncResolvedPayload } from '../../../Runtime/Deltas/Utilities/SyncResolvedPayload'
import { FillItemContent, ItemContent } from '../../Content/ItemContent'
@@ -29,7 +28,7 @@ export class DecryptedPayload<
return this.content.references || []
}
public getReference(uuid: Uuid): ContentReference {
public getReference(uuid: string): ContentReference {
const result = this.references.find((ref) => ref.uuid === uuid)
if (!result) {

View File

@@ -1,4 +1,3 @@
import { Uuid } from '@standardnotes/common'
import { DecryptedTransferPayload } from './../../TransferPayload/Interfaces/DecryptedTransferPayload'
import { ItemContent } from '../../Content/ItemContent'
import { ContentReference } from '../../Reference/ContentReference'
@@ -11,5 +10,5 @@ export interface DecryptedPayloadInterface<C extends ItemContent = ItemContent>
ejected(): DecryptedTransferPayload<C>
get references(): ContentReference[]
getReference(uuid: Uuid): ContentReference
getReference(uuid: string): ContentReference
}

View File

@@ -1,12 +1,12 @@
import { SyncResolvedParams, SyncResolvedPayload } from './../../../Runtime/Deltas/Utilities/SyncResolvedPayload'
import { ContentType, Uuid } from '@standardnotes/common'
import { ContentType } from '@standardnotes/common'
import { ItemContent } from '../../Content/ItemContent'
import { TransferPayload } from '../../TransferPayload/Interfaces/TransferPayload'
import { PayloadSource } from '../Types/PayloadSource'
export interface PayloadInterface<T extends TransferPayload = TransferPayload, C extends ItemContent = ItemContent> {
readonly source: PayloadSource
readonly uuid: Uuid
readonly uuid: string
readonly content_type: ContentType
content: C | string | undefined
deleted: boolean
@@ -26,7 +26,7 @@ export interface PayloadInterface<T extends TransferPayload = TransferPayload, C
readonly lastSyncBegan?: Date
readonly lastSyncEnd?: Date
readonly duplicate_of?: Uuid
readonly duplicate_of?: string
/**
* "Ejected" means a payload for