calmlens 0.27.6 → 0.28.1
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 +24 -13
- package/cjs/{BrowserUpload-CdOfuIcV.d.ts → BrowserUpload-CRbCsX7a.d.ts} +2 -2
- package/cjs/{BrowserUpload-GQtZti-D.js → BrowserUpload-DLoi5qVj.js} +1 -1
- package/cjs/{CalmLensAppClient-Btp8f-34.d.ts → CalmLensAppClient-B3u6BlP5.d.ts} +1 -1
- package/cjs/{CalmLensAppClient-Bwt3gP0C.js → CalmLensAppClient-C--UAnoz.js} +2 -2
- package/cjs/{CalmLensOptionKeys--gTpTkwt.js → CalmLensOptionKeys-BxrJ47zd.js} +2 -2
- package/cjs/{CalmLensServerClient-C3kaPLUZ.d.ts → CalmLensServerClient-B8ntjNL3.d.ts} +6 -6
- package/cjs/{CalmLensServerClient-BYMzGkQK.js → CalmLensServerClient-CPbCEJMK.js} +9 -9
- package/cjs/{CalmLensTypes-DxxyZt2L.d.ts → CalmLensTypes-CtO4Dieu.d.ts} +6 -3
- package/cjs/{Core-Dhijt6JU.d.ts → Core-BJaLU71Q.d.ts} +2 -2
- package/cjs/{Core-52DVaX7d.js → Core-CB0-p-ro.js} +7 -4
- package/cjs/{ModerationContextLimits-DJyIjzIn.js → ModerationContextLimits-CuL1TOuf.js} +43 -6
- package/cjs/{ReactUpload-DHuhGYsr.js → ReactUpload-3QgzpdMu.js} +1 -1
- package/cjs/{ReactUpload-BuqLPgNr.d.ts → ReactUpload-BGUkcMpg.d.ts} +1 -1
- package/{esm/TestTriggers-Dnukm-jm-DoEB7jJc.d.ts → cjs/TestTriggers-dognME9k-PWyIfHMI.d.ts} +1 -2
- package/cjs/{TestTriggers-DP4m92jg-C0HD-A4r.js → TestTriggers-uL2Ec8Vt-cPmmKvYd.js} +1 -2
- package/cjs/{UploadController-ChzDPMmm.js → UploadController-BSZnq84V.js} +2 -2
- package/{esm/WebhookPayload-D_yWJA9M.d.ts → cjs/WebhookPayload-DZadhbAJ.d.ts} +1 -1
- package/cjs/app.d.ts +4 -4
- package/cjs/app.js +2 -2
- package/cjs/elements.d.ts +4 -4
- package/cjs/elements.js +4 -4
- package/cjs/{index-CUA-HDNu.d.ts → index-DQUZYLVY.d.ts} +2 -2
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +1 -1
- package/cjs/react-native.d.ts +2 -2
- package/cjs/react-native.js +5 -5
- package/cjs/react.d.ts +4 -4
- package/cjs/react.js +5 -5
- package/cjs/server.d.ts +4 -4
- package/cjs/server.js +2 -2
- package/cjs/test-inputs.d.ts +1 -1
- package/cjs/test-inputs.js +13 -13
- package/cjs/testing.d.ts +61 -13
- package/cjs/testing.js +170 -35
- package/cjs/{ui-BSm_qphN.d.ts → ui-BGywTQ2M.d.ts} +2 -2
- package/cjs/{ui-C1_SDSiq.js → ui-CkQQm3Qw.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/esm/{BrowserUpload-BaKFKEBz.js → BrowserUpload-BKrrHzoh.js} +1 -1
- package/esm/{BrowserUpload-CdOfuIcV.d.ts → BrowserUpload-CRbCsX7a.d.ts} +2 -2
- package/esm/{CalmLensAppClient-Btp8f-34.d.ts → CalmLensAppClient-B3u6BlP5.d.ts} +1 -1
- package/esm/{CalmLensAppClient-DM6c3pGC.js → CalmLensAppClient-D_SprSKl.js} +2 -2
- package/esm/{CalmLensOptionKeys-CKZs8i3_.js → CalmLensOptionKeys-B6an7neE.js} +2 -2
- package/esm/{CalmLensServerClient-C3kaPLUZ.d.ts → CalmLensServerClient-B8ntjNL3.d.ts} +6 -6
- package/esm/{CalmLensServerClient-Da2UfUo4.js → CalmLensServerClient-BY45aX5Q.js} +9 -9
- package/esm/{CalmLensTypes-DxxyZt2L.d.ts → CalmLensTypes-CtO4Dieu.d.ts} +6 -3
- package/esm/{Core-Dhijt6JU.d.ts → Core-BJaLU71Q.d.ts} +2 -2
- package/esm/{Core-kYMRW5C1.js → Core-dzPyrg_G.js} +7 -4
- package/esm/{ModerationContextLimits-ZIlK9n2X.js → ModerationContextLimits-IH2zX1wg.js} +26 -7
- package/esm/{ReactUpload-CipY3cmO.js → ReactUpload-4DeUbua_.js} +1 -1
- package/esm/{ReactUpload-BuqLPgNr.d.ts → ReactUpload-BGUkcMpg.d.ts} +1 -1
- package/{cjs/TestTriggers-Dnukm-jm-DoEB7jJc.d.ts → esm/TestTriggers-dognME9k-PWyIfHMI.d.ts} +1 -2
- package/esm/{TestTriggers-DP4m92jg-DhOI4S1V.js → TestTriggers-uL2Ec8Vt-DYbTEJWm.js} +1 -2
- package/esm/{UploadController-D-14HWII.js → UploadController-DKjI8S2K.js} +2 -2
- package/{cjs/WebhookPayload-D_yWJA9M.d.ts → esm/WebhookPayload-DZadhbAJ.d.ts} +1 -1
- package/esm/app.d.ts +4 -4
- package/esm/app.js +2 -2
- package/esm/elements.d.ts +4 -4
- package/esm/elements.js +4 -4
- package/esm/{index-CUA-HDNu.d.ts → index-DQUZYLVY.d.ts} +2 -2
- package/esm/index.d.ts +3 -3
- package/esm/index.js +1 -1
- package/esm/react-native.d.ts +2 -2
- package/esm/react-native.js +5 -5
- package/esm/react.d.ts +4 -4
- package/esm/react.js +5 -5
- package/esm/server.d.ts +4 -4
- package/esm/server.js +2 -2
- package/esm/test-inputs.d.ts +1 -1
- package/esm/test-inputs.js +1 -1
- package/esm/testing.d.ts +61 -13
- package/esm/testing.js +161 -26
- package/esm/{ui-BSm_qphN.d.ts → ui-BGywTQ2M.d.ts} +2 -2
- package/esm/{ui-CgIG3knW.js → ui-BovDqg9n.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.28.1";
|
|
7
7
|
|
|
8
8
|
// src/contract/ModerationCategories-CHFRoeWV.js
|
|
9
9
|
var CLASSIFICATION_CATEGORIES = [
|
|
@@ -1697,25 +1697,37 @@ var appendAssetLocation = (assetUrl, location) => {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
return `${path}${viewerClaimsQuery(viewerClaims)}`;
|
|
1699
1699
|
};
|
|
1700
|
+
var appendSignedLocation = (signedUrl, location) => {
|
|
1701
|
+
const resourcePath = location.resource === undefined ? "" : `/${ASSET_RESOURCE_PATHS[location.resource]}`;
|
|
1702
|
+
if (!signedUrl.endsWith(resourcePath)) {
|
|
1703
|
+
throw new CalmLensError(SDK_ERROR_CODES.INVALID_RESPONSE, {
|
|
1704
|
+
message: "The signed asset URL doesn't end in the resource it was signed for"
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
return `${signedUrl}${appendAssetLocation("", location).slice(resourcePath.length)}`;
|
|
1708
|
+
};
|
|
1700
1709
|
var buildAssetUrl = (cdnBaseUrl, projectId, options) => {
|
|
1701
1710
|
const { assetId, externalId, resource, lens, transform, viewerClaims } = options;
|
|
1702
1711
|
const base = `${cdnBaseUrl.replace(/\/+$/, "")}/assets/${encodePathSegment(projectId, "Project ID")}/${getAssetSegment({ assetId, externalId })}`;
|
|
1703
1712
|
return appendAssetLocation(base, { resource, lens, transform, viewerClaims });
|
|
1704
1713
|
};
|
|
1705
1714
|
var validateSignAssetUrlOptions = (options) => {
|
|
1706
|
-
const { expiresIn
|
|
1715
|
+
const { expiresIn } = options;
|
|
1707
1716
|
if (expiresIn !== undefined && (!Number.isInteger(expiresIn) || expiresIn < 1 || expiresIn > MAX_SIGNED_URL_EXPIRES_IN)) {
|
|
1708
1717
|
throw invalidArgument(`expiresIn must be a whole number from 1 to ${MAX_SIGNED_URL_EXPIRES_IN}`);
|
|
1709
1718
|
}
|
|
1710
|
-
if (original !== undefined && typeof original !== "boolean") {
|
|
1711
|
-
throw invalidArgument("original must be a boolean");
|
|
1712
|
-
}
|
|
1713
1719
|
getAssetSegment(options);
|
|
1714
1720
|
appendAssetLocation("", options);
|
|
1715
1721
|
};
|
|
1722
|
+
var assetUrlOf = (url) => {
|
|
1723
|
+
const path = (url.split("?", 1)[0] ?? "").replace(/\/+$/, "");
|
|
1724
|
+
const parts = path.split("/");
|
|
1725
|
+
const assets = parts.lastIndexOf("assets");
|
|
1726
|
+
return assets >= 3 && parts.length > assets + 3 ? parts.slice(0, assets + 3).join("/") : path;
|
|
1727
|
+
};
|
|
1716
1728
|
var splitAssetUrl = (url) => {
|
|
1717
|
-
const
|
|
1718
|
-
const base =
|
|
1729
|
+
const query = url.split("?", 2)[1];
|
|
1730
|
+
const base = assetUrlOf(url);
|
|
1719
1731
|
const raw = query ? new URLSearchParams(query).get("viewerClaims") : null;
|
|
1720
1732
|
if (raw === null)
|
|
1721
1733
|
return { base };
|
|
@@ -2461,7 +2473,7 @@ var SERVER_OPTION_KEYS = {
|
|
|
2461
2473
|
"assets.search": ["mode", "pageSize", "query"],
|
|
2462
2474
|
"assets.update": ["assetId", "description", "externalId", "externalUrl", "metadata", "name", "tags", "visibility"],
|
|
2463
2475
|
"assets.uploadPart": ["assetId", "part", "wait"],
|
|
2464
|
-
"cdn.signAssetUrl": ["assetId", "expiresIn", "externalId", "lens", "
|
|
2476
|
+
"cdn.signAssetUrl": ["assetId", "expiresIn", "externalId", "lens", "projectId", "resource", "resource", "transform", "viewerClaims"],
|
|
2465
2477
|
ensureLens: ["active", "description", "identifier", "name", "transform", "type"],
|
|
2466
2478
|
ensureLenses: ["lenses"],
|
|
2467
2479
|
"events.list": ["assetId", "cursor", "pageSize", "types"],
|
|
@@ -2824,13 +2836,13 @@ class CalmLensServerClient {
|
|
|
2824
2836
|
signAssetUrl: async (signOptions, requestOptions) => {
|
|
2825
2837
|
const options = checked("cdn.signAssetUrl", signOptions);
|
|
2826
2838
|
validateSignAssetUrlOptions(options);
|
|
2827
|
-
const { projectId, assetId, externalId, expiresIn,
|
|
2839
|
+
const { projectId, assetId, externalId, expiresIn, ...location } = options;
|
|
2828
2840
|
const project = requireId(projectId ?? this.#settings.projectId, "Project ID");
|
|
2829
2841
|
const signed = await this.#send("cdn.signAssetUrl", requestOptions, "POST", `/projects/${project}/signed-asset-urls`, {
|
|
2830
2842
|
body: {
|
|
2831
2843
|
...assetId !== undefined ? { assetId } : { externalId },
|
|
2832
2844
|
expiresIn: expiresIn ?? DEFAULT_SIGNED_URL_EXPIRES_IN,
|
|
2833
|
-
|
|
2845
|
+
...location.resource !== undefined ? { resource: location.resource } : {}
|
|
2834
2846
|
}
|
|
2835
2847
|
});
|
|
2836
2848
|
if (!signed || typeof signed.url !== "string" || !signed.url || typeof signed.expiresAt !== "number") {
|
|
@@ -2838,7 +2850,7 @@ class CalmLensServerClient {
|
|
|
2838
2850
|
message: "The API returned no signed asset URL"
|
|
2839
2851
|
});
|
|
2840
2852
|
}
|
|
2841
|
-
return copyLastResponse({ url:
|
|
2853
|
+
return copyLastResponse({ url: appendSignedLocation(signed.url, location), expiresAt: signed.expiresAt }, signed);
|
|
2842
2854
|
},
|
|
2843
2855
|
getAssetInfo: (url, options = {}) => getAssetInfo(url, { ...options, fetch: this.#settings.cdnFetch }),
|
|
2844
2856
|
serve: async (options, requestOptions) => {
|
|
@@ -10014,7 +10026,7 @@ var TEST_REGIONAL_ACTIONS_SCHEMA = /* @__PURE__ */ lazySchema(() => array(object
|
|
|
10014
10026
|
])
|
|
10015
10027
|
}).strict()).max(7).refine((entries) => new Set(entries.map((entry) => entry.region)).size === entries.length, "Choose each region once"));
|
|
10016
10028
|
|
|
10017
|
-
// src/contract/TestTriggers-
|
|
10029
|
+
// src/contract/TestTriggers-uL2Ec8Vt.js
|
|
10018
10030
|
var TEST_IMAGE_GRID_LEVELS = [
|
|
10019
10031
|
72,
|
|
10020
10032
|
128,
|
|
@@ -10115,7 +10127,6 @@ var TEST_INPUT_SCHEMA = /* @__PURE__ */ lazySchema(() => object({
|
|
|
10115
10127
|
category: _enum(CLASSIFICATION_CATEGORIES),
|
|
10116
10128
|
score: number2().min(0).max(1).optional(),
|
|
10117
10129
|
action: _enum([
|
|
10118
|
-
"allow",
|
|
10119
10130
|
"limit",
|
|
10120
10131
|
"age-restrict",
|
|
10121
10132
|
"block"
|
|
@@ -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-BJaLU71Q.js";
|
|
2
|
+
import { r as UseCalmLensUploadResult$1 } from "./ReactUpload-BGUkcMpg.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,4 +1,4 @@
|
|
|
1
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_UploadController = require("./UploadController-BSZnq84V.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,4 +1,4 @@
|
|
|
1
|
-
import { At as RetrieveAssetOptions, M as CdnAssetUrlOptions, O as CalmLensAppClientOptions, Ot as RequestOptions, Qt as UploadedAsset, Zt as UploadPresetSubmitAssetOptions, qt as UploadAssetPartOptions } from "./CalmLensTypes-
|
|
1
|
+
import { At as RetrieveAssetOptions, M as CdnAssetUrlOptions, O as CalmLensAppClientOptions, Ot as RequestOptions, Qt as UploadedAsset, Zt as UploadPresetSubmitAssetOptions, qt as UploadAssetPartOptions } from "./CalmLensTypes-CtO4Dieu.js";
|
|
2
2
|
declare const inspectSymbol: unique symbol;
|
|
3
3
|
declare class CalmLensAppClient {
|
|
4
4
|
#private;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
const require_CalmLensOptionKeys = require("./CalmLensOptionKeys
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-CuL1TOuf.js");
|
|
2
|
+
const require_CalmLensOptionKeys = require("./CalmLensOptionKeys-BxrJ47zd.js");
|
|
3
3
|
// src/client/CalmLensAppClient.ts
|
|
4
4
|
const inspectSymbol = Symbol.for("nodejs.util.inspect.custom");
|
|
5
5
|
/** `options`, once `checkOptionKeys` finds only keys `operation` takes. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-CuL1TOuf.js");
|
|
2
2
|
// src/contract/AssetPayload.js
|
|
3
3
|
const bufferInputToBytes = (value) => {
|
|
4
4
|
if (value instanceof ArrayBuffer) return new Uint8Array(value);
|
|
@@ -746,9 +746,9 @@ const SERVER_OPTION_KEYS = {
|
|
|
746
746
|
"expiresIn",
|
|
747
747
|
"externalId",
|
|
748
748
|
"lens",
|
|
749
|
-
"original",
|
|
750
749
|
"projectId",
|
|
751
750
|
"resource",
|
|
751
|
+
"resource",
|
|
752
752
|
"transform",
|
|
753
753
|
"viewerClaims"
|
|
754
754
|
],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as HashListEntry, u as HashList } from "./Classification-CMM2tZpJ-IdIh63n0.js";
|
|
2
|
-
import { $ as FolderPage, $t as VerifyWebhookSignatureOptions, An as Policy, At as RetrieveAssetOptions, B as CreateHashListOptions, Bt as UpdateAssetOptions, D as BatchAssetsResponse, E as BatchAssetsOptions, Et as RemoveAssetContentOptions, Ft as SignUploadTokenOptions, G as DeleteAssetOptions, Gt as UpdateProjectSettingsOptions, Ht as UpdateHashListOptions, I as ClassifyTextOptions, In as AssetInfo, It as SignedAssetUrl, J as EnsureLensesOptions, K as DeleteMetadataFieldOptions, Kt as UpgradePolicyOptions, Lt as SignedUploadToken, M as CdnAssetUrlOptions, Nt as SetPolicyAutomaticUpdatesOptions, Ot as RequestOptions, P as CdnServeOptions, Pn as AssetSearchQuery, Pt as SignAssetUrlOptions, Q as FolderIdOptions, T as AssignPolicyOptions, Tt as PolicyPage, U as CreatePolicyOptions, Ut as UpdateLensOptions, V as CreateLensOptions, Vt as UpdateFolderOptions, W as DecideAssetOptions, Wt as UpdatePolicyOptions, X as EnsureUploadPresetsOptions, Xt as UploadPresetPage, Y as EnsureMetadataFieldsOptions, Yt as UploadPresetIdOptions, Z as EnsureUploadPresetsResponse, _ as AssetPage, _n as Folder, _t as ListLensesOptions, b as AssetTimelinePage, bt as MoveAssetOptions, ct as LensIdOptions, dt as ListAssetTimelineOptions, et as GetAssetInfoOptions, ft as ListAssetsOptions, gt as ListHashListsOptions, ht as ListHashListEntriesOptions, it as HashListPage, jt as RetryAssetOptions, k as CalmLensServerClientOptions, kt as ResetPolicyOptions, lt as LensPage, mt as ListFoldersOptions, nt as HashListEntryPage, o as AssetChildrenPage, on as GetEventsResponse, pt as ListEventsOptions, q as EnsureLensOptions, qt as UploadAssetPartOptions, r as Asset, rt as HashListIdOptions, st as Lens, t as AddHashListEntryOptions, tn as WaitForAssetDecisionOptions, tt as HashListEntryIdOptions, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as MetadataFieldsResource, vt as ListPoliciesOptions, wt as PolicyIdOptions, xt as MoveFolderOptions, yn as ProjectSettingsResource, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SubmitAssetOptions } from "./CalmLensTypes-
|
|
3
|
-
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-
|
|
2
|
+
import { $ as FolderPage, $t as VerifyWebhookSignatureOptions, An as Policy, At as RetrieveAssetOptions, B as CreateHashListOptions, Bt as UpdateAssetOptions, D as BatchAssetsResponse, E as BatchAssetsOptions, Et as RemoveAssetContentOptions, Ft as SignUploadTokenOptions, G as DeleteAssetOptions, Gt as UpdateProjectSettingsOptions, Ht as UpdateHashListOptions, I as ClassifyTextOptions, In as AssetInfo, It as SignedAssetUrl, J as EnsureLensesOptions, K as DeleteMetadataFieldOptions, Kt as UpgradePolicyOptions, Lt as SignedUploadToken, M as CdnAssetUrlOptions, Nt as SetPolicyAutomaticUpdatesOptions, Ot as RequestOptions, P as CdnServeOptions, Pn as AssetSearchQuery, Pt as SignAssetUrlOptions, Q as FolderIdOptions, T as AssignPolicyOptions, Tt as PolicyPage, U as CreatePolicyOptions, Ut as UpdateLensOptions, V as CreateLensOptions, Vt as UpdateFolderOptions, W as DecideAssetOptions, Wt as UpdatePolicyOptions, X as EnsureUploadPresetsOptions, Xt as UploadPresetPage, Y as EnsureMetadataFieldsOptions, Yt as UploadPresetIdOptions, Z as EnsureUploadPresetsResponse, _ as AssetPage, _n as Folder, _t as ListLensesOptions, b as AssetTimelinePage, bt as MoveAssetOptions, ct as LensIdOptions, dt as ListAssetTimelineOptions, et as GetAssetInfoOptions, ft as ListAssetsOptions, gt as ListHashListsOptions, ht as ListHashListEntriesOptions, it as HashListPage, jt as RetryAssetOptions, k as CalmLensServerClientOptions, kt as ResetPolicyOptions, lt as LensPage, mt as ListFoldersOptions, nt as HashListEntryPage, o as AssetChildrenPage, on as GetEventsResponse, pt as ListEventsOptions, q as EnsureLensOptions, qt as UploadAssetPartOptions, r as Asset, rt as HashListIdOptions, st as Lens, t as AddHashListEntryOptions, tn as WaitForAssetDecisionOptions, tt as HashListEntryIdOptions, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as MetadataFieldsResource, vt as ListPoliciesOptions, wt as PolicyIdOptions, xt as MoveFolderOptions, yn as ProjectSettingsResource, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SubmitAssetOptions } from "./CalmLensTypes-CtO4Dieu.js";
|
|
3
|
+
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-DZadhbAJ.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;
|
|
@@ -83,10 +83,10 @@ declare class CalmLensServerClient {
|
|
|
83
83
|
getAssetUrl: (urlOptions: CdnAssetUrlOptions) => string;
|
|
84
84
|
/**
|
|
85
85
|
* Signs a private asset's URL on your server, so browsers and apps can load it without an API
|
|
86
|
-
* key until it expires.
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* appends them and aren't part of the signature.
|
|
86
|
+
* key until it expires. With `resource`, it is signed for that resource and ends in it; only a
|
|
87
|
+
* URL signed for `original` serves the exact uploaded file, and any other serves every other
|
|
88
|
+
* resource beneath its grant. Lenses, transforms and viewer claims are appended as
|
|
89
|
+
* `getAssetUrl` appends them and aren't part of the signature.
|
|
90
90
|
*/
|
|
91
91
|
signAssetUrl: (signOptions: SignAssetUrlOptions, requestOptions?: RequestOptions) => Promise<CalmLensResponse<SignedAssetUrl>>;
|
|
92
92
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
const require_CalmLensOptionKeys = require("./CalmLensOptionKeys
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-CuL1TOuf.js");
|
|
2
|
+
const require_CalmLensOptionKeys = require("./CalmLensOptionKeys-BxrJ47zd.js");
|
|
3
3
|
const require_CryptoUtils_BLCa_oZe = require("./CryptoUtils-BLCa-oZe-leCkr1ko.js");
|
|
4
4
|
// src/contract/JsonUtils.js
|
|
5
5
|
const stringifyJsonCanonical = (value) => JSON.stringify(value, (_key, nestedValue) => {
|
|
@@ -426,24 +426,24 @@ var CalmLensServerClient = class {
|
|
|
426
426
|
},
|
|
427
427
|
/**
|
|
428
428
|
* Signs a private asset's URL on your server, so browsers and apps can load it without an API
|
|
429
|
-
* key until it expires.
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
* appends them and aren't part of the signature.
|
|
429
|
+
* key until it expires. With `resource`, it is signed for that resource and ends in it; only a
|
|
430
|
+
* URL signed for `original` serves the exact uploaded file, and any other serves every other
|
|
431
|
+
* resource beneath its grant. Lenses, transforms and viewer claims are appended as
|
|
432
|
+
* `getAssetUrl` appends them and aren't part of the signature.
|
|
433
433
|
*/
|
|
434
434
|
signAssetUrl: async (signOptions, requestOptions) => {
|
|
435
435
|
const options = checked("cdn.signAssetUrl", signOptions);
|
|
436
436
|
require_ModerationContextLimits.validateSignAssetUrlOptions(options);
|
|
437
|
-
const { projectId, assetId, externalId, expiresIn,
|
|
437
|
+
const { projectId, assetId, externalId, expiresIn, ...location } = options;
|
|
438
438
|
const project = requireId(projectId ?? this.#settings.projectId, "Project ID");
|
|
439
439
|
const signed = await this.#send("cdn.signAssetUrl", requestOptions, "POST", `/projects/${project}/signed-asset-urls`, { body: {
|
|
440
440
|
...assetId !== void 0 ? { assetId } : { externalId },
|
|
441
441
|
expiresIn: expiresIn ?? 900,
|
|
442
|
-
|
|
442
|
+
...location.resource !== void 0 ? { resource: location.resource } : {}
|
|
443
443
|
} });
|
|
444
444
|
if (!signed || typeof signed.url !== "string" || !signed.url || typeof signed.expiresAt !== "number") throw new require_ModerationContextLimits.CalmLensError(require_ModerationContextLimits.SDK_ERROR_CODES.INVALID_RESPONSE, { message: "The API returned no signed asset URL" });
|
|
445
445
|
return require_ModerationContextLimits.copyLastResponse({
|
|
446
|
-
url: require_ModerationContextLimits.
|
|
446
|
+
url: require_ModerationContextLimits.appendSignedLocation(signed.url, location),
|
|
447
447
|
expiresAt: signed.expiresAt
|
|
448
448
|
}, signed);
|
|
449
449
|
},
|
|
@@ -42912,7 +42912,7 @@ interface IdempotencyOptions {
|
|
|
42912
42912
|
}
|
|
42913
42913
|
/**
|
|
42914
42914
|
* What a resource URL beneath an asset URL serves: the `original` file exactly as uploaded (with a
|
|
42915
|
-
* signed URL, only
|
|
42915
|
+
* signed URL, only one signed for `original`); the `rendered` file for display (an image in the
|
|
42916
42916
|
* best format the client accepts, a PDF, or browser-safe video or audio); the `preview` still;
|
|
42917
42917
|
* the blurred `placeholder` PNG (private or blocked assets require a signed URL or download permission); the `hls` stream of audio or video (its
|
|
42918
42918
|
* master playlist); the `embed` page, which shows the asset in an iframe; or the `info` JSON that
|
|
@@ -42973,11 +42973,14 @@ type CdnServeOptions = CdnAssetUrlOptions & {
|
|
|
42973
42973
|
resource?: CdnResource;
|
|
42974
42974
|
init?: RequestInit;
|
|
42975
42975
|
};
|
|
42976
|
+
/**
|
|
42977
|
+
* `resource` is the resource the URL is signed for, and it ends in it. Only a URL signed for
|
|
42978
|
+
* `original` serves the exact uploaded file; any other, or one without a resource, serves every
|
|
42979
|
+
* other resource beneath its grant.
|
|
42980
|
+
*/
|
|
42976
42981
|
type SignAssetUrlOptions = CdnAssetUrlOptions & {
|
|
42977
42982
|
/** How long the URL works, in seconds, from 1 to 86400 (24 hours). Defaults to 900. */
|
|
42978
42983
|
expiresIn?: number;
|
|
42979
|
-
/** Whether the URL also serves `/original`, the exact uploaded file. Defaults to `false`. */
|
|
42980
|
-
original?: boolean;
|
|
42981
42984
|
};
|
|
42982
42985
|
/** Options for `getAssetInfo`. */
|
|
42983
42986
|
interface GetAssetInfoOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as CdnTransform, O as CalmLensAppClientOptions, en 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, en as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-CtO4Dieu.js";
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-B3u6BlP5.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,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-CuL1TOuf.js");
|
|
2
|
+
const require_UploadController = require("./UploadController-BSZnq84V.js");
|
|
3
3
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
4
4
|
// src/ui/viewers/ViewerAsset.ts
|
|
5
5
|
/** Spreadsheet MIME types, as `content.format` reports them (compared lower-cased). */
|
|
@@ -207,8 +207,11 @@ const pageLink = (address) => {
|
|
|
207
207
|
return;
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
|
-
/**
|
|
211
|
-
|
|
210
|
+
/**
|
|
211
|
+
* The asset URL without any query; claims are added per resource. A resource URL beneath it, such
|
|
212
|
+
* as a URL signed for `original`, gives the asset URL its resources load beneath.
|
|
213
|
+
*/
|
|
214
|
+
const baseOf = (src) => require_ModerationContextLimits.assetUrlOf(src);
|
|
212
215
|
/** The viewer claims an asset URL carries in its query, if any. */
|
|
213
216
|
const claimsOf = (src) => {
|
|
214
217
|
const query = src.split("?", 2)[1];
|
|
@@ -153,7 +153,7 @@ const API_ERROR_DEFINITIONS = {
|
|
|
153
153
|
},
|
|
154
154
|
"signed-url/original-not-granted": {
|
|
155
155
|
status: 403,
|
|
156
|
-
message: "This signed asset URL doesn't grant the original file. Sign
|
|
156
|
+
message: "This signed asset URL doesn't grant the original file. Sign a URL for the original resource."
|
|
157
157
|
},
|
|
158
158
|
"validation/invalid-request": {
|
|
159
159
|
status: 400,
|
|
@@ -1062,7 +1062,7 @@ const listPages = (fetchPage, { cursor, feed = false } = {}) => {
|
|
|
1062
1062
|
};
|
|
1063
1063
|
// src/client/CalmLensVersion.ts
|
|
1064
1064
|
/** This SDK's version, from its package.json. */
|
|
1065
|
-
const SDK_VERSION = "0.
|
|
1065
|
+
const SDK_VERSION = "0.28.1";
|
|
1066
1066
|
const runtimeName = () => {
|
|
1067
1067
|
const runtime = globalThis;
|
|
1068
1068
|
if (isReactNativeRuntime()) return "react-native";
|
|
@@ -2290,6 +2290,15 @@ const appendAssetLocation = (assetUrl, location) => {
|
|
|
2290
2290
|
}
|
|
2291
2291
|
return `${path}${viewerClaimsQuery(viewerClaims)}`;
|
|
2292
2292
|
};
|
|
2293
|
+
/**
|
|
2294
|
+
* The lens, transform and viewer claims added to a URL the API signed for `location.resource`,
|
|
2295
|
+
* which already ends in that resource.
|
|
2296
|
+
*/
|
|
2297
|
+
const appendSignedLocation = (signedUrl, location) => {
|
|
2298
|
+
const resourcePath = location.resource === void 0 ? "" : `/${ASSET_RESOURCE_PATHS[location.resource]}`;
|
|
2299
|
+
if (!signedUrl.endsWith(resourcePath)) throw new CalmLensError(SDK_ERROR_CODES.INVALID_RESPONSE, { message: "The signed asset URL doesn't end in the resource it was signed for" });
|
|
2300
|
+
return `${signedUrl}${appendAssetLocation("", location).slice(resourcePath.length)}`;
|
|
2301
|
+
};
|
|
2293
2302
|
/** An asset's public URL beneath a CDN base URL, with any resource, selector and claims. */
|
|
2294
2303
|
const buildAssetUrl = (cdnBaseUrl, projectId, options) => {
|
|
2295
2304
|
const { assetId, externalId, resource, lens, transform, viewerClaims } = options;
|
|
@@ -2306,16 +2315,26 @@ const buildAssetUrl = (cdnBaseUrl, projectId, options) => {
|
|
|
2306
2315
|
};
|
|
2307
2316
|
/** Checks `signAssetUrl`'s own options as the API does, before anything is sent. */
|
|
2308
2317
|
const validateSignAssetUrlOptions = (options) => {
|
|
2309
|
-
const { expiresIn
|
|
2318
|
+
const { expiresIn } = options;
|
|
2310
2319
|
if (expiresIn !== void 0 && (!Number.isInteger(expiresIn) || expiresIn < 1 || expiresIn > 86400)) throw invalidArgument(`expiresIn must be a whole number from 1 to ${MAX_SIGNED_URL_EXPIRES_IN}`);
|
|
2311
|
-
if (original !== void 0 && typeof original !== "boolean") throw invalidArgument("original must be a boolean");
|
|
2312
2320
|
getAssetSegment(options);
|
|
2313
2321
|
appendAssetLocation("", options);
|
|
2314
2322
|
};
|
|
2323
|
+
/**
|
|
2324
|
+
* The asset URL of `url`, without its query: an asset URL (`…/assets/{projectId}/{asset}`) as it
|
|
2325
|
+
* is, and a resource URL beneath one, such as a URL signed for `original` or a rendered image's
|
|
2326
|
+
* lens URL, cut back to the asset URL its resources are paths beneath.
|
|
2327
|
+
*/
|
|
2328
|
+
const assetUrlOf = (url) => {
|
|
2329
|
+
const path = (url.split("?", 1)[0] ?? "").replace(/\/+$/, "");
|
|
2330
|
+
const parts = path.split("/");
|
|
2331
|
+
const assets = parts.lastIndexOf("assets");
|
|
2332
|
+
return assets >= 3 && parts.length > assets + 3 ? parts.slice(0, assets + 3).join("/") : path;
|
|
2333
|
+
};
|
|
2315
2334
|
/** An asset URL without its query: the viewer claims it carried, if any, are returned apart. */
|
|
2316
2335
|
const splitAssetUrl = (url) => {
|
|
2317
|
-
const
|
|
2318
|
-
const base =
|
|
2336
|
+
const query = url.split("?", 2)[1];
|
|
2337
|
+
const base = assetUrlOf(url);
|
|
2319
2338
|
const raw = query ? new URLSearchParams(query).get("viewerClaims") : null;
|
|
2320
2339
|
if (raw === null) return { base };
|
|
2321
2340
|
try {
|
|
@@ -2412,6 +2431,12 @@ Object.defineProperty(exports, "API_ERROR_DEFINITIONS", {
|
|
|
2412
2431
|
return API_ERROR_DEFINITIONS;
|
|
2413
2432
|
}
|
|
2414
2433
|
});
|
|
2434
|
+
Object.defineProperty(exports, "ASSET_RESOURCE_PATHS", {
|
|
2435
|
+
enumerable: true,
|
|
2436
|
+
get: function() {
|
|
2437
|
+
return ASSET_RESOURCE_PATHS;
|
|
2438
|
+
}
|
|
2439
|
+
});
|
|
2415
2440
|
Object.defineProperty(exports, "AUTO_PAGING_TO_ARRAY_MAX", {
|
|
2416
2441
|
enumerable: true,
|
|
2417
2442
|
get: function() {
|
|
@@ -2604,6 +2629,18 @@ Object.defineProperty(exports, "appendAssetLocation", {
|
|
|
2604
2629
|
return appendAssetLocation;
|
|
2605
2630
|
}
|
|
2606
2631
|
});
|
|
2632
|
+
Object.defineProperty(exports, "appendSignedLocation", {
|
|
2633
|
+
enumerable: true,
|
|
2634
|
+
get: function() {
|
|
2635
|
+
return appendSignedLocation;
|
|
2636
|
+
}
|
|
2637
|
+
});
|
|
2638
|
+
Object.defineProperty(exports, "assetUrlOf", {
|
|
2639
|
+
enumerable: true,
|
|
2640
|
+
get: function() {
|
|
2641
|
+
return assetUrlOf;
|
|
2642
|
+
}
|
|
2643
|
+
});
|
|
2607
2644
|
Object.defineProperty(exports, "buildAssetUrl", {
|
|
2608
2645
|
enumerable: true,
|
|
2609
2646
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_UploadController = require("./UploadController-BSZnq84V.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-BJaLU71Q.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
type CalmLensProviderProps<F extends UploadFile = File> = CalmLensProvidedOptions<F> & {
|
|
4
4
|
children?: ReactNode;
|
|
@@ -88,7 +88,6 @@ declare const TEST_INPUT_SCHEMA: z.ZodObject<{
|
|
|
88
88
|
score: z.ZodOptional<z.ZodNumber>;
|
|
89
89
|
action: z.ZodOptional<z.ZodEnum<{
|
|
90
90
|
"age-restrict": "age-restrict";
|
|
91
|
-
allow: "allow";
|
|
92
91
|
block: "block";
|
|
93
92
|
limit: "limit";
|
|
94
93
|
}>>;
|
|
@@ -396,7 +395,7 @@ declare function detectTestImage(image: RgbaImage, key: string,
|
|
|
396
395
|
instances: {
|
|
397
396
|
category: "criminal-activity" | "harassment" | "hate" | "personal-information" | "profanity" | "self-harm" | "sexual" | "violence";
|
|
398
397
|
score?: number | undefined;
|
|
399
|
-
action?: "age-restrict" | "
|
|
398
|
+
action?: "age-restrict" | "block" | "limit" | undefined;
|
|
400
399
|
qualifiers: ("criminal-activity-alcohol" | "criminal-activity-coded-incitement" | "criminal-activity-csam" | "criminal-activity-demonstration" | "criminal-activity-discussion" | "criminal-activity-documentary" | "criminal-activity-educational" | "criminal-activity-fictional" | "criminal-activity-fraud" | "criminal-activity-gambling" | "criminal-activity-graffiti" | "criminal-activity-grooming" | "criminal-activity-historical" | "criminal-activity-instructions" | "criminal-activity-preparation" | "criminal-activity-promotion" | "criminal-activity-request" | "criminal-activity-sexual-solicitation" | "criminal-activity-substances" | "criminal-activity-support-prevention" | "criminal-activity-tobacco" | "harassment-abuse" | "harassment-bullying" | "harassment-documentary" | "harassment-educational" | "harassment-encouragement" | "harassment-fictional" | "harassment-historical" | "harassment-mild" | "harassment-public-target" | "harassment-sexual" | "harassment-support-prevention" | "harassment-threat" | "hate-abuse" | "hate-adjudicated-nazi-crimes-denial" | "hate-counterspeech" | "hate-dehumanization" | "hate-documentary" | "hate-educational" | "hate-exclusion" | "hate-fictional" | "hate-historical" | "hate-hostility" | "hate-inferiority" | "hate-nazi-genocide-denial-or-approval" | "hate-nazi-genocide-public-peace" | "hate-nazi-insignia-public-display" | "hate-nazi-symbols-public-display" | "hate-personal" | "hate-slurs" | "hate-support-prevention" | "hate-symbol" | "hate-threat" | "personal-information-contact" | "personal-information-credentials" | "personal-information-documentary" | "personal-information-educational" | "personal-information-email" | "personal-information-fictional" | "personal-information-financial" | "personal-information-government-id" | "personal-information-historical" | "personal-information-identifiers" | "personal-information-location" | "personal-information-phone" | "personal-information-request" | "personal-information-self-disclosure" | "personal-information-support-prevention" | "personal-information-third-party" | "profanity-documentary" | "profanity-educational" | "profanity-fictional" | "profanity-historical" | "profanity-mild" | "profanity-obfuscated" | "profanity-slurs" | "profanity-strong" | "profanity-support-prevention" | "self-harm-act" | "self-harm-age-restricted" | "self-harm-documentary" | "self-harm-educational" | "self-harm-encouragement" | "self-harm-fictional" | "self-harm-historical" | "self-harm-methods" | "self-harm-preparation" | "self-harm-support-prevention" | "self-harm-thoughts" | "sexual-activity" | "sexual-adult-promotion" | "sexual-artistic" | "sexual-assault-media" | "sexual-discussion" | "sexual-documentary" | "sexual-educational" | "sexual-explicit-language" | "sexual-extreme" | "sexual-fictional" | "sexual-historical" | "sexual-incest" | "sexual-intimate-image-abuse" | "sexual-minors" | "sexual-non-consensual" | "sexual-non-erotic-nudity" | "sexual-nudity" | "sexual-paid" | "sexual-pornographic-media" | "sexual-revealing-clothing" | "sexual-solicitation" | "sexual-strangulation" | "sexual-suggestive" | "sexual-support-prevention" | "sexual-text" | "violence-attack" | "violence-coded-incitement" | "violence-decapitation-act" | "violence-discussion" | "violence-documentary" | "violence-educational" | "violence-encouragement" | "violence-extremism" | "violence-fantasy" | "violence-fictional" | "violence-gore" | "violence-graphic" | "violence-high-impact" | "violence-historical" | "violence-injury" | "violence-natural-death" | "violence-preparation" | "violence-sport" | "violence-support-prevention" | "violence-text" | "violence-threat" | "violence-violent-death" | "violence-weapon" | "violence-wish")[];
|
|
401
400
|
}[];
|
|
402
401
|
detections?: {
|
|
@@ -1186,7 +1186,7 @@ const TEST_REGIONAL_ACTIONS_SCHEMA = /* @__PURE__ */ lazySchema(() => zod.array(
|
|
|
1186
1186
|
"block"
|
|
1187
1187
|
])
|
|
1188
1188
|
}).strict()).max(7).refine((entries) => new Set(entries.map((entry) => entry.region)).size === entries.length, "Choose each region once"));
|
|
1189
|
-
// src/contract/TestTriggers-
|
|
1189
|
+
// src/contract/TestTriggers-uL2Ec8Vt.js
|
|
1190
1190
|
/**
|
|
1191
1191
|
* The visual encoding of test images (shared by images and video frames), independent of what the
|
|
1192
1192
|
* bytes mean. An odd N×N grid of square cells fills the image. Its outer ring alternates black and
|
|
@@ -1680,7 +1680,6 @@ const TEST_INPUT_SCHEMA = /* @__PURE__ */ lazySchema(() => zod.object({
|
|
|
1680
1680
|
category: zod.enum(CLASSIFICATION_CATEGORIES),
|
|
1681
1681
|
score: zod.number().min(0).max(1).optional(),
|
|
1682
1682
|
action: zod.enum([
|
|
1683
|
-
"allow",
|
|
1684
1683
|
"limit",
|
|
1685
1684
|
"age-restrict",
|
|
1686
1685
|
"block"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-CuL1TOuf.js");
|
|
2
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-C--UAnoz.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 { cn as EventAsset, ln as TypedEvent, sn as Actor } from "./CalmLensTypes-
|
|
1
|
+
import { cn as EventAsset, ln as TypedEvent, sn as Actor } from "./CalmLensTypes-CtO4Dieu.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: {
|
package/cjs/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-CMM2tZpJ-IdIh63n0.js";
|
|
2
|
-
import { $ as FolderPage, $t as VerifyWebhookSignatureOptions, A as CdnAssetLocation, An as Policy, At as RetrieveAssetOptions, B as CreateHashListOptions, Bn as AssetRendered, Bt as UpdateAssetOptions, C as AssetUploadStatus, Cn as BoundingBox, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureResults, Dt as RequestAttempt, E as BatchAssetsOptions, En as ProcessingFeatureId, Et as RemoveAssetContentOptions, F as CdnTransform, Ft as SignUploadTokenOptions, G as DeleteAssetOptions, Gn as FileMetadata, Gt as UpdateProjectSettingsOptions, H as CreateMultipartUploadPartOptions, Hn as AssetSafetyHold, Ht as UpdateHashListOptions, I as ClassifyTextOptions, In as AssetInfo, It as SignedAssetUrl, J as EnsureLensesOptions, Jt as UploadPresetDefinition, K as DeleteMetadataFieldOptions, Kn as MetadataItem, Kt as UpgradePolicyOptions, L as ClientRequestDefaults, Ln as AssetHls, Lt as SignedUploadToken, M as CdnAssetUrlOptions, Mn as LensType, Mt as SearchAssetsOptions, N as CdnResource, Nn as AssetSearchMatchField, Nt as SetPolicyAutomaticUpdatesOptions, O as CalmLensAppClientOptions, On as ProcessingFeatureStage, Ot as RequestOptions, P as CdnServeOptions, Pn as AssetSearchQuery, Pt as SignAssetUrlOptions, Q as FolderIdOptions, Qt as UploadedAsset, R as ConnectionOptions, Rn as AssetHlsRendition, Rt as StreamingFeatureOptions, S as AssetUpload, Sn as AgeRange, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as DetectedPerson, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetSafetyHoldReason, Ut as UpdateLensOptions, V as CreateLensOptions, Vn as AssetRenderedKind, Vt as UpdateFolderOptions, W as DecideAssetOptions, Wn as ExtractedText, Wt as UpdatePolicyOptions, X as EnsureUploadPresetsOptions, Xt as UploadPresetPage, Y as EnsureMetadataFieldsOptions, Yt as UploadPresetIdOptions, Z as EnsureUploadPresetsResponse, Zt as UploadPresetSubmitAssetOptions, _ as AssetPage, _n as Folder, _t as ListLensesOptions, a as AssetChecksums, an as AssetTimelineSegment, at as IdempotencyOptions, b as AssetTimelinePage, bn as PublicProjectSettings, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as EventAsset, ct as LensIdOptions, d as AssetContentOptions, dn as EventFact, dt as ListAssetTimelineOptions, en as ViewerClaims, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as EventFactValues, ft as ListAssetsOptions, g as AssetModerationStatus, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventType, ht as ListHashListEntriesOptions, i as AssetAvailability, in as AssetBatchOperation, it as HashListPage, j as CdnAssetReference, jn as CursorPage, jt as RetryAssetOptions, k as CalmLensServerClientOptions, kn as ProcessingFeatures, kt as ResetPolicyOptions, l as AssetClassificationStatus, ln as TypedEvent, lt as LensPage, m as AssetModeration, mn as EventSeverity, mt as ListFoldersOptions, n as AppInfo, nn as WebhookHeadersInput, nt as HashListEntryPage, o as AssetChildrenPage, on as GetEventsResponse, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventFacts, pt as ListEventsOptions, q as EnsureLensOptions, qn as ProcessingOptions, qt as UploadAssetPartOptions, r as Asset, rn as WebhookPayloadInput, rt as HashListIdOptions, s as AssetClassification, st as Lens, t as AddHashListEntryOptions, tn as WaitForAssetDecisionOptions, tt as HashListEntryIdOptions, u as AssetContent, un as EventCategory, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as MetadataFieldsResource, vt as ListPoliciesOptions, w as AssetVisibility, wn as DetectedFace, wt as PolicyIdOptions, x as AssetType, xn as UploadPreset, xt as MoveFolderOptions, y as AssetSearchResult, yn as ProjectSettingsResource, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zn as AssetPreview, zt as SubmitAssetOptions } from "./CalmLensTypes-
|
|
3
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
4
|
-
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } 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 FolderPage, $t as VerifyWebhookSignatureOptions, A as CdnAssetLocation, An as Policy, At as RetrieveAssetOptions, B as CreateHashListOptions, Bn as AssetRendered, Bt as UpdateAssetOptions, C as AssetUploadStatus, Cn as BoundingBox, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureResults, Dt as RequestAttempt, E as BatchAssetsOptions, En as ProcessingFeatureId, Et as RemoveAssetContentOptions, F as CdnTransform, Ft as SignUploadTokenOptions, G as DeleteAssetOptions, Gn as FileMetadata, Gt as UpdateProjectSettingsOptions, H as CreateMultipartUploadPartOptions, Hn as AssetSafetyHold, Ht as UpdateHashListOptions, I as ClassifyTextOptions, In as AssetInfo, It as SignedAssetUrl, J as EnsureLensesOptions, Jt as UploadPresetDefinition, K as DeleteMetadataFieldOptions, Kn as MetadataItem, Kt as UpgradePolicyOptions, L as ClientRequestDefaults, Ln as AssetHls, Lt as SignedUploadToken, M as CdnAssetUrlOptions, Mn as LensType, Mt as SearchAssetsOptions, N as CdnResource, Nn as AssetSearchMatchField, Nt as SetPolicyAutomaticUpdatesOptions, O as CalmLensAppClientOptions, On as ProcessingFeatureStage, Ot as RequestOptions, P as CdnServeOptions, Pn as AssetSearchQuery, Pt as SignAssetUrlOptions, Q as FolderIdOptions, Qt as UploadedAsset, R as ConnectionOptions, Rn as AssetHlsRendition, Rt as StreamingFeatureOptions, S as AssetUpload, Sn as AgeRange, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as DetectedPerson, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetSafetyHoldReason, Ut as UpdateLensOptions, V as CreateLensOptions, Vn as AssetRenderedKind, Vt as UpdateFolderOptions, W as DecideAssetOptions, Wn as ExtractedText, Wt as UpdatePolicyOptions, X as EnsureUploadPresetsOptions, Xt as UploadPresetPage, Y as EnsureMetadataFieldsOptions, Yt as UploadPresetIdOptions, Z as EnsureUploadPresetsResponse, Zt as UploadPresetSubmitAssetOptions, _ as AssetPage, _n as Folder, _t as ListLensesOptions, a as AssetChecksums, an as AssetTimelineSegment, at as IdempotencyOptions, b as AssetTimelinePage, bn as PublicProjectSettings, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as EventAsset, ct as LensIdOptions, d as AssetContentOptions, dn as EventFact, dt as ListAssetTimelineOptions, en as ViewerClaims, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as EventFactValues, ft as ListAssetsOptions, g as AssetModerationStatus, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventType, ht as ListHashListEntriesOptions, i as AssetAvailability, in as AssetBatchOperation, it as HashListPage, j as CdnAssetReference, jn as CursorPage, jt as RetryAssetOptions, k as CalmLensServerClientOptions, kn as ProcessingFeatures, kt as ResetPolicyOptions, l as AssetClassificationStatus, ln as TypedEvent, lt as LensPage, m as AssetModeration, mn as EventSeverity, mt as ListFoldersOptions, n as AppInfo, nn as WebhookHeadersInput, nt as HashListEntryPage, o as AssetChildrenPage, on as GetEventsResponse, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventFacts, pt as ListEventsOptions, q as EnsureLensOptions, qn as ProcessingOptions, qt as UploadAssetPartOptions, r as Asset, rn as WebhookPayloadInput, rt as HashListIdOptions, s as AssetClassification, st as Lens, t as AddHashListEntryOptions, tn as WaitForAssetDecisionOptions, tt as HashListEntryIdOptions, u as AssetContent, un as EventCategory, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as MetadataFieldsResource, vt as ListPoliciesOptions, w as AssetVisibility, wn as DetectedFace, wt as PolicyIdOptions, x as AssetType, xn as UploadPreset, xt as MoveFolderOptions, y as AssetSearchResult, yn as ProjectSettingsResource, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zn as AssetPreview, zt as SubmitAssetOptions } from "./CalmLensTypes-CtO4Dieu.js";
|
|
3
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-B3u6BlP5.js";
|
|
4
|
+
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-DQUZYLVY.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-DZadhbAJ.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 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 EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as 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, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, 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 ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, 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, selectModerationContextItems };
|
package/cjs/app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-CuL1TOuf.js");
|
|
3
3
|
require("./index.js");
|
|
4
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
4
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-C--UAnoz.js");
|
|
5
5
|
exports.AUTO_PAGING_TO_ARRAY_MAX = require_ModerationContextLimits.AUTO_PAGING_TO_ARRAY_MAX;
|
|
6
6
|
exports.CALMLENS_ERROR_CODES = require_ModerationContextLimits.CALMLENS_ERROR_CODES;
|
|
7
7
|
exports.CDN_RESOURCES = require_ModerationContextLimits.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-CtO4Dieu.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-BJaLU71Q.js";
|
|
3
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-CRbCsX7a.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-BGywTQ2M.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-CkQQm3Qw.js");
|
|
3
|
+
const require_Core = require("./Core-CB0-p-ro.js");
|
|
4
|
+
const require_UploadController = require("./UploadController-BSZnq84V.js");
|
|
5
5
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
6
|
-
const require_BrowserUpload = require("./BrowserUpload-
|
|
6
|
+
const require_BrowserUpload = require("./BrowserUpload-DLoi5qVj.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-CMM2tZpJ-IdIh63n0.js";
|
|
2
|
-
import { In as AssetInfo, N as CdnResource, et as GetAssetInfoOptions } from "./CalmLensTypes-
|
|
3
|
-
import "./WebhookPayload-
|
|
2
|
+
import { In as AssetInfo, N as CdnResource, et as GetAssetInfoOptions } from "./CalmLensTypes-CtO4Dieu.js";
|
|
3
|
+
import "./WebhookPayload-DZadhbAJ.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 ClassificationNotEvaluatedReason, c as ModerationQualifier, d as HashListEntry, f as ModerationContext, g as selectModerationContextItems, h as ModerationContextItem, i as ClassificationCategoryReport, l as PolicyAction, m as MODERATION_CONTEXT_USED_ITEMS, n as ClassificationCategories, o as ClassificationQualifierResults, p as MODERATION_CONTEXT_USED_CHARACTERS, r as ClassificationCategory, s as Likelihood, u as HashList } from "./Classification-CMM2tZpJ-IdIh63n0.js";
|
|
2
|
-
import { $ as FolderPage, $t as VerifyWebhookSignatureOptions, A as CdnAssetLocation, An as Policy, At as RetrieveAssetOptions, B as CreateHashListOptions, Bn as AssetRendered, Bt as UpdateAssetOptions, C as AssetUploadStatus, Cn as BoundingBox, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureResults, Dt as RequestAttempt, E as BatchAssetsOptions, En as ProcessingFeatureId, Et as RemoveAssetContentOptions, F as CdnTransform, Ft as SignUploadTokenOptions, G as DeleteAssetOptions, Gn as FileMetadata, Gt as UpdateProjectSettingsOptions, H as CreateMultipartUploadPartOptions, Hn as AssetSafetyHold, Ht as UpdateHashListOptions, I as ClassifyTextOptions, In as AssetInfo, It as SignedAssetUrl, J as EnsureLensesOptions, Jt as UploadPresetDefinition, K as DeleteMetadataFieldOptions, Kn as MetadataItem, Kt as UpgradePolicyOptions, L as ClientRequestDefaults, Ln as AssetHls, Lt as SignedUploadToken, M as CdnAssetUrlOptions, Mn as LensType, Mt as SearchAssetsOptions, N as CdnResource, Nn as AssetSearchMatchField, Nt as SetPolicyAutomaticUpdatesOptions, O as CalmLensAppClientOptions, On as ProcessingFeatureStage, Ot as RequestOptions, P as CdnServeOptions, Pn as AssetSearchQuery, Pt as SignAssetUrlOptions, Q as FolderIdOptions, Qt as UploadedAsset, R as ConnectionOptions, Rn as AssetHlsRendition, Rt as StreamingFeatureOptions, S as AssetUpload, Sn as AgeRange, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as DetectedPerson, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetSafetyHoldReason, Ut as UpdateLensOptions, V as CreateLensOptions, Vn as AssetRenderedKind, Vt as UpdateFolderOptions, W as DecideAssetOptions, Wn as ExtractedText, Wt as UpdatePolicyOptions, X as EnsureUploadPresetsOptions, Xt as UploadPresetPage, Y as EnsureMetadataFieldsOptions, Yt as UploadPresetIdOptions, Z as EnsureUploadPresetsResponse, Zt as UploadPresetSubmitAssetOptions, _ as AssetPage, _n as Folder, _t as ListLensesOptions, a as AssetChecksums, an as AssetTimelineSegment, at as IdempotencyOptions, b as AssetTimelinePage, bn as PublicProjectSettings, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as EventAsset, ct as LensIdOptions, d as AssetContentOptions, dn as EventFact, dt as ListAssetTimelineOptions, en as ViewerClaims, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as EventFactValues, ft as ListAssetsOptions, g as AssetModerationStatus, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventType, ht as ListHashListEntriesOptions, i as AssetAvailability, in as AssetBatchOperation, it as HashListPage, j as CdnAssetReference, jn as CursorPage, jt as RetryAssetOptions, k as CalmLensServerClientOptions, kn as ProcessingFeatures, kt as ResetPolicyOptions, l as AssetClassificationStatus, ln as TypedEvent, lt as LensPage, m as AssetModeration, mn as EventSeverity, mt as ListFoldersOptions, n as AppInfo, nn as WebhookHeadersInput, nt as HashListEntryPage, o as AssetChildrenPage, on as GetEventsResponse, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventFacts, pt as ListEventsOptions, q as EnsureLensOptions, qn as ProcessingOptions, qt as UploadAssetPartOptions, r as Asset, rn as WebhookPayloadInput, rt as HashListIdOptions, s as AssetClassification, st as Lens, t as AddHashListEntryOptions, tn as WaitForAssetDecisionOptions, tt as HashListEntryIdOptions, u as AssetContent, un as EventCategory, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as MetadataFieldsResource, vt as ListPoliciesOptions, w as AssetVisibility, wn as DetectedFace, wt as PolicyIdOptions, x as AssetType, xn as UploadPreset, xt as MoveFolderOptions, y as AssetSearchResult, yn as ProjectSettingsResource, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zn as AssetPreview, zt as SubmitAssetOptions } from "./CalmLensTypes-
|
|
3
|
-
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } 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 FolderPage, $t as VerifyWebhookSignatureOptions, A as CdnAssetLocation, An as Policy, At as RetrieveAssetOptions, B as CreateHashListOptions, Bn as AssetRendered, Bt as UpdateAssetOptions, C as AssetUploadStatus, Cn as BoundingBox, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as ProcessingFeatureResults, Dt as RequestAttempt, E as BatchAssetsOptions, En as ProcessingFeatureId, Et as RemoveAssetContentOptions, F as CdnTransform, Ft as SignUploadTokenOptions, G as DeleteAssetOptions, Gn as FileMetadata, Gt as UpdateProjectSettingsOptions, H as CreateMultipartUploadPartOptions, Hn as AssetSafetyHold, Ht as UpdateHashListOptions, I as ClassifyTextOptions, In as AssetInfo, It as SignedAssetUrl, J as EnsureLensesOptions, Jt as UploadPresetDefinition, K as DeleteMetadataFieldOptions, Kn as MetadataItem, Kt as UpgradePolicyOptions, L as ClientRequestDefaults, Ln as AssetHls, Lt as SignedUploadToken, M as CdnAssetUrlOptions, Mn as LensType, Mt as SearchAssetsOptions, N as CdnResource, Nn as AssetSearchMatchField, Nt as SetPolicyAutomaticUpdatesOptions, O as CalmLensAppClientOptions, On as ProcessingFeatureStage, Ot as RequestOptions, P as CdnServeOptions, Pn as AssetSearchQuery, Pt as SignAssetUrlOptions, Q as FolderIdOptions, Qt as UploadedAsset, R as ConnectionOptions, Rn as AssetHlsRendition, Rt as StreamingFeatureOptions, S as AssetUpload, Sn as AgeRange, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as DetectedPerson, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetSafetyHoldReason, Ut as UpdateLensOptions, V as CreateLensOptions, Vn as AssetRenderedKind, Vt as UpdateFolderOptions, W as DecideAssetOptions, Wn as ExtractedText, Wt as UpdatePolicyOptions, X as EnsureUploadPresetsOptions, Xt as UploadPresetPage, Y as EnsureMetadataFieldsOptions, Yt as UploadPresetIdOptions, Z as EnsureUploadPresetsResponse, Zt as UploadPresetSubmitAssetOptions, _ as AssetPage, _n as Folder, _t as ListLensesOptions, a as AssetChecksums, an as AssetTimelineSegment, at as IdempotencyOptions, b as AssetTimelinePage, bn as PublicProjectSettings, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as EventAsset, ct as LensIdOptions, d as AssetContentOptions, dn as EventFact, dt as ListAssetTimelineOptions, en as ViewerClaims, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as EventFactValues, ft as ListAssetsOptions, g as AssetModerationStatus, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventType, ht as ListHashListEntriesOptions, i as AssetAvailability, in as AssetBatchOperation, it as HashListPage, j as CdnAssetReference, jn as CursorPage, jt as RetryAssetOptions, k as CalmLensServerClientOptions, kn as ProcessingFeatures, kt as ResetPolicyOptions, l as AssetClassificationStatus, ln as TypedEvent, lt as LensPage, m as AssetModeration, mn as EventSeverity, mt as ListFoldersOptions, n as AppInfo, nn as WebhookHeadersInput, nt as HashListEntryPage, o as AssetChildrenPage, on as GetEventsResponse, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventFacts, pt as ListEventsOptions, q as EnsureLensOptions, qn as ProcessingOptions, qt as UploadAssetPartOptions, r as Asset, rn as WebhookPayloadInput, rt as HashListIdOptions, s as AssetClassification, st as Lens, t as AddHashListEntryOptions, tn as WaitForAssetDecisionOptions, tt as HashListEntryIdOptions, u as AssetContent, un as EventCategory, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as MetadataFieldsResource, vt as ListPoliciesOptions, w as AssetVisibility, wn as DetectedFace, wt as PolicyIdOptions, x as AssetType, xn as UploadPreset, xt as MoveFolderOptions, y as AssetSearchResult, yn as ProjectSettingsResource, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zn as AssetPreview, zt as SubmitAssetOptions } from "./CalmLensTypes-CtO4Dieu.js";
|
|
3
|
+
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-DQUZYLVY.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-DZadhbAJ.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 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 EventAsset, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventSeverity, type EventType, type GetEventsResponse as 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, MODERATION_CONTEXT_USED_CHARACTERS, MODERATION_CONTEXT_USED_ITEMS, 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 ProcessingFeatureId, type ProcessingFeatureResults, type ProcessingFeatureStage, type ProcessingFeatures, type ProcessingOptions, type ProjectSettingsResource, type PublicProjectSettings, type RemoveAssetContentOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, 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, selectModerationContextItems };
|