@shotstack/schemas 1.24.0-beta.1 → 1.24.0-beta.2

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.
@@ -417,6 +417,23 @@ export const destinationsDestinationsSchema = z.discriminatedUnion("provider", [
417
417
  azureBlobStorageDestinationAzureBlobStorageDestinationSchema
418
418
  ]);
419
419
  export const destinationsSchema = destinationsDestinationsSchema;
420
+ /**
421
+ * Lowers the clip's volume while other clips play and restores it afterwards, for example to keep music under a voiceover. The volume ramps down just before each referenced clip starts and back up after it ends. Requires a numeric `volume` on the clip and cannot be combined with `speed`.
422
+ */
423
+ export const duckDuckSchema = z.object({
424
+ under: z.union([
425
+ z.union([z.string().regex(/^alias:\/\/[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
426
+ z.array(z.union([z.string().regex(/^alias:\/\/[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).min(1)
427
+ ]),
428
+ volume: z.optional(z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
429
+ return undefined; if (Array.isArray(v))
430
+ return v; if (typeof v === 'string') {
431
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
432
+ return v;
433
+ return Number(v);
434
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
435
+ }).strict();
436
+ export const duckSchema = duckDuckSchema;
420
437
  /**
421
438
  * Flip a clip vertically or horizontally. Acts as a mirror effect of the clip along the selected plane.
422
439
  */
@@ -2379,7 +2396,8 @@ export const audioassetAudioAssetSchema = z.object({
2379
2396
  'fadeIn',
2380
2397
  'fadeOut',
2381
2398
  'fadeInFadeOut'
2382
- ]))
2399
+ ])),
2400
+ duck: z.optional(duckDuckSchema)
2383
2401
  }).strict().superRefine((data, ctx) => {
2384
2402
  var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
2385
2403
  var hasPrompt = typeof data.prompt === "string" && data.prompt.trim().length > 0;
@@ -374,6 +374,19 @@ export const destinationsDestinationsSchema = z.discriminatedUnion("provider", [
374
374
 
375
375
  export const destinationsSchema = destinationsDestinationsSchema;
376
376
 
377
+ /**
378
+ * Lowers the clip's volume while other clips play and restores it afterwards, for example to keep music under a voiceover. The volume ramps down just before each referenced clip starts and back up after it ends. Requires a numeric `volume` on the clip and cannot be combined with `speed`.
379
+ */
380
+ export const duckDuckSchema = z.object({
381
+ under: z.union([
382
+ z.union([z.string().regex(/^alias:\/\/[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
383
+ z.array(z.union([z.string().regex(/^alias:\/\/[A-Za-z0-9_-]+$/), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])).min(1)
384
+ ]),
385
+ volume: 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(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
386
+ }).strict();
387
+
388
+ export const duckSchema = duckDuckSchema;
389
+
377
390
  /**
378
391
  * Flip a clip vertically or horizontally. Acts as a mirror effect of the clip along the selected plane.
379
392
  */
@@ -1984,7 +1997,8 @@ export const audioassetAudioAssetSchema = z.object({
1984
1997
  'fadeIn',
1985
1998
  'fadeOut',
1986
1999
  'fadeInFadeOut'
1987
- ]))
2000
+ ])),
2001
+ duck: z.optional(duckDuckSchema)
1988
2002
  }).strict().superRefine((data, ctx) => {
1989
2003
  var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
1990
2004
  var hasPrompt = typeof data.prompt === "string" && data.prompt.trim().length > 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.24.0-beta.1",
3
+ "version": "1.24.0-beta.2",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",