@shotstack/schemas 1.10.7 → 1.10.8

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.
@@ -1803,7 +1803,7 @@
1803
1803
  ]
1804
1804
  },
1805
1805
  "RichCaptionAsset": {
1806
- "description": "The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports\nkaraoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT\nfiles or auto-transcription via aliases.\n",
1806
+ "description": "The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports\nkaraoke-style highlighting, word-by-word animations, and advanced typography. Captions can be\nsourced from SRT/VTT/TTML subtitle files, from audio/video media URLs (auto-transcribed), or\nfrom alias references to other clips in the same timeline.\n",
1807
1807
  "type": "object",
1808
1808
  "properties": {
1809
1809
  "type": {
@@ -1815,7 +1815,7 @@
1815
1815
  "type": "string"
1816
1816
  },
1817
1817
  "src": {
1818
- "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.",
1818
+ "description": "Source for the caption words. Accepts three formats: (1) the URL to a subtitle file (`.srt`, `.vtt`, `.ttml`, or `.dfxp`) which is parsed directly; (2) the URL to an audio or video media file (`.mp4`, `.mov`, `.webm`, `.mp3`, `.wav`, `.m4a`, `.flac`, `.aac`, `.ogg`, and related formats) which is auto-transcribed; (3) an alias reference in the form `alias://clip-name` where `clip-name` is the alias of another audio, video, or text-to-speech clip in the same timeline — the referenced clip's source is auto-transcribed. For file URLs, the URL must be publicly accessible or include credentials. Content is classified at runtime and unsupported content types (HTML, PDF, images, archives) are rejected with a structured error.",
1819
1819
  "type": "string",
1820
1820
  "minLength": 1,
1821
1821
  "example": "alias://audio"
@@ -2025,7 +2025,7 @@
2025
2025
  ]
2026
2026
  },
2027
2027
  "RichCaptionAsset": {
2028
- "description": "The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports\nkaraoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT\nfiles or auto-transcription via aliases.\n",
2028
+ "description": "The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports\nkaraoke-style highlighting, word-by-word animations, and advanced typography. Captions can be\nsourced from SRT/VTT/TTML subtitle files, from audio/video media URLs (auto-transcribed), or\nfrom alias references to other clips in the same timeline.\n",
2029
2029
  "type": "object",
2030
2030
  "properties": {
2031
2031
  "type": {
@@ -2036,7 +2036,7 @@
2036
2036
  "type": "string"
2037
2037
  },
2038
2038
  "src": {
2039
- "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.",
2039
+ "description": "Source for the caption words. Accepts three formats: (1) the URL to a subtitle file (`.srt`, `.vtt`, `.ttml`, or `.dfxp`) which is parsed directly; (2) the URL to an audio or video media file (`.mp4`, `.mov`, `.webm`, `.mp3`, `.wav`, `.m4a`, `.flac`, `.aac`, `.ogg`, and related formats) which is auto-transcribed; (3) an alias reference in the form `alias://clip-name` where `clip-name` is the alias of another audio, video, or text-to-speech clip in the same timeline — the referenced clip's source is auto-transcribed. For file URLs, the URL must be publicly accessible or include credentials. Content is classified at runtime and unsupported content types (HTML, PDF, images, archives) are rejected with a structured error.",
2040
2040
  "type": "string"
2041
2041
  },
2042
2042
  "font": {
package/dist/schema.d.ts CHANGED
@@ -931,8 +931,9 @@ export interface components {
931
931
  };
932
932
  /**
933
933
  * @description The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports
934
- * karaoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT
935
- * files or auto-transcription via aliases.
934
+ * karaoke-style highlighting, word-by-word animations, and advanced typography. Captions can be
935
+ * sourced from SRT/VTT/TTML subtitle files, from audio/video media URLs (auto-transcribed), or
936
+ * from alias references to other clips in the same timeline.
936
937
  */
937
938
  RichCaptionAsset: {
938
939
  /**
@@ -941,7 +942,7 @@ export interface components {
941
942
  */
942
943
  type: "rich-caption";
943
944
  /**
944
- * @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.
945
+ * @description Source for the caption words. Accepts three formats: (1) the URL to a subtitle file (`.srt`, `.vtt`, `.ttml`, or `.dfxp`) which is parsed directly; (2) the URL to an audio or video media file (`.mp4`, `.mov`, `.webm`, `.mp3`, `.wav`, `.m4a`, `.flac`, `.aac`, `.ogg`, and related formats) which is auto-transcribed; (3) an alias reference in the form `alias://clip-name` where `clip-name` is the alias of another audio, video, or text-to-speech clip in the same timeline — the referenced clip's source is auto-transcribed. For file URLs, the URL must be publicly accessible or include credentials. Content is classified at runtime and unsupported content types (HTML, PDF, images, archives) are rejected with a structured error.
945
946
  * @example alias://audio
946
947
  */
947
948
  src: string;
@@ -1119,8 +1119,9 @@ exports.richcaptionpropertiesRichCaptionActiveSchema = zod_1.z.object({
1119
1119
  exports.richCaptionActiveSchema = exports.richcaptionpropertiesRichCaptionActiveSchema;
1120
1120
  /**
1121
1121
  * The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports
1122
- * karaoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT
1123
- * files or auto-transcription via aliases.
1122
+ * karaoke-style highlighting, word-by-word animations, and advanced typography. Captions can be
1123
+ * sourced from SRT/VTT/TTML subtitle files, from audio/video media URLs (auto-transcribed), or
1124
+ * from alias references to other clips in the same timeline.
1124
1125
  *
1125
1126
  */
1126
1127
  exports.richcaptionassetRichCaptionAssetSchema = zod_1.z.object({
@@ -1145,22 +1146,7 @@ exports.richcaptionassetRichCaptionAssetSchema = zod_1.z.object({
1145
1146
  align: zod_1.z.optional(exports.richtextpropertiesRichTextAlignmentSchema),
1146
1147
  active: zod_1.z.optional(exports.richcaptionpropertiesRichCaptionActiveSchema),
1147
1148
  animation: zod_1.z.optional(exports.richcaptionpropertiesRichCaptionAnimationSchema)
1148
- }).strict().superRefine((data, ctx) => {
1149
- if (data.src) {
1150
- try {
1151
- const pathname = new URL(data.src).pathname.toLowerCase();
1152
- const mediaExts = [".m4a", ".mp3", ".wav", ".aac", ".ogg", ".flac", ".wma", ".mp4", ".mov", ".avi", ".mkv", ".webm", ".wmv", ".flv", ".3gp"];
1153
- if (mediaExts.some((ext) => pathname.endsWith(ext))) {
1154
- ctx.addIssue({
1155
- code: zod_1.z.ZodIssueCode.custom,
1156
- message: "Caption src must be an SRT or VTT subtitle file. To generate captions from a media asset, use an alias reference (e.g. \"alias://my-clip\") instead of a direct URL. See: https://shotstack.io/docs/guide/architecting-an-application/rich-captions/",
1157
- path: ["src"],
1158
- });
1159
- }
1160
- }
1161
- catch { }
1162
- }
1163
- });
1149
+ }).strict();
1164
1150
  exports.richCaptionAssetSchema = exports.richcaptionassetRichCaptionAssetSchema;
1165
1151
  /**
1166
1152
  * Font properties for rich text.