@shotstack/schemas 1.3.2 → 1.3.4

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.
@@ -1127,8 +1127,9 @@
1127
1127
  "type": "string"
1128
1128
  },
1129
1129
  "filter": {
1130
- "description": "A filter effect to apply to the Clip. <ul>\n <li>`blur` - blur the scene</li>\n <li>`boost` - boost contrast and saturation</li>\n <li>`contrast` - increase contrast</li>\n <li>`darken` - darken the scene</li>\n <li>`greyscale` - remove colour</li>\n <li>`lighten` - lighten the scene</li>\n <li>`muted` - reduce saturation and contrast</li>\n <li>`negative` - negative colors</li>\n</ul>",
1130
+ "description": "A filter effect to apply to the Clip. <ul>\n <li>`none` - no filter applied</li>\n <li>`blur` - blur the scene</li>\n <li>`boost` - boost contrast and saturation</li>\n <li>`contrast` - increase contrast</li>\n <li>`darken` - darken the scene</li>\n <li>`greyscale` - remove colour</li>\n <li>`lighten` - lighten the scene</li>\n <li>`muted` - reduce saturation and contrast</li>\n <li>`negative` - negative colors</li>\n</ul>",
1131
1131
  "enum": [
1132
+ "none",
1132
1133
  "blur",
1133
1134
  "boost",
1134
1135
  "contrast",
@@ -1180,7 +1181,21 @@
1180
1181
  "type": "object",
1181
1182
  "description": "The type of asset to display for the duration of the Clip, i.e. a video clip or an image. Choose from one of the available asset types below.",
1182
1183
  "discriminator": {
1183
- "propertyName": "asset"
1184
+ "propertyName": "type",
1185
+ "mapping": {
1186
+ "video": "#/components/schemas/VideoAsset",
1187
+ "image": "#/components/schemas/ImageAsset",
1188
+ "text": "#/components/schemas/TextAsset",
1189
+ "rich-text": "#/components/schemas/RichTextAsset",
1190
+ "audio": "#/components/schemas/AudioAsset",
1191
+ "luma": "#/components/schemas/LumaAsset",
1192
+ "caption": "#/components/schemas/CaptionAsset",
1193
+ "html": "#/components/schemas/HtmlAsset",
1194
+ "title": "#/components/schemas/TitleAsset",
1195
+ "shape": "#/components/schemas/ShapeAsset",
1196
+ "text-to-image": "#/components/schemas/TextToImageAsset",
1197
+ "image-to-video": "#/components/schemas/ImageToVideoAsset"
1198
+ }
1184
1199
  },
1185
1200
  "oneOf": [
1186
1201
  {
@@ -1227,6 +1242,9 @@
1227
1242
  "type": "object",
1228
1243
  "properties": {
1229
1244
  "type": {
1245
+ "enum": [
1246
+ "video"
1247
+ ],
1230
1248
  "default": "video",
1231
1249
  "description": "The type of asset - set to `video` for videos.",
1232
1250
  "type": "string"
@@ -1302,6 +1320,9 @@
1302
1320
  "type": "object",
1303
1321
  "properties": {
1304
1322
  "type": {
1323
+ "enum": [
1324
+ "image"
1325
+ ],
1305
1326
  "default": "image",
1306
1327
  "description": "The type of asset - set to `image` for images.",
1307
1328
  "type": "string"
@@ -1325,6 +1346,9 @@
1325
1346
  "type": "object",
1326
1347
  "properties": {
1327
1348
  "type": {
1349
+ "enum": [
1350
+ "text"
1351
+ ],
1328
1352
  "default": "text",
1329
1353
  "description": "The type of asset - set to `text` for text.",
1330
1354
  "type": "string"
@@ -1415,6 +1439,9 @@
1415
1439
  "type": "object",
1416
1440
  "properties": {
1417
1441
  "type": {
1442
+ "enum": [
1443
+ "rich-text"
1444
+ ],
1418
1445
  "default": "rich-text",
1419
1446
  "description": "The type of asset - set to `rich-text` for rich text.",
1420
1447
  "type": "string"
@@ -1540,6 +1567,9 @@
1540
1567
  "type": "object",
1541
1568
  "properties": {
1542
1569
  "type": {
1570
+ "enum": [
1571
+ "audio"
1572
+ ],
1543
1573
  "default": "audio",
1544
1574
  "description": "The type of asset - set to `audio` for audio assets.",
1545
1575
  "type": "string"
@@ -1602,6 +1632,9 @@
1602
1632
  "type": "object",
1603
1633
  "properties": {
1604
1634
  "type": {
1635
+ "enum": [
1636
+ "shape"
1637
+ ],
1605
1638
  "default": "shape",
1606
1639
  "description": "The type of asset - set to `shape` for shape.",
1607
1640
  "type": "string"
@@ -1727,6 +1760,9 @@
1727
1760
  "type": "object",
1728
1761
  "properties": {
1729
1762
  "type": {
1763
+ "enum": [
1764
+ "luma"
1765
+ ],
1730
1766
  "default": "luma",
1731
1767
  "description": "The type of asset - set to `luma` for luma mattes.",
1732
1768
  "type": "string"
@@ -1751,6 +1787,9 @@
1751
1787
  "type": "object",
1752
1788
  "properties": {
1753
1789
  "type": {
1790
+ "enum": [
1791
+ "caption"
1792
+ ],
1754
1793
  "default": "caption",
1755
1794
  "description": "The type of asset - set to `caption` for captions.",
1756
1795
  "type": "string"
@@ -1823,9 +1862,7 @@
1823
1862
  },
1824
1863
  "required": [
1825
1864
  "type",
1826
- "prompt",
1827
- "width",
1828
- "height"
1865
+ "prompt"
1829
1866
  ]
1830
1867
  },
1831
1868
  "ImageToVideoAsset": {
@@ -1882,6 +1919,9 @@
1882
1919
  "type": "object",
1883
1920
  "properties": {
1884
1921
  "type": {
1922
+ "enum": [
1923
+ "html"
1924
+ ],
1885
1925
  "default": "html",
1886
1926
  "description": "The type of asset - set to `html` for HTML.",
1887
1927
  "type": "string"
@@ -1937,6 +1977,9 @@
1937
1977
  "type": "object",
1938
1978
  "properties": {
1939
1979
  "type": {
1980
+ "enum": [
1981
+ "title"
1982
+ ],
1940
1983
  "default": "title",
1941
1984
  "description": "The type of asset - set to `title` for titles.",
1942
1985
  "type": "string"
package/dist/schema.d.ts CHANGED
@@ -559,6 +559,7 @@ export interface components {
559
559
  effect?: "zoomIn" | "zoomInSlow" | "zoomInFast" | "zoomOut" | "zoomOutSlow" | "zoomOutFast" | "slideLeft" | "slideLeftSlow" | "slideLeftFast" | "slideRight" | "slideRightSlow" | "slideRightFast" | "slideUp" | "slideUpSlow" | "slideUpFast" | "slideDown" | "slideDownSlow" | "slideDownFast";
560
560
  /**
561
561
  * @description A filter effect to apply to the Clip. <ul>
562
+ * <li>`none` - no filter applied</li>
562
563
  * <li>`blur` - blur the scene</li>
563
564
  * <li>`boost` - boost contrast and saturation</li>
564
565
  * <li>`contrast` - increase contrast</li>
@@ -571,7 +572,7 @@ export interface components {
571
572
  * @example greyscale
572
573
  * @enum {string}
573
574
  */
574
- filter?: "blur" | "boost" | "contrast" | "darken" | "greyscale" | "lighten" | "muted" | "negative";
575
+ filter?: "none" | "blur" | "boost" | "contrast" | "darken" | "greyscale" | "lighten" | "muted" | "negative";
575
576
  /** @description Offset an asset on the horizontal axis (left or right). Use a number or an array of [Tween](./#tocs_tween) objects to create a custom animation. */
576
577
  opacity?: number | components["schemas"]["Tween"][];
577
578
  /** @description A transformation lets you modify the visual properties of a clip. Available transformations are <b>rotate</b>, <b>skew</b> and <b>flip</b>. Transformations can be combined to create interesting new shapes and effects. */
@@ -587,10 +588,10 @@ export interface components {
587
588
  /** @description The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file. */
588
589
  VideoAsset: {
589
590
  /**
590
- * @description The type of asset - set to `video` for videos.
591
- * @default video
591
+ * @description The type of asset - set to `video` for videos. (enum property replaced by openapi-typescript)
592
+ * @enum {string}
592
593
  */
593
- type: string;
594
+ type: "video";
594
595
  /**
595
596
  * @description The video source URL. The URL must be publicly accessible or include credentials.
596
597
  * @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/video.mp4
@@ -626,30 +627,20 @@ export interface components {
626
627
  speed?: number;
627
628
  crop?: components["schemas"]["Crop"];
628
629
  chromaKey?: components["schemas"]["ChromaKey"];
629
- /**
630
- * @description discriminator enum property added by openapi-typescript
631
- * @enum {string}
632
- */
633
- asset: "VideoAsset";
634
630
  };
635
631
  /** @description The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file. */
636
632
  ImageAsset: {
637
633
  /**
638
- * @description The type of asset - set to `image` for images.
639
- * @default image
634
+ * @description The type of asset - set to `image` for images. (enum property replaced by openapi-typescript)
635
+ * @enum {string}
640
636
  */
641
- type: string;
637
+ type: "image";
642
638
  /**
643
639
  * @description The image source URL. The URL must be publicly accessible or include credentials.
644
640
  * @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/image.jpg
645
641
  */
646
642
  src: string;
647
643
  crop?: components["schemas"]["Crop"];
648
- /**
649
- * @description discriminator enum property added by openapi-typescript
650
- * @enum {string}
651
- */
652
- asset: "ImageAsset";
653
644
  };
654
645
  /**
655
646
  * @description The TextAsset is used to add text and titles to a video. The text can be styled with built in and custom
@@ -657,10 +648,10 @@ export interface components {
657
648
  */
658
649
  TextAsset: {
659
650
  /**
660
- * @description The type of asset - set to `text` for text.
661
- * @default text
651
+ * @description The type of asset - set to `text` for text. (enum property replaced by openapi-typescript)
652
+ * @enum {string}
662
653
  */
663
- type: string;
654
+ type: "text";
664
655
  /**
665
656
  * @description The text string to display.
666
657
  * @example Hello World
@@ -716,11 +707,6 @@ export interface components {
716
707
  * @example ...
717
708
  */
718
709
  ellipsis?: string;
719
- /**
720
- * @description discriminator enum property added by openapi-typescript
721
- * @enum {string}
722
- */
723
- asset: "TextAsset";
724
710
  };
725
711
  /**
726
712
  * @description The RichTextAsset provides advanced text rendering with support for custom fonts, gradients, shadows, strokes,
@@ -728,10 +714,10 @@ export interface components {
728
714
  */
729
715
  RichTextAsset: {
730
716
  /**
731
- * @description The type of asset - set to `rich-text` for rich text.
732
- * @default rich-text
717
+ * @description The type of asset - set to `rich-text` for rich text. (enum property replaced by openapi-typescript)
718
+ * @enum {string}
733
719
  */
734
- type: string;
720
+ type: "rich-text";
735
721
  /**
736
722
  * @description The text string to display. Maximum 5000 characters.
737
723
  * @example Hello World
@@ -803,19 +789,14 @@ export interface components {
803
789
  align?: components["schemas"]["RichTextAlignment"];
804
790
  /** @description Animation properties for text entrance effects. */
805
791
  animation?: components["schemas"]["RichTextAnimation"];
806
- /**
807
- * @description discriminator enum property added by openapi-typescript
808
- * @enum {string}
809
- */
810
- asset: "RichTextAsset";
811
792
  };
812
793
  /** @description The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file. */
813
794
  AudioAsset: {
814
795
  /**
815
- * @description The type of asset - set to `audio` for audio assets.
816
- * @default audio
796
+ * @description The type of asset - set to `audio` for audio assets. (enum property replaced by openapi-typescript)
797
+ * @enum {string}
817
798
  */
818
- type: string;
799
+ type: "audio";
819
800
  /**
820
801
  * @description The audio source URL. The URL must be publicly accessible or include credentials.
821
802
  * @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/sound.mp3
@@ -840,11 +821,6 @@ export interface components {
840
821
  * @enum {string}
841
822
  */
842
823
  effect?: "none" | "fadeIn" | "fadeOut" | "fadeInFadeOut";
843
- /**
844
- * @description discriminator enum property added by openapi-typescript
845
- * @enum {string}
846
- */
847
- asset: "AudioAsset";
848
824
  };
849
825
  /**
850
826
  * @description The ShapeAsset is used to add shapes to a video. The shape can be styled with a fill and a stroke.
@@ -852,10 +828,10 @@ export interface components {
852
828
  */
853
829
  ShapeAsset: {
854
830
  /**
855
- * @description The type of asset - set to `shape` for shape.
856
- * @default shape
831
+ * @description The type of asset - set to `shape` for shape. (enum property replaced by openapi-typescript)
832
+ * @enum {string}
857
833
  */
858
- type: string;
834
+ type: "shape";
859
835
  /**
860
836
  * @description The shape to display.
861
837
  * @enum {string}
@@ -936,19 +912,14 @@ export interface components {
936
912
  */
937
913
  thickness: number;
938
914
  };
939
- /**
940
- * @description discriminator enum property added by openapi-typescript
941
- * @enum {string}
942
- */
943
- asset: "ShapeAsset";
944
915
  };
945
916
  /** @description The LumaAsset is used to create luma matte masks, transitions and effects between other assets. A luma matte is a grey scale image or animated video where the black areas are transparent and the white areas solid. The luma matte animation should be provided as an mp4 video file. The src must be a publicly accessible URL to the file. */
946
917
  LumaAsset: {
947
918
  /**
948
- * @description The type of asset - set to `luma` for luma mattes.
949
- * @default luma
919
+ * @description The type of asset - set to `luma` for luma mattes. (enum property replaced by openapi-typescript)
920
+ * @enum {string}
950
921
  */
951
- type: string;
922
+ type: "luma";
952
923
  /**
953
924
  * @description The luma matte source URL. The URL must be publicly accessible or include credentials.
954
925
  * @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/mask.mp4
@@ -956,11 +927,6 @@ export interface components {
956
927
  src: string;
957
928
  /** @description The start trim point of the luma matte clip, in seconds (defaults to 0). Videos will start from the in trim point. A luma matte video will play until the file ends or the Clip length is reached. */
958
929
  trim?: number;
959
- /**
960
- * @description discriminator enum property added by openapi-typescript
961
- * @enum {string}
962
- */
963
- asset: "LumaAsset";
964
930
  };
965
931
  /**
966
932
  * @description The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
@@ -975,10 +941,10 @@ export interface components {
975
941
  */
976
942
  CaptionAsset: {
977
943
  /**
978
- * @description The type of asset - set to `caption` for captions.
979
- * @default caption
944
+ * @description The type of asset - set to `caption` for captions. (enum property replaced by openapi-typescript)
945
+ * @enum {string}
980
946
  */
981
- type: string;
947
+ type: "caption";
982
948
  /**
983
949
  * @description The URL to an SRT or VTT subtitles file. The URL must be publicly accessible or include credentials.
984
950
  * @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/captions.srt
@@ -1001,11 +967,6 @@ export interface components {
1001
967
  * @example 1
1002
968
  */
1003
969
  speed?: number;
1004
- /**
1005
- * @description discriminator enum property added by openapi-typescript
1006
- * @enum {string}
1007
- */
1008
- asset: "CaptionAsset";
1009
970
  };
1010
971
  /** @description The TextToImageAsset lets you create a dynamic image from a text prompt. */
1011
972
  TextToImageAsset: {
@@ -1024,12 +985,12 @@ export interface components {
1024
985
  * @description The width of the image in pixels.
1025
986
  * @example 512
1026
987
  */
1027
- width: number;
988
+ width?: number;
1028
989
  /**
1029
990
  * @description The height of the image in pixels.
1030
991
  * @example 512
1031
992
  */
1032
- height: number;
993
+ height?: number;
1033
994
  crop?: components["schemas"]["Crop"];
1034
995
  };
1035
996
  /** @description The ImageToVideoAsset lets you create a video from an image and a text prompt. */
@@ -1074,10 +1035,10 @@ export interface components {
1074
1035
  */
1075
1036
  HtmlAsset: {
1076
1037
  /**
1077
- * @description The type of asset - set to `html` for HTML.
1078
- * @default html
1038
+ * @description The type of asset - set to `html` for HTML. (enum property replaced by openapi-typescript)
1039
+ * @enum {string}
1079
1040
  */
1080
- type: string;
1041
+ type: "html";
1081
1042
  /**
1082
1043
  * @description The HTML text string. See list of [supported HTML tags](https://shotstack.io/docs/guide/architecting-an-application/html-support/#supported-html-tags).
1083
1044
  * @example <p>Hello <b>World</b></p>
@@ -1115,11 +1076,6 @@ export interface components {
1115
1076
  * @enum {string}
1116
1077
  */
1117
1078
  position?: "top" | "topRight" | "right" | "bottomRight" | "bottom" | "bottomLeft" | "left" | "topLeft" | "center";
1118
- /**
1119
- * @description discriminator enum property added by openapi-typescript
1120
- * @enum {string}
1121
- */
1122
- asset: "HtmlAsset";
1123
1079
  };
1124
1080
  /**
1125
1081
  * @deprecated
@@ -1129,10 +1085,10 @@ export interface components {
1129
1085
  */
1130
1086
  TitleAsset: {
1131
1087
  /**
1132
- * @description The type of asset - set to `title` for titles.
1133
- * @default title
1088
+ * @description The type of asset - set to `title` for titles. (enum property replaced by openapi-typescript)
1089
+ * @enum {string}
1134
1090
  */
1135
- type: string;
1091
+ type: "title";
1136
1092
  /**
1137
1093
  * @description The title text string - i.e. "My Title".
1138
1094
  * @example Hello World
@@ -1191,11 +1147,6 @@ export interface components {
1191
1147
  position?: "top" | "topRight" | "right" | "bottomRight" | "bottom" | "bottomLeft" | "left" | "topLeft" | "center";
1192
1148
  /** @description Offset the location of the title relative to its position on the screen. */
1193
1149
  offset?: components["schemas"]["Offset"];
1194
- /**
1195
- * @description discriminator enum property added by openapi-typescript
1196
- * @enum {string}
1197
- */
1198
- asset: "TitleAsset";
1199
1150
  };
1200
1151
  /** @description In and out transitions for a clip - i.e. fade in and fade out */
1201
1152
  Transition: {
@@ -70,13 +70,13 @@ exports.captionMarginSchema = exports.captionpropertiesCaptionMarginSchema;
70
70
  *
71
71
  */
72
72
  exports.captionassetCaptionAssetSchema = zod_1.z.object({
73
- type: zod_1.z.string().default("caption"),
73
+ type: zod_1.z.enum(["caption"]),
74
74
  src: zod_1.z.string(),
75
75
  font: zod_1.z.optional(exports.captionpropertiesCaptionFontSchema),
76
76
  background: zod_1.z.optional(exports.captionpropertiesCaptionBackgroundSchema),
77
77
  margin: zod_1.z.optional(exports.captionpropertiesCaptionMarginSchema),
78
- trim: zod_1.z.optional(zod_1.z.number()),
79
- speed: zod_1.z.optional(zod_1.z.number().gte(0).lte(10)),
78
+ trim: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number())),
79
+ speed: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number().gte(0).lte(10))),
80
80
  });
81
81
  exports.captionAssetSchema = exports.captionassetCaptionAssetSchema;
82
82
  /**
@@ -837,7 +837,7 @@ exports.fontSchema = exports.fontFontSchema;
837
837
  * @deprecated
838
838
  */
839
839
  exports.htmlassetHtmlAssetSchema = zod_1.z.object({
840
- type: zod_1.z.string().default("html"),
840
+ type: zod_1.z.enum(["html"]),
841
841
  html: zod_1.z.string(),
842
842
  css: zod_1.z.optional(zod_1.z.string()),
843
843
  width: zod_1.z.optional(zod_1.z.int()),
@@ -860,7 +860,7 @@ exports.htmlAssetSchema = exports.htmlassetHtmlAssetSchema;
860
860
  * The ImageAsset is used to create video from images to compose an image. The src must be a publicly accessible URL to an image resource such as a jpg or png file.
861
861
  */
862
862
  exports.imageassetImageAssetSchema = zod_1.z.object({
863
- type: zod_1.z.string().default("image"),
863
+ type: zod_1.z.enum(["image"]),
864
864
  src: zod_1.z.string(),
865
865
  crop: zod_1.z.optional(exports.cropCropSchema),
866
866
  });
@@ -873,7 +873,7 @@ exports.imagetovideoassetImageToVideoAssetSchema = zod_1.z.object({
873
873
  src: zod_1.z.optional(zod_1.z.string()),
874
874
  prompt: zod_1.z.optional(zod_1.z.string()),
875
875
  aspectRatio: zod_1.z.optional(zod_1.z.enum(["1:1", "4:3", "16:9", "9:16", "3:4", "21:9", "9:21"])),
876
- speed: zod_1.z.optional(zod_1.z.number().gte(0).lte(10)),
876
+ speed: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number().gte(0).lte(10))),
877
877
  crop: zod_1.z.optional(exports.cropCropSchema),
878
878
  });
879
879
  exports.imageToVideoAssetSchema = exports.imagetovideoassetImageToVideoAssetSchema;
@@ -981,7 +981,7 @@ exports.uploadResponseSchema = exports.uploadresponseUploadResponseSchema;
981
981
  * Set the playback speed of a video or audio file. Allows you to preserve the pitch of the audio so that it is sped up without sounding too high pitched or too low.
982
982
  */
983
983
  exports.speedSpeedSchema = zod_1.z.object({
984
- speed: zod_1.z.optional(zod_1.z.number().gte(0).lte(10)),
984
+ speed: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number().gte(0).lte(10))),
985
985
  preservePitch: zod_1.z.optional(zod_1.z.boolean()),
986
986
  });
987
987
  exports.speedSchema = exports.speedSpeedSchema;
@@ -996,9 +996,9 @@ exports.transcriptionSchema = exports.transcriptionTranscriptionSchema;
996
996
  * The LumaAsset is used to create luma matte masks, transitions and effects between other assets. A luma matte is a grey scale image or animated video where the black areas are transparent and the white areas solid. The luma matte animation should be provided as an mp4 video file. The src must be a publicly accessible URL to the file.
997
997
  */
998
998
  exports.lumaassetLumaAssetSchema = zod_1.z.object({
999
- type: zod_1.z.string().default("luma"),
999
+ type: zod_1.z.enum(["luma"]),
1000
1000
  src: zod_1.z.string(),
1001
- trim: zod_1.z.optional(zod_1.z.number()),
1001
+ trim: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number())),
1002
1002
  });
1003
1003
  exports.lumaAssetSchema = exports.lumaassetLumaAssetSchema;
1004
1004
  /**
@@ -1249,7 +1249,7 @@ exports.richTextStyleSchema = exports.richtextpropertiesRichTextStyleSchema;
1249
1249
  *
1250
1250
  */
1251
1251
  exports.richtextassetRichTextAssetSchema = zod_1.z.object({
1252
- type: zod_1.z.string().default("rich-text"),
1252
+ type: zod_1.z.enum(["rich-text"]),
1253
1253
  text: zod_1.z.string().max(5000),
1254
1254
  font: zod_1.z.optional(exports.richtextpropertiesRichTextFontSchema),
1255
1255
  style: zod_1.z.optional(exports.richtextpropertiesRichTextStyleSchema),
@@ -1301,7 +1301,7 @@ exports.transferSchema = exports.transferTransferSchema;
1301
1301
  *
1302
1302
  */
1303
1303
  exports.shapeassetShapeAssetSchema = zod_1.z.object({
1304
- type: zod_1.z.string().default("shape"),
1304
+ type: zod_1.z.enum(["shape"]),
1305
1305
  shape: zod_1.z.enum(["rectangle", "circle", "line"]),
1306
1306
  width: zod_1.z.optional(zod_1.z.int()),
1307
1307
  height: zod_1.z.optional(zod_1.z.int()),
@@ -1537,7 +1537,7 @@ exports.textpropertiesTextStrokeSchema = zod_1.z.object({
1537
1537
  *
1538
1538
  */
1539
1539
  exports.textassetTextAssetSchema = zod_1.z.object({
1540
- type: zod_1.z.string().default("text"),
1540
+ type: zod_1.z.enum(["text"]),
1541
1541
  text: zod_1.z.string(),
1542
1542
  width: zod_1.z.optional(zod_1.z.int()),
1543
1543
  height: zod_1.z.optional(zod_1.z.int()),
@@ -1555,8 +1555,8 @@ exports.textAssetSchema = exports.textassetTextAssetSchema;
1555
1555
  exports.texttoimageassetTextToImageAssetSchema = zod_1.z.object({
1556
1556
  type: zod_1.z.enum(["text-to-image"]),
1557
1557
  prompt: zod_1.z.string(),
1558
- width: zod_1.z.int(),
1559
- height: zod_1.z.int(),
1558
+ width: zod_1.z.optional(zod_1.z.int()),
1559
+ height: zod_1.z.optional(zod_1.z.int()),
1560
1560
  crop: zod_1.z.optional(exports.cropCropSchema),
1561
1561
  });
1562
1562
  exports.textToImageAssetSchema = exports.texttoimageassetTextToImageAssetSchema;
@@ -1785,11 +1785,11 @@ exports.tweenSchema = exports.tweenTweenSchema;
1785
1785
  * The AudioAsset is used to add sound effects and audio at specific intervals on the timeline. The src must be a publicly accessible URL to an audio resource such as an mp3 file.
1786
1786
  */
1787
1787
  exports.audioassetAudioAssetSchema = zod_1.z.object({
1788
- type: zod_1.z.string().default("audio"),
1788
+ type: zod_1.z.enum(["audio"]),
1789
1789
  src: zod_1.z.string(),
1790
- trim: zod_1.z.optional(zod_1.z.number()),
1790
+ trim: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number())),
1791
1791
  volume: zod_1.z.optional(zod_1.z.union([zod_1.z.number().gte(0).lte(1), zod_1.z.array(exports.tweenTweenSchema)])),
1792
- speed: zod_1.z.optional(zod_1.z.number().gte(0).lte(10)),
1792
+ speed: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number().gte(0).lte(10))),
1793
1793
  effect: zod_1.z.optional(zod_1.z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
1794
1794
  });
1795
1795
  exports.audioAssetSchema = exports.audioassetAudioAssetSchema;
@@ -1825,7 +1825,7 @@ exports.skewTransformationSchema = exports.skewtransformationSkewTransformationS
1825
1825
  * @deprecated
1826
1826
  */
1827
1827
  exports.titleassetTitleAssetSchema = zod_1.z.object({
1828
- type: zod_1.z.string().default("title"),
1828
+ type: zod_1.z.enum(["title"]),
1829
1829
  text: zod_1.z.string(),
1830
1830
  style: zod_1.z.optional(zod_1.z.enum([
1831
1831
  "minimal",
@@ -1877,13 +1877,13 @@ exports.transformationSchema = exports.transformationTransformationSchema;
1877
1877
  * The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file.
1878
1878
  */
1879
1879
  exports.videoassetVideoAssetSchema = zod_1.z.object({
1880
- type: zod_1.z.string().default("video"),
1880
+ type: zod_1.z.enum(["video"]),
1881
1881
  src: zod_1.z.string(),
1882
1882
  transcode: zod_1.z.optional(zod_1.z.boolean()).default(false),
1883
- trim: zod_1.z.optional(zod_1.z.number()),
1883
+ trim: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number())),
1884
1884
  volume: zod_1.z.optional(zod_1.z.union([zod_1.z.number().gte(0).lte(1), zod_1.z.array(exports.tweenTweenSchema)])),
1885
1885
  volumeEffect: zod_1.z.optional(zod_1.z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
1886
- speed: zod_1.z.optional(zod_1.z.number().gte(0).lte(10)),
1886
+ speed: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number().gte(0).lte(10))),
1887
1887
  crop: zod_1.z.optional(exports.cropCropSchema),
1888
1888
  chromaKey: zod_1.z.optional(exports.chromakeyChromaKeySchema),
1889
1889
  });
@@ -1891,67 +1891,19 @@ exports.videoAssetSchema = exports.videoassetVideoAssetSchema;
1891
1891
  /**
1892
1892
  * The type of asset to display for the duration of the Clip, i.e. a video clip or an image. Choose from one of the available asset types below.
1893
1893
  */
1894
- exports.assetAssetSchema = zod_1.z.union([
1895
- zod_1.z
1896
- .object({
1897
- asset: zod_1.z.literal("videoasset_VideoAsset"),
1898
- })
1899
- .and(exports.videoassetVideoAssetSchema),
1900
- zod_1.z
1901
- .object({
1902
- asset: zod_1.z.literal("imageasset_ImageAsset"),
1903
- })
1904
- .and(exports.imageassetImageAssetSchema),
1905
- zod_1.z
1906
- .object({
1907
- asset: zod_1.z.literal("textasset_TextAsset"),
1908
- })
1909
- .and(exports.textassetTextAssetSchema),
1910
- zod_1.z
1911
- .object({
1912
- asset: zod_1.z.literal("richtextasset_RichTextAsset"),
1913
- })
1914
- .and(exports.richtextassetRichTextAssetSchema),
1915
- zod_1.z
1916
- .object({
1917
- asset: zod_1.z.literal("audioasset_AudioAsset"),
1918
- })
1919
- .and(exports.audioassetAudioAssetSchema),
1920
- zod_1.z
1921
- .object({
1922
- asset: zod_1.z.literal("lumaasset_LumaAsset"),
1923
- })
1924
- .and(exports.lumaassetLumaAssetSchema),
1925
- zod_1.z
1926
- .object({
1927
- asset: zod_1.z.literal("captionasset_CaptionAsset"),
1928
- })
1929
- .and(exports.captionassetCaptionAssetSchema),
1930
- zod_1.z
1931
- .object({
1932
- asset: zod_1.z.literal("htmlasset_HtmlAsset"),
1933
- })
1934
- .and(exports.htmlassetHtmlAssetSchema),
1935
- zod_1.z
1936
- .object({
1937
- asset: zod_1.z.literal("titleasset_TitleAsset"),
1938
- })
1939
- .and(exports.titleassetTitleAssetSchema),
1940
- zod_1.z
1941
- .object({
1942
- asset: zod_1.z.literal("shapeasset_ShapeAsset"),
1943
- })
1944
- .and(exports.shapeassetShapeAssetSchema),
1945
- zod_1.z
1946
- .object({
1947
- asset: zod_1.z.literal("texttoimageasset_TextToImageAsset"),
1948
- })
1949
- .and(exports.texttoimageassetTextToImageAssetSchema),
1950
- zod_1.z
1951
- .object({
1952
- asset: zod_1.z.literal("imagetovideoasset_ImageToVideoAsset"),
1953
- })
1954
- .and(exports.imagetovideoassetImageToVideoAssetSchema),
1894
+ exports.assetAssetSchema = zod_1.z.discriminatedUnion("type", [
1895
+ exports.videoassetVideoAssetSchema,
1896
+ exports.imageassetImageAssetSchema,
1897
+ exports.textassetTextAssetSchema,
1898
+ exports.richtextassetRichTextAssetSchema,
1899
+ exports.audioassetAudioAssetSchema,
1900
+ exports.lumaassetLumaAssetSchema,
1901
+ exports.captionassetCaptionAssetSchema,
1902
+ exports.htmlassetHtmlAssetSchema,
1903
+ exports.titleassetTitleAssetSchema,
1904
+ exports.shapeassetShapeAssetSchema,
1905
+ exports.texttoimageassetTextToImageAssetSchema,
1906
+ exports.imagetovideoassetImageToVideoAssetSchema,
1955
1907
  ]);
1956
1908
  exports.assetSchema = exports.assetAssetSchema;
1957
1909
  /**
@@ -1959,10 +1911,10 @@ exports.assetSchema = exports.assetAssetSchema;
1959
1911
  */
1960
1912
  exports.clipClipSchema = zod_1.z.object({
1961
1913
  asset: exports.assetAssetSchema,
1962
- start: zod_1.z.union([zod_1.z.number(), zod_1.z.enum(["auto"])]),
1963
- length: zod_1.z.union([zod_1.z.number(), zod_1.z.literal("auto"), zod_1.z.literal("end")]),
1914
+ start: zod_1.z.union([zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number()), zod_1.z.enum(["auto"])]),
1915
+ length: zod_1.z.union([zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number()), zod_1.z.literal("auto"), zod_1.z.literal("end")]),
1964
1916
  fit: zod_1.z.optional(zod_1.z.enum(["cover", "contain", "crop", "none"])),
1965
- scale: zod_1.z.optional(zod_1.z.number()),
1917
+ scale: zod_1.z.optional(zod_1.z.preprocess((val) => typeof val === 'string' && val !== '' && !isNaN(Number(val)) ? Number(val) : val, zod_1.z.number())),
1966
1918
  width: zod_1.z.optional(zod_1.z.int().gte(1).lte(3840)),
1967
1919
  height: zod_1.z.optional(zod_1.z.int().gte(1).lte(2160)),
1968
1920
  position: zod_1.z.optional(zod_1.z.enum([
@@ -1999,6 +1951,7 @@ exports.clipClipSchema = zod_1.z.object({
1999
1951
  "slideDownFast",
2000
1952
  ])),
2001
1953
  filter: zod_1.z.optional(zod_1.z.enum([
1954
+ "none",
2002
1955
  "blur",
2003
1956
  "boost",
2004
1957
  "contrast",