@shotstack/schemas 1.23.4 → 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
  */
@@ -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
+ * Inverts the clip, turning light areas dark and dark areas light. It has no properties other than `type` and cannot be animated.
774
+ */
775
+ export const negativefilterNegativeFilterSchema = z.object({
776
+ type: z.enum(['negative'])
777
+ }).strict();
778
+ export const negativeFilterSchema = negativefilterNegativeFilterSchema;
755
779
  /**
756
780
  * 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.
757
781
  */
@@ -2372,7 +2396,8 @@ export const audioassetAudioAssetSchema = z.object({
2372
2396
  'fadeIn',
2373
2397
  'fadeOut',
2374
2398
  'fadeInFadeOut'
2375
- ]))
2399
+ ])),
2400
+ duck: z.optional(duckDuckSchema)
2376
2401
  }).strict().superRefine((data, ctx) => {
2377
2402
  var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
2378
2403
  var hasPrompt = typeof data.prompt === "string" && data.prompt.trim().length > 0;
@@ -2385,6 +2410,161 @@ export const audioassetAudioAssetSchema = z.object({
2385
2410
  }
2386
2411
  });
2387
2412
  export const audioAssetSchema = audioassetAudioAssetSchema;
2413
+ /**
2414
+ * Blurs the clip. Set `value` to blur both axes equally, or set `x` and `y` to blur each axis separately.
2415
+ */
2416
+ export const blurfilterBlurFilterSchema = z.object({
2417
+ type: z.enum(['blur']),
2418
+ value: z.optional(z.union([
2419
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2420
+ return undefined; if (Array.isArray(v))
2421
+ return v; if (typeof v === 'string') {
2422
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2423
+ return v;
2424
+ return Number(v);
2425
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2426
+ z.array(tweenTweenSchema)
2427
+ ])),
2428
+ x: z.optional(z.union([
2429
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2430
+ return undefined; if (Array.isArray(v))
2431
+ return v; if (typeof v === 'string') {
2432
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2433
+ return v;
2434
+ return Number(v);
2435
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2436
+ z.array(tweenTweenSchema)
2437
+ ])),
2438
+ y: z.optional(z.union([
2439
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2440
+ return undefined; if (Array.isArray(v))
2441
+ return v; if (typeof v === 'string') {
2442
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2443
+ return v;
2444
+ return Number(v);
2445
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2446
+ z.array(tweenTweenSchema)
2447
+ ]))
2448
+ }).strict();
2449
+ export const blurFilterSchema = blurfilterBlurFilterSchema;
2450
+ /**
2451
+ * Lightens or darkens the clip.
2452
+ */
2453
+ export const brightnessfilterBrightnessFilterSchema = z.object({
2454
+ type: z.enum(['brightness']),
2455
+ value: z.optional(z.union([
2456
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2457
+ return undefined; if (Array.isArray(v))
2458
+ return v; if (typeof v === 'string') {
2459
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2460
+ return v;
2461
+ return Number(v);
2462
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2463
+ z.array(tweenTweenSchema)
2464
+ ]))
2465
+ }).strict();
2466
+ export const brightnessFilterSchema = brightnessfilterBrightnessFilterSchema;
2467
+ /**
2468
+ * Increases or decreases the difference between the light and dark areas of the clip.
2469
+ */
2470
+ export const contrastfilterContrastFilterSchema = z.object({
2471
+ type: z.enum(['contrast']),
2472
+ value: z.optional(z.union([
2473
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2474
+ return undefined; if (Array.isArray(v))
2475
+ return v; if (typeof v === 'string') {
2476
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2477
+ return v;
2478
+ return Number(v);
2479
+ } return v; }), z.number().gte(0).lte(4)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2480
+ z.array(tweenTweenSchema)
2481
+ ]))
2482
+ }).strict();
2483
+ export const contrastFilterSchema = contrastfilterContrastFilterSchema;
2484
+ /**
2485
+ * Applies several grading adjustments at once: exposure, temperature, tint, highlights, shadows and vibrance. Every property is optional and an omitted property leaves the clip unchanged.
2486
+ */
2487
+ export const gradefilterGradeFilterSchema = z.object({
2488
+ type: z.enum(['grade']),
2489
+ exposure: z.optional(z.union([
2490
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2491
+ return undefined; if (Array.isArray(v))
2492
+ return v; if (typeof v === 'string') {
2493
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2494
+ return v;
2495
+ return Number(v);
2496
+ } return v; }), z.number().gte(-4).lte(4)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2497
+ z.array(tweenTweenSchema)
2498
+ ])),
2499
+ temperature: z.optional(z.union([
2500
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2501
+ return undefined; if (Array.isArray(v))
2502
+ return v; if (typeof v === 'string') {
2503
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2504
+ return v;
2505
+ return Number(v);
2506
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2507
+ z.array(tweenTweenSchema)
2508
+ ])),
2509
+ tint: z.optional(z.union([
2510
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2511
+ return undefined; if (Array.isArray(v))
2512
+ return v; if (typeof v === 'string') {
2513
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2514
+ return v;
2515
+ return Number(v);
2516
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2517
+ z.array(tweenTweenSchema)
2518
+ ])),
2519
+ highlights: z.optional(z.union([
2520
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2521
+ return undefined; if (Array.isArray(v))
2522
+ return v; if (typeof v === 'string') {
2523
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2524
+ return v;
2525
+ return Number(v);
2526
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2527
+ z.array(tweenTweenSchema)
2528
+ ])),
2529
+ shadows: z.optional(z.union([
2530
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2531
+ return undefined; if (Array.isArray(v))
2532
+ return v; if (typeof v === 'string') {
2533
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2534
+ return v;
2535
+ return Number(v);
2536
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2537
+ z.array(tweenTweenSchema)
2538
+ ])),
2539
+ vibrance: z.optional(z.union([
2540
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2541
+ return undefined; if (Array.isArray(v))
2542
+ return v; if (typeof v === 'string') {
2543
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2544
+ return v;
2545
+ return Number(v);
2546
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2547
+ z.array(tweenTweenSchema)
2548
+ ]))
2549
+ }).strict();
2550
+ export const gradeFilterSchema = gradefilterGradeFilterSchema;
2551
+ /**
2552
+ * Rotates the hues of the clip around the color wheel.
2553
+ */
2554
+ export const huefilterHueFilterSchema = z.object({
2555
+ type: z.enum(['hue']),
2556
+ value: z.optional(z.union([
2557
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2558
+ return undefined; if (Array.isArray(v))
2559
+ return v; if (typeof v === 'string') {
2560
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2561
+ return v;
2562
+ return Number(v);
2563
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2564
+ z.array(tweenTweenSchema)
2565
+ ]))
2566
+ }).strict();
2567
+ export const hueFilterSchema = huefilterHueFilterSchema;
2388
2568
  /**
2389
2569
  * Offsets the position of an asset horizontally or vertically by a relative distance.
2390
2570
  */
@@ -2411,6 +2591,50 @@ export const offsetOffsetSchema = z.object({
2411
2591
  ]))
2412
2592
  }).strict();
2413
2593
  export const offsetSchema = offsetOffsetSchema;
2594
+ /**
2595
+ * Turns the clip into blocky pixels.
2596
+ */
2597
+ export const pixelatefilterPixelateFilterSchema = z.object({
2598
+ type: z.enum(['pixelate']),
2599
+ value: z.optional(z.union([
2600
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2601
+ return undefined; if (Array.isArray(v))
2602
+ return v; if (typeof v === 'string') {
2603
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2604
+ return v;
2605
+ return Number(v);
2606
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2607
+ z.array(tweenTweenSchema)
2608
+ ]))
2609
+ }).strict();
2610
+ export const pixelateFilterSchema = pixelatefilterPixelateFilterSchema;
2611
+ /**
2612
+ * Offsets the red and blue channels in opposite directions to create a color fringing effect.
2613
+ */
2614
+ export const rgbsplitfilterRgbSplitFilterSchema = z.object({
2615
+ type: z.enum(['rgbSplit']),
2616
+ x: z.optional(z.union([
2617
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2618
+ return undefined; if (Array.isArray(v))
2619
+ return v; if (typeof v === 'string') {
2620
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2621
+ return v;
2622
+ return Number(v);
2623
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2624
+ z.array(tweenTweenSchema)
2625
+ ])),
2626
+ y: z.optional(z.union([
2627
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2628
+ return undefined; if (Array.isArray(v))
2629
+ return v; if (typeof v === 'string') {
2630
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2631
+ return v;
2632
+ return Number(v);
2633
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2634
+ z.array(tweenTweenSchema)
2635
+ ]))
2636
+ }).strict();
2637
+ export const rgbSplitFilterSchema = rgbsplitfilterRgbSplitFilterSchema;
2414
2638
  /**
2415
2639
  * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
2416
2640
  */
@@ -2427,6 +2651,66 @@ export const rotatetransformationRotateTransformationSchema = z.object({
2427
2651
  ]))
2428
2652
  }).strict();
2429
2653
  export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
2654
+ /**
2655
+ * Increases or decreases the intensity of the colors in the clip.
2656
+ */
2657
+ export const saturationfilterSaturationFilterSchema = z.object({
2658
+ type: z.enum(['saturation']),
2659
+ value: z.optional(z.union([
2660
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2661
+ return undefined; if (Array.isArray(v))
2662
+ return v; if (typeof v === 'string') {
2663
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2664
+ return v;
2665
+ return Number(v);
2666
+ } return v; }), z.number().gte(0).lte(4)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2667
+ z.array(tweenTweenSchema)
2668
+ ]))
2669
+ }).strict();
2670
+ export const saturationFilterSchema = saturationfilterSaturationFilterSchema;
2671
+ /**
2672
+ * Sharpens the clip.
2673
+ */
2674
+ export const sharpenfilterSharpenFilterSchema = z.object({
2675
+ type: z.enum(['sharpen']),
2676
+ value: z.optional(z.union([
2677
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2678
+ return undefined; if (Array.isArray(v))
2679
+ return v; if (typeof v === 'string') {
2680
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2681
+ return v;
2682
+ return Number(v);
2683
+ } return v; }), z.number().gte(0).lte(40)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2684
+ z.array(tweenTweenSchema)
2685
+ ])),
2686
+ radius: z.optional(z.union([
2687
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2688
+ return undefined; if (Array.isArray(v))
2689
+ return v; if (typeof v === 'string') {
2690
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2691
+ return v;
2692
+ return Number(v);
2693
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2694
+ z.array(tweenTweenSchema)
2695
+ ]))
2696
+ }).strict();
2697
+ export const sharpenFilterSchema = sharpenfilterSharpenFilterSchema;
2698
+ /**
2699
+ * 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.
2700
+ */
2701
+ export const filterFilterSchema = z.discriminatedUnion("type", [
2702
+ brightnessfilterBrightnessFilterSchema,
2703
+ contrastfilterContrastFilterSchema,
2704
+ saturationfilterSaturationFilterSchema,
2705
+ huefilterHueFilterSchema,
2706
+ gradefilterGradeFilterSchema,
2707
+ blurfilterBlurFilterSchema,
2708
+ sharpenfilterSharpenFilterSchema,
2709
+ pixelatefilterPixelateFilterSchema,
2710
+ rgbsplitfilterRgbSplitFilterSchema,
2711
+ negativefilterNegativeFilterSchema,
2712
+ ]);
2713
+ export const filterSchema = filterFilterSchema;
2430
2714
  /**
2431
2715
  * Skew a clip so its edges are sheared at an angle. Use values between -100 and 100. Values over 3 or under -3 will skew the clip almost flat.
2432
2716
  */
@@ -2754,6 +3038,7 @@ export const clipClipSchema = z.object({
2754
3038
  'muted',
2755
3039
  'negative'
2756
3040
  ])),
3041
+ filters: z.optional(z.array(filterFilterSchema)),
2757
3042
  opacity: z.optional(z.union([
2758
3043
  z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2759
3044
  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
+ * Inverts the clip, turning light areas dark and dark areas light. It has no properties other than `type` and cannot be animated.
739
+ */
740
+ export const negativefilterNegativeFilterSchema = z.object({
741
+ type: z.enum(['negative'])
742
+ }).strict();
743
+
744
+ export const negativeFilterSchema = negativefilterNegativeFilterSchema;
745
+
724
746
  /**
725
747
  * 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.
726
748
  */
@@ -1975,7 +1997,8 @@ export const audioassetAudioAssetSchema = z.object({
1975
1997
  'fadeIn',
1976
1998
  'fadeOut',
1977
1999
  'fadeInFadeOut'
1978
- ]))
2000
+ ])),
2001
+ duck: z.optional(duckDuckSchema)
1979
2002
  }).strict().superRefine((data, ctx) => {
1980
2003
  var hasSrc = typeof data.src === "string" && data.src.trim().length > 0;
1981
2004
  var hasPrompt = typeof data.prompt === "string" && data.prompt.trim().length > 0;
@@ -1990,6 +2013,99 @@ export const audioassetAudioAssetSchema = z.object({
1990
2013
 
1991
2014
  export const audioAssetSchema = audioassetAudioAssetSchema;
1992
2015
 
2016
+ /**
2017
+ * Blurs the clip. Set `value` to blur both axes equally, or set `x` and `y` to blur each axis separately.
2018
+ */
2019
+ export const blurfilterBlurFilterSchema = z.object({
2020
+ type: z.enum(['blur']),
2021
+ value: z.optional(z.union([
2022
+ 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(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2023
+ z.array(tweenTweenSchema)
2024
+ ])),
2025
+ x: z.optional(z.union([
2026
+ 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(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2027
+ z.array(tweenTweenSchema)
2028
+ ])),
2029
+ y: z.optional(z.union([
2030
+ 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(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2031
+ z.array(tweenTweenSchema)
2032
+ ]))
2033
+ }).strict();
2034
+
2035
+ export const blurFilterSchema = blurfilterBlurFilterSchema;
2036
+
2037
+ /**
2038
+ * Lightens or darkens the clip.
2039
+ */
2040
+ export const brightnessfilterBrightnessFilterSchema = z.object({
2041
+ type: z.enum(['brightness']),
2042
+ value: z.optional(z.union([
2043
+ 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(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2044
+ z.array(tweenTweenSchema)
2045
+ ]))
2046
+ }).strict();
2047
+
2048
+ export const brightnessFilterSchema = brightnessfilterBrightnessFilterSchema;
2049
+
2050
+ /**
2051
+ * Increases or decreases the difference between the light and dark areas of the clip.
2052
+ */
2053
+ export const contrastfilterContrastFilterSchema = z.object({
2054
+ type: z.enum(['contrast']),
2055
+ value: z.optional(z.union([
2056
+ 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(4)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2057
+ z.array(tweenTweenSchema)
2058
+ ]))
2059
+ }).strict();
2060
+
2061
+ export const contrastFilterSchema = contrastfilterContrastFilterSchema;
2062
+
2063
+ /**
2064
+ * Applies several grading adjustments at once: exposure, temperature, tint, highlights, shadows and vibrance. Every property is optional and an omitted property leaves the clip unchanged.
2065
+ */
2066
+ export const gradefilterGradeFilterSchema = z.object({
2067
+ type: z.enum(['grade']),
2068
+ exposure: z.optional(z.union([
2069
+ 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(-4).lte(4)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2070
+ z.array(tweenTweenSchema)
2071
+ ])),
2072
+ temperature: z.optional(z.union([
2073
+ 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(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2074
+ z.array(tweenTweenSchema)
2075
+ ])),
2076
+ tint: z.optional(z.union([
2077
+ 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(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2078
+ z.array(tweenTweenSchema)
2079
+ ])),
2080
+ highlights: z.optional(z.union([
2081
+ 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(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2082
+ z.array(tweenTweenSchema)
2083
+ ])),
2084
+ shadows: z.optional(z.union([
2085
+ 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(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2086
+ z.array(tweenTweenSchema)
2087
+ ])),
2088
+ vibrance: z.optional(z.union([
2089
+ 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(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2090
+ z.array(tweenTweenSchema)
2091
+ ]))
2092
+ }).strict();
2093
+
2094
+ export const gradeFilterSchema = gradefilterGradeFilterSchema;
2095
+
2096
+ /**
2097
+ * Rotates the hues of the clip around the color wheel.
2098
+ */
2099
+ export const huefilterHueFilterSchema = z.object({
2100
+ type: z.enum(['hue']),
2101
+ value: z.optional(z.union([
2102
+ 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*\}\}$/)]),
2103
+ z.array(tweenTweenSchema)
2104
+ ]))
2105
+ }).strict();
2106
+
2107
+ export const hueFilterSchema = huefilterHueFilterSchema;
2108
+
1993
2109
  /**
1994
2110
  * Offsets the position of an asset horizontally or vertically by a relative distance.
1995
2111
  */
@@ -2006,6 +2122,36 @@ export const offsetOffsetSchema = z.object({
2006
2122
 
2007
2123
  export const offsetSchema = offsetOffsetSchema;
2008
2124
 
2125
+ /**
2126
+ * Turns the clip into blocky pixels.
2127
+ */
2128
+ export const pixelatefilterPixelateFilterSchema = z.object({
2129
+ type: z.enum(['pixelate']),
2130
+ value: z.optional(z.union([
2131
+ 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*\}\}$/)]),
2132
+ z.array(tweenTweenSchema)
2133
+ ]))
2134
+ }).strict();
2135
+
2136
+ export const pixelateFilterSchema = pixelatefilterPixelateFilterSchema;
2137
+
2138
+ /**
2139
+ * Offsets the red and blue channels in opposite directions to create a color fringing effect.
2140
+ */
2141
+ export const rgbsplitfilterRgbSplitFilterSchema = z.object({
2142
+ type: z.enum(['rgbSplit']),
2143
+ x: z.optional(z.union([
2144
+ 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(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2145
+ z.array(tweenTweenSchema)
2146
+ ])),
2147
+ y: z.optional(z.union([
2148
+ 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(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2149
+ z.array(tweenTweenSchema)
2150
+ ]))
2151
+ }).strict();
2152
+
2153
+ export const rgbSplitFilterSchema = rgbsplitfilterRgbSplitFilterSchema;
2154
+
2009
2155
  /**
2010
2156
  * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
2011
2157
  */
@@ -2018,6 +2164,54 @@ export const rotatetransformationRotateTransformationSchema = z.object({
2018
2164
 
2019
2165
  export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
2020
2166
 
2167
+ /**
2168
+ * Increases or decreases the intensity of the colors in the clip.
2169
+ */
2170
+ export const saturationfilterSaturationFilterSchema = z.object({
2171
+ type: z.enum(['saturation']),
2172
+ value: z.optional(z.union([
2173
+ 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(4)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2174
+ z.array(tweenTweenSchema)
2175
+ ]))
2176
+ }).strict();
2177
+
2178
+ export const saturationFilterSchema = saturationfilterSaturationFilterSchema;
2179
+
2180
+ /**
2181
+ * Sharpens the clip.
2182
+ */
2183
+ export const sharpenfilterSharpenFilterSchema = z.object({
2184
+ type: z.enum(['sharpen']),
2185
+ value: z.optional(z.union([
2186
+ 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(40)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2187
+ z.array(tweenTweenSchema)
2188
+ ])),
2189
+ radius: z.optional(z.union([
2190
+ 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*\}\}$/)]),
2191
+ z.array(tweenTweenSchema)
2192
+ ]))
2193
+ }).strict();
2194
+
2195
+ export const sharpenFilterSchema = sharpenfilterSharpenFilterSchema;
2196
+
2197
+ /**
2198
+ * 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.
2199
+ */
2200
+ export const filterFilterSchema = z.discriminatedUnion("type", [
2201
+ brightnessfilterBrightnessFilterSchema,
2202
+ contrastfilterContrastFilterSchema,
2203
+ saturationfilterSaturationFilterSchema,
2204
+ huefilterHueFilterSchema,
2205
+ gradefilterGradeFilterSchema,
2206
+ blurfilterBlurFilterSchema,
2207
+ sharpenfilterSharpenFilterSchema,
2208
+ pixelatefilterPixelateFilterSchema,
2209
+ rgbsplitfilterRgbSplitFilterSchema,
2210
+ negativefilterNegativeFilterSchema,
2211
+ ]);
2212
+
2213
+ export const filterSchema = filterFilterSchema;
2214
+
2021
2215
  /**
2022
2216
  * Skew a clip so its edges are sheared at an angle. Use values between -100 and 100. Values over 3 or under -3 will skew the clip almost flat.
2023
2217
  */
@@ -2279,6 +2473,7 @@ export const clipClipSchema = z.object({
2279
2473
  'muted',
2280
2474
  'negative'
2281
2475
  ])),
2476
+ filters: z.optional(z.array(filterFilterSchema)),
2282
2477
  opacity: z.optional(z.union([
2283
2478
  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*\}\}$/)]),
2284
2479
  z.array(tweenTweenSchema)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.23.4",
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",