@shotstack/schemas 1.3.9 → 1.4.1

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