@shotstack/schemas 1.13.3 → 1.14.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.
@@ -260,7 +260,7 @@ export const googleCloudStorageDestinationSchema = googleCloudStorageDestination
260
260
  * Pass the folder ID and options to configure how assets are stored in Google Drive.
261
261
  */
262
262
  export const googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = z.object({
263
- folderId: z.string(),
263
+ folderId: z.optional(z.string()),
264
264
  filename: z.optional(z.string())
265
265
  }).strict();
266
266
  export const googleDriveDestinationOptionsSchema = googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema;
@@ -269,7 +269,7 @@ export const googleDriveDestinationOptionsSchema = googleDriveDestinationOptions
269
269
  */
270
270
  export const googleDriveDestinationGoogleDriveDestinationSchema = z.object({
271
271
  provider: z.literal("google-drive"),
272
- options: googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema
272
+ options: z.optional(googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema)
273
273
  }).strict();
274
274
  export const googleDriveDestinationSchema = googleDriveDestinationGoogleDriveDestinationSchema;
275
275
  /**
@@ -479,6 +479,20 @@ export const imageassetImageAssetSchema = z.object({
479
479
  src: z.optional(z.string().min(1).regex(/\S/)),
480
480
  prompt: z.optional(z.string().max(4000)),
481
481
  model: z.optional(z.string()),
482
+ resolution: z.optional(z.enum([
483
+ '1K',
484
+ '2K',
485
+ '4K'
486
+ ])),
487
+ aspectRatio: z.optional(z.enum([
488
+ '1:1',
489
+ '16:9',
490
+ '9:16',
491
+ '4:3',
492
+ '3:4',
493
+ '21:9',
494
+ '9:21'
495
+ ])),
482
496
  crop: z.optional(cropCropSchema)
483
497
  }).strict().superRefine((data, ctx) => {
484
498
  var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
@@ -2182,6 +2196,15 @@ export const audioassetAudioAssetSchema = z.object({
2182
2196
  language: z.optional(z.string()),
2183
2197
  newscaster: z.optional(z.boolean()).default(false),
2184
2198
  model: z.optional(z.string()),
2199
+ musicLengthMs: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2200
+ return undefined; if (Array.isArray(v))
2201
+ return v; if (typeof v === 'string') {
2202
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2203
+ return v;
2204
+ return Number(v);
2205
+ } return v; }), z.number().gte(3000).lte(600000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
2206
+ forceInstrumental: z.optional(z.boolean()).default(false),
2207
+ compositionPlan: z.optional(z.string().max(4000)),
2185
2208
  trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2186
2209
  return undefined; if (Array.isArray(v))
2187
2210
  return v; if (typeof v === 'string') {
@@ -2418,6 +2441,36 @@ export const videoassetVideoAssetSchema = z.object({
2418
2441
  prompt: z.optional(z.string().max(4000)),
2419
2442
  inputSrc: z.optional(z.string().min(1)),
2420
2443
  model: z.optional(z.string()),
2444
+ resolution: z.optional(z.enum([
2445
+ '480p',
2446
+ '720p',
2447
+ '1080p'
2448
+ ])),
2449
+ duration: z.optional(z.enum([
2450
+ 'auto',
2451
+ '4',
2452
+ '5',
2453
+ '6',
2454
+ '7',
2455
+ '8',
2456
+ '9',
2457
+ '10',
2458
+ '11',
2459
+ '12',
2460
+ '13',
2461
+ '14',
2462
+ '15'
2463
+ ])),
2464
+ aspectRatio: z.optional(z.enum([
2465
+ '1:1',
2466
+ '16:9',
2467
+ '9:16',
2468
+ '4:3',
2469
+ '3:4',
2470
+ '21:9',
2471
+ '9:21'
2472
+ ])),
2473
+ generateAudio: z.optional(z.boolean()).default(false),
2421
2474
  transcode: z.optional(z.boolean()),
2422
2475
  trim: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2423
2476
  return undefined; if (Array.isArray(v))
@@ -188,7 +188,7 @@ export const googleCloudStorageDestinationSchema = googleCloudStorageDestination
188
188
  * Pass the folder ID and options to configure how assets are stored in Google Drive.
189
189
  */
190
190
  export const googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema = z.object({
191
- folderId: z.string(),
191
+ folderId: z.optional(z.string()),
192
192
  filename: z.optional(z.string())
193
193
  }).strict();
194
194
 
@@ -199,7 +199,7 @@ export const googleDriveDestinationOptionsSchema = googleDriveDestinationOptions
199
199
  */
200
200
  export const googleDriveDestinationGoogleDriveDestinationSchema = z.object({
201
201
  provider: z.literal("google-drive"),
202
- options: googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema
202
+ options: z.optional(googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema)
203
203
  }).strict();
204
204
 
205
205
  export const googleDriveDestinationSchema = googleDriveDestinationGoogleDriveDestinationSchema;
@@ -427,6 +427,20 @@ export const imageassetImageAssetSchema = z.object({
427
427
  src: z.optional(z.string().min(1).regex(/\S/)),
428
428
  prompt: z.optional(z.string().max(4000)),
429
429
  model: z.optional(z.string()),
430
+ resolution: z.optional(z.enum([
431
+ '1K',
432
+ '2K',
433
+ '4K'
434
+ ])),
435
+ aspectRatio: z.optional(z.enum([
436
+ '1:1',
437
+ '16:9',
438
+ '9:16',
439
+ '4:3',
440
+ '3:4',
441
+ '21:9',
442
+ '9:21'
443
+ ])),
430
444
  crop: z.optional(cropCropSchema)
431
445
  }).strict().superRefine((data, ctx) => {
432
446
  var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
@@ -1798,6 +1812,9 @@ export const audioassetAudioAssetSchema = z.object({
1798
1812
  language: z.optional(z.string()),
1799
1813
  newscaster: z.optional(z.boolean()).default(false),
1800
1814
  model: z.optional(z.string()),
1815
+ musicLengthMs: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(3000).lte(600000)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1816
+ forceInstrumental: z.optional(z.boolean()).default(false),
1817
+ compositionPlan: z.optional(z.string().max(4000)),
1801
1818
  trim: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1802
1819
  volume: z.optional(z.union([
1803
1820
  z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
@@ -1982,6 +1999,36 @@ export const videoassetVideoAssetSchema = z.object({
1982
1999
  prompt: z.optional(z.string().max(4000)),
1983
2000
  inputSrc: z.optional(z.string().min(1)),
1984
2001
  model: z.optional(z.string()),
2002
+ resolution: z.optional(z.enum([
2003
+ '480p',
2004
+ '720p',
2005
+ '1080p'
2006
+ ])),
2007
+ duration: z.optional(z.enum([
2008
+ 'auto',
2009
+ '4',
2010
+ '5',
2011
+ '6',
2012
+ '7',
2013
+ '8',
2014
+ '9',
2015
+ '10',
2016
+ '11',
2017
+ '12',
2018
+ '13',
2019
+ '14',
2020
+ '15'
2021
+ ])),
2022
+ aspectRatio: z.optional(z.enum([
2023
+ '1:1',
2024
+ '16:9',
2025
+ '9:16',
2026
+ '4:3',
2027
+ '3:4',
2028
+ '21:9',
2029
+ '9:21'
2030
+ ])),
2031
+ generateAudio: z.optional(z.boolean()).default(false),
1985
2032
  transcode: z.optional(z.boolean()),
1986
2033
  trim: z.optional(z.union([z.preprocess(((v: unknown) => { if (v === '' || v === null || v === undefined) return undefined; if (Array.isArray(v)) return v; if (typeof v === 'string') { if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v)) return v; return Number(v); } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
1987
2034
  volume: z.optional(z.union([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.13.3",
3
+ "version": "1.14.1",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",