@tearleads/client-sdk 0.1.40 → 0.1.42
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/Tearleads.js +3 -0
- package/client/Tearleads.js.map +1 -1
- package/data/documents/shared/syncResponses.js +5 -7
- package/data/documents/shared/syncResponses.js.map +1 -1
- package/data/keyingProjectionVerification/accessManifestCheckpointEnforcement.js +2 -0
- package/data/keyingProjectionVerification/accessManifestCheckpointEnforcement.js.map +1 -1
- package/data/keyingProjectionVerification/checkpointContext.d.ts +12 -0
- package/data/keyingProjectionVerification/checkpointContext.js +16 -0
- package/data/keyingProjectionVerification/checkpointContext.js.map +1 -1
- package/data/keyingProjectionVerification/containerDestinationVerification.js +3 -1
- package/data/keyingProjectionVerification/containerDestinationVerification.js.map +1 -1
- package/data/keyingProjectionVerification/containerProjectionVerification.js +12 -6
- package/data/keyingProjectionVerification/containerProjectionVerification.js.map +1 -1
- package/data/keyingProjectionVerification/documentProjectionVerification.js +10 -4
- package/data/keyingProjectionVerification/documentProjectionVerification.js.map +1 -1
- package/data/persistence/keyingCheckpointAdvancePersistence.js +27 -8
- package/data/persistence/keyingCheckpointAdvancePersistence.js.map +1 -1
- package/data/persistence/verifiedManifestBundlePersistence.d.ts +45 -0
- package/data/persistence/verifiedManifestBundlePersistence.js +282 -0
- package/data/persistence/verifiedManifestBundlePersistence.js.map +1 -0
- package/data/sqlite/schema.d.ts +157 -0
- package/data/sqlite/schema.js +3 -0
- package/data/sqlite/schema.js.map +1 -1
- package/data/sqlite/verifiedManifestBundleSchema.d.ts +174 -0
- package/data/sqlite/verifiedManifestBundleSchema.js +36 -0
- package/data/sqlite/verifiedManifestBundleSchema.js.map +1 -0
- package/internal/api-client/ApiClient.d.ts +4 -11
- package/internal/api-client/ApiClient.js +8 -6
- package/internal/api-client/ApiClient.js.map +1 -1
- package/internal/api-client/index.d.ts +1 -1
- package/internal/api-client/index.js +0 -1
- package/internal/api-client/index.js.map +1 -1
- package/internal/api-client/principalHistoryRequest.js +8 -2
- package/internal/api-client/principalHistoryRequest.js.map +1 -1
- package/internal/api-client/principalHistoryRequestContext.js +15 -5
- package/internal/api-client/principalHistoryRequestContext.js.map +1 -1
- package/internal/api-client/routes/writerProjections.js +6 -3
- package/internal/api-client/routes/writerProjections.js.map +1 -1
- package/internal/api-client/verifiedManifestCitations.d.ts +23 -0
- package/internal/api-client/verifiedManifestCitations.js +60 -0
- package/internal/api-client/verifiedManifestCitations.js.map +1 -0
- package/internal/api-client/writerProjectionRequests.js +75 -14
- package/internal/api-client/writerProjectionRequests.js.map +1 -1
- package/internal/crypto/index.d.ts +0 -1
- package/internal/crypto/index.js +0 -1
- package/internal/crypto/index.js.map +1 -1
- package/internal/validators/documentSyncRefinements.js +5 -0
- package/internal/validators/documentSyncRefinements.js.map +1 -1
- package/internal/validators/knownManifestsRefinements.js +5 -0
- package/internal/validators/knownManifestsRefinements.js.map +1 -0
- package/internal/validators/operation/documentSync.d.ts +3 -0
- package/internal/validators/operation/writerProjections.d.ts +85 -319
- package/internal/validators/operation/writerProjections.js +11 -11
- package/internal/validators/operation/writerProjections.js.map +1 -1
- package/internal/validators/response/container.d.ts +429 -20
- package/internal/validators/response/container.js +40 -5
- package/internal/validators/response/container.js.map +1 -1
- package/internal/validators/response/documentMutation.d.ts +440 -20
- package/internal/validators/response/documentMutation.js +33 -3
- package/internal/validators/response/documentMutation.js.map +1 -1
- package/internal/validators/response/documentSyncSchema.js +35 -1
- package/internal/validators/response/documentSyncSchema.js.map +1 -1
- package/internal/validators/response/index.d.ts +3 -2
- package/internal/validators/response/index.js +3 -2
- package/internal/validators/response/index.js.map +1 -1
- package/internal/validators/response/manifestBundleReferences.js +79 -0
- package/internal/validators/response/manifestBundleReferences.js.map +1 -0
- package/internal/validators/response/writerProjectionWire.d.ts +19 -0
- package/internal/validators/response/writerProjectionWire.js +132 -0
- package/internal/validators/response/writerProjectionWire.js.map +1 -0
- package/internal/validators/schema.js +20 -0
- package/internal/validators/schema.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/knownManifestWire.d.ts +11 -0
- package/internal/validators/util/knownManifestWire.js +28 -0
- package/internal/validators/util/knownManifestWire.js.map +1 -0
- package/internal/validators/writerProjectionRefinements.js +5 -0
- package/internal/validators/writerProjectionRefinements.js.map +1 -1
- package/package.json +1 -1
- package/workflows/documents/syncContentKeys.js +4 -9
- package/workflows/documents/syncContentKeys.js.map +1 -1
- package/workflows/registration/provisioningBootstrapBuilders.d.ts +0 -5
- package/workflows/sync/remoteReset.js +2 -0
- package/workflows/sync/remoteReset.js.map +1 -1
- package/internal/api-client/projectionHistoryTransport.js +0 -107
- package/internal/api-client/projectionHistoryTransport.js.map +0 -1
- package/internal/api-client/verifiedProjectionHistory.d.ts +0 -4
- package/internal/api-client/verifiedProjectionHistory.js +0 -12
- package/internal/api-client/verifiedProjectionHistory.js.map +0 -1
- package/internal/crypto/projectionHistory.d.ts +0 -14
- package/internal/crypto/projectionHistory.js +0 -90
- package/internal/crypto/projectionHistory.js.map +0 -1
- package/internal/crypto/projectionHistorySlots.d.ts +0 -13
- package/internal/crypto/projectionHistorySlots.js +0 -81
- package/internal/crypto/projectionHistorySlots.js.map +0 -1
- package/internal/validators/projectionHistoryRefinements.js +0 -5
- package/internal/validators/projectionHistoryRefinements.js.map +0 -1
- package/internal/validators/util/projectionHistoryWire.d.ts +0 -23
- package/internal/validators/util/projectionHistoryWire.js +0 -33
- package/internal/validators/util/projectionHistoryWire.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import { ContainerNotFoundErrorResponseSchema, ContainerWriterProjectionErrorResponseSchema,
|
|
2
|
+
import { knownManifestsHeaderRefinement } from "../knownManifestsRefinements.js";
|
|
3
|
+
import { ContainerNotFoundErrorResponseSchema, ContainerWriterProjectionErrorResponseSchema, ContainerWriterProjectionWireResponseSchema, DocumentNotFoundErrorResponseSchema, DocumentWriterProjectionErrorResponseSchema, DocumentWriterProjectionWireResponseSchema, ErrorResponseSchema, isContainerWriterProjectionWireResponse, isDocumentWriterProjectionWireResponse, SessionFailureResponseSchema, } from "../response/index.js";
|
|
4
4
|
import { PrincipalHistoryPreparationResponseSchema } from "../response/principalHistoryPreparation.js";
|
|
5
|
-
import {
|
|
5
|
+
import { KnownManifestsHeadersSchema } from "../util/knownManifestWire.js";
|
|
6
6
|
import { writerProjectionResponseRuntimeRefinements } from "../writerProjectionRefinements.js";
|
|
7
7
|
import { defineJsonOperation } from "./definition.js";
|
|
8
8
|
export const ContainerWriterProjectionPathParamsSchema = z.strictObject({
|
|
@@ -24,16 +24,16 @@ export const getContainerWriterProjectionOperation = defineJsonOperation({
|
|
|
24
24
|
failureStatuses: [400, 401, 403, 404, 409, 500],
|
|
25
25
|
id: "containers.writerProjection.get",
|
|
26
26
|
method: "GET",
|
|
27
|
-
headers:
|
|
27
|
+
headers: KnownManifestsHeadersSchema,
|
|
28
28
|
params: ContainerWriterProjectionPathParamsSchema,
|
|
29
29
|
path: "/containers/{containerId}/writer-projection",
|
|
30
30
|
responses: {
|
|
31
|
-
200:
|
|
31
|
+
200: ContainerWriterProjectionWireResponseSchema,
|
|
32
32
|
202: PrincipalHistoryPreparationResponseSchema,
|
|
33
33
|
},
|
|
34
34
|
runtimeRefinements: [
|
|
35
35
|
...writerProjectionResponseRuntimeRefinements,
|
|
36
|
-
|
|
36
|
+
knownManifestsHeaderRefinement,
|
|
37
37
|
],
|
|
38
38
|
});
|
|
39
39
|
export const getDocumentWriterProjectionOperation = defineJsonOperation({
|
|
@@ -49,18 +49,18 @@ export const getDocumentWriterProjectionOperation = defineJsonOperation({
|
|
|
49
49
|
failureStatuses: [400, 401, 403, 404, 409, 500],
|
|
50
50
|
id: "documents.writerProjection.get",
|
|
51
51
|
method: "GET",
|
|
52
|
-
headers:
|
|
52
|
+
headers: KnownManifestsHeadersSchema,
|
|
53
53
|
params: DocumentWriterProjectionPathParamsSchema,
|
|
54
54
|
path: "/documents/{documentId}/writer-projection",
|
|
55
55
|
responses: {
|
|
56
|
-
200:
|
|
56
|
+
200: DocumentWriterProjectionWireResponseSchema,
|
|
57
57
|
202: PrincipalHistoryPreparationResponseSchema,
|
|
58
58
|
},
|
|
59
59
|
runtimeRefinements: [
|
|
60
60
|
...writerProjectionResponseRuntimeRefinements,
|
|
61
|
-
|
|
61
|
+
knownManifestsHeaderRefinement,
|
|
62
62
|
],
|
|
63
63
|
});
|
|
64
|
-
export const isGetContainerWriterProjectionOperationResponse =
|
|
65
|
-
export const isGetDocumentWriterProjectionOperationResponse =
|
|
64
|
+
export const isGetContainerWriterProjectionOperationResponse = isContainerWriterProjectionWireResponse;
|
|
65
|
+
export const isGetDocumentWriterProjectionOperationResponse = isDocumentWriterProjectionWireResponse;
|
|
66
66
|
//# sourceMappingURL=writerProjections.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writerProjections.js","sourceRoot":"","sources":["writerProjections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"writerProjections.js","sourceRoot":"","sources":["writerProjections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EACL,oCAAoC,EACpC,4CAA4C,EAC5C,2CAA2C,EAC3C,mCAAmC,EACnC,2CAA2C,EAC3C,0CAA0C,EAC1C,mBAAmB,EACnB,uCAAuC,EACvC,sCAAsC,EACtC,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,yCAAyC,EAAE,MAAM,yCAAyC,CAAC;AACpG,OAAO,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,0CAA0C,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,CAAC,YAAY,CAAC;IACtE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;CACxB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,CAAC,YAAY,CAAC;IACrE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AASH,MAAM,CAAC,MAAM,qCAAqC,GAAG,mBAAmB,CAAC;IACvE,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE;QAChB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,oCAAoC;QACzC,GAAG,EAAE,4CAA4C;QACjD,GAAG,EAAE,mBAAmB;KACzB;IACD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC/C,EAAE,EAAE,iCAAiC;IACrC,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,2BAA2B;IACpC,MAAM,EAAE,yCAAyC;IACjD,IAAI,EAAE,6CAA6C;IACnD,SAAS,EAAE;QACT,GAAG,EAAE,2CAA2C;QAChD,GAAG,EAAE,yCAAyC;KAC/C;IACD,kBAAkB,EAAE;QAClB,GAAG,0CAA0C;QAC7C,8BAA8B;KAC/B;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oCAAoC,GAAG,mBAAmB,CAAC;IACtE,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE;QAChB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mCAAmC;QACxC,GAAG,EAAE,2CAA2C;QAChD,GAAG,EAAE,mBAAmB;KACzB;IACD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC/C,EAAE,EAAE,gCAAgC;IACpC,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,2BAA2B;IACpC,MAAM,EAAE,wCAAwC;IAChD,IAAI,EAAE,2CAA2C;IACjD,SAAS,EAAE;QACT,GAAG,EAAE,0CAA0C;QAC/C,GAAG,EAAE,yCAAyC;KAC/C;IACD,kBAAkB,EAAE;QAClB,GAAG,0CAA0C;QAC7C,8BAA8B;KAC/B;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+CAA+C,GAC1D,uCAAuC,CAAC;AAC1C,MAAM,CAAC,MAAM,8CAA8C,GACzD,sCAAsC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { knownManifestsHeaderRefinement } from \"../knownManifestsRefinements\";\nimport {\n ContainerNotFoundErrorResponseSchema,\n ContainerWriterProjectionErrorResponseSchema,\n ContainerWriterProjectionWireResponseSchema,\n DocumentNotFoundErrorResponseSchema,\n DocumentWriterProjectionErrorResponseSchema,\n DocumentWriterProjectionWireResponseSchema,\n ErrorResponseSchema,\n isContainerWriterProjectionWireResponse,\n isDocumentWriterProjectionWireResponse,\n SessionFailureResponseSchema,\n} from \"../response\";\nimport { PrincipalHistoryPreparationResponseSchema } from \"../response/principalHistoryPreparation\";\nimport { KnownManifestsHeadersSchema } from \"../util/knownManifestWire\";\nimport { writerProjectionResponseRuntimeRefinements } from \"../writerProjectionRefinements\";\nimport { defineJsonOperation } from \"./definition\";\n\nexport const ContainerWriterProjectionPathParamsSchema = z.strictObject({\n containerId: z.string(),\n});\n\nexport const DocumentWriterProjectionPathParamsSchema = z.strictObject({\n documentId: z.string(),\n});\n\nexport type ContainerWriterProjectionPathParams = z.infer<\n typeof ContainerWriterProjectionPathParamsSchema\n>;\nexport type DocumentWriterProjectionPathParams = z.infer<\n typeof DocumentWriterProjectionPathParamsSchema\n>;\n\nexport const getContainerWriterProjectionOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 403: ErrorResponseSchema,\n 404: ContainerNotFoundErrorResponseSchema,\n 409: ContainerWriterProjectionErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 403, 404, 409, 500],\n id: \"containers.writerProjection.get\",\n method: \"GET\",\n headers: KnownManifestsHeadersSchema,\n params: ContainerWriterProjectionPathParamsSchema,\n path: \"/containers/{containerId}/writer-projection\",\n responses: {\n 200: ContainerWriterProjectionWireResponseSchema,\n 202: PrincipalHistoryPreparationResponseSchema,\n },\n runtimeRefinements: [\n ...writerProjectionResponseRuntimeRefinements,\n knownManifestsHeaderRefinement,\n ],\n});\n\nexport const getDocumentWriterProjectionOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 403: ErrorResponseSchema,\n 404: DocumentNotFoundErrorResponseSchema,\n 409: DocumentWriterProjectionErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 403, 404, 409, 500],\n id: \"documents.writerProjection.get\",\n method: \"GET\",\n headers: KnownManifestsHeadersSchema,\n params: DocumentWriterProjectionPathParamsSchema,\n path: \"/documents/{documentId}/writer-projection\",\n responses: {\n 200: DocumentWriterProjectionWireResponseSchema,\n 202: PrincipalHistoryPreparationResponseSchema,\n },\n runtimeRefinements: [\n ...writerProjectionResponseRuntimeRefinements,\n knownManifestsHeaderRefinement,\n ],\n});\n\nexport const isGetContainerWriterProjectionOperationResponse =\n isContainerWriterProjectionWireResponse;\nexport const isGetDocumentWriterProjectionOperationResponse =\n isDocumentWriterProjectionWireResponse;\n"]}
|
|
@@ -1337,6 +1337,10 @@ export declare const ContainerKeyingPathResponseSchema: z.ZodType<{
|
|
|
1337
1337
|
}[];
|
|
1338
1338
|
}>>;
|
|
1339
1339
|
export type ContainerKeyingPathResponse = z.infer<typeof ContainerKeyingPathResponseSchema>;
|
|
1340
|
+
/**
|
|
1341
|
+
* The decoded projection a client verifies: every manifest position holds
|
|
1342
|
+
* its bundle. `decodeContainerWriterProjection` builds it from the wire.
|
|
1343
|
+
*/
|
|
1340
1344
|
export declare const ContainerWriterProjectionResponseSchema: z.ZodType<{
|
|
1341
1345
|
policyEvidence: {
|
|
1342
1346
|
organization: {
|
|
@@ -1423,11 +1427,6 @@ export declare const ContainerWriterProjectionResponseSchema: z.ZodType<{
|
|
|
1423
1427
|
manifestHash: string;
|
|
1424
1428
|
state: Record<string, unknown>;
|
|
1425
1429
|
}[];
|
|
1426
|
-
historyPrefixes?: {
|
|
1427
|
-
key: string;
|
|
1428
|
-
count: number;
|
|
1429
|
-
digest: string;
|
|
1430
|
-
}[] | undefined;
|
|
1431
1430
|
}, {
|
|
1432
1431
|
policyEvidence: {
|
|
1433
1432
|
organization: {
|
|
@@ -1514,11 +1513,6 @@ export declare const ContainerWriterProjectionResponseSchema: z.ZodType<{
|
|
|
1514
1513
|
manifestHash: string;
|
|
1515
1514
|
state: Record<string, unknown>;
|
|
1516
1515
|
}[];
|
|
1517
|
-
historyPrefixes?: {
|
|
1518
|
-
key: string;
|
|
1519
|
-
count: number;
|
|
1520
|
-
digest: string;
|
|
1521
|
-
}[] | undefined;
|
|
1522
1516
|
}, z.core.$ZodTypeInternals<{
|
|
1523
1517
|
policyEvidence: {
|
|
1524
1518
|
organization: {
|
|
@@ -1605,11 +1599,6 @@ export declare const ContainerWriterProjectionResponseSchema: z.ZodType<{
|
|
|
1605
1599
|
manifestHash: string;
|
|
1606
1600
|
state: Record<string, unknown>;
|
|
1607
1601
|
}[];
|
|
1608
|
-
historyPrefixes?: {
|
|
1609
|
-
key: string;
|
|
1610
|
-
count: number;
|
|
1611
|
-
digest: string;
|
|
1612
|
-
}[] | undefined;
|
|
1613
1602
|
}, {
|
|
1614
1603
|
policyEvidence: {
|
|
1615
1604
|
organization: {
|
|
@@ -1696,13 +1685,432 @@ export declare const ContainerWriterProjectionResponseSchema: z.ZodType<{
|
|
|
1696
1685
|
manifestHash: string;
|
|
1697
1686
|
state: Record<string, unknown>;
|
|
1698
1687
|
}[];
|
|
1699
|
-
historyPrefixes?: {
|
|
1700
|
-
key: string;
|
|
1701
|
-
count: number;
|
|
1702
|
-
digest: string;
|
|
1703
|
-
}[] | undefined;
|
|
1704
1688
|
}>>;
|
|
1705
1689
|
export type ContainerWriterProjectionResponse = z.infer<typeof ContainerWriterProjectionResponseSchema>;
|
|
1690
|
+
export declare const ContainerKeyingPathWireResponseSchema: z.ZodType<{
|
|
1691
|
+
containerId: string;
|
|
1692
|
+
containerKeks: {
|
|
1693
|
+
containerManifestHistory: string[];
|
|
1694
|
+
accessManifestHash: string;
|
|
1695
|
+
containerId: string;
|
|
1696
|
+
containerKeyEpoch: number;
|
|
1697
|
+
containerKeyEpochId: string;
|
|
1698
|
+
keyEpoch: Record<string, unknown>;
|
|
1699
|
+
keyEpochHash: string;
|
|
1700
|
+
keyring: {
|
|
1701
|
+
containerId: string;
|
|
1702
|
+
containerKeyEpochId: string;
|
|
1703
|
+
iv: string;
|
|
1704
|
+
sealed: string;
|
|
1705
|
+
sealingSuite: string;
|
|
1706
|
+
version: number;
|
|
1707
|
+
} | null;
|
|
1708
|
+
keyTargetHash: string;
|
|
1709
|
+
parentContainerKeyEpochId: string | null;
|
|
1710
|
+
recipientTargets: Record<string, unknown>[];
|
|
1711
|
+
wraps: Record<string, unknown>[];
|
|
1712
|
+
}[];
|
|
1713
|
+
organizationId: string;
|
|
1714
|
+
path: string[];
|
|
1715
|
+
}, {
|
|
1716
|
+
containerId: string;
|
|
1717
|
+
containerKeks: {
|
|
1718
|
+
containerManifestHistory: string[];
|
|
1719
|
+
accessManifestHash: string;
|
|
1720
|
+
containerId: string;
|
|
1721
|
+
containerKeyEpoch: number;
|
|
1722
|
+
containerKeyEpochId: string;
|
|
1723
|
+
keyEpoch: Record<string, unknown>;
|
|
1724
|
+
keyEpochHash: string;
|
|
1725
|
+
keyring: {
|
|
1726
|
+
containerId: string;
|
|
1727
|
+
containerKeyEpochId: string;
|
|
1728
|
+
iv: string;
|
|
1729
|
+
sealed: string;
|
|
1730
|
+
sealingSuite: string;
|
|
1731
|
+
version: number;
|
|
1732
|
+
} | null;
|
|
1733
|
+
keyTargetHash: string;
|
|
1734
|
+
parentContainerKeyEpochId: string | null;
|
|
1735
|
+
recipientTargets: Record<string, unknown>[];
|
|
1736
|
+
wraps: Record<string, unknown>[];
|
|
1737
|
+
}[];
|
|
1738
|
+
organizationId: string;
|
|
1739
|
+
path: string[];
|
|
1740
|
+
}, z.core.$ZodTypeInternals<{
|
|
1741
|
+
containerId: string;
|
|
1742
|
+
containerKeks: {
|
|
1743
|
+
containerManifestHistory: string[];
|
|
1744
|
+
accessManifestHash: string;
|
|
1745
|
+
containerId: string;
|
|
1746
|
+
containerKeyEpoch: number;
|
|
1747
|
+
containerKeyEpochId: string;
|
|
1748
|
+
keyEpoch: Record<string, unknown>;
|
|
1749
|
+
keyEpochHash: string;
|
|
1750
|
+
keyring: {
|
|
1751
|
+
containerId: string;
|
|
1752
|
+
containerKeyEpochId: string;
|
|
1753
|
+
iv: string;
|
|
1754
|
+
sealed: string;
|
|
1755
|
+
sealingSuite: string;
|
|
1756
|
+
version: number;
|
|
1757
|
+
} | null;
|
|
1758
|
+
keyTargetHash: string;
|
|
1759
|
+
parentContainerKeyEpochId: string | null;
|
|
1760
|
+
recipientTargets: Record<string, unknown>[];
|
|
1761
|
+
wraps: Record<string, unknown>[];
|
|
1762
|
+
}[];
|
|
1763
|
+
organizationId: string;
|
|
1764
|
+
path: string[];
|
|
1765
|
+
}, {
|
|
1766
|
+
containerId: string;
|
|
1767
|
+
containerKeks: {
|
|
1768
|
+
containerManifestHistory: string[];
|
|
1769
|
+
accessManifestHash: string;
|
|
1770
|
+
containerId: string;
|
|
1771
|
+
containerKeyEpoch: number;
|
|
1772
|
+
containerKeyEpochId: string;
|
|
1773
|
+
keyEpoch: Record<string, unknown>;
|
|
1774
|
+
keyEpochHash: string;
|
|
1775
|
+
keyring: {
|
|
1776
|
+
containerId: string;
|
|
1777
|
+
containerKeyEpochId: string;
|
|
1778
|
+
iv: string;
|
|
1779
|
+
sealed: string;
|
|
1780
|
+
sealingSuite: string;
|
|
1781
|
+
version: number;
|
|
1782
|
+
} | null;
|
|
1783
|
+
keyTargetHash: string;
|
|
1784
|
+
parentContainerKeyEpochId: string | null;
|
|
1785
|
+
recipientTargets: Record<string, unknown>[];
|
|
1786
|
+
wraps: Record<string, unknown>[];
|
|
1787
|
+
}[];
|
|
1788
|
+
organizationId: string;
|
|
1789
|
+
path: string[];
|
|
1790
|
+
}>>;
|
|
1791
|
+
export type ContainerKeyingPathWireResponse = z.infer<typeof ContainerKeyingPathWireResponseSchema>;
|
|
1792
|
+
/**
|
|
1793
|
+
* The served shape: manifest positions cite `bundles` by hash, except hashes
|
|
1794
|
+
* the request declared already held, which `omittedBundles` lists instead.
|
|
1795
|
+
*/
|
|
1796
|
+
export declare const ContainerWriterProjectionWireResponseSchema: z.ZodType<{
|
|
1797
|
+
policyEvidence: {
|
|
1798
|
+
organization: {
|
|
1799
|
+
head: {
|
|
1800
|
+
keyEpoch: number;
|
|
1801
|
+
keyFingerprint: string;
|
|
1802
|
+
principalId: string;
|
|
1803
|
+
principalType: "group" | "organization";
|
|
1804
|
+
stateHash: string;
|
|
1805
|
+
version: number;
|
|
1806
|
+
};
|
|
1807
|
+
grant: string;
|
|
1808
|
+
} | null;
|
|
1809
|
+
organizationPayloads: {
|
|
1810
|
+
reference: {
|
|
1811
|
+
keyEpoch: number;
|
|
1812
|
+
keyFingerprint: string;
|
|
1813
|
+
principalId: string;
|
|
1814
|
+
principalType: "group" | "organization";
|
|
1815
|
+
stateHash: string;
|
|
1816
|
+
version: number;
|
|
1817
|
+
};
|
|
1818
|
+
payload: {
|
|
1819
|
+
cipherSuite: "aes-256-gcm";
|
|
1820
|
+
ciphertext: string;
|
|
1821
|
+
ciphertextHash: string;
|
|
1822
|
+
createdAt: string;
|
|
1823
|
+
principalId: string;
|
|
1824
|
+
principalType: "group" | "organization";
|
|
1825
|
+
stateHash: string;
|
|
1826
|
+
};
|
|
1827
|
+
}[];
|
|
1828
|
+
groups: {
|
|
1829
|
+
head: {
|
|
1830
|
+
keyEpoch: number;
|
|
1831
|
+
keyFingerprint: string;
|
|
1832
|
+
principalId: string;
|
|
1833
|
+
principalType: "group" | "organization";
|
|
1834
|
+
stateHash: string;
|
|
1835
|
+
version: number;
|
|
1836
|
+
};
|
|
1837
|
+
grant: string;
|
|
1838
|
+
}[];
|
|
1839
|
+
};
|
|
1840
|
+
containerId: string;
|
|
1841
|
+
containerKeks: {
|
|
1842
|
+
containerManifestHistory: string[];
|
|
1843
|
+
accessManifestHash: string;
|
|
1844
|
+
containerId: string;
|
|
1845
|
+
containerKeyEpoch: number;
|
|
1846
|
+
containerKeyEpochId: string;
|
|
1847
|
+
keyEpoch: Record<string, unknown>;
|
|
1848
|
+
keyEpochHash: string;
|
|
1849
|
+
keyring: {
|
|
1850
|
+
containerId: string;
|
|
1851
|
+
containerKeyEpochId: string;
|
|
1852
|
+
iv: string;
|
|
1853
|
+
sealed: string;
|
|
1854
|
+
sealingSuite: string;
|
|
1855
|
+
version: number;
|
|
1856
|
+
} | null;
|
|
1857
|
+
keyTargetHash: string;
|
|
1858
|
+
parentContainerKeyEpochId: string | null;
|
|
1859
|
+
recipientTargets: Record<string, unknown>[];
|
|
1860
|
+
wraps: Record<string, unknown>[];
|
|
1861
|
+
}[];
|
|
1862
|
+
organizationId: string;
|
|
1863
|
+
path: string[];
|
|
1864
|
+
bundles: Record<string, {
|
|
1865
|
+
event: {
|
|
1866
|
+
body: unknown;
|
|
1867
|
+
event: Record<string, unknown>;
|
|
1868
|
+
eventHash: string;
|
|
1869
|
+
};
|
|
1870
|
+
manifest: Record<string, unknown>;
|
|
1871
|
+
manifestHash: string;
|
|
1872
|
+
state: Record<string, unknown>;
|
|
1873
|
+
}>;
|
|
1874
|
+
omittedBundles: string[];
|
|
1875
|
+
}, {
|
|
1876
|
+
policyEvidence: {
|
|
1877
|
+
organization: {
|
|
1878
|
+
head: {
|
|
1879
|
+
keyEpoch: number;
|
|
1880
|
+
keyFingerprint: string;
|
|
1881
|
+
principalId: string;
|
|
1882
|
+
principalType: "group" | "organization";
|
|
1883
|
+
stateHash: string;
|
|
1884
|
+
version: number;
|
|
1885
|
+
};
|
|
1886
|
+
grant: string;
|
|
1887
|
+
} | null;
|
|
1888
|
+
organizationPayloads: {
|
|
1889
|
+
reference: {
|
|
1890
|
+
keyEpoch: number;
|
|
1891
|
+
keyFingerprint: string;
|
|
1892
|
+
principalId: string;
|
|
1893
|
+
principalType: "group" | "organization";
|
|
1894
|
+
stateHash: string;
|
|
1895
|
+
version: number;
|
|
1896
|
+
};
|
|
1897
|
+
payload: {
|
|
1898
|
+
cipherSuite: "aes-256-gcm";
|
|
1899
|
+
ciphertext: string;
|
|
1900
|
+
ciphertextHash: string;
|
|
1901
|
+
createdAt: string;
|
|
1902
|
+
principalId: string;
|
|
1903
|
+
principalType: "group" | "organization";
|
|
1904
|
+
stateHash: string;
|
|
1905
|
+
};
|
|
1906
|
+
}[];
|
|
1907
|
+
groups: {
|
|
1908
|
+
head: {
|
|
1909
|
+
keyEpoch: number;
|
|
1910
|
+
keyFingerprint: string;
|
|
1911
|
+
principalId: string;
|
|
1912
|
+
principalType: "group" | "organization";
|
|
1913
|
+
stateHash: string;
|
|
1914
|
+
version: number;
|
|
1915
|
+
};
|
|
1916
|
+
grant: string;
|
|
1917
|
+
}[];
|
|
1918
|
+
};
|
|
1919
|
+
containerId: string;
|
|
1920
|
+
containerKeks: {
|
|
1921
|
+
containerManifestHistory: string[];
|
|
1922
|
+
accessManifestHash: string;
|
|
1923
|
+
containerId: string;
|
|
1924
|
+
containerKeyEpoch: number;
|
|
1925
|
+
containerKeyEpochId: string;
|
|
1926
|
+
keyEpoch: Record<string, unknown>;
|
|
1927
|
+
keyEpochHash: string;
|
|
1928
|
+
keyring: {
|
|
1929
|
+
containerId: string;
|
|
1930
|
+
containerKeyEpochId: string;
|
|
1931
|
+
iv: string;
|
|
1932
|
+
sealed: string;
|
|
1933
|
+
sealingSuite: string;
|
|
1934
|
+
version: number;
|
|
1935
|
+
} | null;
|
|
1936
|
+
keyTargetHash: string;
|
|
1937
|
+
parentContainerKeyEpochId: string | null;
|
|
1938
|
+
recipientTargets: Record<string, unknown>[];
|
|
1939
|
+
wraps: Record<string, unknown>[];
|
|
1940
|
+
}[];
|
|
1941
|
+
organizationId: string;
|
|
1942
|
+
path: string[];
|
|
1943
|
+
bundles: Record<string, {
|
|
1944
|
+
event: {
|
|
1945
|
+
body: unknown;
|
|
1946
|
+
event: Record<string, unknown>;
|
|
1947
|
+
eventHash: string;
|
|
1948
|
+
};
|
|
1949
|
+
manifest: Record<string, unknown>;
|
|
1950
|
+
manifestHash: string;
|
|
1951
|
+
state: Record<string, unknown>;
|
|
1952
|
+
}>;
|
|
1953
|
+
omittedBundles: string[];
|
|
1954
|
+
}, z.core.$ZodTypeInternals<{
|
|
1955
|
+
policyEvidence: {
|
|
1956
|
+
organization: {
|
|
1957
|
+
head: {
|
|
1958
|
+
keyEpoch: number;
|
|
1959
|
+
keyFingerprint: string;
|
|
1960
|
+
principalId: string;
|
|
1961
|
+
principalType: "group" | "organization";
|
|
1962
|
+
stateHash: string;
|
|
1963
|
+
version: number;
|
|
1964
|
+
};
|
|
1965
|
+
grant: string;
|
|
1966
|
+
} | null;
|
|
1967
|
+
organizationPayloads: {
|
|
1968
|
+
reference: {
|
|
1969
|
+
keyEpoch: number;
|
|
1970
|
+
keyFingerprint: string;
|
|
1971
|
+
principalId: string;
|
|
1972
|
+
principalType: "group" | "organization";
|
|
1973
|
+
stateHash: string;
|
|
1974
|
+
version: number;
|
|
1975
|
+
};
|
|
1976
|
+
payload: {
|
|
1977
|
+
cipherSuite: "aes-256-gcm";
|
|
1978
|
+
ciphertext: string;
|
|
1979
|
+
ciphertextHash: string;
|
|
1980
|
+
createdAt: string;
|
|
1981
|
+
principalId: string;
|
|
1982
|
+
principalType: "group" | "organization";
|
|
1983
|
+
stateHash: string;
|
|
1984
|
+
};
|
|
1985
|
+
}[];
|
|
1986
|
+
groups: {
|
|
1987
|
+
head: {
|
|
1988
|
+
keyEpoch: number;
|
|
1989
|
+
keyFingerprint: string;
|
|
1990
|
+
principalId: string;
|
|
1991
|
+
principalType: "group" | "organization";
|
|
1992
|
+
stateHash: string;
|
|
1993
|
+
version: number;
|
|
1994
|
+
};
|
|
1995
|
+
grant: string;
|
|
1996
|
+
}[];
|
|
1997
|
+
};
|
|
1998
|
+
containerId: string;
|
|
1999
|
+
containerKeks: {
|
|
2000
|
+
containerManifestHistory: string[];
|
|
2001
|
+
accessManifestHash: string;
|
|
2002
|
+
containerId: string;
|
|
2003
|
+
containerKeyEpoch: number;
|
|
2004
|
+
containerKeyEpochId: string;
|
|
2005
|
+
keyEpoch: Record<string, unknown>;
|
|
2006
|
+
keyEpochHash: string;
|
|
2007
|
+
keyring: {
|
|
2008
|
+
containerId: string;
|
|
2009
|
+
containerKeyEpochId: string;
|
|
2010
|
+
iv: string;
|
|
2011
|
+
sealed: string;
|
|
2012
|
+
sealingSuite: string;
|
|
2013
|
+
version: number;
|
|
2014
|
+
} | null;
|
|
2015
|
+
keyTargetHash: string;
|
|
2016
|
+
parentContainerKeyEpochId: string | null;
|
|
2017
|
+
recipientTargets: Record<string, unknown>[];
|
|
2018
|
+
wraps: Record<string, unknown>[];
|
|
2019
|
+
}[];
|
|
2020
|
+
organizationId: string;
|
|
2021
|
+
path: string[];
|
|
2022
|
+
bundles: Record<string, {
|
|
2023
|
+
event: {
|
|
2024
|
+
body: unknown;
|
|
2025
|
+
event: Record<string, unknown>;
|
|
2026
|
+
eventHash: string;
|
|
2027
|
+
};
|
|
2028
|
+
manifest: Record<string, unknown>;
|
|
2029
|
+
manifestHash: string;
|
|
2030
|
+
state: Record<string, unknown>;
|
|
2031
|
+
}>;
|
|
2032
|
+
omittedBundles: string[];
|
|
2033
|
+
}, {
|
|
2034
|
+
policyEvidence: {
|
|
2035
|
+
organization: {
|
|
2036
|
+
head: {
|
|
2037
|
+
keyEpoch: number;
|
|
2038
|
+
keyFingerprint: string;
|
|
2039
|
+
principalId: string;
|
|
2040
|
+
principalType: "group" | "organization";
|
|
2041
|
+
stateHash: string;
|
|
2042
|
+
version: number;
|
|
2043
|
+
};
|
|
2044
|
+
grant: string;
|
|
2045
|
+
} | null;
|
|
2046
|
+
organizationPayloads: {
|
|
2047
|
+
reference: {
|
|
2048
|
+
keyEpoch: number;
|
|
2049
|
+
keyFingerprint: string;
|
|
2050
|
+
principalId: string;
|
|
2051
|
+
principalType: "group" | "organization";
|
|
2052
|
+
stateHash: string;
|
|
2053
|
+
version: number;
|
|
2054
|
+
};
|
|
2055
|
+
payload: {
|
|
2056
|
+
cipherSuite: "aes-256-gcm";
|
|
2057
|
+
ciphertext: string;
|
|
2058
|
+
ciphertextHash: string;
|
|
2059
|
+
createdAt: string;
|
|
2060
|
+
principalId: string;
|
|
2061
|
+
principalType: "group" | "organization";
|
|
2062
|
+
stateHash: string;
|
|
2063
|
+
};
|
|
2064
|
+
}[];
|
|
2065
|
+
groups: {
|
|
2066
|
+
head: {
|
|
2067
|
+
keyEpoch: number;
|
|
2068
|
+
keyFingerprint: string;
|
|
2069
|
+
principalId: string;
|
|
2070
|
+
principalType: "group" | "organization";
|
|
2071
|
+
stateHash: string;
|
|
2072
|
+
version: number;
|
|
2073
|
+
};
|
|
2074
|
+
grant: string;
|
|
2075
|
+
}[];
|
|
2076
|
+
};
|
|
2077
|
+
containerId: string;
|
|
2078
|
+
containerKeks: {
|
|
2079
|
+
containerManifestHistory: string[];
|
|
2080
|
+
accessManifestHash: string;
|
|
2081
|
+
containerId: string;
|
|
2082
|
+
containerKeyEpoch: number;
|
|
2083
|
+
containerKeyEpochId: string;
|
|
2084
|
+
keyEpoch: Record<string, unknown>;
|
|
2085
|
+
keyEpochHash: string;
|
|
2086
|
+
keyring: {
|
|
2087
|
+
containerId: string;
|
|
2088
|
+
containerKeyEpochId: string;
|
|
2089
|
+
iv: string;
|
|
2090
|
+
sealed: string;
|
|
2091
|
+
sealingSuite: string;
|
|
2092
|
+
version: number;
|
|
2093
|
+
} | null;
|
|
2094
|
+
keyTargetHash: string;
|
|
2095
|
+
parentContainerKeyEpochId: string | null;
|
|
2096
|
+
recipientTargets: Record<string, unknown>[];
|
|
2097
|
+
wraps: Record<string, unknown>[];
|
|
2098
|
+
}[];
|
|
2099
|
+
organizationId: string;
|
|
2100
|
+
path: string[];
|
|
2101
|
+
bundles: Record<string, {
|
|
2102
|
+
event: {
|
|
2103
|
+
body: unknown;
|
|
2104
|
+
event: Record<string, unknown>;
|
|
2105
|
+
eventHash: string;
|
|
2106
|
+
};
|
|
2107
|
+
manifest: Record<string, unknown>;
|
|
2108
|
+
manifestHash: string;
|
|
2109
|
+
state: Record<string, unknown>;
|
|
2110
|
+
}>;
|
|
2111
|
+
omittedBundles: string[];
|
|
2112
|
+
}>>;
|
|
2113
|
+
export type ContainerWriterProjectionWireResponse = z.infer<typeof ContainerWriterProjectionWireResponseSchema>;
|
|
1706
2114
|
export declare const ContainerSummaryResponseSchema: z.ZodType<{
|
|
1707
2115
|
createdAt: string;
|
|
1708
2116
|
depth: number;
|
|
@@ -1953,4 +2361,5 @@ export declare function isListContainersResponse(value: unknown): value is ListC
|
|
|
1953
2361
|
export declare function isContainerMutationResponse(value: unknown): value is ContainerMutationResponse;
|
|
1954
2362
|
export declare function isContainerDeleteResponse(value: unknown): value is ContainerDeleteResponse;
|
|
1955
2363
|
export declare function isContainerWriterProjectionResponse(value: unknown): value is ContainerWriterProjectionResponse;
|
|
2364
|
+
export declare function isContainerWriterProjectionWireResponse(value: unknown): value is ContainerWriterProjectionWireResponse;
|
|
1956
2365
|
export {};
|
|
@@ -5,9 +5,9 @@ import { registerJsonSchemaRuntimeRefinements } from "../jsonSchema.js";
|
|
|
5
5
|
import { organizationProvisioningContainerKeyringRefinement } from "../organizationProvisioningRefinements.js";
|
|
6
6
|
import { arraySchema, loosePlainObject, nonEmptyArraySchema, nonEmptyStringSchema, nonNegativeIntegerSchema, plainObjectSchema, positiveIntegerSchema, } from "../schema.js";
|
|
7
7
|
import { AccessManifestBundleWireResponseSchema, CONTAINER_KEK_LOG_PAGE_LIMIT, CONTAINER_KEK_WRAPS_PER_EPOCH_LIMIT, ContainerKekKeyringWireRecordSchema, } from "../util/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import { containerWriterProjectionPathKekCountRefinement } from "../writerProjectionRefinements.js";
|
|
8
|
+
import { containerWriterProjectionPathKekCountRefinement, writerProjectionManifestBundlesRefinement, } from "../writerProjectionRefinements.js";
|
|
10
9
|
import { EffectiveAccessLevelSchema } from "./accessLevel.js";
|
|
10
|
+
import { containerKeyingPathReferences, ManifestBundlesSchema, ManifestHashReferenceSchema, OmittedManifestBundlesSchema, refineManifestBundleReferences, } from "./manifestBundleReferences.js";
|
|
11
11
|
import { ReferencedPrincipalStateResponseSchema, ReferencedPrincipalStateResponseShape, } from "./principalReference.js";
|
|
12
12
|
import { ProjectionPolicyEvidenceResponseSchema } from "./projectionPolicyEvidence.js";
|
|
13
13
|
import { SyncWatermarkSchema } from "./syncWatermark.js";
|
|
@@ -35,7 +35,7 @@ const containerKekResponseShape = {
|
|
|
35
35
|
recipientTargets: nonEmptyArraySchema(plainObjectSchema),
|
|
36
36
|
wraps: nonEmptyArraySchema(plainObjectSchema),
|
|
37
37
|
};
|
|
38
|
-
|
|
38
|
+
function refineContainerKekKeyring(value, context) {
|
|
39
39
|
if ((value.keyring === null) !== (value.containerKeyEpoch === 1)) {
|
|
40
40
|
context.addIssue({
|
|
41
41
|
code: "custom",
|
|
@@ -43,7 +43,13 @@ const ContainerKekResponseSchema = registerJsonSchemaRuntimeRefinements(loosePla
|
|
|
43
43
|
path: ["keyring"],
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
|
47
|
+
const ContainerKekResponseSchema = registerJsonSchemaRuntimeRefinements(loosePlainObject(containerKekResponseShape).superRefine(refineContainerKekKeyring), [organizationProvisioningContainerKeyringRefinement]);
|
|
48
|
+
/** On the writer-projection wire, KEK history cites manifests by hash. */
|
|
49
|
+
const ContainerKekWireResponseSchema = registerJsonSchemaRuntimeRefinements(loosePlainObject({
|
|
50
|
+
...containerKekResponseShape,
|
|
51
|
+
containerManifestHistory: arraySchema(ManifestHashReferenceSchema),
|
|
52
|
+
}).superRefine(refineContainerKekKeyring), [organizationProvisioningContainerKeyringRefinement]);
|
|
47
53
|
/**
|
|
48
54
|
* The append-only rotation log for one container: every epoch with its
|
|
49
55
|
* write-once bridge and sealed keyring. This is the rebuild/repair read
|
|
@@ -141,11 +147,37 @@ function refineContainerKeyingPath(projection, context) {
|
|
|
141
147
|
});
|
|
142
148
|
}
|
|
143
149
|
export const ContainerKeyingPathResponseSchema = registerJsonSchemaRuntimeRefinements(loosePlainObject(containerKeyingPathShape).superRefine(refineContainerKeyingPath), [containerWriterProjectionPathKekCountRefinement]);
|
|
150
|
+
/**
|
|
151
|
+
* The decoded projection a client verifies: every manifest position holds
|
|
152
|
+
* its bundle. `decodeContainerWriterProjection` builds it from the wire.
|
|
153
|
+
*/
|
|
144
154
|
export const ContainerWriterProjectionResponseSchema = registerJsonSchemaRuntimeRefinements(loosePlainObject({
|
|
145
155
|
...containerKeyingPathShape,
|
|
146
156
|
policyEvidence: ProjectionPolicyEvidenceResponseSchema,
|
|
147
|
-
historyPrefixes: ProjectionHistoryPrefixesSchema.optional(),
|
|
148
157
|
}).superRefine(refineContainerKeyingPath), [containerWriterProjectionPathKekCountRefinement]);
|
|
158
|
+
const containerKeyingPathWireShape = {
|
|
159
|
+
containerId: z.string(),
|
|
160
|
+
containerKeks: arraySchema(ContainerKekWireResponseSchema),
|
|
161
|
+
organizationId: z.string(),
|
|
162
|
+
path: nonEmptyArraySchema(ManifestHashReferenceSchema),
|
|
163
|
+
};
|
|
164
|
+
export const ContainerKeyingPathWireResponseSchema = registerJsonSchemaRuntimeRefinements(loosePlainObject(containerKeyingPathWireShape).superRefine(refineContainerKeyingPath), [containerWriterProjectionPathKekCountRefinement]);
|
|
165
|
+
/**
|
|
166
|
+
* The served shape: manifest positions cite `bundles` by hash, except hashes
|
|
167
|
+
* the request declared already held, which `omittedBundles` lists instead.
|
|
168
|
+
*/
|
|
169
|
+
export const ContainerWriterProjectionWireResponseSchema = registerJsonSchemaRuntimeRefinements(loosePlainObject({
|
|
170
|
+
bundles: ManifestBundlesSchema,
|
|
171
|
+
omittedBundles: OmittedManifestBundlesSchema,
|
|
172
|
+
...containerKeyingPathWireShape,
|
|
173
|
+
policyEvidence: ProjectionPolicyEvidenceResponseSchema,
|
|
174
|
+
}).superRefine((projection, context) => {
|
|
175
|
+
refineContainerKeyingPath(projection, context);
|
|
176
|
+
refineManifestBundleReferences(projection, containerKeyingPathReferences(projection), context);
|
|
177
|
+
}), [
|
|
178
|
+
containerWriterProjectionPathKekCountRefinement,
|
|
179
|
+
writerProjectionManifestBundlesRefinement,
|
|
180
|
+
]);
|
|
149
181
|
export const ContainerSummaryResponseSchema = loosePlainObject({
|
|
150
182
|
createdAt: z.string(),
|
|
151
183
|
depth: nonNegativeIntegerSchema,
|
|
@@ -185,4 +217,7 @@ export function isContainerDeleteResponse(value) {
|
|
|
185
217
|
export function isContainerWriterProjectionResponse(value) {
|
|
186
218
|
return ContainerWriterProjectionResponseSchema.safeParse(value).success;
|
|
187
219
|
}
|
|
220
|
+
export function isContainerWriterProjectionWireResponse(value) {
|
|
221
|
+
return ContainerWriterProjectionWireResponseSchema.safeParse(value).success;
|
|
222
|
+
}
|
|
188
223
|
//# sourceMappingURL=container.js.map
|