@calmlens/sdk 0.12.0 → 0.14.0
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/README.md +54 -37
- package/cjs/CalmLensConnection-Bth5fJyp.js +234 -0
- package/cjs/CalmLensUtils-DNdmYeX6.js +699 -0
- package/cjs/{CalmLensError-CKwMKV0S.js → CalmLensVersion-Bs0DreBV.js} +114 -1
- package/cjs/{CalmLensWebhooks-BTPxKvcD.js → CalmLensWebhooks-6thkvr_F.js} +9 -9
- package/cjs/WebhookPayload-vy8HNMaK.d.ts +15834 -0
- package/cjs/app.d.ts +3 -3
- package/cjs/app.js +10 -10
- package/cjs/{index-BgmWj3KL.d.ts → index-Dz340UQ9.d.ts} +29 -1
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +4 -5
- package/cjs/server.d.ts +16 -7
- package/cjs/server.js +35 -21
- package/cjs/testing.d.ts +21 -42
- package/cjs/testing.js +181 -94
- package/esm/CalmLensConnection-DrCOL9h9.js +193 -0
- package/esm/{CalmLensUtils-Cx32j2zt.js → CalmLensUtils-BQo79TA1.js} +316 -2
- package/esm/{CalmLensError-CihGG26K.js → CalmLensVersion-DPnL_Ebv.js} +91 -2
- package/esm/{CalmLensWebhooks-DShmAal4.js → CalmLensWebhooks-CWlD-f_P.js} +2 -2
- package/esm/WebhookPayload-vy8HNMaK.d.ts +15834 -0
- package/esm/app.d.ts +3 -3
- package/esm/app.js +4 -4
- package/esm/{index-BgmWj3KL.d.ts → index-Dz340UQ9.d.ts} +29 -1
- package/esm/index.d.ts +3 -3
- package/esm/index.js +1 -3
- package/esm/server.d.ts +16 -7
- package/esm/server.js +24 -10
- package/esm/testing.d.ts +21 -42
- package/esm/testing.js +152 -65
- package/package.json +1 -1
- package/cjs/CalmLensConnection-CYtBP-vu.js +0 -516
- package/cjs/CalmLensUtils-Dg3s4loH.js +0 -367
- package/cjs/WebhookPayload-Cgb32aSH.d.ts +0 -10187
- package/cjs/src-Dsc8Pn6v.js +0 -45
- package/esm/CalmLensConnection-wLNy0OIP.js +0 -475
- package/esm/WebhookPayload-Cgb32aSH.d.ts +0 -10187
- package/esm/src-CJhrILvM.js +0 -22
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
const require_CalmLensError = require("./CalmLensError-CKwMKV0S.js");
|
|
2
|
-
const MAX_IMAGE_UPLOAD_BYTES = /* @__PURE__ */ (() => 20971520)();
|
|
3
|
-
const MIN_MULTIPART_IMAGE_UPLOAD_BYTES = /* @__PURE__ */ (() => 10485760)();
|
|
4
|
-
const REJECTED_UPLOAD_MIME_TYPE_SET = /* @__PURE__ */ new Set([
|
|
5
|
-
"application/octet-stream",
|
|
6
|
-
"multipart/form-data",
|
|
7
|
-
"multipart/mixed",
|
|
8
|
-
"multipart/alternative",
|
|
9
|
-
"multipart/related",
|
|
10
|
-
"multipart/signed",
|
|
11
|
-
"multipart/encrypted"
|
|
12
|
-
]);
|
|
13
|
-
const normalizeUploadMimeType = (mimeType) => mimeType.toLowerCase().split(";")[0]?.trim() || mimeType.toLowerCase().trim();
|
|
14
|
-
const isRejectedUploadMimeType = (mimeType) => REJECTED_UPLOAD_MIME_TYPE_SET.has(normalizeUploadMimeType(mimeType));
|
|
15
|
-
const getRejectedUploadMimeTypeError = (mimeType) => `${normalizeUploadMimeType(mimeType)} is not a valid upload file type. Uploads must use a concrete file MIME type that CalmLens can store and process, such as image/png, image/jpeg, application/pdf, or text/plain.`;
|
|
16
|
-
const DOMAIN = "calmlens.com";
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region ../shared/src/AssetPayload.ts
|
|
19
|
-
const uint8ArrayInputToNumbers = (value) => {
|
|
20
|
-
if (Array.isArray(value)) return value;
|
|
21
|
-
return Array.from(value);
|
|
22
|
-
};
|
|
23
|
-
const bufferInputToBytes = (value) => {
|
|
24
|
-
if (value instanceof ArrayBuffer) return new Uint8Array(value);
|
|
25
|
-
return Uint8Array.from(value);
|
|
26
|
-
};
|
|
27
|
-
const BASE64_PART_BOUNDARY_ERROR = "Invalid base64 part. For multipart uploads, split the original bytes first, then base64-encode each part. Do not split one full base64 string into substrings.";
|
|
28
|
-
const MULTIPART_PART_TOO_SMALL_ERROR = `Multipart upload parts must be at least 5MiB except the final part.`;
|
|
29
|
-
const getRawBase64 = (value) => {
|
|
30
|
-
const markerIndex = value.indexOf(";base64,");
|
|
31
|
-
if (markerIndex === -1) return value;
|
|
32
|
-
return value.slice(markerIndex + 8);
|
|
33
|
-
};
|
|
34
|
-
const validateBase64PayloadString = (payload, options) => {
|
|
35
|
-
const raw = getRawBase64(payload.base64).replace(/\s/g, "");
|
|
36
|
-
if (options?.multipart && raw.length % 4 !== 0) return {
|
|
37
|
-
ok: false,
|
|
38
|
-
error: BASE64_PART_BOUNDARY_ERROR
|
|
39
|
-
};
|
|
40
|
-
return { ok: true };
|
|
41
|
-
};
|
|
42
|
-
const isReadableStream = (value) => typeof value === "object" && value !== null && "getReader" in value && typeof value.getReader === "function";
|
|
43
|
-
const assetToData = (payload) => {
|
|
44
|
-
if ("plainText" in payload && payload.plainText !== void 0) return new TextEncoder().encode(payload.plainText);
|
|
45
|
-
if ("data" in payload && payload.data) return payload.data;
|
|
46
|
-
if ("buffer" in payload) {
|
|
47
|
-
if (payload.buffer instanceof ArrayBuffer) return payload.buffer;
|
|
48
|
-
return bufferInputToBytes(payload.buffer);
|
|
49
|
-
}
|
|
50
|
-
if (payload.uint8Array !== void 0) return Uint8Array.from(uint8ArrayInputToNumbers(payload.uint8Array));
|
|
51
|
-
if (payload.base64 === void 0) throw new Error("Invalid asset payload");
|
|
52
|
-
const raw = getRawBase64(payload.base64);
|
|
53
|
-
if (typeof Buffer !== "undefined") return Uint8Array.from(Buffer.from(raw, "base64"));
|
|
54
|
-
const binary = atob(raw);
|
|
55
|
-
return Uint8Array.from(binary, (char) => char.charCodeAt(0));
|
|
56
|
-
};
|
|
57
|
-
const assetDataToUint8Array = async (data) => {
|
|
58
|
-
if (data instanceof Response) return new Uint8Array(await data.arrayBuffer());
|
|
59
|
-
if (isReadableStream(data)) return new Uint8Array(await new Response(data).arrayBuffer());
|
|
60
|
-
if (data instanceof Blob) return new Uint8Array(await data.arrayBuffer());
|
|
61
|
-
if (data instanceof ArrayBuffer) return new Uint8Array(data);
|
|
62
|
-
return data;
|
|
63
|
-
};
|
|
64
|
-
const getAssetPayloadByteLength = (payload) => {
|
|
65
|
-
if ("plainText" in payload && payload.plainText !== void 0) return new TextEncoder().encode(payload.plainText).byteLength;
|
|
66
|
-
if ("data" in payload && payload.data) {
|
|
67
|
-
if (payload.data instanceof Blob) return payload.data.size;
|
|
68
|
-
if (payload.data instanceof Response) {
|
|
69
|
-
const contentLength = payload.data.headers.get("content-length");
|
|
70
|
-
return contentLength ? Number(contentLength) : void 0;
|
|
71
|
-
}
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
if ("buffer" in payload && payload.buffer) return payload.buffer.byteLength;
|
|
75
|
-
if (payload.uint8Array !== void 0) {
|
|
76
|
-
if (Array.isArray(payload.uint8Array)) return payload.uint8Array.length;
|
|
77
|
-
return payload.uint8Array.byteLength;
|
|
78
|
-
}
|
|
79
|
-
if (payload.base64 === void 0) return;
|
|
80
|
-
const raw = getRawBase64(payload.base64).replace(/\s/g, "");
|
|
81
|
-
const padding = raw.endsWith("==") ? 2 : raw.endsWith("=") ? 1 : 0;
|
|
82
|
-
return Math.max(0, Math.floor(raw.length * 3 / 4) - padding);
|
|
83
|
-
};
|
|
84
|
-
const validateAssetPayload = (payload, options) => {
|
|
85
|
-
if ("base64" in payload && payload.base64 !== void 0) {
|
|
86
|
-
const validation = validateBase64PayloadString(payload, options);
|
|
87
|
-
if (!validation.ok) return {
|
|
88
|
-
ok: false,
|
|
89
|
-
error: validation.error
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
const byteLength = getAssetPayloadByteLength(payload);
|
|
93
|
-
if (options?.multipart && !options.isFinal && byteLength !== void 0 && byteLength < 5242880) return {
|
|
94
|
-
ok: false,
|
|
95
|
-
error: MULTIPART_PART_TOO_SMALL_ERROR
|
|
96
|
-
};
|
|
97
|
-
return { ok: true };
|
|
98
|
-
};
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/client/CalmLensUtils.ts
|
|
101
|
-
const assertHttpUrl = (name, value) => {
|
|
102
|
-
if (value === void 0) return;
|
|
103
|
-
let url;
|
|
104
|
-
try {
|
|
105
|
-
url = new URL(value);
|
|
106
|
-
} catch {}
|
|
107
|
-
if (!url || url.protocol !== "https:" && url.protocol !== "http:") throw require_CalmLensError.invalidConfig(`${name} must be an absolute http(s) URL`);
|
|
108
|
-
};
|
|
109
|
-
const assertInteger = (name, value, minimum) => {
|
|
110
|
-
if (value !== void 0 && (!Number.isSafeInteger(value) || value < minimum)) throw require_CalmLensError.invalidConfig(minimum === 0 ? `${name} must be a non-negative integer` : `${name} must be a positive integer`);
|
|
111
|
-
};
|
|
112
|
-
const configPathSegment = (value, name) => {
|
|
113
|
-
try {
|
|
114
|
-
encodePathSegment(value, name);
|
|
115
|
-
} catch (error) {
|
|
116
|
-
throw require_CalmLensError.invalidConfig(error.message.replace(/^\[calmlens\] /, ""));
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
/** Checks the options both clients share: where requests go and how they're sent. */
|
|
120
|
-
const validateConnectionOptions = (options) => {
|
|
121
|
-
if ("requestBackend" in options) throw require_CalmLensError.invalidConfig("requestBackend is no longer supported; pass a fetch implementation as fetch");
|
|
122
|
-
validateRequestOptions(options);
|
|
123
|
-
assertInteger("maxResponseBytes", options.maxResponseBytes, 1);
|
|
124
|
-
for (const name of ["fetch", "uploadFetch"]) if (options[name] !== void 0 && typeof options[name] !== "function") throw require_CalmLensError.invalidConfig(`${name} must be a function`);
|
|
125
|
-
assertHttpUrl("baseUrl", options.baseUrl);
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* Checks server client options before the client sets anything up. `CalmLensServerClient` and
|
|
129
|
-
* `MockCalmLensServerClient` share it so both reject the same configuration.
|
|
130
|
-
*/
|
|
131
|
-
const validateServerClientOptions = (options) => {
|
|
132
|
-
if (!options || typeof options !== "object") throw require_CalmLensError.invalidConfig("Client options are required");
|
|
133
|
-
if (!options.apiKey || typeof options.apiKey !== "string") throw require_CalmLensError.invalidConfig("API key is required");
|
|
134
|
-
if (!options.projectId) throw require_CalmLensError.invalidConfig("Project ID is required");
|
|
135
|
-
configPathSegment(options.projectId, "Project ID");
|
|
136
|
-
validateConnectionOptions(options);
|
|
137
|
-
if (options.cdnFetch !== void 0 && typeof options.cdnFetch !== "function") throw require_CalmLensError.invalidConfig("cdnFetch must be a function");
|
|
138
|
-
assertHttpUrl("cdnBaseUrl", options.cdnBaseUrl);
|
|
139
|
-
};
|
|
140
|
-
/** Checks app client options before the client sets anything up. */
|
|
141
|
-
const validateAppClientOptions = (options) => {
|
|
142
|
-
if (!options || typeof options !== "object") throw require_CalmLensError.invalidConfig("Client options are required");
|
|
143
|
-
if ("apiKey" in options && options.apiKey !== void 0) throw require_CalmLensError.invalidConfig("CalmLensAppClient never takes an API key, which anyone using the browser or app could read. Upload through uploadPresetId, and keep the API key in CalmLensServerClient on your server.");
|
|
144
|
-
if (!options.uploadPresetId) throw require_CalmLensError.invalidConfig("Upload preset ID is required");
|
|
145
|
-
configPathSegment(options.uploadPresetId, "Upload preset ID");
|
|
146
|
-
if (options.token !== void 0 && typeof options.token !== "string" && typeof options.token !== "function") throw require_CalmLensError.invalidConfig("token must be a string or a function that returns one");
|
|
147
|
-
validateConnectionOptions(options);
|
|
148
|
-
};
|
|
149
|
-
/** Checks the options `withRequestOptions` accepts. */
|
|
150
|
-
const validateRequestOptions = (options) => {
|
|
151
|
-
assertInteger("timeoutMs", options.timeoutMs, 1);
|
|
152
|
-
assertInteger("uploadTimeoutMs", options.uploadTimeoutMs, 1);
|
|
153
|
-
assertInteger("maxRetries", options.maxRetries, 0);
|
|
154
|
-
};
|
|
155
|
-
const toTextAssetOptions = ({ text, name, ...options }) => {
|
|
156
|
-
if (typeof text !== "string" || !text.trim()) throw new require_CalmLensError.CalmLensError(require_CalmLensError.API_ERROR_CODES.INVALID_UPLOAD_PAYLOAD, { message: "Text to moderate must be a non-empty string" });
|
|
157
|
-
return {
|
|
158
|
-
...options,
|
|
159
|
-
name: name ?? "text",
|
|
160
|
-
content: {
|
|
161
|
-
plainText: text,
|
|
162
|
-
type: "text/plain"
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
/**
|
|
167
|
-
* A random UUID v4. React Native has no `crypto` global, so this falls back to
|
|
168
|
-
* `crypto.getRandomValues` and then to `Math.random`; the SDK only uses it for idempotency keys,
|
|
169
|
-
* which need to be unique rather than secret.
|
|
170
|
-
*/
|
|
171
|
-
const randomUuid = () => {
|
|
172
|
-
const crypto = globalThis.crypto;
|
|
173
|
-
if (typeof crypto?.randomUUID === "function") return crypto.randomUUID();
|
|
174
|
-
const bytes = /* @__PURE__ */ new Uint8Array(16);
|
|
175
|
-
if (typeof crypto?.getRandomValues === "function") crypto.getRandomValues(bytes);
|
|
176
|
-
else for (let index = 0; index < bytes.length; index++) bytes[index] = Math.random() * 256;
|
|
177
|
-
bytes[6] = bytes[6] & 15 | 64;
|
|
178
|
-
bytes[8] = bytes[8] & 63 | 128;
|
|
179
|
-
const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
180
|
-
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
181
|
-
};
|
|
182
|
-
/**
|
|
183
|
-
* Encodes an identifier as one URL path segment. `.` and `..` are rejected because URL
|
|
184
|
-
* resolution would treat them as relative segments and send the request to another route.
|
|
185
|
-
*/
|
|
186
|
-
const encodePathSegment = (value, name) => {
|
|
187
|
-
if (typeof value !== "string" || !value) throw require_CalmLensError.invalidArgument(`${name} is required`);
|
|
188
|
-
if (value === "." || value === "..") throw require_CalmLensError.invalidArgument(`${name} cannot be "." or ".."`);
|
|
189
|
-
return encodeURIComponent(value);
|
|
190
|
-
};
|
|
191
|
-
const TRANSFORM_TYPE_PATTERN = /^[A-Za-z0-9_]+$/;
|
|
192
|
-
/** Percent-encodes everything except RFC 3986 unreserved characters (`A-Z a-z 0-9 - . _ ~`). */
|
|
193
|
-
const encodeTransformComponent = (value) => encodeURIComponent(value).replace(/[!'()*]/g, (char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
194
|
-
const isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
195
|
-
const appendTransformOptions = (pairs, key, value) => {
|
|
196
|
-
if (value === void 0 || value === null) return;
|
|
197
|
-
if (isPlainObject(value)) {
|
|
198
|
-
for (const child of Object.keys(value).sort()) appendTransformOptions(pairs, `${key}[${child}]`, value[child]);
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
let text;
|
|
202
|
-
if (typeof value === "string") text = value;
|
|
203
|
-
else if (typeof value === "boolean") text = String(value);
|
|
204
|
-
else if (typeof value === "number" && Number.isFinite(value)) text = String(value);
|
|
205
|
-
else throw require_CalmLensError.invalidArgument(`Transform option "${key}" must be a string, number, boolean or object`);
|
|
206
|
-
pairs.push(`${encodeTransformComponent(key)}=${encodeTransformComponent(text)}`);
|
|
207
|
-
};
|
|
208
|
-
/**
|
|
209
|
-
* Serializes structured transforms as a CDN selector, such as
|
|
210
|
-
* `imageTransform[format=png,width=1024]`. Option keys are sorted so equal transforms share a
|
|
211
|
-
* URL; nested keys (`border[color]`) and values are percent-encoded.
|
|
212
|
-
*/
|
|
213
|
-
const serializeTransform = (transform) => {
|
|
214
|
-
const steps = Array.isArray(transform) ? transform : [transform];
|
|
215
|
-
if (steps.length === 0) throw require_CalmLensError.invalidArgument("Transform needs at least one step");
|
|
216
|
-
return steps.map((step) => {
|
|
217
|
-
if (!isPlainObject(step)) throw require_CalmLensError.invalidArgument("Transform steps must be objects");
|
|
218
|
-
if (typeof step.type !== "string" || !TRANSFORM_TYPE_PATTERN.test(step.type)) throw require_CalmLensError.invalidArgument("Transform type must contain only letters, digits and underscores");
|
|
219
|
-
if (step.options !== void 0 && step.options !== null && !isPlainObject(step.options)) throw require_CalmLensError.invalidArgument("Transform options must be an object");
|
|
220
|
-
const pairs = [];
|
|
221
|
-
for (const key of Object.keys(step.options ?? {}).sort()) appendTransformOptions(pairs, key, step.options[key]);
|
|
222
|
-
return `${step.type}[${pairs.join(",")}]`;
|
|
223
|
-
}).join(",");
|
|
224
|
-
};
|
|
225
|
-
/** Returns the selector string the API and CDN accept for a string or structured transform. */
|
|
226
|
-
const transformSelector = (transform) => transform === void 0 || typeof transform === "string" ? transform : serializeTransform(transform);
|
|
227
|
-
/** Appends a CDN lens (`/@name`) or direct transform selector to an asset URL. */
|
|
228
|
-
const appendCdnSelector = (url, options) => {
|
|
229
|
-
if (options.lens && options.transform) throw require_CalmLensError.invalidArgument("Specify either a lens or a transform, not both");
|
|
230
|
-
if (options.lens) return `${url}/@${encodePathSegment(options.lens, "Lens")}`;
|
|
231
|
-
if (!options.transform) return url;
|
|
232
|
-
if (typeof options.transform !== "string") return `${url}/${serializeTransform(options.transform)}`;
|
|
233
|
-
const transform = options.transform.replace(/^\/+/, "");
|
|
234
|
-
if (transform.includes("..") || transform.includes("?") || transform.includes("#")) throw require_CalmLensError.invalidArgument("Transform cannot contain \"..\", \"?\" or \"#\"");
|
|
235
|
-
return `${url}/${encodeURI(transform).replace(/%5B/g, "[").replace(/%5D/g, "]")}`;
|
|
236
|
-
};
|
|
237
|
-
const appendQueryValue = (parts, key, value) => {
|
|
238
|
-
if (value === void 0 || value === null) return;
|
|
239
|
-
if (Array.isArray(value)) {
|
|
240
|
-
for (const [index, item] of value.entries()) appendQueryValue(parts, `${key}[${index}]`, item);
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
if (typeof value === "object") {
|
|
244
|
-
for (const [field, item] of Object.entries(value)) appendQueryValue(parts, `${key}[${field}]`, item);
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
248
|
-
};
|
|
249
|
-
/**
|
|
250
|
-
* Serialises a query object the way the API parses it (qs bracket notation), for example
|
|
251
|
-
* `ordering[0][field]=createdAt&ordering[0][direction]=DESC`. Every key and value is
|
|
252
|
-
* percent-encoded and missing values are omitted.
|
|
253
|
-
*/
|
|
254
|
-
const stringifyQuery = (query) => {
|
|
255
|
-
const parts = [];
|
|
256
|
-
for (const [key, value] of Object.entries(query)) appendQueryValue(parts, key, value);
|
|
257
|
-
return parts.join("&");
|
|
258
|
-
};
|
|
259
|
-
//#endregion
|
|
260
|
-
Object.defineProperty(exports, "DOMAIN", {
|
|
261
|
-
enumerable: true,
|
|
262
|
-
get: function() {
|
|
263
|
-
return DOMAIN;
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
Object.defineProperty(exports, "MAX_IMAGE_UPLOAD_BYTES", {
|
|
267
|
-
enumerable: true,
|
|
268
|
-
get: function() {
|
|
269
|
-
return MAX_IMAGE_UPLOAD_BYTES;
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
Object.defineProperty(exports, "MIN_MULTIPART_IMAGE_UPLOAD_BYTES", {
|
|
273
|
-
enumerable: true,
|
|
274
|
-
get: function() {
|
|
275
|
-
return MIN_MULTIPART_IMAGE_UPLOAD_BYTES;
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
Object.defineProperty(exports, "appendCdnSelector", {
|
|
279
|
-
enumerable: true,
|
|
280
|
-
get: function() {
|
|
281
|
-
return appendCdnSelector;
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
Object.defineProperty(exports, "assetDataToUint8Array", {
|
|
285
|
-
enumerable: true,
|
|
286
|
-
get: function() {
|
|
287
|
-
return assetDataToUint8Array;
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
Object.defineProperty(exports, "assetToData", {
|
|
291
|
-
enumerable: true,
|
|
292
|
-
get: function() {
|
|
293
|
-
return assetToData;
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
Object.defineProperty(exports, "encodePathSegment", {
|
|
297
|
-
enumerable: true,
|
|
298
|
-
get: function() {
|
|
299
|
-
return encodePathSegment;
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
Object.defineProperty(exports, "getAssetPayloadByteLength", {
|
|
303
|
-
enumerable: true,
|
|
304
|
-
get: function() {
|
|
305
|
-
return getAssetPayloadByteLength;
|
|
306
|
-
}
|
|
307
|
-
});
|
|
308
|
-
Object.defineProperty(exports, "getRejectedUploadMimeTypeError", {
|
|
309
|
-
enumerable: true,
|
|
310
|
-
get: function() {
|
|
311
|
-
return getRejectedUploadMimeTypeError;
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
Object.defineProperty(exports, "isRejectedUploadMimeType", {
|
|
315
|
-
enumerable: true,
|
|
316
|
-
get: function() {
|
|
317
|
-
return isRejectedUploadMimeType;
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
Object.defineProperty(exports, "randomUuid", {
|
|
321
|
-
enumerable: true,
|
|
322
|
-
get: function() {
|
|
323
|
-
return randomUuid;
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
Object.defineProperty(exports, "stringifyQuery", {
|
|
327
|
-
enumerable: true,
|
|
328
|
-
get: function() {
|
|
329
|
-
return stringifyQuery;
|
|
330
|
-
}
|
|
331
|
-
});
|
|
332
|
-
Object.defineProperty(exports, "toTextAssetOptions", {
|
|
333
|
-
enumerable: true,
|
|
334
|
-
get: function() {
|
|
335
|
-
return toTextAssetOptions;
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
Object.defineProperty(exports, "transformSelector", {
|
|
339
|
-
enumerable: true,
|
|
340
|
-
get: function() {
|
|
341
|
-
return transformSelector;
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
Object.defineProperty(exports, "validateAppClientOptions", {
|
|
345
|
-
enumerable: true,
|
|
346
|
-
get: function() {
|
|
347
|
-
return validateAppClientOptions;
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
|
-
Object.defineProperty(exports, "validateAssetPayload", {
|
|
351
|
-
enumerable: true,
|
|
352
|
-
get: function() {
|
|
353
|
-
return validateAssetPayload;
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
Object.defineProperty(exports, "validateRequestOptions", {
|
|
357
|
-
enumerable: true,
|
|
358
|
-
get: function() {
|
|
359
|
-
return validateRequestOptions;
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
Object.defineProperty(exports, "validateServerClientOptions", {
|
|
363
|
-
enumerable: true,
|
|
364
|
-
get: function() {
|
|
365
|
-
return validateServerClientOptions;
|
|
366
|
-
}
|
|
367
|
-
});
|