@clipwright/core 0.33.0 → 0.34.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/CHANGELOG.md +144 -0
- package/dist/api-failure.js +2 -1
- package/dist/api-failure.js.map +1 -1
- package/dist/asset-identity.d.ts +6 -0
- package/dist/asset-identity.js +7 -0
- package/dist/asset-identity.js.map +1 -0
- package/dist/assets.d.ts +386 -7
- package/dist/assets.js +114 -21
- package/dist/assets.js.map +1 -1
- package/dist/caption-language.d.ts +2 -0
- package/dist/caption-language.js +17 -0
- package/dist/caption-language.js.map +1 -0
- package/dist/contract-dispositions.d.ts +1133 -8
- package/dist/contract-dispositions.js +51 -11
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/contracts/v1/workflow-brief.d.ts +1670 -2
- package/dist/contracts/v1/workflow-catalog.d.ts +1670 -2
- package/dist/contracts/v1/workflow-client.d.ts +835 -1
- package/dist/contracts/v1/workflow-execution.d.ts +2 -0
- package/dist/contracts/v1/workflow-plan.d.ts +2533 -31
- package/dist/endpoints.js +2 -0
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -0
- package/dist/errors.js.map +1 -1
- package/dist/generations.d.ts +32 -6
- package/dist/generations.js +83 -27
- package/dist/generations.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/public-endpoints.d.ts +2 -0
- package/dist/public-endpoints.js +2 -0
- package/dist/public-endpoints.js.map +1 -1
- package/dist/resolved-timeline.d.ts +153 -0
- package/dist/resolved-timeline.js +46 -0
- package/dist/resolved-timeline.js.map +1 -1
- package/dist/run-static-warnings.js +5 -2
- package/dist/run-static-warnings.js.map +1 -1
- package/dist/semantic-inserts.d.ts +7 -0
- package/dist/semantic-inserts.js +19 -9
- package/dist/semantic-inserts.js.map +1 -1
- package/dist/skills.d.ts +4112 -77
- package/dist/skills.js +261 -16
- package/dist/skills.js.map +1 -1
- package/dist/templates/callout.d.ts +34 -0
- package/dist/templates/callout.js +51 -0
- package/dist/templates/callout.js.map +1 -0
- package/dist/templates/checklist.d.ts +42 -0
- package/dist/templates/checklist.js +47 -0
- package/dist/templates/checklist.js.map +1 -0
- package/dist/templates/compare.d.ts +26 -0
- package/dist/templates/compare.js +35 -0
- package/dist/templates/compare.js.map +1 -0
- package/dist/templates/end-card.d.ts +16 -0
- package/dist/templates/end-card.js +25 -0
- package/dist/templates/end-card.js.map +1 -0
- package/dist/templates/index.d.ts +164 -0
- package/dist/templates/index.js +382 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/lower-third.d.ts +18 -0
- package/dist/templates/lower-third.js +26 -0
- package/dist/templates/lower-third.js.map +1 -0
- package/dist/templates/notification.d.ts +30 -0
- package/dist/templates/notification.js +32 -0
- package/dist/templates/notification.js.map +1 -0
- package/dist/templates/phone-call.d.ts +24 -0
- package/dist/templates/phone-call.js +36 -0
- package/dist/templates/phone-call.js.map +1 -0
- package/dist/templates/progress.d.ts +22 -0
- package/dist/templates/progress.js +42 -0
- package/dist/templates/progress.js.map +1 -0
- package/dist/templates/quote.d.ts +21 -0
- package/dist/templates/quote.js +29 -0
- package/dist/templates/quote.js.map +1 -0
- package/dist/templates/rating.d.ts +22 -0
- package/dist/templates/rating.js +29 -0
- package/dist/templates/rating.js.map +1 -0
- package/dist/templates/size.d.ts +13 -0
- package/dist/templates/size.js +10 -0
- package/dist/templates/size.js.map +1 -0
- package/dist/templates/slot.d.ts +10 -0
- package/dist/templates/slot.js +5 -0
- package/dist/templates/slot.js.map +1 -0
- package/dist/templates/sounds.d.ts +351 -0
- package/dist/templates/sounds.js +67 -0
- package/dist/templates/sounds.js.map +1 -0
- package/dist/templates/stat.d.ts +20 -0
- package/dist/templates/stat.js +33 -0
- package/dist/templates/stat.js.map +1 -0
- package/dist/templates/tag.d.ts +23 -0
- package/dist/templates/tag.js +31 -0
- package/dist/templates/tag.js.map +1 -0
- package/dist/templates/theme.d.ts +29 -0
- package/dist/templates/theme.js +47 -0
- package/dist/templates/theme.js.map +1 -0
- package/dist/templates/title-card.d.ts +21 -0
- package/dist/templates/title-card.js +30 -0
- package/dist/templates/title-card.js.map +1 -0
- package/dist/tts-backend.d.ts +9 -0
- package/dist/tts-backend.js +21 -0
- package/dist/tts-backend.js.map +1 -1
- package/dist/ugc-layers.d.ts +84 -0
- package/dist/ugc-layers.js +137 -0
- package/dist/ugc-layers.js.map +1 -0
- package/dist/ugc-video-media.d.ts +12 -0
- package/dist/ugc-video-media.js +39 -0
- package/dist/ugc-video-media.js.map +1 -0
- package/dist/voice-admission.d.ts +835 -1
- package/dist/workflows/methods/faceless-explainer.d.ts +329 -2
- package/dist/workflows/methods/kinetic-launch.d.ts +329 -2
- package/dist/workflows/methods/product-image-story.d.ts +329 -2
- package/dist/workflows/methods/shared.d.ts +329 -2
- package/dist/workflows/methods/ugc-faq-answer.d.ts +329 -2
- package/dist/workflows/methods/ugc-product-intro.d.ts +329 -2
- package/dist/workflows/methods/website-proof-demo.d.ts +329 -2
- package/dist/workflows/validate.js +14 -9
- package/dist/workflows/validate.js.map +1 -1
- package/package.json +2 -2
package/dist/assets.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
2
|
+
import { ASSET_KINDS, ASSET_MEDIA_TYPES, assetId } from "./asset-identity.js";
|
|
3
|
+
/** Account assets (clipwright#724 F2): pictures and clips kept until the customer deletes them, under a cap per account. */
|
|
3
4
|
export declare const ASSETS_PATH = "/v1/assets";
|
|
4
|
-
/** Raw bytes of one picture, for the cabinet; role, name and the rights confirmation travel in the query. */
|
|
5
|
+
/** Raw bytes of one picture or clip, for the cabinet; role, name and the rights confirmation travel in the query. */
|
|
5
6
|
export declare const ASSET_BYTES_PATH = "/v1/assets/bytes";
|
|
6
7
|
export declare const ASSET_ITEM_PATH = "/v1/assets/:id";
|
|
7
8
|
export declare const ASSET_ACCOUNT_MAX_COUNT = 2000;
|
|
@@ -17,30 +18,78 @@ export declare const ASSET_URL_TTL_SECONDS = 3600;
|
|
|
17
18
|
export declare const ASSET_DELETE_GRACE_DAYS = 7;
|
|
18
19
|
export declare const ASSET_NAME_MAX_CHARS = 80;
|
|
19
20
|
export declare const ASSET_LIST_MAX_LIMIT = 100;
|
|
21
|
+
/** A customer clip (owner, 2026-10-20): up to 100 MiB and 120 s, a non-fragmented MP4 in h264 or hevc. */
|
|
22
|
+
export declare const ASSET_VIDEO_MAX_BYTES: number;
|
|
23
|
+
export declare const ASSET_VIDEO_MAX_SECONDS = 120;
|
|
24
|
+
export declare const ASSET_VIDEO_CODECS: readonly ["h264", "hevc"];
|
|
25
|
+
/** A clip sent as the body of `POST /v1/assets/bytes`: the API holds the body in memory before staging it. */
|
|
26
|
+
export declare const ASSET_BYTES_ROUTE_VIDEO_MAX_BYTES: number;
|
|
27
|
+
/** How long a clip in processing may take before reads call it failed: a 90 s download inside a 5 minute task. */
|
|
28
|
+
export declare const ASSET_PROCESSING_SECONDS = 600;
|
|
29
|
+
export declare const ASSET_VIDEO_DOWNLOAD_DEADLINE_MS = 90000;
|
|
30
|
+
export declare const ASSET_INGEST_TASK_MAX_DURATION_SECONDS = 300;
|
|
31
|
+
export declare const ASSET_PUT_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "video/mp4"];
|
|
32
|
+
export type AssetPutMediaType = (typeof ASSET_PUT_MEDIA_TYPES)[number];
|
|
33
|
+
/** The worker task that downloads or reads a staged file, checks it and publishes the asset. */
|
|
34
|
+
export declare const INGEST_ASSET_MEDIA_TASK = "ingest-asset-media";
|
|
35
|
+
/** The cabinet's preview of an asset (S4a): a WebP at `assets/<account>/<id>/preview.webp`, long side at most 512, no upscale. */
|
|
36
|
+
export declare const ASSET_PREVIEW_TASK = "make-asset-preview";
|
|
37
|
+
export declare const ASSET_PREVIEW_MAX_SIDE = 512;
|
|
38
|
+
export declare const ASSET_PREVIEW_QUALITY = 75;
|
|
39
|
+
export declare const ASSET_PREVIEW_SWEEP_BATCH = 200;
|
|
40
|
+
/** Past this many attempts a row leaves the queue as `gave_up`: an OOM or a hung R2 never loops for ever. */
|
|
41
|
+
export declare const ASSET_PREVIEW_MAX_ATTEMPTS = 6;
|
|
42
|
+
/** How long creating an asset waits to queue its preview; past it the hourly sweep picks the row up. */
|
|
43
|
+
export declare const ASSET_PREVIEW_ENQUEUE_TIMEOUT_MS = 2000;
|
|
44
|
+
/** Terminal codes only; a passing failure throws, and the next attempt or the sweep repeats it. */
|
|
45
|
+
export declare const ASSET_PREVIEW_ERRORS: readonly ["decode_failed", "size_mismatch", "empty_output", "gave_up"];
|
|
46
|
+
export type AssetPreviewError = (typeof ASSET_PREVIEW_ERRORS)[number];
|
|
20
47
|
export declare const ASSET_ROLES: readonly ["character", "location", "style", "prop", "other"];
|
|
21
48
|
export type AssetRole = (typeof ASSET_ROLES)[number];
|
|
22
|
-
export
|
|
49
|
+
export { ASSET_KINDS, ASSET_MEDIA_TYPES, assetId };
|
|
23
50
|
export type AssetKind = (typeof ASSET_KINDS)[number];
|
|
24
|
-
/** WebP is kept only as a generation's own output: its dimensions are not read from customer bytes. */
|
|
25
|
-
export declare const ASSET_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "image/webp", "video/mp4"];
|
|
26
51
|
export type AssetMediaType = (typeof ASSET_MEDIA_TYPES)[number];
|
|
27
52
|
export declare const ASSET_SOURCE_TYPES: readonly ["generation", "upload", "url", "base64", "bytes", "put"];
|
|
28
53
|
export type AssetSourceType = (typeof ASSET_SOURCE_TYPES)[number];
|
|
29
|
-
export declare const assetId: z.ZodString;
|
|
30
54
|
export declare const assetName: z.ZodString;
|
|
31
|
-
/**
|
|
55
|
+
/** A file the client PUTs itself: its type, exact size and sha256, checked against the bytes before the asset exists. */
|
|
56
|
+
export declare const assetPutSource: z.ZodObject<{
|
|
57
|
+
media_type: z.ZodEnum<{
|
|
58
|
+
"image/jpeg": "image/jpeg";
|
|
59
|
+
"image/png": "image/png";
|
|
60
|
+
"video/mp4": "video/mp4";
|
|
61
|
+
}>;
|
|
62
|
+
bytes: z.ZodNumber;
|
|
63
|
+
sha256: z.ZodString;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
/** Where the asset's bytes come from: an own generation, an own upload, a public https url (`kind: "video"` for a clip), */
|
|
66
|
+
/** inline base64, or a presigned PUT. */
|
|
32
67
|
export declare const assetSource: z.ZodUnion<readonly [z.ZodObject<{
|
|
33
68
|
run_id: z.ZodString;
|
|
34
69
|
}, z.core.$strict>, z.ZodObject<{
|
|
35
70
|
upload_id: z.ZodString;
|
|
36
71
|
}, z.core.$strict>, z.ZodObject<{
|
|
37
72
|
url: z.ZodString;
|
|
73
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
image: "image";
|
|
75
|
+
video: "video";
|
|
76
|
+
}>>;
|
|
38
77
|
}, z.core.$strict>, z.ZodObject<{
|
|
39
78
|
base64: z.ZodString;
|
|
40
79
|
media_type: z.ZodEnum<{
|
|
41
80
|
"image/jpeg": "image/jpeg";
|
|
42
81
|
"image/png": "image/png";
|
|
43
82
|
}>;
|
|
83
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
84
|
+
put: z.ZodObject<{
|
|
85
|
+
media_type: z.ZodEnum<{
|
|
86
|
+
"image/jpeg": "image/jpeg";
|
|
87
|
+
"image/png": "image/png";
|
|
88
|
+
"video/mp4": "video/mp4";
|
|
89
|
+
}>;
|
|
90
|
+
bytes: z.ZodNumber;
|
|
91
|
+
sha256: z.ZodString;
|
|
92
|
+
}, z.core.$strict>;
|
|
44
93
|
}, z.core.$strict>]>;
|
|
45
94
|
export type AssetSource = z.infer<typeof assetSource>;
|
|
46
95
|
/** `rights_confirmed` is required for the customer's own material and states once, at creation, that it may be used. */
|
|
@@ -51,12 +100,26 @@ export declare const createAssetRequest: z.ZodObject<{
|
|
|
51
100
|
upload_id: z.ZodString;
|
|
52
101
|
}, z.core.$strict>, z.ZodObject<{
|
|
53
102
|
url: z.ZodString;
|
|
103
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
104
|
+
image: "image";
|
|
105
|
+
video: "video";
|
|
106
|
+
}>>;
|
|
54
107
|
}, z.core.$strict>, z.ZodObject<{
|
|
55
108
|
base64: z.ZodString;
|
|
56
109
|
media_type: z.ZodEnum<{
|
|
57
110
|
"image/jpeg": "image/jpeg";
|
|
58
111
|
"image/png": "image/png";
|
|
59
112
|
}>;
|
|
113
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
114
|
+
put: z.ZodObject<{
|
|
115
|
+
media_type: z.ZodEnum<{
|
|
116
|
+
"image/jpeg": "image/jpeg";
|
|
117
|
+
"image/png": "image/png";
|
|
118
|
+
"video/mp4": "video/mp4";
|
|
119
|
+
}>;
|
|
120
|
+
bytes: z.ZodNumber;
|
|
121
|
+
sha256: z.ZodString;
|
|
122
|
+
}, z.core.$strict>;
|
|
60
123
|
}, z.core.$strict>]>;
|
|
61
124
|
role: z.ZodEnum<{
|
|
62
125
|
character: "character";
|
|
@@ -110,6 +173,7 @@ export declare const assetListQuery: z.ZodObject<{
|
|
|
110
173
|
export type AssetListQuery = z.infer<typeof assetListQuery>;
|
|
111
174
|
export declare const asset: z.ZodObject<{
|
|
112
175
|
asset_id: z.ZodString;
|
|
176
|
+
state: z.ZodLiteral<"ready">;
|
|
113
177
|
kind: z.ZodEnum<{
|
|
114
178
|
image: "image";
|
|
115
179
|
video: "video";
|
|
@@ -133,6 +197,8 @@ export declare const asset: z.ZodObject<{
|
|
|
133
197
|
height: z.ZodNumber;
|
|
134
198
|
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
135
199
|
fps: z.ZodNullable<z.ZodNumber>;
|
|
200
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
201
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
136
202
|
content_digest: z.ZodString;
|
|
137
203
|
source_type: z.ZodEnum<{
|
|
138
204
|
base64: "base64";
|
|
@@ -148,15 +214,191 @@ export declare const asset: z.ZodObject<{
|
|
|
148
214
|
updated_at: z.ZodString;
|
|
149
215
|
}, z.core.$strict>;
|
|
150
216
|
export type Asset = z.infer<typeof asset>;
|
|
217
|
+
/** Where a PUT goes: signed for 15 minutes with exactly these two headers, and finished within a day. */
|
|
218
|
+
export declare const assetPutUpload: z.ZodObject<{
|
|
219
|
+
put_url: z.ZodString;
|
|
220
|
+
put_headers: z.ZodObject<{
|
|
221
|
+
"content-type": z.ZodEnum<{
|
|
222
|
+
"image/jpeg": "image/jpeg";
|
|
223
|
+
"image/png": "image/png";
|
|
224
|
+
"video/mp4": "video/mp4";
|
|
225
|
+
}>;
|
|
226
|
+
"content-length": z.ZodString;
|
|
227
|
+
}, z.core.$strict>;
|
|
228
|
+
expires_at: z.ZodString;
|
|
229
|
+
finish_by: z.ZodString;
|
|
230
|
+
}, z.core.$strict>;
|
|
231
|
+
/** An asset before it exists: waiting for its PUT, being checked by the worker, or refused with the reason. */
|
|
232
|
+
export declare const ASSET_PENDING_STATES: readonly ["awaiting_upload", "processing", "failed"];
|
|
233
|
+
export declare const pendingAsset: z.ZodObject<{
|
|
234
|
+
asset_id: z.ZodString;
|
|
235
|
+
state: z.ZodEnum<{
|
|
236
|
+
awaiting_upload: "awaiting_upload";
|
|
237
|
+
failed: "failed";
|
|
238
|
+
processing: "processing";
|
|
239
|
+
}>;
|
|
240
|
+
kind: z.ZodEnum<{
|
|
241
|
+
image: "image";
|
|
242
|
+
video: "video";
|
|
243
|
+
}>;
|
|
244
|
+
role: z.ZodEnum<{
|
|
245
|
+
character: "character";
|
|
246
|
+
location: "location";
|
|
247
|
+
other: "other";
|
|
248
|
+
prop: "prop";
|
|
249
|
+
style: "style";
|
|
250
|
+
}>;
|
|
251
|
+
name: z.ZodString;
|
|
252
|
+
source_type: z.ZodEnum<{
|
|
253
|
+
base64: "base64";
|
|
254
|
+
bytes: "bytes";
|
|
255
|
+
generation: "generation";
|
|
256
|
+
put: "put";
|
|
257
|
+
upload: "upload";
|
|
258
|
+
url: "url";
|
|
259
|
+
}>;
|
|
260
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
261
|
+
code: z.ZodString;
|
|
262
|
+
message: z.ZodString;
|
|
263
|
+
}, z.core.$strict>>;
|
|
264
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
265
|
+
created_at: z.ZodString;
|
|
266
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
267
|
+
put_url: z.ZodString;
|
|
268
|
+
put_headers: z.ZodObject<{
|
|
269
|
+
"content-type": z.ZodEnum<{
|
|
270
|
+
"image/jpeg": "image/jpeg";
|
|
271
|
+
"image/png": "image/png";
|
|
272
|
+
"video/mp4": "video/mp4";
|
|
273
|
+
}>;
|
|
274
|
+
"content-length": z.ZodString;
|
|
275
|
+
}, z.core.$strict>;
|
|
276
|
+
expires_at: z.ZodString;
|
|
277
|
+
finish_by: z.ZodString;
|
|
278
|
+
}, z.core.$strict>>;
|
|
279
|
+
}, z.core.$strict>;
|
|
280
|
+
export type PendingAsset = z.infer<typeof pendingAsset>;
|
|
281
|
+
export declare const assetItem: z.ZodUnion<readonly [z.ZodObject<{
|
|
282
|
+
asset_id: z.ZodString;
|
|
283
|
+
state: z.ZodLiteral<"ready">;
|
|
284
|
+
kind: z.ZodEnum<{
|
|
285
|
+
image: "image";
|
|
286
|
+
video: "video";
|
|
287
|
+
}>;
|
|
288
|
+
role: z.ZodEnum<{
|
|
289
|
+
character: "character";
|
|
290
|
+
location: "location";
|
|
291
|
+
other: "other";
|
|
292
|
+
prop: "prop";
|
|
293
|
+
style: "style";
|
|
294
|
+
}>;
|
|
295
|
+
name: z.ZodString;
|
|
296
|
+
media_type: z.ZodEnum<{
|
|
297
|
+
"image/jpeg": "image/jpeg";
|
|
298
|
+
"image/png": "image/png";
|
|
299
|
+
"image/webp": "image/webp";
|
|
300
|
+
"video/mp4": "video/mp4";
|
|
301
|
+
}>;
|
|
302
|
+
bytes: z.ZodNumber;
|
|
303
|
+
width: z.ZodNumber;
|
|
304
|
+
height: z.ZodNumber;
|
|
305
|
+
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
306
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
307
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
308
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
309
|
+
content_digest: z.ZodString;
|
|
310
|
+
source_type: z.ZodEnum<{
|
|
311
|
+
base64: "base64";
|
|
312
|
+
bytes: "bytes";
|
|
313
|
+
generation: "generation";
|
|
314
|
+
put: "put";
|
|
315
|
+
upload: "upload";
|
|
316
|
+
url: "url";
|
|
317
|
+
}>;
|
|
318
|
+
url: z.ZodString;
|
|
319
|
+
expires_at: z.ZodString;
|
|
320
|
+
created_at: z.ZodString;
|
|
321
|
+
updated_at: z.ZodString;
|
|
322
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
323
|
+
asset_id: z.ZodString;
|
|
324
|
+
state: z.ZodEnum<{
|
|
325
|
+
awaiting_upload: "awaiting_upload";
|
|
326
|
+
failed: "failed";
|
|
327
|
+
processing: "processing";
|
|
328
|
+
}>;
|
|
329
|
+
kind: z.ZodEnum<{
|
|
330
|
+
image: "image";
|
|
331
|
+
video: "video";
|
|
332
|
+
}>;
|
|
333
|
+
role: z.ZodEnum<{
|
|
334
|
+
character: "character";
|
|
335
|
+
location: "location";
|
|
336
|
+
other: "other";
|
|
337
|
+
prop: "prop";
|
|
338
|
+
style: "style";
|
|
339
|
+
}>;
|
|
340
|
+
name: z.ZodString;
|
|
341
|
+
source_type: z.ZodEnum<{
|
|
342
|
+
base64: "base64";
|
|
343
|
+
bytes: "bytes";
|
|
344
|
+
generation: "generation";
|
|
345
|
+
put: "put";
|
|
346
|
+
upload: "upload";
|
|
347
|
+
url: "url";
|
|
348
|
+
}>;
|
|
349
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
350
|
+
code: z.ZodString;
|
|
351
|
+
message: z.ZodString;
|
|
352
|
+
}, z.core.$strict>>;
|
|
353
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
354
|
+
created_at: z.ZodString;
|
|
355
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
356
|
+
put_url: z.ZodString;
|
|
357
|
+
put_headers: z.ZodObject<{
|
|
358
|
+
"content-type": z.ZodEnum<{
|
|
359
|
+
"image/jpeg": "image/jpeg";
|
|
360
|
+
"image/png": "image/png";
|
|
361
|
+
"video/mp4": "video/mp4";
|
|
362
|
+
}>;
|
|
363
|
+
"content-length": z.ZodString;
|
|
364
|
+
}, z.core.$strict>;
|
|
365
|
+
expires_at: z.ZodString;
|
|
366
|
+
finish_by: z.ZodString;
|
|
367
|
+
}, z.core.$strict>>;
|
|
368
|
+
}, z.core.$strict>]>;
|
|
369
|
+
export type AssetItem = z.infer<typeof assetItem>;
|
|
370
|
+
/** Why a pending asset failed, as `error.code`; these never come as an HTTP error of their own. */
|
|
371
|
+
export declare const ASSET_INGEST_FAILURE_CODES: readonly ["upload_expired", "upload_size_mismatch", "upload_digest_mismatch", "unsupported_media_type", "invalid_image", "invalid_video", "payload_too_large", "url_fetch_refused", "url_fetch_failed", "asset_cap_exceeded", "asset_ingest_cap_exceeded", "url_import_disabled", "ingest_timed_out", "ingest_enqueue_failed", "ingest_failed"];
|
|
372
|
+
export type AssetIngestFailureCode = (typeof ASSET_INGEST_FAILURE_CODES)[number];
|
|
373
|
+
/** What the API hands the worker: which pending asset, and whether its bytes are at a url or already staged. */
|
|
374
|
+
export declare const ingestAssetMediaPayload: z.ZodObject<{
|
|
375
|
+
assetId: z.ZodString;
|
|
376
|
+
accountId: z.ZodString;
|
|
377
|
+
source: z.ZodEnum<{
|
|
378
|
+
staging: "staging";
|
|
379
|
+
url: "url";
|
|
380
|
+
}>;
|
|
381
|
+
}, z.core.$strict>;
|
|
382
|
+
export type IngestAssetMediaPayload = z.infer<typeof ingestAssetMediaPayload>;
|
|
383
|
+
/** The preview task takes the id only; it reads the account from the row. */
|
|
384
|
+
export declare const assetPreviewPayload: z.ZodObject<{
|
|
385
|
+
assetId: z.ZodString;
|
|
386
|
+
}, z.core.$strict>;
|
|
387
|
+
export type AssetPreviewPayload = z.infer<typeof assetPreviewPayload>;
|
|
388
|
+
/** One run per asset across every caller: created with `scope: "global"`, since a raw string inside a task is per run. */
|
|
389
|
+
export declare const assetPreviewIdempotencyKey: (id: string) => string;
|
|
390
|
+
export declare const assetPreviewKey: (accountId: string, id: string) => string;
|
|
151
391
|
export declare const assetUsage: z.ZodObject<{
|
|
152
392
|
count: z.ZodNumber;
|
|
153
393
|
bytes: z.ZodNumber;
|
|
154
394
|
max_count: z.ZodNumber;
|
|
155
395
|
max_bytes: z.ZodNumber;
|
|
156
396
|
}, z.core.$strict>;
|
|
397
|
+
/** `pending` holds the account's assets still in progress and those refused within the day; the first page only. */
|
|
157
398
|
export declare const assetList: z.ZodObject<{
|
|
158
399
|
assets: z.ZodArray<z.ZodObject<{
|
|
159
400
|
asset_id: z.ZodString;
|
|
401
|
+
state: z.ZodLiteral<"ready">;
|
|
160
402
|
kind: z.ZodEnum<{
|
|
161
403
|
image: "image";
|
|
162
404
|
video: "video";
|
|
@@ -180,6 +422,8 @@ export declare const assetList: z.ZodObject<{
|
|
|
180
422
|
height: z.ZodNumber;
|
|
181
423
|
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
182
424
|
fps: z.ZodNullable<z.ZodNumber>;
|
|
425
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
426
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
183
427
|
content_digest: z.ZodString;
|
|
184
428
|
source_type: z.ZodEnum<{
|
|
185
429
|
base64: "base64";
|
|
@@ -194,6 +438,53 @@ export declare const assetList: z.ZodObject<{
|
|
|
194
438
|
created_at: z.ZodString;
|
|
195
439
|
updated_at: z.ZodString;
|
|
196
440
|
}, z.core.$strict>>;
|
|
441
|
+
pending: z.ZodArray<z.ZodObject<{
|
|
442
|
+
asset_id: z.ZodString;
|
|
443
|
+
state: z.ZodEnum<{
|
|
444
|
+
awaiting_upload: "awaiting_upload";
|
|
445
|
+
failed: "failed";
|
|
446
|
+
processing: "processing";
|
|
447
|
+
}>;
|
|
448
|
+
kind: z.ZodEnum<{
|
|
449
|
+
image: "image";
|
|
450
|
+
video: "video";
|
|
451
|
+
}>;
|
|
452
|
+
role: z.ZodEnum<{
|
|
453
|
+
character: "character";
|
|
454
|
+
location: "location";
|
|
455
|
+
other: "other";
|
|
456
|
+
prop: "prop";
|
|
457
|
+
style: "style";
|
|
458
|
+
}>;
|
|
459
|
+
name: z.ZodString;
|
|
460
|
+
source_type: z.ZodEnum<{
|
|
461
|
+
base64: "base64";
|
|
462
|
+
bytes: "bytes";
|
|
463
|
+
generation: "generation";
|
|
464
|
+
put: "put";
|
|
465
|
+
upload: "upload";
|
|
466
|
+
url: "url";
|
|
467
|
+
}>;
|
|
468
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
469
|
+
code: z.ZodString;
|
|
470
|
+
message: z.ZodString;
|
|
471
|
+
}, z.core.$strict>>;
|
|
472
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
473
|
+
created_at: z.ZodString;
|
|
474
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
475
|
+
put_url: z.ZodString;
|
|
476
|
+
put_headers: z.ZodObject<{
|
|
477
|
+
"content-type": z.ZodEnum<{
|
|
478
|
+
"image/jpeg": "image/jpeg";
|
|
479
|
+
"image/png": "image/png";
|
|
480
|
+
"video/mp4": "video/mp4";
|
|
481
|
+
}>;
|
|
482
|
+
"content-length": z.ZodString;
|
|
483
|
+
}, z.core.$strict>;
|
|
484
|
+
expires_at: z.ZodString;
|
|
485
|
+
finish_by: z.ZodString;
|
|
486
|
+
}, z.core.$strict>>;
|
|
487
|
+
}, z.core.$strict>>;
|
|
197
488
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
198
489
|
usage: z.ZodObject<{
|
|
199
490
|
count: z.ZodNumber;
|
|
@@ -212,17 +503,82 @@ export declare const assetRead: z.ZodObject<{
|
|
|
212
503
|
height: z.ZodNumber;
|
|
213
504
|
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
214
505
|
fps: z.ZodNullable<z.ZodNumber>;
|
|
506
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
507
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
215
508
|
content_digest: z.ZodString;
|
|
216
509
|
url: z.ZodString;
|
|
217
510
|
expires_at: z.ZodString;
|
|
218
511
|
created_at: z.ZodString;
|
|
219
512
|
updated_at: z.ZodString;
|
|
513
|
+
state: z.ZodLiteral<"ready">;
|
|
220
514
|
kind: z.ZodString;
|
|
221
515
|
role: z.ZodString;
|
|
222
516
|
media_type: z.ZodString;
|
|
223
517
|
source_type: z.ZodString;
|
|
224
518
|
}, z.core.$loose>;
|
|
225
519
|
export type AssetRead = z.infer<typeof assetRead>;
|
|
520
|
+
export declare const pendingAssetRead: z.ZodObject<{
|
|
521
|
+
asset_id: z.ZodString;
|
|
522
|
+
name: z.ZodString;
|
|
523
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
524
|
+
created_at: z.ZodString;
|
|
525
|
+
state: z.ZodString;
|
|
526
|
+
kind: z.ZodString;
|
|
527
|
+
role: z.ZodString;
|
|
528
|
+
source_type: z.ZodString;
|
|
529
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
530
|
+
code: z.ZodString;
|
|
531
|
+
message: z.ZodString;
|
|
532
|
+
}, z.core.$loose>>;
|
|
533
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
534
|
+
put_url: z.ZodString;
|
|
535
|
+
expires_at: z.ZodString;
|
|
536
|
+
finish_by: z.ZodString;
|
|
537
|
+
put_headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
538
|
+
}, z.core.$loose>>;
|
|
539
|
+
}, z.core.$loose>;
|
|
540
|
+
export type PendingAssetRead = z.infer<typeof pendingAssetRead>;
|
|
541
|
+
export declare const assetItemRead: z.ZodUnion<readonly [z.ZodObject<{
|
|
542
|
+
asset_id: z.ZodString;
|
|
543
|
+
name: z.ZodString;
|
|
544
|
+
bytes: z.ZodNumber;
|
|
545
|
+
width: z.ZodNumber;
|
|
546
|
+
height: z.ZodNumber;
|
|
547
|
+
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
548
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
549
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
550
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
551
|
+
content_digest: z.ZodString;
|
|
552
|
+
url: z.ZodString;
|
|
553
|
+
expires_at: z.ZodString;
|
|
554
|
+
created_at: z.ZodString;
|
|
555
|
+
updated_at: z.ZodString;
|
|
556
|
+
state: z.ZodLiteral<"ready">;
|
|
557
|
+
kind: z.ZodString;
|
|
558
|
+
role: z.ZodString;
|
|
559
|
+
media_type: z.ZodString;
|
|
560
|
+
source_type: z.ZodString;
|
|
561
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
562
|
+
asset_id: z.ZodString;
|
|
563
|
+
name: z.ZodString;
|
|
564
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
565
|
+
created_at: z.ZodString;
|
|
566
|
+
state: z.ZodString;
|
|
567
|
+
kind: z.ZodString;
|
|
568
|
+
role: z.ZodString;
|
|
569
|
+
source_type: z.ZodString;
|
|
570
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
571
|
+
code: z.ZodString;
|
|
572
|
+
message: z.ZodString;
|
|
573
|
+
}, z.core.$loose>>;
|
|
574
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
575
|
+
put_url: z.ZodString;
|
|
576
|
+
expires_at: z.ZodString;
|
|
577
|
+
finish_by: z.ZodString;
|
|
578
|
+
put_headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
579
|
+
}, z.core.$loose>>;
|
|
580
|
+
}, z.core.$loose>]>;
|
|
581
|
+
export type AssetItemRead = z.infer<typeof assetItemRead>;
|
|
226
582
|
export declare const assetListRead: z.ZodObject<{
|
|
227
583
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
228
584
|
contract_version: z.ZodString;
|
|
@@ -234,16 +590,39 @@ export declare const assetListRead: z.ZodObject<{
|
|
|
234
590
|
height: z.ZodNumber;
|
|
235
591
|
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
236
592
|
fps: z.ZodNullable<z.ZodNumber>;
|
|
593
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
594
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
237
595
|
content_digest: z.ZodString;
|
|
238
596
|
url: z.ZodString;
|
|
239
597
|
expires_at: z.ZodString;
|
|
240
598
|
created_at: z.ZodString;
|
|
241
599
|
updated_at: z.ZodString;
|
|
600
|
+
state: z.ZodLiteral<"ready">;
|
|
242
601
|
kind: z.ZodString;
|
|
243
602
|
role: z.ZodString;
|
|
244
603
|
media_type: z.ZodString;
|
|
245
604
|
source_type: z.ZodString;
|
|
246
605
|
}, z.core.$loose>>;
|
|
606
|
+
pending: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
607
|
+
asset_id: z.ZodString;
|
|
608
|
+
name: z.ZodString;
|
|
609
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
610
|
+
created_at: z.ZodString;
|
|
611
|
+
state: z.ZodString;
|
|
612
|
+
kind: z.ZodString;
|
|
613
|
+
role: z.ZodString;
|
|
614
|
+
source_type: z.ZodString;
|
|
615
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
616
|
+
code: z.ZodString;
|
|
617
|
+
message: z.ZodString;
|
|
618
|
+
}, z.core.$loose>>;
|
|
619
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
620
|
+
put_url: z.ZodString;
|
|
621
|
+
expires_at: z.ZodString;
|
|
622
|
+
finish_by: z.ZodString;
|
|
623
|
+
put_headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
624
|
+
}, z.core.$loose>>;
|
|
625
|
+
}, z.core.$loose>>>;
|
|
247
626
|
usage: z.ZodObject<{
|
|
248
627
|
count: z.ZodNumber;
|
|
249
628
|
bytes: z.ZodNumber;
|