calmlens 0.28.1 → 0.29.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 +151 -123
- package/cjs/{BrowserUpload-DLoi5qVj.js → BrowserUpload-CcSQI7Kf.js} +1 -1
- package/cjs/{BrowserUpload-CRbCsX7a.d.ts → BrowserUpload-CeGsM9h1.d.ts} +2 -2
- package/cjs/{CalmLensAppClient-C--UAnoz.js → CalmLensAppClient-BPILD5mg.js} +11 -17
- package/cjs/{CalmLensAppClient-B3u6BlP5.d.ts → CalmLensAppClient-D-BD_Ny1.d.ts} +7 -1
- package/cjs/{CalmLensOptionKeys-BxrJ47zd.js → CalmLensConnection-Wfxn25LT.js} +660 -643
- package/cjs/{CalmLensServerClient-B8ntjNL3.d.ts → CalmLensServerClient-BYN_N0lt.d.ts} +33 -2
- package/cjs/{CalmLensServerClient-CPbCEJMK.js → CalmLensServerClient-C_42j_i4.js} +72 -41
- package/cjs/{CalmLensTypes-CtO4Dieu.d.ts → CalmLensTypes-C2blKgTu.d.ts} +51 -75
- package/{esm/Core-BJaLU71Q.d.ts → cjs/Core-CNmoxDCW.d.ts} +2 -2
- package/cjs/{Core-CB0-p-ro.js → Core-CfdovxKJ.js} +2 -2
- package/cjs/{ModerationContextLimits-CuL1TOuf.js → ModerationContextLimits-DXlPrt4K.js} +24 -13
- package/cjs/{ReactUpload-3QgzpdMu.js → ReactUpload-CzsQwVKM.js} +1 -1
- package/{esm/ReactUpload-BGUkcMpg.d.ts → cjs/ReactUpload-kqEe6gcN.d.ts} +1 -1
- package/cjs/{UploadController-BSZnq84V.js → UploadController-D_Y5wktq.js} +2 -2
- package/{esm/WebhookPayload-DZadhbAJ.d.ts → cjs/WebhookPayload-DZWlnvcY.d.ts} +3 -2
- package/cjs/app.d.ts +5 -5
- package/cjs/app.js +2 -2
- package/cjs/elements.d.ts +4 -4
- package/cjs/elements.js +4 -4
- package/cjs/{index-DQUZYLVY.d.ts → index-Dl2qwS8L.d.ts} +2 -2
- package/cjs/index.d.ts +4 -4
- package/cjs/index.js +1 -1
- 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 +5 -5
- package/cjs/server.js +2 -2
- package/cjs/testing.d.ts +54 -26
- package/cjs/testing.js +413 -93
- package/cjs/{ui-BGywTQ2M.d.ts → ui-BtmJC-f9.d.ts} +2 -2
- package/cjs/{ui-CkQQm3Qw.js → ui-CkOexkAO.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-CRbCsX7a.d.ts → BrowserUpload-CeGsM9h1.d.ts} +2 -2
- package/esm/{BrowserUpload-BKrrHzoh.js → BrowserUpload-DJ2euKyv.js} +1 -1
- package/esm/{CalmLensAppClient-D_SprSKl.js → CalmLensAppClient-CCT5Em2S.js} +3 -9
- package/esm/{CalmLensAppClient-B3u6BlP5.d.ts → CalmLensAppClient-D-BD_Ny1.d.ts} +7 -1
- package/esm/{CalmLensOptionKeys-B6an7neE.js → CalmLensConnection-CfBXkam-.js} +661 -644
- package/esm/{CalmLensServerClient-B8ntjNL3.d.ts → CalmLensServerClient-BYN_N0lt.d.ts} +33 -2
- package/esm/{CalmLensServerClient-BY45aX5Q.js → CalmLensServerClient-e6gVcMxy.js} +58 -27
- package/esm/{CalmLensTypes-CtO4Dieu.d.ts → CalmLensTypes-C2blKgTu.d.ts} +51 -75
- package/{cjs/Core-BJaLU71Q.d.ts → esm/Core-CNmoxDCW.d.ts} +2 -2
- package/esm/{Core-dzPyrg_G.js → Core-CojlqrKH.js} +2 -2
- package/esm/{ModerationContextLimits-IH2zX1wg.js → ModerationContextLimits-Abu_L1Df.js} +24 -13
- package/esm/{ReactUpload-4DeUbua_.js → ReactUpload-CDrA7hRn.js} +1 -1
- package/{cjs/ReactUpload-BGUkcMpg.d.ts → esm/ReactUpload-kqEe6gcN.d.ts} +1 -1
- package/esm/{UploadController-DKjI8S2K.js → UploadController-BubUXclM.js} +2 -2
- package/{cjs/WebhookPayload-DZadhbAJ.d.ts → esm/WebhookPayload-DZWlnvcY.d.ts} +3 -2
- package/esm/app.d.ts +5 -5
- package/esm/app.js +2 -2
- package/esm/elements.d.ts +4 -4
- package/esm/elements.js +4 -4
- package/esm/{index-DQUZYLVY.d.ts → index-Dl2qwS8L.d.ts} +2 -2
- package/esm/index.d.ts +4 -4
- package/esm/index.js +1 -1
- 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 +5 -5
- package/esm/server.js +2 -2
- package/esm/testing.d.ts +54 -26
- package/esm/testing.js +406 -87
- package/esm/{ui-BovDqg9n.js → ui--AzgLLVf.js} +2 -2
- package/esm/{ui-BGywTQ2M.d.ts → ui-BtmJC-f9.d.ts} +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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as HashListEntry, u as HashList } from "./Classification-CMM2tZpJ-IdIh63n0.js";
|
|
2
|
-
import { $ as FolderPage,
|
|
3
|
-
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-
|
|
2
|
+
import { $ as FolderPage, At as ResetPolicyOptions, B as CreateHashListOptions, D as BatchAssetsResponse, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, Et as RemoveAssetContentOptions, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gt as UpdateLensOptions, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as AssetSearchQuery, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kt as UpdatePolicyOptions, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as Policy, Mt as RetrieveAssetOptions, Nt as RetryAssetOptions, P as CdnServeOptions, Q as FolderIdOptions, Qt as UploadPresetPage, Rn as AssetInfo, Rt as SignedAssetUrl, T as AssignPolicyOptions, Tt as PolicyPage, U as CreatePolicyOptions, Ut as UpdateFolderOptions, V as CreateLensOptions, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Y as EnsureMetadataFieldsOptions, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zt as UploadPresetIdOptions, _ as AssetPage, _t as ListLensesOptions, b as AssetTimelinePage, bn as MetadataFieldsResource, 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 RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kt as RequestOptions, ln as GetEventsResponse, lt as LensPage, mt as ListFoldersOptions, nt as HashListEntryPage, o as AssetChildrenPage, pt as ListEventsOptions, q as EnsureLensOptions, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vt as ListPoliciesOptions, wt as PolicyIdOptions, xn as ProjectSettingsResource, xt as MoveFolderOptions, yn as Folder, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-C2blKgTu.js";
|
|
3
|
+
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-DZWlnvcY.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;
|
|
@@ -21,6 +21,11 @@ interface TransportRequest {
|
|
|
21
21
|
signal?: AbortSignal;
|
|
22
22
|
/** Overrides the client's `maxRetries` for this request. */
|
|
23
23
|
maxRetries?: number;
|
|
24
|
+
/**
|
|
25
|
+
* When the call's deadline passes, on the transport's clock: no attempt starts after it, an
|
|
26
|
+
* attempt's own deadline never runs past it, and no retry waits up to it.
|
|
27
|
+
*/
|
|
28
|
+
deadlineAt?: number;
|
|
24
29
|
}
|
|
25
30
|
interface LensCache {
|
|
26
31
|
readonly ensuredLenses: Map<string, Lens>;
|
|
@@ -123,6 +128,12 @@ declare class CalmLensServerClient {
|
|
|
123
128
|
list: (options?: ListAssetsOptions, requestOptions?: RequestOptions) => ListPromise<AssetPage>;
|
|
124
129
|
/** Retrieves an asset with its status and classification results. */
|
|
125
130
|
retrieve: (options: RetrieveAssetOptions, requestOptions?: RequestOptions) => Promise<CalmLensResponse<Asset>>;
|
|
131
|
+
/**
|
|
132
|
+
* Retrieves the project's asset that has this `externalId`, such as the one an
|
|
133
|
+
* `asset/duplicate-external-id` error names. Rejects with `asset/not-found` when no asset
|
|
134
|
+
* has it.
|
|
135
|
+
*/
|
|
136
|
+
retrieveByExternalId: (options: RetrieveAssetByExternalIdOptions, requestOptions?: RequestOptions) => Promise<CalmLensResponse<Asset>>;
|
|
126
137
|
/** Updates an asset's editable fields. */
|
|
127
138
|
update: (options: UpdateAssetOptions, requestOptions?: RequestOptions) => Promise<CalmLensResponse<Asset>>;
|
|
128
139
|
/**
|
|
@@ -167,6 +178,16 @@ declare class CalmLensServerClient {
|
|
|
167
178
|
* needs `confirmPurge: true` and permanently deletes the stored content.
|
|
168
179
|
*/
|
|
169
180
|
decide: (options: DecideAssetOptions, requestOptions?: RequestOptions) => Promise<CalmLensResponse<Asset>>;
|
|
181
|
+
/**
|
|
182
|
+
* Sends an asset to the project's human review queue, such as when one of your app's users
|
|
183
|
+
* reports it, with an optional `note` reviewers see. It doesn't change how the asset is
|
|
184
|
+
* delivered: a reviewer's decision does. Resolves with the review: a new one (HTTP 201,
|
|
185
|
+
* reason `reported`, sending `asset.review-requested`), or the one already waiting for the
|
|
186
|
+
* asset (HTTP 200), unchanged. Rejects with `asset/not-reviewable` (`details.reason`:
|
|
187
|
+
* `child-asset`, `not-moderated` or `content-unavailable`) and `asset/held`. Retried safely
|
|
188
|
+
* with an `idempotencyKey` request option.
|
|
189
|
+
*/
|
|
190
|
+
requestReview: (options: RequestAssetReviewOptions, requestOptions?: RequestOptions) => Promise<CalmLensResponse<AssetReviewRequest>>;
|
|
170
191
|
/**
|
|
171
192
|
* Waits until an asset is settled, its `classification.status` `completed` (with its
|
|
172
193
|
* decision in `classification.moderation.decision`) or `failed`, and returns that asset,
|
|
@@ -219,6 +240,16 @@ declare class CalmLensServerClient {
|
|
|
219
240
|
* after `cursor`; save the last page's `nextCursor` to resume later.
|
|
220
241
|
*/
|
|
221
242
|
list: (options?: ListEventsOptions, requestOptions?: RequestOptions) => ListPromise<GetEventsResponse>;
|
|
243
|
+
/**
|
|
244
|
+
* Retrieves the asset an event is about, as it is now, such as one from `events.list` or a
|
|
245
|
+
* parsed webhook delivery; events carry only the asset's ID. Resolves to `null` for an
|
|
246
|
+
* event that isn't about an asset, and rejects with `asset/not-found` once the asset is
|
|
247
|
+
* deleted. The asset's `eventSequence` orders it against events: an event with a higher
|
|
248
|
+
* `assetSequence` happened after this state, one with an equal or lower one is reflected in it.
|
|
249
|
+
*/
|
|
250
|
+
retrieveAsset: (event: {
|
|
251
|
+
readonly assetId?: string | null;
|
|
252
|
+
}, requestOptions?: RequestOptions) => Promise<CalmLensResponse<Asset> | null>;
|
|
222
253
|
};
|
|
223
254
|
get folders(): {
|
|
224
255
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
const
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-DXlPrt4K.js");
|
|
2
|
+
const require_CalmLensConnection = require("./CalmLensConnection-Wfxn25LT.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) => {
|
|
@@ -152,8 +152,8 @@ const isOptional = (value, type, nullable) => value === void 0 || nullable && va
|
|
|
152
152
|
*/
|
|
153
153
|
const isWebhookEvent = (value) => {
|
|
154
154
|
if (!isObject(value) || typeof value.id !== "string" || typeof value.type !== "string" || typeof value.projectId !== "string" || typeof value.createdAt !== "number") return false;
|
|
155
|
-
const { severity, title, description, assetId, assetSequence,
|
|
156
|
-
return isOptional(severity, "string", false) && isOptional(title, "string", false) && isOptional(description, "string", true) && isOptional(assetId, "string", true) && isOptional(assetSequence, "number", true) && (
|
|
155
|
+
const { severity, title, description, assetId, assetSequence, facts } = value;
|
|
156
|
+
return isOptional(severity, "string", false) && isOptional(title, "string", false) && isOptional(description, "string", true) && isOptional(assetId, "string", true) && isOptional(assetSequence, "number", true) && (facts === void 0 || Array.isArray(facts) && facts.every((fact) => isObject(fact) && typeof fact.key === "string" && "value" in fact && isOptional(fact.url, "string", false)));
|
|
157
157
|
};
|
|
158
158
|
/**
|
|
159
159
|
* The value of one of an event's facts, by key, or `undefined` when the event doesn't carry it.
|
|
@@ -217,7 +217,7 @@ const getEnsureLensCacheKey = (options) => stringifyJsonCanonical({
|
|
|
217
217
|
const requireId = (value, name) => require_ModerationContextLimits.encodePathSegment(value, name);
|
|
218
218
|
/** `options`, after checking that text it classifies isn't empty. */
|
|
219
219
|
const checkedTextContent = (options) => {
|
|
220
|
-
if (options && "content" in options && "plainText" in options.content && (typeof options.content.plainText !== "string" || !options.content.plainText.trim())) throw
|
|
220
|
+
if (options && "content" in options && "plainText" in options.content && (typeof options.content.plainText !== "string" || !options.content.plainText.trim())) throw require_CalmLensConnection.invalidPayload("Text to classify must be a non-empty string");
|
|
221
221
|
return options;
|
|
222
222
|
};
|
|
223
223
|
/** A signal that aborts when any of `signals` does. */
|
|
@@ -233,7 +233,7 @@ const anySignal = (signals) => {
|
|
|
233
233
|
* `CALMLENS_PROJECT_ID` and `CALMLENS_BASE_URL`, in runtimes that have one.
|
|
234
234
|
*/
|
|
235
235
|
const withEnvironmentDefaults = (options) => {
|
|
236
|
-
if (!options || typeof options !== "object" ||
|
|
236
|
+
if (!options || typeof options !== "object" || require_CalmLensConnection.getMockHooks(options)) return options;
|
|
237
237
|
const apiKey = options.apiKey ?? require_ModerationContextLimits.readEnv("CALMLENS_API_KEY");
|
|
238
238
|
const projectId = options.projectId ?? require_ModerationContextLimits.readEnv("CALMLENS_PROJECT_ID");
|
|
239
239
|
const baseUrl = options.baseUrl ?? require_ModerationContextLimits.readEnv("CALMLENS_BASE_URL");
|
|
@@ -249,9 +249,9 @@ const withEnvironmentDefaults = (options) => {
|
|
|
249
249
|
* `null` that the API refuses as `null`: those are left out, as if omitted.
|
|
250
250
|
*/
|
|
251
251
|
const checked = (operation, options) => {
|
|
252
|
-
require_ModerationContextLimits.checkOptionKeys(options, operation,
|
|
252
|
+
require_ModerationContextLimits.checkOptionKeys(options, operation, require_CalmLensConnection.SERVER_OPTION_KEYS);
|
|
253
253
|
if (!options || typeof options !== "object" || Array.isArray(options)) return options;
|
|
254
|
-
const nullable =
|
|
254
|
+
const nullable = require_CalmLensConnection.NULLABLE_OPTION_KEYS[operation] ?? [];
|
|
255
255
|
return Object.fromEntries(Object.entries(options).filter(([key, value]) => value !== null || nullable.includes(key)));
|
|
256
256
|
};
|
|
257
257
|
const inspectSymbol = Symbol.for("nodejs.util.inspect.custom");
|
|
@@ -313,14 +313,14 @@ var CalmLensServerClient = class {
|
|
|
313
313
|
this.#apiKey = apiKey;
|
|
314
314
|
this.#settings = {
|
|
315
315
|
projectId,
|
|
316
|
-
...
|
|
317
|
-
cdnBaseUrl: (rest.cdnBaseUrl ??
|
|
316
|
+
...require_CalmLensConnection.resolveConnectionOptions(rest),
|
|
317
|
+
cdnBaseUrl: (rest.cdnBaseUrl ?? require_CalmLensConnection.getMockHooks(rest)?.defaultCdnBaseUrl ?? require_ModerationContextLimits.DEFAULT_CDN_BASE_URL).replace(/\/+$/, "")
|
|
318
318
|
};
|
|
319
319
|
this.#lenses = lenses ?? {
|
|
320
320
|
ensuredLenses: /* @__PURE__ */ new Map(),
|
|
321
321
|
pendingEnsureLenses: /* @__PURE__ */ new Map()
|
|
322
322
|
};
|
|
323
|
-
this.#connection = new
|
|
323
|
+
this.#connection = new require_CalmLensConnection.CalmLensConnection(this.#settings, apiKey, { readEnvironment: !require_CalmLensConnection.getMockHooks(options) });
|
|
324
324
|
}
|
|
325
325
|
/** Keeps the API key out of `console.log`, `util.inspect` and `JSON.stringify`. */
|
|
326
326
|
[inspectSymbol]() {
|
|
@@ -391,26 +391,23 @@ var CalmLensServerClient = class {
|
|
|
391
391
|
}
|
|
392
392
|
async #submitAsset(operation, options, wait, requestOptions) {
|
|
393
393
|
const connection = this.#connection.forCall(operation, requestOptions);
|
|
394
|
-
const body =
|
|
394
|
+
const body = require_CalmLensConnection.prepareSubmitAssetOptions(options, {
|
|
395
395
|
deferUploadChecks: connection.deferUploadChecks,
|
|
396
396
|
partSizeBytes: connection.partSizeBytes
|
|
397
397
|
});
|
|
398
398
|
const uploadsPath = `${this.#projectPath}/assets`;
|
|
399
|
-
if ("content" in body &&
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}));
|
|
405
|
-
}
|
|
406
|
-
if ("content" in body || "part" in body) return require_CalmLensOptionKeys.expectAsset(await connection.submitUpload(uploadsPath, body, wait));
|
|
399
|
+
if ("content" in body && require_CalmLensConnection.splitsIntoParts(body.content, connection.partSizeBytes)) return require_CalmLensConnection.expectAsset(await connection.submitInParts(uploadsPath, body, wait, {
|
|
400
|
+
partPath: (assetId) => `/assets/${encodeURIComponent(assetId)}/part`,
|
|
401
|
+
retrieve: (assetId, read) => read.json("GET", `/assets/${requireId(assetId, "Asset ID")}`)
|
|
402
|
+
}));
|
|
403
|
+
if ("content" in body || "part" in body) return require_CalmLensConnection.expectAsset(await connection.submitUpload(uploadsPath, body, wait));
|
|
407
404
|
const { idempotencyKey, ...fields } = body;
|
|
408
405
|
const data = await connection.json("POST", uploadsPath, {
|
|
409
406
|
query: { wait },
|
|
410
407
|
body: fields,
|
|
411
|
-
idempotencyKey: idempotencyKey ?? requestOptions?.idempotencyKey ??
|
|
408
|
+
idempotencyKey: idempotencyKey ?? requestOptions?.idempotencyKey ?? require_CalmLensConnection.newIdempotencyKey()
|
|
412
409
|
});
|
|
413
|
-
return
|
|
410
|
+
return require_CalmLensConnection.expectAsset(data);
|
|
414
411
|
}
|
|
415
412
|
get cdn() {
|
|
416
413
|
return {
|
|
@@ -526,6 +523,15 @@ sign: async (options) => {
|
|
|
526
523
|
const { assetId } = checked("assets.retrieve", options);
|
|
527
524
|
return this.#send("assets.retrieve", requestOptions, "GET", `/assets/${requireId(assetId, "Asset ID")}`);
|
|
528
525
|
},
|
|
526
|
+
/**
|
|
527
|
+
* Retrieves the project's asset that has this `externalId`, such as the one an
|
|
528
|
+
* `asset/duplicate-external-id` error names. Rejects with `asset/not-found` when no asset
|
|
529
|
+
* has it.
|
|
530
|
+
*/
|
|
531
|
+
retrieveByExternalId: async (options, requestOptions) => {
|
|
532
|
+
const { externalId } = checked("assets.retrieveByExternalId", options);
|
|
533
|
+
return this.#send("assets.retrieveByExternalId", requestOptions, "GET", `${this.#projectPath}/assets/by-external-id/${requireId(externalId, "External ID")}`);
|
|
534
|
+
},
|
|
529
535
|
/** Updates an asset's editable fields. */
|
|
530
536
|
update: async (options, requestOptions) => {
|
|
531
537
|
const { assetId, ...body } = checked("assets.update", options);
|
|
@@ -564,7 +570,7 @@ sign: async (options) => {
|
|
|
564
570
|
const { assetId, ...options } = checked("assets.uploadPart", partOptions);
|
|
565
571
|
const encodedAssetId = requireId(assetId, "Asset ID");
|
|
566
572
|
const connection = this.#connection.forCall("assets.uploadPart", requestOptions);
|
|
567
|
-
return
|
|
573
|
+
return require_CalmLensConnection.expectAsset(await connection.uploadPart(`/assets/${encodedAssetId}/part`, options));
|
|
568
574
|
},
|
|
569
575
|
/** Moves an asset into a folder, or to the project root with `folderId: null`. */
|
|
570
576
|
move: async (options, requestOptions) => {
|
|
@@ -591,6 +597,19 @@ sign: async (options) => {
|
|
|
591
597
|
return this.#send("assets.decide", requestOptions, "POST", `/assets/${requireId(assetId, "Asset ID")}/decision`, { body });
|
|
592
598
|
},
|
|
593
599
|
/**
|
|
600
|
+
* Sends an asset to the project's human review queue, such as when one of your app's users
|
|
601
|
+
* reports it, with an optional `note` reviewers see. It doesn't change how the asset is
|
|
602
|
+
* delivered: a reviewer's decision does. Resolves with the review: a new one (HTTP 201,
|
|
603
|
+
* reason `reported`, sending `asset.review-requested`), or the one already waiting for the
|
|
604
|
+
* asset (HTTP 200), unchanged. Rejects with `asset/not-reviewable` (`details.reason`:
|
|
605
|
+
* `child-asset`, `not-moderated` or `content-unavailable`) and `asset/held`. Retried safely
|
|
606
|
+
* with an `idempotencyKey` request option.
|
|
607
|
+
*/
|
|
608
|
+
requestReview: async (options, requestOptions) => {
|
|
609
|
+
const { assetId, ...body } = checked("assets.requestReview", options);
|
|
610
|
+
return this.#send("assets.requestReview", requestOptions, "POST", `/assets/${requireId(assetId, "Asset ID")}/review-requests`, { body });
|
|
611
|
+
},
|
|
612
|
+
/**
|
|
594
613
|
* Waits until an asset is settled, its `classification.status` `completed` (with its
|
|
595
614
|
* decision in `classification.moderation.decision`) or `failed`, and returns that asset,
|
|
596
615
|
* checking every few seconds. A `queued` or `processing` asset is still waiting, even when a
|
|
@@ -600,14 +619,17 @@ sign: async (options) => {
|
|
|
600
619
|
waitForDecision: async (waitOptions, requestOptions) => {
|
|
601
620
|
const { assetId, ...options } = checked("assets.waitForDecision", waitOptions);
|
|
602
621
|
requireId(assetId, "Asset ID");
|
|
603
|
-
|
|
622
|
+
require_CalmLensConnection.validateCallOptions(requestOptions);
|
|
604
623
|
const signals = [options.signal, requestOptions?.signal].filter((signal) => signal !== void 0);
|
|
605
624
|
const signal = signals.length > 1 ? anySignal(signals) : signals[0];
|
|
606
|
-
const
|
|
625
|
+
const connection = this.#connection.forCall("assets.waitForDecision", {
|
|
607
626
|
...requestOptions,
|
|
608
627
|
...signal && { signal }
|
|
609
|
-
};
|
|
610
|
-
return require_ModerationContextLimits.pollForDecision(() =>
|
|
628
|
+
});
|
|
629
|
+
return require_ModerationContextLimits.pollForDecision(() => connection.json("GET", `/assets/${requireId(assetId, "Asset ID")}`), {
|
|
630
|
+
...options,
|
|
631
|
+
deadlineAt: connection.call.deadlineAt
|
|
632
|
+
}, connection.sleep, connection.now);
|
|
611
633
|
},
|
|
612
634
|
/**
|
|
613
635
|
* Removes an asset's stored content (source, preview and retained extracted text) while
|
|
@@ -650,19 +672,28 @@ sign: async (options) => {
|
|
|
650
672
|
};
|
|
651
673
|
}
|
|
652
674
|
get events() {
|
|
653
|
-
return {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
list: (options = {}, requestOptions) => this.#paginate("events.list", options, requestOptions, ({ types, ...query }) => this.#send("events.list", requestOptions, "GET", `${this.#projectPath}/events`, { query: {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
675
|
+
return {
|
|
676
|
+
/**
|
|
677
|
+
* Lists project events after a cursor, oldest first. Call without `cursor` to get a cursor
|
|
678
|
+
* for "now", then poll with each response's `nextCursor`. Webhook deliveries carry each
|
|
679
|
+
* event's same fields as a flat JSON body. `types` and `assetId` narrow the feed to some
|
|
680
|
+
* event types or one asset's events; a cursor belongs to the filters it was issued with, so
|
|
681
|
+
* pass the same ones with each `cursor`. `for await` over it yields every event waiting
|
|
682
|
+
* after `cursor`; save the last page's `nextCursor` to resume later.
|
|
683
|
+
*/
|
|
684
|
+
list: (options = {}, requestOptions) => this.#paginate("events.list", options, requestOptions, ({ types, ...query }) => this.#send("events.list", requestOptions, "GET", `${this.#projectPath}/events`, { query: {
|
|
685
|
+
...query,
|
|
686
|
+
types: types?.length ? types.join(",") : void 0
|
|
687
|
+
} })),
|
|
688
|
+
/**
|
|
689
|
+
* Retrieves the asset an event is about, as it is now, such as one from `events.list` or a
|
|
690
|
+
* parsed webhook delivery; events carry only the asset's ID. Resolves to `null` for an
|
|
691
|
+
* event that isn't about an asset, and rejects with `asset/not-found` once the asset is
|
|
692
|
+
* deleted. The asset's `eventSequence` orders it against events: an event with a higher
|
|
693
|
+
* `assetSequence` happened after this state, one with an equal or lower one is reflected in it.
|
|
694
|
+
*/
|
|
695
|
+
retrieveAsset: async (event, requestOptions) => event.assetId ? this.assets.retrieve({ assetId: event.assetId }, requestOptions) : null
|
|
696
|
+
};
|
|
666
697
|
}
|
|
667
698
|
get folders() {
|
|
668
699
|
return {
|
|
@@ -870,7 +901,7 @@ list: (options = {}, requestOptions) => this.#paginate("events.list", options, r
|
|
|
870
901
|
* Each lens is created or changed as ensureLens() does.
|
|
871
902
|
*/
|
|
872
903
|
async ensureLenses(options, requestOptions) {
|
|
873
|
-
|
|
904
|
+
require_CalmLensConnection.validateCallOptions(requestOptions);
|
|
874
905
|
const { lenses } = checked("ensureLenses", options);
|
|
875
906
|
if (!Array.isArray(lenses) || lenses.length === 0) throw require_ModerationContextLimits.invalidArgument("At least one lens is required");
|
|
876
907
|
if (lenses.some((option) => !option?.identifier)) throw require_ModerationContextLimits.invalidArgument("Lens identifier is required");
|
|
@@ -263,6 +263,7 @@ declare const ASSET_MODERATION_SCHEMA: zod.ZodObject<{
|
|
|
263
263
|
pendingReview: zod.ZodNullable<zod.ZodObject<{
|
|
264
264
|
requestedAt: zod.ZodNumber;
|
|
265
265
|
reason: zod.ZodEnum<{
|
|
266
|
+
reported: "reported";
|
|
266
267
|
sampled: "sampled";
|
|
267
268
|
uncertain: "uncertain";
|
|
268
269
|
}>;
|
|
@@ -5088,6 +5089,7 @@ declare const ASSET_CLASSIFICATION_SCHEMA: zod.ZodObject<{
|
|
|
5088
5089
|
pendingReview: zod.ZodNullable<zod.ZodObject<{
|
|
5089
5090
|
requestedAt: zod.ZodNumber;
|
|
5090
5091
|
reason: zod.ZodEnum<{
|
|
5092
|
+
reported: "reported";
|
|
5091
5093
|
sampled: "sampled";
|
|
5092
5094
|
uncertain: "uncertain";
|
|
5093
5095
|
}>;
|
|
@@ -10211,6 +10213,7 @@ declare const ASSET_SCHEMA: zod.ZodObject<{
|
|
|
10211
10213
|
pendingReview: zod.ZodNullable<zod.ZodObject<{
|
|
10212
10214
|
requestedAt: zod.ZodNumber;
|
|
10213
10215
|
reason: zod.ZodEnum<{
|
|
10216
|
+
reported: "reported";
|
|
10214
10217
|
sampled: "sampled";
|
|
10215
10218
|
uncertain: "uncertain";
|
|
10216
10219
|
}>;
|
|
@@ -15199,6 +15202,7 @@ declare const ASSET_SCHEMA: zod.ZodObject<{
|
|
|
15199
15202
|
averageColor: zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>;
|
|
15200
15203
|
}, zod.core.$strip>>;
|
|
15201
15204
|
}, zod.core.$strip>;
|
|
15205
|
+
eventSequence: zod.ZodNumber;
|
|
15202
15206
|
}, zod.core.$strip>;
|
|
15203
15207
|
type Asset$1 = zod.infer<typeof ASSET_SCHEMA>;
|
|
15204
15208
|
/**
|
|
@@ -15467,6 +15471,7 @@ declare const ASSET_SEARCH_RESULT_SCHEMA: zod.ZodObject<{
|
|
|
15467
15471
|
pendingReview: zod.ZodNullable<zod.ZodObject<{
|
|
15468
15472
|
requestedAt: zod.ZodNumber;
|
|
15469
15473
|
reason: zod.ZodEnum<{
|
|
15474
|
+
reported: "reported";
|
|
15470
15475
|
sampled: "sampled";
|
|
15471
15476
|
uncertain: "uncertain";
|
|
15472
15477
|
}>;
|
|
@@ -20455,6 +20460,7 @@ declare const ASSET_SEARCH_RESULT_SCHEMA: zod.ZodObject<{
|
|
|
20455
20460
|
averageColor: zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>;
|
|
20456
20461
|
}, zod.core.$strip>>;
|
|
20457
20462
|
}, zod.core.$strip>;
|
|
20463
|
+
eventSequence: zod.ZodNumber;
|
|
20458
20464
|
}, zod.core.$strip>;
|
|
20459
20465
|
score: zod.ZodNumber;
|
|
20460
20466
|
matchedFields: zod.ZodArray<zod.ZodEnum<{
|
|
@@ -36808,6 +36814,7 @@ declare const EVENT_TYPE_INFO: {
|
|
|
36808
36814
|
website: "website";
|
|
36809
36815
|
}>>>>;
|
|
36810
36816
|
parentAsset: EventFieldDefinition<zod.ZodOptional<zod.ZodString>>;
|
|
36817
|
+
reviewId: EventFieldDefinition<zod.ZodString>;
|
|
36811
36818
|
automatedStatus: EventFieldDefinition<zod.ZodEnum<{
|
|
36812
36819
|
"age-restricted": "age-restricted";
|
|
36813
36820
|
allowed: "allowed";
|
|
@@ -36815,6 +36822,7 @@ declare const EVENT_TYPE_INFO: {
|
|
|
36815
36822
|
limited: "limited";
|
|
36816
36823
|
}>>;
|
|
36817
36824
|
reviewReason: EventFieldDefinition<zod.ZodEnum<{
|
|
36825
|
+
reported: "reported";
|
|
36818
36826
|
sampled: "sampled";
|
|
36819
36827
|
uncertain: "uncertain";
|
|
36820
36828
|
}>>;
|
|
@@ -36828,15 +36836,18 @@ declare const EVENT_TYPE_INFO: {
|
|
|
36828
36836
|
sexual: "sexual";
|
|
36829
36837
|
violence: "violence";
|
|
36830
36838
|
}>>>;
|
|
36839
|
+
note: EventFieldDefinition<zod.ZodOptional<zod.ZodString>>;
|
|
36831
36840
|
};
|
|
36832
36841
|
/** Example data, used for synthetic test sends (`createSampleEvent`). */
|
|
36833
36842
|
example: NoInfer<{
|
|
36834
36843
|
assetName?: string | null | undefined;
|
|
36835
36844
|
assetType?: "audio" | "file" | "image" | "multimedia-document" | "plaintext-document" | "video" | "website" | null | undefined;
|
|
36836
36845
|
parentAsset?: string | undefined;
|
|
36846
|
+
reviewId: string;
|
|
36837
36847
|
automatedStatus: "age-restricted" | "allowed" | "blocked" | "limited";
|
|
36838
|
-
reviewReason: "sampled" | "uncertain";
|
|
36848
|
+
reviewReason: "reported" | "sampled" | "uncertain";
|
|
36839
36849
|
uncertainCategories: ("criminal-activity" | "harassment" | "hate" | "personal-information" | "profanity" | "self-harm" | "sexual" | "violence")[];
|
|
36850
|
+
note?: string | undefined;
|
|
36840
36851
|
}>;
|
|
36841
36852
|
factInfo: {
|
|
36842
36853
|
label: string;
|
|
@@ -36871,6 +36882,7 @@ declare const EVENT_TYPE_INFO: {
|
|
|
36871
36882
|
website: "website";
|
|
36872
36883
|
}>>>;
|
|
36873
36884
|
parentAsset: zod.ZodOptional<zod.ZodString>;
|
|
36885
|
+
reviewId: zod.ZodString;
|
|
36874
36886
|
automatedStatus: zod.ZodEnum<{
|
|
36875
36887
|
"age-restricted": "age-restricted";
|
|
36876
36888
|
allowed: "allowed";
|
|
@@ -36878,6 +36890,7 @@ declare const EVENT_TYPE_INFO: {
|
|
|
36878
36890
|
limited: "limited";
|
|
36879
36891
|
}>;
|
|
36880
36892
|
reviewReason: zod.ZodEnum<{
|
|
36893
|
+
reported: "reported";
|
|
36881
36894
|
sampled: "sampled";
|
|
36882
36895
|
uncertain: "uncertain";
|
|
36883
36896
|
}>;
|
|
@@ -36891,6 +36904,7 @@ declare const EVENT_TYPE_INFO: {
|
|
|
36891
36904
|
sexual: "sexual";
|
|
36892
36905
|
violence: "violence";
|
|
36893
36906
|
}>>;
|
|
36907
|
+
note: zod.ZodOptional<zod.ZodString>;
|
|
36894
36908
|
}, zod.core.$strip>;
|
|
36895
36909
|
};
|
|
36896
36910
|
readonly "asset.review-completed": {
|
|
@@ -38176,43 +38190,6 @@ declare const ACTOR_SCHEMA: zod.ZodObject<{
|
|
|
38176
38190
|
id: zod.ZodNullable<zod.ZodString>;
|
|
38177
38191
|
}, zod.core.$strict>;
|
|
38178
38192
|
type Actor = zod.infer<typeof ACTOR_SCHEMA>;
|
|
38179
|
-
declare const EVENT_ASSET_SCHEMA: zod.ZodObject<{
|
|
38180
|
-
id: zod.ZodString;
|
|
38181
|
-
externalId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
38182
|
-
uploadPresetId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
38183
|
-
upload: zod.ZodObject<{
|
|
38184
|
-
status: zod.ZodEnum<{
|
|
38185
|
-
completed: "completed";
|
|
38186
|
-
uploading: "uploading";
|
|
38187
|
-
}>;
|
|
38188
|
-
}, zod.core.$strip>;
|
|
38189
|
-
classification: zod.ZodObject<{
|
|
38190
|
-
status: zod.ZodEnum<{
|
|
38191
|
-
completed: "completed";
|
|
38192
|
-
failed: "failed";
|
|
38193
|
-
processing: "processing";
|
|
38194
|
-
queued: "queued";
|
|
38195
|
-
}>;
|
|
38196
|
-
testInput: zod.ZodBoolean;
|
|
38197
|
-
moderation: zod.ZodObject<{
|
|
38198
|
-
decision: zod.ZodNullable<zod.ZodEnum<{
|
|
38199
|
-
"age-restricted": "age-restricted";
|
|
38200
|
-
allowed: "allowed";
|
|
38201
|
-
blocked: "blocked";
|
|
38202
|
-
limited: "limited";
|
|
38203
|
-
purged: "purged";
|
|
38204
|
-
}>>;
|
|
38205
|
-
}, zod.core.$strip>;
|
|
38206
|
-
}, zod.core.$strip>;
|
|
38207
|
-
content: zod.ZodObject<{
|
|
38208
|
-
status: zod.ZodEnum<{
|
|
38209
|
-
removed: "removed";
|
|
38210
|
-
stored: "stored";
|
|
38211
|
-
temporary: "temporary";
|
|
38212
|
-
}>;
|
|
38213
|
-
}, zod.core.$strip>;
|
|
38214
|
-
}, zod.core.$strip>;
|
|
38215
|
-
type EventAsset = zod.infer<typeof EVENT_ASSET_SCHEMA>;
|
|
38216
38193
|
/** An event as `GET /events` lists it and webhooks deliver it. */
|
|
38217
38194
|
declare const PUBLIC_EVENT_SCHEMA: zod.ZodObject<{
|
|
38218
38195
|
id: zod.ZodString;
|
|
@@ -38269,42 +38246,6 @@ declare const PUBLIC_EVENT_SCHEMA: zod.ZodObject<{
|
|
|
38269
38246
|
description: zod.ZodOptional<zod.ZodNullable<zod.ZodPipe<zod.ZodString, zod.ZodTransform<string, string>>>>;
|
|
38270
38247
|
assetId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
38271
38248
|
assetSequence: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
|
|
38272
|
-
asset: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
|
|
38273
|
-
id: zod.ZodString;
|
|
38274
|
-
externalId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
38275
|
-
uploadPresetId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
38276
|
-
upload: zod.ZodObject<{
|
|
38277
|
-
status: zod.ZodEnum<{
|
|
38278
|
-
completed: "completed";
|
|
38279
|
-
uploading: "uploading";
|
|
38280
|
-
}>;
|
|
38281
|
-
}, zod.core.$strip>;
|
|
38282
|
-
classification: zod.ZodObject<{
|
|
38283
|
-
status: zod.ZodEnum<{
|
|
38284
|
-
completed: "completed";
|
|
38285
|
-
failed: "failed";
|
|
38286
|
-
processing: "processing";
|
|
38287
|
-
queued: "queued";
|
|
38288
|
-
}>;
|
|
38289
|
-
testInput: zod.ZodBoolean;
|
|
38290
|
-
moderation: zod.ZodObject<{
|
|
38291
|
-
decision: zod.ZodNullable<zod.ZodEnum<{
|
|
38292
|
-
"age-restricted": "age-restricted";
|
|
38293
|
-
allowed: "allowed";
|
|
38294
|
-
blocked: "blocked";
|
|
38295
|
-
limited: "limited";
|
|
38296
|
-
purged: "purged";
|
|
38297
|
-
}>>;
|
|
38298
|
-
}, zod.core.$strip>;
|
|
38299
|
-
}, zod.core.$strip>;
|
|
38300
|
-
content: zod.ZodObject<{
|
|
38301
|
-
status: zod.ZodEnum<{
|
|
38302
|
-
removed: "removed";
|
|
38303
|
-
stored: "stored";
|
|
38304
|
-
temporary: "temporary";
|
|
38305
|
-
}>;
|
|
38306
|
-
}, zod.core.$strip>;
|
|
38307
|
-
}, zod.core.$strip>>>;
|
|
38308
38249
|
facts: zod.ZodArray<zod.ZodObject<{
|
|
38309
38250
|
key: zod.ZodString;
|
|
38310
38251
|
value: zod.ZodUnknown & zod.ZodType<{} | null, unknown, zod.core.$ZodTypeInternals<{} | null, unknown>>;
|
|
@@ -42416,6 +42357,26 @@ declare const POST_ASSET_DECISION_BODY_SCHEMA: zod.ZodDiscriminatedUnion<[zod.Zo
|
|
|
42416
42357
|
confirmPurge: zod.ZodLiteral<true>;
|
|
42417
42358
|
}, zod.core.$strip>], "decision">;
|
|
42418
42359
|
type PostAssetDecisionBody = zod.infer<typeof POST_ASSET_DECISION_BODY_SCHEMA>;
|
|
42360
|
+
declare const POST_ASSET_REVIEW_REQUEST_BODY_SCHEMA: zod.ZodObject<{
|
|
42361
|
+
note: zod.ZodOptional<zod.ZodString>;
|
|
42362
|
+
}, zod.core.$strip>;
|
|
42363
|
+
type PostAssetReviewRequestBody = zod.infer<typeof POST_ASSET_REVIEW_REQUEST_BODY_SCHEMA>;
|
|
42364
|
+
declare const ASSET_REVIEW_REQUEST_SCHEMA: zod.ZodObject<{
|
|
42365
|
+
id: zod.ZodString;
|
|
42366
|
+
assetId: zod.ZodString;
|
|
42367
|
+
reason: zod.ZodEnum<{
|
|
42368
|
+
reported: "reported";
|
|
42369
|
+
sampled: "sampled";
|
|
42370
|
+
uncertain: "uncertain";
|
|
42371
|
+
}>;
|
|
42372
|
+
status: zod.ZodEnum<{
|
|
42373
|
+
completed: "completed";
|
|
42374
|
+
pending: "pending";
|
|
42375
|
+
}>;
|
|
42376
|
+
note: zod.ZodNullable<zod.ZodString>;
|
|
42377
|
+
createdAt: zod.ZodNumber;
|
|
42378
|
+
}, zod.core.$strip>;
|
|
42379
|
+
type AssetReviewRequest = zod.infer<typeof ASSET_REVIEW_REQUEST_SCHEMA>;
|
|
42419
42380
|
declare const ASSET_BATCH_OPERATIONS: readonly ["delete", "remove-content"];
|
|
42420
42381
|
type AssetBatchOperation = (typeof ASSET_BATCH_OPERATIONS)[number];
|
|
42421
42382
|
declare const POST_ASSET_BATCH_OPERATION_RESPONSE_SCHEMA: zod.ZodObject<{
|
|
@@ -42734,6 +42695,13 @@ interface RequestOptions {
|
|
|
42734
42695
|
signal?: AbortSignal;
|
|
42735
42696
|
/** Deadline in milliseconds for each attempt of this call's requests. */
|
|
42736
42697
|
timeoutMs?: number;
|
|
42698
|
+
/**
|
|
42699
|
+
* Deadline in milliseconds for the whole call: every attempt, the waits between retries
|
|
42700
|
+
* (`Retry-After` included) and `assets.waitForDecision`'s polling. When it passes, the call
|
|
42701
|
+
* rejects with `sdk/timeout` and makes no further attempt; a retry whose wait would reach it
|
|
42702
|
+
* isn't made, and the last attempt's error is thrown. A list call's deadline covers each page.
|
|
42703
|
+
*/
|
|
42704
|
+
deadlineMs?: number;
|
|
42737
42705
|
/** How many times to retry this call's requests; 0 turns retries off. */
|
|
42738
42706
|
maxRetries?: number;
|
|
42739
42707
|
/**
|
|
@@ -43016,6 +42984,14 @@ type ListEventsOptions = GetEventsQuery;
|
|
|
43016
42984
|
interface RetrieveAssetOptions {
|
|
43017
42985
|
assetId: string;
|
|
43018
42986
|
}
|
|
42987
|
+
interface RetrieveAssetByExternalIdOptions {
|
|
42988
|
+
/** The `externalId` the asset was uploaded or updated with. */
|
|
42989
|
+
externalId: string;
|
|
42990
|
+
}
|
|
42991
|
+
/** Options for `assets.requestReview`: the asset, and an optional note reviewers see. */
|
|
42992
|
+
type RequestAssetReviewOptions = {
|
|
42993
|
+
assetId: string;
|
|
42994
|
+
} & PostAssetReviewRequestBody;
|
|
43019
42995
|
interface RetryAssetOptions {
|
|
43020
42996
|
assetId: string;
|
|
43021
42997
|
}
|
|
@@ -43243,4 +43219,4 @@ interface ClassifyTextOptions extends Omit<SubmitAssetCommonOptions, "name" | "i
|
|
|
43243
43219
|
/** `folders.list` options. `sort` is `name` (the default) or `createdAt`, descending when prefixed with `-`. */
|
|
43244
43220
|
type ListFoldersOptions = GetFoldersQuery;
|
|
43245
43221
|
type FolderPage = GetFoldersResponse;
|
|
43246
|
-
export { FolderPage as $,
|
|
43222
|
+
export { FolderPage as $, UploadPresetSubmitAssetOptions as $t, CdnAssetLocation as A, ProcessingFeatureStage as An, ResetPolicyOptions as At, CreateHashListOptions as B, AssetHlsRendition as Bn, StreamingFeatureOptions as Bt, AssetUploadStatus as C, UploadPreset as Cn, MultipartUploadPartOptions as Ct, BatchAssetsResponse as D, DetectedPerson as Dn, RequestAssetReviewOptions as Dt, BatchAssetsOptions as E, DetectedFace as En, RemoveAssetContentOptions as Et, CdnTransform as F, AssetSearchMatchField as Fn, SetPolicyAutomaticUpdatesOptions as Ft, DeleteAssetOptions as G, AssetSafetyHoldReason as Gn, UpdateLensOptions as Gt, CreateMultipartUploadPartOptions as H, AssetRendered as Hn, UpdateAssetOptions as Ht, ClassifyTextOptions as I, AssetSearchQuery as In, SignAssetUrlOptions as It, EnsureLensesOptions as J, MetadataItem as Jn, UpgradePolicyOptions as Jt, DeleteMetadataFieldOptions as K, ExtractedText as Kn, UpdatePolicyOptions as Kt, ClientRequestDefaults as L, AssetBinaryPayloadInput as Ln, SignUploadTokenOptions as Lt, CdnAssetUrlOptions as M, Policy as Mn, RetrieveAssetOptions as Mt, CdnResource as N, CursorPage as Nn, RetryAssetOptions as Nt, CalmLensAppClientOptions as O, ProcessingFeatureId as On, RequestAttempt as Ot, CdnServeOptions as P, LensType as Pn, SearchAssetsOptions as Pt, FolderIdOptions as Q, UploadPresetPage as Qt, ConnectionOptions as R, AssetInfo as Rn, SignedAssetUrl as Rt, AssetUpload as S, PublicProjectSettings as Sn, MultipartUploadOptions as St, AssignPolicyOptions as T, BoundingBox as Tn, PolicyPage as Tt, CreatePolicyOptions as U, AssetRenderedKind as Un, UpdateFolderOptions as Ut, CreateLensOptions as V, AssetPreview as Vn, SubmitAssetOptions as Vt, DecideAssetOptions as W, AssetSafetyHold as Wn, UpdateHashListOptions as Wt, EnsureUploadPresetsOptions as X, UploadPresetDefinition as Xt, EnsureMetadataFieldsOptions as Y, ProcessingOptions as Yn, UploadAssetPartOptions as Yt, EnsureUploadPresetsResponse as Z, UploadPresetIdOptions as Zt, AssetPage as _, EventType as _n, ListLensesOptions as _t, AssetChecksums as a, WebhookPayloadInput as an, IdempotencyOptions as at, AssetTimelinePage as b, MetadataFieldsResource as bn, MoveAssetOptions as bt, AssetClassificationFailureReason as c, AssetTimelineSegment as cn, LensIdOptions as ct, AssetContentOptions as d, TypedEvent as dn, ListAssetTimelineOptions as dt, UploadedAsset as en, GetAssetInfoOptions as et, AssetContentRemovalReason as f, EventCategory as fn, ListAssetsOptions as ft, AssetModerationStatus as g, EventSeverity as gn, ListHashListsOptions as gt, AssetModerationDecision as h, EventFacts as hn, ListHashListEntriesOptions as ht, AssetAvailability as i, WebhookHeadersInput as in, HashListPage as it, CdnAssetReference as j, ProcessingFeatures as jn, RetrieveAssetByExternalIdOptions as jt, CalmLensServerClientOptions as k, ProcessingFeatureResults as kn, RequestOptions as kt, AssetClassificationStatus as l, GetEventsResponse as ln, LensPage as lt, AssetModeration as m, EventFactValues as mn, ListFoldersOptions as mt, AppInfo as n, ViewerClaims as nn, HashListEntryPage as nt, AssetChildrenPage as o, AssetBatchOperation as on, ImageTransformOptions as ot, AssetContentStatus as p, EventFact as pn, ListEventsOptions as pt, EnsureLensOptions as q, FileMetadata as qn, UpdateProjectSettingsOptions as qt, Asset as r, WaitForAssetDecisionOptions as rn, HashListIdOptions as rt, AssetClassification as s, AssetReviewRequest as sn, Lens as st, AddHashListEntryOptions as t, VerifyWebhookSignatureOptions as tn, HashListEntryIdOptions as tt, AssetContent as u, Actor as un, ListAssetChildrenOptions as ut, AssetSearchResponse as v, PermissionGrant as vn, ListPoliciesOptions as vt, AssetVisibility as w, AgeRange as wn, PolicyIdOptions as wt, AssetType as x, ProjectSettingsResource as xn, MoveFolderOptions as xt, AssetSearchResult as y, Folder as yn, ListUploadPresetsOptions as yt, CreateFolderOptions as z, AssetHls as zn, SignedUploadToken as zt };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as CdnTransform, O as CalmLensAppClientOptions,
|
|
2
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
1
|
+
import { F as CdnTransform, O as CalmLensAppClientOptions, g as AssetModerationStatus, i as AssetAvailability, nn as ViewerClaims } from "./CalmLensTypes-C2blKgTu.js";
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-D-BD_Ny1.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-DXlPrt4K.js");
|
|
2
|
+
const require_UploadController = require("./UploadController-D_Y5wktq.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). */
|