calmlens 0.29.2 → 0.30.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 +16 -17
- package/cjs/{BrowserUpload-CCXt4DAY.js → BrowserUpload-BNeTp6eF.js} +1 -1
- package/{esm/BrowserUpload-CeGsM9h1.d.ts → cjs/BrowserUpload-DS6KT6o_.d.ts} +2 -2
- package/cjs/{CalmLensAppClient-D-BD_Ny1.d.ts → CalmLensAppClient-B4vzxEzg.d.ts} +1 -1
- package/cjs/{CalmLensAppClient-ea-qXkmD.js → CalmLensAppClient-ClqGwUbl.js} +2 -2
- package/cjs/{CalmLensConnection-BrySN2M3.js → CalmLensConnection-og0jh-Fw.js} +1 -1
- package/{esm/CalmLensServerClient-BYN_N0lt.d.ts → cjs/CalmLensServerClient-BJl2Hsxr.d.ts} +12 -8
- package/cjs/{CalmLensServerClient-FD7H7KvL.js → CalmLensServerClient-KsXM77rO.js} +18 -17
- package/cjs/{CalmLensTypes-C2blKgTu.d.ts → CalmLensTypes-fAgF0_lq.d.ts} +206 -6
- package/cjs/{Classification-CMM2tZpJ-IdIh63n0.d.ts → Classification-DbXUPSvH-C0o2t4mg.d.ts} +15 -30
- package/{esm/Core-CNmoxDCW.d.ts → cjs/Core-DL531ZPG.d.ts} +2 -2
- package/cjs/{Core-DMFa3EUp.js → Core-eDiPpil9.js} +2 -2
- package/cjs/{ModerationContextLimits-1XP4ZTQk.js → ModerationContextLimits-BVBkcgSU.js} +1 -1
- package/{esm/ReactUpload-kqEe6gcN.d.ts → cjs/ReactUpload-BoS0lr7U.d.ts} +1 -1
- package/cjs/{ReactUpload-gaeiPSeH.js → ReactUpload-DAPAzAwY.js} +1 -1
- package/{esm/TestTriggers-CFnel6a9.d.ts → cjs/TestTriggers-CLjF01NU.d.ts} +1 -1
- package/cjs/{UploadController-CyPTBuZg.js → UploadController-BElzwMic.js} +1 -1
- package/{esm/WebhookPayload-DZWlnvcY.d.ts → cjs/WebhookPayload-DlGoY_db.d.ts} +11 -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 +4 -4
- package/cjs/{index-Dl2qwS8L.d.ts → index-ChrzzIRt.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 +4 -4
- package/cjs/react.d.ts +4 -4
- package/cjs/react.js +5 -5
- package/cjs/server.d.ts +12 -12
- package/cjs/server.js +3 -3
- package/cjs/test-inputs.d.ts +1 -1
- package/cjs/testing.d.ts +12 -8
- package/cjs/testing.js +21 -19
- package/cjs/{ui-DNP1uWQy.js → ui-COjb2Hx6.js} +2 -2
- package/cjs/{ui-BtmJC-f9.d.ts → ui-DpZOLeVs.d.ts} +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-Bu6eWqQS.js → BrowserUpload-BCmj5eGu.js} +1 -1
- package/{cjs/BrowserUpload-CeGsM9h1.d.ts → esm/BrowserUpload-DS6KT6o_.d.ts} +2 -2
- package/esm/{CalmLensAppClient-D-BD_Ny1.d.ts → CalmLensAppClient-B4vzxEzg.d.ts} +1 -1
- package/esm/{CalmLensAppClient-xp-fH6Lz.js → CalmLensAppClient-DcPVLn2y.js} +2 -2
- package/esm/{CalmLensConnection-DwG5yBk2.js → CalmLensConnection-Pm-g6a1l.js} +1 -1
- package/{cjs/CalmLensServerClient-BYN_N0lt.d.ts → esm/CalmLensServerClient-BJl2Hsxr.d.ts} +12 -8
- package/esm/{CalmLensServerClient-CKlNBBo3.js → CalmLensServerClient-C2HGsjkT.js} +17 -16
- package/esm/{CalmLensTypes-C2blKgTu.d.ts → CalmLensTypes-fAgF0_lq.d.ts} +206 -6
- package/esm/{Classification-CMM2tZpJ-IdIh63n0.d.ts → Classification-DbXUPSvH-C0o2t4mg.d.ts} +15 -30
- package/{cjs/Core-CNmoxDCW.d.ts → esm/Core-DL531ZPG.d.ts} +2 -2
- package/esm/{Core-DnCeTmvS.js → Core-KYgLJ0eb.js} +2 -2
- package/esm/{ModerationContextLimits-CtAyz60h.js → ModerationContextLimits-DmjWgTBa.js} +1 -1
- package/{cjs/ReactUpload-kqEe6gcN.d.ts → esm/ReactUpload-BoS0lr7U.d.ts} +1 -1
- package/esm/{ReactUpload-D30YlRui.js → ReactUpload-QW_RNxFp.js} +1 -1
- package/{cjs/TestTriggers-CFnel6a9.d.ts → esm/TestTriggers-CLjF01NU.d.ts} +1 -1
- package/esm/{UploadController-DENryQ8H.js → UploadController-Civ7QPwT.js} +1 -1
- package/{cjs/WebhookPayload-DZWlnvcY.d.ts → esm/WebhookPayload-DlGoY_db.d.ts} +11 -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 +4 -4
- package/esm/{index-Dl2qwS8L.d.ts → index-ChrzzIRt.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 +4 -4
- package/esm/react.d.ts +4 -4
- package/esm/react.js +5 -5
- package/esm/server.d.ts +12 -12
- package/esm/server.js +3 -3
- package/esm/test-inputs.d.ts +1 -1
- package/esm/testing.d.ts +12 -8
- package/esm/testing.js +21 -19
- package/esm/{ui-DUEBbRJ0.js → ui-BVXgDCO2.js} +2 -2
- package/esm/{ui-BtmJC-f9.d.ts → ui-DpZOLeVs.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _n as EventResourceKind, fn as TypedEvent, un as Actor } from "./CalmLensTypes-fAgF0_lq.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: {
|
|
@@ -522,10 +522,10 @@ declare const RECEIVED_WEBHOOK_EVENT_PAYLOAD_SCHEMA: zod.ZodObject<{
|
|
|
522
522
|
type: zod.ZodString;
|
|
523
523
|
id: zod.ZodNullable<zod.ZodString>;
|
|
524
524
|
}, zod.core.$loose>>;
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
asset: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
|
|
525
|
+
resource: zod.ZodOptional<zod.ZodNullable<zod.ZodObject<{
|
|
526
|
+
kind: zod.ZodString;
|
|
528
527
|
id: zod.ZodString;
|
|
528
|
+
sequence: zod.ZodNumber;
|
|
529
529
|
}, zod.core.$loose>>>;
|
|
530
530
|
facts: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
531
531
|
key: zod.ZodString;
|
|
@@ -536,7 +536,7 @@ declare const RECEIVED_WEBHOOK_EVENT_PAYLOAD_SCHEMA: zod.ZodObject<{
|
|
|
536
536
|
type ReceivedFact = zod.infer<typeof RECEIVED_WEBHOOK_EVENT_PAYLOAD_SCHEMA>["facts"];
|
|
537
537
|
/**
|
|
538
538
|
* The schema only requires what parsing needs, so future fields still parse. The type describes
|
|
539
|
-
* the payload CalmLens sends today
|
|
539
|
+
* the payload CalmLens sends today; fields added later arrive too,
|
|
540
540
|
* untyped.
|
|
541
541
|
*/
|
|
542
542
|
interface ReceivedWebhookEventPayload {
|
|
@@ -552,8 +552,12 @@ interface ReceivedWebhookEventPayload {
|
|
|
552
552
|
type: Actor["type"] | (string & {});
|
|
553
553
|
id: string | null;
|
|
554
554
|
};
|
|
555
|
-
|
|
556
|
-
|
|
555
|
+
/** The resource the event is about; `kind` may take values added later. */
|
|
556
|
+
resource?: {
|
|
557
|
+
kind: EventResourceKind | (string & {});
|
|
558
|
+
id: string;
|
|
559
|
+
sequence: number;
|
|
560
|
+
} | null;
|
|
557
561
|
facts?: ReceivedFact;
|
|
558
562
|
[key: string]: unknown;
|
|
559
563
|
}
|
package/cjs/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { $ as FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An 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 AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAppClient, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type 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 RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
|
|
1
|
+
import { a as ClassificationQualifierResults, c as HashList, d as ModerationContext, f as MODERATION_CONTEXT_USED_CHARACTERS, h as selectModerationContextItems, i as ClassificationNotEvaluatedReason, l as HashListEntry, m as ModerationContextItem, n as ClassificationCategory, o as Likelihood, p as MODERATION_CONTEXT_USED_ITEMS, r as ClassificationCategoryReport, s as ModerationQualifier, t as ClassificationCategories, u as PolicyAction } from "./Classification-DbXUPSvH-C0o2t4mg.js";
|
|
2
|
+
import { $ as FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as ProcessingFeatureId, At as ResetPolicyOptions, B as CreateHashListOptions, Bn as AssetInfo, Bt as StreamingFeatureOptions, C as AssetUploadStatus, Cn as ProjectSettingsResource, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as BoundingBox, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, En as AgeRange, Et as RemoveAssetContentOptions, F as CdnTransform, Fn as CursorPage, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gn as AssetRenderedKind, Gt as UpdateLensOptions, H as CreateMultipartUploadPartOptions, Hn as AssetHlsRendition, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as LensType, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jn as ExtractedText, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kn as AssetSafetyHold, Kt as UpdatePolicyOptions, L as ClientRequestDefaults, Ln as AssetSearchMatchField, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as ProcessingFeatureStage, Mt as RetrieveAssetOptions, N as CdnResource, Nn as ProcessingFeatures, Nt as RetryAssetOptions, O as CalmLensAppClientOptions, On as DetectedFace, Ot as RequestAttempt, P as CdnServeOptions, Pn as Policy, Pt as SearchAssetsOptions, Q as FolderIdOptions, Qt as UploadPresetPage, R as ConnectionOptions, Rn as AssetSearchQuery, Rt as SignedAssetUrl, S as AssetUpload, Sn as MetadataFieldsResource, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as UploadPreset, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetPreview, Ut as UpdateFolderOptions, V as CreateLensOptions, Vn as AssetHls, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wn as AssetRendered, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Xn as MetadataItem, Xt as UploadPresetDefinition, Y as EnsureMetadataFieldsOptions, Yn as FileMetadata, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zn as ProcessingOptions, Zt as UploadPresetIdOptions, _ as AssetPage, _n as EventResourceKind, _t as ListLensesOptions, a as AssetChecksums, an as WebhookPayloadInput, at as IdempotencyOptions, b as AssetTimelinePage, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as AssetTimelineSegment, ct as LensIdOptions, d as AssetContentOptions, dn as EventResource, dt as ListAssetTimelineOptions, en as UploadedAsset, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as TypedEvent, ft as ListAssetsOptions, g as AssetModerationStatus, gn as EventFacts, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventFactValues, ht as ListHashListEntriesOptions, i as AssetAvailability, in as WebhookHeadersInput, it as HashListPage, j as CdnAssetReference, jn as ProcessingFeatureResults, jt as RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kn as DetectedPerson, kt as RequestOptions, l as AssetClassificationStatus, ln as GetEventsResponse, lt as LensPage, m as AssetModeration, mn as EventFact, mt as ListFoldersOptions, n as AppInfo, nn as ViewerClaims, nt as HashListEntryPage, o as AssetChildrenPage, on as AssetBatchOperation, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventCategory, pt as ListEventsOptions, q as EnsureLensOptions, qn as AssetSafetyHoldReason, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, s as AssetClassification, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, u as AssetContent, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as EventSeverity, vt as ListPoliciesOptions, w as AssetVisibility, wn as PublicProjectSettings, wt as PolicyIdOptions, x as AssetType, xn as Folder, xt as MoveFolderOptions, y as AssetSearchResult, yn as EventType, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-fAgF0_lq.js";
|
|
3
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-B4vzxEzg.js";
|
|
4
|
+
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-ChrzzIRt.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-DlGoY_db.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 AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, CalmLensAppClient, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventResource, type EventResourceKind, type EventSeverity, type EventType, type 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 RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
|
package/cjs/app.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_CalmLensError = require("./CalmLensError-DPHJaVjX.js");
|
|
3
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
3
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-BVBkcgSU.js");
|
|
4
4
|
require("./index.js");
|
|
5
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
5
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-ClqGwUbl.js");
|
|
6
6
|
exports.AUTO_PAGING_TO_ARRAY_MAX = require_ModerationContextLimits.AUTO_PAGING_TO_ARRAY_MAX;
|
|
7
7
|
exports.CALMLENS_ERROR_CODES = require_CalmLensError.CALMLENS_ERROR_CODES;
|
|
8
8
|
exports.CDN_RESOURCES = require_ModerationContextLimits.CDN_RESOURCES;
|
package/cjs/elements.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-
|
|
3
|
-
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-
|
|
4
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { i as AssetAvailability } from "./CalmLensTypes-fAgF0_lq.js";
|
|
2
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-DL531ZPG.js";
|
|
3
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-DS6KT6o_.js";
|
|
4
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-DpZOLeVs.js";
|
|
5
5
|
declare const BaseElement$1: typeof HTMLElement;
|
|
6
6
|
/**
|
|
7
7
|
* An asset viewer element. Set the `src` attribute to the asset URL (public or signed) and the
|
package/cjs/elements.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ui = require("./ui-
|
|
3
|
-
const require_Core = require("./Core-
|
|
4
|
-
const require_UploadController = require("./UploadController-
|
|
2
|
+
const require_ui = require("./ui-COjb2Hx6.js");
|
|
3
|
+
const require_Core = require("./Core-eDiPpil9.js");
|
|
4
|
+
const require_UploadController = require("./UploadController-BElzwMic.js");
|
|
5
5
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
6
|
-
const require_BrowserUpload = require("./BrowserUpload-
|
|
6
|
+
const require_BrowserUpload = require("./BrowserUpload-BNeTp6eF.js");
|
|
7
7
|
// src/viewers/Elements.ts
|
|
8
8
|
const BaseElement$1 = typeof HTMLElement === "undefined" ? class {} : HTMLElement;
|
|
9
9
|
const PROPERTIES = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./Classification-
|
|
2
|
-
import {
|
|
3
|
-
import "./WebhookPayload-
|
|
1
|
+
import "./Classification-DbXUPSvH-C0o2t4mg.js";
|
|
2
|
+
import { Bn as AssetInfo, N as CdnResource, et as GetAssetInfoOptions } from "./CalmLensTypes-fAgF0_lq.js";
|
|
3
|
+
import "./WebhookPayload-DlGoY_db.js";
|
|
4
4
|
/** Every CDN resource beneath an asset URL, as `getAssetUrl` and `signAssetUrl` accept them. */
|
|
5
5
|
declare const CDN_RESOURCES: CdnResource[];
|
|
6
6
|
/**
|
package/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { $ as FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as
|
|
3
|
-
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-
|
|
4
|
-
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-
|
|
5
|
-
export { AUTO_PAGING_TO_ARRAY_MAX, type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type AppInfo, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type 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 RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
|
|
1
|
+
import { a as ClassificationQualifierResults, c as HashList, d as ModerationContext, f as MODERATION_CONTEXT_USED_CHARACTERS, h as selectModerationContextItems, i as ClassificationNotEvaluatedReason, l as HashListEntry, m as ModerationContextItem, n as ClassificationCategory, o as Likelihood, p as MODERATION_CONTEXT_USED_ITEMS, r as ClassificationCategoryReport, s as ModerationQualifier, t as ClassificationCategories, u as PolicyAction } from "./Classification-DbXUPSvH-C0o2t4mg.js";
|
|
2
|
+
import { $ as FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as ProcessingFeatureId, At as ResetPolicyOptions, B as CreateHashListOptions, Bn as AssetInfo, Bt as StreamingFeatureOptions, C as AssetUploadStatus, Cn as ProjectSettingsResource, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as BoundingBox, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, En as AgeRange, Et as RemoveAssetContentOptions, F as CdnTransform, Fn as CursorPage, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gn as AssetRenderedKind, Gt as UpdateLensOptions, H as CreateMultipartUploadPartOptions, Hn as AssetHlsRendition, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as LensType, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jn as ExtractedText, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kn as AssetSafetyHold, Kt as UpdatePolicyOptions, L as ClientRequestDefaults, Ln as AssetSearchMatchField, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as ProcessingFeatureStage, Mt as RetrieveAssetOptions, N as CdnResource, Nn as ProcessingFeatures, Nt as RetryAssetOptions, O as CalmLensAppClientOptions, On as DetectedFace, Ot as RequestAttempt, P as CdnServeOptions, Pn as Policy, Pt as SearchAssetsOptions, Q as FolderIdOptions, Qt as UploadPresetPage, R as ConnectionOptions, Rn as AssetSearchQuery, Rt as SignedAssetUrl, S as AssetUpload, Sn as MetadataFieldsResource, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as UploadPreset, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetPreview, Ut as UpdateFolderOptions, V as CreateLensOptions, Vn as AssetHls, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wn as AssetRendered, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Xn as MetadataItem, Xt as UploadPresetDefinition, Y as EnsureMetadataFieldsOptions, Yn as FileMetadata, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zn as ProcessingOptions, Zt as UploadPresetIdOptions, _ as AssetPage, _n as EventResourceKind, _t as ListLensesOptions, a as AssetChecksums, an as WebhookPayloadInput, at as IdempotencyOptions, b as AssetTimelinePage, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as AssetTimelineSegment, ct as LensIdOptions, d as AssetContentOptions, dn as EventResource, dt as ListAssetTimelineOptions, en as UploadedAsset, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as TypedEvent, ft as ListAssetsOptions, g as AssetModerationStatus, gn as EventFacts, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventFactValues, ht as ListHashListEntriesOptions, i as AssetAvailability, in as WebhookHeadersInput, it as HashListPage, j as CdnAssetReference, jn as ProcessingFeatureResults, jt as RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kn as DetectedPerson, kt as RequestOptions, l as AssetClassificationStatus, ln as GetEventsResponse, lt as LensPage, m as AssetModeration, mn as EventFact, mt as ListFoldersOptions, n as AppInfo, nn as ViewerClaims, nt as HashListEntryPage, o as AssetChildrenPage, on as AssetBatchOperation, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventCategory, pt as ListEventsOptions, q as EnsureLensOptions, qn as AssetSafetyHoldReason, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, s as AssetClassification, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, u as AssetContent, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as EventSeverity, vt as ListPoliciesOptions, w as AssetVisibility, wn as PublicProjectSettings, wt as PolicyIdOptions, x as AssetType, xn as Folder, xt as MoveFolderOptions, y as AssetSearchResult, yn as EventType, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-fAgF0_lq.js";
|
|
3
|
+
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-ChrzzIRt.js";
|
|
4
|
+
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-DlGoY_db.js";
|
|
5
|
+
export { AUTO_PAGING_TO_ARRAY_MAX, type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type AppInfo, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventResource, type EventResourceKind, type EventSeverity, type EventType, type 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 RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
|
package/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_CalmLensError = require("./CalmLensError-DPHJaVjX.js");
|
|
3
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
3
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-BVBkcgSU.js");
|
|
4
4
|
exports.AUTO_PAGING_TO_ARRAY_MAX = require_ModerationContextLimits.AUTO_PAGING_TO_ARRAY_MAX;
|
|
5
5
|
exports.CALMLENS_ERROR_CODES = require_CalmLensError.CALMLENS_ERROR_CODES;
|
|
6
6
|
exports.CDN_RESOURCES = require_ModerationContextLimits.CDN_RESOURCES;
|
package/cjs/react-native.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getAssetAspectRatio, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as createUploadController } from "./Core-
|
|
2
|
-
import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-
|
|
1
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, c as ICON_ATTRIBUTES, d as AssetDisplayOptions, et as getAssetAspectRatio, f as AssetEventHandlers, g as CalmLensMessages, h as UploaderProps, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, m as UploaderDisplayOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, v as UploadItemView, w as getDropzoneHint, x as describeUploader, y as UploaderView, z as createUploadController } from "./Core-DL531ZPG.js";
|
|
2
|
+
import { i as useCalmLensUpload, n as CalmLensProviderProps, r as UseCalmLensUploadResult, t as CalmLensProvider } from "./ReactUpload-BoS0lr7U.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { StyleProp, ViewStyle } from "react-native";
|
|
5
5
|
/** What the uploader asks your picker for. */
|
package/cjs/react-native.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
3
|
-
const require_Core = require("./Core-
|
|
4
|
-
const require_UploadController = require("./UploadController-
|
|
2
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-BVBkcgSU.js");
|
|
3
|
+
const require_Core = require("./Core-eDiPpil9.js");
|
|
4
|
+
const require_UploadController = require("./UploadController-BElzwMic.js");
|
|
5
5
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
6
|
-
const require_ReactUpload = require("./ReactUpload-
|
|
6
|
+
const require_ReactUpload = require("./ReactUpload-DAPAzAwY.js");
|
|
7
7
|
let react = require("react");
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let react_native = require("react-native");
|
package/cjs/react.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-
|
|
2
|
-
import { n as CalmLensProviderProps, t as CalmLensProvider } from "./ReactUpload-
|
|
3
|
-
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-
|
|
4
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-DL531ZPG.js";
|
|
2
|
+
import { n as CalmLensProviderProps, t as CalmLensProvider } from "./ReactUpload-BoS0lr7U.js";
|
|
3
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, o as UseCalmLensUploadResult, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-DS6KT6o_.js";
|
|
4
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-DpZOLeVs.js";
|
|
5
5
|
import { CSSProperties, HTMLAttributes, ReactNode } from "react";
|
|
6
6
|
type ElementProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
7
7
|
/** Leaves out the stylesheet the viewers render, so you can style the `calmlens-*` classes. */
|
package/cjs/react.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_ui = require("./ui-
|
|
4
|
-
const require_Core = require("./Core-
|
|
5
|
-
const require_UploadController = require("./UploadController-
|
|
3
|
+
const require_ui = require("./ui-COjb2Hx6.js");
|
|
4
|
+
const require_Core = require("./Core-eDiPpil9.js");
|
|
5
|
+
const require_UploadController = require("./UploadController-BElzwMic.js");
|
|
6
6
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
7
|
-
const require_ReactUpload = require("./ReactUpload-
|
|
8
|
-
const require_BrowserUpload = require("./BrowserUpload-
|
|
7
|
+
const require_ReactUpload = require("./ReactUpload-DAPAzAwY.js");
|
|
8
|
+
const require_BrowserUpload = require("./BrowserUpload-BNeTp6eF.js");
|
|
9
9
|
let react = require("react");
|
|
10
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
11
|
const OPTION_NAMES = /* @__PURE__ */ new Set([
|
package/cjs/server.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { $ as FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as
|
|
3
|
-
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-
|
|
4
|
-
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-
|
|
5
|
-
import { t as CalmLensServerClient } from "./CalmLensServerClient-
|
|
1
|
+
import { a as ClassificationQualifierResults, c as HashList, d as ModerationContext, f as MODERATION_CONTEXT_USED_CHARACTERS, h as selectModerationContextItems, i as ClassificationNotEvaluatedReason, l as HashListEntry, m as ModerationContextItem, n as ClassificationCategory, o as Likelihood, p as MODERATION_CONTEXT_USED_ITEMS, r as ClassificationCategoryReport, s as ModerationQualifier, t as ClassificationCategories, u as PolicyAction } from "./Classification-DbXUPSvH-C0o2t4mg.js";
|
|
2
|
+
import { $ as FolderPage, $t as UploadPresetSubmitAssetOptions, A as CdnAssetLocation, An as ProcessingFeatureId, At as ResetPolicyOptions, B as CreateHashListOptions, Bn as AssetInfo, Bt as StreamingFeatureOptions, C as AssetUploadStatus, Cn as ProjectSettingsResource, Ct as MultipartUploadPartOptions, D as BatchAssetsResponse, Dn as BoundingBox, Dt as RequestAssetReviewOptions, E as BatchAssetsOptions, En as AgeRange, Et as RemoveAssetContentOptions, F as CdnTransform, Fn as CursorPage, Ft as SetPolicyAutomaticUpdatesOptions, G as DeleteAssetOptions, Gn as AssetRenderedKind, Gt as UpdateLensOptions, H as CreateMultipartUploadPartOptions, Hn as AssetHlsRendition, Ht as UpdateAssetOptions, I as ClassifyTextOptions, In as LensType, It as SignAssetUrlOptions, J as EnsureLensesOptions, Jn as ExtractedText, Jt as UpgradePolicyOptions, K as DeleteMetadataFieldOptions, Kn as AssetSafetyHold, Kt as UpdatePolicyOptions, L as ClientRequestDefaults, Ln as AssetSearchMatchField, Lt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Mn as ProcessingFeatureStage, Mt as RetrieveAssetOptions, N as CdnResource, Nn as ProcessingFeatures, Nt as RetryAssetOptions, O as CalmLensAppClientOptions, On as DetectedFace, Ot as RequestAttempt, P as CdnServeOptions, Pn as Policy, Pt as SearchAssetsOptions, Q as FolderIdOptions, Qt as UploadPresetPage, R as ConnectionOptions, Rn as AssetSearchQuery, Rt as SignedAssetUrl, S as AssetUpload, Sn as MetadataFieldsResource, St as MultipartUploadOptions, T as AssignPolicyOptions, Tn as UploadPreset, Tt as PolicyPage, U as CreatePolicyOptions, Un as AssetPreview, Ut as UpdateFolderOptions, V as CreateLensOptions, Vn as AssetHls, Vt as SubmitAssetOptions, W as DecideAssetOptions, Wn as AssetRendered, Wt as UpdateHashListOptions, X as EnsureUploadPresetsOptions, Xn as MetadataItem, Xt as UploadPresetDefinition, Y as EnsureMetadataFieldsOptions, Yn as FileMetadata, Yt as UploadAssetPartOptions, Z as EnsureUploadPresetsResponse, Zn as ProcessingOptions, Zt as UploadPresetIdOptions, _ as AssetPage, _n as EventResourceKind, _t as ListLensesOptions, a as AssetChecksums, an as WebhookPayloadInput, at as IdempotencyOptions, b as AssetTimelinePage, bt as MoveAssetOptions, c as AssetClassificationFailureReason, cn as AssetTimelineSegment, ct as LensIdOptions, d as AssetContentOptions, dn as EventResource, dt as ListAssetTimelineOptions, en as UploadedAsset, et as GetAssetInfoOptions, f as AssetContentRemovalReason, fn as TypedEvent, ft as ListAssetsOptions, g as AssetModerationStatus, gn as EventFacts, gt as ListHashListsOptions, h as AssetModerationDecision, hn as EventFactValues, ht as ListHashListEntriesOptions, i as AssetAvailability, in as WebhookHeadersInput, it as HashListPage, j as CdnAssetReference, jn as ProcessingFeatureResults, jt as RetrieveAssetByExternalIdOptions, k as CalmLensServerClientOptions, kn as DetectedPerson, kt as RequestOptions, l as AssetClassificationStatus, ln as GetEventsResponse, lt as LensPage, m as AssetModeration, mn as EventFact, mt as ListFoldersOptions, n as AppInfo, nn as ViewerClaims, nt as HashListEntryPage, o as AssetChildrenPage, on as AssetBatchOperation, ot as ImageTransformOptions, p as AssetContentStatus, pn as EventCategory, pt as ListEventsOptions, q as EnsureLensOptions, qn as AssetSafetyHoldReason, qt as UpdateProjectSettingsOptions, r as Asset, rn as WaitForAssetDecisionOptions, rt as HashListIdOptions, s as AssetClassification, sn as AssetReviewRequest, st as Lens, t as AddHashListEntryOptions, tn as VerifyWebhookSignatureOptions, tt as HashListEntryIdOptions, u as AssetContent, ut as ListAssetChildrenOptions, v as AssetSearchResponse, vn as EventSeverity, vt as ListPoliciesOptions, w as AssetVisibility, wn as PublicProjectSettings, wt as PolicyIdOptions, x as AssetType, xn as Folder, xt as MoveFolderOptions, y as AssetSearchResult, yn as EventType, yt as ListUploadPresetsOptions, z as CreateFolderOptions, zt as SignedUploadToken } from "./CalmLensTypes-fAgF0_lq.js";
|
|
3
|
+
import { i as getAssetInfo, n as DEFAULT_CDN_BASE_URL, r as CDN_RESOURCES, t as SDK_VERSION } from "./index-ChrzzIRt.js";
|
|
4
|
+
import { A as CalmLensRateLimitError, C as CalmLensErrorKind, D as CalmLensNotFoundError, E as CalmLensInvalidResponseError, F as SdkErrorCode, I as ApiErrorCode, M as CalmLensTimeoutError, N as CalmLensUnprocessableEntityError, O as CalmLensPayloadTooLargeError, P as CalmLensWebhookVerificationError, S as CalmLensErrorDetails, T as CalmLensInvalidArgumentError, _ as CalmLensConfigurationError, a as AUTO_PAGING_TO_ARRAY_MAX, b as CalmLensError, c as CalmLensLastResponse, d as ListPromise, f as CALMLENS_ERROR_CODES, g as CalmLensCancelledError, h as CalmLensBadRequestError, i as ServedAssetInfo, j as CalmLensServerError, k as CalmLensPermissionDeniedError, l as CalmLensResponse, m as CalmLensAuthenticationError, o as AutoPaging, p as CalmLensApiError, r as CdnResponse, s as AutoPagingToArrayOptions, t as ReceivedWebhookEventPayload, u as ListPage, v as CalmLensConflictError, w as CalmLensErrorOptions, x as CalmLensErrorCode, y as CalmLensConnectionError } from "./WebhookPayload-DlGoY_db.js";
|
|
5
|
+
import { t as CalmLensServerClient } from "./CalmLensServerClient-BJl2Hsxr.js";
|
|
6
6
|
export declare const WEBHOOK_DELIVERY_HEADER = "x-calmlens-delivery";
|
|
7
7
|
export declare const WEBHOOK_TIMESTAMP_HEADER = "x-calmlens-timestamp";
|
|
8
8
|
export declare const WEBHOOK_SIGNATURE_HEADER = "x-calmlens-signature";
|
|
@@ -64,11 +64,11 @@ export declare const getEventFacts: <TEvent extends {
|
|
|
64
64
|
*/
|
|
65
65
|
export declare const isTestWebhookEvent: (event: Pick<ReceivedWebhookEventPayload, "facts">) => boolean;
|
|
66
66
|
/**
|
|
67
|
-
* Whether to apply `event` after `lastSequence`, the highest `
|
|
68
|
-
* its
|
|
69
|
-
*
|
|
70
|
-
* earlier one returns `false`. Events
|
|
71
|
-
*
|
|
67
|
+
* Whether to apply `event` after `lastSequence`, the highest `resource.sequence` you have applied
|
|
68
|
+
* for its resource (`null` or `undefined` when none). Deliveries can arrive out of order: an event
|
|
69
|
+
* about a resource is newer only with a higher sequence, so a retried or repeated delivery of an
|
|
70
|
+
* earlier one returns `false`. Events about no resource have no sequence and are always new.
|
|
71
|
+
* Store the event's `resource.sequence` per `resource.id` once you have applied it.
|
|
72
72
|
*/
|
|
73
|
-
export declare const
|
|
74
|
-
export { AUTO_PAGING_TO_ARRAY_MAX, type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type AppInfo, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, CalmLensServerClient, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type 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 RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
|
|
73
|
+
export declare const isNewerEvent: (event: Pick<ReceivedWebhookEventPayload, "resource">, lastSequence: number | null | undefined) => boolean;
|
|
74
|
+
export { AUTO_PAGING_TO_ARRAY_MAX, type AddHashListEntryOptions, type AgeRange, type ApiErrorCode, type AppInfo, type Asset, type AssetAvailability, type AssetBatchOperation, type AssetChecksums, type AssetChildrenPage, type AssetClassification, type AssetClassificationFailureReason, type AssetClassificationStatus, type AssetContent, type AssetContentOptions, type AssetContentRemovalReason, type AssetContentStatus, type AssetHls, type AssetHlsRendition, type AssetInfo, type AssetModeration, type AssetModerationDecision, type AssetModerationStatus, type AssetPage, type AssetPreview, type AssetRendered, type AssetRenderedKind, type AssetReviewRequest, type AssetSafetyHold, type AssetSafetyHoldReason, type AssetSearchMatchField, type AssetSearchQuery, type AssetSearchResponse, type AssetSearchResult, type AssetTimelinePage, type AssetTimelineSegment, type AssetType, type AssetUpload, type AssetUploadStatus, type AssetVisibility, type AssignPolicyOptions, type AutoPaging, type AutoPagingToArrayOptions, type BatchAssetsOptions, type BatchAssetsResponse, type BoundingBox, CALMLENS_ERROR_CODES, CDN_RESOURCES, CalmLensApiError, type CalmLensAppClientOptions, CalmLensAuthenticationError, CalmLensBadRequestError, CalmLensCancelledError, CalmLensConfigurationError, CalmLensConflictError, CalmLensConnectionError, CalmLensError, type CalmLensErrorCode, type CalmLensErrorDetails, type CalmLensErrorKind, type CalmLensErrorOptions, CalmLensInvalidArgumentError, CalmLensInvalidResponseError, type CalmLensLastResponse, CalmLensNotFoundError, CalmLensPayloadTooLargeError, CalmLensPermissionDeniedError, CalmLensRateLimitError, type CalmLensResponse, CalmLensServerClient, type CalmLensServerClientOptions, CalmLensServerError, CalmLensTimeoutError, CalmLensUnprocessableEntityError, CalmLensWebhookVerificationError, type CdnAssetLocation, type CdnAssetReference, type CdnAssetUrlOptions, type CdnResource, type CdnResponse, type CdnServeOptions, type CdnTransform, type ClassificationCategories, type ClassificationCategory, type ClassificationCategoryReport, type ClassificationNotEvaluatedReason, type ClassificationQualifierResults, type ClassifyTextOptions, type ClientRequestDefaults, type ConnectionOptions, type CreateFolderOptions, type CreateHashListOptions, type CreateLensOptions, type CreateMultipartUploadPartOptions, type CreatePolicyOptions, type CursorPage, DEFAULT_CDN_BASE_URL, type DecideAssetOptions, type DeleteAssetOptions, type DeleteMetadataFieldOptions, type DetectedFace, type DetectedPerson, type EnsureLensOptions, type EnsureLensesOptions, type EnsureMetadataFieldsOptions, type EnsureUploadPresetsOptions, type EnsureUploadPresetsResponse, type EventCategory, type EventFact, type EventFactValues, type EventFacts, type EventResource, type EventResourceKind, type EventSeverity, type EventType, type 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 RequestAssetReviewOptions, type RequestAttempt, type RequestOptions, type ResetPolicyOptions, type RetrieveAssetByExternalIdOptions, type RetrieveAssetOptions, type RetryAssetOptions, SDK_VERSION, type SdkErrorCode, type SearchAssetsOptions, type ServedAssetInfo, type SetPolicyAutomaticUpdatesOptions, type SignAssetUrlOptions, type SignUploadTokenOptions, type SignedAssetUrl, type SignedUploadToken, type StreamingFeatureOptions, type SubmitAssetOptions, type TypedEvent, type UpdateAssetOptions, type UpdateFolderOptions, type UpdateHashListOptions, type UpdateLensOptions, type UpdatePolicyOptions, type UpdateProjectSettingsOptions, type UpgradePolicyOptions, type UploadAssetPartOptions, type UploadPreset, type UploadPresetDefinition, type UploadPresetIdOptions, type UploadPresetPage, type UploadPresetSubmitAssetOptions, type UploadedAsset, type VerifyWebhookSignatureOptions, type ViewerClaims, type WaitForAssetDecisionOptions, type ReceivedWebhookEventPayload as WebhookEventPayload, type WebhookHeadersInput, type WebhookPayloadInput, getAssetInfo, selectModerationContextItems };
|
package/cjs/server.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_CalmLensError = require("./CalmLensError-DPHJaVjX.js");
|
|
3
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
3
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-BVBkcgSU.js");
|
|
4
4
|
require("./index.js");
|
|
5
|
-
const require_CalmLensServerClient = require("./CalmLensServerClient-
|
|
5
|
+
const require_CalmLensServerClient = require("./CalmLensServerClient-KsXM77rO.js");
|
|
6
6
|
exports.AUTO_PAGING_TO_ARRAY_MAX = require_ModerationContextLimits.AUTO_PAGING_TO_ARRAY_MAX;
|
|
7
7
|
exports.CALMLENS_ERROR_CODES = require_CalmLensError.CALMLENS_ERROR_CODES;
|
|
8
8
|
exports.CDN_RESOURCES = require_ModerationContextLimits.CDN_RESOURCES;
|
|
@@ -36,7 +36,7 @@ exports.WEBHOOK_TIMESTAMP_HEADER = require_CalmLensServerClient.WEBHOOK_TIMESTAM
|
|
|
36
36
|
exports.getAssetInfo = require_ModerationContextLimits.getAssetInfo;
|
|
37
37
|
exports.getEventFact = require_CalmLensServerClient.getEventFact;
|
|
38
38
|
exports.getEventFacts = require_CalmLensServerClient.getEventFacts;
|
|
39
|
-
exports.
|
|
39
|
+
exports.isNewerEvent = require_CalmLensServerClient.isNewerEvent;
|
|
40
40
|
exports.isTestWebhookEvent = require_CalmLensServerClient.isTestWebhookEvent;
|
|
41
41
|
exports.parseWebhookEvent = require_CalmLensServerClient.parseWebhookEvent;
|
|
42
42
|
exports.selectModerationContextItems = require_ModerationContextLimits.selectModerationContextItems;
|
package/cjs/test-inputs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as TEST_FACE_AGE_PRESETS, c as TestDetections, d as detectTestTrigger, f as getImageTestCategories, i as TEST_FACE_AGE_MAX, l as TestInput, m as testInputForSignal, n as TEST_DETECTIONS_MAX, o as TEST_INPUT_KEY_PATTERN, p as paintTestImage$1, r as TEST_DETECTION_BOX_MAX, s as TEST_INPUT_PRESETS, t as ClassificationTestSignal, u as detectTestImage } from "./TestTriggers-
|
|
1
|
+
import { a as TEST_FACE_AGE_PRESETS, c as TestDetections, d as detectTestTrigger, f as getImageTestCategories, i as TEST_FACE_AGE_MAX, l as TestInput, m as testInputForSignal, n as TEST_DETECTIONS_MAX, o as TEST_INPUT_KEY_PATTERN, p as paintTestImage$1, r as TEST_DETECTION_BOX_MAX, s as TEST_INPUT_PRESETS, t as ClassificationTestSignal, u as detectTestImage } from "./TestTriggers-CLjF01NU.js";
|
|
2
2
|
/** A text code for `scenario`, signed with the project's test input key. */
|
|
3
3
|
export declare const generateTestTextCode: (scenario: TestInput | ClassificationTestSignal, key: string) => Promise<string>;
|
|
4
4
|
/** An RGBA test image for `scenario`, signed with the project's test input key. */
|
package/cjs/testing.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
3
|
-
import { I as ApiErrorCode, n as WebhookEventPayload } from "./WebhookPayload-
|
|
4
|
-
import { t as CalmLensServerClient } from "./CalmLensServerClient-
|
|
5
|
-
import { t as ClassificationTestSignal } from "./TestTriggers-
|
|
1
|
+
import { Lt as SignUploadTokenOptions, O as CalmLensAppClientOptions, Xt as UploadPresetDefinition, bn as PermissionGrant, fn as TypedEvent, k as CalmLensServerClientOptions, m as AssetModeration, r as Asset, xn as Folder, zn as AssetBinaryPayloadInput, zt as SignedUploadToken } from "./CalmLensTypes-fAgF0_lq.js";
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-B4vzxEzg.js";
|
|
3
|
+
import { I as ApiErrorCode, n as WebhookEventPayload } from "./WebhookPayload-DlGoY_db.js";
|
|
4
|
+
import { t as CalmLensServerClient } from "./CalmLensServerClient-BJl2Hsxr.js";
|
|
5
|
+
import { t as ClassificationTestSignal } from "./TestTriggers-CLjF01NU.js";
|
|
6
6
|
import "zod";
|
|
7
7
|
/**
|
|
8
8
|
* Signs a single-use upload token with `apiKey`, locally. `CalmLensServerClient` and
|
|
@@ -300,10 +300,14 @@ interface MockServedUrl {
|
|
|
300
300
|
/** The `Content-Type` the URL answers with, such as `image/png`. */
|
|
301
301
|
type: string;
|
|
302
302
|
}
|
|
303
|
-
/**
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
/**
|
|
304
|
+
* An event to add to the mock feed; omitted fields get defaults. With `assetId` it is about that
|
|
305
|
+
* asset, and its `resource` takes the asset's next number like the API's; without, it is about no
|
|
306
|
+
* resource.
|
|
307
|
+
*/
|
|
308
|
+
type MockEventInput = Partial<Omit<TypedEvent, "type" | "resource">> & {
|
|
306
309
|
type: TypedEvent["type"];
|
|
310
|
+
assetId?: string | null;
|
|
307
311
|
};
|
|
308
312
|
/**
|
|
309
313
|
* The upload preset settings a `MockCalmLensAppClient` applies, as the API would, with the same
|
package/cjs/testing.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_CalmLensTestInputArguments = require("./CalmLensTestInputArguments-BXDBAOg_.js");
|
|
3
3
|
const require_CalmLensError = require("./CalmLensError-DPHJaVjX.js");
|
|
4
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
5
|
-
const require_CalmLensServerClient = require("./CalmLensServerClient-
|
|
6
|
-
const require_CalmLensConnection = require("./CalmLensConnection-
|
|
4
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-BVBkcgSU.js");
|
|
5
|
+
const require_CalmLensServerClient = require("./CalmLensServerClient-KsXM77rO.js");
|
|
6
|
+
const require_CalmLensConnection = require("./CalmLensConnection-og0jh-Fw.js");
|
|
7
7
|
const require_CryptoUtils_BLCa_oZe = require("./CryptoUtils-BLCa-oZe-leCkr1ko.js");
|
|
8
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
9
|
-
const require_UploadController = require("./UploadController-
|
|
8
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-ClqGwUbl.js");
|
|
9
|
+
const require_UploadController = require("./UploadController-BElzwMic.js");
|
|
10
10
|
let zod = require("zod");
|
|
11
11
|
let zod$1 = require_CalmLensTestInputArguments.__toESM(zod, 1);
|
|
12
12
|
zod = require_CalmLensTestInputArguments.__toESM(zod);
|
|
@@ -9845,7 +9845,7 @@ var MockCalmLensApi = class {
|
|
|
9845
9845
|
this.waitedMs = 0;
|
|
9846
9846
|
this.publishAssets = (_key, value) => isStoredAsset(value) ? {
|
|
9847
9847
|
...value,
|
|
9848
|
-
|
|
9848
|
+
sequence: this.eventSequenceOf(value.id)
|
|
9849
9849
|
} : value;
|
|
9850
9850
|
this.policies = /* @__PURE__ */ new Map();
|
|
9851
9851
|
this.hashLists = /* @__PURE__ */ new Map();
|
|
@@ -9915,32 +9915,35 @@ var MockCalmLensApi = class {
|
|
|
9915
9915
|
return this.pushEvent(input);
|
|
9916
9916
|
}
|
|
9917
9917
|
/** Adds an event to the feed, filling the fields the API always sets. */
|
|
9918
|
-
pushEvent(input) {
|
|
9918
|
+
pushEvent({ assetId, ...input }) {
|
|
9919
9919
|
const now = this.now();
|
|
9920
|
+
const sequence = assetId ? (this.assetEventSequences.get(assetId) ?? 0) + 1 : null;
|
|
9921
|
+
if (assetId && sequence !== null) this.assetEventSequences.set(assetId, sequence);
|
|
9920
9922
|
const event = {
|
|
9921
9923
|
id: this.createId("evt"),
|
|
9922
9924
|
projectId: this.projectId,
|
|
9923
9925
|
severity: "low",
|
|
9924
9926
|
title: input.type,
|
|
9925
9927
|
description: null,
|
|
9926
|
-
assetId: null,
|
|
9927
9928
|
actor: MOCK_API_KEY_ACTOR,
|
|
9928
9929
|
facts: [],
|
|
9929
9930
|
createdAt: now,
|
|
9930
|
-
...input
|
|
9931
|
+
...input,
|
|
9932
|
+
resource: assetId && sequence !== null ? {
|
|
9933
|
+
kind: "asset",
|
|
9934
|
+
id: assetId,
|
|
9935
|
+
sequence
|
|
9936
|
+
} : null
|
|
9931
9937
|
};
|
|
9932
|
-
const sequence = event.assetId ? (this.assetEventSequences.get(event.assetId) ?? 0) + 1 : null;
|
|
9933
|
-
if (event.assetId && sequence !== null) this.assetEventSequences.set(event.assetId, sequence);
|
|
9934
|
-
event.assetSequence = sequence;
|
|
9935
9938
|
this.eventFeed.push(event);
|
|
9936
9939
|
return event;
|
|
9937
9940
|
}
|
|
9938
|
-
/** The `
|
|
9941
|
+
/** The `resource.sequence` of the latest event about an asset, or 0 before its first. */
|
|
9939
9942
|
eventSequenceOf(assetId) {
|
|
9940
9943
|
return this.assetEventSequences.get(assetId) ?? 0;
|
|
9941
9944
|
}
|
|
9942
9945
|
/**
|
|
9943
|
-
* A copy of a stored asset as the API returns it, with its `
|
|
9946
|
+
* A copy of a stored asset as the API returns it, with its `sequence` as it is now. The
|
|
9944
9947
|
* mock keeps each asset's sequence itself rather than in `databaseStorage`, whose
|
|
9945
9948
|
* implementations needn't know about it, so every asset leaving the mock passes through here
|
|
9946
9949
|
* or `publishAssets`.
|
|
@@ -9948,7 +9951,7 @@ var MockCalmLensApi = class {
|
|
|
9948
9951
|
toPublished(asset) {
|
|
9949
9952
|
return {
|
|
9950
9953
|
...structuredClone(asset),
|
|
9951
|
-
|
|
9954
|
+
sequence: this.eventSequenceOf(asset.id)
|
|
9952
9955
|
};
|
|
9953
9956
|
}
|
|
9954
9957
|
/** Applies a reviewer's decision to a stored asset (see `MockCalmLensServerClient.decide`). */
|
|
@@ -11065,7 +11068,7 @@ var MockCalmLensApi = class {
|
|
|
11065
11068
|
context: contextItems.length ? { items: contextItems } : null,
|
|
11066
11069
|
tags: fields.tags ?? [],
|
|
11067
11070
|
visibility: fields.visibility ?? "private",
|
|
11068
|
-
|
|
11071
|
+
sequence: 0,
|
|
11069
11072
|
content: {
|
|
11070
11073
|
status: keepContent ? "stored" : "temporary",
|
|
11071
11074
|
removalReason: null,
|
|
@@ -11648,7 +11651,7 @@ var MockCalmLensApi = class {
|
|
|
11648
11651
|
const assetId = query.get("assetId");
|
|
11649
11652
|
if (assetId !== null && !isId(assetId, "asset")) throw invalidField("validation/invalid-format", "assetId");
|
|
11650
11653
|
const filter = btoa(JSON.stringify([[...new Set(types)].sort(), assetId]));
|
|
11651
|
-
const matches = (event) => (!types.length || types.includes(event.type)) && (assetId === null || event.
|
|
11654
|
+
const matches = (event) => (!types.length || types.includes(event.type)) && (assetId === null || event.resource?.id === assetId);
|
|
11652
11655
|
const cursor = query.get("cursor");
|
|
11653
11656
|
if (!cursor) return {
|
|
11654
11657
|
items: [],
|
|
@@ -12514,8 +12517,7 @@ const toWebhookEventPayload = (event) => ({
|
|
|
12514
12517
|
severity: event.severity,
|
|
12515
12518
|
title: event.title,
|
|
12516
12519
|
description: event.description ?? null,
|
|
12517
|
-
|
|
12518
|
-
assetSequence: event.assetSequence ?? null,
|
|
12520
|
+
resource: event.resource ?? null,
|
|
12519
12521
|
facts: event.facts,
|
|
12520
12522
|
createdAt: event.createdAt
|
|
12521
12523
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ModerationContextLimits = require("./ModerationContextLimits-
|
|
2
|
-
require("./Core-
|
|
1
|
+
const require_ModerationContextLimits = require("./ModerationContextLimits-BVBkcgSU.js");
|
|
2
|
+
require("./Core-eDiPpil9.js");
|
|
3
3
|
// src/ui/viewers/PdfLoader.ts
|
|
4
4
|
let loading;
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./CalmLensTypes-
|
|
2
|
-
import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-
|
|
1
|
+
import "./CalmLensTypes-fAgF0_lq.js";
|
|
2
|
+
import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-DL531ZPG.js";
|
|
3
3
|
import "pdfjs-dist";
|
|
4
4
|
/** A viewer mounted into an element, which it owns the children of. */
|
|
5
5
|
interface AssetViewer<O extends ViewerOptions = ViewerOptions> {
|
package/cjs/ui.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-
|
|
2
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-DL531ZPG.js";
|
|
2
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-DpZOLeVs.js";
|
|
3
3
|
export { ASSET_FILE_ICON_SIZE, ASSET_VIEWERS, type AssetDisplay, type AssetDisplayOptions, type AssetDocumentOptions, type AssetEventHandlers, type AssetImageOptions, type AssetImageSource, type AssetOptions, type AssetProps, AssetSession, type AssetSessionState, type AssetSpreadsheetOptions, type AssetVideoOptions, type AssetView, type AssetViewer, type AssetViewerKind, AssetViewerMount, AssetViewerName, AssetViewerOptionsByKind, CALMLENS_STYLES, CALMLENS_THEME, type CalmLensMessages, type CalmLensProvidedOptions, type CalmLensTheme, type CalmLensUpload, type CustomUploadContext, type CustomUploadResult, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, type DocumentViewerOptions, ICONS, ICON_ATTRIBUTES, INSTANT_LOAD_MS, type IconName, type MediaPlayback, MediaStreamPlayer, type MountedViewerKind, type PdfAssetOptions, type ProgressFetchOptions, type SpreadsheetCell, type SpreadsheetRow, type SpreadsheetSheet, type SpreadsheetViewerOptions, type TextViewerOptions, type UploadClient, UploadController, type UploadControllerOptions, type UploadFile, type UploadItem, type UploadItemView, type UploadSnapshot, type UploadStage, type UploaderDisplayOptions, type UploaderProps, type UploaderView, VIEWER_STYLES, type ViewerAsset, type ViewerMessages, type ViewerOptions, type ViewerState, type ViewerTextOptions, createDocumentViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isImageReady, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex, withProvidedOptions };
|