@tearleads/client-sdk 0.1.244 → 0.1.247
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/persistence/container-contents/containerContentsPersistence.js +2 -0
- package/data/persistence/container-contents/containerContentsPersistence.js.map +1 -1
- package/data/persistence/container-contents/containerContentsPersistenceTypes.d.ts +2 -1
- package/data/persistence/container-contents/containerContentsPersistenceTypes.js.map +1 -1
- package/data/persistence/container-contents/containerMetadataRevalidations.d.ts +22 -0
- package/data/persistence/container-contents/containerMetadataRevalidations.js +52 -0
- package/data/persistence/container-contents/containerMetadataRevalidations.js.map +1 -0
- package/data/sqlite/schema/containerSchema.d.ts +173 -0
- package/data/sqlite/schema/containerSchema.js +18 -0
- package/data/sqlite/schema/containerSchema.js.map +1 -1
- package/data/sqlite/schema/index.d.ts +84 -1
- package/data/sqlite/schema/index.js +1 -1
- package/data/sqlite/schema/index.js.map +1 -1
- package/internal/api-client/ApiClient.d.ts +3 -8
- package/internal/api-client/client/apiClientContext.d.ts +1 -0
- package/internal/api-client/client/containerReads.d.ts +1 -0
- package/internal/api-client/client/session.d.ts +2 -0
- package/internal/crypto/keying/accessManifestVerificationTypes.d.ts +8 -2
- package/internal/crypto/keying/accessManifestVerificationTypes.js.map +1 -1
- package/internal/crypto/keying/containerAccess.js +1 -1
- package/internal/crypto/keying/containerAccess.js.map +1 -1
- package/internal/crypto/keying/documentAccess.js +1 -1
- package/internal/crypto/keying/documentAccess.js.map +1 -1
- package/internal/crypto/organizationReplacement.js +5 -6
- package/internal/crypto/organizationReplacement.js.map +1 -1
- package/internal/loro/document.d.ts +5 -0
- package/internal/loro/document.js +17 -0
- package/internal/loro/document.js.map +1 -1
- package/internal/loro/index.d.ts +1 -1
- package/internal/loro/index.js +1 -1
- package/internal/loro/index.js.map +1 -1
- package/internal/validators/operation/attachments.d.ts +0 -12
- package/internal/validators/operation/auth.d.ts +14 -76
- package/internal/validators/operation/auth.js +2 -1
- package/internal/validators/operation/auth.js.map +1 -1
- package/internal/validators/operation/containerMutations.d.ts +1 -49
- package/internal/validators/operation/containerMutations.js +1 -1
- package/internal/validators/operation/containerMutations.js.map +1 -1
- package/internal/validators/operation/containerReads.d.ts +2 -0
- package/internal/validators/operation/documentMutations.d.ts +0 -24
- package/internal/validators/operation/documentSync.d.ts +0 -4
- package/internal/validators/operation/organizations.d.ts +0 -88
- package/internal/validators/operation/principals.d.ts +0 -16
- package/internal/validators/request/blob.d.ts +0 -12
- package/internal/validators/request/container.d.ts +0 -16
- package/internal/validators/request/container.js +0 -2
- package/internal/validators/request/container.js.map +1 -1
- package/internal/validators/request/containerMetadata.d.ts +0 -20
- package/internal/validators/request/document.d.ts +0 -22
- package/internal/validators/request/document.js +0 -1
- package/internal/validators/request/document.js.map +1 -1
- package/internal/validators/request/documentSyncSchema.d.ts +0 -4
- package/internal/validators/request/documentSyncSchema.js +0 -1
- package/internal/validators/request/documentSyncSchema.js.map +1 -1
- package/internal/validators/request/organization.d.ts +0 -16
- package/internal/validators/request/organizationProvisioning.d.ts +0 -242
- package/internal/validators/request/principal.d.ts +0 -20
- package/internal/validators/request/registration.d.ts +0 -76
- package/internal/validators/response/areas/auth.d.ts +1 -1
- package/internal/validators/response/areas/auth.js +1 -1
- package/internal/validators/response/areas/auth.js.map +1 -1
- package/internal/validators/response/container.d.ts +8 -0
- package/internal/validators/response/container.js +1 -0
- package/internal/validators/response/container.js.map +1 -1
- package/internal/validators/response/containerParentLanes.d.ts +2 -0
- package/internal/validators/response/documentSyncSchema.d.ts +5 -0
- package/internal/validators/response/documentSyncSchema.js +1 -1
- package/internal/validators/response/documentSyncSchema.js.map +1 -1
- package/internal/validators/response/registration.d.ts +17 -1
- package/internal/validators/response/registration.js +31 -2
- package/internal/validators/response/registration.js.map +1 -1
- package/package.json +1 -1
- package/stores/container-contents/containerContentsStore.js +2 -0
- package/stores/container-contents/containerContentsStore.js.map +1 -1
- package/stores/container-contents/hydration/startupHydration.js +6 -2
- package/stores/container-contents/hydration/startupHydration.js.map +1 -1
- package/stores/container-contents/state.js +5 -1
- package/stores/container-contents/state.js.map +1 -1
- package/stores/container-contents/syncAgent/metadataRevalidation.js +79 -0
- package/stores/container-contents/syncAgent/metadataRevalidation.js.map +1 -0
- package/stores/container-contents/syncAgent/syncAgentTypes.d.ts +6 -0
- package/stores/container-contents/syncAgent/syncAgentTypes.js.map +1 -1
- package/stores/container-contents/syncAgent/syncLaneIteration.js +110 -23
- package/stores/container-contents/syncAgent/syncLaneIteration.js.map +1 -1
- package/workflows/container-contents/container-state/move/acceptedMoveSettlement.js +3 -0
- package/workflows/container-contents/container-state/move/acceptedMoveSettlement.js.map +1 -1
- package/workflows/container-contents/container-state/remote.js +3 -0
- package/workflows/container-contents/container-state/remote.js.map +1 -1
- package/workflows/container-contents/containerPersistence.d.ts +1 -0
- package/workflows/container-contents/containerPersistence.js.map +1 -1
- package/workflows/container-contents/metadata/index.js +4 -1
- package/workflows/container-contents/metadata/index.js.map +1 -1
- package/workflows/container-contents/metadata/metadataSyncFollowup.js +9 -0
- package/workflows/container-contents/metadata/metadataSyncFollowup.js.map +1 -1
- package/workflows/container-contents/metadata/metadataTypes.d.ts +2 -0
- package/workflows/container-contents/metadata/metadataTypes.js.map +1 -1
- package/workflows/container-contents/remoteHydration/index.js +9 -0
- package/workflows/container-contents/remoteHydration/index.js.map +1 -1
- package/workflows/container-contents/remoteHydration/remoteContainers/remoteContainerState.js +31 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/remoteContainerState.js.map +1 -1
- package/workflows/container-contents/remoteHydration/types.d.ts +9 -1
- package/workflows/container-contents/remoteHydration/types.js.map +1 -1
- package/workflows/containers/child/mutationRequestCore.js +1 -1
- package/workflows/containers/child/mutationRequestCore.js.map +1 -1
- package/workflows/containers/child/recitePlan.js +0 -1
- package/workflows/containers/child/recitePlan.js.map +1 -1
- package/workflows/containers/root/create.js +0 -1
- package/workflows/containers/root/create.js.map +1 -1
- package/workflows/documents/linkSet/index.js +0 -1
- package/workflows/documents/linkSet/index.js.map +1 -1
- package/workflows/organizations/principalPolicy/principalPolicyReceiptArtifacts.js +17 -10
- package/workflows/organizations/principalPolicy/principalPolicyReceiptArtifacts.js.map +1 -1
- package/workflows/registration/organizationCreation/createOrganization.js +3 -0
- package/workflows/registration/organizationCreation/createOrganization.js.map +1 -1
- package/workflows/registration/organizationProvisioningPersistence.d.ts +7 -0
- package/workflows/registration/organizationProvisioningPersistence.js +1 -0
- package/workflows/registration/organizationProvisioningPersistence.js.map +1 -1
- package/workflows/registration/persistRegistrationBootstrap.d.ts +7 -0
- package/workflows/registration/persistRegistrationBootstrap.js +6 -2
- package/workflows/registration/persistRegistrationBootstrap.js.map +1 -1
- package/workflows/registration/provisioningBootstrapBuilders.d.ts +0 -2
- package/workflows/registration/registerIdentity.js +1 -0
- package/workflows/registration/registerIdentity.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EACL,iDAAiD,EACjD,kDAAkD,GACnD,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,OA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BAAsB,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { documentSyncRequestRuntimeRefinements } from \"../documentSyncRefinements\";\nimport {\n organizationProvisioningRequestRuntimeRefinements,\n organizationProvisioningResponseRuntimeRefinements,\n} from \"../organizationProvisioningRefinements\";\nimport {\n ChallengeRequestSchema,\n isChallengeRequest,\n isRegistrationRequest,\n isVerifyRequest,\n RegistrationRequestSchema,\n VerifyRequestSchema,\n} from \"../request\";\nimport {\n ChallengeErrorResponseSchema,\n ChallengeResponseSchema,\n DestroySessionResponseSchema,\n ErrorResponseSchema,\n isChallengeResponse,\n isDestroySessionResponse,\n isListSessionsResponse,\n isRegistrationResponse,\n isUserIdentityResponse,\n isVerifyResponse,\n isWebSocketTicketResponse,\n ListSessionsResponseSchema,\n RegistrationResponseSchema,\n SessionFailureResponseSchema,\n UserIdentityResponseSchema,\n VerifyFailureResponseSchema,\n VerifySuccessResponseSchema,\n WebSocketTicketResponseSchema,\n} from \"../response\";\nimport { sha256HexStringSchema } from \"../schema\";\nimport { defineJsonOperation } from \"./definition\";\n\nconst AuthPathParamsSchema = z.strictObject({});\nconst SessionPathParamsSchema = z.strictObject({\n sessionId: sha256HexStringSchema,\n});\nconst UserIdentityPathParamsSchema = z.strictObject({\n userId: z.string(),\n});\n\nexport const challengeOperation = defineJsonOperation({\n auth: \"none\",\n body: ChallengeRequestSchema,\n failureResponses: {\n 400: ChallengeErrorResponseSchema,\n 404: ChallengeErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 404, 500],\n id: \"auth.challenge\",\n summary: \"Request an auth challenge\",\n description:\n \"Starts sign-in for a registered identity: the server stores a short-lived random challenge for the signing key fingerprint, and the client signs it and sends the signature to `POST /auth/verify`. No session is needed; an unknown fingerprint returns 404.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/challenge\",\n responses: {\n 200: ChallengeResponseSchema,\n },\n});\n\nexport const verifyOperation = defineJsonOperation({\n auth: \"none\",\n body: VerifyRequestSchema,\n failureResponses: {\n 400: ChallengeErrorResponseSchema,\n 401: VerifyFailureResponseSchema,\n 403: VerifyFailureResponseSchema,\n 404: VerifyFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 403, 404, 500],\n id: \"auth.verify\",\n summary: \"Verify an auth challenge\",\n description:\n \"Completes sign-in by checking the challenge signature, bound to the API origin, against the identity's registered signing key, then opens a session and returns its bearer token plus the first WebSocket ticket. Each challenge can be used once. A suspended identity's valid signature is refused with 403 and code `account_suspended`, which clients treat as terminal.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/verify\",\n responses: {\n 200: VerifySuccessResponseSchema,\n },\n});\n\nexport const registerOperation = defineJsonOperation({\n auth: \"none\",\n body: RegistrationRequestSchema,\n failureResponses: {\n 400: ErrorResponseSchema,\n 403: ErrorResponseSchema,\n 404: ErrorResponseSchema,\n 409: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n 503: ErrorResponseSchema,\n },\n failureStatuses: [400, 403, 404, 409, 500, 503],\n id: \"auth.register\",\n summary: \"Register an identity and bootstrap its root state\",\n description:\n \"Creates a new identity from its signing and encapsulation public keys and, in one transaction, provisions its personal organization: the reserved `Admins` and `Members` groups, the root container, and their signed policies and metadata documents. The response carries a fresh login challenge, so the client signs in next with `POST /auth/verify`. A signing key that is already registered returns 409.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/register\",\n responses: {\n 200: RegistrationResponseSchema,\n },\n runtimeRefinements: [\n ...documentSyncRequestRuntimeRefinements,\n ...organizationProvisioningRequestRuntimeRefinements,\n ...organizationProvisioningResponseRuntimeRefinements,\n ],\n});\n\nexport const logoutOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 500],\n id: \"auth.logout\",\n summary: \"Destroy the current session\",\n description:\n \"Ends the session that made the request, so its bearer token stops working. Any signed-in user may call it.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/logout\",\n responses: {\n 200: DestroySessionResponseSchema,\n },\n});\n\nexport const webSocketTicketOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 500],\n id: \"auth.webSocketTicket\",\n summary: \"Mint a one-time WebSocket ticket\",\n description:\n \"Issues a single-use, short-lived ticket that authenticates one WebSocket upgrade to the realtime hint gateway, because browsers cannot attach an `Authorization` header to a WebSocket handshake. Clients call it before each reconnect; sign-in already returns the first ticket.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/ws-ticket\",\n responses: {\n 200: WebSocketTicketResponseSchema,\n },\n});\n\nexport const listSessionsOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 500],\n id: \"auth.sessions.list\",\n summary: \"List auth sessions\",\n description:\n \"Lists the signed-in user's live sessions with their creation time, last activity, IP addresses, and signing key fingerprint, flagging the one that made the request. It only ever returns the caller's own sessions.\",\n method: \"GET\",\n params: AuthPathParamsSchema,\n path: \"/auth/sessions\",\n responses: {\n 200: ListSessionsResponseSchema,\n },\n});\n\nexport const destroySessionOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 404: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 404, 500],\n id: \"auth.sessions.destroy\",\n summary: \"Destroy a user session\",\n description:\n \"Signs out one of the caller's own sessions, for example a lost device. A session id that is unknown or belongs to another user returns 404.\",\n method: \"DELETE\",\n params: SessionPathParamsSchema,\n path: \"/auth/sessions/{sessionId}\",\n responses: {\n 200: DestroySessionResponseSchema,\n },\n});\n\nexport const userIdentityOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 404: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 404, 500],\n id: \"auth.userIdentity\",\n summary: \"Get a complete user identity\",\n description:\n \"Returns a user's registered signing and encapsulation public keys and fingerprints. Clients never trust the answer alone: they compare it with an identity link or an existing identity pin before using the keys. Any signed-in user may call it; an unknown user returns 404.\",\n method: \"GET\",\n params: UserIdentityPathParamsSchema,\n path: \"/auth/user-identity/{userId}\",\n responses: {\n 200: UserIdentityResponseSchema,\n },\n});\n\nexport const isChallengeOperationRequest = isChallengeRequest;\nexport const isChallengeOperationResponse = isChallengeResponse;\nexport const isRegistrationOperationRequest = isRegistrationRequest;\nexport const isRegistrationOperationResponse = isRegistrationResponse;\nexport const isVerifyOperationRequest = isVerifyRequest;\nexport const isVerifyOperationResponse = isVerifyResponse;\nexport const isLogoutOperationResponse = isDestroySessionResponse;\nexport const isWebSocketTicketOperationResponse = isWebSocketTicketResponse;\nexport const isListSessionsOperationResponse = isListSessionsResponse;\nexport const isDestroySessionOperationResponse = isDestroySessionResponse;\nexport const isUserIdentityOperationResponse = isUserIdentityResponse;\n"]}
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EACL,iDAAiD,EACjD,kDAAkD,GACnD,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,0BAA0B,E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yBAAyB,CAAC;AAC5E,MAAM,CAAC,MAAM,+BAA+B,GAAG,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,iCAAiC,GAAG,wBAAwB,CAAC;AAC1E,MAAM,CAAC,MAAM,+BAA+B,GAAG,sBAAsB,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { documentSyncRequestRuntimeRefinements } from \"../documentSyncRefinements\";\nimport {\n organizationProvisioningRequestRuntimeRefinements,\n organizationProvisioningResponseRuntimeRefinements,\n} from \"../organizationProvisioningRefinements\";\nimport {\n ChallengeRequestSchema,\n isChallengeRequest,\n isRegistrationRequest,\n isVerifyRequest,\n RegistrationRequestSchema,\n VerifyRequestSchema,\n} from \"../request\";\nimport {\n ChallengeErrorResponseSchema,\n ChallengeResponseSchema,\n DestroySessionResponseSchema,\n ErrorResponseSchema,\n isChallengeResponse,\n isDestroySessionResponse,\n isListSessionsResponse,\n isRegistrationResponse,\n isUserIdentityResponse,\n isVerifyResponse,\n isWebSocketTicketResponse,\n ListSessionsResponseSchema,\n RegistrationResponseSchema,\n registrationCommitCheckpointRefinements,\n SessionFailureResponseSchema,\n UserIdentityResponseSchema,\n VerifyFailureResponseSchema,\n VerifySuccessResponseSchema,\n WebSocketTicketResponseSchema,\n} from \"../response\";\nimport { sha256HexStringSchema } from \"../schema\";\nimport { defineJsonOperation } from \"./definition\";\n\nconst AuthPathParamsSchema = z.strictObject({});\nconst SessionPathParamsSchema = z.strictObject({\n sessionId: sha256HexStringSchema,\n});\nconst UserIdentityPathParamsSchema = z.strictObject({\n userId: z.string(),\n});\n\nexport const challengeOperation = defineJsonOperation({\n auth: \"none\",\n body: ChallengeRequestSchema,\n failureResponses: {\n 400: ChallengeErrorResponseSchema,\n 404: ChallengeErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 404, 500],\n id: \"auth.challenge\",\n summary: \"Request an auth challenge\",\n description:\n \"Starts sign-in for a registered identity: the server stores a short-lived random challenge for the signing key fingerprint, and the client signs it and sends the signature to `POST /auth/verify`. No session is needed; an unknown fingerprint returns 404.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/challenge\",\n responses: {\n 200: ChallengeResponseSchema,\n },\n});\n\nexport const verifyOperation = defineJsonOperation({\n auth: \"none\",\n body: VerifyRequestSchema,\n failureResponses: {\n 400: ChallengeErrorResponseSchema,\n 401: VerifyFailureResponseSchema,\n 403: VerifyFailureResponseSchema,\n 404: VerifyFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 403, 404, 500],\n id: \"auth.verify\",\n summary: \"Verify an auth challenge\",\n description:\n \"Completes sign-in by checking the challenge signature, bound to the API origin, against the identity's registered signing key, then opens a session and returns its bearer token plus the first WebSocket ticket. Each challenge can be used once. A suspended identity's valid signature is refused with 403 and code `account_suspended`, which clients treat as terminal.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/verify\",\n responses: {\n 200: VerifySuccessResponseSchema,\n },\n});\n\nexport const registerOperation = defineJsonOperation({\n auth: \"none\",\n body: RegistrationRequestSchema,\n failureResponses: {\n 400: ErrorResponseSchema,\n 403: ErrorResponseSchema,\n 404: ErrorResponseSchema,\n 409: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n 503: ErrorResponseSchema,\n },\n failureStatuses: [400, 403, 404, 409, 500, 503],\n id: \"auth.register\",\n summary: \"Register an identity and bootstrap its root state\",\n description:\n \"Creates a new identity from its signing and encapsulation public keys and, in one transaction, provisions its personal organization: the reserved `Admins` and `Members` groups, the root container, and their signed policies and metadata documents. The response carries a fresh login challenge, so the client signs in next with `POST /auth/verify`. A signing key that is already registered returns 409.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/register\",\n responses: {\n 200: RegistrationResponseSchema,\n },\n runtimeRefinements: [\n ...documentSyncRequestRuntimeRefinements,\n ...organizationProvisioningRequestRuntimeRefinements,\n ...organizationProvisioningResponseRuntimeRefinements,\n ...registrationCommitCheckpointRefinements,\n ],\n});\n\nexport const logoutOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 500],\n id: \"auth.logout\",\n summary: \"Destroy the current session\",\n description:\n \"Ends the session that made the request, so its bearer token stops working. Any signed-in user may call it.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/logout\",\n responses: {\n 200: DestroySessionResponseSchema,\n },\n});\n\nexport const webSocketTicketOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 500],\n id: \"auth.webSocketTicket\",\n summary: \"Mint a one-time WebSocket ticket\",\n description:\n \"Issues a single-use, short-lived ticket that authenticates one WebSocket upgrade to the realtime hint gateway, because browsers cannot attach an `Authorization` header to a WebSocket handshake. Clients call it before each reconnect; sign-in already returns the first ticket.\",\n method: \"POST\",\n params: AuthPathParamsSchema,\n path: \"/auth/ws-ticket\",\n responses: {\n 200: WebSocketTicketResponseSchema,\n },\n});\n\nexport const listSessionsOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 500],\n id: \"auth.sessions.list\",\n summary: \"List auth sessions\",\n description:\n \"Lists the signed-in user's live sessions with their creation time, last activity, IP addresses, and signing key fingerprint, flagging the one that made the request. It only ever returns the caller's own sessions.\",\n method: \"GET\",\n params: AuthPathParamsSchema,\n path: \"/auth/sessions\",\n responses: {\n 200: ListSessionsResponseSchema,\n },\n});\n\nexport const destroySessionOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 404: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 404, 500],\n id: \"auth.sessions.destroy\",\n summary: \"Destroy a user session\",\n description:\n \"Signs out one of the caller's own sessions, for example a lost device. A session id that is unknown or belongs to another user returns 404.\",\n method: \"DELETE\",\n params: SessionPathParamsSchema,\n path: \"/auth/sessions/{sessionId}\",\n responses: {\n 200: DestroySessionResponseSchema,\n },\n});\n\nexport const userIdentityOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 404: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 404, 500],\n id: \"auth.userIdentity\",\n summary: \"Get a complete user identity\",\n description:\n \"Returns a user's registered signing and encapsulation public keys and fingerprints. Clients never trust the answer alone: they compare it with an identity link or an existing identity pin before using the keys. Any signed-in user may call it; an unknown user returns 404.\",\n method: \"GET\",\n params: UserIdentityPathParamsSchema,\n path: \"/auth/user-identity/{userId}\",\n responses: {\n 200: UserIdentityResponseSchema,\n },\n});\n\nexport const isChallengeOperationRequest = isChallengeRequest;\nexport const isChallengeOperationResponse = isChallengeResponse;\nexport const isRegistrationOperationRequest = isRegistrationRequest;\nexport const isRegistrationOperationResponse = isRegistrationResponse;\nexport const isVerifyOperationRequest = isVerifyRequest;\nexport const isVerifyOperationResponse = isVerifyResponse;\nexport const isLogoutOperationResponse = isDestroySessionResponse;\nexport const isWebSocketTicketOperationResponse = isWebSocketTicketResponse;\nexport const isListSessionsOperationResponse = isListSessionsResponse;\nexport const isDestroySessionOperationResponse = isDestroySessionResponse;\nexport const isUserIdentityOperationResponse = isUserIdentityResponse;\n"]}
|
|
@@ -13,7 +13,6 @@ export declare const createContainerOperation: Omit<{
|
|
|
13
13
|
expectedManifestHash: string;
|
|
14
14
|
keyEpoch: Record<string, unknown>;
|
|
15
15
|
keyring: Record<string, unknown> | null;
|
|
16
|
-
manifest: Record<string, unknown>;
|
|
17
16
|
predecessorBridge: Record<string, unknown> | null;
|
|
18
17
|
principalPolicyRefs: {
|
|
19
18
|
principalType: "group" | "organization";
|
|
@@ -54,7 +53,6 @@ export declare const createContainerOperation: Omit<{
|
|
|
54
53
|
expectedManifestHash: string;
|
|
55
54
|
keyEpoch: Record<string, unknown>;
|
|
56
55
|
keyring: Record<string, unknown> | null;
|
|
57
|
-
manifest: Record<string, unknown>;
|
|
58
56
|
predecessorBridge: Record<string, unknown> | null;
|
|
59
57
|
principalPolicyRefs: {
|
|
60
58
|
principalType: "group" | "organization";
|
|
@@ -95,7 +93,6 @@ export declare const createContainerOperation: Omit<{
|
|
|
95
93
|
expectedManifestHash: string;
|
|
96
94
|
keyEpoch: Record<string, unknown>;
|
|
97
95
|
keyring: Record<string, unknown> | null;
|
|
98
|
-
manifest: Record<string, unknown>;
|
|
99
96
|
predecessorBridge: Record<string, unknown> | null;
|
|
100
97
|
principalPolicyRefs: {
|
|
101
98
|
principalType: "group" | "organization";
|
|
@@ -136,7 +133,6 @@ export declare const createContainerOperation: Omit<{
|
|
|
136
133
|
expectedManifestHash: string;
|
|
137
134
|
keyEpoch: Record<string, unknown>;
|
|
138
135
|
keyring: Record<string, unknown> | null;
|
|
139
|
-
manifest: Record<string, unknown>;
|
|
140
136
|
predecessorBridge: Record<string, unknown> | null;
|
|
141
137
|
principalPolicyRefs: {
|
|
142
138
|
principalType: "group" | "organization";
|
|
@@ -292,7 +288,7 @@ export declare const createContainerOperation: Omit<{
|
|
|
292
288
|
readonly failureStatuses: readonly [400, 401, 402, 403, 404, 409, 500];
|
|
293
289
|
readonly id: "containers.create";
|
|
294
290
|
readonly summary: "Create a container";
|
|
295
|
-
readonly description: "Creates a container from a signed `container.create` event,
|
|
291
|
+
readonly description: "Creates a container from a signed `container.create` event, the hash of the access manifest it derives, and the container KEK wrapped to its recipients. Requires write access to the parent container, or admin access for a system container. A retry of a create that already committed returns 409 `container_manifest_already_exists`, which lets the client adopt it; a stale parent returns 409 `container_mutation_state_stale`.";
|
|
296
292
|
readonly method: "POST";
|
|
297
293
|
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
298
294
|
readonly path: "/containers";
|
|
@@ -518,7 +514,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
518
514
|
expectedManifestHash: string;
|
|
519
515
|
keyEpoch: Record<string, unknown>;
|
|
520
516
|
keyring: Record<string, unknown> | null;
|
|
521
|
-
manifest: Record<string, unknown>;
|
|
522
517
|
predecessorBridge: Record<string, unknown> | null;
|
|
523
518
|
principalPolicyRefs: {
|
|
524
519
|
principalType: "group" | "organization";
|
|
@@ -582,7 +577,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
582
577
|
expectedManifestHash: string;
|
|
583
578
|
keyEpoch: Record<string, unknown>;
|
|
584
579
|
keyring: Record<string, unknown> | null;
|
|
585
|
-
manifest: Record<string, unknown>;
|
|
586
580
|
predecessorBridge: Record<string, unknown> | null;
|
|
587
581
|
principalPolicyRefs: {
|
|
588
582
|
principalType: "group" | "organization";
|
|
@@ -650,7 +644,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
650
644
|
expectedManifestHash: string;
|
|
651
645
|
keyEpoch: Record<string, unknown>;
|
|
652
646
|
keyring: Record<string, unknown> | null;
|
|
653
|
-
manifest: Record<string, unknown>;
|
|
654
647
|
predecessorBridge: Record<string, unknown> | null;
|
|
655
648
|
principalPolicyRefs: {
|
|
656
649
|
principalType: "group" | "organization";
|
|
@@ -712,7 +705,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
712
705
|
expectedManifestHash: string;
|
|
713
706
|
keyEpoch: Record<string, unknown>;
|
|
714
707
|
keyring: Record<string, unknown> | null;
|
|
715
|
-
manifest: Record<string, unknown>;
|
|
716
708
|
predecessorBridge: Record<string, unknown> | null;
|
|
717
709
|
principalPolicyRefs: {
|
|
718
710
|
principalType: "group" | "organization";
|
|
@@ -776,7 +768,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
776
768
|
expectedManifestHash: string;
|
|
777
769
|
keyEpoch: Record<string, unknown>;
|
|
778
770
|
keyring: Record<string, unknown> | null;
|
|
779
|
-
manifest: Record<string, unknown>;
|
|
780
771
|
predecessorBridge: Record<string, unknown> | null;
|
|
781
772
|
principalPolicyRefs: {
|
|
782
773
|
principalType: "group" | "organization";
|
|
@@ -844,7 +835,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
844
835
|
expectedManifestHash: string;
|
|
845
836
|
keyEpoch: Record<string, unknown>;
|
|
846
837
|
keyring: Record<string, unknown> | null;
|
|
847
|
-
manifest: Record<string, unknown>;
|
|
848
838
|
predecessorBridge: Record<string, unknown> | null;
|
|
849
839
|
principalPolicyRefs: {
|
|
850
840
|
principalType: "group" | "organization";
|
|
@@ -906,7 +896,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
906
896
|
expectedManifestHash: string;
|
|
907
897
|
keyEpoch: Record<string, unknown>;
|
|
908
898
|
keyring: Record<string, unknown> | null;
|
|
909
|
-
manifest: Record<string, unknown>;
|
|
910
899
|
predecessorBridge: Record<string, unknown> | null;
|
|
911
900
|
principalPolicyRefs: {
|
|
912
901
|
principalType: "group" | "organization";
|
|
@@ -970,7 +959,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
970
959
|
expectedManifestHash: string;
|
|
971
960
|
keyEpoch: Record<string, unknown>;
|
|
972
961
|
keyring: Record<string, unknown> | null;
|
|
973
|
-
manifest: Record<string, unknown>;
|
|
974
962
|
predecessorBridge: Record<string, unknown> | null;
|
|
975
963
|
principalPolicyRefs: {
|
|
976
964
|
principalType: "group" | "organization";
|
|
@@ -1038,7 +1026,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
1038
1026
|
expectedManifestHash: string;
|
|
1039
1027
|
keyEpoch: Record<string, unknown>;
|
|
1040
1028
|
keyring: Record<string, unknown> | null;
|
|
1041
|
-
manifest: Record<string, unknown>;
|
|
1042
1029
|
predecessorBridge: Record<string, unknown> | null;
|
|
1043
1030
|
principalPolicyRefs: {
|
|
1044
1031
|
principalType: "group" | "organization";
|
|
@@ -1100,7 +1087,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
1100
1087
|
expectedManifestHash: string;
|
|
1101
1088
|
keyEpoch: Record<string, unknown>;
|
|
1102
1089
|
keyring: Record<string, unknown> | null;
|
|
1103
|
-
manifest: Record<string, unknown>;
|
|
1104
1090
|
predecessorBridge: Record<string, unknown> | null;
|
|
1105
1091
|
principalPolicyRefs: {
|
|
1106
1092
|
principalType: "group" | "organization";
|
|
@@ -1164,7 +1150,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
1164
1150
|
expectedManifestHash: string;
|
|
1165
1151
|
keyEpoch: Record<string, unknown>;
|
|
1166
1152
|
keyring: Record<string, unknown> | null;
|
|
1167
|
-
manifest: Record<string, unknown>;
|
|
1168
1153
|
predecessorBridge: Record<string, unknown> | null;
|
|
1169
1154
|
principalPolicyRefs: {
|
|
1170
1155
|
principalType: "group" | "organization";
|
|
@@ -1232,7 +1217,6 @@ export declare const createContainerWithMetadataDocumentOperation: Omit<{
|
|
|
1232
1217
|
expectedManifestHash: string;
|
|
1233
1218
|
keyEpoch: Record<string, unknown>;
|
|
1234
1219
|
keyring: Record<string, unknown> | null;
|
|
1235
|
-
manifest: Record<string, unknown>;
|
|
1236
1220
|
predecessorBridge: Record<string, unknown> | null;
|
|
1237
1221
|
principalPolicyRefs: {
|
|
1238
1222
|
principalType: "group" | "organization";
|
|
@@ -1742,7 +1726,6 @@ export declare const shareContainerOperation: Omit<{
|
|
|
1742
1726
|
expectedManifestHash: string;
|
|
1743
1727
|
keyEpoch: Record<string, unknown>;
|
|
1744
1728
|
keyring: Record<string, unknown> | null;
|
|
1745
|
-
manifest: Record<string, unknown>;
|
|
1746
1729
|
predecessorBridge: Record<string, unknown> | null;
|
|
1747
1730
|
principalPolicyRefs: {
|
|
1748
1731
|
principalType: "group" | "organization";
|
|
@@ -1783,7 +1766,6 @@ export declare const shareContainerOperation: Omit<{
|
|
|
1783
1766
|
expectedManifestHash: string;
|
|
1784
1767
|
keyEpoch: Record<string, unknown>;
|
|
1785
1768
|
keyring: Record<string, unknown> | null;
|
|
1786
|
-
manifest: Record<string, unknown>;
|
|
1787
1769
|
predecessorBridge: Record<string, unknown> | null;
|
|
1788
1770
|
principalPolicyRefs: {
|
|
1789
1771
|
principalType: "group" | "organization";
|
|
@@ -1824,7 +1806,6 @@ export declare const shareContainerOperation: Omit<{
|
|
|
1824
1806
|
expectedManifestHash: string;
|
|
1825
1807
|
keyEpoch: Record<string, unknown>;
|
|
1826
1808
|
keyring: Record<string, unknown> | null;
|
|
1827
|
-
manifest: Record<string, unknown>;
|
|
1828
1809
|
predecessorBridge: Record<string, unknown> | null;
|
|
1829
1810
|
principalPolicyRefs: {
|
|
1830
1811
|
principalType: "group" | "organization";
|
|
@@ -1865,7 +1846,6 @@ export declare const shareContainerOperation: Omit<{
|
|
|
1865
1846
|
expectedManifestHash: string;
|
|
1866
1847
|
keyEpoch: Record<string, unknown>;
|
|
1867
1848
|
keyring: Record<string, unknown> | null;
|
|
1868
|
-
manifest: Record<string, unknown>;
|
|
1869
1849
|
predecessorBridge: Record<string, unknown> | null;
|
|
1870
1850
|
principalPolicyRefs: {
|
|
1871
1851
|
principalType: "group" | "organization";
|
|
@@ -2246,7 +2226,6 @@ export declare const reciteContainerOperation: Omit<{
|
|
|
2246
2226
|
body: unknown;
|
|
2247
2227
|
event: Record<string, unknown>;
|
|
2248
2228
|
expectedManifestHash: string;
|
|
2249
|
-
manifest: Record<string, unknown>;
|
|
2250
2229
|
previousContainerPathRefs: {
|
|
2251
2230
|
containerId: string;
|
|
2252
2231
|
manifestHash: string;
|
|
@@ -2265,7 +2244,6 @@ export declare const reciteContainerOperation: Omit<{
|
|
|
2265
2244
|
body: unknown;
|
|
2266
2245
|
event: Record<string, unknown>;
|
|
2267
2246
|
expectedManifestHash: string;
|
|
2268
|
-
manifest: Record<string, unknown>;
|
|
2269
2247
|
previousContainerPathRefs: {
|
|
2270
2248
|
containerId: string;
|
|
2271
2249
|
manifestHash: string;
|
|
@@ -2284,7 +2262,6 @@ export declare const reciteContainerOperation: Omit<{
|
|
|
2284
2262
|
body: unknown;
|
|
2285
2263
|
event: Record<string, unknown>;
|
|
2286
2264
|
expectedManifestHash: string;
|
|
2287
|
-
manifest: Record<string, unknown>;
|
|
2288
2265
|
previousContainerPathRefs: {
|
|
2289
2266
|
containerId: string;
|
|
2290
2267
|
manifestHash: string;
|
|
@@ -2303,7 +2280,6 @@ export declare const reciteContainerOperation: Omit<{
|
|
|
2303
2280
|
body: unknown;
|
|
2304
2281
|
event: Record<string, unknown>;
|
|
2305
2282
|
expectedManifestHash: string;
|
|
2306
|
-
manifest: Record<string, unknown>;
|
|
2307
2283
|
previousContainerPathRefs: {
|
|
2308
2284
|
containerId: string;
|
|
2309
2285
|
manifestHash: string;
|
|
@@ -2630,7 +2606,6 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
2630
2606
|
expectedManifestHash: string;
|
|
2631
2607
|
keyEpoch: Record<string, unknown>;
|
|
2632
2608
|
keyring: Record<string, unknown> | null;
|
|
2633
|
-
manifest: Record<string, unknown>;
|
|
2634
2609
|
predecessorBridge: Record<string, unknown> | null;
|
|
2635
2610
|
principalPolicyRefs: {
|
|
2636
2611
|
principalType: "group" | "organization";
|
|
@@ -2645,7 +2620,6 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
2645
2620
|
expectedManifestHash: string;
|
|
2646
2621
|
keyEpoch: Record<string, unknown>;
|
|
2647
2622
|
keyring: Record<string, unknown> | null;
|
|
2648
|
-
manifest: Record<string, unknown>;
|
|
2649
2623
|
predecessorBridge: Record<string, unknown> | null;
|
|
2650
2624
|
principalPolicyRefs: {
|
|
2651
2625
|
principalType: "group" | "organization";
|
|
@@ -2713,7 +2687,6 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
2713
2687
|
expectedManifestHash: string;
|
|
2714
2688
|
keyEpoch: Record<string, unknown>;
|
|
2715
2689
|
keyring: Record<string, unknown> | null;
|
|
2716
|
-
manifest: Record<string, unknown>;
|
|
2717
2690
|
predecessorBridge: Record<string, unknown> | null;
|
|
2718
2691
|
principalPolicyRefs: {
|
|
2719
2692
|
principalType: "group" | "organization";
|
|
@@ -2728,7 +2701,6 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
2728
2701
|
expectedManifestHash: string;
|
|
2729
2702
|
keyEpoch: Record<string, unknown>;
|
|
2730
2703
|
keyring: Record<string, unknown> | null;
|
|
2731
|
-
manifest: Record<string, unknown>;
|
|
2732
2704
|
predecessorBridge: Record<string, unknown> | null;
|
|
2733
2705
|
principalPolicyRefs: {
|
|
2734
2706
|
principalType: "group" | "organization";
|
|
@@ -2796,7 +2768,6 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
2796
2768
|
expectedManifestHash: string;
|
|
2797
2769
|
keyEpoch: Record<string, unknown>;
|
|
2798
2770
|
keyring: Record<string, unknown> | null;
|
|
2799
|
-
manifest: Record<string, unknown>;
|
|
2800
2771
|
predecessorBridge: Record<string, unknown> | null;
|
|
2801
2772
|
principalPolicyRefs: {
|
|
2802
2773
|
principalType: "group" | "organization";
|
|
@@ -2811,7 +2782,6 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
2811
2782
|
expectedManifestHash: string;
|
|
2812
2783
|
keyEpoch: Record<string, unknown>;
|
|
2813
2784
|
keyring: Record<string, unknown> | null;
|
|
2814
|
-
manifest: Record<string, unknown>;
|
|
2815
2785
|
predecessorBridge: Record<string, unknown> | null;
|
|
2816
2786
|
principalPolicyRefs: {
|
|
2817
2787
|
principalType: "group" | "organization";
|
|
@@ -2879,7 +2849,6 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
2879
2849
|
expectedManifestHash: string;
|
|
2880
2850
|
keyEpoch: Record<string, unknown>;
|
|
2881
2851
|
keyring: Record<string, unknown> | null;
|
|
2882
|
-
manifest: Record<string, unknown>;
|
|
2883
2852
|
predecessorBridge: Record<string, unknown> | null;
|
|
2884
2853
|
principalPolicyRefs: {
|
|
2885
2854
|
principalType: "group" | "organization";
|
|
@@ -2894,7 +2863,6 @@ export declare const revokeContainerOperation: Omit<{
|
|
|
2894
2863
|
expectedManifestHash: string;
|
|
2895
2864
|
keyEpoch: Record<string, unknown>;
|
|
2896
2865
|
keyring: Record<string, unknown> | null;
|
|
2897
|
-
manifest: Record<string, unknown>;
|
|
2898
2866
|
predecessorBridge: Record<string, unknown> | null;
|
|
2899
2867
|
principalPolicyRefs: {
|
|
2900
2868
|
principalType: "group" | "organization";
|
|
@@ -3392,7 +3360,6 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
3392
3360
|
expectedManifestHash: string;
|
|
3393
3361
|
keyEpoch: Record<string, unknown>;
|
|
3394
3362
|
keyring: Record<string, unknown> | null;
|
|
3395
|
-
manifest: Record<string, unknown>;
|
|
3396
3363
|
predecessorBridge: Record<string, unknown> | null;
|
|
3397
3364
|
principalPolicyRefs: {
|
|
3398
3365
|
principalType: "group" | "organization";
|
|
@@ -3407,7 +3374,6 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
3407
3374
|
expectedManifestHash: string;
|
|
3408
3375
|
keyEpoch: Record<string, unknown>;
|
|
3409
3376
|
keyring: Record<string, unknown> | null;
|
|
3410
|
-
manifest: Record<string, unknown>;
|
|
3411
3377
|
predecessorBridge: Record<string, unknown> | null;
|
|
3412
3378
|
principalPolicyRefs: {
|
|
3413
3379
|
principalType: "group" | "organization";
|
|
@@ -3475,7 +3441,6 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
3475
3441
|
expectedManifestHash: string;
|
|
3476
3442
|
keyEpoch: Record<string, unknown>;
|
|
3477
3443
|
keyring: Record<string, unknown> | null;
|
|
3478
|
-
manifest: Record<string, unknown>;
|
|
3479
3444
|
predecessorBridge: Record<string, unknown> | null;
|
|
3480
3445
|
principalPolicyRefs: {
|
|
3481
3446
|
principalType: "group" | "organization";
|
|
@@ -3490,7 +3455,6 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
3490
3455
|
expectedManifestHash: string;
|
|
3491
3456
|
keyEpoch: Record<string, unknown>;
|
|
3492
3457
|
keyring: Record<string, unknown> | null;
|
|
3493
|
-
manifest: Record<string, unknown>;
|
|
3494
3458
|
predecessorBridge: Record<string, unknown> | null;
|
|
3495
3459
|
principalPolicyRefs: {
|
|
3496
3460
|
principalType: "group" | "organization";
|
|
@@ -3558,7 +3522,6 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
3558
3522
|
expectedManifestHash: string;
|
|
3559
3523
|
keyEpoch: Record<string, unknown>;
|
|
3560
3524
|
keyring: Record<string, unknown> | null;
|
|
3561
|
-
manifest: Record<string, unknown>;
|
|
3562
3525
|
predecessorBridge: Record<string, unknown> | null;
|
|
3563
3526
|
principalPolicyRefs: {
|
|
3564
3527
|
principalType: "group" | "organization";
|
|
@@ -3573,7 +3536,6 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
3573
3536
|
expectedManifestHash: string;
|
|
3574
3537
|
keyEpoch: Record<string, unknown>;
|
|
3575
3538
|
keyring: Record<string, unknown> | null;
|
|
3576
|
-
manifest: Record<string, unknown>;
|
|
3577
3539
|
predecessorBridge: Record<string, unknown> | null;
|
|
3578
3540
|
principalPolicyRefs: {
|
|
3579
3541
|
principalType: "group" | "organization";
|
|
@@ -3641,7 +3603,6 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
3641
3603
|
expectedManifestHash: string;
|
|
3642
3604
|
keyEpoch: Record<string, unknown>;
|
|
3643
3605
|
keyring: Record<string, unknown> | null;
|
|
3644
|
-
manifest: Record<string, unknown>;
|
|
3645
3606
|
predecessorBridge: Record<string, unknown> | null;
|
|
3646
3607
|
principalPolicyRefs: {
|
|
3647
3608
|
principalType: "group" | "organization";
|
|
@@ -3656,7 +3617,6 @@ export declare const rekeyContainerOperation: Omit<{
|
|
|
3656
3617
|
expectedManifestHash: string;
|
|
3657
3618
|
keyEpoch: Record<string, unknown>;
|
|
3658
3619
|
keyring: Record<string, unknown> | null;
|
|
3659
|
-
manifest: Record<string, unknown>;
|
|
3660
3620
|
predecessorBridge: Record<string, unknown> | null;
|
|
3661
3621
|
principalPolicyRefs: {
|
|
3662
3622
|
principalType: "group" | "organization";
|
|
@@ -4154,7 +4114,6 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4154
4114
|
expectedManifestHash: string;
|
|
4155
4115
|
keyEpoch: Record<string, unknown>;
|
|
4156
4116
|
keyring: Record<string, unknown> | null;
|
|
4157
|
-
manifest: Record<string, unknown>;
|
|
4158
4117
|
predecessorBridge: Record<string, unknown> | null;
|
|
4159
4118
|
principalPolicyRefs: {
|
|
4160
4119
|
principalType: "group" | "organization";
|
|
@@ -4169,7 +4128,6 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4169
4128
|
expectedManifestHash: string;
|
|
4170
4129
|
keyEpoch: Record<string, unknown>;
|
|
4171
4130
|
keyring: Record<string, unknown> | null;
|
|
4172
|
-
manifest: Record<string, unknown>;
|
|
4173
4131
|
predecessorBridge: Record<string, unknown> | null;
|
|
4174
4132
|
principalPolicyRefs: {
|
|
4175
4133
|
principalType: "group" | "organization";
|
|
@@ -4237,7 +4195,6 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4237
4195
|
expectedManifestHash: string;
|
|
4238
4196
|
keyEpoch: Record<string, unknown>;
|
|
4239
4197
|
keyring: Record<string, unknown> | null;
|
|
4240
|
-
manifest: Record<string, unknown>;
|
|
4241
4198
|
predecessorBridge: Record<string, unknown> | null;
|
|
4242
4199
|
principalPolicyRefs: {
|
|
4243
4200
|
principalType: "group" | "organization";
|
|
@@ -4252,7 +4209,6 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4252
4209
|
expectedManifestHash: string;
|
|
4253
4210
|
keyEpoch: Record<string, unknown>;
|
|
4254
4211
|
keyring: Record<string, unknown> | null;
|
|
4255
|
-
manifest: Record<string, unknown>;
|
|
4256
4212
|
predecessorBridge: Record<string, unknown> | null;
|
|
4257
4213
|
principalPolicyRefs: {
|
|
4258
4214
|
principalType: "group" | "organization";
|
|
@@ -4320,7 +4276,6 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4320
4276
|
expectedManifestHash: string;
|
|
4321
4277
|
keyEpoch: Record<string, unknown>;
|
|
4322
4278
|
keyring: Record<string, unknown> | null;
|
|
4323
|
-
manifest: Record<string, unknown>;
|
|
4324
4279
|
predecessorBridge: Record<string, unknown> | null;
|
|
4325
4280
|
principalPolicyRefs: {
|
|
4326
4281
|
principalType: "group" | "organization";
|
|
@@ -4335,7 +4290,6 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4335
4290
|
expectedManifestHash: string;
|
|
4336
4291
|
keyEpoch: Record<string, unknown>;
|
|
4337
4292
|
keyring: Record<string, unknown> | null;
|
|
4338
|
-
manifest: Record<string, unknown>;
|
|
4339
4293
|
predecessorBridge: Record<string, unknown> | null;
|
|
4340
4294
|
principalPolicyRefs: {
|
|
4341
4295
|
principalType: "group" | "organization";
|
|
@@ -4403,7 +4357,6 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4403
4357
|
expectedManifestHash: string;
|
|
4404
4358
|
keyEpoch: Record<string, unknown>;
|
|
4405
4359
|
keyring: Record<string, unknown> | null;
|
|
4406
|
-
manifest: Record<string, unknown>;
|
|
4407
4360
|
predecessorBridge: Record<string, unknown> | null;
|
|
4408
4361
|
principalPolicyRefs: {
|
|
4409
4362
|
principalType: "group" | "organization";
|
|
@@ -4418,7 +4371,6 @@ export declare const moveContainerOperation: Omit<{
|
|
|
4418
4371
|
expectedManifestHash: string;
|
|
4419
4372
|
keyEpoch: Record<string, unknown>;
|
|
4420
4373
|
keyring: Record<string, unknown> | null;
|
|
4421
|
-
manifest: Record<string, unknown>;
|
|
4422
4374
|
predecessorBridge: Record<string, unknown> | null;
|
|
4423
4375
|
principalPolicyRefs: {
|
|
4424
4376
|
principalType: "group" | "organization";
|
|
@@ -31,7 +31,7 @@ export const createContainerOperation = defineJsonOperation({
|
|
|
31
31
|
failureStatuses: containerMutationFailureStatuses,
|
|
32
32
|
id: "containers.create",
|
|
33
33
|
summary: "Create a container",
|
|
34
|
-
description: "Creates a container from a signed `container.create` event,
|
|
34
|
+
description: "Creates a container from a signed `container.create` event, the hash of the access manifest it derives, and the container KEK wrapped to its recipients. Requires write access to the parent container, or admin access for a system container. A retry of a create that already committed returns 409 `container_manifest_already_exists`, which lets the client adopt it; a stale parent returns 409 `container_mutation_state_stale`.",
|
|
35
35
|
method: "POST",
|
|
36
36
|
params: EmptyContainerMutationPathParamsSchema,
|
|
37
37
|
path: "/containers",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerMutations.js","sourceRoot":"","sources":["containerMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qCAAqC,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,kDAAkD,EAAE,MAAM,wCAAwC,CAAC;AAC5G,OAAO,EACL,gDAAgD,EAChD,8BAA8B,EAC9B,4BAA4B,EAC5B,8BAA8B,EAC9B,4CAA4C,EAC5C,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iDAAiD,EACjD,6BAA6B,EAC7B,sCAAsC,EACtC,+BAA+B,EAC/B,oCAAoC,EACpC,6BAA6B,EAC7B,+BAA+B,EAC/B,mBAAmB,EACnB,6CAA6C,EAC7C,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,sCAAsC,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAElE,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC9D,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;CACxB,CAAC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EAAE,iCAAiC;IACzC,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC3E,SAAS,EAAE,EAAE,GAAG,EAAE,6BAA6B,EAAE;CAClD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mCAAmC,GAAG,0BAA0B,CAAC;AAC9E,MAAM,CAAC,MAAM,oCAAoC,GAAG,2BAA2B,CAAC;AAChF,MAAM,CAAC,MAAM,mCAAmC,GAAG,0BAA0B,CAAC;AAC9E,MAAM,CAAC,MAAM,oCAAoC,GAAG,2BAA2B,CAAC;AAChF,MAAM,CAAC,MAAM,qDAAqD,GAChE,4CAA4C,CAAC;AAC/C,MAAM,CAAC,MAAM,sDAAsD,GACjE,6CAA6C,CAAC;AAChD,MAAM,CAAC,MAAM,kCAAkC,GAAG,yBAAyB,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { containerCreateMetadataSeedRefinement } from \"../documentCreateSeedRefinements\";\nimport { documentSyncRequestRuntimeRefinements } from \"../documentSyncRefinements\";\nimport { organizationProvisioningContainerKeyringRefinement } from \"../organizationProvisioningRefinements\";\nimport {\n ContainerCreateWithMetadataDocumentRequestSchema,\n ContainerMutationRequestSchema,\n ContainerReciteRequestSchema,\n ContainerRotationRequestSchema,\n isContainerCreateWithMetadataDocumentRequest,\n isContainerMutationRequest,\n isContainerRotationRequest,\n} from \"../request\";\nimport {\n ContainerCreateWithMetadataDocumentResponseSchema,\n ContainerDeleteResponseSchema,\n ContainerMutationFailureResponseSchema,\n ContainerMutationResponseSchema,\n ContainerNotFoundErrorResponseSchema,\n ContainerReciteResponseSchema,\n ContainerRotationResponseSchema,\n ErrorResponseSchema,\n isContainerCreateWithMetadataDocumentResponse,\n isContainerDeleteResponse,\n isContainerMutationResponse,\n isContainerRotationResponse,\n PaymentRequiredErrorResponseSchema,\n SessionFailureResponseSchema,\n} from \"../response\";\nimport { defineJsonOperation } from \"./definition\";\n\nconst EmptyContainerMutationPathParamsSchema = z.strictObject({});\n\nexport const ContainerMutationPathParamsSchema = z.strictObject({\n containerId: z.string(),\n});\n\nexport type ContainerMutationPathParams = z.infer<\n typeof ContainerMutationPathParamsSchema\n>;\n\nconst containerMutationFailureResponses = {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 402: PaymentRequiredErrorResponseSchema,\n 403: ErrorResponseSchema,\n 404: ErrorResponseSchema,\n 409: ContainerMutationFailureResponseSchema,\n 500: ErrorResponseSchema,\n} as const;\n\nconst containerMutationFailureStatuses = [\n 400, 401, 402, 403, 404, 409, 500,\n] as const;\n\nconst containerMutationRuntimeRefinements = [\n organizationProvisioningContainerKeyringRefinement,\n] as const;\n\nexport const createContainerOperation = defineJsonOperation({\n auth: \"session\",\n body: ContainerMutationRequestSchema,\n failureResponses: containerMutationFailureResponses,\n failureStatuses: containerMutationFailureStatuses,\n id: \"containers.create\",\n summary: \"Create a container\",\n description:\n \"Creates a container from a signed `container.create` event, its derived access manifest, and the container KEK wrapped to its recipients. Requires write access to the parent container, or admin access for a system container. A retry of a create that already committed returns 409 `container_manifest_already_exists`, which lets the client adopt it; a stale parent returns 409 `container_mutation_state_stale`.\",\n method: \"POST\",\n params: EmptyContainerMutationPathParamsSchema,\n path: \"/containers\",\n responses: { 200: ContainerMutationResponseSchema },\n runtimeRefinements: containerMutationRuntimeRefinements,\n});\n\nexport const createContainerWithMetadataDocumentOperation = defineJsonOperation(\n {\n auth: \"session\",\n body: ContainerCreateWithMetadataDocumentRequestSchema,\n failureResponses: {\n ...containerMutationFailureResponses,\n 503: ErrorResponseSchema,\n },\n failureStatuses: [...containerMutationFailureStatuses, 503],\n id: \"containers.withMetadataDocument.create\",\n summary: \"Create a container with its metadata document\",\n description:\n \"Creates a container and its encrypted metadata document in one transaction, optionally seeding the document's first update. Authorization and conflicts are those of `POST /containers` and `POST /documents`; a 409 `document_manifest_already_exists` may have rolled the new container back, so clients treat it as terminal unless they verify both artifacts.\",\n method: \"POST\",\n params: EmptyContainerMutationPathParamsSchema,\n path: \"/containers/with-metadata-document\",\n responses: { 200: ContainerCreateWithMetadataDocumentResponseSchema },\n runtimeRefinements: [\n ...containerMutationRuntimeRefinements,\n containerCreateMetadataSeedRefinement,\n ...documentSyncRequestRuntimeRefinements,\n ],\n },\n);\n\nfunction defineContainerMutationOperation<\n const Id extends string,\n const Path extends `/${string}`,\n>(input: {\n readonly id: Id;\n readonly path: Path;\n readonly summary: string;\n readonly description: string;\n}) {\n return defineJsonOperation({\n auth: \"session\",\n body: ContainerMutationRequestSchema,\n failureResponses: containerMutationFailureResponses,\n failureStatuses: containerMutationFailureStatuses,\n id: input.id,\n summary: input.summary,\n description: input.description,\n method: \"POST\",\n params: ContainerMutationPathParamsSchema,\n path: input.path,\n responses: { 200: ContainerMutationResponseSchema },\n runtimeRefinements: containerMutationRuntimeRefinements,\n });\n}\n\n/**\n * Rekey, revoke, and move mint a new key epoch, so they alone may carry the\n * descendant rekeys that must commit with them.\n */\nfunction defineContainerRotationOperation<\n const Id extends string,\n const Path extends `/${string}`,\n>(input: {\n readonly id: Id;\n readonly path: Path;\n readonly summary: string;\n readonly description: string;\n}) {\n return defineJsonOperation({\n auth: \"session\",\n body: ContainerRotationRequestSchema,\n failureResponses: containerMutationFailureResponses,\n failureStatuses: containerMutationFailureStatuses,\n id: input.id,\n summary: input.summary,\n description: input.description,\n method: \"POST\",\n params: ContainerMutationPathParamsSchema,\n path: input.path,\n responses: { 200: ContainerRotationResponseSchema },\n runtimeRefinements: containerMutationRuntimeRefinements,\n });\n}\n\nexport const shareContainerOperation = defineContainerMutationOperation({\n id: \"containers.share\",\n summary: \"Share a container\",\n description:\n \"Adds or changes a user or group grant on a container through a signed `container.grant` event, wrapping the current container KEK to the new recipients. Requires admin access through the container's path. Cited heads must be current: a stale container head returns 409 `container_mutation_state_stale`, and a stale principal policy returns 409 `principal_policy_stale` with the current heads.\",\n path: \"/containers/{containerId}/share\",\n});\n\nexport const reciteContainerOperation = defineJsonOperation({\n auth: \"session\",\n body: ContainerReciteRequestSchema,\n failureResponses: containerMutationFailureResponses,\n failureStatuses: containerMutationFailureStatuses,\n id: \"containers.recite\",\n summary: \"Re-cite a held container's current ancestor path\",\n description:\n \"Advances a container's access manifest so it cites its ancestors' current heads, without changing grants, keys, or parent. Clients call it after changing an ancestor so descendants they already hold stop citing superseded heads. Requires admin access; after 512 epochs the container no longer accepts re-citations.\",\n method: \"POST\",\n params: ContainerMutationPathParamsSchema,\n path: \"/containers/{containerId}/recite\",\n responses: { 200: ContainerReciteResponseSchema },\n});\n\nexport const revokeContainerOperation = defineContainerRotationOperation({\n id: \"containers.revoke\",\n summary: \"Revoke a container grant\",\n description:\n \"Removes a grant from a container through a signed `container.revoke` event and rotates the container KEK so the removed principal cannot read later content. The request carries the new KEK epoch, its predecessor bridge, and the re-sealed container KEK keyring. Requires admin access; stale cited heads return 409.\",\n path: \"/containers/{containerId}/revoke\",\n});\n\nexport const rekeyContainerOperation = defineContainerRotationOperation({\n id: \"containers.rekey\",\n summary: \"Rekey a container\",\n description:\n \"Rotates a container's KEK to a new epoch without changing grants, carrying the predecessor bridge and the re-sealed container KEK keyring. Requires write access. Stale cited heads return 409, and epochs above 65536 are refused.\",\n path: \"/containers/{containerId}/rekey\",\n});\n\nexport const moveContainerOperation = defineContainerRotationOperation({\n id: \"containers.move\",\n summary: \"Move a container\",\n description:\n \"Moves a container under a new parent through a signed `container.move` event and rotates its container KEK. Requires admin access at the source and write access at the destination; root and system containers cannot move. Moving into Trash is an ordinary move and can be undone.\",\n path: \"/containers/{containerId}/move\",\n});\n\nexport const deleteContainerOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n ...containerMutationFailureResponses,\n 404: ContainerNotFoundErrorResponseSchema,\n },\n failureStatuses: containerMutationFailureStatuses,\n id: \"containers.delete\",\n summary: \"Delete a container\",\n description:\n \"Deletes an empty folder: a container with no child containers and no linked user documents, along with its own metadata document. Requires admin access; root and system containers cannot be deleted. Peers learn of the deletion from a sync tombstone, and an unknown container returns 404 `container_not_found`.\",\n method: \"DELETE\",\n params: ContainerMutationPathParamsSchema,\n path: \"/containers/{containerId}\",\n query: z.strictObject({ requiredAncestorId: z.string().min(1).optional() }),\n responses: { 200: ContainerDeleteResponseSchema },\n});\n\nexport const isContainerMutationOperationRequest = isContainerMutationRequest;\nexport const isContainerMutationOperationResponse = isContainerMutationResponse;\nexport const isContainerRotationOperationRequest = isContainerRotationRequest;\nexport const isContainerRotationOperationResponse = isContainerRotationResponse;\nexport const isCreateContainerWithMetadataDocumentOperationRequest =\n isContainerCreateWithMetadataDocumentRequest;\nexport const isCreateContainerWithMetadataDocumentOperationResponse =\n isContainerCreateWithMetadataDocumentResponse;\nexport const isDeleteContainerOperationResponse = isContainerDeleteResponse;\n"]}
|
|
1
|
+
{"version":3,"file":"containerMutations.js","sourceRoot":"","sources":["containerMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qCAAqC,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,EAAE,qCAAqC,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,kDAAkD,EAAE,MAAM,wCAAwC,CAAC;AAC5G,OAAO,EACL,gDAAgD,EAChD,8BAA8B,EAC9B,4BAA4B,EAC5B,8BAA8B,EAC9B,4CAA4C,EAC5C,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iDAAiD,EACjD,6BAA6B,EAC7B,sCAAsC,EACtC,+BAA+B,EAC/B,oCAAoC,EACpC,6BAA6B,EAC7B,+BAA+B,EAC/B,mBAAmB,EACnB,6CAA6C,EAC7C,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM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CAAC;IAC1D,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE;QAChB,GAAG,iCAAiC;QACpC,GAAG,EAAE,oCAAoC;KAC1C;IACD,eAAe,EAAE,gCAAgC;IACjD,EAAE,EAAE,mBAAmB;IACvB,OAAO,EAAE,oBAAoB;IAC7B,WAAW,EACT,uTAAuT;IACzT,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,iCAAiC;IACzC,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;IAC3E,SAAS,EAAE,EAAE,GAAG,EAAE,6BAA6B,EAAE;CAClD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mCAAmC,GAAG,0BAA0B,CAAC;AAC9E,MAAM,CAAC,MAAM,oCAAoC,GAAG,2BAA2B,CAAC;AAChF,MAAM,CAAC,MAAM,mCAAmC,GAAG,0BAA0B,CAAC;AAC9E,MAAM,CAAC,MAAM,oCAAoC,GAAG,2BAA2B,CAAC;AAChF,MAAM,CAAC,MAAM,qDAAqD,GAChE,4CAA4C,CAAC;AAC/C,MAAM,CAAC,MAAM,sDAAsD,GACjE,6CAA6C,CAAC;AAChD,MAAM,CAAC,MAAM,kCAAkC,GAAG,yBAAyB,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { containerCreateMetadataSeedRefinement } from \"../documentCreateSeedRefinements\";\nimport { documentSyncRequestRuntimeRefinements } from \"../documentSyncRefinements\";\nimport { organizationProvisioningContainerKeyringRefinement } from \"../organizationProvisioningRefinements\";\nimport {\n ContainerCreateWithMetadataDocumentRequestSchema,\n ContainerMutationRequestSchema,\n ContainerReciteRequestSchema,\n ContainerRotationRequestSchema,\n isContainerCreateWithMetadataDocumentRequest,\n isContainerMutationRequest,\n isContainerRotationRequest,\n} from \"../request\";\nimport {\n ContainerCreateWithMetadataDocumentResponseSchema,\n ContainerDeleteResponseSchema,\n ContainerMutationFailureResponseSchema,\n ContainerMutationResponseSchema,\n ContainerNotFoundErrorResponseSchema,\n ContainerReciteResponseSchema,\n ContainerRotationResponseSchema,\n ErrorResponseSchema,\n isContainerCreateWithMetadataDocumentResponse,\n isContainerDeleteResponse,\n isContainerMutationResponse,\n isContainerRotationResponse,\n PaymentRequiredErrorResponseSchema,\n SessionFailureResponseSchema,\n} from \"../response\";\nimport { defineJsonOperation } from \"./definition\";\n\nconst EmptyContainerMutationPathParamsSchema = z.strictObject({});\n\nexport const ContainerMutationPathParamsSchema = z.strictObject({\n containerId: z.string(),\n});\n\nexport type ContainerMutationPathParams = z.infer<\n typeof ContainerMutationPathParamsSchema\n>;\n\nconst containerMutationFailureResponses = {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 402: PaymentRequiredErrorResponseSchema,\n 403: ErrorResponseSchema,\n 404: ErrorResponseSchema,\n 409: ContainerMutationFailureResponseSchema,\n 500: ErrorResponseSchema,\n} as const;\n\nconst containerMutationFailureStatuses = [\n 400, 401, 402, 403, 404, 409, 500,\n] as const;\n\nconst containerMutationRuntimeRefinements = [\n organizationProvisioningContainerKeyringRefinement,\n] as const;\n\nexport const createContainerOperation = defineJsonOperation({\n auth: \"session\",\n body: ContainerMutationRequestSchema,\n failureResponses: containerMutationFailureResponses,\n failureStatuses: containerMutationFailureStatuses,\n id: \"containers.create\",\n summary: \"Create a container\",\n description:\n \"Creates a container from a signed `container.create` event, the hash of the access manifest it derives, and the container KEK wrapped to its recipients. Requires write access to the parent container, or admin access for a system container. A retry of a create that already committed returns 409 `container_manifest_already_exists`, which lets the client adopt it; a stale parent returns 409 `container_mutation_state_stale`.\",\n method: \"POST\",\n params: EmptyContainerMutationPathParamsSchema,\n path: \"/containers\",\n responses: { 200: ContainerMutationResponseSchema },\n runtimeRefinements: containerMutationRuntimeRefinements,\n});\n\nexport const createContainerWithMetadataDocumentOperation = defineJsonOperation(\n {\n auth: \"session\",\n body: ContainerCreateWithMetadataDocumentRequestSchema,\n failureResponses: {\n ...containerMutationFailureResponses,\n 503: ErrorResponseSchema,\n },\n failureStatuses: [...containerMutationFailureStatuses, 503],\n id: \"containers.withMetadataDocument.create\",\n summary: \"Create a container with its metadata document\",\n description:\n \"Creates a container and its encrypted metadata document in one transaction, optionally seeding the document's first update. Authorization and conflicts are those of `POST /containers` and `POST /documents`; a 409 `document_manifest_already_exists` may have rolled the new container back, so clients treat it as terminal unless they verify both artifacts.\",\n method: \"POST\",\n params: EmptyContainerMutationPathParamsSchema,\n path: \"/containers/with-metadata-document\",\n responses: { 200: ContainerCreateWithMetadataDocumentResponseSchema },\n runtimeRefinements: [\n ...containerMutationRuntimeRefinements,\n containerCreateMetadataSeedRefinement,\n ...documentSyncRequestRuntimeRefinements,\n ],\n },\n);\n\nfunction defineContainerMutationOperation<\n const Id extends string,\n const Path extends `/${string}`,\n>(input: {\n readonly id: Id;\n readonly path: Path;\n readonly summary: string;\n readonly description: string;\n}) {\n return defineJsonOperation({\n auth: \"session\",\n body: ContainerMutationRequestSchema,\n failureResponses: containerMutationFailureResponses,\n failureStatuses: containerMutationFailureStatuses,\n id: input.id,\n summary: input.summary,\n description: input.description,\n method: \"POST\",\n params: ContainerMutationPathParamsSchema,\n path: input.path,\n responses: { 200: ContainerMutationResponseSchema },\n runtimeRefinements: containerMutationRuntimeRefinements,\n });\n}\n\n/**\n * Rekey, revoke, and move mint a new key epoch, so they alone may carry the\n * descendant rekeys that must commit with them.\n */\nfunction defineContainerRotationOperation<\n const Id extends string,\n const Path extends `/${string}`,\n>(input: {\n readonly id: Id;\n readonly path: Path;\n readonly summary: string;\n readonly description: string;\n}) {\n return defineJsonOperation({\n auth: \"session\",\n body: ContainerRotationRequestSchema,\n failureResponses: containerMutationFailureResponses,\n failureStatuses: containerMutationFailureStatuses,\n id: input.id,\n summary: input.summary,\n description: input.description,\n method: \"POST\",\n params: ContainerMutationPathParamsSchema,\n path: input.path,\n responses: { 200: ContainerRotationResponseSchema },\n runtimeRefinements: containerMutationRuntimeRefinements,\n });\n}\n\nexport const shareContainerOperation = defineContainerMutationOperation({\n id: \"containers.share\",\n summary: \"Share a container\",\n description:\n \"Adds or changes a user or group grant on a container through a signed `container.grant` event, wrapping the current container KEK to the new recipients. Requires admin access through the container's path. Cited heads must be current: a stale container head returns 409 `container_mutation_state_stale`, and a stale principal policy returns 409 `principal_policy_stale` with the current heads.\",\n path: \"/containers/{containerId}/share\",\n});\n\nexport const reciteContainerOperation = defineJsonOperation({\n auth: \"session\",\n body: ContainerReciteRequestSchema,\n failureResponses: containerMutationFailureResponses,\n failureStatuses: containerMutationFailureStatuses,\n id: \"containers.recite\",\n summary: \"Re-cite a held container's current ancestor path\",\n description:\n \"Advances a container's access manifest so it cites its ancestors' current heads, without changing grants, keys, or parent. Clients call it after changing an ancestor so descendants they already hold stop citing superseded heads. Requires admin access; after 512 epochs the container no longer accepts re-citations.\",\n method: \"POST\",\n params: ContainerMutationPathParamsSchema,\n path: \"/containers/{containerId}/recite\",\n responses: { 200: ContainerReciteResponseSchema },\n});\n\nexport const revokeContainerOperation = defineContainerRotationOperation({\n id: \"containers.revoke\",\n summary: \"Revoke a container grant\",\n description:\n \"Removes a grant from a container through a signed `container.revoke` event and rotates the container KEK so the removed principal cannot read later content. The request carries the new KEK epoch, its predecessor bridge, and the re-sealed container KEK keyring. Requires admin access; stale cited heads return 409.\",\n path: \"/containers/{containerId}/revoke\",\n});\n\nexport const rekeyContainerOperation = defineContainerRotationOperation({\n id: \"containers.rekey\",\n summary: \"Rekey a container\",\n description:\n \"Rotates a container's KEK to a new epoch without changing grants, carrying the predecessor bridge and the re-sealed container KEK keyring. Requires write access. Stale cited heads return 409, and epochs above 65536 are refused.\",\n path: \"/containers/{containerId}/rekey\",\n});\n\nexport const moveContainerOperation = defineContainerRotationOperation({\n id: \"containers.move\",\n summary: \"Move a container\",\n description:\n \"Moves a container under a new parent through a signed `container.move` event and rotates its container KEK. Requires admin access at the source and write access at the destination; root and system containers cannot move. Moving into Trash is an ordinary move and can be undone.\",\n path: \"/containers/{containerId}/move\",\n});\n\nexport const deleteContainerOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n ...containerMutationFailureResponses,\n 404: ContainerNotFoundErrorResponseSchema,\n },\n failureStatuses: containerMutationFailureStatuses,\n id: \"containers.delete\",\n summary: \"Delete a container\",\n description:\n \"Deletes an empty folder: a container with no child containers and no linked user documents, along with its own metadata document. Requires admin access; root and system containers cannot be deleted. Peers learn of the deletion from a sync tombstone, and an unknown container returns 404 `container_not_found`.\",\n method: \"DELETE\",\n params: ContainerMutationPathParamsSchema,\n path: \"/containers/{containerId}\",\n query: z.strictObject({ requiredAncestorId: z.string().min(1).optional() }),\n responses: { 200: ContainerDeleteResponseSchema },\n});\n\nexport const isContainerMutationOperationRequest = isContainerMutationRequest;\nexport const isContainerMutationOperationResponse = isContainerMutationResponse;\nexport const isContainerRotationOperationRequest = isContainerRotationRequest;\nexport const isContainerRotationOperationResponse = isContainerRotationResponse;\nexport const isCreateContainerWithMetadataDocumentOperationRequest =\n isContainerCreateWithMetadataDocumentRequest;\nexport const isCreateContainerWithMetadataDocumentOperationResponse =\n isContainerCreateWithMetadataDocumentResponse;\nexport const isDeleteContainerOperationResponse = isContainerDeleteResponse;\n"]}
|
|
@@ -525,6 +525,7 @@ export declare const listContainerParentLanesOperation: Omit<{
|
|
|
525
525
|
stateHash: string;
|
|
526
526
|
version: number;
|
|
527
527
|
}[];
|
|
528
|
+
metadataVersionVector: string;
|
|
528
529
|
organizationId: string;
|
|
529
530
|
parentId: string | null;
|
|
530
531
|
updatedAt: string;
|
|
@@ -562,6 +563,7 @@ export declare const listContainerParentLanesOperation: Omit<{
|
|
|
562
563
|
stateHash: string;
|
|
563
564
|
version: number;
|
|
564
565
|
}[];
|
|
566
|
+
metadataVersionVector: string;
|
|
565
567
|
organizationId: string;
|
|
566
568
|
parentId: string | null;
|
|
567
569
|
updatedAt: string;
|