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

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
  */
@@ -752,6 +769,13 @@ export const mergefieldMergeFieldSchema = z.object({
752
769
  replace: z.unknown()
753
770
  }).strict();
754
771
  export const mergeFieldSchema = mergefieldMergeFieldSchema;
772
+ /**
773
+ * Silences English profanity in the clip's speech, and any listed `words`. The audio is transcribed when the edit renders, and the volume drops to zero just before each matching word and returns just after it. Rich captions transcribed from this clip show the same words masked. Profanity detection is not exhaustive: list any word that must not be heard. Cannot be combined with `speed`, `duck` or a volume tween array.
774
+ */
775
+ export const muteMuteSchema = z.object({
776
+ words: z.optional(z.array(z.string().min(1).max(50).regex(/^\S+$/)).min(1).max(200))
777
+ }).strict();
778
+ export const muteSchema = muteMuteSchema;
755
779
  /**
756
780
  * Inverts the clip, turning light areas dark and dark areas light. It has no properties other than `type` and cannot be animated.
757
781
  */
@@ -2379,7 +2403,9 @@ export const audioassetAudioAssetSchema = z.object({
2379
2403
  'fadeIn',
2380
2404
  'fadeOut',
2381
2405
  'fadeInFadeOut'
2382
- ]))
2406
+ ])),
2407
+ duck: z.optional(duckDuckSchema),
2408
+ mute: z.optional(muteMuteSchema)
2383
2409
  }).strict().superRefine((data, ctx) => {
2384
2410
  var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
2385
2411
  var hasPrompt = typeof data.prompt === "string" && data.prompt.trim().length > 0;
@@ -2591,7 +2617,7 @@ export const pixelatefilterPixelateFilterSchema = z.object({
2591
2617
  }).strict();
2592
2618
  export const pixelateFilterSchema = pixelatefilterPixelateFilterSchema;
2593
2619
  /**
2594
- * Offsets the red and blue channels in opposite directions to create a color fringing effect.
2620
+ * Offsets the red and blue channels in opposite directions to create a color fringing effect. Channels pushed past one edge of the frame reappear at the opposite edge, so small values such as 0.02 work best and 1 or -1 shows no split.
2595
2621
  */
2596
2622
  export const rgbsplitfilterRgbSplitFilterSchema = z.object({
2597
2623
  type: z.enum(['rgbSplit']),
@@ -2678,7 +2704,7 @@ export const sharpenfilterSharpenFilterSchema = z.object({
2678
2704
  }).strict();
2679
2705
  export const sharpenFilterSchema = sharpenfilterSharpenFilterSchema;
2680
2706
  /**
2681
- * A filter that adjusts the look of a Clip. Choose from one of the available filter types below. Keyframe values outside a field's range are limited to that range.
2707
+ * A filter that adjusts the look of a Clip. Choose from one of the available filter types below. Tween values outside a field's range are limited to that range.
2682
2708
  */
2683
2709
  export const filterFilterSchema = z.discriminatedUnion("type", [
2684
2710
  brightnessfilterBrightnessFilterSchema,
@@ -2874,6 +2900,7 @@ export const videoassetVideoAssetSchema = z.object({
2874
2900
  'fadeOut',
2875
2901
  'fadeInFadeOut'
2876
2902
  ])),
2903
+ mute: z.optional(muteMuteSchema),
2877
2904
  speed: z.optional(z.union([
2878
2905
  z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2879
2906
  return undefined; if (Array.isArray(v))
@@ -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
  */
@@ -721,6 +734,15 @@ export const mergefieldMergeFieldSchema = z.object({
721
734
 
722
735
  export const mergeFieldSchema = mergefieldMergeFieldSchema;
723
736
 
737
+ /**
738
+ * Silences English profanity in the clip's speech, and any listed `words`. The audio is transcribed when the edit renders, and the volume drops to zero just before each matching word and returns just after it. Rich captions transcribed from this clip show the same words masked. Profanity detection is not exhaustive: list any word that must not be heard. Cannot be combined with `speed`, `duck` or a volume tween array.
739
+ */
740
+ export const muteMuteSchema = z.object({
741
+ words: z.optional(z.array(z.string().min(1).max(50).regex(/^\S+$/)).min(1).max(200))
742
+ }).strict();
743
+
744
+ export const muteSchema = muteMuteSchema;
745
+
724
746
  /**
725
747
  * Inverts the clip, turning light areas dark and dark areas light. It has no properties other than `type` and cannot be animated.
726
748
  */
@@ -1984,7 +2006,9 @@ export const audioassetAudioAssetSchema = z.object({
1984
2006
  'fadeIn',
1985
2007
  'fadeOut',
1986
2008
  'fadeInFadeOut'
1987
- ]))
2009
+ ])),
2010
+ duck: z.optional(duckDuckSchema),
2011
+ mute: z.optional(muteMuteSchema)
1988
2012
  }).strict().superRefine((data, ctx) => {
1989
2013
  var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
1990
2014
  var hasPrompt = typeof data.prompt === "string" && data.prompt.trim().length > 0;
@@ -2122,7 +2146,7 @@ export const pixelatefilterPixelateFilterSchema = z.object({
2122
2146
  export const pixelateFilterSchema = pixelatefilterPixelateFilterSchema;
2123
2147
 
2124
2148
  /**
2125
- * Offsets the red and blue channels in opposite directions to create a color fringing effect.
2149
+ * Offsets the red and blue channels in opposite directions to create a color fringing effect. Channels pushed past one edge of the frame reappear at the opposite edge, so small values such as 0.02 work best and 1 or -1 shows no split.
2126
2150
  */
2127
2151
  export const rgbsplitfilterRgbSplitFilterSchema = z.object({
2128
2152
  type: z.enum(['rgbSplit']),
@@ -2181,7 +2205,7 @@ export const sharpenfilterSharpenFilterSchema = z.object({
2181
2205
  export const sharpenFilterSchema = sharpenfilterSharpenFilterSchema;
2182
2206
 
2183
2207
  /**
2184
- * A filter that adjusts the look of a Clip. Choose from one of the available filter types below. Keyframe values outside a field's range are limited to that range.
2208
+ * A filter that adjusts the look of a Clip. Choose from one of the available filter types below. Tween values outside a field's range are limited to that range.
2185
2209
  */
2186
2210
  export const filterFilterSchema = z.discriminatedUnion("type", [
2187
2211
  brightnessfilterBrightnessFilterSchema,
@@ -2345,6 +2369,7 @@ export const videoassetVideoAssetSchema = z.object({
2345
2369
  'fadeOut',
2346
2370
  'fadeInFadeOut'
2347
2371
  ])),
2372
+ mute: z.optional(muteMuteSchema),
2348
2373
  speed: z.optional(z.union([
2349
2374
  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(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2350
2375
  z.array(tweenTweenSchema)
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.3",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",