@shotstack/schemas 1.23.4 → 1.24.0-beta.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.
@@ -752,6 +752,13 @@ export const mergefieldMergeFieldSchema = z.object({
752
752
  replace: z.unknown()
753
753
  }).strict();
754
754
  export const mergeFieldSchema = mergefieldMergeFieldSchema;
755
+ /**
756
+ * Inverts the clip, turning light areas dark and dark areas light. It has no properties other than `type` and cannot be animated.
757
+ */
758
+ export const negativefilterNegativeFilterSchema = z.object({
759
+ type: z.enum(['negative'])
760
+ }).strict();
761
+ export const negativeFilterSchema = negativefilterNegativeFilterSchema;
755
762
  /**
756
763
  * 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
764
  */
@@ -2385,6 +2392,161 @@ export const audioassetAudioAssetSchema = z.object({
2385
2392
  }
2386
2393
  });
2387
2394
  export const audioAssetSchema = audioassetAudioAssetSchema;
2395
+ /**
2396
+ * Blurs the clip. Set `value` to blur both axes equally, or set `x` and `y` to blur each axis separately.
2397
+ */
2398
+ export const blurfilterBlurFilterSchema = z.object({
2399
+ type: z.enum(['blur']),
2400
+ value: z.optional(z.union([
2401
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2402
+ return undefined; if (Array.isArray(v))
2403
+ return v; if (typeof v === 'string') {
2404
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2405
+ return v;
2406
+ return Number(v);
2407
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2408
+ z.array(tweenTweenSchema)
2409
+ ])),
2410
+ x: z.optional(z.union([
2411
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2412
+ return undefined; if (Array.isArray(v))
2413
+ return v; if (typeof v === 'string') {
2414
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2415
+ return v;
2416
+ return Number(v);
2417
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2418
+ z.array(tweenTweenSchema)
2419
+ ])),
2420
+ y: z.optional(z.union([
2421
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2422
+ return undefined; if (Array.isArray(v))
2423
+ return v; if (typeof v === 'string') {
2424
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2425
+ return v;
2426
+ return Number(v);
2427
+ } return v; }), z.number().gte(0).lte(100)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2428
+ z.array(tweenTweenSchema)
2429
+ ]))
2430
+ }).strict();
2431
+ export const blurFilterSchema = blurfilterBlurFilterSchema;
2432
+ /**
2433
+ * Lightens or darkens the clip.
2434
+ */
2435
+ export const brightnessfilterBrightnessFilterSchema = z.object({
2436
+ type: z.enum(['brightness']),
2437
+ value: z.optional(z.union([
2438
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2439
+ return undefined; if (Array.isArray(v))
2440
+ return v; if (typeof v === 'string') {
2441
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2442
+ return v;
2443
+ return Number(v);
2444
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2445
+ z.array(tweenTweenSchema)
2446
+ ]))
2447
+ }).strict();
2448
+ export const brightnessFilterSchema = brightnessfilterBrightnessFilterSchema;
2449
+ /**
2450
+ * Increases or decreases the difference between the light and dark areas of the clip.
2451
+ */
2452
+ export const contrastfilterContrastFilterSchema = z.object({
2453
+ type: z.enum(['contrast']),
2454
+ value: z.optional(z.union([
2455
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2456
+ return undefined; if (Array.isArray(v))
2457
+ return v; if (typeof v === 'string') {
2458
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2459
+ return v;
2460
+ return Number(v);
2461
+ } return v; }), z.number().gte(0).lte(4)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2462
+ z.array(tweenTweenSchema)
2463
+ ]))
2464
+ }).strict();
2465
+ export const contrastFilterSchema = contrastfilterContrastFilterSchema;
2466
+ /**
2467
+ * 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.
2468
+ */
2469
+ export const gradefilterGradeFilterSchema = z.object({
2470
+ type: z.enum(['grade']),
2471
+ exposure: z.optional(z.union([
2472
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2473
+ return undefined; if (Array.isArray(v))
2474
+ return v; if (typeof v === 'string') {
2475
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2476
+ return v;
2477
+ return Number(v);
2478
+ } return v; }), z.number().gte(-4).lte(4)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2479
+ z.array(tweenTweenSchema)
2480
+ ])),
2481
+ temperature: z.optional(z.union([
2482
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2483
+ return undefined; if (Array.isArray(v))
2484
+ return v; if (typeof v === 'string') {
2485
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2486
+ return v;
2487
+ return Number(v);
2488
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2489
+ z.array(tweenTweenSchema)
2490
+ ])),
2491
+ tint: z.optional(z.union([
2492
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2493
+ return undefined; if (Array.isArray(v))
2494
+ return v; if (typeof v === 'string') {
2495
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2496
+ return v;
2497
+ return Number(v);
2498
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2499
+ z.array(tweenTweenSchema)
2500
+ ])),
2501
+ highlights: z.optional(z.union([
2502
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2503
+ return undefined; if (Array.isArray(v))
2504
+ return v; if (typeof v === 'string') {
2505
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2506
+ return v;
2507
+ return Number(v);
2508
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2509
+ z.array(tweenTweenSchema)
2510
+ ])),
2511
+ shadows: z.optional(z.union([
2512
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2513
+ return undefined; if (Array.isArray(v))
2514
+ return v; if (typeof v === 'string') {
2515
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2516
+ return v;
2517
+ return Number(v);
2518
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2519
+ z.array(tweenTweenSchema)
2520
+ ])),
2521
+ vibrance: z.optional(z.union([
2522
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2523
+ return undefined; if (Array.isArray(v))
2524
+ return v; if (typeof v === 'string') {
2525
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2526
+ return v;
2527
+ return Number(v);
2528
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2529
+ z.array(tweenTweenSchema)
2530
+ ]))
2531
+ }).strict();
2532
+ export const gradeFilterSchema = gradefilterGradeFilterSchema;
2533
+ /**
2534
+ * Rotates the hues of the clip around the color wheel.
2535
+ */
2536
+ export const huefilterHueFilterSchema = z.object({
2537
+ type: z.enum(['hue']),
2538
+ value: z.optional(z.union([
2539
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2540
+ return undefined; if (Array.isArray(v))
2541
+ return v; if (typeof v === 'string') {
2542
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2543
+ return v;
2544
+ return Number(v);
2545
+ } return v; }), z.number()), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2546
+ z.array(tweenTweenSchema)
2547
+ ]))
2548
+ }).strict();
2549
+ export const hueFilterSchema = huefilterHueFilterSchema;
2388
2550
  /**
2389
2551
  * Offsets the position of an asset horizontally or vertically by a relative distance.
2390
2552
  */
@@ -2411,6 +2573,50 @@ export const offsetOffsetSchema = z.object({
2411
2573
  ]))
2412
2574
  }).strict();
2413
2575
  export const offsetSchema = offsetOffsetSchema;
2576
+ /**
2577
+ * Turns the clip into blocky pixels.
2578
+ */
2579
+ export const pixelatefilterPixelateFilterSchema = z.object({
2580
+ type: z.enum(['pixelate']),
2581
+ value: z.optional(z.union([
2582
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2583
+ return undefined; if (Array.isArray(v))
2584
+ return v; if (typeof v === 'string') {
2585
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2586
+ return v;
2587
+ return Number(v);
2588
+ } return v; }), z.number().gte(0).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2589
+ z.array(tweenTweenSchema)
2590
+ ]))
2591
+ }).strict();
2592
+ export const pixelateFilterSchema = pixelatefilterPixelateFilterSchema;
2593
+ /**
2594
+ * Offsets the red and blue channels in opposite directions to create a color fringing effect.
2595
+ */
2596
+ export const rgbsplitfilterRgbSplitFilterSchema = z.object({
2597
+ type: z.enum(['rgbSplit']),
2598
+ x: z.optional(z.union([
2599
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2600
+ return undefined; if (Array.isArray(v))
2601
+ return v; if (typeof v === 'string') {
2602
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2603
+ return v;
2604
+ return Number(v);
2605
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2606
+ z.array(tweenTweenSchema)
2607
+ ])),
2608
+ y: z.optional(z.union([
2609
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2610
+ return undefined; if (Array.isArray(v))
2611
+ return v; if (typeof v === 'string') {
2612
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2613
+ return v;
2614
+ return Number(v);
2615
+ } return v; }), z.number().gte(-1).lte(1)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2616
+ z.array(tweenTweenSchema)
2617
+ ]))
2618
+ }).strict();
2619
+ export const rgbSplitFilterSchema = rgbsplitfilterRgbSplitFilterSchema;
2414
2620
  /**
2415
2621
  * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
2416
2622
  */
@@ -2427,6 +2633,66 @@ export const rotatetransformationRotateTransformationSchema = z.object({
2427
2633
  ]))
2428
2634
  }).strict();
2429
2635
  export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
2636
+ /**
2637
+ * Increases or decreases the intensity of the colors in the clip.
2638
+ */
2639
+ export const saturationfilterSaturationFilterSchema = z.object({
2640
+ type: z.enum(['saturation']),
2641
+ value: z.optional(z.union([
2642
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2643
+ return undefined; if (Array.isArray(v))
2644
+ return v; if (typeof v === 'string') {
2645
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2646
+ return v;
2647
+ return Number(v);
2648
+ } return v; }), z.number().gte(0).lte(4)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2649
+ z.array(tweenTweenSchema)
2650
+ ]))
2651
+ }).strict();
2652
+ export const saturationFilterSchema = saturationfilterSaturationFilterSchema;
2653
+ /**
2654
+ * Sharpens the clip.
2655
+ */
2656
+ export const sharpenfilterSharpenFilterSchema = z.object({
2657
+ type: z.enum(['sharpen']),
2658
+ value: z.optional(z.union([
2659
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2660
+ return undefined; if (Array.isArray(v))
2661
+ return v; if (typeof v === 'string') {
2662
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2663
+ return v;
2664
+ return Number(v);
2665
+ } return v; }), z.number().gte(0).lte(40)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2666
+ z.array(tweenTweenSchema)
2667
+ ])),
2668
+ radius: z.optional(z.union([
2669
+ z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2670
+ return undefined; if (Array.isArray(v))
2671
+ return v; if (typeof v === 'string') {
2672
+ if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
2673
+ return v;
2674
+ return Number(v);
2675
+ } return v; }), z.number().gte(0).lte(10)), z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]),
2676
+ z.array(tweenTweenSchema)
2677
+ ]))
2678
+ }).strict();
2679
+ export const sharpenFilterSchema = sharpenfilterSharpenFilterSchema;
2680
+ /**
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.
2682
+ */
2683
+ export const filterFilterSchema = z.discriminatedUnion("type", [
2684
+ brightnessfilterBrightnessFilterSchema,
2685
+ contrastfilterContrastFilterSchema,
2686
+ saturationfilterSaturationFilterSchema,
2687
+ huefilterHueFilterSchema,
2688
+ gradefilterGradeFilterSchema,
2689
+ blurfilterBlurFilterSchema,
2690
+ sharpenfilterSharpenFilterSchema,
2691
+ pixelatefilterPixelateFilterSchema,
2692
+ rgbsplitfilterRgbSplitFilterSchema,
2693
+ negativefilterNegativeFilterSchema,
2694
+ ]);
2695
+ export const filterSchema = filterFilterSchema;
2430
2696
  /**
2431
2697
  * 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
2698
  */
@@ -2754,6 +3020,7 @@ export const clipClipSchema = z.object({
2754
3020
  'muted',
2755
3021
  'negative'
2756
3022
  ])),
3023
+ filters: z.optional(z.array(filterFilterSchema)),
2757
3024
  opacity: z.optional(z.union([
2758
3025
  z.union([z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2759
3026
  return undefined; if (Array.isArray(v))
@@ -721,6 +721,15 @@ export const mergefieldMergeFieldSchema = z.object({
721
721
 
722
722
  export const mergeFieldSchema = mergefieldMergeFieldSchema;
723
723
 
724
+ /**
725
+ * Inverts the clip, turning light areas dark and dark areas light. It has no properties other than `type` and cannot be animated.
726
+ */
727
+ export const negativefilterNegativeFilterSchema = z.object({
728
+ type: z.enum(['negative'])
729
+ }).strict();
730
+
731
+ export const negativeFilterSchema = negativefilterNegativeFilterSchema;
732
+
724
733
  /**
725
734
  * 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
735
  */
@@ -1990,6 +1999,99 @@ export const audioassetAudioAssetSchema = z.object({
1990
1999
 
1991
2000
  export const audioAssetSchema = audioassetAudioAssetSchema;
1992
2001
 
2002
+ /**
2003
+ * Blurs the clip. Set `value` to blur both axes equally, or set `x` and `y` to blur each axis separately.
2004
+ */
2005
+ export const blurfilterBlurFilterSchema = z.object({
2006
+ type: z.enum(['blur']),
2007
+ value: z.optional(z.union([
2008
+ 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*\}\}$/)]),
2009
+ z.array(tweenTweenSchema)
2010
+ ])),
2011
+ x: z.optional(z.union([
2012
+ 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*\}\}$/)]),
2013
+ z.array(tweenTweenSchema)
2014
+ ])),
2015
+ y: z.optional(z.union([
2016
+ 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*\}\}$/)]),
2017
+ z.array(tweenTweenSchema)
2018
+ ]))
2019
+ }).strict();
2020
+
2021
+ export const blurFilterSchema = blurfilterBlurFilterSchema;
2022
+
2023
+ /**
2024
+ * Lightens or darkens the clip.
2025
+ */
2026
+ export const brightnessfilterBrightnessFilterSchema = z.object({
2027
+ type: z.enum(['brightness']),
2028
+ value: z.optional(z.union([
2029
+ 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*\}\}$/)]),
2030
+ z.array(tweenTweenSchema)
2031
+ ]))
2032
+ }).strict();
2033
+
2034
+ export const brightnessFilterSchema = brightnessfilterBrightnessFilterSchema;
2035
+
2036
+ /**
2037
+ * Increases or decreases the difference between the light and dark areas of the clip.
2038
+ */
2039
+ export const contrastfilterContrastFilterSchema = z.object({
2040
+ type: z.enum(['contrast']),
2041
+ value: z.optional(z.union([
2042
+ 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*\}\}$/)]),
2043
+ z.array(tweenTweenSchema)
2044
+ ]))
2045
+ }).strict();
2046
+
2047
+ export const contrastFilterSchema = contrastfilterContrastFilterSchema;
2048
+
2049
+ /**
2050
+ * 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.
2051
+ */
2052
+ export const gradefilterGradeFilterSchema = z.object({
2053
+ type: z.enum(['grade']),
2054
+ exposure: z.optional(z.union([
2055
+ 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*\}\}$/)]),
2056
+ z.array(tweenTweenSchema)
2057
+ ])),
2058
+ temperature: z.optional(z.union([
2059
+ 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*\}\}$/)]),
2060
+ z.array(tweenTweenSchema)
2061
+ ])),
2062
+ tint: z.optional(z.union([
2063
+ 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*\}\}$/)]),
2064
+ z.array(tweenTweenSchema)
2065
+ ])),
2066
+ highlights: z.optional(z.union([
2067
+ 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*\}\}$/)]),
2068
+ z.array(tweenTweenSchema)
2069
+ ])),
2070
+ shadows: z.optional(z.union([
2071
+ 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*\}\}$/)]),
2072
+ z.array(tweenTweenSchema)
2073
+ ])),
2074
+ vibrance: z.optional(z.union([
2075
+ 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*\}\}$/)]),
2076
+ z.array(tweenTweenSchema)
2077
+ ]))
2078
+ }).strict();
2079
+
2080
+ export const gradeFilterSchema = gradefilterGradeFilterSchema;
2081
+
2082
+ /**
2083
+ * Rotates the hues of the clip around the color wheel.
2084
+ */
2085
+ export const huefilterHueFilterSchema = z.object({
2086
+ type: z.enum(['hue']),
2087
+ value: z.optional(z.union([
2088
+ 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*\}\}$/)]),
2089
+ z.array(tweenTweenSchema)
2090
+ ]))
2091
+ }).strict();
2092
+
2093
+ export const hueFilterSchema = huefilterHueFilterSchema;
2094
+
1993
2095
  /**
1994
2096
  * Offsets the position of an asset horizontally or vertically by a relative distance.
1995
2097
  */
@@ -2006,6 +2108,36 @@ export const offsetOffsetSchema = z.object({
2006
2108
 
2007
2109
  export const offsetSchema = offsetOffsetSchema;
2008
2110
 
2111
+ /**
2112
+ * Turns the clip into blocky pixels.
2113
+ */
2114
+ export const pixelatefilterPixelateFilterSchema = z.object({
2115
+ type: z.enum(['pixelate']),
2116
+ value: z.optional(z.union([
2117
+ 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*\}\}$/)]),
2118
+ z.array(tweenTweenSchema)
2119
+ ]))
2120
+ }).strict();
2121
+
2122
+ export const pixelateFilterSchema = pixelatefilterPixelateFilterSchema;
2123
+
2124
+ /**
2125
+ * Offsets the red and blue channels in opposite directions to create a color fringing effect.
2126
+ */
2127
+ export const rgbsplitfilterRgbSplitFilterSchema = z.object({
2128
+ type: z.enum(['rgbSplit']),
2129
+ x: z.optional(z.union([
2130
+ 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*\}\}$/)]),
2131
+ z.array(tweenTweenSchema)
2132
+ ])),
2133
+ y: z.optional(z.union([
2134
+ 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*\}\}$/)]),
2135
+ z.array(tweenTweenSchema)
2136
+ ]))
2137
+ }).strict();
2138
+
2139
+ export const rgbSplitFilterSchema = rgbsplitfilterRgbSplitFilterSchema;
2140
+
2009
2141
  /**
2010
2142
  * Rotate a clip by the specified angle in degrees. Rotation origin is set based on the clips `position`.
2011
2143
  */
@@ -2018,6 +2150,54 @@ export const rotatetransformationRotateTransformationSchema = z.object({
2018
2150
 
2019
2151
  export const rotateTransformationSchema = rotatetransformationRotateTransformationSchema;
2020
2152
 
2153
+ /**
2154
+ * Increases or decreases the intensity of the colors in the clip.
2155
+ */
2156
+ export const saturationfilterSaturationFilterSchema = z.object({
2157
+ type: z.enum(['saturation']),
2158
+ value: z.optional(z.union([
2159
+ 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*\}\}$/)]),
2160
+ z.array(tweenTweenSchema)
2161
+ ]))
2162
+ }).strict();
2163
+
2164
+ export const saturationFilterSchema = saturationfilterSaturationFilterSchema;
2165
+
2166
+ /**
2167
+ * Sharpens the clip.
2168
+ */
2169
+ export const sharpenfilterSharpenFilterSchema = z.object({
2170
+ type: z.enum(['sharpen']),
2171
+ value: z.optional(z.union([
2172
+ 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*\}\}$/)]),
2173
+ z.array(tweenTweenSchema)
2174
+ ])),
2175
+ radius: z.optional(z.union([
2176
+ 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*\}\}$/)]),
2177
+ z.array(tweenTweenSchema)
2178
+ ]))
2179
+ }).strict();
2180
+
2181
+ export const sharpenFilterSchema = sharpenfilterSharpenFilterSchema;
2182
+
2183
+ /**
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.
2185
+ */
2186
+ export const filterFilterSchema = z.discriminatedUnion("type", [
2187
+ brightnessfilterBrightnessFilterSchema,
2188
+ contrastfilterContrastFilterSchema,
2189
+ saturationfilterSaturationFilterSchema,
2190
+ huefilterHueFilterSchema,
2191
+ gradefilterGradeFilterSchema,
2192
+ blurfilterBlurFilterSchema,
2193
+ sharpenfilterSharpenFilterSchema,
2194
+ pixelatefilterPixelateFilterSchema,
2195
+ rgbsplitfilterRgbSplitFilterSchema,
2196
+ negativefilterNegativeFilterSchema,
2197
+ ]);
2198
+
2199
+ export const filterSchema = filterFilterSchema;
2200
+
2021
2201
  /**
2022
2202
  * 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
2203
  */
@@ -2279,6 +2459,7 @@ export const clipClipSchema = z.object({
2279
2459
  'muted',
2280
2460
  'negative'
2281
2461
  ])),
2462
+ filters: z.optional(z.array(filterFilterSchema)),
2282
2463
  opacity: z.optional(z.union([
2283
2464
  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
2465
  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.1",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",