@shotstack/schemas 1.17.0 → 1.18.1
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/dist/api.bundled.json +190 -5
- package/dist/json-schema/edit.json +5 -4
- package/dist/json-schema/index.cjs +1 -1
- package/dist/json-schema/index.js +1 -1
- package/dist/schema.d.ts +194 -8
- package/dist/zod/zod.gen.cjs +92 -11
- package/dist/zod/zod.gen.d.ts +149 -5
- package/dist/zod/zod.gen.js +85 -5
- package/dist/zod/zod.gen.ts +82 -5
- package/package.json +1 -1
package/dist/zod/zod.gen.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export declare const assetsidRootSchema: z.ZodUnknown;
|
|
|
6
6
|
export declare const assetsrenderidRootSchema: z.ZodUnknown;
|
|
7
7
|
export declare const generateRootSchema: z.ZodUnknown;
|
|
8
8
|
export declare const generateidRootSchema: z.ZodUnknown;
|
|
9
|
+
export declare const modelsRootSchema: z.ZodUnknown;
|
|
10
|
+
export declare const modelsidRootSchema: z.ZodUnknown;
|
|
9
11
|
export declare const probeRootSchema: z.ZodUnknown;
|
|
10
12
|
export declare const renderRootSchema: z.ZodUnknown;
|
|
11
13
|
export declare const renderidRootSchema: z.ZodUnknown;
|
|
@@ -65,6 +67,8 @@ export declare const captionMarginSchema: z.ZodObject<{
|
|
|
65
67
|
right: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
66
68
|
}, z.core.$strict>;
|
|
67
69
|
/**
|
|
70
|
+
* **Notice: The CaptionAsset is deprecated, use the [RichCaptionAsset](#tocs_richcaptionasset) instead.**
|
|
71
|
+
*
|
|
68
72
|
* The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
|
|
69
73
|
* be read and burnt to the video.
|
|
70
74
|
*
|
|
@@ -75,6 +79,8 @@ export declare const captionMarginSchema: z.ZodObject<{
|
|
|
75
79
|
* To sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with
|
|
76
80
|
* matching start and end time.
|
|
77
81
|
*
|
|
82
|
+
*
|
|
83
|
+
* @deprecated
|
|
78
84
|
*/
|
|
79
85
|
export declare const captionassetCaptionAssetSchema: z.ZodObject<{
|
|
80
86
|
type: z.ZodEnum<{
|
|
@@ -754,6 +760,45 @@ export declare const fontFontSchema: z.ZodObject<{
|
|
|
754
760
|
export declare const fontSchema: z.ZodObject<{
|
|
755
761
|
src: z.ZodString;
|
|
756
762
|
}, z.core.$strict>;
|
|
763
|
+
/**
|
|
764
|
+
* What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
|
|
765
|
+
*/
|
|
766
|
+
export declare const generationmodelpricingGenerationModelPricingSchema: z.ZodObject<{
|
|
767
|
+
unit: z.ZodEnum<{
|
|
768
|
+
render: "render";
|
|
769
|
+
second: "second";
|
|
770
|
+
minute: "minute";
|
|
771
|
+
thousandCharacters: "thousandCharacters";
|
|
772
|
+
}>;
|
|
773
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
774
|
+
tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
775
|
+
minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
776
|
+
effectiveFrom: z.ZodString;
|
|
777
|
+
}, z.core.$strict>;
|
|
778
|
+
/**
|
|
779
|
+
* A generation model available to `prompt`-bearing image, video and audio assets, with the options it accepts and what it costs. Render a model picker and its option fields from this rather than hard coding a model list, so a newly launched model is available without a client release.
|
|
780
|
+
*/
|
|
781
|
+
export declare const generationmodelGenerationModelSchema: z.ZodObject<{
|
|
782
|
+
model: z.ZodString;
|
|
783
|
+
type: z.ZodEnum<{
|
|
784
|
+
image: "image";
|
|
785
|
+
video: "video";
|
|
786
|
+
audio: "audio";
|
|
787
|
+
}>;
|
|
788
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
789
|
+
unit: z.ZodEnum<{
|
|
790
|
+
render: "render";
|
|
791
|
+
second: "second";
|
|
792
|
+
minute: "minute";
|
|
793
|
+
thousandCharacters: "thousandCharacters";
|
|
794
|
+
}>;
|
|
795
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
796
|
+
tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
797
|
+
minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
798
|
+
effectiveFrom: z.ZodString;
|
|
799
|
+
}, z.core.$strict>>;
|
|
800
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
801
|
+
}, z.core.$strict>;
|
|
757
802
|
/**
|
|
758
803
|
* The Html5Asset renders full HTML5/CSS3/JS.
|
|
759
804
|
*
|
|
@@ -872,9 +917,10 @@ export declare const imageAssetSchema: z.ZodObject<{
|
|
|
872
917
|
}, z.core.$strict>;
|
|
873
918
|
/**
|
|
874
919
|
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
875
|
-
* with `prompt
|
|
876
|
-
*
|
|
877
|
-
*
|
|
920
|
+
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
921
|
+
* `options.inputSrc` — for example `shotstack-itv-mini`.** This type continues to
|
|
922
|
+
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
923
|
+
* existing integrations.
|
|
878
924
|
*
|
|
879
925
|
* The ImageToVideoAsset lets you create a video from an image and a text prompt.
|
|
880
926
|
*
|
|
@@ -1439,6 +1485,32 @@ export declare const assetResponseSchema: z.ZodObject<{
|
|
|
1439
1485
|
}, z.core.$strict>;
|
|
1440
1486
|
}, z.core.$strict>;
|
|
1441
1487
|
}, z.core.$strict>;
|
|
1488
|
+
/**
|
|
1489
|
+
* The generation models available to this account.
|
|
1490
|
+
*/
|
|
1491
|
+
export declare const generationmodellistresponseGenerationModelListResponseSchema: z.ZodObject<{
|
|
1492
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1493
|
+
model: z.ZodString;
|
|
1494
|
+
type: z.ZodEnum<{
|
|
1495
|
+
image: "image";
|
|
1496
|
+
video: "video";
|
|
1497
|
+
audio: "audio";
|
|
1498
|
+
}>;
|
|
1499
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
1500
|
+
unit: z.ZodEnum<{
|
|
1501
|
+
render: "render";
|
|
1502
|
+
second: "second";
|
|
1503
|
+
minute: "minute";
|
|
1504
|
+
thousandCharacters: "thousandCharacters";
|
|
1505
|
+
}>;
|
|
1506
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
1507
|
+
tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1508
|
+
minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
1509
|
+
effectiveFrom: z.ZodString;
|
|
1510
|
+
}, z.core.$strict>>;
|
|
1511
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1512
|
+
}, z.core.$strict>>;
|
|
1513
|
+
}, z.core.$strict>;
|
|
1442
1514
|
/**
|
|
1443
1515
|
* The status of an on-demand asset generation job. Completed jobs include the public URL of the generated asset.
|
|
1444
1516
|
*/
|
|
@@ -6913,8 +6985,9 @@ export declare const transformationSchema: z.ZodObject<{
|
|
|
6913
6985
|
*
|
|
6914
6986
|
* - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
|
|
6915
6987
|
* - **Generated:** set `prompt` to describe the motion. Choose a generator
|
|
6916
|
-
* with `model` and configure it with model-specific `options
|
|
6917
|
-
* starting image
|
|
6988
|
+
* with `model` and configure it with model-specific `options`. Models that
|
|
6989
|
+
* animate a starting image take it as `options.inputSrc`; the default model
|
|
6990
|
+
* generates from the prompt alone. The generated `src` is filled in
|
|
6918
6991
|
* automatically.
|
|
6919
6992
|
* - **Both:** `src` acts as a preview placeholder while `prompt` drives
|
|
6920
6993
|
* generation — the video is regenerated from the prompt at render time.
|
|
@@ -24508,6 +24581,7 @@ export declare const renderresponsedataRenderResponseDataSchema: z.ZodObject<{
|
|
|
24508
24581
|
fetching: "fetching";
|
|
24509
24582
|
preprocessing: "preprocessing";
|
|
24510
24583
|
rendering: "rendering";
|
|
24584
|
+
generating: "generating";
|
|
24511
24585
|
saving: "saving";
|
|
24512
24586
|
}>;
|
|
24513
24587
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -26890,6 +26964,7 @@ export declare const renderResponseDataSchema: z.ZodObject<{
|
|
|
26890
26964
|
fetching: "fetching";
|
|
26891
26965
|
preprocessing: "preprocessing";
|
|
26892
26966
|
rendering: "rendering";
|
|
26967
|
+
generating: "generating";
|
|
26893
26968
|
saving: "saving";
|
|
26894
26969
|
}>;
|
|
26895
26970
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -29278,6 +29353,7 @@ export declare const renderresponseRenderResponseSchema: z.ZodObject<{
|
|
|
29278
29353
|
fetching: "fetching";
|
|
29279
29354
|
preprocessing: "preprocessing";
|
|
29280
29355
|
rendering: "rendering";
|
|
29356
|
+
generating: "generating";
|
|
29281
29357
|
saving: "saving";
|
|
29282
29358
|
}>;
|
|
29283
29359
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -31664,6 +31740,7 @@ export declare const renderResponseSchema: z.ZodObject<{
|
|
|
31664
31740
|
fetching: "fetching";
|
|
31665
31741
|
preprocessing: "preprocessing";
|
|
31666
31742
|
rendering: "rendering";
|
|
31743
|
+
generating: "generating";
|
|
31667
31744
|
saving: "saving";
|
|
31668
31745
|
}>;
|
|
31669
31746
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -50641,6 +50718,7 @@ export declare const getRenderResponse: z.ZodObject<{
|
|
|
50641
50718
|
fetching: "fetching";
|
|
50642
50719
|
preprocessing: "preprocessing";
|
|
50643
50720
|
rendering: "rendering";
|
|
50721
|
+
generating: "generating";
|
|
50644
50722
|
saving: "saving";
|
|
50645
50723
|
}>;
|
|
50646
50724
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -60401,6 +60479,72 @@ export declare const getGenerateResponse: z.ZodObject<{
|
|
|
60401
60479
|
url: z.ZodOptional<z.ZodString>;
|
|
60402
60480
|
error: z.ZodOptional<z.ZodString>;
|
|
60403
60481
|
}, z.core.$strict>;
|
|
60482
|
+
export declare const getModelsRequest: z.ZodObject<{
|
|
60483
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
60484
|
+
path: z.ZodOptional<z.ZodNever>;
|
|
60485
|
+
query: z.ZodOptional<z.ZodObject<{
|
|
60486
|
+
expand: z.ZodOptional<z.ZodEnum<{
|
|
60487
|
+
options: "options";
|
|
60488
|
+
}>>;
|
|
60489
|
+
}, z.core.$strip>>;
|
|
60490
|
+
}, z.core.$strict>;
|
|
60491
|
+
/**
|
|
60492
|
+
* The available generation models.
|
|
60493
|
+
*/
|
|
60494
|
+
export declare const getModelsResponse: z.ZodObject<{
|
|
60495
|
+
models: z.ZodArray<z.ZodObject<{
|
|
60496
|
+
model: z.ZodString;
|
|
60497
|
+
type: z.ZodEnum<{
|
|
60498
|
+
image: "image";
|
|
60499
|
+
video: "video";
|
|
60500
|
+
audio: "audio";
|
|
60501
|
+
}>;
|
|
60502
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
60503
|
+
unit: z.ZodEnum<{
|
|
60504
|
+
render: "render";
|
|
60505
|
+
second: "second";
|
|
60506
|
+
minute: "minute";
|
|
60507
|
+
thousandCharacters: "thousandCharacters";
|
|
60508
|
+
}>;
|
|
60509
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
60510
|
+
tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60511
|
+
minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
60512
|
+
effectiveFrom: z.ZodString;
|
|
60513
|
+
}, z.core.$strict>>;
|
|
60514
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
60515
|
+
}, z.core.$strict>>;
|
|
60516
|
+
}, z.core.$strict>;
|
|
60517
|
+
export declare const getModelRequest: z.ZodObject<{
|
|
60518
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
60519
|
+
path: z.ZodObject<{
|
|
60520
|
+
id: z.ZodString;
|
|
60521
|
+
}, z.core.$strip>;
|
|
60522
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
60523
|
+
}, z.core.$strict>;
|
|
60524
|
+
/**
|
|
60525
|
+
* The generation model, with its option schema.
|
|
60526
|
+
*/
|
|
60527
|
+
export declare const getModelResponse: z.ZodObject<{
|
|
60528
|
+
model: z.ZodString;
|
|
60529
|
+
type: z.ZodEnum<{
|
|
60530
|
+
image: "image";
|
|
60531
|
+
video: "video";
|
|
60532
|
+
audio: "audio";
|
|
60533
|
+
}>;
|
|
60534
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
60535
|
+
unit: z.ZodEnum<{
|
|
60536
|
+
render: "render";
|
|
60537
|
+
second: "second";
|
|
60538
|
+
minute: "minute";
|
|
60539
|
+
thousandCharacters: "thousandCharacters";
|
|
60540
|
+
}>;
|
|
60541
|
+
credits: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
|
|
60542
|
+
tieredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60543
|
+
minUnits: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>, z.ZodString]>>;
|
|
60544
|
+
effectiveFrom: z.ZodString;
|
|
60545
|
+
}, z.core.$strict>>;
|
|
60546
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
60547
|
+
}, z.core.$strict>;
|
|
60404
60548
|
export declare const deleteAssetRequest: z.ZodObject<{
|
|
60405
60549
|
body: z.ZodOptional<z.ZodNever>;
|
|
60406
60550
|
path: z.ZodObject<{
|
package/dist/zod/zod.gen.js
CHANGED
|
@@ -7,6 +7,8 @@ export const assetsidRootSchema = z.unknown();
|
|
|
7
7
|
export const assetsrenderidRootSchema = z.unknown();
|
|
8
8
|
export const generateRootSchema = z.unknown();
|
|
9
9
|
export const generateidRootSchema = z.unknown();
|
|
10
|
+
export const modelsRootSchema = z.unknown();
|
|
11
|
+
export const modelsidRootSchema = z.unknown();
|
|
10
12
|
export const probeRootSchema = z.unknown();
|
|
11
13
|
export const renderRootSchema = z.unknown();
|
|
12
14
|
export const renderidRootSchema = z.unknown();
|
|
@@ -109,6 +111,8 @@ export const captionpropertiesCaptionMarginSchema = z.object({
|
|
|
109
111
|
}).strict();
|
|
110
112
|
export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
|
|
111
113
|
/**
|
|
114
|
+
* **Notice: The CaptionAsset is deprecated, use the [RichCaptionAsset](#tocs_richcaptionasset) instead.**
|
|
115
|
+
*
|
|
112
116
|
* The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
|
|
113
117
|
* be read and burnt to the video.
|
|
114
118
|
*
|
|
@@ -119,6 +123,8 @@ export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
|
|
|
119
123
|
* To sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with
|
|
120
124
|
* matching start and end time.
|
|
121
125
|
*
|
|
126
|
+
*
|
|
127
|
+
* @deprecated
|
|
122
128
|
*/
|
|
123
129
|
export const captionassetCaptionAssetSchema = z.object({
|
|
124
130
|
type: z.enum(['caption']),
|
|
@@ -413,6 +419,49 @@ export const fontFontSchema = z.object({
|
|
|
413
419
|
src: z.string()
|
|
414
420
|
}).strict();
|
|
415
421
|
export const fontSchema = fontFontSchema;
|
|
422
|
+
/**
|
|
423
|
+
* What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
|
|
424
|
+
*/
|
|
425
|
+
export const generationmodelpricingGenerationModelPricingSchema = z.object({
|
|
426
|
+
unit: z.enum([
|
|
427
|
+
'render',
|
|
428
|
+
'second',
|
|
429
|
+
'minute',
|
|
430
|
+
'thousandCharacters'
|
|
431
|
+
]),
|
|
432
|
+
credits: z.union([
|
|
433
|
+
z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
434
|
+
return undefined; if (Array.isArray(v))
|
|
435
|
+
return v; if (typeof v === 'string') {
|
|
436
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
437
|
+
return v;
|
|
438
|
+
return Number(v);
|
|
439
|
+
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
440
|
+
z.record(z.string(), z.unknown())
|
|
441
|
+
]),
|
|
442
|
+
tieredBy: z.optional(z.array(z.string())),
|
|
443
|
+
minUnits: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
444
|
+
return undefined; if (Array.isArray(v))
|
|
445
|
+
return v; if (typeof v === 'string') {
|
|
446
|
+
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
447
|
+
return v;
|
|
448
|
+
return Number(v);
|
|
449
|
+
} return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
450
|
+
effectiveFrom: z.string()
|
|
451
|
+
}).strict();
|
|
452
|
+
/**
|
|
453
|
+
* A generation model available to `prompt`-bearing image, video and audio assets, with the options it accepts and what it costs. Render a model picker and its option fields from this rather than hard coding a model list, so a newly launched model is available without a client release.
|
|
454
|
+
*/
|
|
455
|
+
export const generationmodelGenerationModelSchema = z.object({
|
|
456
|
+
model: z.string(),
|
|
457
|
+
type: z.enum([
|
|
458
|
+
'image',
|
|
459
|
+
'video',
|
|
460
|
+
'audio'
|
|
461
|
+
]),
|
|
462
|
+
pricing: z.optional(generationmodelpricingGenerationModelPricingSchema),
|
|
463
|
+
options: z.optional(z.record(z.string(), z.unknown()))
|
|
464
|
+
}).strict();
|
|
416
465
|
/**
|
|
417
466
|
* The Html5Asset renders full HTML5/CSS3/JS.
|
|
418
467
|
*
|
|
@@ -501,9 +550,10 @@ export const imageassetImageAssetSchema = z.object({
|
|
|
501
550
|
export const imageAssetSchema = imageassetImageAssetSchema;
|
|
502
551
|
/**
|
|
503
552
|
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
504
|
-
* with `prompt
|
|
505
|
-
*
|
|
506
|
-
*
|
|
553
|
+
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
554
|
+
* `options.inputSrc` — for example `shotstack-itv-mini`.** This type continues to
|
|
555
|
+
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
556
|
+
* existing integrations.
|
|
507
557
|
*
|
|
508
558
|
* The ImageToVideoAsset lets you create a video from an image and a text prompt.
|
|
509
559
|
*
|
|
@@ -751,6 +801,12 @@ export const assetresponseAssetResponseSchema = z.object({
|
|
|
751
801
|
data: assetresponsedataAssetResponseDataSchema
|
|
752
802
|
}).strict();
|
|
753
803
|
export const assetResponseSchema = assetresponseAssetResponseSchema;
|
|
804
|
+
/**
|
|
805
|
+
* The generation models available to this account.
|
|
806
|
+
*/
|
|
807
|
+
export const generationmodellistresponseGenerationModelListResponseSchema = z.object({
|
|
808
|
+
models: z.array(generationmodelGenerationModelSchema)
|
|
809
|
+
}).strict();
|
|
754
810
|
/**
|
|
755
811
|
* The status of an on-demand asset generation job. Completed jobs include the public URL of the generated asset.
|
|
756
812
|
*/
|
|
@@ -2440,8 +2496,9 @@ export const transformationSchema = transformationTransformationSchema;
|
|
|
2440
2496
|
*
|
|
2441
2497
|
* - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
|
|
2442
2498
|
* - **Generated:** set `prompt` to describe the motion. Choose a generator
|
|
2443
|
-
* with `model` and configure it with model-specific `options
|
|
2444
|
-
* starting image
|
|
2499
|
+
* with `model` and configure it with model-specific `options`. Models that
|
|
2500
|
+
* animate a starting image take it as `options.inputSrc`; the default model
|
|
2501
|
+
* generates from the prompt alone. The generated `src` is filled in
|
|
2445
2502
|
* automatically.
|
|
2446
2503
|
* - **Both:** `src` acts as a preview placeholder while `prompt` drives
|
|
2447
2504
|
* generation — the video is regenerated from the prompt at render time.
|
|
@@ -2693,6 +2750,7 @@ export const renderresponsedataRenderResponseDataSchema = z.object({
|
|
|
2693
2750
|
'fetching',
|
|
2694
2751
|
'preprocessing',
|
|
2695
2752
|
'rendering',
|
|
2753
|
+
'generating',
|
|
2696
2754
|
'saving',
|
|
2697
2755
|
'done',
|
|
2698
2756
|
'failed'
|
|
@@ -2882,6 +2940,28 @@ export const getGenerateRequest = z.object({
|
|
|
2882
2940
|
* The generation job has finished (done or failed).
|
|
2883
2941
|
*/
|
|
2884
2942
|
export const getGenerateResponse = generationresponseGenerationResponseSchema;
|
|
2943
|
+
export const getModelsRequest = z.object({
|
|
2944
|
+
body: z.optional(z.never()),
|
|
2945
|
+
path: z.optional(z.never()),
|
|
2946
|
+
query: z.optional(z.object({
|
|
2947
|
+
expand: z.optional(z.enum(['options']))
|
|
2948
|
+
}))
|
|
2949
|
+
}).strict();
|
|
2950
|
+
/**
|
|
2951
|
+
* The available generation models.
|
|
2952
|
+
*/
|
|
2953
|
+
export const getModelsResponse = generationmodellistresponseGenerationModelListResponseSchema;
|
|
2954
|
+
export const getModelRequest = z.object({
|
|
2955
|
+
body: z.optional(z.never()),
|
|
2956
|
+
path: z.object({
|
|
2957
|
+
id: z.string()
|
|
2958
|
+
}),
|
|
2959
|
+
query: z.optional(z.never())
|
|
2960
|
+
}).strict();
|
|
2961
|
+
/**
|
|
2962
|
+
* The generation model, with its option schema.
|
|
2963
|
+
*/
|
|
2964
|
+
export const getModelResponse = generationmodelGenerationModelSchema;
|
|
2885
2965
|
export const deleteAssetRequest = z.object({
|
|
2886
2966
|
body: z.optional(z.never()),
|
|
2887
2967
|
path: z.object({
|
package/dist/zod/zod.gen.ts
CHANGED
|
@@ -16,6 +16,10 @@ export const generateRootSchema = z.unknown();
|
|
|
16
16
|
|
|
17
17
|
export const generateidRootSchema = z.unknown();
|
|
18
18
|
|
|
19
|
+
export const modelsRootSchema = z.unknown();
|
|
20
|
+
|
|
21
|
+
export const modelsidRootSchema = z.unknown();
|
|
22
|
+
|
|
19
23
|
export const probeRootSchema = z.unknown();
|
|
20
24
|
|
|
21
25
|
export const renderRootSchema = z.unknown();
|
|
@@ -73,6 +77,8 @@ export const captionpropertiesCaptionMarginSchema = z.object({
|
|
|
73
77
|
export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
|
|
74
78
|
|
|
75
79
|
/**
|
|
80
|
+
* **Notice: The CaptionAsset is deprecated, use the [RichCaptionAsset](#tocs_richcaptionasset) instead.**
|
|
81
|
+
*
|
|
76
82
|
* The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
|
|
77
83
|
* be read and burnt to the video.
|
|
78
84
|
*
|
|
@@ -83,6 +89,8 @@ export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
|
|
|
83
89
|
* To sync captions with a video or audio file use a [Video](#tocs_videoasset) or [Audio](#tocs_audioasset) with
|
|
84
90
|
* matching start and end time.
|
|
85
91
|
*
|
|
92
|
+
*
|
|
93
|
+
* @deprecated
|
|
86
94
|
*/
|
|
87
95
|
export const captionassetCaptionAssetSchema = z.object({
|
|
88
96
|
type: z.enum(['caption']),
|
|
@@ -371,6 +379,39 @@ export const fontFontSchema = z.object({
|
|
|
371
379
|
|
|
372
380
|
export const fontSchema = fontFontSchema;
|
|
373
381
|
|
|
382
|
+
/**
|
|
383
|
+
* What one generation costs, in credits. There is no formula to evaluate: multiply the rate by the number of units the generation consumes. Where a model charges differently per option value, `credits` is an object keyed by that value and `tieredBy` names the option that selects it.
|
|
384
|
+
*/
|
|
385
|
+
export const generationmodelpricingGenerationModelPricingSchema = z.object({
|
|
386
|
+
unit: z.enum([
|
|
387
|
+
'render',
|
|
388
|
+
'second',
|
|
389
|
+
'minute',
|
|
390
|
+
'thousandCharacters'
|
|
391
|
+
]),
|
|
392
|
+
credits: z.union([
|
|
393
|
+
z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
|
|
394
|
+
z.record(z.string(), z.unknown())
|
|
395
|
+
]),
|
|
396
|
+
tieredBy: z.optional(z.array(z.string())),
|
|
397
|
+
minUnits: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
398
|
+
effectiveFrom: z.string()
|
|
399
|
+
}).strict();
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* A generation model available to `prompt`-bearing image, video and audio assets, with the options it accepts and what it costs. Render a model picker and its option fields from this rather than hard coding a model list, so a newly launched model is available without a client release.
|
|
403
|
+
*/
|
|
404
|
+
export const generationmodelGenerationModelSchema = z.object({
|
|
405
|
+
model: z.string(),
|
|
406
|
+
type: z.enum([
|
|
407
|
+
'image',
|
|
408
|
+
'video',
|
|
409
|
+
'audio'
|
|
410
|
+
]),
|
|
411
|
+
pricing: z.optional(generationmodelpricingGenerationModelPricingSchema),
|
|
412
|
+
options: z.optional(z.record(z.string(), z.unknown()))
|
|
413
|
+
}).strict();
|
|
414
|
+
|
|
374
415
|
/**
|
|
375
416
|
* The Html5Asset renders full HTML5/CSS3/JS.
|
|
376
417
|
*
|
|
@@ -453,9 +494,10 @@ export const imageAssetSchema = imageassetImageAssetSchema;
|
|
|
453
494
|
|
|
454
495
|
/**
|
|
455
496
|
* **Notice: ImageToVideoAsset is deprecated. Use [VideoAsset](#tocs_videoasset)
|
|
456
|
-
* with `prompt
|
|
457
|
-
*
|
|
458
|
-
*
|
|
497
|
+
* with `prompt`, a `model` that accepts a starting image, and that image in
|
|
498
|
+
* `options.inputSrc` — for example `shotstack-itv-mini`.** This type continues to
|
|
499
|
+
* function and is internally rewritten to VideoAsset; no behaviour change for
|
|
500
|
+
* existing integrations.
|
|
459
501
|
*
|
|
460
502
|
* The ImageToVideoAsset lets you create a video from an image and a text prompt.
|
|
461
503
|
*
|
|
@@ -711,6 +753,13 @@ export const assetresponseAssetResponseSchema = z.object({
|
|
|
711
753
|
|
|
712
754
|
export const assetResponseSchema = assetresponseAssetResponseSchema;
|
|
713
755
|
|
|
756
|
+
/**
|
|
757
|
+
* The generation models available to this account.
|
|
758
|
+
*/
|
|
759
|
+
export const generationmodellistresponseGenerationModelListResponseSchema = z.object({
|
|
760
|
+
models: z.array(generationmodelGenerationModelSchema)
|
|
761
|
+
}).strict();
|
|
762
|
+
|
|
714
763
|
/**
|
|
715
764
|
* The status of an on-demand asset generation job. Completed jobs include the public URL of the generated asset.
|
|
716
765
|
*/
|
|
@@ -2007,8 +2056,9 @@ export const transformationSchema = transformationTransformationSchema;
|
|
|
2007
2056
|
*
|
|
2008
2057
|
* - **Source URL:** set `src` to the URL of an mp4 (or compatible) video file.
|
|
2009
2058
|
* - **Generated:** set `prompt` to describe the motion. Choose a generator
|
|
2010
|
-
* with `model` and configure it with model-specific `options
|
|
2011
|
-
* starting image
|
|
2059
|
+
* with `model` and configure it with model-specific `options`. Models that
|
|
2060
|
+
* animate a starting image take it as `options.inputSrc`; the default model
|
|
2061
|
+
* generates from the prompt alone. The generated `src` is filled in
|
|
2012
2062
|
* automatically.
|
|
2013
2063
|
* - **Both:** `src` acts as a preview placeholder while `prompt` drives
|
|
2014
2064
|
* generation — the video is regenerated from the prompt at render time.
|
|
@@ -2219,6 +2269,7 @@ export const renderresponsedataRenderResponseDataSchema = z.object({
|
|
|
2219
2269
|
'fetching',
|
|
2220
2270
|
'preprocessing',
|
|
2221
2271
|
'rendering',
|
|
2272
|
+
'generating',
|
|
2222
2273
|
'saving',
|
|
2223
2274
|
'done',
|
|
2224
2275
|
'failed'
|
|
@@ -2428,6 +2479,32 @@ export const getGenerateRequest = z.object({
|
|
|
2428
2479
|
*/
|
|
2429
2480
|
export const getGenerateResponse = generationresponseGenerationResponseSchema;
|
|
2430
2481
|
|
|
2482
|
+
export const getModelsRequest = z.object({
|
|
2483
|
+
body: z.optional(z.never()),
|
|
2484
|
+
path: z.optional(z.never()),
|
|
2485
|
+
query: z.optional(z.object({
|
|
2486
|
+
expand: z.optional(z.enum(['options']))
|
|
2487
|
+
}))
|
|
2488
|
+
}).strict();
|
|
2489
|
+
|
|
2490
|
+
/**
|
|
2491
|
+
* The available generation models.
|
|
2492
|
+
*/
|
|
2493
|
+
export const getModelsResponse = generationmodellistresponseGenerationModelListResponseSchema;
|
|
2494
|
+
|
|
2495
|
+
export const getModelRequest = z.object({
|
|
2496
|
+
body: z.optional(z.never()),
|
|
2497
|
+
path: z.object({
|
|
2498
|
+
id: z.string()
|
|
2499
|
+
}),
|
|
2500
|
+
query: z.optional(z.never())
|
|
2501
|
+
}).strict();
|
|
2502
|
+
|
|
2503
|
+
/**
|
|
2504
|
+
* The generation model, with its option schema.
|
|
2505
|
+
*/
|
|
2506
|
+
export const getModelResponse = generationmodelGenerationModelSchema;
|
|
2507
|
+
|
|
2431
2508
|
export const deleteAssetRequest = z.object({
|
|
2432
2509
|
body: z.optional(z.never()),
|
|
2433
2510
|
path: z.object({
|