calmlens 0.37.0 → 0.38.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/bin/calmlens.js +31 -9
- package/cjs/{BrowserUpload-BOXt-BFy.js → BrowserUpload-BO_ZukUM.js} +1 -1
- package/{esm/BrowserUpload-CuG3tWSo.d.ts → cjs/BrowserUpload-BuTS7yTy.d.ts} +2 -2
- package/cjs/{CalmLensAppClient-Bt9GNyqS.js → CalmLensAppClient-DoNMg8Dh.js} +3 -3
- package/{esm/CalmLensAppClient-QqtovWE-.d.ts → cjs/CalmLensAppClient-L5x_sMOI.d.ts} +1 -1
- package/cjs/{CalmLensCdn-D4I4Km4j.js → CalmLensCdn-B_Tbwq10.js} +2 -2
- package/cjs/{CalmLensConnection-knkk2-BW.js → CalmLensConnection-Dhg1amnb.js} +25 -12
- package/cjs/{CalmLensError-ifj5rLmk.js → CalmLensError-C9g7GXfU.js} +7 -2
- package/{esm/CalmLensServerClient-csSQqHBt.d.ts → cjs/CalmLensServerClient-2H0ZpJlr.d.ts} +5 -5
- package/cjs/{CalmLensServerClient--L5qRzFd.js → CalmLensServerClient-D0wCcQNn.js} +16 -6
- package/cjs/{CalmLensTypes-_f7QVRtO.d.ts → CalmLensTypes-CCsoVr39.d.ts} +4 -4
- package/cjs/{Core-4iFxKJnY.d.ts → Core-B110Ug8_.d.ts} +2 -2
- package/cjs/{Core-CNsji7uR.js → Core-iNgZ8Cij.js} +3 -3
- package/cjs/{ReactUpload-DfioGW58.js → ReactUpload-BS8bYIhv.js} +1 -1
- package/cjs/{ReactUpload-4qd2xACg.d.ts → ReactUpload-CbtQtN6v.d.ts} +1 -1
- package/cjs/{UploadController-B-a2r2kN.js → UploadController-CVKtUCK0.js} +2 -2
- package/{esm/WebhookPayload-BJtggTLd.d.ts → cjs/WebhookPayload-_fvY2eu8.d.ts} +5 -3
- package/cjs/app.d.ts +4 -4
- package/cjs/app.js +3 -3
- package/cjs/elements.d.ts +4 -4
- package/cjs/elements.js +4 -4
- package/cjs/{index-IEA75nev.d.ts → index-Dk3I5YXf.d.ts} +2 -2
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +2 -2
- package/cjs/react-native.d.ts +2 -2
- package/cjs/react-native.js +4 -4
- package/cjs/react.d.ts +4 -4
- package/cjs/react.js +5 -5
- package/cjs/server.d.ts +4 -4
- package/cjs/server.js +3 -3
- package/cjs/{CalmLensTestInputArguments-C6S09FVQ.js → test-inputs-BVJZjtFd.js} +156 -16
- package/cjs/{TestTriggers-CjDhhz78.d.ts → test-inputs-JaZaV9Up.d.ts} +20 -1
- package/cjs/test-inputs.d.ts +2 -18
- package/cjs/test-inputs.js +15 -126
- package/cjs/testing.d.ts +13 -15
- package/cjs/testing.js +55 -68
- package/cjs/{ui-BMQW3Hse.d.ts → ui--E_s-cDd.d.ts} +2 -2
- package/cjs/{ui-DOkuD90x.js → ui-CuO37F4u.js} +2 -2
- package/cjs/ui.d.ts +2 -2
- package/cjs/ui.js +3 -3
- package/cjs/vue.d.ts +5 -5
- package/cjs/vue.js +4 -4
- package/{cjs/BrowserUpload-CuG3tWSo.d.ts → esm/BrowserUpload-BuTS7yTy.d.ts} +2 -2
- package/esm/{BrowserUpload-Ch67b69G.js → BrowserUpload-DxgiUXC2.js} +1 -1
- package/esm/{CalmLensAppClient-DEFSQC15.js → CalmLensAppClient-C7ScAfRx.js} +3 -3
- package/{cjs/CalmLensAppClient-QqtovWE-.d.ts → esm/CalmLensAppClient-L5x_sMOI.d.ts} +1 -1
- package/esm/{CalmLensCdn-xvzJyv9X.js → CalmLensCdn-CW5Fn3ph.js} +2 -2
- package/esm/{CalmLensConnection-D6BVOMri.js → CalmLensConnection-Blv8JyLF.js} +25 -12
- package/esm/{CalmLensError-C15tWu8W.js → CalmLensError-DjkibkdI.js} +7 -2
- package/{cjs/CalmLensServerClient-csSQqHBt.d.ts → esm/CalmLensServerClient-2H0ZpJlr.d.ts} +5 -5
- package/esm/{CalmLensServerClient-BGz_olSn.js → CalmLensServerClient-C7n6EzVd.js} +16 -6
- package/esm/{CalmLensTypes-_f7QVRtO.d.ts → CalmLensTypes-CCsoVr39.d.ts} +4 -4
- package/esm/{Core-4iFxKJnY.d.ts → Core-B110Ug8_.d.ts} +2 -2
- package/esm/{Core-Cj91IL4-.js → Core-BRrPxS4i.js} +3 -3
- package/esm/{ReactUpload-Bg4-5rV2.js → ReactUpload-BGPktblV.js} +1 -1
- package/esm/{ReactUpload-4qd2xACg.d.ts → ReactUpload-CbtQtN6v.d.ts} +1 -1
- package/esm/{UploadController-CpLvD8W-.js → UploadController-CQ4NouIU.js} +2 -2
- package/{cjs/WebhookPayload-BJtggTLd.d.ts → esm/WebhookPayload-_fvY2eu8.d.ts} +5 -3
- package/esm/app.d.ts +4 -4
- package/esm/app.js +3 -3
- package/esm/elements.d.ts +4 -4
- package/esm/elements.js +4 -4
- package/esm/{index-IEA75nev.d.ts → index-Dk3I5YXf.d.ts} +2 -2
- package/esm/index.d.ts +3 -3
- package/esm/index.js +2 -2
- package/esm/react-native.d.ts +2 -2
- package/esm/react-native.js +4 -4
- package/esm/react.d.ts +4 -4
- package/esm/react.js +5 -5
- package/esm/server.d.ts +4 -4
- package/esm/server.js +3 -3
- package/esm/{CalmLensTestInputArguments-DS_3mt1C.js → test-inputs-DizPp8_w.js} +145 -5
- package/esm/{TestTriggers-CjDhhz78.d.ts → test-inputs-JaZaV9Up.d.ts} +20 -1
- package/esm/test-inputs.d.ts +2 -18
- package/esm/test-inputs.js +1 -115
- package/esm/testing.d.ts +13 -15
- package/esm/testing.js +44 -57
- package/esm/{ui-BMQW3Hse.d.ts → ui--E_s-cDd.d.ts} +2 -2
- package/esm/{ui-CGrWIVKa.js → ui-B-QOHuVI.js} +2 -2
- package/esm/ui.d.ts +2 -2
- package/esm/ui.js +3 -3
- package/esm/vue.d.ts +5 -5
- package/esm/vue.js +4 -4
- package/package.json +1 -1
package/bin/calmlens.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
// package.json
|
|
6
|
-
var version = "0.
|
|
6
|
+
var version = "0.38.0";
|
|
7
7
|
|
|
8
8
|
// src/contract/ModerationCategories-CHFRoeWV.js
|
|
9
9
|
var CLASSIFICATION_CATEGORIES = [
|
|
@@ -79,6 +79,7 @@ var API_ERROR_CODES = {
|
|
|
79
79
|
IDEMPOTENT_REQUEST_IN_PROGRESS: "idempotency/request-in-progress",
|
|
80
80
|
NO_RENDERED_VERSION: "asset/no-rendered-version",
|
|
81
81
|
ASSET_NOT_FOUND: "asset/not-found",
|
|
82
|
+
ASSET_NOT_AVAILABLE: "asset/not-available",
|
|
82
83
|
PROJECT_NOT_FOUND: "project/not-found",
|
|
83
84
|
ASSET_CHILD_NOT_DELETABLE: "asset/child-not-deletable",
|
|
84
85
|
ASSET_REVIEW_CHANGED: "asset/review-changed",
|
|
@@ -2461,25 +2462,40 @@ class CalmLensConnection {
|
|
|
2461
2462
|
authHeaders = {},
|
|
2462
2463
|
partPath,
|
|
2463
2464
|
onStarted,
|
|
2465
|
+
resumes = false,
|
|
2464
2466
|
retrieve
|
|
2465
2467
|
}) {
|
|
2466
2468
|
const { content, idempotencyKey, ...fields } = options;
|
|
2467
2469
|
const source = getSplittableContent(content);
|
|
2468
2470
|
const partSize = this.partSizeBytes;
|
|
2469
2471
|
const count = Math.ceil(source.size / partSize);
|
|
2470
|
-
const
|
|
2472
|
+
const explicitKey = idempotencyKey ?? this.call.idempotencyKey;
|
|
2473
|
+
const key = explicitKey ?? newIdempotencyKey();
|
|
2471
2474
|
const part = (partNumber) => source.slice((partNumber - 1) * partSize, Math.min(partNumber * partSize, source.size));
|
|
2472
|
-
const
|
|
2475
|
+
const sendFirst = (payload, headers) => this.submitUpload(uploadsPath, {
|
|
2473
2476
|
...fields,
|
|
2474
|
-
part: {
|
|
2477
|
+
part: {
|
|
2478
|
+
...payload,
|
|
2479
|
+
type: content.type,
|
|
2480
|
+
sizeInBytes: Math.min(partSize, source.size),
|
|
2481
|
+
partNumber: 1,
|
|
2482
|
+
isFinal: false
|
|
2483
|
+
},
|
|
2475
2484
|
totalSizeInBytes: source.size,
|
|
2476
2485
|
idempotencyKey: key
|
|
2477
|
-
}, wait,
|
|
2478
|
-
const
|
|
2486
|
+
}, wait, headers);
|
|
2487
|
+
const existing = resumes && explicitKey ? await sendFirst({ uint8Array: new Uint8Array(0) }, { ...authHeaders, "Idempotency-Replay-Only": "true" }) : undefined;
|
|
2488
|
+
const first = existing ?? await sendFirst(part(1), authHeaders);
|
|
2489
|
+
const uploaded = expectUploadedAsset(first);
|
|
2490
|
+
const assetId = uploaded.id;
|
|
2479
2491
|
onStarted?.(assetId);
|
|
2492
|
+
if (existing && uploaded.upload.status === "completed")
|
|
2493
|
+
return first;
|
|
2480
2494
|
const laterParts = this.withCall({ extraBody: undefined });
|
|
2481
2495
|
let result = first;
|
|
2482
|
-
|
|
2496
|
+
const received = uploaded.upload.partsReceived;
|
|
2497
|
+
const nextPart = typeof received === "number" && received >= 2 && received < count ? received + 1 : 2;
|
|
2498
|
+
for (let partNumber = nextPart;partNumber <= count; ) {
|
|
2483
2499
|
const isFinal = partNumber === count;
|
|
2484
2500
|
try {
|
|
2485
2501
|
result = await laterParts.uploadPart(partPath(assetId), {
|
|
@@ -2811,6 +2827,7 @@ class CalmLensServerClient {
|
|
|
2811
2827
|
if ("content" in body && splitsIntoParts(body.content, connection.partSizeBytes)) {
|
|
2812
2828
|
return expectAsset(await connection.submitInParts(uploadsPath, body, wait, {
|
|
2813
2829
|
partPath: (assetId) => `/assets/${encodeURIComponent(assetId)}/part`,
|
|
2830
|
+
resumes: true,
|
|
2814
2831
|
retrieve: (assetId, read) => read.json("GET", `/assets/${requireId(assetId, "Asset ID")}`)
|
|
2815
2832
|
}));
|
|
2816
2833
|
}
|
|
@@ -3193,8 +3210,14 @@ class CalmLensServerClient {
|
|
|
3193
3210
|
});
|
|
3194
3211
|
}
|
|
3195
3212
|
async#submitEnsureLenses(options, requestOptions) {
|
|
3213
|
+
const key = requestOptions?.idempotencyKey;
|
|
3214
|
+
const chunked = options.length > ENSURE_LENSES_MAX_PER_REQUEST;
|
|
3215
|
+
if (chunked && (key?.length ?? 0) > MAX_SPLIT_IDEMPOTENCY_KEY_LENGTH) {
|
|
3216
|
+
throw invalidArgument(`idempotencyKey can be at most ${MAX_SPLIT_IDEMPOTENCY_KEY_LENGTH} characters for lenses sent in several requests`);
|
|
3217
|
+
}
|
|
3196
3218
|
for (let start = 0;start < options.length; start += ENSURE_LENSES_MAX_PER_REQUEST) {
|
|
3197
|
-
|
|
3219
|
+
const chunk = start / ENSURE_LENSES_MAX_PER_REQUEST + 1;
|
|
3220
|
+
await this.#submitEnsureLensesChunk(options.slice(start, start + ENSURE_LENSES_MAX_PER_REQUEST), key && chunked ? { ...requestOptions, idempotencyKey: `${key}:chunk-${chunk}` } : requestOptions);
|
|
3198
3221
|
}
|
|
3199
3222
|
}
|
|
3200
3223
|
async#submitEnsureLensesChunk(options, requestOptions) {
|
|
@@ -10351,7 +10374,6 @@ async function withValidTestInputArguments(key, generate) {
|
|
|
10351
10374
|
throw error;
|
|
10352
10375
|
}
|
|
10353
10376
|
}
|
|
10354
|
-
|
|
10355
10377
|
// src/test-inputs.ts
|
|
10356
10378
|
var generateTestTextCode2 = (scenario, key) => withValidTestInputArguments(key, () => generateTestTextCode(scenario, key));
|
|
10357
10379
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_UploadController = require("./UploadController-CVKtUCK0.js");
|
|
2
2
|
// src/ui/BrowserUpload.ts
|
|
3
3
|
/** Creates an upload queue for the browser components, such as one a form starts on submit. */
|
|
4
4
|
const createUploadController = (options) => require_UploadController.createUploadController(options);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as UploadFile, I as UploadItem$1, L as UploadSnapshot$1, N as UploadController, P as UploadControllerOptions$1, h as UploaderProps$1, k as CalmLensUpload$1 } from "./Core-
|
|
2
|
-
import { r as UseCalmLensUploadResult$1 } from "./ReactUpload-
|
|
1
|
+
import { F as UploadFile, I as UploadItem$1, L as UploadSnapshot$1, N as UploadController, P as UploadControllerOptions$1, h as UploaderProps$1, k as CalmLensUpload$1 } from "./Core-B110Ug8_.js";
|
|
2
|
+
import { r as UseCalmLensUploadResult$1 } from "./ReactUpload-CbtQtN6v.js";
|
|
3
3
|
type UploadItem<F extends UploadFile = File> = UploadItem$1<F>;
|
|
4
4
|
type CalmLensUpload<F extends UploadFile = File> = CalmLensUpload$1<F>;
|
|
5
5
|
type UploadSnapshot<F extends UploadFile = File> = UploadSnapshot$1<F>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_CalmLensError = require("./CalmLensError-
|
|
2
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
3
|
-
const require_CalmLensConnection = require("./CalmLensConnection-
|
|
1
|
+
const require_CalmLensError = require("./CalmLensError-C9g7GXfU.js");
|
|
2
|
+
const require_CalmLensCdn = require("./CalmLensCdn-B_Tbwq10.js");
|
|
3
|
+
const require_CalmLensConnection = require("./CalmLensConnection-Dhg1amnb.js");
|
|
4
4
|
// src/client/CalmLensAppClient.ts
|
|
5
5
|
const inspectSymbol = Symbol.for("nodejs.util.inspect.custom");
|
|
6
6
|
/** `options`, once `checkOptionKeys` finds only keys `operation` takes. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as CdnAssetUrlOptions, O as CalmLensAppClientOptions, Rt as RequestOptions, Vt as RetrieveAssetOptions, an as UploadAssetPartOptions, ln as UploadPresetSubmitAssetOptions, un as UploadedAsset } from "./CalmLensTypes-
|
|
1
|
+
import { M as CdnAssetUrlOptions, O as CalmLensAppClientOptions, Rt as RequestOptions, Vt as RetrieveAssetOptions, an as UploadAssetPartOptions, ln as UploadPresetSubmitAssetOptions, un as UploadedAsset } from "./CalmLensTypes-CCsoVr39.js";
|
|
2
2
|
declare const inspectSymbol: unique symbol;
|
|
3
3
|
/**
|
|
4
4
|
* The CalmLens client for browsers and React Native apps. It uploads through an upload preset,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_CalmLensError = require("./CalmLensError-
|
|
1
|
+
const require_CalmLensError = require("./CalmLensError-C9g7GXfU.js");
|
|
2
2
|
// src/client/CalmLensLogging.ts
|
|
3
3
|
const LOG_LEVELS = [
|
|
4
4
|
"off",
|
|
@@ -152,7 +152,7 @@ const listPages = (fetchPage, { cursor, feed = false } = {}) => {
|
|
|
152
152
|
};
|
|
153
153
|
// src/client/CalmLensVersion.ts
|
|
154
154
|
/** This SDK's version, from its package.json. */
|
|
155
|
-
const SDK_VERSION = "0.
|
|
155
|
+
const SDK_VERSION = "0.38.0";
|
|
156
156
|
const runtimeName = () => {
|
|
157
157
|
const runtime = globalThis;
|
|
158
158
|
if (isReactNativeRuntime()) return "react-native";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_CalmLensError = require("./CalmLensError-
|
|
2
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
1
|
+
const require_CalmLensError = require("./CalmLensError-C9g7GXfU.js");
|
|
2
|
+
const require_CalmLensCdn = require("./CalmLensCdn-B_Tbwq10.js");
|
|
3
3
|
// src/contract/AssetPayload.js
|
|
4
4
|
const bufferInputToBytes = (value) => {
|
|
5
5
|
if (value instanceof ArrayBuffer) return new Uint8Array(value);
|
|
@@ -915,33 +915,46 @@ var CalmLensConnection = class CalmLensConnection {
|
|
|
915
915
|
/**
|
|
916
916
|
* Uploads content larger than `partSizeBytes` in parts: the first to `uploadsPath` with the
|
|
917
917
|
* upload's fields, the rest to `partPath(assetId)`. Each part carries its own Idempotency-Key
|
|
918
|
-
* (`<key>:part-<n>`), so it is retried safely
|
|
919
|
-
*
|
|
920
|
-
*
|
|
918
|
+
* (`<key>:part-<n>`), so it is retried safely. With `resumes`, a repeated call with the same
|
|
919
|
+
* explicit key resumes the upload: it first asks which parts the API has, with the first part's
|
|
920
|
+
* options and an empty file (`Idempotency-Replay-Only`), and sends only the missing parts. A
|
|
921
|
+
* part the API already has is skipped, and a final part that finds the upload already completed
|
|
922
|
+
* reads it back with `retrieve`.
|
|
921
923
|
*/
|
|
922
|
-
async submitInParts(uploadsPath, options, wait, { authHeaders = {}, partPath, onStarted, retrieve }) {
|
|
924
|
+
async submitInParts(uploadsPath, options, wait, { authHeaders = {}, partPath, onStarted, resumes = false, retrieve }) {
|
|
923
925
|
const { content, idempotencyKey, ...fields } = options;
|
|
924
926
|
const source = getSplittableContent(content);
|
|
925
927
|
const partSize = this.partSizeBytes;
|
|
926
928
|
const count = Math.ceil(source.size / partSize);
|
|
927
|
-
const
|
|
929
|
+
const explicitKey = idempotencyKey ?? this.call.idempotencyKey;
|
|
930
|
+
const key = explicitKey ?? newIdempotencyKey();
|
|
928
931
|
const part = (partNumber) => source.slice((partNumber - 1) * partSize, Math.min(partNumber * partSize, source.size));
|
|
929
|
-
const
|
|
932
|
+
const sendFirst = (payload, headers) => this.submitUpload(uploadsPath, {
|
|
930
933
|
...fields,
|
|
931
934
|
part: {
|
|
932
|
-
...
|
|
935
|
+
...payload,
|
|
933
936
|
type: content.type,
|
|
937
|
+
sizeInBytes: Math.min(partSize, source.size),
|
|
934
938
|
partNumber: 1,
|
|
935
939
|
isFinal: false
|
|
936
940
|
},
|
|
937
941
|
totalSizeInBytes: source.size,
|
|
938
942
|
idempotencyKey: key
|
|
939
|
-
}, wait,
|
|
940
|
-
const
|
|
943
|
+
}, wait, headers);
|
|
944
|
+
const existing = resumes && explicitKey ? await sendFirst({ uint8Array: /* @__PURE__ */ new Uint8Array(0) }, {
|
|
945
|
+
...authHeaders,
|
|
946
|
+
"Idempotency-Replay-Only": "true"
|
|
947
|
+
}) : void 0;
|
|
948
|
+
const first = existing ?? await sendFirst(part(1), authHeaders);
|
|
949
|
+
const uploaded = expectUploadedAsset(first);
|
|
950
|
+
const assetId = uploaded.id;
|
|
941
951
|
onStarted?.(assetId);
|
|
952
|
+
if (existing && uploaded.upload.status === "completed") return first;
|
|
942
953
|
const laterParts = this.withCall({ extraBody: void 0 });
|
|
943
954
|
let result = first;
|
|
944
|
-
|
|
955
|
+
const received = uploaded.upload.partsReceived;
|
|
956
|
+
const nextPart = typeof received === "number" && received >= 2 && received < count ? received + 1 : 2;
|
|
957
|
+
for (let partNumber = nextPart; partNumber <= count;) {
|
|
945
958
|
const isFinal = partNumber === count;
|
|
946
959
|
try {
|
|
947
960
|
result = await laterParts.uploadPart(partPath(assetId), {
|
|
@@ -55,6 +55,7 @@ const API_ERROR_CODES = {
|
|
|
55
55
|
IDEMPOTENT_REQUEST_IN_PROGRESS: "idempotency/request-in-progress",
|
|
56
56
|
NO_RENDERED_VERSION: "asset/no-rendered-version",
|
|
57
57
|
ASSET_NOT_FOUND: "asset/not-found",
|
|
58
|
+
ASSET_NOT_AVAILABLE: "asset/not-available",
|
|
58
59
|
PROJECT_NOT_FOUND: "project/not-found",
|
|
59
60
|
ASSET_CHILD_NOT_DELETABLE: "asset/child-not-deletable",
|
|
60
61
|
ASSET_REVIEW_CHANGED: "asset/review-changed",
|
|
@@ -341,6 +342,10 @@ const API_ERROR_DEFINITIONS = {
|
|
|
341
342
|
status: 404,
|
|
342
343
|
message: "Asset not found"
|
|
343
344
|
},
|
|
345
|
+
"asset/not-available": {
|
|
346
|
+
status: 403,
|
|
347
|
+
message: "This asset isn't available to this viewer: it may still be uploading or awaiting moderation, or its delivery is blocked or restricted."
|
|
348
|
+
},
|
|
344
349
|
"project/not-found": {
|
|
345
350
|
status: 404,
|
|
346
351
|
message: "Project not found"
|
|
@@ -784,8 +789,8 @@ var CalmLensError = class CalmLensError extends Error {
|
|
|
784
789
|
/**
|
|
785
790
|
* Whether repeating the same request may succeed: transport failures, timeouts (a request's
|
|
786
791
|
* `timeoutMs` or `waitForDecision`'s deadline), throttling (429), internal and gateway errors (500, 502, 503, 504)
|
|
787
|
-
* and idempotent requests still in progress. Only repeat a create
|
|
788
|
-
* `idempotencyKey`.
|
|
792
|
+
* and idempotent requests still in progress. Only repeat a write (a create, upload, change or
|
|
793
|
+
* delete) with the same `idempotencyKey`.
|
|
789
794
|
*/
|
|
790
795
|
isRetryable() {
|
|
791
796
|
return RETRYABLE_CODES.has(this.code) || this.status !== void 0 && RETRYABLE_STATUSES.has(this.status);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as HashList, l as HashListEntry } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $t as UpdateFolderOptions, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, Ct as ListPoliciesOptions, D as BatchAssetsResponse, E as BatchAssetsOptions, Et as MoveFolderOptions, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gt as SignAssetUrlOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Nt as ProjectSettingsResource, P as CdnServeOptions, Qt as UpdateAssetOptions, Rn as Folder, Rt as RequestOptions, St as ListLensesOptions, T as AssignPolicyOptions, Tt as MoveAssetOptions, U as CreatePolicyOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Z as EnsureUploadPresetsResponse, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bt as ListHashListEntriesOptions, cn as UploadPresetPage, ct as HashListIdOptions, dn as VerifyWebhookSignatureOptions, en as UpdateHashListOptions, ft as Lens, gt as ListAssetTimelineOptions, ht as ListAssetChildrenOptions, in as UpgradePolicyOptions, it as FolderPage, jt as PolicyPage, k as CalmLensServerClientOptions, kt as Policy, lt as HashListPage, mt as LensPage, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, ot as HashListEntryIdOptions, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, v as AssetSearchResponse, vt as ListEventsOptions, wt as ListUploadPresetsOptions, xt as ListHashListsOptions, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zt as ResetPolicyOptions } from "./CalmLensTypes-
|
|
3
|
-
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-
|
|
2
|
+
import { $t as UpdateFolderOptions, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, Ct as ListPoliciesOptions, D as BatchAssetsResponse, E as BatchAssetsOptions, Et as MoveFolderOptions, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gt as SignAssetUrlOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Nt as ProjectSettingsResource, P as CdnServeOptions, Qt as UpdateAssetOptions, Rn as Folder, Rt as RequestOptions, St as ListLensesOptions, T as AssignPolicyOptions, Tt as MoveAssetOptions, U as CreatePolicyOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Z as EnsureUploadPresetsResponse, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bt as ListHashListEntriesOptions, cn as UploadPresetPage, ct as HashListIdOptions, dn as VerifyWebhookSignatureOptions, en as UpdateHashListOptions, ft as Lens, gt as ListAssetTimelineOptions, ht as ListAssetChildrenOptions, in as UpgradePolicyOptions, it as FolderPage, jt as PolicyPage, k as CalmLensServerClientOptions, kt as Policy, lt as HashListPage, mt as LensPage, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, ot as HashListEntryIdOptions, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, v as AssetSearchResponse, vt as ListEventsOptions, wt as ListUploadPresetsOptions, xt as ListHashListsOptions, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zt as ResetPolicyOptions } from "./CalmLensTypes-CCsoVr39.js";
|
|
3
|
+
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-_fvY2eu8.js";
|
|
4
4
|
interface TransportRequest {
|
|
5
5
|
/** The client method sending the request, such as `assets.retrieve`, for hooks and logs. */
|
|
6
6
|
operation?: string;
|
|
@@ -8,7 +8,7 @@ interface TransportRequest {
|
|
|
8
8
|
url: string;
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
10
|
body?: BodyInit | null;
|
|
11
|
-
/** Sent as `Idempotency-Key`; it also makes a
|
|
11
|
+
/** Sent as `Idempotency-Key`; it also makes a write safe to retry. */
|
|
12
12
|
idempotencyKey?: string;
|
|
13
13
|
/** Deadline per attempt in milliseconds, or undefined for none. */
|
|
14
14
|
timeoutMs?: number;
|
|
@@ -214,8 +214,8 @@ declare class CalmLensServerClient {
|
|
|
214
214
|
* another (`asset/child-not-deletable`), or nothing is queued. Resolves with
|
|
215
215
|
* `{ batchId, status: "queued", assetCount }` once queued; the work runs in the background
|
|
216
216
|
* and records `asset.deleted` or `asset.content-removed` for each asset, with a `batch-id`
|
|
217
|
-
* fact naming `batchId`. Assets under a safety hold are skipped.
|
|
218
|
-
* `
|
|
217
|
+
* fact naming `batchId`. Assets under a safety hold are skipped. Retried only with an
|
|
218
|
+
* `idempotencyKey` request option.
|
|
219
219
|
*/
|
|
220
220
|
batch: (options: BatchAssetsOptions, requestOptions?: RequestOptions) => Promise<CalmLensResponse<BatchAssetsResponse>>;
|
|
221
221
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_CalmLensError = require("./CalmLensError-
|
|
2
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
3
|
-
const require_CalmLensConnection = require("./CalmLensConnection-
|
|
1
|
+
const require_CalmLensError = require("./CalmLensError-C9g7GXfU.js");
|
|
2
|
+
const require_CalmLensCdn = require("./CalmLensCdn-B_Tbwq10.js");
|
|
3
|
+
const require_CalmLensConnection = require("./CalmLensConnection-Dhg1amnb.js");
|
|
4
4
|
const require_CryptoUtils_BLCa_oZe = require("./CryptoUtils-BLCa-oZe-leCkr1ko.js");
|
|
5
5
|
// src/contract/JsonUtils.js
|
|
6
6
|
const stringifyJsonCanonical = (value) => JSON.stringify(value, (_key, nestedValue) => {
|
|
@@ -399,6 +399,7 @@ var CalmLensServerClient = class {
|
|
|
399
399
|
const uploadsPath = `${this.#projectPath}/assets`;
|
|
400
400
|
if ("content" in body && require_CalmLensConnection.splitsIntoParts(body.content, connection.partSizeBytes)) return require_CalmLensConnection.expectAsset(await connection.submitInParts(uploadsPath, body, wait, {
|
|
401
401
|
partPath: (assetId) => `/assets/${encodeURIComponent(assetId)}/part`,
|
|
402
|
+
resumes: true,
|
|
402
403
|
retrieve: (assetId, read) => read.json("GET", `/assets/${requireId(assetId, "Asset ID")}`)
|
|
403
404
|
}));
|
|
404
405
|
if ("content" in body || "part" in body) return require_CalmLensConnection.expectAsset(await connection.submitUpload(uploadsPath, body, wait));
|
|
@@ -653,8 +654,8 @@ sign: async (options) => {
|
|
|
653
654
|
* another (`asset/child-not-deletable`), or nothing is queued. Resolves with
|
|
654
655
|
* `{ batchId, status: "queued", assetCount }` once queued; the work runs in the background
|
|
655
656
|
* and records `asset.deleted` or `asset.content-removed` for each asset, with a `batch-id`
|
|
656
|
-
* fact naming `batchId`. Assets under a safety hold are skipped.
|
|
657
|
-
* `
|
|
657
|
+
* fact naming `batchId`. Assets under a safety hold are skipped. Retried only with an
|
|
658
|
+
* `idempotencyKey` request option.
|
|
658
659
|
*/
|
|
659
660
|
batch: async (options, requestOptions) => {
|
|
660
661
|
const { assetIds, operation } = checked("assets.batch", options);
|
|
@@ -935,7 +936,16 @@ sign: async (options) => {
|
|
|
935
936
|
});
|
|
936
937
|
}
|
|
937
938
|
async #submitEnsureLenses(options, requestOptions) {
|
|
938
|
-
|
|
939
|
+
const key = requestOptions?.idempotencyKey;
|
|
940
|
+
const chunked = options.length > 100;
|
|
941
|
+
if (chunked && (key?.length ?? 0) > 240) throw require_CalmLensError.invalidArgument(`idempotencyKey can be at most 240 characters for lenses sent in several requests`);
|
|
942
|
+
for (let start = 0; start < options.length; start += 100) {
|
|
943
|
+
const chunk = start / 100 + 1;
|
|
944
|
+
await this.#submitEnsureLensesChunk(options.slice(start, start + 100), key && chunked ? {
|
|
945
|
+
...requestOptions,
|
|
946
|
+
idempotencyKey: `${key}:chunk-${chunk}`
|
|
947
|
+
} : requestOptions);
|
|
948
|
+
}
|
|
939
949
|
}
|
|
940
950
|
async #submitEnsureLensesChunk(options, requestOptions) {
|
|
941
951
|
const result = await this.#send("ensureLenses", requestOptions, "PUT", `${this.#projectPath}/lenses`, { body: { lenses: options } });
|
|
@@ -42876,8 +42876,8 @@ interface ClientRequestDefaults {
|
|
|
42876
42876
|
uploadTimeoutMs?: number;
|
|
42877
42877
|
/**
|
|
42878
42878
|
* How many times to retry a request that failed before a response arrived or returned 429,
|
|
42879
|
-
* 500, 502, 503, 504 or `idempotency/request-in-progress`. Only reads and
|
|
42880
|
-
* `Idempotency-Key` (
|
|
42879
|
+
* 500, 502, 503, 504 or `idempotency/request-in-progress`. Only reads and writes carrying an
|
|
42880
|
+
* `Idempotency-Key` (uploads always do) are retried, with jittered backoff that honours
|
|
42881
42881
|
* `Retry-After`. Streamed bodies are never retried. Defaults to 2; 0 disables retries.
|
|
42882
42882
|
*/
|
|
42883
42883
|
maxRetries?: number;
|
|
@@ -42902,8 +42902,8 @@ interface RequestOptions {
|
|
|
42902
42902
|
/** How many times to retry this call's requests; 0 turns retries off. */
|
|
42903
42903
|
maxRetries?: number;
|
|
42904
42904
|
/**
|
|
42905
|
-
* Sent as `Idempotency-Key`, which
|
|
42906
|
-
* Uploads generate one when you pass none.
|
|
42905
|
+
* Sent as `Idempotency-Key`, which makes any write (POST, PUT, PATCH or DELETE) safe to retry:
|
|
42906
|
+
* CalmLens runs it once and replays its response. Uploads generate one when you pass none.
|
|
42907
42907
|
*/
|
|
42908
42908
|
idempotencyKey?: string;
|
|
42909
42909
|
/** Extra headers. The SDK's own (`X-Api-Key`, `User-Agent`, `Idempotency-Key`) win. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as CdnTransform, O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
1
|
+
import { F as CdnTransform, O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-CCsoVr39.js";
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-L5x_sMOI.js";
|
|
3
3
|
import { o as UploadFileIconFamily } from "./FileIcons-4qSX7DW2.js";
|
|
4
4
|
/**
|
|
5
5
|
* The text the asset viewers show, keyed by name. `{name}` placeholders are filled in when shown.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_CalmLensError = require("./CalmLensError-
|
|
2
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
3
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_CalmLensError = require("./CalmLensError-C9g7GXfU.js");
|
|
2
|
+
const require_CalmLensCdn = require("./CalmLensCdn-B_Tbwq10.js");
|
|
3
|
+
const require_UploadController = require("./UploadController-CVKtUCK0.js");
|
|
4
4
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
5
5
|
// src/ui/viewers/ViewerAsset.ts
|
|
6
6
|
/** Spreadsheet MIME types, as `content.format` reports them (compared lower-cased). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_UploadController = require("./UploadController-CVKtUCK0.js");
|
|
2
2
|
let react = require("react");
|
|
3
3
|
// src/ui/ReactUpload.ts
|
|
4
4
|
const CalmLensContext = (0, react.createContext)(void 0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as UploadFile, L as UploadSnapshot, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions } from "./Core-
|
|
1
|
+
import { F as UploadFile, L as UploadSnapshot, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions } from "./Core-B110Ug8_.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
type CalmLensProviderProps<F extends UploadFile = File> = CalmLensProvidedOptions<F> & {
|
|
4
4
|
children?: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_CalmLensError = require("./CalmLensError-
|
|
2
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
1
|
+
const require_CalmLensError = require("./CalmLensError-C9g7GXfU.js");
|
|
2
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-DoNMg8Dh.js");
|
|
3
3
|
// src/contract/PlaceholderHashDecode.js
|
|
4
4
|
/**
|
|
5
5
|
* Decodes a ThumbHash to an RGBA image. RGB is not be premultiplied by A.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fn as EventResourceKind, Nn as TypedEvent, jn as Actor } from "./CalmLensTypes-
|
|
1
|
+
import { Fn as EventResourceKind, Nn as TypedEvent, jn as Actor } from "./CalmLensTypes-CCsoVr39.js";
|
|
2
2
|
import * as zod from "zod";
|
|
3
3
|
/** Error codes the CalmLens API documents, by name. */
|
|
4
4
|
declare const API_ERROR_CODES: {
|
|
@@ -56,6 +56,7 @@ declare const API_ERROR_CODES: {
|
|
|
56
56
|
readonly IDEMPOTENT_REQUEST_IN_PROGRESS: "idempotency/request-in-progress";
|
|
57
57
|
readonly NO_RENDERED_VERSION: "asset/no-rendered-version";
|
|
58
58
|
readonly ASSET_NOT_FOUND: "asset/not-found";
|
|
59
|
+
readonly ASSET_NOT_AVAILABLE: "asset/not-available";
|
|
59
60
|
readonly PROJECT_NOT_FOUND: "project/not-found";
|
|
60
61
|
readonly ASSET_CHILD_NOT_DELETABLE: "asset/child-not-deletable";
|
|
61
62
|
readonly ASSET_REVIEW_CHANGED: "asset/review-changed";
|
|
@@ -208,6 +209,7 @@ declare const CALMLENS_ERROR_CODES: {
|
|
|
208
209
|
readonly IDEMPOTENT_REQUEST_IN_PROGRESS: "idempotency/request-in-progress";
|
|
209
210
|
readonly NO_RENDERED_VERSION: "asset/no-rendered-version";
|
|
210
211
|
readonly ASSET_NOT_FOUND: "asset/not-found";
|
|
212
|
+
readonly ASSET_NOT_AVAILABLE: "asset/not-available";
|
|
211
213
|
readonly PROJECT_NOT_FOUND: "project/not-found";
|
|
212
214
|
readonly ASSET_CHILD_NOT_DELETABLE: "asset/child-not-deletable";
|
|
213
215
|
readonly ASSET_REVIEW_CHANGED: "asset/review-changed";
|
|
@@ -376,8 +378,8 @@ declare class CalmLensError extends Error {
|
|
|
376
378
|
/**
|
|
377
379
|
* Whether repeating the same request may succeed: transport failures, timeouts (a request's
|
|
378
380
|
* `timeoutMs` or `waitForDecision`'s deadline), throttling (429), internal and gateway errors (500, 502, 503, 504)
|
|
379
|
-
* and idempotent requests still in progress. Only repeat a create
|
|
380
|
-
* `idempotencyKey`.
|
|
381
|
+
* and idempotent requests still in progress. Only repeat a write (a create, upload, change or
|
|
382
|
+
* delete) with the same `idempotencyKey`.
|
|
381
383
|
*/
|
|
382
384
|
isRetryable(): boolean;
|
|
383
385
|
}
|
package/cjs/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ClassificationQualifierResults, c as HashList, d as ModerationContext, i as ClassificationNotEvaluatedReason, l as HashListEntry, n as ClassificationCategory, o as Likelihood, r as ClassificationCategoryReport, s as ModerationQualifier, t as ClassificationCategories, u as PolicyAction } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-
|
|
3
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
4
|
-
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-
|
|
5
|
-
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-
|
|
2
|
+
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-CCsoVr39.js";
|
|
3
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-L5x_sMOI.js";
|
|
4
|
+
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-Dk3I5YXf.js";
|
|
5
|
+
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-_fvY2eu8.js";
|
|
6
6
|
export { AUTO_PAGING_TO_ARRAY_MAX, type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type AppInfo, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAppClient, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventResource, type EventResourceKind, type EventSeverity, type EventType, type EventsPage, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPage, type ListPoliciesOptions, type ListPromise, type ListUploadPresetsOptions, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type PolicySettings, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo };
|
package/cjs/app.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_CalmLensError = require("./CalmLensError-
|
|
3
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
2
|
+
const require_CalmLensError = require("./CalmLensError-C9g7GXfU.js");
|
|
3
|
+
const require_CalmLensCdn = require("./CalmLensCdn-B_Tbwq10.js");
|
|
4
4
|
require("./index.js");
|
|
5
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
5
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-DoNMg8Dh.js");
|
|
6
6
|
exports.AUTO_PAGING_TO_ARRAY_MAX = require_CalmLensCdn.AUTO_PAGING_TO_ARRAY_MAX;
|
|
7
7
|
exports.CALMLENS_ERROR_CODES = require_CalmLensError.CALMLENS_ERROR_CODES;
|
|
8
8
|
exports.CDN_RESOURCES = require_CalmLensCdn.CDN_RESOURCES;
|
package/cjs/elements.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-
|
|
3
|
-
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-
|
|
4
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { i as AssetAvailability } from "./CalmLensTypes-CCsoVr39.js";
|
|
2
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-B110Ug8_.js";
|
|
3
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BuTS7yTy.js";
|
|
4
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui--E_s-cDd.js";
|
|
5
5
|
declare const BaseElement$1: typeof HTMLElement;
|
|
6
6
|
/**
|
|
7
7
|
* An asset viewer element. Set the `src` attribute to the asset URL (public or signed) and the
|
package/cjs/elements.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ui = require("./ui-
|
|
3
|
-
const require_Core = require("./Core-
|
|
4
|
-
const require_UploadController = require("./UploadController-
|
|
2
|
+
const require_ui = require("./ui-CuO37F4u.js");
|
|
3
|
+
const require_Core = require("./Core-iNgZ8Cij.js");
|
|
4
|
+
const require_UploadController = require("./UploadController-CVKtUCK0.js");
|
|
5
5
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
6
|
-
const require_BrowserUpload = require("./BrowserUpload-
|
|
6
|
+
const require_BrowserUpload = require("./BrowserUpload-BO_ZukUM.js");
|
|
7
7
|
// src/viewers/Elements.ts
|
|
8
8
|
const BaseElement$1 = typeof HTMLElement === "undefined" ? class {} : HTMLElement;
|
|
9
9
|
const PROPERTIES = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { Hn as AssetInfo, N as CdnResource, at as GetAssetInfoOptions } from "./CalmLensTypes-
|
|
3
|
-
import "./WebhookPayload-
|
|
2
|
+
import { Hn as AssetInfo, N as CdnResource, at as GetAssetInfoOptions } from "./CalmLensTypes-CCsoVr39.js";
|
|
3
|
+
import "./WebhookPayload-_fvY2eu8.js";
|
|
4
4
|
/** Every CDN resource beneath an asset URL, as `getAssetUrl` and `signAssetUrl` accept them. */
|
|
5
5
|
declare const CDN_RESOURCES: CdnResource[];
|
|
6
6
|
/**
|
package/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ClassificationQualifierResults, c as HashList, d as ModerationContext, i as ClassificationNotEvaluatedReason, l as HashListEntry, n as ClassificationCategory, o as Likelihood, r as ClassificationCategoryReport, s as ModerationQualifier, t as ClassificationCategories, u as PolicyAction } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-
|
|
3
|
-
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-
|
|
4
|
-
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-
|
|
2
|
+
import { $ as EventFactValues, $n as ProcessingOptions, $t as UpdateFolderOptions, A as CdnAssetLocation, An as LensType, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, C as AssetUploadStatus, Cn as DetectedFace, Ct as ListPoliciesOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureStage, Dt as MultipartUploadOptions, E as BatchAssetsOptions, En as ProcessingFeatureResults, Et as MoveFolderOptions, F as CdnTransform, Fn as EventResourceKind, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gn as AssetPreview, Gt as SignAssetUrlOptions, H as CreateMultipartUploadPartOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, In as EventSeverity, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jn as AssetSafetyHold, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kn as AssetRendered, Kt as SignUploadTokenOptions, L as ClientRequestDefaults, Lt as RequestAttempt, M as CdnAssetUrlOptions, Mn as EventResource, Mt as PolicySettings, N as CdnResource, Nt as ProjectSettingsResource, O as CalmLensAppClientOptions, On as ProcessingFeatures, Ot as MultipartUploadPartOptions, P as CdnServeOptions, Pn as EventCategory, Pt as PublicProjectSettings, Q as EventFact, Qn as MetadataItem, Qt as UpdateAssetOptions, R as ConnectionOptions, Rn as Folder, Rt as RequestOptions, S as AssetUpload, Sn as BoundingBox, St as ListLensesOptions, T as AssignPolicyOptions, Tn as ProcessingFeatureId, Tt as MoveAssetOptions, U as CreatePolicyOptions, Un as AssetHls, Ut as SearchAssetsOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wn as AssetHlsRendition, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xn as ExtractedText, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Yn as AssetSafetyHoldReason, Yt as StreamingFeatureOptions, Z as EnsureUploadPresetsResponse, Zn as FileMetadata, Zt as TypedEvent, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, a as AssetChecksums, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bn as UploadPreset, bt as ListHashListEntriesOptions, c as AssetClassificationFailureReason, cn as UploadPresetPage, ct as HashListIdOptions, d as AssetContentOptions, dn as VerifyWebhookSignatureOptions, dt as ImageTransformOptions, en as UpdateHashListOptions, et as EventFacts, f as AssetContentRemovalReason, fn as ViewerClaims, ft as Lens, g as AssetModerationStatus, gn as AssetBatchOperation, gt as ListAssetTimelineOptions, h as AssetModerationDecision, hn as WebhookPayloadInput, ht as ListAssetChildrenOptions, i as AssetAvailability, in as UpgradePolicyOptions, it as FolderPage, j as CdnAssetReference, jt as PolicyPage, k as CalmLensServerClientOptions, kn as CursorPage, kt as Policy, l as AssetClassificationStatus, ln as UploadPresetSubmitAssetOptions, lt as HashListPage, m as AssetModeration, mn as WebhookHeadersInput, mt as LensPage, n as AppInfo, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetDefinition, ot as HashListEntryIdOptions, p as AssetContentStatus, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qn as AssetRenderedKind, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, s as AssetClassification, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, tt as EventType, u as AssetContent, un as UploadedAsset, ut as IdempotencyOptions, v as AssetSearchResponse, vn as AssetTimelineSegment, vt as ListEventsOptions, w as AssetVisibility, wn as DetectedPerson, wt as ListUploadPresetsOptions, x as AssetType, xn as AgeRange, xt as ListHashListsOptions, y as AssetSearchResult, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zn as AssetSearchMatchField, zt as ResetPolicyOptions } from "./CalmLensTypes-CCsoVr39.js";
|
|
3
|
+
import { a as getAssetInfo, i as CDN_RESOURCES, n as SDK_VERSION, r as DEFAULT_CDN_BASE_URL, t as ModerationContextItem } from "./index-Dk3I5YXf.js";
|
|
4
|
+
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-_fvY2eu8.js";
|
|
5
5
|
export { AUTO_PAGING_TO_ARRAY_MAX, type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type AppInfo, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventResource, type EventResourceKind, type EventSeverity, type EventType, type EventsPage, type ExtractedText, type FileMetadata, type Folder, type FolderIdOptions, type FolderPage, type GetAssetInfoOptions, type HashList, type HashListEntry, type HashListEntryIdOptions, type HashListEntryPage, type HashListIdOptions, type HashListPage, type IdempotencyOptions, type ImageTransformOptions, type Lens, type LensIdOptions, type LensPage, type LensType, type Likelihood, type ListAssetChildrenOptions, type ListAssetTimelineOptions, type ListAssetsOptions, type ListEventsOptions, type ListFoldersOptions, type ListHashListEntriesOptions, type ListHashListsOptions, type ListLensesOptions, type ListPage, type ListPoliciesOptions, type ListPromise, type ListUploadPresetsOptions, type MetadataFieldsResource, type MetadataItem, type ModerationContext, type ModerationContextItem, type ModerationQualifier, type MoveAssetOptions, type MoveFolderOptions, type MultipartUploadOptions, type MultipartUploadPartOptions, type Policy, type PolicyAction, type PolicyIdOptions, type PolicyPage, type PolicySettings, type ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo };
|
package/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_CalmLensError = require("./CalmLensError-
|
|
3
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
2
|
+
const require_CalmLensError = require("./CalmLensError-C9g7GXfU.js");
|
|
3
|
+
const require_CalmLensCdn = require("./CalmLensCdn-B_Tbwq10.js");
|
|
4
4
|
exports.AUTO_PAGING_TO_ARRAY_MAX = require_CalmLensCdn.AUTO_PAGING_TO_ARRAY_MAX;
|
|
5
5
|
exports.CALMLENS_ERROR_CODES = require_CalmLensError.CALMLENS_ERROR_CODES;
|
|
6
6
|
exports.CDN_RESOURCES = require_CalmLensCdn.CDN_RESOURCES;
|
package/cjs/react-native.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getAssetAspectRatio, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as createUploadController } from "./Core-
|
|
2
|
-
import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-
|
|
1
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getAssetAspectRatio, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as createUploadController } from "./Core-B110Ug8_.js";
|
|
2
|
+
import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-CbtQtN6v.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { StyleProp, ViewStyle } from "react-native";
|
|
5
5
|
/** What the uploader asks your picker for. */
|