@tearleads/client-sdk 0.1.32 → 0.1.33
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/internal/api-client/ApiClient.js +3 -27
- package/internal/api-client/ApiClient.js.map +1 -1
- package/internal/api-client/routes/blobs/multipartUpload.js +139 -0
- package/internal/api-client/routes/blobs/multipartUpload.js.map +1 -0
- package/internal/api-client/types.d.ts +1 -1
- package/internal/api-client/types.js.map +1 -1
- package/internal/validators/operation/blobDownloads.js +3 -9
- package/internal/validators/operation/blobDownloads.js.map +1 -1
- package/internal/validators/operation/blobTransferSchemas.js +11 -0
- package/internal/validators/operation/blobTransferSchemas.js.map +1 -0
- package/internal/validators/operation/index.d.ts +1 -0
- package/internal/validators/operation/index.js +1 -0
- package/internal/validators/operation/index.js.map +1 -1
- package/internal/validators/operation/multipartPartUploads.d.ts +179 -0
- package/internal/validators/operation/multipartPartUploads.js +47 -0
- package/internal/validators/operation/multipartPartUploads.js.map +1 -0
- package/internal/validators/operation/registry.d.ts +2 -0
- package/internal/validators/operation/registry.js +2 -0
- package/internal/validators/operation/registry.js.map +1 -1
- package/internal/validators/util/blob.d.ts +2 -4
- package/internal/validators/util/blob.js +2 -4
- package/internal/validators/util/blob.js.map +1 -1
- package/package.json +1 -1
- package/workflows/blobs/multipartStageFailures.js +1 -1
- package/workflows/blobs/multipartStageFailures.js.map +1 -1
- package/workflows/blobs/multipartUpload.js +15 -12
- package/workflows/blobs/multipartUpload.js.map +1 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { md5 } from "@noble/hashes/legacy.js";
|
|
2
|
+
import { bytesToHex } from "../../../crypto/index.js";
|
|
3
|
+
import { authorizeMultipartBlobPartUploadOperation, blobWireHeaderKeys, operationRequestPath, uploadMultipartBlobPartBytesOperation, } from "../../../validators/operation/index.js";
|
|
4
|
+
import { MAX_MULTIPART_BLOB_PART_BYTES } from "../../../validators/util/index.js";
|
|
5
|
+
function invalidPart(transport, path) {
|
|
6
|
+
transport.reportFailure({
|
|
7
|
+
kind: "shape",
|
|
8
|
+
method: authorizeMultipartBlobPartUploadOperation.method,
|
|
9
|
+
path,
|
|
10
|
+
status: null,
|
|
11
|
+
statusText: "",
|
|
12
|
+
message: "Multipart part bytes do not match the declared length or SHA-256",
|
|
13
|
+
});
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
async function retryStorageStatus(status, attempt) {
|
|
17
|
+
if (status === 403)
|
|
18
|
+
return true;
|
|
19
|
+
const transient = status === 429 || (status >= 500 && status <= 599);
|
|
20
|
+
if (transient && attempt === 0) {
|
|
21
|
+
await new Promise((resolve) => setTimeout(resolve, 250));
|
|
22
|
+
}
|
|
23
|
+
return transient;
|
|
24
|
+
}
|
|
25
|
+
async function preparePart(input) {
|
|
26
|
+
// File snapshots mutable buffers and preserves ciphertext across Capacitor's
|
|
27
|
+
// native HTTP bridge. Uint8Array is UTF-8 decoded there; a plain Blob becomes
|
|
28
|
+
// JSON. File's base64 bridge path is byte-for-byte, including non-UTF-8 data.
|
|
29
|
+
const file = input.encryptedBytes instanceof File
|
|
30
|
+
? input.encryptedBytes
|
|
31
|
+
: new File([input.encryptedBytes], "encrypted-blob-part", {
|
|
32
|
+
type: "application/octet-stream",
|
|
33
|
+
});
|
|
34
|
+
if (file.size !== input.byteLength ||
|
|
35
|
+
file.size < 1 ||
|
|
36
|
+
file.size > MAX_MULTIPART_BLOB_PART_BYTES) {
|
|
37
|
+
throw new TypeError("Invalid multipart part byte length");
|
|
38
|
+
}
|
|
39
|
+
const bytes = await file.arrayBuffer();
|
|
40
|
+
if (bytesToHex(new Uint8Array(await crypto.subtle.digest("SHA-256", bytes))) !==
|
|
41
|
+
input.sha256) {
|
|
42
|
+
throw new TypeError("Multipart part SHA-256 does not match its bytes");
|
|
43
|
+
}
|
|
44
|
+
const contentMd5 = btoa(String.fromCharCode(...md5(new Uint8Array(bytes))));
|
|
45
|
+
return { file, contentMd5 };
|
|
46
|
+
}
|
|
47
|
+
export async function uploadMultipartBlobPartBytes(transport, stageId, partNumber, input, uploadFetch = (url, init) => fetch(url, init)) {
|
|
48
|
+
const operation = authorizeMultipartBlobPartUploadOperation;
|
|
49
|
+
const params = { stageId, partNumber };
|
|
50
|
+
const path = operationRequestPath(operation, params);
|
|
51
|
+
const prepared = await preparePart(input).catch(() => invalidPart(transport, path));
|
|
52
|
+
if (!prepared)
|
|
53
|
+
return null;
|
|
54
|
+
const { file, contentMd5 } = prepared;
|
|
55
|
+
const body = {
|
|
56
|
+
byteLength: input.byteLength,
|
|
57
|
+
contentMd5,
|
|
58
|
+
uploadId: input.uploadId,
|
|
59
|
+
};
|
|
60
|
+
let status = null;
|
|
61
|
+
// Sign just in time for each part, not once for the entire file. A network
|
|
62
|
+
// failure may be an expired URL hidden by R2 CORS, or a lost success response;
|
|
63
|
+
// reauthorize once and send the same immutable bytes to the same part number.
|
|
64
|
+
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
65
|
+
const result = await transport.requestResult(operation, { params, body });
|
|
66
|
+
if (!result.ok)
|
|
67
|
+
return null;
|
|
68
|
+
const descriptor = result.data;
|
|
69
|
+
if (descriptor.stageId !== stageId ||
|
|
70
|
+
descriptor.uploadId !== input.uploadId ||
|
|
71
|
+
descriptor.partNumber !== partNumber ||
|
|
72
|
+
descriptor.byteLength !== input.byteLength ||
|
|
73
|
+
descriptor.contentMd5 !== contentMd5) {
|
|
74
|
+
transport.reportFailure({
|
|
75
|
+
kind: "shape",
|
|
76
|
+
method: operation.method,
|
|
77
|
+
path,
|
|
78
|
+
status: 200,
|
|
79
|
+
statusText: "",
|
|
80
|
+
message: "Multipart upload descriptor does not match its part",
|
|
81
|
+
});
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
if (descriptor.source.kind === "api") {
|
|
85
|
+
// A capability path for memory/custom stores; S3/R2 never proxy parts.
|
|
86
|
+
return transport.requestBinaryRequest(uploadMultipartBlobPartBytesOperation, {
|
|
87
|
+
params,
|
|
88
|
+
body: input.encryptedBytes,
|
|
89
|
+
headers: {
|
|
90
|
+
[blobWireHeaderKeys.partByteLength]: input.byteLength.toString(),
|
|
91
|
+
[blobWireHeaderKeys.partSha256]: input.sha256,
|
|
92
|
+
[blobWireHeaderKeys.partUploadId]: input.uploadId,
|
|
93
|
+
},
|
|
94
|
+
}, { encodeBody: () => file });
|
|
95
|
+
}
|
|
96
|
+
try {
|
|
97
|
+
const response = await uploadFetch(descriptor.source.url, {
|
|
98
|
+
method: "PUT",
|
|
99
|
+
body: file,
|
|
100
|
+
headers: {
|
|
101
|
+
"Content-Type": "application/octet-stream",
|
|
102
|
+
"Content-MD5": contentMd5,
|
|
103
|
+
},
|
|
104
|
+
cache: "no-store",
|
|
105
|
+
credentials: "omit",
|
|
106
|
+
redirect: "error",
|
|
107
|
+
referrerPolicy: "no-referrer",
|
|
108
|
+
});
|
|
109
|
+
status = response.status;
|
|
110
|
+
const etag = response.headers.get("ETag")?.trim();
|
|
111
|
+
await response.body?.cancel().catch(() => { });
|
|
112
|
+
if (status === 200 && etag) {
|
|
113
|
+
return {
|
|
114
|
+
stageId,
|
|
115
|
+
uploadId: input.uploadId,
|
|
116
|
+
part: { byteLength: input.byteLength, partNumber, etag },
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
if (!(await retryStorageStatus(status, attempt)))
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
// Never expose a provider exception or body: it may contain the bearer URL.
|
|
124
|
+
status = null;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
transport.reportFailure({
|
|
128
|
+
kind: "storage",
|
|
129
|
+
method: operation.method,
|
|
130
|
+
path,
|
|
131
|
+
status,
|
|
132
|
+
statusText: "",
|
|
133
|
+
message: status === 200
|
|
134
|
+
? `Multipart part ${partNumber} storage response is missing ETag; check storage CORS exposure`
|
|
135
|
+
: `Multipart part ${partNumber} storage upload failed${status === null ? "" : ` (HTTP ${status})`}`,
|
|
136
|
+
});
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=multipartUpload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multipartUpload.js","sourceRoot":"","sources":["multipartUpload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,yCAAyC,EACzC,kBAAkB,EAClB,oBAAoB,EACpB,qCAAqC,GACtC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAM3E,SAAS,WAAW,CAAC,SAA6B,EAAE,IAAY;IAC9D,SAAS,CAAC,aAAa,CAAC;QACtB,IAAI,EAAE,OAAO;QACb,MAAM,EAAE,yCAAyC,CAAC,MAAM;QACxD,IAAI;QACJ,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,kEAAkE;KAC5E,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,kBAAkB,CAAC,MAAc,EAAE,OAAe;IAC/D,IAAI,MAAM,KAAK,GAAG;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,SAAS,GAAG,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,MAAM,IAAI,GAAG,CAAC,CAAC;IACrE,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;QAC/B,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,KAAK,UAAU,WAAW,CAAC,KAA0C;IACnE,6EAA6E;IAC7E,8EAA8E;IAC9E,8EAA8E;IAC9E,MAAM,IA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AU,EAAE,KAAK,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE;iBACzD,CAAC;YACJ,CAAC;YACD,IAAI,CAAC,CAAC,MAAM,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAAE,MAAM;QAC1D,CAAC;QAAC,MAAM,CAAC;YACP,4EAA4E;YAC5E,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;IACH,CAAC;IACD,SAAS,CAAC,aAAa,CAAC;QACtB,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,IAAI;QACJ,MAAM;QACN,UAAU,EAAE,EAAE;QACd,OAAO,EACL,MAAM,KAAK,GAAG;YACZ,CAAC,CAAC,kBAAkB,UAAU,gEAAgE;YAC9F,CAAC,CAAC,kBAAkB,UAAU,yBAAyB,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,MAAM,GAAG,EAAE;KACxG,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { md5 } from \"@noble/hashes/legacy.js\";\nimport { bytesToHex } from \"@tearleads/crypto\";\nimport {\n authorizeMultipartBlobPartUploadOperation,\n blobWireHeaderKeys,\n operationRequestPath,\n uploadMultipartBlobPartBytesOperation,\n} from \"@tearleads/validators/operation\";\nimport type { UploadMultipartBlobPartResponse } from \"@tearleads/validators/response\";\nimport { MAX_MULTIPART_BLOB_PART_BYTES } from \"@tearleads/validators/util\";\nimport type { OperationTransport } from \"../../operationTransportFactory\";\nimport type { UploadMultipartBlobPartBytesRequest } from \"./get\";\n\ntype UploadFetch = (url: string, init: RequestInit) => Promise<Response>;\n\nfunction invalidPart(transport: OperationTransport, path: string) {\n transport.reportFailure({\n kind: \"shape\",\n method: authorizeMultipartBlobPartUploadOperation.method,\n path,\n status: null,\n statusText: \"\",\n message: \"Multipart part bytes do not match the declared length or SHA-256\",\n });\n return null;\n}\n\nasync function retryStorageStatus(status: number, attempt: number) {\n if (status === 403) return true;\n const transient = status === 429 || (status >= 500 && status <= 599);\n if (transient && attempt === 0) {\n await new Promise<void>((resolve) => setTimeout(resolve, 250));\n }\n return transient;\n}\n\nasync function preparePart(input: UploadMultipartBlobPartBytesRequest) {\n // File snapshots mutable buffers and preserves ciphertext across Capacitor's\n // native HTTP bridge. Uint8Array is UTF-8 decoded there; a plain Blob becomes\n // JSON. File's base64 bridge path is byte-for-byte, including non-UTF-8 data.\n const file =\n input.encryptedBytes instanceof File\n ? input.encryptedBytes\n : new File([input.encryptedBytes], \"encrypted-blob-part\", {\n type: \"application/octet-stream\",\n });\n if (\n file.size !== input.byteLength ||\n file.size < 1 ||\n file.size > MAX_MULTIPART_BLOB_PART_BYTES\n ) {\n throw new TypeError(\"Invalid multipart part byte length\");\n }\n const bytes = await file.arrayBuffer();\n if (\n bytesToHex(new Uint8Array(await crypto.subtle.digest(\"SHA-256\", bytes))) !==\n input.sha256\n ) {\n throw new TypeError(\"Multipart part SHA-256 does not match its bytes\");\n }\n const contentMd5 = btoa(String.fromCharCode(...md5(new Uint8Array(bytes))));\n return { file, contentMd5 };\n}\n\nexport async function uploadMultipartBlobPartBytes(\n transport: OperationTransport,\n stageId: string,\n partNumber: number,\n input: UploadMultipartBlobPartBytesRequest,\n uploadFetch: UploadFetch = (url, init) => fetch(url, init),\n): Promise<UploadMultipartBlobPartResponse | null> {\n const operation = authorizeMultipartBlobPartUploadOperation;\n const params = { stageId, partNumber };\n const path = operationRequestPath(operation, params);\n const prepared = await preparePart(input).catch(() =>\n invalidPart(transport, path),\n );\n if (!prepared) return null;\n const { file, contentMd5 } = prepared;\n const body = {\n byteLength: input.byteLength,\n contentMd5,\n uploadId: input.uploadId,\n };\n let status: number | null = null;\n // Sign just in time for each part, not once for the entire file. A network\n // failure may be an expired URL hidden by R2 CORS, or a lost success response;\n // reauthorize once and send the same immutable bytes to the same part number.\n for (let attempt = 0; attempt < 2; attempt += 1) {\n const result = await transport.requestResult(operation, { params, body });\n if (!result.ok) return null;\n const descriptor = result.data;\n if (\n descriptor.stageId !== stageId ||\n descriptor.uploadId !== input.uploadId ||\n descriptor.partNumber !== partNumber ||\n descriptor.byteLength !== input.byteLength ||\n descriptor.contentMd5 !== contentMd5\n ) {\n transport.reportFailure({\n kind: \"shape\",\n method: operation.method,\n path,\n status: 200,\n statusText: \"\",\n message: \"Multipart upload descriptor does not match its part\",\n });\n return null;\n }\n if (descriptor.source.kind === \"api\") {\n // A capability path for memory/custom stores; S3/R2 never proxy parts.\n return transport.requestBinaryRequest(\n uploadMultipartBlobPartBytesOperation,\n {\n params,\n body: input.encryptedBytes,\n headers: {\n [blobWireHeaderKeys.partByteLength]: input.byteLength.toString(),\n [blobWireHeaderKeys.partSha256]: input.sha256,\n [blobWireHeaderKeys.partUploadId]: input.uploadId,\n },\n },\n { encodeBody: () => file },\n );\n }\n try {\n const response = await uploadFetch(descriptor.source.url, {\n method: \"PUT\",\n body: file,\n headers: {\n \"Content-Type\": \"application/octet-stream\",\n \"Content-MD5\": contentMd5,\n },\n cache: \"no-store\",\n credentials: \"omit\",\n redirect: \"error\",\n referrerPolicy: \"no-referrer\",\n });\n status = response.status;\n const etag = response.headers.get(\"ETag\")?.trim();\n await response.body?.cancel().catch(() => {});\n if (status === 200 && etag) {\n return {\n stageId,\n uploadId: input.uploadId,\n part: { byteLength: input.byteLength, partNumber, etag },\n };\n }\n if (!(await retryStorageStatus(status, attempt))) break;\n } catch {\n // Never expose a provider exception or body: it may contain the bearer URL.\n status = null;\n }\n }\n transport.reportFailure({\n kind: \"storage\",\n method: operation.method,\n path,\n status,\n statusText: \"\",\n message:\n status === 200\n ? `Multipart part ${partNumber} storage response is missing ETag; check storage CORS exposure`\n : `Multipart part ${partNumber} storage upload failed${status === null ? \"\" : ` (HTTP ${status})`}`,\n });\n return null;\n}\n"]}
|
|
@@ -21,7 +21,7 @@ export interface RequestResultOptions {
|
|
|
21
21
|
}
|
|
22
22
|
export type OperationRequestFn = <T>(path: string, validator: (value: unknown) => value is T, method: HttpMethod, body: RequestBody | undefined, options: RequestResultOptions | undefined, failureOperation: HttpOperation) => Promise<T | null>;
|
|
23
23
|
export type OperationRequestResultFn = <T>(path: string, validator: (value: unknown) => value is T, method: HttpMethod, body: RequestBody | undefined, options: RequestResultOptions | undefined, failureOperation: HttpOperation) => Promise<RequestResult<T>>;
|
|
24
|
-
export type RequestFailureKind = "http" | "network" | "json" | "shape" | "cancelled" | "outcome-unknown";
|
|
24
|
+
export type RequestFailureKind = "storage" | "http" | "network" | "json" | "shape" | "cancelled" | "outcome-unknown";
|
|
25
25
|
export interface RequestFailure {
|
|
26
26
|
readonly code?: string | undefined;
|
|
27
27
|
readonly kind: RequestFailureKind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DocumentAttributionRangesQuery,\n HttpOperation,\n HttpOperationMethod,\n} from \"@tearleads/validators/operation\";\nimport type {\n ReferencedPrincipalStateResponse,\n SyncWatermark,\n} from \"@tearleads/validators/response\";\n\nexport type HttpMethod = HttpOperationMethod;\nexport type RequestBody = BodyInit;\n\nexport interface ListContainerDocumentsOptions {\n limit?: number;\n watermark?: SyncWatermark | null;\n}\n\nexport type ListDocumentEditAttributionRangesOptions = Omit<\n DocumentAttributionRangesQuery,\n \"cursor\"\n> & {\n cursor?: DocumentAttributionRangesQuery[\"cursor\"] | null;\n};\n\nexport interface RequestResultOptions {\n readonly signal?: AbortSignal | undefined;\n /** Expected target for a declared 402; mismatched response identities fail closed. */\n readonly expectedPaymentRequiredOrganizationId?: string | undefined;\n readonly headers?: Record<string, string> | undefined;\n readonly reportErrors?: boolean | undefined;\n /** Called after this request or a concurrent request renews the same session. */\n readonly onSessionRenewed?: (() => void) | undefined;\n readonly retryOnSessionExpired?: boolean | \"renew-only\" | undefined;\n}\n\nexport type OperationRequestFn = <T>(\n path: string,\n validator: (value: unknown) => value is T,\n method: HttpMethod,\n body: RequestBody | undefined,\n options: RequestResultOptions | undefined,\n failureOperation: HttpOperation,\n) => Promise<T | null>;\n\nexport type OperationRequestResultFn = <T>(\n path: string,\n validator: (value: unknown) => value is T,\n method: HttpMethod,\n body: RequestBody | undefined,\n options: RequestResultOptions | undefined,\n failureOperation: HttpOperation,\n) => Promise<RequestResult<T>>;\n\nexport type RequestFailureKind =\n | \"http\"\n | \"network\"\n | \"json\"\n | \"shape\"\n | \"cancelled\"\n | \"outcome-unknown\";\n\nexport interface RequestFailure {\n readonly code?: string | undefined;\n readonly kind: RequestFailureKind;\n readonly message: string;\n readonly method: HttpMethod;\n readonly ok: false;\n readonly path: string;\n readonly report: () => void;\n readonly status: number | null;\n readonly statusText: string;\n readonly stalePrincipalHeads?: ReferencedPrincipalStateResponse[] | undefined;\n /**\n * With `container_descendant_rekeys_required`, the full owed set, parent-first;\n * with `container_descendant_rekeys_inaccessible`, its unwritable subset.\n * A hint, never authority; verify each container before signing for it.\n */\n readonly requiredContainerIds?: readonly string[] | undefined;\n}\n\nexport interface RequestSuccess<T> {\n readonly data: T;\n readonly ok: true;\n}\n\nexport type RequestResult<T> = RequestFailure | RequestSuccess<T>;\n\nexport interface ResponseRequestValidationFailureInput {\n readonly code?: string | undefined;\n readonly kind: RequestFailureKind;\n readonly message: string;\n readonly method: HttpMethod;\n readonly options?: RequestResultOptions | undefined;\n readonly path: string;\n readonly status: number | null;\n readonly statusText: string;\n}\n\nexport interface OperationResponseRequestFn {\n (\n path: string,\n method: HttpMethod,\n body: RequestBody | undefined,\n options: RequestResultOptions | undefined,\n additionalSuccessStatuses: readonly number[],\n failureOperation: HttpOperation,\n ): Promise<RequestResult<Response>>;\n readonly reportFailure: (\n input: ResponseRequestValidationFailureInput,\n ) => RequestFailure;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n DocumentAttributionRangesQuery,\n HttpOperation,\n HttpOperationMethod,\n} from \"@tearleads/validators/operation\";\nimport type {\n ReferencedPrincipalStateResponse,\n SyncWatermark,\n} from \"@tearleads/validators/response\";\n\nexport type HttpMethod = HttpOperationMethod;\nexport type RequestBody = BodyInit;\n\nexport interface ListContainerDocumentsOptions {\n limit?: number;\n watermark?: SyncWatermark | null;\n}\n\nexport type ListDocumentEditAttributionRangesOptions = Omit<\n DocumentAttributionRangesQuery,\n \"cursor\"\n> & {\n cursor?: DocumentAttributionRangesQuery[\"cursor\"] | null;\n};\n\nexport interface RequestResultOptions {\n readonly signal?: AbortSignal | undefined;\n /** Expected target for a declared 402; mismatched response identities fail closed. */\n readonly expectedPaymentRequiredOrganizationId?: string | undefined;\n readonly headers?: Record<string, string> | undefined;\n readonly reportErrors?: boolean | undefined;\n /** Called after this request or a concurrent request renews the same session. */\n readonly onSessionRenewed?: (() => void) | undefined;\n readonly retryOnSessionExpired?: boolean | \"renew-only\" | undefined;\n}\n\nexport type OperationRequestFn = <T>(\n path: string,\n validator: (value: unknown) => value is T,\n method: HttpMethod,\n body: RequestBody | undefined,\n options: RequestResultOptions | undefined,\n failureOperation: HttpOperation,\n) => Promise<T | null>;\n\nexport type OperationRequestResultFn = <T>(\n path: string,\n validator: (value: unknown) => value is T,\n method: HttpMethod,\n body: RequestBody | undefined,\n options: RequestResultOptions | undefined,\n failureOperation: HttpOperation,\n) => Promise<RequestResult<T>>;\n\nexport type RequestFailureKind =\n | \"storage\"\n | \"http\"\n | \"network\"\n | \"json\"\n | \"shape\"\n | \"cancelled\"\n | \"outcome-unknown\";\n\nexport interface RequestFailure {\n readonly code?: string | undefined;\n readonly kind: RequestFailureKind;\n readonly message: string;\n readonly method: HttpMethod;\n readonly ok: false;\n readonly path: string;\n readonly report: () => void;\n readonly status: number | null;\n readonly statusText: string;\n readonly stalePrincipalHeads?: ReferencedPrincipalStateResponse[] | undefined;\n /**\n * With `container_descendant_rekeys_required`, the full owed set, parent-first;\n * with `container_descendant_rekeys_inaccessible`, its unwritable subset.\n * A hint, never authority; verify each container before signing for it.\n */\n readonly requiredContainerIds?: readonly string[] | undefined;\n}\n\nexport interface RequestSuccess<T> {\n readonly data: T;\n readonly ok: true;\n}\n\nexport type RequestResult<T> = RequestFailure | RequestSuccess<T>;\n\nexport interface ResponseRequestValidationFailureInput {\n readonly code?: string | undefined;\n readonly kind: RequestFailureKind;\n readonly message: string;\n readonly method: HttpMethod;\n readonly options?: RequestResultOptions | undefined;\n readonly path: string;\n readonly status: number | null;\n readonly statusText: string;\n}\n\nexport interface OperationResponseRequestFn {\n (\n path: string,\n method: HttpMethod,\n body: RequestBody | undefined,\n options: RequestResultOptions | undefined,\n additionalSuccessStatuses: readonly number[],\n failureOperation: HttpOperation,\n ): Promise<RequestResult<Response>>;\n readonly reportFailure: (\n input: ResponseRequestValidationFailureInput,\n ) => RequestFailure;\n}\n"]}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { registerJsonSchemaFragment } from "../jsonSchema.js";
|
|
3
2
|
import { ErrorResponseSchema, SessionFailureResponseSchema } from "../response/index.js";
|
|
4
3
|
import { safeNonNegativeIntegerSchema, sha256HexStringSchema, uuidStringSchema, } from "../schema.js";
|
|
5
4
|
import { BlobBytesPathParamsSchema } from "./blobBytes.js";
|
|
5
|
+
import { signedBlobUrlExpirySchema, signedBlobUrlSchema, } from "./blobTransferSchemas.js";
|
|
6
6
|
import { defineJsonOperation } from "./definition.js";
|
|
7
|
-
const downloadUrlSchema = z.url().regex(/^https?:\/\//u);
|
|
8
|
-
const downloadExpirySchema = z.iso.datetime();
|
|
9
|
-
function stringSchemaFragment(schema) {
|
|
10
|
-
const { $schema: _dialect, ...fragment } = z.toJSONSchema(schema);
|
|
11
|
-
return registerJsonSchemaFragment(z.custom((value) => schema.safeParse(value).success), fragment);
|
|
12
|
-
}
|
|
13
7
|
export const BlobDownloadResponseSchema = z.strictObject({
|
|
14
8
|
blobId: uuidStringSchema,
|
|
15
9
|
byteLength: safeNonNegativeIntegerSchema,
|
|
@@ -18,8 +12,8 @@ export const BlobDownloadResponseSchema = z.strictObject({
|
|
|
18
12
|
z.strictObject({ kind: z.literal("api") }),
|
|
19
13
|
z.strictObject({
|
|
20
14
|
kind: z.literal("signed-url"),
|
|
21
|
-
url:
|
|
22
|
-
expiresAt:
|
|
15
|
+
url: signedBlobUrlSchema,
|
|
16
|
+
expiresAt: signedBlobUrlExpirySchema,
|
|
23
17
|
}),
|
|
24
18
|
]),
|
|
25
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blobDownloads.js","sourceRoot":"","sources":["blobDownloads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"blobDownloads.js","sourceRoot":"","sources":["blobDownloads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,4BAA4B,EAC5B,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,YAAY,CAAC;IACvD,MAAM,EAAE,gBAAgB;IACxB,UAAU,EAAE,4BAA4B;IACxC,MAAM,EAAE,qBAAqB;IAC7B,MAAM,EAAE,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;QACnC,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1C,CAAC,CAAC,YAAY,CAAC;YACb,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;YAC7B,GAAG,EAAE,mBAAmB;YACxB,SAAS,EAAE,yBAAyB;SACrC,CAAC;KACH,CAAC;CACH,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;IAC1D,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE;QAChB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;KACzB;IACD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC/C,EAAE,EAAE,oBAAoB;IACxB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,yBAAyB;IACjC,IAAI,EAAE,0BAA0B;IAChC,SAAS,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAE;CAC/C,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { ErrorResponseSchema, SessionFailureResponseSchema } from \"../response\";\nimport {\n safeNonNegativeIntegerSchema,\n sha256HexStringSchema,\n uuidStringSchema,\n} from \"../schema\";\nimport { BlobBytesPathParamsSchema } from \"./blobBytes\";\nimport {\n signedBlobUrlExpirySchema,\n signedBlobUrlSchema,\n} from \"./blobTransferSchemas\";\nimport { defineJsonOperation } from \"./definition\";\n\nexport const BlobDownloadResponseSchema = z.strictObject({\n blobId: uuidStringSchema,\n byteLength: safeNonNegativeIntegerSchema,\n sha256: sha256HexStringSchema,\n source: z.discriminatedUnion(\"kind\", [\n z.strictObject({ kind: z.literal(\"api\") }),\n z.strictObject({\n kind: z.literal(\"signed-url\"),\n url: signedBlobUrlSchema,\n expiresAt: signedBlobUrlExpirySchema,\n }),\n ]),\n});\n\nexport type BlobDownloadResponse = z.infer<typeof BlobDownloadResponseSchema>;\n\nexport const getBlobDownloadOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 403: ErrorResponseSchema,\n 404: ErrorResponseSchema,\n 409: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 403, 404, 409, 500],\n id: \"blobs.download.get\",\n method: \"GET\",\n params: BlobBytesPathParamsSchema,\n path: \"/blobs/{blobId}/download\",\n responses: { 200: BlobDownloadResponseSchema },\n});\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -14,6 +14,7 @@ export { type DocumentSyncPathParams, DocumentSyncPathParamsSchema, documentSync
|
|
|
14
14
|
export { operationRequestHeaderNames, operationResponseHeaderNames, } from "./headerNames.js";
|
|
15
15
|
export { getHealthOperation, isGetHealthOperationResponse, } from "./health.js";
|
|
16
16
|
export { completeMultipartBlobStageOperation, getMultipartBlobStageOperation, initiateMultipartBlobStageOperation, isCompleteMultipartBlobStageOperationRequest, isCompleteMultipartBlobStageOperationResponse, isGetMultipartBlobStageOperationResponse, isInitiateMultipartBlobStageOperationRequest, isInitiateMultipartBlobStageOperationResponse, type MultipartBlobStagePathParams, MultipartBlobStagePathParamsSchema, } from "./multipartBlobs.js";
|
|
17
|
+
export { authorizeMultipartBlobPartUploadOperation, type MultipartBlobPartUploadRequest, MultipartBlobPartUploadRequestSchema, type MultipartBlobPartUploadResponse, MultipartBlobPartUploadResponseSchema, } from "./multipartPartUploads.js";
|
|
17
18
|
export { claimNativeOrganizationSubscriptionOperation, getOrganizationBillingHistoryOperation, getOrganizationBillingManagementUrlOperation, getOrganizationBillingOperation, getOrganizationNativePurchaseEligibilityOperation, isClaimNativeOrganizationSubscriptionOperationResponse, isGetOrganizationBillingHistoryOperationResponse, isGetOrganizationBillingManagementUrlOperationResponse, isGetOrganizationBillingOperationResponse, isGetOrganizationNativePurchaseEligibilityOperationResponse, isStartOrganizationTrialOperationResponse, type OrganizationBillingNativeClaimPathParams, OrganizationBillingNativeClaimPathParamsSchema, type OrganizationBillingNativeEligibilityQuery, OrganizationBillingNativeEligibilityQuerySchema, type OrganizationBillingPathParams, OrganizationBillingPathParamsSchema, startOrganizationTrialOperation, } from "./organizationBilling.js";
|
|
18
19
|
export { getOrganizationPolicyHistoryOperation } from "./organizationPolicyHistory.js";
|
|
19
20
|
export { createOrganizationGroupOperation, createOrganizationOperation, deleteOrganizationGroupOperation, getOrganizationDataUsageOperation, getOrganizationReadModelOperation, isCreateOrganizationGroupOperationRequest, isCreateOrganizationGroupOperationResponse, isCreateOrganizationOperationRequest, isCreateOrganizationOperationResponse, isDeleteOrganizationGroupOperationResponse, isGetOrganizationDataUsageOperationResponse, isGetOrganizationReadModelOperationResponse, isListOrganizationGroupMembersOperationResponse, isUpdateOrganizationProfileOperationRequest, isUpdateOrganizationProfileOperationResponse, isUpdateOrganizationRosterEntryOperationRequest, isUpdateOrganizationRosterEntryOperationResponse, listOrganizationGroupMembersOperation, type OrganizationGroupPathParams, OrganizationGroupPathParamsSchema, type OrganizationPathParams, OrganizationPathParamsSchema, type OrganizationRosterPathParams, OrganizationRosterPathParamsSchema, updateOrganizationProfileOperation, updateOrganizationRosterEntryOperation, } from "./organizations.js";
|
|
@@ -14,6 +14,7 @@ export { DocumentSyncPathParamsSchema, documentSyncOperation, isDocumentSyncOper
|
|
|
14
14
|
export { operationRequestHeaderNames, operationResponseHeaderNames, } from "./headerNames.js";
|
|
15
15
|
export { getHealthOperation, isGetHealthOperationResponse, } from "./health.js";
|
|
16
16
|
export { completeMultipartBlobStageOperation, getMultipartBlobStageOperation, initiateMultipartBlobStageOperation, isCompleteMultipartBlobStageOperationRequest, isCompleteMultipartBlobStageOperationResponse, isGetMultipartBlobStageOperationResponse, isInitiateMultipartBlobStageOperationRequest, isInitiateMultipartBlobStageOperationResponse, MultipartBlobStagePathParamsSchema, } from "./multipartBlobs.js";
|
|
17
|
+
export { authorizeMultipartBlobPartUploadOperation, MultipartBlobPartUploadRequestSchema, MultipartBlobPartUploadResponseSchema, } from "./multipartPartUploads.js";
|
|
17
18
|
export { claimNativeOrganizationSubscriptionOperation, getOrganizationBillingHistoryOperation, getOrganizationBillingManagementUrlOperation, getOrganizationBillingOperation, getOrganizationNativePurchaseEligibilityOperation, isClaimNativeOrganizationSubscriptionOperationResponse, isGetOrganizationBillingHistoryOperationResponse, isGetOrganizationBillingManagementUrlOperationResponse, isGetOrganizationBillingOperationResponse, isGetOrganizationNativePurchaseEligibilityOperationResponse, isStartOrganizationTrialOperationResponse, OrganizationBillingNativeClaimPathParamsSchema, OrganizationBillingNativeEligibilityQuerySchema, OrganizationBillingPathParamsSchema, startOrganizationTrialOperation, } from "./organizationBilling.js";
|
|
18
19
|
export { getOrganizationPolicyHistoryOperation } from "./organizationPolicyHistory.js";
|
|
19
20
|
export { createOrganizationGroupOperation, createOrganizationOperation, deleteOrganizationGroupOperation, getOrganizationDataUsageOperation, getOrganizationReadModelOperation, isCreateOrganizationGroupOperationRequest, isCreateOrganizationGroupOperationResponse, isCreateOrganizationOperationRequest, isCreateOrganizationOperationResponse, isDeleteOrganizationGroupOperationResponse, isGetOrganizationDataUsageOperationResponse, isGetOrganizationReadModelOperationResponse, isListOrganizationGroupMembersOperationResponse, isUpdateOrganizationProfileOperationRequest, isUpdateOrganizationProfileOperationResponse, isUpdateOrganizationRosterEntryOperationRequest, isUpdateOrganizationRosterEntryOperationResponse, listOrganizationGroupMembersOperation, OrganizationGroupPathParamsSchema, OrganizationPathParamsSchema, OrganizationRosterPathParamsSchema, updateOrganizationProfileOperation, updateOrganizationRosterEntryOperation, } from "./organizations.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAEL,qCAAqC,EAErC,8BAA8B,EAC9B,2BAA2B,EAE3B,mCAAmC,EACnC,6BAA6B,EAC7B,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,uCAAuC,EACvC,0CAA0C,EAC1C,gCAAgC,GACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,2BAA2B,EAC3B,4BAA4B,EAC5B,iCAAiC,EACjC,+BAA+B,EAC/B,yBAAyB,EACzB,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,EACxB,yBAAyB,EACzB,kCAAkC,EAClC,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,wBAAwB,GACzB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,0CAA0C,EAC1C,2CAA2C,EAC3C,sCAAsC,EACtC,uCAAuC,EAEvC,8BAA8B,EAC9B,iCAAiC,EACjC,6BAA6B,EAE7B,0BAA0B,GAC3B,MA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AO,EAEL,8BAA8B,GAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sCAAsC,EACtC,2BAA2B,EAC3B,+CAA+C,EAC/C,gDAAgD,EAChD,qCAAqC,EACrC,oCAAoC,EACpC,qCAAqC,EAErC,uCAAuC,EAEvC,+BAA+B,EAC/B,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mCAAmC,EAEnC,kCAAkC,GACnC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,kCAAkC,EAClC,qCAAqC,EACrC,gDAAgD,EAChD,2BAA2B,EAC3B,sCAAsC,EACtC,2BAA2B,EAE3B,yBAAyB,EAEzB,4BAA4B,GAC7B,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,qCAAqC,EACrC,4BAA4B,EAC5B,gCAAgC,EAChC,uCAAuC,EACvC,8BAA8B,GAG/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iCAAiC,EACjC,6BAA6B,EAC7B,oCAAoC,EACpC,2BAA2B,EAC3B,iCAAiC,EACjC,2CAA2C,EAC3C,uCAAuC,EACvC,6CAA6C,EAC7C,8CAA8C,EAC9C,oCAAoC,EACpC,qCAAqC,EACrC,2CAA2C,EAE3C,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,yCAAyC,EAEzC,wCAAwC,EACxC,qCAAqC,EACrC,oCAAoC,EACpC,+CAA+C,EAC/C,8CAA8C,GAC/C,MAAM,qBAAqB,CAAC","sourcesContent":["export { apiVersionHeaderName, parseApiVersion } from \"./apiVersion\";\nexport {\n type BlobAttachmentBindingPathParams,\n BlobAttachmentBindingPathParamsSchema,\n type BlobAttachmentPathParams,\n BlobAttachmentPathParamsSchema,\n bindBlobAttachmentOperation,\n type DocumentAttachmentsPathParams,\n DocumentAttachmentsPathParamsSchema,\n detachBlobAttachmentOperation,\n isBindBlobAttachmentOperationRequest,\n isBindBlobAttachmentOperationResponse,\n isDetachBlobAttachmentOperationRequest,\n isDetachBlobAttachmentOperationResponse,\n isListDocumentAttachmentsOperationResponse,\n listDocumentAttachmentsOperation,\n} from \"./attachments\";\nexport {\n challengeOperation,\n destroySessionOperation,\n isChallengeOperationRequest,\n isChallengeOperationResponse,\n isDestroySessionOperationResponse,\n isListSessionsOperationResponse,\n isLogoutOperationResponse,\n isRegistrationOperationRequest,\n isRegistrationOperationResponse,\n isUserIdentityOperationResponse,\n isVerifyOperationRequest,\n isVerifyOperationResponse,\n isWebSocketTicketOperationResponse,\n listSessionsOperation,\n logoutOperation,\n registerOperation,\n userIdentityOperation,\n verifyOperation,\n webSocketTicketOperation,\n} from \"./auth\";\nexport {\n billingWebhookWireHeaderKeys,\n billingWebhookWireHeaderNames,\n isReceiveRevenueCatWebhookOperationRequest,\n isReceiveRevenueCatWebhookOperationResponse,\n isReceiveStripeWebhookOperationRequest,\n isReceiveStripeWebhookOperationResponse,\n type RevenueCatWebhookHeaders,\n RevenueCatWebhookHeadersSchema,\n receiveRevenueCatWebhookOperation,\n receiveStripeWebhookOperation,\n type StripeWebhookHeaders,\n StripeWebhookHeadersSchema,\n} from \"./billingWebhooks\";\nexport {\n BinaryBodySchema,\n type BlobBytesPathParams,\n BlobBytesPathParamsSchema,\n type BlobBytesResponseHeaders,\n BlobBytesResponseHeadersSchema,\n blobWireHeaderKeys,\n blobWireHeaderNames,\n getBlobBytesOperation,\n isUploadMultipartBlobPartBytesOperationResponse,\n type MultipartBlobPartHeaders,\n MultipartBlobPartHeadersSchema,\n type MultipartBlobPartPathParams,\n MultipartBlobPartPathParamsSchema,\n uploadMultipartBlobPartBytesOperation,\n} from \"./blobBytes\";\nexport {\n type BlobDownloadResponse,\n BlobDownloadResponseSchema,\n getBlobDownloadOperation,\n} from \"./blobDownloads\";\nexport {\n type ContainerMutationPathParams,\n ContainerMutationPathParamsSchema,\n createContainerOperation,\n createContainerWithMetadataDocumentOperation,\n deleteContainerOperation,\n isContainerMutationOperationRequest,\n isContainerMutationOperationResponse,\n isContainerRotationOperationRequest,\n isContainerRotationOperationResponse,\n isCreateContainerWithMetadataDocumentOperationRequest,\n isCreateContainerWithMetadataDocumentOperationResponse,\n isDeleteContainerOperationResponse,\n moveContainerOperation,\n reciteContainerOperation,\n rekeyContainerOperation,\n revokeContainerOperation,\n shareContainerOperation,\n} from \"./containerMutations\";\nexport {\n type ContainerKekLogQuery,\n ContainerKekLogQuerySchema,\n type ContainerReadPathParams,\n ContainerReadPathParamsSchema,\n getContainerKekLogOperation,\n isGetContainerKekLogOperationResponse,\n isListContainerDocumentsOperationResponse,\n isListContainerParentLanesOperationRequest,\n isListContainerParentLanesOperationResponse,\n type ListContainerDocumentsQuery,\n ListContainerDocumentsQuerySchema,\n listContainerDocumentsOperation,\n listContainerParentLanesOperation,\n} from \"./containerReads\";\nexport {\n type ContainerReplacementAuthorizationsResponse,\n ContainerReplacementAuthorizationsResponseSchema,\n getContainerReplacementAuthorizationsOperation,\n} from \"./containerReplacement\";\nexport {\n defineHttpOperation,\n defineJsonOperation,\n type HttpOperation,\n type HttpOperationMediaType,\n type HttpOperationMethod,\n type JsonOperation,\n type JsonOperationMethod,\n type OperationSchemaInput,\n type OperationSchemaOutput,\n operationRequestPath,\n operationRequestPathForInput,\n operationRequestPathWithQuery,\n operationRoutePath,\n type RuntimeRefinement,\n} from \"./definition\";\nexport {\n type DocumentAttributionPathParams,\n DocumentAttributionPathParamsSchema,\n type DocumentAttributionRangesQuery,\n DocumentAttributionRangesQuerySchema,\n type DocumentAttributionRequestHeaders,\n DocumentAttributionRequestHeadersSchema,\n documentAttributionWireHeaderKeys,\n documentAttributionWireHeaderNames,\n getDocumentAttributionOperation,\n isGetDocumentAttributionOperationResponse,\n isListDocumentAttributionRangesOperationResponse,\n listDocumentAttributionRangesOperation,\n} from \"./documentAttribution\";\nexport {\n createDocumentOperation,\n type DocumentMutationPathParams,\n DocumentMutationPathParamsSchema,\n type DocumentPurgeProofQuery,\n DocumentPurgeProofQuerySchema,\n getDocumentPurgeProofOperation,\n isCreateDocumentOperationRequest,\n isCreateDocumentOperationResponse,\n isDocumentLinkSetMutationOperationRequest,\n isDocumentLinkSetMutationOperationResponse,\n isGetDocumentPurgeProofOperationResponse,\n isPurgeDocumentOperationRequest,\n isPurgeDocumentOperationResponse,\n linkDocumentOperation,\n purgeDocumentOperation,\n unlinkDocumentOperation,\n} from \"./documentMutations\";\nexport {\n type DocumentSyncPathParams,\n DocumentSyncPathParamsSchema,\n documentSyncOperation,\n isDocumentSyncOperationRequest,\n isDocumentSyncOperationResponse,\n} from \"./documentSync\";\nexport {\n operationRequestHeaderNames,\n operationResponseHeaderNames,\n} from \"./headerNames\";\nexport {\n getHealthOperation,\n isGetHealthOperationResponse,\n} from \"./health\";\nexport {\n completeMultipartBlobStageOperation,\n getMultipartBlobStageOperation,\n initiateMultipartBlobStageOperation,\n isCompleteMultipartBlobStageOperationRequest,\n isCompleteMultipartBlobStageOperationResponse,\n isGetMultipartBlobStageOperationResponse,\n isInitiateMultipartBlobStageOperationRequest,\n isInitiateMultipartBlobStageOperationResponse,\n type MultipartBlobStagePathParams,\n MultipartBlobStagePathParamsSchema,\n} from \"./multipartBlobs\";\nexport {\n claimNativeOrganizationSubscriptionOperation,\n getOrganizationBillingHistoryOperation,\n getOrganizationBillingManagementUrlOperation,\n getOrganizationBillingOperation,\n getOrganizationNativePurchaseEligibilityOperation,\n isClaimNativeOrganizationSubscriptionOperationResponse,\n isGetOrganizationBillingHistoryOperationResponse,\n isGetOrganizationBillingManagementUrlOperationResponse,\n isGetOrganizationBillingOperationResponse,\n isGetOrganizationNativePurchaseEligibilityOperationResponse,\n isStartOrganizationTrialOperationResponse,\n type OrganizationBillingNativeClaimPathParams,\n OrganizationBillingNativeClaimPathParamsSchema,\n type OrganizationBillingNativeEligibilityQuery,\n OrganizationBillingNativeEligibilityQuerySchema,\n type OrganizationBillingPathParams,\n OrganizationBillingPathParamsSchema,\n startOrganizationTrialOperation,\n} from \"./organizationBilling\";\nexport { getOrganizationPolicyHistoryOperation } from \"./organizationPolicyHistory\";\nexport {\n createOrganizationGroupOperation,\n createOrganizationOperation,\n deleteOrganizationGroupOperation,\n getOrganizationDataUsageOperation,\n getOrganizationReadModelOperation,\n isCreateOrganizationGroupOperationRequest,\n isCreateOrganizationGroupOperationResponse,\n isCreateOrganizationOperationRequest,\n isCreateOrganizationOperationResponse,\n isDeleteOrganizationGroupOperationResponse,\n isGetOrganizationDataUsageOperationResponse,\n isGetOrganizationReadModelOperationResponse,\n isListOrganizationGroupMembersOperationResponse,\n isUpdateOrganizationProfileOperationRequest,\n isUpdateOrganizationProfileOperationResponse,\n isUpdateOrganizationRosterEntryOperationRequest,\n isUpdateOrganizationRosterEntryOperationResponse,\n listOrganizationGroupMembersOperation,\n type OrganizationGroupPathParams,\n OrganizationGroupPathParamsSchema,\n type OrganizationPathParams,\n OrganizationPathParamsSchema,\n type OrganizationRosterPathParams,\n OrganizationRosterPathParamsSchema,\n updateOrganizationProfileOperation,\n updateOrganizationRosterEntryOperation,\n} from \"./organizations\";\nexport {\n type PrincipalPolicyPageQuery,\n PrincipalPolicyPageQuerySchema,\n} from \"./principalPolicyPageQuery\";\nexport {\n commitOrganizationGroupPolicyOperation,\n getPrincipalPolicyOperation,\n isCommitOrganizationGroupPolicyOperationRequest,\n isCommitOrganizationGroupPolicyOperationResponse,\n isGetPrincipalPolicyOperationResponse,\n isPutPrincipalPolicyOperationRequest,\n isPutPrincipalPolicyOperationResponse,\n type OrganizationGroupPolicyPathParams,\n OrganizationGroupPolicyPathParamsSchema,\n type PrincipalPolicyPathParams,\n PrincipalPolicyPathParamsSchema,\n putPrincipalPolicyOperation,\n} from \"./principals\";\nexport {\n getProjectionPolicyHistoryOperation,\n type ProjectionPolicyHistoryQuery,\n ProjectionPolicyHistoryQuerySchema,\n} from \"./projectionPolicyHistory\";\nexport { protocolOperations } from \"./registry\";\nexport {\n getRootIdentityOperation,\n isGetRootIdentityOperationResponse,\n isListRootIdentitiesOperationResponse,\n isListRootIdentityOrganizationsOperationResponse,\n listRootIdentitiesOperation,\n listRootIdentityOrganizationsOperation,\n MAX_ROOT_IDENTITY_PAGE_SIZE,\n type RootIdentitiesQuery,\n RootIdentitiesQuerySchema,\n type RootIdentityPathParams,\n RootIdentityPathParamsSchema,\n} from \"./root\";\nexport {\n getRootOrganizationDataUsageOperation,\n getRootOrganizationOperation,\n listRootDataUsageReportOperation,\n listRootOrganizationIdentitiesOperation,\n listRootOrganizationsOperation,\n type RootOrganizationPageQuery,\n type RootOrganizationsQuery,\n} from \"./rootOrganizations\";\nexport {\n cancelStripeSubscriptionOperation,\n createStripeCheckoutOperation,\n createStripeCheckoutSessionOperation,\n createStripePortalOperation,\n getStripeCheckoutOptionsOperation,\n isCancelStripeSubscriptionOperationResponse,\n isCreateStripeCheckoutOperationResponse,\n isCreateStripeCheckoutSessionOperationRequest,\n isCreateStripeCheckoutSessionOperationResponse,\n isCreateStripePortalOperationRequest,\n isCreateStripePortalOperationResponse,\n isGetStripeCheckoutOptionsOperationResponse,\n type StripeCheckoutPathParams,\n StripeCheckoutPathParamsSchema,\n} from \"./stripeCheckout\";\nexport {\n type ContainerWriterProjectionPathParams,\n ContainerWriterProjectionPathParamsSchema,\n type DocumentWriterProjectionPathParams,\n DocumentWriterProjectionPathParamsSchema,\n getContainerWriterProjectionOperation,\n getDocumentWriterProjectionOperation,\n isGetContainerWriterProjectionOperationResponse,\n isGetDocumentWriterProjectionOperationResponse,\n} from \"./writerProjections\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAEL,qCAAqC,EAErC,8BAA8B,EAC9B,2BAA2B,EAE3B,mCAAmC,EACnC,6BAA6B,EAC7B,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC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8BAA8B,GAG/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iCAAiC,EACjC,6BAA6B,EAC7B,oCAAoC,EACpC,2BAA2B,EAC3B,iCAAiC,EACjC,2CAA2C,EAC3C,uCAAuC,EACvC,6CAA6C,EAC7C,8CAA8C,EAC9C,oCAAoC,EACpC,qCAAqC,EACrC,2CAA2C,EAE3C,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,yCAAyC,EAEzC,wCAAwC,EACxC,qCAAqC,EACrC,oCAAoC,EACpC,+CAA+C,EAC/C,8CAA8C,GAC/C,MAAM,qBAAqB,CAAC","sourcesContent":["export { apiVersionHeaderName, parseApiVersion } from \"./apiVersion\";\nexport {\n type BlobAttachmentBindingPathParams,\n BlobAttachmentBindingPathParamsSchema,\n type BlobAttachmentPathParams,\n BlobAttachmentPathParamsSchema,\n bindBlobAttachmentOperation,\n type DocumentAttachmentsPathParams,\n DocumentAttachmentsPathParamsSchema,\n detachBlobAttachmentOperation,\n isBindBlobAttachmentOperationRequest,\n isBindBlobAttachmentOperationResponse,\n isDetachBlobAttachmentOperationRequest,\n isDetachBlobAttachmentOperationResponse,\n isListDocumentAttachmentsOperationResponse,\n listDocumentAttachmentsOperation,\n} from \"./attachments\";\nexport {\n challengeOperation,\n destroySessionOperation,\n isChallengeOperationRequest,\n isChallengeOperationResponse,\n isDestroySessionOperationResponse,\n isListSessionsOperationResponse,\n isLogoutOperationResponse,\n isRegistrationOperationRequest,\n isRegistrationOperationResponse,\n isUserIdentityOperationResponse,\n isVerifyOperationRequest,\n isVerifyOperationResponse,\n isWebSocketTicketOperationResponse,\n listSessionsOperation,\n logoutOperation,\n registerOperation,\n userIdentityOperation,\n verifyOperation,\n webSocketTicketOperation,\n} from \"./auth\";\nexport {\n billingWebhookWireHeaderKeys,\n billingWebhookWireHeaderNames,\n isReceiveRevenueCatWebhookOperationRequest,\n isReceiveRevenueCatWebhookOperationResponse,\n isReceiveStripeWebhookOperationRequest,\n isReceiveStripeWebhookOperationResponse,\n type RevenueCatWebhookHeaders,\n RevenueCatWebhookHeadersSchema,\n receiveRevenueCatWebhookOperation,\n receiveStripeWebhookOperation,\n type StripeWebhookHeaders,\n StripeWebhookHeadersSchema,\n} from \"./billingWebhooks\";\nexport {\n BinaryBodySchema,\n type BlobBytesPathParams,\n BlobBytesPathParamsSchema,\n type BlobBytesResponseHeaders,\n BlobBytesResponseHeadersSchema,\n blobWireHeaderKeys,\n blobWireHeaderNames,\n getBlobBytesOperation,\n isUploadMultipartBlobPartBytesOperationResponse,\n type MultipartBlobPartHeaders,\n MultipartBlobPartHeadersSchema,\n type MultipartBlobPartPathParams,\n MultipartBlobPartPathParamsSchema,\n uploadMultipartBlobPartBytesOperation,\n} from \"./blobBytes\";\nexport {\n type BlobDownloadResponse,\n BlobDownloadResponseSchema,\n getBlobDownloadOperation,\n} from \"./blobDownloads\";\nexport {\n type ContainerMutationPathParams,\n ContainerMutationPathParamsSchema,\n createContainerOperation,\n createContainerWithMetadataDocumentOperation,\n deleteContainerOperation,\n isContainerMutationOperationRequest,\n isContainerMutationOperationResponse,\n isContainerRotationOperationRequest,\n isContainerRotationOperationResponse,\n isCreateContainerWithMetadataDocumentOperationRequest,\n isCreateContainerWithMetadataDocumentOperationResponse,\n isDeleteContainerOperationResponse,\n moveContainerOperation,\n reciteContainerOperation,\n rekeyContainerOperation,\n revokeContainerOperation,\n shareContainerOperation,\n} from \"./containerMutations\";\nexport {\n type ContainerKekLogQuery,\n ContainerKekLogQuerySchema,\n type ContainerReadPathParams,\n ContainerReadPathParamsSchema,\n getContainerKekLogOperation,\n isGetContainerKekLogOperationResponse,\n isListContainerDocumentsOperationResponse,\n isListContainerParentLanesOperationRequest,\n isListContainerParentLanesOperationResponse,\n type ListContainerDocumentsQuery,\n ListContainerDocumentsQuerySchema,\n listContainerDocumentsOperation,\n listContainerParentLanesOperation,\n} from \"./containerReads\";\nexport {\n type ContainerReplacementAuthorizationsResponse,\n ContainerReplacementAuthorizationsResponseSchema,\n getContainerReplacementAuthorizationsOperation,\n} from \"./containerReplacement\";\nexport {\n defineHttpOperation,\n defineJsonOperation,\n type HttpOperation,\n type HttpOperationMediaType,\n type HttpOperationMethod,\n type JsonOperation,\n type JsonOperationMethod,\n type OperationSchemaInput,\n type OperationSchemaOutput,\n operationRequestPath,\n operationRequestPathForInput,\n operationRequestPathWithQuery,\n operationRoutePath,\n type RuntimeRefinement,\n} from \"./definition\";\nexport {\n type DocumentAttributionPathParams,\n DocumentAttributionPathParamsSchema,\n type DocumentAttributionRangesQuery,\n DocumentAttributionRangesQuerySchema,\n type DocumentAttributionRequestHeaders,\n DocumentAttributionRequestHeadersSchema,\n documentAttributionWireHeaderKeys,\n documentAttributionWireHeaderNames,\n getDocumentAttributionOperation,\n isGetDocumentAttributionOperationResponse,\n isListDocumentAttributionRangesOperationResponse,\n listDocumentAttributionRangesOperation,\n} from \"./documentAttribution\";\nexport {\n createDocumentOperation,\n type DocumentMutationPathParams,\n DocumentMutationPathParamsSchema,\n type DocumentPurgeProofQuery,\n DocumentPurgeProofQuerySchema,\n getDocumentPurgeProofOperation,\n isCreateDocumentOperationRequest,\n isCreateDocumentOperationResponse,\n isDocumentLinkSetMutationOperationRequest,\n isDocumentLinkSetMutationOperationResponse,\n isGetDocumentPurgeProofOperationResponse,\n isPurgeDocumentOperationRequest,\n isPurgeDocumentOperationResponse,\n linkDocumentOperation,\n purgeDocumentOperation,\n unlinkDocumentOperation,\n} from \"./documentMutations\";\nexport {\n type DocumentSyncPathParams,\n DocumentSyncPathParamsSchema,\n documentSyncOperation,\n isDocumentSyncOperationRequest,\n isDocumentSyncOperationResponse,\n} from \"./documentSync\";\nexport {\n operationRequestHeaderNames,\n operationResponseHeaderNames,\n} from \"./headerNames\";\nexport {\n getHealthOperation,\n isGetHealthOperationResponse,\n} from \"./health\";\nexport {\n completeMultipartBlobStageOperation,\n getMultipartBlobStageOperation,\n initiateMultipartBlobStageOperation,\n isCompleteMultipartBlobStageOperationRequest,\n isCompleteMultipartBlobStageOperationResponse,\n isGetMultipartBlobStageOperationResponse,\n isInitiateMultipartBlobStageOperationRequest,\n isInitiateMultipartBlobStageOperationResponse,\n type MultipartBlobStagePathParams,\n MultipartBlobStagePathParamsSchema,\n} from \"./multipartBlobs\";\nexport {\n authorizeMultipartBlobPartUploadOperation,\n type MultipartBlobPartUploadRequest,\n MultipartBlobPartUploadRequestSchema,\n type MultipartBlobPartUploadResponse,\n MultipartBlobPartUploadResponseSchema,\n} from \"./multipartPartUploads\";\nexport {\n claimNativeOrganizationSubscriptionOperation,\n getOrganizationBillingHistoryOperation,\n getOrganizationBillingManagementUrlOperation,\n getOrganizationBillingOperation,\n getOrganizationNativePurchaseEligibilityOperation,\n isClaimNativeOrganizationSubscriptionOperationResponse,\n isGetOrganizationBillingHistoryOperationResponse,\n isGetOrganizationBillingManagementUrlOperationResponse,\n isGetOrganizationBillingOperationResponse,\n isGetOrganizationNativePurchaseEligibilityOperationResponse,\n isStartOrganizationTrialOperationResponse,\n type OrganizationBillingNativeClaimPathParams,\n OrganizationBillingNativeClaimPathParamsSchema,\n type OrganizationBillingNativeEligibilityQuery,\n OrganizationBillingNativeEligibilityQuerySchema,\n type OrganizationBillingPathParams,\n OrganizationBillingPathParamsSchema,\n startOrganizationTrialOperation,\n} from \"./organizationBilling\";\nexport { getOrganizationPolicyHistoryOperation } from \"./organizationPolicyHistory\";\nexport {\n createOrganizationGroupOperation,\n createOrganizationOperation,\n deleteOrganizationGroupOperation,\n getOrganizationDataUsageOperation,\n getOrganizationReadModelOperation,\n isCreateOrganizationGroupOperationRequest,\n isCreateOrganizationGroupOperationResponse,\n isCreateOrganizationOperationRequest,\n isCreateOrganizationOperationResponse,\n isDeleteOrganizationGroupOperationResponse,\n isGetOrganizationDataUsageOperationResponse,\n isGetOrganizationReadModelOperationResponse,\n isListOrganizationGroupMembersOperationResponse,\n isUpdateOrganizationProfileOperationRequest,\n isUpdateOrganizationProfileOperationResponse,\n isUpdateOrganizationRosterEntryOperationRequest,\n isUpdateOrganizationRosterEntryOperationResponse,\n listOrganizationGroupMembersOperation,\n type OrganizationGroupPathParams,\n OrganizationGroupPathParamsSchema,\n type OrganizationPathParams,\n OrganizationPathParamsSchema,\n type OrganizationRosterPathParams,\n OrganizationRosterPathParamsSchema,\n updateOrganizationProfileOperation,\n updateOrganizationRosterEntryOperation,\n} from \"./organizations\";\nexport {\n type PrincipalPolicyPageQuery,\n PrincipalPolicyPageQuerySchema,\n} from \"./principalPolicyPageQuery\";\nexport {\n commitOrganizationGroupPolicyOperation,\n getPrincipalPolicyOperation,\n isCommitOrganizationGroupPolicyOperationRequest,\n isCommitOrganizationGroupPolicyOperationResponse,\n isGetPrincipalPolicyOperationResponse,\n isPutPrincipalPolicyOperationRequest,\n isPutPrincipalPolicyOperationResponse,\n type OrganizationGroupPolicyPathParams,\n OrganizationGroupPolicyPathParamsSchema,\n type PrincipalPolicyPathParams,\n PrincipalPolicyPathParamsSchema,\n putPrincipalPolicyOperation,\n} from \"./principals\";\nexport {\n getProjectionPolicyHistoryOperation,\n type ProjectionPolicyHistoryQuery,\n ProjectionPolicyHistoryQuerySchema,\n} from \"./projectionPolicyHistory\";\nexport { protocolOperations } from \"./registry\";\nexport {\n getRootIdentityOperation,\n isGetRootIdentityOperationResponse,\n isListRootIdentitiesOperationResponse,\n isListRootIdentityOrganizationsOperationResponse,\n listRootIdentitiesOperation,\n listRootIdentityOrganizationsOperation,\n MAX_ROOT_IDENTITY_PAGE_SIZE,\n type RootIdentitiesQuery,\n RootIdentitiesQuerySchema,\n type RootIdentityPathParams,\n RootIdentityPathParamsSchema,\n} from \"./root\";\nexport {\n getRootOrganizationDataUsageOperation,\n getRootOrganizationOperation,\n listRootDataUsageReportOperation,\n listRootOrganizationIdentitiesOperation,\n listRootOrganizationsOperation,\n type RootOrganizationPageQuery,\n type RootOrganizationsQuery,\n} from \"./rootOrganizations\";\nexport {\n cancelStripeSubscriptionOperation,\n createStripeCheckoutOperation,\n createStripeCheckoutSessionOperation,\n createStripePortalOperation,\n getStripeCheckoutOptionsOperation,\n isCancelStripeSubscriptionOperationResponse,\n isCreateStripeCheckoutOperationResponse,\n isCreateStripeCheckoutSessionOperationRequest,\n isCreateStripeCheckoutSessionOperationResponse,\n isCreateStripePortalOperationRequest,\n isCreateStripePortalOperationResponse,\n isGetStripeCheckoutOptionsOperationResponse,\n type StripeCheckoutPathParams,\n StripeCheckoutPathParamsSchema,\n} from \"./stripeCheckout\";\nexport {\n type ContainerWriterProjectionPathParams,\n ContainerWriterProjectionPathParamsSchema,\n type DocumentWriterProjectionPathParams,\n DocumentWriterProjectionPathParamsSchema,\n getContainerWriterProjectionOperation,\n getDocumentWriterProjectionOperation,\n isGetContainerWriterProjectionOperationResponse,\n isGetDocumentWriterProjectionOperationResponse,\n} from \"./writerProjections\";\n"]}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ErrorResponseSchema } from "../response/index.js";
|
|
3
|
+
export declare const MultipartBlobPartUploadRequestSchema: z.ZodObject<{
|
|
4
|
+
byteLength: z.ZodCustom<number, number>;
|
|
5
|
+
contentMd5: z.ZodCustom<string, string>;
|
|
6
|
+
uploadId: z.ZodString;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export declare const MultipartBlobPartUploadResponseSchema: z.ZodObject<{
|
|
9
|
+
byteLength: z.ZodCustom<number, number>;
|
|
10
|
+
contentMd5: z.ZodCustom<string, string>;
|
|
11
|
+
partNumber: z.ZodCustom<number, number>;
|
|
12
|
+
stageId: z.ZodString;
|
|
13
|
+
uploadId: z.ZodString;
|
|
14
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
15
|
+
kind: z.ZodLiteral<"api">;
|
|
16
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"signed-url">;
|
|
18
|
+
url: z.ZodCustom<string, string>;
|
|
19
|
+
expiresAt: z.ZodCustom<string, string>;
|
|
20
|
+
}, z.core.$strict>], "kind">;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type MultipartBlobPartUploadRequest = z.infer<typeof MultipartBlobPartUploadRequestSchema>;
|
|
23
|
+
export type MultipartBlobPartUploadResponse = z.infer<typeof MultipartBlobPartUploadResponseSchema>;
|
|
24
|
+
export declare const authorizeMultipartBlobPartUploadOperation: Omit<{
|
|
25
|
+
readonly auth: "session";
|
|
26
|
+
readonly body: z.ZodObject<{
|
|
27
|
+
byteLength: z.ZodCustom<number, number>;
|
|
28
|
+
contentMd5: z.ZodCustom<string, string>;
|
|
29
|
+
uploadId: z.ZodString;
|
|
30
|
+
}, z.core.$strict>;
|
|
31
|
+
readonly failureResponses: {
|
|
32
|
+
readonly 400: z.ZodType<{
|
|
33
|
+
error: string;
|
|
34
|
+
}, {
|
|
35
|
+
error: string;
|
|
36
|
+
}, z.core.$ZodTypeInternals<{
|
|
37
|
+
error: string;
|
|
38
|
+
}, {
|
|
39
|
+
error: string;
|
|
40
|
+
}>>;
|
|
41
|
+
readonly 401: z.ZodType<{
|
|
42
|
+
error: string;
|
|
43
|
+
code?: "session_refresh_required" | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
error: string;
|
|
46
|
+
code?: "session_refresh_required" | undefined;
|
|
47
|
+
}, z.core.$ZodTypeInternals<{
|
|
48
|
+
error: string;
|
|
49
|
+
code?: "session_refresh_required" | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
error: string;
|
|
52
|
+
code?: "session_refresh_required" | undefined;
|
|
53
|
+
}>>;
|
|
54
|
+
readonly 403: z.ZodType<{
|
|
55
|
+
error: string;
|
|
56
|
+
}, {
|
|
57
|
+
error: string;
|
|
58
|
+
}, z.core.$ZodTypeInternals<{
|
|
59
|
+
error: string;
|
|
60
|
+
}, {
|
|
61
|
+
error: string;
|
|
62
|
+
}>>;
|
|
63
|
+
readonly 404: z.ZodType<{
|
|
64
|
+
error: string;
|
|
65
|
+
}, {
|
|
66
|
+
error: string;
|
|
67
|
+
}, z.core.$ZodTypeInternals<{
|
|
68
|
+
error: string;
|
|
69
|
+
}, {
|
|
70
|
+
error: string;
|
|
71
|
+
}>>;
|
|
72
|
+
readonly 409: z.ZodType<{
|
|
73
|
+
error: string;
|
|
74
|
+
}, {
|
|
75
|
+
error: string;
|
|
76
|
+
}, z.core.$ZodTypeInternals<{
|
|
77
|
+
error: string;
|
|
78
|
+
}, {
|
|
79
|
+
error: string;
|
|
80
|
+
}>>;
|
|
81
|
+
readonly 500: z.ZodType<{
|
|
82
|
+
error: string;
|
|
83
|
+
}, {
|
|
84
|
+
error: string;
|
|
85
|
+
}, z.core.$ZodTypeInternals<{
|
|
86
|
+
error: string;
|
|
87
|
+
}, {
|
|
88
|
+
error: string;
|
|
89
|
+
}>>;
|
|
90
|
+
};
|
|
91
|
+
readonly failureStatuses: readonly [400, 401, 403, 404, 409, 500];
|
|
92
|
+
readonly id: "blobs.multipartStages.parts.authorize";
|
|
93
|
+
readonly method: "POST";
|
|
94
|
+
readonly params: z.ZodObject<{
|
|
95
|
+
partNumber: z.ZodCustom<string | number, string | number>;
|
|
96
|
+
stageId: z.ZodString;
|
|
97
|
+
}, z.core.$strict>;
|
|
98
|
+
readonly path: "/blobs/stages/multipart/{stageId}/parts/{partNumber}/upload";
|
|
99
|
+
readonly responses: {
|
|
100
|
+
readonly 200: z.ZodObject<{
|
|
101
|
+
byteLength: z.ZodCustom<number, number>;
|
|
102
|
+
contentMd5: z.ZodCustom<string, string>;
|
|
103
|
+
partNumber: z.ZodCustom<number, number>;
|
|
104
|
+
stageId: z.ZodString;
|
|
105
|
+
uploadId: z.ZodString;
|
|
106
|
+
source: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
107
|
+
kind: z.ZodLiteral<"api">;
|
|
108
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
109
|
+
kind: z.ZodLiteral<"signed-url">;
|
|
110
|
+
url: z.ZodCustom<string, string>;
|
|
111
|
+
expiresAt: z.ZodCustom<string, string>;
|
|
112
|
+
}, z.core.$strict>], "kind">;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
};
|
|
115
|
+
}, "failureResponses" | "failureStatuses"> & {
|
|
116
|
+
readonly failureResponses: {
|
|
117
|
+
readonly 400: z.ZodType<{
|
|
118
|
+
error: string;
|
|
119
|
+
}, {
|
|
120
|
+
error: string;
|
|
121
|
+
}, z.core.$ZodTypeInternals<{
|
|
122
|
+
error: string;
|
|
123
|
+
}, {
|
|
124
|
+
error: string;
|
|
125
|
+
}>>;
|
|
126
|
+
readonly 401: z.ZodType<{
|
|
127
|
+
error: string;
|
|
128
|
+
code?: "session_refresh_required" | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
error: string;
|
|
131
|
+
code?: "session_refresh_required" | undefined;
|
|
132
|
+
}, z.core.$ZodTypeInternals<{
|
|
133
|
+
error: string;
|
|
134
|
+
code?: "session_refresh_required" | undefined;
|
|
135
|
+
}, {
|
|
136
|
+
error: string;
|
|
137
|
+
code?: "session_refresh_required" | undefined;
|
|
138
|
+
}>>;
|
|
139
|
+
readonly 403: z.ZodType<{
|
|
140
|
+
error: string;
|
|
141
|
+
}, {
|
|
142
|
+
error: string;
|
|
143
|
+
}, z.core.$ZodTypeInternals<{
|
|
144
|
+
error: string;
|
|
145
|
+
}, {
|
|
146
|
+
error: string;
|
|
147
|
+
}>>;
|
|
148
|
+
readonly 404: z.ZodType<{
|
|
149
|
+
error: string;
|
|
150
|
+
}, {
|
|
151
|
+
error: string;
|
|
152
|
+
}, z.core.$ZodTypeInternals<{
|
|
153
|
+
error: string;
|
|
154
|
+
}, {
|
|
155
|
+
error: string;
|
|
156
|
+
}>>;
|
|
157
|
+
readonly 409: z.ZodType<{
|
|
158
|
+
error: string;
|
|
159
|
+
}, {
|
|
160
|
+
error: string;
|
|
161
|
+
}, z.core.$ZodTypeInternals<{
|
|
162
|
+
error: string;
|
|
163
|
+
}, {
|
|
164
|
+
error: string;
|
|
165
|
+
}>>;
|
|
166
|
+
readonly 500: z.ZodType<{
|
|
167
|
+
error: string;
|
|
168
|
+
}, {
|
|
169
|
+
error: string;
|
|
170
|
+
}, z.core.$ZodTypeInternals<{
|
|
171
|
+
error: string;
|
|
172
|
+
}, {
|
|
173
|
+
error: string;
|
|
174
|
+
}>>;
|
|
175
|
+
} & {
|
|
176
|
+
readonly 503: typeof ErrorResponseSchema;
|
|
177
|
+
};
|
|
178
|
+
readonly failureStatuses: readonly [400, 401, 403, 404, 409, 500] | readonly [400, 401, 403, 404, 409, 500, 503];
|
|
179
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ErrorResponseSchema, SessionFailureResponseSchema } from "../response/index.js";
|
|
3
|
+
import { boundedPositiveIntegerSchema, nonEmptyStringSchema, uuidStringSchema, } from "../schema.js";
|
|
4
|
+
import { MAX_MULTIPART_BLOB_PART_BYTES } from "../util/index.js";
|
|
5
|
+
import { MultipartBlobPartPathParamsSchema } from "./blobBytes.js";
|
|
6
|
+
import { blobPartContentMd5Schema, signedBlobUrlExpirySchema, signedBlobUrlSchema, } from "./blobTransferSchemas.js";
|
|
7
|
+
import { defineJsonOperation } from "./definition.js";
|
|
8
|
+
const partByteLengthSchema = boundedPositiveIntegerSchema(MAX_MULTIPART_BLOB_PART_BYTES);
|
|
9
|
+
export const MultipartBlobPartUploadRequestSchema = z.strictObject({
|
|
10
|
+
byteLength: partByteLengthSchema,
|
|
11
|
+
contentMd5: blobPartContentMd5Schema,
|
|
12
|
+
uploadId: nonEmptyStringSchema,
|
|
13
|
+
});
|
|
14
|
+
export const MultipartBlobPartUploadResponseSchema = z.strictObject({
|
|
15
|
+
byteLength: partByteLengthSchema,
|
|
16
|
+
contentMd5: blobPartContentMd5Schema,
|
|
17
|
+
partNumber: boundedPositiveIntegerSchema(10_000),
|
|
18
|
+
stageId: uuidStringSchema,
|
|
19
|
+
uploadId: nonEmptyStringSchema,
|
|
20
|
+
source: z.discriminatedUnion("kind", [
|
|
21
|
+
z.strictObject({ kind: z.literal("api") }),
|
|
22
|
+
z.strictObject({
|
|
23
|
+
kind: z.literal("signed-url"),
|
|
24
|
+
url: signedBlobUrlSchema,
|
|
25
|
+
expiresAt: signedBlobUrlExpirySchema,
|
|
26
|
+
}),
|
|
27
|
+
]),
|
|
28
|
+
});
|
|
29
|
+
export const authorizeMultipartBlobPartUploadOperation = defineJsonOperation({
|
|
30
|
+
auth: "session",
|
|
31
|
+
body: MultipartBlobPartUploadRequestSchema,
|
|
32
|
+
failureResponses: {
|
|
33
|
+
400: ErrorResponseSchema,
|
|
34
|
+
401: SessionFailureResponseSchema,
|
|
35
|
+
403: ErrorResponseSchema,
|
|
36
|
+
404: ErrorResponseSchema,
|
|
37
|
+
409: ErrorResponseSchema,
|
|
38
|
+
500: ErrorResponseSchema,
|
|
39
|
+
},
|
|
40
|
+
failureStatuses: [400, 401, 403, 404, 409, 500],
|
|
41
|
+
id: "blobs.multipartStages.parts.authorize",
|
|
42
|
+
method: "POST",
|
|
43
|
+
params: MultipartBlobPartPathParamsSchema,
|
|
44
|
+
path: "/blobs/stages/multipart/{stageId}/parts/{partNumber}/upload",
|
|
45
|
+
responses: { 200: MultipartBlobPartUploadResponseSchema },
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=multipartPartUploads.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multipartPartUploads.js","sourceRoot":"","sources":["multipartPartUploads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAChE,O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,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC/C,EAAE,EAAE,uCAAuC;IAC3C,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,iCAAiC;IACzC,IAAI,EAAE,6DAA6D;IACnE,SAAS,EAAE,EAAE,GAAG,EAAE,qCAAqC,EAAE;CAC1D,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { ErrorResponseSchema, SessionFailureResponseSchema } from \"../response\";\nimport {\n boundedPositiveIntegerSchema,\n nonEmptyStringSchema,\n uuidStringSchema,\n} from \"../schema\";\nimport { MAX_MULTIPART_BLOB_PART_BYTES } from \"../util\";\nimport { MultipartBlobPartPathParamsSchema } from \"./blobBytes\";\nimport {\n blobPartContentMd5Schema,\n signedBlobUrlExpirySchema,\n signedBlobUrlSchema,\n} from \"./blobTransferSchemas\";\nimport { defineJsonOperation } from \"./definition\";\n\nconst partByteLengthSchema = boundedPositiveIntegerSchema(\n MAX_MULTIPART_BLOB_PART_BYTES,\n);\n\nexport const MultipartBlobPartUploadRequestSchema = z.strictObject({\n byteLength: partByteLengthSchema,\n contentMd5: blobPartContentMd5Schema,\n uploadId: nonEmptyStringSchema,\n});\n\nexport const MultipartBlobPartUploadResponseSchema = z.strictObject({\n byteLength: partByteLengthSchema,\n contentMd5: blobPartContentMd5Schema,\n partNumber: boundedPositiveIntegerSchema(10_000),\n stageId: uuidStringSchema,\n uploadId: nonEmptyStringSchema,\n source: z.discriminatedUnion(\"kind\", [\n z.strictObject({ kind: z.literal(\"api\") }),\n z.strictObject({\n kind: z.literal(\"signed-url\"),\n url: signedBlobUrlSchema,\n expiresAt: signedBlobUrlExpirySchema,\n }),\n ]),\n});\n\nexport type MultipartBlobPartUploadRequest = z.infer<\n typeof MultipartBlobPartUploadRequestSchema\n>;\nexport type MultipartBlobPartUploadResponse = z.infer<\n typeof MultipartBlobPartUploadResponseSchema\n>;\n\nexport const authorizeMultipartBlobPartUploadOperation = defineJsonOperation({\n auth: \"session\",\n body: MultipartBlobPartUploadRequestSchema,\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 403: ErrorResponseSchema,\n 404: ErrorResponseSchema,\n 409: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 403, 404, 409, 500],\n id: \"blobs.multipartStages.parts.authorize\",\n method: \"POST\",\n params: MultipartBlobPartPathParamsSchema,\n path: \"/blobs/stages/multipart/{stageId}/parts/{partNumber}/upload\",\n responses: { 200: MultipartBlobPartUploadResponseSchema },\n});\n"]}
|
|
@@ -11,6 +11,7 @@ import { createDocumentOperation, getDocumentPurgeProofOperation, linkDocumentOp
|
|
|
11
11
|
import { documentSyncOperation } from "./documentSync.js";
|
|
12
12
|
import { getHealthOperation } from "./health.js";
|
|
13
13
|
import { completeMultipartBlobStageOperation, getMultipartBlobStageOperation, initiateMultipartBlobStageOperation } from "./multipartBlobs.js";
|
|
14
|
+
import { authorizeMultipartBlobPartUploadOperation } from "./multipartPartUploads.js";
|
|
14
15
|
import { claimNativeOrganizationSubscriptionOperation, getOrganizationBillingHistoryOperation, getOrganizationBillingManagementUrlOperation, getOrganizationBillingOperation, getOrganizationNativePurchaseEligibilityOperation, startOrganizationTrialOperation } from "./organizationBilling.js";
|
|
15
16
|
import { getOrganizationPolicyHistoryOperation } from "./organizationPolicyHistory.js";
|
|
16
17
|
import { createOrganizationGroupOperation, createOrganizationOperation, deleteOrganizationGroupOperation, getOrganizationDataUsageOperation, getOrganizationReadModelOperation, listOrganizationGroupMembersOperation, updateOrganizationProfileOperation, updateOrganizationRosterEntryOperation } from "./organizations.js";
|
|
@@ -40,6 +41,7 @@ export declare const protocolOperations: readonly [
|
|
|
40
41
|
typeof initiateMultipartBlobStageOperation,
|
|
41
42
|
typeof getMultipartBlobStageOperation,
|
|
42
43
|
typeof completeMultipartBlobStageOperation,
|
|
44
|
+
typeof authorizeMultipartBlobPartUploadOperation,
|
|
43
45
|
typeof uploadMultipartBlobPartBytesOperation,
|
|
44
46
|
typeof listDocumentAttachmentsOperation,
|
|
45
47
|
typeof getDocumentAttributionOperation,
|