@tearleads/client-sdk 0.1.41 → 0.1.43
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/blobs/transferPool.js +35 -8
- package/data/blobs/transferPool.js.map +1 -1
- package/data/containers/shared/projection.js +12 -0
- package/data/containers/shared/projection.js.map +1 -1
- package/data/documents/blob/shared/types.d.ts +2 -3
- package/data/documents/blob/shared/types.js.map +1 -1
- package/data/documents/shared/events.js +0 -1
- package/data/documents/shared/events.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/container-contents/containerContentsPersistence.js +6 -22
- package/data/persistence/container-contents/containerContentsPersistence.js.map +1 -1
- package/data/persistence/container-contents/containerMetadataMutationPersistence.js +5 -15
- package/data/persistence/container-contents/containerMetadataMutationPersistence.js.map +1 -1
- package/data/persistence/container-contents/containerPendingUpdatePersistence.js +6 -15
- package/data/persistence/container-contents/containerPendingUpdatePersistence.js.map +1 -1
- package/data/persistence/container-contents/containerRecoveryPersistence.js +3 -4
- package/data/persistence/container-contents/containerRecoveryPersistence.js.map +1 -1
- package/data/persistence/container-contents/containerRemovalWork.js +3 -5
- package/data/persistence/container-contents/containerRemovalWork.js.map +1 -1
- package/data/persistence/container-contents/dormantContainerMetadata.js +1 -5
- package/data/persistence/container-contents/dormantContainerMetadata.js.map +1 -1
- package/data/persistence/documents/documentsPersistence.js +4 -9
- package/data/persistence/documents/documentsPersistence.js.map +1 -1
- package/data/persistence/documents/internal/discardDocument.js +1 -2
- package/data/persistence/documents/internal/discardDocument.js.map +1 -1
- package/data/persistence/documents/internal/documentDeletionPersistence.js +1 -2
- package/data/persistence/documents/internal/documentDeletionPersistence.js.map +1 -1
- package/data/persistence/documents/internal/documentMutationPersistence.js +17 -25
- package/data/persistence/documents/internal/documentMutationPersistence.js.map +1 -1
- package/data/persistence/documents/internal/orphanSideRows.js +2 -14
- package/data/persistence/documents/internal/orphanSideRows.js.map +1 -1
- package/data/persistence/documents/internal/syncQueuePersistence.js +3 -3
- package/data/persistence/documents/internal/syncQueuePersistence.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/documentHistoryPersistence.d.ts +9 -3
- package/data/sqlite/documentHistoryPersistence.js +31 -8
- package/data/sqlite/documentHistoryPersistence.js.map +1 -1
- package/data/sqlite/documentPendingUpdatePersistence.d.ts +58 -11
- package/data/sqlite/documentPendingUpdatePersistence.js +137 -63
- package/data/sqlite/documentPendingUpdatePersistence.js.map +1 -1
- package/data/sqlite/documentPersistence.d.ts +1 -1
- package/data/sqlite/documentPersistence.js +1 -1
- package/data/sqlite/documentPersistence.js.map +1 -1
- package/data/sqlite/documentPersistenceTypes.d.ts +2 -2
- package/data/sqlite/documentPersistenceTypes.js.map +1 -1
- package/data/sqlite/documentRecordPersistence.js +5 -4
- package/data/sqlite/documentRecordPersistence.js.map +1 -1
- package/data/sqlite/schema.d.ts +350 -443
- package/data/sqlite/schema.js +49 -47
- 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 +17 -19
- package/internal/api-client/ApiClient.js +10 -11
- package/internal/api-client/ApiClient.js.map +1 -1
- package/internal/api-client/binaryRequestOperationTransport.d.ts +18 -0
- package/internal/api-client/index.d.ts +2 -1
- package/internal/api-client/index.js +1 -1
- package/internal/api-client/index.js.map +1 -1
- package/internal/api-client/operationTransportFactory.d.ts +6 -0
- 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/blobs/get.d.ts +7 -0
- package/internal/api-client/routes/blobs/get.js.map +1 -1
- package/internal/api-client/routes/blobs/multipart.js +1 -11
- package/internal/api-client/routes/blobs/multipart.js.map +1 -1
- package/internal/api-client/routes/blobs/multipartUpload.d.ts +14 -0
- package/internal/api-client/routes/blobs/multipartUpload.js +94 -43
- package/internal/api-client/routes/blobs/multipartUpload.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/knownManifestsRefinements.js +5 -0
- package/internal/validators/knownManifestsRefinements.js.map +1 -0
- package/internal/validators/operation/attachments.d.ts +80 -160
- package/internal/validators/operation/auth.d.ts +760 -1664
- package/internal/validators/operation/blobDownloads.js +1 -1
- package/internal/validators/operation/blobDownloads.js.map +1 -1
- package/internal/validators/operation/containerMutations.d.ts +416 -856
- package/internal/validators/operation/documentMutations.d.ts +120 -264
- package/internal/validators/operation/documentSync.d.ts +40 -80
- package/internal/validators/operation/index.d.ts +1 -1
- package/internal/validators/operation/index.js +1 -1
- package/internal/validators/operation/index.js.map +1 -1
- package/internal/validators/operation/multipartBlobs.d.ts +70 -190
- package/internal/validators/operation/multipartBlobs.js +2 -24
- package/internal/validators/operation/multipartBlobs.js.map +1 -1
- package/internal/validators/operation/multipartPartUploads.d.ts +5 -5
- package/internal/validators/operation/multipartPartUploads.js +6 -20
- package/internal/validators/operation/multipartPartUploads.js.map +1 -1
- package/internal/validators/operation/organizations.d.ts +882 -1906
- package/internal/validators/operation/principals.d.ts +120 -240
- package/internal/validators/operation/registry.d.ts +1 -2
- package/internal/validators/operation/registry.js +1 -2
- package/internal/validators/operation/registry.js.map +1 -1
- 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/request/blob.d.ts +100 -201
- package/internal/validators/request/blob.js +6 -13
- package/internal/validators/request/blob.js.map +1 -1
- package/internal/validators/request/container.d.ts +136 -272
- package/internal/validators/request/container.js +16 -10
- package/internal/validators/request/container.js.map +1 -1
- package/internal/validators/request/containerManifestRef.d.ts +54 -0
- package/internal/validators/request/containerManifestRef.js +28 -0
- package/internal/validators/request/containerManifestRef.js.map +1 -0
- package/internal/validators/request/containerMetadata.d.ts +160 -368
- package/internal/validators/request/document.d.ts +100 -245
- package/internal/validators/request/document.js +1 -2
- package/internal/validators/request/document.js.map +1 -1
- package/internal/validators/request/documentSyncSchema.d.ts +42 -109
- package/internal/validators/request/documentSyncSchema.js +8 -25
- package/internal/validators/request/documentSyncSchema.js.map +1 -1
- package/internal/validators/request/index.d.ts +1 -1
- package/internal/validators/request/index.js +1 -1
- package/internal/validators/request/index.js.map +1 -1
- package/internal/validators/request/organization.d.ts +160 -320
- package/internal/validators/request/organizationProvisioning.d.ts +2424 -5312
- package/internal/validators/request/principal.d.ts +160 -320
- package/internal/validators/request/registration.d.ts +760 -1664
- package/internal/validators/response/blob.d.ts +48 -27
- package/internal/validators/response/blob.js +3 -10
- package/internal/validators/response/blob.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/index.d.ts +4 -3
- package/internal/validators/response/index.js +4 -3
- 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/blob.d.ts +7 -0
- package/internal/validators/util/blob.js +7 -0
- package/internal/validators/util/blob.js.map +1 -1
- package/internal/validators/util/blobTransferSchemas.d.ts +41 -0
- package/internal/validators/util/blobTransferSchemas.js +39 -0
- package/internal/validators/util/blobTransferSchemas.js.map +1 -0
- package/internal/validators/util/containerLimits.d.ts +7 -0
- package/internal/validators/util/containerLimits.js +7 -0
- package/internal/validators/util/containerLimits.js.map +1 -1
- package/internal/validators/util/index.d.ts +3 -2
- package/internal/validators/util/index.js +3 -2
- 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/blobs/multipartFirstParts.js +82 -0
- package/workflows/blobs/multipartFirstParts.js.map +1 -0
- package/workflows/blobs/multipartStageResolution.js +83 -0
- package/workflows/blobs/multipartStageResolution.js.map +1 -0
- package/workflows/blobs/multipartUpload.js +45 -89
- package/workflows/blobs/multipartUpload.js.map +1 -1
- package/workflows/container-contents/documentPriming.js +2 -1
- package/workflows/container-contents/documentPriming.js.map +1 -1
- package/workflows/container-contents/documentQueries/sql.js +4 -4
- package/workflows/container-contents/documentQueries/sql.js.map +1 -1
- package/workflows/container-contents/pendingWrites/deferredTails.js +6 -3
- package/workflows/container-contents/pendingWrites/deferredTails.js.map +1 -1
- package/workflows/container-contents/pendingWrites/sources.js +2 -1
- package/workflows/container-contents/pendingWrites/sources.js.map +1 -1
- package/workflows/container-contents/pendingWrites.js +2 -1
- package/workflows/container-contents/pendingWrites.js.map +1 -1
- package/workflows/containers/child/create.js +3 -3
- package/workflows/containers/child/create.js.map +1 -1
- package/workflows/containers/child/move.js +2 -2
- package/workflows/containers/child/move.js.map +1 -1
- package/workflows/containers/child/mutationRequestCore.js +5 -4
- package/workflows/containers/child/mutationRequestCore.js.map +1 -1
- package/workflows/containers/child/recitePlan.js +3 -2
- package/workflows/containers/child/recitePlan.js.map +1 -1
- package/workflows/containers/child/sharePlanCore.js +2 -2
- package/workflows/containers/child/sharePlanCore.js.map +1 -1
- package/workflows/containers/root/create.js +2 -2
- package/workflows/containers/root/create.js.map +1 -1
- package/workflows/registration/provisioningBootstrapBuilders.d.ts +20 -51
- package/workflows/sync/remoteReset.js +11 -9
- package/workflows/sync/remoteReset.js.map +1 -1
- package/workflows/sync/remoteResetPlans.js +6 -3
- package/workflows/sync/remoteResetPlans.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/operation/blobTransferSchemas.js +0 -11
- package/internal/validators/operation/blobTransferSchemas.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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projectionHistorySlots.js","sourceRoot":"","sources":["projectionHistorySlots.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAe9D,SAAS,aAAa,CAAC,MAAwC;IAC7D,MAAM,KAAK,GAAY,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC7D,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,oBAAoB,CAC3B,UAA6B;IAE7B,OAAO,YAAY,IAAI,UAAU,IAAI,kBAAkB,IAAI,UAAU,CAAC;AACxE,CAAC;AAED,SAAS,iBAAiB,CACxB,MAAgC;IAEhC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC9C,KAAK,MAAM,KAAK,IAAI,MAAM;QACxB,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK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,WAAW,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC;IACF,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,KAAkC,EAAE,EAAE;QAChE,KAAK,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE;YACtD,SAAS,CACP,GAAG,IAAI,QAAQ,KAAK,IAAI,GAAG,CAAC,WAAW,EAAE,EACzC,GAAG,CAAC,wBAAwB,CAC7B,CAAC;IACN,CAAC,CAAC;IACF,MAAM,QAAQ,GAAG,UAAU,CAAC,cAAc,CAAC;IAC3C,GAAG,CAAC,sBAAsB,EAAE,QAAQ,CAAC,oBAAoB,CAAC,CAAC;IAC3D,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC;QAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;SAChE,CAAC;QACJ,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,UAAU,CAAC,yBAAyB,CAAC,OAAO,EAAE;YACzE,IAAI,CAAC,QAAQ,KAAK,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC;QACpD,uEAAuE;QACvE,KAAK,MAAM,CACT,KAAK,EACL,MAAM,EACP,IAAI,UAAU,CAAC,8BAA8B,CAAC,OAAO,EAAE;YACtD,GAAG,CAAC,kCAAkC,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;QACzD,SAAS,CACP,kCAAkC,EAClC,UAAU,CAAC,gCAAgC,CAC5C,CAAC;QACF,SAAS,CACP,yBAAyB,EACzB,UAAU,CAAC,uBAAuB,EAClC,IAAI,CACL,CAAC;IACJ,CAAC;IACD,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import type {\n AccessManifestBundleWireResponse,\n ContainerKeyingPathResponse,\n ContainerWriterProjectionResponse,\n DocumentWriterProjectionResponse,\n} from \"@tearleads/validators/response\";\nimport { compareCanonicalStrings } from \"./canonicalOrdering\";\n\nexport type HistoryProjection =\n | ContainerWriterProjectionResponse\n | DocumentWriterProjectionResponse;\nexport interface ProjectionHistoryArray {\n readonly key: string;\n readonly values: unknown[];\n readonly restoreOrder?: (() => void) | undefined;\n readonly chains: readonly {\n readonly key: string;\n readonly values: unknown[];\n }[];\n}\n\nfunction manifestEpoch(bundle: AccessManifestBundleWireResponse): number {\n const epoch: unknown = Reflect.get(bundle.manifest, \"epoch\");\n return typeof epoch === \"number\" && Number.isFinite(epoch) ? epoch : 0;\n}\n\nfunction isDocumentProjection(\n projection: HistoryProjection,\n): projection is DocumentWriterProjectionResponse {\n return \"documentId\" in projection && \"documentManifest\" in projection;\n}\n\nfunction unambiguousArrays(\n arrays: ProjectionHistoryArray[],\n): ProjectionHistoryArray[] {\n const occurrences = new Map<string, number>();\n for (const array of arrays)\n occurrences.set(array.key, (occurrences.get(array.key) ?? 0) + 1);\n // Ambiguous locations cannot safely negotiate an omission. Deliver them full.\n return arrays.filter((array) => occurrences.get(array.key) === 1);\n}\n\nfunction manifestHistoryArray(\n key: string,\n values: AccessManifestBundleWireResponse[],\n newestFirst: boolean,\n): ProjectionHistoryArray {\n const groups = new Map<string, AccessManifestBundleWireResponse[]>();\n for (const value of values) {\n const chain = JSON.stringify([\n key,\n Reflect.get(value.manifest, \"organizationId\"),\n Reflect.get(value.manifest, \"objectKind\"),\n Reflect.get(value.manifest, \"objectId\"),\n ]);\n const entries = groups.get(chain) ?? [];\n entries.push(value);\n groups.set(chain, entries);\n }\n return {\n key,\n values,\n restoreOrder: newestFirst\n ? () => {\n values.sort((a, b) => manifestEpoch(b) - manifestEpoch(a));\n }\n : undefined,\n chains: [...groups].map(([chain, entries]) => ({\n key: chain,\n values: entries.sort(\n (a, b) =>\n manifestEpoch(a) - manifestEpoch(b) ||\n compareCanonicalStrings(a.manifestHash, b.manifestHash),\n ),\n })),\n };\n}\n\n/** Only these evidence arrays can be omitted. Current heads and keys always travel. */\nexport function projectionHistoryArrays(\n projection: HistoryProjection,\n): ProjectionHistoryArray[] {\n const arrays: ProjectionHistoryArray[] = [];\n const identity = isDocumentProjection(projection)\n ? [\n \"document\",\n Reflect.get(projection.documentManifest.manifest, \"organizationId\"),\n projection.documentId,\n ]\n : [\"container\", projection.organizationId, projection.containerId];\n const add = (name: string, values: unknown[]) => {\n const key = JSON.stringify([...identity, name]);\n arrays.push({ key, values, chains: [{ key, values }] });\n };\n const manifests = (\n name: string,\n values: AccessManifestBundleWireResponse[],\n newestFirst = false,\n ) => {\n const key = JSON.stringify([...identity, name]);\n arrays.push(manifestHistoryArray(key, values, newestFirst));\n };\n const path = (name: string, value: ContainerKeyingPathResponse) => {\n for (const [index, kek] of value.containerKeks.entries())\n manifests(\n `${name}:kek:${index}:${kek.containerId}`,\n kek.containerManifestHistory,\n );\n };\n const evidence = projection.policyEvidence;\n add(\"organizationPayloads\", evidence.organizationPayloads);\n if (!isDocumentProjection(projection)) path(\"container\", projection);\n else {\n for (const [index, value] of projection.authorizingContainerPaths.entries())\n path(`path:${index}:${value.containerId}`, value);\n // A dependency path is ordered root-to-leaf, not an unordered history.\n for (const [\n index,\n values,\n ] of projection.documentManifestContainerPaths.entries())\n add(`documentManifestContainerPaths:${index}`, values);\n manifests(\n \"documentContainerManifestHistory\",\n projection.documentContainerManifestHistory,\n );\n manifests(\n \"documentManifestHistory\",\n projection.documentManifestHistory,\n true,\n );\n }\n return unambiguousArrays(arrays);\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { registerJsonSchemaFragment } from "../jsonSchema.js";
|
|
3
|
-
function stringSchemaFragment(schema) {
|
|
4
|
-
const { $schema: _dialect, ...fragment } = z.toJSONSchema(schema);
|
|
5
|
-
return registerJsonSchemaFragment(z.custom((value) => schema.safeParse(value).success), fragment);
|
|
6
|
-
}
|
|
7
|
-
export const signedBlobUrlSchema = stringSchemaFragment(z.url().regex(/^https?:\/\//u));
|
|
8
|
-
export const signedBlobUrlExpirySchema = stringSchemaFragment(z.iso.datetime());
|
|
9
|
-
// R2 transport checksum; assembled SHA-256 remains the application authority.
|
|
10
|
-
export const blobPartContentMd5Schema = stringSchemaFragment(z.string().regex(/^[A-Za-z0-9+/]{21}[AQgw]==$/u));
|
|
11
|
-
//# sourceMappingURL=blobTransferSchemas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blobTransferSchemas.js","sourceRoot":"","sources":["blobTransferSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAE3D,SAAS,oBAAoB,CAAC,MAAyB;IACrD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;IAClE,OAAO,0BAA0B,CAC/B,CAAC,CAAC,MAAM,CAAS,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,EAC5D,QAAQ,CACT,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,oBAAoB,CACrD,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAC/B,CAAC;AACF,MAAM,CAAC,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEhF,8EAA8E;AAC9E,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAC1D,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CACjD,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { registerJsonSchemaFragment } from \"../jsonSchema\";\n\nfunction stringSchemaFragment(schema: z.ZodType<string>) {\n const { $schema: _dialect, ...fragment } = z.toJSONSchema(schema);\n return registerJsonSchemaFragment(\n z.custom<string>((value) => schema.safeParse(value).success),\n fragment,\n );\n}\n\nexport const signedBlobUrlSchema = stringSchemaFragment(\n z.url().regex(/^https?:\\/\\//u),\n);\nexport const signedBlobUrlExpirySchema = stringSchemaFragment(z.iso.datetime());\n\n// R2 transport checksum; assembled SHA-256 remains the application authority.\nexport const blobPartContentMd5Schema = stringSchemaFragment(\n z.string().regex(/^[A-Za-z0-9+/]{21}[AQgw]==$/u),\n);\n"]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const projectionHistoryHeaderRefinement = {
|
|
2
|
-
id: "request.projection-history-prefixes",
|
|
3
|
-
description: "x-projection-history must decode to at most 32 prefixes with unique keys, positive safe integer counts, and lowercase SHA-256 digests",
|
|
4
|
-
};
|
|
5
|
-
//# sourceMappingURL=projectionHistoryRefinements.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projectionHistoryRefinements.js","sourceRoot":"","sources":["projectionHistoryRefinements.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,EAAE,EAAE,qCAAqC;IACzC,WAAW,EACT,uIAAuI;CACjI,CAAC","sourcesContent":["export const projectionHistoryHeaderRefinement = {\n id: \"request.projection-history-prefixes\",\n description:\n \"x-projection-history must decode to at most 32 prefixes with unique keys, positive safe integer counts, and lowercase SHA-256 digests\",\n} as const;\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/** Request budgets restrict cache hints, never the history a reader can recover. */
|
|
3
|
-
export declare const PROJECTION_HISTORY_HINT_CHARACTERS = 4096;
|
|
4
|
-
declare const ProjectionHistoryPrefixSchema: z.ZodObject<{
|
|
5
|
-
key: z.ZodCustom<string, string>;
|
|
6
|
-
count: z.ZodCustom<number, number>;
|
|
7
|
-
digest: z.ZodCustom<string, string>;
|
|
8
|
-
}, z.core.$strict>;
|
|
9
|
-
export declare const ProjectionHistoryPrefixesSchema: z.ZodCustom<{
|
|
10
|
-
key: string;
|
|
11
|
-
count: number;
|
|
12
|
-
digest: string;
|
|
13
|
-
}[], {
|
|
14
|
-
key: string;
|
|
15
|
-
count: number;
|
|
16
|
-
digest: string;
|
|
17
|
-
}[]>;
|
|
18
|
-
export type ProjectionHistoryPrefix = z.infer<typeof ProjectionHistoryPrefixSchema>;
|
|
19
|
-
export declare function parseProjectionHistoryHints(value: string): ProjectionHistoryPrefix[] | null;
|
|
20
|
-
export declare const ProjectionHistoryHeadersSchema: z.ZodObject<{
|
|
21
|
-
"x-projection-history": z.ZodOptional<z.ZodString>;
|
|
22
|
-
}, z.core.$strip>;
|
|
23
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { registerJsonSchemaFragment, registerJsonSchemaRuntimeRefinements, } from "../jsonSchema.js";
|
|
3
|
-
import { projectionHistoryHeaderRefinement } from "../projectionHistoryRefinements.js";
|
|
4
|
-
import { arraySchema, boundedNonEmptyStringSchema, boundedPositiveIntegerSchema, sha256HexStringSchema, } from "../schema.js";
|
|
5
|
-
/** Request budgets restrict cache hints, never the history a reader can recover. */
|
|
6
|
-
export const PROJECTION_HISTORY_HINT_CHARACTERS = 4096;
|
|
7
|
-
const ProjectionHistoryPrefixSchema = z.strictObject({
|
|
8
|
-
key: boundedNonEmptyStringSchema(512),
|
|
9
|
-
count: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),
|
|
10
|
-
digest: sha256HexStringSchema,
|
|
11
|
-
});
|
|
12
|
-
export const ProjectionHistoryPrefixesSchema = arraySchema(ProjectionHistoryPrefixSchema, 32);
|
|
13
|
-
export function parseProjectionHistoryHints(value) {
|
|
14
|
-
try {
|
|
15
|
-
const parsed = ProjectionHistoryPrefixesSchema.safeParse(JSON.parse(decodeURIComponent(value)));
|
|
16
|
-
return parsed.success &&
|
|
17
|
-
new Set(parsed.data.map((item) => item.key)).size === parsed.data.length
|
|
18
|
-
? parsed.data
|
|
19
|
-
: null;
|
|
20
|
-
}
|
|
21
|
-
catch {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
const hintHeader = registerJsonSchemaFragment(z.string().max(PROJECTION_HISTORY_HINT_CHARACTERS), {
|
|
26
|
-
type: "string",
|
|
27
|
-
maxLength: PROJECTION_HISTORY_HINT_CHARACTERS,
|
|
28
|
-
description: "URI-encoded JSON array of exact device-verified history prefixes (key, count, digest); at most 32 unique keys",
|
|
29
|
-
});
|
|
30
|
-
export const ProjectionHistoryHeadersSchema = z.object({
|
|
31
|
-
"x-projection-history": registerJsonSchemaRuntimeRefinements(hintHeader.refine((value) => parseProjectionHistoryHints(value) !== null), [projectionHistoryHeaderRefinement]).optional(),
|
|
32
|
-
});
|
|
33
|
-
//# sourceMappingURL=projectionHistoryWire.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"projectionHistoryWire.js","sourceRoot":"","sources":["projectionHistoryWire.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,0BAA0B,EAC1B,oCAAoC,GACrC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EACL,WAAW,EACX,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,WAAW,CAAC;AAEnB,oFAAoF;AACpF,MAAM,CAAC,MAAM,kCAAkC,GAAG,IAAI,CAAC;AACvD,MAAM,6BAA6B,GAAG,CAAC,CAAC,YAAY,CAAC;IACnD,GAAG,EAAE,2BAA2B,CAAC,GAAG,CAAC;IACrC,KAAK,EAAE,4BAA4B,CAAC,MAAM,CAAC,gBAAgB,CAAC;IAC5D,MAAM,EAAE,qBAAqB;CAC9B,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,WAAW,CACxD,6BAA6B,EAC7B,EAAE,CACH,CAAC;AAKF,MAAM,UAAU,2BAA2B,CACzC,KAAa;IAEb,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,+BAA+B,CAAC,SAAS,CACtD,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CACtC,CAAC;QACF,OAAO,MAAM,CAAC,OAAO;YACnB,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,MAAM;YACxE,CAAC,CAAC,MAAM,CAAC,IAAI;YACb,CAAC,CAAC,IAAI,CAAC;IACX,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,GAAG,0BAA0B,CAC3C,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,kCAAkC,CAAC,EAClD;IACE,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,kCAAkC;IAC7C,WAAW,EACT,+GAA+G;CAClH,CACF,CAAC;AACF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,sBAAsB,EAAE,oCAAoC,CAC1D,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,EACzE,CAAC,iCAAiC,CAAC,CACpC,CAAC,QAAQ,EAAE;CACb,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n registerJsonSchemaFragment,\n registerJsonSchemaRuntimeRefinements,\n} from \"../jsonSchema\";\nimport { projectionHistoryHeaderRefinement } from \"../projectionHistoryRefinements\";\nimport {\n arraySchema,\n boundedNonEmptyStringSchema,\n boundedPositiveIntegerSchema,\n sha256HexStringSchema,\n} from \"../schema\";\n\n/** Request budgets restrict cache hints, never the history a reader can recover. */\nexport const PROJECTION_HISTORY_HINT_CHARACTERS = 4096;\nconst ProjectionHistoryPrefixSchema = z.strictObject({\n key: boundedNonEmptyStringSchema(512),\n count: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n digest: sha256HexStringSchema,\n});\nexport const ProjectionHistoryPrefixesSchema = arraySchema(\n ProjectionHistoryPrefixSchema,\n 32,\n);\nexport type ProjectionHistoryPrefix = z.infer<\n typeof ProjectionHistoryPrefixSchema\n>;\n\nexport function parseProjectionHistoryHints(\n value: string,\n): ProjectionHistoryPrefix[] | null {\n try {\n const parsed = ProjectionHistoryPrefixesSchema.safeParse(\n JSON.parse(decodeURIComponent(value)),\n );\n return parsed.success &&\n new Set(parsed.data.map((item) => item.key)).size === parsed.data.length\n ? parsed.data\n : null;\n } catch {\n return null;\n }\n}\n\nconst hintHeader = registerJsonSchemaFragment(\n z.string().max(PROJECTION_HISTORY_HINT_CHARACTERS),\n {\n type: \"string\",\n maxLength: PROJECTION_HISTORY_HINT_CHARACTERS,\n description:\n \"URI-encoded JSON array of exact device-verified history prefixes (key, count, digest); at most 32 unique keys\",\n },\n);\nexport const ProjectionHistoryHeadersSchema = z.object({\n \"x-projection-history\": registerJsonSchemaRuntimeRefinements(\n hintHeader.refine((value) => parseProjectionHistoryHints(value) !== null),\n [projectionHistoryHeaderRefinement],\n ).optional(),\n});\n"]}
|