calmlens 0.26.1 → 0.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/calmlens.js +118 -92
- package/{esm/BrowserUpload-zYWKtFSs.d.ts → cjs/BrowserUpload-D4sEmd0X.d.ts} +2 -2
- package/cjs/{BrowserUpload-DdkcoZLH.js → BrowserUpload-QizRFMJK.js} +1 -1
- package/{esm/CalmLensAppClient-mTTjqpRc.d.ts → cjs/CalmLensAppClient-CCeFnKX8.d.ts} +1 -1
- package/cjs/{CalmLensAppClient-Gu9mU_66.js → CalmLensAppClient-DdoxXe_7.js} +6 -6
- package/cjs/{CalmLensOptionKeys-BCITGsr9.js → CalmLensOptionKeys-C-KVONBL.js} +28 -6
- package/cjs/{CalmLensServerClient-D5-njsNk.d.ts → CalmLensServerClient-B7PfocET.d.ts} +3 -14
- package/cjs/{CalmLensServerClient-DHmAPT1u.js → CalmLensServerClient-CuZgePdv.js} +2 -16
- package/cjs/{CalmLensTypes-Df8eBgWB.d.ts → CalmLensTypes-HUERg5hI.d.ts} +16 -97
- package/cjs/{Classification-CxRedzgH-C9qlYW_J.d.ts → Classification-CMM2tZpJ-IdIh63n0.d.ts} +6 -7
- package/cjs/{Core-DAf9lqe2.js → Core-CizvXm3N.js} +11 -6
- package/{esm/Core-CREGGR0L.d.ts → cjs/Core-DXAs8mcx.d.ts} +2 -2
- package/cjs/{ModerationContextLimits-D4iwqoN_.js → ModerationContextLimits-ZbGIGHTQ.js} +3 -17
- package/{esm/ReactUpload-D4htIz8X.d.ts → cjs/ReactUpload-BTciTpwB.d.ts} +1 -1
- package/cjs/{ReactUpload-BNIbpxIH.js → ReactUpload-Swb6TIMq.js} +1 -1
- package/cjs/{TestTriggers-CiFcTHX3-BmfH4J3f.js → TestTriggers-Cvi7e2KA-DcT1pc_W.js} +91 -22
- package/{esm/TestTriggers-BJ4B-MXR-D1tGifPU.d.ts → cjs/TestTriggers-Dnukm-jm-DoEB7jJc.d.ts} +1 -1
- package/cjs/{UploadController-B_lKxvpM.js → UploadController-V6xkojIF.js} +2 -2
- package/cjs/{WebhookPayload-DMa6ihHr.d.ts → WebhookPayload-mUmOFH55.d.ts} +1 -7
- package/cjs/app.d.ts +6 -6
- package/cjs/app.js +2 -2
- package/cjs/elements.d.ts +4 -4
- package/cjs/elements.js +7 -5
- package/cjs/{index-CtpQldn_.d.ts → index-Ck7x1YjM.d.ts} +3 -3
- package/cjs/index.d.ts +5 -5
- 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 +6 -6
- package/cjs/server.d.ts +6 -6
- 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 +12 -17
- package/cjs/testing.js +35 -114
- package/cjs/{ui-BwFPFrno.d.ts → ui-BfJNO3c6.d.ts} +2 -2
- package/cjs/{ui-CvlJmRYM.js → ui-XxS-YOd3.js} +4 -4
- package/cjs/ui.d.ts +2 -2
- package/cjs/ui.js +3 -3
- package/cjs/vue.d.ts +5 -5
- package/cjs/vue.js +5 -5
- package/{cjs/BrowserUpload-zYWKtFSs.d.ts → esm/BrowserUpload-D4sEmd0X.d.ts} +2 -2
- package/esm/{BrowserUpload-BAWYEBd7.js → BrowserUpload-DhBPcU3A.js} +1 -1
- package/esm/{CalmLensAppClient-DNkIZb6x.js → CalmLensAppClient-BOwCdI-Q.js} +6 -6
- package/{cjs/CalmLensAppClient-mTTjqpRc.d.ts → esm/CalmLensAppClient-CCeFnKX8.d.ts} +1 -1
- package/esm/{CalmLensOptionKeys-CYHJo3nV.js → CalmLensOptionKeys-B0IEIQdg.js} +28 -6
- package/esm/{CalmLensServerClient-D5-njsNk.d.ts → CalmLensServerClient-B7PfocET.d.ts} +3 -14
- package/esm/{CalmLensServerClient-B1AiR4nv.js → CalmLensServerClient-DzXRfHQS.js} +2 -16
- package/esm/{CalmLensTypes-Df8eBgWB.d.ts → CalmLensTypes-HUERg5hI.d.ts} +16 -97
- package/esm/{Classification-CxRedzgH-C9qlYW_J.d.ts → Classification-CMM2tZpJ-IdIh63n0.d.ts} +6 -7
- package/{cjs/Core-CREGGR0L.d.ts → esm/Core-DXAs8mcx.d.ts} +2 -2
- package/esm/{Core-xNBQxZWH.js → Core-DxMJrvTr.js} +11 -6
- package/esm/{ModerationContextLimits-DxuPP4uM.js → ModerationContextLimits-BqRzr-pg.js} +3 -17
- package/{cjs/ReactUpload-D4htIz8X.d.ts → esm/ReactUpload-BTciTpwB.d.ts} +1 -1
- package/esm/{ReactUpload-BWifQdLv.js → ReactUpload-s0rFzCpq.js} +1 -1
- package/esm/{TestTriggers-CiFcTHX3-BK2-sgOC.js → TestTriggers-Cvi7e2KA-BA83CRJb.js} +87 -23
- package/{cjs/TestTriggers-BJ4B-MXR-D1tGifPU.d.ts → esm/TestTriggers-Dnukm-jm-DoEB7jJc.d.ts} +1 -1
- package/esm/{UploadController-jlJdddyI.js → UploadController-DnXRTWCY.js} +2 -2
- package/esm/{WebhookPayload-DMa6ihHr.d.ts → WebhookPayload-mUmOFH55.d.ts} +1 -7
- package/esm/app.d.ts +6 -6
- package/esm/app.js +2 -2
- package/esm/elements.d.ts +4 -4
- package/esm/elements.js +7 -5
- package/esm/{index-CtpQldn_.d.ts → index-Ck7x1YjM.d.ts} +3 -3
- package/esm/index.d.ts +5 -5
- 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 +6 -6
- package/esm/server.d.ts +6 -6
- package/esm/server.js +2 -2
- package/esm/styles.css +9 -4
- package/esm/svelte/CalmLensAsset.svelte +1 -1
- package/esm/test-inputs.d.ts +1 -1
- package/esm/test-inputs.js +1 -1
- package/esm/testing.d.ts +12 -17
- package/esm/testing.js +29 -108
- package/esm/{ui-BwFPFrno.d.ts → ui-BfJNO3c6.d.ts} +2 -2
- package/esm/{ui-BXzzqh7M.js → ui-DgR1wEWD.js} +4 -4
- package/esm/ui.d.ts +2 -2
- package/esm/ui.js +3 -3
- package/esm/vue.d.ts +5 -5
- package/esm/vue.js +5 -5
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as HashListEntry, f as ModerationContext, t as AssetModerationDecision$1, u as HashList } from "./Classification-
|
|
1
|
+
import { d as HashListEntry, f as ModerationContext, t as AssetModerationDecision$1, u as HashList } from "./Classification-CMM2tZpJ-IdIh63n0.js";
|
|
2
2
|
import * as zod from "zod";
|
|
3
3
|
/**
|
|
4
4
|
* Where the asset is in the pipeline: waiting for its content or its turn (`queued`), being
|
|
@@ -36713,87 +36713,6 @@ declare const EVENT_TYPE_INFO: {
|
|
|
36713
36713
|
}>>>;
|
|
36714
36714
|
}, zod.core.$strip>;
|
|
36715
36715
|
};
|
|
36716
|
-
readonly "asset.rerun-requested": {
|
|
36717
|
-
id: "asset.rerun-requested";
|
|
36718
|
-
name: string;
|
|
36719
|
-
description: string;
|
|
36720
|
-
category: EventCategory;
|
|
36721
|
-
severity: EventSeverity;
|
|
36722
|
-
/** Whether the in-app connector (notification bell) subscribes to the type by default. */
|
|
36723
|
-
notify: boolean;
|
|
36724
|
-
/**
|
|
36725
|
-
* The project-wide permission needed to see events of this type (portal feed, public events
|
|
36726
|
-
* feed) and to subscribe a connector to it.
|
|
36727
|
-
*/
|
|
36728
|
-
permission: PermissionAction;
|
|
36729
|
-
/** Types of unreleased features are left out of the published contract until enabled. */
|
|
36730
|
-
enabled?: boolean;
|
|
36731
|
-
fields: {
|
|
36732
|
-
assetName: EventFieldDefinition<zod.ZodOptional<zod.ZodNullable<zod.ZodString>>>;
|
|
36733
|
-
assetType: EventFieldDefinition<zod.ZodOptional<zod.ZodNullable<zod.ZodEnum<{
|
|
36734
|
-
audio: "audio";
|
|
36735
|
-
file: "file";
|
|
36736
|
-
image: "image";
|
|
36737
|
-
"multimedia-document": "multimedia-document";
|
|
36738
|
-
"plaintext-document": "plaintext-document";
|
|
36739
|
-
video: "video";
|
|
36740
|
-
website: "website";
|
|
36741
|
-
}>>>>;
|
|
36742
|
-
moderationStatus: EventFieldDefinition<zod.ZodEnum<{
|
|
36743
|
-
"age-restricted": "age-restricted";
|
|
36744
|
-
allowed: "allowed";
|
|
36745
|
-
blocked: "blocked";
|
|
36746
|
-
limited: "limited";
|
|
36747
|
-
purged: "purged";
|
|
36748
|
-
}>>;
|
|
36749
|
-
};
|
|
36750
|
-
/** Example data, used for synthetic test sends (`createSampleEvent`). */
|
|
36751
|
-
example: NoInfer<{
|
|
36752
|
-
assetName?: string | null | undefined;
|
|
36753
|
-
assetType?: "audio" | "file" | "image" | "multimedia-document" | "plaintext-document" | "video" | "website" | null | undefined;
|
|
36754
|
-
moderationStatus: "age-restricted" | "allowed" | "blocked" | "limited" | "purged";
|
|
36755
|
-
}>;
|
|
36756
|
-
factInfo: {
|
|
36757
|
-
label: string;
|
|
36758
|
-
description: string;
|
|
36759
|
-
display: EventFieldDisplay;
|
|
36760
|
-
/** Kept in the data but left out of rendered messages (usually an ID shown by another field). */
|
|
36761
|
-
hidden?: boolean;
|
|
36762
|
-
/**
|
|
36763
|
-
* Personal or account-level data that stays in the portal. Webhook, Slack and email deliveries,
|
|
36764
|
-
* and the public events feed, leave the fact out and word the title and description without it.
|
|
36765
|
-
*/
|
|
36766
|
-
inAppOnly?: boolean;
|
|
36767
|
-
/**
|
|
36768
|
-
* A person's name: `actor` names the event's `actor`, `member` the member in the `member-user-id`
|
|
36769
|
-
* fact. Deleting their account removes it from the events that name them.
|
|
36770
|
-
*/
|
|
36771
|
-
names?: "actor" | "member";
|
|
36772
|
-
/** Display names for `enum` and `list` values that don't read well humanized. */
|
|
36773
|
-
valueLabels?: Readonly<Record<string, string>>;
|
|
36774
|
-
schema: zod.ZodType<unknown, unknown, zod.core.$ZodTypeInternals<unknown, unknown>>;
|
|
36775
|
-
key: string;
|
|
36776
|
-
}[];
|
|
36777
|
-
values: zod.ZodObject<{
|
|
36778
|
-
assetName: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
|
|
36779
|
-
assetType: zod.ZodOptional<zod.ZodNullable<zod.ZodEnum<{
|
|
36780
|
-
audio: "audio";
|
|
36781
|
-
file: "file";
|
|
36782
|
-
image: "image";
|
|
36783
|
-
"multimedia-document": "multimedia-document";
|
|
36784
|
-
"plaintext-document": "plaintext-document";
|
|
36785
|
-
video: "video";
|
|
36786
|
-
website: "website";
|
|
36787
|
-
}>>>;
|
|
36788
|
-
moderationStatus: zod.ZodEnum<{
|
|
36789
|
-
"age-restricted": "age-restricted";
|
|
36790
|
-
allowed: "allowed";
|
|
36791
|
-
blocked: "blocked";
|
|
36792
|
-
limited: "limited";
|
|
36793
|
-
purged: "purged";
|
|
36794
|
-
}>;
|
|
36795
|
-
}, zod.core.$strip>;
|
|
36796
|
-
};
|
|
36797
36716
|
readonly "asset.review-requested": {
|
|
36798
36717
|
id: "asset.review-requested";
|
|
36799
36718
|
name: string;
|
|
@@ -38258,7 +38177,6 @@ declare const PUBLIC_EVENT_SCHEMA: zod.ZodObject<{
|
|
|
38258
38177
|
"asset.progress-updated": "asset.progress-updated";
|
|
38259
38178
|
"asset.purged": "asset.purged";
|
|
38260
38179
|
"asset.region-restricted": "asset.region-restricted";
|
|
38261
|
-
"asset.rerun-requested": "asset.rerun-requested";
|
|
38262
38180
|
"asset.retried": "asset.retried";
|
|
38263
38181
|
"asset.review-completed": "asset.review-completed";
|
|
38264
38182
|
"asset.review-requested": "asset.review-requested";
|
|
@@ -42459,7 +42377,6 @@ declare const GET_EVENTS_QUERY_SCHEMA: zod.ZodObject<{
|
|
|
42459
42377
|
"asset.progress-updated": "asset.progress-updated";
|
|
42460
42378
|
"asset.purged": "asset.purged";
|
|
42461
42379
|
"asset.region-restricted": "asset.region-restricted";
|
|
42462
|
-
"asset.rerun-requested": "asset.rerun-requested";
|
|
42463
42380
|
"asset.retried": "asset.retried";
|
|
42464
42381
|
"asset.review-completed": "asset.review-completed";
|
|
42465
42382
|
"asset.review-requested": "asset.review-requested";
|
|
@@ -42884,10 +42801,11 @@ interface SignedUploadToken {
|
|
|
42884
42801
|
}
|
|
42885
42802
|
/** What an upload through a preset can set: everything else comes from the preset or token. */
|
|
42886
42803
|
type UploadPresetSubmitAssetOptions = IdempotencyOptions & {
|
|
42887
|
-
name
|
|
42804
|
+
/** Required, except with a `File`, whose name it defaults to. */
|
|
42805
|
+
name?: string;
|
|
42888
42806
|
description?: string;
|
|
42889
42807
|
} & ({
|
|
42890
|
-
content:
|
|
42808
|
+
content: AssetContentInput;
|
|
42891
42809
|
} | {
|
|
42892
42810
|
part: CreateMultipartUploadPartOptions;
|
|
42893
42811
|
/** The size of the whole file, when known. */
|
|
@@ -43032,15 +42950,6 @@ interface RetryAssetOptions {
|
|
|
43032
42950
|
type DecideAssetOptions = {
|
|
43033
42951
|
assetId: string;
|
|
43034
42952
|
} & PostAssetDecisionBody;
|
|
43035
|
-
interface ExplainAssetOptions {
|
|
43036
|
-
assetId: string;
|
|
43037
|
-
/**
|
|
43038
|
-
* Moderates the asset again with the project's current policy, answering every question,
|
|
43039
|
-
* instead of explaining the decision as made. The asset returns to `processing` and gets a new
|
|
43040
|
-
* decision, which can differ from the old one.
|
|
43041
|
-
*/
|
|
43042
|
-
rerun?: boolean;
|
|
43043
|
-
}
|
|
43044
42953
|
interface WaitForAssetDecisionOptions {
|
|
43045
42954
|
assetId: string;
|
|
43046
42955
|
/** How long to wait for a decision, in milliseconds. Defaults to 60000. */
|
|
@@ -43199,7 +43108,13 @@ interface SubmitAssetCommonOptions extends IdempotencyOptions {
|
|
|
43199
43108
|
uploadPresetId?: string;
|
|
43200
43109
|
isFinal?: never;
|
|
43201
43110
|
}
|
|
43202
|
-
|
|
43111
|
+
/**
|
|
43112
|
+
* An asset's content: a `Blob` or `File`, whose own type is the content type (and a `File`'s
|
|
43113
|
+
* name the asset's name when you give none), or bytes, base64 or plain text with their `type`.
|
|
43114
|
+
*/
|
|
43115
|
+
type AssetContentInput = AssetContentOptions | Blob;
|
|
43116
|
+
/** Options as the client sends them, once a `Blob` or `File` is read as `{ data, type }`. */
|
|
43117
|
+
type PreparedSubmitAssetOptions = (SubmitAssetCommonOptions & {
|
|
43203
43118
|
content: AssetContentOptions;
|
|
43204
43119
|
}) | (SubmitAssetCommonOptions & {
|
|
43205
43120
|
url: string;
|
|
@@ -43213,6 +43128,10 @@ type SubmitAssetOptions = (SubmitAssetCommonOptions & {
|
|
|
43213
43128
|
*/
|
|
43214
43129
|
totalSizeInBytes?: number;
|
|
43215
43130
|
});
|
|
43131
|
+
/** What `assets.create` and `assets.classify` take: content, a URL or a multipart part. */
|
|
43132
|
+
type SubmitAssetOptions = PreparedSubmitAssetOptions | (SubmitAssetCommonOptions & {
|
|
43133
|
+
content: Blob;
|
|
43134
|
+
});
|
|
43216
43135
|
interface MultipartUploadOptions extends SubmitAssetCommonOptions {
|
|
43217
43136
|
part: CreateMultipartUploadPartOptions;
|
|
43218
43137
|
totalSizeInBytes?: number;
|
|
@@ -43251,4 +43170,4 @@ interface ClassifyTextOptions extends Omit<SubmitAssetCommonOptions, "name" | "i
|
|
|
43251
43170
|
/** `folders.list` options. `sort` is `name` (the default) or `createdAt`, descending when prefixed with `-`. */
|
|
43252
43171
|
type ListFoldersOptions = GetFoldersQuery;
|
|
43253
43172
|
type FolderPage = GetFoldersResponse;
|
|
43254
|
-
export {
|
|
43173
|
+
export { FolderPage as $, VerifyWebhookSignatureOptions as $t, CdnAssetLocation as A, Policy as An, RetrieveAssetOptions as At, CreateHashListOptions as B, AssetRendered as Bn, UpdateAssetOptions as Bt, AssetUploadStatus as C, BoundingBox as Cn, MultipartUploadPartOptions as Ct, BatchAssetsResponse as D, ProcessingFeatureResults as Dn, RequestAttempt as Dt, BatchAssetsOptions as E, ProcessingFeatureId as En, RemoveAssetContentOptions as Et, CdnTransform as F, AssetBinaryPayloadInput as Fn, SignUploadTokenOptions as Ft, DeleteAssetOptions as G, FileMetadata as Gn, UpdateProjectSettingsOptions as Gt, CreateMultipartUploadPartOptions as H, AssetSafetyHold as Hn, UpdateHashListOptions as Ht, ClassifyTextOptions as I, AssetInfo as In, SignedAssetUrl as It, EnsureLensesOptions as J, UploadPresetDefinition as Jt, DeleteMetadataFieldOptions as K, MetadataItem as Kn, UpgradePolicyOptions as Kt, ClientRequestDefaults as L, AssetHls as Ln, SignedUploadToken as Lt, CdnAssetUrlOptions as M, LensType as Mn, SearchAssetsOptions as Mt, CdnResource as N, AssetSearchMatchField as Nn, SetPolicyAutomaticUpdatesOptions as Nt, CalmLensAppClientOptions as O, ProcessingFeatureStage as On, RequestOptions as Ot, CdnServeOptions as P, AssetSearchQuery as Pn, SignAssetUrlOptions as Pt, FolderIdOptions as Q, UploadedAsset as Qt, ConnectionOptions as R, AssetHlsRendition as Rn, StreamingFeatureOptions as Rt, AssetUpload as S, AgeRange as Sn, MultipartUploadOptions as St, AssignPolicyOptions as T, DetectedPerson as Tn, PolicyPage as Tt, CreatePolicyOptions as U, AssetSafetyHoldReason as Un, UpdateLensOptions as Ut, CreateLensOptions as V, AssetRenderedKind as Vn, UpdateFolderOptions as Vt, DecideAssetOptions as W, ExtractedText as Wn, UpdatePolicyOptions as Wt, EnsureUploadPresetsOptions as X, UploadPresetPage as Xt, EnsureMetadataFieldsOptions as Y, UploadPresetIdOptions as Yt, EnsureUploadPresetsResponse as Z, UploadPresetSubmitAssetOptions as Zt, AssetPage as _, Folder as _n, ListLensesOptions as _t, AssetChecksums as a, AssetTimelineSegment as an, IdempotencyOptions as at, AssetTimelinePage as b, PublicProjectSettings as bn, MoveAssetOptions as bt, AssetClassificationFailureReason as c, EventAsset as cn, LensIdOptions as ct, AssetContentOptions as d, EventFact as dn, ListAssetTimelineOptions as dt, ViewerClaims as en, GetAssetInfoOptions as et, AssetContentRemovalReason as f, EventFactValues as fn, ListAssetsOptions as ft, AssetModerationStatus as g, PermissionGrant as gn, ListHashListsOptions as gt, AssetModerationDecision as h, EventType as hn, ListHashListEntriesOptions as ht, AssetAvailability as i, AssetBatchOperation as in, HashListPage as it, CdnAssetReference as j, CursorPage as jn, RetryAssetOptions as jt, CalmLensServerClientOptions as k, ProcessingFeatures as kn, ResetPolicyOptions as kt, AssetClassificationStatus as l, TypedEvent as ln, LensPage as lt, AssetModeration as m, EventSeverity as mn, ListFoldersOptions as mt, AppInfo as n, WebhookHeadersInput as nn, HashListEntryPage as nt, AssetChildrenPage as o, GetEventsResponse as on, ImageTransformOptions as ot, AssetContentStatus as p, EventFacts as pn, ListEventsOptions as pt, EnsureLensOptions as q, ProcessingOptions as qn, UploadAssetPartOptions as qt, Asset as r, WebhookPayloadInput as rn, HashListIdOptions as rt, AssetClassification as s, Actor as sn, Lens as st, AddHashListEntryOptions as t, WaitForAssetDecisionOptions as tn, HashListEntryIdOptions as tt, AssetContent as u, EventCategory as un, ListAssetChildrenOptions as ut, AssetSearchResponse as v, MetadataFieldsResource as vn, ListPoliciesOptions as vt, AssetVisibility as w, DetectedFace as wn, PolicyIdOptions as wt, AssetType as x, UploadPreset as xn, MoveFolderOptions as xt, AssetSearchResult as y, ProjectSettingsResource as yn, ListUploadPresetsOptions as yt, CreateFolderOptions as z, AssetPreview as zn, SubmitAssetOptions as zt };
|
|
@@ -1109,7 +1109,12 @@ declare const CLASSIFICATION_NOT_EVALUATED_REASON_SCHEMA: zod.ZodEnum<{
|
|
|
1109
1109
|
unavailable: "unavailable";
|
|
1110
1110
|
}>;
|
|
1111
1111
|
type ClassificationNotEvaluatedReason = zod.infer<typeof CLASSIFICATION_NOT_EVALUATED_REASON_SCHEMA>;
|
|
1112
|
-
|
|
1112
|
+
/**
|
|
1113
|
+
* Qualifier results keyed by qualifier. Keys from removed or renamed qualifiers are dropped rather
|
|
1114
|
+
* than failing the report; known keys are still validated. Typed as the strict schema: the filter
|
|
1115
|
+
* changes neither the accepted shape of known keys nor the JSON schema.
|
|
1116
|
+
*/
|
|
1117
|
+
declare const CLASSIFICATION_QUALIFIER_RESULTS_SCHEMA: zod.ZodRecord<zod.ZodEnum<{
|
|
1113
1118
|
"criminal-activity-alcohol": "criminal-activity-alcohol";
|
|
1114
1119
|
"criminal-activity-coded-incitement": "criminal-activity-coded-incitement";
|
|
1115
1120
|
"criminal-activity-csam": "criminal-activity-csam";
|
|
@@ -1266,12 +1271,6 @@ declare const STRICT_QUALIFIER_RESULTS_SCHEMA: zod.ZodRecord<zod.ZodEnum<{
|
|
|
1266
1271
|
unavailable: "unavailable";
|
|
1267
1272
|
}>;
|
|
1268
1273
|
}, zod.core.$strict>], "status">>;
|
|
1269
|
-
/**
|
|
1270
|
-
* Qualifier results keyed by qualifier. Keys from removed or renamed qualifiers are dropped rather
|
|
1271
|
-
* than failing the report; known keys are still validated. Typed as the strict schema: the filter
|
|
1272
|
-
* changes neither the accepted shape of known keys nor the JSON schema.
|
|
1273
|
-
*/
|
|
1274
|
-
declare const CLASSIFICATION_QUALIFIER_RESULTS_SCHEMA: typeof STRICT_QUALIFIER_RESULTS_SCHEMA;
|
|
1275
1274
|
type ClassificationQualifierResults = zod.infer<typeof CLASSIFICATION_QUALIFIER_RESULTS_SCHEMA>;
|
|
1276
1275
|
declare const CLASSIFICATION_CATEGORY_REPORT_SCHEMA: zod.ZodDiscriminatedUnion<[zod.ZodObject<{
|
|
1277
1276
|
status: zod.ZodLiteral<"evaluated">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-ZbGIGHTQ.js");
|
|
2
|
+
const require_UploadController = require("./UploadController-V6xkojIF.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). */
|
|
@@ -126,7 +126,8 @@ const VIEWER_STYLES = `
|
|
|
126
126
|
margin: 0 auto; padding: 20px 24px; max-width: 75ch; white-space: pre-wrap; overflow-wrap: anywhere;
|
|
127
127
|
font-family: inherit; font-size: 1rem; line-height: 1.6;
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
/* Fit to width, the page fills the viewer edge to edge; zoomed out, it sits centred. */
|
|
130
|
+
.calmlens-viewer__pages { flex: 1; min-height: 0; overflow: auto; text-align: center; }
|
|
130
131
|
.calmlens-viewer__page { display: inline-block; position: relative; vertical-align: top; }
|
|
131
132
|
.calmlens-viewer__page canvas { display: block; background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / 0.2); }
|
|
132
133
|
.calmlens-viewer__page-field { width: 4.5em; min-height: 36px; padding: 4px 6px; font: inherit; border: 1px solid var(--calmlens-border); border-radius: calc(var(--calmlens-radius) / 2); background: transparent; color: inherit; }
|
|
@@ -802,6 +803,8 @@ const CALMLENS_STYLES = `
|
|
|
802
803
|
position: relative; display: block; overflow: hidden; margin: 0; border-radius: var(--calmlens-media-radius, 0);
|
|
803
804
|
background: var(--calmlens-surface);
|
|
804
805
|
}
|
|
806
|
+
/* The average colour stands in while the content loads; transparent content and notices show the surface. */
|
|
807
|
+
.calmlens-asset:not([data-state="loaded"], [data-state="error"], [data-kind="unavailable"]) { background-color: var(--calmlens-average-color, var(--calmlens-surface)); }
|
|
805
808
|
.calmlens-asset__placeholder, .calmlens-asset__content {
|
|
806
809
|
position: absolute; inset: 0; width: 100%; height: 100%; object-fit: var(--calmlens-fit, contain);
|
|
807
810
|
object-position: var(--calmlens-position, center);
|
|
@@ -816,8 +819,8 @@ const CALMLENS_STYLES = `
|
|
|
816
819
|
/* Documents, text and spreadsheets fill the box with their viewer; a document shows its first
|
|
817
820
|
page's still and an open link until the viewer loads. */
|
|
818
821
|
.calmlens-asset__viewer { position: absolute; inset: 0; }
|
|
819
|
-
|
|
820
|
-
.calmlens-asset:not([data-sized])[data-kind="spreadsheet"] { height: 480px; }
|
|
822
|
+
/* A default height only: any height the page gives the element (a class, a style) wins. */
|
|
823
|
+
:where(.calmlens-asset:not([data-sized]):is([data-kind="document"], [data-kind="text"], [data-kind="spreadsheet"])) { height: 480px; }
|
|
821
824
|
.calmlens-asset[data-kind="document"] .calmlens-asset__content { opacity: 1; }
|
|
822
825
|
.calmlens-asset__open { position: absolute; right: 8px; bottom: 8px; text-decoration: none; }
|
|
823
826
|
/* A website's screenshot scrolls beneath the link to its page. */
|
|
@@ -847,7 +850,9 @@ const CALMLENS_STYLES = `
|
|
|
847
850
|
}
|
|
848
851
|
.calmlens-asset__notice p { margin: 0; display: flex; gap: 6px; align-items: center; }
|
|
849
852
|
/* Thumbnails keep the notice's icon and leave its text to screen readers. */
|
|
850
|
-
|
|
853
|
+
/* A notice has no content of its own to size the box, so it can always measure its width. */
|
|
854
|
+
.calmlens-asset[data-sized], .calmlens-asset[data-kind="unavailable"], .calmlens-asset[data-kind="age-restricted"],
|
|
855
|
+
.calmlens-asset[data-state="error"] { container-type: inline-size; }
|
|
851
856
|
@container (max-width: 119px) {
|
|
852
857
|
.calmlens-asset__label, .calmlens-asset__notice > strong, .calmlens-asset__notice > p:not(:has(svg)) {
|
|
853
858
|
position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
|
|
@@ -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, en as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-HUERg5hI.js";
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-CCeFnKX8.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.
|
|
@@ -66,9 +66,6 @@ const API_ERROR_CODES = {
|
|
|
66
66
|
ASSET_NOT_RETRYABLE: "asset/not-retryable",
|
|
67
67
|
ASSET_CONTENT_UNAVAILABLE: "asset/content-unavailable",
|
|
68
68
|
ASSET_CONTENT_PURGED: "asset/content-purged",
|
|
69
|
-
ASSET_NOT_DECIDED: "asset/not-decided",
|
|
70
|
-
ASSET_POLICY_CHANGED: "asset/policy-changed",
|
|
71
|
-
ASSET_REVIEWED: "asset/reviewed",
|
|
72
69
|
SUPPORT_TICKET_NOT_FOUND: "support-ticket/not-found",
|
|
73
70
|
DUPLICATE_EXTERNAL_ID: "asset/duplicate-external-id",
|
|
74
71
|
FOLDER_NOT_FOUND: "folder/not-found",
|
|
@@ -384,18 +381,6 @@ const API_ERROR_DEFINITIONS = {
|
|
|
384
381
|
status: 409,
|
|
385
382
|
message: "This asset's content was purged, so it can only be blocked. Upload it again to have it moderated afresh."
|
|
386
383
|
},
|
|
387
|
-
"asset/not-decided": {
|
|
388
|
-
status: 409,
|
|
389
|
-
message: "This asset has no automatic moderation decision to explain yet."
|
|
390
|
-
},
|
|
391
|
-
"asset/policy-changed": {
|
|
392
|
-
status: 409,
|
|
393
|
-
message: "The project's moderation policy has changed since this decision, so it can't be explained as made. Re-run moderation with the current policy instead."
|
|
394
|
-
},
|
|
395
|
-
"asset/reviewed": {
|
|
396
|
-
status: 409,
|
|
397
|
-
message: "A reviewer has decided this asset, so its moderation can't be re-run."
|
|
398
|
-
},
|
|
399
384
|
"support-ticket/not-found": {
|
|
400
385
|
status: 404,
|
|
401
386
|
message: "Support ticket not found."
|
|
@@ -1067,7 +1052,7 @@ const listPages = (fetchPage, { cursor, feed = false } = {}) => {
|
|
|
1067
1052
|
};
|
|
1068
1053
|
// src/client/CalmLensVersion.ts
|
|
1069
1054
|
/** This SDK's version, from its package.json. */
|
|
1070
|
-
const SDK_VERSION = "0.
|
|
1055
|
+
const SDK_VERSION = "0.27.2";
|
|
1071
1056
|
const runtimeName = () => {
|
|
1072
1057
|
const runtime = globalThis;
|
|
1073
1058
|
if (isReactNativeRuntime()) return "react-native";
|
|
@@ -1808,6 +1793,7 @@ const UPLOAD_MIME_SUFFIXES = ["+json", "+xml"];
|
|
|
1808
1793
|
const UPLOAD_MIME_TYPES = [
|
|
1809
1794
|
"application/pdf",
|
|
1810
1795
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
1796
|
+
"application/vnd.ms-word.document.macroenabled.12",
|
|
1811
1797
|
"application/msword",
|
|
1812
1798
|
"application/rtf",
|
|
1813
1799
|
"application/vnd.oasis.opendocument.text",
|
|
@@ -2364,7 +2350,7 @@ const getAssetInfo = async (url, options = {}) => {
|
|
|
2364
2350
|
});
|
|
2365
2351
|
return data;
|
|
2366
2352
|
};
|
|
2367
|
-
// src/contract/ModerationContextLimits-
|
|
2353
|
+
// src/contract/ModerationContextLimits-k930WU8i.js
|
|
2368
2354
|
/** The most recent earlier posts CalmLens uses. */
|
|
2369
2355
|
const MODERATION_CONTEXT_USED_ITEMS = 5;
|
|
2370
2356
|
/**
|
|
@@ -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-DXAs8mcx.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
type CalmLensProviderProps<F extends UploadFile = File> = CalmLensProvidedOptions<F> & {
|
|
4
4
|
children?: ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_UploadController = require("./UploadController-V6xkojIF.js");
|
|
2
2
|
let react = require("react");
|
|
3
3
|
// src/ui/ReactUpload.ts
|
|
4
4
|
const CalmLensContext = (0, react.createContext)(void 0);
|
|
@@ -33,7 +33,77 @@ const CLASSIFICATION_CATEGORIES = [
|
|
|
33
33
|
"personal-information",
|
|
34
34
|
"profanity"
|
|
35
35
|
];
|
|
36
|
-
// src/contract/
|
|
36
|
+
// src/contract/LazySchema-D_3-dV1e.js
|
|
37
|
+
const registryMap = zod.globalRegistry._map;
|
|
38
|
+
/**
|
|
39
|
+
* A schema built the first time anything reads it, rather than when its module loads. Building
|
|
40
|
+
* Zod schemas costs a new isolate CPU before its first request, so a module whose schemas most
|
|
41
|
+
* requests never use (support tickets, compliance cases, appeals…) builds them only when one does.
|
|
42
|
+
*
|
|
43
|
+
* The returned proxy stands for the schema: reading, calling or composing it (`.parse`, `.extend`,
|
|
44
|
+
* embedding it in another schema) builds the schema and forwards to it, with the schema as the
|
|
45
|
+
* receiver, so its methods see the real instance. Its metadata (`.meta()`, `.describe()`, zod-meta's
|
|
46
|
+
* stores) is registered under the proxy too, for the code that looks schemas up by identity (JSON
|
|
47
|
+
* Schema generation, where the proxy is embedded in another schema).
|
|
48
|
+
*
|
|
49
|
+
* Calling it has no side effects (the annotation tells bundlers), so a bundle drops the lazy
|
|
50
|
+
* schemas it never uses, as it drops plain Zod schemas.
|
|
51
|
+
*/
|
|
52
|
+
const lazySchema = /* @__NO_SIDE_EFFECTS__ */ (build) => {
|
|
53
|
+
let schema;
|
|
54
|
+
const real = () => {
|
|
55
|
+
if (!schema) {
|
|
56
|
+
const built = build();
|
|
57
|
+
schema = built;
|
|
58
|
+
const meta = registryMap.get(built);
|
|
59
|
+
if (meta !== void 0) registryMap.set(proxy, meta);
|
|
60
|
+
const internals = built._zod;
|
|
61
|
+
const process = internals.processJSONSchema;
|
|
62
|
+
if (process) internals.processJSONSchema = (context, json, params) => {
|
|
63
|
+
const record = context.seen.get(proxy);
|
|
64
|
+
if (!record || context.seen.has(built)) return process(context, json, params);
|
|
65
|
+
context.seen.set(built, record);
|
|
66
|
+
try {
|
|
67
|
+
return process(context, json, params);
|
|
68
|
+
} finally {
|
|
69
|
+
if (context.seen.get(built) === record) context.seen.delete(built);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
return schema;
|
|
74
|
+
};
|
|
75
|
+
const proxy = new Proxy({}, {
|
|
76
|
+
get(_, key) {
|
|
77
|
+
const target = real();
|
|
78
|
+
return Reflect.get(target, key, target);
|
|
79
|
+
},
|
|
80
|
+
set(_, key, value) {
|
|
81
|
+
const target = real();
|
|
82
|
+
return Reflect.set(target, key, value, target);
|
|
83
|
+
},
|
|
84
|
+
has(_, key) {
|
|
85
|
+
return Reflect.has(real(), key);
|
|
86
|
+
},
|
|
87
|
+
ownKeys() {
|
|
88
|
+
return Reflect.ownKeys(real());
|
|
89
|
+
},
|
|
90
|
+
getOwnPropertyDescriptor(_, key) {
|
|
91
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(real(), key);
|
|
92
|
+
return descriptor && {
|
|
93
|
+
...descriptor,
|
|
94
|
+
configurable: true
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
getPrototypeOf() {
|
|
98
|
+
return Reflect.getPrototypeOf(real());
|
|
99
|
+
},
|
|
100
|
+
defineProperty(_, key, descriptor) {
|
|
101
|
+
return Reflect.defineProperty(real(), key, descriptor);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
return proxy;
|
|
105
|
+
};
|
|
106
|
+
// src/contract/Jurisdiction-CQN8qnzX.js
|
|
37
107
|
/**
|
|
38
108
|
* Jurisdictions with legal rules always apply to every project. An optional jurisdiction is a
|
|
39
109
|
* product standard rather than a legal floor: every project serves it unless it opts out.
|
|
@@ -80,19 +150,12 @@ const JURISDICTIONS = {
|
|
|
80
150
|
optional: false
|
|
81
151
|
}
|
|
82
152
|
};
|
|
83
|
-
const JURISDICTION_SCHEMA = zod.enum(Object.keys(JURISDICTIONS));
|
|
153
|
+
const JURISDICTION_SCHEMA = /* @__PURE__ */ lazySchema(() => zod.enum(Object.keys(JURISDICTIONS)));
|
|
84
154
|
Object.keys(JURISDICTIONS).filter((code) => !JURISDICTIONS[code].optional);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
JURISDICTION_SCHEMA.array().min(1).refine((regions) => regions.includes("global") && new Set(regions).size === regions.length, { message: "jurisdiction/global-required-or-duplicate" });
|
|
88
|
-
const COUNTRIES = new Set("AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW".split(" "));
|
|
89
|
-
const VIEWER_REGION_SCHEMA = zod.enum([...COUNTRIES]).describe("Viewer's ISO 3166-1 alpha-2 country, supplied by your integration; not the proxy server's country. EU is not a viewer country.");
|
|
155
|
+
Object.keys(JURISDICTIONS).filter((code) => JURISDICTIONS[code].optional);
|
|
156
|
+
new Set("AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW".split(" "));
|
|
90
157
|
new Set("AT BE BG HR CY CZ DK EE FI FR DE GR HU IE IT LV LT LU MT NL PL PT RO SK SI ES SE".split(" "));
|
|
91
|
-
|
|
92
|
-
region: VIEWER_REGION_SCHEMA.optional().describe("Viewer country. Defaults to the country of the connection reaching CalmLens; proxies should forward the viewer country explicitly."),
|
|
93
|
-
ageConfirmed: zod.boolean().optional().describe("Your platform's confirmation that the viewer passed its age check, so age-restricted content may be delivered. Defaults to false. Your platform confirms the viewer's age. Viewer claims are assertions from your application; CalmLens doesn't verify them. To restrict who can load an age-restricted asset, make it private and issue signed URLs only to viewers who passed your age check.")
|
|
94
|
-
}).strict();
|
|
95
|
-
// src/contract/TestRegionalActions-DUzwPr1a.js
|
|
158
|
+
// src/contract/TestRegionalActions-BhyWuU49.js
|
|
96
159
|
/**
|
|
97
160
|
* Marks English text in shared, backend and data modules that the portal shows, so the app's
|
|
98
161
|
* message catalog (packages/app/vite/messageCatalog.ts) extracts it and the portal can translate it
|
|
@@ -1115,15 +1178,15 @@ function getModerationQualifierInfo(qualifier) {
|
|
|
1115
1178
|
return MODERATION_QUALIFIER_INFO[qualifier];
|
|
1116
1179
|
}
|
|
1117
1180
|
/** Authenticated test inputs can add regional delivery restrictions without inventing evidence. */
|
|
1118
|
-
const TEST_REGIONAL_ACTIONS_SCHEMA = zod.array(zod.object({
|
|
1181
|
+
const TEST_REGIONAL_ACTIONS_SCHEMA = /* @__PURE__ */ lazySchema(() => zod.array(zod.object({
|
|
1119
1182
|
region: JURISDICTION_SCHEMA.exclude(["global"]),
|
|
1120
1183
|
action: zod.enum([
|
|
1121
1184
|
"limit",
|
|
1122
1185
|
"age-restrict",
|
|
1123
1186
|
"block"
|
|
1124
1187
|
])
|
|
1125
|
-
}).strict()).max(7).refine((entries) => new Set(entries.map((entry) => entry.region)).size === entries.length, "Choose each region once");
|
|
1126
|
-
// src/contract/TestTriggers-
|
|
1188
|
+
}).strict()).max(7).refine((entries) => new Set(entries.map((entry) => entry.region)).size === entries.length, "Choose each region once"));
|
|
1189
|
+
// src/contract/TestTriggers-Cvi7e2KA.js
|
|
1127
1190
|
/**
|
|
1128
1191
|
* The visual encoding of test images (shared by images and video frames), independent of what the
|
|
1129
1192
|
* bytes mean. An odd N×N grid of square cells fills the image. Its outer ring alternates black and
|
|
@@ -1596,21 +1659,21 @@ const detectionShape = {
|
|
|
1596
1659
|
const fitsImage = ({ box: [left, top, width, height] }) => left + width <= 1e4 && top + height <= 1e4;
|
|
1597
1660
|
const BOX_MESSAGE = msg("A box must lie inside the image: left + width and top + height are at most 10000.");
|
|
1598
1661
|
const ageYears = zod.number().int().min(0).max(120);
|
|
1599
|
-
const TEST_DETECTED_PERSON_SCHEMA = zod.object(detectionShape).strict().refine(fitsImage, BOX_MESSAGE);
|
|
1600
|
-
const TEST_DETECTED_FACE_SCHEMA = zod.object({
|
|
1662
|
+
const TEST_DETECTED_PERSON_SCHEMA = /* @__PURE__ */ lazySchema(() => zod.object(detectionShape).strict().refine(fitsImage, BOX_MESSAGE));
|
|
1663
|
+
const TEST_DETECTED_FACE_SCHEMA = /* @__PURE__ */ lazySchema(() => zod.object({
|
|
1601
1664
|
...detectionShape,
|
|
1602
1665
|
age: zod.union([zod.enum(["adult", "minor"]), zod.object({
|
|
1603
1666
|
low: ageYears,
|
|
1604
1667
|
high: ageYears
|
|
1605
1668
|
}).strict().refine(({ low, high }) => low <= high, msg("An age range's low must not be above its high."))]).optional()
|
|
1606
|
-
}).strict().refine(fitsImage, BOX_MESSAGE);
|
|
1669
|
+
}).strict().refine(fitsImage, BOX_MESSAGE));
|
|
1607
1670
|
/** Person and face detection results a test image reports instead of running detection. */
|
|
1608
|
-
const TEST_DETECTIONS_SCHEMA = zod.object({
|
|
1671
|
+
const TEST_DETECTIONS_SCHEMA = /* @__PURE__ */ lazySchema(() => zod.object({
|
|
1609
1672
|
people: zod.union([zod.array(TEST_DETECTED_PERSON_SCHEMA).max(32), zod.literal("unavailable")]).optional(),
|
|
1610
1673
|
faces: zod.union([zod.array(TEST_DETECTED_FACE_SCHEMA).max(32), zod.literal("unavailable")]).optional()
|
|
1611
|
-
}).strict();
|
|
1674
|
+
}).strict());
|
|
1612
1675
|
/** Each row is one qualifying instance. Unselected qualifiers are explicitly absent. */
|
|
1613
|
-
const TEST_INPUT_SCHEMA = zod.object({
|
|
1676
|
+
const TEST_INPUT_SCHEMA = /* @__PURE__ */ lazySchema(() => zod.object({
|
|
1614
1677
|
regionalActions: TEST_REGIONAL_ACTIONS_SCHEMA.optional(),
|
|
1615
1678
|
unassessedCategories: zod.array(zod.enum(CLASSIFICATION_CATEGORIES)).max(CLASSIFICATION_CATEGORIES.length).optional(),
|
|
1616
1679
|
instances: zod.array(zod.object({
|
|
@@ -1640,7 +1703,7 @@ const TEST_INPUT_SCHEMA = zod.object({
|
|
|
1640
1703
|
code: "custom",
|
|
1641
1704
|
message: msg("An unassessed category cannot also have assessed instances.")
|
|
1642
1705
|
});
|
|
1643
|
-
});
|
|
1706
|
+
}));
|
|
1644
1707
|
const TEST_INPUT_PRESETS = {
|
|
1645
1708
|
clean: { instances: [] },
|
|
1646
1709
|
limited: { instances: [{
|
|
@@ -1994,6 +2057,12 @@ Object.defineProperty(exports, "getTestInputTag", {
|
|
|
1994
2057
|
return getTestInputTag;
|
|
1995
2058
|
}
|
|
1996
2059
|
});
|
|
2060
|
+
Object.defineProperty(exports, "lazySchema", {
|
|
2061
|
+
enumerable: true,
|
|
2062
|
+
get: function() {
|
|
2063
|
+
return lazySchema;
|
|
2064
|
+
}
|
|
2065
|
+
});
|
|
1997
2066
|
Object.defineProperty(exports, "paintTestImage", {
|
|
1998
2067
|
enumerable: true,
|
|
1999
2068
|
get: function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-ZbGIGHTQ.js");
|
|
2
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-DdoxXe_7.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
|
|
1
|
+
import { cn as EventAsset, ln as TypedEvent, sn as Actor } from "./CalmLensTypes-HUERg5hI.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: {
|
|
@@ -67,9 +67,6 @@ declare const API_ERROR_CODES: {
|
|
|
67
67
|
readonly ASSET_NOT_RETRYABLE: "asset/not-retryable";
|
|
68
68
|
readonly ASSET_CONTENT_UNAVAILABLE: "asset/content-unavailable";
|
|
69
69
|
readonly ASSET_CONTENT_PURGED: "asset/content-purged";
|
|
70
|
-
readonly ASSET_NOT_DECIDED: "asset/not-decided";
|
|
71
|
-
readonly ASSET_POLICY_CHANGED: "asset/policy-changed";
|
|
72
|
-
readonly ASSET_REVIEWED: "asset/reviewed";
|
|
73
70
|
readonly SUPPORT_TICKET_NOT_FOUND: "support-ticket/not-found";
|
|
74
71
|
readonly DUPLICATE_EXTERNAL_ID: "asset/duplicate-external-id";
|
|
75
72
|
readonly FOLDER_NOT_FOUND: "folder/not-found";
|
|
@@ -218,9 +215,6 @@ declare const CALMLENS_ERROR_CODES: {
|
|
|
218
215
|
readonly ASSET_NOT_RETRYABLE: "asset/not-retryable";
|
|
219
216
|
readonly ASSET_CONTENT_UNAVAILABLE: "asset/content-unavailable";
|
|
220
217
|
readonly ASSET_CONTENT_PURGED: "asset/content-purged";
|
|
221
|
-
readonly ASSET_NOT_DECIDED: "asset/not-decided";
|
|
222
|
-
readonly ASSET_POLICY_CHANGED: "asset/policy-changed";
|
|
223
|
-
readonly ASSET_REVIEWED: "asset/reviewed";
|
|
224
218
|
readonly SUPPORT_TICKET_NOT_FOUND: "support-ticket/not-found";
|
|
225
219
|
readonly DUPLICATE_EXTERNAL_ID: "asset/duplicate-external-id";
|
|
226
220
|
readonly FOLDER_NOT_FOUND: "folder/not-found";
|
package/cjs/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
2
|
-
import { $ as
|
|
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-
|
|
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
|
|
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-HUERg5hI.js";
|
|
3
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-CCeFnKX8.js";
|
|
4
|
+
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-Ck7x1YjM.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-mUmOFH55.js";
|
|
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-ZbGIGHTQ.js");
|
|
3
3
|
require("./index.js");
|
|
4
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
4
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-DdoxXe_7.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;
|