@tearleads/client-sdk 0.1.18 → 0.1.20
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/client/organizations/index.js +2 -2
- package/client/organizations/index.js.map +1 -1
- package/client/organizations/organizationHistory.js +66 -0
- package/client/organizations/organizationHistory.js.map +1 -0
- package/client/organizations/organizationReadModels.d.ts +1 -1
- package/client/organizations/organizationReadModels.js +7 -27
- package/client/organizations/organizationReadModels.js.map +1 -1
- package/client/organizations/organizationsTypes.d.ts +1 -1
- package/client/organizations/organizationsTypes.js.map +1 -1
- package/data/containers/shared/types.d.ts +2 -2
- package/data/containers/shared/types.js.map +1 -1
- package/data/documents/shared/syncSubmitFailure.d.ts +2 -2
- package/data/documents/shared/syncSubmitFailure.js.map +1 -1
- package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js +34 -8
- package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js.map +1 -1
- package/data/keyingProjectionVerification/documentPurgeDocumentChainVerification.js.map +1 -1
- package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js +17 -0
- package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js +55 -0
- package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js +25 -13
- package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js.map +1 -1
- package/data/keyingProjectionVerification/documentPurgeProofVerification.d.ts +5 -3
- package/data/keyingProjectionVerification/documentPurgeProofVerification.js +52 -8
- package/data/keyingProjectionVerification/documentPurgeProofVerification.js.map +1 -1
- package/data/keyingProjectionVerification/projectionPolicyEvidence.js.map +1 -1
- package/data/keyingProjectionVerification/types.d.ts +4 -0
- package/data/keyingProjectionVerification/types.js.map +1 -1
- package/data/persistence/container-contents/documentMoveIntentPersistence.js.map +1 -1
- package/data/persistence/principalAuthorizationCheckpoints.js +1 -1
- package/data/persistence/principalAuthorizationCheckpoints.js.map +1 -1
- package/data/persistence/principalCurrentAcknowledgementPersistence.d.ts +1 -0
- package/data/persistence/principalCurrentAcknowledgementPersistence.js +58 -12
- package/data/persistence/principalCurrentAcknowledgementPersistence.js.map +1 -1
- package/data/persistence/principalHistoryEvidencePersistence.d.ts +2 -0
- package/data/persistence/principalHistoryEvidencePersistence.js +2 -0
- package/data/persistence/principalHistoryEvidencePersistence.js.map +1 -1
- package/data/persistence/principalHistoryIncompleteRetention.js +32 -0
- package/data/persistence/principalHistoryIncompleteRetention.js.map +1 -0
- package/data/persistence/principalHistoryNodeRetention.js +76 -0
- package/data/persistence/principalHistoryNodeRetention.js.map +1 -0
- package/data/persistence/principalHistoryPrefixPersistence.d.ts +1 -0
- package/data/persistence/principalHistoryPrefixPersistence.js +30 -1
- package/data/persistence/principalHistoryPrefixPersistence.js.map +1 -1
- package/data/persistence/principalHistoryRootOwnership.js +71 -0
- package/data/persistence/principalHistoryRootOwnership.js.map +1 -0
- package/data/persistence/principalHistoryStagePersistence.js +45 -0
- package/data/persistence/principalHistoryStagePersistence.js.map +1 -1
- package/data/persistence/principalHistoryStageRetention.js +44 -0
- package/data/persistence/principalHistoryStageRetention.js.map +1 -0
- package/data/persistence/principalHistoryUnpublishedRetention.js +71 -0
- package/data/persistence/principalHistoryUnpublishedRetention.js.map +1 -0
- package/data/persistence/principalKeyEnvelopeArchivePersistence.js +63 -0
- package/data/persistence/principalKeyEnvelopeArchivePersistence.js.map +1 -0
- package/data/persistence/principalKeyEnvelopeCandidates.js +10 -1
- package/data/persistence/principalKeyEnvelopeCandidates.js.map +1 -1
- package/data/sqlite/principalHistoryEvidenceSchema.js +2 -0
- package/data/sqlite/principalHistoryEvidenceSchema.js.map +1 -1
- package/data/sqlite/principalHistoryNodeRetentionSchema.js +30 -0
- package/data/sqlite/principalHistoryNodeRetentionSchema.js.map +1 -0
- package/data/sqlite/principalHistoryRetentionSchema.js +40 -0
- package/data/sqlite/principalHistoryRetentionSchema.js.map +1 -0
- package/data/sqlite/principalHistoryStageSchema.js +2 -0
- package/data/sqlite/principalHistoryStageSchema.js.map +1 -1
- package/data/sqlite/schema.d.ts +453 -0
- package/data/sqlite/schema.js +6 -0
- package/data/sqlite/schema.js.map +1 -1
- package/data/sqlite/sqliteCommitGuards.js +49 -0
- package/data/sqlite/sqliteCommitGuards.js.map +1 -0
- package/data/sqlite/sqlitePersistenceRuntime.js +14 -2
- package/data/sqlite/sqlitePersistenceRuntime.js.map +1 -1
- package/index.d.ts +3 -1
- package/index.js.map +1 -1
- package/internal/api-client/ApiClient.d.ts +60 -137
- package/internal/api-client/ApiClient.js +7 -5
- package/internal/api-client/ApiClient.js.map +1 -1
- package/internal/api-client/apiRequestRuntime.js +7 -7
- package/internal/api-client/apiRequestRuntime.js.map +1 -1
- package/internal/api-client/documentPurge.js +25 -0
- package/internal/api-client/documentPurge.js.map +1 -0
- package/internal/api-client/organizationPolicyHistory.d.ts +53 -0
- package/internal/api-client/organizationPolicyHistory.js +15 -0
- package/internal/api-client/organizationPolicyHistory.js.map +1 -0
- package/internal/api-client/requestInternals.js +4 -4
- package/internal/api-client/requestInternals.js.map +1 -1
- package/internal/api-client/types.d.ts +2 -2
- package/internal/api-client/types.js.map +1 -1
- package/internal/crypto/keying/principalPolicyHistory.js +4 -0
- package/internal/crypto/keying/principalPolicyHistory.js.map +1 -1
- package/internal/crypto/keying/principalPolicyHistoryTypes.d.ts +2 -0
- package/internal/crypto/keying/principalPolicyHistoryTypes.js.map +1 -1
- package/internal/loro/document.js +8 -11
- package/internal/loro/document.js.map +1 -1
- package/internal/validators/operation/containerMutations.d.ts +448 -6528
- package/internal/validators/operation/documentMutations.d.ts +323 -579
- package/internal/validators/operation/documentMutations.js +22 -4
- package/internal/validators/operation/documentMutations.js.map +1 -1
- package/internal/validators/operation/documentSync.d.ts +26 -406
- package/internal/validators/operation/organizationPolicyHistory.d.ts +188 -310
- package/internal/validators/operation/organizationPolicyHistory.js +17 -3
- package/internal/validators/operation/organizationPolicyHistory.js.map +1 -1
- package/internal/validators/response/containerMutationError.d.ts +28 -408
- package/internal/validators/response/documentMutation.d.ts +232 -544
- package/internal/validators/response/documentMutation.js +1 -2
- package/internal/validators/response/documentMutation.js.map +1 -1
- package/internal/validators/response/documentSyncError.d.ts +26 -406
- package/internal/validators/response/documentSyncError.js +4 -3
- package/internal/validators/response/documentSyncError.js.map +1 -1
- package/internal/validators/response/index.d.ts +1 -1
- package/internal/validators/response/index.js +1 -1
- package/internal/validators/response/index.js.map +1 -1
- package/internal/validators/response/organizationPolicyHistory.d.ts +127 -309
- package/internal/validators/response/organizationPolicyHistory.js +10 -4
- package/internal/validators/response/organizationPolicyHistory.js.map +1 -1
- package/internal/validators/response/principal.d.ts +28 -408
- package/internal/validators/response/principal.js +3 -1
- package/internal/validators/response/principal.js.map +1 -1
- package/internal/validators/util/index.d.ts +1 -1
- package/internal/validators/util/index.js +1 -1
- package/internal/validators/util/index.js.map +1 -1
- package/internal/validators/util/principalHistoryWire.d.ts +2 -0
- package/internal/validators/util/principalHistoryWire.js +2 -0
- package/internal/validators/util/principalHistoryWire.js.map +1 -1
- package/package.json +4 -4
- package/workflows/container-contents/container-state/createWithMetadata.js +19 -49
- package/workflows/container-contents/container-state/createWithMetadata.js.map +1 -1
- package/workflows/container-contents/container-state/groupGrantVerification.js +29 -0
- package/workflows/container-contents/container-state/groupGrantVerification.js.map +1 -1
- package/workflows/container-contents/container-state/groupShareEpoch.js +33 -0
- package/workflows/container-contents/container-state/groupShareEpoch.js.map +1 -0
- package/workflows/container-contents/container-state/remote.js +4 -1
- package/workflows/container-contents/container-state/remote.js.map +1 -1
- package/workflows/container-contents/container-state/share.js +2 -24
- package/workflows/container-contents/container-state/share.js.map +1 -1
- package/workflows/container-contents/documentTombstoneEvidence.js +23 -12
- package/workflows/container-contents/documentTombstoneEvidence.js.map +1 -1
- package/workflows/containers/child/create.js +1 -3
- package/workflows/containers/child/create.js.map +1 -1
- package/workflows/containers/child/createSubmission.d.ts +1 -3
- package/workflows/containers/child/createSubmission.js +13 -15
- package/workflows/containers/child/createSubmission.js.map +1 -1
- package/workflows/containers/child/currentShareGrantMutation.js +82 -0
- package/workflows/containers/child/currentShareGrantMutation.js.map +1 -0
- package/workflows/containers/child/currentSharePrincipalPolicy.js +83 -0
- package/workflows/containers/child/currentSharePrincipalPolicy.js.map +1 -0
- package/workflows/containers/child/mutationSubmit.js +1 -1
- package/workflows/containers/child/mutationSubmit.js.map +1 -1
- package/workflows/containers/child/runtimeCurrentGroupShare.js +82 -0
- package/workflows/containers/child/runtimeCurrentGroupShare.js.map +1 -0
- package/workflows/containers/child/share.js +1 -14
- package/workflows/containers/child/share.js.map +1 -1
- package/workflows/containers/child/shareProjection.js +15 -0
- package/workflows/containers/child/shareProjection.js.map +1 -0
- package/workflows/documents/purge.d.ts +3 -0
- package/workflows/documents/purge.js +13 -0
- package/workflows/documents/purge.js.map +1 -1
- package/workflows/documents/sync.js +2 -0
- package/workflows/documents/sync.js.map +1 -1
- package/workflows/documents/syncFailures.js +2 -2
- package/workflows/documents/syncFailures.js.map +1 -1
- package/workflows/documents/syncPolicyRepair.js +15 -13
- package/workflows/documents/syncPolicyRepair.js.map +1 -1
- package/workflows/organizations/initialPrincipalCurrentPublication.js +2 -0
- package/workflows/organizations/initialPrincipalCurrentPublication.js.map +1 -1
- package/workflows/organizations/loadPolicyHistoryDetails.js +31 -32
- package/workflows/organizations/loadPolicyHistoryDetails.js.map +1 -1
- package/workflows/organizations/organizationPolicyHistoryDetails.js +37 -15
- package/workflows/organizations/organizationPolicyHistoryDetails.js.map +1 -1
- package/workflows/organizations/organizationPolicyHistoryVerification.js +56 -69
- package/workflows/organizations/organizationPolicyHistoryVerification.js.map +1 -1
- package/workflows/organizations/policyHistoryCache.js +5 -2
- package/workflows/organizations/policyHistoryCache.js.map +1 -1
- package/workflows/organizations/policyHistoryTypes.d.ts +1 -0
- package/workflows/organizations/policyHistoryTypes.js.map +1 -1
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js +4 -1
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js.map +1 -1
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.d.ts +0 -1
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.js +1 -2
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.js.map +1 -1
- package/workflows/principals/policyRepair.js +38 -0
- package/workflows/principals/policyRepair.js.map +1 -0
- package/workflows/principals/policyRepairBudget.d.ts +2 -2
- package/workflows/principals/policyRepairBudget.js +3 -3
- package/workflows/principals/policyRepairBudget.js.map +1 -1
- package/workflows/principals/principalHistoryRecoveryPrefix.js +4 -0
- package/workflows/principals/principalHistoryRecoveryPrefix.js.map +1 -1
- package/workflows/principals/principalRecoveryLocalPreference.js +3 -2
- package/workflows/principals/principalRecoveryLocalPreference.js.map +1 -1
- package/workflows/principals/publicPrincipalHistoryPage.js +1 -0
- package/workflows/principals/publicPrincipalHistoryPage.js.map +1 -1
- package/workflows/principals/publicPrincipalHistoryProgress.js +1 -0
- package/workflows/principals/publicPrincipalHistoryProgress.js.map +1 -1
- package/workflows/principals/publicPrincipalHistoryTypes.d.ts +2 -0
- package/workflows/principals/publicPrincipalHistoryTypes.js.map +1 -1
- package/workflows/principals/publicProjectionPrincipal.js +1 -0
- package/workflows/principals/publicProjectionPrincipal.js.map +1 -1
- package/workflows/principals/recoverPrincipalHistoryPage.js +2 -1
- package/workflows/principals/recoverPrincipalHistoryPage.js.map +1 -1
- package/workflows/principals/recoverPrincipalPolicyHistory.js +1 -0
- package/workflows/principals/recoverPrincipalPolicyHistory.js.map +1 -1
- package/workflows/principals/recoverPublicPrincipalHistory.js +2 -0
- package/workflows/principals/recoverPublicPrincipalHistory.js.map +1 -1
- package/workflows/principals/runtimePolicyRecovery.js +2 -1
- package/workflows/principals/runtimePolicyRecovery.js.map +1 -1
- package/workflows/principals/selectPublicPrincipalHistory.js +21 -15
- package/workflows/principals/selectPublicPrincipalHistory.js.map +1 -1
- package/workflows/sync/remoteResetPrincipalScope.js +6 -0
- package/workflows/sync/remoteResetPrincipalScope.js.map +1 -1
- package/data/keyingProjectionVerification/principalPolicySnapshotVerification.js +0 -208
- package/data/keyingProjectionVerification/principalPolicySnapshotVerification.js.map +0 -1
- package/data/keyingProjectionVerification/snapshotVerificationCache.js +0 -39
- package/data/keyingProjectionVerification/snapshotVerificationCache.js.map +0 -1
- package/workflows/containers/child/policyRepair.js +0 -23
- package/workflows/containers/child/policyRepair.js.map +0 -1
|
@@ -3,6 +3,7 @@ import { documentLinkSetPathRefinement, documentSyncRequestRotationRefinement, }
|
|
|
3
3
|
import { registerJsonSchemaFragment } from "../jsonSchema.js";
|
|
4
4
|
import { DocumentCreateRequestSchema, DocumentLinkSetMutationRequestSchema, DocumentPurgeRequestSchema, isDocumentCreateRequest, isDocumentLinkSetMutationRequest, isDocumentPurgeRequest, } from "../request/index.js";
|
|
5
5
|
import { DocumentCreateResponseSchema, DocumentLinkSetMutationResponseSchema, DocumentMutationFailureResponseSchema, DocumentPurgeProofResponseSchema, DocumentPurgeResponseSchema, ErrorResponseSchema, isDocumentCreateResponse, isDocumentLinkSetMutationResponse, isDocumentPurgeProofResponse, isDocumentPurgeResponse, PaymentRequiredErrorResponseSchema, SessionFailureResponseSchema, } from "../response/index.js";
|
|
6
|
+
import { PrincipalHistoryPreparationFailureResponseSchema, PrincipalHistoryPreparationResponseSchema, principalHistoryRollbackRefinement, } from "../response/principalHistoryPreparation.js";
|
|
6
7
|
import { defineJsonOperation } from "./definition.js";
|
|
7
8
|
import { DocumentSyncPathParamsSchema } from "./documentSync.js";
|
|
8
9
|
const EmptyDocumentMutationPathParamsSchema = z.strictObject({});
|
|
@@ -60,27 +61,44 @@ export const unlinkDocumentOperation = defineDocumentLinkSetMutationOperation({
|
|
|
60
61
|
id: "documents.unlink",
|
|
61
62
|
path: "/documents/{documentId}/unlink",
|
|
62
63
|
});
|
|
64
|
+
const documentPurgeFailureResponses = {
|
|
65
|
+
...documentMutationFailureResponses,
|
|
66
|
+
503: PrincipalHistoryPreparationFailureResponseSchema,
|
|
67
|
+
};
|
|
68
|
+
const preparationResponseDescriptions = {
|
|
69
|
+
202: "The attempted operation rolled back. Retry the identical request to continue verification preparation.",
|
|
70
|
+
};
|
|
63
71
|
export const purgeDocumentOperation = defineJsonOperation({
|
|
64
72
|
auth: "session",
|
|
65
73
|
body: DocumentPurgeRequestSchema,
|
|
66
|
-
failureResponses:
|
|
74
|
+
failureResponses: documentPurgeFailureResponses,
|
|
67
75
|
failureStatuses: documentMutationFailureStatuses,
|
|
68
76
|
id: "documents.purge",
|
|
69
77
|
method: "POST",
|
|
70
78
|
params: DocumentMutationPathParamsSchema,
|
|
71
79
|
path: "/documents/{documentId}/purge",
|
|
72
|
-
|
|
80
|
+
responseDescriptions: preparationResponseDescriptions,
|
|
81
|
+
responses: {
|
|
82
|
+
200: DocumentPurgeResponseSchema,
|
|
83
|
+
202: PrincipalHistoryPreparationResponseSchema,
|
|
84
|
+
},
|
|
85
|
+
runtimeRefinements: [principalHistoryRollbackRefinement],
|
|
73
86
|
});
|
|
74
87
|
export const getDocumentPurgeProofOperation = defineJsonOperation({
|
|
75
88
|
auth: "session",
|
|
76
|
-
failureResponses:
|
|
89
|
+
failureResponses: documentPurgeFailureResponses,
|
|
77
90
|
failureStatuses: documentMutationFailureStatuses,
|
|
78
91
|
id: "documents.purgeProof",
|
|
79
92
|
method: "GET",
|
|
80
93
|
params: DocumentMutationPathParamsSchema,
|
|
81
94
|
path: "/documents/{documentId}/purge",
|
|
82
95
|
query: DocumentPurgeProofQuerySchema,
|
|
83
|
-
|
|
96
|
+
responseDescriptions: preparationResponseDescriptions,
|
|
97
|
+
responses: {
|
|
98
|
+
200: DocumentPurgeProofResponseSchema,
|
|
99
|
+
202: PrincipalHistoryPreparationResponseSchema,
|
|
100
|
+
},
|
|
101
|
+
runtimeRefinements: [principalHistoryRollbackRefinement],
|
|
84
102
|
});
|
|
85
103
|
export const isCreateDocumentOperationRequest = isDocumentCreateRequest;
|
|
86
104
|
export const isCreateDocumentOperationResponse = isDocumentCreateResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentMutations.js","sourceRoot":"","sources":["documentMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,6BAA6B,EAC7B,qCAAqC,GACtC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,EACpC,0BAA0B,EAC1B,uBAAuB,EACvB,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,4BAA4B,EAC5B,qCAAqC,EACrC,qCAAqC,EACrC,gCAAgC,EAChC,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,iCAAiC,EACjC,4BAA4B,EAC5B,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,qCAAqC,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAEjE,MAAM,CAAC,MAAM,gCAAgC,GAAG,4BAA4B,CAAC;AAM7E,MAAM,iCAAiC,GAAG,0BAA0B,CAClE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAC5B,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CACnD,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC1D,8BAA8B,EAAE,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IAC1B,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,gCAAgC;IACxC,IAAI,EAAE,+BAA+B;IACrC,KAAK,EAAE,6BAA6B;IACpC,oBAAoB,EAAE,+BAA+B;IACrD,SAAS,EAAE;QACT,GAAG,EAAE,gCAAgC;QACrC,GAAG,EAAE,yCAAyC;KAC/C;IACD,kBAAkB,EAAE,CAAC,kCAAkC,CAAC;CACzD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,uBAAuB,CAAC;AACxE,MAAM,CAAC,MAAM,iCAAiC,GAAG,wBAAwB,CAAC;AAC1E,MAAM,CAAC,MAAM,yCAAyC,GACpD,gCAAgC,CAAC;AACnC,MAAM,CAAC,MAAM,0CAA0C,GACrD,iCAAiC,CAAC;AACpC,MAAM,CAAC,MAAM,+BAA+B,GAAG,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,gCAAgC,GAAG,uBAAuB,CAAC;AACxE,MAAM,CAAC,MAAM,wCAAwC,GACnD,4BAA4B,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n documentLinkSetPathRefinement,\n documentSyncRequestRotationRefinement,\n} from \"../documentSyncRefinements\";\nimport { registerJsonSchemaFragment } from \"../jsonSchema\";\nimport {\n DocumentCreateRequestSchema,\n DocumentLinkSetMutationRequestSchema,\n DocumentPurgeRequestSchema,\n isDocumentCreateRequest,\n isDocumentLinkSetMutationRequest,\n isDocumentPurgeRequest,\n} from \"../request\";\nimport {\n DocumentCreateResponseSchema,\n DocumentLinkSetMutationResponseSchema,\n DocumentMutationFailureResponseSchema,\n DocumentPurgeProofResponseSchema,\n DocumentPurgeResponseSchema,\n ErrorResponseSchema,\n isDocumentCreateResponse,\n isDocumentLinkSetMutationResponse,\n isDocumentPurgeProofResponse,\n isDocumentPurgeResponse,\n PaymentRequiredErrorResponseSchema,\n SessionFailureResponseSchema,\n} from \"../response\";\nimport {\n PrincipalHistoryPreparationFailureResponseSchema,\n PrincipalHistoryPreparationResponseSchema,\n principalHistoryRollbackRefinement,\n} from \"../response/principalHistoryPreparation\";\nimport { defineJsonOperation } from \"./definition\";\nimport { DocumentSyncPathParamsSchema } from \"./documentSync\";\n\nconst EmptyDocumentMutationPathParamsSchema = z.strictObject({});\n\nexport const DocumentMutationPathParamsSchema = DocumentSyncPathParamsSchema;\n\nexport type DocumentMutationPathParams = z.infer<\n typeof DocumentMutationPathParamsSchema\n>;\n\nconst checkpointManifestHashQuerySchema = registerJsonSchemaFragment(\n z.string().min(1).max(6_500),\n { maxLength: 6_500, minLength: 1, type: \"string\" },\n);\n\nexport const DocumentPurgeProofQuerySchema = z.strictObject({\n documentCheckpointManifestHash: checkpointManifestHashQuerySchema.optional(),\n});\n\nexport type DocumentPurgeProofQuery = z.infer<\n typeof DocumentPurgeProofQuerySchema\n>;\n\nconst documentMutationFailureResponses = {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 402: PaymentRequiredErrorResponseSchema,\n 403: ErrorResponseSchema,\n 404: DocumentMutationFailureResponseSchema,\n 409: DocumentMutationFailureResponseSchema,\n 500: ErrorResponseSchema,\n 503: ErrorResponseSchema,\n} as const;\n\nconst documentMutationFailureStatuses = [\n 400, 401, 402, 403, 404, 409, 500, 503,\n] as const;\n\nexport const createDocumentOperation = defineJsonOperation({\n auth: \"session\",\n body: DocumentCreateRequestSchema,\n failureResponses: documentMutationFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: \"documents.create\",\n method: \"POST\",\n params: EmptyDocumentMutationPathParamsSchema,\n path: \"/documents\",\n responses: { 200: DocumentCreateResponseSchema },\n});\n\nfunction defineDocumentLinkSetMutationOperation<\n const Id extends string,\n const Path extends `/${string}`,\n>(input: { readonly id: Id; readonly path: Path }) {\n return defineJsonOperation({\n auth: \"session\",\n body: DocumentLinkSetMutationRequestSchema,\n failureResponses: documentMutationFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: input.id,\n method: \"POST\",\n params: DocumentMutationPathParamsSchema,\n path: input.path,\n responses: { 200: DocumentLinkSetMutationResponseSchema },\n runtimeRefinements: [\n documentLinkSetPathRefinement,\n documentSyncRequestRotationRefinement,\n ],\n });\n}\n\nexport const linkDocumentOperation = defineDocumentLinkSetMutationOperation({\n id: \"documents.link\",\n path: \"/documents/{documentId}/link\",\n});\n\nexport const unlinkDocumentOperation = defineDocumentLinkSetMutationOperation({\n id: \"documents.unlink\",\n path: \"/documents/{documentId}/unlink\",\n});\n\nconst documentPurgeFailureResponses = {\n ...documentMutationFailureResponses,\n 503: PrincipalHistoryPreparationFailureResponseSchema,\n} as const;\n\nconst preparationResponseDescriptions = {\n 202: \"The attempted operation rolled back. Retry the identical request to continue verification preparation.\",\n} as const;\n\nexport const purgeDocumentOperation = defineJsonOperation({\n auth: \"session\",\n body: DocumentPurgeRequestSchema,\n failureResponses: documentPurgeFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: \"documents.purge\",\n method: \"POST\",\n params: DocumentMutationPathParamsSchema,\n path: \"/documents/{documentId}/purge\",\n responseDescriptions: preparationResponseDescriptions,\n responses: {\n 200: DocumentPurgeResponseSchema,\n 202: PrincipalHistoryPreparationResponseSchema,\n },\n runtimeRefinements: [principalHistoryRollbackRefinement],\n});\n\nexport const getDocumentPurgeProofOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: documentPurgeFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: \"documents.purgeProof\",\n method: \"GET\",\n params: DocumentMutationPathParamsSchema,\n path: \"/documents/{documentId}/purge\",\n query: DocumentPurgeProofQuerySchema,\n responseDescriptions: preparationResponseDescriptions,\n responses: {\n 200: DocumentPurgeProofResponseSchema,\n 202: PrincipalHistoryPreparationResponseSchema,\n },\n runtimeRefinements: [principalHistoryRollbackRefinement],\n});\n\nexport const isCreateDocumentOperationRequest = isDocumentCreateRequest;\nexport const isCreateDocumentOperationResponse = isDocumentCreateResponse;\nexport const isDocumentLinkSetMutationOperationRequest =\n isDocumentLinkSetMutationRequest;\nexport const isDocumentLinkSetMutationOperationResponse =\n isDocumentLinkSetMutationResponse;\nexport const isPurgeDocumentOperationRequest = isDocumentPurgeRequest;\nexport const isPurgeDocumentOperationResponse = isDocumentPurgeResponse;\nexport const isGetDocumentPurgeProofOperationResponse =\n isDocumentPurgeProofResponse;\n"]}
|
|
@@ -389,210 +389,20 @@ export declare const documentSyncOperation: Omit<{
|
|
|
389
389
|
readonly 409: z.ZodObject<{
|
|
390
390
|
code: z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">;
|
|
391
391
|
error: z.ZodString;
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
role: "member" | "admin";
|
|
400
|
-
userId: string;
|
|
401
|
-
}[];
|
|
402
|
-
state: {
|
|
403
|
-
createdAt: string;
|
|
404
|
-
encapsulationPublicKey: string;
|
|
405
|
-
externalAuthority: {
|
|
406
|
-
keyEpoch: number;
|
|
407
|
-
keyFingerprint: string;
|
|
408
|
-
principalId: string;
|
|
409
|
-
principalType: "group";
|
|
410
|
-
stateHash: string;
|
|
411
|
-
version: number;
|
|
412
|
-
} | null;
|
|
413
|
-
grantCount: number;
|
|
414
|
-
grantRoot: string;
|
|
415
|
-
keyEpoch: number;
|
|
416
|
-
keyFingerprint: string;
|
|
417
|
-
memberCount: number;
|
|
418
|
-
memberEnvelopesRoot: string;
|
|
419
|
-
membershipMode: "projection";
|
|
420
|
-
membershipRoot: string;
|
|
421
|
-
payloadCiphertextHash: string;
|
|
422
|
-
prevStateHash: string | null;
|
|
423
|
-
principalId: string;
|
|
424
|
-
principalType: "group" | "organization";
|
|
425
|
-
projectionRoot: string;
|
|
426
|
-
signature: string;
|
|
427
|
-
signedAt: string;
|
|
428
|
-
signerUserId: string;
|
|
429
|
-
signerUserKeyFingerprint: string;
|
|
430
|
-
stateHash: string;
|
|
431
|
-
version: number;
|
|
432
|
-
};
|
|
433
|
-
}[];
|
|
434
|
-
currentGrants: {
|
|
435
|
-
accessLevel: "admin" | "read" | "write";
|
|
436
|
-
containerId: string;
|
|
437
|
-
}[];
|
|
438
|
-
currentMemberEnvelopes: {
|
|
439
|
-
envelopes: {
|
|
440
|
-
kemCipherText: string;
|
|
441
|
-
memberKeyFingerprint: string;
|
|
442
|
-
userId: string;
|
|
443
|
-
wrappedKey: string;
|
|
444
|
-
}[];
|
|
445
|
-
epoch: number;
|
|
446
|
-
principalId: string;
|
|
447
|
-
principalType: "group" | "organization";
|
|
448
|
-
stateHash: string;
|
|
449
|
-
};
|
|
450
|
-
currentPayload: {
|
|
451
|
-
cipherSuite: "aes-256-gcm";
|
|
452
|
-
ciphertext: string;
|
|
453
|
-
ciphertextHash: string;
|
|
454
|
-
createdAt: string;
|
|
455
|
-
principalId: string;
|
|
456
|
-
principalType: "group" | "organization";
|
|
457
|
-
stateHash: string;
|
|
458
|
-
};
|
|
459
|
-
currentProjection: {
|
|
460
|
-
role: "member" | "admin";
|
|
461
|
-
userId: string;
|
|
462
|
-
}[];
|
|
463
|
-
currentState: {
|
|
464
|
-
createdAt: string;
|
|
465
|
-
encapsulationPublicKey: string;
|
|
466
|
-
externalAuthority: {
|
|
467
|
-
keyEpoch: number;
|
|
468
|
-
keyFingerprint: string;
|
|
469
|
-
principalId: string;
|
|
470
|
-
principalType: "group";
|
|
471
|
-
stateHash: string;
|
|
472
|
-
version: number;
|
|
473
|
-
} | null;
|
|
474
|
-
grantCount: number;
|
|
475
|
-
grantRoot: string;
|
|
476
|
-
keyEpoch: number;
|
|
477
|
-
keyFingerprint: string;
|
|
478
|
-
memberCount: number;
|
|
479
|
-
memberEnvelopesRoot: string;
|
|
480
|
-
membershipMode: "projection";
|
|
481
|
-
membershipRoot: string;
|
|
482
|
-
payloadCiphertextHash: string;
|
|
483
|
-
prevStateHash: string | null;
|
|
484
|
-
principalId: string;
|
|
485
|
-
principalType: "group" | "organization";
|
|
486
|
-
projectionRoot: string;
|
|
487
|
-
signature: string;
|
|
488
|
-
signedAt: string;
|
|
489
|
-
signerUserId: string;
|
|
490
|
-
signerUserKeyFingerprint: string;
|
|
491
|
-
stateHash: string;
|
|
492
|
-
version: number;
|
|
493
|
-
};
|
|
392
|
+
principalHeads: z.ZodOptional<z.ZodCustom<{
|
|
393
|
+
keyEpoch: number;
|
|
394
|
+
keyFingerprint: string;
|
|
395
|
+
principalId: string;
|
|
396
|
+
principalType: "group" | "organization";
|
|
397
|
+
stateHash: string;
|
|
398
|
+
version: number;
|
|
494
399
|
}[], {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
role: "member" | "admin";
|
|
502
|
-
userId: string;
|
|
503
|
-
}[];
|
|
504
|
-
state: {
|
|
505
|
-
createdAt: string;
|
|
506
|
-
encapsulationPublicKey: string;
|
|
507
|
-
externalAuthority: {
|
|
508
|
-
keyEpoch: number;
|
|
509
|
-
keyFingerprint: string;
|
|
510
|
-
principalId: string;
|
|
511
|
-
principalType: "group";
|
|
512
|
-
stateHash: string;
|
|
513
|
-
version: number;
|
|
514
|
-
} | null;
|
|
515
|
-
grantCount: number;
|
|
516
|
-
grantRoot: string;
|
|
517
|
-
keyEpoch: number;
|
|
518
|
-
keyFingerprint: string;
|
|
519
|
-
memberCount: number;
|
|
520
|
-
memberEnvelopesRoot: string;
|
|
521
|
-
membershipMode: "projection";
|
|
522
|
-
membershipRoot: string;
|
|
523
|
-
payloadCiphertextHash: string;
|
|
524
|
-
prevStateHash: string | null;
|
|
525
|
-
principalId: string;
|
|
526
|
-
principalType: "group" | "organization";
|
|
527
|
-
projectionRoot: string;
|
|
528
|
-
signature: string;
|
|
529
|
-
signedAt: string;
|
|
530
|
-
signerUserId: string;
|
|
531
|
-
signerUserKeyFingerprint: string;
|
|
532
|
-
stateHash: string;
|
|
533
|
-
version: number;
|
|
534
|
-
};
|
|
535
|
-
}[];
|
|
536
|
-
currentGrants: {
|
|
537
|
-
accessLevel: "admin" | "read" | "write";
|
|
538
|
-
containerId: string;
|
|
539
|
-
}[];
|
|
540
|
-
currentMemberEnvelopes: {
|
|
541
|
-
envelopes: {
|
|
542
|
-
kemCipherText: string;
|
|
543
|
-
memberKeyFingerprint: string;
|
|
544
|
-
userId: string;
|
|
545
|
-
wrappedKey: string;
|
|
546
|
-
}[];
|
|
547
|
-
epoch: number;
|
|
548
|
-
principalId: string;
|
|
549
|
-
principalType: "group" | "organization";
|
|
550
|
-
stateHash: string;
|
|
551
|
-
};
|
|
552
|
-
currentPayload: {
|
|
553
|
-
cipherSuite: "aes-256-gcm";
|
|
554
|
-
ciphertext: string;
|
|
555
|
-
ciphertextHash: string;
|
|
556
|
-
createdAt: string;
|
|
557
|
-
principalId: string;
|
|
558
|
-
principalType: "group" | "organization";
|
|
559
|
-
stateHash: string;
|
|
560
|
-
};
|
|
561
|
-
currentProjection: {
|
|
562
|
-
role: "member" | "admin";
|
|
563
|
-
userId: string;
|
|
564
|
-
}[];
|
|
565
|
-
currentState: {
|
|
566
|
-
createdAt: string;
|
|
567
|
-
encapsulationPublicKey: string;
|
|
568
|
-
externalAuthority: {
|
|
569
|
-
keyEpoch: number;
|
|
570
|
-
keyFingerprint: string;
|
|
571
|
-
principalId: string;
|
|
572
|
-
principalType: "group";
|
|
573
|
-
stateHash: string;
|
|
574
|
-
version: number;
|
|
575
|
-
} | null;
|
|
576
|
-
grantCount: number;
|
|
577
|
-
grantRoot: string;
|
|
578
|
-
keyEpoch: number;
|
|
579
|
-
keyFingerprint: string;
|
|
580
|
-
memberCount: number;
|
|
581
|
-
memberEnvelopesRoot: string;
|
|
582
|
-
membershipMode: "projection";
|
|
583
|
-
membershipRoot: string;
|
|
584
|
-
payloadCiphertextHash: string;
|
|
585
|
-
prevStateHash: string | null;
|
|
586
|
-
principalId: string;
|
|
587
|
-
principalType: "group" | "organization";
|
|
588
|
-
projectionRoot: string;
|
|
589
|
-
signature: string;
|
|
590
|
-
signedAt: string;
|
|
591
|
-
signerUserId: string;
|
|
592
|
-
signerUserKeyFingerprint: string;
|
|
593
|
-
stateHash: string;
|
|
594
|
-
version: number;
|
|
595
|
-
};
|
|
400
|
+
keyEpoch: number;
|
|
401
|
+
keyFingerprint: string;
|
|
402
|
+
principalId: string;
|
|
403
|
+
principalType: "group" | "organization";
|
|
404
|
+
stateHash: string;
|
|
405
|
+
version: number;
|
|
596
406
|
}[]>>;
|
|
597
407
|
}, z.core.$loose>;
|
|
598
408
|
readonly 413: z.ZodType<{
|
|
@@ -994,210 +804,20 @@ export declare const documentSyncOperation: Omit<{
|
|
|
994
804
|
readonly 409: z.ZodObject<{
|
|
995
805
|
code: z.ZodLiteral<"document_sync_checkpoint_coverage_conflict" | "document_sync_conflict" | "document_sync_descendant_rekeys_required" | "document_sync_state_stale" | "document_sync_update_id_conflict">;
|
|
996
806
|
error: z.ZodString;
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
role: "member" | "admin";
|
|
1005
|
-
userId: string;
|
|
1006
|
-
}[];
|
|
1007
|
-
state: {
|
|
1008
|
-
createdAt: string;
|
|
1009
|
-
encapsulationPublicKey: string;
|
|
1010
|
-
externalAuthority: {
|
|
1011
|
-
keyEpoch: number;
|
|
1012
|
-
keyFingerprint: string;
|
|
1013
|
-
principalId: string;
|
|
1014
|
-
principalType: "group";
|
|
1015
|
-
stateHash: string;
|
|
1016
|
-
version: number;
|
|
1017
|
-
} | null;
|
|
1018
|
-
grantCount: number;
|
|
1019
|
-
grantRoot: string;
|
|
1020
|
-
keyEpoch: number;
|
|
1021
|
-
keyFingerprint: string;
|
|
1022
|
-
memberCount: number;
|
|
1023
|
-
memberEnvelopesRoot: string;
|
|
1024
|
-
membershipMode: "projection";
|
|
1025
|
-
membershipRoot: string;
|
|
1026
|
-
payloadCiphertextHash: string;
|
|
1027
|
-
prevStateHash: string | null;
|
|
1028
|
-
principalId: string;
|
|
1029
|
-
principalType: "group" | "organization";
|
|
1030
|
-
projectionRoot: string;
|
|
1031
|
-
signature: string;
|
|
1032
|
-
signedAt: string;
|
|
1033
|
-
signerUserId: string;
|
|
1034
|
-
signerUserKeyFingerprint: string;
|
|
1035
|
-
stateHash: string;
|
|
1036
|
-
version: number;
|
|
1037
|
-
};
|
|
1038
|
-
}[];
|
|
1039
|
-
currentGrants: {
|
|
1040
|
-
accessLevel: "admin" | "read" | "write";
|
|
1041
|
-
containerId: string;
|
|
1042
|
-
}[];
|
|
1043
|
-
currentMemberEnvelopes: {
|
|
1044
|
-
envelopes: {
|
|
1045
|
-
kemCipherText: string;
|
|
1046
|
-
memberKeyFingerprint: string;
|
|
1047
|
-
userId: string;
|
|
1048
|
-
wrappedKey: string;
|
|
1049
|
-
}[];
|
|
1050
|
-
epoch: number;
|
|
1051
|
-
principalId: string;
|
|
1052
|
-
principalType: "group" | "organization";
|
|
1053
|
-
stateHash: string;
|
|
1054
|
-
};
|
|
1055
|
-
currentPayload: {
|
|
1056
|
-
cipherSuite: "aes-256-gcm";
|
|
1057
|
-
ciphertext: string;
|
|
1058
|
-
ciphertextHash: string;
|
|
1059
|
-
createdAt: string;
|
|
1060
|
-
principalId: string;
|
|
1061
|
-
principalType: "group" | "organization";
|
|
1062
|
-
stateHash: string;
|
|
1063
|
-
};
|
|
1064
|
-
currentProjection: {
|
|
1065
|
-
role: "member" | "admin";
|
|
1066
|
-
userId: string;
|
|
1067
|
-
}[];
|
|
1068
|
-
currentState: {
|
|
1069
|
-
createdAt: string;
|
|
1070
|
-
encapsulationPublicKey: string;
|
|
1071
|
-
externalAuthority: {
|
|
1072
|
-
keyEpoch: number;
|
|
1073
|
-
keyFingerprint: string;
|
|
1074
|
-
principalId: string;
|
|
1075
|
-
principalType: "group";
|
|
1076
|
-
stateHash: string;
|
|
1077
|
-
version: number;
|
|
1078
|
-
} | null;
|
|
1079
|
-
grantCount: number;
|
|
1080
|
-
grantRoot: string;
|
|
1081
|
-
keyEpoch: number;
|
|
1082
|
-
keyFingerprint: string;
|
|
1083
|
-
memberCount: number;
|
|
1084
|
-
memberEnvelopesRoot: string;
|
|
1085
|
-
membershipMode: "projection";
|
|
1086
|
-
membershipRoot: string;
|
|
1087
|
-
payloadCiphertextHash: string;
|
|
1088
|
-
prevStateHash: string | null;
|
|
1089
|
-
principalId: string;
|
|
1090
|
-
principalType: "group" | "organization";
|
|
1091
|
-
projectionRoot: string;
|
|
1092
|
-
signature: string;
|
|
1093
|
-
signedAt: string;
|
|
1094
|
-
signerUserId: string;
|
|
1095
|
-
signerUserKeyFingerprint: string;
|
|
1096
|
-
stateHash: string;
|
|
1097
|
-
version: number;
|
|
1098
|
-
};
|
|
807
|
+
principalHeads: z.ZodOptional<z.ZodCustom<{
|
|
808
|
+
keyEpoch: number;
|
|
809
|
+
keyFingerprint: string;
|
|
810
|
+
principalId: string;
|
|
811
|
+
principalType: "group" | "organization";
|
|
812
|
+
stateHash: string;
|
|
813
|
+
version: number;
|
|
1099
814
|
}[], {
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
role: "member" | "admin";
|
|
1107
|
-
userId: string;
|
|
1108
|
-
}[];
|
|
1109
|
-
state: {
|
|
1110
|
-
createdAt: string;
|
|
1111
|
-
encapsulationPublicKey: string;
|
|
1112
|
-
externalAuthority: {
|
|
1113
|
-
keyEpoch: number;
|
|
1114
|
-
keyFingerprint: string;
|
|
1115
|
-
principalId: string;
|
|
1116
|
-
principalType: "group";
|
|
1117
|
-
stateHash: string;
|
|
1118
|
-
version: number;
|
|
1119
|
-
} | null;
|
|
1120
|
-
grantCount: number;
|
|
1121
|
-
grantRoot: string;
|
|
1122
|
-
keyEpoch: number;
|
|
1123
|
-
keyFingerprint: string;
|
|
1124
|
-
memberCount: number;
|
|
1125
|
-
memberEnvelopesRoot: string;
|
|
1126
|
-
membershipMode: "projection";
|
|
1127
|
-
membershipRoot: string;
|
|
1128
|
-
payloadCiphertextHash: string;
|
|
1129
|
-
prevStateHash: string | null;
|
|
1130
|
-
principalId: string;
|
|
1131
|
-
principalType: "group" | "organization";
|
|
1132
|
-
projectionRoot: string;
|
|
1133
|
-
signature: string;
|
|
1134
|
-
signedAt: string;
|
|
1135
|
-
signerUserId: string;
|
|
1136
|
-
signerUserKeyFingerprint: string;
|
|
1137
|
-
stateHash: string;
|
|
1138
|
-
version: number;
|
|
1139
|
-
};
|
|
1140
|
-
}[];
|
|
1141
|
-
currentGrants: {
|
|
1142
|
-
accessLevel: "admin" | "read" | "write";
|
|
1143
|
-
containerId: string;
|
|
1144
|
-
}[];
|
|
1145
|
-
currentMemberEnvelopes: {
|
|
1146
|
-
envelopes: {
|
|
1147
|
-
kemCipherText: string;
|
|
1148
|
-
memberKeyFingerprint: string;
|
|
1149
|
-
userId: string;
|
|
1150
|
-
wrappedKey: string;
|
|
1151
|
-
}[];
|
|
1152
|
-
epoch: number;
|
|
1153
|
-
principalId: string;
|
|
1154
|
-
principalType: "group" | "organization";
|
|
1155
|
-
stateHash: string;
|
|
1156
|
-
};
|
|
1157
|
-
currentPayload: {
|
|
1158
|
-
cipherSuite: "aes-256-gcm";
|
|
1159
|
-
ciphertext: string;
|
|
1160
|
-
ciphertextHash: string;
|
|
1161
|
-
createdAt: string;
|
|
1162
|
-
principalId: string;
|
|
1163
|
-
principalType: "group" | "organization";
|
|
1164
|
-
stateHash: string;
|
|
1165
|
-
};
|
|
1166
|
-
currentProjection: {
|
|
1167
|
-
role: "member" | "admin";
|
|
1168
|
-
userId: string;
|
|
1169
|
-
}[];
|
|
1170
|
-
currentState: {
|
|
1171
|
-
createdAt: string;
|
|
1172
|
-
encapsulationPublicKey: string;
|
|
1173
|
-
externalAuthority: {
|
|
1174
|
-
keyEpoch: number;
|
|
1175
|
-
keyFingerprint: string;
|
|
1176
|
-
principalId: string;
|
|
1177
|
-
principalType: "group";
|
|
1178
|
-
stateHash: string;
|
|
1179
|
-
version: number;
|
|
1180
|
-
} | null;
|
|
1181
|
-
grantCount: number;
|
|
1182
|
-
grantRoot: string;
|
|
1183
|
-
keyEpoch: number;
|
|
1184
|
-
keyFingerprint: string;
|
|
1185
|
-
memberCount: number;
|
|
1186
|
-
memberEnvelopesRoot: string;
|
|
1187
|
-
membershipMode: "projection";
|
|
1188
|
-
membershipRoot: string;
|
|
1189
|
-
payloadCiphertextHash: string;
|
|
1190
|
-
prevStateHash: string | null;
|
|
1191
|
-
principalId: string;
|
|
1192
|
-
principalType: "group" | "organization";
|
|
1193
|
-
projectionRoot: string;
|
|
1194
|
-
signature: string;
|
|
1195
|
-
signedAt: string;
|
|
1196
|
-
signerUserId: string;
|
|
1197
|
-
signerUserKeyFingerprint: string;
|
|
1198
|
-
stateHash: string;
|
|
1199
|
-
version: number;
|
|
1200
|
-
};
|
|
815
|
+
keyEpoch: number;
|
|
816
|
+
keyFingerprint: string;
|
|
817
|
+
principalId: string;
|
|
818
|
+
principalType: "group" | "organization";
|
|
819
|
+
stateHash: string;
|
|
820
|
+
version: number;
|
|
1201
821
|
}[]>>;
|
|
1202
822
|
}, z.core.$loose>;
|
|
1203
823
|
readonly 413: z.ZodType<{
|