@shotstack/schemas 1.10.7 → 1.10.9
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.
- package/dist/api.bundled.json +7 -2
- package/dist/json-schema/schemas.json +2 -2
- package/dist/schema.d.ts +9 -3
- package/dist/zod/zod.gen.cjs +15 -20
- package/dist/zod/zod.gen.d.ts +4568 -4496
- package/dist/zod/zod.gen.js +15 -20
- package/dist/zod/zod.gen.ts +15 -19
- package/package.json +1 -1
package/dist/api.bundled.json
CHANGED
|
@@ -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.
|
|
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": "
|
|
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"
|
|
@@ -2846,6 +2846,11 @@
|
|
|
2846
2846
|
"type": "number",
|
|
2847
2847
|
"minimum": 0,
|
|
2848
2848
|
"example": 5
|
|
2849
|
+
},
|
|
2850
|
+
"wrap": {
|
|
2851
|
+
"description": "Not supported on legacy `text` assets. Accepted here only so validators can emit a clear migration error pointing users to `rich-text` or `rich-caption`, which support background wrapping natively.",
|
|
2852
|
+
"type": "boolean",
|
|
2853
|
+
"example": false
|
|
2849
2854
|
}
|
|
2850
2855
|
},
|
|
2851
2856
|
"additionalProperties": false,
|
|
@@ -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.
|
|
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": "
|
|
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.
|
|
935
|
-
* files
|
|
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
|
|
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;
|
|
@@ -1548,6 +1549,11 @@ export interface components {
|
|
|
1548
1549
|
* @example 5
|
|
1549
1550
|
*/
|
|
1550
1551
|
borderRadius?: number;
|
|
1552
|
+
/**
|
|
1553
|
+
* @description Not supported on legacy `text` assets. Accepted here only so validators can emit a clear migration error pointing users to `rich-text` or `rich-caption`, which support background wrapping natively.
|
|
1554
|
+
* @example false
|
|
1555
|
+
*/
|
|
1556
|
+
wrap?: boolean;
|
|
1551
1557
|
};
|
|
1552
1558
|
/** @description Horizontal and vertical alignment properties for text. */
|
|
1553
1559
|
TextAlignment: {
|
package/dist/zod/zod.gen.cjs
CHANGED
|
@@ -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.
|
|
1123
|
-
* files
|
|
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()
|
|
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.
|
|
@@ -1724,7 +1710,8 @@ exports.textpropertiesTextBackgroundSchema = zod_1.z.object({
|
|
|
1724
1710
|
if (/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/.test(v))
|
|
1725
1711
|
return v;
|
|
1726
1712
|
return Number(v);
|
|
1727
|
-
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)]))
|
|
1713
|
+
} return v; }), zod_1.z.number().gte(0)), zod_1.z.string().regex(/^\{\{\s*[A-Za-z0-9_]+\s*\}\}$/)])),
|
|
1714
|
+
wrap: zod_1.z.optional(zod_1.z.boolean())
|
|
1728
1715
|
}).strict();
|
|
1729
1716
|
exports.textBackgroundSchema = exports.textpropertiesTextBackgroundSchema;
|
|
1730
1717
|
/**
|
|
@@ -1804,7 +1791,15 @@ exports.textassetTextAssetSchema = zod_1.z.object({
|
|
|
1804
1791
|
stroke: zod_1.z.optional(exports.textpropertiesTextStrokeSchema),
|
|
1805
1792
|
animation: zod_1.z.optional(exports.textpropertiesTextAnimationSchema),
|
|
1806
1793
|
ellipsis: zod_1.z.optional(zod_1.z.string())
|
|
1807
|
-
}).strict()
|
|
1794
|
+
}).strict().superRefine((data, ctx) => {
|
|
1795
|
+
if (data.background && data.background.wrap === true) {
|
|
1796
|
+
ctx.addIssue({
|
|
1797
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
1798
|
+
message: "background.wrap is only supported on rich-text and rich-caption assets. For type \"text\", migrate to type \"rich-text\" to use this feature.",
|
|
1799
|
+
path: ["background", "wrap"],
|
|
1800
|
+
});
|
|
1801
|
+
}
|
|
1802
|
+
});
|
|
1808
1803
|
exports.textAssetSchema = exports.textassetTextAssetSchema;
|
|
1809
1804
|
/**
|
|
1810
1805
|
* The TextToImageAsset lets you create a dynamic image from a text prompt.
|