@shotstack/schemas 1.4.2 → 1.4.4

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.
@@ -1026,10 +1026,9 @@
1026
1026
  },
1027
1027
  {
1028
1028
  "type": "string",
1029
- "description": "The start position using a [smart clip property](/docs/guide/architecting-an-application/smart-clips/). Set to `auto` to automatically play the clip after the previous clip finishes.",
1030
- "enum": [
1031
- "auto"
1032
- ]
1029
+ "description": "The start position using a [smart clip property](/docs/guide/architecting-an-application/smart-clips/). Set to `auto` to automatically play the clip after the previous clip finishes. Use `alias://clip-name` to inherit the start time from the referenced clip.",
1030
+ "pattern": "^(auto|alias://[A-Za-z0-9_-]+)$",
1031
+ "example": "auto"
1033
1032
  }
1034
1033
  ]
1035
1034
  },
@@ -1043,11 +1042,9 @@
1043
1042
  },
1044
1043
  {
1045
1044
  "type": "string",
1046
- "description": "The duration the Clip should play for using a [smart clip property](/docs/guide/architecting-an-application/smart-clips/). Set to `auto` to play the Clip for the duration of the asset. Set to `end` to display or play the clip to the end of the timeline.",
1047
- "enum": [
1048
- "auto",
1049
- "end"
1050
- ]
1045
+ "description": "The duration the Clip should play for using a [smart clip property](/docs/guide/architecting-an-application/smart-clips/). Set to `auto` to play the Clip for the duration of the asset. Set to `end` to display or play the clip to the end of the timeline. Use `alias://clip-name` to inherit the length from the referenced clip.",
1046
+ "pattern": "^(auto|end|alias://[A-Za-z0-9_-]+)$",
1047
+ "example": "auto"
1051
1048
  }
1052
1049
  ]
1053
1050
  },
@@ -1811,7 +1808,7 @@
1811
1808
  "type": "string"
1812
1809
  },
1813
1810
  "src": {
1814
- "description": "The URL to an SRT or VTT subtitles file. The URL must be publicly accessible or include credentials.",
1811
+ "description": "The URL to an SRT or VTT subtitles file, or an alias reference to auto-generate captions from an audio or video clip. For file URLs, the URL must be publicly accessible or include credentials. For auto-captioning, use the format `alias://clip-name` where clip-name is the alias of an audio, video, or text-to-speech clip. The system will automatically transcribe the audio and detect the language.",
1815
1812
  "type": "string",
1816
1813
  "example": "https://s3-ap-northeast-1.amazonaws.com/my-bucket/captions.srt"
1817
1814
  },
@@ -1828,7 +1825,7 @@
1828
1825
  "$ref": "#/components/schemas/CaptionMargin"
1829
1826
  },
1830
1827
  "trim": {
1831
- "description": "The start trim point of the captions, in seconds (defaults to 0). Remove the trim length from teh start of the captions and allow it to be synced with video or audio. The captions will play until the file ends or the Clip length is reached.",
1828
+ "description": "The start trim point of the captions, in seconds (defaults to 0). Remove the trim length from the start of the captions and allow it to be synced with video or audio. The captions will play until the file ends or the Clip length is reached.",
1832
1829
  "type": "number",
1833
1830
  "example": 2
1834
1831
  },
@@ -3746,11 +3743,12 @@
3746
3743
  "type": "object"
3747
3744
  },
3748
3745
  "ChromaKey": {
3749
- "description": "Chroma key, commonly known as green screen, is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments.",
3746
+ "description": "Chroma key is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments. Commonly used for green screen and blue screen effects.",
3750
3747
  "properties": {
3751
3748
  "color": {
3752
- "description": "The chroma key color as a hex value. For a green screen, use a green hex value.",
3749
+ "description": "The chroma key color as a hex value. Use green (#00b140) for green screens or blue (#0000FF) for blue screens. Any valid hex color can be used as the key color.",
3753
3750
  "type": "string",
3751
+ "pattern": "^#[0-9a-fA-F]{6}$",
3754
3752
  "example": "#00b140"
3755
3753
  },
3756
3754
  "threshold": {
@@ -3768,6 +3766,9 @@
3768
3766
  "example": 100
3769
3767
  }
3770
3768
  },
3769
+ "required": [
3770
+ "color"
3771
+ ],
3771
3772
  "type": "object"
3772
3773
  },
3773
3774
  "Tween": {
@@ -4397,6 +4398,14 @@
4397
4398
  "nobody",
4398
4399
  "contacts"
4399
4400
  ]
4401
+ },
4402
+ "download": {
4403
+ "description": "Set whether the video can be downloaded.",
4404
+ "type": "boolean"
4405
+ },
4406
+ "add": {
4407
+ "description": "Set whether other users can add the video to their collections.",
4408
+ "type": "boolean"
4400
4409
  }
4401
4410
  },
4402
4411
  "type": "object"
package/dist/schema.d.ts CHANGED
@@ -498,9 +498,9 @@ export interface components {
498
498
  Clip: {
499
499
  asset: components["schemas"]["Asset"];
500
500
  /** @description The start position of the Clip on the timeline. */
501
- start: number | "auto";
501
+ start: number | string;
502
502
  /** @description The duration the Clip should play for. */
503
- length: number | ("auto" | "end");
503
+ length: number | string;
504
504
  /**
505
505
  * @description Set how the asset should be scaled to fit the viewport using one of the following options:
506
506
  * <ul>
@@ -942,7 +942,7 @@ export interface components {
942
942
  */
943
943
  type: "caption";
944
944
  /**
945
- * @description The URL to an SRT or VTT subtitles file. The URL must be publicly accessible or include credentials.
945
+ * @description The URL to an SRT or VTT subtitles file, or an alias reference to auto-generate captions from an audio or video clip. For file URLs, the URL must be publicly accessible or include credentials. For auto-captioning, use the format `alias://clip-name` where clip-name is the alias of an audio, video, or text-to-speech clip. The system will automatically transcribe the audio and detect the language.
946
946
  * @example https://s3-ap-northeast-1.amazonaws.com/my-bucket/captions.srt
947
947
  */
948
948
  src: string;
@@ -953,7 +953,7 @@ export interface components {
953
953
  /** @description Margin properties. */
954
954
  margin?: components["schemas"]["CaptionMargin"];
955
955
  /**
956
- * @description The start trim point of the captions, in seconds (defaults to 0). Remove the trim length from teh start of the captions and allow it to be synced with video or audio. The captions will play until the file ends or the Clip length is reached.
956
+ * @description The start trim point of the captions, in seconds (defaults to 0). Remove the trim length from the start of the captions and allow it to be synced with video or audio. The captions will play until the file ends or the Clip length is reached.
957
957
  * @example 2
958
958
  */
959
959
  trim?: number;
@@ -2344,13 +2344,13 @@ export interface components {
2344
2344
  */
2345
2345
  right?: number;
2346
2346
  };
2347
- /** @description Chroma key, commonly known as green screen, is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments. */
2347
+ /** @description Chroma key is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments. Commonly used for green screen and blue screen effects. */
2348
2348
  ChromaKey: {
2349
2349
  /**
2350
- * @description The chroma key color as a hex value. For a green screen, use a green hex value.
2350
+ * @description The chroma key color as a hex value. Use green (#00b140) for green screens or blue (#0000FF) for blue screens. Any valid hex color can be used as the key color.
2351
2351
  * @example #00b140
2352
2352
  */
2353
- color?: string;
2353
+ color: string;
2354
2354
  /**
2355
2355
  * @description Pixels within this distance from the key color are eliminated by setting their alpha values to zero.
2356
2356
  * @example 150
@@ -2794,6 +2794,10 @@ export interface components {
2794
2794
  * @enum {string}
2795
2795
  */
2796
2796
  comments?: "anybody" | "nobody" | "contacts";
2797
+ /** @description Set whether the video can be downloaded. */
2798
+ download?: boolean;
2799
+ /** @description Set whether other users can add the video to their collections. */
2800
+ add?: boolean;
2797
2801
  };
2798
2802
  /** @description A template is a saved [Edit](#tocs_edit) than can be loaded and re-used. */
2799
2803
  Template: {
@@ -117,10 +117,10 @@ exports.captionassetCaptionAssetSchema = zod_1.z.object({
117
117
  });
118
118
  exports.captionAssetSchema = exports.captionassetCaptionAssetSchema;
119
119
  /**
120
- * Chroma key, commonly known as green screen, is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments.
120
+ * Chroma key is a technique that replaces a specific color in a video with a different background image or video, enabling seamless integration of diverse environments. Commonly used for green screen and blue screen effects.
121
121
  */
122
122
  exports.chromakeyChromaKeySchema = zod_1.z.object({
123
- color: zod_1.z.optional(zod_1.z.string()),
123
+ color: zod_1.z.string().regex(/^#[0-9a-fA-F]{6}$/),
124
124
  threshold: zod_1.z.optional(zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
125
125
  return undefined; if (Array.isArray(v))
126
126
  return v; if (typeof v === 'string')
@@ -730,7 +730,7 @@ exports.googleCloudStorageDestinationOptionsSchema = exports.googleCloudStorageD
730
730
  * Send videos and assets to a [Google Cloud Storage](https://cloud.google.com/storage) bucket. Send files with your own prefix and filename. Google Cloud credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/google-cloud-storage), not in the request.
731
731
  */
732
732
  exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema = zod_1.z.object({
733
- provider: zod_1.z.string().default('google-cloud-storage'),
733
+ provider: zod_1.z.literal('google-cloud-storage'),
734
734
  options: zod_1.z.optional(exports.googleCloudStorageDestinationOptionsGoogleCloudStorageDestinationOptionsSchema)
735
735
  });
736
736
  exports.googleCloudStorageDestinationSchema = exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema;
@@ -746,7 +746,7 @@ exports.googleDriveDestinationOptionsSchema = exports.googleDriveDestinationOpti
746
746
  * Send rendered videos and assets to the [Google Drive](https://shotstack.io/docs/guide/serving-assets/destinations/google-drive/) cloud storage service. Google Drive uses OAuth and you must authenticate and link your Google account via [dashboard](https://dashboard.shotstack.io/integrations/google-drive), not in the request.
747
747
  */
748
748
  exports.googleDriveDestinationGoogleDriveDestinationSchema = zod_1.z.object({
749
- provider: zod_1.z.string().default('google-drive'),
749
+ provider: zod_1.z.literal('google-drive'),
750
750
  options: exports.googleDriveDestinationOptionsGoogleDriveDestinationOptionsSchema
751
751
  });
752
752
  exports.googleDriveDestinationSchema = exports.googleDriveDestinationGoogleDriveDestinationSchema;
@@ -762,7 +762,7 @@ exports.muxDestinationOptionsSchema = exports.muxDestinationOptionsMuxDestinatio
762
762
  * Send videos to the [Mux](https://shotstack.io/docs/guide/serving-assets/destinations/mux/) video hosting and streaming service. Mux credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/mux), not in the request.
763
763
  */
764
764
  exports.muxDestinationMuxDestinationSchema = zod_1.z.object({
765
- provider: zod_1.z.string().default('mux'),
765
+ provider: zod_1.z.literal('mux'),
766
766
  options: zod_1.z.optional(exports.muxDestinationOptionsMuxDestinationOptionsSchema)
767
767
  });
768
768
  exports.muxDestinationSchema = exports.muxDestinationMuxDestinationSchema;
@@ -781,7 +781,7 @@ exports.s3DestinationOptionsSchema = exports.s3DestinationOptionsS3DestinationOp
781
781
  * Send videos and assets to an [Amazon S3](https://shotstack.io/docs/guide/serving-assets/destinations/s3/) bucket. Send files to any region with your own prefix and filename. AWS credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/s3), not in the request.
782
782
  */
783
783
  exports.s3DestinationS3DestinationSchema = zod_1.z.object({
784
- provider: zod_1.z.string().default('s3'),
784
+ provider: zod_1.z.literal('s3'),
785
785
  options: zod_1.z.optional(exports.s3DestinationOptionsS3DestinationOptionsSchema)
786
786
  });
787
787
  exports.s3DestinationSchema = exports.s3DestinationS3DestinationSchema;
@@ -789,7 +789,7 @@ exports.s3DestinationSchema = exports.s3DestinationS3DestinationSchema;
789
789
  * Send videos and assets to the [Shotstack hosting and CDN](https://shotstack.io/docs/guide/serving-assets/destinations/shotstack/) service. This destination is enabled by default.
790
790
  */
791
791
  exports.shotstackDestinationShotstackDestinationSchema = zod_1.z.object({
792
- provider: zod_1.z.string().default('shotstack'),
792
+ provider: zod_1.z.literal('shotstack'),
793
793
  exclude: zod_1.z.optional(zod_1.z.boolean())
794
794
  });
795
795
  exports.shotstackDestinationSchema = exports.shotstackDestinationShotstackDestinationSchema;
@@ -811,7 +811,7 @@ exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema = zod_1.z.object(
811
811
  * Send videos to TikTok. TikTok credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/tiktok), not in the request.
812
812
  */
813
813
  exports.tiktokDestinationTiktokDestinationSchema = zod_1.z.object({
814
- provider: zod_1.z.string().default('tiktok'),
814
+ provider: zod_1.z.literal('tiktok'),
815
815
  options: zod_1.z.optional(exports.tiktokDestinationOptionsTiktokDestinationOptionsSchema)
816
816
  });
817
817
  /**
@@ -834,7 +834,9 @@ exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema = zod
834
834
  'anybody',
835
835
  'nobody',
836
836
  'contacts'
837
- ]))
837
+ ])),
838
+ download: zod_1.z.optional(zod_1.z.boolean()),
839
+ add: zod_1.z.optional(zod_1.z.boolean())
838
840
  });
839
841
  exports.vimeoDestinationPrivacyOptionsSchema = exports.vimeoDestinationPrivacyOptionsVimeoDestinationPrivacyOptionsSchema;
840
842
  /**
@@ -851,7 +853,7 @@ exports.vimeoDestinationOptionsSchema = exports.vimeoDestinationOptionsVimeoDest
851
853
  * Send videos to [Vimeo](https://shotstack.io/docs/guide/serving-assets/destinations/vimeo/) video hosting and streaming service. Vimeo credentials are required and added via the [dashboard](https://dashboard.shotstack.io/integrations/vimeo), not in the request.
852
854
  */
853
855
  exports.vimeoDestinationVimeoDestinationSchema = zod_1.z.object({
854
- provider: zod_1.z.string().default('vimeo'),
856
+ provider: zod_1.z.literal('vimeo'),
855
857
  options: zod_1.z.optional(exports.vimeoDestinationOptionsVimeoDestinationOptionsSchema)
856
858
  });
857
859
  exports.vimeoDestinationSchema = exports.vimeoDestinationVimeoDestinationSchema;
@@ -860,28 +862,14 @@ exports.vimeoDestinationSchema = exports.vimeoDestinationVimeoDestinationSchema;
860
862
  *
861
863
  * By default all ingested and generated assets are automatically sent to the [Shotstack hosting destination](https://shotstack.io/docs/guide/serving-assets/hosting/). You can [opt-out](https://shotstack.io/docs/guide/serving-assets/self-host/) from by setting the Shotstack destination **exclude** property to **true**.
862
864
  */
863
- exports.destinationsDestinationsSchema = zod_1.z.union([
864
- zod_1.z.object({
865
- destinations: zod_1.z.optional(zod_1.z.literal('shotstackDestination_ShotstackDestination'))
866
- }).and(exports.shotstackDestinationShotstackDestinationSchema),
867
- zod_1.z.object({
868
- destinations: zod_1.z.optional(zod_1.z.literal('muxDestination_MuxDestination'))
869
- }).and(exports.muxDestinationMuxDestinationSchema),
870
- zod_1.z.object({
871
- destinations: zod_1.z.optional(zod_1.z.literal('s3Destination_S3Destination'))
872
- }).and(exports.s3DestinationS3DestinationSchema),
873
- zod_1.z.object({
874
- destinations: zod_1.z.optional(zod_1.z.literal('googleCloudStorageDestination_GoogleCloudStorageDestination'))
875
- }).and(exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema),
876
- zod_1.z.object({
877
- destinations: zod_1.z.optional(zod_1.z.literal('googleDriveDestination_GoogleDriveDestination'))
878
- }).and(exports.googleDriveDestinationGoogleDriveDestinationSchema),
879
- zod_1.z.object({
880
- destinations: zod_1.z.optional(zod_1.z.literal('vimeoDestination_VimeoDestination'))
881
- }).and(exports.vimeoDestinationVimeoDestinationSchema),
882
- zod_1.z.object({
883
- destinations: zod_1.z.optional(zod_1.z.literal('tiktokDestination_TiktokDestination'))
884
- }).and(exports.tiktokDestinationTiktokDestinationSchema)
865
+ exports.destinationsDestinationsSchema = zod_1.z.discriminatedUnion("provider", [
866
+ exports.shotstackDestinationShotstackDestinationSchema,
867
+ exports.muxDestinationMuxDestinationSchema,
868
+ exports.s3DestinationS3DestinationSchema,
869
+ exports.googleCloudStorageDestinationGoogleCloudStorageDestinationSchema,
870
+ exports.googleDriveDestinationGoogleDriveDestinationSchema,
871
+ exports.vimeoDestinationVimeoDestinationSchema,
872
+ exports.tiktokDestinationTiktokDestinationSchema
885
873
  ]);
886
874
  exports.destinationsSchema = exports.destinationsDestinationsSchema;
887
875
  /**
@@ -2864,15 +2852,14 @@ exports.clipClipSchema = zod_1.z.object({
2864
2852
  return undefined; if (Array.isArray(v))
2865
2853
  return v; if (typeof v === 'string')
2866
2854
  return Number(v); return v; }), zod_1.z.number()),
2867
- zod_1.z.enum(['auto'])
2855
+ zod_1.z.string().regex(/^(auto|alias:\/\/[A-Za-z0-9_-]+)$/)
2868
2856
  ]),
2869
2857
  length: zod_1.z.union([
2870
2858
  zod_1.z.preprocess(((v) => { if (v === '' || v === null || v === undefined)
2871
2859
  return undefined; if (Array.isArray(v))
2872
2860
  return v; if (typeof v === 'string')
2873
2861
  return Number(v); return v; }), zod_1.z.number()),
2874
- zod_1.z.literal('auto'),
2875
- zod_1.z.literal('end')
2862
+ zod_1.z.string().regex(/^(auto|end|alias:\/\/[A-Za-z0-9_-]+)$/)
2876
2863
  ]),
2877
2864
  fit: zod_1.z.optional(zod_1.z.enum([
2878
2865
  'cover',