@shotstack/schemas 1.7.0 → 1.8.2

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.
Files changed (53) hide show
  1. package/README.md +89 -89
  2. package/dist/api.bundled.json +49 -833
  3. package/dist/json-schema/asset.json +115 -856
  4. package/dist/json-schema/audio-asset.json +31 -1
  5. package/dist/json-schema/blueprint.json +380 -0
  6. package/dist/json-schema/caption-detailer.json +275 -0
  7. package/dist/json-schema/clip.json +256 -949
  8. package/dist/json-schema/edit.json +247 -940
  9. package/dist/json-schema/index.cjs +5 -0
  10. package/dist/json-schema/index.d.ts +5 -0
  11. package/dist/json-schema/index.js +5 -0
  12. package/dist/json-schema/offset.json +31 -1
  13. package/dist/json-schema/rich-caption-asset.json +221 -140
  14. package/dist/json-schema/rich-text-content.json +370 -0
  15. package/dist/json-schema/rich-text-effects.json +400 -0
  16. package/dist/json-schema/rotate-transformation.json +31 -1
  17. package/dist/json-schema/schemas.json +264 -1044
  18. package/dist/json-schema/skew-transformation.json +31 -1
  19. package/dist/json-schema/svg-asset.json +6 -857
  20. package/dist/json-schema/template.json +541 -0
  21. package/dist/json-schema/text-to-speech-asset.json +31 -1
  22. package/dist/json-schema/timeline.json +256 -949
  23. package/dist/json-schema/track.json +256 -949
  24. package/dist/json-schema/transformation.json +52 -22
  25. package/dist/json-schema/transition.json +50 -2
  26. package/dist/json-schema/tween.json +31 -1
  27. package/dist/json-schema/video-asset.json +56 -26
  28. package/dist/schema.d.ts +43 -660
  29. package/dist/zod/zod.gen.cjs +914 -1640
  30. package/dist/zod/zod.gen.d.ts +306 -8714
  31. package/dist/zod/zod.gen.js +911 -1636
  32. package/dist/zod/zod.gen.ts +1593 -1880
  33. package/package.json +79 -79
  34. package/dist/json-schema/svg-arrow-shape.json +0 -49
  35. package/dist/json-schema/svg-circle-shape.json +0 -28
  36. package/dist/json-schema/svg-cross-shape.json +0 -42
  37. package/dist/json-schema/svg-ellipse-shape.json +0 -35
  38. package/dist/json-schema/svg-fill.json +0 -169
  39. package/dist/json-schema/svg-gradient-stop.json +0 -25
  40. package/dist/json-schema/svg-heart-shape.json +0 -28
  41. package/dist/json-schema/svg-line-shape.json +0 -35
  42. package/dist/json-schema/svg-linear-gradient-fill.json +0 -80
  43. package/dist/json-schema/svg-path-shape.json +0 -26
  44. package/dist/json-schema/svg-polygon-shape.json +0 -35
  45. package/dist/json-schema/svg-radial-gradient-fill.json +0 -66
  46. package/dist/json-schema/svg-rectangle-shape.json +0 -49
  47. package/dist/json-schema/svg-ring-shape.json +0 -35
  48. package/dist/json-schema/svg-shadow.json +0 -79
  49. package/dist/json-schema/svg-shape.json +0 -404
  50. package/dist/json-schema/svg-solid-fill.json +0 -40
  51. package/dist/json-schema/svg-star-shape.json +0 -42
  52. package/dist/json-schema/svg-stroke.json +0 -115
  53. package/dist/json-schema/svg-transform.json +0 -93
@@ -1,6 +1,6 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
- import { z } from 'zod';
3
+ import { z } from "zod";
4
4
 
5
5
  export const editRootSchema = z.unknown();
6
6
 
@@ -38,10 +38,10 @@ export const uploadRootSchema = z.unknown();
38
38
  * Displays a background box behind the caption text.
39
39
  */
40
40
  export const captionpropertiesCaptionBackgroundSchema = z.object({
41
- color: z.optional(z.string()),
42
- opacity: 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*\}\}$/)])),
43
- padding: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
44
- borderRadius: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
41
+ color: z.optional(z.string()),
42
+ opacity: 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*\}\}$/)])),
43
+ padding: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
44
+ borderRadius: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
45
45
  }).strict();
46
46
 
47
47
  export const captionBackgroundSchema = captionpropertiesCaptionBackgroundSchema;
@@ -50,13 +50,13 @@ export const captionBackgroundSchema = captionpropertiesCaptionBackgroundSchema;
50
50
  * Font properties for captions text.
51
51
  */
52
52
  export const captionpropertiesCaptionFontSchema = z.object({
53
- family: z.optional(z.string()),
54
- color: z.optional(z.string()),
55
- opacity: 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*\}\}$/)])),
56
- size: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
57
- lineHeight: 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*\}\}$/)])),
58
- stroke: z.optional(z.string()),
59
- strokeWidth: 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*\}\}$/)]))
53
+ family: z.optional(z.string()),
54
+ color: z.optional(z.string()),
55
+ opacity: 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*\}\}$/)])),
56
+ size: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
57
+ lineHeight: 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*\}\}$/)])),
58
+ stroke: z.optional(z.string()),
59
+ strokeWidth: 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*\}\}$/)])),
60
60
  }).strict();
61
61
 
62
62
  export const captionFontSchema = captionpropertiesCaptionFontSchema;
@@ -65,9 +65,9 @@ export const captionFontSchema = captionpropertiesCaptionFontSchema;
65
65
  * The margin properties for captions. Margins are used to position the caption text and background on the screen.
66
66
  */
67
67
  export const captionpropertiesCaptionMarginSchema = z.object({
68
- top: 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*\}\}$/)])),
69
- left: 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*\}\}$/)])),
70
- right: 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*\}\}$/)]))
68
+ top: 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*\}\}$/)])),
69
+ left: 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*\}\}$/)])),
70
+ right: 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*\}\}$/)])),
71
71
  }).strict();
72
72
 
73
73
  export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
@@ -85,13 +85,13 @@ export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
85
85
  *
86
86
  */
87
87
  export const captionassetCaptionAssetSchema = z.object({
88
- type: z.enum(['caption']),
89
- src: z.string().min(1).regex(/\S/),
90
- font: z.optional(captionpropertiesCaptionFontSchema),
91
- background: z.optional(captionpropertiesCaptionBackgroundSchema),
92
- margin: z.optional(captionpropertiesCaptionMarginSchema),
93
- trim: 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*\}\}$/)])),
94
- speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
88
+ type: z.enum(["caption"]),
89
+ src: z.string().min(1).regex(/\S/),
90
+ font: z.optional(captionpropertiesCaptionFontSchema),
91
+ background: z.optional(captionpropertiesCaptionBackgroundSchema),
92
+ margin: z.optional(captionpropertiesCaptionMarginSchema),
93
+ trim: 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*\}\}$/)])),
94
+ speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
95
95
  }).strict();
96
96
 
97
97
  export const captionAssetSchema = captionassetCaptionAssetSchema;
@@ -100,9 +100,9 @@ export const captionAssetSchema = captionassetCaptionAssetSchema;
100
100
  * Chroma key is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments. Commonly used for green screen and blue screen effects.
101
101
  */
102
102
  export const chromakeyChromaKeySchema = z.object({
103
- color: z.union([z.string().regex(/^#[0-9a-fA-F]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
104
- threshold: 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().int().gte(0).lte(250)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
105
- halo: 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().int().gte(0).lte(250)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
103
+ color: z.union([z.string().regex(/^#[0-9a-fA-F]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
104
+ threshold: 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().int().gte(0).lte(250)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
105
+ halo: 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().int().gte(0).lte(250)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
106
106
  }).strict();
107
107
 
108
108
  export const chromaKeySchema = chromakeyChromaKeySchema;
@@ -111,19 +111,14 @@ export const chromaKeySchema = chromakeyChromaKeySchema;
111
111
  * Options for the D-ID text-to-avatar service. Set the text to be converted to an avatar and configure the avatar and background. The output will be generated as an MP4 video file.
112
112
  */
113
113
  export const didTextToAvatarOptionsDidTextToAvatarOptionsSchema = z.object({
114
- type: z.enum(['text-to-avatar']),
115
- text: z.string(),
116
- avatar: z.enum([
117
- 'jack',
118
- 'lana',
119
- 'lily',
120
- 'matt',
121
- 'rian'
122
- ]),
123
- background: z.optional(z.string())
114
+ type: z.enum(["text-to-avatar"]),
115
+ text: z.string(),
116
+ avatar: z.enum(["jack", "lana", "lily", "matt", "rian"]),
117
+ background: z.optional(z.string()),
124
118
  }).strict();
125
119
 
126
- export const didTextToAvatarOptionsSchema = didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
120
+ export const didTextToAvatarOptionsSchema =
121
+ didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
127
122
 
128
123
  /**
129
124
  * Generate assets using the third party D-ID provider AI services.
@@ -132,18 +127,21 @@ export const didTextToAvatarOptionsSchema = didTextToAvatarOptionsDidTextToAvata
132
127
  * <li><a href="#tocs_didtexttoavataroptions">DidTextToAvatarOptions</a></li>
133
128
  * </ul>
134
129
  */
135
- export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = z.object({
136
- type: z.literal('didTextToAvatarOptions_DIDTextToAvatarOptions')
137
- }).strict().and(didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
130
+ export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = z
131
+ .object({
132
+ type: z.literal("didTextToAvatarOptions_DIDTextToAvatarOptions"),
133
+ })
134
+ .and(didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
138
135
 
139
- export const didGeneratedAssetOptionsSchema = didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
136
+ export const didGeneratedAssetOptionsSchema =
137
+ didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
140
138
 
141
139
  /**
142
140
  * Generate assets using D-ID. D-ID provide a text-to-avatar service. The D-ID provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/d-id), not in the request.
143
141
  */
144
142
  export const didGeneratedAssetDidGeneratedAssetSchema = z.object({
145
- provider: z.enum(['d-id']),
146
- options: didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema
143
+ provider: z.enum(["d-id"]),
144
+ options: didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema,
147
145
  }).strict();
148
146
 
149
147
  export const didGeneratedAssetSchema = didGeneratedAssetDidGeneratedAssetSchema;
@@ -151,23 +149,25 @@ export const didGeneratedAssetSchema = didGeneratedAssetDidGeneratedAssetSchema;
151
149
  /**
152
150
  * Options for the ElevenLabs text-to-speech service. Set the text to be converted to speech and choose a voice to set the speaking style. The output will be generated as an MP3 audio file available at the URL returned in the response.
153
151
  */
154
- export const elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema = z.object({
155
- type: z.enum(['text-to-speech']),
152
+ export const elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema =
153
+ z.object({
154
+ type: z.enum(["text-to-speech"]),
156
155
  text: z.string(),
157
156
  voice: z.enum([
158
- 'Adam',
159
- 'Antoni',
160
- 'Arnold',
161
- 'Bella',
162
- 'Domi',
163
- 'Elli',
164
- 'Josh',
165
- 'Rachel',
166
- 'Sam'
167
- ])
168
- }).strict();
157
+ "Adam",
158
+ "Antoni",
159
+ "Arnold",
160
+ "Bella",
161
+ "Domi",
162
+ "Elli",
163
+ "Josh",
164
+ "Rachel",
165
+ "Sam",
166
+ ]),
167
+ }).strict();
169
168
 
170
- export const elevenLabsTextToSpeechOptionsSchema = elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
169
+ export const elevenLabsTextToSpeechOptionsSchema =
170
+ elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
171
171
 
172
172
  /**
173
173
  * Generate assets using the third party ElevenLabs provider AI services.
@@ -176,148 +176,157 @@ export const elevenLabsTextToSpeechOptionsSchema = elevenlabsTextToSpeechOptions
176
176
  * <li><a href="#tocs_elevenlabstexttospeechoptions">ElevenLabsTextToSpeechOptions</a></li>
177
177
  * </ul>
178
178
  */
179
- export const elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema = z.object({
180
- type: z.literal('elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions')
181
- }).strict().and(elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
179
+ export const elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema =
180
+ z
181
+ .object({
182
+ type: z.literal(
183
+ "elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions",
184
+ ),
185
+ })
186
+ .and(elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
182
187
 
183
- export const elevenLabsGeneratedAssetOptionsSchema = elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
188
+ export const elevenLabsGeneratedAssetOptionsSchema =
189
+ elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
184
190
 
185
191
  /**
186
192
  * Generate assets using ElevenLabs. ElevenLabs provide a text-to-speech service. The ElevenLabs provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/elevenlabs), not in the request.
187
193
  */
188
194
  export const elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema = z.object({
189
- provider: z.enum(['elevenlabs']),
190
- options: elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema
195
+ provider: z.enum(["elevenlabs"]),
196
+ options: elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema,
191
197
  }).strict();
192
198
 
193
- export const elevenLabsGeneratedAssetSchema = elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
199
+ export const elevenLabsGeneratedAssetSchema =
200
+ elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
194
201
 
195
202
  /**
196
203
  * Options for the HeyGen text-to-avatar service. Set the text to be converted to an avatar and configure the avatars voice, speaking style, appearance and background. The output will be generated as an MP4 video file available at the URL returned in the response.
197
204
  */
198
- export const heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema = z.object({
199
- type: z.enum(['text-to-avatar']),
205
+ export const heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema =
206
+ z.object({
207
+ type: z.enum(["text-to-avatar"]),
200
208
  text: z.string(),
201
209
  avatar: z.enum([
202
- 'Angela',
203
- 'Bill',
204
- 'Daisy',
205
- 'Derek',
206
- 'Eva',
207
- 'Jake',
208
- 'Jeff',
209
- 'Jerome',
210
- 'Joon',
211
- 'Kayla',
212
- 'Kent',
213
- 'Luna',
214
- 'Mark',
215
- 'Matthew',
216
- 'Monica',
217
- 'Peter',
218
- 'Selina',
219
- 'Tanya',
220
- 'Thomas',
221
- 'Tina',
222
- 'Tyler',
223
- 'Vanessa',
224
- 'Vera',
225
- 'Wilson',
226
- 'Zoey'
210
+ "Angela",
211
+ "Bill",
212
+ "Daisy",
213
+ "Derek",
214
+ "Eva",
215
+ "Jake",
216
+ "Jeff",
217
+ "Jerome",
218
+ "Joon",
219
+ "Kayla",
220
+ "Kent",
221
+ "Luna",
222
+ "Mark",
223
+ "Matthew",
224
+ "Monica",
225
+ "Peter",
226
+ "Selina",
227
+ "Tanya",
228
+ "Thomas",
229
+ "Tina",
230
+ "Tyler",
231
+ "Vanessa",
232
+ "Vera",
233
+ "Wilson",
234
+ "Zoey",
227
235
  ]),
228
236
  voice: z.enum([
229
- 'Abbi - Natural',
230
- 'Adam - Natural',
231
- 'Aiston - Friendly',
232
- 'Alice - Newscaster',
233
- 'Alison - Cheerful',
234
- 'Amber - Friendly',
235
- 'Amy - Warm',
236
- 'Ana - Cheerful',
237
- 'Antoni - Friendly',
238
- 'Aria - Newscaster',
239
- 'Arnold - Cheerful',
240
- 'Arthur - Natural',
241
- 'Bella - Friendly',
242
- 'Belle - Natural',
243
- 'Brandon - Warm',
244
- 'Brian - Natural',
245
- 'Bruce - Natural',
246
- 'Cerise - Cheerful',
247
- 'Christopher - Calm',
248
- 'Clara - Professional',
249
- 'Connor - Natural',
250
- 'Dahlia - Friendly',
251
- 'Davis - Professional',
252
- 'Dean - Natural',
253
- 'Delbert - Cheerful',
254
- 'Edward - Friendly',
255
- 'Elaine - Calm',
256
- 'Emily - Natural',
257
- 'Emma - Newscaster',
258
- 'Eric - Newscaster',
259
- 'Grace - Natural',
260
- 'Hailey - Calm',
261
- 'Indira - Cheerful',
262
- 'Isabella - Cheerful',
263
- 'Jacob - Natural',
264
- 'Jahmai - Friendly',
265
- 'Jane - Serious',
266
- 'Jason - Serious',
267
- 'Jelle - Friendly',
268
- 'Jen - Natural',
269
- 'Jenny - Professional',
270
- 'Jodi - Cheerful',
271
- 'Joey - Calm',
272
- 'Johan - Friendly',
273
- 'Josie - Cheerful',
274
- 'Keanan - Natural',
275
- 'Keith - Cheerful',
276
- 'Kellie - Friendly',
277
- 'Lauren - Friendly',
278
- 'Leah - Natural',
279
- 'Liam - Professional',
280
- 'Libby - Natural',
281
- 'Lily - Professional',
282
- 'Lucas - Natural',
283
- 'Luke - Professional',
284
- 'Luna - Natural',
285
- 'Marieke - Natural',
286
- 'Matthew - Professional',
287
- 'Michelle - Natural',
288
- 'Mitchell - Natural',
289
- 'Molly - Newscaster',
290
- 'Monica - Calm',
291
- 'Natasha - Professional',
292
- 'Neerja - Newscaster',
293
- 'Noah - Serious',
294
- 'Oliver - Newscaster',
295
- 'Olivia - Calm',
296
- 'Paul - Natural',
297
- 'Prabhat - Natural',
298
- 'Raveena - Natural',
299
- 'Rudi - Friendly',
300
- 'Ryan - Professional',
301
- 'Sam - Natural',
302
- 'Sara - Cheerful',
303
- 'Sherry - Friendly',
304
- 'Sonia - Warm',
305
- 'Thomas - Natural',
306
- 'Todd - Professional',
307
- 'Tony - Professional',
308
- 'Tracy - Cheerful',
309
- 'Wayne - Natural',
310
- 'Wilder - Natural',
311
- 'Wille - Natural',
312
- 'William - Friendly'
237
+ "Abbi - Natural",
238
+ "Adam - Natural",
239
+ "Aiston - Friendly",
240
+ "Alice - Newscaster",
241
+ "Alison - Cheerful",
242
+ "Amber - Friendly",
243
+ "Amy - Warm",
244
+ "Ana - Cheerful",
245
+ "Antoni - Friendly",
246
+ "Aria - Newscaster",
247
+ "Arnold - Cheerful",
248
+ "Arthur - Natural",
249
+ "Bella - Friendly",
250
+ "Belle - Natural",
251
+ "Brandon - Warm",
252
+ "Brian - Natural",
253
+ "Bruce - Natural",
254
+ "Cerise - Cheerful",
255
+ "Christopher - Calm",
256
+ "Clara - Professional",
257
+ "Connor - Natural",
258
+ "Dahlia - Friendly",
259
+ "Davis - Professional",
260
+ "Dean - Natural",
261
+ "Delbert - Cheerful",
262
+ "Edward - Friendly",
263
+ "Elaine - Calm",
264
+ "Emily - Natural",
265
+ "Emma - Newscaster",
266
+ "Eric - Newscaster",
267
+ "Grace - Natural",
268
+ "Hailey - Calm",
269
+ "Indira - Cheerful",
270
+ "Isabella - Cheerful",
271
+ "Jacob - Natural",
272
+ "Jahmai - Friendly",
273
+ "Jane - Serious",
274
+ "Jason - Serious",
275
+ "Jelle - Friendly",
276
+ "Jen - Natural",
277
+ "Jenny - Professional",
278
+ "Jodi - Cheerful",
279
+ "Joey - Calm",
280
+ "Johan - Friendly",
281
+ "Josie - Cheerful",
282
+ "Keanan - Natural",
283
+ "Keith - Cheerful",
284
+ "Kellie - Friendly",
285
+ "Lauren - Friendly",
286
+ "Leah - Natural",
287
+ "Liam - Professional",
288
+ "Libby - Natural",
289
+ "Lily - Professional",
290
+ "Lucas - Natural",
291
+ "Luke - Professional",
292
+ "Luna - Natural",
293
+ "Marieke - Natural",
294
+ "Matthew - Professional",
295
+ "Michelle - Natural",
296
+ "Mitchell - Natural",
297
+ "Molly - Newscaster",
298
+ "Monica - Calm",
299
+ "Natasha - Professional",
300
+ "Neerja - Newscaster",
301
+ "Noah - Serious",
302
+ "Oliver - Newscaster",
303
+ "Olivia - Calm",
304
+ "Paul - Natural",
305
+ "Prabhat - Natural",
306
+ "Raveena - Natural",
307
+ "Rudi - Friendly",
308
+ "Ryan - Professional",
309
+ "Sam - Natural",
310
+ "Sara - Cheerful",
311
+ "Sherry - Friendly",
312
+ "Sonia - Warm",
313
+ "Thomas - Natural",
314
+ "Todd - Professional",
315
+ "Tony - Professional",
316
+ "Tracy - Cheerful",
317
+ "Wayne - Natural",
318
+ "Wilder - Natural",
319
+ "Wille - Natural",
320
+ "William - Friendly",
313
321
  ]),
314
- avatarStyle: z.optional(z.enum(['normal', 'circle'])),
322
+ avatarStyle: z.optional(z.enum(["normal", "circle"])),
315
323
  background: z.optional(z.string()),
316
- ratio: z.optional(z.enum(['16:9', '9:16'])),
317
- test: z.optional(z.boolean())
318
- }).strict();
324
+ ratio: z.optional(z.enum(["16:9", "9:16"])),
325
+ test: z.optional(z.boolean()),
326
+ }).strict();
319
327
 
320
- export const heyGenTextToAvatarOptionsSchema = heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
328
+ export const heyGenTextToAvatarOptionsSchema =
329
+ heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
321
330
 
322
331
  /**
323
332
  * Generate assets using the third party HeyGen provider AI services.
@@ -326,33 +335,39 @@ export const heyGenTextToAvatarOptionsSchema = heygenTextToAvatarOptionsHeyGenTe
326
335
  * <li><a href="#tocs_heygentexttoavataroptions">HeyGenTextToAvatarOptions</a></li>
327
336
  * </ul>
328
337
  */
329
- export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = z.object({
330
- type: z.literal('heygenTextToAvatarOptions_HeyGenTextToAvatarOptions')
331
- }).strict().and(heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
338
+ export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = z
339
+ .object({
340
+ type: z.literal("heygenTextToAvatarOptions_HeyGenTextToAvatarOptions"),
341
+ })
342
+ .and(heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
332
343
 
333
- export const heyGenGeneratedAssetOptionsSchema = heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
344
+ export const heyGenGeneratedAssetOptionsSchema =
345
+ heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
334
346
 
335
347
  /**
336
348
  * Generate assets using HeyGen. HeyGen provide a text-to-avatar service. The HeyGen provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/heygen), not in the request.
337
349
  */
338
350
  export const heygenGeneratedAssetHeyGenGeneratedAssetSchema = z.object({
339
- provider: z.enum(['heygen']),
340
- options: heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema
351
+ provider: z.enum(["heygen"]),
352
+ options: heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema,
341
353
  }).strict();
342
354
 
343
- export const heyGenGeneratedAssetSchema = heygenGeneratedAssetHeyGenGeneratedAssetSchema;
355
+ export const heyGenGeneratedAssetSchema =
356
+ heygenGeneratedAssetHeyGenGeneratedAssetSchema;
344
357
 
345
358
  /**
346
359
  * Options for the OpenAI text-generator service. Set a text prompt that will be used to generate a new body of text. The output will be generated as a text (txt) file available at the URL returned in the response.
347
360
  */
348
- export const openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema = z.object({
349
- type: z.enum(['text-generator']),
361
+ export const openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema =
362
+ z.object({
363
+ type: z.enum(["text-generator"]),
350
364
  prompt: z.string(),
351
- model: z.enum(['gpt-3.5-turbo', 'gpt-4']),
352
- systemPrompt: z.optional(z.string())
353
- }).strict();
365
+ model: z.enum(["gpt-3.5-turbo", "gpt-4"]),
366
+ systemPrompt: z.optional(z.string()),
367
+ }).strict();
354
368
 
355
- export const openAiTextGeneratorOptionsSchema = openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
369
+ export const openAiTextGeneratorOptionsSchema =
370
+ openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
356
371
 
357
372
  /**
358
373
  * Generate assets using OpenAI provider AI services.
@@ -361,293 +376,333 @@ export const openAiTextGeneratorOptionsSchema = openaiTextGeneratorOptionsOpenAi
361
376
  * <li><a href="#tocs_openaitextgeneratoroptions">OpenAiTextGeneratorOptions</a></li>
362
377
  * </ul>
363
378
  */
364
- export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = z.object({
365
- type: z.literal('openaiTextGeneratorOptions_OpenAiTextGeneratorOptions')
366
- }).strict().and(openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
379
+ export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = z
380
+ .object({
381
+ type: z.literal("openaiTextGeneratorOptions_OpenAiTextGeneratorOptions"),
382
+ })
383
+ .and(openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
367
384
 
368
- export const openAiGeneratedAssetOptionsSchema = openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
385
+ export const openAiGeneratedAssetOptionsSchema =
386
+ openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
369
387
 
370
388
  /**
371
389
  * Generate assets using OpenAI. OpenAI provide a text generation service using ChatGPT 3.5 and 4. The OpenAI provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/openai), not in the request.
372
390
  */
373
391
  export const openaiGeneratedAssetOpenAiGeneratedAssetSchema = z.object({
374
- provider: z.enum(['openai']),
375
- options: openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema
392
+ provider: z.enum(["openai"]),
393
+ options: openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema,
376
394
  }).strict();
377
395
 
378
- export const openAiGeneratedAssetSchema = openaiGeneratedAssetOpenAiGeneratedAssetSchema;
396
+ export const openAiGeneratedAssetSchema =
397
+ openaiGeneratedAssetOpenAiGeneratedAssetSchema;
379
398
 
380
399
  /**
381
400
  * Individual errors returned by the Create API.
382
401
  */
383
- export const generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema = z.object({
402
+ export const generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema =
403
+ z.object({
384
404
  status: z.string(),
385
405
  title: z.string(),
386
- detail: z.string()
387
- }).strict();
406
+ detail: z.string(),
407
+ }).strict();
388
408
 
389
- export const generatedAssetErrorResponseDataSchema = generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
409
+ export const generatedAssetErrorResponseDataSchema =
410
+ generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
390
411
 
391
412
  /**
392
413
  * Error response data for validation and other errors returned by the Create API.
393
414
  */
394
- export const generatedAssetErrorResponseGeneratedAssetErrorResponseSchema = z.object({
395
- errors: z.array(generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema)
396
- }).strict();
415
+ export const generatedAssetErrorResponseGeneratedAssetErrorResponseSchema =
416
+ z.object({
417
+ errors: z.array(
418
+ generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema,
419
+ ),
420
+ }).strict();
397
421
 
398
- export const generatedAssetErrorResponseSchema = generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
422
+ export const generatedAssetErrorResponseSchema =
423
+ generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
399
424
 
400
425
  /**
401
426
  * The id and attributes of the generated asset.
402
427
  */
403
- export const generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema = z.object({
428
+ export const generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema =
429
+ z.object({
404
430
  owner: z.string(),
405
- provider: z.enum([
406
- 'shotstack',
407
- 'elevenlabs',
408
- 'heygen',
409
- 'd-id'
410
- ]),
411
- type: z.enum(['text-to-speech', 'text-to-avatar']),
431
+ provider: z.enum(["shotstack", "elevenlabs", "heygen", "d-id"]),
432
+ type: z.enum(["text-to-speech", "text-to-avatar"]),
412
433
  url: z.optional(z.string()),
413
- status: z.enum([
414
- 'queued',
415
- 'processing',
416
- 'saving',
417
- 'done',
418
- 'failed'
419
- ]),
434
+ status: z.enum(["queued", "processing", "saving", "done", "failed"]),
420
435
  created: z.string(),
421
- updated: z.string()
422
- }).strict();
436
+ updated: z.string(),
437
+ }).strict();
423
438
 
424
- export const generatedAssetResponseAttributesSchema = generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
439
+ export const generatedAssetResponseAttributesSchema =
440
+ generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
425
441
 
426
442
  /**
427
443
  * The type of resource (an asset), it's id and attributes of the generated file.
428
444
  */
429
- export const generatedAssetResponseDataGeneratedAssetResponseDataSchema = z.object({
445
+ export const generatedAssetResponseDataGeneratedAssetResponseDataSchema =
446
+ z.object({
430
447
  type: z.string(),
431
448
  id: z.string(),
432
- attributes: generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema
433
- }).strict();
449
+ attributes:
450
+ generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema,
451
+ }).strict();
434
452
 
435
- export const generatedAssetResponseDataSchema = generatedAssetResponseDataGeneratedAssetResponseDataSchema;
453
+ export const generatedAssetResponseDataSchema =
454
+ generatedAssetResponseDataGeneratedAssetResponseDataSchema;
436
455
 
437
456
  /**
438
457
  * The response returned by the Create API [generate asset](#generate-asset) and [get generated asset](#get-generated-asset) requests. Includes status and details of the generated asset. The response follows the [json:api](https://jsonapi.org/) specification.
439
458
  */
440
459
  export const generatedAssetResponseGeneratedAssetResponseSchema = z.object({
441
- data: generatedAssetResponseDataGeneratedAssetResponseDataSchema
460
+ data: generatedAssetResponseDataGeneratedAssetResponseDataSchema,
442
461
  }).strict();
443
462
 
444
- export const generatedAssetResponseSchema = generatedAssetResponseGeneratedAssetResponseSchema;
463
+ export const generatedAssetResponseSchema =
464
+ generatedAssetResponseGeneratedAssetResponseSchema;
445
465
 
446
466
  /**
447
467
  * Options for the Shotstack image-to-video service. Set the URL of an image to convert in to a video. The output will be generated as an MP4 file available at the URL returned in the response.
448
468
  */
449
- export const shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = z.object({
450
- type: z.enum(['image-to-video']),
469
+ export const shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema =
470
+ z.object({
471
+ type: z.enum(["image-to-video"]),
451
472
  imageUrl: z.string(),
452
473
  guidanceScale: 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*\}\}$/)])).default(1.8),
453
- motion: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(127)
454
- }).strict();
474
+ motion: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(127),
475
+ }).strict();
455
476
 
456
- export const shotstackImageToVideoOptionsSchema = shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
477
+ export const shotstackImageToVideoOptionsSchema =
478
+ shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
457
479
 
458
480
  /**
459
481
  * Options for the Shotstack text-generator service. Set a text prompt that will be used to generate a new body of text. The output will be generated as a text (txt) file available at the URL returned in the response.
460
482
  */
461
- export const shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema = z.object({
462
- type: z.enum(['text-generator']),
463
- prompt: z.string()
464
- }).strict();
483
+ export const shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema =
484
+ z.object({
485
+ type: z.enum(["text-generator"]),
486
+ prompt: z.string(),
487
+ }).strict();
465
488
 
466
- export const shotstackTextGeneratorOptionsSchema = shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
489
+ export const shotstackTextGeneratorOptionsSchema =
490
+ shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
467
491
 
468
492
  /**
469
493
  * Options for the Shotstack text-to-image service. Set a text prompt to generate an image from. The output will be generated as a PNG file available at the URL returned in the response.
470
494
  */
471
- export const shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = z.object({
472
- type: z.enum(['text-to-image']),
495
+ export const shotstackTextToImageOptionsShotstackTextToImageOptionsSchema =
496
+ z.object({
497
+ type: z.enum(["text-to-image"]),
473
498
  prompt: z.string(),
474
499
  width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
475
- height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
476
- }).strict();
500
+ height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
501
+ }).strict();
477
502
 
478
- export const shotstackTextToImageOptionsSchema = shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
503
+ export const shotstackTextToImageOptionsSchema =
504
+ shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
479
505
 
480
506
  /**
481
507
  * Options for the Shotstack text-to-speech service. Set the text to be converted to speech and choose a voice to set the speaking style. The output will be generated as an MP3 audio file available at the URL returned in the response.
482
508
  */
483
- export const shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema = z.object({
484
- type: z.enum(['text-to-speech']),
509
+ export const shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema =
510
+ z.object({
511
+ type: z.enum(["text-to-speech"]),
485
512
  text: z.string(),
486
513
  voice: z.enum([
487
- 'Hala',
488
- 'Lisa',
489
- 'Arlet',
490
- 'Hiujin',
491
- 'Zhiyu',
492
- 'Sofie',
493
- 'Laura',
494
- 'Olivia',
495
- 'Amy',
496
- 'Emma',
497
- 'Brian',
498
- 'Arthur',
499
- 'Kajal',
500
- 'Niamh',
501
- 'Aria',
502
- 'Ayanda',
503
- 'Ivy',
504
- 'Joanna',
505
- 'Kendra',
506
- 'Kimberly',
507
- 'Salli',
508
- 'Joey',
509
- 'Justin',
510
- 'Kevin',
511
- 'Matthew',
512
- 'Ruth',
513
- 'Stephen',
514
- 'Suvi',
515
- 'Léa',
516
- 'Rémi',
517
- 'Gabrielle',
518
- 'Liam',
519
- 'Vicki',
520
- 'Daniel',
521
- 'Hannah',
522
- 'Kajal',
523
- 'Bianca',
524
- 'Adriano',
525
- 'Takumi',
526
- 'Kazuha',
527
- 'Tomoko',
528
- 'Seoyeon',
529
- 'Ida',
530
- 'Ola',
531
- 'Camila',
532
- 'Vitória',
533
- 'Vitoria',
534
- 'Thiago',
535
- 'Inês',
536
- 'Ines',
537
- 'Lucia',
538
- 'Sergio',
539
- 'Mia',
540
- 'Andrés',
541
- 'Lupe',
542
- 'Pedro',
543
- 'Elin'
514
+ "Hala",
515
+ "Lisa",
516
+ "Arlet",
517
+ "Hiujin",
518
+ "Zhiyu",
519
+ "Sofie",
520
+ "Laura",
521
+ "Olivia",
522
+ "Amy",
523
+ "Emma",
524
+ "Brian",
525
+ "Arthur",
526
+ "Kajal",
527
+ "Niamh",
528
+ "Aria",
529
+ "Ayanda",
530
+ "Ivy",
531
+ "Joanna",
532
+ "Kendra",
533
+ "Kimberly",
534
+ "Salli",
535
+ "Joey",
536
+ "Justin",
537
+ "Kevin",
538
+ "Matthew",
539
+ "Ruth",
540
+ "Stephen",
541
+ "Suvi",
542
+ "Léa",
543
+ "Rémi",
544
+ "Gabrielle",
545
+ "Liam",
546
+ "Vicki",
547
+ "Daniel",
548
+ "Hannah",
549
+ "Kajal",
550
+ "Bianca",
551
+ "Adriano",
552
+ "Takumi",
553
+ "Kazuha",
554
+ "Tomoko",
555
+ "Seoyeon",
556
+ "Ida",
557
+ "Ola",
558
+ "Camila",
559
+ "Vitória",
560
+ "Vitoria",
561
+ "Thiago",
562
+ "Inês",
563
+ "Ines",
564
+ "Lucia",
565
+ "Sergio",
566
+ "Mia",
567
+ "Andrés",
568
+ "Lupe",
569
+ "Pedro",
570
+ "Elin",
544
571
  ]),
545
- language: z.optional(z.enum([
546
- 'cmn-CN',
547
- 'da-DK',
548
- 'de-DE',
549
- 'en-AU',
550
- 'en-GB',
551
- 'en-IN',
552
- 'en-US',
553
- 'es-ES',
554
- 'es-MX',
555
- 'es-US',
556
- 'fr-CA',
557
- 'fr-FR',
558
- 'it-IT',
559
- 'ja-JP',
560
- 'hi-IN',
561
- 'ko-KR',
562
- 'nb-NO',
563
- 'nl-NL',
564
- 'pl-PL',
565
- 'pt-BR',
566
- 'pt-PT',
567
- 'sv-SE',
568
- 'en-NZ',
569
- 'en-ZA',
570
- 'ca-ES',
571
- 'de-AT',
572
- 'yue-CN',
573
- 'ar-AE',
574
- 'fi-FI'
575
- ])),
576
- newscaster: z.optional(z.boolean()).default(false)
577
- }).strict();
578
-
579
- export const shotstackTextToSpeechOptionsSchema = shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
572
+ language: z.optional(
573
+ z.enum([
574
+ "cmn-CN",
575
+ "da-DK",
576
+ "de-DE",
577
+ "en-AU",
578
+ "en-GB",
579
+ "en-IN",
580
+ "en-US",
581
+ "es-ES",
582
+ "es-MX",
583
+ "es-US",
584
+ "fr-CA",
585
+ "fr-FR",
586
+ "it-IT",
587
+ "ja-JP",
588
+ "hi-IN",
589
+ "ko-KR",
590
+ "nb-NO",
591
+ "nl-NL",
592
+ "pl-PL",
593
+ "pt-BR",
594
+ "pt-PT",
595
+ "sv-SE",
596
+ "en-NZ",
597
+ "en-ZA",
598
+ "ca-ES",
599
+ "de-AT",
600
+ "yue-CN",
601
+ "ar-AE",
602
+ "fi-FI",
603
+ ]),
604
+ ),
605
+ newscaster: z.optional(z.boolean()).default(false),
606
+ }).strict();
607
+
608
+ export const shotstackTextToSpeechOptionsSchema =
609
+ shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
580
610
 
581
611
  /**
582
612
  * Generate assets using the native Shotstack provider AI services.
583
613
  */
584
- export const shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema = z.union([
585
- z.object({
586
- type: z.literal('shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions')
587
- }).strict().and(shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema),
588
- z.object({
589
- type: z.literal('shotstackTextToImageOptions_ShotstackTextToImageOptions')
590
- }).strict().and(shotstackTextToImageOptionsShotstackTextToImageOptionsSchema),
591
- z.object({
592
- type: z.literal('shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions')
593
- }).strict().and(shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema),
594
- z.object({
595
- type: z.literal('shotstackImageToVideoOptions_ShotstackImageToVideoOptions')
596
- }).strict().and(shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema)
597
- ]);
598
-
599
- export const shotstackGeneratedAssetOptionsSchema = shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema;
614
+ export const shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema =
615
+ z.union([
616
+ z
617
+ .object({
618
+ type: z.literal(
619
+ "shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions",
620
+ ),
621
+ })
622
+ .and(shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema),
623
+ z
624
+ .object({
625
+ type: z.literal(
626
+ "shotstackTextToImageOptions_ShotstackTextToImageOptions",
627
+ ),
628
+ })
629
+ .and(shotstackTextToImageOptionsShotstackTextToImageOptionsSchema),
630
+ z
631
+ .object({
632
+ type: z.literal(
633
+ "shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions",
634
+ ),
635
+ })
636
+ .and(shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema),
637
+ z
638
+ .object({
639
+ type: z.literal(
640
+ "shotstackImageToVideoOptions_ShotstackImageToVideoOptions",
641
+ ),
642
+ })
643
+ .and(shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema),
644
+ ]);
645
+
646
+ export const shotstackGeneratedAssetOptionsSchema =
647
+ shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema;
600
648
 
601
649
  /**
602
650
  * Generate assets using the native Shotstack provider. Shotstack provides a text-to-speech and a text-to-image service. The Shotstack provider works natively with your existing API key, no additional credentials are required.
603
651
  */
604
652
  export const shotstackGeneratedAssetShotstackGeneratedAssetSchema = z.object({
605
- provider: z.enum(['shotstack']),
606
- options: shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema
653
+ provider: z.enum(["shotstack"]),
654
+ options: shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema,
607
655
  }).strict();
608
656
 
609
- export const shotstackGeneratedAssetSchema = shotstackGeneratedAssetShotstackGeneratedAssetSchema;
657
+ export const shotstackGeneratedAssetSchema =
658
+ shotstackGeneratedAssetShotstackGeneratedAssetSchema;
610
659
 
611
660
  /**
612
661
  * Options for the Stability AI text-to-image service. Set a text prompt to generate an image from plus other engine and configuration options. The output will be generated as a JPG file available at the URL returned in the response.
613
662
  */
614
- export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = z.object({
615
- type: z.enum(['text-to-image']),
663
+ export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema =
664
+ z.object({
665
+ type: z.enum(["text-to-image"]),
616
666
  prompt: z.string(),
617
- engine: z.optional(z.enum([
618
- 'stable-diffusion-xl-1024-v0-9',
619
- 'stable-diffusion-xl-1024-v1-0',
620
- 'stable-diffusion-v1-6',
621
- 'stable-diffusion-512-v2-1',
622
- 'stable-diffusion-xl-beta-v2-2-2'
623
- ])),
667
+ engine: z.optional(
668
+ z.enum([
669
+ "stable-diffusion-xl-1024-v0-9",
670
+ "stable-diffusion-xl-1024-v1-0",
671
+ "stable-diffusion-v1-6",
672
+ "stable-diffusion-512-v2-1",
673
+ "stable-diffusion-xl-beta-v2-2-2",
674
+ ]),
675
+ ),
624
676
  width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
625
677
  height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
626
678
  steps: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(30),
627
679
  seed: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
628
680
  cfgScale: 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*\}\}$/)])).default(7),
629
- stylePreset: z.optional(z.enum([
630
- '3d-model',
631
- 'analog-film',
632
- 'anime',
633
- 'cinematic',
634
- 'comic-book',
635
- 'digital-art',
636
- 'enhance',
637
- 'fantasy-art',
638
- 'isometric',
639
- 'line-art',
640
- 'low-poly',
641
- 'modeling-compound',
642
- 'neon-punk',
643
- 'origami',
644
- 'photographic',
645
- 'pixel-art',
646
- 'tile-texture'
647
- ]))
648
- }).strict();
649
-
650
- export const stabilityAiTextToImageOptionsSchema = stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
681
+ stylePreset: z.optional(
682
+ z.enum([
683
+ "3d-model",
684
+ "analog-film",
685
+ "anime",
686
+ "cinematic",
687
+ "comic-book",
688
+ "digital-art",
689
+ "enhance",
690
+ "fantasy-art",
691
+ "isometric",
692
+ "line-art",
693
+ "low-poly",
694
+ "modeling-compound",
695
+ "neon-punk",
696
+ "origami",
697
+ "photographic",
698
+ "pixel-art",
699
+ "tile-texture",
700
+ ]),
701
+ ),
702
+ }).strict();
703
+
704
+ export const stabilityAiTextToImageOptionsSchema =
705
+ stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
651
706
 
652
707
  /**
653
708
  * Generate assets using Stability AI provider AI services.
@@ -656,44 +711,67 @@ export const stabilityAiTextToImageOptionsSchema = stabilityAiTextToImageOptions
656
711
  * <li><a href="#tocs_stabilityaitexttoimageoptions">StabilityAiTextToImageOptions</a></li>
657
712
  * </ul>
658
713
  */
659
- export const stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = z.object({
660
- type: z.literal('stabilityAiTextToImageOptions_StabilityAiTextToImageOptions')
661
- }).strict().and(stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
714
+ export const stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema =
715
+ z
716
+ .object({
717
+ type: z.literal(
718
+ "stabilityAiTextToImageOptions_StabilityAiTextToImageOptions",
719
+ ),
720
+ })
721
+ .and(stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
662
722
 
663
- export const stabilityAiGeneratedAssetOptionsSchema = stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
723
+ export const stabilityAiGeneratedAssetOptionsSchema =
724
+ stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
664
725
 
665
726
  /**
666
727
  * Generate assets using Stability AI. Stability AI provide a text-to-image service using Stable Diffusion. The Stability AI provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/stability-ai), not in the request.
667
728
  */
668
- export const stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema = z.object({
669
- provider: z.enum(['stability-ai']),
670
- options: stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema
671
- }).strict();
729
+ export const stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema =
730
+ z.object({
731
+ provider: z.enum(["stability-ai"]),
732
+ options:
733
+ stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema,
734
+ }).strict();
672
735
 
673
- export const stabilityAiGeneratedAssetSchema = stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
736
+ export const stabilityAiGeneratedAssetSchema =
737
+ stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
674
738
 
675
739
  /**
676
740
  * A generated asset is a media asset created by the Create API. You can use native or third party providers to generate video, audio and image files using Generative AI services like text-to-speech and text-to-avatar.
677
741
  */
678
742
  export const generatedAssetGeneratedAssetSchema = z.union([
679
- z.object({
680
- provider: z.literal('shotstackGeneratedAsset_ShotstackGeneratedAsset')
681
- }).strict().and(shotstackGeneratedAssetShotstackGeneratedAssetSchema),
682
- z.object({
683
- provider: z.literal('didGeneratedAsset_DIDGeneratedAsset')
684
- }).strict().and(didGeneratedAssetDidGeneratedAssetSchema),
685
- z.object({
686
- provider: z.literal('elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset')
687
- }).strict().and(elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema),
688
- z.object({
689
- provider: z.literal('heygenGeneratedAsset_HeyGenGeneratedAsset')
690
- }).strict().and(heygenGeneratedAssetHeyGenGeneratedAssetSchema),
691
- z.object({
692
- provider: z.literal('openaiGeneratedAsset_OpenAiGeneratedAsset')
693
- }).strict().and(openaiGeneratedAssetOpenAiGeneratedAssetSchema),
694
- z.object({
695
- provider: z.literal('stabilityAiGeneratedAsset_StabilityAiGeneratedAsset')
696
- }).strict().and(stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema)
743
+ z
744
+ .object({
745
+ provider: z.literal("shotstackGeneratedAsset_ShotstackGeneratedAsset"),
746
+ })
747
+ .and(shotstackGeneratedAssetShotstackGeneratedAssetSchema),
748
+ z
749
+ .object({
750
+ provider: z.literal("didGeneratedAsset_DIDGeneratedAsset"),
751
+ })
752
+ .and(didGeneratedAssetDidGeneratedAssetSchema),
753
+ z
754
+ .object({
755
+ provider: z.literal("elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset"),
756
+ })
757
+ .and(elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema),
758
+ z
759
+ .object({
760
+ provider: z.literal("heygenGeneratedAsset_HeyGenGeneratedAsset"),
761
+ })
762
+ .and(heygenGeneratedAssetHeyGenGeneratedAssetSchema),
763
+ z
764
+ .object({
765
+ provider: z.literal("openaiGeneratedAsset_OpenAiGeneratedAsset"),
766
+ })
767
+ .and(openaiGeneratedAssetOpenAiGeneratedAssetSchema),
768
+ z
769
+ .object({
770
+ provider: z.literal(
771
+ "stabilityAiGeneratedAsset_StabilityAiGeneratedAsset",
772
+ ),
773
+ })
774
+ .and(stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema),
697
775
  ]);
698
776
 
699
777
  export const generatedAssetSchema = generatedAssetGeneratedAssetSchema;
@@ -702,10 +780,10 @@ export const generatedAssetSchema = generatedAssetGeneratedAssetSchema;
702
780
  * Crop the sides of an asset by a relative amount. The size of the crop is specified using a scale between 0 and 1, relative to the screen width - i.e a left crop of 0.5 will crop half of the asset from the left, a top crop of 0.25 will crop the top by quarter of the asset.
703
781
  */
704
782
  export const cropCropSchema = z.object({
705
- top: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
706
- bottom: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
707
- left: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
708
- right: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
783
+ top: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
784
+ bottom: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
785
+ left: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
786
+ right: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
709
787
  }).strict();
710
788
 
711
789
  export const cropSchema = cropCropSchema;
@@ -713,60 +791,70 @@ export const cropSchema = cropCropSchema;
713
791
  /**
714
792
  * Pass additional options to control how files are stored in Google Cloud Storage.
715
793
  */
716
- export const googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema = z.object({
794
+ export const googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema =
795
+ z.object({
717
796
  bucket: z.string(),
718
797
  prefix: z.optional(z.string()),
719
- filename: z.optional(z.string())
720
- }).strict();
798
+ filename: z.optional(z.string()),
799
+ }).strict();
721
800
 
722
- export const googleCloudStorageDestinationOptionsSchema = googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema;
801
+ export const googleCloudStorageDestinationOptionsSchema =
802
+ googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema;
723
803
 
724
804
  /**
725
805
  * Send videos and assets to a [Google Cloud Storage](https://cloud.google.com/storage) bucket. Send files with your own prefix and filename. Google Cloud credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/google-cloud-storage), not in the request.
726
806
  */
727
- export const googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = z.object({
807
+ export const googleCloudStorageDestinationGoogleCloudStorageDestinationSchema =
808
+ z.object({
728
809
  provider: z.literal("google-cloud-storage"),
729
- options: z.optional(googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema)
730
- }).strict();
810
+ options: z.optional(
811
+ googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema,
812
+ ),
813
+ }).strict();
731
814
 
732
- export const googleCloudStorageDestinationSchema = googleCloudStorageDestinationGoogleCloudStorageDestinationSchema;
815
+ export const googleCloudStorageDestinationSchema =
816
+ googleCloudStorageDestinationGoogleCloudStorageDestinationSchema;
733
817
 
734
818
  /**
735
819
  * Pass the folder ID and options to configure how assets are stored in Google Drive.
736
820
  */
737
- export const googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = z.object({
821
+ export const googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema =
822
+ z.object({
738
823
  folderId: z.string(),
739
- filename: z.optional(z.string())
740
- }).strict();
824
+ filename: z.optional(z.string()),
825
+ }).strict();
741
826
 
742
- export const googleDriveDestinationOptionsSchema = googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema;
827
+ export const googleDriveDestinationOptionsSchema =
828
+ googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema;
743
829
 
744
830
  /**
745
831
  * Send rendered videos and assets to the [Google Drive](https://shotstack.io/docs/guide/serving-assets/destinations/google-drive/) cloud storage service. Google Drive uses OAuth and you must authenticate and link your Google account via [dashboard](https://dashboard.shotstack.io/integrations/google-drive), not in the request.
746
832
  */
747
833
  export const googleDriveDestinationGoogleDriveDestinationSchema = z.object({
748
- provider: z.literal("google-drive"),
749
- options: googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema
834
+ provider: z.literal("google-drive"),
835
+ options: googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema,
750
836
  }).strict();
751
837
 
752
- export const googleDriveDestinationSchema = googleDriveDestinationGoogleDriveDestinationSchema;
838
+ export const googleDriveDestinationSchema =
839
+ googleDriveDestinationGoogleDriveDestinationSchema;
753
840
 
754
841
  /**
755
842
  * Pass additional options to control how Mux processes video. Currently supports playback_policy and passthrough options.
756
843
  */
757
844
  export const muxDestinationOptionsMuxDestinationOptionsSchema = z.object({
758
- playbackPolicy: z.optional(z.array(z.enum(['public', 'signed']))),
759
- passthrough: z.optional(z.string().max(255))
845
+ playbackPolicy: z.optional(z.array(z.enum(["public", "signed"]))),
846
+ passthrough: z.optional(z.string().max(255)),
760
847
  }).strict();
761
848
 
762
- export const muxDestinationOptionsSchema = muxDestinationOptionsMuxDestinationOptionsSchema;
849
+ export const muxDestinationOptionsSchema =
850
+ muxDestinationOptionsMuxDestinationOptionsSchema;
763
851
 
764
852
  /**
765
853
  * Send videos to the [Mux](https://shotstack.io/docs/guide/serving-assets/destinations/mux/) video hosting and streaming service. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request.
766
854
  */
767
855
  export const muxDestinationMuxDestinationSchema = z.object({
768
- provider: z.literal("mux"),
769
- options: z.optional(muxDestinationOptionsMuxDestinationOptionsSchema)
856
+ provider: z.literal("mux"),
857
+ options: z.optional(muxDestinationOptionsMuxDestinationOptionsSchema),
770
858
  }).strict();
771
859
 
772
860
  export const muxDestinationSchema = muxDestinationMuxDestinationSchema;
@@ -775,21 +863,22 @@ export const muxDestinationSchema = muxDestinationMuxDestinationSchema;
775
863
  * Pass additional options to control how files are stored in S3.
776
864
  */
777
865
  export const s3DestinationOptionsS3DestinationOptionsSchema = z.object({
778
- region: z.string(),
779
- bucket: z.string(),
780
- prefix: z.optional(z.string()),
781
- filename: z.optional(z.string()),
782
- acl: z.optional(z.string())
866
+ region: z.string(),
867
+ bucket: z.string(),
868
+ prefix: z.optional(z.string()),
869
+ filename: z.optional(z.string()),
870
+ acl: z.optional(z.string()),
783
871
  }).strict();
784
872
 
785
- export const s3DestinationOptionsSchema = s3DestinationOptionsS3DestinationOptionsSchema;
873
+ export const s3DestinationOptionsSchema =
874
+ s3DestinationOptionsS3DestinationOptionsSchema;
786
875
 
787
876
  /**
788
877
  * Send videos and assets to an [Amazon S3](https://shotstack.io/docs/guide/serving-assets/destinations/s3/) bucket. Send files to any region with your own prefix and filename. AWS credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/s3), not in the request.
789
878
  */
790
879
  export const s3DestinationS3DestinationSchema = z.object({
791
- provider: z.literal("s3"),
792
- options: z.optional(s3DestinationOptionsS3DestinationOptionsSchema)
880
+ provider: z.literal("s3"),
881
+ options: z.optional(s3DestinationOptionsS3DestinationOptionsSchema),
793
882
  }).strict();
794
883
 
795
884
  export const s3DestinationSchema = s3DestinationS3DestinationSchema;
@@ -798,80 +887,70 @@ export const s3DestinationSchema = s3DestinationS3DestinationSchema;
798
887
  * Send videos and assets to the [Shotstack hosting and CDN](https://shotstack.io/docs/guide/serving-assets/destinations/shotstack/) service. This destination is enabled by default.
799
888
  */
800
889
  export const shotstackDestinationShotstackDestinationSchema = z.object({
801
- provider: z.literal("shotstack"),
802
- exclude: z.optional(z.boolean())
890
+ provider: z.literal("shotstack"),
891
+ exclude: z.optional(z.boolean()),
803
892
  }).strict();
804
893
 
805
- export const shotstackDestinationSchema = shotstackDestinationShotstackDestinationSchema;
894
+ export const shotstackDestinationSchema =
895
+ shotstackDestinationShotstackDestinationSchema;
806
896
 
807
897
  /**
808
898
  * Pass additional options to control how TikTok publishes video.
809
899
  */
810
900
  export const tiktokDestinationOptionsTiktokDestinationOptionsSchema = z.object({
811
- title: z.optional(z.string().max(150)),
812
- privacyLevel: z.optional(z.enum([
813
- 'public',
814
- 'friends',
815
- 'private'
816
- ])),
817
- disableDuet: z.optional(z.boolean()).default(false),
818
- disableStitch: z.optional(z.boolean()).default(false),
819
- disableComment: z.optional(z.boolean()).default(false)
901
+ title: z.optional(z.string().max(150)),
902
+ privacyLevel: z.optional(z.enum(["public", "friends", "private"])),
903
+ disableDuet: z.optional(z.boolean()).default(false),
904
+ disableStitch: z.optional(z.boolean()).default(false),
905
+ disableComment: z.optional(z.boolean()).default(false),
820
906
  }).strict();
821
907
 
822
908
  /**
823
909
  * Send videos to TikTok. TikTok credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/tiktok), not in the request.
824
910
  */
825
911
  export const tiktokDestinationTiktokDestinationSchema = z.object({
826
- provider: z.literal("tiktok"),
827
- options: z.optional(tiktokDestinationOptionsTiktokDestinationOptionsSchema)
912
+ provider: z.literal("tiktok"),
913
+ options: z.optional(tiktokDestinationOptionsTiktokDestinationOptionsSchema),
828
914
  }).strict();
829
915
 
830
916
  /**
831
917
  * Options to control the visibility of videos and privacy features.
832
918
  */
833
- export const vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = z.object({
834
- view: z.optional(z.enum([
835
- 'anybody',
836
- 'nobody',
837
- 'contacts',
838
- 'password',
839
- 'unlisted'
840
- ])),
841
- embed: z.optional(z.enum([
842
- 'public',
843
- 'private',
844
- 'whitelist'
845
- ])),
846
- comments: z.optional(z.enum([
847
- 'anybody',
848
- 'nobody',
849
- 'contacts'
850
- ])),
919
+ export const vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema =
920
+ z.object({
921
+ view: z.optional(
922
+ z.enum(["anybody", "nobody", "contacts", "password", "unlisted"]),
923
+ ),
924
+ embed: z.optional(z.enum(["public", "private", "whitelist"])),
925
+ comments: z.optional(z.enum(["anybody", "nobody", "contacts"])),
851
926
  download: z.optional(z.boolean()),
852
- add: z.optional(z.boolean())
853
- }).strict();
927
+ add: z.optional(z.boolean()),
928
+ }).strict();
854
929
 
855
- export const vimeoDestinationPrivacyOptionsSchema = vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema;
930
+ export const vimeoDestinationPrivacyOptionsSchema =
931
+ vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema;
856
932
 
857
933
  /**
858
934
  * Pass additional options to control how Vimeo publishes video, including name, description and privacy settings.
859
935
  */
860
936
  export const vimeoDestinationOptionsVimeoDestinationOptionsSchema = z.object({
861
- name: z.optional(z.string()),
862
- description: z.optional(z.string()),
863
- privacy: z.optional(vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema),
864
- folderUri: z.optional(z.string())
937
+ name: z.optional(z.string()),
938
+ description: z.optional(z.string()),
939
+ privacy: z.optional(
940
+ vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema,
941
+ ),
942
+ folderUri: z.optional(z.string()),
865
943
  }).strict();
866
944
 
867
- export const vimeoDestinationOptionsSchema = vimeoDestinationOptionsVimeoDestinationOptionsSchema;
945
+ export const vimeoDestinationOptionsSchema =
946
+ vimeoDestinationOptionsVimeoDestinationOptionsSchema;
868
947
 
869
948
  /**
870
949
  * Send videos to [Vimeo](https://shotstack.io/docs/guide/serving-assets/destinations/vimeo/) video hosting and streaming service. Vimeo credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/vimeo), not in the request.
871
950
  */
872
951
  export const vimeoDestinationVimeoDestinationSchema = z.object({
873
- provider: z.literal("vimeo"),
874
- options: z.optional(vimeoDestinationOptionsVimeoDestinationOptionsSchema)
952
+ provider: z.literal("vimeo"),
953
+ options: z.optional(vimeoDestinationOptionsVimeoDestinationOptionsSchema),
875
954
  }).strict();
876
955
 
877
956
  export const vimeoDestinationSchema = vimeoDestinationVimeoDestinationSchema;
@@ -897,17 +976,18 @@ export const destinationsSchema = destinationsDestinationsSchema;
897
976
  * Flip a clip vertically or horizontally. Acts as a mirror effect of the clip along the selected plane.
898
977
  */
899
978
  export const fliptransformationFlipTransformationSchema = z.object({
900
- horizontal: z.optional(z.boolean()),
901
- vertical: z.optional(z.boolean())
979
+ horizontal: z.optional(z.boolean()),
980
+ vertical: z.optional(z.boolean()),
902
981
  }).strict();
903
982
 
904
- export const flipTransformationSchema = fliptransformationFlipTransformationSchema;
983
+ export const flipTransformationSchema =
984
+ fliptransformationFlipTransformationSchema;
905
985
 
906
986
  /**
907
987
  * Download a custom font to use with the HTML asset type, using the font name in the CSS or font tag. See our [custom fonts](https://shotstack.io/learn/html-custom-fonts/) getting started guide for more details.
908
988
  */
909
989
  export const fontFontSchema = z.object({
910
- src: z.string()
990
+ src: z.string(),
911
991
  }).strict();
912
992
 
913
993
  export const fontSchema = fontFontSchema;
@@ -923,23 +1003,25 @@ export const fontSchema = fontFontSchema;
923
1003
  * @deprecated
924
1004
  */
925
1005
  export const htmlassetHtmlAssetSchema = z.object({
926
- type: z.enum(['html']),
927
- html: z.string(),
928
- css: z.optional(z.string()),
929
- width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
930
- height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
931
- background: z.optional(z.string()),
932
- position: z.optional(z.enum([
933
- 'top',
934
- 'topRight',
935
- 'right',
936
- 'bottomRight',
937
- 'bottom',
938
- 'bottomLeft',
939
- 'left',
940
- 'topLeft',
941
- 'center'
942
- ]))
1006
+ type: z.enum(["html"]),
1007
+ html: z.string(),
1008
+ css: z.optional(z.string()),
1009
+ width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1010
+ height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1011
+ background: z.optional(z.string()),
1012
+ position: z.optional(
1013
+ z.enum([
1014
+ "top",
1015
+ "topRight",
1016
+ "right",
1017
+ "bottomRight",
1018
+ "bottom",
1019
+ "bottomLeft",
1020
+ "left",
1021
+ "topLeft",
1022
+ "center",
1023
+ ]),
1024
+ ),
943
1025
  }).strict();
944
1026
 
945
1027
  export const htmlAssetSchema = htmlassetHtmlAssetSchema;
@@ -948,9 +1030,9 @@ export const htmlAssetSchema = htmlassetHtmlAssetSchema;
948
1030
  * 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.
949
1031
  */
950
1032
  export const imageassetImageAssetSchema = z.object({
951
- type: z.enum(['image']),
952
- src: z.string().min(1).regex(/\S/),
953
- crop: z.optional(cropCropSchema)
1033
+ type: z.enum(["image"]),
1034
+ src: z.string().min(1).regex(/\S/),
1035
+ crop: z.optional(cropCropSchema),
954
1036
  }).strict();
955
1037
 
956
1038
  export const imageAssetSchema = imageassetImageAssetSchema;
@@ -959,20 +1041,14 @@ export const imageAssetSchema = imageassetImageAssetSchema;
959
1041
  * The ImageToVideoAsset lets you create a video from an image and a text prompt.
960
1042
  */
961
1043
  export const imagetovideoassetImageToVideoAssetSchema = z.object({
962
- type: z.enum(['image-to-video']),
963
- src: z.string().min(1),
964
- prompt: z.optional(z.string()),
965
- aspectRatio: z.optional(z.enum([
966
- '1:1',
967
- '4:3',
968
- '16:9',
969
- '9:16',
970
- '3:4',
971
- '21:9',
972
- '9:21'
973
- ])),
974
- speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
975
- crop: z.optional(cropCropSchema)
1044
+ type: z.enum(["image-to-video"]),
1045
+ src: z.string().min(1),
1046
+ prompt: z.optional(z.string()),
1047
+ aspectRatio: z.optional(
1048
+ z.enum(["1:1", "4:3", "16:9", "9:16", "3:4", "21:9", "9:21"]),
1049
+ ),
1050
+ speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1051
+ crop: z.optional(cropCropSchema),
976
1052
  }).strict();
977
1053
 
978
1054
  export const imageToVideoAssetSchema = imagetovideoassetImageToVideoAssetSchema;
@@ -981,27 +1057,28 @@ export const imageToVideoAssetSchema = imagetovideoassetImageToVideoAssetSchema;
981
1057
  * Options for the Dolby.io audio enhancement provider.
982
1058
  */
983
1059
  export const dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = z.object({
984
- preset: z.enum([
985
- 'conference',
986
- 'interview',
987
- 'lecture',
988
- 'meeting',
989
- 'mobile_phone',
990
- 'music',
991
- 'podcast',
992
- 'studio',
993
- 'voice_over'
994
- ])
1060
+ preset: z.enum([
1061
+ "conference",
1062
+ "interview",
1063
+ "lecture",
1064
+ "meeting",
1065
+ "mobile_phone",
1066
+ "music",
1067
+ "podcast",
1068
+ "studio",
1069
+ "voice_over",
1070
+ ]),
995
1071
  }).strict();
996
1072
 
997
- export const dolbyEnhancementOptionsSchema = dolbyEnhancementOptionsDolbyEnhancementOptionsSchema;
1073
+ export const dolbyEnhancementOptionsSchema =
1074
+ dolbyEnhancementOptionsDolbyEnhancementOptionsSchema;
998
1075
 
999
1076
  /**
1000
1077
  * Dolby.io audio enhancement provider. Credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/dolby), not in the request.
1001
1078
  */
1002
1079
  export const dolbyEnhancementDolbyEnhancementSchema = z.object({
1003
- provider: z.string().default('dolby'),
1004
- options: dolbyEnhancementOptionsDolbyEnhancementOptionsSchema
1080
+ provider: z.string().default("dolby"),
1081
+ options: dolbyEnhancementOptionsDolbyEnhancementOptionsSchema,
1005
1082
  }).strict();
1006
1083
 
1007
1084
  export const dolbyEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema;
@@ -1012,9 +1089,11 @@ export const dolbyEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema;
1012
1089
  * <li><a href="#tocs_dolbyenhancement">DolbyEnhancement</a></li>
1013
1090
  * </ul>
1014
1091
  */
1015
- export const audioEnhancementAudioEnhancementSchema = z.object({
1016
- enhancement: z.literal('dolbyEnhancement_DolbyEnhancement')
1017
- }).strict().and(dolbyEnhancementDolbyEnhancementSchema);
1092
+ export const audioEnhancementAudioEnhancementSchema = z
1093
+ .object({
1094
+ enhancement: z.literal("dolbyEnhancement_DolbyEnhancement"),
1095
+ })
1096
+ .and(dolbyEnhancementDolbyEnhancementSchema);
1018
1097
 
1019
1098
  export const audioEnhancementSchema = audioEnhancementAudioEnhancementSchema;
1020
1099
 
@@ -1022,7 +1101,7 @@ export const audioEnhancementSchema = audioEnhancementAudioEnhancementSchema;
1022
1101
  * Enhancements that can be applied to a rendition. Currently only supports the Dolby audio enhancement.
1023
1102
  */
1024
1103
  export const enhancementsEnhancementsSchema = z.object({
1025
- audio: z.optional(audioEnhancementAudioEnhancementSchema)
1104
+ audio: z.optional(audioEnhancementAudioEnhancementSchema),
1026
1105
  }).strict();
1027
1106
 
1028
1107
  export const enhancementsSchema = enhancementsEnhancementsSchema;
@@ -1031,68 +1110,74 @@ export const enhancementsSchema = enhancementsEnhancementsSchema;
1031
1110
  * Individual errors returned by the Ingest API.
1032
1111
  */
1033
1112
  export const ingesterrorresponsedataIngestErrorResponseDataSchema = z.object({
1034
- status: z.string(),
1035
- title: z.string(),
1036
- detail: z.string()
1113
+ status: z.string(),
1114
+ title: z.string(),
1115
+ detail: z.string(),
1037
1116
  }).strict();
1038
1117
 
1039
- export const ingestErrorResponseDataSchema = ingesterrorresponsedataIngestErrorResponseDataSchema;
1118
+ export const ingestErrorResponseDataSchema =
1119
+ ingesterrorresponsedataIngestErrorResponseDataSchema;
1040
1120
 
1041
1121
  /**
1042
1122
  * Error response data for validation and other errors returned by the Ingest API.
1043
1123
  */
1044
1124
  export const ingesterrorresponseIngestErrorResponseSchema = z.object({
1045
- errors: z.array(ingesterrorresponsedataIngestErrorResponseDataSchema)
1125
+ errors: z.array(ingesterrorresponsedataIngestErrorResponseDataSchema),
1046
1126
  }).strict();
1047
1127
 
1048
- export const ingestErrorResponseSchema = ingesterrorresponseIngestErrorResponseSchema;
1128
+ export const ingestErrorResponseSchema =
1129
+ ingesterrorresponseIngestErrorResponseSchema;
1049
1130
 
1050
1131
  /**
1051
1132
  * The type of resource (a source) and the newly created source id. Returned with [QueuedSourceResponse](#tocs_queuedsourceresponse).
1052
1133
  */
1053
1134
  export const queuedsourceresponsedataQueuedSourceResponseDataSchema = z.object({
1054
- type: z.string(),
1055
- id: z.string()
1135
+ type: z.string(),
1136
+ id: z.string(),
1056
1137
  }).strict();
1057
1138
 
1058
- export const queuedSourceResponseDataSchema = queuedsourceresponsedataQueuedSourceResponseDataSchema;
1139
+ export const queuedSourceResponseDataSchema =
1140
+ queuedsourceresponsedataQueuedSourceResponseDataSchema;
1059
1141
 
1060
1142
  /**
1061
1143
  * The response returned by the Ingest API [fetch source](#fetch-source) request. Includes the id of the source file. The response follows the [json:api](https://jsonapi.org/) specification.
1062
1144
  */
1063
1145
  export const queuedsourceresponseQueuedSourceResponseSchema = z.object({
1064
- data: queuedsourceresponsedataQueuedSourceResponseDataSchema
1146
+ data: queuedsourceresponsedataQueuedSourceResponseDataSchema,
1065
1147
  }).strict();
1066
1148
 
1067
- export const queuedSourceResponseSchema = queuedsourceresponseQueuedSourceResponseSchema;
1149
+ export const queuedSourceResponseSchema =
1150
+ queuedsourceresponseQueuedSourceResponseSchema;
1068
1151
 
1069
1152
  /**
1070
1153
  * The id and attributes of the upload file including the signed URL to send the binary file data to.
1071
1154
  */
1072
1155
  export const uploadresponseattributesUploadResponseAttributesSchema = z.object({
1073
- id: z.string(),
1074
- url: z.string(),
1075
- expires: z.string()
1156
+ id: z.string(),
1157
+ url: z.string(),
1158
+ expires: z.string(),
1076
1159
  }).strict();
1077
1160
 
1078
- export const uploadResponseAttributesSchema = uploadresponseattributesUploadResponseAttributesSchema;
1161
+ export const uploadResponseAttributesSchema =
1162
+ uploadresponseattributesUploadResponseAttributesSchema;
1079
1163
 
1080
1164
  /**
1081
1165
  * The type of resource (an upload), it's id and attributes of the upload request.
1082
1166
  */
1083
1167
  export const uploadresponsedataUploadResponseDataSchema = z.object({
1084
- type: z.string(),
1085
- id: z.string(),
1086
- attributes: uploadresponseattributesUploadResponseAttributesSchema
1168
+ type: z.string(),
1169
+ id: z.string(),
1170
+ attributes: uploadresponseattributesUploadResponseAttributesSchema,
1087
1171
  }).strict();
1088
1172
 
1089
- export const uploadResponseDataSchema = uploadresponsedataUploadResponseDataSchema;
1173
+ export const uploadResponseDataSchema =
1174
+ uploadresponsedataUploadResponseDataSchema;
1090
1175
 
1091
1176
  /**
1092
1177
  * The response returned by the Ingest API [direct upload](#direct-upload) request. Includes the id of the file and the signed url to send the binary file to. The response follows the [json:api](https://jsonapi.org/) specification.
1093
1178
  */
1094
1179
  export const uploadresponseUploadResponseSchema = z.object({
1095
- data: uploadresponsedataUploadResponseDataSchema
1180
+ data: uploadresponsedataUploadResponseDataSchema,
1096
1181
  }).strict();
1097
1182
 
1098
1183
  export const uploadResponseSchema = uploadresponseUploadResponseSchema;
@@ -1101,8 +1186,8 @@ export const uploadResponseSchema = uploadresponseUploadResponseSchema;
1101
1186
  * 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.
1102
1187
  */
1103
1188
  export const speedSpeedSchema = z.object({
1104
- speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1105
- preservePitch: z.optional(z.boolean())
1189
+ speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1190
+ preservePitch: z.optional(z.boolean()),
1106
1191
  }).strict();
1107
1192
 
1108
1193
  export const speedSchema = speedSpeedSchema;
@@ -1111,7 +1196,7 @@ export const speedSchema = speedSpeedSchema;
1111
1196
  * Generate a transcription of the audio in the video. The transcription can be output as a file in SRT or VTT format.
1112
1197
  */
1113
1198
  export const transcriptionTranscriptionSchema = z.object({
1114
- format: z.optional(z.enum(['srt', 'vtt']))
1199
+ format: z.optional(z.enum(["srt", "vtt"])),
1115
1200
  }).strict();
1116
1201
 
1117
1202
  export const transcriptionSchema = transcriptionTranscriptionSchema;
@@ -1120,9 +1205,9 @@ export const transcriptionSchema = transcriptionTranscriptionSchema;
1120
1205
  * 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.
1121
1206
  */
1122
1207
  export const lumaassetLumaAssetSchema = z.object({
1123
- type: z.enum(['luma']),
1124
- src: z.string().min(1).regex(/\S/),
1125
- trim: 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*\}\}$/)]))
1208
+ type: z.enum(["luma"]),
1209
+ src: z.string().min(1).regex(/\S/),
1210
+ trim: 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*\}\}$/)])),
1126
1211
  }).strict();
1127
1212
 
1128
1213
  export const lumaAssetSchema = lumaassetLumaAssetSchema;
@@ -1131,8 +1216,8 @@ export const lumaAssetSchema = lumaassetLumaAssetSchema;
1131
1216
  * A merge field consists of a key; `find`, and a value; `replace`. Merge fields can be used to replace placeholders within the JSON edit to create re-usable templates. Placeholders should be a string with double brace delimiters, i.e. `"{{NAME}}"`. A placeholder can be used for any value within the JSON edit.
1132
1217
  */
1133
1218
  export const mergefieldMergeFieldSchema = z.object({
1134
- find: z.string(),
1135
- replace: z.unknown()
1219
+ find: z.string(),
1220
+ replace: z.union([z.string(), z.number(), z.boolean(), z.null(), z.record(z.string(), z.unknown()), z.array(z.unknown())]),
1136
1221
  }).strict();
1137
1222
 
1138
1223
  export const mergeFieldSchema = mergefieldMergeFieldSchema;
@@ -1141,7 +1226,7 @@ export const mergeFieldSchema = mergefieldMergeFieldSchema;
1141
1226
  * Generate a poster image for the video at a specific point from the timeline. The poster image size will match the size of the output video.
1142
1227
  */
1143
1228
  export const posterPosterSchema = z.object({
1144
- capture: 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*\}\}$/)])
1229
+ capture: 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*\}\}$/)]),
1145
1230
  }).strict();
1146
1231
 
1147
1232
  export const posterSchema = posterPosterSchema;
@@ -1150,8 +1235,8 @@ export const posterSchema = posterPosterSchema;
1150
1235
  * Specify a time range to render, i.e. to render only a portion of a video or audio file. Omit this setting to export the entire video. Range can also be used to render a frame at a specific time point - setting a range and output format as `jpg` will output a single frame image at the range `start` point.
1151
1236
  */
1152
1237
  export const rangeRangeSchema = z.object({
1153
- start: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1154
- length: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1238
+ start: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1239
+ length: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1155
1240
  }).strict();
1156
1241
 
1157
1242
  export const rangeSchema = rangeRangeSchema;
@@ -1160,31 +1245,27 @@ export const rangeSchema = rangeRangeSchema;
1160
1245
  * The list of asset attributes and their values.
1161
1246
  */
1162
1247
  export const assetresponseattributesAssetResponseAttributesSchema = z.object({
1163
- id: z.string(),
1164
- owner: z.string(),
1165
- region: z.optional(z.string()),
1166
- renderId: z.optional(z.string()),
1167
- providerId: z.optional(z.string()),
1168
- filename: z.optional(z.string()),
1169
- url: z.optional(z.string()),
1170
- status: z.enum([
1171
- 'importing',
1172
- 'ready',
1173
- 'failed',
1174
- 'deleted'
1175
- ]),
1176
- created: z.optional(z.string()),
1177
- updated: z.optional(z.string())
1248
+ id: z.string(),
1249
+ owner: z.string(),
1250
+ region: z.optional(z.string()),
1251
+ renderId: z.optional(z.string()),
1252
+ providerId: z.optional(z.string()),
1253
+ filename: z.optional(z.string()),
1254
+ url: z.optional(z.string()),
1255
+ status: z.enum(["importing", "ready", "failed", "deleted"]),
1256
+ created: z.optional(z.string()),
1257
+ updated: z.optional(z.string()),
1178
1258
  }).strict();
1179
1259
 
1180
- export const assetResponseAttributesSchema = assetresponseattributesAssetResponseAttributesSchema;
1260
+ export const assetResponseAttributesSchema =
1261
+ assetresponseattributesAssetResponseAttributesSchema;
1181
1262
 
1182
1263
  /**
1183
1264
  * The type of resource (an asset) and attributes of the asset.
1184
1265
  */
1185
1266
  export const assetresponsedataAssetResponseDataSchema = z.object({
1186
- type: z.string(),
1187
- attributes: assetresponseattributesAssetResponseAttributesSchema
1267
+ type: z.string(),
1268
+ attributes: assetresponseattributesAssetResponseAttributesSchema,
1188
1269
  }).strict();
1189
1270
 
1190
1271
  export const assetResponseDataSchema = assetresponsedataAssetResponseDataSchema;
@@ -1193,16 +1274,17 @@ export const assetResponseDataSchema = assetresponsedataAssetResponseDataSchema;
1193
1274
  * The response returned by the Serve API [get asset by render id](#get-asset-by-render-id) request. The response is an array of asset resources, including video, image, audio, thumbnail and poster image. The response follows the [json:api](https://jsonapi.org/) specification.
1194
1275
  */
1195
1276
  export const assetrenderresponseAssetRenderResponseSchema = z.object({
1196
- data: z.array(assetresponsedataAssetResponseDataSchema)
1277
+ data: z.array(assetresponsedataAssetResponseDataSchema),
1197
1278
  }).strict();
1198
1279
 
1199
- export const assetRenderResponseSchema = assetrenderresponseAssetRenderResponseSchema;
1280
+ export const assetRenderResponseSchema =
1281
+ assetrenderresponseAssetRenderResponseSchema;
1200
1282
 
1201
1283
  /**
1202
1284
  * The response returned by the Serve API [get asset](#get-asset) request. Includes details of a hosted video, image, audio file, thumbnail or poster image. The response follows the [json:api](https://jsonapi.org/) specification.
1203
1285
  */
1204
1286
  export const assetresponseAssetResponseSchema = z.object({
1205
- data: assetresponsedataAssetResponseDataSchema
1287
+ data: assetresponsedataAssetResponseDataSchema,
1206
1288
  }).strict();
1207
1289
 
1208
1290
  export const assetResponseSchema = assetresponseAssetResponseSchema;
@@ -1211,9 +1293,9 @@ export const assetResponseSchema = assetresponseAssetResponseSchema;
1211
1293
  * The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
1212
1294
  */
1213
1295
  export const proberesponseProbeResponseSchema = z.object({
1214
- success: z.boolean(),
1215
- message: z.string(),
1216
- response: z.record(z.string(), z.unknown())
1296
+ success: z.boolean(),
1297
+ message: z.string(),
1298
+ response: z.record(z.string(), z.unknown()),
1217
1299
  }).strict();
1218
1300
 
1219
1301
  export const probeResponseSchema = proberesponseProbeResponseSchema;
@@ -1222,19 +1304,20 @@ export const probeResponseSchema = proberesponseProbeResponseSchema;
1222
1304
  * The response data returned with the [QueuedResponse](#tocs_queuedresponse).
1223
1305
  */
1224
1306
  export const queuedresponsedataQueuedResponseDataSchema = z.object({
1225
- message: z.string(),
1226
- id: z.string()
1307
+ message: z.string(),
1308
+ id: z.string(),
1227
1309
  }).strict();
1228
1310
 
1229
- export const queuedResponseDataSchema = queuedresponsedataQueuedResponseDataSchema;
1311
+ export const queuedResponseDataSchema =
1312
+ queuedresponsedataQueuedResponseDataSchema;
1230
1313
 
1231
1314
  /**
1232
1315
  * The response received after a [render request](#render-asset) or [template render](#render-template) is submitted. The render task is queued for rendering and a unique render id is returned.
1233
1316
  */
1234
1317
  export const queuedresponseQueuedResponseSchema = z.object({
1235
- success: z.boolean(),
1236
- message: z.string(),
1237
- response: queuedresponsedataQueuedResponseDataSchema
1318
+ success: z.boolean(),
1319
+ message: z.string(),
1320
+ response: queuedresponsedataQueuedResponseDataSchema,
1238
1321
  }).strict();
1239
1322
 
1240
1323
  export const queuedResponseSchema = queuedresponseQueuedResponseSchema;
@@ -1243,52 +1326,56 @@ export const queuedResponseSchema = queuedresponseQueuedResponseSchema;
1243
1326
  * The individual template item returned with the [TemplateListResponseData](#tocs_templatelistresponsedata) templates list.
1244
1327
  */
1245
1328
  export const templatelistresponseitemTemplateListResponseItemSchema = z.object({
1246
- id: z.string(),
1247
- name: z.string(),
1248
- created: z.optional(z.string()),
1249
- updated: z.optional(z.string())
1329
+ id: z.string(),
1330
+ name: z.string(),
1331
+ created: z.optional(z.string()),
1332
+ updated: z.optional(z.string()),
1250
1333
  }).strict();
1251
1334
 
1252
- export const templateListResponseItemSchema = templatelistresponseitemTemplateListResponseItemSchema;
1335
+ export const templateListResponseItemSchema =
1336
+ templatelistresponseitemTemplateListResponseItemSchema;
1253
1337
 
1254
1338
  /**
1255
1339
  * The response data returned with the [TemplateListResponse](#tocs_templatelistresponse).
1256
1340
  */
1257
1341
  export const templatelistresponsedataTemplateListResponseDataSchema = z.object({
1258
- owner: z.string(),
1259
- templates: z.array(templatelistresponseitemTemplateListResponseItemSchema)
1342
+ owner: z.string(),
1343
+ templates: z.array(templatelistresponseitemTemplateListResponseItemSchema),
1260
1344
  }).strict();
1261
1345
 
1262
- export const templateListResponseDataSchema = templatelistresponsedataTemplateListResponseDataSchema;
1346
+ export const templateListResponseDataSchema =
1347
+ templatelistresponsedataTemplateListResponseDataSchema;
1263
1348
 
1264
1349
  /**
1265
1350
  * A list of previously saved templates.
1266
1351
  */
1267
1352
  export const templatelistresponseTemplateListResponseSchema = z.object({
1268
- success: z.boolean(),
1269
- message: z.string(),
1270
- response: templatelistresponsedataTemplateListResponseDataSchema
1353
+ success: z.boolean(),
1354
+ message: z.string(),
1355
+ response: templatelistresponsedataTemplateListResponseDataSchema,
1271
1356
  }).strict();
1272
1357
 
1273
- export const templateListResponseSchema = templatelistresponseTemplateListResponseSchema;
1358
+ export const templateListResponseSchema =
1359
+ templatelistresponseTemplateListResponseSchema;
1274
1360
 
1275
1361
  /**
1276
1362
  * The response data returned with the [TemplateResponse](#tocs_templateresponse).
1277
1363
  */
1278
1364
  export const templateresponsedataTemplateResponseDataSchema = z.object({
1279
- message: z.string(),
1280
- id: z.string()
1365
+ message: z.string(),
1366
+ id: z.string(),
1281
1367
  }).strict();
1282
1368
 
1283
- export const templateResponseDataSchema = templateresponsedataTemplateResponseDataSchema;
1369
+ export const templateResponseDataSchema =
1370
+ templateresponsedataTemplateResponseDataSchema;
1284
1371
 
1285
1372
  /**
1286
1373
  * The response received after a [template](#create-template) is submitted. The template is saved and a unique template id is returned.
1287
1374
  */
1288
1375
  export const templateresponseTemplateResponseSchema = z.object({
1289
- success: z.boolean(),
1290
- message: z.string(),
1291
- response: templateresponsedataTemplateResponseDataSchema
1376
+ success: z.boolean(),
1377
+ message: z.string(),
1378
+ response: templateresponsedataTemplateResponseDataSchema,
1292
1379
  }).strict();
1293
1380
 
1294
1381
  export const templateResponseSchema = templateresponseTemplateResponseSchema;
@@ -1297,46 +1384,55 @@ export const templateResponseSchema = templateresponseTemplateResponseSchema;
1297
1384
  * Font properties for the active/highlighted word.
1298
1385
  */
1299
1386
  export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
1300
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#ffff00'),
1301
- background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1302
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1387
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#ffff00"),
1388
+ background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1389
+ opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1303
1390
  }).strict();
1304
1391
 
1305
- export const richCaptionActiveFontSchema = richcaptionpropertiesRichCaptionActiveFontSchema;
1392
+ export const richCaptionActiveFontSchema =
1393
+ richcaptionpropertiesRichCaptionActiveFontSchema;
1394
+
1395
+ /**
1396
+ * Font properties for rich captions. Defaults to Roboto.
1397
+ */
1398
+ export const richcaptionpropertiesRichCaptionFontSchema = z.object({
1399
+ family: z.optional(z.string()).default("Roboto"),
1400
+ size: 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().int().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
1401
+ weight: z.optional(z.unknown()).default("400"),
1402
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#ffffff"),
1403
+ opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1404
+ background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1405
+ }).strict();
1306
1406
 
1307
1407
  /**
1308
1408
  * Word-level animation properties for caption effects.
1309
1409
  */
1310
1410
  export const richcaptionpropertiesRichCaptionWordAnimationSchema = z.object({
1311
- style: z.enum([
1312
- 'karaoke',
1313
- 'highlight',
1314
- 'pop',
1315
- 'fade',
1316
- 'slide',
1317
- 'bounce',
1318
- 'typewriter',
1319
- 'none'
1320
- ]),
1321
- speed: 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().gte(0.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1322
- direction: z.optional(z.enum([
1323
- 'left',
1324
- 'right',
1325
- 'up',
1326
- 'down'
1327
- ]))
1411
+ style: z.enum([
1412
+ "karaoke",
1413
+ "highlight",
1414
+ "pop",
1415
+ "fade",
1416
+ "slide",
1417
+ "bounce",
1418
+ "typewriter",
1419
+ "none",
1420
+ ]),
1421
+ speed: 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().gte(0.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1422
+ direction: z.optional(z.enum(["left", "right", "up", "down"])),
1328
1423
  }).strict();
1329
1424
 
1330
- export const richCaptionWordAnimationSchema = richcaptionpropertiesRichCaptionWordAnimationSchema;
1425
+ export const richCaptionWordAnimationSchema =
1426
+ richcaptionpropertiesRichCaptionWordAnimationSchema;
1331
1427
 
1332
1428
  /**
1333
1429
  * Word-level timing information for caption animation.
1334
1430
  */
1335
1431
  export const richcaptionpropertiesWordTimingSchema = z.object({
1336
- text: z.string().min(1),
1337
- start: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1338
- end: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1339
- confidence: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1432
+ text: z.string().min(1),
1433
+ start: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1434
+ end: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1435
+ confidence: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1340
1436
  }).strict();
1341
1437
 
1342
1438
  export const wordTimingSchema = richcaptionpropertiesWordTimingSchema;
@@ -1345,75 +1441,69 @@ export const wordTimingSchema = richcaptionpropertiesWordTimingSchema;
1345
1441
  * Text alignment properties (horizontal and vertical).
1346
1442
  */
1347
1443
  export const richtextpropertiesRichTextAlignmentSchema = z.object({
1348
- horizontal: z.optional(z.enum([
1349
- 'left',
1350
- 'center',
1351
- 'right'
1352
- ])),
1353
- vertical: z.optional(z.enum([
1354
- 'top',
1355
- 'middle',
1356
- 'bottom'
1357
- ]))
1444
+ horizontal: z.optional(z.enum(["left", "center", "right"])),
1445
+ vertical: z.optional(z.enum(["top", "middle", "bottom"])),
1358
1446
  }).strict();
1359
1447
 
1360
- export const richTextAlignmentSchema = richtextpropertiesRichTextAlignmentSchema;
1448
+ export const richTextAlignmentSchema =
1449
+ richtextpropertiesRichTextAlignmentSchema;
1361
1450
 
1362
1451
  /**
1363
1452
  * Animation properties for text entrance effects.
1364
1453
  */
1365
1454
  export const richtextpropertiesRichTextAnimationSchema = z.object({
1366
- preset: z.enum([
1367
- 'fadeIn',
1368
- 'slideIn',
1369
- 'typewriter',
1370
- 'ascend',
1371
- 'shift',
1372
- 'movingLetters'
1373
- ]),
1374
- duration: 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().gte(0.1).lte(30)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1375
- style: z.optional(z.enum(['character', 'word'])),
1376
- direction: z.optional(z.enum([
1377
- 'left',
1378
- 'right',
1379
- 'up',
1380
- 'down'
1381
- ]))
1455
+ preset: z.enum([
1456
+ "fadeIn",
1457
+ "slideIn",
1458
+ "typewriter",
1459
+ "ascend",
1460
+ "shift",
1461
+ "movingLetters",
1462
+ ]),
1463
+ duration: 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().gte(0.1).lte(30)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1464
+ style: z.optional(z.enum(["character", "word"])),
1465
+ direction: z.optional(z.enum(["left", "right", "up", "down"])),
1382
1466
  }).strict();
1383
1467
 
1384
- export const richTextAnimationSchema = richtextpropertiesRichTextAnimationSchema;
1468
+ export const richTextAnimationSchema =
1469
+ richtextpropertiesRichTextAnimationSchema;
1385
1470
 
1386
1471
  /**
1387
1472
  * Background styling properties for the text bounding box.
1388
1473
  */
1389
1474
  export const richtextpropertiesRichTextBackgroundSchema = z.object({
1390
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1391
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1392
- borderRadius: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
1475
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1476
+ opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1477
+ borderRadius: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1393
1478
  }).strict();
1394
1479
 
1395
- export const richTextBackgroundSchema = richtextpropertiesRichTextBackgroundSchema;
1480
+ export const richTextBackgroundSchema =
1481
+ richtextpropertiesRichTextBackgroundSchema;
1396
1482
 
1397
1483
  /**
1398
1484
  * Border styling properties for the text bounding box.
1399
1485
  */
1400
1486
  export const richtextpropertiesRichTextBorderSchema = z.object({
1401
- width: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1402
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
1403
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1404
- radius: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
1487
+ width: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1488
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
1489
+ opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1490
+ radius: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1405
1491
  }).strict();
1406
1492
 
1407
1493
  /**
1408
1494
  * Gradient properties for text fill.
1409
1495
  */
1410
1496
  export const richtextpropertiesRichTextGradientSchema = z.object({
1411
- type: z.optional(z.enum(['linear', 'radial'])),
1412
- angle: 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().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1413
- stops: z.array(z.object({
1497
+ type: z.optional(z.enum(["linear", "radial"])),
1498
+ angle: 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().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1499
+ stops: z
1500
+ .array(
1501
+ z.object({
1414
1502
  offset: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1415
- color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1416
- })).min(2)
1503
+ color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1504
+ }),
1505
+ )
1506
+ .min(2),
1417
1507
  }).strict();
1418
1508
 
1419
1509
  export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
@@ -1422,21 +1512,21 @@ export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
1422
1512
  * Padding properties for individual sides of the text bounding box.
1423
1513
  */
1424
1514
  export const richtextpropertiesRichTextPaddingSchema = z.object({
1425
- top: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1426
- right: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1427
- bottom: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1428
- left: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
1515
+ top: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1516
+ right: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1517
+ bottom: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1518
+ left: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1429
1519
  }).strict();
1430
1520
 
1431
1521
  /**
1432
1522
  * Text shadow properties.
1433
1523
  */
1434
1524
  export const richtextpropertiesRichTextShadowSchema = z.object({
1435
- offsetX: 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*\}\}$/)])).default(0),
1436
- offsetY: 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*\}\}$/)])).default(0),
1437
- blur: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1438
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
1439
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
1525
+ offsetX: 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*\}\}$/)])).default(0),
1526
+ offsetY: 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*\}\}$/)])).default(0),
1527
+ blur: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1528
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
1529
+ opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
1440
1530
  }).strict();
1441
1531
 
1442
1532
  export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
@@ -1445,9 +1535,9 @@ export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
1445
1535
  * Text stroke (outline) properties.
1446
1536
  */
1447
1537
  export const richtextpropertiesRichTextStrokeSchema = z.object({
1448
- width: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1449
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
1450
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1538
+ width: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1539
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
1540
+ opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1451
1541
  }).strict();
1452
1542
 
1453
1543
  export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
@@ -1456,24 +1546,25 @@ export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
1456
1546
  * Styling properties for the active/highlighted word.
1457
1547
  */
1458
1548
  export const richcaptionpropertiesRichCaptionActiveSchema = z.object({
1459
- font: z.optional(richcaptionpropertiesRichCaptionActiveFontSchema),
1460
- stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1461
- scale: 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().gte(0.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1549
+ font: z.optional(richcaptionpropertiesRichCaptionActiveFontSchema),
1550
+ stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1551
+ scale: 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().gte(0.5).lte(2)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1462
1552
  }).strict();
1463
1553
 
1464
- export const richCaptionActiveSchema = richcaptionpropertiesRichCaptionActiveSchema;
1554
+ export const richCaptionActiveSchema =
1555
+ richcaptionpropertiesRichCaptionActiveSchema;
1465
1556
 
1466
1557
  /**
1467
1558
  * Font properties for rich text.
1468
1559
  */
1469
1560
  export const richtextpropertiesRichTextFontSchema = z.object({
1470
- family: z.optional(z.string()).default('Open Sans'),
1471
- size: 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().int().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
1472
- weight: z.optional(z.unknown()).default('400'),
1473
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
1474
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1475
- background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1476
- stroke: z.optional(richtextpropertiesRichTextStrokeSchema)
1561
+ family: z.optional(z.string()).default("Open Sans"),
1562
+ size: 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().int().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
1563
+ weight: z.optional(z.unknown()).default("400"),
1564
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
1565
+ opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1566
+ background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1567
+ stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1477
1568
  }).strict();
1478
1569
 
1479
1570
  export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
@@ -1482,21 +1573,14 @@ export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
1482
1573
  * Text style properties including spacing, line height, and transformations.
1483
1574
  */
1484
1575
  export const richtextpropertiesRichTextStyleSchema = z.object({
1485
- letterSpacing: 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*\}\}$/)])).default(0),
1486
- wordSpacing: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1487
- lineHeight: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
1488
- textTransform: z.optional(z.enum([
1489
- 'none',
1490
- 'uppercase',
1491
- 'lowercase',
1492
- 'capitalize'
1493
- ])),
1494
- textDecoration: z.optional(z.enum([
1495
- 'none',
1496
- 'underline',
1497
- 'line-through'
1498
- ])),
1499
- gradient: z.optional(richtextpropertiesRichTextGradientSchema)
1576
+ letterSpacing: 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*\}\}$/)])).default(0),
1577
+ wordSpacing: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1578
+ lineHeight: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
1579
+ textTransform: z.optional(
1580
+ z.enum(["none", "uppercase", "lowercase", "capitalize"]),
1581
+ ),
1582
+ textDecoration: z.optional(z.enum(["none", "underline", "line-through"])),
1583
+ gradient: z.optional(richtextpropertiesRichTextGradientSchema),
1500
1584
  }).strict();
1501
1585
 
1502
1586
  export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
@@ -1508,28 +1592,25 @@ export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
1508
1592
  *
1509
1593
  */
1510
1594
  export const richcaptionassetRichCaptionAssetSchema = z.object({
1511
- type: z.enum(['rich-caption']),
1512
- src: z.optional(z.string().min(1)),
1513
- words: z.optional(z.array(richcaptionpropertiesWordTimingSchema).max(100000)),
1514
- font: z.optional(richtextpropertiesRichTextFontSchema),
1515
- style: z.optional(richtextpropertiesRichTextStyleSchema),
1516
- stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1517
- shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1518
- background: z.optional(richtextpropertiesRichTextBackgroundSchema),
1519
- padding: z.optional(z.union([
1520
- 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1521
- richtextpropertiesRichTextPaddingSchema
1522
- ])),
1523
- align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1524
- active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
1525
- wordAnimation: z.optional(richcaptionpropertiesRichCaptionWordAnimationSchema),
1526
- position: z.optional(z.enum([
1527
- 'top',
1528
- 'center',
1529
- 'bottom'
1530
- ])),
1531
- maxWidth: 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().gte(0.1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.9),
1532
- maxLines: 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().int().gte(1).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(2)
1595
+ type: z.enum(["rich-caption"]),
1596
+ src: z.optional(z.string().min(1)),
1597
+ words: z.optional(z.array(richcaptionpropertiesWordTimingSchema).max(100000)),
1598
+ font: z.optional(richcaptionpropertiesRichCaptionFontSchema),
1599
+ style: z.optional(richtextpropertiesRichTextStyleSchema),
1600
+ stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1601
+ shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1602
+ background: z.optional(richtextpropertiesRichTextBackgroundSchema),
1603
+ padding: z.optional(
1604
+ z.union([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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), richtextpropertiesRichTextPaddingSchema]),
1605
+ ),
1606
+ align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1607
+ active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
1608
+ wordAnimation: z.optional(
1609
+ richcaptionpropertiesRichCaptionWordAnimationSchema,
1610
+ ),
1611
+ position: z.optional(z.enum(["top", "center", "bottom"])),
1612
+ maxWidth: 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().gte(0.1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.9),
1613
+ maxLines: 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().int().gte(1).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(2),
1533
1614
  }).strict();
1534
1615
 
1535
1616
  export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
@@ -1540,20 +1621,19 @@ export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
1540
1621
  *
1541
1622
  */
1542
1623
  export const richtextassetRichTextAssetSchema = z.object({
1543
- type: z.enum(['rich-text']),
1544
- text: z.string().max(5000),
1545
- font: z.optional(richtextpropertiesRichTextFontSchema),
1546
- style: z.optional(richtextpropertiesRichTextStyleSchema),
1547
- stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1548
- shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1549
- background: z.optional(richtextpropertiesRichTextBackgroundSchema),
1550
- border: z.optional(richtextpropertiesRichTextBorderSchema),
1551
- padding: z.optional(z.union([
1552
- 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1553
- richtextpropertiesRichTextPaddingSchema
1554
- ])),
1555
- align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1556
- animation: z.optional(richtextpropertiesRichTextAnimationSchema)
1624
+ type: z.enum(["rich-text"]),
1625
+ text: z.string().max(5000),
1626
+ font: z.optional(richtextpropertiesRichTextFontSchema),
1627
+ style: z.optional(richtextpropertiesRichTextStyleSchema),
1628
+ stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1629
+ shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1630
+ background: z.optional(richtextpropertiesRichTextBackgroundSchema),
1631
+ border: z.optional(richtextpropertiesRichTextBorderSchema),
1632
+ padding: z.optional(
1633
+ z.union([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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), richtextpropertiesRichTextPaddingSchema]),
1634
+ ),
1635
+ align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1636
+ animation: z.optional(richtextpropertiesRichTextAnimationSchema),
1557
1637
  }).strict();
1558
1638
 
1559
1639
  export const richTextAssetSchema = richtextassetRichTextAssetSchema;
@@ -1561,30 +1641,35 @@ export const richTextAssetSchema = richtextassetRichTextAssetSchema;
1561
1641
  /**
1562
1642
  * The transfer request attributes inlcudling the user specified ID and status. Returned with [TransferResponseData](#tocs_transferresponsedata).
1563
1643
  */
1564
- export const transferresponseattributesTransferResponseAttributesSchema = z.object({
1644
+ export const transferresponseattributesTransferResponseAttributesSchema =
1645
+ z.object({
1565
1646
  id: z.optional(z.string()),
1566
1647
  owner: z.optional(z.string()),
1567
- status: z.optional(z.enum(['queued', 'failed'])),
1568
- created: z.optional(z.string())
1569
- }).strict();
1648
+ status: z.optional(z.enum(["queued", "failed"])),
1649
+ created: z.optional(z.string()),
1650
+ }).strict();
1570
1651
 
1571
- export const transferResponseAttributesSchema = transferresponseattributesTransferResponseAttributesSchema;
1652
+ export const transferResponseAttributesSchema =
1653
+ transferresponseattributesTransferResponseAttributesSchema;
1572
1654
 
1573
1655
  /**
1574
1656
  * The type of resource (an asset) and the transfer attributes. Returned with [TransferResponse](#tocs_transferresponse).
1575
1657
  */
1576
1658
  export const transferresponsedataTransferResponseDataSchema = z.object({
1577
- type: z.optional(z.string()),
1578
- attributes: z.optional(transferresponseattributesTransferResponseAttributesSchema)
1659
+ type: z.optional(z.string()),
1660
+ attributes: z.optional(
1661
+ transferresponseattributesTransferResponseAttributesSchema,
1662
+ ),
1579
1663
  }).strict();
1580
1664
 
1581
- export const transferResponseDataSchema = transferresponsedataTransferResponseDataSchema;
1665
+ export const transferResponseDataSchema =
1666
+ transferresponsedataTransferResponseDataSchema;
1582
1667
 
1583
1668
  /**
1584
1669
  * The response returned by the Serve API [transfer asset](#transfer-asset) request. The response includes the ID and transfer status. The response follows the [json:api](https://jsonapi.org/) specification.
1585
1670
  */
1586
1671
  export const transferresponseTransferResponseSchema = z.object({
1587
- data: transferresponsedataTransferResponseDataSchema
1672
+ data: transferresponsedataTransferResponseDataSchema,
1588
1673
  }).strict();
1589
1674
 
1590
1675
  export const transferResponseSchema = transferresponseTransferResponseSchema;
@@ -1593,9 +1678,9 @@ export const transferResponseSchema = transferresponseTransferResponseSchema;
1593
1678
  * The asset URL to fetch and transfer to a destination.
1594
1679
  */
1595
1680
  export const transferTransferSchema = z.object({
1596
- url: z.string(),
1597
- id: z.string(),
1598
- destinations: z.array(destinationsDestinationsSchema)
1681
+ url: z.string(),
1682
+ id: z.string(),
1683
+ destinations: z.array(destinationsDestinationsSchema),
1599
1684
  }).strict();
1600
1685
 
1601
1686
  export const transferSchema = transferTransferSchema;
@@ -1606,34 +1691,40 @@ export const transferSchema = transferTransferSchema;
1606
1691
  *
1607
1692
  */
1608
1693
  export const shapeassetShapeAssetSchema = z.object({
1609
- type: z.enum(['shape']),
1610
- shape: z.enum([
1611
- 'rectangle',
1612
- 'circle',
1613
- 'line'
1614
- ]),
1615
- width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1616
- height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1617
- fill: z.optional(z.object({
1618
- color: z.optional(z.string()),
1619
- opacity: 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*\}\}$/)]))
1620
- })),
1621
- stroke: z.optional(z.object({
1622
- color: z.optional(z.string()),
1623
- width: 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*\}\}$/)]))
1624
- })),
1625
- rectangle: z.optional(z.object({
1626
- width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1627
- height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1628
- cornerRadius: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1629
- })),
1630
- circle: z.optional(z.object({
1631
- radius: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1632
- })),
1633
- line: z.optional(z.object({
1634
- length: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1635
- thickness: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1636
- }))
1694
+ type: z.enum(["shape"]),
1695
+ shape: z.enum(["rectangle", "circle", "line"]),
1696
+ width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1697
+ height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1698
+ fill: z.optional(
1699
+ z.object({
1700
+ color: z.optional(z.string()),
1701
+ opacity: 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*\}\}$/)])),
1702
+ }),
1703
+ ),
1704
+ stroke: z.optional(
1705
+ z.object({
1706
+ color: z.optional(z.string()),
1707
+ width: 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*\}\}$/)])),
1708
+ }),
1709
+ ),
1710
+ rectangle: z.optional(
1711
+ z.object({
1712
+ width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1713
+ height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1714
+ cornerRadius: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1715
+ }),
1716
+ ),
1717
+ circle: z.optional(
1718
+ z.object({
1719
+ radius: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1720
+ }),
1721
+ ),
1722
+ line: z.optional(
1723
+ z.object({
1724
+ length: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1725
+ thickness: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1726
+ }),
1727
+ ),
1637
1728
  }).strict();
1638
1729
 
1639
1730
  export const shapeAssetSchema = shapeassetShapeAssetSchema;
@@ -1642,8 +1733,8 @@ export const shapeAssetSchema = shapeassetShapeAssetSchema;
1642
1733
  * Set a custom size for a video or image in pixels. When using a custom size omit the `resolution` and `aspectRatio`. Custom sizes must be divisible by 2 based on the encoder specifications.
1643
1734
  */
1644
1735
  export const sizeSizeSchema = z.object({
1645
- width: 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().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1646
- height: 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().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1736
+ width: 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().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1737
+ height: 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().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1647
1738
  }).strict();
1648
1739
 
1649
1740
  export const sizeSchema = sizeSizeSchema;
@@ -1652,56 +1743,50 @@ export const sizeSchema = sizeSizeSchema;
1652
1743
  * A rendition is a new output file that is generated from the source. The rendition can be encoded to a different format and have transformations applied to it such as resizing, cropping, etc...
1653
1744
  */
1654
1745
  export const renditionRenditionSchema = z.object({
1655
- format: z.optional(z.enum([
1656
- 'mp4',
1657
- 'webm',
1658
- 'mov',
1659
- 'avi',
1660
- 'mkv',
1661
- 'ogv',
1662
- 'wmv',
1663
- 'avif',
1664
- 'gif',
1665
- 'mp3',
1666
- 'wav',
1667
- 'jpg',
1668
- 'png',
1669
- 'webp',
1670
- 'tif'
1671
- ])),
1672
- size: z.optional(sizeSizeSchema),
1673
- fit: z.optional(z.enum([
1674
- 'cover',
1675
- 'contain',
1676
- 'crop'
1677
- ])),
1678
- resolution: z.optional(z.enum([
1679
- 'preview',
1680
- 'mobile',
1681
- 'sd',
1682
- 'hd',
1683
- 'fhd'
1684
- ])),
1685
- quality: 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().int().gte(1).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1686
- fps: z.optional(z.union([
1687
- z.literal(12),
1688
- z.literal(15),
1689
- z.literal(23.976),
1690
- z.literal(24),
1691
- z.literal(25),
1692
- z.literal(29.97),
1693
- z.literal(30),
1694
- z.literal(48),
1695
- z.literal(50),
1696
- z.literal(59.94),
1697
- z.literal(60)
1698
- ])),
1699
- speed: z.optional(speedSpeedSchema),
1700
- keyframeInterval: 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().int().gte(1).lte(300)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1701
- fixOffset: z.optional(z.boolean()),
1702
- fixRotation: z.optional(z.boolean()),
1703
- enhance: z.optional(enhancementsEnhancementsSchema),
1704
- filename: z.optional(z.string())
1746
+ format: z.optional(
1747
+ z.enum([
1748
+ "mp4",
1749
+ "webm",
1750
+ "mov",
1751
+ "avi",
1752
+ "mkv",
1753
+ "ogv",
1754
+ "wmv",
1755
+ "avif",
1756
+ "gif",
1757
+ "mp3",
1758
+ "wav",
1759
+ "jpg",
1760
+ "png",
1761
+ "webp",
1762
+ "tif",
1763
+ ]),
1764
+ ),
1765
+ size: z.optional(sizeSizeSchema),
1766
+ fit: z.optional(z.enum(["cover", "contain", "crop"])),
1767
+ resolution: z.optional(z.enum(["preview", "mobile", "sd", "hd", "fhd"])),
1768
+ quality: 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().int().gte(1).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1769
+ fps: z.optional(
1770
+ z.union([
1771
+ z.literal(12),
1772
+ z.literal(15),
1773
+ z.literal(23.976),
1774
+ z.literal(24),
1775
+ z.literal(25),
1776
+ z.literal(29.97),
1777
+ z.literal(30),
1778
+ z.literal(48),
1779
+ z.literal(50),
1780
+ z.literal(59.94),
1781
+ z.literal(60),
1782
+ ]),
1783
+ ),
1784
+ speed: z.optional(speedSpeedSchema),
1785
+ keyframeInterval: 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().int().gte(1).lte(300)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1786
+ fixOffset: z.optional(z.boolean()),
1787
+ fixRotation: z.optional(z.boolean()),
1788
+ enhance: z.optional(enhancementsEnhancementsSchema),
1789
+ filename: z.optional(z.string()),
1705
1790
  }).strict();
1706
1791
 
1707
1792
  export const renditionSchema = renditionRenditionSchema;
@@ -1710,8 +1795,8 @@ export const renditionSchema = renditionRenditionSchema;
1710
1795
  * The output renditions and transformations that should be generated from the source file.
1711
1796
  */
1712
1797
  export const outputsOutputsSchema = z.object({
1713
- renditions: z.optional(z.array(renditionRenditionSchema)),
1714
- transcription: z.optional(transcriptionTranscriptionSchema)
1798
+ renditions: z.optional(z.array(renditionRenditionSchema)),
1799
+ transcription: z.optional(transcriptionTranscriptionSchema),
1715
1800
  }).strict();
1716
1801
 
1717
1802
  export const outputsSchema = outputsOutputsSchema;
@@ -1719,32 +1804,38 @@ export const outputsSchema = outputsOutputsSchema;
1719
1804
  /**
1720
1805
  * The id and attributes of the generated rendition file.
1721
1806
  */
1722
- export const renditionresponseattributesRenditionResponseAttributesSchema = z.object({
1807
+ export const renditionresponseattributesRenditionResponseAttributesSchema =
1808
+ z.object({
1723
1809
  id: z.string(),
1724
- status: z.optional(z.enum([
1725
- 'queued',
1726
- 'importing',
1727
- 'ready',
1728
- 'failed',
1729
- 'deleted',
1730
- 'overwritten'
1731
- ])),
1810
+ status: z.optional(
1811
+ z.enum([
1812
+ "queued",
1813
+ "importing",
1814
+ "ready",
1815
+ "failed",
1816
+ "deleted",
1817
+ "overwritten",
1818
+ ]),
1819
+ ),
1732
1820
  url: z.optional(z.string()),
1733
1821
  executionTime: 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*\}\}$/)])),
1734
1822
  transformation: z.optional(renditionRenditionSchema),
1735
1823
  width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1736
1824
  height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1737
1825
  duration: 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*\}\}$/)])),
1738
- fps: 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*\}\}$/)]))
1739
- }).strict();
1826
+ fps: 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*\}\}$/)])),
1827
+ }).strict();
1740
1828
 
1741
- export const renditionResponseAttributesSchema = renditionresponseattributesRenditionResponseAttributesSchema;
1829
+ export const renditionResponseAttributesSchema =
1830
+ renditionresponseattributesRenditionResponseAttributesSchema;
1742
1831
 
1743
1832
  /**
1744
1833
  * The list of outputs generated from the source file. Currently supports renditions which are versions of the source file with different transformations applied.
1745
1834
  */
1746
1835
  export const outputsresponseOutputsResponseSchema = z.object({
1747
- renditions: z.optional(z.array(renditionresponseattributesRenditionResponseAttributesSchema))
1836
+ renditions: z.optional(
1837
+ z.array(renditionresponseattributesRenditionResponseAttributesSchema),
1838
+ ),
1748
1839
  }).strict();
1749
1840
 
1750
1841
  export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
@@ -1753,54 +1844,59 @@ export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
1753
1844
  * The id and attributes of the source file.
1754
1845
  */
1755
1846
  export const sourceresponseattributesSourceResponseAttributesSchema = z.object({
1756
- id: z.string(),
1757
- owner: z.string(),
1758
- input: z.optional(z.string()),
1759
- source: z.optional(z.string()),
1760
- status: z.optional(z.enum([
1761
- 'queued',
1762
- 'importing',
1763
- 'ready',
1764
- 'failed',
1765
- 'deleted',
1766
- 'overwritten'
1767
- ])),
1768
- outputs: z.optional(outputsresponseOutputsResponseSchema),
1769
- width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1770
- height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1771
- duration: 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*\}\}$/)])),
1772
- fps: 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*\}\}$/)])),
1773
- created: z.optional(z.string()),
1774
- updated: z.optional(z.string())
1847
+ id: z.string(),
1848
+ owner: z.string(),
1849
+ input: z.optional(z.string()),
1850
+ source: z.optional(z.string()),
1851
+ status: z.optional(
1852
+ z.enum([
1853
+ "queued",
1854
+ "importing",
1855
+ "ready",
1856
+ "failed",
1857
+ "deleted",
1858
+ "overwritten",
1859
+ ]),
1860
+ ),
1861
+ outputs: z.optional(outputsresponseOutputsResponseSchema),
1862
+ width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1863
+ height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1864
+ duration: 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*\}\}$/)])),
1865
+ fps: 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*\}\}$/)])),
1866
+ created: z.optional(z.string()),
1867
+ updated: z.optional(z.string()),
1775
1868
  }).strict();
1776
1869
 
1777
- export const sourceResponseAttributesSchema = sourceresponseattributesSourceResponseAttributesSchema;
1870
+ export const sourceResponseAttributesSchema =
1871
+ sourceresponseattributesSourceResponseAttributesSchema;
1778
1872
 
1779
1873
  /**
1780
1874
  * The type of resource (a source), it's id and attributes of the source file.
1781
1875
  */
1782
1876
  export const sourceresponsedataSourceResponseDataSchema = z.object({
1783
- type: z.string(),
1784
- id: z.string(),
1785
- attributes: sourceresponseattributesSourceResponseAttributesSchema
1877
+ type: z.string(),
1878
+ id: z.string(),
1879
+ attributes: sourceresponseattributesSourceResponseAttributesSchema,
1786
1880
  }).strict();
1787
1881
 
1788
- export const sourceResponseDataSchema = sourceresponsedataSourceResponseDataSchema;
1882
+ export const sourceResponseDataSchema =
1883
+ sourceresponsedataSourceResponseDataSchema;
1789
1884
 
1790
1885
  /**
1791
1886
  * A list of all ingested source files fetched or uploaded to a users account.
1792
1887
  */
1793
1888
  export const sourcelistresponseSourceListResponseSchema = z.object({
1794
- data: z.array(sourceresponsedataSourceResponseDataSchema)
1889
+ data: z.array(sourceresponsedataSourceResponseDataSchema),
1795
1890
  }).strict();
1796
1891
 
1797
- export const sourceListResponseSchema = sourcelistresponseSourceListResponseSchema;
1892
+ export const sourceListResponseSchema =
1893
+ sourcelistresponseSourceListResponseSchema;
1798
1894
 
1799
1895
  /**
1800
1896
  * The response returned by the Ingest API [get source](#get-source) request. Includes details of the ingested source file. The response follows the [json:api](https://jsonapi.org/) specification.
1801
1897
  */
1802
1898
  export const sourceresponseSourceResponseSchema = z.object({
1803
- data: sourceresponsedataSourceResponseDataSchema
1899
+ data: sourceresponsedataSourceResponseDataSchema,
1804
1900
  }).strict();
1805
1901
 
1806
1902
  export const sourceResponseSchema = sourceresponseSourceResponseSchema;
@@ -1810,10 +1906,10 @@ export const sourceResponseSchema = sourceresponseSourceResponseSchema;
1810
1906
  * A rendition is a new version, generated from the source. This can be used to create new sizes and aspect ratios tht serve different purposes within an application.
1811
1907
  */
1812
1908
  export const sourceSourceSchema = z.object({
1813
- url: z.optional(z.string()),
1814
- outputs: z.optional(outputsOutputsSchema),
1815
- destinations: z.optional(destinationsDestinationsSchema),
1816
- callback: z.optional(z.string())
1909
+ url: z.optional(z.string()),
1910
+ outputs: z.optional(outputsOutputsSchema),
1911
+ destinations: z.optional(destinationsDestinationsSchema),
1912
+ callback: z.optional(z.string()),
1817
1913
  }).strict();
1818
1914
 
1819
1915
  export const sourceSchema = sourceSourceSchema;
@@ -1822,402 +1918,31 @@ export const sourceSchema = sourceSourceSchema;
1822
1918
  * 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.
1823
1919
  */
1824
1920
  export const soundtrackSoundtrackSchema = z.object({
1825
- src: z.string().min(1).regex(/\S/),
1826
- effect: z.optional(z.enum([
1827
- 'fadeIn',
1828
- 'fadeOut',
1829
- 'fadeInFadeOut'
1830
- ])),
1831
- volume: 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*\}\}$/)]))
1921
+ src: z.string().min(1).regex(/\S/),
1922
+ effect: z.optional(z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
1923
+ volume: 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*\}\}$/)])),
1832
1924
  }).strict();
1833
1925
 
1834
1926
  export const soundtrackSchema = soundtrackSoundtrackSchema;
1835
1927
 
1836
1928
  /**
1837
- * A color stop in a gradient. Each stop defines a color at a specific position
1838
- * along the gradient vector. Gradients require at least 2 stops.
1929
+ * The SvgAsset is used to create scalable vector graphic (SVG) assets using
1930
+ * raw SVG markup.
1839
1931
  *
1840
- */
1841
- export const svgpropertiesSvgGradientStopSchema = z.object({
1842
- offset: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1843
- color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1844
- }).strict();
1845
-
1846
- export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
1847
-
1848
- /**
1849
- * A linear gradient fill that transitions colors along a straight line.
1850
- * The gradient direction is controlled by the `angle` property.
1851
- *
1852
- */
1853
- export const svgpropertiesSvgLinearGradientFillSchema = z.object({
1854
- type: z.enum(['linear']),
1855
- angle: 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().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1856
- stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1857
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1858
- }).strict();
1859
-
1860
- export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSchema;
1861
-
1862
- /**
1863
- * A radial gradient fill that transitions colors radiating outward from a center point.
1864
- * The gradient creates a circular or elliptical color transition.
1865
- *
1866
- */
1867
- export const svgpropertiesSvgRadialGradientFillSchema = z.object({
1868
- type: z.enum(['radial']),
1869
- stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1870
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1871
- }).strict();
1872
-
1873
- export const svgRadialGradientFillSchema = svgpropertiesSvgRadialGradientFillSchema;
1874
-
1875
- /**
1876
- * Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
1877
- *
1878
- */
1879
- export const svgpropertiesSvgShadowSchema = z.object({
1880
- offsetX: 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*\}\}$/)])).default(0),
1881
- offsetY: 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*\}\}$/)])).default(0),
1882
- blur: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1883
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
1884
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
1885
- }).strict();
1886
-
1887
- export const svgShadowSchema = svgpropertiesSvgShadowSchema;
1888
-
1889
- /**
1890
- * A solid color fill for SVG shapes.
1891
- */
1892
- export const svgpropertiesSvgSolidFillSchema = z.object({
1893
- type: z.enum(['solid']),
1894
- color: z.string().regex(/^#[A-Fa-f0-9]{6}$/).default('#000000'),
1895
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1)
1896
- }).strict();
1897
-
1898
- export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
1899
-
1900
- /**
1901
- * Fill properties for SVG shapes. Supports solid colors and gradients.
1902
- * The fill defines how the interior of a shape is painted.
1903
- *
1904
- */
1905
- export const svgpropertiesSvgFillSchema = z.discriminatedUnion("type", [
1906
- svgpropertiesSvgSolidFillSchema,
1907
- svgpropertiesSvgLinearGradientFillSchema,
1908
- svgpropertiesSvgRadialGradientFillSchema,
1909
- ]);
1910
-
1911
- export const svgFillSchema = svgpropertiesSvgFillSchema;
1912
-
1913
- /**
1914
- * Stroke (outline) properties for SVG shapes. The stroke defines how the outline
1915
- * of a shape is painted, including its color, width, and line style.
1916
- *
1917
- */
1918
- export const svgpropertiesSvgStrokeSchema = z.object({
1919
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#000000'),
1920
- width: 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().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1921
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1922
- lineCap: z.optional(z.enum([
1923
- 'butt',
1924
- 'round',
1925
- 'square'
1926
- ])),
1927
- lineJoin: z.optional(z.enum([
1928
- 'miter',
1929
- 'round',
1930
- 'bevel'
1931
- ])),
1932
- dashArray: z.optional(z.array(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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
1933
- dashOffset: 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*\}\}$/)])).default(0)
1934
- }).strict();
1935
-
1936
- export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
1937
-
1938
- /**
1939
- * Transformation properties for positioning, rotating, and scaling SVG shapes.
1940
- *
1941
- */
1942
- export const svgpropertiesSvgTransformSchema = z.object({
1943
- x: 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*\}\}$/)])).default(0),
1944
- y: 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*\}\}$/)])).default(0),
1945
- rotation: 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().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1946
- scale: 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().gte(0.01).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1947
- originX: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
1948
- originY: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5)
1949
- }).strict();
1950
-
1951
- export const svgTransformSchema = svgpropertiesSvgTransformSchema;
1952
-
1953
- /**
1954
- * An arrow shape pointing to the right by default.
1955
- * Use transform rotation to change direction.
1956
- *
1957
- */
1958
- export const svgshapesSvgArrowShapeSchema = z.object({
1959
- type: z.enum(['arrow']),
1960
- length: 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().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1961
- headWidth: 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().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1962
- headLength: 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().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1963
- shaftWidth: 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().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1964
- }).strict();
1965
-
1966
- export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
1967
-
1968
- /**
1969
- * A perfect circle shape defined by its radius.
1970
- * The circle is centered at the shape's position.
1971
- *
1972
- */
1973
- export const svgshapesSvgCircleShapeSchema = z.object({
1974
- type: z.enum(['circle']),
1975
- radius: 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().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1976
- }).strict();
1977
-
1978
- export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
1979
-
1980
- /**
1981
- * A cross or plus shape with equal or different arm lengths.
1982
- * Can be styled as a plus sign (+) or a cross (x with rotation).
1983
- *
1984
- */
1985
- export const svgshapesSvgCrossShapeSchema = z.object({
1986
- type: z.enum(['cross']),
1987
- width: 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().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1988
- height: 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().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1989
- thickness: 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().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
1990
- }).strict();
1991
-
1992
- export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
1993
-
1994
- /**
1995
- * An ellipse (oval) shape with separate horizontal and vertical radii.
1996
- * The ellipse is centered at the shape's position.
1997
- *
1998
- */
1999
- export const svgshapesSvgEllipseShapeSchema = z.object({
2000
- type: z.enum(['ellipse']),
2001
- radiusX: 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().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2002
- radiusY: 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().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2003
- }).strict();
2004
-
2005
- export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
2006
-
2007
- /**
2008
- * A heart shape commonly used for love/like icons.
2009
- * The heart is defined by a single size parameter.
2010
- *
2011
- */
2012
- export const svgshapesSvgHeartShapeSchema = z.object({
2013
- type: z.enum(['heart']),
2014
- size: 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().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2015
- }).strict();
2016
-
2017
- export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
2018
-
2019
- /**
2020
- * A straight line shape with a specified length and thickness.
2021
- * The line is drawn horizontally by default and can be rotated using transform.
2022
- *
2023
- */
2024
- export const svgshapesSvgLineShapeSchema = z.object({
2025
- type: z.enum(['line']),
2026
- length: 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().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2027
- thickness: 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().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2028
- }).strict();
2029
-
2030
- export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
2031
-
2032
- /**
2033
- * A custom shape defined by SVG path data.
2034
- * Supports all standard SVG path commands for creating complex shapes.
2035
- *
2036
- * **Path Commands:**
2037
- * - `M x y` / `m dx dy` - Move to (absolute/relative)
2038
- * - `L x y` / `l dx dy` - Line to
2039
- * - `H x` / `h dx` - Horizontal line to
2040
- * - `V y` / `v dy` - Vertical line to
2041
- * - `C x1 y1 x2 y2 x y` / `c` - Cubic Bezier curve
2042
- * - `S x2 y2 x y` / `s` - Smooth cubic Bezier
2043
- * - `Q x1 y1 x y` / `q` - Quadratic Bezier curve
2044
- * - `T x y` / `t` - Smooth quadratic Bezier
2045
- * - `A rx ry angle large-arc sweep x y` / `a` - Elliptical arc
2046
- * - `Z` / `z` - Close path
2047
- *
2048
- */
2049
- export const svgshapesSvgPathShapeSchema = z.object({
2050
- type: z.enum(['path']),
2051
- d: z.string().min(1).max(100000)
2052
- }).strict();
2053
-
2054
- export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
2055
-
2056
- /**
2057
- * A regular polygon shape with a specified number of sides.
2058
- * Examples: triangle (3), square (4), pentagon (5), hexagon (6), etc.
2059
- * The polygon is inscribed in a circle of the given radius.
2060
- *
2061
- */
2062
- export const svgshapesSvgPolygonShapeSchema = z.object({
2063
- type: z.enum(['polygon']),
2064
- sides: 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().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2065
- radius: 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().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2066
- }).strict();
2067
-
2068
- export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
2069
-
2070
- /**
2071
- * A rectangle shape with optional rounded corners.
2072
- * The rectangle is defined by its width and height dimensions.
2073
- *
2074
- */
2075
- export const svgshapesSvgRectangleShapeSchema = z.object({
2076
- type: z.enum(['rectangle']),
2077
- width: 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().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2078
- height: 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().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2079
- cornerRadius: 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().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0)
2080
- }).strict();
2081
-
2082
- export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
2083
-
2084
- /**
2085
- * A ring (donut/annulus) shape - a circle with a circular hole in the center.
2086
- * The ring is defined by outer and inner radii.
2087
- *
2088
- */
2089
- export const svgshapesSvgRingShapeSchema = z.object({
2090
- type: z.enum(['ring']),
2091
- outerRadius: 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().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2092
- innerRadius: 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().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2093
- }).strict();
2094
-
2095
- export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
2096
-
2097
- /**
2098
- * A star shape with a specified number of points.
2099
- * The star is defined by outer and inner radii, creating the characteristic
2100
- * pointed appearance.
2101
- *
2102
- */
2103
- export const svgshapesSvgStarShapeSchema = z.object({
2104
- type: z.enum(['star']),
2105
- points: 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().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2106
- outerRadius: 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().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2107
- innerRadius: 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().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2108
- }).strict();
2109
-
2110
- export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
2111
-
2112
- /**
2113
- * The shape definition for an SVG asset. Each shape type has its own specific
2114
- * properties. The `type` field determines which shape is rendered.
2115
- *
2116
- */
2117
- export const svgshapesSvgShapeSchema = z.discriminatedUnion("type", [
2118
- svgshapesSvgRectangleShapeSchema,
2119
- svgshapesSvgCircleShapeSchema,
2120
- svgshapesSvgEllipseShapeSchema,
2121
- svgshapesSvgLineShapeSchema,
2122
- svgshapesSvgPolygonShapeSchema,
2123
- svgshapesSvgStarShapeSchema,
2124
- svgshapesSvgArrowShapeSchema,
2125
- svgshapesSvgHeartShapeSchema,
2126
- svgshapesSvgCrossShapeSchema,
2127
- svgshapesSvgRingShapeSchema,
2128
- svgshapesSvgPathShapeSchema,
2129
- ]);
2130
-
2131
- export const svgShapeSchema = svgshapesSvgShapeSchema;
2132
-
2133
- /**
2134
- * The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.
2135
- * It provides two mutually exclusive ways to define shapes:
2136
- *
2137
- * **Option 1: Import SVG markup using `src`**
2138
1932
  * ```json
2139
1933
  * {
2140
1934
  * "type": "svg",
2141
1935
  * "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#FF0000\"/></svg>"
2142
1936
  * }
2143
1937
  * ```
2144
- * When using `src`, no other properties are allowed. The fill, stroke, and dimensions
2145
- * are automatically extracted from the SVG markup.
2146
- *
2147
- * **Option 2: Define shapes programmatically using `shape`**
2148
- * ```json
2149
- * {
2150
- * "type": "svg",
2151
- * "shape": { "type": "circle", "radius": 50 },
2152
- * "fill": { "type": "solid", "color": "#FF0000" }
2153
- * }
2154
- * ```
2155
- * When using `shape`, you can customize fill, stroke, shadow, transform, and other properties.
2156
- * The `src` property is not allowed in this mode.
2157
1938
  *
2158
- * **Important:** You must provide either `src` OR `shape`, but not both.
2159
- * These two modes are mutually exclusive.
2160
- *
2161
- * **Available Shapes (Option 2 only):**
2162
- * - `rectangle` - Rectangles with optional rounded corners
2163
- * - `circle` - Perfect circles
2164
- * - `ellipse` - Ellipses/ovals with separate x and y radii
2165
- * - `line` - Straight lines with configurable thickness
2166
- * - `polygon` - Regular polygons (triangle, pentagon, hexagon, etc.)
2167
- * - `star` - Multi-pointed stars
2168
- * - `arrow` - Directional arrows
2169
- * - `heart` - Heart shapes
2170
- * - `cross` - Plus/cross shapes
2171
- * - `ring` - Donut/ring shapes
2172
- * - `path` - Custom shapes using SVG path data
2173
- *
2174
- * See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.
1939
+ * See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for SVG markup syntax.
2175
1940
  *
2176
1941
  */
2177
1942
  export const svgassetSvgAssetSchema = z.object({
2178
1943
  type: z.enum(["svg"]),
2179
- src: z.optional(z.string().min(1).max(500000)),
2180
- shape: z.optional(svgshapesSvgShapeSchema),
2181
- fill: z.optional(svgpropertiesSvgFillSchema),
2182
- stroke: z.optional(svgpropertiesSvgStrokeSchema),
2183
- shadow: z.optional(svgpropertiesSvgShadowSchema),
2184
- transform: z.optional(svgpropertiesSvgTransformSchema),
2185
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2186
- width: 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().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2187
- height: 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().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2188
- }).strict().superRefine((data, ctx) => {
2189
- const hasShape = data.shape !== undefined;
2190
- const hasSrc = data.src !== undefined && data.src.trim() !== "";
2191
-
2192
- if (!hasShape && !hasSrc) {
2193
- ctx.addIssue({
2194
- code: z.ZodIssueCode.custom,
2195
- message: "Either 'src' or 'shape' must be provided",
2196
- path: [],
2197
- });
2198
- }
2199
-
2200
- if (hasShape && hasSrc) {
2201
- ctx.addIssue({
2202
- code: z.ZodIssueCode.custom,
2203
- message: "Provide either 'src' or 'shape', not both",
2204
- path: ["src"],
2205
- });
2206
- }
2207
-
2208
- if (hasSrc) {
2209
- const disallowedProps = ["shape", "fill", "stroke", "shadow", "transform", "width", "height"];
2210
- for (const prop of disallowedProps) {
2211
- if (data[prop] !== undefined) {
2212
- ctx.addIssue({
2213
- code: z.ZodIssueCode.custom,
2214
- message: `'${prop}' is not allowed when using 'src'. Only 'type' and 'src' are allowed in import mode`,
2215
- path: [prop],
2216
- });
2217
- }
2218
- }
2219
- }
2220
- });
1944
+ src: z.string().min(1).max(500000),
1945
+ }).strict();
2221
1946
 
2222
1947
  export const svgAssetSchema = svgassetSvgAssetSchema;
2223
1948
 
@@ -2225,8 +1950,8 @@ export const svgAssetSchema = svgassetSvgAssetSchema;
2225
1950
  * Configure the id and optional merge fields to render a template by id.
2226
1951
  */
2227
1952
  export const templaterenderTemplateRenderSchema = z.object({
2228
- id: z.string(),
2229
- merge: z.optional(z.array(mergefieldMergeFieldSchema))
1953
+ id: z.string(),
1954
+ merge: z.optional(z.array(mergefieldMergeFieldSchema)),
2230
1955
  }).strict();
2231
1956
 
2232
1957
  export const templateRenderSchema = templaterenderTemplateRenderSchema;
@@ -2235,16 +1960,8 @@ export const templateRenderSchema = templaterenderTemplateRenderSchema;
2235
1960
  * Horizontal and vertical alignment properties for text.
2236
1961
  */
2237
1962
  export const textpropertiesTextAlignmentSchema = z.object({
2238
- horizontal: z.optional(z.enum([
2239
- 'left',
2240
- 'center',
2241
- 'right'
2242
- ])),
2243
- vertical: z.optional(z.enum([
2244
- 'top',
2245
- 'center',
2246
- 'bottom'
2247
- ]))
1963
+ horizontal: z.optional(z.enum(["left", "center", "right"])),
1964
+ vertical: z.optional(z.enum(["top", "center", "bottom"])),
2248
1965
  }).strict();
2249
1966
 
2250
1967
  export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
@@ -2253,18 +1970,18 @@ export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
2253
1970
  * Animation properties for text entrance effects.
2254
1971
  */
2255
1972
  export const textpropertiesTextAnimationSchema = z.object({
2256
- preset: z.enum(['typewriter']),
2257
- duration: 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().gte(0.1).lte(30)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1973
+ preset: z.enum(["typewriter"]),
1974
+ duration: 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().gte(0.1).lte(30)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2258
1975
  }).strict();
2259
1976
 
2260
1977
  /**
2261
1978
  * Displays a background box behind the text.
2262
1979
  */
2263
1980
  export const textpropertiesTextBackgroundSchema = z.object({
2264
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2265
- opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2266
- padding: 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().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2267
- borderRadius: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
1981
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1982
+ opacity: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1983
+ padding: 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().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1984
+ borderRadius: 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2268
1985
  }).strict();
2269
1986
 
2270
1987
  export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
@@ -2273,12 +1990,12 @@ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
2273
1990
  * Font properties for text.
2274
1991
  */
2275
1992
  export const textpropertiesTextFontSchema = z.object({
2276
- family: z.optional(z.string()),
2277
- color: z.optional(z.string()),
2278
- opacity: 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*\}\}$/)])),
2279
- size: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2280
- weight: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2281
- lineHeight: 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*\}\}$/)]))
1993
+ family: z.optional(z.string()),
1994
+ color: z.optional(z.string()),
1995
+ opacity: 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*\}\}$/)])),
1996
+ size: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1997
+ weight: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1998
+ lineHeight: 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*\}\}$/)])),
2282
1999
  }).strict();
2283
2000
 
2284
2001
  export const textFontSchema = textpropertiesTextFontSchema;
@@ -2287,8 +2004,8 @@ export const textFontSchema = textpropertiesTextFontSchema;
2287
2004
  * Text stroke (outline) properties.
2288
2005
  */
2289
2006
  export const textpropertiesTextStrokeSchema = z.object({
2290
- width: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2291
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
2007
+ width: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2008
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2292
2009
  }).strict();
2293
2010
 
2294
2011
  /**
@@ -2297,16 +2014,16 @@ export const textpropertiesTextStrokeSchema = z.object({
2297
2014
  *
2298
2015
  */
2299
2016
  export const textassetTextAssetSchema = z.object({
2300
- type: z.enum(['text']),
2301
- text: z.string(),
2302
- width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2303
- height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2304
- font: z.optional(textpropertiesTextFontSchema),
2305
- background: z.optional(textpropertiesTextBackgroundSchema),
2306
- alignment: z.optional(textpropertiesTextAlignmentSchema),
2307
- stroke: z.optional(textpropertiesTextStrokeSchema),
2308
- animation: z.optional(textpropertiesTextAnimationSchema),
2309
- ellipsis: z.optional(z.string())
2017
+ type: z.enum(["text"]),
2018
+ text: z.string(),
2019
+ width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2020
+ height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2021
+ font: z.optional(textpropertiesTextFontSchema),
2022
+ background: z.optional(textpropertiesTextBackgroundSchema),
2023
+ alignment: z.optional(textpropertiesTextAlignmentSchema),
2024
+ stroke: z.optional(textpropertiesTextStrokeSchema),
2025
+ animation: z.optional(textpropertiesTextAnimationSchema),
2026
+ ellipsis: z.optional(z.string()),
2310
2027
  }).strict();
2311
2028
 
2312
2029
  export const textAssetSchema = textassetTextAssetSchema;
@@ -2315,11 +2032,11 @@ export const textAssetSchema = textassetTextAssetSchema;
2315
2032
  * The TextToImageAsset lets you create a dynamic image from a text prompt.
2316
2033
  */
2317
2034
  export const texttoimageassetTextToImageAssetSchema = z.object({
2318
- type: z.enum(['text-to-image']),
2319
- prompt: z.string(),
2320
- width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2321
- height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2322
- crop: z.optional(cropCropSchema)
2035
+ type: z.enum(["text-to-image"]),
2036
+ prompt: z.string(),
2037
+ width: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2038
+ height: 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().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2039
+ crop: z.optional(cropCropSchema),
2323
2040
  }).strict();
2324
2041
 
2325
2042
  export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
@@ -2328,8 +2045,8 @@ export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
2328
2045
  * Generate a thumbnail image for the video or image at a specific point from the timeline.
2329
2046
  */
2330
2047
  export const thumbnailThumbnailSchema = z.object({
2331
- capture: 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*\}\}$/)]),
2332
- scale: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2048
+ capture: 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*\}\}$/)]),
2049
+ scale: 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2333
2050
  }).strict();
2334
2051
 
2335
2052
  export const thumbnailSchema = thumbnailThumbnailSchema;
@@ -2338,64 +2055,35 @@ export const thumbnailSchema = thumbnailThumbnailSchema;
2338
2055
  * The output format, render range and type of media to generate.
2339
2056
  */
2340
2057
  export const outputOutputSchema = z.object({
2341
- format: z.enum([
2342
- 'mp4',
2343
- 'gif',
2344
- 'mp3',
2345
- 'jpg',
2346
- 'png',
2347
- 'bmp'
2058
+ format: z.enum(["mp4", "gif", "mp3", "jpg", "png", "bmp"]),
2059
+ resolution: z.optional(
2060
+ z.enum(["preview", "mobile", "sd", "hd", "1080", "4k"]),
2061
+ ),
2062
+ aspectRatio: z.optional(z.enum(["16:9", "9:16", "1:1", "4:5", "4:3"])),
2063
+ size: z.optional(sizeSizeSchema),
2064
+ fps: z.optional(
2065
+ z.union([
2066
+ z.literal(12),
2067
+ z.literal(15),
2068
+ z.literal(23.976),
2069
+ z.literal(24),
2070
+ z.literal(25),
2071
+ z.literal(29.97),
2072
+ z.literal(30),
2073
+ z.literal(48),
2074
+ z.literal(50),
2075
+ z.literal(59.94),
2076
+ z.literal(60),
2348
2077
  ]),
2349
- resolution: z.optional(z.enum([
2350
- 'preview',
2351
- 'mobile',
2352
- 'sd',
2353
- 'hd',
2354
- '1080',
2355
- '4k'
2356
- ])),
2357
- aspectRatio: z.optional(z.enum([
2358
- '16:9',
2359
- '9:16',
2360
- '1:1',
2361
- '4:5',
2362
- '4:3'
2363
- ])),
2364
- size: z.optional(sizeSizeSchema),
2365
- fps: z.optional(z.union([
2366
- z.literal(12),
2367
- z.literal(15),
2368
- z.literal(23.976),
2369
- z.literal(24),
2370
- z.literal(25),
2371
- z.literal(29.97),
2372
- z.literal(30),
2373
- z.literal(48),
2374
- z.literal(50),
2375
- z.literal(59.94),
2376
- z.literal(60)
2377
- ])),
2378
- scaleTo: z.optional(z.enum([
2379
- 'preview',
2380
- 'mobile',
2381
- 'sd',
2382
- 'hd',
2383
- '1080',
2384
- '4k'
2385
- ])),
2386
- quality: z.optional(z.enum([
2387
- 'verylow',
2388
- 'low',
2389
- 'medium',
2390
- 'high',
2391
- 'veryhigh'
2392
- ])),
2393
- repeat: z.optional(z.boolean()),
2394
- mute: z.optional(z.boolean()),
2395
- range: z.optional(rangeRangeSchema),
2396
- poster: z.optional(posterPosterSchema),
2397
- thumbnail: z.optional(thumbnailThumbnailSchema),
2398
- destinations: z.optional(z.array(destinationsDestinationsSchema))
2078
+ ),
2079
+ scaleTo: z.optional(z.enum(["preview", "mobile", "sd", "hd", "1080", "4k"])),
2080
+ quality: z.optional(z.enum(["verylow", "low", "medium", "high", "veryhigh"])),
2081
+ repeat: z.optional(z.boolean()),
2082
+ mute: z.optional(z.boolean()),
2083
+ range: z.optional(rangeRangeSchema),
2084
+ poster: z.optional(posterPosterSchema),
2085
+ thumbnail: z.optional(thumbnailThumbnailSchema),
2086
+ destinations: z.optional(z.array(destinationsDestinationsSchema)),
2399
2087
  }).strict();
2400
2088
 
2401
2089
  export const outputSchema = outputOutputSchema;
@@ -2404,134 +2092,138 @@ export const outputSchema = outputOutputSchema;
2404
2092
  * In and out transitions for a clip - i.e. fade in and fade out
2405
2093
  */
2406
2094
  export const transitionTransitionSchema = z.object({
2407
- in: z.optional(z.enum([
2408
- 'none',
2409
- 'fade',
2410
- 'fadeSlow',
2411
- 'fadeFast',
2412
- 'reveal',
2413
- 'revealSlow',
2414
- 'revealFast',
2415
- 'wipeLeft',
2416
- 'wipeLeftSlow',
2417
- 'wipeLeftFast',
2418
- 'wipeRight',
2419
- 'wipeRightSlow',
2420
- 'wipeRightFast',
2421
- 'slideLeft',
2422
- 'slideLeftSlow',
2423
- 'slideLeftFast',
2424
- 'slideRight',
2425
- 'slideRightSlow',
2426
- 'slideRightFast',
2427
- 'slideUp',
2428
- 'slideUpSlow',
2429
- 'slideUpFast',
2430
- 'slideDown',
2431
- 'slideDownSlow',
2432
- 'slideDownFast',
2433
- 'carouselLeft',
2434
- 'carouselLeftSlow',
2435
- 'carouselLeftFast',
2436
- 'carouselRight',
2437
- 'carouselRightSlow',
2438
- 'carouselRightFast',
2439
- 'carouselUp',
2440
- 'carouselUpSlow',
2441
- 'carouselUpFast',
2442
- 'carouselDown',
2443
- 'carouselDownSlow',
2444
- 'carouselDownFast',
2445
- 'shuffleTopRight',
2446
- 'shuffleTopRightSlow',
2447
- 'shuffleTopRightFast',
2448
- 'shuffleRightTop',
2449
- 'shuffleRightTopSlow',
2450
- 'shuffleRightTopFast',
2451
- 'shuffleRightBottom',
2452
- 'shuffleRightBottomSlow',
2453
- 'shuffleRightBottomFast',
2454
- 'shuffleBottomRight',
2455
- 'shuffleBottomRightSlow',
2456
- 'shuffleBottomRightFast',
2457
- 'shuffleBottomLeft',
2458
- 'shuffleBottomLeftSlow',
2459
- 'shuffleBottomLeftFast',
2460
- 'shuffleLeftBottom',
2461
- 'shuffleLeftBottomSlow',
2462
- 'shuffleLeftBottomFast',
2463
- 'shuffleLeftTop',
2464
- 'shuffleLeftTopSlow',
2465
- 'shuffleLeftTopFast',
2466
- 'shuffleTopLeft',
2467
- 'shuffleTopLeftSlow',
2468
- 'shuffleTopLeftFast',
2469
- 'zoom'
2470
- ])),
2471
- out: z.optional(z.enum([
2472
- 'none',
2473
- 'fade',
2474
- 'fadeSlow',
2475
- 'fadeFast',
2476
- 'reveal',
2477
- 'revealSlow',
2478
- 'revealFast',
2479
- 'wipeLeft',
2480
- 'wipeLeftSlow',
2481
- 'wipeLeftFast',
2482
- 'wipeRight',
2483
- 'wipeRightSlow',
2484
- 'wipeRightFast',
2485
- 'slideLeft',
2486
- 'slideLeftSlow',
2487
- 'slideLeftFast',
2488
- 'slideRight',
2489
- 'slideRightSlow',
2490
- 'slideRightFast',
2491
- 'slideUp',
2492
- 'slideUpSlow',
2493
- 'slideUpFast',
2494
- 'slideDown',
2495
- 'slideDownSlow',
2496
- 'slideDownFast',
2497
- 'carouselLeft',
2498
- 'carouselLeftSlow',
2499
- 'carouselLeftFast',
2500
- 'carouselRight',
2501
- 'carouselRightSlow',
2502
- 'carouselRightFast',
2503
- 'carouselUp',
2504
- 'carouselUpSlow',
2505
- 'carouselUpFast',
2506
- 'carouselDown',
2507
- 'carouselDownSlow',
2508
- 'carouselDownFast',
2509
- 'shuffleTopRight',
2510
- 'shuffleTopRightSlow',
2511
- 'shuffleTopRightFast',
2512
- 'shuffleRightTop',
2513
- 'shuffleRightTopSlow',
2514
- 'shuffleRightTopFast',
2515
- 'shuffleRightBottom',
2516
- 'shuffleRightBottomSlow',
2517
- 'shuffleRightBottomFast',
2518
- 'shuffleBottomRight',
2519
- 'shuffleBottomRightSlow',
2520
- 'shuffleBottomRightFast',
2521
- 'shuffleBottomLeft',
2522
- 'shuffleBottomLeftSlow',
2523
- 'shuffleBottomLeftFast',
2524
- 'shuffleLeftBottom',
2525
- 'shuffleLeftBottomSlow',
2526
- 'shuffleLeftBottomFast',
2527
- 'shuffleLeftTop',
2528
- 'shuffleLeftTopSlow',
2529
- 'shuffleLeftTopFast',
2530
- 'shuffleTopLeft',
2531
- 'shuffleTopLeftSlow',
2532
- 'shuffleTopLeftFast',
2533
- 'zoom'
2534
- ]))
2095
+ in: z.optional(
2096
+ z.enum([
2097
+ "none",
2098
+ "fade",
2099
+ "fadeSlow",
2100
+ "fadeFast",
2101
+ "reveal",
2102
+ "revealSlow",
2103
+ "revealFast",
2104
+ "wipeLeft",
2105
+ "wipeLeftSlow",
2106
+ "wipeLeftFast",
2107
+ "wipeRight",
2108
+ "wipeRightSlow",
2109
+ "wipeRightFast",
2110
+ "slideLeft",
2111
+ "slideLeftSlow",
2112
+ "slideLeftFast",
2113
+ "slideRight",
2114
+ "slideRightSlow",
2115
+ "slideRightFast",
2116
+ "slideUp",
2117
+ "slideUpSlow",
2118
+ "slideUpFast",
2119
+ "slideDown",
2120
+ "slideDownSlow",
2121
+ "slideDownFast",
2122
+ "carouselLeft",
2123
+ "carouselLeftSlow",
2124
+ "carouselLeftFast",
2125
+ "carouselRight",
2126
+ "carouselRightSlow",
2127
+ "carouselRightFast",
2128
+ "carouselUp",
2129
+ "carouselUpSlow",
2130
+ "carouselUpFast",
2131
+ "carouselDown",
2132
+ "carouselDownSlow",
2133
+ "carouselDownFast",
2134
+ "shuffleTopRight",
2135
+ "shuffleTopRightSlow",
2136
+ "shuffleTopRightFast",
2137
+ "shuffleRightTop",
2138
+ "shuffleRightTopSlow",
2139
+ "shuffleRightTopFast",
2140
+ "shuffleRightBottom",
2141
+ "shuffleRightBottomSlow",
2142
+ "shuffleRightBottomFast",
2143
+ "shuffleBottomRight",
2144
+ "shuffleBottomRightSlow",
2145
+ "shuffleBottomRightFast",
2146
+ "shuffleBottomLeft",
2147
+ "shuffleBottomLeftSlow",
2148
+ "shuffleBottomLeftFast",
2149
+ "shuffleLeftBottom",
2150
+ "shuffleLeftBottomSlow",
2151
+ "shuffleLeftBottomFast",
2152
+ "shuffleLeftTop",
2153
+ "shuffleLeftTopSlow",
2154
+ "shuffleLeftTopFast",
2155
+ "shuffleTopLeft",
2156
+ "shuffleTopLeftSlow",
2157
+ "shuffleTopLeftFast",
2158
+ "zoom",
2159
+ ]),
2160
+ ),
2161
+ out: z.optional(
2162
+ z.enum([
2163
+ "none",
2164
+ "fade",
2165
+ "fadeSlow",
2166
+ "fadeFast",
2167
+ "reveal",
2168
+ "revealSlow",
2169
+ "revealFast",
2170
+ "wipeLeft",
2171
+ "wipeLeftSlow",
2172
+ "wipeLeftFast",
2173
+ "wipeRight",
2174
+ "wipeRightSlow",
2175
+ "wipeRightFast",
2176
+ "slideLeft",
2177
+ "slideLeftSlow",
2178
+ "slideLeftFast",
2179
+ "slideRight",
2180
+ "slideRightSlow",
2181
+ "slideRightFast",
2182
+ "slideUp",
2183
+ "slideUpSlow",
2184
+ "slideUpFast",
2185
+ "slideDown",
2186
+ "slideDownSlow",
2187
+ "slideDownFast",
2188
+ "carouselLeft",
2189
+ "carouselLeftSlow",
2190
+ "carouselLeftFast",
2191
+ "carouselRight",
2192
+ "carouselRightSlow",
2193
+ "carouselRightFast",
2194
+ "carouselUp",
2195
+ "carouselUpSlow",
2196
+ "carouselUpFast",
2197
+ "carouselDown",
2198
+ "carouselDownSlow",
2199
+ "carouselDownFast",
2200
+ "shuffleTopRight",
2201
+ "shuffleTopRightSlow",
2202
+ "shuffleTopRightFast",
2203
+ "shuffleRightTop",
2204
+ "shuffleRightTopSlow",
2205
+ "shuffleRightTopFast",
2206
+ "shuffleRightBottom",
2207
+ "shuffleRightBottomSlow",
2208
+ "shuffleRightBottomFast",
2209
+ "shuffleBottomRight",
2210
+ "shuffleBottomRightSlow",
2211
+ "shuffleBottomRightFast",
2212
+ "shuffleBottomLeft",
2213
+ "shuffleBottomLeftSlow",
2214
+ "shuffleBottomLeftFast",
2215
+ "shuffleLeftBottom",
2216
+ "shuffleLeftBottomSlow",
2217
+ "shuffleLeftBottomFast",
2218
+ "shuffleLeftTop",
2219
+ "shuffleLeftTopSlow",
2220
+ "shuffleLeftTopFast",
2221
+ "shuffleTopLeft",
2222
+ "shuffleTopLeftSlow",
2223
+ "shuffleTopLeftFast",
2224
+ "zoom",
2225
+ ]),
2226
+ ),
2535
2227
  }).strict();
2536
2228
 
2537
2229
  export const transitionSchema = transitionTransitionSchema;
@@ -2547,45 +2239,43 @@ export const transitionSchema = transitionTransitionSchema;
2547
2239
  * </ul>
2548
2240
  */
2549
2241
  export const tweenTweenSchema = z.object({
2550
- from: z.optional(z.unknown()),
2551
- to: z.optional(z.unknown()),
2552
- start: 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*\}\}$/)])),
2553
- length: 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*\}\}$/)])),
2554
- interpolation: z.optional(z.enum([
2555
- 'linear',
2556
- 'bezier',
2557
- 'constant'
2558
- ])),
2559
- easing: z.optional(z.enum([
2560
- 'ease',
2561
- 'easeIn',
2562
- 'easeOut',
2563
- 'easeInOut',
2564
- 'easeInQuad',
2565
- 'easeInCubic',
2566
- 'easeInQuart',
2567
- 'easeInQuint',
2568
- 'easeInSine',
2569
- 'easeInExpo',
2570
- 'easeInCirc',
2571
- 'easeInBack',
2572
- 'easeOutQuad',
2573
- 'easeOutCubic',
2574
- 'easeOutQuart',
2575
- 'easeOutQuint',
2576
- 'easeOutSine',
2577
- 'easeOutExpo',
2578
- 'easeOutCirc',
2579
- 'easeOutBack',
2580
- 'easeInOutQuad',
2581
- 'easeInOutCubic',
2582
- 'easeInOutQuart',
2583
- 'easeInOutQuint',
2584
- 'easeInOutSine',
2585
- 'easeInOutExpo',
2586
- 'easeInOutCirc',
2587
- 'easeInOutBack'
2588
- ]))
2242
+ from: z.optional(z.unknown()),
2243
+ to: z.optional(z.unknown()),
2244
+ start: 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*\}\}$/)])),
2245
+ length: 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*\}\}$/)])),
2246
+ interpolation: z.optional(z.enum(["linear", "bezier", "constant"])),
2247
+ easing: z.optional(
2248
+ z.enum([
2249
+ "ease",
2250
+ "easeIn",
2251
+ "easeOut",
2252
+ "easeInOut",
2253
+ "easeInQuad",
2254
+ "easeInCubic",
2255
+ "easeInQuart",
2256
+ "easeInQuint",
2257
+ "easeInSine",
2258
+ "easeInExpo",
2259
+ "easeInCirc",
2260
+ "easeInBack",
2261
+ "easeOutQuad",
2262
+ "easeOutCubic",
2263
+ "easeOutQuart",
2264
+ "easeOutQuint",
2265
+ "easeOutSine",
2266
+ "easeOutExpo",
2267
+ "easeOutCirc",
2268
+ "easeOutBack",
2269
+ "easeInOutQuad",
2270
+ "easeInOutCubic",
2271
+ "easeInOutQuart",
2272
+ "easeInOutQuint",
2273
+ "easeInOutSine",
2274
+ "easeInOutExpo",
2275
+ "easeInOutCirc",
2276
+ "easeInOutBack",
2277
+ ]),
2278
+ ),
2589
2279
  }).strict();
2590
2280
 
2591
2281
  export const tweenSchema = tweenTweenSchema;
@@ -2594,20 +2284,14 @@ export const tweenSchema = tweenTweenSchema;
2594
2284
  * 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.
2595
2285
  */
2596
2286
  export const audioassetAudioAssetSchema = z.object({
2597
- type: z.enum(['audio']),
2598
- src: z.string().min(1).regex(/\S/),
2599
- trim: 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*\}\}$/)])),
2600
- volume: z.optional(z.union([
2601
- 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2602
- z.array(tweenTweenSchema)
2603
- ])),
2604
- speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2605
- effect: z.optional(z.enum([
2606
- 'none',
2607
- 'fadeIn',
2608
- 'fadeOut',
2609
- 'fadeInFadeOut'
2610
- ]))
2287
+ type: z.enum(["audio"]),
2288
+ src: z.string().min(1).regex(/\S/),
2289
+ trim: 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*\}\}$/)])),
2290
+ volume: z.optional(
2291
+ z.union([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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
2292
+ ),
2293
+ speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2294
+ effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
2611
2295
  }).strict();
2612
2296
 
2613
2297
  export const audioAssetSchema = audioassetAudioAssetSchema;
@@ -2616,14 +2300,12 @@ export const audioAssetSchema = audioassetAudioAssetSchema;
2616
2300
  * Offsets the position of an asset horizontally or vertically by a relative distance.
2617
2301
  */
2618
2302
  export const offsetOffsetSchema = z.object({
2619
- x: z.optional(z.union([
2620
- 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().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2621
- z.array(tweenTweenSchema)
2622
- ])),
2623
- y: z.optional(z.union([
2624
- 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().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2625
- z.array(tweenTweenSchema)
2626
- ]))
2303
+ x: z.optional(
2304
+ z.union([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().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
2305
+ ),
2306
+ y: z.optional(
2307
+ z.union([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().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
2308
+ ),
2627
2309
  }).strict();
2628
2310
 
2629
2311
  export const offsetSchema = offsetOffsetSchema;
@@ -2632,51 +2314,44 @@ export const offsetSchema = offsetOffsetSchema;
2632
2314
  * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
2633
2315
  */
2634
2316
  export const rotatetransformationRotateTransformationSchema = z.object({
2635
- angle: z.optional(z.union([
2636
- 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().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2637
- z.array(tweenTweenSchema)
2638
- ]))
2317
+ angle: z.optional(
2318
+ z.union([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().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
2319
+ ),
2639
2320
  }).strict();
2640
2321
 
2641
- export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
2322
+ export const rotateTransformationSchema =
2323
+ rotatetransformationRotateTransformationSchema;
2642
2324
 
2643
2325
  /**
2644
2326
  * Skew a clip so its edges are sheared at an angle. Use values between -100 and 100. Values over 3 or under -3 will skew the clip almost flat.
2645
2327
  */
2646
2328
  export const skewtransformationSkewTransformationSchema = z.object({
2647
- x: z.optional(z.union([
2648
- 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().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2649
- z.array(tweenTweenSchema)
2650
- ])),
2651
- y: z.optional(z.union([
2652
- 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().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2653
- z.array(tweenTweenSchema)
2654
- ]))
2329
+ x: z.optional(
2330
+ z.union([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().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
2331
+ ),
2332
+ y: z.optional(
2333
+ z.union([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().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
2334
+ ),
2655
2335
  }).strict();
2656
2336
 
2657
- export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
2337
+ export const skewTransformationSchema =
2338
+ skewtransformationSkewTransformationSchema;
2658
2339
 
2659
2340
  /**
2660
2341
  * The TextToSpeechAsset lets you generate a voice over from text using a text-to-speech service. The generated audio can be trimmed, faded and have its volume and speed adjusted using the same properties available on the AudioAsset.
2661
2342
  */
2662
2343
  export const texttospeechassetTextToSpeechAssetSchema = z.object({
2663
- type: z.enum(['text-to-speech']),
2664
- text: z.string(),
2665
- voice: z.string(),
2666
- language: z.optional(z.string()),
2667
- newscaster: z.optional(z.boolean()).default(false),
2668
- trim: 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*\}\}$/)])),
2669
- volume: z.optional(z.union([
2670
- 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2671
- z.array(tweenTweenSchema)
2672
- ])),
2673
- speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2674
- effect: z.optional(z.enum([
2675
- 'none',
2676
- 'fadeIn',
2677
- 'fadeOut',
2678
- 'fadeInFadeOut'
2679
- ]))
2344
+ type: z.enum(["text-to-speech"]),
2345
+ text: z.string(),
2346
+ voice: z.string(),
2347
+ language: z.optional(z.string()),
2348
+ newscaster: z.optional(z.boolean()).default(false),
2349
+ trim: 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*\}\}$/)])),
2350
+ volume: z.optional(
2351
+ z.union([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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
2352
+ ),
2353
+ speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2354
+ effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
2680
2355
  }).strict();
2681
2356
 
2682
2357
  export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
@@ -2690,43 +2365,49 @@ export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
2690
2365
  * @deprecated
2691
2366
  */
2692
2367
  export const titleassetTitleAssetSchema = z.object({
2693
- type: z.enum(['title']),
2694
- text: z.string(),
2695
- style: z.optional(z.enum([
2696
- 'minimal',
2697
- 'blockbuster',
2698
- 'vogue',
2699
- 'sketchy',
2700
- 'skinny',
2701
- 'chunk',
2702
- 'chunkLight',
2703
- 'marker',
2704
- 'future',
2705
- 'subtitle'
2706
- ])),
2707
- color: z.optional(z.string()),
2708
- size: z.optional(z.enum([
2709
- 'xx-small',
2710
- 'x-small',
2711
- 'small',
2712
- 'medium',
2713
- 'large',
2714
- 'x-large',
2715
- 'xx-large'
2716
- ])),
2717
- background: z.optional(z.string()),
2718
- position: z.optional(z.enum([
2719
- 'top',
2720
- 'topRight',
2721
- 'right',
2722
- 'bottomRight',
2723
- 'bottom',
2724
- 'bottomLeft',
2725
- 'left',
2726
- 'topLeft',
2727
- 'center'
2728
- ])),
2729
- offset: z.optional(offsetOffsetSchema)
2368
+ type: z.enum(["title"]),
2369
+ text: z.string(),
2370
+ style: z.optional(
2371
+ z.enum([
2372
+ "minimal",
2373
+ "blockbuster",
2374
+ "vogue",
2375
+ "sketchy",
2376
+ "skinny",
2377
+ "chunk",
2378
+ "chunkLight",
2379
+ "marker",
2380
+ "future",
2381
+ "subtitle",
2382
+ ]),
2383
+ ),
2384
+ color: z.optional(z.string()),
2385
+ size: z.optional(
2386
+ z.enum([
2387
+ "xx-small",
2388
+ "x-small",
2389
+ "small",
2390
+ "medium",
2391
+ "large",
2392
+ "x-large",
2393
+ "xx-large",
2394
+ ]),
2395
+ ),
2396
+ background: z.optional(z.string()),
2397
+ position: z.optional(
2398
+ z.enum([
2399
+ "top",
2400
+ "topRight",
2401
+ "right",
2402
+ "bottomRight",
2403
+ "bottom",
2404
+ "bottomLeft",
2405
+ "left",
2406
+ "topLeft",
2407
+ "center",
2408
+ ]),
2409
+ ),
2410
+ offset: z.optional(offsetOffsetSchema),
2730
2411
  }).strict();
2731
2412
 
2732
2413
  export const titleAssetSchema = titleassetTitleAssetSchema;
@@ -2735,9 +2416,9 @@ export const titleAssetSchema = titleassetTitleAssetSchema;
2735
2416
  * Apply one or more transformations to a clip. Transformations alter the visual properties of a clip and can be combined to create new shapes and effects.
2736
2417
  */
2737
2418
  export const transformationTransformationSchema = z.object({
2738
- rotate: z.optional(rotatetransformationRotateTransformationSchema),
2739
- skew: z.optional(skewtransformationSkewTransformationSchema),
2740
- flip: z.optional(fliptransformationFlipTransformationSchema)
2419
+ rotate: z.optional(rotatetransformationRotateTransformationSchema),
2420
+ skew: z.optional(skewtransformationSkewTransformationSchema),
2421
+ flip: z.optional(fliptransformationFlipTransformationSchema),
2741
2422
  }).strict();
2742
2423
 
2743
2424
  export const transformationSchema = transformationTransformationSchema;
@@ -2746,23 +2427,19 @@ export const transformationSchema = transformationTransformationSchema;
2746
2427
  * 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.
2747
2428
  */
2748
2429
  export const videoassetVideoAssetSchema = z.object({
2749
- type: z.enum(['video']),
2750
- src: z.string().min(1).regex(/\S/),
2751
- transcode: z.optional(z.boolean()),
2752
- trim: 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*\}\}$/)])),
2753
- volume: z.optional(z.union([
2754
- 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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2755
- z.array(tweenTweenSchema)
2756
- ])),
2757
- volumeEffect: z.optional(z.enum([
2758
- 'none',
2759
- 'fadeIn',
2760
- 'fadeOut',
2761
- 'fadeInFadeOut'
2762
- ])),
2763
- speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2764
- crop: z.optional(cropCropSchema),
2765
- chromaKey: z.optional(chromakeyChromaKeySchema)
2430
+ type: z.enum(["video"]),
2431
+ src: z.string().min(1).regex(/\S/),
2432
+ transcode: z.optional(z.boolean()),
2433
+ trim: 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*\}\}$/)])),
2434
+ volume: z.optional(
2435
+ z.union([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().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)]),
2436
+ ),
2437
+ volumeEffect: z.optional(
2438
+ z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"]),
2439
+ ),
2440
+ speed: 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().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2441
+ crop: z.optional(cropCropSchema),
2442
+ chromaKey: z.optional(chromakeyChromaKeySchema),
2766
2443
  }).strict();
2767
2444
 
2768
2445
  export const videoAssetSchema = videoassetVideoAssetSchema;
@@ -2794,77 +2471,72 @@ export const assetSchema = assetAssetSchema;
2794
2471
  * A clip is a container for a specific type of asset, i.e. a title, image, video, audio or html. You use a Clip to define when an asset will display on the timeline, how long it will play for and transitions, filters and effects to apply to it.
2795
2472
  */
2796
2473
  export const clipClipSchema = z.object({
2797
- asset: assetAssetSchema,
2798
- start: z.union([
2799
- 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2800
- z.union([z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2474
+ asset: assetAssetSchema,
2475
+ start: z.union([
2476
+ 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2477
+ z.union([z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2478
+ ]),
2479
+ length: z.union([
2480
+ 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2481
+ z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2482
+ ]),
2483
+ fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
2484
+ scale: z.optional(z.union([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*\}\}$/)]), z.array(tweenTweenSchema)])),
2485
+ width: 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().gte(1).lte(3840)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2486
+ height: 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().gte(1).lte(2160)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2487
+ position: z.optional(
2488
+ z.enum([
2489
+ "top",
2490
+ "topRight",
2491
+ "right",
2492
+ "bottomRight",
2493
+ "bottom",
2494
+ "bottomLeft",
2495
+ "left",
2496
+ "topLeft",
2497
+ "center",
2801
2498
  ]),
2802
- length: z.union([
2803
- 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().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2804
- z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2499
+ ),
2500
+ offset: z.optional(offsetOffsetSchema),
2501
+ transition: z.optional(transitionTransitionSchema),
2502
+ effect: z.optional(
2503
+ z.enum([
2504
+ "zoomIn",
2505
+ "zoomInSlow",
2506
+ "zoomInFast",
2507
+ "zoomOut",
2508
+ "zoomOutSlow",
2509
+ "zoomOutFast",
2510
+ "slideLeft",
2511
+ "slideLeftSlow",
2512
+ "slideLeftFast",
2513
+ "slideRight",
2514
+ "slideRightSlow",
2515
+ "slideRightFast",
2516
+ "slideUp",
2517
+ "slideUpSlow",
2518
+ "slideUpFast",
2519
+ "slideDown",
2520
+ "slideDownSlow",
2521
+ "slideDownFast",
2805
2522
  ]),
2806
- fit: z.optional(z.enum([
2807
- 'cover',
2808
- 'contain',
2809
- 'crop',
2810
- 'none'
2811
- ])),
2812
- scale: z.optional(z.union([
2813
- 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*\}\}$/)]),
2814
- z.array(tweenTweenSchema)
2815
- ])),
2816
- width: 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().gte(1).lte(3840)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2817
- height: 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().gte(1).lte(2160)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2818
- position: z.optional(z.enum([
2819
- 'top',
2820
- 'topRight',
2821
- 'right',
2822
- 'bottomRight',
2823
- 'bottom',
2824
- 'bottomLeft',
2825
- 'left',
2826
- 'topLeft',
2827
- 'center'
2828
- ])),
2829
- offset: z.optional(offsetOffsetSchema),
2830
- transition: z.optional(transitionTransitionSchema),
2831
- effect: z.optional(z.enum([
2832
- 'zoomIn',
2833
- 'zoomInSlow',
2834
- 'zoomInFast',
2835
- 'zoomOut',
2836
- 'zoomOutSlow',
2837
- 'zoomOutFast',
2838
- 'slideLeft',
2839
- 'slideLeftSlow',
2840
- 'slideLeftFast',
2841
- 'slideRight',
2842
- 'slideRightSlow',
2843
- 'slideRightFast',
2844
- 'slideUp',
2845
- 'slideUpSlow',
2846
- 'slideUpFast',
2847
- 'slideDown',
2848
- 'slideDownSlow',
2849
- 'slideDownFast'
2850
- ])),
2851
- filter: z.optional(z.enum([
2852
- 'none',
2853
- 'blur',
2854
- 'boost',
2855
- 'contrast',
2856
- 'darken',
2857
- 'greyscale',
2858
- 'lighten',
2859
- 'muted',
2860
- 'negative'
2861
- ])),
2862
- opacity: z.optional(z.union([
2863
- 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*\}\}$/)]),
2864
- z.array(tweenTweenSchema)
2865
- ])),
2866
- transform: z.optional(transformationTransformationSchema),
2867
- alias: z.optional(z.union([z.string().regex(/^[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
2523
+ ),
2524
+ filter: z.optional(
2525
+ z.enum([
2526
+ "none",
2527
+ "blur",
2528
+ "boost",
2529
+ "contrast",
2530
+ "darken",
2531
+ "greyscale",
2532
+ "lighten",
2533
+ "muted",
2534
+ "negative",
2535
+ ]),
2536
+ ),
2537
+ opacity: z.optional(z.union([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*\}\}$/)]), z.array(tweenTweenSchema)])),
2538
+ transform: z.optional(transformationTransformationSchema),
2539
+ alias: z.optional(z.union([z.string().regex(/^[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2868
2540
  }).strict();
2869
2541
 
2870
2542
  export const clipSchema = clipClipSchema;
@@ -2886,7 +2558,7 @@ const clipClipSchemaWithFitFilter = clipClipSchema.transform((clip) => {
2886
2558
  * 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.
2887
2559
  */
2888
2560
  export const trackTrackSchema = z.object({
2889
- clips: z.array(clipClipSchemaWithFitFilter).min(1)
2561
+ clips: z.array(clipClipSchemaWithFitFilter).min(1),
2890
2562
  }).strict();
2891
2563
 
2892
2564
  export const trackSchema = trackTrackSchema;
@@ -2895,11 +2567,11 @@ export const trackSchema = trackTrackSchema;
2895
2567
  * A timeline represents the contents of a video edit over time, an audio edit over time, in seconds, or an image layout. A timeline consists of layers called tracks. Tracks are composed of titles, images, audio, html or video segments referred to as clips which are placed along the track at specific starting point and lasting for a specific amount of time.
2896
2568
  */
2897
2569
  export const timelineTimelineSchema = z.object({
2898
- soundtrack: z.optional(soundtrackSoundtrackSchema),
2899
- background: z.optional(z.string()),
2900
- fonts: z.optional(z.array(fontFontSchema)),
2901
- tracks: z.array(trackTrackSchema).min(1),
2902
- cache: z.optional(z.boolean())
2570
+ soundtrack: z.optional(soundtrackSoundtrackSchema),
2571
+ background: z.optional(z.string()),
2572
+ fonts: z.optional(z.array(fontFontSchema)),
2573
+ tracks: z.array(trackTrackSchema).min(1),
2574
+ cache: z.optional(z.boolean()),
2903
2575
  }).strict();
2904
2576
 
2905
2577
  export const timelineSchema = timelineTimelineSchema;
@@ -2908,16 +2580,12 @@ export const timelineSchema = timelineTimelineSchema;
2908
2580
  * An edit defines the arrangement of a video on a timeline, an audio edit or an image design and the output format. Video assets are automatically preprocessed to fix common compatibility issues before rendering. You can control preprocessing behavior using the `transcode` flag on video assets.
2909
2581
  */
2910
2582
  export const editEditSchema = z.object({
2911
- timeline: timelineTimelineSchema,
2912
- output: outputOutputSchema,
2913
- merge: z.optional(z.array(mergefieldMergeFieldSchema)),
2914
- callback: z.optional(z.string()),
2915
- disk: z.optional(z.enum(['local', 'mount'])),
2916
- instance: z.optional(z.enum([
2917
- 's1',
2918
- 's2',
2919
- 'a1'
2920
- ]))
2583
+ timeline: timelineTimelineSchema,
2584
+ output: outputOutputSchema,
2585
+ merge: z.optional(z.array(mergefieldMergeFieldSchema)),
2586
+ callback: z.optional(z.string()),
2587
+ disk: z.optional(z.enum(["local", "mount"])),
2588
+ instance: z.optional(z.enum(["s1", "s2", "a1"])),
2921
2589
  }).strict();
2922
2590
 
2923
2591
  export const editSchema = editEditSchema;
@@ -2926,44 +2594,39 @@ export const editSchema = editEditSchema;
2926
2594
  * The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
2927
2595
  */
2928
2596
  export const renderresponsedataRenderResponseDataSchema = z.object({
2929
- id: z.string(),
2930
- owner: z.string(),
2931
- plan: z.optional(z.string()),
2932
- status: z.enum([
2933
- 'queued',
2934
- 'fetching',
2935
- 'preprocessing',
2936
- 'rendering',
2937
- 'saving',
2938
- 'done',
2939
- 'failed'
2940
- ]),
2941
- error: z.optional(z.string()),
2942
- duration: 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*\}\}$/)])),
2943
- renderTime: 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*\}\}$/)])),
2944
- url: z.optional(z.string()),
2945
- poster: z.optional(z.union([
2946
- z.string(),
2947
- z.null()
2948
- ])),
2949
- thumbnail: z.optional(z.union([
2950
- z.string(),
2951
- z.null()
2952
- ])),
2953
- data: z.optional(editEditSchema),
2954
- created: z.optional(z.string()),
2955
- updated: z.optional(z.string())
2956
- }).strict();
2957
-
2958
- export const renderResponseDataSchema = renderresponsedataRenderResponseDataSchema;
2597
+ id: z.string(),
2598
+ owner: z.string(),
2599
+ plan: z.optional(z.string()),
2600
+ status: z.enum([
2601
+ "queued",
2602
+ "fetching",
2603
+ "preprocessing",
2604
+ "rendering",
2605
+ "saving",
2606
+ "done",
2607
+ "failed",
2608
+ ]),
2609
+ error: z.optional(z.string()),
2610
+ duration: 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*\}\}$/)])),
2611
+ renderTime: 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*\}\}$/)])),
2612
+ url: z.optional(z.string()),
2613
+ poster: z.optional(z.union([z.string(), z.null()])),
2614
+ thumbnail: z.optional(z.union([z.string(), z.null()])),
2615
+ data: z.optional(editEditSchema),
2616
+ created: z.optional(z.string()),
2617
+ updated: z.optional(z.string()),
2618
+ }).strict();
2619
+
2620
+ export const renderResponseDataSchema =
2621
+ renderresponsedataRenderResponseDataSchema;
2959
2622
 
2960
2623
  /**
2961
2624
  * The response received after a [render status request](#get-render-status) is submitted. The response includes details about status of a render and the output URL.
2962
2625
  */
2963
2626
  export const renderresponseRenderResponseSchema = z.object({
2964
- success: z.boolean(),
2965
- message: z.string(),
2966
- response: renderresponsedataRenderResponseDataSchema
2627
+ success: z.boolean(),
2628
+ message: z.string(),
2629
+ response: renderresponsedataRenderResponseDataSchema,
2967
2630
  }).strict();
2968
2631
 
2969
2632
  export const renderResponseSchema = renderresponseRenderResponseSchema;
@@ -2972,39 +2635,41 @@ export const renderResponseSchema = renderresponseRenderResponseSchema;
2972
2635
  * The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse).
2973
2636
  */
2974
2637
  export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
2975
- id: z.string(),
2976
- name: z.string(),
2977
- owner: z.string(),
2978
- template: editEditSchema
2638
+ id: z.string(),
2639
+ name: z.string(),
2640
+ owner: z.string(),
2641
+ template: editEditSchema,
2979
2642
  }).strict();
2980
2643
 
2981
- export const templateDataResponseDataSchema = templatedataresponsedataTemplateDataResponseDataSchema;
2644
+ export const templateDataResponseDataSchema =
2645
+ templatedataresponsedataTemplateDataResponseDataSchema;
2982
2646
 
2983
2647
  /**
2984
2648
  * The template data including the template name and [Edit](#tocs_edit).
2985
2649
  */
2986
2650
  export const templatedataresponseTemplateDataResponseSchema = z.object({
2987
- success: z.boolean(),
2988
- message: z.string(),
2989
- response: templatedataresponsedataTemplateDataResponseDataSchema
2651
+ success: z.boolean(),
2652
+ message: z.string(),
2653
+ response: templatedataresponsedataTemplateDataResponseDataSchema,
2990
2654
  }).strict();
2991
2655
 
2992
- export const templateDataResponseSchema = templatedataresponseTemplateDataResponseSchema;
2656
+ export const templateDataResponseSchema =
2657
+ templatedataresponseTemplateDataResponseSchema;
2993
2658
 
2994
2659
  /**
2995
2660
  * A template is a saved [Edit](#tocs_edit) than can be loaded and re-used.
2996
2661
  */
2997
2662
  export const templateTemplateSchema = z.object({
2998
- name: z.string(),
2999
- template: z.optional(editEditSchema)
2663
+ name: z.string(),
2664
+ template: z.optional(editEditSchema),
3000
2665
  }).strict();
3001
2666
 
3002
2667
  export const templateSchema = templateTemplateSchema;
3003
2668
 
3004
2669
  export const postRenderRequest = z.object({
3005
- body: editEditSchema,
3006
- path: z.optional(z.never()),
3007
- query: z.optional(z.never())
2670
+ body: editEditSchema,
2671
+ path: z.optional(z.never()),
2672
+ query: z.optional(z.never()),
3008
2673
  }).strict();
3009
2674
 
3010
2675
  /**
@@ -3013,14 +2678,20 @@ export const postRenderRequest = z.object({
3013
2678
  export const postRenderResponse = queuedresponseQueuedResponseSchema;
3014
2679
 
3015
2680
  export const getRenderRequest = z.object({
3016
- body: z.optional(z.never()),
3017
- path: z.object({
3018
- id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
2681
+ body: z.optional(z.never()),
2682
+ path: z.object({
2683
+ id: z
2684
+ .string()
2685
+ .regex(
2686
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2687
+ ),
2688
+ }),
2689
+ query: z.optional(
2690
+ z.object({
2691
+ data: z.optional(z.boolean()),
2692
+ merged: z.optional(z.boolean()),
3019
2693
  }),
3020
- query: z.optional(z.object({
3021
- data: z.optional(z.boolean()),
3022
- merged: z.optional(z.boolean())
3023
- }))
2694
+ ),
3024
2695
  }).strict();
3025
2696
 
3026
2697
  /**
@@ -3029,20 +2700,21 @@ export const getRenderRequest = z.object({
3029
2700
  export const getRenderResponse = renderresponseRenderResponseSchema;
3030
2701
 
3031
2702
  export const getTemplatesRequest = z.object({
3032
- body: z.optional(z.never()),
3033
- path: z.optional(z.never()),
3034
- query: z.optional(z.never())
2703
+ body: z.optional(z.never()),
2704
+ path: z.optional(z.never()),
2705
+ query: z.optional(z.never()),
3035
2706
  }).strict();
3036
2707
 
3037
2708
  /**
3038
2709
  * The list of templates stored against a users account
3039
2710
  */
3040
- export const getTemplatesResponse = templatelistresponseTemplateListResponseSchema;
2711
+ export const getTemplatesResponse =
2712
+ templatelistresponseTemplateListResponseSchema;
3041
2713
 
3042
2714
  export const postTemplateRequest = z.object({
3043
- body: templateTemplateSchema,
3044
- path: z.optional(z.never()),
3045
- query: z.optional(z.never())
2715
+ body: templateTemplateSchema,
2716
+ path: z.optional(z.never()),
2717
+ query: z.optional(z.never()),
3046
2718
  }).strict();
3047
2719
 
3048
2720
  /**
@@ -3051,11 +2723,15 @@ export const postTemplateRequest = z.object({
3051
2723
  export const postTemplateResponse = templateresponseTemplateResponseSchema;
3052
2724
 
3053
2725
  export const deleteTemplateRequest = z.object({
3054
- body: z.optional(z.never()),
3055
- path: z.object({
3056
- id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3057
- }),
3058
- query: z.optional(z.never())
2726
+ body: z.optional(z.never()),
2727
+ path: z.object({
2728
+ id: z
2729
+ .string()
2730
+ .regex(
2731
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2732
+ ),
2733
+ }),
2734
+ query: z.optional(z.never()),
3059
2735
  }).strict();
3060
2736
 
3061
2737
  /**
@@ -3064,24 +2740,33 @@ export const deleteTemplateRequest = z.object({
3064
2740
  export const deleteTemplateResponse = z.void();
3065
2741
 
3066
2742
  export const getTemplateRequest = z.object({
3067
- body: z.optional(z.never()),
3068
- path: z.object({
3069
- id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3070
- }),
3071
- query: z.optional(z.never())
2743
+ body: z.optional(z.never()),
2744
+ path: z.object({
2745
+ id: z
2746
+ .string()
2747
+ .regex(
2748
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2749
+ ),
2750
+ }),
2751
+ query: z.optional(z.never()),
3072
2752
  }).strict();
3073
2753
 
3074
2754
  /**
3075
2755
  * The template details including the [Edit](#tocs_edit)
3076
2756
  */
3077
- export const getTemplateResponse = templatedataresponseTemplateDataResponseSchema;
2757
+ export const getTemplateResponse =
2758
+ templatedataresponseTemplateDataResponseSchema;
3078
2759
 
3079
2760
  export const putTemplateRequest = z.object({
3080
- body: templateTemplateSchema,
3081
- path: z.object({
3082
- id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3083
- }),
3084
- query: z.optional(z.never())
2761
+ body: templateTemplateSchema,
2762
+ path: z.object({
2763
+ id: z
2764
+ .string()
2765
+ .regex(
2766
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2767
+ ),
2768
+ }),
2769
+ query: z.optional(z.never()),
3085
2770
  }).strict();
3086
2771
 
3087
2772
  /**
@@ -3090,9 +2775,9 @@ export const putTemplateRequest = z.object({
3090
2775
  export const putTemplateResponse = templateresponseTemplateResponseSchema;
3091
2776
 
3092
2777
  export const postTemplateRenderRequest = z.object({
3093
- body: templaterenderTemplateRenderSchema,
3094
- path: z.optional(z.never()),
3095
- query: z.optional(z.never())
2778
+ body: templaterenderTemplateRenderSchema,
2779
+ path: z.optional(z.never()),
2780
+ query: z.optional(z.never()),
3096
2781
  }).strict();
3097
2782
 
3098
2783
  /**
@@ -3101,11 +2786,11 @@ export const postTemplateRenderRequest = z.object({
3101
2786
  export const postTemplateRenderResponse = queuedresponseQueuedResponseSchema;
3102
2787
 
3103
2788
  export const probeRequest = z.object({
3104
- body: z.optional(z.never()),
3105
- path: z.object({
3106
- url: z.string()
3107
- }),
3108
- query: z.optional(z.never())
2789
+ body: z.optional(z.never()),
2790
+ path: z.object({
2791
+ url: z.string(),
2792
+ }),
2793
+ query: z.optional(z.never()),
3109
2794
  }).strict();
3110
2795
 
3111
2796
  /**
@@ -3114,11 +2799,15 @@ export const probeRequest = z.object({
3114
2799
  export const probeResponse = proberesponseProbeResponseSchema;
3115
2800
 
3116
2801
  export const deleteAssetRequest = z.object({
3117
- body: z.optional(z.never()),
3118
- path: z.object({
3119
- id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3120
- }),
3121
- query: z.optional(z.never())
2802
+ body: z.optional(z.never()),
2803
+ path: z.object({
2804
+ id: z
2805
+ .string()
2806
+ .regex(
2807
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2808
+ ),
2809
+ }),
2810
+ query: z.optional(z.never()),
3122
2811
  }).strict();
3123
2812
 
3124
2813
  /**
@@ -3127,11 +2816,15 @@ export const deleteAssetRequest = z.object({
3127
2816
  export const deleteAssetResponse = z.void();
3128
2817
 
3129
2818
  export const getAssetRequest = z.object({
3130
- body: z.optional(z.never()),
3131
- path: z.object({
3132
- id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3133
- }),
3134
- query: z.optional(z.never())
2819
+ body: z.optional(z.never()),
2820
+ path: z.object({
2821
+ id: z
2822
+ .string()
2823
+ .regex(
2824
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2825
+ ),
2826
+ }),
2827
+ query: z.optional(z.never()),
3135
2828
  }).strict();
3136
2829
 
3137
2830
  /**
@@ -3140,22 +2833,27 @@ export const getAssetRequest = z.object({
3140
2833
  export const getAssetResponse = assetresponseAssetResponseSchema;
3141
2834
 
3142
2835
  export const getAssetByRenderIdRequest = z.object({
3143
- body: z.optional(z.never()),
3144
- path: z.object({
3145
- id: z.union([z.string().regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3146
- }),
3147
- query: z.optional(z.never())
2836
+ body: z.optional(z.never()),
2837
+ path: z.object({
2838
+ id: z
2839
+ .string()
2840
+ .regex(
2841
+ /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
2842
+ ),
2843
+ }),
2844
+ query: z.optional(z.never()),
3148
2845
  }).strict();
3149
2846
 
3150
2847
  /**
3151
2848
  * Get one or more assets by render id
3152
2849
  */
3153
- export const getAssetByRenderIdResponse = assetrenderresponseAssetRenderResponseSchema;
2850
+ export const getAssetByRenderIdResponse =
2851
+ assetrenderresponseAssetRenderResponseSchema;
3154
2852
 
3155
2853
  export const postServeAssetRequest = z.object({
3156
- body: transferTransferSchema,
3157
- path: z.optional(z.never()),
3158
- query: z.optional(z.never())
2854
+ body: transferTransferSchema,
2855
+ path: z.optional(z.never()),
2856
+ query: z.optional(z.never()),
3159
2857
  }).strict();
3160
2858
 
3161
2859
  /**
@@ -3164,9 +2862,9 @@ export const postServeAssetRequest = z.object({
3164
2862
  export const postServeAssetResponse = transferresponseTransferResponseSchema;
3165
2863
 
3166
2864
  export const getSourcesRequest = z.object({
3167
- body: z.optional(z.never()),
3168
- path: z.optional(z.never()),
3169
- query: z.optional(z.never())
2865
+ body: z.optional(z.never()),
2866
+ path: z.optional(z.never()),
2867
+ query: z.optional(z.never()),
3170
2868
  }).strict();
3171
2869
 
3172
2870
  /**
@@ -3175,22 +2873,27 @@ export const getSourcesRequest = z.object({
3175
2873
  export const getSourcesResponse = sourcelistresponseSourceListResponseSchema;
3176
2874
 
3177
2875
  export const postSourceRequest = z.object({
3178
- body: sourceSourceSchema,
3179
- path: z.optional(z.never()),
3180
- query: z.optional(z.never())
2876
+ body: sourceSourceSchema,
2877
+ path: z.optional(z.never()),
2878
+ query: z.optional(z.never()),
3181
2879
  }).strict();
3182
2880
 
3183
2881
  /**
3184
2882
  * The queued source file details
3185
2883
  */
3186
- export const postSourceResponse = queuedsourceresponseQueuedSourceResponseSchema;
2884
+ export const postSourceResponse =
2885
+ queuedsourceresponseQueuedSourceResponseSchema;
3187
2886
 
3188
2887
  export const deleteSourceRequest = z.object({
3189
- body: z.optional(z.never()),
3190
- path: z.object({
3191
- id: z.union([z.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3192
- }),
3193
- query: z.optional(z.never())
2888
+ body: z.optional(z.never()),
2889
+ path: z.object({
2890
+ id: z
2891
+ .string()
2892
+ .regex(
2893
+ /^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/,
2894
+ ),
2895
+ }),
2896
+ query: z.optional(z.never()),
3194
2897
  }).strict();
3195
2898
 
3196
2899
  /**
@@ -3199,11 +2902,15 @@ export const deleteSourceRequest = z.object({
3199
2902
  export const deleteSourceResponse = z.void();
3200
2903
 
3201
2904
  export const getSourceRequest = z.object({
3202
- body: z.optional(z.never()),
3203
- path: z.object({
3204
- id: z.union([z.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3205
- }),
3206
- query: z.optional(z.never())
2905
+ body: z.optional(z.never()),
2906
+ path: z.object({
2907
+ id: z
2908
+ .string()
2909
+ .regex(
2910
+ /^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/,
2911
+ ),
2912
+ }),
2913
+ query: z.optional(z.never()),
3207
2914
  }).strict();
3208
2915
 
3209
2916
  /**
@@ -3212,9 +2919,9 @@ export const getSourceRequest = z.object({
3212
2919
  export const getSourceResponse = sourceresponseSourceResponseSchema;
3213
2920
 
3214
2921
  export const getUploadSignedUrlRequest = z.object({
3215
- body: z.optional(z.never()),
3216
- path: z.optional(z.never()),
3217
- query: z.optional(z.never())
2922
+ body: z.optional(z.never()),
2923
+ path: z.optional(z.never()),
2924
+ query: z.optional(z.never()),
3218
2925
  }).strict();
3219
2926
 
3220
2927
  /**
@@ -3223,25 +2930,31 @@ export const getUploadSignedUrlRequest = z.object({
3223
2930
  export const getUploadSignedUrlResponse = uploadresponseUploadResponseSchema;
3224
2931
 
3225
2932
  export const postGenerateAssetRequest = z.object({
3226
- body: generatedAssetGeneratedAssetSchema,
3227
- path: z.optional(z.never()),
3228
- query: z.optional(z.never())
2933
+ body: generatedAssetGeneratedAssetSchema,
2934
+ path: z.optional(z.never()),
2935
+ query: z.optional(z.never()),
3229
2936
  }).strict();
3230
2937
 
3231
2938
  /**
3232
2939
  * The generated asset details
3233
2940
  */
3234
- export const postGenerateAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
2941
+ export const postGenerateAssetResponse =
2942
+ generatedAssetResponseGeneratedAssetResponseSchema;
3235
2943
 
3236
2944
  export const getGeneratedAssetRequest = z.object({
3237
- body: z.optional(z.never()),
3238
- path: z.object({
3239
- id: z.union([z.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3240
- }),
3241
- query: z.optional(z.never())
2945
+ body: z.optional(z.never()),
2946
+ path: z.object({
2947
+ id: z
2948
+ .string()
2949
+ .regex(
2950
+ /^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/,
2951
+ ),
2952
+ }),
2953
+ query: z.optional(z.never()),
3242
2954
  }).strict();
3243
2955
 
3244
2956
  /**
3245
2957
  * The generated asset details
3246
2958
  */
3247
- export const getGeneratedAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
2959
+ export const getGeneratedAssetResponse =
2960
+ generatedAssetResponseGeneratedAssetResponseSchema;