@shotstack/schemas 1.0.1 → 1.1.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.
@@ -0,0 +1,2257 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { z } from "zod";
3
+ export const editRootSchema = z.unknown();
4
+ export const sourceRootSchema = z.unknown();
5
+ export const assetsRootSchema = z.unknown();
6
+ export const assetsidRootSchema = z.unknown();
7
+ export const assetsrenderidRootSchema = z.unknown();
8
+ export const generateassetRootSchema = z.unknown();
9
+ export const generateassetidRootSchema = z.unknown();
10
+ export const probeRootSchema = z.unknown();
11
+ export const renderRootSchema = z.unknown();
12
+ export const renderidRootSchema = z.unknown();
13
+ export const sourcesRootSchema = z.unknown();
14
+ export const sourcesidRootSchema = z.unknown();
15
+ export const templatesRootSchema = z.unknown();
16
+ export const templatesidRootSchema = z.unknown();
17
+ export const templatesrenderRootSchema = z.unknown();
18
+ export const uploadRootSchema = z.unknown();
19
+ /**
20
+ * Displays a background box behind the caption text.
21
+ */
22
+ export const captionpropertiesCaptionBackgroundSchema = z.object({
23
+ color: z.optional(z.string()),
24
+ opacity: z.optional(z.number()),
25
+ padding: z.optional(z.int()),
26
+ borderRadius: z.optional(z.int()),
27
+ });
28
+ export const captionBackgroundSchema = captionpropertiesCaptionBackgroundSchema;
29
+ /**
30
+ * Font properties for captions text.
31
+ */
32
+ export const captionpropertiesCaptionFontSchema = z.object({
33
+ family: z.optional(z.string()),
34
+ color: z.optional(z.string()),
35
+ opacity: z.optional(z.number()),
36
+ size: z.optional(z.int()),
37
+ lineHeight: z.optional(z.number()),
38
+ stroke: z.optional(z.string()),
39
+ strokeWidth: z.optional(z.number()),
40
+ });
41
+ export const captionFontSchema = captionpropertiesCaptionFontSchema;
42
+ /**
43
+ * The margin properties for captions. Margins are used to position the caption text and background on the screen.
44
+ */
45
+ export const captionpropertiesCaptionMarginSchema = z.object({
46
+ top: z.optional(z.number()),
47
+ left: z.optional(z.number()),
48
+ right: z.optional(z.number()),
49
+ });
50
+ export const captionMarginSchema = captionpropertiesCaptionMarginSchema;
51
+ /**
52
+ * The CaptionAsset is used to add captions (subtitles) to a video. It uses a supplied SRT or VTT file which will
53
+ * be read and burnt to the video.
54
+ *
55
+ * Captions can be applied independently from a video or audio file for greater
56
+ * flexibility with styling and layout. For example you can scale, position or crop a video without modifying the
57
+ * captions.
58
+ *
59
+ * To sync captions with a video or audio file use a [Video](#tocs_videoasset") or [Audio](#tocs_audioasset") with
60
+ * matching start and end time.
61
+ *
62
+ */
63
+ export const captionassetCaptionAssetSchema = z.object({
64
+ type: z.string().default("caption"),
65
+ src: z.string(),
66
+ font: z.optional(captionpropertiesCaptionFontSchema),
67
+ background: z.optional(captionpropertiesCaptionBackgroundSchema),
68
+ margin: z.optional(captionpropertiesCaptionMarginSchema),
69
+ trim: z.optional(z.number()),
70
+ speed: z.optional(z.number().gte(0).lte(10)),
71
+ });
72
+ export const captionAssetSchema = captionassetCaptionAssetSchema;
73
+ /**
74
+ * Chroma key, commonly known as green screen, is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments.
75
+ */
76
+ export const chromakeyChromaKeySchema = z.object({
77
+ color: z.optional(z.string()),
78
+ threshold: z.optional(z.int().gte(0).lte(250)),
79
+ halo: z.optional(z.int().gte(0).lte(250)),
80
+ });
81
+ export const chromaKeySchema = chromakeyChromaKeySchema;
82
+ /**
83
+ * 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
+ */
85
+ export const didTextToAvatarOptionsDidTextToAvatarOptionsSchema = z.object({
86
+ type: z.enum(["text-to-avatar"]),
87
+ text: z.string(),
88
+ avatar: z.enum(["jack", "lana", "lily", "matt", "rian"]),
89
+ background: z.optional(z.string()),
90
+ });
91
+ export const didTextToAvatarOptionsSchema = didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
92
+ /**
93
+ * Generate assets using the third party D-ID provider AI services.
94
+ *
95
+ * The following AI generation services are available: <ul>
96
+ * <li><a href="#tocs_didtexttoavataroptions">DidTextToAvatarOptions</a></li>
97
+ * </ul>
98
+ */
99
+ export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = z
100
+ .object({
101
+ type: z.literal("didTextToAvatarOptions_DIDTextToAvatarOptions"),
102
+ })
103
+ .and(didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
104
+ export const didGeneratedAssetOptionsSchema = didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
105
+ /**
106
+ * 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
+ */
108
+ export const didGeneratedAssetDidGeneratedAssetSchema = z.object({
109
+ provider: z.enum(["d-id"]),
110
+ options: didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema,
111
+ });
112
+ export const didGeneratedAssetSchema = didGeneratedAssetDidGeneratedAssetSchema;
113
+ /**
114
+ * 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
+ */
116
+ export const elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema = z.object({
117
+ type: z.enum(["text-to-speech"]),
118
+ text: z.string(),
119
+ voice: z.enum([
120
+ "Adam",
121
+ "Antoni",
122
+ "Arnold",
123
+ "Bella",
124
+ "Domi",
125
+ "Elli",
126
+ "Josh",
127
+ "Rachel",
128
+ "Sam",
129
+ ]),
130
+ });
131
+ export const elevenLabsTextToSpeechOptionsSchema = elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
132
+ /**
133
+ * Generate assets using the third party ElevenLabs provider AI services.
134
+ *
135
+ * The following AI generation services are available: <ul>
136
+ * <li><a href="#tocs_elevenlabstexttospeechoptions">ElevenLabsTextToSpeechOptions</a></li>
137
+ * </ul>
138
+ */
139
+ export const elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema = z
140
+ .object({
141
+ type: z.literal("elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions"),
142
+ })
143
+ .and(elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
144
+ export const elevenLabsGeneratedAssetOptionsSchema = elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
145
+ /**
146
+ * 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
+ */
148
+ export const elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema = z.object({
149
+ provider: z.enum(["elevenlabs"]),
150
+ options: elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema,
151
+ });
152
+ export const elevenLabsGeneratedAssetSchema = elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
153
+ /**
154
+ * 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
+ */
156
+ export const heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema = z.object({
157
+ type: z.enum(["text-to-avatar"]),
158
+ text: z.string(),
159
+ 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",
185
+ ]),
186
+ 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",
271
+ ]),
272
+ avatarStyle: z.optional(z.enum(["normal", "circle"])),
273
+ background: z.optional(z.string()),
274
+ ratio: z.optional(z.enum(["16:9", "9:16"])),
275
+ test: z.optional(z.boolean()),
276
+ });
277
+ export const heyGenTextToAvatarOptionsSchema = heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
278
+ /**
279
+ * Generate assets using the third party HeyGen provider AI services.
280
+ *
281
+ * The following AI generation services are available: <ul>
282
+ * <li><a href="#tocs_heygentexttoavataroptions">HeyGenTextToAvatarOptions</a></li>
283
+ * </ul>
284
+ */
285
+ export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = z
286
+ .object({
287
+ type: z.literal("heygenTextToAvatarOptions_HeyGenTextToAvatarOptions"),
288
+ })
289
+ .and(heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
290
+ export const heyGenGeneratedAssetOptionsSchema = heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
291
+ /**
292
+ * 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
+ */
294
+ export const heygenGeneratedAssetHeyGenGeneratedAssetSchema = z.object({
295
+ provider: z.enum(["heygen"]),
296
+ options: heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema,
297
+ });
298
+ export const heyGenGeneratedAssetSchema = heygenGeneratedAssetHeyGenGeneratedAssetSchema;
299
+ /**
300
+ * 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
+ */
302
+ export const openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema = z.object({
303
+ type: z.enum(["text-generator"]),
304
+ prompt: z.string(),
305
+ model: z.enum(["gpt-3.5-turbo", "gpt-4"]),
306
+ systemPrompt: z.optional(z.string()),
307
+ });
308
+ export const openAiTextGeneratorOptionsSchema = openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
309
+ /**
310
+ * Generate assets using OpenAI provider AI services.
311
+ *
312
+ * The following AI generation services are available: <ul>
313
+ * <li><a href="#tocs_openaitextgeneratoroptions">OpenAiTextGeneratorOptions</a></li>
314
+ * </ul>
315
+ */
316
+ export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = z
317
+ .object({
318
+ type: z.literal("openaiTextGeneratorOptions_OpenAiTextGeneratorOptions"),
319
+ })
320
+ .and(openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
321
+ export const openAiGeneratedAssetOptionsSchema = openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
322
+ /**
323
+ * 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
+ */
325
+ export const openaiGeneratedAssetOpenAiGeneratedAssetSchema = z.object({
326
+ provider: z.enum(["openai"]),
327
+ options: openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema,
328
+ });
329
+ export const openAiGeneratedAssetSchema = openaiGeneratedAssetOpenAiGeneratedAssetSchema;
330
+ /**
331
+ * Individual errors returned by the Create API.
332
+ */
333
+ export const generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema = z.object({
334
+ status: z.string(),
335
+ title: z.string(),
336
+ detail: z.string(),
337
+ });
338
+ export const generatedAssetErrorResponseDataSchema = generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
339
+ /**
340
+ * Error response data for validation and other errors returned by the Create API.
341
+ */
342
+ export const generatedAssetErrorResponseGeneratedAssetErrorResponseSchema = z.object({
343
+ errors: z.array(generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema),
344
+ });
345
+ export const generatedAssetErrorResponseSchema = generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
346
+ /**
347
+ * The id and attributes of the generated asset.
348
+ */
349
+ export const generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema = z.object({
350
+ owner: z.string(),
351
+ provider: z.enum(["shotstack", "elevenlabs", "heygen", "d-id"]),
352
+ type: z.enum(["text-to-speech", "text-to-avatar"]),
353
+ url: z.optional(z.string()),
354
+ status: z.enum(["queued", "processing", "saving", "done", "failed"]),
355
+ created: z.string(),
356
+ updated: z.string(),
357
+ });
358
+ export const generatedAssetResponseAttributesSchema = generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
359
+ /**
360
+ * The type of resource (an asset), it's id and attributes of the generated file.
361
+ */
362
+ export const generatedAssetResponseDataGeneratedAssetResponseDataSchema = z.object({
363
+ type: z.string(),
364
+ id: z.string(),
365
+ attributes: generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema,
366
+ });
367
+ export const generatedAssetResponseDataSchema = generatedAssetResponseDataGeneratedAssetResponseDataSchema;
368
+ /**
369
+ * 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
+ */
371
+ export const generatedAssetResponseGeneratedAssetResponseSchema = z.object({
372
+ data: generatedAssetResponseDataGeneratedAssetResponseDataSchema,
373
+ });
374
+ export const generatedAssetResponseSchema = generatedAssetResponseGeneratedAssetResponseSchema;
375
+ /**
376
+ * 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
+ */
378
+ export const shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = z.object({
379
+ type: z.enum(["image-to-video"]),
380
+ imageUrl: z.string(),
381
+ guidanceScale: z.optional(z.number()).default(1.8),
382
+ motion: z.optional(z.int()).default(127),
383
+ });
384
+ export const shotstackImageToVideoOptionsSchema = shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
385
+ /**
386
+ * 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
+ */
388
+ export const shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema = z.object({
389
+ type: z.enum(["text-generator"]),
390
+ prompt: z.string(),
391
+ });
392
+ export const shotstackTextGeneratorOptionsSchema = shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
393
+ /**
394
+ * 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
+ */
396
+ export const shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = z.object({
397
+ type: z.enum(["text-to-image"]),
398
+ prompt: z.string(),
399
+ width: z.int(),
400
+ height: z.int(),
401
+ });
402
+ export const shotstackTextToImageOptionsSchema = shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
403
+ /**
404
+ * 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
+ */
406
+ export const shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema = z.object({
407
+ type: z.enum(["text-to-speech"]),
408
+ text: z.string(),
409
+ 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",
467
+ ]),
468
+ 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",
498
+ ])),
499
+ newscaster: z.optional(z.boolean()).default(false),
500
+ });
501
+ export const shotstackTextToSpeechOptionsSchema = shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
502
+ /**
503
+ * Generate assets using the native Shotstack provider AI services.
504
+ */
505
+ 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),
526
+ ]);
527
+ export const shotstackGeneratedAssetOptionsSchema = shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema;
528
+ /**
529
+ * 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
+ */
531
+ export const shotstackGeneratedAssetShotstackGeneratedAssetSchema = z.object({
532
+ provider: z.enum(["shotstack"]),
533
+ options: shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema,
534
+ });
535
+ export const shotstackGeneratedAssetSchema = shotstackGeneratedAssetShotstackGeneratedAssetSchema;
536
+ /**
537
+ * 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
+ */
539
+ export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = z.object({
540
+ type: z.enum(["text-to-image"]),
541
+ prompt: z.string(),
542
+ 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",
548
+ ])),
549
+ width: z.int(),
550
+ height: z.int(),
551
+ steps: z.optional(z.int()).default(30),
552
+ seed: z.optional(z.int()).default(0),
553
+ cfgScale: z.optional(z.number()).default(7),
554
+ 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
+ ])),
573
+ });
574
+ export const stabilityAiTextToImageOptionsSchema = stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
575
+ /**
576
+ * Generate assets using Stability AI provider AI services.
577
+ *
578
+ * The following AI generation services are available: <ul>
579
+ * <li><a href="#tocs_stabilityaitexttoimageoptions">StabilityAiTextToImageOptions</a></li>
580
+ * </ul>
581
+ */
582
+ export const stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = z
583
+ .object({
584
+ type: z.literal("stabilityAiTextToImageOptions_StabilityAiTextToImageOptions"),
585
+ })
586
+ .and(stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
587
+ export const stabilityAiGeneratedAssetOptionsSchema = stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
588
+ /**
589
+ * 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
+ */
591
+ export const stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema = z.object({
592
+ provider: z.enum(["stability-ai"]),
593
+ options: stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema,
594
+ });
595
+ export const stabilityAiGeneratedAssetSchema = stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
596
+ /**
597
+ * 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
+ */
599
+ 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),
630
+ ]);
631
+ export const generatedAssetSchema = generatedAssetGeneratedAssetSchema;
632
+ /**
633
+ * 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
+ */
635
+ export const cropCropSchema = z.object({
636
+ top: z.optional(z.number().gte(0).lte(1)),
637
+ bottom: z.optional(z.number().gte(0).lte(1)),
638
+ left: z.optional(z.number().gte(0).lte(1)),
639
+ right: z.optional(z.number().gte(0).lte(1)),
640
+ });
641
+ export const cropSchema = cropCropSchema;
642
+ /**
643
+ * Pass additional options to control how files are stored in Google Cloud Storage.
644
+ */
645
+ export const googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema = z.object({
646
+ bucket: z.string(),
647
+ prefix: z.optional(z.string()),
648
+ filename: z.optional(z.string()),
649
+ });
650
+ export const googleCloudStorageDestinationOptionsSchema = googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema;
651
+ /**
652
+ * 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
+ */
654
+ export const googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = z.object({
655
+ provider: z.string().default("google-cloud-storage"),
656
+ options: z.optional(googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema),
657
+ });
658
+ export const googleCloudStorageDestinationSchema = googleCloudStorageDestinationGoogleCloudStorageDestinationSchema;
659
+ /**
660
+ * Pass the folder ID and options to configure how assets are stored in Google Drive.
661
+ */
662
+ export const googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = z.object({
663
+ folderId: z.string(),
664
+ filename: z.optional(z.string()),
665
+ });
666
+ export const googleDriveDestinationOptionsSchema = googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema;
667
+ /**
668
+ * 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
+ */
670
+ export const googleDriveDestinationGoogleDriveDestinationSchema = z.object({
671
+ provider: z.string().default("google-drive"),
672
+ options: googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema,
673
+ });
674
+ export const googleDriveDestinationSchema = googleDriveDestinationGoogleDriveDestinationSchema;
675
+ /**
676
+ * Pass additional options to control how Mux processes video. Currently supports playback_policy and passthrough options.
677
+ */
678
+ export const muxDestinationOptionsMuxDestinationOptionsSchema = z.object({
679
+ playbackPolicy: z.optional(z.array(z.enum(["public", "signed"]))),
680
+ passthrough: z.optional(z.string().max(255)),
681
+ });
682
+ export const muxDestinationOptionsSchema = muxDestinationOptionsMuxDestinationOptionsSchema;
683
+ /**
684
+ * 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
+ */
686
+ export const muxDestinationMuxDestinationSchema = z.object({
687
+ provider: z.string().default("mux"),
688
+ options: z.optional(muxDestinationOptionsMuxDestinationOptionsSchema),
689
+ });
690
+ export const muxDestinationSchema = muxDestinationMuxDestinationSchema;
691
+ /**
692
+ * Pass additional options to control how files are stored in S3.
693
+ */
694
+ export const s3DestinationOptionsS3DestinationOptionsSchema = z.object({
695
+ region: z.string(),
696
+ bucket: z.string(),
697
+ prefix: z.optional(z.string()),
698
+ filename: z.optional(z.string()),
699
+ acl: z.optional(z.string()),
700
+ });
701
+ export const s3DestinationOptionsSchema = s3DestinationOptionsS3DestinationOptionsSchema;
702
+ /**
703
+ * 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
+ */
705
+ export const s3DestinationS3DestinationSchema = z.object({
706
+ provider: z.string().default("s3"),
707
+ options: z.optional(s3DestinationOptionsS3DestinationOptionsSchema),
708
+ });
709
+ export const s3DestinationSchema = s3DestinationS3DestinationSchema;
710
+ /**
711
+ * 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
+ */
713
+ export const shotstackDestinationShotstackDestinationSchema = z.object({
714
+ provider: z.string().default("shotstack"),
715
+ exclude: z.optional(z.boolean()),
716
+ });
717
+ export const shotstackDestinationSchema = shotstackDestinationShotstackDestinationSchema;
718
+ /**
719
+ * Options to control the visibility of videos and privacy features.
720
+ */
721
+ export const vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = z.object({
722
+ view: z.optional(z.enum(["anybody", "nobody", "contacts", "password", "unlisted"])),
723
+ embed: z.optional(z.enum(["public", "private", "whitelist"])),
724
+ comments: z.optional(z.enum(["anybody", "nobody", "contacts"])),
725
+ });
726
+ export const vimeoDestinationPrivacyOptionsSchema = vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema;
727
+ /**
728
+ * Pass additional options to control how Vimeo publishes video, including name, description and privacy settings.
729
+ */
730
+ export const vimeoDestinationOptionsVimeoDestinationOptionsSchema = z.object({
731
+ name: z.optional(z.string()),
732
+ description: z.optional(z.string()),
733
+ privacy: z.optional(vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema),
734
+ });
735
+ export const vimeoDestinationOptionsSchema = vimeoDestinationOptionsVimeoDestinationOptionsSchema;
736
+ /**
737
+ * 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.
738
+ */
739
+ export const vimeoDestinationVimeoDestinationSchema = z.object({
740
+ provider: z.string().default("vimeo"),
741
+ options: z.optional(vimeoDestinationOptionsVimeoDestinationOptionsSchema),
742
+ });
743
+ export const vimeoDestinationSchema = vimeoDestinationVimeoDestinationSchema;
744
+ /**
745
+ * A destination is a location where assets can be sent to for serving or hosting. Videos, images and audio files that are rendered by the [Edit API](#shotstack-edit) and [source](#tocs_source) and [rendition](#tocs_rendition) files generated by the [Ingest API](#shotstack-ingest) can be sent to destinations. You can also fetch a file from any public URL and [transfer](#transfer-asset) it to a destination. A file can be sent to one or more destinations including 3rd party destinations.
746
+ *
747
+ * 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**.
748
+ */
749
+ export const destinationsDestinationsSchema = z.union([
750
+ z
751
+ .object({
752
+ destinations: z.optional(z.literal("shotstackDestination_ShotstackDestination")),
753
+ })
754
+ .and(shotstackDestinationShotstackDestinationSchema),
755
+ z
756
+ .object({
757
+ destinations: z.optional(z.literal("muxDestination_MuxDestination")),
758
+ })
759
+ .and(muxDestinationMuxDestinationSchema),
760
+ z
761
+ .object({
762
+ destinations: z.optional(z.literal("s3Destination_S3Destination")),
763
+ })
764
+ .and(s3DestinationS3DestinationSchema),
765
+ z
766
+ .object({
767
+ destinations: z.optional(z.literal("googleCloudStorageDestination_GoogleCloudStorageDestination")),
768
+ })
769
+ .and(googleCloudStorageDestinationGoogleCloudStorageDestinationSchema),
770
+ z
771
+ .object({
772
+ destinations: z.optional(z.literal("googleDriveDestination_GoogleDriveDestination")),
773
+ })
774
+ .and(googleDriveDestinationGoogleDriveDestinationSchema),
775
+ z
776
+ .object({
777
+ destinations: z.optional(z.literal("vimeoDestination_VimeoDestination")),
778
+ })
779
+ .and(vimeoDestinationVimeoDestinationSchema),
780
+ ]);
781
+ export const destinationsSchema = destinationsDestinationsSchema;
782
+ /**
783
+ * Flip a clip vertically or horizontally. Acts as a mirror effect of the clip along the selected plane.
784
+ */
785
+ export const fliptransformationFlipTransformationSchema = z.object({
786
+ horizontal: z.optional(z.boolean()),
787
+ vertical: z.optional(z.boolean()),
788
+ });
789
+ export const flipTransformationSchema = fliptransformationFlipTransformationSchema;
790
+ /**
791
+ * 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.
792
+ */
793
+ export const fontFontSchema = z.object({
794
+ src: z.string(),
795
+ });
796
+ export const fontSchema = fontFontSchema;
797
+ /**
798
+ * **Notice: The HtmlAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
799
+ *
800
+ * The HtmlAsset clip type lets you create text based layout and formatting using
801
+ * HTML and CSS. You can also set the height and width of a bounding box for the HTML
802
+ * content to sit within. Text and elements will wrap within the bounding box.
803
+ *
804
+ *
805
+ * @deprecated
806
+ */
807
+ export const htmlassetHtmlAssetSchema = z.object({
808
+ type: z.string().default("html"),
809
+ html: z.string(),
810
+ css: z.optional(z.string()),
811
+ width: z.optional(z.int()),
812
+ height: z.optional(z.int()),
813
+ background: z.optional(z.string()),
814
+ position: z.optional(z.enum([
815
+ "top",
816
+ "topRight",
817
+ "right",
818
+ "bottomRight",
819
+ "bottom",
820
+ "bottomLeft",
821
+ "left",
822
+ "topLeft",
823
+ "center",
824
+ ])),
825
+ });
826
+ export const htmlAssetSchema = htmlassetHtmlAssetSchema;
827
+ /**
828
+ * 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.
829
+ */
830
+ export const imageassetImageAssetSchema = z.object({
831
+ type: z.string().default("image"),
832
+ src: z.string(),
833
+ crop: z.optional(cropCropSchema),
834
+ });
835
+ export const imageAssetSchema = imageassetImageAssetSchema;
836
+ /**
837
+ * The ImageToVideoAsset lets you create a video from an image and a text prompt.
838
+ */
839
+ export const imagetovideoassetImageToVideoAssetSchema = z.object({
840
+ type: z.optional(z.enum(["image-to-video"])),
841
+ src: z.optional(z.string()),
842
+ prompt: z.optional(z.string()),
843
+ aspectRatio: z.optional(z.enum(["1:1", "4:3", "16:9", "9:16", "3:4", "21:9", "9:21"])),
844
+ speed: z.optional(z.number().gte(0).lte(10)),
845
+ crop: z.optional(cropCropSchema),
846
+ });
847
+ export const imageToVideoAssetSchema = imagetovideoassetImageToVideoAssetSchema;
848
+ /**
849
+ * Options for the Dolby.io audio enhancement provider.
850
+ */
851
+ export const dolbyEnhancementOptionsDolbyEnhancementOptionsSchema = z.object({
852
+ preset: z.enum([
853
+ "conference",
854
+ "interview",
855
+ "lecture",
856
+ "meeting",
857
+ "mobile_phone",
858
+ "music",
859
+ "podcast",
860
+ "studio",
861
+ "voice_over",
862
+ ]),
863
+ });
864
+ export const dolbyEnhancementOptionsSchema = dolbyEnhancementOptionsDolbyEnhancementOptionsSchema;
865
+ /**
866
+ * 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.
867
+ */
868
+ export const dolbyEnhancementDolbyEnhancementSchema = z.object({
869
+ provider: z.string().default("dolby"),
870
+ options: dolbyEnhancementOptionsDolbyEnhancementOptionsSchema,
871
+ });
872
+ export const dolbyEnhancementSchema = dolbyEnhancementDolbyEnhancementSchema;
873
+ /**
874
+ * An audio enhancement that can be applied to the audio content of a rendition.
875
+ * The following providers are available: <ul>
876
+ * <li><a href="#tocs_dolbyenhancement">DolbyEnhancement</a></li>
877
+ * </ul>
878
+ */
879
+ export const audioEnhancementAudioEnhancementSchema = z
880
+ .object({
881
+ enhancement: z.literal("dolbyEnhancement_DolbyEnhancement"),
882
+ })
883
+ .and(dolbyEnhancementDolbyEnhancementSchema);
884
+ export const audioEnhancementSchema = audioEnhancementAudioEnhancementSchema;
885
+ /**
886
+ * Enhancements that can be applied to a rendition. Currently only supports the Dolby audio enhancement.
887
+ */
888
+ export const enhancementsEnhancementsSchema = z.object({
889
+ audio: z.optional(audioEnhancementAudioEnhancementSchema),
890
+ });
891
+ export const enhancementsSchema = enhancementsEnhancementsSchema;
892
+ /**
893
+ * Individual errors returned by the Ingest API.
894
+ */
895
+ export const ingesterrorresponsedataIngestErrorResponseDataSchema = z.object({
896
+ status: z.string(),
897
+ title: z.string(),
898
+ detail: z.string(),
899
+ });
900
+ export const ingestErrorResponseDataSchema = ingesterrorresponsedataIngestErrorResponseDataSchema;
901
+ /**
902
+ * Error response data for validation and other errors returned by the Ingest API.
903
+ */
904
+ export const ingesterrorresponseIngestErrorResponseSchema = z.object({
905
+ errors: z.array(ingesterrorresponsedataIngestErrorResponseDataSchema),
906
+ });
907
+ export const ingestErrorResponseSchema = ingesterrorresponseIngestErrorResponseSchema;
908
+ /**
909
+ * The type of resource (a source) and the newly created source id. Returned with [QueuedSourceResponse](#tocs_queuedsourceresponse).
910
+ */
911
+ export const queuedsourceresponsedataQueuedSourceResponseDataSchema = z.object({
912
+ type: z.string(),
913
+ id: z.string(),
914
+ });
915
+ export const queuedSourceResponseDataSchema = queuedsourceresponsedataQueuedSourceResponseDataSchema;
916
+ /**
917
+ * 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.
918
+ */
919
+ export const queuedsourceresponseQueuedSourceResponseSchema = z.object({
920
+ data: queuedsourceresponsedataQueuedSourceResponseDataSchema,
921
+ });
922
+ export const queuedSourceResponseSchema = queuedsourceresponseQueuedSourceResponseSchema;
923
+ /**
924
+ * The id and attributes of the upload file including the signed URL to send the binary file data to.
925
+ */
926
+ export const uploadresponseattributesUploadResponseAttributesSchema = z.object({
927
+ id: z.string(),
928
+ url: z.string(),
929
+ expires: z.string(),
930
+ });
931
+ export const uploadResponseAttributesSchema = uploadresponseattributesUploadResponseAttributesSchema;
932
+ /**
933
+ * The type of resource (an upload), it's id and attributes of the upload request.
934
+ */
935
+ export const uploadresponsedataUploadResponseDataSchema = z.object({
936
+ type: z.string(),
937
+ id: z.string(),
938
+ attributes: uploadresponseattributesUploadResponseAttributesSchema,
939
+ });
940
+ export const uploadResponseDataSchema = uploadresponsedataUploadResponseDataSchema;
941
+ /**
942
+ * 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.
943
+ */
944
+ export const uploadresponseUploadResponseSchema = z.object({
945
+ data: uploadresponsedataUploadResponseDataSchema,
946
+ });
947
+ export const uploadResponseSchema = uploadresponseUploadResponseSchema;
948
+ /**
949
+ * 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.
950
+ */
951
+ export const speedSpeedSchema = z.object({
952
+ speed: z.optional(z.number().gte(0).lte(10)),
953
+ preservePitch: z.optional(z.boolean()),
954
+ });
955
+ export const speedSchema = speedSpeedSchema;
956
+ /**
957
+ * Generate a transcription of the audio in the video. The transcription can be output as a file in SRT or VTT format.
958
+ */
959
+ export const transcriptionTranscriptionSchema = z.object({
960
+ format: z.optional(z.enum(["srt", "vtt"])),
961
+ });
962
+ export const transcriptionSchema = transcriptionTranscriptionSchema;
963
+ /**
964
+ * 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.
965
+ */
966
+ export const lumaassetLumaAssetSchema = z.object({
967
+ type: z.string().default("luma"),
968
+ src: z.string(),
969
+ trim: z.optional(z.number()),
970
+ });
971
+ export const lumaAssetSchema = lumaassetLumaAssetSchema;
972
+ /**
973
+ * A merge field consists of a key; `find`, and a value; `replace`. Merge fields can be used to replace placeholders within the JSON edit to create re-usable templates. Placeholders should be a string with double brace delimiters, i.e. `"{{NAME}}"`. A placeholder can be used for any value within the JSON edit.
974
+ */
975
+ export const mergefieldMergeFieldSchema = z.object({
976
+ find: z.string(),
977
+ replace: z.unknown(),
978
+ });
979
+ export const mergeFieldSchema = mergefieldMergeFieldSchema;
980
+ /**
981
+ * 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.
982
+ */
983
+ export const posterPosterSchema = z.object({
984
+ capture: z.number(),
985
+ });
986
+ export const posterSchema = posterPosterSchema;
987
+ /**
988
+ * 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.
989
+ */
990
+ export const rangeRangeSchema = z.object({
991
+ start: z.optional(z.number().gte(0)),
992
+ length: z.optional(z.number().gte(0)),
993
+ });
994
+ export const rangeSchema = rangeRangeSchema;
995
+ /**
996
+ * The list of asset attributes and their values.
997
+ */
998
+ export const assetresponseattributesAssetResponseAttributesSchema = z.object({
999
+ id: z.string(),
1000
+ owner: z.string(),
1001
+ region: z.optional(z.string()),
1002
+ renderId: z.optional(z.string()),
1003
+ providerId: z.optional(z.string()),
1004
+ filename: z.optional(z.string()),
1005
+ url: z.optional(z.string()),
1006
+ status: z.enum(["importing", "ready", "failed", "deleted"]),
1007
+ created: z.optional(z.string()),
1008
+ updated: z.optional(z.string()),
1009
+ });
1010
+ export const assetResponseAttributesSchema = assetresponseattributesAssetResponseAttributesSchema;
1011
+ /**
1012
+ * The type of resource (an asset) and attributes of the asset.
1013
+ */
1014
+ export const assetresponsedataAssetResponseDataSchema = z.object({
1015
+ type: z.string(),
1016
+ attributes: assetresponseattributesAssetResponseAttributesSchema,
1017
+ });
1018
+ export const assetResponseDataSchema = assetresponsedataAssetResponseDataSchema;
1019
+ /**
1020
+ * 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.
1021
+ */
1022
+ export const assetrenderresponseAssetRenderResponseSchema = z.object({
1023
+ data: z.array(assetresponsedataAssetResponseDataSchema),
1024
+ });
1025
+ export const assetRenderResponseSchema = assetrenderresponseAssetRenderResponseSchema;
1026
+ /**
1027
+ * 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.
1028
+ */
1029
+ export const assetresponseAssetResponseSchema = z.object({
1030
+ data: assetresponsedataAssetResponseDataSchema,
1031
+ });
1032
+ export const assetResponseSchema = assetresponseAssetResponseSchema;
1033
+ /**
1034
+ * The response received after a [probe request](#inspect-media) is submitted. The probe requests returns data from FFprobe formatted as JSON.
1035
+ */
1036
+ export const proberesponseProbeResponseSchema = z.object({
1037
+ success: z.boolean(),
1038
+ message: z.string(),
1039
+ response: z.record(z.string(), z.unknown()),
1040
+ });
1041
+ export const probeResponseSchema = proberesponseProbeResponseSchema;
1042
+ /**
1043
+ * The response data returned with the [QueuedResponse](#tocs_queuedresponse).
1044
+ */
1045
+ export const queuedresponsedataQueuedResponseDataSchema = z.object({
1046
+ message: z.string(),
1047
+ id: z.string(),
1048
+ });
1049
+ export const queuedResponseDataSchema = queuedresponsedataQueuedResponseDataSchema;
1050
+ /**
1051
+ * The response received after a [render request](#render-asset) or [template render](#render-template) is submitted. The render task is queued for rendering and a unique render id is returned.
1052
+ */
1053
+ export const queuedresponseQueuedResponseSchema = z.object({
1054
+ success: z.boolean(),
1055
+ message: z.string(),
1056
+ response: queuedresponsedataQueuedResponseDataSchema,
1057
+ });
1058
+ export const queuedResponseSchema = queuedresponseQueuedResponseSchema;
1059
+ /**
1060
+ * The individual template item returned with the [TemplateListResponseData](#tocs_templatelistresponsedata) templates list.
1061
+ */
1062
+ export const templatelistresponseitemTemplateListResponseItemSchema = z.object({
1063
+ id: z.string(),
1064
+ name: z.string(),
1065
+ created: z.optional(z.string()),
1066
+ updated: z.optional(z.string()),
1067
+ });
1068
+ export const templateListResponseItemSchema = templatelistresponseitemTemplateListResponseItemSchema;
1069
+ /**
1070
+ * The response data returned with the [TemplateListResponse](#tocs_templatelistresponse).
1071
+ */
1072
+ export const templatelistresponsedataTemplateListResponseDataSchema = z.object({
1073
+ owner: z.string(),
1074
+ templates: z.array(templatelistresponseitemTemplateListResponseItemSchema),
1075
+ });
1076
+ export const templateListResponseDataSchema = templatelistresponsedataTemplateListResponseDataSchema;
1077
+ /**
1078
+ * A list of previously saved templates.
1079
+ */
1080
+ export const templatelistresponseTemplateListResponseSchema = z.object({
1081
+ success: z.boolean(),
1082
+ message: z.string(),
1083
+ response: templatelistresponsedataTemplateListResponseDataSchema,
1084
+ });
1085
+ export const templateListResponseSchema = templatelistresponseTemplateListResponseSchema;
1086
+ /**
1087
+ * The response data returned with the [TemplateResponse](#tocs_templateresponse).
1088
+ */
1089
+ export const templateresponsedataTemplateResponseDataSchema = z.object({
1090
+ message: z.string(),
1091
+ id: z.string(),
1092
+ });
1093
+ export const templateResponseDataSchema = templateresponsedataTemplateResponseDataSchema;
1094
+ /**
1095
+ * The response received after a [template](#create-template) is submitted. The template is saved and a unique template id is returned.
1096
+ */
1097
+ export const templateresponseTemplateResponseSchema = z.object({
1098
+ success: z.boolean(),
1099
+ message: z.string(),
1100
+ response: templateresponsedataTemplateResponseDataSchema,
1101
+ });
1102
+ export const templateResponseSchema = templateresponseTemplateResponseSchema;
1103
+ /**
1104
+ * Text alignment properties (horizontal and vertical).
1105
+ */
1106
+ export const richtextpropertiesRichTextAlignmentSchema = z.object({
1107
+ horizontal: z.optional(z.enum(["left", "center", "right"])),
1108
+ vertical: z.optional(z.enum(["top", "middle", "bottom"])),
1109
+ });
1110
+ export const richTextAlignmentSchema = richtextpropertiesRichTextAlignmentSchema;
1111
+ /**
1112
+ * Animation properties for text entrance effects.
1113
+ */
1114
+ export const richtextpropertiesRichTextAnimationSchema = z.object({
1115
+ preset: z.enum([
1116
+ "fadeIn",
1117
+ "slideIn",
1118
+ "typewriter",
1119
+ "ascend",
1120
+ "shift",
1121
+ "movingLetters",
1122
+ ]),
1123
+ speed: z.optional(z.number().gte(0.1).lte(10)).default(1),
1124
+ duration: z.optional(z.number().gte(0.1).lte(30)),
1125
+ style: z.optional(z.enum(["character", "word"])),
1126
+ direction: z.optional(z.enum(["left", "right", "up", "down"])),
1127
+ });
1128
+ export const richTextAnimationSchema = richtextpropertiesRichTextAnimationSchema;
1129
+ /**
1130
+ * Background styling properties for the text bounding box.
1131
+ */
1132
+ export const richtextpropertiesRichTextBackgroundSchema = z.object({
1133
+ color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)),
1134
+ opacity: z.optional(z.number().gte(0).lte(1)).default(1),
1135
+ borderRadius: z.optional(z.number().gte(0)).default(0),
1136
+ });
1137
+ export const richTextBackgroundSchema = richtextpropertiesRichTextBackgroundSchema;
1138
+ /**
1139
+ * Font properties for rich text.
1140
+ */
1141
+ export const richtextpropertiesRichTextFontSchema = z.object({
1142
+ family: z.optional(z.string()).default("Open Sans"),
1143
+ size: z.optional(z.int().gte(1).lte(500)).default(24),
1144
+ weight: z.optional(z.unknown()).default("400"),
1145
+ style: z.optional(z.enum(["normal", "italic", "oblique"])),
1146
+ color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#ffffff"),
1147
+ opacity: z.optional(z.number().gte(0).lte(1)).default(1),
1148
+ });
1149
+ export const richTextFontSchema = richtextpropertiesRichTextFontSchema;
1150
+ /**
1151
+ * Gradient properties for text fill.
1152
+ */
1153
+ export const richtextpropertiesRichTextGradientSchema = z.object({
1154
+ type: z.optional(z.enum(["linear", "radial"])),
1155
+ angle: z.optional(z.number().gte(0).lte(360)).default(0),
1156
+ stops: z
1157
+ .array(z.object({
1158
+ offset: z.number().gte(0).lte(1),
1159
+ color: z.string().regex(/^#[A-Fa-f0-9]{6}$/),
1160
+ }))
1161
+ .min(2),
1162
+ });
1163
+ export const richTextGradientSchema = richtextpropertiesRichTextGradientSchema;
1164
+ /**
1165
+ * Text shadow properties.
1166
+ */
1167
+ export const richtextpropertiesRichTextShadowSchema = z.object({
1168
+ offsetX: z.optional(z.number()).default(0),
1169
+ offsetY: z.optional(z.number()).default(0),
1170
+ blur: z.optional(z.number().gte(0)).default(0),
1171
+ color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1172
+ opacity: z.optional(z.number().gte(0).lte(1)).default(0.5),
1173
+ });
1174
+ export const richTextShadowSchema = richtextpropertiesRichTextShadowSchema;
1175
+ /**
1176
+ * Text stroke (outline) properties.
1177
+ */
1178
+ export const richtextpropertiesRichTextStrokeSchema = z.object({
1179
+ width: z.optional(z.number().gte(0)).default(0),
1180
+ color: z.optional(z.string().regex(/^#[A-Fa-f0-9]{6}$/)).default("#000000"),
1181
+ opacity: z.optional(z.number().gte(0).lte(1)).default(1),
1182
+ });
1183
+ export const richTextStrokeSchema = richtextpropertiesRichTextStrokeSchema;
1184
+ /**
1185
+ * Text style properties including spacing, line height, and transformations.
1186
+ */
1187
+ export const richtextpropertiesRichTextStyleSchema = z.object({
1188
+ letterSpacing: z.optional(z.number()).default(0),
1189
+ lineHeight: z.optional(z.number().gte(0).lte(10)).default(1.2),
1190
+ textTransform: z.optional(z.enum(["none", "uppercase", "lowercase", "capitalize"])),
1191
+ textDecoration: z.optional(z.enum(["none", "underline", "line-through"])),
1192
+ gradient: z.optional(richtextpropertiesRichTextGradientSchema),
1193
+ });
1194
+ export const richTextStyleSchema = richtextpropertiesRichTextStyleSchema;
1195
+ /**
1196
+ * The RichTextAsset provides advanced text rendering with support for custom fonts, gradients, shadows, strokes,
1197
+ * animations, and styling options. It offers more flexibility and visual effects than the basic TextAsset.
1198
+ *
1199
+ */
1200
+ export const richtextassetRichTextAssetSchema = z.object({
1201
+ type: z.string().default("rich-text"),
1202
+ text: z.string().max(5000),
1203
+ width: z.optional(z.int().gte(1).lte(4096)),
1204
+ height: z.optional(z.int().gte(1).lte(4096)),
1205
+ font: z.optional(richtextpropertiesRichTextFontSchema),
1206
+ style: z.optional(richtextpropertiesRichTextStyleSchema),
1207
+ stroke: z.optional(richtextpropertiesRichTextStrokeSchema),
1208
+ shadow: z.optional(richtextpropertiesRichTextShadowSchema),
1209
+ background: z.optional(richtextpropertiesRichTextBackgroundSchema),
1210
+ align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1211
+ animation: z.optional(richtextpropertiesRichTextAnimationSchema),
1212
+ });
1213
+ export const richTextAssetSchema = richtextassetRichTextAssetSchema;
1214
+ /**
1215
+ * The transfer request attributes inlcudling the user specified ID and status. Returned with [TransferResponseData](#tocs_transferresponsedata).
1216
+ */
1217
+ export const transferresponseattributesTransferResponseAttributesSchema = z.object({
1218
+ id: z.optional(z.string()),
1219
+ owner: z.optional(z.string()),
1220
+ status: z.optional(z.enum(["queued", "failed"])),
1221
+ created: z.optional(z.string()),
1222
+ });
1223
+ export const transferResponseAttributesSchema = transferresponseattributesTransferResponseAttributesSchema;
1224
+ /**
1225
+ * The type of resource (an asset) and the transfer attributes. Returned with [TransferResponse](#tocs_transferresponse).
1226
+ */
1227
+ export const transferresponsedataTransferResponseDataSchema = z.object({
1228
+ type: z.optional(z.string()),
1229
+ attributes: z.optional(transferresponseattributesTransferResponseAttributesSchema),
1230
+ });
1231
+ export const transferResponseDataSchema = transferresponsedataTransferResponseDataSchema;
1232
+ /**
1233
+ * 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.
1234
+ */
1235
+ export const transferresponseTransferResponseSchema = z.object({
1236
+ data: transferresponsedataTransferResponseDataSchema,
1237
+ });
1238
+ export const transferResponseSchema = transferresponseTransferResponseSchema;
1239
+ /**
1240
+ * The asset URL to fetch and transfer to a destination.
1241
+ */
1242
+ export const transferTransferSchema = z.object({
1243
+ url: z.string(),
1244
+ id: z.string(),
1245
+ destinations: z.array(destinationsDestinationsSchema),
1246
+ });
1247
+ export const transferSchema = transferTransferSchema;
1248
+ /**
1249
+ * The ShapeAsset is used to add shapes to a video. The shape can be styled with a fill and a stroke.
1250
+ * You can manipulate properties such as rotation to create dynamic effects like a diamond shape or stripes.
1251
+ *
1252
+ */
1253
+ export const shapeassetShapeAssetSchema = z.object({
1254
+ type: z.string().default("shape"),
1255
+ shape: z.enum(["rectangle", "circle", "line"]),
1256
+ width: z.optional(z.int()),
1257
+ height: z.optional(z.int()),
1258
+ fill: z.optional(z.object({
1259
+ color: z.optional(z.string()),
1260
+ opacity: z.optional(z.number()),
1261
+ })),
1262
+ stroke: z.optional(z.object({
1263
+ color: z.optional(z.string()),
1264
+ width: z.optional(z.number()),
1265
+ })),
1266
+ rectangle: z.optional(z.object({
1267
+ width: z.int(),
1268
+ height: z.int(),
1269
+ cornerRadius: z.optional(z.int()),
1270
+ })),
1271
+ circle: z.optional(z.object({
1272
+ radius: z.int(),
1273
+ })),
1274
+ line: z.optional(z.object({
1275
+ length: z.int(),
1276
+ thickness: z.int(),
1277
+ })),
1278
+ });
1279
+ export const shapeAssetSchema = shapeassetShapeAssetSchema;
1280
+ /**
1281
+ * 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.
1282
+ */
1283
+ export const sizeSizeSchema = z.object({
1284
+ width: z.optional(z.int().gte(1).lte(4096)),
1285
+ height: z.optional(z.int().gte(1).lte(4096)),
1286
+ });
1287
+ export const sizeSchema = sizeSizeSchema;
1288
+ /**
1289
+ * A rendition is a new output file that is generated from the source. The rendition can be encoded to a different format and have transformations applied to it such as resizing, cropping, etc...
1290
+ */
1291
+ export const renditionRenditionSchema = z.object({
1292
+ format: z.optional(z.enum([
1293
+ "mp4",
1294
+ "webm",
1295
+ "mov",
1296
+ "avi",
1297
+ "mkv",
1298
+ "ogv",
1299
+ "wmv",
1300
+ "avif",
1301
+ "gif",
1302
+ "mp3",
1303
+ "wav",
1304
+ "jpg",
1305
+ "png",
1306
+ "webp",
1307
+ "tif",
1308
+ ])),
1309
+ size: z.optional(sizeSizeSchema),
1310
+ fit: z.optional(z.enum(["cover", "contain", "crop"])),
1311
+ resolution: z.optional(z.enum(["preview", "mobile", "sd", "hd", "fhd"])),
1312
+ quality: z.optional(z.int().gte(1).lte(100)),
1313
+ fps: z.optional(z.union([
1314
+ z.literal(12),
1315
+ z.literal(15),
1316
+ z.literal(23.976),
1317
+ z.literal(24),
1318
+ z.literal(25),
1319
+ z.literal(29.97),
1320
+ z.literal(30),
1321
+ z.literal(48),
1322
+ z.literal(50),
1323
+ z.literal(59.94),
1324
+ z.literal(60),
1325
+ ])),
1326
+ speed: z.optional(speedSpeedSchema),
1327
+ keyframeInterval: z.optional(z.int().gte(1).lte(300)),
1328
+ fixOffset: z.optional(z.boolean()),
1329
+ fixRotation: z.optional(z.boolean()),
1330
+ enhance: z.optional(enhancementsEnhancementsSchema),
1331
+ filename: z.optional(z.string()),
1332
+ });
1333
+ export const renditionSchema = renditionRenditionSchema;
1334
+ /**
1335
+ * The output renditions and transformations that should be generated from the source file.
1336
+ */
1337
+ export const outputsOutputsSchema = z.object({
1338
+ renditions: z.optional(z.array(renditionRenditionSchema)),
1339
+ transcription: z.optional(transcriptionTranscriptionSchema),
1340
+ });
1341
+ export const outputsSchema = outputsOutputsSchema;
1342
+ /**
1343
+ * The id and attributes of the generated rendition file.
1344
+ */
1345
+ export const renditionresponseattributesRenditionResponseAttributesSchema = z.object({
1346
+ id: z.string(),
1347
+ status: z.optional(z.enum([
1348
+ "queued",
1349
+ "importing",
1350
+ "ready",
1351
+ "failed",
1352
+ "deleted",
1353
+ "overwritten",
1354
+ ])),
1355
+ url: z.optional(z.string()),
1356
+ executionTime: z.optional(z.number()),
1357
+ transformation: z.optional(renditionRenditionSchema),
1358
+ width: z.optional(z.int()),
1359
+ height: z.optional(z.int()),
1360
+ duration: z.optional(z.number()),
1361
+ fps: z.optional(z.number()),
1362
+ });
1363
+ export const renditionResponseAttributesSchema = renditionresponseattributesRenditionResponseAttributesSchema;
1364
+ /**
1365
+ * The list of outputs generated from the source file. Currently supports renditions which are versions of the source file with different transformations applied.
1366
+ */
1367
+ export const outputsresponseOutputsResponseSchema = z.object({
1368
+ renditions: z.optional(z.array(renditionresponseattributesRenditionResponseAttributesSchema)),
1369
+ });
1370
+ export const outputsResponseSchema = outputsresponseOutputsResponseSchema;
1371
+ /**
1372
+ * The id and attributes of the source file.
1373
+ */
1374
+ export const sourceresponseattributesSourceResponseAttributesSchema = z.object({
1375
+ id: z.string(),
1376
+ owner: z.string(),
1377
+ input: z.optional(z.string()),
1378
+ source: z.optional(z.string()),
1379
+ status: z.optional(z.enum(["queued", "importing", "ready", "failed", "deleted", "overwritten"])),
1380
+ outputs: z.optional(outputsresponseOutputsResponseSchema),
1381
+ width: z.optional(z.int()),
1382
+ height: z.optional(z.string()),
1383
+ duration: z.optional(z.number()),
1384
+ fps: z.optional(z.number()),
1385
+ created: z.optional(z.string()),
1386
+ updated: z.optional(z.string()),
1387
+ });
1388
+ export const sourceResponseAttributesSchema = sourceresponseattributesSourceResponseAttributesSchema;
1389
+ /**
1390
+ * The type of resource (a source), it's id and attributes of the source file.
1391
+ */
1392
+ export const sourceresponsedataSourceResponseDataSchema = z.object({
1393
+ type: z.string(),
1394
+ id: z.string(),
1395
+ attributes: sourceresponseattributesSourceResponseAttributesSchema,
1396
+ });
1397
+ export const sourceResponseDataSchema = sourceresponsedataSourceResponseDataSchema;
1398
+ /**
1399
+ * A list of all ingested source files fetched or uploaded to a users account.
1400
+ */
1401
+ export const sourcelistresponseSourceListResponseSchema = z.object({
1402
+ data: z.array(sourceresponsedataSourceResponseDataSchema),
1403
+ });
1404
+ export const sourceListResponseSchema = sourcelistresponseSourceListResponseSchema;
1405
+ /**
1406
+ * 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.
1407
+ */
1408
+ export const sourceresponseSourceResponseSchema = z.object({
1409
+ data: sourceresponsedataSourceResponseDataSchema,
1410
+ });
1411
+ export const sourceResponseSchema = sourceresponseSourceResponseSchema;
1412
+ /**
1413
+ * The details of the file to be ingested and any transformations to be applied. Once the source file has been ingested, new renditions can be created from it. The renditions are specified in the **outputs** property.
1414
+ * A rendition is a new version, generated from the source. This can be used to create new sizes and aspect ratios tht serve different purposes within an application.
1415
+ */
1416
+ export const sourceSourceSchema = z.object({
1417
+ url: z.optional(z.string()),
1418
+ outputs: z.optional(outputsOutputsSchema),
1419
+ destinations: z.optional(destinationsDestinationsSchema),
1420
+ callback: z.optional(z.string()),
1421
+ });
1422
+ export const sourceSchema = sourceSourceSchema;
1423
+ /**
1424
+ * A music or audio file in mp3 format that plays for the duration of the rendered video or the length of the audio file, which ever is shortest.
1425
+ */
1426
+ export const soundtrackSoundtrackSchema = z.object({
1427
+ src: z.string(),
1428
+ effect: z.optional(z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
1429
+ volume: z.optional(z.number()),
1430
+ });
1431
+ export const soundtrackSchema = soundtrackSoundtrackSchema;
1432
+ /**
1433
+ * Configure the id and optional merge fields to render a template by id.
1434
+ */
1435
+ export const templaterenderTemplateRenderSchema = z.object({
1436
+ id: z.string(),
1437
+ merge: z.optional(z.array(mergefieldMergeFieldSchema)),
1438
+ });
1439
+ export const templateRenderSchema = templaterenderTemplateRenderSchema;
1440
+ /**
1441
+ * Horizontal and vertical alignment properties for text.
1442
+ */
1443
+ export const textpropertiesTextAlignmentSchema = z.object({
1444
+ horizontal: z.optional(z.enum(["left", "center", "right"])),
1445
+ vertical: z.optional(z.enum(["top", "center", "bottom"])),
1446
+ });
1447
+ export const textAlignmentSchema = textpropertiesTextAlignmentSchema;
1448
+ /**
1449
+ * Displays a background box behind the text.
1450
+ */
1451
+ export const textpropertiesTextBackgroundSchema = z.object({
1452
+ color: z.optional(z.string()),
1453
+ });
1454
+ export const textBackgroundSchema = textpropertiesTextBackgroundSchema;
1455
+ /**
1456
+ * Font properties for text.
1457
+ */
1458
+ export const textpropertiesTextFontSchema = z.object({
1459
+ family: z.optional(z.string()),
1460
+ color: z.optional(z.string()),
1461
+ opacity: z.optional(z.number()),
1462
+ size: z.optional(z.int()),
1463
+ weight: z.optional(z.int()),
1464
+ lineHeight: z.optional(z.number()),
1465
+ });
1466
+ export const textFontSchema = textpropertiesTextFontSchema;
1467
+ /**
1468
+ * The TextAsset is used to add text and titles to a video. The text can be styled with built in and custom
1469
+ * [Fonts](#tocs_font). You can also add a background bounding box used to control wrapping and overflow. Emoticons are also supported.
1470
+ *
1471
+ */
1472
+ export const textassetTextAssetSchema = z.object({
1473
+ type: z.string().default("text"),
1474
+ text: z.string(),
1475
+ width: z.optional(z.int()),
1476
+ height: z.optional(z.int()),
1477
+ font: z.optional(textpropertiesTextFontSchema),
1478
+ background: z.optional(textpropertiesTextBackgroundSchema),
1479
+ alignment: z.optional(textpropertiesTextAlignmentSchema),
1480
+ });
1481
+ export const textAssetSchema = textassetTextAssetSchema;
1482
+ /**
1483
+ * The TextToImageAsset lets you create a dynamic image from a text prompt.
1484
+ */
1485
+ export const texttoimageassetTextToImageAssetSchema = z.object({
1486
+ type: z.enum(["text-to-image"]),
1487
+ prompt: z.string(),
1488
+ width: z.int(),
1489
+ height: z.int(),
1490
+ crop: z.optional(cropCropSchema),
1491
+ });
1492
+ export const textToImageAssetSchema = texttoimageassetTextToImageAssetSchema;
1493
+ /**
1494
+ * Generate a thumbnail image for the video or image at a specific point from the timeline.
1495
+ */
1496
+ export const thumbnailThumbnailSchema = z.object({
1497
+ capture: z.number(),
1498
+ scale: z.number().gte(0).lte(1),
1499
+ });
1500
+ export const thumbnailSchema = thumbnailThumbnailSchema;
1501
+ /**
1502
+ * The output format, render range and type of media to generate.
1503
+ */
1504
+ export const outputOutputSchema = z.object({
1505
+ format: z.enum(["mp4", "gif", "mp3", "jpg", "png", "bmp"]),
1506
+ resolution: z.optional(z.enum(["preview", "mobile", "sd", "hd", "1080", "4k"])),
1507
+ aspectRatio: z.optional(z.enum(["16:9", "9:16", "1:1", "4:5", "4:3"])),
1508
+ size: z.optional(sizeSizeSchema),
1509
+ fps: z.optional(z.union([
1510
+ z.literal(12),
1511
+ z.literal(15),
1512
+ z.literal(23.976),
1513
+ z.literal(24),
1514
+ z.literal(25),
1515
+ z.literal(29.97),
1516
+ z.literal(30),
1517
+ z.literal(48),
1518
+ z.literal(50),
1519
+ z.literal(59.94),
1520
+ z.literal(60),
1521
+ ])),
1522
+ scaleTo: z.optional(z.enum(["preview", "mobile", "sd", "hd", "1080"])),
1523
+ quality: z.optional(z.enum(["verylow", "low", "medium", "high", "veryhigh"])),
1524
+ repeat: z.optional(z.boolean()),
1525
+ mute: z.optional(z.boolean()),
1526
+ range: z.optional(rangeRangeSchema),
1527
+ poster: z.optional(posterPosterSchema),
1528
+ thumbnail: z.optional(thumbnailThumbnailSchema),
1529
+ destinations: z.optional(z.array(destinationsDestinationsSchema)),
1530
+ });
1531
+ export const outputSchema = outputOutputSchema;
1532
+ /**
1533
+ * In and out transitions for a clip - i.e. fade in and fade out
1534
+ */
1535
+ export const transitionTransitionSchema = z.object({
1536
+ in: z.optional(z.enum([
1537
+ "fade",
1538
+ "fadeSlow",
1539
+ "fadeFast",
1540
+ "reveal",
1541
+ "revealSlow",
1542
+ "revealFast",
1543
+ "wipeLeft",
1544
+ "wipeLeftSlow",
1545
+ "wipeLeftFast",
1546
+ "wipeRight",
1547
+ "wipeRightSlow",
1548
+ "wipeRightFast",
1549
+ "slideLeft",
1550
+ "slideLeftSlow",
1551
+ "slideLeftFast",
1552
+ "slideRight",
1553
+ "slideRightSlow",
1554
+ "slideRightFast",
1555
+ "slideUp",
1556
+ "slideUpSlow",
1557
+ "slideUpFast",
1558
+ "slideDown",
1559
+ "slideDownSlow",
1560
+ "slideDownFast",
1561
+ "carouselLeft",
1562
+ "carouselLeftSlow",
1563
+ "carouselLeftFast",
1564
+ "carouselRight",
1565
+ "carouselRightSlow",
1566
+ "carouselRightFast",
1567
+ "carouselUp",
1568
+ "carouselUpSlow",
1569
+ "carouselUpFast",
1570
+ "carouselDown",
1571
+ "carouselDownSlow",
1572
+ "carouselDownFast",
1573
+ "shuffleTopRight",
1574
+ "shuffleTopRightSlow",
1575
+ "shuffleTopRightFast",
1576
+ "shuffleRightTop",
1577
+ "shuffleRightTopSlow",
1578
+ "shuffleRightTopFast",
1579
+ "shuffleRightBottom",
1580
+ "shuffleRightBottomSlow",
1581
+ "shuffleRightBottomFast",
1582
+ "shuffleBottomRight",
1583
+ "shuffleBottomRightSlow",
1584
+ "shuffleBottomRightFast",
1585
+ "shuffleBottomLeft",
1586
+ "shuffleBottomLeftSlow",
1587
+ "shuffleBottomLeftFast",
1588
+ "shuffleLeftBottom",
1589
+ "shuffleLeftBottomSlow",
1590
+ "shuffleLeftBottomFast",
1591
+ "shuffleLeftTop",
1592
+ "shuffleLeftTopSlow",
1593
+ "shuffleLeftTopFast",
1594
+ "shuffleTopLeft",
1595
+ "shuffleTopLeftSlow",
1596
+ "shuffleTopLeftFast",
1597
+ "zoom",
1598
+ ])),
1599
+ out: z.optional(z.enum([
1600
+ "fade",
1601
+ "fadeSlow",
1602
+ "fadeFast",
1603
+ "reveal",
1604
+ "revealSlow",
1605
+ "revealFast",
1606
+ "wipeLeft",
1607
+ "wipeLeftSlow",
1608
+ "wipeLeftFast",
1609
+ "wipeRight",
1610
+ "wipeRightSlow",
1611
+ "wipeRightFast",
1612
+ "slideLeft",
1613
+ "slideLeftSlow",
1614
+ "slideLeftFast",
1615
+ "slideRight",
1616
+ "slideRightSlow",
1617
+ "slideRightFast",
1618
+ "slideUp",
1619
+ "slideUpSlow",
1620
+ "slideUpFast",
1621
+ "slideDown",
1622
+ "slideDownSlow",
1623
+ "slideDownFast",
1624
+ "carouselLeft",
1625
+ "carouselLeftSlow",
1626
+ "carouselLeftFast",
1627
+ "carouselRight",
1628
+ "carouselRightSlow",
1629
+ "carouselRightFast",
1630
+ "carouselUp",
1631
+ "carouselUpSlow",
1632
+ "carouselUpFast",
1633
+ "carouselDown",
1634
+ "carouselDownSlow",
1635
+ "carouselDownFast",
1636
+ "shuffleTopRight",
1637
+ "shuffleTopRightSlow",
1638
+ "shuffleTopRightFast",
1639
+ "shuffleRightTop",
1640
+ "shuffleRightTopSlow",
1641
+ "shuffleRightTopFast",
1642
+ "shuffleRightBottom",
1643
+ "shuffleRightBottomSlow",
1644
+ "shuffleRightBottomFast",
1645
+ "shuffleBottomRight",
1646
+ "shuffleBottomRightSlow",
1647
+ "shuffleBottomRightFast",
1648
+ "shuffleBottomLeft",
1649
+ "shuffleBottomLeftSlow",
1650
+ "shuffleBottomLeftFast",
1651
+ "shuffleLeftBottom",
1652
+ "shuffleLeftBottomSlow",
1653
+ "shuffleLeftBottomFast",
1654
+ "shuffleLeftTop",
1655
+ "shuffleLeftTopSlow",
1656
+ "shuffleLeftTopFast",
1657
+ "shuffleTopLeft",
1658
+ "shuffleTopLeftSlow",
1659
+ "shuffleTopLeftFast",
1660
+ "zoom",
1661
+ ])),
1662
+ });
1663
+ export const transitionSchema = transitionTransitionSchema;
1664
+ /**
1665
+ * Use a Tween to [animate properties over time](/docs/guide/architecting-an-application/animations/). The following properties are currently supported and can be animated:
1666
+ * <ul>
1667
+ * <li>Opacity - animate the transparency of a clip.</li>
1668
+ * <li>Offset - animate the x and y position of a clip.</li>
1669
+ * <li>Rotation - animate the rotation of a clip.</li>
1670
+ * <li>Skew - animate the horizontal and vertical shearing effect.</li>
1671
+ * <li>Volume - animate the audio volume of a clip.</li>
1672
+ * </ul>
1673
+ */
1674
+ export const tweenTweenSchema = z.object({
1675
+ from: z.optional(z.unknown()),
1676
+ to: z.optional(z.unknown()),
1677
+ start: z.optional(z.number()),
1678
+ length: z.optional(z.number()),
1679
+ interpolation: z.optional(z.enum(["linear", "bezier", "constant"])),
1680
+ easing: z.optional(z.enum([
1681
+ "ease",
1682
+ "easeIn",
1683
+ "easeOut",
1684
+ "easeInOut",
1685
+ "easeInQuad",
1686
+ "easeInCubic",
1687
+ "easeInQuart",
1688
+ "easeInQuint",
1689
+ "easeInSine",
1690
+ "easeInExpo",
1691
+ "easeInCirc",
1692
+ "easeInBack",
1693
+ "easeOutQuad",
1694
+ "easeOutCubic",
1695
+ "easeOutQuart",
1696
+ "easeOutQuint",
1697
+ "easeOutSine",
1698
+ "easeOutExpo",
1699
+ "easeOutCirc",
1700
+ "easeOutBack",
1701
+ "easeInOutQuad",
1702
+ "easeInOutCubic",
1703
+ "easeInOutQuart",
1704
+ "easeInOutQuint",
1705
+ "easeInOutSine",
1706
+ "easeInOutExpo",
1707
+ "easeInOutCirc",
1708
+ "easeInOutBack",
1709
+ ])),
1710
+ });
1711
+ export const tweenSchema = tweenTweenSchema;
1712
+ /**
1713
+ * 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.
1714
+ */
1715
+ export const audioassetAudioAssetSchema = z.object({
1716
+ type: z.string().default("audio"),
1717
+ src: z.string(),
1718
+ trim: z.optional(z.number()),
1719
+ volume: z.optional(z.union([z.number().gte(0).lte(1), z.array(tweenTweenSchema)])),
1720
+ speed: z.optional(z.number().gte(0).lte(10)),
1721
+ effect: z.optional(z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
1722
+ });
1723
+ export const audioAssetSchema = audioassetAudioAssetSchema;
1724
+ /**
1725
+ * Offsets the position of an asset horizontally or vertically by a relative distance.
1726
+ */
1727
+ export const offsetOffsetSchema = z.object({
1728
+ x: z.optional(z.union([z.number().gte(-10).lte(10), z.array(tweenTweenSchema)])),
1729
+ y: z.optional(z.union([z.number().gte(-10).lte(10), z.array(tweenTweenSchema)])),
1730
+ });
1731
+ export const offsetSchema = offsetOffsetSchema;
1732
+ /**
1733
+ * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
1734
+ */
1735
+ export const rotatetransformationRotateTransformationSchema = z.object({
1736
+ angle: z.optional(z.union([z.int().gte(-360).lte(360), z.array(tweenTweenSchema)])),
1737
+ });
1738
+ export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
1739
+ /**
1740
+ * Skew a clip so its edges are sheared at an angle. Use values between 0 and 3. Over 3 the clip will be skewed almost flat.
1741
+ */
1742
+ export const skewtransformationSkewTransformationSchema = z.object({
1743
+ x: z.optional(z.union([z.number(), z.array(tweenTweenSchema)])),
1744
+ y: z.optional(z.union([z.number(), z.array(tweenTweenSchema)])),
1745
+ });
1746
+ export const skewTransformationSchema = skewtransformationSkewTransformationSchema;
1747
+ /**
1748
+ * **Notice: The TitleAsset is deprecated, use the [TextAsset](#tocs_textasset) instead.**
1749
+ *
1750
+ * The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
1751
+ *
1752
+ *
1753
+ * @deprecated
1754
+ */
1755
+ export const titleassetTitleAssetSchema = z.object({
1756
+ type: z.string().default("title"),
1757
+ text: z.string(),
1758
+ style: z.optional(z.enum([
1759
+ "minimal",
1760
+ "blockbuster",
1761
+ "vogue",
1762
+ "sketchy",
1763
+ "skinny",
1764
+ "chunk",
1765
+ "chunkLight",
1766
+ "marker",
1767
+ "future",
1768
+ "subtitle",
1769
+ ])),
1770
+ color: z.optional(z.string()),
1771
+ size: z.optional(z.enum([
1772
+ "xx-small",
1773
+ "x-small",
1774
+ "small",
1775
+ "medium",
1776
+ "large",
1777
+ "x-large",
1778
+ "xx-large",
1779
+ ])),
1780
+ background: z.optional(z.string()),
1781
+ position: z.optional(z.enum([
1782
+ "top",
1783
+ "topRight",
1784
+ "right",
1785
+ "bottomRight",
1786
+ "bottom",
1787
+ "bottomLeft",
1788
+ "left",
1789
+ "topLeft",
1790
+ "center",
1791
+ ])),
1792
+ offset: z.optional(offsetOffsetSchema),
1793
+ });
1794
+ export const titleAssetSchema = titleassetTitleAssetSchema;
1795
+ /**
1796
+ * Apply one or more transformations to a clip. Transformations alter the visual properties of a clip and can be combined to create new shapes and effects.
1797
+ */
1798
+ export const transformationTransformationSchema = z.object({
1799
+ rotate: z.optional(rotatetransformationRotateTransformationSchema),
1800
+ skew: z.optional(skewtransformationSkewTransformationSchema),
1801
+ flip: z.optional(fliptransformationFlipTransformationSchema),
1802
+ });
1803
+ export const transformationSchema = transformationTransformationSchema;
1804
+ /**
1805
+ * 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.
1806
+ */
1807
+ export const videoassetVideoAssetSchema = z.object({
1808
+ type: z.string().default("video"),
1809
+ src: z.string(),
1810
+ transcode: z.optional(z.boolean()).default(false),
1811
+ trim: z.optional(z.number()),
1812
+ volume: z.optional(z.union([z.number().gte(0).lte(1), z.array(tweenTweenSchema)])),
1813
+ volumeEffect: z.optional(z.enum(["fadeIn", "fadeOut", "fadeInFadeOut"])),
1814
+ speed: z.optional(z.number().gte(0).lte(10)),
1815
+ crop: z.optional(cropCropSchema),
1816
+ chromaKey: z.optional(chromakeyChromaKeySchema),
1817
+ });
1818
+ export const videoAssetSchema = videoassetVideoAssetSchema;
1819
+ /**
1820
+ * The type of asset to display for the duration of the Clip, i.e. a video clip or an image. Choose from one of the available asset types below.
1821
+ */
1822
+ export const assetAssetSchema = z.union([
1823
+ z
1824
+ .object({
1825
+ asset: z.literal("videoasset_VideoAsset"),
1826
+ })
1827
+ .and(videoassetVideoAssetSchema),
1828
+ z
1829
+ .object({
1830
+ asset: z.literal("imageasset_ImageAsset"),
1831
+ })
1832
+ .and(imageassetImageAssetSchema),
1833
+ z
1834
+ .object({
1835
+ asset: z.literal("textasset_TextAsset"),
1836
+ })
1837
+ .and(textassetTextAssetSchema),
1838
+ z
1839
+ .object({
1840
+ asset: z.literal("richtextasset_RichTextAsset"),
1841
+ })
1842
+ .and(richtextassetRichTextAssetSchema),
1843
+ z
1844
+ .object({
1845
+ asset: z.literal("audioasset_AudioAsset"),
1846
+ })
1847
+ .and(audioassetAudioAssetSchema),
1848
+ z
1849
+ .object({
1850
+ asset: z.literal("lumaasset_LumaAsset"),
1851
+ })
1852
+ .and(lumaassetLumaAssetSchema),
1853
+ z
1854
+ .object({
1855
+ asset: z.literal("captionasset_CaptionAsset"),
1856
+ })
1857
+ .and(captionassetCaptionAssetSchema),
1858
+ z
1859
+ .object({
1860
+ asset: z.literal("htmlasset_HtmlAsset"),
1861
+ })
1862
+ .and(htmlassetHtmlAssetSchema),
1863
+ z
1864
+ .object({
1865
+ asset: z.literal("titleasset_TitleAsset"),
1866
+ })
1867
+ .and(titleassetTitleAssetSchema),
1868
+ z
1869
+ .object({
1870
+ asset: z.literal("shapeasset_ShapeAsset"),
1871
+ })
1872
+ .and(shapeassetShapeAssetSchema),
1873
+ z
1874
+ .object({
1875
+ asset: z.literal("texttoimageasset_TextToImageAsset"),
1876
+ })
1877
+ .and(texttoimageassetTextToImageAssetSchema),
1878
+ z
1879
+ .object({
1880
+ asset: z.literal("imagetovideoasset_ImageToVideoAsset"),
1881
+ })
1882
+ .and(imagetovideoassetImageToVideoAssetSchema),
1883
+ ]);
1884
+ export const assetSchema = assetAssetSchema;
1885
+ /**
1886
+ * A clip is a container for a specific type of asset, i.e. a title, image, video, audio or html. You use a Clip to define when an asset will display on the timeline, how long it will play for and transitions, filters and effects to apply to it.
1887
+ */
1888
+ export const clipClipSchema = z.object({
1889
+ asset: assetAssetSchema,
1890
+ start: z.union([z.number(), z.enum(["auto"])]),
1891
+ length: z.union([z.number(), z.literal("auto"), z.literal("end")]),
1892
+ fit: z.optional(z.enum(["cover", "contain", "crop", "none"])),
1893
+ scale: z.optional(z.number()),
1894
+ position: z.optional(z.enum([
1895
+ "top",
1896
+ "topRight",
1897
+ "right",
1898
+ "bottomRight",
1899
+ "bottom",
1900
+ "bottomLeft",
1901
+ "left",
1902
+ "topLeft",
1903
+ "center",
1904
+ ])),
1905
+ offset: z.optional(offsetOffsetSchema),
1906
+ transition: z.optional(transitionTransitionSchema),
1907
+ effect: z.optional(z.enum([
1908
+ "zoomIn",
1909
+ "zoomInSlow",
1910
+ "zoomInFast",
1911
+ "zoomOut",
1912
+ "zoomOutSlow",
1913
+ "zoomOutFast",
1914
+ "slideLeft",
1915
+ "slideLeftSlow",
1916
+ "slideLeftFast",
1917
+ "slideRight",
1918
+ "slideRightSlow",
1919
+ "slideRightFast",
1920
+ "slideUp",
1921
+ "slideUpSlow",
1922
+ "slideUpFast",
1923
+ "slideDown",
1924
+ "slideDownSlow",
1925
+ "slideDownFast",
1926
+ ])),
1927
+ filter: z.optional(z.enum([
1928
+ "blur",
1929
+ "boost",
1930
+ "contrast",
1931
+ "darken",
1932
+ "greyscale",
1933
+ "lighten",
1934
+ "muted",
1935
+ "negative",
1936
+ ])),
1937
+ opacity: z.optional(z.union([z.number(), z.array(tweenTweenSchema)])),
1938
+ transform: z.optional(transformationTransformationSchema),
1939
+ });
1940
+ export const clipSchema = clipClipSchema;
1941
+ /**
1942
+ * 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.
1943
+ */
1944
+ export const trackTrackSchema = z.object({
1945
+ clips: z.array(clipClipSchema),
1946
+ });
1947
+ export const trackSchema = trackTrackSchema;
1948
+ /**
1949
+ * A timeline represents the contents of a video edit over time, an audio edit over time, in seconds, or an image layout. A timeline consists of layers called tracks. Tracks are composed of titles, images, audio, html or video segments referred to as clips which are placed along the track at specific starting point and lasting for a specific amount of time.
1950
+ */
1951
+ export const timelineTimelineSchema = z.object({
1952
+ soundtrack: z.optional(soundtrackSoundtrackSchema),
1953
+ background: z.optional(z.string()),
1954
+ fonts: z.optional(z.array(fontFontSchema)),
1955
+ tracks: z.array(trackTrackSchema),
1956
+ cache: z.optional(z.boolean()),
1957
+ });
1958
+ export const timelineSchema = timelineTimelineSchema;
1959
+ /**
1960
+ * An edit defines the arrangement of a video on a timeline, an audio edit or an image design and the output format. Video assets are automatically preprocessed to fix common compatibility issues before rendering. You can control preprocessing behavior using the `transcode` flag on video assets.
1961
+ */
1962
+ export const editEditSchema = z.object({
1963
+ timeline: timelineTimelineSchema,
1964
+ output: outputOutputSchema,
1965
+ merge: z.optional(z.array(mergefieldMergeFieldSchema)),
1966
+ callback: z.optional(z.string()),
1967
+ disk: z.optional(z.enum(["local", "mount"])),
1968
+ });
1969
+ export const editSchema = editEditSchema;
1970
+ /**
1971
+ * The response data returned with the [RenderResponse](#tocs_renderresponse) including status and URL.
1972
+ */
1973
+ export const renderresponsedataRenderResponseDataSchema = z.object({
1974
+ id: z.string(),
1975
+ owner: z.string(),
1976
+ plan: z.optional(z.string()),
1977
+ status: z.enum([
1978
+ "queued",
1979
+ "fetching",
1980
+ "preprocessing",
1981
+ "rendering",
1982
+ "saving",
1983
+ "done",
1984
+ "failed",
1985
+ ]),
1986
+ error: z.optional(z.string()),
1987
+ duration: z.optional(z.number()),
1988
+ renderTime: z.optional(z.number()),
1989
+ url: z.optional(z.string()),
1990
+ poster: z.optional(z.union([z.string(), z.null()])),
1991
+ thumbnail: z.optional(z.union([z.string(), z.null()])),
1992
+ data: z.optional(editEditSchema),
1993
+ created: z.optional(z.string()),
1994
+ updated: z.optional(z.string()),
1995
+ });
1996
+ export const renderResponseDataSchema = renderresponsedataRenderResponseDataSchema;
1997
+ /**
1998
+ * The response received after a [render status request](#get-render-status) is submitted. The response includes details about status of a render and the output URL.
1999
+ */
2000
+ export const renderresponseRenderResponseSchema = z.object({
2001
+ success: z.boolean(),
2002
+ message: z.string(),
2003
+ response: renderresponsedataRenderResponseDataSchema,
2004
+ });
2005
+ export const renderResponseSchema = renderresponseRenderResponseSchema;
2006
+ /**
2007
+ * The response data returned with the [TemplateDataResponse](#tocs_templatedataresponse).
2008
+ */
2009
+ export const templatedataresponsedataTemplateDataResponseDataSchema = z.object({
2010
+ id: z.string(),
2011
+ name: z.string(),
2012
+ owner: z.string(),
2013
+ template: editEditSchema,
2014
+ });
2015
+ export const templateDataResponseDataSchema = templatedataresponsedataTemplateDataResponseDataSchema;
2016
+ /**
2017
+ * The template data including the template name and [Edit](#tocs_edit).
2018
+ */
2019
+ export const templatedataresponseTemplateDataResponseSchema = z.object({
2020
+ success: z.boolean(),
2021
+ message: z.string(),
2022
+ response: templatedataresponsedataTemplateDataResponseDataSchema,
2023
+ });
2024
+ export const templateDataResponseSchema = templatedataresponseTemplateDataResponseSchema;
2025
+ /**
2026
+ * A template is a saved [Edit](#tocs_edit) than can be loaded and re-used.
2027
+ */
2028
+ export const templateTemplateSchema = z.object({
2029
+ name: z.string(),
2030
+ template: z.optional(editEditSchema),
2031
+ });
2032
+ export const templateSchema = templateTemplateSchema;
2033
+ export const postRenderRequest = z.object({
2034
+ body: editEditSchema,
2035
+ path: z.optional(z.never()),
2036
+ query: z.optional(z.never()),
2037
+ });
2038
+ /**
2039
+ * The queued render details
2040
+ */
2041
+ export const postRenderResponse = queuedresponseQueuedResponseSchema;
2042
+ export const getRenderRequest = z.object({
2043
+ body: z.optional(z.never()),
2044
+ path: z.object({
2045
+ id: z
2046
+ .string()
2047
+ .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}$/),
2048
+ }),
2049
+ query: z.optional(z.object({
2050
+ data: z.optional(z.boolean()),
2051
+ merged: z.optional(z.boolean()),
2052
+ })),
2053
+ });
2054
+ /**
2055
+ * The render status details
2056
+ */
2057
+ export const getRenderResponse = renderresponseRenderResponseSchema;
2058
+ export const getTemplatesRequest = z.object({
2059
+ body: z.optional(z.never()),
2060
+ path: z.optional(z.never()),
2061
+ query: z.optional(z.never()),
2062
+ });
2063
+ /**
2064
+ * The list of templates stored against a users account
2065
+ */
2066
+ export const getTemplatesResponse = templatelistresponseTemplateListResponseSchema;
2067
+ export const postTemplateRequest = z.object({
2068
+ body: templateTemplateSchema,
2069
+ path: z.optional(z.never()),
2070
+ query: z.optional(z.never()),
2071
+ });
2072
+ /**
2073
+ * The saved template status including the id
2074
+ */
2075
+ export const postTemplateResponse = templateresponseTemplateResponseSchema;
2076
+ export const deleteTemplateRequest = z.object({
2077
+ body: z.optional(z.never()),
2078
+ path: z.object({
2079
+ id: z
2080
+ .string()
2081
+ .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}$/),
2082
+ }),
2083
+ query: z.optional(z.never()),
2084
+ });
2085
+ /**
2086
+ * An empty response signifying the template has been deleted
2087
+ */
2088
+ export const deleteTemplateResponse = z.void();
2089
+ export const getTemplateRequest = z.object({
2090
+ body: z.optional(z.never()),
2091
+ path: z.object({
2092
+ id: z
2093
+ .string()
2094
+ .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}$/),
2095
+ }),
2096
+ query: z.optional(z.never()),
2097
+ });
2098
+ /**
2099
+ * The template details including the [Edit](#tocs_edit)
2100
+ */
2101
+ export const getTemplateResponse = templatedataresponseTemplateDataResponseSchema;
2102
+ export const putTemplateRequest = z.object({
2103
+ body: templateTemplateSchema,
2104
+ path: z.object({
2105
+ id: z
2106
+ .string()
2107
+ .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}$/),
2108
+ }),
2109
+ query: z.optional(z.never()),
2110
+ });
2111
+ /**
2112
+ * Update a templates name and [Edit](#tocs_edit)
2113
+ */
2114
+ export const putTemplateResponse = templateresponseTemplateResponseSchema;
2115
+ export const postTemplateRenderRequest = z.object({
2116
+ body: templaterenderTemplateRenderSchema,
2117
+ path: z.optional(z.never()),
2118
+ query: z.optional(z.never()),
2119
+ });
2120
+ /**
2121
+ * The queued status including the render id. Check the status of the render using the id and the [render status](#get-render-status) endpoint.
2122
+ */
2123
+ export const postTemplateRenderResponse = queuedresponseQueuedResponseSchema;
2124
+ export const probeRequest = z.object({
2125
+ body: z.optional(z.never()),
2126
+ path: z.object({
2127
+ url: z.string(),
2128
+ }),
2129
+ query: z.optional(z.never()),
2130
+ });
2131
+ /**
2132
+ * FFprobe response formatted as JSON.
2133
+ */
2134
+ export const probeResponse = proberesponseProbeResponseSchema;
2135
+ export const deleteAssetRequest = z.object({
2136
+ body: z.optional(z.never()),
2137
+ path: z.object({
2138
+ id: z
2139
+ .string()
2140
+ .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}$/),
2141
+ }),
2142
+ query: z.optional(z.never()),
2143
+ });
2144
+ /**
2145
+ * An empty response signifying the asset has been deleted
2146
+ */
2147
+ export const deleteAssetResponse = z.void();
2148
+ export const getAssetRequest = z.object({
2149
+ body: z.optional(z.never()),
2150
+ path: z.object({
2151
+ id: z
2152
+ .string()
2153
+ .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}$/),
2154
+ }),
2155
+ query: z.optional(z.never()),
2156
+ });
2157
+ /**
2158
+ * Get asset by asset id
2159
+ */
2160
+ export const getAssetResponse = assetresponseAssetResponseSchema;
2161
+ export const getAssetByRenderIdRequest = z.object({
2162
+ body: z.optional(z.never()),
2163
+ path: z.object({
2164
+ id: z
2165
+ .string()
2166
+ .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}$/),
2167
+ }),
2168
+ query: z.optional(z.never()),
2169
+ });
2170
+ /**
2171
+ * Get one or more assets by render id
2172
+ */
2173
+ export const getAssetByRenderIdResponse = assetrenderresponseAssetRenderResponseSchema;
2174
+ export const postServeAssetRequest = z.object({
2175
+ body: transferTransferSchema,
2176
+ path: z.optional(z.never()),
2177
+ query: z.optional(z.never()),
2178
+ });
2179
+ /**
2180
+ * The transfer request details and status
2181
+ */
2182
+ export const postServeAssetResponse = transferresponseTransferResponseSchema;
2183
+ export const getSourcesRequest = z.object({
2184
+ body: z.optional(z.never()),
2185
+ path: z.optional(z.never()),
2186
+ query: z.optional(z.never()),
2187
+ });
2188
+ /**
2189
+ * The list of ingested source files stored against a users account
2190
+ */
2191
+ export const getSourcesResponse = sourcelistresponseSourceListResponseSchema;
2192
+ export const postSourceRequest = z.object({
2193
+ body: sourceSourceSchema,
2194
+ path: z.optional(z.never()),
2195
+ query: z.optional(z.never()),
2196
+ });
2197
+ /**
2198
+ * The queued source file details
2199
+ */
2200
+ export const postSourceResponse = queuedsourceresponseQueuedSourceResponseSchema;
2201
+ export const deleteSourceRequest = z.object({
2202
+ body: z.optional(z.never()),
2203
+ path: z.object({
2204
+ id: z
2205
+ .string()
2206
+ .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}$/),
2207
+ }),
2208
+ query: z.optional(z.never()),
2209
+ });
2210
+ /**
2211
+ * An empty response signifying the ingested source file has been deleted.
2212
+ */
2213
+ export const deleteSourceResponse = z.void();
2214
+ export const getSourceRequest = z.object({
2215
+ body: z.optional(z.never()),
2216
+ path: z.object({
2217
+ id: z
2218
+ .string()
2219
+ .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}$/),
2220
+ }),
2221
+ query: z.optional(z.never()),
2222
+ });
2223
+ /**
2224
+ * Get source file details by id
2225
+ */
2226
+ export const getSourceResponse = sourceresponseSourceResponseSchema;
2227
+ export const getUploadSignedUrlRequest = z.object({
2228
+ body: z.optional(z.never()),
2229
+ path: z.optional(z.never()),
2230
+ query: z.optional(z.never()),
2231
+ });
2232
+ /**
2233
+ * The id and signed URL to upload to.
2234
+ */
2235
+ export const getUploadSignedUrlResponse = uploadresponseUploadResponseSchema;
2236
+ export const postGenerateAssetRequest = z.object({
2237
+ body: generatedAssetGeneratedAssetSchema,
2238
+ path: z.optional(z.never()),
2239
+ query: z.optional(z.never()),
2240
+ });
2241
+ /**
2242
+ * The generated asset details
2243
+ */
2244
+ export const postGenerateAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
2245
+ export const getGeneratedAssetRequest = z.object({
2246
+ body: z.optional(z.never()),
2247
+ path: z.object({
2248
+ id: z
2249
+ .string()
2250
+ .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}$/),
2251
+ }),
2252
+ query: z.optional(z.never()),
2253
+ });
2254
+ /**
2255
+ * The generated asset details
2256
+ */
2257
+ export const getGeneratedAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;