@shotstack/schemas 1.5.1 → 1.5.3

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,
@@ -1331,13 +1562,16 @@ export const richtextassetRichTextAssetSchema = z.object({
1331
1562
  shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1332
1563
  background: z.optional(richtextpropertiesRichTextBackgroundSchema),
1333
1564
  border: z.optional(richtextpropertiesRichTextBorderSchema),
1334
- padding: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1335
- return undefined; if (Array.isArray(v))
1336
- return v; if (typeof v === 'string')
1337
- 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])),
1565
+ padding: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1566
+ return undefined; if (Array.isArray(v))
1567
+ return v; if (typeof v === 'string') {
1568
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1569
+ return v;
1570
+ return Number(v);
1571
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), richtextpropertiesRichTextPaddingSchema])),
1338
1572
  align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1339
1573
  animation: z.optional(richtextpropertiesRichTextAnimationSchema),
1340
- }).strict();
1574
+ });
1341
1575
  export const richTextAssetSchema = richtextassetRichTextAssetSchema;
1342
1576
  /**
1343
1577
  * The transfer request attributes inlcudling the user specified ID and status. Returned with [TransferResponseData](#tocs_transferresponsedata).
@@ -1347,7 +1581,7 @@ export const transferresponseattributesTransferResponseAttributesSchema = z.obje
1347
1581
  owner: z.optional(z.string()),
1348
1582
  status: z.optional(z.enum(["queued", "failed"])),
1349
1583
  created: z.optional(z.string()),
1350
- }).strict();
1584
+ });
1351
1585
  export const transferResponseAttributesSchema = transferresponseattributesTransferResponseAttributesSchema;
1352
1586
  /**
1353
1587
  * The type of resource (an asset) and the transfer attributes. Returned with [TransferResponse](#tocs_transferresponse).
@@ -1355,14 +1589,14 @@ export const transferResponseAttributesSchema = transferresponseattributesTransf
1355
1589
  export const transferresponsedataTransferResponseDataSchema = z.object({
1356
1590
  type: z.optional(z.string()),
1357
1591
  attributes: z.optional(transferresponseattributesTransferResponseAttributesSchema),
1358
- }).strict();
1592
+ });
1359
1593
  export const transferResponseDataSchema = transferresponsedataTransferResponseDataSchema;
1360
1594
  /**
1361
1595
  * 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.
1362
1596
  */
1363
1597
  export const transferresponseTransferResponseSchema = z.object({
1364
1598
  data: transferresponsedataTransferResponseDataSchema,
1365
- }).strict();
1599
+ });
1366
1600
  export const transferResponseSchema = transferresponseTransferResponseSchema;
1367
1601
  /**
1368
1602
  * The asset URL to fetch and transfer to a destination.
@@ -1371,7 +1605,7 @@ export const transferTransferSchema = z.object({
1371
1605
  url: z.string(),
1372
1606
  id: z.string(),
1373
1607
  destinations: z.array(destinationsDestinationsSchema),
1374
- }).strict();
1608
+ });
1375
1609
  export const transferSchema = transferTransferSchema;
1376
1610
  /**
1377
1611
  * The ShapeAsset is used to add shapes to a video. The shape can be styled with a fill and a stroke.
@@ -1381,73 +1615,109 @@ export const transferSchema = transferTransferSchema;
1381
1615
  export const shapeassetShapeAssetSchema = z.object({
1382
1616
  type: z.enum(["shape"]),
1383
1617
  shape: z.enum(["rectangle", "circle", "line"]),
1384
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1385
- return undefined; if (Array.isArray(v))
1386
- return v; if (typeof v === 'string')
1387
- 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()))),
1388
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1389
- return undefined; if (Array.isArray(v))
1390
- return v; if (typeof v === 'string')
1391
- 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()))),
1618
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1619
+ return undefined; if (Array.isArray(v))
1620
+ return v; if (typeof v === 'string') {
1621
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1622
+ return v;
1623
+ return Number(v);
1624
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1625
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1626
+ return undefined; if (Array.isArray(v))
1627
+ return v; if (typeof v === 'string') {
1628
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1629
+ return v;
1630
+ return Number(v);
1631
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1392
1632
  fill: z.optional(z.object({
1393
1633
  color: z.optional(z.string()),
1394
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1395
- return undefined; if (Array.isArray(v))
1396
- return v; if (typeof v === 'string')
1397
- 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()))),
1634
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1635
+ return undefined; if (Array.isArray(v))
1636
+ return v; if (typeof v === 'string') {
1637
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1638
+ return v;
1639
+ return Number(v);
1640
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1398
1641
  })),
1399
1642
  stroke: z.optional(z.object({
1400
1643
  color: z.optional(z.string()),
1401
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1402
- return undefined; if (Array.isArray(v))
1403
- return v; if (typeof v === 'string')
1404
- 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()))),
1644
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1645
+ return undefined; if (Array.isArray(v))
1646
+ return v; if (typeof v === 'string') {
1647
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1648
+ return v;
1649
+ return Number(v);
1650
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1405
1651
  })),
1406
1652
  rectangle: z.optional(z.object({
1407
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1408
- return undefined; if (Array.isArray(v))
1409
- return v; if (typeof v === 'string')
1410
- 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())),
1411
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1412
- return undefined; if (Array.isArray(v))
1413
- return v; if (typeof v === 'string')
1414
- 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())),
1415
- cornerRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1416
- return undefined; if (Array.isArray(v))
1417
- return v; if (typeof v === 'string')
1418
- 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()))),
1653
+ width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1654
+ return undefined; if (Array.isArray(v))
1655
+ return v; if (typeof v === 'string') {
1656
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1657
+ return v;
1658
+ return Number(v);
1659
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1660
+ height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1661
+ return undefined; if (Array.isArray(v))
1662
+ return v; if (typeof v === 'string') {
1663
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1664
+ return v;
1665
+ return Number(v);
1666
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1667
+ cornerRadius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1668
+ return undefined; if (Array.isArray(v))
1669
+ return v; if (typeof v === 'string') {
1670
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1671
+ return v;
1672
+ return Number(v);
1673
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1419
1674
  })),
1420
1675
  circle: z.optional(z.object({
1421
- radius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1422
- return undefined; if (Array.isArray(v))
1423
- return v; if (typeof v === 'string')
1424
- 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())),
1676
+ radius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1677
+ return undefined; if (Array.isArray(v))
1678
+ return v; if (typeof v === 'string') {
1679
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1680
+ return v;
1681
+ return Number(v);
1682
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1425
1683
  })),
1426
1684
  line: z.optional(z.object({
1427
- length: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1428
- return undefined; if (Array.isArray(v))
1429
- return v; if (typeof v === 'string')
1430
- 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())),
1431
- thickness: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1432
- return undefined; if (Array.isArray(v))
1433
- return v; if (typeof v === 'string')
1434
- 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())),
1685
+ length: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1686
+ return undefined; if (Array.isArray(v))
1687
+ return v; if (typeof v === 'string') {
1688
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1689
+ return v;
1690
+ return Number(v);
1691
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1692
+ thickness: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1693
+ return undefined; if (Array.isArray(v))
1694
+ return v; if (typeof v === 'string') {
1695
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1696
+ return v;
1697
+ return Number(v);
1698
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1435
1699
  })),
1436
- }).strict();
1700
+ });
1437
1701
  export const shapeAssetSchema = shapeassetShapeAssetSchema;
1438
1702
  /**
1439
1703
  * 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.
1440
1704
  */
1441
1705
  export const sizeSizeSchema = z.object({
1442
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1443
- return undefined; if (Array.isArray(v))
1444
- return v; if (typeof v === 'string')
1445
- 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)))),
1446
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1447
- return undefined; if (Array.isArray(v))
1448
- return v; if (typeof v === 'string')
1449
- 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)))),
1450
- }).strict();
1706
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1707
+ return undefined; if (Array.isArray(v))
1708
+ return v; if (typeof v === 'string') {
1709
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1710
+ return v;
1711
+ return Number(v);
1712
+ } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1713
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1714
+ return undefined; if (Array.isArray(v))
1715
+ return v; if (typeof v === 'string') {
1716
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1717
+ return v;
1718
+ return Number(v);
1719
+ } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1720
+ });
1451
1721
  export const sizeSchema = sizeSizeSchema;
1452
1722
  /**
1453
1723
  * 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...
@@ -1473,10 +1743,13 @@ export const renditionRenditionSchema = z.object({
1473
1743
  size: z.optional(sizeSizeSchema),
1474
1744
  fit: z.optional(z.enum(["cover", "contain", "crop"])),
1475
1745
  resolution: z.optional(z.enum(["preview", "mobile", "sd", "hd", "fhd"])),
1476
- quality: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1477
- return undefined; if (Array.isArray(v))
1478
- return v; if (typeof v === 'string')
1479
- 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)))),
1746
+ quality: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1747
+ return undefined; if (Array.isArray(v))
1748
+ return v; if (typeof v === 'string') {
1749
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1750
+ return v;
1751
+ return Number(v);
1752
+ } return v; }), z.number().int().gte(1).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1480
1753
  fps: z.optional(z.union([
1481
1754
  z.literal(12),
1482
1755
  z.literal(15),
@@ -1491,15 +1764,18 @@ export const renditionRenditionSchema = z.object({
1491
1764
  z.literal(60),
1492
1765
  ])),
1493
1766
  speed: z.optional(speedSpeedSchema),
1494
- keyframeInterval: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1495
- return undefined; if (Array.isArray(v))
1496
- return v; if (typeof v === 'string')
1497
- 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)))),
1767
+ keyframeInterval: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1768
+ return undefined; if (Array.isArray(v))
1769
+ return v; if (typeof v === 'string') {
1770
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1771
+ return v;
1772
+ return Number(v);
1773
+ } return v; }), z.number().int().gte(1).lte(300)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1498
1774
  fixOffset: z.optional(z.boolean()),
1499
1775
  fixRotation: z.optional(z.boolean()),
1500
1776
  enhance: z.optional(enhancementsEnhancementsSchema),
1501
1777
  filename: z.optional(z.string()),
1502
- }).strict();
1778
+ });
1503
1779
  export const renditionSchema = renditionRenditionSchema;
1504
1780
  /**
1505
1781
  * The output renditions and transformations that should be generated from the source file.
@@ -1507,7 +1783,7 @@ export const renditionSchema = renditionRenditionSchema;
1507
1783
  export const outputsOutputsSchema = z.object({
1508
1784
  renditions: z.optional(z.array(renditionRenditionSchema)),
1509
1785
  transcription: z.optional(transcriptionTranscriptionSchema),
1510
- }).strict();
1786
+ });
1511
1787
  export const outputsSchema = outputsOutputsSchema;
1512
1788
  /**
1513
1789
  * The id and attributes of the generated rendition file.
@@ -1523,35 +1799,50 @@ export const renditionresponseattributesRenditionResponseAttributesSchema = z.ob
1523
1799
  "overwritten",
1524
1800
  ])),
1525
1801
  url: z.optional(z.string()),
1526
- executionTime: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1527
- return undefined; if (Array.isArray(v))
1528
- return v; if (typeof v === 'string')
1529
- 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()))),
1802
+ executionTime: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1803
+ return undefined; if (Array.isArray(v))
1804
+ return v; if (typeof v === 'string') {
1805
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1806
+ return v;
1807
+ return Number(v);
1808
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1530
1809
  transformation: z.optional(renditionRenditionSchema),
1531
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1532
- return undefined; if (Array.isArray(v))
1533
- return v; if (typeof v === 'string')
1534
- 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()))),
1535
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1536
- return undefined; if (Array.isArray(v))
1537
- return v; if (typeof v === 'string')
1538
- 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()))),
1539
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1540
- return undefined; if (Array.isArray(v))
1541
- return v; if (typeof v === 'string')
1542
- 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()))),
1543
- fps: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1544
- return undefined; if (Array.isArray(v))
1545
- return v; if (typeof v === 'string')
1546
- 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()))),
1547
- }).strict();
1810
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1811
+ return undefined; if (Array.isArray(v))
1812
+ return v; if (typeof v === 'string') {
1813
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1814
+ return v;
1815
+ return Number(v);
1816
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1817
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1818
+ return undefined; if (Array.isArray(v))
1819
+ return v; if (typeof v === 'string') {
1820
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1821
+ return v;
1822
+ return Number(v);
1823
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1824
+ duration: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1825
+ return undefined; if (Array.isArray(v))
1826
+ return v; if (typeof v === 'string') {
1827
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1828
+ return v;
1829
+ return Number(v);
1830
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1831
+ fps: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1832
+ return undefined; if (Array.isArray(v))
1833
+ return v; if (typeof v === 'string') {
1834
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1835
+ return v;
1836
+ return Number(v);
1837
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1838
+ });
1548
1839
  export const renditionResponseAttributesSchema = renditionresponseattributesRenditionResponseAttributesSchema;
1549
1840
  /**
1550
1841
  * The list of outputs generated from the source file. Currently supports renditions which are versions of the source file with different transformations applied.
1551
1842
  */
1552
1843
  export const outputsresponseOutputsResponseSchema = z.object({
1553
1844
  renditions: z.optional(z.array(renditionresponseattributesRenditionResponseAttributesSchema)),
1554
- }).strict();
1845
+ });
1555
1846
  export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
1556
1847
  /**
1557
1848
  * The id and attributes of the source file.
@@ -1570,25 +1861,37 @@ export const sourceresponseattributesSourceResponseAttributesSchema = z.object({
1570
1861
  "overwritten",
1571
1862
  ])),
1572
1863
  outputs: z.optional(outputsresponseOutputsResponseSchema),
1573
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1574
- return undefined; if (Array.isArray(v))
1575
- return v; if (typeof v === 'string')
1576
- 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()))),
1577
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1578
- return undefined; if (Array.isArray(v))
1579
- return v; if (typeof v === 'string')
1580
- 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()))),
1581
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1582
- return undefined; if (Array.isArray(v))
1583
- return v; if (typeof v === 'string')
1584
- 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()))),
1585
- fps: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1586
- return undefined; if (Array.isArray(v))
1587
- return v; if (typeof v === 'string')
1588
- 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()))),
1864
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1865
+ return undefined; if (Array.isArray(v))
1866
+ return v; if (typeof v === 'string') {
1867
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1868
+ return v;
1869
+ return Number(v);
1870
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1871
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1872
+ return undefined; if (Array.isArray(v))
1873
+ return v; if (typeof v === 'string') {
1874
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1875
+ return v;
1876
+ return Number(v);
1877
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1878
+ duration: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1879
+ return undefined; if (Array.isArray(v))
1880
+ return v; if (typeof v === 'string') {
1881
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1882
+ return v;
1883
+ return Number(v);
1884
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1885
+ fps: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1886
+ return undefined; if (Array.isArray(v))
1887
+ return v; if (typeof v === 'string') {
1888
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1889
+ return v;
1890
+ return Number(v);
1891
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1589
1892
  created: z.optional(z.string()),
1590
1893
  updated: z.optional(z.string()),
1591
- }).strict();
1894
+ });
1592
1895
  export const sourceResponseAttributesSchema = sourceresponseattributesSourceResponseAttributesSchema;
1593
1896
  /**
1594
1897
  * The type of resource (a source), it's id and attributes of the source file.
@@ -1597,21 +1900,21 @@ export const sourceresponsedataSourceResponseDataSchema = z.object({
1597
1900
  type: z.string(),
1598
1901
  id: z.string(),
1599
1902
  attributes: sourceresponseattributesSourceResponseAttributesSchema,
1600
- }).strict();
1903
+ });
1601
1904
  export const sourceResponseDataSchema = sourceresponsedataSourceResponseDataSchema;
1602
1905
  /**
1603
1906
  * A list of all ingested source files fetched or uploaded to a users account.
1604
1907
  */
1605
1908
  export const sourcelistresponseSourceListResponseSchema = z.object({
1606
1909
  data: z.array(sourceresponsedataSourceResponseDataSchema),
1607
- }).strict();
1910
+ });
1608
1911
  export const sourceListResponseSchema = sourcelistresponseSourceListResponseSchema;
1609
1912
  /**
1610
1913
  * 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.
1611
1914
  */
1612
1915
  export const sourceresponseSourceResponseSchema = z.object({
1613
1916
  data: sourceresponsedataSourceResponseDataSchema,
1614
- }).strict();
1917
+ });
1615
1918
  export const sourceResponseSchema = sourceresponseSourceResponseSchema;
1616
1919
  /**
1617
1920
  * 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.
@@ -1622,7 +1925,7 @@ export const sourceSourceSchema = z.object({
1622
1925
  outputs: z.optional(outputsOutputsSchema),
1623
1926
  destinations: z.optional(destinationsDestinationsSchema),
1624
1927
  callback: z.optional(z.string()),
1625
- }).strict();
1928
+ });
1626
1929
  export const sourceSchema = sourceSourceSchema;
1627
1930
  /**
1628
1931
  * 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.
@@ -1630,11 +1933,14 @@ export const sourceSchema = sourceSourceSchema;
1630
1933
  export const soundtrackSoundtrackSchema = z.object({
1631
1934
  src: z.string().min(1).regex(/\S/),
1632
1935
  effect: z.optional(z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
1633
- volume: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1634
- return undefined; if (Array.isArray(v))
1635
- return v; if (typeof v === 'string')
1636
- 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()))),
1637
- }).strict();
1936
+ volume: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1937
+ return undefined; if (Array.isArray(v))
1938
+ return v; if (typeof v === 'string') {
1939
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1940
+ return v;
1941
+ return Number(v);
1942
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1943
+ });
1638
1944
  export const soundtrackSchema = soundtrackSoundtrackSchema;
1639
1945
  /**
1640
1946
  * A color stop in a gradient. Each stop defines a color at a specific position
@@ -1642,12 +1948,15 @@ export const soundtrackSchema = soundtrackSoundtrackSchema;
1642
1948
  *
1643
1949
  */
1644
1950
  export const svgpropertiesSvgGradientStopSchema = z.object({
1645
- offset: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1646
- return undefined; if (Array.isArray(v))
1647
- return v; if (typeof v === 'string')
1648
- 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))),
1649
- color: z.string().regex(/^#[A-Fa-f0-9]{6}$/),
1650
- }).strict();
1951
+ offset: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1952
+ return undefined; if (Array.isArray(v))
1953
+ return v; if (typeof v === 'string') {
1954
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1955
+ return v;
1956
+ return Number(v);
1957
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1958
+ color: z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
1959
+ });
1651
1960
  export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
1652
1961
  /**
1653
1962
  * A linear gradient fill that transitions colors along a straight line.
@@ -1656,16 +1965,22 @@ export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
1656
1965
  */
1657
1966
  export const svgpropertiesSvgLinearGradientFillSchema = z.object({
1658
1967
  type: z.enum(["linear"]),
1659
- angle: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1660
- return undefined; if (Array.isArray(v))
1661
- return v; if (typeof v === 'string')
1662
- 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),
1968
+ angle: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1969
+ return undefined; if (Array.isArray(v))
1970
+ return v; if (typeof v === 'string') {
1971
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1972
+ return v;
1973
+ return Number(v);
1974
+ } return v; }), z.number().gte(0).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
1663
1975
  stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1664
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1665
- return undefined; if (Array.isArray(v))
1666
- return v; if (typeof v === 'string')
1667
- 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),
1668
- }).strict();
1976
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1977
+ return undefined; if (Array.isArray(v))
1978
+ return v; if (typeof v === 'string') {
1979
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1980
+ return v;
1981
+ return Number(v);
1982
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1983
+ });
1669
1984
  export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSchema;
1670
1985
  /**
1671
1986
  * A radial gradient fill that transitions colors radiating outward from a center point.
@@ -1675,35 +1990,50 @@ export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSch
1675
1990
  export const svgpropertiesSvgRadialGradientFillSchema = z.object({
1676
1991
  type: z.enum(["radial"]),
1677
1992
  stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1678
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1679
- return undefined; if (Array.isArray(v))
1680
- return v; if (typeof v === 'string')
1681
- 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),
1682
- }).strict();
1993
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1994
+ return undefined; if (Array.isArray(v))
1995
+ return v; if (typeof v === 'string') {
1996
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
1997
+ return v;
1998
+ return Number(v);
1999
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2000
+ });
1683
2001
  export const svgRadialGradientFillSchema = svgpropertiesSvgRadialGradientFillSchema;
1684
2002
  /**
1685
2003
  * Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
1686
2004
  *
1687
2005
  */
1688
2006
  export const svgpropertiesSvgShadowSchema = z.object({
1689
- offsetX: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1690
- return undefined; if (Array.isArray(v))
1691
- return v; if (typeof v === 'string')
1692
- 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),
1693
- offsetY: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1694
- return undefined; if (Array.isArray(v))
1695
- return v; if (typeof v === 'string')
1696
- 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),
1697
- blur: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1698
- return undefined; if (Array.isArray(v))
1699
- return v; if (typeof v === 'string')
1700
- 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),
1701
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1702
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1703
- return undefined; if (Array.isArray(v))
1704
- return v; if (typeof v === 'string')
1705
- 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),
1706
- }).strict();
2007
+ offsetX: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2008
+ return undefined; if (Array.isArray(v))
2009
+ return v; if (typeof v === 'string') {
2010
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2011
+ return v;
2012
+ return Number(v);
2013
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2014
+ offsetY: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2015
+ return undefined; if (Array.isArray(v))
2016
+ return v; if (typeof v === 'string') {
2017
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2018
+ return v;
2019
+ return Number(v);
2020
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2021
+ blur: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2022
+ return undefined; if (Array.isArray(v))
2023
+ return v; if (typeof v === 'string') {
2024
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2025
+ return v;
2026
+ return Number(v);
2027
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2028
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
2029
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2030
+ return undefined; if (Array.isArray(v))
2031
+ return v; if (typeof v === 'string') {
2032
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2033
+ return v;
2034
+ return Number(v);
2035
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
2036
+ });
1707
2037
  export const svgShadowSchema = svgpropertiesSvgShadowSchema;
1708
2038
  /**
1709
2039
  * A solid color fill for SVG shapes.
@@ -1714,11 +2044,14 @@ export const svgpropertiesSvgSolidFillSchema = z.object({
1714
2044
  .string()
1715
2045
  .regex(/^#[A-Fa-f0-9]{6}$/)
1716
2046
  .default("#000000"),
1717
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1718
- return undefined; if (Array.isArray(v))
1719
- return v; if (typeof v === 'string')
1720
- 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),
1721
- }).strict();
2047
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2048
+ return undefined; if (Array.isArray(v))
2049
+ return v; if (typeof v === 'string') {
2050
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2051
+ return v;
2052
+ return Number(v);
2053
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2054
+ });
1722
2055
  export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
1723
2056
  /**
1724
2057
  * Fill properties for SVG shapes. Supports solid colors and gradients.
@@ -1737,57 +2070,87 @@ export const svgFillSchema = svgpropertiesSvgFillSchema;
1737
2070
  *
1738
2071
  */
1739
2072
  export const svgpropertiesSvgStrokeSchema = z.object({
1740
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1741
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1742
- return undefined; if (Array.isArray(v))
1743
- return v; if (typeof v === 'string')
1744
- 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),
1745
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1746
- return undefined; if (Array.isArray(v))
1747
- return v; if (typeof v === 'string')
1748
- 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),
2073
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default("#000000"),
2074
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2075
+ return undefined; if (Array.isArray(v))
2076
+ return v; if (typeof v === 'string') {
2077
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2078
+ return v;
2079
+ return Number(v);
2080
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2081
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2082
+ return undefined; if (Array.isArray(v))
2083
+ return v; if (typeof v === 'string') {
2084
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2085
+ return v;
2086
+ return Number(v);
2087
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
1749
2088
  lineCap: z.optional(z.enum(["butt", "round", "square"])),
1750
2089
  lineJoin: z.optional(z.enum(["miter", "round", "bevel"])),
1751
- dashArray: z.optional(z.array(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1752
- return undefined; if (Array.isArray(v))
1753
- return v; if (typeof v === 'string')
1754
- 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))))),
1755
- dashOffset: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1756
- return undefined; if (Array.isArray(v))
1757
- return v; if (typeof v === 'string')
1758
- 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),
1759
- }).strict();
2090
+ dashArray: z.optional(z.array(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2091
+ return undefined; if (Array.isArray(v))
2092
+ return v; if (typeof v === 'string') {
2093
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2094
+ return v;
2095
+ return Number(v);
2096
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))),
2097
+ dashOffset: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2098
+ return undefined; if (Array.isArray(v))
2099
+ return v; if (typeof v === 'string') {
2100
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2101
+ return v;
2102
+ return Number(v);
2103
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2104
+ });
1760
2105
  export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
1761
2106
  /**
1762
2107
  * Transformation properties for positioning, rotating, and scaling SVG shapes.
1763
2108
  *
1764
2109
  */
1765
2110
  export const svgpropertiesSvgTransformSchema = z.object({
1766
- x: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1767
- return undefined; if (Array.isArray(v))
1768
- return v; if (typeof v === 'string')
1769
- 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),
1770
- y: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1771
- return undefined; if (Array.isArray(v))
1772
- return v; if (typeof v === 'string')
1773
- 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),
1774
- rotation: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1775
- return undefined; if (Array.isArray(v))
1776
- return v; if (typeof v === 'string')
1777
- 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),
1778
- scale: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1779
- return undefined; if (Array.isArray(v))
1780
- return v; if (typeof v === 'string')
1781
- 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),
1782
- originX: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1783
- return undefined; if (Array.isArray(v))
1784
- return v; if (typeof v === 'string')
1785
- 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),
1786
- originY: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1787
- return undefined; if (Array.isArray(v))
1788
- return v; if (typeof v === 'string')
1789
- 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),
1790
- }).strict();
2111
+ x: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2112
+ return undefined; if (Array.isArray(v))
2113
+ return v; if (typeof v === 'string') {
2114
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2115
+ return v;
2116
+ return Number(v);
2117
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2118
+ y: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2119
+ return undefined; if (Array.isArray(v))
2120
+ return v; if (typeof v === 'string') {
2121
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2122
+ return v;
2123
+ return Number(v);
2124
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2125
+ rotation: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2126
+ return undefined; if (Array.isArray(v))
2127
+ return v; if (typeof v === 'string') {
2128
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2129
+ return v;
2130
+ return Number(v);
2131
+ } return v; }), z.number().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2132
+ scale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2133
+ return undefined; if (Array.isArray(v))
2134
+ return v; if (typeof v === 'string') {
2135
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2136
+ return v;
2137
+ return Number(v);
2138
+ } return v; }), z.number().gte(0.01).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2139
+ originX: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2140
+ return undefined; if (Array.isArray(v))
2141
+ return v; if (typeof v === 'string') {
2142
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2143
+ return v;
2144
+ return Number(v);
2145
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
2146
+ originY: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2147
+ return undefined; if (Array.isArray(v))
2148
+ return v; if (typeof v === 'string') {
2149
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2150
+ return v;
2151
+ return Number(v);
2152
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0.5),
2153
+ });
1791
2154
  export const svgTransformSchema = svgpropertiesSvgTransformSchema;
1792
2155
  /**
1793
2156
  * An arrow shape pointing to the right by default.
@@ -1796,23 +2159,35 @@ export const svgTransformSchema = svgpropertiesSvgTransformSchema;
1796
2159
  */
1797
2160
  export const svgshapesSvgArrowShapeSchema = z.object({
1798
2161
  type: z.enum(["arrow"]),
1799
- length: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1800
- return undefined; if (Array.isArray(v))
1801
- return v; if (typeof v === 'string')
1802
- 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))),
1803
- headWidth: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1804
- return undefined; if (Array.isArray(v))
1805
- return v; if (typeof v === 'string')
1806
- 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))),
1807
- headLength: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1808
- return undefined; if (Array.isArray(v))
1809
- return v; if (typeof v === 'string')
1810
- 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))),
1811
- shaftWidth: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1812
- return undefined; if (Array.isArray(v))
1813
- return v; if (typeof v === 'string')
1814
- 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))),
1815
- }).strict();
2162
+ length: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2163
+ return undefined; if (Array.isArray(v))
2164
+ return v; if (typeof v === 'string') {
2165
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2166
+ return v;
2167
+ return Number(v);
2168
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2169
+ headWidth: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2170
+ return undefined; if (Array.isArray(v))
2171
+ return v; if (typeof v === 'string') {
2172
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2173
+ return v;
2174
+ return Number(v);
2175
+ } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2176
+ headLength: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2177
+ return undefined; if (Array.isArray(v))
2178
+ return v; if (typeof v === 'string') {
2179
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2180
+ return v;
2181
+ return Number(v);
2182
+ } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2183
+ shaftWidth: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2184
+ return undefined; if (Array.isArray(v))
2185
+ return v; if (typeof v === 'string') {
2186
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2187
+ return v;
2188
+ return Number(v);
2189
+ } return v; }), z.number().gte(1).lte(1000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2190
+ });
1816
2191
  export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
1817
2192
  /**
1818
2193
  * A perfect circle shape defined by its radius.
@@ -1821,11 +2196,14 @@ export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
1821
2196
  */
1822
2197
  export const svgshapesSvgCircleShapeSchema = z.object({
1823
2198
  type: z.enum(["circle"]),
1824
- radius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1825
- return undefined; if (Array.isArray(v))
1826
- return v; if (typeof v === 'string')
1827
- 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))),
1828
- }).strict();
2199
+ radius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2200
+ return undefined; if (Array.isArray(v))
2201
+ return v; if (typeof v === 'string') {
2202
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2203
+ return v;
2204
+ return Number(v);
2205
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2206
+ });
1829
2207
  export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
1830
2208
  /**
1831
2209
  * A cross or plus shape with equal or different arm lengths.
@@ -1834,19 +2212,28 @@ export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
1834
2212
  */
1835
2213
  export const svgshapesSvgCrossShapeSchema = z.object({
1836
2214
  type: z.enum(["cross"]),
1837
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1838
- return undefined; if (Array.isArray(v))
1839
- return v; if (typeof v === 'string')
1840
- 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))),
1841
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1842
- return undefined; if (Array.isArray(v))
1843
- return v; if (typeof v === 'string')
1844
- 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))),
1845
- thickness: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1846
- return undefined; if (Array.isArray(v))
1847
- return v; if (typeof v === 'string')
1848
- 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))),
1849
- }).strict();
2215
+ width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2216
+ return undefined; if (Array.isArray(v))
2217
+ return v; if (typeof v === 'string') {
2218
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2219
+ return v;
2220
+ return Number(v);
2221
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2222
+ height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2223
+ return undefined; if (Array.isArray(v))
2224
+ return v; if (typeof v === 'string') {
2225
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2226
+ return v;
2227
+ return Number(v);
2228
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2229
+ thickness: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2230
+ return undefined; if (Array.isArray(v))
2231
+ return v; if (typeof v === 'string') {
2232
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2233
+ return v;
2234
+ return Number(v);
2235
+ } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2236
+ });
1850
2237
  export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
1851
2238
  /**
1852
2239
  * An ellipse (oval) shape with separate horizontal and vertical radii.
@@ -1855,15 +2242,21 @@ export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
1855
2242
  */
1856
2243
  export const svgshapesSvgEllipseShapeSchema = z.object({
1857
2244
  type: z.enum(["ellipse"]),
1858
- radiusX: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1859
- return undefined; if (Array.isArray(v))
1860
- return v; if (typeof v === 'string')
1861
- 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))),
1862
- radiusY: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1863
- return undefined; if (Array.isArray(v))
1864
- return v; if (typeof v === 'string')
1865
- 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))),
1866
- }).strict();
2245
+ radiusX: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2246
+ return undefined; if (Array.isArray(v))
2247
+ return v; if (typeof v === 'string') {
2248
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2249
+ return v;
2250
+ return Number(v);
2251
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2252
+ radiusY: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2253
+ return undefined; if (Array.isArray(v))
2254
+ return v; if (typeof v === 'string') {
2255
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2256
+ return v;
2257
+ return Number(v);
2258
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2259
+ });
1867
2260
  export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
1868
2261
  /**
1869
2262
  * A heart shape commonly used for love/like icons.
@@ -1872,11 +2265,14 @@ export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
1872
2265
  */
1873
2266
  export const svgshapesSvgHeartShapeSchema = z.object({
1874
2267
  type: z.enum(["heart"]),
1875
- size: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1876
- return undefined; if (Array.isArray(v))
1877
- return v; if (typeof v === 'string')
1878
- 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))),
1879
- }).strict();
2268
+ size: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2269
+ return undefined; if (Array.isArray(v))
2270
+ return v; if (typeof v === 'string') {
2271
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2272
+ return v;
2273
+ return Number(v);
2274
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2275
+ });
1880
2276
  export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
1881
2277
  /**
1882
2278
  * A straight line shape with a specified length and thickness.
@@ -1885,15 +2281,21 @@ export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
1885
2281
  */
1886
2282
  export const svgshapesSvgLineShapeSchema = z.object({
1887
2283
  type: z.enum(["line"]),
1888
- length: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1889
- return undefined; if (Array.isArray(v))
1890
- return v; if (typeof v === 'string')
1891
- 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))),
1892
- thickness: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1893
- return undefined; if (Array.isArray(v))
1894
- return v; if (typeof v === 'string')
1895
- 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))),
1896
- }).strict();
2284
+ length: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2285
+ return undefined; if (Array.isArray(v))
2286
+ return v; if (typeof v === 'string') {
2287
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2288
+ return v;
2289
+ return Number(v);
2290
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2291
+ thickness: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2292
+ return undefined; if (Array.isArray(v))
2293
+ return v; if (typeof v === 'string') {
2294
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2295
+ return v;
2296
+ return Number(v);
2297
+ } return v; }), z.number().gte(1).lte(500)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2298
+ });
1897
2299
  export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
1898
2300
  /**
1899
2301
  * A custom shape defined by SVG path data.
@@ -1915,7 +2317,7 @@ export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
1915
2317
  export const svgshapesSvgPathShapeSchema = z.object({
1916
2318
  type: z.enum(["path"]),
1917
2319
  d: z.string().min(1).max(100000),
1918
- }).strict();
2320
+ });
1919
2321
  export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
1920
2322
  /**
1921
2323
  * A regular polygon shape with a specified number of sides.
@@ -1925,15 +2327,21 @@ export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
1925
2327
  */
1926
2328
  export const svgshapesSvgPolygonShapeSchema = z.object({
1927
2329
  type: z.enum(["polygon"]),
1928
- sides: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1929
- return undefined; if (Array.isArray(v))
1930
- return v; if (typeof v === 'string')
1931
- 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))),
1932
- radius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1933
- return undefined; if (Array.isArray(v))
1934
- return v; if (typeof v === 'string')
1935
- 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))),
1936
- }).strict();
2330
+ sides: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2331
+ return undefined; if (Array.isArray(v))
2332
+ return v; if (typeof v === 'string') {
2333
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2334
+ return v;
2335
+ return Number(v);
2336
+ } return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2337
+ radius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2338
+ return undefined; if (Array.isArray(v))
2339
+ return v; if (typeof v === 'string') {
2340
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2341
+ return v;
2342
+ return Number(v);
2343
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2344
+ });
1937
2345
  export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
1938
2346
  /**
1939
2347
  * A rectangle shape with optional rounded corners.
@@ -1942,19 +2350,28 @@ export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
1942
2350
  */
1943
2351
  export const svgshapesSvgRectangleShapeSchema = z.object({
1944
2352
  type: z.enum(["rectangle"]),
1945
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1946
- return undefined; if (Array.isArray(v))
1947
- return v; if (typeof v === 'string')
1948
- 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))),
1949
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1950
- return undefined; if (Array.isArray(v))
1951
- return v; if (typeof v === 'string')
1952
- 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))),
1953
- cornerRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1954
- return undefined; if (Array.isArray(v))
1955
- return v; if (typeof v === 'string')
1956
- 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),
1957
- }).strict();
2353
+ width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2354
+ return undefined; if (Array.isArray(v))
2355
+ return v; if (typeof v === 'string') {
2356
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2357
+ return v;
2358
+ return Number(v);
2359
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2360
+ height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2361
+ return undefined; if (Array.isArray(v))
2362
+ return v; if (typeof v === 'string') {
2363
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2364
+ return v;
2365
+ return Number(v);
2366
+ } return v; }), z.number().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2367
+ cornerRadius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2368
+ return undefined; if (Array.isArray(v))
2369
+ return v; if (typeof v === 'string') {
2370
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2371
+ return v;
2372
+ return Number(v);
2373
+ } return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
2374
+ });
1958
2375
  export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
1959
2376
  /**
1960
2377
  * A ring (donut/annulus) shape - a circle with a circular hole in the center.
@@ -1963,15 +2380,21 @@ export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
1963
2380
  */
1964
2381
  export const svgshapesSvgRingShapeSchema = z.object({
1965
2382
  type: z.enum(["ring"]),
1966
- outerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1967
- return undefined; if (Array.isArray(v))
1968
- return v; if (typeof v === 'string')
1969
- 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))),
1970
- innerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1971
- return undefined; if (Array.isArray(v))
1972
- return v; if (typeof v === 'string')
1973
- 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))),
1974
- }).strict();
2383
+ outerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2384
+ return undefined; if (Array.isArray(v))
2385
+ return v; if (typeof v === 'string') {
2386
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2387
+ return v;
2388
+ return Number(v);
2389
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2390
+ innerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2391
+ return undefined; if (Array.isArray(v))
2392
+ return v; if (typeof v === 'string') {
2393
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2394
+ return v;
2395
+ return Number(v);
2396
+ } return v; }), z.number().gte(0).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2397
+ });
1975
2398
  export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
1976
2399
  /**
1977
2400
  * A star shape with a specified number of points.
@@ -1981,19 +2404,28 @@ export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
1981
2404
  */
1982
2405
  export const svgshapesSvgStarShapeSchema = z.object({
1983
2406
  type: z.enum(["star"]),
1984
- points: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1985
- return undefined; if (Array.isArray(v))
1986
- return v; if (typeof v === 'string')
1987
- 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))),
1988
- outerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1989
- return undefined; if (Array.isArray(v))
1990
- return v; if (typeof v === 'string')
1991
- 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))),
1992
- innerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1993
- return undefined; if (Array.isArray(v))
1994
- return v; if (typeof v === 'string')
1995
- 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))),
1996
- }).strict();
2407
+ points: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2408
+ return undefined; if (Array.isArray(v))
2409
+ return v; if (typeof v === 'string') {
2410
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2411
+ return v;
2412
+ return Number(v);
2413
+ } return v; }), z.number().int().gte(3).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2414
+ outerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2415
+ return undefined; if (Array.isArray(v))
2416
+ return v; if (typeof v === 'string') {
2417
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2418
+ return v;
2419
+ return Number(v);
2420
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2421
+ innerRadius: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2422
+ return undefined; if (Array.isArray(v))
2423
+ return v; if (typeof v === 'string') {
2424
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2425
+ return v;
2426
+ return Number(v);
2427
+ } return v; }), z.number().gte(1).lte(2048)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2428
+ });
1997
2429
  export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
1998
2430
  /**
1999
2431
  * The shape definition for an SVG asset. Each shape type has its own specific
@@ -2066,28 +2498,28 @@ export const svgassetSvgAssetSchema = z.object({
2066
2498
  stroke: z.optional(svgpropertiesSvgStrokeSchema),
2067
2499
  shadow: z.optional(svgpropertiesSvgShadowSchema),
2068
2500
  transform: z.optional(svgpropertiesSvgTransformSchema),
2069
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2070
- return undefined; if (Array.isArray(v))
2071
- return v; if (typeof v === 'string')
2072
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2073
- return undefined; if (Array.isArray(v))
2074
- return v; if (typeof v === 'string')
2075
- 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),
2076
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2077
- return undefined; if (Array.isArray(v))
2078
- return v; if (typeof v === 'string')
2079
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2080
- return undefined; if (Array.isArray(v))
2081
- return v; if (typeof v === 'string')
2082
- 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))))),
2083
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2084
- return undefined; if (Array.isArray(v))
2085
- return v; if (typeof v === 'string')
2086
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2087
- return undefined; if (Array.isArray(v))
2088
- return v; if (typeof v === 'string')
2089
- 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))))),
2090
- }).strict().superRefine((data, ctx) => {
2501
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2502
+ return undefined; if (Array.isArray(v))
2503
+ return v; if (typeof v === 'string') {
2504
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2505
+ return v;
2506
+ return Number(v);
2507
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2508
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2509
+ return undefined; if (Array.isArray(v))
2510
+ return v; if (typeof v === 'string') {
2511
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2512
+ return v;
2513
+ return Number(v);
2514
+ } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2515
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2516
+ return undefined; if (Array.isArray(v))
2517
+ return v; if (typeof v === 'string') {
2518
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2519
+ return v;
2520
+ return Number(v);
2521
+ } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2522
+ }).superRefine((data, ctx) => {
2091
2523
  const hasShape = data.shape !== undefined;
2092
2524
  const hasSrc = data.src !== undefined && data.src.trim() !== "";
2093
2525
  if (!hasShape && !hasSrc) {
@@ -2124,7 +2556,7 @@ export const svgAssetSchema = svgassetSvgAssetSchema;
2124
2556
  export const templaterenderTemplateRenderSchema = z.object({
2125
2557
  id: z.string(),
2126
2558
  merge: z.optional(z.array(mergefieldMergeFieldSchema)),
2127
- }).strict();
2559
+ });
2128
2560
  export const templateRenderSchema = templaterenderTemplateRenderSchema;
2129
2561
  /**
2130
2562
  * Horizontal and vertical alignment properties for text.
@@ -2132,36 +2564,48 @@ export const templateRenderSchema = templaterenderTemplateRenderSchema;
2132
2564
  export const textpropertiesTextAlignmentSchema = z.object({
2133
2565
  horizontal: z.optional(z.enum(["left", "center", "right"])),
2134
2566
  vertical: z.optional(z.enum(["top", "center", "bottom"])),
2135
- }).strict();
2567
+ });
2136
2568
  export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
2137
2569
  /**
2138
2570
  * Animation properties for text entrance effects.
2139
2571
  */
2140
2572
  export const textpropertiesTextAnimationSchema = z.object({
2141
2573
  preset: z.enum(["typewriter"]),
2142
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2143
- return undefined; if (Array.isArray(v))
2144
- return v; if (typeof v === 'string')
2145
- 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)))),
2146
- }).strict();
2574
+ duration: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2575
+ return undefined; if (Array.isArray(v))
2576
+ return v; if (typeof v === 'string') {
2577
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2578
+ return v;
2579
+ return Number(v);
2580
+ } return v; }), z.number().gte(0.1).lte(30)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2581
+ });
2147
2582
  /**
2148
2583
  * Displays a background box behind the text.
2149
2584
  */
2150
2585
  export const textpropertiesTextBackgroundSchema = z.object({
2151
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
2152
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2153
- return undefined; if (Array.isArray(v))
2154
- return v; if (typeof v === 'string')
2155
- 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)))),
2156
- padding: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2157
- return undefined; if (Array.isArray(v))
2158
- return v; if (typeof v === 'string')
2159
- 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)))),
2160
- borderRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2161
- return undefined; if (Array.isArray(v))
2162
- return v; if (typeof v === 'string')
2163
- 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)))),
2164
- }).strict();
2586
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2587
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2588
+ return undefined; if (Array.isArray(v))
2589
+ return v; if (typeof v === 'string') {
2590
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2591
+ return v;
2592
+ return Number(v);
2593
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2594
+ padding: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2595
+ return undefined; if (Array.isArray(v))
2596
+ return v; if (typeof v === 'string') {
2597
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2598
+ return v;
2599
+ return Number(v);
2600
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2601
+ borderRadius: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2602
+ return undefined; if (Array.isArray(v))
2603
+ return v; if (typeof v === 'string') {
2604
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2605
+ return v;
2606
+ return Number(v);
2607
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2608
+ });
2165
2609
  export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
2166
2610
  /**
2167
2611
  * Font properties for text.
@@ -2169,34 +2613,49 @@ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
2169
2613
  export const textpropertiesTextFontSchema = z.object({
2170
2614
  family: z.optional(z.string()),
2171
2615
  color: z.optional(z.string()),
2172
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2173
- return undefined; if (Array.isArray(v))
2174
- return v; if (typeof v === 'string')
2175
- 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()))),
2176
- size: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2177
- return undefined; if (Array.isArray(v))
2178
- return v; if (typeof v === 'string')
2179
- 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()))),
2180
- weight: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2181
- return undefined; if (Array.isArray(v))
2182
- return v; if (typeof v === 'string')
2183
- 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()))),
2184
- lineHeight: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2185
- return undefined; if (Array.isArray(v))
2186
- return v; if (typeof v === 'string')
2187
- 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()))),
2188
- }).strict();
2616
+ opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2617
+ return undefined; if (Array.isArray(v))
2618
+ return v; if (typeof v === 'string') {
2619
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2620
+ return v;
2621
+ return Number(v);
2622
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2623
+ size: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2624
+ return undefined; if (Array.isArray(v))
2625
+ return v; if (typeof v === 'string') {
2626
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2627
+ return v;
2628
+ return Number(v);
2629
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2630
+ weight: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2631
+ return undefined; if (Array.isArray(v))
2632
+ return v; if (typeof v === 'string') {
2633
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2634
+ return v;
2635
+ return Number(v);
2636
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2637
+ lineHeight: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2638
+ return undefined; if (Array.isArray(v))
2639
+ return v; if (typeof v === 'string') {
2640
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2641
+ return v;
2642
+ return Number(v);
2643
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2644
+ });
2189
2645
  export const textFontSchema = textpropertiesTextFontSchema;
2190
2646
  /**
2191
2647
  * Text stroke (outline) properties.
2192
2648
  */
2193
2649
  export const textpropertiesTextStrokeSchema = z.object({
2194
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2195
- return undefined; if (Array.isArray(v))
2196
- return v; if (typeof v === 'string')
2197
- 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)))),
2198
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
2199
- }).strict();
2650
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2651
+ return undefined; if (Array.isArray(v))
2652
+ return v; if (typeof v === 'string') {
2653
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2654
+ return v;
2655
+ return Number(v);
2656
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2657
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2658
+ });
2200
2659
  /**
2201
2660
  * The TextAsset is used to add text and titles to a video. The text can be styled with built in and custom
2202
2661
  * [Fonts](#tocs_font). You can also add a background bounding box used to control wrapping and overflow. Emoticons are also supported.
@@ -2205,21 +2664,27 @@ export const textpropertiesTextStrokeSchema = z.object({
2205
2664
  export const textassetTextAssetSchema = z.object({
2206
2665
  type: z.enum(["text"]),
2207
2666
  text: z.string(),
2208
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2209
- return undefined; if (Array.isArray(v))
2210
- return v; if (typeof v === 'string')
2211
- 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()))),
2212
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2213
- return undefined; if (Array.isArray(v))
2214
- return v; if (typeof v === 'string')
2215
- 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()))),
2667
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2668
+ return undefined; if (Array.isArray(v))
2669
+ return v; if (typeof v === 'string') {
2670
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2671
+ return v;
2672
+ return Number(v);
2673
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2674
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2675
+ return undefined; if (Array.isArray(v))
2676
+ return v; if (typeof v === 'string') {
2677
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2678
+ return v;
2679
+ return Number(v);
2680
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2216
2681
  font: z.optional(textpropertiesTextFontSchema),
2217
2682
  background: z.optional(textpropertiesTextBackgroundSchema),
2218
2683
  alignment: z.optional(textpropertiesTextAlignmentSchema),
2219
2684
  stroke: z.optional(textpropertiesTextStrokeSchema),
2220
2685
  animation: z.optional(textpropertiesTextAnimationSchema),
2221
2686
  ellipsis: z.optional(z.string()),
2222
- }).strict();
2687
+ });
2223
2688
  export const textAssetSchema = textassetTextAssetSchema;
2224
2689
  /**
2225
2690
  * The TextToImageAsset lets you create a dynamic image from a text prompt.
@@ -2227,30 +2692,42 @@ export const textAssetSchema = textassetTextAssetSchema;
2227
2692
  export const texttoimageassetTextToImageAssetSchema = z.object({
2228
2693
  type: z.enum(["text-to-image"]),
2229
2694
  prompt: z.string(),
2230
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2231
- return undefined; if (Array.isArray(v))
2232
- return v; if (typeof v === 'string')
2233
- 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()))),
2234
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2235
- return undefined; if (Array.isArray(v))
2236
- return v; if (typeof v === 'string')
2237
- 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()))),
2695
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2696
+ return undefined; if (Array.isArray(v))
2697
+ return v; if (typeof v === 'string') {
2698
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2699
+ return v;
2700
+ return Number(v);
2701
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2702
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2703
+ return undefined; if (Array.isArray(v))
2704
+ return v; if (typeof v === 'string') {
2705
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2706
+ return v;
2707
+ return Number(v);
2708
+ } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2238
2709
  crop: z.optional(cropCropSchema),
2239
- }).strict();
2710
+ });
2240
2711
  export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
2241
2712
  /**
2242
2713
  * Generate a thumbnail image for the video or image at a specific point from the timeline.
2243
2714
  */
2244
2715
  export const thumbnailThumbnailSchema = z.object({
2245
- capture: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2246
- return undefined; if (Array.isArray(v))
2247
- return v; if (typeof v === 'string')
2248
- 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())),
2249
- scale: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2250
- return undefined; if (Array.isArray(v))
2251
- return v; if (typeof v === 'string')
2252
- 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))),
2253
- }).strict();
2716
+ capture: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2717
+ return undefined; if (Array.isArray(v))
2718
+ return v; if (typeof v === 'string') {
2719
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2720
+ return v;
2721
+ return Number(v);
2722
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2723
+ scale: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2724
+ return undefined; if (Array.isArray(v))
2725
+ return v; if (typeof v === 'string') {
2726
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2727
+ return v;
2728
+ return Number(v);
2729
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2730
+ });
2254
2731
  export const thumbnailSchema = thumbnailThumbnailSchema;
2255
2732
  /**
2256
2733
  * The output format, render range and type of media to generate.
@@ -2281,7 +2758,7 @@ export const outputOutputSchema = z.object({
2281
2758
  poster: z.optional(posterPosterSchema),
2282
2759
  thumbnail: z.optional(thumbnailThumbnailSchema),
2283
2760
  destinations: z.optional(z.array(destinationsDestinationsSchema)),
2284
- }).strict();
2761
+ });
2285
2762
  export const outputSchema = outputOutputSchema;
2286
2763
  /**
2287
2764
  * In and out transitions for a clip - i.e. fade in and fade out
@@ -2415,7 +2892,7 @@ export const transitionTransitionSchema = z.object({
2415
2892
  "shuffleTopLeftFast",
2416
2893
  "zoom",
2417
2894
  ])),
2418
- }).strict();
2895
+ });
2419
2896
  export const transitionSchema = transitionTransitionSchema;
2420
2897
  /**
2421
2898
  * Use a Tween to [animate properties over time](/docs/guide/architecting-an-application/animations/). The following properties are currently supported and can be animated:
@@ -2428,22 +2905,22 @@ export const transitionSchema = transitionTransitionSchema;
2428
2905
  * </ul>
2429
2906
  */
2430
2907
  export const tweenTweenSchema = z.object({
2431
- from: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2432
- return undefined; if (Array.isArray(v))
2433
- return v; if (typeof v === 'string')
2434
- 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())),
2435
- to: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2436
- return undefined; if (Array.isArray(v))
2437
- return v; if (typeof v === 'string')
2438
- 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())),
2439
- start: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2440
- return undefined; if (Array.isArray(v))
2441
- return v; if (typeof v === 'string')
2442
- 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()))),
2443
- length: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2444
- return undefined; if (Array.isArray(v))
2445
- return v; if (typeof v === 'string')
2446
- 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()))),
2908
+ from: z.optional(z.unknown()),
2909
+ to: z.optional(z.unknown()),
2910
+ start: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2911
+ return undefined; if (Array.isArray(v))
2912
+ return v; if (typeof v === 'string') {
2913
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2914
+ return v;
2915
+ return Number(v);
2916
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2917
+ length: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2918
+ return undefined; if (Array.isArray(v))
2919
+ return v; if (typeof v === 'string') {
2920
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2921
+ return v;
2922
+ return Number(v);
2923
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2447
2924
  interpolation: z.optional(z.enum(["linear", "bezier", "constant"])),
2448
2925
  easing: z.optional(z.enum([
2449
2926
  "ease",
@@ -2475,67 +2952,124 @@ export const tweenTweenSchema = z.object({
2475
2952
  "easeInOutCirc",
2476
2953
  "easeInOutBack",
2477
2954
  ])),
2478
- }).strict();
2955
+ });
2479
2956
  export const tweenSchema = tweenTweenSchema;
2480
2957
  /**
2481
2958
  * 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.
2482
2959
  */
2483
2960
  export const audioassetAudioAssetSchema = z.object({
2484
2961
  type: z.enum(["audio"]),
2485
- 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/),
2486
- trim: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2487
- return undefined; if (Array.isArray(v))
2488
- return v; if (typeof v === 'string')
2489
- 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()))),
2490
- volume: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2962
+ src: z.string().min(1).regex(/\S/),
2963
+ trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2964
+ return undefined; if (Array.isArray(v))
2965
+ return v; if (typeof v === 'string') {
2966
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2967
+ return v;
2968
+ return Number(v);
2969
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2970
+ volume: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2971
+ return undefined; if (Array.isArray(v))
2972
+ return v; if (typeof v === 'string') {
2973
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2974
+ return v;
2975
+ return Number(v);
2976
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
2977
+ speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2491
2978
  return undefined; if (Array.isArray(v))
2492
- return v; if (typeof v === 'string')
2493
- 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)])),
2494
- speed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2495
- return undefined; if (Array.isArray(v))
2496
- return v; if (typeof v === 'string')
2497
- 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)))),
2979
+ return v; if (typeof v === 'string') {
2980
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2981
+ return v;
2982
+ return Number(v);
2983
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2498
2984
  effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
2499
- }).strict();
2985
+ });
2500
2986
  export const audioAssetSchema = audioassetAudioAssetSchema;
2501
2987
  /**
2502
2988
  * Offsets the position of an asset horizontally or vertically by a relative distance.
2503
2989
  */
2504
2990
  export const offsetOffsetSchema = z.object({
2505
- x: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2506
- return undefined; if (Array.isArray(v))
2507
- return v; if (typeof v === 'string')
2508
- 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)])),
2509
- y: 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
- 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)])),
2513
- }).strict();
2991
+ x: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2992
+ return undefined; if (Array.isArray(v))
2993
+ return v; if (typeof v === 'string') {
2994
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2995
+ return v;
2996
+ return Number(v);
2997
+ } return v; }), z.number().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
2998
+ y: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2999
+ return undefined; if (Array.isArray(v))
3000
+ return v; if (typeof v === 'string') {
3001
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3002
+ return v;
3003
+ return Number(v);
3004
+ } return v; }), z.number().gte(-10).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3005
+ });
2514
3006
  export const offsetSchema = offsetOffsetSchema;
2515
3007
  /**
2516
3008
  * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
2517
3009
  */
2518
3010
  export const rotatetransformationRotateTransformationSchema = z.object({
2519
- angle: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2520
- return undefined; if (Array.isArray(v))
2521
- return v; if (typeof v === 'string')
2522
- 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)])),
2523
- }).strict();
3011
+ angle: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3012
+ return undefined; if (Array.isArray(v))
3013
+ return v; if (typeof v === 'string') {
3014
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3015
+ return v;
3016
+ return Number(v);
3017
+ } return v; }), z.number().gte(-360).lte(360)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3018
+ });
2524
3019
  export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
2525
3020
  /**
2526
3021
  * 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.
2527
3022
  */
2528
3023
  export const skewtransformationSkewTransformationSchema = z.object({
2529
- x: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3024
+ x: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3025
+ return undefined; if (Array.isArray(v))
3026
+ return v; if (typeof v === 'string') {
3027
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3028
+ return v;
3029
+ return Number(v);
3030
+ } return v; }), z.number().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3031
+ y: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3032
+ return undefined; if (Array.isArray(v))
3033
+ return v; if (typeof v === 'string') {
3034
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3035
+ return v;
3036
+ return Number(v);
3037
+ } return v; }), z.number().gte(-100).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3038
+ });
3039
+ export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
3040
+ /**
3041
+ * 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.
3042
+ */
3043
+ export const texttospeechassetTextToSpeechAssetSchema = z.object({
3044
+ type: z.enum(["text-to-speech"]),
3045
+ text: z.string(),
3046
+ voice: z.string(),
3047
+ language: z.optional(z.string()),
3048
+ newscaster: z.optional(z.boolean()).default(false),
3049
+ trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2530
3050
  return undefined; if (Array.isArray(v))
2531
- return v; if (typeof v === 'string')
2532
- 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)])),
2533
- y: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3051
+ return v; if (typeof v === 'string') {
3052
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3053
+ return v;
3054
+ return Number(v);
3055
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3056
+ volume: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3057
+ return undefined; if (Array.isArray(v))
3058
+ return v; if (typeof v === 'string') {
3059
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3060
+ return v;
3061
+ return Number(v);
3062
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3063
+ speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2534
3064
  return undefined; if (Array.isArray(v))
2535
- return v; if (typeof v === 'string')
2536
- 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)])),
2537
- }).strict();
2538
- export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
3065
+ return v; if (typeof v === 'string') {
3066
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3067
+ return v;
3068
+ return Number(v);
3069
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3070
+ effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
3071
+ });
3072
+ export const textToSpeechAssetSchema = texttospeechassetTextToSpeechAssetSchema;
2539
3073
  /**
2540
3074
  * **Notice: The TitleAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
2541
3075
  *
@@ -2582,7 +3116,7 @@ export const titleassetTitleAssetSchema = z.object({
2582
3116
  "center",
2583
3117
  ])),
2584
3118
  offset: z.optional(offsetOffsetSchema),
2585
- }).strict();
3119
+ });
2586
3120
  export const titleAssetSchema = titleassetTitleAssetSchema;
2587
3121
  /**
2588
3122
  * 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.
@@ -2591,31 +3125,40 @@ export const transformationTransformationSchema = z.object({
2591
3125
  rotate: z.optional(rotatetransformationRotateTransformationSchema),
2592
3126
  skew: z.optional(skewtransformationSkewTransformationSchema),
2593
3127
  flip: z.optional(fliptransformationFlipTransformationSchema),
2594
- }).strict();
3128
+ });
2595
3129
  export const transformationSchema = transformationTransformationSchema;
2596
3130
  /**
2597
3131
  * 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.
2598
3132
  */
2599
3133
  export const videoassetVideoAssetSchema = z.object({
2600
3134
  type: z.enum(["video"]),
2601
- 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/),
3135
+ src: z.string().min(1).regex(/\S/),
2602
3136
  transcode: z.optional(z.boolean()),
2603
- trim: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2604
- return undefined; if (Array.isArray(v))
2605
- return v; if (typeof v === 'string')
2606
- 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()))),
2607
- volume: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3137
+ trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2608
3138
  return undefined; if (Array.isArray(v))
2609
- return v; if (typeof v === 'string')
2610
- 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)])),
3139
+ return v; if (typeof v === 'string') {
3140
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3141
+ return v;
3142
+ return Number(v);
3143
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3144
+ volume: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3145
+ return undefined; if (Array.isArray(v))
3146
+ return v; if (typeof v === 'string') {
3147
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3148
+ return v;
3149
+ return Number(v);
3150
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
2611
3151
  volumeEffect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
2612
- speed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2613
- return undefined; if (Array.isArray(v))
2614
- return v; if (typeof v === 'string')
2615
- 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)))),
3152
+ speed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3153
+ return undefined; if (Array.isArray(v))
3154
+ return v; if (typeof v === 'string') {
3155
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3156
+ return v;
3157
+ return Number(v);
3158
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2616
3159
  crop: z.optional(cropCropSchema),
2617
3160
  chromaKey: z.optional(chromakeyChromaKeySchema),
2618
- }).strict();
3161
+ });
2619
3162
  export const videoAssetSchema = videoassetVideoAssetSchema;
2620
3163
  /**
2621
3164
  * 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.
@@ -2634,6 +3177,7 @@ export const assetAssetSchema = z.discriminatedUnion("type", [
2634
3177
  svgassetSvgAssetSchema,
2635
3178
  texttoimageassetTextToImageAssetSchema,
2636
3179
  imagetovideoassetImageToVideoAssetSchema,
3180
+ texttospeechassetTextToSpeechAssetSchema,
2637
3181
  ]);
2638
3182
  export const assetSchema = assetAssetSchema;
2639
3183
  /**
@@ -2642,30 +3186,47 @@ export const assetSchema = assetAssetSchema;
2642
3186
  export const clipClipSchema = z.object({
2643
3187
  asset: assetAssetSchema,
2644
3188
  start: z.union([
2645
- z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2646
- return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2647
- 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))),
2648
- z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/),
3189
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3190
+ return undefined; if (Array.isArray(v))
3191
+ return v; if (typeof v === 'string') {
3192
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3193
+ return v;
3194
+ return Number(v);
3195
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
3196
+ z.union([z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2649
3197
  ]),
2650
3198
  length: z.union([
2651
- z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2652
- return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2653
- 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))),
2654
- z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/),
3199
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3200
+ return undefined; if (Array.isArray(v))
3201
+ return v; if (typeof v === 'string') {
3202
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3203
+ return v;
3204
+ return Number(v);
3205
+ } return v; }), z.number().gte(0)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
3206
+ z.union([z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2655
3207
  ]),
2656
3208
  fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
2657
- scale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3209
+ scale: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3210
+ return undefined; if (Array.isArray(v))
3211
+ return v; if (typeof v === 'string') {
3212
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3213
+ return v;
3214
+ return Number(v);
3215
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
3216
+ width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3217
+ return undefined; if (Array.isArray(v))
3218
+ return v; if (typeof v === 'string') {
3219
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3220
+ return v;
3221
+ return Number(v);
3222
+ } return v; }), z.number().gte(1).lte(3840)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3223
+ height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2658
3224
  return undefined; if (Array.isArray(v))
2659
- return v; if (typeof v === 'string')
2660
- 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)])),
2661
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2662
- return undefined; if (Array.isArray(v))
2663
- return v; if (typeof v === 'string')
2664
- 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)))),
2665
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2666
- return undefined; if (Array.isArray(v))
2667
- return v; if (typeof v === 'string')
2668
- 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)))),
3225
+ return v; if (typeof v === 'string') {
3226
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3227
+ return v;
3228
+ return Number(v);
3229
+ } return v; }), z.number().gte(1).lte(2160)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2669
3230
  position: z.optional(z.enum([
2670
3231
  "top",
2671
3232
  "topRight",
@@ -2710,20 +3271,23 @@ export const clipClipSchema = z.object({
2710
3271
  "muted",
2711
3272
  "negative",
2712
3273
  ])),
2713
- opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2714
- return undefined; if (Array.isArray(v))
2715
- return v; if (typeof v === 'string')
2716
- 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)])),
3274
+ opacity: z.optional(z.union([z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3275
+ return undefined; if (Array.isArray(v))
3276
+ return v; if (typeof v === 'string') {
3277
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3278
+ return v;
3279
+ return Number(v);
3280
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]), z.array(tweenTweenSchema)])),
2717
3281
  transform: z.optional(transformationTransformationSchema),
2718
- alias: z.optional(z.string().regex(/^[A-Za-z0-9_-]+$/)),
2719
- }).strict();
3282
+ alias: z.optional(z.union([z.string().regex(/^[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3283
+ });
2720
3284
  export const clipSchema = clipClipSchema;
2721
3285
  /**
2722
3286
  * 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.
2723
3287
  */
2724
3288
  export const trackTrackSchema = z.object({
2725
3289
  clips: z.array(clipClipSchema).min(1),
2726
- }).strict();
3290
+ });
2727
3291
  export const trackSchema = trackTrackSchema;
2728
3292
  /**
2729
3293
  * 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.
@@ -2734,7 +3298,7 @@ export const timelineTimelineSchema = z.object({
2734
3298
  fonts: z.optional(z.array(fontFontSchema)),
2735
3299
  tracks: z.array(trackTrackSchema).min(1),
2736
3300
  cache: z.optional(z.boolean()),
2737
- }).strict();
3301
+ });
2738
3302
  export const timelineSchema = timelineTimelineSchema;
2739
3303
  /**
2740
3304
  * 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.
@@ -2745,10 +3309,7 @@ export const editEditSchema = z.object({
2745
3309
  merge: z.optional(z.array(mergefieldMergeFieldSchema)),
2746
3310
  callback: z.optional(z.string()),
2747
3311
  disk: z.optional(z.enum(["local", "mount"])),
2748
- instance: z.optional(z.string()),
2749
- poster: z.optional(posterPosterSchema),
2750
- thumbnail: z.optional(thumbnailThumbnailSchema),
2751
- }).strict();
3312
+ });
2752
3313
  export const editSchema = editEditSchema;
2753
3314
  /**
2754
3315
  * The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
@@ -2767,21 +3328,27 @@ export const renderresponsedataRenderResponseDataSchema = z.object({
2767
3328
  "failed",
2768
3329
  ]),
2769
3330
  error: z.optional(z.string()),
2770
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2771
- return undefined; if (Array.isArray(v))
2772
- return v; if (typeof v === 'string')
2773
- 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()))),
2774
- renderTime: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2775
- return undefined; if (Array.isArray(v))
2776
- return v; if (typeof v === 'string')
2777
- 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()))),
3331
+ duration: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3332
+ return undefined; if (Array.isArray(v))
3333
+ return v; if (typeof v === 'string') {
3334
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3335
+ return v;
3336
+ return Number(v);
3337
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3338
+ renderTime: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3339
+ return undefined; if (Array.isArray(v))
3340
+ return v; if (typeof v === 'string') {
3341
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
3342
+ return v;
3343
+ return Number(v);
3344
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2778
3345
  url: z.optional(z.string()),
2779
3346
  poster: z.optional(z.union([z.string(), z.null()])),
2780
3347
  thumbnail: z.optional(z.union([z.string(), z.null()])),
2781
3348
  data: z.optional(editEditSchema),
2782
3349
  created: z.optional(z.string()),
2783
3350
  updated: z.optional(z.string()),
2784
- }).strict();
3351
+ });
2785
3352
  export const renderResponseDataSchema = renderresponsedataRenderResponseDataSchema;
2786
3353
  /**
2787
3354
  * 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.
@@ -2790,7 +3357,7 @@ export const renderresponseRenderResponseSchema = z.object({
2790
3357
  success: z.boolean(),
2791
3358
  message: z.string(),
2792
3359
  response: renderresponsedataRenderResponseDataSchema,
2793
- }).strict();
3360
+ });
2794
3361
  export const renderResponseSchema = renderresponseRenderResponseSchema;
2795
3362
  /**
2796
3363
  * The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse).
@@ -2800,7 +3367,7 @@ export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
2800
3367
  name: z.string(),
2801
3368
  owner: z.string(),
2802
3369
  template: editEditSchema,
2803
- }).strict();
3370
+ });
2804
3371
  export const templateDataResponseDataSchema = templatedataresponsedataTemplateDataResponseDataSchema;
2805
3372
  /**
2806
3373
  * The template data including the template name and [Edit](#tocs_edit).
@@ -2809,7 +3376,7 @@ export const templatedataresponseTemplateDataResponseSchema = z.object({
2809
3376
  success: z.boolean(),
2810
3377
  message: z.string(),
2811
3378
  response: templatedataresponsedataTemplateDataResponseDataSchema,
2812
- }).strict();
3379
+ });
2813
3380
  export const templateDataResponseSchema = templatedataresponseTemplateDataResponseSchema;
2814
3381
  /**
2815
3382
  * A template is a saved [Edit](#tocs_edit) than can be loaded and re-used.
@@ -2817,7 +3384,7 @@ export const templateDataResponseSchema = templatedataresponseTemplateDataRespon
2817
3384
  export const templateTemplateSchema = z.object({
2818
3385
  name: z.string(),
2819
3386
  template: z.optional(editEditSchema),
2820
- }).strict();
3387
+ });
2821
3388
  export const templateSchema = templateTemplateSchema;
2822
3389
  export const postRenderRequest = z.object({
2823
3390
  body: editEditSchema,
@@ -2838,7 +3405,7 @@ export const getRenderRequest = z.object({
2838
3405
  query: z.optional(z.object({
2839
3406
  data: z.optional(z.boolean()),
2840
3407
  merged: z.optional(z.boolean()),
2841
- }).strict()),
3408
+ })),
2842
3409
  });
2843
3410
  /**
2844
3411
  * The render status details