@shotstack/schemas 1.9.5 → 1.9.7

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.
Files changed (37) hide show
  1. package/dist/api.bundled.json +83 -1263
  2. package/dist/json-schema/asset.json +3 -858
  3. package/dist/json-schema/clip.json +3 -858
  4. package/dist/json-schema/edit.json +3 -858
  5. package/dist/json-schema/rich-caption-active-font.json +1 -4
  6. package/dist/json-schema/rich-caption-active.json +1 -4
  7. package/dist/json-schema/rich-caption-asset.json +1 -4
  8. package/dist/json-schema/schemas.json +6 -954
  9. package/dist/json-schema/svg-asset.json +6 -857
  10. package/dist/json-schema/timeline.json +3 -858
  11. package/dist/json-schema/track.json +3 -858
  12. package/dist/schema.d.ts +15 -1040
  13. package/dist/zod/zod.gen.cjs +36 -726
  14. package/dist/zod/zod.gen.d.ts +542 -11591
  15. package/dist/zod/zod.gen.js +29 -718
  16. package/dist/zod/zod.gen.ts +31 -711
  17. package/package.json +1 -1
  18. package/dist/json-schema/svg-arrow-shape.json +0 -49
  19. package/dist/json-schema/svg-circle-shape.json +0 -28
  20. package/dist/json-schema/svg-cross-shape.json +0 -42
  21. package/dist/json-schema/svg-ellipse-shape.json +0 -35
  22. package/dist/json-schema/svg-fill.json +0 -169
  23. package/dist/json-schema/svg-gradient-stop.json +0 -25
  24. package/dist/json-schema/svg-heart-shape.json +0 -28
  25. package/dist/json-schema/svg-line-shape.json +0 -35
  26. package/dist/json-schema/svg-linear-gradient-fill.json +0 -80
  27. package/dist/json-schema/svg-path-shape.json +0 -26
  28. package/dist/json-schema/svg-polygon-shape.json +0 -35
  29. package/dist/json-schema/svg-radial-gradient-fill.json +0 -66
  30. package/dist/json-schema/svg-rectangle-shape.json +0 -49
  31. package/dist/json-schema/svg-ring-shape.json +0 -35
  32. package/dist/json-schema/svg-shadow.json +0 -79
  33. package/dist/json-schema/svg-shape.json +0 -404
  34. package/dist/json-schema/svg-solid-fill.json +0 -40
  35. package/dist/json-schema/svg-star-shape.json +0 -42
  36. package/dist/json-schema/svg-stroke.json +0 -115
  37. package/dist/json-schema/svg-transform.json +0 -93
@@ -5,8 +5,6 @@ export const sourceRootSchema = z.unknown();
5
5
  export const assetsRootSchema = z.unknown();
6
6
  export const assetsidRootSchema = z.unknown();
7
7
  export const assetsrenderidRootSchema = z.unknown();
8
- export const generateassetRootSchema = z.unknown();
9
- export const generateassetidRootSchema = z.unknown();
10
8
  export const probeRootSchema = z.unknown();
11
9
  export const renderRootSchema = z.unknown();
12
10
  export const renderidRootSchema = z.unknown();
@@ -163,597 +161,6 @@ export const chromakeyChromaKeySchema = z.object({
163
161
  } return v; }), z.number().int().gte(0).lte(250)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
164
162
  }).strict();
165
163
  export const chromaKeySchema = chromakeyChromaKeySchema;
166
- /**
167
- * Options for the D-ID text-to-avatar service. Set the text to be converted to an avatar and configure the avatar and background. The output will be generated as an MP4 video file.
168
- */
169
- export const didTextToAvatarOptionsDidTextToAvatarOptionsSchema = z.object({
170
- type: z.enum(['text-to-avatar']),
171
- text: z.string(),
172
- avatar: z.enum([
173
- 'jack',
174
- 'lana',
175
- 'lily',
176
- 'matt',
177
- 'rian'
178
- ]),
179
- background: z.optional(z.string())
180
- }).strict();
181
- export const didTextToAvatarOptionsSchema = didTextToAvatarOptionsDidTextToAvatarOptionsSchema;
182
- /**
183
- * Generate assets using the third party D-ID provider AI services.
184
- *
185
- * The following AI generation services are available: <ul>
186
- * <li><a href="#tocs_didtexttoavataroptions">DidTextToAvatarOptions</a></li>
187
- * </ul>
188
- */
189
- export const didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema = z.object({
190
- type: z.literal('didTextToAvatarOptions_DIDTextToAvatarOptions')
191
- }).strict().and(didTextToAvatarOptionsDidTextToAvatarOptionsSchema);
192
- export const didGeneratedAssetOptionsSchema = didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema;
193
- /**
194
- * 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.
195
- */
196
- export const didGeneratedAssetDidGeneratedAssetSchema = z.object({
197
- provider: z.enum(['d-id']),
198
- options: didGeneratedAssetOptionsDidGeneratedAssetOptionsSchema
199
- }).strict();
200
- export const didGeneratedAssetSchema = didGeneratedAssetDidGeneratedAssetSchema;
201
- /**
202
- * 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.
203
- */
204
- export const elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema = z.object({
205
- type: z.enum(['text-to-speech']),
206
- text: z.string(),
207
- voice: z.enum([
208
- 'Adam',
209
- 'Antoni',
210
- 'Arnold',
211
- 'Bella',
212
- 'Domi',
213
- 'Elli',
214
- 'Josh',
215
- 'Rachel',
216
- 'Sam'
217
- ])
218
- }).strict();
219
- export const elevenLabsTextToSpeechOptionsSchema = elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema;
220
- /**
221
- * Generate assets using the third party ElevenLabs provider AI services.
222
- *
223
- * The following AI generation services are available: <ul>
224
- * <li><a href="#tocs_elevenlabstexttospeechoptions">ElevenLabsTextToSpeechOptions</a></li>
225
- * </ul>
226
- */
227
- export const elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema = z.object({
228
- type: z.literal('elevenlabsTextToSpeechOptions_ElevenLabsTextToSpeechOptions')
229
- }).strict().and(elevenlabsTextToSpeechOptionsElevenLabsTextToSpeechOptionsSchema);
230
- export const elevenLabsGeneratedAssetOptionsSchema = elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema;
231
- /**
232
- * 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.
233
- */
234
- export const elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema = z.object({
235
- provider: z.enum(['elevenlabs']),
236
- options: elevenlabsGeneratedAssetOptionsElevenLabsGeneratedAssetOptionsSchema
237
- }).strict();
238
- export const elevenLabsGeneratedAssetSchema = elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema;
239
- /**
240
- * 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.
241
- */
242
- export const heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema = z.object({
243
- type: z.enum(['text-to-avatar']),
244
- text: z.string(),
245
- avatar: z.enum([
246
- 'Angela',
247
- 'Bill',
248
- 'Daisy',
249
- 'Derek',
250
- 'Eva',
251
- 'Jake',
252
- 'Jeff',
253
- 'Jerome',
254
- 'Joon',
255
- 'Kayla',
256
- 'Kent',
257
- 'Luna',
258
- 'Mark',
259
- 'Matthew',
260
- 'Monica',
261
- 'Peter',
262
- 'Selina',
263
- 'Tanya',
264
- 'Thomas',
265
- 'Tina',
266
- 'Tyler',
267
- 'Vanessa',
268
- 'Vera',
269
- 'Wilson',
270
- 'Zoey'
271
- ]),
272
- voice: z.enum([
273
- 'Abbi - Natural',
274
- 'Adam - Natural',
275
- 'Aiston - Friendly',
276
- 'Alice - Newscaster',
277
- 'Alison - Cheerful',
278
- 'Amber - Friendly',
279
- 'Amy - Warm',
280
- 'Ana - Cheerful',
281
- 'Antoni - Friendly',
282
- 'Aria - Newscaster',
283
- 'Arnold - Cheerful',
284
- 'Arthur - Natural',
285
- 'Bella - Friendly',
286
- 'Belle - Natural',
287
- 'Brandon - Warm',
288
- 'Brian - Natural',
289
- 'Bruce - Natural',
290
- 'Cerise - Cheerful',
291
- 'Christopher - Calm',
292
- 'Clara - Professional',
293
- 'Connor - Natural',
294
- 'Dahlia - Friendly',
295
- 'Davis - Professional',
296
- 'Dean - Natural',
297
- 'Delbert - Cheerful',
298
- 'Edward - Friendly',
299
- 'Elaine - Calm',
300
- 'Emily - Natural',
301
- 'Emma - Newscaster',
302
- 'Eric - Newscaster',
303
- 'Grace - Natural',
304
- 'Hailey - Calm',
305
- 'Indira - Cheerful',
306
- 'Isabella - Cheerful',
307
- 'Jacob - Natural',
308
- 'Jahmai - Friendly',
309
- 'Jane - Serious',
310
- 'Jason - Serious',
311
- 'Jelle - Friendly',
312
- 'Jen - Natural',
313
- 'Jenny - Professional',
314
- 'Jodi - Cheerful',
315
- 'Joey - Calm',
316
- 'Johan - Friendly',
317
- 'Josie - Cheerful',
318
- 'Keanan - Natural',
319
- 'Keith - Cheerful',
320
- 'Kellie - Friendly',
321
- 'Lauren - Friendly',
322
- 'Leah - Natural',
323
- 'Liam - Professional',
324
- 'Libby - Natural',
325
- 'Lily - Professional',
326
- 'Lucas - Natural',
327
- 'Luke - Professional',
328
- 'Luna - Natural',
329
- 'Marieke - Natural',
330
- 'Matthew - Professional',
331
- 'Michelle - Natural',
332
- 'Mitchell - Natural',
333
- 'Molly - Newscaster',
334
- 'Monica - Calm',
335
- 'Natasha - Professional',
336
- 'Neerja - Newscaster',
337
- 'Noah - Serious',
338
- 'Oliver - Newscaster',
339
- 'Olivia - Calm',
340
- 'Paul - Natural',
341
- 'Prabhat - Natural',
342
- 'Raveena - Natural',
343
- 'Rudi - Friendly',
344
- 'Ryan - Professional',
345
- 'Sam - Natural',
346
- 'Sara - Cheerful',
347
- 'Sherry - Friendly',
348
- 'Sonia - Warm',
349
- 'Thomas - Natural',
350
- 'Todd - Professional',
351
- 'Tony - Professional',
352
- 'Tracy - Cheerful',
353
- 'Wayne - Natural',
354
- 'Wilder - Natural',
355
- 'Wille - Natural',
356
- 'William - Friendly'
357
- ]),
358
- avatarStyle: z.optional(z.enum(['normal', 'circle'])),
359
- background: z.optional(z.string()),
360
- ratio: z.optional(z.enum(['16:9', '9:16'])),
361
- test: z.optional(z.boolean())
362
- }).strict();
363
- export const heyGenTextToAvatarOptionsSchema = heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema;
364
- /**
365
- * Generate assets using the third party HeyGen provider AI services.
366
- *
367
- * The following AI generation services are available: <ul>
368
- * <li><a href="#tocs_heygentexttoavataroptions">HeyGenTextToAvatarOptions</a></li>
369
- * </ul>
370
- */
371
- export const heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema = z.object({
372
- type: z.literal('heygenTextToAvatarOptions_HeyGenTextToAvatarOptions')
373
- }).strict().and(heygenTextToAvatarOptionsHeyGenTextToAvatarOptionsSchema);
374
- export const heyGenGeneratedAssetOptionsSchema = heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema;
375
- /**
376
- * Generate assets using HeyGen. HeyGen provide a text-to-avatar service. The HeyGen provider works on a bring-your-own-key basis, credentials are required and must be added via the [dashboard](https://dashboard.shotstack.io/integrations/heygen), not in the request.
377
- */
378
- export const heygenGeneratedAssetHeyGenGeneratedAssetSchema = z.object({
379
- provider: z.enum(['heygen']),
380
- options: heygenGeneratedAssetOptionsHeyGenGeneratedAssetOptionsSchema
381
- }).strict();
382
- export const heyGenGeneratedAssetSchema = heygenGeneratedAssetHeyGenGeneratedAssetSchema;
383
- /**
384
- * Options for the OpenAI text-generator service. Set a text prompt that will be used to generate a new body of text. The output will be generated as a text (txt) file available at the URL returned in the response.
385
- */
386
- export const openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema = z.object({
387
- type: z.enum(['text-generator']),
388
- prompt: z.string(),
389
- model: z.enum(['gpt-3.5-turbo', 'gpt-4']),
390
- systemPrompt: z.optional(z.string())
391
- }).strict();
392
- export const openAiTextGeneratorOptionsSchema = openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema;
393
- /**
394
- * Generate assets using OpenAI provider AI services.
395
- *
396
- * The following AI generation services are available: <ul>
397
- * <li><a href="#tocs_openaitextgeneratoroptions">OpenAiTextGeneratorOptions</a></li>
398
- * </ul>
399
- */
400
- export const openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema = z.object({
401
- type: z.literal('openaiTextGeneratorOptions_OpenAiTextGeneratorOptions')
402
- }).strict().and(openaiTextGeneratorOptionsOpenAiTextGeneratorOptionsSchema);
403
- export const openAiGeneratedAssetOptionsSchema = openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema;
404
- /**
405
- * 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.
406
- */
407
- export const openaiGeneratedAssetOpenAiGeneratedAssetSchema = z.object({
408
- provider: z.enum(['openai']),
409
- options: openaiGeneratedAssetOptionsOpenAiGeneratedAssetOptionsSchema
410
- }).strict();
411
- export const openAiGeneratedAssetSchema = openaiGeneratedAssetOpenAiGeneratedAssetSchema;
412
- /**
413
- * Individual errors returned by the Create API.
414
- */
415
- export const generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema = z.object({
416
- status: z.string(),
417
- title: z.string(),
418
- detail: z.string()
419
- }).strict();
420
- export const generatedAssetErrorResponseDataSchema = generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema;
421
- /**
422
- * Error response data for validation and other errors returned by the Create API.
423
- */
424
- export const generatedAssetErrorResponseGeneratedAssetErrorResponseSchema = z.object({
425
- errors: z.array(generatedAssetErrorResponseDataGeneratedAssetErrorResponseDataSchema)
426
- }).strict();
427
- export const generatedAssetErrorResponseSchema = generatedAssetErrorResponseGeneratedAssetErrorResponseSchema;
428
- /**
429
- * The id and attributes of the generated asset.
430
- */
431
- export const generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema = z.object({
432
- owner: z.string(),
433
- provider: z.enum([
434
- 'shotstack',
435
- 'elevenlabs',
436
- 'heygen',
437
- 'd-id'
438
- ]),
439
- type: z.enum(['text-to-speech', 'text-to-avatar']),
440
- url: z.optional(z.string()),
441
- status: z.enum([
442
- 'queued',
443
- 'processing',
444
- 'saving',
445
- 'done',
446
- 'failed'
447
- ]),
448
- created: z.string(),
449
- updated: z.string()
450
- }).strict();
451
- export const generatedAssetResponseAttributesSchema = generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema;
452
- /**
453
- * The type of resource (an asset), it's id and attributes of the generated file.
454
- */
455
- export const generatedAssetResponseDataGeneratedAssetResponseDataSchema = z.object({
456
- type: z.string(),
457
- id: z.string(),
458
- attributes: generatedAssetResponseAttributesGeneratedAssetResponseAttributesSchema
459
- }).strict();
460
- export const generatedAssetResponseDataSchema = generatedAssetResponseDataGeneratedAssetResponseDataSchema;
461
- /**
462
- * 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.
463
- */
464
- export const generatedAssetResponseGeneratedAssetResponseSchema = z.object({
465
- data: generatedAssetResponseDataGeneratedAssetResponseDataSchema
466
- }).strict();
467
- export const generatedAssetResponseSchema = generatedAssetResponseGeneratedAssetResponseSchema;
468
- /**
469
- * 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.
470
- */
471
- export const shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema = z.object({
472
- type: z.enum(['image-to-video']),
473
- imageUrl: z.string(),
474
- guidanceScale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
475
- return undefined; if (Array.isArray(v))
476
- return v; if (typeof v === 'string') {
477
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
478
- return v;
479
- return Number(v);
480
- } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1.8),
481
- motion: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
482
- return undefined; if (Array.isArray(v))
483
- return v; if (typeof v === 'string') {
484
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
485
- return v;
486
- return Number(v);
487
- } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(127)
488
- }).strict();
489
- export const shotstackImageToVideoOptionsSchema = shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema;
490
- /**
491
- * 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.
492
- */
493
- export const shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema = z.object({
494
- type: z.enum(['text-generator']),
495
- prompt: z.string()
496
- }).strict();
497
- export const shotstackTextGeneratorOptionsSchema = shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema;
498
- /**
499
- * 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.
500
- */
501
- export const shotstackTextToImageOptionsShotstackTextToImageOptionsSchema = z.object({
502
- type: z.enum(['text-to-image']),
503
- prompt: z.string(),
504
- width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
505
- return undefined; if (Array.isArray(v))
506
- return v; if (typeof v === 'string') {
507
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
508
- return v;
509
- return Number(v);
510
- } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
511
- height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
512
- return undefined; if (Array.isArray(v))
513
- return v; if (typeof v === 'string') {
514
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
515
- return v;
516
- return Number(v);
517
- } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
518
- }).strict();
519
- export const shotstackTextToImageOptionsSchema = shotstackTextToImageOptionsShotstackTextToImageOptionsSchema;
520
- /**
521
- * 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.
522
- */
523
- export const shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema = z.object({
524
- type: z.enum(['text-to-speech']),
525
- text: z.string(),
526
- voice: z.enum([
527
- 'Hala',
528
- 'Lisa',
529
- 'Arlet',
530
- 'Hiujin',
531
- 'Zhiyu',
532
- 'Sofie',
533
- 'Laura',
534
- 'Olivia',
535
- 'Amy',
536
- 'Emma',
537
- 'Brian',
538
- 'Arthur',
539
- 'Kajal',
540
- 'Niamh',
541
- 'Aria',
542
- 'Ayanda',
543
- 'Ivy',
544
- 'Joanna',
545
- 'Kendra',
546
- 'Kimberly',
547
- 'Salli',
548
- 'Joey',
549
- 'Justin',
550
- 'Kevin',
551
- 'Matthew',
552
- 'Ruth',
553
- 'Stephen',
554
- 'Suvi',
555
- 'Léa',
556
- 'Rémi',
557
- 'Gabrielle',
558
- 'Liam',
559
- 'Vicki',
560
- 'Daniel',
561
- 'Hannah',
562
- 'Kajal',
563
- 'Bianca',
564
- 'Adriano',
565
- 'Takumi',
566
- 'Kazuha',
567
- 'Tomoko',
568
- 'Seoyeon',
569
- 'Ida',
570
- 'Ola',
571
- 'Camila',
572
- 'Vitória',
573
- 'Vitoria',
574
- 'Thiago',
575
- 'Inês',
576
- 'Ines',
577
- 'Lucia',
578
- 'Sergio',
579
- 'Mia',
580
- 'Andrés',
581
- 'Lupe',
582
- 'Pedro',
583
- 'Elin'
584
- ]),
585
- language: z.optional(z.enum([
586
- 'cmn-CN',
587
- 'da-DK',
588
- 'de-DE',
589
- 'en-AU',
590
- 'en-GB',
591
- 'en-IN',
592
- 'en-US',
593
- 'es-ES',
594
- 'es-MX',
595
- 'es-US',
596
- 'fr-CA',
597
- 'fr-FR',
598
- 'it-IT',
599
- 'ja-JP',
600
- 'hi-IN',
601
- 'ko-KR',
602
- 'nb-NO',
603
- 'nl-NL',
604
- 'pl-PL',
605
- 'pt-BR',
606
- 'pt-PT',
607
- 'sv-SE',
608
- 'en-NZ',
609
- 'en-ZA',
610
- 'ca-ES',
611
- 'de-AT',
612
- 'yue-CN',
613
- 'ar-AE',
614
- 'fi-FI'
615
- ])),
616
- newscaster: z.optional(z.boolean()).default(false)
617
- }).strict();
618
- export const shotstackTextToSpeechOptionsSchema = shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema;
619
- /**
620
- * Generate assets using the native Shotstack provider AI services.
621
- */
622
- export const shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema = z.union([
623
- z.object({
624
- type: z.literal('shotstackTextToSpeechOptions_ShotstackTextToSpeechOptions')
625
- }).strict().and(shotstackTextToSpeechOptionsShotstackTextToSpeechOptionsSchema),
626
- z.object({
627
- type: z.literal('shotstackTextToImageOptions_ShotstackTextToImageOptions')
628
- }).strict().and(shotstackTextToImageOptionsShotstackTextToImageOptionsSchema),
629
- z.object({
630
- type: z.literal('shotstackTextGeneratorOptions_ShotstackTextGeneratorOptions')
631
- }).strict().and(shotstackTextGeneratorOptionsShotstackTextGeneratorOptionsSchema),
632
- z.object({
633
- type: z.literal('shotstackImageToVideoOptions_ShotstackImageToVideoOptions')
634
- }).strict().and(shotstackImageToVideoOptionsShotstackImageToVideoOptionsSchema)
635
- ]);
636
- export const shotstackGeneratedAssetOptionsSchema = shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema;
637
- /**
638
- * 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.
639
- */
640
- export const shotstackGeneratedAssetShotstackGeneratedAssetSchema = z.object({
641
- provider: z.enum(['shotstack']),
642
- options: shotstackGeneratedAssetOptionsShotstackGeneratedAssetOptionsSchema
643
- }).strict();
644
- export const shotstackGeneratedAssetSchema = shotstackGeneratedAssetShotstackGeneratedAssetSchema;
645
- /**
646
- * 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.
647
- */
648
- export const stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema = z.object({
649
- type: z.enum(['text-to-image']),
650
- prompt: z.string(),
651
- engine: z.optional(z.enum([
652
- 'stable-diffusion-xl-1024-v0-9',
653
- 'stable-diffusion-xl-1024-v1-0',
654
- 'stable-diffusion-v1-6',
655
- 'stable-diffusion-512-v2-1',
656
- 'stable-diffusion-xl-beta-v2-2-2'
657
- ])),
658
- width: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
659
- return undefined; if (Array.isArray(v))
660
- return v; if (typeof v === 'string') {
661
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
662
- return v;
663
- return Number(v);
664
- } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
665
- height: z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
666
- return undefined; if (Array.isArray(v))
667
- return v; if (typeof v === 'string') {
668
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
669
- return v;
670
- return Number(v);
671
- } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
672
- steps: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
673
- return undefined; if (Array.isArray(v))
674
- return v; if (typeof v === 'string') {
675
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
676
- return v;
677
- return Number(v);
678
- } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(30),
679
- seed: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
680
- return undefined; if (Array.isArray(v))
681
- return v; if (typeof v === 'string') {
682
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
683
- return v;
684
- return Number(v);
685
- } return v; }), z.number().int()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(0),
686
- cfgScale: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
687
- return undefined; if (Array.isArray(v))
688
- return v; if (typeof v === 'string') {
689
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
690
- return v;
691
- return Number(v);
692
- } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(7),
693
- stylePreset: z.optional(z.enum([
694
- '3d-model',
695
- 'analog-film',
696
- 'anime',
697
- 'cinematic',
698
- 'comic-book',
699
- 'digital-art',
700
- 'enhance',
701
- 'fantasy-art',
702
- 'isometric',
703
- 'line-art',
704
- 'low-poly',
705
- 'modeling-compound',
706
- 'neon-punk',
707
- 'origami',
708
- 'photographic',
709
- 'pixel-art',
710
- 'tile-texture'
711
- ]))
712
- }).strict();
713
- export const stabilityAiTextToImageOptionsSchema = stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema;
714
- /**
715
- * Generate assets using Stability AI provider AI services.
716
- *
717
- * The following AI generation services are available: <ul>
718
- * <li><a href="#tocs_stabilityaitexttoimageoptions">StabilityAiTextToImageOptions</a></li>
719
- * </ul>
720
- */
721
- export const stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema = z.object({
722
- type: z.literal('stabilityAiTextToImageOptions_StabilityAiTextToImageOptions')
723
- }).strict().and(stabilityAiTextToImageOptionsStabilityAiTextToImageOptionsSchema);
724
- export const stabilityAiGeneratedAssetOptionsSchema = stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema;
725
- /**
726
- * 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.
727
- */
728
- export const stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema = z.object({
729
- provider: z.enum(['stability-ai']),
730
- options: stabilityAiGeneratedAssetOptionsStabilityAiGeneratedAssetOptionsSchema
731
- }).strict();
732
- export const stabilityAiGeneratedAssetSchema = stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema;
733
- /**
734
- * 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.
735
- */
736
- export const generatedAssetGeneratedAssetSchema = z.union([
737
- z.object({
738
- provider: z.literal('shotstackGeneratedAsset_ShotstackGeneratedAsset')
739
- }).strict().and(shotstackGeneratedAssetShotstackGeneratedAssetSchema),
740
- z.object({
741
- provider: z.literal('didGeneratedAsset_DIDGeneratedAsset')
742
- }).strict().and(didGeneratedAssetDidGeneratedAssetSchema),
743
- z.object({
744
- provider: z.literal('elevenlabsGeneratedAsset_ElevenLabsGeneratedAsset')
745
- }).strict().and(elevenlabsGeneratedAssetElevenLabsGeneratedAssetSchema),
746
- z.object({
747
- provider: z.literal('heygenGeneratedAsset_HeyGenGeneratedAsset')
748
- }).strict().and(heygenGeneratedAssetHeyGenGeneratedAssetSchema),
749
- z.object({
750
- provider: z.literal('openaiGeneratedAsset_OpenAiGeneratedAsset')
751
- }).strict().and(openaiGeneratedAssetOpenAiGeneratedAssetSchema),
752
- z.object({
753
- provider: z.literal('stabilityAiGeneratedAsset_StabilityAiGeneratedAsset')
754
- }).strict().and(stabilityAiGeneratedAssetStabilityAiGeneratedAssetSchema)
755
- ]);
756
- export const generatedAssetSchema = generatedAssetGeneratedAssetSchema;
757
164
  /**
758
165
  * 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.
759
166
  */
@@ -1361,7 +768,7 @@ export const templateResponseSchema = templateresponseTemplateResponseSchema;
1361
768
  * Font properties for the active/highlighted word.
1362
769
  */
1363
770
  export const richcaptionpropertiesRichCaptionActiveFontSchema = z.object({
1364
- color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default('#ffff00'),
771
+ color: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1365
772
  background: z.optional(z.union([z.string().regex(/^#[A-Fa-f0-9]{6}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1366
773
  opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
1367
774
  return undefined; if (Array.isArray(v))
@@ -2203,6 +1610,34 @@ export const soundtrackSoundtrackSchema = z.object({
2203
1610
  } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
2204
1611
  }).strict();
2205
1612
  export const soundtrackSchema = soundtrackSoundtrackSchema;
1613
+ /**
1614
+ * The SvgAsset is used to add scalable vector graphics (SVG) to a video using raw SVG markup.
1615
+ *
1616
+ * ```json
1617
+ * {
1618
+ * "type": "svg",
1619
+ * "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#FF0000\"/></svg>"
1620
+ * }
1621
+ * ```
1622
+ *
1623
+ * **Supported elements:** `<path>`, `<rect>`, `<circle>`, `<ellipse>`,
1624
+ * `<line>`, `<polygon>`, `<polyline>`
1625
+ *
1626
+ * **Automatically extracted from SVG markup:**
1627
+ * - Path data (converted to a single combined path)
1628
+ * - Fill color (from `fill` attribute or `style`)
1629
+ * - Stroke color and width (from attributes or `style`)
1630
+ * - Dimensions (from `width`/`height` or `viewBox`)
1631
+ * - Opacity (from `opacity` attribute)
1632
+ *
1633
+ * See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.
1634
+ *
1635
+ */
1636
+ export const svgassetSvgAssetSchema = z.object({
1637
+ type: z.enum(["svg"]),
1638
+ src: z.string().min(1).max(500000),
1639
+ }).strict();
1640
+ export const svgAssetSchema = svgassetSvgAssetSchema;
2206
1641
  /**
2207
1642
  * A color stop in a gradient. Each stop defines a color at a specific position
2208
1643
  * along the gradient vector. Gradients require at least 2 stops.
@@ -2712,110 +2147,6 @@ export const svgshapesSvgShapeSchema = z.discriminatedUnion("type", [
2712
2147
  svgshapesSvgPathShapeSchema,
2713
2148
  ]);
2714
2149
  export const svgShapeSchema = svgshapesSvgShapeSchema;
2715
- /**
2716
- * The SvgAsset is used to add scalable vector graphics (SVG) shapes to a video.
2717
- * It provides two mutually exclusive ways to define shapes:
2718
- *
2719
- * **Option 1: Import SVG markup using `src`**
2720
- * ```json
2721
- * {
2722
- * "type": "svg",
2723
- * "src": "<svg width=\"100\" height=\"100\"><circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"#FF0000\"/></svg>"
2724
- * }
2725
- * ```
2726
- * When using `src`, no other properties are allowed. The fill, stroke, and dimensions
2727
- * are automatically extracted from the SVG markup.
2728
- *
2729
- * **Option 2: Define shapes programmatically using `shape`**
2730
- * ```json
2731
- * {
2732
- * "type": "svg",
2733
- * "shape": { "type": "circle", "radius": 50 },
2734
- * "fill": { "type": "solid", "color": "#FF0000" }
2735
- * }
2736
- * ```
2737
- * When using `shape`, you can customize fill, stroke, shadow, transform, and other properties.
2738
- * The `src` property is not allowed in this mode.
2739
- *
2740
- * **Important:** You must provide either `src` OR `shape`, but not both.
2741
- * These two modes are mutually exclusive.
2742
- *
2743
- * **Available Shapes (Option 2 only):**
2744
- * - `rectangle` - Rectangles with optional rounded corners
2745
- * - `circle` - Perfect circles
2746
- * - `ellipse` - Ellipses/ovals with separate x and y radii
2747
- * - `line` - Straight lines with configurable thickness
2748
- * - `polygon` - Regular polygons (triangle, pentagon, hexagon, etc.)
2749
- * - `star` - Multi-pointed stars
2750
- * - `arrow` - Directional arrows
2751
- * - `heart` - Heart shapes
2752
- * - `cross` - Plus/cross shapes
2753
- * - `ring` - Donut/ring shapes
2754
- * - `path` - Custom shapes using SVG path data
2755
- *
2756
- * See [W3C SVG 2 Specification](https://www.w3.org/TR/SVG2/) for path data syntax.
2757
- *
2758
- */
2759
- export const svgassetSvgAssetSchema = z.object({
2760
- type: z.enum(["svg"]),
2761
- src: z.optional(z.string().min(1).max(500000)),
2762
- shape: z.optional(svgshapesSvgShapeSchema),
2763
- fill: z.optional(svgpropertiesSvgFillSchema),
2764
- stroke: z.optional(svgpropertiesSvgStrokeSchema),
2765
- shadow: z.optional(svgpropertiesSvgShadowSchema),
2766
- transform: z.optional(svgpropertiesSvgTransformSchema),
2767
- opacity: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2768
- return undefined; if (Array.isArray(v))
2769
- return v; if (typeof v === 'string') {
2770
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2771
- return v;
2772
- return Number(v);
2773
- } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).default(1),
2774
- width: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2775
- return undefined; if (Array.isArray(v))
2776
- return v; if (typeof v === 'string') {
2777
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2778
- return v;
2779
- return Number(v);
2780
- } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2781
- height: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2782
- return undefined; if (Array.isArray(v))
2783
- return v; if (typeof v === 'string') {
2784
- if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2785
- return v;
2786
- return Number(v);
2787
- } return v; }), z.number().int().gte(1).lte(4096)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2788
- }).strict().superRefine((data, ctx) => {
2789
- const hasShape = data.shape !== undefined;
2790
- const hasSrc = data.src !== undefined && data.src.trim() !== "";
2791
- if (!hasShape && !hasSrc) {
2792
- ctx.addIssue({
2793
- code: z.ZodIssueCode.custom,
2794
- message: "Either 'src' or 'shape' must be provided",
2795
- path: [],
2796
- });
2797
- }
2798
- if (hasShape && hasSrc) {
2799
- ctx.addIssue({
2800
- code: z.ZodIssueCode.custom,
2801
- message: "Provide either 'src' or 'shape', not both",
2802
- path: ["src"],
2803
- });
2804
- }
2805
- if (hasSrc) {
2806
- const disallowedProps = ["shape", "fill", "stroke", "shadow", "transform", "width", "height"];
2807
- for (const prop of disallowedProps) {
2808
- if (data[prop] !== undefined) {
2809
- ctx.addIssue({
2810
- code: z.ZodIssueCode.custom,
2811
- message: `'${prop}' is not allowed when using 'src'. Only 'type' and 'src' are allowed in import mode`,
2812
- path: [prop],
2813
- });
2814
- }
2815
- }
2816
- }
2817
- });
2818
- export const svgAssetSchema = svgassetSvgAssetSchema;
2819
2150
  /**
2820
2151
  * Configure the id and optional merge fields to render a template by id.
2821
2152
  */
@@ -3956,23 +3287,3 @@ export const getUploadSignedUrlRequest = z.object({
3956
3287
  * The id and signed URL to upload to.
3957
3288
  */
3958
3289
  export const getUploadSignedUrlResponse = uploadresponseUploadResponseSchema;
3959
- export const postGenerateAssetRequest = z.object({
3960
- body: generatedAssetGeneratedAssetSchema,
3961
- path: z.optional(z.never()),
3962
- query: z.optional(z.never())
3963
- }).strict();
3964
- /**
3965
- * The generated asset details
3966
- */
3967
- export const postGenerateAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;
3968
- export const getGeneratedAssetRequest = z.object({
3969
- body: z.optional(z.never()),
3970
- path: z.object({
3971
- id: z.union([z.string().regex(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])
3972
- }),
3973
- query: z.optional(z.never())
3974
- }).strict();
3975
- /**
3976
- * The generated asset details
3977
- */
3978
- export const getGeneratedAssetResponse = generatedAssetResponseGeneratedAssetResponseSchema;