calmlens 0.32.0 → 0.33.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 +8 -4
- package/cjs/{BrowserUpload-CbbFE-2v.js → BrowserUpload-Al3ER3ki.js} +1 -1
- package/{esm/BrowserUpload-Dx2l9wC0.d.ts → cjs/BrowserUpload-CURmX-DR.d.ts} +2 -2
- package/{esm/CalmLensAppClient-v1Ho7mJQ.d.ts → cjs/CalmLensAppClient-DII9cdTD.d.ts} +1 -1
- package/cjs/{CalmLensAppClient-DOYOJ70t.js → CalmLensAppClient-DWIy2yPF.js} +2 -2
- package/cjs/{CalmLensCdn-xQMrClXN.js → CalmLensCdn-6ZqvG8-v.js} +1 -1
- package/cjs/{CalmLensConnection-DbsCA8xF.js → CalmLensConnection-Qp9ucGHO.js} +1 -1
- package/cjs/{CalmLensServerClient-CoiZN7Fr.d.ts → CalmLensServerClient-CPwGfFR-.d.ts} +3 -3
- package/cjs/{CalmLensServerClient-DtqFQgUn.js → CalmLensServerClient-DRLyvnA1.js} +9 -6
- package/cjs/{CalmLensTypes-DjuOXp3b.d.ts → CalmLensTypes-DF7wh23M.d.ts} +16504 -16468
- package/cjs/{Core-DaCkaDkb.d.ts → Core-Dnm9bJPB.d.ts} +2 -2
- package/cjs/{Core-BtFJ2xfb.js → Core-rYZedJhi.js} +2 -2
- package/{esm/ReactUpload-DMtaeFN2.d.ts → cjs/ReactUpload-B7wrDPk8.d.ts} +1 -1
- package/cjs/{ReactUpload-CRtUXzMP.js → ReactUpload-Bj6-CciJ.js} +1 -1
- package/cjs/{UploadController-tKqKphf3.js → UploadController-DCr7oN6L.js} +1 -1
- package/cjs/{WebhookPayload-C3F9j4p7.d.ts → WebhookPayload-CUMsersa.d.ts} +1 -1
- package/cjs/app.d.ts +5 -5
- package/cjs/app.js +2 -2
- package/cjs/elements.d.ts +4 -4
- package/cjs/elements.js +4 -4
- package/cjs/{index-xF6Neq8A.d.ts → index-B511mjeS.d.ts} +2 -2
- package/cjs/index.d.ts +4 -4
- package/cjs/index.js +1 -1
- package/cjs/react-native.d.ts +2 -2
- package/cjs/react-native.js +4 -4
- package/cjs/react.d.ts +4 -4
- package/cjs/react.js +5 -5
- package/cjs/server.d.ts +5 -5
- package/cjs/server.js +2 -2
- package/cjs/testing.d.ts +4 -4
- package/cjs/testing.js +14 -8
- package/cjs/{ui-C_AhYdIA.d.ts → ui-B83Pqjom.d.ts} +2 -2
- package/cjs/{ui-B5tgw_En.js → ui-BS9eFCI7.js} +2 -2
- package/cjs/ui.d.ts +2 -2
- package/cjs/ui.js +3 -3
- package/cjs/vue.d.ts +5 -5
- package/cjs/vue.js +4 -4
- package/{cjs/BrowserUpload-Dx2l9wC0.d.ts → esm/BrowserUpload-CURmX-DR.d.ts} +2 -2
- package/esm/{BrowserUpload-Dizcs8rx.js → BrowserUpload-DOcZaSWT.js} +1 -1
- package/esm/{CalmLensAppClient-C0Ud7eYa.js → CalmLensAppClient-B7IkEK2D.js} +2 -2
- package/{cjs/CalmLensAppClient-v1Ho7mJQ.d.ts → esm/CalmLensAppClient-DII9cdTD.d.ts} +1 -1
- package/esm/{CalmLensCdn--hZgorld.js → CalmLensCdn-DpJ7kIqG.js} +1 -1
- package/esm/{CalmLensConnection-dz5Kl3uC.js → CalmLensConnection-BYUqUitO.js} +1 -1
- package/esm/{CalmLensServerClient-CoiZN7Fr.d.ts → CalmLensServerClient-CPwGfFR-.d.ts} +3 -3
- package/esm/{CalmLensServerClient-BBPwU8mm.js → CalmLensServerClient-DpkreSH6.js} +9 -6
- package/esm/{CalmLensTypes-DjuOXp3b.d.ts → CalmLensTypes-DF7wh23M.d.ts} +16504 -16468
- package/esm/{Core-Dti4LlA-.js → Core-DGF84gwM.js} +2 -2
- package/esm/{Core-DaCkaDkb.d.ts → Core-Dnm9bJPB.d.ts} +2 -2
- package/{cjs/ReactUpload-DMtaeFN2.d.ts → esm/ReactUpload-B7wrDPk8.d.ts} +1 -1
- package/esm/{ReactUpload-Cmz063Os.js → ReactUpload-rDvF5arL.js} +1 -1
- package/esm/{UploadController-D3um1cq9.js → UploadController-cXocXbjd.js} +1 -1
- package/esm/{WebhookPayload-C3F9j4p7.d.ts → WebhookPayload-CUMsersa.d.ts} +1 -1
- package/esm/app.d.ts +5 -5
- package/esm/app.js +2 -2
- package/esm/elements.d.ts +4 -4
- package/esm/elements.js +4 -4
- package/esm/{index-xF6Neq8A.d.ts → index-B511mjeS.d.ts} +2 -2
- package/esm/index.d.ts +4 -4
- package/esm/index.js +1 -1
- package/esm/react-native.d.ts +2 -2
- package/esm/react-native.js +4 -4
- package/esm/react.d.ts +4 -4
- package/esm/react.js +5 -5
- package/esm/server.d.ts +5 -5
- package/esm/server.js +2 -2
- package/esm/testing.d.ts +4 -4
- package/esm/testing.js +14 -8
- package/esm/{ui-C_AhYdIA.d.ts → ui-B83Pqjom.d.ts} +2 -2
- package/esm/{ui-B7Z6FH5F.js → ui-C0wgePYT.js} +2 -2
- package/esm/ui.d.ts +2 -2
- package/esm/ui.js +3 -3
- package/esm/vue.d.ts +5 -5
- package/esm/vue.js +4 -4
- package/package.json +1 -1
package/bin/calmlens.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { readFile as readFile2 } from "node:fs/promises";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
// package.json
|
|
6
|
-
var version = "0.
|
|
6
|
+
var version = "0.33.0";
|
|
7
7
|
|
|
8
8
|
// src/contract/ModerationCategories-CHFRoeWV.js
|
|
9
9
|
var CLASSIFICATION_CATEGORIES = [
|
|
@@ -2972,9 +2972,13 @@ class CalmLensServerClient {
|
|
|
2972
2972
|
}
|
|
2973
2973
|
get events() {
|
|
2974
2974
|
return {
|
|
2975
|
-
list: (options = {}, requestOptions) => this.#paginate("events.list", options, requestOptions, ({ types, ...query }) =>
|
|
2976
|
-
|
|
2977
|
-
|
|
2975
|
+
list: (options = {}, requestOptions) => this.#paginate("events.list", options, requestOptions, ({ types, ...query }) => {
|
|
2976
|
+
if (types != null && (!Array.isArray(types) || types.some((type) => typeof type !== "string")))
|
|
2977
|
+
throw invalidArgument("types must be an array of event types");
|
|
2978
|
+
return this.#send("events.list", requestOptions, "GET", `${this.#projectPath}/events`, {
|
|
2979
|
+
query: { ...query, types: types?.length ? types.join(",") : undefined }
|
|
2980
|
+
});
|
|
2981
|
+
}),
|
|
2978
2982
|
retrieveAsset: async (event, requestOptions) => event.resource?.kind === "asset" ? this.assets.retrieve({ assetId: event.resource.id }, requestOptions) : null
|
|
2979
2983
|
};
|
|
2980
2984
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_UploadController = require("./UploadController-
|
|
1
|
+
const require_UploadController = require("./UploadController-DCr7oN6L.js");
|
|
2
2
|
// src/ui/BrowserUpload.ts
|
|
3
3
|
/** Creates an upload queue for the browser components, such as one a form starts on submit. */
|
|
4
4
|
const createUploadController = (options) => require_UploadController.createUploadController(options);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as UploadFile, I as UploadItem$1, L as UploadSnapshot$1, N as UploadController, P as UploadControllerOptions$1, h as UploaderProps$1, k as CalmLensUpload$1 } from "./Core-
|
|
2
|
-
import { r as UseCalmLensUploadResult$1 } from "./ReactUpload-
|
|
1
|
+
import { F as UploadFile, I as UploadItem$1, L as UploadSnapshot$1, N as UploadController, P as UploadControllerOptions$1, h as UploaderProps$1, k as CalmLensUpload$1 } from "./Core-Dnm9bJPB.js";
|
|
2
|
+
import { r as UseCalmLensUploadResult$1 } from "./ReactUpload-B7wrDPk8.js";
|
|
3
3
|
type UploadItem<F extends UploadFile = File> = UploadItem$1<F>;
|
|
4
4
|
type CalmLensUpload<F extends UploadFile = File> = CalmLensUpload$1<F>;
|
|
5
5
|
type UploadSnapshot<F extends UploadFile = File> = UploadSnapshot$1<F>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as RequestOptions, M as CdnAssetUrlOptions, O as CalmLensAppClientOptions, cn as UploadedAsset, rn as UploadAssetPartOptions, sn as UploadPresetSubmitAssetOptions, zt as RetrieveAssetOptions } from "./CalmLensTypes-DF7wh23M.js";
|
|
2
2
|
declare const inspectSymbol: unique symbol;
|
|
3
3
|
/**
|
|
4
4
|
* The CalmLens client for browsers and React Native apps. It uploads through an upload preset,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_CalmLensError = require("./CalmLensError-ifj5rLmk.js");
|
|
2
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
3
|
-
const require_CalmLensConnection = require("./CalmLensConnection-
|
|
2
|
+
const require_CalmLensCdn = require("./CalmLensCdn-6ZqvG8-v.js");
|
|
3
|
+
const require_CalmLensConnection = require("./CalmLensConnection-Qp9ucGHO.js");
|
|
4
4
|
// src/client/CalmLensAppClient.ts
|
|
5
5
|
const inspectSymbol = Symbol.for("nodejs.util.inspect.custom");
|
|
6
6
|
/** `options`, once `checkOptionKeys` finds only keys `operation` takes. */
|
|
@@ -152,7 +152,7 @@ const listPages = (fetchPage, { cursor, feed = false } = {}) => {
|
|
|
152
152
|
};
|
|
153
153
|
// src/client/CalmLensVersion.ts
|
|
154
154
|
/** This SDK's version, from its package.json. */
|
|
155
|
-
const SDK_VERSION = "0.
|
|
155
|
+
const SDK_VERSION = "0.33.0";
|
|
156
156
|
const runtimeName = () => {
|
|
157
157
|
const runtime = globalThis;
|
|
158
158
|
if (isReactNativeRuntime()) return "react-native";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_CalmLensError = require("./CalmLensError-ifj5rLmk.js");
|
|
2
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
2
|
+
const require_CalmLensCdn = require("./CalmLensCdn-6ZqvG8-v.js");
|
|
3
3
|
// src/contract/AssetPayload.js
|
|
4
4
|
const bufferInputToBytes = (value) => {
|
|
5
5
|
if (value instanceof ArrayBuffer) return new Uint8Array(value);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as HashList, l as HashListEntry } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-
|
|
2
|
+
import { $t as UpdateLensOptions, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetryAssetOptions, Ct as ListPoliciesOptions, D as BatchAssetsResponse, E as BatchAssetsOptions, Et as MoveFolderOptions, G as DeleteAssetOptions, Gt as SignedAssetUrl, Hn as AssetInfo, Ht as SetPolicyAutomaticUpdatesOptions, I as ClassifyTextOptions, It as RequestOptions, J as EnsureLensesOptions, Jt as SubmitAssetOptions, K as DeleteMetadataFieldOptions, Kt as SignedUploadToken, Lt as ResetPolicyOptions, M as CdnAssetUrlOptions, Nt as RemoveAssetContentOptions, P as CdnServeOptions, Pt as RequestAssetReviewOptions, Qt as UpdateHashListOptions, Rn as Folder, Rt as RetrieveAssetByExternalIdOptions, St as ListLensesOptions, T as AssignPolicyOptions, Tt as MoveAssetOptions, U as CreatePolicyOptions, Ut as SignAssetUrlOptions, V as CreateLensOptions, W as DecideAssetOptions, Wt as SignUploadTokenOptions, X as EnsureUploadPresetsOptions, Xt as UpdateAssetOptions, Y as EnsureMetadataFieldsOptions, Z as EnsureUploadPresetsResponse, Zt as UpdateFolderOptions, _ as AssetPage, _n as MetadataFieldsResource, _t as ListAssetsOptions, an as UploadPresetIdOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bt as ListHashListEntriesOptions, ct as HashListIdOptions, dn as WaitForAssetDecisionOptions, en as UpdatePolicyOptions, ft as Lens, gt as ListAssetTimelineOptions, hn as AssetReviewRequest, ht as ListAssetChildrenOptions, it as FolderPage, jt as PolicyPage, k as CalmLensServerClientOptions, kt as Policy, ln as VerifyWebhookSignatureOptions, lt as HashListPage, mt as LensPage, nn as UpgradePolicyOptions, nt as EventsPage, o as AssetChildrenPage, on as UploadPresetPage, ot as HashListEntryIdOptions, pt as LensIdOptions, q as EnsureLensOptions, r as Asset, rn as UploadAssetPartOptions, rt as FolderIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateProjectSettingsOptions, v as AssetSearchResponse, vn as ProjectSettingsResource, vt as ListEventsOptions, wt as ListUploadPresetsOptions, xt as ListHashListsOptions, yt as ListFoldersOptions, z as CreateFolderOptions, zt as RetrieveAssetOptions } from "./CalmLensTypes-DF7wh23M.js";
|
|
3
|
+
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-CUMsersa.js";
|
|
4
4
|
interface TransportRequest {
|
|
5
5
|
/** The client method sending the request, such as `assets.retrieve`, for hooks and logs. */
|
|
6
6
|
operation?: string;
|
|
@@ -239,7 +239,7 @@ declare class CalmLensServerClient {
|
|
|
239
239
|
* pass the same ones with each `cursor`. `for await` over it yields every event waiting
|
|
240
240
|
* after `cursor`; save the last page's `nextCursor` to resume later.
|
|
241
241
|
*/
|
|
242
|
-
list: (options?: ListEventsOptions, requestOptions?: RequestOptions) => ListPromise<
|
|
242
|
+
list: (options?: ListEventsOptions, requestOptions?: RequestOptions) => ListPromise<EventsPage>;
|
|
243
243
|
/**
|
|
244
244
|
* Retrieves the asset an event is about, as it is now, such as one from `events.list` or a
|
|
245
245
|
* parsed webhook delivery; events carry only the asset's ID, in `resource`. Resolves to
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_CalmLensError = require("./CalmLensError-ifj5rLmk.js");
|
|
2
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
3
|
-
const require_CalmLensConnection = require("./CalmLensConnection-
|
|
2
|
+
const require_CalmLensCdn = require("./CalmLensCdn-6ZqvG8-v.js");
|
|
3
|
+
const require_CalmLensConnection = require("./CalmLensConnection-Qp9ucGHO.js");
|
|
4
4
|
const require_CryptoUtils_BLCa_oZe = require("./CryptoUtils-BLCa-oZe-leCkr1ko.js");
|
|
5
5
|
// src/contract/JsonUtils.js
|
|
6
6
|
const stringifyJsonCanonical = (value) => JSON.stringify(value, (_key, nestedValue) => {
|
|
@@ -679,10 +679,13 @@ sign: async (options) => {
|
|
|
679
679
|
* pass the same ones with each `cursor`. `for await` over it yields every event waiting
|
|
680
680
|
* after `cursor`; save the last page's `nextCursor` to resume later.
|
|
681
681
|
*/
|
|
682
|
-
list: (options = {}, requestOptions) => this.#paginate("events.list", options, requestOptions, ({ types, ...query }) =>
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
682
|
+
list: (options = {}, requestOptions) => this.#paginate("events.list", options, requestOptions, ({ types, ...query }) => {
|
|
683
|
+
if (types != null && (!Array.isArray(types) || types.some((type) => typeof type !== "string"))) throw require_CalmLensError.invalidArgument("types must be an array of event types");
|
|
684
|
+
return this.#send("events.list", requestOptions, "GET", `${this.#projectPath}/events`, { query: {
|
|
685
|
+
...query,
|
|
686
|
+
types: types?.length ? types.join(",") : void 0
|
|
687
|
+
} });
|
|
688
|
+
}),
|
|
686
689
|
/**
|
|
687
690
|
* Retrieves the asset an event is about, as it is now, such as one from `events.list` or a
|
|
688
691
|
* parsed webhook delivery; events carry only the asset's ID, in `resource`. Resolves to
|