@shotstack/schemas 1.4.5 → 1.4.7
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 +26 -12
- package/dist/schema.d.ts +3 -10
- package/dist/zod/zod.gen.cjs +13 -17
- package/dist/zod/zod.gen.d.ts +103 -132
- package/dist/zod/zod.gen.js +13 -17
- package/dist/zod/zod.gen.ts +13 -14
- package/package.json +1 -1
package/dist/api.bundled.json
CHANGED
|
@@ -939,6 +939,7 @@
|
|
|
939
939
|
"tracks": {
|
|
940
940
|
"description": "A timeline consists of an array of tracks, each track containing clips. Tracks are layered on top of each other in the same order they are added to the array with the top most track layered over the top of those below it. Ensure that a track containing titles is the top most track so that it is displayed above videos and images.",
|
|
941
941
|
"type": "array",
|
|
942
|
+
"minItems": 1,
|
|
942
943
|
"items": {
|
|
943
944
|
"$ref": "#/components/schemas/Track"
|
|
944
945
|
}
|
|
@@ -959,6 +960,8 @@
|
|
|
959
960
|
"src": {
|
|
960
961
|
"description": "The URL of the mp3 audio file. The URL must be publicly accessible or include credentials.",
|
|
961
962
|
"type": "string",
|
|
963
|
+
"minLength": 1,
|
|
964
|
+
"pattern": "\\S",
|
|
962
965
|
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/music.mp3"
|
|
963
966
|
},
|
|
964
967
|
"effect": {
|
|
@@ -1000,6 +1003,7 @@
|
|
|
1000
1003
|
"clips": {
|
|
1001
1004
|
"description": "An array of Clips comprising of TitleClip, ImageClip or VideoClip.",
|
|
1002
1005
|
"type": "array",
|
|
1006
|
+
"minItems": 1,
|
|
1003
1007
|
"items": {
|
|
1004
1008
|
"$ref": "#/components/schemas/Clip"
|
|
1005
1009
|
}
|
|
@@ -1022,6 +1026,7 @@
|
|
|
1022
1026
|
{
|
|
1023
1027
|
"type": "number",
|
|
1024
1028
|
"description": "The start position of the Clip on the timeline, in seconds. For example, to start the Clip at 2 seconds, set the start value to 2.",
|
|
1029
|
+
"minimum": 0,
|
|
1025
1030
|
"example": 2
|
|
1026
1031
|
},
|
|
1027
1032
|
{
|
|
@@ -1038,6 +1043,7 @@
|
|
|
1038
1043
|
{
|
|
1039
1044
|
"type": "number",
|
|
1040
1045
|
"description": "The duration the Clip should play for, in seconds. For example, to play the Clip for 5 seconds, set the length value to 5.",
|
|
1046
|
+
"minimum": 0,
|
|
1041
1047
|
"example": 5
|
|
1042
1048
|
},
|
|
1043
1049
|
{
|
|
@@ -1268,6 +1274,8 @@
|
|
|
1268
1274
|
"src": {
|
|
1269
1275
|
"description": "The video source URL. The URL must be publicly accessible or include credentials.",
|
|
1270
1276
|
"type": "string",
|
|
1277
|
+
"minLength": 1,
|
|
1278
|
+
"pattern": "\\S",
|
|
1271
1279
|
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4"
|
|
1272
1280
|
},
|
|
1273
1281
|
"transcode": {
|
|
@@ -1345,6 +1353,8 @@
|
|
|
1345
1353
|
"src": {
|
|
1346
1354
|
"description": "The image source URL. The URL must be publicly accessible or include credentials.",
|
|
1347
1355
|
"type": "string",
|
|
1356
|
+
"minLength": 1,
|
|
1357
|
+
"pattern": "\\S",
|
|
1348
1358
|
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg"
|
|
1349
1359
|
},
|
|
1350
1360
|
"crop": {
|
|
@@ -1464,8 +1474,8 @@
|
|
|
1464
1474
|
"text": {
|
|
1465
1475
|
"description": "The text string to display. Maximum 5000 characters.",
|
|
1466
1476
|
"type": "string",
|
|
1467
|
-
"
|
|
1468
|
-
"
|
|
1477
|
+
"maxLength": 5000,
|
|
1478
|
+
"example": "Hello World"
|
|
1469
1479
|
},
|
|
1470
1480
|
"font": {
|
|
1471
1481
|
"description": "Font styling properties.",
|
|
@@ -1592,6 +1602,8 @@
|
|
|
1592
1602
|
"src": {
|
|
1593
1603
|
"description": "The audio source URL. The URL must be publicly accessible or include credentials.",
|
|
1594
1604
|
"type": "string",
|
|
1605
|
+
"minLength": 1,
|
|
1606
|
+
"pattern": "\\S",
|
|
1595
1607
|
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3"
|
|
1596
1608
|
},
|
|
1597
1609
|
"trim": {
|
|
@@ -1785,6 +1797,8 @@
|
|
|
1785
1797
|
"src": {
|
|
1786
1798
|
"description": "The luma matte source URL. The URL must be publicly accessible or include credentials.",
|
|
1787
1799
|
"type": "string",
|
|
1800
|
+
"minLength": 1,
|
|
1801
|
+
"pattern": "\\S",
|
|
1788
1802
|
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/mask.mp4"
|
|
1789
1803
|
},
|
|
1790
1804
|
"trim": {
|
|
@@ -1812,6 +1826,8 @@
|
|
|
1812
1826
|
"src": {
|
|
1813
1827
|
"description": "The URL to an SRT or VTT subtitles file, or an alias reference to auto-generate captions from an audio or video clip. For file URLs, the URL must be publicly accessible or include credentials. For auto-captioning, use the format `alias://clip-name` where clip-name is the alias of an audio, video, or text-to-speech clip. The system will automatically transcribe the audio and detect the language.",
|
|
1814
1828
|
"type": "string",
|
|
1829
|
+
"minLength": 1,
|
|
1830
|
+
"pattern": "\\S",
|
|
1815
1831
|
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/captions.srt"
|
|
1816
1832
|
},
|
|
1817
1833
|
"font": {
|
|
@@ -1894,6 +1910,7 @@
|
|
|
1894
1910
|
"src": {
|
|
1895
1911
|
"description": "The image source URL. The URL must be publicly accessible or include credentials.",
|
|
1896
1912
|
"type": "string",
|
|
1913
|
+
"minLength": 1,
|
|
1897
1914
|
"example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg"
|
|
1898
1915
|
},
|
|
1899
1916
|
"prompt": {
|
|
@@ -1926,7 +1943,12 @@
|
|
|
1926
1943
|
"crop": {
|
|
1927
1944
|
"$ref": "#/components/schemas/Crop"
|
|
1928
1945
|
}
|
|
1929
|
-
}
|
|
1946
|
+
},
|
|
1947
|
+
"type": "object",
|
|
1948
|
+
"required": [
|
|
1949
|
+
"type",
|
|
1950
|
+
"src"
|
|
1951
|
+
]
|
|
1930
1952
|
},
|
|
1931
1953
|
"HtmlAsset": {
|
|
1932
1954
|
"deprecated": true,
|
|
@@ -3615,16 +3637,8 @@
|
|
|
3615
3637
|
],
|
|
3616
3638
|
"example": "shift"
|
|
3617
3639
|
},
|
|
3618
|
-
"speed": {
|
|
3619
|
-
"description": "Animation speed multiplier. Must be between 0.1 and 10. Higher is faster.",
|
|
3620
|
-
"type": "number",
|
|
3621
|
-
"minimum": 0.1,
|
|
3622
|
-
"maximum": 10,
|
|
3623
|
-
"default": 1,
|
|
3624
|
-
"example": 1.5
|
|
3625
|
-
},
|
|
3626
3640
|
"duration": {
|
|
3627
|
-
"description": "Override animation duration in seconds.
|
|
3641
|
+
"description": "Override animation duration in seconds. Must be between 0.1 and 30 seconds.",
|
|
3628
3642
|
"type": "number",
|
|
3629
3643
|
"minimum": 0.1,
|
|
3630
3644
|
"maximum": 30,
|
package/dist/schema.d.ts
CHANGED
|
@@ -994,8 +994,7 @@ export interface components {
|
|
|
994
994
|
/** @description The ImageToVideoAsset lets you create a video from an image and a text prompt. */
|
|
995
995
|
ImageToVideoAsset: {
|
|
996
996
|
/**
|
|
997
|
-
* @description The type of asset to generate - set to `image-to-video` for image-to-video.
|
|
998
|
-
* @default image-to-video
|
|
997
|
+
* @description The type of asset to generate - set to `image-to-video` for image-to-video. (enum property replaced by openapi-typescript)
|
|
999
998
|
* @enum {string}
|
|
1000
999
|
*/
|
|
1001
1000
|
type: "image-to-video";
|
|
@@ -1003,7 +1002,7 @@ export interface components {
|
|
|
1003
1002
|
* @description The image source URL. The URL must be publicly accessible or include credentials.
|
|
1004
1003
|
* @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg
|
|
1005
1004
|
*/
|
|
1006
|
-
src
|
|
1005
|
+
src: string;
|
|
1007
1006
|
/**
|
|
1008
1007
|
* @description The instructions for modifying the image into a video sequence.
|
|
1009
1008
|
* @example Slowly zoom out and orbit left around the object.
|
|
@@ -2239,13 +2238,7 @@ export interface components {
|
|
|
2239
2238
|
*/
|
|
2240
2239
|
preset: "fadeIn" | "slideIn" | "typewriter" | "ascend" | "shift" | "movingLetters";
|
|
2241
2240
|
/**
|
|
2242
|
-
* @description
|
|
2243
|
-
* @default 1
|
|
2244
|
-
* @example 1.5
|
|
2245
|
-
*/
|
|
2246
|
-
speed: number;
|
|
2247
|
-
/**
|
|
2248
|
-
* @description Override animation duration in seconds. If not specified, calculated based on text length and speed. Must be between 0.1 and 30 seconds.
|
|
2241
|
+
* @description Override animation duration in seconds. Must be between 0.1 and 30 seconds.
|
|
2249
2242
|
* @example 2
|
|
2250
2243
|
*/
|
|
2251
2244
|
duration?: number;
|
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -102,7 +102,7 @@ exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema;
|
|
|
102
102
|
*/
|
|
103
103
|
exports.captionassetCaptionAssetSchema = zod_1.z.object({
|
|
104
104
|
type: zod_1.z.enum(["caption"]),
|
|
105
|
-
src: zod_1.z.string(),
|
|
105
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
106
106
|
font: zod_1.z.optional(exports.captionpropertiesCaptionFontSchema),
|
|
107
107
|
background: zod_1.z.optional(exports.captionpropertiesCaptionBackgroundSchema),
|
|
108
108
|
margin: zod_1.z.optional(exports.captionpropertiesCaptionMarginSchema),
|
|
@@ -923,7 +923,7 @@ exports.htmlAssetSchema = exports.htmlassetHtmlAssetSchema;
|
|
|
923
923
|
*/
|
|
924
924
|
exports.imageassetImageAssetSchema = zod_1.z.object({
|
|
925
925
|
type: zod_1.z.enum(["image"]),
|
|
926
|
-
src: zod_1.z.string(),
|
|
926
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
927
927
|
crop: zod_1.z.optional(exports.cropCropSchema),
|
|
928
928
|
});
|
|
929
929
|
exports.imageAssetSchema = exports.imageassetImageAssetSchema;
|
|
@@ -931,8 +931,8 @@ exports.imageAssetSchema = exports.imageassetImageAssetSchema;
|
|
|
931
931
|
* The ImageToVideoAsset lets you create a video from an image and a text prompt.
|
|
932
932
|
*/
|
|
933
933
|
exports.imagetovideoassetImageToVideoAssetSchema = zod_1.z.object({
|
|
934
|
-
type: zod_1.z.
|
|
935
|
-
src: zod_1.z.
|
|
934
|
+
type: zod_1.z.enum(["image-to-video"]),
|
|
935
|
+
src: zod_1.z.string().min(1),
|
|
936
936
|
prompt: zod_1.z.optional(zod_1.z.string()),
|
|
937
937
|
aspectRatio: zod_1.z.optional(zod_1.z.enum(["1:1", "4:3", "16:9", "9:16", "3:4", "21:9", "9:21"])),
|
|
938
938
|
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
@@ -1065,7 +1065,7 @@ exports.transcriptionSchema = exports.transcriptionTranscriptionSchema;
|
|
|
1065
1065
|
*/
|
|
1066
1066
|
exports.lumaassetLumaAssetSchema = zod_1.z.object({
|
|
1067
1067
|
type: zod_1.z.enum(["luma"]),
|
|
1068
|
-
src: zod_1.z.string(),
|
|
1068
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
1069
1069
|
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1070
1070
|
return undefined; if (Array.isArray(v))
|
|
1071
1071
|
return v; if (typeof v === 'string')
|
|
@@ -1077,7 +1077,7 @@ exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema;
|
|
|
1077
1077
|
*/
|
|
1078
1078
|
exports.mergefieldMergeFieldSchema = zod_1.z.object({
|
|
1079
1079
|
find: zod_1.z.string(),
|
|
1080
|
-
replace: zod_1.z.unknown(),
|
|
1080
|
+
replace: zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean(), zod_1.z.null(), zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()), zod_1.z.array(zod_1.z.unknown())]),
|
|
1081
1081
|
});
|
|
1082
1082
|
exports.mergeFieldSchema = exports.mergefieldMergeFieldSchema;
|
|
1083
1083
|
/**
|
|
@@ -1232,10 +1232,6 @@ exports.richtextpropertiesRichTextAnimationSchema = zod_1.z.object({
|
|
|
1232
1232
|
"shift",
|
|
1233
1233
|
"movingLetters",
|
|
1234
1234
|
]),
|
|
1235
|
-
speed: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1236
|
-
return undefined; if (Array.isArray(v))
|
|
1237
|
-
return v; if (typeof v === 'string')
|
|
1238
|
-
return Number(v); return v; }), zod_1.z.number().gte(0.1).lte(10))).default(1),
|
|
1239
1235
|
duration: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1240
1236
|
return undefined; if (Array.isArray(v))
|
|
1241
1237
|
return v; if (typeof v === 'string')
|
|
@@ -1702,7 +1698,7 @@ exports.sourceSchema = exports.sourceSourceSchema;
|
|
|
1702
1698
|
* A music or audio file in mp3 format that plays for the duration of the rendered video or the length of the audio file, which ever is shortest.
|
|
1703
1699
|
*/
|
|
1704
1700
|
exports.soundtrackSoundtrackSchema = zod_1.z.object({
|
|
1705
|
-
src: zod_1.z.string(),
|
|
1701
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
1706
1702
|
effect: zod_1.z.optional(zod_1.z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
|
|
1707
1703
|
volume: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
1708
1704
|
return undefined; if (Array.isArray(v))
|
|
@@ -2550,7 +2546,7 @@ exports.tweenSchema = exports.tweenTweenSchema;
|
|
|
2550
2546
|
*/
|
|
2551
2547
|
exports.audioassetAudioAssetSchema = zod_1.z.object({
|
|
2552
2548
|
type: zod_1.z.enum(["audio"]),
|
|
2553
|
-
src: zod_1.z.string(),
|
|
2549
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
2554
2550
|
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2555
2551
|
return undefined; if (Array.isArray(v))
|
|
2556
2552
|
return v; if (typeof v === 'string')
|
|
@@ -2666,7 +2662,7 @@ exports.transformationSchema = exports.transformationTransformationSchema;
|
|
|
2666
2662
|
*/
|
|
2667
2663
|
exports.videoassetVideoAssetSchema = zod_1.z.object({
|
|
2668
2664
|
type: zod_1.z.enum(["video"]),
|
|
2669
|
-
src: zod_1.z.string(),
|
|
2665
|
+
src: zod_1.z.string().min(1).regex(/\S/),
|
|
2670
2666
|
transcode: zod_1.z.optional(zod_1.z.boolean()),
|
|
2671
2667
|
trim: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2672
2668
|
return undefined; if (Array.isArray(v))
|
|
@@ -2713,14 +2709,14 @@ exports.clipClipSchema = zod_1.z.object({
|
|
|
2713
2709
|
zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2714
2710
|
return undefined; if (Array.isArray(v))
|
|
2715
2711
|
return v; if (typeof v === 'string')
|
|
2716
|
-
return Number(v); return v; }), zod_1.z.number()),
|
|
2712
|
+
return Number(v); return v; }), zod_1.z.number().gte(0)),
|
|
2717
2713
|
zod_1.z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/),
|
|
2718
2714
|
]),
|
|
2719
2715
|
length: zod_1.z.union([
|
|
2720
2716
|
zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
|
|
2721
2717
|
return undefined; if (Array.isArray(v))
|
|
2722
2718
|
return v; if (typeof v === 'string')
|
|
2723
|
-
return Number(v); return v; }), zod_1.z.number()),
|
|
2719
|
+
return Number(v); return v; }), zod_1.z.number().gte(0)),
|
|
2724
2720
|
zod_1.z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/),
|
|
2725
2721
|
]),
|
|
2726
2722
|
fit: zod_1.z.optional(zod_1.z.enum(["cover", "contain", "crop", "none"])),
|
|
@@ -2792,7 +2788,7 @@ exports.clipSchema = exports.clipClipSchema;
|
|
|
2792
2788
|
* A track contains an array of clips. Tracks are layered on top of each other in the order in the array. The top most track will render on top of those below it.
|
|
2793
2789
|
*/
|
|
2794
2790
|
exports.trackTrackSchema = zod_1.z.object({
|
|
2795
|
-
clips: zod_1.z.array(exports.clipClipSchema),
|
|
2791
|
+
clips: zod_1.z.array(exports.clipClipSchema).min(1),
|
|
2796
2792
|
});
|
|
2797
2793
|
exports.trackSchema = exports.trackTrackSchema;
|
|
2798
2794
|
/**
|
|
@@ -2802,7 +2798,7 @@ exports.timelineTimelineSchema = zod_1.z.object({
|
|
|
2802
2798
|
soundtrack: zod_1.z.optional(exports.soundtrackSoundtrackSchema),
|
|
2803
2799
|
background: zod_1.z.optional(zod_1.z.string()),
|
|
2804
2800
|
fonts: zod_1.z.optional(zod_1.z.array(exports.fontFontSchema)),
|
|
2805
|
-
tracks: zod_1.z.array(exports.trackTrackSchema),
|
|
2801
|
+
tracks: zod_1.z.array(exports.trackTrackSchema).min(1),
|
|
2806
2802
|
cache: zod_1.z.optional(zod_1.z.boolean()),
|
|
2807
2803
|
});
|
|
2808
2804
|
exports.timelineSchema = exports.timelineTimelineSchema;
|