@clipwright/core 0.33.0 → 0.35.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 +251 -0
- package/README.md +3 -1
- package/dist/account-actors.d.ts +173 -14
- package/dist/account-actors.js +142 -10
- package/dist/account-actors.js.map +1 -1
- package/dist/actor-bounds.d.ts +4 -0
- package/dist/actor-bounds.js +4 -0
- package/dist/actor-bounds.js.map +1 -1
- package/dist/actors.d.ts +31 -0
- package/dist/actors.js +26 -0
- package/dist/actors.js.map +1 -1
- 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 +403 -8
- package/dist/assets.js +132 -22
- package/dist/assets.js.map +1 -1
- package/dist/billing-terms.d.ts +69 -0
- package/dist/billing-terms.js +8 -0
- package/dist/billing-terms.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 +1617 -8
- package/dist/contract-dispositions.js +75 -11
- package/dist/contract-dispositions.js.map +1 -1
- package/dist/contracts/v1/workflow-brief.d.ts +3166 -78
- package/dist/contracts/v1/workflow-brief.js +4 -0
- package/dist/contracts/v1/workflow-brief.js.map +1 -1
- package/dist/contracts/v1/workflow-catalog.d.ts +3712 -8
- package/dist/contracts/v1/workflow-catalog.js +4 -2
- package/dist/contracts/v1/workflow-catalog.js.map +1 -1
- package/dist/contracts/v1/workflow-client.d.ts +2466 -4
- package/dist/contracts/v1/workflow-client.js +6 -3
- package/dist/contracts/v1/workflow-client.js.map +1 -1
- package/dist/contracts/v1/workflow-execution.d.ts +163 -9
- package/dist/contracts/v1/workflow-execution.js +15 -7
- package/dist/contracts/v1/workflow-execution.js.map +1 -1
- package/dist/contracts/v1/workflow-plan.d.ts +6014 -487
- package/dist/contracts/v1/workflow-primitives.d.ts +3 -1
- package/dist/contracts/v1/workflow-primitives.js +1 -1
- package/dist/contracts/v1/workflow-primitives.js.map +1 -1
- package/dist/contracts/v1/workflow-run-read.d.ts +114 -1
- package/dist/edit-billing.d.ts +12 -0
- package/dist/edit-billing.js +8 -0
- package/dist/edit-billing.js.map +1 -1
- package/dist/edit-long-form.d.ts +1 -1
- package/dist/edit-long-form.js +12 -2
- package/dist/edit-long-form.js.map +1 -1
- package/dist/endpoint-notes.d.ts +3 -0
- package/dist/endpoint-notes.js +66 -0
- package/dist/endpoint-notes.js.map +1 -0
- package/dist/endpoints.d.ts +4 -0
- package/dist/endpoints.js +15 -0
- package/dist/endpoints.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +7 -0
- package/dist/errors.js.map +1 -1
- package/dist/face-billing.d.ts +55 -0
- package/dist/face-billing.js +22 -0
- package/dist/face-billing.js.map +1 -1
- package/dist/faceless-price.d.ts +26 -2
- package/dist/faceless-price.js +33 -6
- package/dist/faceless-price.js.map +1 -1
- package/dist/faceless-public.d.ts +6 -1
- package/dist/faceless-public.js +2 -2
- package/dist/faceless-public.js.map +1 -1
- package/dist/generations.d.ts +32 -6
- package/dist/generations.js +82 -27
- package/dist/generations.js.map +1 -1
- package/dist/idempotency.d.ts +2 -0
- package/dist/idempotency.js +7 -4
- package/dist/idempotency.js.map +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/long-form-pricing.d.ts +7 -4
- package/dist/long-form-pricing.js +13 -10
- package/dist/long-form-pricing.js.map +1 -1
- package/dist/long-form-revision.js +1 -1
- package/dist/long-form-revision.js.map +1 -1
- package/dist/openapi.d.ts +154 -0
- package/dist/openapi.js +334 -0
- package/dist/openapi.js.map +1 -0
- package/dist/pacing.d.ts +15 -0
- package/dist/pacing.js +30 -0
- package/dist/pacing.js.map +1 -1
- package/dist/parts-pricing.d.ts +84 -0
- package/dist/parts-pricing.js +105 -0
- package/dist/parts-pricing.js.map +1 -0
- package/dist/presenter-beats.d.ts +45 -0
- package/dist/presenter-beats.js +144 -0
- package/dist/presenter-beats.js.map +1 -0
- package/dist/prices.d.ts +98 -0
- package/dist/prices.js +189 -0
- package/dist/prices.js.map +1 -0
- 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/public-responses.d.ts +23 -0
- package/dist/public-responses.js +11 -0
- package/dist/public-responses.js.map +1 -0
- package/dist/reference-analysis.d.ts +683 -0
- package/dist/reference-analysis.js +91 -0
- package/dist/reference-analysis.js.map +1 -0
- package/dist/reference-kinds.d.ts +6 -0
- package/dist/reference-kinds.js +8 -0
- package/dist/reference-kinds.js.map +1 -0
- package/dist/reference-profile.d.ts +633 -0
- package/dist/reference-profile.js +151 -0
- package/dist/reference-profile.js.map +1 -0
- package/dist/reference-staging.d.ts +571 -0
- package/dist/reference-staging.js +151 -0
- package/dist/reference-staging.js.map +1 -0
- package/dist/reference-voice.d.ts +305 -0
- package/dist/reference-voice.js +108 -0
- package/dist/reference-voice.js.map +1 -0
- package/dist/resolved-timeline.d.ts +206 -1
- package/dist/resolved-timeline.js +96 -4
- package/dist/resolved-timeline.js.map +1 -1
- package/dist/run-static-warnings.js +19 -7
- package/dist/run-static-warnings.js.map +1 -1
- package/dist/runs.d.ts +75 -3
- package/dist/runs.js +6 -1
- package/dist/runs.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 +5838 -22
- package/dist/skills.js +380 -25
- 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 +171 -0
- package/dist/templates/index.js +394 -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 +27 -0
- package/dist/templates/phone-call.js +43 -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 +701 -0
- package/dist/templates/sounds.js +89 -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-call.d.ts +89 -0
- package/dist/ugc-call.js +111 -0
- package/dist/ugc-call.js.map +1 -0
- package/dist/ugc-framing.d.ts +26 -0
- package/dist/ugc-framing.js +64 -0
- package/dist/ugc-framing.js.map +1 -0
- package/dist/ugc-layers.d.ts +88 -0
- package/dist/ugc-layers.js +142 -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/vendor-response.d.ts +4 -0
- package/dist/vendor-response.js +12 -0
- package/dist/vendor-response.js.map +1 -1
- package/dist/voice-admission.d.ts +1244 -1
- package/dist/voice-listing.js +7 -1
- package/dist/voice-listing.js.map +1 -1
- package/dist/voice-pace.d.ts +34 -0
- package/dist/voice-pace.generated.json +72 -0
- package/dist/voice-pace.js +34 -0
- package/dist/voice-pace.js.map +1 -0
- package/dist/voices.d.ts +21 -8
- package/dist/voices.js +44 -19
- package/dist/voices.js.map +1 -1
- package/dist/workflows/catalog.js +2 -1
- package/dist/workflows/catalog.js.map +1 -1
- package/dist/workflows/index.d.ts +2 -0
- package/dist/workflows/index.js +2 -0
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/methods/faceless-explainer.d.ts +697 -3
- package/dist/workflows/methods/kinetic-launch.d.ts +697 -3
- package/dist/workflows/methods/product-image-story.d.ts +697 -3
- package/dist/workflows/methods/reference-remake.d.ts +870 -0
- package/dist/workflows/methods/reference-remake.js +26 -0
- package/dist/workflows/methods/reference-remake.js.map +1 -0
- package/dist/workflows/methods/shared.d.ts +697 -3
- package/dist/workflows/methods/ugc-faq-answer.d.ts +697 -3
- package/dist/workflows/methods/ugc-product-intro.d.ts +697 -3
- package/dist/workflows/methods/website-proof-demo.d.ts +697 -3
- package/dist/workflows/reference-remake.d.ts +663 -0
- package/dist/workflows/reference-remake.js +598 -0
- package/dist/workflows/reference-remake.js.map +1 -0
- package/dist/workflows/validate.js +19 -11
- package/dist/workflows/validate.js.map +1 -1
- package/package.json +9 -3
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,33 +18,83 @@ 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
|
+
/** Why a render or generation refuses an analysis-only asset (#884); the caller prefixes the field and the id. */
|
|
96
|
+
export declare const ANALYSIS_ONLY_ASSET_REFUSAL: string;
|
|
97
|
+
/** The customer's own material needs `rights_confirmed` (stated once, at creation) or `analysis_only`, which keeps it out of every render. */
|
|
47
98
|
export declare const createAssetRequest: z.ZodObject<{
|
|
48
99
|
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
49
100
|
run_id: z.ZodString;
|
|
@@ -51,12 +102,26 @@ export declare const createAssetRequest: z.ZodObject<{
|
|
|
51
102
|
upload_id: z.ZodString;
|
|
52
103
|
}, z.core.$strict>, z.ZodObject<{
|
|
53
104
|
url: z.ZodString;
|
|
105
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
106
|
+
image: "image";
|
|
107
|
+
video: "video";
|
|
108
|
+
}>>;
|
|
54
109
|
}, z.core.$strict>, z.ZodObject<{
|
|
55
110
|
base64: z.ZodString;
|
|
56
111
|
media_type: z.ZodEnum<{
|
|
57
112
|
"image/jpeg": "image/jpeg";
|
|
58
113
|
"image/png": "image/png";
|
|
59
114
|
}>;
|
|
115
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
116
|
+
put: z.ZodObject<{
|
|
117
|
+
media_type: z.ZodEnum<{
|
|
118
|
+
"image/jpeg": "image/jpeg";
|
|
119
|
+
"image/png": "image/png";
|
|
120
|
+
"video/mp4": "video/mp4";
|
|
121
|
+
}>;
|
|
122
|
+
bytes: z.ZodNumber;
|
|
123
|
+
sha256: z.ZodString;
|
|
124
|
+
}, z.core.$strict>;
|
|
60
125
|
}, z.core.$strict>]>;
|
|
61
126
|
role: z.ZodEnum<{
|
|
62
127
|
character: "character";
|
|
@@ -67,6 +132,7 @@ export declare const createAssetRequest: z.ZodObject<{
|
|
|
67
132
|
}>;
|
|
68
133
|
name: z.ZodString;
|
|
69
134
|
rights_confirmed: z.ZodOptional<z.ZodLiteral<true>>;
|
|
135
|
+
analysis_only: z.ZodOptional<z.ZodLiteral<true>>;
|
|
70
136
|
}, z.core.$strict>;
|
|
71
137
|
export type CreateAssetRequest = z.infer<typeof createAssetRequest>;
|
|
72
138
|
/** The query of `POST /v1/assets/bytes`. */
|
|
@@ -80,6 +146,7 @@ export declare const assetBytesQuery: z.ZodObject<{
|
|
|
80
146
|
}>;
|
|
81
147
|
name: z.ZodString;
|
|
82
148
|
rights_confirmed: z.ZodOptional<z.ZodLiteral<"true">>;
|
|
149
|
+
analysis_only: z.ZodOptional<z.ZodLiteral<"true">>;
|
|
83
150
|
}, z.core.$strict>;
|
|
84
151
|
export declare const updateAssetRequest: z.ZodObject<{
|
|
85
152
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -110,6 +177,7 @@ export declare const assetListQuery: z.ZodObject<{
|
|
|
110
177
|
export type AssetListQuery = z.infer<typeof assetListQuery>;
|
|
111
178
|
export declare const asset: z.ZodObject<{
|
|
112
179
|
asset_id: z.ZodString;
|
|
180
|
+
state: z.ZodLiteral<"ready">;
|
|
113
181
|
kind: z.ZodEnum<{
|
|
114
182
|
image: "image";
|
|
115
183
|
video: "video";
|
|
@@ -133,6 +201,8 @@ export declare const asset: z.ZodObject<{
|
|
|
133
201
|
height: z.ZodNumber;
|
|
134
202
|
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
135
203
|
fps: z.ZodNullable<z.ZodNumber>;
|
|
204
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
205
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
136
206
|
content_digest: z.ZodString;
|
|
137
207
|
source_type: z.ZodEnum<{
|
|
138
208
|
base64: "base64";
|
|
@@ -142,21 +212,201 @@ export declare const asset: z.ZodObject<{
|
|
|
142
212
|
upload: "upload";
|
|
143
213
|
url: "url";
|
|
144
214
|
}>;
|
|
215
|
+
analysis_only: z.ZodBoolean;
|
|
145
216
|
url: z.ZodString;
|
|
146
217
|
expires_at: z.ZodString;
|
|
147
218
|
created_at: z.ZodString;
|
|
148
219
|
updated_at: z.ZodString;
|
|
149
220
|
}, z.core.$strict>;
|
|
150
221
|
export type Asset = z.infer<typeof asset>;
|
|
222
|
+
/** Where a PUT goes: signed for 15 minutes with exactly these two headers, and finished within a day. */
|
|
223
|
+
export declare const assetPutUpload: z.ZodObject<{
|
|
224
|
+
put_url: z.ZodString;
|
|
225
|
+
put_headers: z.ZodObject<{
|
|
226
|
+
"content-type": z.ZodEnum<{
|
|
227
|
+
"image/jpeg": "image/jpeg";
|
|
228
|
+
"image/png": "image/png";
|
|
229
|
+
"video/mp4": "video/mp4";
|
|
230
|
+
}>;
|
|
231
|
+
"content-length": z.ZodString;
|
|
232
|
+
}, z.core.$strict>;
|
|
233
|
+
expires_at: z.ZodString;
|
|
234
|
+
finish_by: z.ZodString;
|
|
235
|
+
}, z.core.$strict>;
|
|
236
|
+
/** An asset before it exists: waiting for its PUT, being checked by the worker, or refused with the reason. */
|
|
237
|
+
export declare const ASSET_PENDING_STATES: readonly ["awaiting_upload", "processing", "failed"];
|
|
238
|
+
export declare const pendingAsset: z.ZodObject<{
|
|
239
|
+
asset_id: z.ZodString;
|
|
240
|
+
state: z.ZodEnum<{
|
|
241
|
+
awaiting_upload: "awaiting_upload";
|
|
242
|
+
failed: "failed";
|
|
243
|
+
processing: "processing";
|
|
244
|
+
}>;
|
|
245
|
+
kind: z.ZodEnum<{
|
|
246
|
+
image: "image";
|
|
247
|
+
video: "video";
|
|
248
|
+
}>;
|
|
249
|
+
role: z.ZodEnum<{
|
|
250
|
+
character: "character";
|
|
251
|
+
location: "location";
|
|
252
|
+
other: "other";
|
|
253
|
+
prop: "prop";
|
|
254
|
+
style: "style";
|
|
255
|
+
}>;
|
|
256
|
+
name: z.ZodString;
|
|
257
|
+
source_type: z.ZodEnum<{
|
|
258
|
+
base64: "base64";
|
|
259
|
+
bytes: "bytes";
|
|
260
|
+
generation: "generation";
|
|
261
|
+
put: "put";
|
|
262
|
+
upload: "upload";
|
|
263
|
+
url: "url";
|
|
264
|
+
}>;
|
|
265
|
+
analysis_only: z.ZodBoolean;
|
|
266
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
267
|
+
code: z.ZodString;
|
|
268
|
+
message: z.ZodString;
|
|
269
|
+
}, z.core.$strict>>;
|
|
270
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
271
|
+
created_at: z.ZodString;
|
|
272
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
273
|
+
put_url: z.ZodString;
|
|
274
|
+
put_headers: z.ZodObject<{
|
|
275
|
+
"content-type": z.ZodEnum<{
|
|
276
|
+
"image/jpeg": "image/jpeg";
|
|
277
|
+
"image/png": "image/png";
|
|
278
|
+
"video/mp4": "video/mp4";
|
|
279
|
+
}>;
|
|
280
|
+
"content-length": z.ZodString;
|
|
281
|
+
}, z.core.$strict>;
|
|
282
|
+
expires_at: z.ZodString;
|
|
283
|
+
finish_by: z.ZodString;
|
|
284
|
+
}, z.core.$strict>>;
|
|
285
|
+
}, z.core.$strict>;
|
|
286
|
+
export type PendingAsset = z.infer<typeof pendingAsset>;
|
|
287
|
+
export declare const assetItem: z.ZodUnion<readonly [z.ZodObject<{
|
|
288
|
+
asset_id: z.ZodString;
|
|
289
|
+
state: z.ZodLiteral<"ready">;
|
|
290
|
+
kind: z.ZodEnum<{
|
|
291
|
+
image: "image";
|
|
292
|
+
video: "video";
|
|
293
|
+
}>;
|
|
294
|
+
role: z.ZodEnum<{
|
|
295
|
+
character: "character";
|
|
296
|
+
location: "location";
|
|
297
|
+
other: "other";
|
|
298
|
+
prop: "prop";
|
|
299
|
+
style: "style";
|
|
300
|
+
}>;
|
|
301
|
+
name: z.ZodString;
|
|
302
|
+
media_type: z.ZodEnum<{
|
|
303
|
+
"image/jpeg": "image/jpeg";
|
|
304
|
+
"image/png": "image/png";
|
|
305
|
+
"image/webp": "image/webp";
|
|
306
|
+
"video/mp4": "video/mp4";
|
|
307
|
+
}>;
|
|
308
|
+
bytes: z.ZodNumber;
|
|
309
|
+
width: z.ZodNumber;
|
|
310
|
+
height: z.ZodNumber;
|
|
311
|
+
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
312
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
313
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
314
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
315
|
+
content_digest: z.ZodString;
|
|
316
|
+
source_type: z.ZodEnum<{
|
|
317
|
+
base64: "base64";
|
|
318
|
+
bytes: "bytes";
|
|
319
|
+
generation: "generation";
|
|
320
|
+
put: "put";
|
|
321
|
+
upload: "upload";
|
|
322
|
+
url: "url";
|
|
323
|
+
}>;
|
|
324
|
+
analysis_only: z.ZodBoolean;
|
|
325
|
+
url: z.ZodString;
|
|
326
|
+
expires_at: z.ZodString;
|
|
327
|
+
created_at: z.ZodString;
|
|
328
|
+
updated_at: z.ZodString;
|
|
329
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
330
|
+
asset_id: z.ZodString;
|
|
331
|
+
state: z.ZodEnum<{
|
|
332
|
+
awaiting_upload: "awaiting_upload";
|
|
333
|
+
failed: "failed";
|
|
334
|
+
processing: "processing";
|
|
335
|
+
}>;
|
|
336
|
+
kind: z.ZodEnum<{
|
|
337
|
+
image: "image";
|
|
338
|
+
video: "video";
|
|
339
|
+
}>;
|
|
340
|
+
role: z.ZodEnum<{
|
|
341
|
+
character: "character";
|
|
342
|
+
location: "location";
|
|
343
|
+
other: "other";
|
|
344
|
+
prop: "prop";
|
|
345
|
+
style: "style";
|
|
346
|
+
}>;
|
|
347
|
+
name: z.ZodString;
|
|
348
|
+
source_type: z.ZodEnum<{
|
|
349
|
+
base64: "base64";
|
|
350
|
+
bytes: "bytes";
|
|
351
|
+
generation: "generation";
|
|
352
|
+
put: "put";
|
|
353
|
+
upload: "upload";
|
|
354
|
+
url: "url";
|
|
355
|
+
}>;
|
|
356
|
+
analysis_only: z.ZodBoolean;
|
|
357
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
358
|
+
code: z.ZodString;
|
|
359
|
+
message: z.ZodString;
|
|
360
|
+
}, z.core.$strict>>;
|
|
361
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
362
|
+
created_at: z.ZodString;
|
|
363
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
364
|
+
put_url: z.ZodString;
|
|
365
|
+
put_headers: z.ZodObject<{
|
|
366
|
+
"content-type": z.ZodEnum<{
|
|
367
|
+
"image/jpeg": "image/jpeg";
|
|
368
|
+
"image/png": "image/png";
|
|
369
|
+
"video/mp4": "video/mp4";
|
|
370
|
+
}>;
|
|
371
|
+
"content-length": z.ZodString;
|
|
372
|
+
}, z.core.$strict>;
|
|
373
|
+
expires_at: z.ZodString;
|
|
374
|
+
finish_by: z.ZodString;
|
|
375
|
+
}, z.core.$strict>>;
|
|
376
|
+
}, z.core.$strict>]>;
|
|
377
|
+
export type AssetItem = z.infer<typeof assetItem>;
|
|
378
|
+
/** Why a pending asset failed, as `error.code`; these never come as an HTTP error of their own. */
|
|
379
|
+
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"];
|
|
380
|
+
export type AssetIngestFailureCode = (typeof ASSET_INGEST_FAILURE_CODES)[number];
|
|
381
|
+
/** What the API hands the worker: which pending asset, and whether its bytes are at a url or already staged. */
|
|
382
|
+
export declare const ingestAssetMediaPayload: z.ZodObject<{
|
|
383
|
+
assetId: z.ZodString;
|
|
384
|
+
accountId: z.ZodString;
|
|
385
|
+
source: z.ZodEnum<{
|
|
386
|
+
staging: "staging";
|
|
387
|
+
url: "url";
|
|
388
|
+
}>;
|
|
389
|
+
}, z.core.$strict>;
|
|
390
|
+
export type IngestAssetMediaPayload = z.infer<typeof ingestAssetMediaPayload>;
|
|
391
|
+
/** The preview task takes the id only; it reads the account from the row. */
|
|
392
|
+
export declare const assetPreviewPayload: z.ZodObject<{
|
|
393
|
+
assetId: z.ZodString;
|
|
394
|
+
}, z.core.$strict>;
|
|
395
|
+
export type AssetPreviewPayload = z.infer<typeof assetPreviewPayload>;
|
|
396
|
+
/** One run per asset across every caller: created with `scope: "global"`, since a raw string inside a task is per run. */
|
|
397
|
+
export declare const assetPreviewIdempotencyKey: (id: string) => string;
|
|
398
|
+
export declare const assetPreviewKey: (accountId: string, id: string) => string;
|
|
151
399
|
export declare const assetUsage: z.ZodObject<{
|
|
152
400
|
count: z.ZodNumber;
|
|
153
401
|
bytes: z.ZodNumber;
|
|
154
402
|
max_count: z.ZodNumber;
|
|
155
403
|
max_bytes: z.ZodNumber;
|
|
156
404
|
}, z.core.$strict>;
|
|
405
|
+
/** `pending` holds the account's assets still in progress and those refused within the day; the first page only. */
|
|
157
406
|
export declare const assetList: z.ZodObject<{
|
|
158
407
|
assets: z.ZodArray<z.ZodObject<{
|
|
159
408
|
asset_id: z.ZodString;
|
|
409
|
+
state: z.ZodLiteral<"ready">;
|
|
160
410
|
kind: z.ZodEnum<{
|
|
161
411
|
image: "image";
|
|
162
412
|
video: "video";
|
|
@@ -180,6 +430,8 @@ export declare const assetList: z.ZodObject<{
|
|
|
180
430
|
height: z.ZodNumber;
|
|
181
431
|
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
182
432
|
fps: z.ZodNullable<z.ZodNumber>;
|
|
433
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
434
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
183
435
|
content_digest: z.ZodString;
|
|
184
436
|
source_type: z.ZodEnum<{
|
|
185
437
|
base64: "base64";
|
|
@@ -189,11 +441,60 @@ export declare const assetList: z.ZodObject<{
|
|
|
189
441
|
upload: "upload";
|
|
190
442
|
url: "url";
|
|
191
443
|
}>;
|
|
444
|
+
analysis_only: z.ZodBoolean;
|
|
192
445
|
url: z.ZodString;
|
|
193
446
|
expires_at: z.ZodString;
|
|
194
447
|
created_at: z.ZodString;
|
|
195
448
|
updated_at: z.ZodString;
|
|
196
449
|
}, z.core.$strict>>;
|
|
450
|
+
pending: z.ZodArray<z.ZodObject<{
|
|
451
|
+
asset_id: z.ZodString;
|
|
452
|
+
state: z.ZodEnum<{
|
|
453
|
+
awaiting_upload: "awaiting_upload";
|
|
454
|
+
failed: "failed";
|
|
455
|
+
processing: "processing";
|
|
456
|
+
}>;
|
|
457
|
+
kind: z.ZodEnum<{
|
|
458
|
+
image: "image";
|
|
459
|
+
video: "video";
|
|
460
|
+
}>;
|
|
461
|
+
role: z.ZodEnum<{
|
|
462
|
+
character: "character";
|
|
463
|
+
location: "location";
|
|
464
|
+
other: "other";
|
|
465
|
+
prop: "prop";
|
|
466
|
+
style: "style";
|
|
467
|
+
}>;
|
|
468
|
+
name: z.ZodString;
|
|
469
|
+
source_type: z.ZodEnum<{
|
|
470
|
+
base64: "base64";
|
|
471
|
+
bytes: "bytes";
|
|
472
|
+
generation: "generation";
|
|
473
|
+
put: "put";
|
|
474
|
+
upload: "upload";
|
|
475
|
+
url: "url";
|
|
476
|
+
}>;
|
|
477
|
+
analysis_only: z.ZodBoolean;
|
|
478
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
479
|
+
code: z.ZodString;
|
|
480
|
+
message: z.ZodString;
|
|
481
|
+
}, z.core.$strict>>;
|
|
482
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
483
|
+
created_at: z.ZodString;
|
|
484
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
485
|
+
put_url: z.ZodString;
|
|
486
|
+
put_headers: z.ZodObject<{
|
|
487
|
+
"content-type": z.ZodEnum<{
|
|
488
|
+
"image/jpeg": "image/jpeg";
|
|
489
|
+
"image/png": "image/png";
|
|
490
|
+
"video/mp4": "video/mp4";
|
|
491
|
+
}>;
|
|
492
|
+
"content-length": z.ZodString;
|
|
493
|
+
}, z.core.$strict>;
|
|
494
|
+
expires_at: z.ZodString;
|
|
495
|
+
finish_by: z.ZodString;
|
|
496
|
+
}, z.core.$strict>>;
|
|
497
|
+
}, z.core.$strict>>;
|
|
197
498
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
198
499
|
usage: z.ZodObject<{
|
|
199
500
|
count: z.ZodNumber;
|
|
@@ -212,17 +513,86 @@ export declare const assetRead: z.ZodObject<{
|
|
|
212
513
|
height: z.ZodNumber;
|
|
213
514
|
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
214
515
|
fps: z.ZodNullable<z.ZodNumber>;
|
|
516
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
517
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
215
518
|
content_digest: z.ZodString;
|
|
216
519
|
url: z.ZodString;
|
|
217
520
|
expires_at: z.ZodString;
|
|
218
521
|
created_at: z.ZodString;
|
|
219
522
|
updated_at: z.ZodString;
|
|
523
|
+
state: z.ZodLiteral<"ready">;
|
|
220
524
|
kind: z.ZodString;
|
|
221
525
|
role: z.ZodString;
|
|
222
526
|
media_type: z.ZodString;
|
|
223
527
|
source_type: z.ZodString;
|
|
528
|
+
analysis_only: z.ZodOptional<z.ZodBoolean>;
|
|
224
529
|
}, z.core.$loose>;
|
|
225
530
|
export type AssetRead = z.infer<typeof assetRead>;
|
|
531
|
+
export declare const pendingAssetRead: z.ZodObject<{
|
|
532
|
+
asset_id: z.ZodString;
|
|
533
|
+
name: z.ZodString;
|
|
534
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
535
|
+
created_at: z.ZodString;
|
|
536
|
+
state: z.ZodString;
|
|
537
|
+
kind: z.ZodString;
|
|
538
|
+
role: z.ZodString;
|
|
539
|
+
source_type: z.ZodString;
|
|
540
|
+
analysis_only: z.ZodOptional<z.ZodBoolean>;
|
|
541
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
542
|
+
code: z.ZodString;
|
|
543
|
+
message: z.ZodString;
|
|
544
|
+
}, z.core.$loose>>;
|
|
545
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
546
|
+
put_url: z.ZodString;
|
|
547
|
+
expires_at: z.ZodString;
|
|
548
|
+
finish_by: z.ZodString;
|
|
549
|
+
put_headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
550
|
+
}, z.core.$loose>>;
|
|
551
|
+
}, z.core.$loose>;
|
|
552
|
+
export type PendingAssetRead = z.infer<typeof pendingAssetRead>;
|
|
553
|
+
export declare const assetItemRead: z.ZodUnion<readonly [z.ZodObject<{
|
|
554
|
+
asset_id: z.ZodString;
|
|
555
|
+
name: z.ZodString;
|
|
556
|
+
bytes: z.ZodNumber;
|
|
557
|
+
width: z.ZodNumber;
|
|
558
|
+
height: z.ZodNumber;
|
|
559
|
+
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
560
|
+
fps: z.ZodNullable<z.ZodNumber>;
|
|
561
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
562
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
563
|
+
content_digest: z.ZodString;
|
|
564
|
+
url: z.ZodString;
|
|
565
|
+
expires_at: z.ZodString;
|
|
566
|
+
created_at: z.ZodString;
|
|
567
|
+
updated_at: z.ZodString;
|
|
568
|
+
state: z.ZodLiteral<"ready">;
|
|
569
|
+
kind: z.ZodString;
|
|
570
|
+
role: z.ZodString;
|
|
571
|
+
media_type: z.ZodString;
|
|
572
|
+
source_type: z.ZodString;
|
|
573
|
+
analysis_only: z.ZodOptional<z.ZodBoolean>;
|
|
574
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
575
|
+
asset_id: z.ZodString;
|
|
576
|
+
name: z.ZodString;
|
|
577
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
578
|
+
created_at: z.ZodString;
|
|
579
|
+
state: z.ZodString;
|
|
580
|
+
kind: z.ZodString;
|
|
581
|
+
role: z.ZodString;
|
|
582
|
+
source_type: z.ZodString;
|
|
583
|
+
analysis_only: z.ZodOptional<z.ZodBoolean>;
|
|
584
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
585
|
+
code: z.ZodString;
|
|
586
|
+
message: z.ZodString;
|
|
587
|
+
}, z.core.$loose>>;
|
|
588
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
589
|
+
put_url: z.ZodString;
|
|
590
|
+
expires_at: z.ZodString;
|
|
591
|
+
finish_by: z.ZodString;
|
|
592
|
+
put_headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
593
|
+
}, z.core.$loose>>;
|
|
594
|
+
}, z.core.$loose>]>;
|
|
595
|
+
export type AssetItemRead = z.infer<typeof assetItemRead>;
|
|
226
596
|
export declare const assetListRead: z.ZodObject<{
|
|
227
597
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
228
598
|
contract_version: z.ZodString;
|
|
@@ -234,16 +604,41 @@ export declare const assetListRead: z.ZodObject<{
|
|
|
234
604
|
height: z.ZodNumber;
|
|
235
605
|
duration_frames: z.ZodNullable<z.ZodNumber>;
|
|
236
606
|
fps: z.ZodNullable<z.ZodNumber>;
|
|
607
|
+
codec: z.ZodNullable<z.ZodString>;
|
|
608
|
+
pix_fmt: z.ZodNullable<z.ZodString>;
|
|
237
609
|
content_digest: z.ZodString;
|
|
238
610
|
url: z.ZodString;
|
|
239
611
|
expires_at: z.ZodString;
|
|
240
612
|
created_at: z.ZodString;
|
|
241
613
|
updated_at: z.ZodString;
|
|
614
|
+
state: z.ZodLiteral<"ready">;
|
|
242
615
|
kind: z.ZodString;
|
|
243
616
|
role: z.ZodString;
|
|
244
617
|
media_type: z.ZodString;
|
|
245
618
|
source_type: z.ZodString;
|
|
619
|
+
analysis_only: z.ZodOptional<z.ZodBoolean>;
|
|
246
620
|
}, z.core.$loose>>;
|
|
621
|
+
pending: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
622
|
+
asset_id: z.ZodString;
|
|
623
|
+
name: z.ZodString;
|
|
624
|
+
processing_deadline: z.ZodNullable<z.ZodString>;
|
|
625
|
+
created_at: z.ZodString;
|
|
626
|
+
state: z.ZodString;
|
|
627
|
+
kind: z.ZodString;
|
|
628
|
+
role: z.ZodString;
|
|
629
|
+
source_type: z.ZodString;
|
|
630
|
+
analysis_only: z.ZodOptional<z.ZodBoolean>;
|
|
631
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
632
|
+
code: z.ZodString;
|
|
633
|
+
message: z.ZodString;
|
|
634
|
+
}, z.core.$loose>>;
|
|
635
|
+
upload: z.ZodOptional<z.ZodObject<{
|
|
636
|
+
put_url: z.ZodString;
|
|
637
|
+
expires_at: z.ZodString;
|
|
638
|
+
finish_by: z.ZodString;
|
|
639
|
+
put_headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
640
|
+
}, z.core.$loose>>;
|
|
641
|
+
}, z.core.$loose>>>;
|
|
247
642
|
usage: z.ZodObject<{
|
|
248
643
|
count: z.ZodNumber;
|
|
249
644
|
bytes: z.ZodNumber;
|