@shotstack/schemas 1.5.2 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,19 +21,28 @@ export const uploadRootSchema = z.unknown();
21
21
  */
22
22
  export const captionpropertiesCaptionBackgroundSchema = z.object({
23
23
  color: z.optional(z.string()),
24
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
25
- return undefined; if (Array.isArray(v))
26
- return v; if (typeof v === 'string')
27
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
28
- padding: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
29
- return undefined; if (Array.isArray(v))
30
- return v; if (typeof v === 'string')
31
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
32
- borderRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
33
- return undefined; if (Array.isArray(v))
34
- return v; if (typeof v === 'string')
35
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
36
- }).strict();
24
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
25
+ return undefined; if (Array.isArray(v))
26
+ return v; if (typeof v === 'string') {
27
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
28
+ return v;
29
+ return Number(v);
30
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
31
+ padding: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
32
+ return undefined; if (Array.isArray(v))
33
+ return v; if (typeof v === 'string') {
34
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
35
+ return v;
36
+ return Number(v);
37
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
38
+ borderRadius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
39
+ return undefined; if (Array.isArray(v))
40
+ return v; if (typeof v === 'string') {
41
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
42
+ return v;
43
+ return Number(v);
44
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
45
+ });
37
46
  export const captionBackgroundSchema = captionpropertiesCaptionBackgroundSchema;
38
47
  /**
39
48
  * Font properties for captions text.
@@ -41,46 +50,63 @@ export const captionBackgroundSchema = captionpropertiesCaptionBackgroundSchema;
41
50
  export const captionpropertiesCaptionFontSchema = z.object({
42
51
  family: z.optional(z.string()),
43
52
  color: z.optional(z.string()),
44
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
45
- return undefined; if (Array.isArray(v))
46
- return v; if (typeof v === 'string')
47
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
48
- size: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
49
- return undefined; if (Array.isArray(v))
50
- return v; if (typeof v === 'string')
51
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
52
- lineHeight: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
53
- return undefined; if (Array.isArray(v))
54
- return v; if (typeof v === 'string')
55
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
53
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
54
+ return undefined; if (Array.isArray(v))
55
+ return v; if (typeof v === 'string') {
56
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
57
+ return v;
58
+ return Number(v);
59
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
60
+ size: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
61
+ return undefined; if (Array.isArray(v))
62
+ return v; if (typeof v === 'string') {
63
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
64
+ return v;
65
+ return Number(v);
66
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
67
+ lineHeight: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
68
+ return undefined; if (Array.isArray(v))
69
+ return v; if (typeof v === 'string') {
70
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
71
+ return v;
72
+ return Number(v);
73
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
56
74
  stroke: z.optional(z.string()),
57
- strokeWidth: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
58
- return undefined; if (Array.isArray(v))
59
- return v; if (typeof v === 'string')
60
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
61
- }).strict();
75
+ strokeWidth: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
76
+ return undefined; if (Array.isArray(v))
77
+ return v; if (typeof v === 'string') {
78
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
79
+ return v;
80
+ return Number(v);
81
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
82
+ });
62
83
  export const captionFontSchema = captionpropertiesCaptionFontSchema;
63
84
  /**
64
85
  * The margin properties for captions. Margins are used to position the caption text and background on the screen.
65
86
  */
66
87
  export const captionpropertiesCaptionMarginSchema = z.object({
67
- top: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
68
- return undefined; if (Array.isArray(v))
69
- return v; if (typeof v === 'string')
70
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
71
- bottom: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
72
- return undefined; if (Array.isArray(v))
73
- return v; if (typeof v === 'string')
74
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
75
- left: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
76
- return undefined; if (Array.isArray(v))
77
- return v; if (typeof v === 'string')
78
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
79
- right: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
80
- return undefined; if (Array.isArray(v))
81
- return v; if (typeof v === 'string')
82
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
83
- }).strict();
88
+ top: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
89
+ return undefined; if (Array.isArray(v))
90
+ return v; if (typeof v === 'string') {
91
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
92
+ return v;
93
+ return Number(v);
94
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
95
+ left: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
96
+ return undefined; if (Array.isArray(v))
97
+ return v; if (typeof v === 'string') {
98
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
99
+ return v;
100
+ return Number(v);
101
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
102
+ right: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
103
+ return undefined; if (Array.isArray(v))
104
+ return v; if (typeof v === 'string') {
105
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
106
+ return v;
107
+ return Number(v);
108
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
109
+ });
84
110
  export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
85
111
  /**
86
112
  * The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
@@ -96,34 +122,46 @@ export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
96
122
  */
97
123
  export const captionassetCaptionAssetSchema = z.object({
98
124
  type: z.enum(["caption"]),
99
- src: z.string().regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").min(1).regex(/\S/),
125
+ src: z.string().min(1).regex(/\S/),
100
126
  font: z.optional(captionpropertiesCaptionFontSchema),
101
127
  background: z.optional(captionpropertiesCaptionBackgroundSchema),
102
128
  margin: z.optional(captionpropertiesCaptionMarginSchema),
103
- trim: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
104
- return undefined; if (Array.isArray(v))
105
- return v; if (typeof v === 'string')
106
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
107
- speed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
108
- return undefined; if (Array.isArray(v))
109
- return v; if (typeof v === 'string')
110
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))),
111
- }).strict();
129
+ trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
130
+ return undefined; if (Array.isArray(v))
131
+ return v; if (typeof v === 'string') {
132
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
133
+ return v;
134
+ return Number(v);
135
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
136
+ speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
137
+ return undefined; if (Array.isArray(v))
138
+ return v; if (typeof v === 'string') {
139
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
140
+ return v;
141
+ return Number(v);
142
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
143
+ });
112
144
  export const captionAssetSchema = captionassetCaptionAssetSchema;
113
145
  /**
114
146
  * 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.
115
147
  */
116
148
  export const chromakeyChromaKeySchema = z.object({
117
- color: z.string().regex(/^#[0-9a-fA-F]{6}$/),
118
- threshold: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
119
- return undefined; if (Array.isArray(v))
120
- return v; if (typeof v === 'string')
121
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(0).lte(250)))),
122
- halo: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
123
- return undefined; if (Array.isArray(v))
124
- return v; if (typeof v === 'string')
125
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(0).lte(250)))),
126
- }).strict();
149
+ color: z.union([z.string().regex(/^#[0-9a-fA-F]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
150
+ threshold: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
151
+ return undefined; if (Array.isArray(v))
152
+ return v; if (typeof v === 'string') {
153
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
154
+ return v;
155
+ return Number(v);
156
+ } return v; }), z.number().int().gte(0).lte(250)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
157
+ halo: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
158
+ return undefined; if (Array.isArray(v))
159
+ return v; if (typeof v === 'string') {
160
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
161
+ return v;
162
+ return Number(v);
163
+ } return v; }), z.number().int().gte(0).lte(250)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
164
+ });
127
165
  export const chromaKeySchema = chromakeyChromaKeySchema;
128
166
  /**
129
167
  * 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.
@@ -133,7 +171,7 @@ export const didTextToAvatarOptionsDidTextToAvatarOptionsSchema = z.object({
133
171
  text: z.string(),
134
172
  avatar: z.enum(["jack", "lana", "lily", "matt", "rian"]),
135
173
  background: z.optional(z.string()),
136
- }).strict();
174
+ });
137
175
  export const didTextToAvatarOptionsSchema = didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
138
176
  /**
139
177
  * Generate assets using the third party D-ID provider AI services.
@@ -142,7 +180,11 @@ export const didTextToAvatarOptionsSchema = didTextToAvatarOptionsDidTextToAvata
142
180
  * <li><a href="#tocs_didtexttoavataroptions">DidTextToAvatarOptions</a></li>
143
181
  * </ul>
144
182
  */
145
- export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = didTextToAvatarOptionsDidTextToAvatarOptionsSchema.extend({ type: z.literal("didTextToAvatarOptions_DIDTextToAvatarOptions") }).strict();
183
+ export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = z
184
+ .object({
185
+ type: z.literal("didTextToAvatarOptions_DIDTextToAvatarOptions"),
186
+ })
187
+ .and(didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
146
188
  export const didGeneratedAssetOptionsSchema = didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
147
189
  /**
148
190
  * 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.
@@ -150,7 +192,7 @@ export const didGeneratedAssetOptionsSchema = didGeneratedAssetOptionsDidGenerat
150
192
  export const didGeneratedAssetDidGeneratedAssetSchema = z.object({
151
193
  provider: z.enum(["d-id"]),
152
194
  options: didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema,
153
- }).strict();
195
+ });
154
196
  export const didGeneratedAssetSchema = didGeneratedAssetDidGeneratedAssetSchema;
155
197
  /**
156
198
  * 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.
@@ -169,7 +211,7 @@ export const elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema =
169
211
  "Rachel",
170
212
  "Sam",
171
213
  ]),
172
- }).strict();
214
+ });
173
215
  export const elevenLabsTextToSpeechOptionsSchema = elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
174
216
  /**
175
217
  * Generate assets using the third party ElevenLabs provider AI services.
@@ -178,7 +220,11 @@ export const elevenLabsTextToSpeechOptionsSchema = elevenlabsTextToSpeechOptions
178
220
  * <li><a href="#tocs_elevenlabstexttospeechoptions">ElevenLabsTextToSpeechOptions</a></li>
179
221
  * </ul>
180
222
  */
181
- export const elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema = elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema.extend({ type: z.literal("elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions") }).strict();
223
+ export const elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema = z
224
+ .object({
225
+ type: z.literal("elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions"),
226
+ })
227
+ .and(elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
182
228
  export const elevenLabsGeneratedAssetOptionsSchema = elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
183
229
  /**
184
230
  * 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.
@@ -186,7 +232,7 @@ export const elevenLabsGeneratedAssetOptionsSchema = elevenlabsGeneratedAssetOpt
186
232
  export const elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema = z.object({
187
233
  provider: z.enum(["elevenlabs"]),
188
234
  options: elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema,
189
- }).strict();
235
+ });
190
236
  export const elevenLabsGeneratedAssetSchema = elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
191
237
  /**
192
238
  * 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.
@@ -311,7 +357,7 @@ export const heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema = z.object
311
357
  background: z.optional(z.string()),
312
358
  ratio: z.optional(z.enum(["16:9", "9:16"])),
313
359
  test: z.optional(z.boolean()),
314
- }).strict();
360
+ });
315
361
  export const heyGenTextToAvatarOptionsSchema = heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
316
362
  /**
317
363
  * Generate assets using the third party HeyGen provider AI services.
@@ -320,7 +366,11 @@ export const heyGenTextToAvatarOptionsSchema = heygenTextToAvatarOptionsHeyGenTe
320
366
  * <li><a href="#tocs_heygentexttoavataroptions">HeyGenTextToAvatarOptions</a></li>
321
367
  * </ul>
322
368
  */
323
- export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema.extend({ type: z.literal("heygenTextToAvatarOptions_HeyGenTextToAvatarOptions") }).strict();
369
+ export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = z
370
+ .object({
371
+ type: z.literal("heygenTextToAvatarOptions_HeyGenTextToAvatarOptions"),
372
+ })
373
+ .and(heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
324
374
  export const heyGenGeneratedAssetOptionsSchema = heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
325
375
  /**
326
376
  * 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.
@@ -328,7 +378,7 @@ export const heyGenGeneratedAssetOptionsSchema = heygenGeneratedAssetOptionsHeyG
328
378
  export const heygenGeneratedAssetHeyGenGeneratedAssetSchema = z.object({
329
379
  provider: z.enum(["heygen"]),
330
380
  options: heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema,
331
- }).strict();
381
+ });
332
382
  export const heyGenGeneratedAssetSchema = heygenGeneratedAssetHeyGenGeneratedAssetSchema;
333
383
  /**
334
384
  * 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.
@@ -338,7 +388,7 @@ export const openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema = z.obje
338
388
  prompt: z.string(),
339
389
  model: z.enum(["gpt-3.5-turbo", "gpt-4"]),
340
390
  systemPrompt: z.optional(z.string()),
341
- }).strict();
391
+ });
342
392
  export const openAiTextGeneratorOptionsSchema = openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
343
393
  /**
344
394
  * Generate assets using OpenAI provider AI services.
@@ -347,7 +397,11 @@ export const openAiTextGeneratorOptionsSchema = openaiTextGeneratorOptionsOpenAi
347
397
  * <li><a href="#tocs_openaitextgeneratoroptions">OpenAiTextGeneratorOptions</a></li>
348
398
  * </ul>
349
399
  */
350
- export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema.extend({ type: z.literal("openaiTextGeneratorOptions_OpenAiTextGeneratorOptions") }).strict();
400
+ export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = z
401
+ .object({
402
+ type: z.literal("openaiTextGeneratorOptions_OpenAiTextGeneratorOptions"),
403
+ })
404
+ .and(openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
351
405
  export const openAiGeneratedAssetOptionsSchema = openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
352
406
  /**
353
407
  * 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.
@@ -355,7 +409,7 @@ export const openAiGeneratedAssetOptionsSchema = openaiGeneratedAssetOptionsOpen
355
409
  export const openaiGeneratedAssetOpenAiGeneratedAssetSchema = z.object({
356
410
  provider: z.enum(["openai"]),
357
411
  options: openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema,
358
- }).strict();
412
+ });
359
413
  export const openAiGeneratedAssetSchema = openaiGeneratedAssetOpenAiGeneratedAssetSchema;
360
414
  /**
361
415
  * Individual errors returned by the Create API.
@@ -364,14 +418,14 @@ export const generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchem
364
418
  status: z.string(),
365
419
  title: z.string(),
366
420
  detail: z.string(),
367
- }).strict();
421
+ });
368
422
  export const generatedAssetErrorResponseDataSchema = generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
369
423
  /**
370
424
  * Error response data for validation and other errors returned by the Create API.
371
425
  */
372
426
  export const generatedAssetErrorResponseGeneratedAssetErrorResponseSchema = z.object({
373
427
  errors: z.array(generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema),
374
- }).strict();
428
+ });
375
429
  export const generatedAssetErrorResponseSchema = generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
376
430
  /**
377
431
  * The id and attributes of the generated asset.
@@ -384,7 +438,7 @@ export const generatedAssetResponseAttributesGeneratedAssetResponseAttributesSch
384
438
  status: z.enum(["queued", "processing", "saving", "done", "failed"]),
385
439
  created: z.string(),
386
440
  updated: z.string(),
387
- }).strict();
441
+ });
388
442
  export const generatedAssetResponseAttributesSchema = generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
389
443
  /**
390
444
  * The type of resource (an asset), it's id and attributes of the generated file.
@@ -393,14 +447,14 @@ export const generatedAssetResponseDataGeneratedAssetResponseDataSchema = z.obje
393
447
  type: z.string(),
394
448
  id: z.string(),
395
449
  attributes: generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema,
396
- }).strict();
450
+ });
397
451
  export const generatedAssetResponseDataSchema = generatedAssetResponseDataGeneratedAssetResponseDataSchema;
398
452
  /**
399
453
  * 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.
400
454
  */
401
455
  export const generatedAssetResponseGeneratedAssetResponseSchema = z.object({
402
456
  data: generatedAssetResponseDataGeneratedAssetResponseDataSchema,
403
- }).strict();
457
+ });
404
458
  export const generatedAssetResponseSchema = generatedAssetResponseGeneratedAssetResponseSchema;
405
459
  /**
406
460
  * 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.
@@ -408,15 +462,21 @@ export const generatedAssetResponseSchema = generatedAssetResponseGeneratedAsset
408
462
  export const shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = z.object({
409
463
  type: z.enum(["image-to-video"]),
410
464
  imageUrl: z.string(),
411
- guidanceScale: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
412
- return undefined; if (Array.isArray(v))
413
- return v; if (typeof v === 'string')
414
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(1.8),
415
- motion: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
416
- return undefined; if (Array.isArray(v))
417
- return v; if (typeof v === 'string')
418
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))).default(127),
419
- }).strict();
465
+ guidanceScale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
466
+ return undefined; if (Array.isArray(v))
467
+ return v; if (typeof v === 'string') {
468
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
469
+ return v;
470
+ return Number(v);
471
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.8),
472
+ motion: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
473
+ return undefined; if (Array.isArray(v))
474
+ return v; if (typeof v === 'string') {
475
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
476
+ return v;
477
+ return Number(v);
478
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(127),
479
+ });
420
480
  export const shotstackImageToVideoOptionsSchema = shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
421
481
  /**
422
482
  * 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.
@@ -424,7 +484,7 @@ export const shotstackImageToVideoOptionsSchema = shotstackImageToVideoOptionsSh
424
484
  export const shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema = z.object({
425
485
  type: z.enum(["text-generator"]),
426
486
  prompt: z.string(),
427
- }).strict();
487
+ });
428
488
  export const shotstackTextGeneratorOptionsSchema = shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
429
489
  /**
430
490
  * 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.
@@ -432,15 +492,21 @@ export const shotstackTextGeneratorOptionsSchema = shotstackTextGeneratorOptions
432
492
  export const shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = z.object({
433
493
  type: z.enum(["text-to-image"]),
434
494
  prompt: z.string(),
435
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
436
- return undefined; if (Array.isArray(v))
437
- return v; if (typeof v === 'string')
438
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
439
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
440
- return undefined; if (Array.isArray(v))
441
- return v; if (typeof v === 'string')
442
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
443
- }).strict();
495
+ width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
496
+ return undefined; if (Array.isArray(v))
497
+ return v; if (typeof v === 'string') {
498
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
499
+ return v;
500
+ return Number(v);
501
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
502
+ height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
503
+ return undefined; if (Array.isArray(v))
504
+ return v; if (typeof v === 'string') {
505
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
506
+ return v;
507
+ return Number(v);
508
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
509
+ });
444
510
  export const shotstackTextToImageOptionsSchema = shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
445
511
  /**
446
512
  * 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.
@@ -539,16 +605,32 @@ export const shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema = z.
539
605
  "fi-FI",
540
606
  ])),
541
607
  newscaster: z.optional(z.boolean()).default(false),
542
- }).strict();
608
+ });
543
609
  export const shotstackTextToSpeechOptionsSchema = shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
544
610
  /**
545
611
  * Generate assets using the native Shotstack provider AI services.
546
612
  */
547
613
  export const shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema = z.union([
548
- shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema.extend({ type: z.literal("shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions") }).strict(),
549
- shotstackTextToImageOptionsShotstackTextToImageOptionsSchema.extend({ type: z.literal("shotstackTextToImageOptions_ShotstackTextToImageOptions") }).strict(),
550
- shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema.extend({ type: z.literal("shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions") }).strict(),
551
- shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema.extend({ type: z.literal("shotstackImageToVideoOptions_ShotstackImageToVideoOptions") }).strict(),
614
+ z
615
+ .object({
616
+ type: z.literal("shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions"),
617
+ })
618
+ .and(shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema),
619
+ z
620
+ .object({
621
+ type: z.literal("shotstackTextToImageOptions_ShotstackTextToImageOptions"),
622
+ })
623
+ .and(shotstackTextToImageOptionsShotstackTextToImageOptionsSchema),
624
+ z
625
+ .object({
626
+ type: z.literal("shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions"),
627
+ })
628
+ .and(shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema),
629
+ z
630
+ .object({
631
+ type: z.literal("shotstackImageToVideoOptions_ShotstackImageToVideoOptions"),
632
+ })
633
+ .and(shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema),
552
634
  ]);
553
635
  export const shotstackGeneratedAssetOptionsSchema = shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema;
554
636
  /**
@@ -557,7 +639,7 @@ export const shotstackGeneratedAssetOptionsSchema = shotstackGeneratedAssetOptio
557
639
  export const shotstackGeneratedAssetShotstackGeneratedAssetSchema = z.object({
558
640
  provider: z.enum(["shotstack"]),
559
641
  options: shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema,
560
- }).strict();
642
+ });
561
643
  export const shotstackGeneratedAssetSchema = shotstackGeneratedAssetShotstackGeneratedAssetSchema;
562
644
  /**
563
645
  * 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.
@@ -572,26 +654,41 @@ export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema =
572
654
  "stable-diffusion-512-v2-1",
573
655
  "stable-diffusion-xl-beta-v2-2-2",
574
656
  ])),
575
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
576
- return undefined; if (Array.isArray(v))
577
- return v; if (typeof v === 'string')
578
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
579
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
580
- return undefined; if (Array.isArray(v))
581
- return v; if (typeof v === 'string')
582
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
583
- steps: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
584
- return undefined; if (Array.isArray(v))
585
- return v; if (typeof v === 'string')
586
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))).default(30),
587
- seed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
588
- return undefined; if (Array.isArray(v))
589
- return v; if (typeof v === 'string')
590
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))).default(0),
591
- cfgScale: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
592
- return undefined; if (Array.isArray(v))
593
- return v; if (typeof v === 'string')
594
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(7),
657
+ width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
658
+ return undefined; if (Array.isArray(v))
659
+ return v; if (typeof v === 'string') {
660
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
661
+ return v;
662
+ return Number(v);
663
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
664
+ height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
665
+ return undefined; if (Array.isArray(v))
666
+ return v; if (typeof v === 'string') {
667
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
668
+ return v;
669
+ return Number(v);
670
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
671
+ steps: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
672
+ return undefined; if (Array.isArray(v))
673
+ return v; if (typeof v === 'string') {
674
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
675
+ return v;
676
+ return Number(v);
677
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(30),
678
+ seed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
679
+ return undefined; if (Array.isArray(v))
680
+ return v; if (typeof v === 'string') {
681
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
682
+ return v;
683
+ return Number(v);
684
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
685
+ cfgScale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
686
+ return undefined; if (Array.isArray(v))
687
+ return v; if (typeof v === 'string') {
688
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
689
+ return v;
690
+ return Number(v);
691
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(7),
595
692
  stylePreset: z.optional(z.enum([
596
693
  "3d-model",
597
694
  "analog-film",
@@ -611,7 +708,7 @@ export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema =
611
708
  "pixel-art",
612
709
  "tile-texture",
613
710
  ])),
614
- }).strict();
711
+ });
615
712
  export const stabilityAiTextToImageOptionsSchema = stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
616
713
  /**
617
714
  * Generate assets using Stability AI provider AI services.
@@ -620,7 +717,11 @@ export const stabilityAiTextToImageOptionsSchema = stabilityAiTextToImageOptions
620
717
  * <li><a href="#tocs_stabilityaitexttoimageoptions">StabilityAiTextToImageOptions</a></li>
621
718
  * </ul>
622
719
  */
623
- export const stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema.extend({ type: z.literal("stabilityAiTextToImageOptions_StabilityAiTextToImageOptions") }).strict();
720
+ export const stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = z
721
+ .object({
722
+ type: z.literal("stabilityAiTextToImageOptions_StabilityAiTextToImageOptions"),
723
+ })
724
+ .and(stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
624
725
  export const stabilityAiGeneratedAssetOptionsSchema = stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
625
726
  /**
626
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.
@@ -628,41 +729,77 @@ export const stabilityAiGeneratedAssetOptionsSchema = stabilityAiGeneratedAssetO
628
729
  export const stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema = z.object({
629
730
  provider: z.enum(["stability-ai"]),
630
731
  options: stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema,
631
- }).strict();
732
+ });
632
733
  export const stabilityAiGeneratedAssetSchema = stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
633
734
  /**
634
735
  * 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.
635
736
  */
636
737
  export const generatedAssetGeneratedAssetSchema = z.union([
637
- shotstackGeneratedAssetShotstackGeneratedAssetSchema.extend({ provider: z.literal("shotstackGeneratedAsset_ShotstackGeneratedAsset") }).strict(),
638
- didGeneratedAssetDidGeneratedAssetSchema.extend({ provider: z.literal("didGeneratedAsset_DIDGeneratedAsset") }).strict(),
639
- elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema.extend({ provider: z.literal("elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset") }).strict(),
640
- heygenGeneratedAssetHeyGenGeneratedAssetSchema.extend({ provider: z.literal("heygenGeneratedAsset_HeyGenGeneratedAsset") }).strict(),
641
- openaiGeneratedAssetOpenAiGeneratedAssetSchema.extend({ provider: z.literal("openaiGeneratedAsset_OpenAiGeneratedAsset") }).strict(),
642
- stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema.extend({ provider: z.literal("stabilityAiGeneratedAsset_StabilityAiGeneratedAsset") }).strict(),
738
+ z
739
+ .object({
740
+ provider: z.literal("shotstackGeneratedAsset_ShotstackGeneratedAsset"),
741
+ })
742
+ .and(shotstackGeneratedAssetShotstackGeneratedAssetSchema),
743
+ z
744
+ .object({
745
+ provider: z.literal("didGeneratedAsset_DIDGeneratedAsset"),
746
+ })
747
+ .and(didGeneratedAssetDidGeneratedAssetSchema),
748
+ z
749
+ .object({
750
+ provider: z.literal("elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset"),
751
+ })
752
+ .and(elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema),
753
+ z
754
+ .object({
755
+ provider: z.literal("heygenGeneratedAsset_HeyGenGeneratedAsset"),
756
+ })
757
+ .and(heygenGeneratedAssetHeyGenGeneratedAssetSchema),
758
+ z
759
+ .object({
760
+ provider: z.literal("openaiGeneratedAsset_OpenAiGeneratedAsset"),
761
+ })
762
+ .and(openaiGeneratedAssetOpenAiGeneratedAssetSchema),
763
+ z
764
+ .object({
765
+ provider: z.literal("stabilityAiGeneratedAsset_StabilityAiGeneratedAsset"),
766
+ })
767
+ .and(stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema),
643
768
  ]);
644
769
  export const generatedAssetSchema = generatedAssetGeneratedAssetSchema;
645
770
  /**
646
771
  * 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.
647
772
  */
648
773
  export const cropCropSchema = z.object({
649
- top: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
650
- return undefined; if (Array.isArray(v))
651
- return v; if (typeof v === 'string')
652
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))),
653
- bottom: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
654
- return undefined; if (Array.isArray(v))
655
- return v; if (typeof v === 'string')
656
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))),
657
- left: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
658
- return undefined; if (Array.isArray(v))
659
- return v; if (typeof v === 'string')
660
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))),
661
- right: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
662
- return undefined; if (Array.isArray(v))
663
- return v; if (typeof v === 'string')
664
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))),
665
- }).strict();
774
+ top: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
775
+ return undefined; if (Array.isArray(v))
776
+ return v; if (typeof v === 'string') {
777
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
778
+ return v;
779
+ return Number(v);
780
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
781
+ bottom: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
782
+ return undefined; if (Array.isArray(v))
783
+ return v; if (typeof v === 'string') {
784
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
785
+ return v;
786
+ return Number(v);
787
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
788
+ left: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
789
+ return undefined; if (Array.isArray(v))
790
+ return v; if (typeof v === 'string') {
791
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
792
+ return v;
793
+ return Number(v);
794
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
795
+ right: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
796
+ return undefined; if (Array.isArray(v))
797
+ return v; if (typeof v === 'string') {
798
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
799
+ return v;
800
+ return Number(v);
801
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
802
+ });
666
803
  export const cropSchema = cropCropSchema;
667
804
  /**
668
805
  * Pass additional options to control how files are stored in Google Cloud Storage.
@@ -671,7 +808,7 @@ export const googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOp
671
808
  bucket: z.string(),
672
809
  prefix: z.optional(z.string()),
673
810
  filename: z.optional(z.string()),
674
- }).strict();
811
+ });
675
812
  export const googleCloudStorageDestinationOptionsSchema = googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema;
676
813
  /**
677
814
  * 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.
@@ -679,7 +816,7 @@ export const googleCloudStorageDestinationOptionsSchema = googleCloudStorageDest
679
816
  export const googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = z.object({
680
817
  provider: z.literal("google-cloud-storage"),
681
818
  options: z.optional(googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema),
682
- }).strict();
819
+ });
683
820
  export const googleCloudStorageDestinationSchema = googleCloudStorageDestinationGoogleCloudStorageDestinationSchema;
684
821
  /**
685
822
  * Pass the folder ID and options to configure how assets are stored in Google Drive.
@@ -687,7 +824,7 @@ export const googleCloudStorageDestinationSchema = googleCloudStorageDestination
687
824
  export const googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = z.object({
688
825
  folderId: z.string(),
689
826
  filename: z.optional(z.string()),
690
- }).strict();
827
+ });
691
828
  export const googleDriveDestinationOptionsSchema = googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema;
692
829
  /**
693
830
  * 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.
@@ -695,7 +832,7 @@ export const googleDriveDestinationOptionsSchema = googleDriveDestinationOptions
695
832
  export const googleDriveDestinationGoogleDriveDestinationSchema = z.object({
696
833
  provider: z.literal("google-drive"),
697
834
  options: googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema,
698
- }).strict();
835
+ });
699
836
  export const googleDriveDestinationSchema = googleDriveDestinationGoogleDriveDestinationSchema;
700
837
  /**
701
838
  * Pass additional options to control how Mux processes video. Currently supports playback_policy and passthrough options.
@@ -703,7 +840,7 @@ export const googleDriveDestinationSchema = googleDriveDestinationGoogleDriveDes
703
840
  export const muxDestinationOptionsMuxDestinationOptionsSchema = z.object({
704
841
  playbackPolicy: z.optional(z.array(z.enum(["public", "signed"]))),
705
842
  passthrough: z.optional(z.string().max(255)),
706
- }).strict();
843
+ });
707
844
  export const muxDestinationOptionsSchema = muxDestinationOptionsMuxDestinationOptionsSchema;
708
845
  /**
709
846
  * 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.
@@ -711,7 +848,7 @@ export const muxDestinationOptionsSchema = muxDestinationOptionsMuxDestinationOp
711
848
  export const muxDestinationMuxDestinationSchema = z.object({
712
849
  provider: z.literal("mux"),
713
850
  options: z.optional(muxDestinationOptionsMuxDestinationOptionsSchema),
714
- }).strict();
851
+ });
715
852
  export const muxDestinationSchema = muxDestinationMuxDestinationSchema;
716
853
  /**
717
854
  * Pass additional options to control how files are stored in S3.
@@ -722,7 +859,7 @@ export const s3DestinationOptionsS3DestinationOptionsSchema = z.object({
722
859
  prefix: z.optional(z.string()),
723
860
  filename: z.optional(z.string()),
724
861
  acl: z.optional(z.string()),
725
- }).strict();
862
+ });
726
863
  export const s3DestinationOptionsSchema = s3DestinationOptionsS3DestinationOptionsSchema;
727
864
  /**
728
865
  * 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.
@@ -730,7 +867,7 @@ export const s3DestinationOptionsSchema = s3DestinationOptionsS3DestinationOptio
730
867
  export const s3DestinationS3DestinationSchema = z.object({
731
868
  provider: z.literal("s3"),
732
869
  options: z.optional(s3DestinationOptionsS3DestinationOptionsSchema),
733
- }).strict();
870
+ });
734
871
  export const s3DestinationSchema = s3DestinationS3DestinationSchema;
735
872
  /**
736
873
  * 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.
@@ -738,7 +875,7 @@ export const s3DestinationSchema = s3DestinationS3DestinationSchema;
738
875
  export const shotstackDestinationShotstackDestinationSchema = z.object({
739
876
  provider: z.literal("shotstack"),
740
877
  exclude: z.optional(z.boolean()),
741
- }).strict();
878
+ });
742
879
  export const shotstackDestinationSchema = shotstackDestinationShotstackDestinationSchema;
743
880
  /**
744
881
  * Pass additional options to control how TikTok publishes video.
@@ -749,14 +886,14 @@ export const tiktokDestinationOptionsTiktokDestinationOptionsSchema = z.object({
749
886
  disableDuet: z.optional(z.boolean()).default(false),
750
887
  disableStitch: z.optional(z.boolean()).default(false),
751
888
  disableComment: z.optional(z.boolean()).default(false),
752
- }).strict();
889
+ });
753
890
  /**
754
891
  * Send videos to TikTok. TikTok credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/tiktok), not in the request.
755
892
  */
756
893
  export const tiktokDestinationTiktokDestinationSchema = z.object({
757
894
  provider: z.literal("tiktok"),
758
895
  options: z.optional(tiktokDestinationOptionsTiktokDestinationOptionsSchema),
759
- }).strict();
896
+ });
760
897
  /**
761
898
  * Options to control the visibility of videos and privacy features.
762
899
  */
@@ -766,7 +903,7 @@ export const vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema
766
903
  comments: z.optional(z.enum(["anybody", "nobody", "contacts"])),
767
904
  download: z.optional(z.boolean()),
768
905
  add: z.optional(z.boolean()),
769
- }).strict();
906
+ });
770
907
  export const vimeoDestinationPrivacyOptionsSchema = vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema;
771
908
  /**
772
909
  * Pass additional options to control how Vimeo publishes video, including name, description and privacy settings.
@@ -776,7 +913,7 @@ export const vimeoDestinationOptionsVimeoDestinationOptionsSchema = z.object({
776
913
  description: z.optional(z.string()),
777
914
  privacy: z.optional(vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema),
778
915
  folderUri: z.optional(z.string()),
779
- }).strict();
916
+ });
780
917
  export const vimeoDestinationOptionsSchema = vimeoDestinationOptionsVimeoDestinationOptionsSchema;
781
918
  /**
782
919
  * 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.
@@ -784,7 +921,7 @@ export const vimeoDestinationOptionsSchema = vimeoDestinationOptionsVimeoDestina
784
921
  export const vimeoDestinationVimeoDestinationSchema = z.object({
785
922
  provider: z.literal("vimeo"),
786
923
  options: z.optional(vimeoDestinationOptionsVimeoDestinationOptionsSchema),
787
- }).strict();
924
+ });
788
925
  export const vimeoDestinationSchema = vimeoDestinationVimeoDestinationSchema;
789
926
  /**
790
927
  * A destination is a location where assets can be sent to for serving or hosting. Videos, images and audio files that are rendered by the [Edit API](#shotstack-edit) and [source](#tocs_source) and [rendition](#tocs_rendition) files generated by the [Ingest API](#shotstack-ingest) can be sent to destinations. You can also fetch a file from any public URL and [transfer](#transfer-asset) it to a destination. A file can be sent to one or more destinations including 3rd party destinations.
@@ -807,14 +944,14 @@ export const destinationsSchema = destinationsDestinationsSchema;
807
944
  export const fliptransformationFlipTransformationSchema = z.object({
808
945
  horizontal: z.optional(z.boolean()),
809
946
  vertical: z.optional(z.boolean()),
810
- }).strict();
947
+ });
811
948
  export const flipTransformationSchema = fliptransformationFlipTransformationSchema;
812
949
  /**
813
950
  * 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.
814
951
  */
815
952
  export const fontFontSchema = z.object({
816
953
  src: z.string(),
817
- }).strict();
954
+ });
818
955
  export const fontSchema = fontFontSchema;
819
956
  /**
820
957
  * **Notice: The HtmlAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
@@ -830,14 +967,20 @@ export const htmlassetHtmlAssetSchema = z.object({
830
967
  type: z.enum(["html"]),
831
968
  html: z.string(),
832
969
  css: z.optional(z.string()),
833
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
834
- return undefined; if (Array.isArray(v))
835
- return v; if (typeof v === 'string')
836
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
837
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
838
- return undefined; if (Array.isArray(v))
839
- return v; if (typeof v === 'string')
840
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
970
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
971
+ return undefined; if (Array.isArray(v))
972
+ return v; if (typeof v === 'string') {
973
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
974
+ return v;
975
+ return Number(v);
976
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
977
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
978
+ return undefined; if (Array.isArray(v))
979
+ return v; if (typeof v === 'string') {
980
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
981
+ return v;
982
+ return Number(v);
983
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
841
984
  background: z.optional(z.string()),
842
985
  position: z.optional(z.enum([
843
986
  "top",
@@ -850,16 +993,16 @@ export const htmlassetHtmlAssetSchema = z.object({
850
993
  "topLeft",
851
994
  "center",
852
995
  ])),
853
- }).strict();
996
+ });
854
997
  export const htmlAssetSchema = htmlassetHtmlAssetSchema;
855
998
  /**
856
999
  * 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.
857
1000
  */
858
1001
  export const imageassetImageAssetSchema = z.object({
859
1002
  type: z.enum(["image"]),
860
- src: z.string().regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").min(1).regex(/\S/),
1003
+ src: z.string().min(1).regex(/\S/),
861
1004
  crop: z.optional(cropCropSchema),
862
- }).strict();
1005
+ });
863
1006
  export const imageAssetSchema = imageassetImageAssetSchema;
864
1007
  /**
865
1008
  * The ImageToVideoAsset lets you create a video from an image and a text prompt.
@@ -869,12 +1012,15 @@ export const imagetovideoassetImageToVideoAssetSchema = z.object({
869
1012
  src: z.string().min(1),
870
1013
  prompt: z.optional(z.string()),
871
1014
  aspectRatio: z.optional(z.enum(["1:1", "4:3", "16:9", "9:16", "3:4", "21:9", "9:21"])),
872
- speed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
873
- return undefined; if (Array.isArray(v))
874
- return v; if (typeof v === 'string')
875
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))),
1015
+ speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1016
+ return undefined; if (Array.isArray(v))
1017
+ return v; if (typeof v === 'string') {
1018
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1019
+ return v;
1020
+ return Number(v);
1021
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
876
1022
  crop: z.optional(cropCropSchema),
877
- }).strict();
1023
+ });
878
1024
  export const imageToVideoAssetSchema = imagetovideoassetImageToVideoAssetSchema;
879
1025
  /**
880
1026
  * Options for the Dolby.io audio enhancement provider.
@@ -891,7 +1037,7 @@ export const dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = z.object({
891
1037
  "studio",
892
1038
  "voice_over",
893
1039
  ]),
894
- }).strict();
1040
+ });
895
1041
  export const dolbyEnhancementOptionsSchema = dolbyEnhancementOptionsDolbyEnhancementOptionsSchema;
896
1042
  /**
897
1043
  * 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.
@@ -899,7 +1045,7 @@ export const dolbyEnhancementOptionsSchema = dolbyEnhancementOptionsDolbyEnhance
899
1045
  export const dolbyEnhancementDolbyEnhancementSchema = z.object({
900
1046
  provider: z.string().default("dolby"),
901
1047
  options: dolbyEnhancementOptionsDolbyEnhancementOptionsSchema,
902
- }).strict();
1048
+ });
903
1049
  export const dolbyEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema;
904
1050
  /**
905
1051
  * An audio enhancement that can be applied to the audio content of a rendition.
@@ -907,14 +1053,18 @@ export const dolbyEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema;
907
1053
  * <li><a href="#tocs_dolbyenhancement">DolbyEnhancement</a></li>
908
1054
  * </ul>
909
1055
  */
910
- export const audioEnhancementAudioEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema.extend({ enhancement: z.literal("dolbyEnhancement_DolbyEnhancement") }).strict();
1056
+ export const audioEnhancementAudioEnhancementSchema = z
1057
+ .object({
1058
+ enhancement: z.literal("dolbyEnhancement_DolbyEnhancement"),
1059
+ })
1060
+ .and(dolbyEnhancementDolbyEnhancementSchema);
911
1061
  export const audioEnhancementSchema = audioEnhancementAudioEnhancementSchema;
912
1062
  /**
913
1063
  * Enhancements that can be applied to a rendition. Currently only supports the Dolby audio enhancement.
914
1064
  */
915
1065
  export const enhancementsEnhancementsSchema = z.object({
916
1066
  audio: z.optional(audioEnhancementAudioEnhancementSchema),
917
- }).strict();
1067
+ });
918
1068
  export const enhancementsSchema = enhancementsEnhancementsSchema;
919
1069
  /**
920
1070
  * Individual errors returned by the Ingest API.
@@ -923,14 +1073,14 @@ export const ingesterrorresponsedataIngestErrorResponseDataSchema = z.object({
923
1073
  status: z.string(),
924
1074
  title: z.string(),
925
1075
  detail: z.string(),
926
- }).strict();
1076
+ });
927
1077
  export const ingestErrorResponseDataSchema = ingesterrorresponsedataIngestErrorResponseDataSchema;
928
1078
  /**
929
1079
  * Error response data for validation and other errors returned by the Ingest API.
930
1080
  */
931
1081
  export const ingesterrorresponseIngestErrorResponseSchema = z.object({
932
1082
  errors: z.array(ingesterrorresponsedataIngestErrorResponseDataSchema),
933
- }).strict();
1083
+ });
934
1084
  export const ingestErrorResponseSchema = ingesterrorresponseIngestErrorResponseSchema;
935
1085
  /**
936
1086
  * The type of resource (a source) and the newly created source id. Returned with [QueuedSourceResponse](#tocs_queuedsourceresponse).
@@ -938,14 +1088,14 @@ export const ingestErrorResponseSchema = ingesterrorresponseIngestErrorResponseS
938
1088
  export const queuedsourceresponsedataQueuedSourceResponseDataSchema = z.object({
939
1089
  type: z.string(),
940
1090
  id: z.string(),
941
- }).strict();
1091
+ });
942
1092
  export const queuedSourceResponseDataSchema = queuedsourceresponsedataQueuedSourceResponseDataSchema;
943
1093
  /**
944
1094
  * 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.
945
1095
  */
946
1096
  export const queuedsourceresponseQueuedSourceResponseSchema = z.object({
947
1097
  data: queuedsourceresponsedataQueuedSourceResponseDataSchema,
948
- }).strict();
1098
+ });
949
1099
  export const queuedSourceResponseSchema = queuedsourceresponseQueuedSourceResponseSchema;
950
1100
  /**
951
1101
  * The id and attributes of the upload file including the signed URL to send the binary file data to.
@@ -954,7 +1104,7 @@ export const uploadresponseattributesUploadResponseAttributesSchema = z.object({
954
1104
  id: z.string(),
955
1105
  url: z.string(),
956
1106
  expires: z.string(),
957
- }).strict();
1107
+ });
958
1108
  export const uploadResponseAttributesSchema = uploadresponseattributesUploadResponseAttributesSchema;
959
1109
  /**
960
1110
  * The type of resource (an upload), it's id and attributes of the upload request.
@@ -963,76 +1113,91 @@ export const uploadresponsedataUploadResponseDataSchema = z.object({
963
1113
  type: z.string(),
964
1114
  id: z.string(),
965
1115
  attributes: uploadresponseattributesUploadResponseAttributesSchema,
966
- }).strict();
1116
+ });
967
1117
  export const uploadResponseDataSchema = uploadresponsedataUploadResponseDataSchema;
968
1118
  /**
969
1119
  * 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.
970
1120
  */
971
1121
  export const uploadresponseUploadResponseSchema = z.object({
972
1122
  data: uploadresponsedataUploadResponseDataSchema,
973
- }).strict();
1123
+ });
974
1124
  export const uploadResponseSchema = uploadresponseUploadResponseSchema;
975
1125
  /**
976
1126
  * 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.
977
1127
  */
978
1128
  export const speedSpeedSchema = z.object({
979
- speed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
980
- return undefined; if (Array.isArray(v))
981
- return v; if (typeof v === 'string')
982
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))),
1129
+ speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1130
+ return undefined; if (Array.isArray(v))
1131
+ return v; if (typeof v === 'string') {
1132
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1133
+ return v;
1134
+ return Number(v);
1135
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
983
1136
  preservePitch: z.optional(z.boolean()),
984
- }).strict();
1137
+ });
985
1138
  export const speedSchema = speedSpeedSchema;
986
1139
  /**
987
1140
  * Generate a transcription of the audio in the video. The transcription can be output as a file in SRT or VTT format.
988
1141
  */
989
1142
  export const transcriptionTranscriptionSchema = z.object({
990
1143
  format: z.optional(z.enum(["srt", "vtt"])),
991
- }).strict();
1144
+ });
992
1145
  export const transcriptionSchema = transcriptionTranscriptionSchema;
993
1146
  /**
994
1147
  * 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.
995
1148
  */
996
1149
  export const lumaassetLumaAssetSchema = z.object({
997
1150
  type: z.enum(["luma"]),
998
- src: z.string().regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").min(1).regex(/\S/),
999
- trim: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1000
- return undefined; if (Array.isArray(v))
1001
- return v; if (typeof v === 'string')
1002
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1003
- }).strict();
1151
+ src: z.string().min(1).regex(/\S/),
1152
+ trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1153
+ return undefined; if (Array.isArray(v))
1154
+ return v; if (typeof v === 'string') {
1155
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1156
+ return v;
1157
+ return Number(v);
1158
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1159
+ });
1004
1160
  export const lumaAssetSchema = lumaassetLumaAssetSchema;
1005
1161
  /**
1006
1162
  * 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.
1007
1163
  */
1008
1164
  export const mergefieldMergeFieldSchema = z.object({
1009
1165
  find: z.string(),
1010
- replace: z.union([z.string(), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()), z.boolean(), z.null(), z.record(z.string(), z.unknown()), z.array(z.unknown())]),
1011
- }).strict();
1166
+ replace: z.union([z.string(), z.number(), z.boolean(), z.null(), z.record(z.string(), z.unknown()), z.array(z.unknown())]),
1167
+ });
1012
1168
  export const mergeFieldSchema = mergefieldMergeFieldSchema;
1013
1169
  /**
1014
1170
  * 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.
1015
1171
  */
1016
1172
  export const posterPosterSchema = z.object({
1017
- capture: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1018
- return undefined; if (Array.isArray(v))
1019
- return v; if (typeof v === 'string')
1020
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
1021
- }).strict();
1173
+ capture: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1174
+ return undefined; if (Array.isArray(v))
1175
+ return v; if (typeof v === 'string') {
1176
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1177
+ return v;
1178
+ return Number(v);
1179
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1180
+ });
1022
1181
  export const posterSchema = posterPosterSchema;
1023
1182
  /**
1024
1183
  * 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.
1025
1184
  */
1026
1185
  export const rangeRangeSchema = z.object({
1027
- start: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1028
- return undefined; if (Array.isArray(v))
1029
- return v; if (typeof v === 'string')
1030
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))),
1031
- length: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1032
- return undefined; if (Array.isArray(v))
1033
- return v; if (typeof v === 'string')
1034
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))),
1035
- }).strict();
1186
+ start: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1187
+ return undefined; if (Array.isArray(v))
1188
+ return v; if (typeof v === 'string') {
1189
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1190
+ return v;
1191
+ return Number(v);
1192
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1193
+ length: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1194
+ return undefined; if (Array.isArray(v))
1195
+ return v; if (typeof v === 'string') {
1196
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1197
+ return v;
1198
+ return Number(v);
1199
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1200
+ });
1036
1201
  export const rangeSchema = rangeRangeSchema;
1037
1202
  /**
1038
1203
  * The list of asset attributes and their values.
@@ -1048,7 +1213,7 @@ export const assetresponseattributesAssetResponseAttributesSchema = z.object({
1048
1213
  status: z.enum(["importing", "ready", "failed", "deleted"]),
1049
1214
  created: z.optional(z.string()),
1050
1215
  updated: z.optional(z.string()),
1051
- }).strict();
1216
+ });
1052
1217
  export const assetResponseAttributesSchema = assetresponseattributesAssetResponseAttributesSchema;
1053
1218
  /**
1054
1219
  * The type of resource (an asset) and attributes of the asset.
@@ -1056,21 +1221,21 @@ export const assetResponseAttributesSchema = assetresponseattributesAssetRespons
1056
1221
  export const assetresponsedataAssetResponseDataSchema = z.object({
1057
1222
  type: z.string(),
1058
1223
  attributes: assetresponseattributesAssetResponseAttributesSchema,
1059
- }).strict();
1224
+ });
1060
1225
  export const assetResponseDataSchema = assetresponsedataAssetResponseDataSchema;
1061
1226
  /**
1062
1227
  * 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.
1063
1228
  */
1064
1229
  export const assetrenderresponseAssetRenderResponseSchema = z.object({
1065
1230
  data: z.array(assetresponsedataAssetResponseDataSchema),
1066
- }).strict();
1231
+ });
1067
1232
  export const assetRenderResponseSchema = assetrenderresponseAssetRenderResponseSchema;
1068
1233
  /**
1069
1234
  * 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.
1070
1235
  */
1071
1236
  export const assetresponseAssetResponseSchema = z.object({
1072
1237
  data: assetresponsedataAssetResponseDataSchema,
1073
- }).strict();
1238
+ });
1074
1239
  export const assetResponseSchema = assetresponseAssetResponseSchema;
1075
1240
  /**
1076
1241
  * The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
@@ -1079,7 +1244,7 @@ export const proberesponseProbeResponseSchema = z.object({
1079
1244
  success: z.boolean(),
1080
1245
  message: z.string(),
1081
1246
  response: z.record(z.string(), z.unknown()),
1082
- }).strict();
1247
+ });
1083
1248
  export const probeResponseSchema = proberesponseProbeResponseSchema;
1084
1249
  /**
1085
1250
  * The response data returned with the [QueuedResponse](#tocs_queuedresponse).
@@ -1087,7 +1252,7 @@ export const probeResponseSchema = proberesponseProbeResponseSchema;
1087
1252
  export const queuedresponsedataQueuedResponseDataSchema = z.object({
1088
1253
  message: z.string(),
1089
1254
  id: z.string(),
1090
- }).strict();
1255
+ });
1091
1256
  export const queuedResponseDataSchema = queuedresponsedataQueuedResponseDataSchema;
1092
1257
  /**
1093
1258
  * 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.
@@ -1096,7 +1261,7 @@ export const queuedresponseQueuedResponseSchema = z.object({
1096
1261
  success: z.boolean(),
1097
1262
  message: z.string(),
1098
1263
  response: queuedresponsedataQueuedResponseDataSchema,
1099
- }).strict();
1264
+ });
1100
1265
  export const queuedResponseSchema = queuedresponseQueuedResponseSchema;
1101
1266
  /**
1102
1267
  * The individual template item returned with the [TemplateListResponseData](#tocs_templatelistresponsedata) templates list.
@@ -1106,7 +1271,7 @@ export const templatelistresponseitemTemplateListResponseItemSchema = z.object({
1106
1271
  name: z.string(),
1107
1272
  created: z.optional(z.string()),
1108
1273
  updated: z.optional(z.string()),
1109
- }).strict();
1274
+ });
1110
1275
  export const templateListResponseItemSchema = templatelistresponseitemTemplateListResponseItemSchema;
1111
1276
  /**
1112
1277
  * The response data returned with the [TemplateListResponse](#tocs_templatelistresponse).
@@ -1114,7 +1279,7 @@ export const templateListResponseItemSchema = templatelistresponseitemTemplateLi
1114
1279
  export const templatelistresponsedataTemplateListResponseDataSchema = z.object({
1115
1280
  owner: z.string(),
1116
1281
  templates: z.array(templatelistresponseitemTemplateListResponseItemSchema),
1117
- }).strict();
1282
+ });
1118
1283
  export const templateListResponseDataSchema = templatelistresponsedataTemplateListResponseDataSchema;
1119
1284
  /**
1120
1285
  * A list of previously saved templates.
@@ -1123,7 +1288,7 @@ export const templatelistresponseTemplateListResponseSchema = z.object({
1123
1288
  success: z.boolean(),
1124
1289
  message: z.string(),
1125
1290
  response: templatelistresponsedataTemplateListResponseDataSchema,
1126
- }).strict();
1291
+ });
1127
1292
  export const templateListResponseSchema = templatelistresponseTemplateListResponseSchema;
1128
1293
  /**
1129
1294
  * The response data returned with the [TemplateResponse](#tocs_templateresponse).
@@ -1131,7 +1296,7 @@ export const templateListResponseSchema = templatelistresponseTemplateListRespon
1131
1296
  export const templateresponsedataTemplateResponseDataSchema = z.object({
1132
1297
  message: z.string(),
1133
1298
  id: z.string(),
1134
- }).strict();
1299
+ });
1135
1300
  export const templateResponseDataSchema = templateresponsedataTemplateResponseDataSchema;
1136
1301
  /**
1137
1302
  * The response received after a [template](#create-template) is submitted. The template is saved and a unique template id is returned.
@@ -1140,7 +1305,7 @@ export const templateresponseTemplateResponseSchema = z.object({
1140
1305
  success: z.boolean(),
1141
1306
  message: z.string(),
1142
1307
  response: templateresponsedataTemplateResponseDataSchema,
1143
- }).strict();
1308
+ });
1144
1309
  export const templateResponseSchema = templateresponseTemplateResponseSchema;
1145
1310
  /**
1146
1311
  * Text alignment properties (horizontal and vertical).
@@ -1148,7 +1313,7 @@ export const templateResponseSchema = templateresponseTemplateResponseSchema;
1148
1313
  export const richtextpropertiesRichTextAlignmentSchema = z.object({
1149
1314
  horizontal: z.optional(z.enum(["left", "center", "right"])),
1150
1315
  vertical: z.optional(z.enum(["top", "middle", "bottom"])),
1151
- }).strict();
1316
+ });
1152
1317
  export const richTextAlignmentSchema = richtextpropertiesRichTextAlignmentSchema;
1153
1318
  /**
1154
1319
  * Animation properties for text entrance effects.
@@ -1162,161 +1327,227 @@ export const richtextpropertiesRichTextAnimationSchema = z.object({
1162
1327
  "shift",
1163
1328
  "movingLetters",
1164
1329
  ]),
1165
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1166
- return undefined; if (Array.isArray(v))
1167
- return v; if (typeof v === 'string')
1168
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0.1).lte(30)))),
1330
+ duration: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1331
+ return undefined; if (Array.isArray(v))
1332
+ return v; if (typeof v === 'string') {
1333
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1334
+ return v;
1335
+ return Number(v);
1336
+ } return v; }), z.number().gte(0.1).lte(30)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1169
1337
  style: z.optional(z.enum(["character", "word"])),
1170
1338
  direction: z.optional(z.enum(["left", "right", "up", "down"])),
1171
- }).strict();
1339
+ });
1172
1340
  export const richTextAnimationSchema = richtextpropertiesRichTextAnimationSchema;
1173
1341
  /**
1174
1342
  * Background styling properties for the text bounding box.
1175
1343
  */
1176
1344
  export const richtextpropertiesRichTextBackgroundSchema = z.object({
1177
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
1178
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1179
- return undefined; if (Array.isArray(v))
1180
- return v; if (typeof v === 'string')
1181
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1182
- borderRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1183
- return undefined; if (Array.isArray(v))
1184
- return v; if (typeof v === 'string')
1185
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1186
- }).strict();
1345
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1346
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1347
+ return undefined; if (Array.isArray(v))
1348
+ return v; if (typeof v === 'string') {
1349
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1350
+ return v;
1351
+ return Number(v);
1352
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1353
+ borderRadius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1354
+ return undefined; if (Array.isArray(v))
1355
+ return v; if (typeof v === 'string') {
1356
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1357
+ return v;
1358
+ return Number(v);
1359
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1360
+ });
1187
1361
  export const richTextBackgroundSchema = richtextpropertiesRichTextBackgroundSchema;
1188
1362
  /**
1189
1363
  * Border styling properties for the text bounding box.
1190
1364
  */
1191
1365
  export const richtextpropertiesRichTextBorderSchema = z.object({
1192
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1193
- return undefined; if (Array.isArray(v))
1194
- return v; if (typeof v === 'string')
1195
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1196
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1197
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1198
- return undefined; if (Array.isArray(v))
1199
- return v; if (typeof v === 'string')
1200
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1201
- radius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1202
- return undefined; if (Array.isArray(v))
1203
- return v; if (typeof v === 'string')
1204
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1205
- }).strict();
1366
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1367
+ return undefined; if (Array.isArray(v))
1368
+ return v; if (typeof v === 'string') {
1369
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1370
+ return v;
1371
+ return Number(v);
1372
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1373
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
1374
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1375
+ return undefined; if (Array.isArray(v))
1376
+ return v; if (typeof v === 'string') {
1377
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1378
+ return v;
1379
+ return Number(v);
1380
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1381
+ radius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1382
+ return undefined; if (Array.isArray(v))
1383
+ return v; if (typeof v === 'string') {
1384
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1385
+ return v;
1386
+ return Number(v);
1387
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1388
+ });
1206
1389
  /**
1207
1390
  * Gradient properties for text fill.
1208
1391
  */
1209
1392
  export const richtextpropertiesRichTextGradientSchema = z.object({
1210
1393
  type: z.optional(z.enum(["linear", "radial"])),
1211
- angle: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1212
- return undefined; if (Array.isArray(v))
1213
- return v; if (typeof v === 'string')
1214
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(360)))).default(0),
1394
+ angle: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1395
+ return undefined; if (Array.isArray(v))
1396
+ return v; if (typeof v === 'string') {
1397
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1398
+ return v;
1399
+ return Number(v);
1400
+ } return v; }), z.number().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1215
1401
  stops: z
1216
1402
  .array(z.object({
1217
- offset: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1218
- return undefined; if (Array.isArray(v))
1219
- return v; if (typeof v === 'string')
1220
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))),
1221
- color: z.string().regex(/^#[A-Fa-f0-9]{6}$/),
1403
+ offset: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1404
+ return undefined; if (Array.isArray(v))
1405
+ return v; if (typeof v === 'string') {
1406
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1407
+ return v;
1408
+ return Number(v);
1409
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1410
+ color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1222
1411
  }))
1223
1412
  .min(2),
1224
- }).strict();
1413
+ });
1225
1414
  export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
1226
1415
  /**
1227
1416
  * Padding properties for individual sides of the text bounding box.
1228
1417
  */
1229
1418
  export const richtextpropertiesRichTextPaddingSchema = z.object({
1230
- top: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1231
- return undefined; if (Array.isArray(v))
1232
- return v; if (typeof v === 'string')
1233
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1234
- right: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1235
- return undefined; if (Array.isArray(v))
1236
- return v; if (typeof v === 'string')
1237
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1238
- bottom: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1239
- return undefined; if (Array.isArray(v))
1240
- return v; if (typeof v === 'string')
1241
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1242
- left: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1243
- return undefined; if (Array.isArray(v))
1244
- return v; if (typeof v === 'string')
1245
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1246
- }).strict();
1419
+ top: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1420
+ return undefined; if (Array.isArray(v))
1421
+ return v; if (typeof v === 'string') {
1422
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1423
+ return v;
1424
+ return Number(v);
1425
+ } 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) => { if (v === '' || v === null || v === undefined)
1427
+ return undefined; if (Array.isArray(v))
1428
+ return v; if (typeof v === 'string') {
1429
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1430
+ return v;
1431
+ return Number(v);
1432
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1433
+ bottom: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1434
+ return undefined; if (Array.isArray(v))
1435
+ return v; if (typeof v === 'string') {
1436
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1437
+ return v;
1438
+ return Number(v);
1439
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1440
+ left: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1441
+ return undefined; if (Array.isArray(v))
1442
+ return v; if (typeof v === 'string') {
1443
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1444
+ return v;
1445
+ return Number(v);
1446
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1447
+ });
1247
1448
  /**
1248
1449
  * Text shadow properties.
1249
1450
  */
1250
1451
  export const richtextpropertiesRichTextShadowSchema = z.object({
1251
- offsetX: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1252
- return undefined; if (Array.isArray(v))
1253
- return v; if (typeof v === 'string')
1254
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1255
- offsetY: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1256
- return undefined; if (Array.isArray(v))
1257
- return v; if (typeof v === 'string')
1258
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1259
- blur: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1260
- return undefined; if (Array.isArray(v))
1261
- return v; if (typeof v === 'string')
1262
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1263
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1264
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1265
- return undefined; if (Array.isArray(v))
1266
- return v; if (typeof v === 'string')
1267
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(0.5),
1268
- }).strict();
1452
+ offsetX: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1453
+ return undefined; if (Array.isArray(v))
1454
+ return v; if (typeof v === 'string') {
1455
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1456
+ return v;
1457
+ return Number(v);
1458
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1459
+ offsetY: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1460
+ return undefined; if (Array.isArray(v))
1461
+ return v; if (typeof v === 'string') {
1462
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1463
+ return v;
1464
+ return Number(v);
1465
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1466
+ blur: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1467
+ return undefined; if (Array.isArray(v))
1468
+ return v; if (typeof v === 'string') {
1469
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1470
+ return v;
1471
+ return Number(v);
1472
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
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) => { if (v === '' || v === null || v === undefined)
1475
+ return undefined; if (Array.isArray(v))
1476
+ return v; if (typeof v === 'string') {
1477
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1478
+ return v;
1479
+ return Number(v);
1480
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
1481
+ });
1269
1482
  export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
1270
1483
  /**
1271
1484
  * Text stroke (outline) properties.
1272
1485
  */
1273
1486
  export const richtextpropertiesRichTextStrokeSchema = z.object({
1274
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1275
- return undefined; if (Array.isArray(v))
1276
- return v; if (typeof v === 'string')
1277
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1278
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1279
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1280
- return undefined; if (Array.isArray(v))
1281
- return v; if (typeof v === 'string')
1282
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1283
- }).strict();
1487
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1488
+ return undefined; if (Array.isArray(v))
1489
+ return v; if (typeof v === 'string') {
1490
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1491
+ return v;
1492
+ return Number(v);
1493
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1494
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
1495
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1496
+ return undefined; if (Array.isArray(v))
1497
+ return v; if (typeof v === 'string') {
1498
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1499
+ return v;
1500
+ return Number(v);
1501
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1502
+ });
1284
1503
  export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
1285
1504
  /**
1286
1505
  * Font properties for rich text.
1287
1506
  */
1288
1507
  export const richtextpropertiesRichTextFontSchema = z.object({
1289
1508
  family: z.optional(z.string()).default("Open Sans"),
1290
- size: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1291
- return undefined; if (Array.isArray(v))
1292
- return v; if (typeof v === 'string')
1293
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(500)))).default(24),
1509
+ size: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1510
+ return undefined; if (Array.isArray(v))
1511
+ return v; if (typeof v === 'string') {
1512
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1513
+ return v;
1514
+ return Number(v);
1515
+ } return v; }), z.number().int().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(24),
1294
1516
  weight: z.optional(z.unknown()).default("400"),
1295
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#ffffff"),
1296
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1297
- return undefined; if (Array.isArray(v))
1298
- return v; if (typeof v === 'string')
1299
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1300
- background: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
1517
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#ffffff"),
1518
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1519
+ return undefined; if (Array.isArray(v))
1520
+ return v; if (typeof v === 'string') {
1521
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1522
+ return v;
1523
+ return Number(v);
1524
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1525
+ background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1301
1526
  stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1302
- }).strict();
1527
+ });
1303
1528
  export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
1304
1529
  /**
1305
1530
  * Text style properties including spacing, line height, and transformations.
1306
1531
  */
1307
1532
  export const richtextpropertiesRichTextStyleSchema = z.object({
1308
- letterSpacing: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1309
- return undefined; if (Array.isArray(v))
1310
- return v; if (typeof v === 'string')
1311
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1312
- lineHeight: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1313
- return undefined; if (Array.isArray(v))
1314
- return v; if (typeof v === 'string')
1315
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))).default(1.2),
1533
+ letterSpacing: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1534
+ return undefined; if (Array.isArray(v))
1535
+ return v; if (typeof v === 'string') {
1536
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1537
+ return v;
1538
+ return Number(v);
1539
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1540
+ lineHeight: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1541
+ return undefined; if (Array.isArray(v))
1542
+ return v; if (typeof v === 'string') {
1543
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1544
+ return v;
1545
+ return Number(v);
1546
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.2),
1316
1547
  textTransform: z.optional(z.enum(["none", "uppercase", "lowercase", "capitalize"])),
1317
1548
  textDecoration: z.optional(z.enum(["none", "underline", "line-through"])),
1318
1549
  gradient: z.optional(richtextpropertiesRichTextGradientSchema),
1319
- }).strict();
1550
+ });
1320
1551
  export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
1321
1552
  /**
1322
1553
  * The RichTextAsset provides advanced text rendering with support for custom fonts, gradients, shadows, strokes,
@@ -1332,13 +1563,16 @@ export const richtextassetRichTextAssetSchema = z.object({
1332
1563
  shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1333
1564
  background: z.optional(richtextpropertiesRichTextBackgroundSchema),
1334
1565
  border: z.optional(richtextpropertiesRichTextBorderSchema),
1335
- padding: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1336
- return undefined; if (Array.isArray(v))
1337
- return v; if (typeof v === 'string')
1338
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0))), richtextpropertiesRichTextPaddingSchema])),
1566
+ padding: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1567
+ return undefined; if (Array.isArray(v))
1568
+ return v; if (typeof v === 'string') {
1569
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1570
+ return v;
1571
+ return Number(v);
1572
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), richtextpropertiesRichTextPaddingSchema])),
1339
1573
  align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1340
1574
  animation: z.optional(richtextpropertiesRichTextAnimationSchema),
1341
- }).strict();
1575
+ });
1342
1576
  export const richTextAssetSchema = richtextassetRichTextAssetSchema;
1343
1577
  /**
1344
1578
  * The transfer request attributes inlcudling the user specified ID and status. Returned with [TransferResponseData](#tocs_transferresponsedata).
@@ -1348,7 +1582,7 @@ export const transferresponseattributesTransferResponseAttributesSchema = z.obje
1348
1582
  owner: z.optional(z.string()),
1349
1583
  status: z.optional(z.enum(["queued", "failed"])),
1350
1584
  created: z.optional(z.string()),
1351
- }).strict();
1585
+ });
1352
1586
  export const transferResponseAttributesSchema = transferresponseattributesTransferResponseAttributesSchema;
1353
1587
  /**
1354
1588
  * The type of resource (an asset) and the transfer attributes. Returned with [TransferResponse](#tocs_transferresponse).
@@ -1356,14 +1590,14 @@ export const transferResponseAttributesSchema = transferresponseattributesTransf
1356
1590
  export const transferresponsedataTransferResponseDataSchema = z.object({
1357
1591
  type: z.optional(z.string()),
1358
1592
  attributes: z.optional(transferresponseattributesTransferResponseAttributesSchema),
1359
- }).strict();
1593
+ });
1360
1594
  export const transferResponseDataSchema = transferresponsedataTransferResponseDataSchema;
1361
1595
  /**
1362
1596
  * 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.
1363
1597
  */
1364
1598
  export const transferresponseTransferResponseSchema = z.object({
1365
1599
  data: transferresponsedataTransferResponseDataSchema,
1366
- }).strict();
1600
+ });
1367
1601
  export const transferResponseSchema = transferresponseTransferResponseSchema;
1368
1602
  /**
1369
1603
  * The asset URL to fetch and transfer to a destination.
@@ -1372,7 +1606,7 @@ export const transferTransferSchema = z.object({
1372
1606
  url: z.string(),
1373
1607
  id: z.string(),
1374
1608
  destinations: z.array(destinationsDestinationsSchema),
1375
- }).strict();
1609
+ });
1376
1610
  export const transferSchema = transferTransferSchema;
1377
1611
  /**
1378
1612
  * The ShapeAsset is used to add shapes to a video. The shape can be styled with a fill and a stroke.
@@ -1382,73 +1616,109 @@ export const transferSchema = transferTransferSchema;
1382
1616
  export const shapeassetShapeAssetSchema = z.object({
1383
1617
  type: z.enum(["shape"]),
1384
1618
  shape: z.enum(["rectangle", "circle", "line"]),
1385
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1386
- return undefined; if (Array.isArray(v))
1387
- return v; if (typeof v === 'string')
1388
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1389
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1390
- return undefined; if (Array.isArray(v))
1391
- return v; if (typeof v === 'string')
1392
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1619
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1620
+ return undefined; if (Array.isArray(v))
1621
+ return v; if (typeof v === 'string') {
1622
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1623
+ return v;
1624
+ return Number(v);
1625
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1626
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1627
+ return undefined; if (Array.isArray(v))
1628
+ return v; if (typeof v === 'string') {
1629
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1630
+ return v;
1631
+ return Number(v);
1632
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1393
1633
  fill: z.optional(z.object({
1394
1634
  color: z.optional(z.string()),
1395
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1396
- return undefined; if (Array.isArray(v))
1397
- return v; if (typeof v === 'string')
1398
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1635
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1636
+ return undefined; if (Array.isArray(v))
1637
+ return v; if (typeof v === 'string') {
1638
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1639
+ return v;
1640
+ return Number(v);
1641
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1399
1642
  })),
1400
1643
  stroke: z.optional(z.object({
1401
1644
  color: z.optional(z.string()),
1402
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1403
- return undefined; if (Array.isArray(v))
1404
- return v; if (typeof v === 'string')
1405
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1645
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1646
+ return undefined; if (Array.isArray(v))
1647
+ return v; if (typeof v === 'string') {
1648
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1649
+ return v;
1650
+ return Number(v);
1651
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1406
1652
  })),
1407
1653
  rectangle: z.optional(z.object({
1408
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1409
- return undefined; if (Array.isArray(v))
1410
- return v; if (typeof v === 'string')
1411
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
1412
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1413
- return undefined; if (Array.isArray(v))
1414
- return v; if (typeof v === 'string')
1415
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
1416
- cornerRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1417
- return undefined; if (Array.isArray(v))
1418
- return v; if (typeof v === 'string')
1419
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1654
+ width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1655
+ return undefined; if (Array.isArray(v))
1656
+ return v; if (typeof v === 'string') {
1657
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1658
+ return v;
1659
+ return Number(v);
1660
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1661
+ height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1662
+ return undefined; if (Array.isArray(v))
1663
+ return v; if (typeof v === 'string') {
1664
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1665
+ return v;
1666
+ return Number(v);
1667
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1668
+ cornerRadius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1669
+ return undefined; if (Array.isArray(v))
1670
+ return v; if (typeof v === 'string') {
1671
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1672
+ return v;
1673
+ return Number(v);
1674
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1420
1675
  })),
1421
1676
  circle: z.optional(z.object({
1422
- radius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1423
- return undefined; if (Array.isArray(v))
1424
- return v; if (typeof v === 'string')
1425
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
1677
+ radius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1678
+ return undefined; if (Array.isArray(v))
1679
+ return v; if (typeof v === 'string') {
1680
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1681
+ return v;
1682
+ return Number(v);
1683
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1426
1684
  })),
1427
1685
  line: z.optional(z.object({
1428
- length: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1429
- return undefined; if (Array.isArray(v))
1430
- return v; if (typeof v === 'string')
1431
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
1432
- thickness: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1433
- return undefined; if (Array.isArray(v))
1434
- return v; if (typeof v === 'string')
1435
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
1686
+ length: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1687
+ return undefined; if (Array.isArray(v))
1688
+ return v; if (typeof v === 'string') {
1689
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1690
+ return v;
1691
+ return Number(v);
1692
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1693
+ thickness: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1694
+ return undefined; if (Array.isArray(v))
1695
+ return v; if (typeof v === 'string') {
1696
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1697
+ return v;
1698
+ return Number(v);
1699
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1436
1700
  })),
1437
- }).strict();
1701
+ });
1438
1702
  export const shapeAssetSchema = shapeassetShapeAssetSchema;
1439
1703
  /**
1440
1704
  * 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.
1441
1705
  */
1442
1706
  export const sizeSizeSchema = z.object({
1443
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1444
- return undefined; if (Array.isArray(v))
1445
- return v; if (typeof v === 'string')
1446
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(4096)))),
1447
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1448
- return undefined; if (Array.isArray(v))
1449
- return v; if (typeof v === 'string')
1450
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(4096)))),
1451
- }).strict();
1707
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1708
+ return undefined; if (Array.isArray(v))
1709
+ return v; if (typeof v === 'string') {
1710
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1711
+ return v;
1712
+ return Number(v);
1713
+ } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1714
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1715
+ return undefined; if (Array.isArray(v))
1716
+ return v; if (typeof v === 'string') {
1717
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1718
+ return v;
1719
+ return Number(v);
1720
+ } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1721
+ });
1452
1722
  export const sizeSchema = sizeSizeSchema;
1453
1723
  /**
1454
1724
  * 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...
@@ -1474,10 +1744,13 @@ export const renditionRenditionSchema = z.object({
1474
1744
  size: z.optional(sizeSizeSchema),
1475
1745
  fit: z.optional(z.enum(["cover", "contain", "crop"])),
1476
1746
  resolution: z.optional(z.enum(["preview", "mobile", "sd", "hd", "fhd"])),
1477
- quality: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1478
- return undefined; if (Array.isArray(v))
1479
- return v; if (typeof v === 'string')
1480
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(100)))),
1747
+ quality: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1748
+ return undefined; if (Array.isArray(v))
1749
+ return v; if (typeof v === 'string') {
1750
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1751
+ return v;
1752
+ return Number(v);
1753
+ } return v; }), z.number().int().gte(1).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1481
1754
  fps: z.optional(z.union([
1482
1755
  z.literal(12),
1483
1756
  z.literal(15),
@@ -1492,15 +1765,18 @@ export const renditionRenditionSchema = z.object({
1492
1765
  z.literal(60),
1493
1766
  ])),
1494
1767
  speed: z.optional(speedSpeedSchema),
1495
- keyframeInterval: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1496
- return undefined; if (Array.isArray(v))
1497
- return v; if (typeof v === 'string')
1498
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(300)))),
1768
+ keyframeInterval: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1769
+ return undefined; if (Array.isArray(v))
1770
+ return v; if (typeof v === 'string') {
1771
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1772
+ return v;
1773
+ return Number(v);
1774
+ } return v; }), z.number().int().gte(1).lte(300)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1499
1775
  fixOffset: z.optional(z.boolean()),
1500
1776
  fixRotation: z.optional(z.boolean()),
1501
1777
  enhance: z.optional(enhancementsEnhancementsSchema),
1502
1778
  filename: z.optional(z.string()),
1503
- }).strict();
1779
+ });
1504
1780
  export const renditionSchema = renditionRenditionSchema;
1505
1781
  /**
1506
1782
  * The output renditions and transformations that should be generated from the source file.
@@ -1508,7 +1784,7 @@ export const renditionSchema = renditionRenditionSchema;
1508
1784
  export const outputsOutputsSchema = z.object({
1509
1785
  renditions: z.optional(z.array(renditionRenditionSchema)),
1510
1786
  transcription: z.optional(transcriptionTranscriptionSchema),
1511
- }).strict();
1787
+ });
1512
1788
  export const outputsSchema = outputsOutputsSchema;
1513
1789
  /**
1514
1790
  * The id and attributes of the generated rendition file.
@@ -1524,35 +1800,50 @@ export const renditionresponseattributesRenditionResponseAttributesSchema = z.ob
1524
1800
  "overwritten",
1525
1801
  ])),
1526
1802
  url: z.optional(z.string()),
1527
- executionTime: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1528
- return undefined; if (Array.isArray(v))
1529
- return v; if (typeof v === 'string')
1530
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1803
+ executionTime: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1804
+ return undefined; if (Array.isArray(v))
1805
+ return v; if (typeof v === 'string') {
1806
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1807
+ return v;
1808
+ return Number(v);
1809
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1531
1810
  transformation: z.optional(renditionRenditionSchema),
1532
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1533
- return undefined; if (Array.isArray(v))
1534
- return v; if (typeof v === 'string')
1535
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1536
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1537
- return undefined; if (Array.isArray(v))
1538
- return v; if (typeof v === 'string')
1539
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1540
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1541
- return undefined; if (Array.isArray(v))
1542
- return v; if (typeof v === 'string')
1543
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1544
- fps: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1545
- return undefined; if (Array.isArray(v))
1546
- return v; if (typeof v === 'string')
1547
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1548
- }).strict();
1811
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1812
+ return undefined; if (Array.isArray(v))
1813
+ return v; if (typeof v === 'string') {
1814
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1815
+ return v;
1816
+ return Number(v);
1817
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1818
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1819
+ return undefined; if (Array.isArray(v))
1820
+ return v; if (typeof v === 'string') {
1821
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1822
+ return v;
1823
+ return Number(v);
1824
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1825
+ duration: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1826
+ return undefined; if (Array.isArray(v))
1827
+ return v; if (typeof v === 'string') {
1828
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1829
+ return v;
1830
+ return Number(v);
1831
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1832
+ fps: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1833
+ return undefined; if (Array.isArray(v))
1834
+ return v; if (typeof v === 'string') {
1835
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1836
+ return v;
1837
+ return Number(v);
1838
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1839
+ });
1549
1840
  export const renditionResponseAttributesSchema = renditionresponseattributesRenditionResponseAttributesSchema;
1550
1841
  /**
1551
1842
  * The list of outputs generated from the source file. Currently supports renditions which are versions of the source file with different transformations applied.
1552
1843
  */
1553
1844
  export const outputsresponseOutputsResponseSchema = z.object({
1554
1845
  renditions: z.optional(z.array(renditionresponseattributesRenditionResponseAttributesSchema)),
1555
- }).strict();
1846
+ });
1556
1847
  export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
1557
1848
  /**
1558
1849
  * The id and attributes of the source file.
@@ -1571,25 +1862,37 @@ export const sourceresponseattributesSourceResponseAttributesSchema = z.object({
1571
1862
  "overwritten",
1572
1863
  ])),
1573
1864
  outputs: z.optional(outputsresponseOutputsResponseSchema),
1574
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1575
- return undefined; if (Array.isArray(v))
1576
- return v; if (typeof v === 'string')
1577
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1578
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1579
- return undefined; if (Array.isArray(v))
1580
- return v; if (typeof v === 'string')
1581
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1582
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1583
- return undefined; if (Array.isArray(v))
1584
- return v; if (typeof v === 'string')
1585
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1586
- fps: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1587
- return undefined; if (Array.isArray(v))
1588
- return v; if (typeof v === 'string')
1589
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1865
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1866
+ return undefined; if (Array.isArray(v))
1867
+ return v; if (typeof v === 'string') {
1868
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1869
+ return v;
1870
+ return Number(v);
1871
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1872
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1873
+ return undefined; if (Array.isArray(v))
1874
+ return v; if (typeof v === 'string') {
1875
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1876
+ return v;
1877
+ return Number(v);
1878
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1879
+ duration: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1880
+ return undefined; if (Array.isArray(v))
1881
+ return v; if (typeof v === 'string') {
1882
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1883
+ return v;
1884
+ return Number(v);
1885
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1886
+ fps: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1887
+ return undefined; if (Array.isArray(v))
1888
+ return v; if (typeof v === 'string') {
1889
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1890
+ return v;
1891
+ return Number(v);
1892
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1590
1893
  created: z.optional(z.string()),
1591
1894
  updated: z.optional(z.string()),
1592
- }).strict();
1895
+ });
1593
1896
  export const sourceResponseAttributesSchema = sourceresponseattributesSourceResponseAttributesSchema;
1594
1897
  /**
1595
1898
  * The type of resource (a source), it's id and attributes of the source file.
@@ -1598,21 +1901,21 @@ export const sourceresponsedataSourceResponseDataSchema = z.object({
1598
1901
  type: z.string(),
1599
1902
  id: z.string(),
1600
1903
  attributes: sourceresponseattributesSourceResponseAttributesSchema,
1601
- }).strict();
1904
+ });
1602
1905
  export const sourceResponseDataSchema = sourceresponsedataSourceResponseDataSchema;
1603
1906
  /**
1604
1907
  * A list of all ingested source files fetched or uploaded to a users account.
1605
1908
  */
1606
1909
  export const sourcelistresponseSourceListResponseSchema = z.object({
1607
1910
  data: z.array(sourceresponsedataSourceResponseDataSchema),
1608
- }).strict();
1911
+ });
1609
1912
  export const sourceListResponseSchema = sourcelistresponseSourceListResponseSchema;
1610
1913
  /**
1611
1914
  * 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.
1612
1915
  */
1613
1916
  export const sourceresponseSourceResponseSchema = z.object({
1614
1917
  data: sourceresponsedataSourceResponseDataSchema,
1615
- }).strict();
1918
+ });
1616
1919
  export const sourceResponseSchema = sourceresponseSourceResponseSchema;
1617
1920
  /**
1618
1921
  * The details of the file to be ingested and any transformations to be applied. Once the source file has been ingested, new renditions can be created from it. The renditions are specified in the **outputs** property.
@@ -1623,7 +1926,7 @@ export const sourceSourceSchema = z.object({
1623
1926
  outputs: z.optional(outputsOutputsSchema),
1624
1927
  destinations: z.optional(destinationsDestinationsSchema),
1625
1928
  callback: z.optional(z.string()),
1626
- }).strict();
1929
+ });
1627
1930
  export const sourceSchema = sourceSourceSchema;
1628
1931
  /**
1629
1932
  * 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.
@@ -1631,11 +1934,14 @@ export const sourceSchema = sourceSourceSchema;
1631
1934
  export const soundtrackSoundtrackSchema = z.object({
1632
1935
  src: z.string().min(1).regex(/\S/),
1633
1936
  effect: z.optional(z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
1634
- volume: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1635
- return undefined; if (Array.isArray(v))
1636
- return v; if (typeof v === 'string')
1637
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1638
- }).strict();
1937
+ volume: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1938
+ return undefined; if (Array.isArray(v))
1939
+ return v; if (typeof v === 'string') {
1940
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1941
+ return v;
1942
+ return Number(v);
1943
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1944
+ });
1639
1945
  export const soundtrackSchema = soundtrackSoundtrackSchema;
1640
1946
  /**
1641
1947
  * A color stop in a gradient. Each stop defines a color at a specific position
@@ -1643,12 +1949,15 @@ export const soundtrackSchema = soundtrackSoundtrackSchema;
1643
1949
  *
1644
1950
  */
1645
1951
  export const svgpropertiesSvgGradientStopSchema = z.object({
1646
- offset: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1647
- return undefined; if (Array.isArray(v))
1648
- return v; if (typeof v === 'string')
1649
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))),
1650
- color: z.string().regex(/^#[A-Fa-f0-9]{6}$/),
1651
- }).strict();
1952
+ offset: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1953
+ return undefined; if (Array.isArray(v))
1954
+ return v; if (typeof v === 'string') {
1955
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1956
+ return v;
1957
+ return Number(v);
1958
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1959
+ color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1960
+ });
1652
1961
  export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
1653
1962
  /**
1654
1963
  * A linear gradient fill that transitions colors along a straight line.
@@ -1657,16 +1966,22 @@ export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
1657
1966
  */
1658
1967
  export const svgpropertiesSvgLinearGradientFillSchema = z.object({
1659
1968
  type: z.enum(["linear"]),
1660
- angle: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1661
- return undefined; if (Array.isArray(v))
1662
- return v; if (typeof v === 'string')
1663
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(360)))).default(0),
1969
+ angle: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1970
+ return undefined; if (Array.isArray(v))
1971
+ return v; if (typeof v === 'string') {
1972
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1973
+ return v;
1974
+ return Number(v);
1975
+ } return v; }), z.number().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1664
1976
  stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1665
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1666
- return undefined; if (Array.isArray(v))
1667
- return v; if (typeof v === 'string')
1668
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1669
- }).strict();
1977
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1978
+ return undefined; if (Array.isArray(v))
1979
+ return v; if (typeof v === 'string') {
1980
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1981
+ return v;
1982
+ return Number(v);
1983
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1984
+ });
1670
1985
  export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSchema;
1671
1986
  /**
1672
1987
  * A radial gradient fill that transitions colors radiating outward from a center point.
@@ -1676,35 +1991,50 @@ export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSch
1676
1991
  export const svgpropertiesSvgRadialGradientFillSchema = z.object({
1677
1992
  type: z.enum(["radial"]),
1678
1993
  stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1679
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1680
- return undefined; if (Array.isArray(v))
1681
- return v; if (typeof v === 'string')
1682
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1683
- }).strict();
1994
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1995
+ return undefined; if (Array.isArray(v))
1996
+ return v; if (typeof v === 'string') {
1997
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1998
+ return v;
1999
+ return Number(v);
2000
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2001
+ });
1684
2002
  export const svgRadialGradientFillSchema = svgpropertiesSvgRadialGradientFillSchema;
1685
2003
  /**
1686
2004
  * Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
1687
2005
  *
1688
2006
  */
1689
2007
  export const svgpropertiesSvgShadowSchema = z.object({
1690
- offsetX: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1691
- return undefined; if (Array.isArray(v))
1692
- return v; if (typeof v === 'string')
1693
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1694
- offsetY: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1695
- return undefined; if (Array.isArray(v))
1696
- return v; if (typeof v === 'string')
1697
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1698
- blur: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1699
- return undefined; if (Array.isArray(v))
1700
- return v; if (typeof v === 'string')
1701
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1702
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1703
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1704
- return undefined; if (Array.isArray(v))
1705
- return v; if (typeof v === 'string')
1706
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(0.5),
1707
- }).strict();
2008
+ offsetX: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2009
+ return undefined; if (Array.isArray(v))
2010
+ return v; if (typeof v === 'string') {
2011
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2012
+ return v;
2013
+ return Number(v);
2014
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2015
+ offsetY: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2016
+ return undefined; if (Array.isArray(v))
2017
+ return v; if (typeof v === 'string') {
2018
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2019
+ return v;
2020
+ return Number(v);
2021
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2022
+ blur: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2023
+ return undefined; if (Array.isArray(v))
2024
+ return v; if (typeof v === 'string') {
2025
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2026
+ return v;
2027
+ return Number(v);
2028
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2029
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
2030
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2031
+ return undefined; if (Array.isArray(v))
2032
+ return v; if (typeof v === 'string') {
2033
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2034
+ return v;
2035
+ return Number(v);
2036
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
2037
+ });
1708
2038
  export const svgShadowSchema = svgpropertiesSvgShadowSchema;
1709
2039
  /**
1710
2040
  * A solid color fill for SVG shapes.
@@ -1715,11 +2045,14 @@ export const svgpropertiesSvgSolidFillSchema = z.object({
1715
2045
  .string()
1716
2046
  .regex(/^#[A-Fa-f0-9]{6}$/)
1717
2047
  .default("#000000"),
1718
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1719
- return undefined; if (Array.isArray(v))
1720
- return v; if (typeof v === 'string')
1721
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1722
- }).strict();
2048
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2049
+ return undefined; if (Array.isArray(v))
2050
+ return v; if (typeof v === 'string') {
2051
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2052
+ return v;
2053
+ return Number(v);
2054
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2055
+ });
1723
2056
  export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
1724
2057
  /**
1725
2058
  * Fill properties for SVG shapes. Supports solid colors and gradients.
@@ -1738,57 +2071,87 @@ export const svgFillSchema = svgpropertiesSvgFillSchema;
1738
2071
  *
1739
2072
  */
1740
2073
  export const svgpropertiesSvgStrokeSchema = z.object({
1741
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1742
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1743
- return undefined; if (Array.isArray(v))
1744
- return v; if (typeof v === 'string')
1745
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(100)))).default(1),
1746
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1747
- return undefined; if (Array.isArray(v))
1748
- return v; if (typeof v === 'string')
1749
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
2074
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
2075
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2076
+ return undefined; if (Array.isArray(v))
2077
+ return v; if (typeof v === 'string') {
2078
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2079
+ return v;
2080
+ return Number(v);
2081
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2082
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2083
+ return undefined; if (Array.isArray(v))
2084
+ return v; if (typeof v === 'string') {
2085
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2086
+ return v;
2087
+ return Number(v);
2088
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1750
2089
  lineCap: z.optional(z.enum(["butt", "round", "square"])),
1751
2090
  lineJoin: z.optional(z.enum(["miter", "round", "bevel"])),
1752
- dashArray: z.optional(z.array(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1753
- return undefined; if (Array.isArray(v))
1754
- return v; if (typeof v === 'string')
1755
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0))))),
1756
- dashOffset: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1757
- return undefined; if (Array.isArray(v))
1758
- return v; if (typeof v === 'string')
1759
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1760
- }).strict();
2091
+ dashArray: z.optional(z.array(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2092
+ return undefined; if (Array.isArray(v))
2093
+ return v; if (typeof v === 'string') {
2094
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2095
+ return v;
2096
+ return Number(v);
2097
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
2098
+ dashOffset: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2099
+ return undefined; if (Array.isArray(v))
2100
+ return v; if (typeof v === 'string') {
2101
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2102
+ return v;
2103
+ return Number(v);
2104
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2105
+ });
1761
2106
  export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
1762
2107
  /**
1763
2108
  * Transformation properties for positioning, rotating, and scaling SVG shapes.
1764
2109
  *
1765
2110
  */
1766
2111
  export const svgpropertiesSvgTransformSchema = z.object({
1767
- x: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1768
- return undefined; if (Array.isArray(v))
1769
- return v; if (typeof v === 'string')
1770
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1771
- y: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1772
- return undefined; if (Array.isArray(v))
1773
- return v; if (typeof v === 'string')
1774
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1775
- rotation: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1776
- return undefined; if (Array.isArray(v))
1777
- return v; if (typeof v === 'string')
1778
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-360).lte(360)))).default(0),
1779
- scale: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1780
- return undefined; if (Array.isArray(v))
1781
- return v; if (typeof v === 'string')
1782
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0.01).lte(100)))).default(1),
1783
- originX: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1784
- return undefined; if (Array.isArray(v))
1785
- return v; if (typeof v === 'string')
1786
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(0.5),
1787
- originY: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1788
- return undefined; if (Array.isArray(v))
1789
- return v; if (typeof v === 'string')
1790
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(0.5),
1791
- }).strict();
2112
+ x: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2113
+ return undefined; if (Array.isArray(v))
2114
+ return v; if (typeof v === 'string') {
2115
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2116
+ return v;
2117
+ return Number(v);
2118
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2119
+ y: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2120
+ return undefined; if (Array.isArray(v))
2121
+ return v; if (typeof v === 'string') {
2122
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2123
+ return v;
2124
+ return Number(v);
2125
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2126
+ rotation: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2127
+ return undefined; if (Array.isArray(v))
2128
+ return v; if (typeof v === 'string') {
2129
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2130
+ return v;
2131
+ return Number(v);
2132
+ } return v; }), z.number().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2133
+ scale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2134
+ return undefined; if (Array.isArray(v))
2135
+ return v; if (typeof v === 'string') {
2136
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2137
+ return v;
2138
+ return Number(v);
2139
+ } return v; }), z.number().gte(0.01).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2140
+ originX: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2141
+ return undefined; if (Array.isArray(v))
2142
+ return v; if (typeof v === 'string') {
2143
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2144
+ return v;
2145
+ return Number(v);
2146
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
2147
+ originY: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2148
+ return undefined; if (Array.isArray(v))
2149
+ return v; if (typeof v === 'string') {
2150
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2151
+ return v;
2152
+ return Number(v);
2153
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
2154
+ });
1792
2155
  export const svgTransformSchema = svgpropertiesSvgTransformSchema;
1793
2156
  /**
1794
2157
  * An arrow shape pointing to the right by default.
@@ -1797,23 +2160,35 @@ export const svgTransformSchema = svgpropertiesSvgTransformSchema;
1797
2160
  */
1798
2161
  export const svgshapesSvgArrowShapeSchema = z.object({
1799
2162
  type: z.enum(["arrow"]),
1800
- length: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1801
- return undefined; if (Array.isArray(v))
1802
- return v; if (typeof v === 'string')
1803
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1804
- headWidth: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1805
- return undefined; if (Array.isArray(v))
1806
- return v; if (typeof v === 'string')
1807
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(1000))),
1808
- headLength: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1809
- return undefined; if (Array.isArray(v))
1810
- return v; if (typeof v === 'string')
1811
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(1000))),
1812
- shaftWidth: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1813
- return undefined; if (Array.isArray(v))
1814
- return v; if (typeof v === 'string')
1815
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(1000))),
1816
- }).strict();
2163
+ length: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2164
+ return undefined; if (Array.isArray(v))
2165
+ return v; if (typeof v === 'string') {
2166
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2167
+ return v;
2168
+ return Number(v);
2169
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2170
+ headWidth: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2171
+ return undefined; if (Array.isArray(v))
2172
+ return v; if (typeof v === 'string') {
2173
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2174
+ return v;
2175
+ return Number(v);
2176
+ } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2177
+ headLength: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2178
+ return undefined; if (Array.isArray(v))
2179
+ return v; if (typeof v === 'string') {
2180
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2181
+ return v;
2182
+ return Number(v);
2183
+ } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2184
+ shaftWidth: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2185
+ return undefined; if (Array.isArray(v))
2186
+ return v; if (typeof v === 'string') {
2187
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2188
+ return v;
2189
+ return Number(v);
2190
+ } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2191
+ });
1817
2192
  export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
1818
2193
  /**
1819
2194
  * A perfect circle shape defined by its radius.
@@ -1822,11 +2197,14 @@ export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
1822
2197
  */
1823
2198
  export const svgshapesSvgCircleShapeSchema = z.object({
1824
2199
  type: z.enum(["circle"]),
1825
- radius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1826
- return undefined; if (Array.isArray(v))
1827
- return v; if (typeof v === 'string')
1828
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1829
- }).strict();
2200
+ radius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2201
+ return undefined; if (Array.isArray(v))
2202
+ return v; if (typeof v === 'string') {
2203
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2204
+ return v;
2205
+ return Number(v);
2206
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2207
+ });
1830
2208
  export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
1831
2209
  /**
1832
2210
  * A cross or plus shape with equal or different arm lengths.
@@ -1835,19 +2213,28 @@ export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
1835
2213
  */
1836
2214
  export const svgshapesSvgCrossShapeSchema = z.object({
1837
2215
  type: z.enum(["cross"]),
1838
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1839
- return undefined; if (Array.isArray(v))
1840
- return v; if (typeof v === 'string')
1841
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1842
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1843
- return undefined; if (Array.isArray(v))
1844
- return v; if (typeof v === 'string')
1845
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1846
- thickness: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1847
- return undefined; if (Array.isArray(v))
1848
- return v; if (typeof v === 'string')
1849
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(500))),
1850
- }).strict();
2216
+ width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2217
+ return undefined; if (Array.isArray(v))
2218
+ return v; if (typeof v === 'string') {
2219
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2220
+ return v;
2221
+ return Number(v);
2222
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2223
+ height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2224
+ return undefined; if (Array.isArray(v))
2225
+ return v; if (typeof v === 'string') {
2226
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2227
+ return v;
2228
+ return Number(v);
2229
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2230
+ thickness: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2231
+ return undefined; if (Array.isArray(v))
2232
+ return v; if (typeof v === 'string') {
2233
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2234
+ return v;
2235
+ return Number(v);
2236
+ } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2237
+ });
1851
2238
  export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
1852
2239
  /**
1853
2240
  * An ellipse (oval) shape with separate horizontal and vertical radii.
@@ -1856,15 +2243,21 @@ export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
1856
2243
  */
1857
2244
  export const svgshapesSvgEllipseShapeSchema = z.object({
1858
2245
  type: z.enum(["ellipse"]),
1859
- radiusX: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1860
- return undefined; if (Array.isArray(v))
1861
- return v; if (typeof v === 'string')
1862
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1863
- radiusY: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1864
- return undefined; if (Array.isArray(v))
1865
- return v; if (typeof v === 'string')
1866
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1867
- }).strict();
2246
+ radiusX: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2247
+ return undefined; if (Array.isArray(v))
2248
+ return v; if (typeof v === 'string') {
2249
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2250
+ return v;
2251
+ return Number(v);
2252
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2253
+ radiusY: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2254
+ return undefined; if (Array.isArray(v))
2255
+ return v; if (typeof v === 'string') {
2256
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2257
+ return v;
2258
+ return Number(v);
2259
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2260
+ });
1868
2261
  export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
1869
2262
  /**
1870
2263
  * A heart shape commonly used for love/like icons.
@@ -1873,11 +2266,14 @@ export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
1873
2266
  */
1874
2267
  export const svgshapesSvgHeartShapeSchema = z.object({
1875
2268
  type: z.enum(["heart"]),
1876
- size: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1877
- return undefined; if (Array.isArray(v))
1878
- return v; if (typeof v === 'string')
1879
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1880
- }).strict();
2269
+ size: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2270
+ return undefined; if (Array.isArray(v))
2271
+ return v; if (typeof v === 'string') {
2272
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2273
+ return v;
2274
+ return Number(v);
2275
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2276
+ });
1881
2277
  export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
1882
2278
  /**
1883
2279
  * A straight line shape with a specified length and thickness.
@@ -1886,15 +2282,21 @@ export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
1886
2282
  */
1887
2283
  export const svgshapesSvgLineShapeSchema = z.object({
1888
2284
  type: z.enum(["line"]),
1889
- length: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1890
- return undefined; if (Array.isArray(v))
1891
- return v; if (typeof v === 'string')
1892
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1893
- thickness: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1894
- return undefined; if (Array.isArray(v))
1895
- return v; if (typeof v === 'string')
1896
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(500))),
1897
- }).strict();
2285
+ length: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2286
+ return undefined; if (Array.isArray(v))
2287
+ return v; if (typeof v === 'string') {
2288
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2289
+ return v;
2290
+ return Number(v);
2291
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2292
+ thickness: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2293
+ return undefined; if (Array.isArray(v))
2294
+ return v; if (typeof v === 'string') {
2295
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2296
+ return v;
2297
+ return Number(v);
2298
+ } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2299
+ });
1898
2300
  export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
1899
2301
  /**
1900
2302
  * A custom shape defined by SVG path data.
@@ -1916,7 +2318,7 @@ export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
1916
2318
  export const svgshapesSvgPathShapeSchema = z.object({
1917
2319
  type: z.enum(["path"]),
1918
2320
  d: z.string().min(1).max(100000),
1919
- }).strict();
2321
+ });
1920
2322
  export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
1921
2323
  /**
1922
2324
  * A regular polygon shape with a specified number of sides.
@@ -1926,15 +2328,21 @@ export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
1926
2328
  */
1927
2329
  export const svgshapesSvgPolygonShapeSchema = z.object({
1928
2330
  type: z.enum(["polygon"]),
1929
- sides: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1930
- return undefined; if (Array.isArray(v))
1931
- return v; if (typeof v === 'string')
1932
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(3).lte(100))),
1933
- radius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1934
- return undefined; if (Array.isArray(v))
1935
- return v; if (typeof v === 'string')
1936
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1937
- }).strict();
2331
+ sides: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2332
+ return undefined; if (Array.isArray(v))
2333
+ return v; if (typeof v === 'string') {
2334
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2335
+ return v;
2336
+ return Number(v);
2337
+ } return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2338
+ radius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2339
+ return undefined; if (Array.isArray(v))
2340
+ return v; if (typeof v === 'string') {
2341
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2342
+ return v;
2343
+ return Number(v);
2344
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2345
+ });
1938
2346
  export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
1939
2347
  /**
1940
2348
  * A rectangle shape with optional rounded corners.
@@ -1943,19 +2351,28 @@ export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
1943
2351
  */
1944
2352
  export const svgshapesSvgRectangleShapeSchema = z.object({
1945
2353
  type: z.enum(["rectangle"]),
1946
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1947
- return undefined; if (Array.isArray(v))
1948
- return v; if (typeof v === 'string')
1949
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1950
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1951
- return undefined; if (Array.isArray(v))
1952
- return v; if (typeof v === 'string')
1953
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1954
- cornerRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1955
- return undefined; if (Array.isArray(v))
1956
- return v; if (typeof v === 'string')
1957
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(2048)))).default(0),
1958
- }).strict();
2354
+ width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2355
+ return undefined; if (Array.isArray(v))
2356
+ return v; if (typeof v === 'string') {
2357
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2358
+ return v;
2359
+ return Number(v);
2360
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2361
+ height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2362
+ return undefined; if (Array.isArray(v))
2363
+ return v; if (typeof v === 'string') {
2364
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2365
+ return v;
2366
+ return Number(v);
2367
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2368
+ cornerRadius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2369
+ return undefined; if (Array.isArray(v))
2370
+ return v; if (typeof v === 'string') {
2371
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2372
+ return v;
2373
+ return Number(v);
2374
+ } return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2375
+ });
1959
2376
  export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
1960
2377
  /**
1961
2378
  * A ring (donut/annulus) shape - a circle with a circular hole in the center.
@@ -1964,15 +2381,21 @@ export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
1964
2381
  */
1965
2382
  export const svgshapesSvgRingShapeSchema = z.object({
1966
2383
  type: z.enum(["ring"]),
1967
- outerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1968
- return undefined; if (Array.isArray(v))
1969
- return v; if (typeof v === 'string')
1970
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1971
- innerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1972
- return undefined; if (Array.isArray(v))
1973
- return v; if (typeof v === 'string')
1974
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(2048))),
1975
- }).strict();
2384
+ outerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2385
+ return undefined; if (Array.isArray(v))
2386
+ return v; if (typeof v === 'string') {
2387
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2388
+ return v;
2389
+ return Number(v);
2390
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2391
+ innerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2392
+ return undefined; if (Array.isArray(v))
2393
+ return v; if (typeof v === 'string') {
2394
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2395
+ return v;
2396
+ return Number(v);
2397
+ } return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2398
+ });
1976
2399
  export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
1977
2400
  /**
1978
2401
  * A star shape with a specified number of points.
@@ -1982,19 +2405,28 @@ export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
1982
2405
  */
1983
2406
  export const svgshapesSvgStarShapeSchema = z.object({
1984
2407
  type: z.enum(["star"]),
1985
- points: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1986
- return undefined; if (Array.isArray(v))
1987
- return v; if (typeof v === 'string')
1988
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(3).lte(100))),
1989
- outerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1990
- return undefined; if (Array.isArray(v))
1991
- return v; if (typeof v === 'string')
1992
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1993
- innerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1994
- return undefined; if (Array.isArray(v))
1995
- return v; if (typeof v === 'string')
1996
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1997
- }).strict();
2408
+ points: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2409
+ return undefined; if (Array.isArray(v))
2410
+ return v; if (typeof v === 'string') {
2411
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2412
+ return v;
2413
+ return Number(v);
2414
+ } return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2415
+ outerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2416
+ return undefined; if (Array.isArray(v))
2417
+ return v; if (typeof v === 'string') {
2418
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2419
+ return v;
2420
+ return Number(v);
2421
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2422
+ innerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2423
+ return undefined; if (Array.isArray(v))
2424
+ return v; if (typeof v === 'string') {
2425
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2426
+ return v;
2427
+ return Number(v);
2428
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2429
+ });
1998
2430
  export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
1999
2431
  /**
2000
2432
  * The shape definition for an SVG asset. Each shape type has its own specific
@@ -2067,28 +2499,28 @@ export const svgassetSvgAssetSchema = z.object({
2067
2499
  stroke: z.optional(svgpropertiesSvgStrokeSchema),
2068
2500
  shadow: z.optional(svgpropertiesSvgShadowSchema),
2069
2501
  transform: z.optional(svgpropertiesSvgTransformSchema),
2070
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2071
- return undefined; if (Array.isArray(v))
2072
- return v; if (typeof v === 'string')
2073
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2074
- return undefined; if (Array.isArray(v))
2075
- return v; if (typeof v === 'string')
2076
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))))).default(1),
2077
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2078
- return undefined; if (Array.isArray(v))
2079
- return v; if (typeof v === 'string')
2080
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2081
- return undefined; if (Array.isArray(v))
2082
- return v; if (typeof v === 'string')
2083
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(4096))))),
2084
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2085
- return undefined; if (Array.isArray(v))
2086
- return v; if (typeof v === 'string')
2087
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2088
- return undefined; if (Array.isArray(v))
2089
- return v; if (typeof v === 'string')
2090
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(4096))))),
2091
- }).strict().superRefine((data, ctx) => {
2502
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2503
+ return undefined; if (Array.isArray(v))
2504
+ return v; if (typeof v === 'string') {
2505
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2506
+ return v;
2507
+ return Number(v);
2508
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2509
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2510
+ return undefined; if (Array.isArray(v))
2511
+ return v; if (typeof v === 'string') {
2512
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2513
+ return v;
2514
+ return Number(v);
2515
+ } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2516
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2517
+ return undefined; if (Array.isArray(v))
2518
+ return v; if (typeof v === 'string') {
2519
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2520
+ return v;
2521
+ return Number(v);
2522
+ } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2523
+ }).superRefine((data, ctx) => {
2092
2524
  const hasShape = data.shape !== undefined;
2093
2525
  const hasSrc = data.src !== undefined && data.src.trim() !== "";
2094
2526
  if (!hasShape && !hasSrc) {
@@ -2125,7 +2557,7 @@ export const svgAssetSchema = svgassetSvgAssetSchema;
2125
2557
  export const templaterenderTemplateRenderSchema = z.object({
2126
2558
  id: z.string(),
2127
2559
  merge: z.optional(z.array(mergefieldMergeFieldSchema)),
2128
- }).strict();
2560
+ });
2129
2561
  export const templateRenderSchema = templaterenderTemplateRenderSchema;
2130
2562
  /**
2131
2563
  * Horizontal and vertical alignment properties for text.
@@ -2133,36 +2565,48 @@ export const templateRenderSchema = templaterenderTemplateRenderSchema;
2133
2565
  export const textpropertiesTextAlignmentSchema = z.object({
2134
2566
  horizontal: z.optional(z.enum(["left", "center", "right"])),
2135
2567
  vertical: z.optional(z.enum(["top", "center", "bottom"])),
2136
- }).strict();
2568
+ });
2137
2569
  export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
2138
2570
  /**
2139
2571
  * Animation properties for text entrance effects.
2140
2572
  */
2141
2573
  export const textpropertiesTextAnimationSchema = z.object({
2142
2574
  preset: z.enum(["typewriter"]),
2143
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2144
- return undefined; if (Array.isArray(v))
2145
- return v; if (typeof v === 'string')
2146
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0.1).lte(30)))),
2147
- }).strict();
2575
+ duration: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2576
+ return undefined; if (Array.isArray(v))
2577
+ return v; if (typeof v === 'string') {
2578
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2579
+ return v;
2580
+ return Number(v);
2581
+ } return v; }), z.number().gte(0.1).lte(30)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2582
+ });
2148
2583
  /**
2149
2584
  * Displays a background box behind the text.
2150
2585
  */
2151
2586
  export const textpropertiesTextBackgroundSchema = z.object({
2152
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
2153
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2154
- return undefined; if (Array.isArray(v))
2155
- return v; if (typeof v === 'string')
2156
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))),
2157
- padding: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2158
- return undefined; if (Array.isArray(v))
2159
- return v; if (typeof v === 'string')
2160
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(100)))),
2161
- borderRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2162
- return undefined; if (Array.isArray(v))
2163
- return v; if (typeof v === 'string')
2164
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))),
2165
- }).strict();
2587
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2588
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2589
+ return undefined; if (Array.isArray(v))
2590
+ return v; if (typeof v === 'string') {
2591
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2592
+ return v;
2593
+ return Number(v);
2594
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2595
+ padding: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2596
+ return undefined; if (Array.isArray(v))
2597
+ return v; if (typeof v === 'string') {
2598
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2599
+ return v;
2600
+ return Number(v);
2601
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2602
+ borderRadius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2603
+ return undefined; if (Array.isArray(v))
2604
+ return v; if (typeof v === 'string') {
2605
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2606
+ return v;
2607
+ return Number(v);
2608
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2609
+ });
2166
2610
  export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
2167
2611
  /**
2168
2612
  * Font properties for text.
@@ -2170,34 +2614,49 @@ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
2170
2614
  export const textpropertiesTextFontSchema = z.object({
2171
2615
  family: z.optional(z.string()),
2172
2616
  color: z.optional(z.string()),
2173
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2174
- return undefined; if (Array.isArray(v))
2175
- return v; if (typeof v === 'string')
2176
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2177
- size: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2178
- return undefined; if (Array.isArray(v))
2179
- return v; if (typeof v === 'string')
2180
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2181
- weight: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2182
- return undefined; if (Array.isArray(v))
2183
- return v; if (typeof v === 'string')
2184
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2185
- lineHeight: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2186
- return undefined; if (Array.isArray(v))
2187
- return v; if (typeof v === 'string')
2188
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2189
- }).strict();
2617
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2618
+ return undefined; if (Array.isArray(v))
2619
+ return v; if (typeof v === 'string') {
2620
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2621
+ return v;
2622
+ return Number(v);
2623
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2624
+ size: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2625
+ return undefined; if (Array.isArray(v))
2626
+ return v; if (typeof v === 'string') {
2627
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2628
+ return v;
2629
+ return Number(v);
2630
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2631
+ weight: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2632
+ return undefined; if (Array.isArray(v))
2633
+ return v; if (typeof v === 'string') {
2634
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2635
+ return v;
2636
+ return Number(v);
2637
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2638
+ lineHeight: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2639
+ return undefined; if (Array.isArray(v))
2640
+ return v; if (typeof v === 'string') {
2641
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2642
+ return v;
2643
+ return Number(v);
2644
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2645
+ });
2190
2646
  export const textFontSchema = textpropertiesTextFontSchema;
2191
2647
  /**
2192
2648
  * Text stroke (outline) properties.
2193
2649
  */
2194
2650
  export const textpropertiesTextStrokeSchema = z.object({
2195
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2196
- return undefined; if (Array.isArray(v))
2197
- return v; if (typeof v === 'string')
2198
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))),
2199
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
2200
- }).strict();
2651
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2652
+ return undefined; if (Array.isArray(v))
2653
+ return v; if (typeof v === 'string') {
2654
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2655
+ return v;
2656
+ return Number(v);
2657
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2658
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2659
+ });
2201
2660
  /**
2202
2661
  * The TextAsset is used to add text and titles to a video. The text can be styled with built in and custom
2203
2662
  * [Fonts](#tocs_font). You can also add a background bounding box used to control wrapping and overflow. Emoticons are also supported.
@@ -2206,21 +2665,27 @@ export const textpropertiesTextStrokeSchema = z.object({
2206
2665
  export const textassetTextAssetSchema = z.object({
2207
2666
  type: z.enum(["text"]),
2208
2667
  text: z.string(),
2209
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2210
- return undefined; if (Array.isArray(v))
2211
- return v; if (typeof v === 'string')
2212
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2213
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2214
- return undefined; if (Array.isArray(v))
2215
- return v; if (typeof v === 'string')
2216
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2668
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2669
+ return undefined; if (Array.isArray(v))
2670
+ return v; if (typeof v === 'string') {
2671
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2672
+ return v;
2673
+ return Number(v);
2674
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2675
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2676
+ return undefined; if (Array.isArray(v))
2677
+ return v; if (typeof v === 'string') {
2678
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2679
+ return v;
2680
+ return Number(v);
2681
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2217
2682
  font: z.optional(textpropertiesTextFontSchema),
2218
2683
  background: z.optional(textpropertiesTextBackgroundSchema),
2219
2684
  alignment: z.optional(textpropertiesTextAlignmentSchema),
2220
2685
  stroke: z.optional(textpropertiesTextStrokeSchema),
2221
2686
  animation: z.optional(textpropertiesTextAnimationSchema),
2222
2687
  ellipsis: z.optional(z.string()),
2223
- }).strict();
2688
+ });
2224
2689
  export const textAssetSchema = textassetTextAssetSchema;
2225
2690
  /**
2226
2691
  * The TextToImageAsset lets you create a dynamic image from a text prompt.
@@ -2228,30 +2693,42 @@ export const textAssetSchema = textassetTextAssetSchema;
2228
2693
  export const texttoimageassetTextToImageAssetSchema = z.object({
2229
2694
  type: z.enum(["text-to-image"]),
2230
2695
  prompt: z.string(),
2231
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2232
- return undefined; if (Array.isArray(v))
2233
- return v; if (typeof v === 'string')
2234
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2235
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2236
- return undefined; if (Array.isArray(v))
2237
- return v; if (typeof v === 'string')
2238
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2696
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2697
+ return undefined; if (Array.isArray(v))
2698
+ return v; if (typeof v === 'string') {
2699
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2700
+ return v;
2701
+ return Number(v);
2702
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2703
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2704
+ return undefined; if (Array.isArray(v))
2705
+ return v; if (typeof v === 'string') {
2706
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2707
+ return v;
2708
+ return Number(v);
2709
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2239
2710
  crop: z.optional(cropCropSchema),
2240
- }).strict();
2711
+ });
2241
2712
  export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
2242
2713
  /**
2243
2714
  * Generate a thumbnail image for the video or image at a specific point from the timeline.
2244
2715
  */
2245
2716
  export const thumbnailThumbnailSchema = z.object({
2246
- capture: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2247
- return undefined; if (Array.isArray(v))
2248
- return v; if (typeof v === 'string')
2249
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
2250
- scale: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2251
- return undefined; if (Array.isArray(v))
2252
- return v; if (typeof v === 'string')
2253
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))),
2254
- }).strict();
2717
+ capture: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2718
+ return undefined; if (Array.isArray(v))
2719
+ return v; if (typeof v === 'string') {
2720
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2721
+ return v;
2722
+ return Number(v);
2723
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2724
+ scale: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2725
+ return undefined; if (Array.isArray(v))
2726
+ return v; if (typeof v === 'string') {
2727
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2728
+ return v;
2729
+ return Number(v);
2730
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2731
+ });
2255
2732
  export const thumbnailSchema = thumbnailThumbnailSchema;
2256
2733
  /**
2257
2734
  * The output format, render range and type of media to generate.
@@ -2282,7 +2759,7 @@ export const outputOutputSchema = z.object({
2282
2759
  poster: z.optional(posterPosterSchema),
2283
2760
  thumbnail: z.optional(thumbnailThumbnailSchema),
2284
2761
  destinations: z.optional(z.array(destinationsDestinationsSchema)),
2285
- }).strict();
2762
+ });
2286
2763
  export const outputSchema = outputOutputSchema;
2287
2764
  /**
2288
2765
  * In and out transitions for a clip - i.e. fade in and fade out
@@ -2416,7 +2893,7 @@ export const transitionTransitionSchema = z.object({
2416
2893
  "shuffleTopLeftFast",
2417
2894
  "zoom",
2418
2895
  ])),
2419
- }).strict();
2896
+ });
2420
2897
  export const transitionSchema = transitionTransitionSchema;
2421
2898
  /**
2422
2899
  * Use a Tween to [animate properties over time](/docs/guide/architecting-an-application/animations/). The following properties are currently supported and can be animated:
@@ -2429,22 +2906,22 @@ export const transitionSchema = transitionTransitionSchema;
2429
2906
  * </ul>
2430
2907
  */
2431
2908
  export const tweenTweenSchema = z.object({
2432
- from: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2433
- return undefined; if (Array.isArray(v))
2434
- return v; if (typeof v === 'string')
2435
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
2436
- to: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2437
- return undefined; if (Array.isArray(v))
2438
- return v; if (typeof v === 'string')
2439
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
2440
- start: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2441
- return undefined; if (Array.isArray(v))
2442
- return v; if (typeof v === 'string')
2443
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2444
- length: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2445
- return undefined; if (Array.isArray(v))
2446
- return v; if (typeof v === 'string')
2447
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2909
+ from: z.optional(z.unknown()),
2910
+ to: z.optional(z.unknown()),
2911
+ start: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2912
+ return undefined; if (Array.isArray(v))
2913
+ return v; if (typeof v === 'string') {
2914
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2915
+ return v;
2916
+ return Number(v);
2917
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2918
+ length: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2919
+ return undefined; if (Array.isArray(v))
2920
+ return v; if (typeof v === 'string') {
2921
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2922
+ return v;
2923
+ return Number(v);
2924
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2448
2925
  interpolation: z.optional(z.enum(["linear", "bezier", "constant"])),
2449
2926
  easing: z.optional(z.enum([
2450
2927
  "ease",
@@ -2476,67 +2953,124 @@ export const tweenTweenSchema = z.object({
2476
2953
  "easeInOutCirc",
2477
2954
  "easeInOutBack",
2478
2955
  ])),
2479
- }).strict();
2956
+ });
2480
2957
  export const tweenSchema = tweenTweenSchema;
2481
2958
  /**
2482
2959
  * 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.
2483
2960
  */
2484
2961
  export const audioassetAudioAssetSchema = z.object({
2485
2962
  type: z.enum(["audio"]),
2486
- src: z.string().regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").min(1).regex(/\S/),
2487
- trim: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2488
- return undefined; if (Array.isArray(v))
2489
- return v; if (typeof v === 'string')
2490
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2491
- volume: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2963
+ src: z.string().min(1).regex(/\S/),
2964
+ trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2965
+ return undefined; if (Array.isArray(v))
2966
+ return v; if (typeof v === 'string') {
2967
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2968
+ return v;
2969
+ return Number(v);
2970
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2971
+ volume: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2972
+ return undefined; if (Array.isArray(v))
2973
+ return v; if (typeof v === 'string') {
2974
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2975
+ return v;
2976
+ return Number(v);
2977
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
2978
+ speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2492
2979
  return undefined; if (Array.isArray(v))
2493
- return v; if (typeof v === 'string')
2494
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))), z.array(tweenTweenSchema)])),
2495
- speed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2496
- return undefined; if (Array.isArray(v))
2497
- return v; if (typeof v === 'string')
2498
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))),
2980
+ return v; if (typeof v === 'string') {
2981
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2982
+ return v;
2983
+ return Number(v);
2984
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2499
2985
  effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
2500
- }).strict();
2986
+ });
2501
2987
  export const audioAssetSchema = audioassetAudioAssetSchema;
2502
2988
  /**
2503
2989
  * Offsets the position of an asset horizontally or vertically by a relative distance.
2504
2990
  */
2505
2991
  export const offsetOffsetSchema = z.object({
2506
- x: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2507
- return undefined; if (Array.isArray(v))
2508
- return v; if (typeof v === 'string')
2509
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-10).lte(10))), z.array(tweenTweenSchema)])),
2510
- y: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2511
- return undefined; if (Array.isArray(v))
2512
- return v; if (typeof v === 'string')
2513
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-10).lte(10))), z.array(tweenTweenSchema)])),
2514
- }).strict();
2992
+ x: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2993
+ return undefined; if (Array.isArray(v))
2994
+ return v; if (typeof v === 'string') {
2995
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2996
+ return v;
2997
+ return Number(v);
2998
+ } return v; }), z.number().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
2999
+ y: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3000
+ return undefined; if (Array.isArray(v))
3001
+ return v; if (typeof v === 'string') {
3002
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3003
+ return v;
3004
+ return Number(v);
3005
+ } return v; }), z.number().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3006
+ });
2515
3007
  export const offsetSchema = offsetOffsetSchema;
2516
3008
  /**
2517
3009
  * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
2518
3010
  */
2519
3011
  export const rotatetransformationRotateTransformationSchema = z.object({
2520
- angle: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2521
- return undefined; if (Array.isArray(v))
2522
- return v; if (typeof v === 'string')
2523
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-360).lte(360))), z.array(tweenTweenSchema)])),
2524
- }).strict();
3012
+ angle: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3013
+ return undefined; if (Array.isArray(v))
3014
+ return v; if (typeof v === 'string') {
3015
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3016
+ return v;
3017
+ return Number(v);
3018
+ } return v; }), z.number().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3019
+ });
2525
3020
  export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
2526
3021
  /**
2527
3022
  * 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.
2528
3023
  */
2529
3024
  export const skewtransformationSkewTransformationSchema = z.object({
2530
- x: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3025
+ x: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3026
+ return undefined; if (Array.isArray(v))
3027
+ return v; if (typeof v === 'string') {
3028
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3029
+ return v;
3030
+ return Number(v);
3031
+ } return v; }), z.number().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3032
+ y: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3033
+ return undefined; if (Array.isArray(v))
3034
+ return v; if (typeof v === 'string') {
3035
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3036
+ return v;
3037
+ return Number(v);
3038
+ } return v; }), z.number().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3039
+ });
3040
+ export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
3041
+ /**
3042
+ * 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.
3043
+ */
3044
+ export const texttospeechassetTextToSpeechAssetSchema = z.object({
3045
+ type: z.enum(["text-to-speech"]),
3046
+ text: z.string(),
3047
+ voice: z.string(),
3048
+ language: z.optional(z.string()),
3049
+ newscaster: z.optional(z.boolean()).default(false),
3050
+ trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2531
3051
  return undefined; if (Array.isArray(v))
2532
- return v; if (typeof v === 'string')
2533
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-100).lte(100))), z.array(tweenTweenSchema)])),
2534
- y: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3052
+ return v; if (typeof v === 'string') {
3053
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3054
+ return v;
3055
+ return Number(v);
3056
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3057
+ volume: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3058
+ return undefined; if (Array.isArray(v))
3059
+ return v; if (typeof v === 'string') {
3060
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3061
+ return v;
3062
+ return Number(v);
3063
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3064
+ speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2535
3065
  return undefined; if (Array.isArray(v))
2536
- return v; if (typeof v === 'string')
2537
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-100).lte(100))), z.array(tweenTweenSchema)])),
2538
- }).strict();
2539
- export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
3066
+ return v; if (typeof v === 'string') {
3067
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3068
+ return v;
3069
+ return Number(v);
3070
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3071
+ effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
3072
+ });
3073
+ export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
2540
3074
  /**
2541
3075
  * **Notice: The TitleAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
2542
3076
  *
@@ -2583,7 +3117,7 @@ export const titleassetTitleAssetSchema = z.object({
2583
3117
  "center",
2584
3118
  ])),
2585
3119
  offset: z.optional(offsetOffsetSchema),
2586
- }).strict();
3120
+ });
2587
3121
  export const titleAssetSchema = titleassetTitleAssetSchema;
2588
3122
  /**
2589
3123
  * 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.
@@ -2592,31 +3126,40 @@ export const transformationTransformationSchema = z.object({
2592
3126
  rotate: z.optional(rotatetransformationRotateTransformationSchema),
2593
3127
  skew: z.optional(skewtransformationSkewTransformationSchema),
2594
3128
  flip: z.optional(fliptransformationFlipTransformationSchema),
2595
- }).strict();
3129
+ });
2596
3130
  export const transformationSchema = transformationTransformationSchema;
2597
3131
  /**
2598
3132
  * 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.
2599
3133
  */
2600
3134
  export const videoassetVideoAssetSchema = z.object({
2601
3135
  type: z.enum(["video"]),
2602
- src: z.string().regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").min(1).regex(/\S/),
3136
+ src: z.string().min(1).regex(/\S/),
2603
3137
  transcode: z.optional(z.boolean()),
2604
- trim: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2605
- return undefined; if (Array.isArray(v))
2606
- return v; if (typeof v === 'string')
2607
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2608
- volume: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3138
+ trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2609
3139
  return undefined; if (Array.isArray(v))
2610
- return v; if (typeof v === 'string')
2611
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))), z.array(tweenTweenSchema)])),
3140
+ return v; if (typeof v === 'string') {
3141
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3142
+ return v;
3143
+ return Number(v);
3144
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3145
+ volume: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3146
+ return undefined; if (Array.isArray(v))
3147
+ return v; if (typeof v === 'string') {
3148
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3149
+ return v;
3150
+ return Number(v);
3151
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
2612
3152
  volumeEffect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
2613
- speed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2614
- return undefined; if (Array.isArray(v))
2615
- return v; if (typeof v === 'string')
2616
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))),
3153
+ speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3154
+ return undefined; if (Array.isArray(v))
3155
+ return v; if (typeof v === 'string') {
3156
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3157
+ return v;
3158
+ return Number(v);
3159
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2617
3160
  crop: z.optional(cropCropSchema),
2618
3161
  chromaKey: z.optional(chromakeyChromaKeySchema),
2619
- }).strict();
3162
+ });
2620
3163
  export const videoAssetSchema = videoassetVideoAssetSchema;
2621
3164
  /**
2622
3165
  * The type of asset to display for the duration of the Clip, i.e. a video clip or an image. Choose from one of the available asset types below.
@@ -2635,6 +3178,7 @@ export const assetAssetSchema = z.discriminatedUnion("type", [
2635
3178
  svgassetSvgAssetSchema,
2636
3179
  texttoimageassetTextToImageAssetSchema,
2637
3180
  imagetovideoassetImageToVideoAssetSchema,
3181
+ texttospeechassetTextToSpeechAssetSchema,
2638
3182
  ]);
2639
3183
  export const assetSchema = assetAssetSchema;
2640
3184
  /**
@@ -2643,30 +3187,47 @@ export const assetSchema = assetAssetSchema;
2643
3187
  export const clipClipSchema = z.object({
2644
3188
  asset: assetAssetSchema,
2645
3189
  start: z.union([
2646
- z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2647
- return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2648
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0))),
2649
- z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/),
3190
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3191
+ return undefined; if (Array.isArray(v))
3192
+ return v; if (typeof v === 'string') {
3193
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3194
+ return v;
3195
+ return Number(v);
3196
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
3197
+ z.union([z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2650
3198
  ]),
2651
3199
  length: z.union([
2652
- z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2653
- return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2654
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0))),
2655
- z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/),
3200
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3201
+ return undefined; if (Array.isArray(v))
3202
+ return v; if (typeof v === 'string') {
3203
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3204
+ return v;
3205
+ return Number(v);
3206
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
3207
+ z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2656
3208
  ]),
2657
3209
  fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
2658
- scale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3210
+ scale: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3211
+ return undefined; if (Array.isArray(v))
3212
+ return v; if (typeof v === 'string') {
3213
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3214
+ return v;
3215
+ return Number(v);
3216
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3217
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3218
+ return undefined; if (Array.isArray(v))
3219
+ return v; if (typeof v === 'string') {
3220
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3221
+ return v;
3222
+ return Number(v);
3223
+ } return v; }), z.number().gte(1).lte(3840)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3224
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2659
3225
  return undefined; if (Array.isArray(v))
2660
- return v; if (typeof v === 'string')
2661
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())), z.array(tweenTweenSchema)])),
2662
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2663
- return undefined; if (Array.isArray(v))
2664
- return v; if (typeof v === 'string')
2665
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(3840)))),
2666
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2667
- return undefined; if (Array.isArray(v))
2668
- return v; if (typeof v === 'string')
2669
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2160)))),
3226
+ return v; if (typeof v === 'string') {
3227
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3228
+ return v;
3229
+ return Number(v);
3230
+ } return v; }), z.number().gte(1).lte(2160)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2670
3231
  position: z.optional(z.enum([
2671
3232
  "top",
2672
3233
  "topRight",
@@ -2711,20 +3272,23 @@ export const clipClipSchema = z.object({
2711
3272
  "muted",
2712
3273
  "negative",
2713
3274
  ])),
2714
- opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2715
- return undefined; if (Array.isArray(v))
2716
- return v; if (typeof v === 'string')
2717
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())), z.array(tweenTweenSchema)])),
3275
+ opacity: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3276
+ return undefined; if (Array.isArray(v))
3277
+ return v; if (typeof v === 'string') {
3278
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3279
+ return v;
3280
+ return Number(v);
3281
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
2718
3282
  transform: z.optional(transformationTransformationSchema),
2719
- alias: z.optional(z.string().regex(/^[A-Za-z0-9_-]+$/)),
2720
- }).strict();
3283
+ alias: z.optional(z.union([z.string().regex(/^[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3284
+ });
2721
3285
  export const clipSchema = clipClipSchema;
2722
3286
  /**
2723
3287
  * 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.
2724
3288
  */
2725
3289
  export const trackTrackSchema = z.object({
2726
3290
  clips: z.array(clipClipSchema).min(1),
2727
- }).strict();
3291
+ });
2728
3292
  export const trackSchema = trackTrackSchema;
2729
3293
  /**
2730
3294
  * 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.
@@ -2735,7 +3299,7 @@ export const timelineTimelineSchema = z.object({
2735
3299
  fonts: z.optional(z.array(fontFontSchema)),
2736
3300
  tracks: z.array(trackTrackSchema).min(1),
2737
3301
  cache: z.optional(z.boolean()),
2738
- }).strict();
3302
+ });
2739
3303
  export const timelineSchema = timelineTimelineSchema;
2740
3304
  /**
2741
3305
  * 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.
@@ -2746,10 +3310,7 @@ export const editEditSchema = z.object({
2746
3310
  merge: z.optional(z.array(mergefieldMergeFieldSchema)),
2747
3311
  callback: z.optional(z.string()),
2748
3312
  disk: z.optional(z.enum(["local", "mount"])),
2749
- instance: z.optional(z.string()),
2750
- poster: z.optional(posterPosterSchema),
2751
- thumbnail: z.optional(thumbnailThumbnailSchema),
2752
- }).strict();
3313
+ });
2753
3314
  export const editSchema = editEditSchema;
2754
3315
  /**
2755
3316
  * The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
@@ -2768,21 +3329,27 @@ export const renderresponsedataRenderResponseDataSchema = z.object({
2768
3329
  "failed",
2769
3330
  ]),
2770
3331
  error: z.optional(z.string()),
2771
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2772
- return undefined; if (Array.isArray(v))
2773
- return v; if (typeof v === 'string')
2774
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2775
- renderTime: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2776
- return undefined; if (Array.isArray(v))
2777
- return v; if (typeof v === 'string')
2778
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
3332
+ duration: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3333
+ return undefined; if (Array.isArray(v))
3334
+ return v; if (typeof v === 'string') {
3335
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3336
+ return v;
3337
+ return Number(v);
3338
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3339
+ renderTime: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3340
+ return undefined; if (Array.isArray(v))
3341
+ return v; if (typeof v === 'string') {
3342
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3343
+ return v;
3344
+ return Number(v);
3345
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2779
3346
  url: z.optional(z.string()),
2780
3347
  poster: z.optional(z.union([z.string(), z.null()])),
2781
3348
  thumbnail: z.optional(z.union([z.string(), z.null()])),
2782
3349
  data: z.optional(editEditSchema),
2783
3350
  created: z.optional(z.string()),
2784
3351
  updated: z.optional(z.string()),
2785
- }).strict();
3352
+ });
2786
3353
  export const renderResponseDataSchema = renderresponsedataRenderResponseDataSchema;
2787
3354
  /**
2788
3355
  * 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.
@@ -2791,7 +3358,7 @@ export const renderresponseRenderResponseSchema = z.object({
2791
3358
  success: z.boolean(),
2792
3359
  message: z.string(),
2793
3360
  response: renderresponsedataRenderResponseDataSchema,
2794
- }).strict();
3361
+ });
2795
3362
  export const renderResponseSchema = renderresponseRenderResponseSchema;
2796
3363
  /**
2797
3364
  * The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse).
@@ -2801,7 +3368,7 @@ export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
2801
3368
  name: z.string(),
2802
3369
  owner: z.string(),
2803
3370
  template: editEditSchema,
2804
- }).strict();
3371
+ });
2805
3372
  export const templateDataResponseDataSchema = templatedataresponsedataTemplateDataResponseDataSchema;
2806
3373
  /**
2807
3374
  * The template data including the template name and [Edit](#tocs_edit).
@@ -2810,7 +3377,7 @@ export const templatedataresponseTemplateDataResponseSchema = z.object({
2810
3377
  success: z.boolean(),
2811
3378
  message: z.string(),
2812
3379
  response: templatedataresponsedataTemplateDataResponseDataSchema,
2813
- }).strict();
3380
+ });
2814
3381
  export const templateDataResponseSchema = templatedataresponseTemplateDataResponseSchema;
2815
3382
  /**
2816
3383
  * A template is a saved [Edit](#tocs_edit) than can be loaded and re-used.
@@ -2818,7 +3385,7 @@ export const templateDataResponseSchema = templatedataresponseTemplateDataRespon
2818
3385
  export const templateTemplateSchema = z.object({
2819
3386
  name: z.string(),
2820
3387
  template: z.optional(editEditSchema),
2821
- }).strict();
3388
+ });
2822
3389
  export const templateSchema = templateTemplateSchema;
2823
3390
  export const postRenderRequest = z.object({
2824
3391
  body: editEditSchema,
@@ -2839,7 +3406,7 @@ export const getRenderRequest = z.object({
2839
3406
  query: z.optional(z.object({
2840
3407
  data: z.optional(z.boolean()),
2841
3408
  merged: z.optional(z.boolean()),
2842
- }).strict()),
3409
+ })),
2843
3410
  });
2844
3411
  /**
2845
3412
  * The render status details