@clipwright/core 0.32.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 +180 -0
- package/dist/api-failure.d.ts +1 -0
- package/dist/api-failure.js +10 -4
- 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 +641 -0
- package/dist/assets.js +214 -0
- package/dist/assets.js.map +1 -0
- 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 +13 -0
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +15 -0
- package/dist/errors.js.map +1 -1
- package/dist/generations.d.ts +48 -7
- package/dist/generations.js +86 -28
- package/dist/generations.js.map +1 -1
- package/dist/idempotency.d.ts +20 -0
- package/dist/idempotency.js +37 -0
- package/dist/idempotency.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -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/uploads.d.ts +79 -0
- package/dist/uploads.js +65 -7
- package/dist/uploads.js.map +1 -1
- 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
ADDED
|
@@ -0,0 +1,641 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
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. */
|
|
4
|
+
export declare const ASSETS_PATH = "/v1/assets";
|
|
5
|
+
/** Raw bytes of one picture or clip, for the cabinet; role, name and the rights confirmation travel in the query. */
|
|
6
|
+
export declare const ASSET_BYTES_PATH = "/v1/assets/bytes";
|
|
7
|
+
export declare const ASSET_ITEM_PATH = "/v1/assets/:id";
|
|
8
|
+
export declare const ASSET_ACCOUNT_MAX_COUNT = 2000;
|
|
9
|
+
export declare const ASSET_ACCOUNT_MAX_BYTES = 20000000000;
|
|
10
|
+
/** New assets per account over a sliding day, deleted ones included: a delete does not give the slot back. */
|
|
11
|
+
export declare const ASSET_INGEST_DAILY_CAP = 100;
|
|
12
|
+
export declare const ASSET_INGEST_WINDOW_SECONDS = 86400;
|
|
13
|
+
/** Raw bytes of a picture passed inline; its base64 still fits the 1 MiB JSON body of the API and of MCP. */
|
|
14
|
+
export declare const ASSET_BASE64_MAX_BYTES = 700000;
|
|
15
|
+
export declare const ASSET_BASE64_MAX_CHARS: number;
|
|
16
|
+
export declare const ASSET_URL_TTL_SECONDS = 3600;
|
|
17
|
+
/** A deleted asset's object stays this long, so a generation admitted just before the delete still reads it. */
|
|
18
|
+
export declare const ASSET_DELETE_GRACE_DAYS = 7;
|
|
19
|
+
export declare const ASSET_NAME_MAX_CHARS = 80;
|
|
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];
|
|
47
|
+
export declare const ASSET_ROLES: readonly ["character", "location", "style", "prop", "other"];
|
|
48
|
+
export type AssetRole = (typeof ASSET_ROLES)[number];
|
|
49
|
+
export { ASSET_KINDS, ASSET_MEDIA_TYPES, assetId };
|
|
50
|
+
export type AssetKind = (typeof ASSET_KINDS)[number];
|
|
51
|
+
export type AssetMediaType = (typeof ASSET_MEDIA_TYPES)[number];
|
|
52
|
+
export declare const ASSET_SOURCE_TYPES: readonly ["generation", "upload", "url", "base64", "bytes", "put"];
|
|
53
|
+
export type AssetSourceType = (typeof ASSET_SOURCE_TYPES)[number];
|
|
54
|
+
export declare const assetName: z.ZodString;
|
|
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. */
|
|
67
|
+
export declare const assetSource: z.ZodUnion<readonly [z.ZodObject<{
|
|
68
|
+
run_id: z.ZodString;
|
|
69
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
70
|
+
upload_id: z.ZodString;
|
|
71
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
72
|
+
url: z.ZodString;
|
|
73
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
image: "image";
|
|
75
|
+
video: "video";
|
|
76
|
+
}>>;
|
|
77
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
78
|
+
base64: z.ZodString;
|
|
79
|
+
media_type: z.ZodEnum<{
|
|
80
|
+
"image/jpeg": "image/jpeg";
|
|
81
|
+
"image/png": "image/png";
|
|
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>;
|
|
93
|
+
}, z.core.$strict>]>;
|
|
94
|
+
export type AssetSource = z.infer<typeof assetSource>;
|
|
95
|
+
/** `rights_confirmed` is required for the customer's own material and states once, at creation, that it may be used. */
|
|
96
|
+
export declare const createAssetRequest: z.ZodObject<{
|
|
97
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
98
|
+
run_id: z.ZodString;
|
|
99
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
100
|
+
upload_id: z.ZodString;
|
|
101
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
102
|
+
url: z.ZodString;
|
|
103
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
104
|
+
image: "image";
|
|
105
|
+
video: "video";
|
|
106
|
+
}>>;
|
|
107
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
108
|
+
base64: z.ZodString;
|
|
109
|
+
media_type: z.ZodEnum<{
|
|
110
|
+
"image/jpeg": "image/jpeg";
|
|
111
|
+
"image/png": "image/png";
|
|
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>;
|
|
123
|
+
}, z.core.$strict>]>;
|
|
124
|
+
role: z.ZodEnum<{
|
|
125
|
+
character: "character";
|
|
126
|
+
location: "location";
|
|
127
|
+
other: "other";
|
|
128
|
+
prop: "prop";
|
|
129
|
+
style: "style";
|
|
130
|
+
}>;
|
|
131
|
+
name: z.ZodString;
|
|
132
|
+
rights_confirmed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
export type CreateAssetRequest = z.infer<typeof createAssetRequest>;
|
|
135
|
+
/** The query of `POST /v1/assets/bytes`. */
|
|
136
|
+
export declare const assetBytesQuery: z.ZodObject<{
|
|
137
|
+
role: z.ZodEnum<{
|
|
138
|
+
character: "character";
|
|
139
|
+
location: "location";
|
|
140
|
+
other: "other";
|
|
141
|
+
prop: "prop";
|
|
142
|
+
style: "style";
|
|
143
|
+
}>;
|
|
144
|
+
name: z.ZodString;
|
|
145
|
+
rights_confirmed: z.ZodOptional<z.ZodLiteral<"true">>;
|
|
146
|
+
}, z.core.$strict>;
|
|
147
|
+
export declare const updateAssetRequest: z.ZodObject<{
|
|
148
|
+
name: z.ZodOptional<z.ZodString>;
|
|
149
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
character: "character";
|
|
151
|
+
location: "location";
|
|
152
|
+
other: "other";
|
|
153
|
+
prop: "prop";
|
|
154
|
+
style: "style";
|
|
155
|
+
}>>;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
export type UpdateAssetRequest = z.infer<typeof updateAssetRequest>;
|
|
158
|
+
export declare const assetListQuery: z.ZodObject<{
|
|
159
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
160
|
+
character: "character";
|
|
161
|
+
location: "location";
|
|
162
|
+
other: "other";
|
|
163
|
+
prop: "prop";
|
|
164
|
+
style: "style";
|
|
165
|
+
}>>;
|
|
166
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
167
|
+
image: "image";
|
|
168
|
+
video: "video";
|
|
169
|
+
}>>;
|
|
170
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
171
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, z.core.$strict>;
|
|
173
|
+
export type AssetListQuery = z.infer<typeof assetListQuery>;
|
|
174
|
+
export declare const asset: z.ZodObject<{
|
|
175
|
+
asset_id: z.ZodString;
|
|
176
|
+
state: z.ZodLiteral<"ready">;
|
|
177
|
+
kind: z.ZodEnum<{
|
|
178
|
+
image: "image";
|
|
179
|
+
video: "video";
|
|
180
|
+
}>;
|
|
181
|
+
role: z.ZodEnum<{
|
|
182
|
+
character: "character";
|
|
183
|
+
location: "location";
|
|
184
|
+
other: "other";
|
|
185
|
+
prop: "prop";
|
|
186
|
+
style: "style";
|
|
187
|
+
}>;
|
|
188
|
+
name: z.ZodString;
|
|
189
|
+
media_type: z.ZodEnum<{
|
|
190
|
+
"image/jpeg": "image/jpeg";
|
|
191
|
+
"image/png": "image/png";
|
|
192
|
+
"image/webp": "image/webp";
|
|
193
|
+
"video/mp4": "video/mp4";
|
|
194
|
+
}>;
|
|
195
|
+
bytes: z.ZodNumber;
|
|
196
|
+
width: z.ZodNumber;
|
|
197
|
+
height: z.ZodNumber;
|
|
198
|
+
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
199
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
200
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
201
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
202
|
+
content_digest: z.ZodString;
|
|
203
|
+
source_type: z.ZodEnum<{
|
|
204
|
+
base64: "base64";
|
|
205
|
+
bytes: "bytes";
|
|
206
|
+
generation: "generation";
|
|
207
|
+
put: "put";
|
|
208
|
+
upload: "upload";
|
|
209
|
+
url: "url";
|
|
210
|
+
}>;
|
|
211
|
+
url: z.ZodString;
|
|
212
|
+
expires_at: z.ZodString;
|
|
213
|
+
created_at: z.ZodString;
|
|
214
|
+
updated_at: z.ZodString;
|
|
215
|
+
}, z.core.$strict>;
|
|
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;
|
|
391
|
+
export declare const assetUsage: z.ZodObject<{
|
|
392
|
+
count: z.ZodNumber;
|
|
393
|
+
bytes: z.ZodNumber;
|
|
394
|
+
max_count: z.ZodNumber;
|
|
395
|
+
max_bytes: z.ZodNumber;
|
|
396
|
+
}, z.core.$strict>;
|
|
397
|
+
/** `pending` holds the account's assets still in progress and those refused within the day; the first page only. */
|
|
398
|
+
export declare const assetList: z.ZodObject<{
|
|
399
|
+
assets: z.ZodArray<z.ZodObject<{
|
|
400
|
+
asset_id: z.ZodString;
|
|
401
|
+
state: z.ZodLiteral<"ready">;
|
|
402
|
+
kind: z.ZodEnum<{
|
|
403
|
+
image: "image";
|
|
404
|
+
video: "video";
|
|
405
|
+
}>;
|
|
406
|
+
role: z.ZodEnum<{
|
|
407
|
+
character: "character";
|
|
408
|
+
location: "location";
|
|
409
|
+
other: "other";
|
|
410
|
+
prop: "prop";
|
|
411
|
+
style: "style";
|
|
412
|
+
}>;
|
|
413
|
+
name: z.ZodString;
|
|
414
|
+
media_type: z.ZodEnum<{
|
|
415
|
+
"image/jpeg": "image/jpeg";
|
|
416
|
+
"image/png": "image/png";
|
|
417
|
+
"image/webp": "image/webp";
|
|
418
|
+
"video/mp4": "video/mp4";
|
|
419
|
+
}>;
|
|
420
|
+
bytes: z.ZodNumber;
|
|
421
|
+
width: z.ZodNumber;
|
|
422
|
+
height: z.ZodNumber;
|
|
423
|
+
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
424
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
425
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
426
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
427
|
+
content_digest: z.ZodString;
|
|
428
|
+
source_type: z.ZodEnum<{
|
|
429
|
+
base64: "base64";
|
|
430
|
+
bytes: "bytes";
|
|
431
|
+
generation: "generation";
|
|
432
|
+
put: "put";
|
|
433
|
+
upload: "upload";
|
|
434
|
+
url: "url";
|
|
435
|
+
}>;
|
|
436
|
+
url: z.ZodString;
|
|
437
|
+
expires_at: z.ZodString;
|
|
438
|
+
created_at: z.ZodString;
|
|
439
|
+
updated_at: z.ZodString;
|
|
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>>;
|
|
488
|
+
next_cursor: z.ZodNullable<z.ZodString>;
|
|
489
|
+
usage: z.ZodObject<{
|
|
490
|
+
count: z.ZodNumber;
|
|
491
|
+
bytes: z.ZodNumber;
|
|
492
|
+
max_count: z.ZodNumber;
|
|
493
|
+
max_bytes: z.ZodNumber;
|
|
494
|
+
}, z.core.$strict>;
|
|
495
|
+
contract_version: z.ZodString;
|
|
496
|
+
}, z.core.$strict>;
|
|
497
|
+
export type AssetList = z.infer<typeof assetList>;
|
|
498
|
+
export declare const assetRead: z.ZodObject<{
|
|
499
|
+
asset_id: z.ZodString;
|
|
500
|
+
name: z.ZodString;
|
|
501
|
+
bytes: z.ZodNumber;
|
|
502
|
+
width: z.ZodNumber;
|
|
503
|
+
height: z.ZodNumber;
|
|
504
|
+
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
505
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
506
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
507
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
508
|
+
content_digest: z.ZodString;
|
|
509
|
+
url: z.ZodString;
|
|
510
|
+
expires_at: z.ZodString;
|
|
511
|
+
created_at: z.ZodString;
|
|
512
|
+
updated_at: z.ZodString;
|
|
513
|
+
state: z.ZodLiteral<"ready">;
|
|
514
|
+
kind: z.ZodString;
|
|
515
|
+
role: z.ZodString;
|
|
516
|
+
media_type: z.ZodString;
|
|
517
|
+
source_type: z.ZodString;
|
|
518
|
+
}, z.core.$loose>;
|
|
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>;
|
|
582
|
+
export declare const assetListRead: z.ZodObject<{
|
|
583
|
+
next_cursor: z.ZodNullable<z.ZodString>;
|
|
584
|
+
contract_version: z.ZodString;
|
|
585
|
+
assets: z.ZodArray<z.ZodObject<{
|
|
586
|
+
asset_id: z.ZodString;
|
|
587
|
+
name: z.ZodString;
|
|
588
|
+
bytes: z.ZodNumber;
|
|
589
|
+
width: z.ZodNumber;
|
|
590
|
+
height: z.ZodNumber;
|
|
591
|
+
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
592
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
593
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
594
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
595
|
+
content_digest: z.ZodString;
|
|
596
|
+
url: z.ZodString;
|
|
597
|
+
expires_at: z.ZodString;
|
|
598
|
+
created_at: z.ZodString;
|
|
599
|
+
updated_at: z.ZodString;
|
|
600
|
+
state: z.ZodLiteral<"ready">;
|
|
601
|
+
kind: z.ZodString;
|
|
602
|
+
role: z.ZodString;
|
|
603
|
+
media_type: z.ZodString;
|
|
604
|
+
source_type: z.ZodString;
|
|
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>>>;
|
|
626
|
+
usage: z.ZodObject<{
|
|
627
|
+
count: z.ZodNumber;
|
|
628
|
+
bytes: z.ZodNumber;
|
|
629
|
+
max_count: z.ZodNumber;
|
|
630
|
+
max_bytes: z.ZodNumber;
|
|
631
|
+
}, z.core.$loose>;
|
|
632
|
+
}, z.core.$loose>;
|
|
633
|
+
export type AssetListRead = z.infer<typeof assetListRead>;
|
|
634
|
+
/** The asset's own object: a new id per asset, so a copy never overwrites another asset. */
|
|
635
|
+
export declare function assetKey(accountId: string, id: string, sha256: string, mediaType: AssetMediaType): string;
|
|
636
|
+
export declare const ASSET_TOOL_TERMS: string;
|
|
637
|
+
export declare const CREATE_ASSET_DESCRIPTION: string;
|
|
638
|
+
export declare const LIST_ASSETS_DESCRIPTION: string;
|
|
639
|
+
export declare const GET_ASSET_DESCRIPTION: string;
|
|
640
|
+
export declare const UPDATE_ASSET_DESCRIPTION = "Rename an asset or change its role; the picture itself does not change. Free.";
|
|
641
|
+
export declare const DELETE_ASSET_DESCRIPTION: string;
|