@tearleads/client-sdk 0.1.239 → 0.1.240
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/documents/shared/types.d.ts +5 -1
- package/data/documents/shared/types.js.map +1 -1
- package/data/persistence/documents/documentAttachmentPresence.js +44 -0
- package/data/persistence/documents/documentAttachmentPresence.js.map +1 -0
- package/internal/validators/operation/containerMutations.d.ts +16 -16
- package/internal/validators/operation/documentMutations.d.ts +20 -20
- package/internal/validators/response/containerMutationError.d.ts +2 -2
- package/internal/validators/response/documentMutationError.d.ts +3 -2
- package/internal/validators/response/documentMutationError.js +5 -0
- package/internal/validators/response/documentMutationError.js.map +1 -1
- package/package.json +1 -1
- package/workflows/documents/linkSet/linkSetBlobRewraps.d.ts +10 -4
- package/workflows/documents/linkSet/linkSetBlobRewraps.js +23 -11
- package/workflows/documents/linkSet/linkSetBlobRewraps.js.map +1 -1
- package/workflows/documents/linkSet/linkSetLegMachine.js +74 -0
- package/workflows/documents/linkSet/linkSetLegMachine.js.map +1 -0
- package/workflows/documents/linkSet/linkSetRemote.d.ts +4 -4
- package/workflows/documents/linkSet/linkSetRemote.js +96 -52
- package/workflows/documents/linkSet/linkSetRemote.js.map +1 -1
|
@@ -126,10 +126,14 @@ type DocumentLinkSetMutationResult = {
|
|
|
126
126
|
readonly ok: true;
|
|
127
127
|
} | (DocumentLinkSetMutationFailure & {
|
|
128
128
|
readonly ok: false;
|
|
129
|
+
/** The host report a `reportErrors: false` request withheld. */
|
|
130
|
+
readonly report?: (() => void) | undefined;
|
|
129
131
|
});
|
|
130
132
|
export interface DocumentLinkSetMutationApi {
|
|
131
133
|
getBlobBytes(blobId: string): Promise<BlobBytesResponse | null>;
|
|
132
|
-
listDocumentAttachments(documentId: string
|
|
134
|
+
listDocumentAttachments(documentId: string, options?: {
|
|
135
|
+
readonly refresh?: boolean;
|
|
136
|
+
}): Promise<ListDocumentAttachmentsResponse | null>;
|
|
133
137
|
getContainerWriterProjection(containerId: string): Promise<ContainerWriterProjectionResponse | null>;
|
|
134
138
|
getContainerWriterProjectionResult(containerId: string, options?: DocumentSyncRequestResultOptions | undefined): Promise<{
|
|
135
139
|
readonly data: ContainerWriterProjectionResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,MAAM,qCAAqC,GAChD,gCAAgC,CAAC;AACnC,MAAM,CAAC,MAAM,uCAAuC,GAClD,4CAA4C,CAAC;AAC/C,MAAM,CAAC,MAAM,sDAAsD,GACjE,2DAA2D,CAAC;AAC9D,MAAM,CAAC,MAAM,kCAAkC,GAC7C,uCAAuC,CAAC;AAC1C,MAAM,CAAC,MAAM,iCAAiC,GAC5C,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,6CAA6C,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,GAAG,CAAC;IACpD,YAAY;IACZ,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,QAAQ;IACR,IAAI;IACJ,cAAc;IACd,iBAAiB;IACjB,SAAS;CACV,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC","sourcesContent":["import type { BlobBytesResponse } from \"@tearleads/api-client\";\nimport type {\n AccessEvent,\n AccessManifest,\n DocumentContentKeyTarget,\n DocumentLinkAccessEventBody,\n DocumentLinkSetManifestState,\n DocumentUnlinkAccessEventBody,\n} from \"@tearleads/crypto\";\nimport type {\n ContainerManifestRef,\n DocumentContentKeyTargetEnvelope,\n DocumentCreateRequest,\n DocumentLinkSetMutationRequest,\n DocumentSyncRequest,\n} from \"@tearleads/validators/request\";\nimport type {\n ContainerWriterProjectionResponse,\n DocumentCreateResponse,\n DocumentLinkSetMutationResponse,\n DocumentWriterProjectionResponse,\n ListDocumentAttachmentsResponse,\n} from \"@tearleads/validators/response\";\nimport type { ContainerMutationAuthor } from \"../../containers/shared/types\";\nimport type { DocumentRecord } from \"../../persistence/documents/records\";\nimport type { DocumentSyncSubmitFailure } from \"./sync/syncSubmitFailure\";\n\nexport const DOCUMENT_ENCRYPTED_LORO_UPDATE_FORMAT =\n \"tearleads.document.loro-update\";\nexport const DOCUMENT_CONTENT_RECORD_KEY_INFO_DOMAIN =\n \"tearleads.document.content-record-key-info\";\nexport const DOCUMENT_CONTENT_RECORD_PLAINTEXT_HASH_KEY_INFO_DOMAIN =\n \"tearleads.document.content-record-plaintext-hash-key-info\";\nexport const DOCUMENT_CONTENT_RECORD_AAD_DOMAIN =\n \"tearleads.document.content-record-aad\";\nexport const DOCUMENT_CONTENT_RECORD_HKDF_SALT: Uint8Array<ArrayBuffer> =\n new TextEncoder().encode(\"tearleads.document.content-record-hkdf-salt\");\nexport const DOCUMENT_ENCRYPTED_UPDATE_KEYS = new Set([\n \"ciphertext\",\n \"contentKeyEpoch\",\n \"contentRecordId\",\n \"encryptionSuite\",\n \"format\",\n \"iv\",\n \"metadataHash\",\n \"nonceDomainHash\",\n \"version\",\n]);\nexport const TEXT_ENCODER = new TextEncoder();\n\nexport type DocumentCreateAuthor = ContainerMutationAuthor;\n\nexport interface BuildDocumentCreatePlanInput {\n author: DocumentCreateAuthor;\n containerProjection: ContainerWriterProjectionResponse;\n contentKeyEpoch?: number;\n documentId?: string;\n eventId?: string;\n signedAt?: string;\n targetEnvelopes: readonly DocumentContentKeyTargetEnvelope[];\n}\n\nexport interface DocumentCreatePlan {\n body: DocumentLinkAccessEventBody;\n documentId: string;\n event: AccessEvent;\n eventHash: string;\n manifest: AccessManifest;\n manifestHash: string;\n request: DocumentCreateRequest;\n state: DocumentLinkSetManifestState;\n targetHash: string;\n targets: DocumentContentKeyTarget[];\n}\n\nexport interface MaterializedDocumentCreatePlan {\n contentKey: Uint8Array;\n plan: DocumentCreatePlan;\n}\n\nexport interface DocumentCreateApi {\n // Lets idempotent create inspect an expected already-exists conflict.\n createDocumentResult(\n input: DocumentCreateRequest,\n options?: DocumentSyncRequestResultOptions | undefined,\n ): Promise<\n | {\n readonly data: DocumentCreateResponse;\n readonly ok: true;\n }\n | DocumentSyncSubmitFailure\n >;\n getContainerWriterProjection(\n containerId: string,\n ): Promise<ContainerWriterProjectionResponse | null>;\n // Result-returning variant used by the create path so a terminal projection\n // fetch failure (e.g. a 402 billing block or a 403 after access revocation)\n // can be persisted to the write queue instead of collapsing to a silent\n // null.\n getContainerWriterProjectionResult(\n containerId: string,\n options?: DocumentSyncRequestResultOptions | undefined,\n ): Promise<\n | {\n readonly data: ContainerWriterProjectionResponse;\n readonly ok: true;\n }\n | DocumentSyncSubmitFailure\n >;\n // Needed to adopt an existing remote document on a create conflict: the\n // committed manifest, content-key bundle and KEK targets are refetched here\n // (the create response that carried them was lost).\n getDocumentWriterProjection(\n documentId: string,\n ): Promise<DocumentWriterProjectionResponse | null>;\n evictContainerWriterProjection(containerId: string): void;\n primeDocumentWriterProjection(\n documentId: string,\n projection: DocumentWriterProjectionResponse,\n ): void;\n}\n\nexport interface CreateRemoteDocumentResult {\n contentKey: Uint8Array;\n /** The requested `deferredSeedUpdate`, signed but unsent, for a bind. */\n deferredSeed?: DocumentSyncRequest | undefined;\n documentId: string;\n persistedState: PersistedDocumentCreateState;\n // `plan` and `response` are absent when the result was adopted from an\n // existing remote document on a create conflict: there is no fresh create\n // response, and the local plan does not match the committed manifest (the\n // first attempt used a different content key). Consumers read only\n // documentId/writerProjection/persistedState.\n plan?: DocumentCreatePlan | undefined;\n response?: DocumentCreateResponse | undefined;\n writerProjection: DocumentWriterProjectionResponse;\n}\n\nexport type DocumentLinkSetMutationOperation = \"link\" | \"unlink\";\nexport type DocumentLinkSetMutationBody =\n | DocumentLinkAccessEventBody\n | DocumentUnlinkAccessEventBody;\n\nexport interface DocumentLinkSetTargetState {\n readonly currentTargets: readonly DocumentContentKeyTarget[];\n readonly linkedContainerIds: readonly string[];\n readonly target: DocumentContentKeyTarget;\n readonly targets: readonly DocumentContentKeyTarget[];\n}\n\nexport interface BuildDocumentLinkSetMutationPlanInput {\n blobRewraps: DocumentLinkAccessEventBody[\"blobRewraps\"];\n author: DocumentCreateAuthor;\n contentKeyEpoch: number;\n eventId?: string | undefined;\n operation: DocumentLinkSetMutationOperation;\n signedAt?: string | undefined;\n targetContainerProjection: ContainerWriterProjectionResponse;\n targetEnvelopes: readonly DocumentContentKeyTargetEnvelope[];\n writerProjection: DocumentWriterProjectionResponse;\n}\n\nexport interface DocumentLinkSetMutationPlan {\n body: DocumentLinkSetMutationBody;\n contentKeyEpoch: number;\n documentId: string;\n event: AccessEvent;\n eventHash: string;\n manifest: AccessManifest;\n manifestHash: string;\n operation: DocumentLinkSetMutationOperation;\n request: DocumentLinkSetMutationRequest;\n state: DocumentLinkSetManifestState;\n targetHash: string;\n targets: DocumentContentKeyTarget[];\n}\n\nexport interface MaterializedDocumentLinkSetMutationPlan {\n contentKey: Uint8Array;\n contentKeyRotated: boolean;\n plan: DocumentLinkSetMutationPlan;\n}\n\nexport interface DocumentLinkSetEventPlan {\n authorizingContainerPathRefs: ContainerManifestRef[][];\n body: DocumentLinkSetMutationBody;\n event: AccessEvent;\n eventHash: string;\n}\n\n/**\n * What a failed link-set mutation could tell the caller: the HTTP status (or\n * null for network/local failures) and a short message. Threaded up to the\n * move-intent queue so a permission failure reads as one, instead of the\n * generic \"rejected or unavailable\".\n */\nexport type DocumentLinkSetMutationFailure = Pick<\n DocumentSyncSubmitFailure,\n \"code\" | \"message\" | \"status\"\n>;\n\nexport type DocumentLinkSetFailureHandler = (\n failure: DocumentLinkSetMutationFailure,\n) => void;\n\n/**\n * `prove` pulls and verifies the document's full history. `reuse` returns the\n * store's last completed proof while the same local document still sits at\n * that proof's version vector, and proves otherwise; only a caller the server\n * re-checks (an unlink's rotation baseline) may reuse.\n */\nexport type DocumentRotationProofMode = \"prove\" | \"reuse\";\n\ntype DocumentLinkSetMutationResult =\n | { readonly data: DocumentLinkSetMutationResponse; readonly ok: true }\n | (DocumentLinkSetMutationFailure & { readonly ok: false });\n\nexport interface DocumentLinkSetMutationApi {\n getBlobBytes(blobId: string): Promise<BlobBytesResponse | null>;\n listDocumentAttachments(\n documentId: string,\n ): Promise<ListDocumentAttachmentsResponse | null>;\n getContainerWriterProjection(\n containerId: string,\n ): Promise<ContainerWriterProjectionResponse | null>;\n getContainerWriterProjectionResult(\n containerId: string,\n options?: DocumentSyncRequestResultOptions | undefined,\n ): Promise<\n | {\n readonly data: ContainerWriterProjectionResponse;\n readonly ok: true;\n }\n | DocumentSyncSubmitFailure\n >;\n getDocumentWriterProjection(\n documentId: string,\n ): Promise<DocumentWriterProjectionResponse | null>;\n getDocumentWriterProjectionResult(\n documentId: string,\n options?: DocumentSyncRequestResultOptions | undefined,\n ): Promise<\n | {\n readonly data: DocumentWriterProjectionResponse;\n readonly ok: true;\n }\n | DocumentSyncSubmitFailure\n >;\n primeDocumentWriterProjection(\n documentId: string,\n projection: DocumentWriterProjectionResponse,\n ): void;\n linkDocumentResult(\n documentId: string,\n input: DocumentLinkSetMutationRequest,\n options?: DocumentSyncRequestResultOptions,\n ): Promise<DocumentLinkSetMutationResult>;\n unlinkDocumentResult(\n documentId: string,\n input: DocumentLinkSetMutationRequest,\n options?: DocumentSyncRequestResultOptions,\n ): Promise<DocumentLinkSetMutationResult>;\n}\n\nexport interface RelinkRemoteDocumentResult {\n contentKey: Uint8Array;\n contentKeyRotated: boolean;\n documentId: string;\n linkedContainerIds: readonly string[];\n persistedState: PersistedDocumentCreateState;\n plan: DocumentLinkSetMutationPlan;\n response: DocumentLinkSetMutationResponse;\n}\n\nexport interface DocumentSyncRequestResultOptions {\n readonly expectedPaymentRequiredOrganizationId?: string | undefined;\n readonly reportErrors?: boolean | undefined;\n}\n\nexport type DocumentWriterPublicKeyResolver = (input: {\n writerSigningKeyFingerprint: string;\n writerUserId: string;\n}) => Promise<Uint8Array | null>;\n\nexport type PersistedDocumentCreateState = Pick<\n DocumentRecord,\n | \"documentId\"\n | \"contentKeyBundle\"\n | \"documentKekTargets\"\n | \"documentManifestBundle\"\n>;\n\nexport type PersistedDocumentSyncState = PersistedDocumentCreateState;\n\nexport interface UnwrappedContainerKek {\n containerId: string;\n /**\n * Null for keyring-recovered historical keys, which carry key material and\n * the epoch id committing to it but no epoch record to hash.\n *\n * Such a key still satisfies a parent wrap: the epoch-record fingerprint is\n * a selector for choosing among envelopes, not the security boundary, so a\n * null hash falls back to selecting on the epoch id while AEAD authenticates\n * (see `containerKekPath.ts`). That is what lets a descendant pinned to a\n * rotated parent be opened rather than stranded.\n */\n keyEpochHash: string | null;\n keyMaterial: Uint8Array;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AA2BA,MAAM,CAAC,MAAM,qCAAqC,GAChD,gCAAgC,CAAC;AACnC,MAAM,CAAC,MAAM,uCAAuC,GAClD,4CAA4C,CAAC;AAC/C,MAAM,CAAC,MAAM,sDAAsD,GACjE,2DAA2D,CAAC;AAC9D,MAAM,CAAC,MAAM,kCAAkC,GAC7C,uCAAuC,CAAC;AAC1C,MAAM,CAAC,MAAM,iCAAiC,GAC5C,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,6CAA6C,CAAC,CAAC;AAC1E,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,GAAG,CAAC;IACpD,YAAY;IACZ,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,QAAQ;IACR,IAAI;IACJ,cAAc;IACd,iBAAiB;IACjB,SAAS;CACV,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC","sourcesContent":["import type { BlobBytesResponse } from \"@tearleads/api-client\";\nimport type {\n AccessEvent,\n AccessManifest,\n DocumentContentKeyTarget,\n DocumentLinkAccessEventBody,\n DocumentLinkSetManifestState,\n DocumentUnlinkAccessEventBody,\n} from \"@tearleads/crypto\";\nimport type {\n ContainerManifestRef,\n DocumentContentKeyTargetEnvelope,\n DocumentCreateRequest,\n DocumentLinkSetMutationRequest,\n DocumentSyncRequest,\n} from \"@tearleads/validators/request\";\nimport type {\n ContainerWriterProjectionResponse,\n DocumentCreateResponse,\n DocumentLinkSetMutationResponse,\n DocumentWriterProjectionResponse,\n ListDocumentAttachmentsResponse,\n} from \"@tearleads/validators/response\";\nimport type { ContainerMutationAuthor } from \"../../containers/shared/types\";\nimport type { DocumentRecord } from \"../../persistence/documents/records\";\nimport type { DocumentSyncSubmitFailure } from \"./sync/syncSubmitFailure\";\n\nexport const DOCUMENT_ENCRYPTED_LORO_UPDATE_FORMAT =\n \"tearleads.document.loro-update\";\nexport const DOCUMENT_CONTENT_RECORD_KEY_INFO_DOMAIN =\n \"tearleads.document.content-record-key-info\";\nexport const DOCUMENT_CONTENT_RECORD_PLAINTEXT_HASH_KEY_INFO_DOMAIN =\n \"tearleads.document.content-record-plaintext-hash-key-info\";\nexport const DOCUMENT_CONTENT_RECORD_AAD_DOMAIN =\n \"tearleads.document.content-record-aad\";\nexport const DOCUMENT_CONTENT_RECORD_HKDF_SALT: Uint8Array<ArrayBuffer> =\n new TextEncoder().encode(\"tearleads.document.content-record-hkdf-salt\");\nexport const DOCUMENT_ENCRYPTED_UPDATE_KEYS = new Set([\n \"ciphertext\",\n \"contentKeyEpoch\",\n \"contentRecordId\",\n \"encryptionSuite\",\n \"format\",\n \"iv\",\n \"metadataHash\",\n \"nonceDomainHash\",\n \"version\",\n]);\nexport const TEXT_ENCODER = new TextEncoder();\n\nexport type DocumentCreateAuthor = ContainerMutationAuthor;\n\nexport interface BuildDocumentCreatePlanInput {\n author: DocumentCreateAuthor;\n containerProjection: ContainerWriterProjectionResponse;\n contentKeyEpoch?: number;\n documentId?: string;\n eventId?: string;\n signedAt?: string;\n targetEnvelopes: readonly DocumentContentKeyTargetEnvelope[];\n}\n\nexport interface DocumentCreatePlan {\n body: DocumentLinkAccessEventBody;\n documentId: string;\n event: AccessEvent;\n eventHash: string;\n manifest: AccessManifest;\n manifestHash: string;\n request: DocumentCreateRequest;\n state: DocumentLinkSetManifestState;\n targetHash: string;\n targets: DocumentContentKeyTarget[];\n}\n\nexport interface MaterializedDocumentCreatePlan {\n contentKey: Uint8Array;\n plan: DocumentCreatePlan;\n}\n\nexport interface DocumentCreateApi {\n // Lets idempotent create inspect an expected already-exists conflict.\n createDocumentResult(\n input: DocumentCreateRequest,\n options?: DocumentSyncRequestResultOptions | undefined,\n ): Promise<\n | {\n readonly data: DocumentCreateResponse;\n readonly ok: true;\n }\n | DocumentSyncSubmitFailure\n >;\n getContainerWriterProjection(\n containerId: string,\n ): Promise<ContainerWriterProjectionResponse | null>;\n // Result-returning variant used by the create path so a terminal projection\n // fetch failure (e.g. a 402 billing block or a 403 after access revocation)\n // can be persisted to the write queue instead of collapsing to a silent\n // null.\n getContainerWriterProjectionResult(\n containerId: string,\n options?: DocumentSyncRequestResultOptions | undefined,\n ): Promise<\n | {\n readonly data: ContainerWriterProjectionResponse;\n readonly ok: true;\n }\n | DocumentSyncSubmitFailure\n >;\n // Needed to adopt an existing remote document on a create conflict: the\n // committed manifest, content-key bundle and KEK targets are refetched here\n // (the create response that carried them was lost).\n getDocumentWriterProjection(\n documentId: string,\n ): Promise<DocumentWriterProjectionResponse | null>;\n evictContainerWriterProjection(containerId: string): void;\n primeDocumentWriterProjection(\n documentId: string,\n projection: DocumentWriterProjectionResponse,\n ): void;\n}\n\nexport interface CreateRemoteDocumentResult {\n contentKey: Uint8Array;\n /** The requested `deferredSeedUpdate`, signed but unsent, for a bind. */\n deferredSeed?: DocumentSyncRequest | undefined;\n documentId: string;\n persistedState: PersistedDocumentCreateState;\n // `plan` and `response` are absent when the result was adopted from an\n // existing remote document on a create conflict: there is no fresh create\n // response, and the local plan does not match the committed manifest (the\n // first attempt used a different content key). Consumers read only\n // documentId/writerProjection/persistedState.\n plan?: DocumentCreatePlan | undefined;\n response?: DocumentCreateResponse | undefined;\n writerProjection: DocumentWriterProjectionResponse;\n}\n\nexport type DocumentLinkSetMutationOperation = \"link\" | \"unlink\";\nexport type DocumentLinkSetMutationBody =\n | DocumentLinkAccessEventBody\n | DocumentUnlinkAccessEventBody;\n\nexport interface DocumentLinkSetTargetState {\n readonly currentTargets: readonly DocumentContentKeyTarget[];\n readonly linkedContainerIds: readonly string[];\n readonly target: DocumentContentKeyTarget;\n readonly targets: readonly DocumentContentKeyTarget[];\n}\n\nexport interface BuildDocumentLinkSetMutationPlanInput {\n blobRewraps: DocumentLinkAccessEventBody[\"blobRewraps\"];\n author: DocumentCreateAuthor;\n contentKeyEpoch: number;\n eventId?: string | undefined;\n operation: DocumentLinkSetMutationOperation;\n signedAt?: string | undefined;\n targetContainerProjection: ContainerWriterProjectionResponse;\n targetEnvelopes: readonly DocumentContentKeyTargetEnvelope[];\n writerProjection: DocumentWriterProjectionResponse;\n}\n\nexport interface DocumentLinkSetMutationPlan {\n body: DocumentLinkSetMutationBody;\n contentKeyEpoch: number;\n documentId: string;\n event: AccessEvent;\n eventHash: string;\n manifest: AccessManifest;\n manifestHash: string;\n operation: DocumentLinkSetMutationOperation;\n request: DocumentLinkSetMutationRequest;\n state: DocumentLinkSetManifestState;\n targetHash: string;\n targets: DocumentContentKeyTarget[];\n}\n\nexport interface MaterializedDocumentLinkSetMutationPlan {\n contentKey: Uint8Array;\n contentKeyRotated: boolean;\n plan: DocumentLinkSetMutationPlan;\n}\n\nexport interface DocumentLinkSetEventPlan {\n authorizingContainerPathRefs: ContainerManifestRef[][];\n body: DocumentLinkSetMutationBody;\n event: AccessEvent;\n eventHash: string;\n}\n\n/**\n * What a failed link-set mutation could tell the caller: the HTTP status (or\n * null for network/local failures) and a short message. Threaded up to the\n * move-intent queue so a permission failure reads as one, instead of the\n * generic \"rejected or unavailable\".\n */\nexport type DocumentLinkSetMutationFailure = Pick<\n DocumentSyncSubmitFailure,\n \"code\" | \"message\" | \"status\"\n>;\n\nexport type DocumentLinkSetFailureHandler = (\n failure: DocumentLinkSetMutationFailure,\n) => void;\n\n/**\n * `prove` pulls and verifies the document's full history. `reuse` returns the\n * store's last completed proof while the same local document still sits at\n * that proof's version vector, and proves otherwise; only a caller the server\n * re-checks (an unlink's rotation baseline) may reuse.\n */\nexport type DocumentRotationProofMode = \"prove\" | \"reuse\";\n\ntype DocumentLinkSetMutationResult =\n | { readonly data: DocumentLinkSetMutationResponse; readonly ok: true }\n | (DocumentLinkSetMutationFailure & {\n readonly ok: false;\n /** The host report a `reportErrors: false` request withheld. */\n readonly report?: (() => void) | undefined;\n });\n\nexport interface DocumentLinkSetMutationApi {\n getBlobBytes(blobId: string): Promise<BlobBytesResponse | null>;\n listDocumentAttachments(\n documentId: string,\n options?: { readonly refresh?: boolean },\n ): Promise<ListDocumentAttachmentsResponse | null>;\n getContainerWriterProjection(\n containerId: string,\n ): Promise<ContainerWriterProjectionResponse | null>;\n getContainerWriterProjectionResult(\n containerId: string,\n options?: DocumentSyncRequestResultOptions | undefined,\n ): Promise<\n | {\n readonly data: ContainerWriterProjectionResponse;\n readonly ok: true;\n }\n | DocumentSyncSubmitFailure\n >;\n getDocumentWriterProjection(\n documentId: string,\n ): Promise<DocumentWriterProjectionResponse | null>;\n getDocumentWriterProjectionResult(\n documentId: string,\n options?: DocumentSyncRequestResultOptions | undefined,\n ): Promise<\n | {\n readonly data: DocumentWriterProjectionResponse;\n readonly ok: true;\n }\n | DocumentSyncSubmitFailure\n >;\n primeDocumentWriterProjection(\n documentId: string,\n projection: DocumentWriterProjectionResponse,\n ): void;\n linkDocumentResult(\n documentId: string,\n input: DocumentLinkSetMutationRequest,\n options?: DocumentSyncRequestResultOptions,\n ): Promise<DocumentLinkSetMutationResult>;\n unlinkDocumentResult(\n documentId: string,\n input: DocumentLinkSetMutationRequest,\n options?: DocumentSyncRequestResultOptions,\n ): Promise<DocumentLinkSetMutationResult>;\n}\n\nexport interface RelinkRemoteDocumentResult {\n contentKey: Uint8Array;\n contentKeyRotated: boolean;\n documentId: string;\n linkedContainerIds: readonly string[];\n persistedState: PersistedDocumentCreateState;\n plan: DocumentLinkSetMutationPlan;\n response: DocumentLinkSetMutationResponse;\n}\n\nexport interface DocumentSyncRequestResultOptions {\n readonly expectedPaymentRequiredOrganizationId?: string | undefined;\n readonly reportErrors?: boolean | undefined;\n}\n\nexport type DocumentWriterPublicKeyResolver = (input: {\n writerSigningKeyFingerprint: string;\n writerUserId: string;\n}) => Promise<Uint8Array | null>;\n\nexport type PersistedDocumentCreateState = Pick<\n DocumentRecord,\n | \"documentId\"\n | \"contentKeyBundle\"\n | \"documentKekTargets\"\n | \"documentManifestBundle\"\n>;\n\nexport type PersistedDocumentSyncState = PersistedDocumentCreateState;\n\nexport interface UnwrappedContainerKek {\n containerId: string;\n /**\n * Null for keyring-recovered historical keys, which carry key material and\n * the epoch id committing to it but no epoch record to hash.\n *\n * Such a key still satisfies a parent wrap: the epoch-record fingerprint is\n * a selector for choosing among envelopes, not the security boundary, so a\n * null hash falls back to selecting on the epoch id while AEAD authenticates\n * (see `containerKekPath.ts`). That is what lets a descendant pinned to a\n * rotated parent be opened rather than stranded.\n */\n keyEpochHash: string | null;\n keyMaterial: Uint8Array;\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { and, eq, inArray } from "drizzle-orm";
|
|
2
|
+
import { DOCUMENTS_APP_KIND } from "../../documents/documentConstants.js";
|
|
3
|
+
import { documentAttachmentBlobProjection, documentPendingAttachments, } from "../../sqlite/schema/documentAttachmentSchema.js";
|
|
4
|
+
import { documents } from "../../sqlite/schema/documentRecordSchema.js";
|
|
5
|
+
import { getClientSQLitePersistenceRuntime } from "../../sqlite/sqlitePersistenceRuntime.js";
|
|
6
|
+
import { ensureDocumentsSchema } from "./internal/ensureDocumentsSchema.js";
|
|
7
|
+
/**
|
|
8
|
+
* Whether this device's local view of a server document may include an active
|
|
9
|
+
* attachment binding. It is false only when the device holds the document and
|
|
10
|
+
* no attachment row names it: no held or downloaded copy, no slot detached
|
|
11
|
+
* locally whose remote detach is still queued, and no pending upload. A
|
|
12
|
+
* document the device does not hold as a `documents` record is answered true,
|
|
13
|
+
* since it has no view.
|
|
14
|
+
*
|
|
15
|
+
* Callers may skip the server's attachment listing on false, because the
|
|
16
|
+
* server re-checks the binding frontier at commit and refuses a stale view.
|
|
17
|
+
*/
|
|
18
|
+
export async function documentMayHaveAttachments(execSql, documentId) {
|
|
19
|
+
await ensureDocumentsSchema(execSql);
|
|
20
|
+
const { db } = getClientSQLitePersistenceRuntime(execSql);
|
|
21
|
+
const records = await db
|
|
22
|
+
.select({ localId: documents.localId })
|
|
23
|
+
.from(documents)
|
|
24
|
+
// `documents_app_document_idx` serves this lookup. Other app kinds (a
|
|
25
|
+
// container's metadata document) find no row and keep listing.
|
|
26
|
+
.where(and(eq(documents.appKind, DOCUMENTS_APP_KIND), eq(documents.documentId, documentId)));
|
|
27
|
+
if (records.length === 0)
|
|
28
|
+
return true;
|
|
29
|
+
const localIds = records.map((record) => record.localId);
|
|
30
|
+
const [held] = await db
|
|
31
|
+
.select({ localId: documentAttachmentBlobProjection.localId })
|
|
32
|
+
.from(documentAttachmentBlobProjection)
|
|
33
|
+
.where(inArray(documentAttachmentBlobProjection.localId, localIds))
|
|
34
|
+
.limit(1);
|
|
35
|
+
if (held)
|
|
36
|
+
return true;
|
|
37
|
+
const [pending] = await db
|
|
38
|
+
.select({ localId: documentPendingAttachments.localId })
|
|
39
|
+
.from(documentPendingAttachments)
|
|
40
|
+
.where(inArray(documentPendingAttachments.localId, localIds))
|
|
41
|
+
.limit(1);
|
|
42
|
+
return pending !== undefined;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=documentAttachmentPresence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentAttachmentPresence.js","sourceRoot":"","sources":["documentAttachmentPresence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EACL,gCAAgC,EAChC,0BAA0B,GAC3B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAE1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,OAAgB,EAChB,UAAkB;IAElB,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACrC,MAAM,EAAE,EAAE,EAAE,GAAG,iCAAiC,CAAC,OAAO,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,MAAM,EAAE;SACrB,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC;SACtC,IAAI,CAAC,SAAS,CAAC;QAChB,sEAAsE;QACtE,+DAA+D;SAC9D,KAAK,CACJ,GAAG,CACD,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,kBAAkB,CAAC,EACzC,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,UAAU,CAAC,CACrC,CACF,CAAC;IACJ,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACzD,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,EAAE;SACpB,MAAM,CAAC,EAAE,OAAO,EAAE,gCAAgC,CAAC,OAAO,EAAE,CAAC;SAC7D,IAAI,CAAC,gCAAgC,CAAC;SACtC,KAAK,CAAC,OAAO,CAAC,gCAAgC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;SAClE,KAAK,CAAC,CAAC,CAAC,CAAC;IACZ,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IACtB,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE;SACvB,MAAM,CAAC,EAAE,OAAO,EAAE,0BAA0B,CAAC,OAAO,EAAE,CAAC;SACvD,IAAI,CAAC,0BAA0B,CAAC;SAChC,KAAK,CAAC,OAAO,CAAC,0BAA0B,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;SAC5D,KAAK,CAAC,CAAC,CAAC,CAAC;IACZ,OAAO,OAAO,KAAK,SAAS,CAAC;AAC/B,CAAC","sourcesContent":["import { and, eq, inArray } from \"drizzle-orm\";\nimport { DOCUMENTS_APP_KIND } from \"../../documents/documentConstants\";\nimport {\n documentAttachmentBlobProjection,\n documentPendingAttachments,\n} from \"../../sqlite/schema/documentAttachmentSchema\";\nimport { documents } from \"../../sqlite/schema/documentRecordSchema\";\nimport { getClientSQLitePersistenceRuntime } from \"../../sqlite/sqlitePersistenceRuntime\";\nimport type { ExecSql } from \"../../sqlite/sqlSchema\";\nimport { ensureDocumentsSchema } from \"./internal/ensureDocumentsSchema\";\n\n/**\n * Whether this device's local view of a server document may include an active\n * attachment binding. It is false only when the device holds the document and\n * no attachment row names it: no held or downloaded copy, no slot detached\n * locally whose remote detach is still queued, and no pending upload. A\n * document the device does not hold as a `documents` record is answered true,\n * since it has no view.\n *\n * Callers may skip the server's attachment listing on false, because the\n * server re-checks the binding frontier at commit and refuses a stale view.\n */\nexport async function documentMayHaveAttachments(\n execSql: ExecSql,\n documentId: string,\n): Promise<boolean> {\n await ensureDocumentsSchema(execSql);\n const { db } = getClientSQLitePersistenceRuntime(execSql);\n const records = await db\n .select({ localId: documents.localId })\n .from(documents)\n // `documents_app_document_idx` serves this lookup. Other app kinds (a\n // container's metadata document) find no row and keep listing.\n .where(\n and(\n eq(documents.appKind, DOCUMENTS_APP_KIND),\n eq(documents.documentId, documentId),\n ),\n );\n if (records.length === 0) return true;\n const localIds = records.map((record) => record.localId);\n const [held] = await db\n .select({ localId: documentAttachmentBlobProjection.localId })\n .from(documentAttachmentBlobProjection)\n .where(inArray(documentAttachmentBlobProjection.localId, localIds))\n .limit(1);\n if (held) return true;\n const [pending] = await db\n .select({ localId: documentPendingAttachments.localId })\n .from(documentPendingAttachments)\n .where(inArray(documentPendingAttachments.localId, localIds))\n .limit(1);\n return pending !== undefined;\n}\n"]}
|
|
@@ -231,7 +231,7 @@ export declare const createContainerOperation: Omit<{
|
|
|
231
231
|
error: string;
|
|
232
232
|
}>>;
|
|
233
233
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
234
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
234
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
235
235
|
error: z.ZodString;
|
|
236
236
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
237
237
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -443,7 +443,7 @@ export declare const createContainerOperation: Omit<{
|
|
|
443
443
|
error: string;
|
|
444
444
|
}>>;
|
|
445
445
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
446
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
446
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
447
447
|
error: z.ZodString;
|
|
448
448
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
449
449
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -1352,7 +1352,7 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
1352
1352
|
error: string;
|
|
1353
1353
|
}>>;
|
|
1354
1354
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
1355
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
1355
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
1356
1356
|
error: z.ZodString;
|
|
1357
1357
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
1358
1358
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -1660,7 +1660,7 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
1660
1660
|
error: string;
|
|
1661
1661
|
}>>;
|
|
1662
1662
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
1663
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
1663
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
1664
1664
|
error: z.ZodString;
|
|
1665
1665
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
1666
1666
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -1948,7 +1948,7 @@ export declare const shareContainerOperation: Omit<{
|
|
|
1948
1948
|
error: string;
|
|
1949
1949
|
}>>;
|
|
1950
1950
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
1951
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
1951
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
1952
1952
|
error: z.ZodString;
|
|
1953
1953
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
1954
1954
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -2162,7 +2162,7 @@ export declare const shareContainerOperation: Omit<{
|
|
|
2162
2162
|
error: string;
|
|
2163
2163
|
}>>;
|
|
2164
2164
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
2165
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
2165
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
2166
2166
|
error: z.ZodString;
|
|
2167
2167
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
2168
2168
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -2362,7 +2362,7 @@ export declare const reciteContainerOperation: Omit<{
|
|
|
2362
2362
|
error: string;
|
|
2363
2363
|
}>>;
|
|
2364
2364
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
2365
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
2365
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
2366
2366
|
error: z.ZodString;
|
|
2367
2367
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
2368
2368
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -2540,7 +2540,7 @@ export declare const reciteContainerOperation: Omit<{
|
|
|
2540
2540
|
error: string;
|
|
2541
2541
|
}>>;
|
|
2542
2542
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
2543
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
2543
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
2544
2544
|
error: z.ZodString;
|
|
2545
2545
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
2546
2546
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -2996,7 +2996,7 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
2996
2996
|
error: string;
|
|
2997
2997
|
}>>;
|
|
2998
2998
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
2999
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
2999
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
3000
3000
|
error: z.ZodString;
|
|
3001
3001
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
3002
3002
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -3294,7 +3294,7 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
3294
3294
|
error: string;
|
|
3295
3295
|
}>>;
|
|
3296
3296
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
3297
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
3297
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
3298
3298
|
error: z.ZodString;
|
|
3299
3299
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
3300
3300
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -3750,7 +3750,7 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
3750
3750
|
error: string;
|
|
3751
3751
|
}>>;
|
|
3752
3752
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
3753
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
3753
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
3754
3754
|
error: z.ZodString;
|
|
3755
3755
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
3756
3756
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -4048,7 +4048,7 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
4048
4048
|
error: string;
|
|
4049
4049
|
}>>;
|
|
4050
4050
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
4051
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
4051
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
4052
4052
|
error: z.ZodString;
|
|
4053
4053
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
4054
4054
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -4504,7 +4504,7 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4504
4504
|
error: string;
|
|
4505
4505
|
}>>;
|
|
4506
4506
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
4507
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
4507
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
4508
4508
|
error: z.ZodString;
|
|
4509
4509
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
4510
4510
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -4802,7 +4802,7 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4802
4802
|
error: string;
|
|
4803
4803
|
}>>;
|
|
4804
4804
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
4805
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
4805
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
4806
4806
|
error: z.ZodString;
|
|
4807
4807
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
4808
4808
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -4920,7 +4920,7 @@ export declare const deleteContainerOperation: Omit<{
|
|
|
4920
4920
|
error: string;
|
|
4921
4921
|
}>>;
|
|
4922
4922
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
4923
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
4923
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
4924
4924
|
error: z.ZodString;
|
|
4925
4925
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
4926
4926
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -5060,7 +5060,7 @@ export declare const deleteContainerOperation: Omit<{
|
|
|
5060
5060
|
error: string;
|
|
5061
5061
|
}>>;
|
|
5062
5062
|
readonly 409: z.ZodUnion<readonly [z.ZodObject<{
|
|
5063
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
5063
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
5064
5064
|
error: z.ZodString;
|
|
5065
5065
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
5066
5066
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -658,11 +658,11 @@ export declare const createDocumentOperation: Omit<{
|
|
|
658
658
|
error: string;
|
|
659
659
|
}>>;
|
|
660
660
|
readonly 404: z.ZodObject<{
|
|
661
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
661
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
662
662
|
error: z.ZodString;
|
|
663
663
|
}, z.core.$loose>;
|
|
664
664
|
readonly 409: z.ZodObject<{
|
|
665
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
665
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
666
666
|
error: z.ZodString;
|
|
667
667
|
}, z.core.$loose>;
|
|
668
668
|
readonly 500: z.ZodType<{
|
|
@@ -821,11 +821,11 @@ export declare const createDocumentOperation: Omit<{
|
|
|
821
821
|
error: string;
|
|
822
822
|
}>>;
|
|
823
823
|
readonly 404: z.ZodObject<{
|
|
824
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
824
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
825
825
|
error: z.ZodString;
|
|
826
826
|
}, z.core.$loose>;
|
|
827
827
|
readonly 409: z.ZodObject<{
|
|
828
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
828
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
829
829
|
error: z.ZodString;
|
|
830
830
|
}, z.core.$loose>;
|
|
831
831
|
readonly 500: z.ZodType<{
|
|
@@ -1220,11 +1220,11 @@ export declare const linkDocumentOperation: Omit<{
|
|
|
1220
1220
|
error: string;
|
|
1221
1221
|
}>>;
|
|
1222
1222
|
readonly 404: z.ZodObject<{
|
|
1223
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1223
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1224
1224
|
error: z.ZodString;
|
|
1225
1225
|
}, z.core.$loose>;
|
|
1226
1226
|
readonly 409: z.ZodObject<{
|
|
1227
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1227
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1228
1228
|
error: z.ZodString;
|
|
1229
1229
|
}, z.core.$loose>;
|
|
1230
1230
|
readonly 500: z.ZodType<{
|
|
@@ -1340,11 +1340,11 @@ export declare const linkDocumentOperation: Omit<{
|
|
|
1340
1340
|
error: string;
|
|
1341
1341
|
}>>;
|
|
1342
1342
|
readonly 404: z.ZodObject<{
|
|
1343
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1343
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1344
1344
|
error: z.ZodString;
|
|
1345
1345
|
}, z.core.$loose>;
|
|
1346
1346
|
readonly 409: z.ZodObject<{
|
|
1347
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1347
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1348
1348
|
error: z.ZodString;
|
|
1349
1349
|
}, z.core.$loose>;
|
|
1350
1350
|
readonly 500: z.ZodType<{
|
|
@@ -1739,11 +1739,11 @@ export declare const unlinkDocumentOperation: Omit<{
|
|
|
1739
1739
|
error: string;
|
|
1740
1740
|
}>>;
|
|
1741
1741
|
readonly 404: z.ZodObject<{
|
|
1742
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1742
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1743
1743
|
error: z.ZodString;
|
|
1744
1744
|
}, z.core.$loose>;
|
|
1745
1745
|
readonly 409: z.ZodObject<{
|
|
1746
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1746
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1747
1747
|
error: z.ZodString;
|
|
1748
1748
|
}, z.core.$loose>;
|
|
1749
1749
|
readonly 500: z.ZodType<{
|
|
@@ -1859,11 +1859,11 @@ export declare const unlinkDocumentOperation: Omit<{
|
|
|
1859
1859
|
error: string;
|
|
1860
1860
|
}>>;
|
|
1861
1861
|
readonly 404: z.ZodObject<{
|
|
1862
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1862
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1863
1863
|
error: z.ZodString;
|
|
1864
1864
|
}, z.core.$loose>;
|
|
1865
1865
|
readonly 409: z.ZodObject<{
|
|
1866
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1866
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1867
1867
|
error: z.ZodString;
|
|
1868
1868
|
}, z.core.$loose>;
|
|
1869
1869
|
readonly 500: z.ZodType<{
|
|
@@ -1987,11 +1987,11 @@ export declare const purgeDocumentOperation: Omit<{
|
|
|
1987
1987
|
error: string;
|
|
1988
1988
|
}>>;
|
|
1989
1989
|
readonly 404: z.ZodObject<{
|
|
1990
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1990
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1991
1991
|
error: z.ZodString;
|
|
1992
1992
|
}, z.core.$loose>;
|
|
1993
1993
|
readonly 409: z.ZodObject<{
|
|
1994
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1994
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
1995
1995
|
error: z.ZodString;
|
|
1996
1996
|
}, z.core.$loose>;
|
|
1997
1997
|
readonly 500: z.ZodType<{
|
|
@@ -2504,11 +2504,11 @@ export declare const purgeDocumentOperation: Omit<{
|
|
|
2504
2504
|
error: string;
|
|
2505
2505
|
}>>;
|
|
2506
2506
|
readonly 404: z.ZodObject<{
|
|
2507
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
2507
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
2508
2508
|
error: z.ZodString;
|
|
2509
2509
|
}, z.core.$loose>;
|
|
2510
2510
|
readonly 409: z.ZodObject<{
|
|
2511
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
2511
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
2512
2512
|
error: z.ZodString;
|
|
2513
2513
|
}, z.core.$loose>;
|
|
2514
2514
|
readonly 500: z.ZodType<{
|
|
@@ -2594,11 +2594,11 @@ export declare const getDocumentPurgeProofOperation: Omit<{
|
|
|
2594
2594
|
error: string;
|
|
2595
2595
|
}>>;
|
|
2596
2596
|
readonly 404: z.ZodObject<{
|
|
2597
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
2597
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
2598
2598
|
error: z.ZodString;
|
|
2599
2599
|
}, z.core.$loose>;
|
|
2600
2600
|
readonly 409: z.ZodObject<{
|
|
2601
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
2601
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
2602
2602
|
error: z.ZodString;
|
|
2603
2603
|
}, z.core.$loose>;
|
|
2604
2604
|
readonly 500: z.ZodType<{
|
|
@@ -3110,11 +3110,11 @@ export declare const getDocumentPurgeProofOperation: Omit<{
|
|
|
3110
3110
|
error: string;
|
|
3111
3111
|
}>>;
|
|
3112
3112
|
readonly 404: z.ZodObject<{
|
|
3113
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
3113
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
3114
3114
|
error: z.ZodString;
|
|
3115
3115
|
}, z.core.$loose>;
|
|
3116
3116
|
readonly 409: z.ZodObject<{
|
|
3117
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
3117
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
3118
3118
|
error: z.ZodString;
|
|
3119
3119
|
}, z.core.$loose>;
|
|
3120
3120
|
readonly 500: z.ZodType<{
|
|
@@ -9,10 +9,10 @@ export declare const CONTAINER_MUTATION_ERROR_CODES: {
|
|
|
9
9
|
readonly stateStale: "container_mutation_state_stale";
|
|
10
10
|
};
|
|
11
11
|
export declare const ContainerMutationBehaviorErrorCodeSchema: z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">;
|
|
12
|
-
export declare const ContainerMutationErrorCodeSchema: z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>;
|
|
12
|
+
export declare const ContainerMutationErrorCodeSchema: z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>;
|
|
13
13
|
export type ContainerMutationErrorCode = z.infer<typeof ContainerMutationErrorCodeSchema>;
|
|
14
14
|
export declare const ContainerMutationFailureResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
15
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
15
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"container_mutation_state_stale" | "container_descendant_rekeys_required" | "container_ancestor_rekeys_required" | "container_descendant_rekeys_inaccessible" | "container_manifest_already_exists" | "container_path_too_deep">, z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>]>>;
|
|
16
16
|
error: z.ZodString;
|
|
17
17
|
requiredContainerIds: z.ZodOptional<z.ZodCustom<string[], string[]>>;
|
|
18
18
|
}, z.core.$loose>, z.ZodType<{
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const DOCUMENT_MUTATION_ERROR_CODES: {
|
|
3
3
|
readonly containerUnavailable: "container_unavailable";
|
|
4
|
+
readonly linkAttachmentsChanged: "document_link_attachments_changed";
|
|
4
5
|
readonly manifestAlreadyExists: "document_manifest_already_exists";
|
|
5
6
|
readonly unlinkRotationBaselineStale: "document_unlink_rotation_baseline_stale";
|
|
6
7
|
};
|
|
7
8
|
export declare const DocumentMutationBehaviorErrorCodeSchema: z.ZodLiteral<"document_manifest_already_exists">;
|
|
8
|
-
export declare const DocumentMutationErrorCodeSchema: z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>;
|
|
9
|
+
export declare const DocumentMutationErrorCodeSchema: z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>;
|
|
9
10
|
export type DocumentMutationErrorCode = z.infer<typeof DocumentMutationErrorCodeSchema>;
|
|
10
11
|
/**
|
|
11
12
|
* Document mutations retain uncoded terminal diagnostics while constraining
|
|
12
13
|
* every behavior-bearing code to the shared registry above.
|
|
13
14
|
*/
|
|
14
15
|
export declare const DocumentMutationFailureResponseSchema: z.ZodObject<{
|
|
15
|
-
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
16
|
+
code: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"document_manifest_already_exists">, z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">, z.ZodLiteral<"document_not_found">, z.ZodLiteral<"container_unavailable">, z.ZodLiteral<"document_link_attachments_changed">, z.ZodLiteral<"document_unlink_rotation_baseline_stale">]>>;
|
|
16
17
|
error: z.ZodString;
|
|
17
18
|
}, z.core.$loose>;
|
|
18
19
|
export type DocumentMutationFailureResponse = z.infer<typeof DocumentMutationFailureResponseSchema>;
|
|
@@ -6,6 +6,10 @@ export const DOCUMENT_MUTATION_ERROR_CODES = {
|
|
|
6
6
|
// live row. Registered once here because the container envelope unions this
|
|
7
7
|
// schema (see ContainerMutationErrorCodeSchema).
|
|
8
8
|
containerUnavailable: CONTAINER_UNAVAILABLE_ERROR_CODE,
|
|
9
|
+
// A link or unlink's blob rewraps do not name exactly the document's active
|
|
10
|
+
// bindings. The client lists the attachments and retries; the binding check
|
|
11
|
+
// at commit stays authoritative on the server.
|
|
12
|
+
linkAttachmentsChanged: "document_link_attachments_changed",
|
|
9
13
|
manifestAlreadyExists: "document_manifest_already_exists",
|
|
10
14
|
// An unlink's rotation baseline does not cover a committed update. The
|
|
11
15
|
// client proves the full history again and retries; the rotation and its
|
|
@@ -20,6 +24,7 @@ export const DocumentMutationErrorCodeSchema = z.union([
|
|
|
20
24
|
DocumentSyncErrorCodeSchema,
|
|
21
25
|
z.literal(DOCUMENT_NOT_FOUND_ERROR_CODE),
|
|
22
26
|
z.literal(DOCUMENT_MUTATION_ERROR_CODES.containerUnavailable),
|
|
27
|
+
z.literal(DOCUMENT_MUTATION_ERROR_CODES.linkAttachmentsChanged),
|
|
23
28
|
z.literal(DOCUMENT_MUTATION_ERROR_CODES.unlinkRotationBaselineStale),
|
|
24
29
|
]);
|
|
25
30
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentMutationError.js","sourceRoot":"","sources":["documentMutationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,2EAA2E;IAC3E,4EAA4E;IAC5E,iDAAiD;IACjD,oBAAoB,EAAE,gCAAgC;IACtD,qBAAqB,EAAE,kCAAkC;IACzD,uEAAuE;IACvE,yEAAyE;IACzE,mDAAmD;IACnD,2BAA2B,EAAE,yCAAyC;CAC9D,CAAC;AAEX,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,OAAO,CAAC;IAC/D,6BAA6B,CAAC,qBAAqB;CACpD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC;IACrD,uCAAuC;IACvC,2BAA2B;IAC3B,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC;IACxC,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,oBAAoB,CAAC;IAC7D,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,2BAA2B,CAAC;CACrE,CAAC,CAAC;AAMH;;;GAGG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,WAAW,CAAC;IACjE,IAAI,EAAE,+BAA+B,CAAC,QAAQ,EAAE;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { CONTAINER_UNAVAILABLE_ERROR_CODE } from \"./containerUnavailableError\";\nimport {\n DOCUMENT_NOT_FOUND_ERROR_CODE,\n DocumentSyncErrorCodeSchema,\n} from \"./documentSyncError\";\n\nexport const DOCUMENT_MUTATION_ERROR_CODES = {\n // Shared with container mutations: the cited container path element has no\n // live row. Registered once here because the container envelope unions this\n // schema (see ContainerMutationErrorCodeSchema).\n containerUnavailable: CONTAINER_UNAVAILABLE_ERROR_CODE,\n manifestAlreadyExists: \"document_manifest_already_exists\",\n // An unlink's rotation baseline does not cover a committed update. The\n // client proves the full history again and retries; the rotation and its\n // frontier check stay authoritative on the server.\n unlinkRotationBaselineStale: \"document_unlink_rotation_baseline_stale\",\n} as const;\n\nexport const DocumentMutationBehaviorErrorCodeSchema = z.literal([\n DOCUMENT_MUTATION_ERROR_CODES.manifestAlreadyExists,\n]);\n\nexport const DocumentMutationErrorCodeSchema = z.union([\n DocumentMutationBehaviorErrorCodeSchema,\n DocumentSyncErrorCodeSchema,\n z.literal(DOCUMENT_NOT_FOUND_ERROR_CODE),\n z.literal(DOCUMENT_MUTATION_ERROR_CODES.containerUnavailable),\n z.literal(DOCUMENT_MUTATION_ERROR_CODES.unlinkRotationBaselineStale),\n]);\n\nexport type DocumentMutationErrorCode = z.infer<\n typeof DocumentMutationErrorCodeSchema\n>;\n\n/**\n * Document mutations retain uncoded terminal diagnostics while constraining\n * every behavior-bearing code to the shared registry above.\n */\nexport const DocumentMutationFailureResponseSchema = z.looseObject({\n code: DocumentMutationErrorCodeSchema.optional(),\n error: z.string().min(1),\n});\n\nexport type DocumentMutationFailureResponse = z.infer<\n typeof DocumentMutationFailureResponseSchema\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"documentMutationError.js","sourceRoot":"","sources":["documentMutationError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,2EAA2E;IAC3E,4EAA4E;IAC5E,iDAAiD;IACjD,oBAAoB,EAAE,gCAAgC;IACtD,4EAA4E;IAC5E,4EAA4E;IAC5E,+CAA+C;IAC/C,sBAAsB,EAAE,mCAAmC;IAC3D,qBAAqB,EAAE,kCAAkC;IACzD,uEAAuE;IACvE,yEAAyE;IACzE,mDAAmD;IACnD,2BAA2B,EAAE,yCAAyC;CAC9D,CAAC;AAEX,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,OAAO,CAAC;IAC/D,6BAA6B,CAAC,qBAAqB;CACpD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC;IACrD,uCAAuC;IACvC,2BAA2B;IAC3B,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC;IACxC,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,oBAAoB,CAAC;IAC7D,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,sBAAsB,CAAC;IAC/D,CAAC,CAAC,OAAO,CAAC,6BAA6B,CAAC,2BAA2B,CAAC;CACrE,CAAC,CAAC;AAMH;;;GAGG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,WAAW,CAAC;IACjE,IAAI,EAAE,+BAA+B,CAAC,QAAQ,EAAE;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { CONTAINER_UNAVAILABLE_ERROR_CODE } from \"./containerUnavailableError\";\nimport {\n DOCUMENT_NOT_FOUND_ERROR_CODE,\n DocumentSyncErrorCodeSchema,\n} from \"./documentSyncError\";\n\nexport const DOCUMENT_MUTATION_ERROR_CODES = {\n // Shared with container mutations: the cited container path element has no\n // live row. Registered once here because the container envelope unions this\n // schema (see ContainerMutationErrorCodeSchema).\n containerUnavailable: CONTAINER_UNAVAILABLE_ERROR_CODE,\n // A link or unlink's blob rewraps do not name exactly the document's active\n // bindings. The client lists the attachments and retries; the binding check\n // at commit stays authoritative on the server.\n linkAttachmentsChanged: \"document_link_attachments_changed\",\n manifestAlreadyExists: \"document_manifest_already_exists\",\n // An unlink's rotation baseline does not cover a committed update. The\n // client proves the full history again and retries; the rotation and its\n // frontier check stay authoritative on the server.\n unlinkRotationBaselineStale: \"document_unlink_rotation_baseline_stale\",\n} as const;\n\nexport const DocumentMutationBehaviorErrorCodeSchema = z.literal([\n DOCUMENT_MUTATION_ERROR_CODES.manifestAlreadyExists,\n]);\n\nexport const DocumentMutationErrorCodeSchema = z.union([\n DocumentMutationBehaviorErrorCodeSchema,\n DocumentSyncErrorCodeSchema,\n z.literal(DOCUMENT_NOT_FOUND_ERROR_CODE),\n z.literal(DOCUMENT_MUTATION_ERROR_CODES.containerUnavailable),\n z.literal(DOCUMENT_MUTATION_ERROR_CODES.linkAttachmentsChanged),\n z.literal(DOCUMENT_MUTATION_ERROR_CODES.unlinkRotationBaselineStale),\n]);\n\nexport type DocumentMutationErrorCode = z.infer<\n typeof DocumentMutationErrorCodeSchema\n>;\n\n/**\n * Document mutations retain uncoded terminal diagnostics while constraining\n * every behavior-bearing code to the shared registry above.\n */\nexport const DocumentMutationFailureResponseSchema = z.looseObject({\n code: DocumentMutationErrorCodeSchema.optional(),\n error: z.string().min(1),\n});\n\nexport type DocumentMutationFailureResponse = z.infer<\n typeof DocumentMutationFailureResponseSchema\n>;\n"]}
|
package/package.json
CHANGED