@shotstack/schemas 1.5.2 → 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,
@@ -1328,17 +1559,19 @@ export const richtextassetRichTextAssetSchema = z.object({
1328
1559
  text: z.string().max(5000),
1329
1560
  font: z.optional(richtextpropertiesRichTextFontSchema),
1330
1561
  style: z.optional(richtextpropertiesRichTextStyleSchema),
1331
- stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1332
1562
  shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1333
1563
  background: z.optional(richtextpropertiesRichTextBackgroundSchema),
1334
1564
  border: z.optional(richtextpropertiesRichTextBorderSchema),
1335
- padding: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1336
- return undefined; if (Array.isArray(v))
1337
- return v; if (typeof v === 'string')
1338
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0))), richtextpropertiesRichTextPaddingSchema])),
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])),
1339
1572
  align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1340
1573
  animation: z.optional(richtextpropertiesRichTextAnimationSchema),
1341
- }).strict();
1574
+ });
1342
1575
  export const richTextAssetSchema = richtextassetRichTextAssetSchema;
1343
1576
  /**
1344
1577
  * The transfer request attributes inlcudling the user specified ID and status. Returned with [TransferResponseData](#tocs_transferresponsedata).
@@ -1348,7 +1581,7 @@ export const transferresponseattributesTransferResponseAttributesSchema = z.obje
1348
1581
  owner: z.optional(z.string()),
1349
1582
  status: z.optional(z.enum(["queued", "failed"])),
1350
1583
  created: z.optional(z.string()),
1351
- }).strict();
1584
+ });
1352
1585
  export const transferResponseAttributesSchema = transferresponseattributesTransferResponseAttributesSchema;
1353
1586
  /**
1354
1587
  * The type of resource (an asset) and the transfer attributes. Returned with [TransferResponse](#tocs_transferresponse).
@@ -1356,14 +1589,14 @@ export const transferResponseAttributesSchema = transferresponseattributesTransf
1356
1589
  export const transferresponsedataTransferResponseDataSchema = z.object({
1357
1590
  type: z.optional(z.string()),
1358
1591
  attributes: z.optional(transferresponseattributesTransferResponseAttributesSchema),
1359
- }).strict();
1592
+ });
1360
1593
  export const transferResponseDataSchema = transferresponsedataTransferResponseDataSchema;
1361
1594
  /**
1362
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.
1363
1596
  */
1364
1597
  export const transferresponseTransferResponseSchema = z.object({
1365
1598
  data: transferresponsedataTransferResponseDataSchema,
1366
- }).strict();
1599
+ });
1367
1600
  export const transferResponseSchema = transferresponseTransferResponseSchema;
1368
1601
  /**
1369
1602
  * The asset URL to fetch and transfer to a destination.
@@ -1372,7 +1605,7 @@ export const transferTransferSchema = z.object({
1372
1605
  url: z.string(),
1373
1606
  id: z.string(),
1374
1607
  destinations: z.array(destinationsDestinationsSchema),
1375
- }).strict();
1608
+ });
1376
1609
  export const transferSchema = transferTransferSchema;
1377
1610
  /**
1378
1611
  * The ShapeAsset is used to add shapes to a video. The shape can be styled with a fill and a stroke.
@@ -1382,73 +1615,109 @@ export const transferSchema = transferTransferSchema;
1382
1615
  export const shapeassetShapeAssetSchema = z.object({
1383
1616
  type: z.enum(["shape"]),
1384
1617
  shape: z.enum(["rectangle", "circle", "line"]),
1385
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1386
- return undefined; if (Array.isArray(v))
1387
- return v; if (typeof v === 'string')
1388
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1389
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1390
- return undefined; if (Array.isArray(v))
1391
- return v; if (typeof v === 'string')
1392
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
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*\}\}$/)])),
1393
1632
  fill: z.optional(z.object({
1394
1633
  color: z.optional(z.string()),
1395
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1396
- return undefined; if (Array.isArray(v))
1397
- return v; if (typeof v === 'string')
1398
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
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*\}\}$/)])),
1399
1641
  })),
1400
1642
  stroke: z.optional(z.object({
1401
1643
  color: z.optional(z.string()),
1402
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1403
- return undefined; if (Array.isArray(v))
1404
- return v; if (typeof v === 'string')
1405
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
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*\}\}$/)])),
1406
1651
  })),
1407
1652
  rectangle: z.optional(z.object({
1408
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1409
- return undefined; if (Array.isArray(v))
1410
- return v; if (typeof v === 'string')
1411
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
1412
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1413
- return undefined; if (Array.isArray(v))
1414
- return v; if (typeof v === 'string')
1415
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
1416
- cornerRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1417
- return undefined; if (Array.isArray(v))
1418
- return v; if (typeof v === 'string')
1419
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
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*\}\}$/)])),
1420
1674
  })),
1421
1675
  circle: z.optional(z.object({
1422
- radius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1423
- return undefined; if (Array.isArray(v))
1424
- return v; if (typeof v === 'string')
1425
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
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*\}\}$/)]),
1426
1683
  })),
1427
1684
  line: z.optional(z.object({
1428
- length: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1429
- return undefined; if (Array.isArray(v))
1430
- return v; if (typeof v === 'string')
1431
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
1432
- thickness: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1433
- return undefined; if (Array.isArray(v))
1434
- return v; if (typeof v === 'string')
1435
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int())),
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*\}\}$/)]),
1436
1699
  })),
1437
- }).strict();
1700
+ });
1438
1701
  export const shapeAssetSchema = shapeassetShapeAssetSchema;
1439
1702
  /**
1440
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.
1441
1704
  */
1442
1705
  export const sizeSizeSchema = z.object({
1443
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1444
- return undefined; if (Array.isArray(v))
1445
- return v; if (typeof v === 'string')
1446
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(4096)))),
1447
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1448
- return undefined; if (Array.isArray(v))
1449
- return v; if (typeof v === 'string')
1450
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(4096)))),
1451
- }).strict();
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
+ });
1452
1721
  export const sizeSchema = sizeSizeSchema;
1453
1722
  /**
1454
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...
@@ -1474,10 +1743,13 @@ export const renditionRenditionSchema = z.object({
1474
1743
  size: z.optional(sizeSizeSchema),
1475
1744
  fit: z.optional(z.enum(["cover", "contain", "crop"])),
1476
1745
  resolution: z.optional(z.enum(["preview", "mobile", "sd", "hd", "fhd"])),
1477
- quality: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1478
- return undefined; if (Array.isArray(v))
1479
- return v; if (typeof v === 'string')
1480
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(100)))),
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*\}\}$/)])),
1481
1753
  fps: z.optional(z.union([
1482
1754
  z.literal(12),
1483
1755
  z.literal(15),
@@ -1492,15 +1764,18 @@ export const renditionRenditionSchema = z.object({
1492
1764
  z.literal(60),
1493
1765
  ])),
1494
1766
  speed: z.optional(speedSpeedSchema),
1495
- keyframeInterval: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1496
- return undefined; if (Array.isArray(v))
1497
- return v; if (typeof v === 'string')
1498
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(300)))),
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*\}\}$/)])),
1499
1774
  fixOffset: z.optional(z.boolean()),
1500
1775
  fixRotation: z.optional(z.boolean()),
1501
1776
  enhance: z.optional(enhancementsEnhancementsSchema),
1502
1777
  filename: z.optional(z.string()),
1503
- }).strict();
1778
+ });
1504
1779
  export const renditionSchema = renditionRenditionSchema;
1505
1780
  /**
1506
1781
  * The output renditions and transformations that should be generated from the source file.
@@ -1508,7 +1783,7 @@ export const renditionSchema = renditionRenditionSchema;
1508
1783
  export const outputsOutputsSchema = z.object({
1509
1784
  renditions: z.optional(z.array(renditionRenditionSchema)),
1510
1785
  transcription: z.optional(transcriptionTranscriptionSchema),
1511
- }).strict();
1786
+ });
1512
1787
  export const outputsSchema = outputsOutputsSchema;
1513
1788
  /**
1514
1789
  * The id and attributes of the generated rendition file.
@@ -1524,35 +1799,50 @@ export const renditionresponseattributesRenditionResponseAttributesSchema = z.ob
1524
1799
  "overwritten",
1525
1800
  ])),
1526
1801
  url: z.optional(z.string()),
1527
- executionTime: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1528
- return undefined; if (Array.isArray(v))
1529
- return v; if (typeof v === 'string')
1530
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
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*\}\}$/)])),
1531
1809
  transformation: z.optional(renditionRenditionSchema),
1532
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1533
- return undefined; if (Array.isArray(v))
1534
- return v; if (typeof v === 'string')
1535
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1536
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1537
- return undefined; if (Array.isArray(v))
1538
- return v; if (typeof v === 'string')
1539
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1540
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1541
- return undefined; if (Array.isArray(v))
1542
- return v; if (typeof v === 'string')
1543
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1544
- fps: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1545
- return undefined; if (Array.isArray(v))
1546
- return v; if (typeof v === 'string')
1547
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1548
- }).strict();
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
+ });
1549
1839
  export const renditionResponseAttributesSchema = renditionresponseattributesRenditionResponseAttributesSchema;
1550
1840
  /**
1551
1841
  * The list of outputs generated from the source file. Currently supports renditions which are versions of the source file with different transformations applied.
1552
1842
  */
1553
1843
  export const outputsresponseOutputsResponseSchema = z.object({
1554
1844
  renditions: z.optional(z.array(renditionresponseattributesRenditionResponseAttributesSchema)),
1555
- }).strict();
1845
+ });
1556
1846
  export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
1557
1847
  /**
1558
1848
  * The id and attributes of the source file.
@@ -1571,25 +1861,37 @@ export const sourceresponseattributesSourceResponseAttributesSchema = z.object({
1571
1861
  "overwritten",
1572
1862
  ])),
1573
1863
  outputs: z.optional(outputsresponseOutputsResponseSchema),
1574
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1575
- return undefined; if (Array.isArray(v))
1576
- return v; if (typeof v === 'string')
1577
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1578
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1579
- return undefined; if (Array.isArray(v))
1580
- return v; if (typeof v === 'string')
1581
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
1582
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1583
- return undefined; if (Array.isArray(v))
1584
- return v; if (typeof v === 'string')
1585
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1586
- fps: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1587
- return undefined; if (Array.isArray(v))
1588
- return v; if (typeof v === 'string')
1589
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
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*\}\}$/)])),
1590
1892
  created: z.optional(z.string()),
1591
1893
  updated: z.optional(z.string()),
1592
- }).strict();
1894
+ });
1593
1895
  export const sourceResponseAttributesSchema = sourceresponseattributesSourceResponseAttributesSchema;
1594
1896
  /**
1595
1897
  * The type of resource (a source), it's id and attributes of the source file.
@@ -1598,21 +1900,21 @@ export const sourceresponsedataSourceResponseDataSchema = z.object({
1598
1900
  type: z.string(),
1599
1901
  id: z.string(),
1600
1902
  attributes: sourceresponseattributesSourceResponseAttributesSchema,
1601
- }).strict();
1903
+ });
1602
1904
  export const sourceResponseDataSchema = sourceresponsedataSourceResponseDataSchema;
1603
1905
  /**
1604
1906
  * A list of all ingested source files fetched or uploaded to a users account.
1605
1907
  */
1606
1908
  export const sourcelistresponseSourceListResponseSchema = z.object({
1607
1909
  data: z.array(sourceresponsedataSourceResponseDataSchema),
1608
- }).strict();
1910
+ });
1609
1911
  export const sourceListResponseSchema = sourcelistresponseSourceListResponseSchema;
1610
1912
  /**
1611
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.
1612
1914
  */
1613
1915
  export const sourceresponseSourceResponseSchema = z.object({
1614
1916
  data: sourceresponsedataSourceResponseDataSchema,
1615
- }).strict();
1917
+ });
1616
1918
  export const sourceResponseSchema = sourceresponseSourceResponseSchema;
1617
1919
  /**
1618
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.
@@ -1623,7 +1925,7 @@ export const sourceSourceSchema = z.object({
1623
1925
  outputs: z.optional(outputsOutputsSchema),
1624
1926
  destinations: z.optional(destinationsDestinationsSchema),
1625
1927
  callback: z.optional(z.string()),
1626
- }).strict();
1928
+ });
1627
1929
  export const sourceSchema = sourceSourceSchema;
1628
1930
  /**
1629
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.
@@ -1631,11 +1933,14 @@ export const sourceSchema = sourceSourceSchema;
1631
1933
  export const soundtrackSoundtrackSchema = z.object({
1632
1934
  src: z.string().min(1).regex(/\S/),
1633
1935
  effect: z.optional(z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
1634
- volume: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1635
- return undefined; if (Array.isArray(v))
1636
- return v; if (typeof v === 'string')
1637
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
1638
- }).strict();
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
+ });
1639
1944
  export const soundtrackSchema = soundtrackSoundtrackSchema;
1640
1945
  /**
1641
1946
  * A color stop in a gradient. Each stop defines a color at a specific position
@@ -1643,12 +1948,15 @@ export const soundtrackSchema = soundtrackSoundtrackSchema;
1643
1948
  *
1644
1949
  */
1645
1950
  export const svgpropertiesSvgGradientStopSchema = z.object({
1646
- offset: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1647
- return undefined; if (Array.isArray(v))
1648
- return v; if (typeof v === 'string')
1649
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))),
1650
- color: z.string().regex(/^#[A-Fa-f0-9]{6}$/),
1651
- }).strict();
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
+ });
1652
1960
  export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
1653
1961
  /**
1654
1962
  * A linear gradient fill that transitions colors along a straight line.
@@ -1657,16 +1965,22 @@ export const svgGradientStopSchema = svgpropertiesSvgGradientStopSchema;
1657
1965
  */
1658
1966
  export const svgpropertiesSvgLinearGradientFillSchema = z.object({
1659
1967
  type: z.enum(["linear"]),
1660
- angle: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1661
- return undefined; if (Array.isArray(v))
1662
- return v; if (typeof v === 'string')
1663
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(360)))).default(0),
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),
1664
1975
  stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1665
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1666
- return undefined; if (Array.isArray(v))
1667
- return v; if (typeof v === 'string')
1668
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1669
- }).strict();
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
+ });
1670
1984
  export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSchema;
1671
1985
  /**
1672
1986
  * A radial gradient fill that transitions colors radiating outward from a center point.
@@ -1676,35 +1990,50 @@ export const svgLinearGradientFillSchema = svgpropertiesSvgLinearGradientFillSch
1676
1990
  export const svgpropertiesSvgRadialGradientFillSchema = z.object({
1677
1991
  type: z.enum(["radial"]),
1678
1992
  stops: z.array(svgpropertiesSvgGradientStopSchema).min(2),
1679
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1680
- return undefined; if (Array.isArray(v))
1681
- return v; if (typeof v === 'string')
1682
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1683
- }).strict();
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
+ });
1684
2001
  export const svgRadialGradientFillSchema = svgpropertiesSvgRadialGradientFillSchema;
1685
2002
  /**
1686
2003
  * Drop shadow properties for SVG shapes. Creates a shadow effect behind the shape.
1687
2004
  *
1688
2005
  */
1689
2006
  export const svgpropertiesSvgShadowSchema = z.object({
1690
- offsetX: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1691
- return undefined; if (Array.isArray(v))
1692
- return v; if (typeof v === 'string')
1693
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1694
- offsetY: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1695
- return undefined; if (Array.isArray(v))
1696
- return v; if (typeof v === 'string')
1697
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1698
- blur: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1699
- return undefined; if (Array.isArray(v))
1700
- return v; if (typeof v === 'string')
1701
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))).default(0),
1702
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1703
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1704
- return undefined; if (Array.isArray(v))
1705
- return v; if (typeof v === 'string')
1706
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(0.5),
1707
- }).strict();
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
+ });
1708
2037
  export const svgShadowSchema = svgpropertiesSvgShadowSchema;
1709
2038
  /**
1710
2039
  * A solid color fill for SVG shapes.
@@ -1715,11 +2044,14 @@ export const svgpropertiesSvgSolidFillSchema = z.object({
1715
2044
  .string()
1716
2045
  .regex(/^#[A-Fa-f0-9]{6}$/)
1717
2046
  .default("#000000"),
1718
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1719
- return undefined; if (Array.isArray(v))
1720
- return v; if (typeof v === 'string')
1721
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
1722
- }).strict();
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
+ });
1723
2055
  export const svgSolidFillSchema = svgpropertiesSvgSolidFillSchema;
1724
2056
  /**
1725
2057
  * Fill properties for SVG shapes. Supports solid colors and gradients.
@@ -1738,57 +2070,87 @@ export const svgFillSchema = svgpropertiesSvgFillSchema;
1738
2070
  *
1739
2071
  */
1740
2072
  export const svgpropertiesSvgStrokeSchema = z.object({
1741
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1742
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1743
- return undefined; if (Array.isArray(v))
1744
- return v; if (typeof v === 'string')
1745
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(100)))).default(1),
1746
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1747
- return undefined; if (Array.isArray(v))
1748
- return v; if (typeof v === 'string')
1749
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(1),
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),
1750
2088
  lineCap: z.optional(z.enum(["butt", "round", "square"])),
1751
2089
  lineJoin: z.optional(z.enum(["miter", "round", "bevel"])),
1752
- dashArray: z.optional(z.array(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1753
- return undefined; if (Array.isArray(v))
1754
- return v; if (typeof v === 'string')
1755
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0))))),
1756
- dashOffset: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1757
- return undefined; if (Array.isArray(v))
1758
- return v; if (typeof v === 'string')
1759
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1760
- }).strict();
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
+ });
1761
2105
  export const svgStrokeSchema = svgpropertiesSvgStrokeSchema;
1762
2106
  /**
1763
2107
  * Transformation properties for positioning, rotating, and scaling SVG shapes.
1764
2108
  *
1765
2109
  */
1766
2110
  export const svgpropertiesSvgTransformSchema = z.object({
1767
- x: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1768
- return undefined; if (Array.isArray(v))
1769
- return v; if (typeof v === 'string')
1770
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1771
- y: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1772
- return undefined; if (Array.isArray(v))
1773
- return v; if (typeof v === 'string')
1774
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))).default(0),
1775
- rotation: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1776
- return undefined; if (Array.isArray(v))
1777
- return v; if (typeof v === 'string')
1778
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-360).lte(360)))).default(0),
1779
- scale: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1780
- return undefined; if (Array.isArray(v))
1781
- return v; if (typeof v === 'string')
1782
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0.01).lte(100)))).default(1),
1783
- originX: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1784
- return undefined; if (Array.isArray(v))
1785
- return v; if (typeof v === 'string')
1786
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(0.5),
1787
- originY: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1788
- return undefined; if (Array.isArray(v))
1789
- return v; if (typeof v === 'string')
1790
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))).default(0.5),
1791
- }).strict();
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
+ });
1792
2154
  export const svgTransformSchema = svgpropertiesSvgTransformSchema;
1793
2155
  /**
1794
2156
  * An arrow shape pointing to the right by default.
@@ -1797,23 +2159,35 @@ export const svgTransformSchema = svgpropertiesSvgTransformSchema;
1797
2159
  */
1798
2160
  export const svgshapesSvgArrowShapeSchema = z.object({
1799
2161
  type: z.enum(["arrow"]),
1800
- length: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1801
- return undefined; if (Array.isArray(v))
1802
- return v; if (typeof v === 'string')
1803
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1804
- headWidth: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1805
- return undefined; if (Array.isArray(v))
1806
- return v; if (typeof v === 'string')
1807
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(1000))),
1808
- headLength: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1809
- return undefined; if (Array.isArray(v))
1810
- return v; if (typeof v === 'string')
1811
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(1000))),
1812
- shaftWidth: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1813
- return undefined; if (Array.isArray(v))
1814
- return v; if (typeof v === 'string')
1815
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(1000))),
1816
- }).strict();
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
+ });
1817
2191
  export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
1818
2192
  /**
1819
2193
  * A perfect circle shape defined by its radius.
@@ -1822,11 +2196,14 @@ export const svgArrowShapeSchema = svgshapesSvgArrowShapeSchema;
1822
2196
  */
1823
2197
  export const svgshapesSvgCircleShapeSchema = z.object({
1824
2198
  type: z.enum(["circle"]),
1825
- radius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1826
- return undefined; if (Array.isArray(v))
1827
- return v; if (typeof v === 'string')
1828
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1829
- }).strict();
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
+ });
1830
2207
  export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
1831
2208
  /**
1832
2209
  * A cross or plus shape with equal or different arm lengths.
@@ -1835,19 +2212,28 @@ export const svgCircleShapeSchema = svgshapesSvgCircleShapeSchema;
1835
2212
  */
1836
2213
  export const svgshapesSvgCrossShapeSchema = z.object({
1837
2214
  type: z.enum(["cross"]),
1838
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1839
- return undefined; if (Array.isArray(v))
1840
- return v; if (typeof v === 'string')
1841
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1842
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1843
- return undefined; if (Array.isArray(v))
1844
- return v; if (typeof v === 'string')
1845
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1846
- thickness: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1847
- return undefined; if (Array.isArray(v))
1848
- return v; if (typeof v === 'string')
1849
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(500))),
1850
- }).strict();
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
+ });
1851
2237
  export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
1852
2238
  /**
1853
2239
  * An ellipse (oval) shape with separate horizontal and vertical radii.
@@ -1856,15 +2242,21 @@ export const svgCrossShapeSchema = svgshapesSvgCrossShapeSchema;
1856
2242
  */
1857
2243
  export const svgshapesSvgEllipseShapeSchema = z.object({
1858
2244
  type: z.enum(["ellipse"]),
1859
- radiusX: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1860
- return undefined; if (Array.isArray(v))
1861
- return v; if (typeof v === 'string')
1862
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1863
- radiusY: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1864
- return undefined; if (Array.isArray(v))
1865
- return v; if (typeof v === 'string')
1866
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1867
- }).strict();
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
+ });
1868
2260
  export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
1869
2261
  /**
1870
2262
  * A heart shape commonly used for love/like icons.
@@ -1873,11 +2265,14 @@ export const svgEllipseShapeSchema = svgshapesSvgEllipseShapeSchema;
1873
2265
  */
1874
2266
  export const svgshapesSvgHeartShapeSchema = z.object({
1875
2267
  type: z.enum(["heart"]),
1876
- size: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1877
- return undefined; if (Array.isArray(v))
1878
- return v; if (typeof v === 'string')
1879
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1880
- }).strict();
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
+ });
1881
2276
  export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
1882
2277
  /**
1883
2278
  * A straight line shape with a specified length and thickness.
@@ -1886,15 +2281,21 @@ export const svgHeartShapeSchema = svgshapesSvgHeartShapeSchema;
1886
2281
  */
1887
2282
  export const svgshapesSvgLineShapeSchema = z.object({
1888
2283
  type: z.enum(["line"]),
1889
- length: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1890
- return undefined; if (Array.isArray(v))
1891
- return v; if (typeof v === 'string')
1892
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1893
- thickness: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1894
- return undefined; if (Array.isArray(v))
1895
- return v; if (typeof v === 'string')
1896
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(500))),
1897
- }).strict();
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
+ });
1898
2299
  export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
1899
2300
  /**
1900
2301
  * A custom shape defined by SVG path data.
@@ -1916,7 +2317,7 @@ export const svgLineShapeSchema = svgshapesSvgLineShapeSchema;
1916
2317
  export const svgshapesSvgPathShapeSchema = z.object({
1917
2318
  type: z.enum(["path"]),
1918
2319
  d: z.string().min(1).max(100000),
1919
- }).strict();
2320
+ });
1920
2321
  export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
1921
2322
  /**
1922
2323
  * A regular polygon shape with a specified number of sides.
@@ -1926,15 +2327,21 @@ export const svgPathShapeSchema = svgshapesSvgPathShapeSchema;
1926
2327
  */
1927
2328
  export const svgshapesSvgPolygonShapeSchema = z.object({
1928
2329
  type: z.enum(["polygon"]),
1929
- sides: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1930
- return undefined; if (Array.isArray(v))
1931
- return v; if (typeof v === 'string')
1932
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(3).lte(100))),
1933
- radius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1934
- return undefined; if (Array.isArray(v))
1935
- return v; if (typeof v === 'string')
1936
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1937
- }).strict();
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
+ });
1938
2345
  export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
1939
2346
  /**
1940
2347
  * A rectangle shape with optional rounded corners.
@@ -1943,19 +2350,28 @@ export const svgPolygonShapeSchema = svgshapesSvgPolygonShapeSchema;
1943
2350
  */
1944
2351
  export const svgshapesSvgRectangleShapeSchema = z.object({
1945
2352
  type: z.enum(["rectangle"]),
1946
- width: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1947
- return undefined; if (Array.isArray(v))
1948
- return v; if (typeof v === 'string')
1949
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1950
- height: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1951
- return undefined; if (Array.isArray(v))
1952
- return v; if (typeof v === 'string')
1953
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(4096))),
1954
- cornerRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1955
- return undefined; if (Array.isArray(v))
1956
- return v; if (typeof v === 'string')
1957
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(2048)))).default(0),
1958
- }).strict();
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
+ });
1959
2375
  export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
1960
2376
  /**
1961
2377
  * A ring (donut/annulus) shape - a circle with a circular hole in the center.
@@ -1964,15 +2380,21 @@ export const svgRectangleShapeSchema = svgshapesSvgRectangleShapeSchema;
1964
2380
  */
1965
2381
  export const svgshapesSvgRingShapeSchema = z.object({
1966
2382
  type: z.enum(["ring"]),
1967
- outerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1968
- return undefined; if (Array.isArray(v))
1969
- return v; if (typeof v === 'string')
1970
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1971
- innerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1972
- return undefined; if (Array.isArray(v))
1973
- return v; if (typeof v === 'string')
1974
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(2048))),
1975
- }).strict();
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
+ });
1976
2398
  export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
1977
2399
  /**
1978
2400
  * A star shape with a specified number of points.
@@ -1982,19 +2404,28 @@ export const svgRingShapeSchema = svgshapesSvgRingShapeSchema;
1982
2404
  */
1983
2405
  export const svgshapesSvgStarShapeSchema = z.object({
1984
2406
  type: z.enum(["star"]),
1985
- points: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1986
- return undefined; if (Array.isArray(v))
1987
- return v; if (typeof v === 'string')
1988
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(3).lte(100))),
1989
- outerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1990
- return undefined; if (Array.isArray(v))
1991
- return v; if (typeof v === 'string')
1992
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1993
- innerRadius: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1994
- return undefined; if (Array.isArray(v))
1995
- return v; if (typeof v === 'string')
1996
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2048))),
1997
- }).strict();
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
+ });
1998
2429
  export const svgStarShapeSchema = svgshapesSvgStarShapeSchema;
1999
2430
  /**
2000
2431
  * The shape definition for an SVG asset. Each shape type has its own specific
@@ -2067,28 +2498,28 @@ export const svgassetSvgAssetSchema = z.object({
2067
2498
  stroke: z.optional(svgpropertiesSvgStrokeSchema),
2068
2499
  shadow: z.optional(svgpropertiesSvgShadowSchema),
2069
2500
  transform: z.optional(svgpropertiesSvgTransformSchema),
2070
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2071
- return undefined; if (Array.isArray(v))
2072
- return v; if (typeof v === 'string')
2073
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2074
- return undefined; if (Array.isArray(v))
2075
- return v; if (typeof v === 'string')
2076
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))))).default(1),
2077
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2078
- return undefined; if (Array.isArray(v))
2079
- return v; if (typeof v === 'string')
2080
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2081
- return undefined; if (Array.isArray(v))
2082
- return v; if (typeof v === 'string')
2083
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(4096))))),
2084
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2085
- return undefined; if (Array.isArray(v))
2086
- return v; if (typeof v === 'string')
2087
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2088
- return undefined; if (Array.isArray(v))
2089
- return v; if (typeof v === 'string')
2090
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int().gte(1).lte(4096))))),
2091
- }).strict().superRefine((data, ctx) => {
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) => {
2092
2523
  const hasShape = data.shape !== undefined;
2093
2524
  const hasSrc = data.src !== undefined && data.src.trim() !== "";
2094
2525
  if (!hasShape && !hasSrc) {
@@ -2125,7 +2556,7 @@ export const svgAssetSchema = svgassetSvgAssetSchema;
2125
2556
  export const templaterenderTemplateRenderSchema = z.object({
2126
2557
  id: z.string(),
2127
2558
  merge: z.optional(z.array(mergefieldMergeFieldSchema)),
2128
- }).strict();
2559
+ });
2129
2560
  export const templateRenderSchema = templaterenderTemplateRenderSchema;
2130
2561
  /**
2131
2562
  * Horizontal and vertical alignment properties for text.
@@ -2133,36 +2564,48 @@ export const templateRenderSchema = templaterenderTemplateRenderSchema;
2133
2564
  export const textpropertiesTextAlignmentSchema = z.object({
2134
2565
  horizontal: z.optional(z.enum(["left", "center", "right"])),
2135
2566
  vertical: z.optional(z.enum(["top", "center", "bottom"])),
2136
- }).strict();
2567
+ });
2137
2568
  export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
2138
2569
  /**
2139
2570
  * Animation properties for text entrance effects.
2140
2571
  */
2141
2572
  export const textpropertiesTextAnimationSchema = z.object({
2142
2573
  preset: z.enum(["typewriter"]),
2143
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2144
- return undefined; if (Array.isArray(v))
2145
- return v; if (typeof v === 'string')
2146
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0.1).lte(30)))),
2147
- }).strict();
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
+ });
2148
2582
  /**
2149
2583
  * Displays a background box behind the text.
2150
2584
  */
2151
2585
  export const textpropertiesTextBackgroundSchema = z.object({
2152
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
2153
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2154
- return undefined; if (Array.isArray(v))
2155
- return v; if (typeof v === 'string')
2156
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1)))),
2157
- padding: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2158
- return undefined; if (Array.isArray(v))
2159
- return v; if (typeof v === 'string')
2160
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(100)))),
2161
- borderRadius: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2162
- return undefined; if (Array.isArray(v))
2163
- return v; if (typeof v === 'string')
2164
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0)))),
2165
- }).strict();
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
+ });
2166
2609
  export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
2167
2610
  /**
2168
2611
  * Font properties for text.
@@ -2170,34 +2613,49 @@ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
2170
2613
  export const textpropertiesTextFontSchema = z.object({
2171
2614
  family: z.optional(z.string()),
2172
2615
  color: z.optional(z.string()),
2173
- opacity: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2174
- return undefined; if (Array.isArray(v))
2175
- return v; if (typeof v === 'string')
2176
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2177
- size: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2178
- return undefined; if (Array.isArray(v))
2179
- return v; if (typeof v === 'string')
2180
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2181
- weight: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2182
- return undefined; if (Array.isArray(v))
2183
- return v; if (typeof v === 'string')
2184
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2185
- lineHeight: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2186
- return undefined; if (Array.isArray(v))
2187
- return v; if (typeof v === 'string')
2188
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2189
- }).strict();
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
+ });
2190
2645
  export const textFontSchema = textpropertiesTextFontSchema;
2191
2646
  /**
2192
2647
  * Text stroke (outline) properties.
2193
2648
  */
2194
2649
  export const textpropertiesTextStrokeSchema = z.object({
2195
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2196
- return undefined; if (Array.isArray(v))
2197
- return v; if (typeof v === 'string')
2198
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))),
2199
- color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
2200
- }).strict();
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
+ });
2201
2659
  /**
2202
2660
  * The TextAsset is used to add text and titles to a video. The text can be styled with built in and custom
2203
2661
  * [Fonts](#tocs_font). You can also add a background bounding box used to control wrapping and overflow. Emoticons are also supported.
@@ -2206,21 +2664,27 @@ export const textpropertiesTextStrokeSchema = z.object({
2206
2664
  export const textassetTextAssetSchema = z.object({
2207
2665
  type: z.enum(["text"]),
2208
2666
  text: z.string(),
2209
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2210
- return undefined; if (Array.isArray(v))
2211
- return v; if (typeof v === 'string')
2212
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2213
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2214
- return undefined; if (Array.isArray(v))
2215
- return v; if (typeof v === 'string')
2216
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
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*\}\}$/)])),
2217
2681
  font: z.optional(textpropertiesTextFontSchema),
2218
2682
  background: z.optional(textpropertiesTextBackgroundSchema),
2219
2683
  alignment: z.optional(textpropertiesTextAlignmentSchema),
2220
2684
  stroke: z.optional(textpropertiesTextStrokeSchema),
2221
2685
  animation: z.optional(textpropertiesTextAnimationSchema),
2222
2686
  ellipsis: z.optional(z.string()),
2223
- }).strict();
2687
+ });
2224
2688
  export const textAssetSchema = textassetTextAssetSchema;
2225
2689
  /**
2226
2690
  * The TextToImageAsset lets you create a dynamic image from a text prompt.
@@ -2228,30 +2692,42 @@ export const textAssetSchema = textassetTextAssetSchema;
2228
2692
  export const texttoimageassetTextToImageAssetSchema = z.object({
2229
2693
  type: z.enum(["text-to-image"]),
2230
2694
  prompt: z.string(),
2231
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2232
- return undefined; if (Array.isArray(v))
2233
- return v; if (typeof v === 'string')
2234
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
2235
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2236
- return undefined; if (Array.isArray(v))
2237
- return v; if (typeof v === 'string')
2238
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().int()))),
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*\}\}$/)])),
2239
2709
  crop: z.optional(cropCropSchema),
2240
- }).strict();
2710
+ });
2241
2711
  export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
2242
2712
  /**
2243
2713
  * Generate a thumbnail image for the video or image at a specific point from the timeline.
2244
2714
  */
2245
2715
  export const thumbnailThumbnailSchema = z.object({
2246
- capture: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2247
- return undefined; if (Array.isArray(v))
2248
- return v; if (typeof v === 'string')
2249
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
2250
- scale: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2251
- return undefined; if (Array.isArray(v))
2252
- return v; if (typeof v === 'string')
2253
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))),
2254
- }).strict();
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
+ });
2255
2731
  export const thumbnailSchema = thumbnailThumbnailSchema;
2256
2732
  /**
2257
2733
  * The output format, render range and type of media to generate.
@@ -2282,7 +2758,7 @@ export const outputOutputSchema = z.object({
2282
2758
  poster: z.optional(posterPosterSchema),
2283
2759
  thumbnail: z.optional(thumbnailThumbnailSchema),
2284
2760
  destinations: z.optional(z.array(destinationsDestinationsSchema)),
2285
- }).strict();
2761
+ });
2286
2762
  export const outputSchema = outputOutputSchema;
2287
2763
  /**
2288
2764
  * In and out transitions for a clip - i.e. fade in and fade out
@@ -2416,7 +2892,7 @@ export const transitionTransitionSchema = z.object({
2416
2892
  "shuffleTopLeftFast",
2417
2893
  "zoom",
2418
2894
  ])),
2419
- }).strict();
2895
+ });
2420
2896
  export const transitionSchema = transitionTransitionSchema;
2421
2897
  /**
2422
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:
@@ -2429,22 +2905,22 @@ export const transitionSchema = transitionTransitionSchema;
2429
2905
  * </ul>
2430
2906
  */
2431
2907
  export const tweenTweenSchema = z.object({
2432
- from: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2433
- return undefined; if (Array.isArray(v))
2434
- return v; if (typeof v === 'string')
2435
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
2436
- to: z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2437
- return undefined; if (Array.isArray(v))
2438
- return v; if (typeof v === 'string')
2439
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())),
2440
- start: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2441
- return undefined; if (Array.isArray(v))
2442
- return v; if (typeof v === 'string')
2443
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2444
- length: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2445
- return undefined; if (Array.isArray(v))
2446
- return v; if (typeof v === 'string')
2447
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
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*\}\}$/)])),
2448
2924
  interpolation: z.optional(z.enum(["linear", "bezier", "constant"])),
2449
2925
  easing: z.optional(z.enum([
2450
2926
  "ease",
@@ -2476,67 +2952,124 @@ export const tweenTweenSchema = z.object({
2476
2952
  "easeInOutCirc",
2477
2953
  "easeInOutBack",
2478
2954
  ])),
2479
- }).strict();
2955
+ });
2480
2956
  export const tweenSchema = tweenTweenSchema;
2481
2957
  /**
2482
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.
2483
2959
  */
2484
2960
  export const audioassetAudioAssetSchema = z.object({
2485
2961
  type: z.enum(["audio"]),
2486
- src: z.string().regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").min(1).regex(/\S/),
2487
- trim: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2488
- return undefined; if (Array.isArray(v))
2489
- return v; if (typeof v === 'string')
2490
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2491
- volume: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
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)
2492
2978
  return undefined; if (Array.isArray(v))
2493
- return v; if (typeof v === 'string')
2494
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))), z.array(tweenTweenSchema)])),
2495
- speed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2496
- return undefined; if (Array.isArray(v))
2497
- return v; if (typeof v === 'string')
2498
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))),
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*\}\}$/)])),
2499
2984
  effect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
2500
- }).strict();
2985
+ });
2501
2986
  export const audioAssetSchema = audioassetAudioAssetSchema;
2502
2987
  /**
2503
2988
  * Offsets the position of an asset horizontally or vertically by a relative distance.
2504
2989
  */
2505
2990
  export const offsetOffsetSchema = z.object({
2506
- x: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2507
- return undefined; if (Array.isArray(v))
2508
- return v; if (typeof v === 'string')
2509
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-10).lte(10))), z.array(tweenTweenSchema)])),
2510
- y: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2511
- return undefined; if (Array.isArray(v))
2512
- return v; if (typeof v === 'string')
2513
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-10).lte(10))), z.array(tweenTweenSchema)])),
2514
- }).strict();
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
+ });
2515
3006
  export const offsetSchema = offsetOffsetSchema;
2516
3007
  /**
2517
3008
  * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
2518
3009
  */
2519
3010
  export const rotatetransformationRotateTransformationSchema = z.object({
2520
- angle: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2521
- return undefined; if (Array.isArray(v))
2522
- return v; if (typeof v === 'string')
2523
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-360).lte(360))), z.array(tweenTweenSchema)])),
2524
- }).strict();
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
+ });
2525
3019
  export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
2526
3020
  /**
2527
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.
2528
3022
  */
2529
3023
  export const skewtransformationSkewTransformationSchema = z.object({
2530
- 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)
2531
3050
  return undefined; if (Array.isArray(v))
2532
- return v; if (typeof v === 'string')
2533
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-100).lte(100))), z.array(tweenTweenSchema)])),
2534
- y: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
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)
2535
3064
  return undefined; if (Array.isArray(v))
2536
- return v; if (typeof v === 'string')
2537
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(-100).lte(100))), z.array(tweenTweenSchema)])),
2538
- }).strict();
2539
- export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
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;
2540
3073
  /**
2541
3074
  * **Notice: The TitleAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
2542
3075
  *
@@ -2583,7 +3116,7 @@ export const titleassetTitleAssetSchema = z.object({
2583
3116
  "center",
2584
3117
  ])),
2585
3118
  offset: z.optional(offsetOffsetSchema),
2586
- }).strict();
3119
+ });
2587
3120
  export const titleAssetSchema = titleassetTitleAssetSchema;
2588
3121
  /**
2589
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.
@@ -2592,31 +3125,40 @@ export const transformationTransformationSchema = z.object({
2592
3125
  rotate: z.optional(rotatetransformationRotateTransformationSchema),
2593
3126
  skew: z.optional(skewtransformationSkewTransformationSchema),
2594
3127
  flip: z.optional(fliptransformationFlipTransformationSchema),
2595
- }).strict();
3128
+ });
2596
3129
  export const transformationSchema = transformationTransformationSchema;
2597
3130
  /**
2598
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.
2599
3132
  */
2600
3133
  export const videoassetVideoAssetSchema = z.object({
2601
3134
  type: z.enum(["video"]),
2602
- src: z.string().regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").regex(/^(https?:\/\/|alias:\/\/)/, "URL must use http://, https://, or alias:// scheme").min(1).regex(/\S/),
3135
+ src: z.string().min(1).regex(/\S/),
2603
3136
  transcode: z.optional(z.boolean()),
2604
- trim: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2605
- return undefined; if (Array.isArray(v))
2606
- return v; if (typeof v === 'string')
2607
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2608
- volume: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
3137
+ trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2609
3138
  return undefined; if (Array.isArray(v))
2610
- return v; if (typeof v === 'string')
2611
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(1))), z.array(tweenTweenSchema)])),
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)])),
2612
3151
  volumeEffect: z.optional(z.enum(["none", "fadeIn", "fadeOut", "fadeInFadeOut"])),
2613
- speed: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2614
- return undefined; if (Array.isArray(v))
2615
- return v; if (typeof v === 'string')
2616
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0).lte(10)))),
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*\}\}$/)])),
2617
3159
  crop: z.optional(cropCropSchema),
2618
3160
  chromaKey: z.optional(chromakeyChromaKeySchema),
2619
- }).strict();
3161
+ });
2620
3162
  export const videoAssetSchema = videoassetVideoAssetSchema;
2621
3163
  /**
2622
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.
@@ -2635,6 +3177,7 @@ export const assetAssetSchema = z.discriminatedUnion("type", [
2635
3177
  svgassetSvgAssetSchema,
2636
3178
  texttoimageassetTextToImageAssetSchema,
2637
3179
  imagetovideoassetImageToVideoAssetSchema,
3180
+ texttospeechassetTextToSpeechAssetSchema,
2638
3181
  ]);
2639
3182
  export const assetSchema = assetAssetSchema;
2640
3183
  /**
@@ -2643,30 +3186,47 @@ export const assetSchema = assetAssetSchema;
2643
3186
  export const clipClipSchema = z.object({
2644
3187
  asset: assetAssetSchema,
2645
3188
  start: z.union([
2646
- z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2647
- return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2648
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0))),
2649
- z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/),
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*\}\}$/)]),
2650
3197
  ]),
2651
3198
  length: z.union([
2652
- z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2653
- return undefined; if (typeof v === 'string' && /^-?\d+(\.\d+)?$/.test(v))
2654
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(0))),
2655
- z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/),
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*\}\}$/)]),
2656
3207
  ]),
2657
3208
  fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
2658
- 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)
2659
3224
  return undefined; if (Array.isArray(v))
2660
- return v; if (typeof v === 'string')
2661
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())), z.array(tweenTweenSchema)])),
2662
- width: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2663
- return undefined; if (Array.isArray(v))
2664
- return v; if (typeof v === 'string')
2665
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(3840)))),
2666
- height: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2667
- return undefined; if (Array.isArray(v))
2668
- return v; if (typeof v === 'string')
2669
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number().gte(1).lte(2160)))),
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*\}\}$/)])),
2670
3230
  position: z.optional(z.enum([
2671
3231
  "top",
2672
3232
  "topRight",
@@ -2711,20 +3271,23 @@ export const clipClipSchema = z.object({
2711
3271
  "muted",
2712
3272
  "negative",
2713
3273
  ])),
2714
- opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2715
- return undefined; if (Array.isArray(v))
2716
- return v; if (typeof v === 'string')
2717
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number())), z.array(tweenTweenSchema)])),
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)])),
2718
3281
  transform: z.optional(transformationTransformationSchema),
2719
- alias: z.optional(z.string().regex(/^[A-Za-z0-9_-]+$/)),
2720
- }).strict();
3282
+ alias: z.optional(z.union([z.string().regex(/^[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
3283
+ });
2721
3284
  export const clipSchema = clipClipSchema;
2722
3285
  /**
2723
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.
2724
3287
  */
2725
3288
  export const trackTrackSchema = z.object({
2726
3289
  clips: z.array(clipClipSchema).min(1),
2727
- }).strict();
3290
+ });
2728
3291
  export const trackSchema = trackTrackSchema;
2729
3292
  /**
2730
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.
@@ -2735,7 +3298,7 @@ export const timelineTimelineSchema = z.object({
2735
3298
  fonts: z.optional(z.array(fontFontSchema)),
2736
3299
  tracks: z.array(trackTrackSchema).min(1),
2737
3300
  cache: z.optional(z.boolean()),
2738
- }).strict();
3301
+ });
2739
3302
  export const timelineSchema = timelineTimelineSchema;
2740
3303
  /**
2741
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.
@@ -2746,10 +3309,7 @@ export const editEditSchema = z.object({
2746
3309
  merge: z.optional(z.array(mergefieldMergeFieldSchema)),
2747
3310
  callback: z.optional(z.string()),
2748
3311
  disk: z.optional(z.enum(["local", "mount"])),
2749
- instance: z.optional(z.string()),
2750
- poster: z.optional(posterPosterSchema),
2751
- thumbnail: z.optional(thumbnailThumbnailSchema),
2752
- }).strict();
3312
+ });
2753
3313
  export const editSchema = editEditSchema;
2754
3314
  /**
2755
3315
  * The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
@@ -2768,21 +3328,27 @@ export const renderresponsedataRenderResponseDataSchema = z.object({
2768
3328
  "failed",
2769
3329
  ]),
2770
3330
  error: z.optional(z.string()),
2771
- duration: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2772
- return undefined; if (Array.isArray(v))
2773
- return v; if (typeof v === 'string')
2774
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
2775
- renderTime: z.optional(z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2776
- return undefined; if (Array.isArray(v))
2777
- return v; if (typeof v === 'string')
2778
- return Number(v); return v; }), z.preprocess(((v) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') return Number(v); return v; }), z.number()))),
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*\}\}$/)])),
2779
3345
  url: z.optional(z.string()),
2780
3346
  poster: z.optional(z.union([z.string(), z.null()])),
2781
3347
  thumbnail: z.optional(z.union([z.string(), z.null()])),
2782
3348
  data: z.optional(editEditSchema),
2783
3349
  created: z.optional(z.string()),
2784
3350
  updated: z.optional(z.string()),
2785
- }).strict();
3351
+ });
2786
3352
  export const renderResponseDataSchema = renderresponsedataRenderResponseDataSchema;
2787
3353
  /**
2788
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.
@@ -2791,7 +3357,7 @@ export const renderresponseRenderResponseSchema = z.object({
2791
3357
  success: z.boolean(),
2792
3358
  message: z.string(),
2793
3359
  response: renderresponsedataRenderResponseDataSchema,
2794
- }).strict();
3360
+ });
2795
3361
  export const renderResponseSchema = renderresponseRenderResponseSchema;
2796
3362
  /**
2797
3363
  * The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse).
@@ -2801,7 +3367,7 @@ export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
2801
3367
  name: z.string(),
2802
3368
  owner: z.string(),
2803
3369
  template: editEditSchema,
2804
- }).strict();
3370
+ });
2805
3371
  export const templateDataResponseDataSchema = templatedataresponsedataTemplateDataResponseDataSchema;
2806
3372
  /**
2807
3373
  * The template data including the template name and [Edit](#tocs_edit).
@@ -2810,7 +3376,7 @@ export const templatedataresponseTemplateDataResponseSchema = z.object({
2810
3376
  success: z.boolean(),
2811
3377
  message: z.string(),
2812
3378
  response: templatedataresponsedataTemplateDataResponseDataSchema,
2813
- }).strict();
3379
+ });
2814
3380
  export const templateDataResponseSchema = templatedataresponseTemplateDataResponseSchema;
2815
3381
  /**
2816
3382
  * A template is a saved [Edit](#tocs_edit) than can be loaded and re-used.
@@ -2818,7 +3384,7 @@ export const templateDataResponseSchema = templatedataresponseTemplateDataRespon
2818
3384
  export const templateTemplateSchema = z.object({
2819
3385
  name: z.string(),
2820
3386
  template: z.optional(editEditSchema),
2821
- }).strict();
3387
+ });
2822
3388
  export const templateSchema = templateTemplateSchema;
2823
3389
  export const postRenderRequest = z.object({
2824
3390
  body: editEditSchema,
@@ -2839,7 +3405,7 @@ export const getRenderRequest = z.object({
2839
3405
  query: z.optional(z.object({
2840
3406
  data: z.optional(z.boolean()),
2841
3407
  merged: z.optional(z.boolean()),
2842
- }).strict()),
3408
+ })),
2843
3409
  });
2844
3410
  /**
2845
3411
  * The render status details