@shotstack/schemas 1.5.6 → 1.5.7

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.
@@ -1208,6 +1208,7 @@
1208
1208
  "audio": "#/components/schemas/AudioAsset",
1209
1209
  "luma": "#/components/schemas/LumaAsset",
1210
1210
  "caption": "#/components/schemas/CaptionAsset",
1211
+ "rich-caption": "#/components/schemas/RichCaptionAsset",
1211
1212
  "html": "#/components/schemas/HtmlAsset",
1212
1213
  "title": "#/components/schemas/TitleAsset",
1213
1214
  "shape": "#/components/schemas/ShapeAsset",
@@ -1239,6 +1240,9 @@
1239
1240
  {
1240
1241
  "$ref": "#/components/schemas/CaptionAsset"
1241
1242
  },
1243
+ {
1244
+ "$ref": "#/components/schemas/RichCaptionAsset"
1245
+ },
1242
1246
  {
1243
1247
  "$ref": "#/components/schemas/HtmlAsset"
1244
1248
  },
@@ -1869,6 +1873,240 @@
1869
1873
  "src"
1870
1874
  ]
1871
1875
  },
1876
+ "RichCaptionAsset": {
1877
+ "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",
1878
+ "type": "object",
1879
+ "properties": {
1880
+ "type": {
1881
+ "enum": [
1882
+ "rich-caption"
1883
+ ],
1884
+ "default": "rich-caption",
1885
+ "description": "The type of asset - set to `rich-caption` for rich captions.",
1886
+ "type": "string"
1887
+ },
1888
+ "src": {
1889
+ "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. Mutually exclusive with `words`.",
1890
+ "type": "string",
1891
+ "minLength": 1,
1892
+ "example": "alias://audio"
1893
+ },
1894
+ "words": {
1895
+ "description": "Pre-provided word-level timing data. Use this instead of `src` when you have word timestamps from an external source. Mutually exclusive with `src`.",
1896
+ "type": "array",
1897
+ "items": {
1898
+ "$ref": "#/components/schemas/WordTiming"
1899
+ },
1900
+ "maxItems": 100000
1901
+ },
1902
+ "font": {
1903
+ "description": "Font styling properties for inactive words.",
1904
+ "$ref": "#/components/schemas/RichTextFont"
1905
+ },
1906
+ "style": {
1907
+ "description": "Text style properties including spacing, line height, and transformations.",
1908
+ "$ref": "#/components/schemas/RichTextStyle"
1909
+ },
1910
+ "stroke": {
1911
+ "description": "Text stroke (outline) properties for inactive words.",
1912
+ "$ref": "#/components/schemas/RichTextStroke"
1913
+ },
1914
+ "shadow": {
1915
+ "description": "Text shadow properties.",
1916
+ "$ref": "#/components/schemas/RichTextShadow"
1917
+ },
1918
+ "background": {
1919
+ "description": "Background styling properties for the caption bounding box.",
1920
+ "$ref": "#/components/schemas/RichTextBackground"
1921
+ },
1922
+ "padding": {
1923
+ "description": "Padding inside the caption bounding box. Can be a single number (applied to all sides) or an object with individual sides.",
1924
+ "oneOf": [
1925
+ {
1926
+ "type": "number",
1927
+ "minimum": 0,
1928
+ "description": "Padding in pixels applied to all sides.",
1929
+ "example": 10
1930
+ },
1931
+ {
1932
+ "$ref": "#/components/schemas/RichTextAsset/properties/padding/oneOf/1"
1933
+ }
1934
+ ]
1935
+ },
1936
+ "align": {
1937
+ "description": "Text alignment properties (horizontal and vertical).",
1938
+ "$ref": "#/components/schemas/RichTextAlignment"
1939
+ },
1940
+ "active": {
1941
+ "description": "Styling properties for the active/highlighted word. These override the base styling when a word is being spoken.",
1942
+ "$ref": "#/components/schemas/RichCaptionActive"
1943
+ },
1944
+ "wordAnimation": {
1945
+ "description": "Word-level animation properties controlling how words are highlighted or revealed.",
1946
+ "$ref": "#/components/schemas/RichCaptionWordAnimation"
1947
+ },
1948
+ "position": {
1949
+ "description": "Vertical position of the caption on screen.",
1950
+ "type": "string",
1951
+ "enum": [
1952
+ "top",
1953
+ "center",
1954
+ "bottom"
1955
+ ],
1956
+ "default": "bottom",
1957
+ "example": "bottom"
1958
+ },
1959
+ "maxWidth": {
1960
+ "description": "Maximum width of the caption as a ratio of the frame width. Must be between 0.1 and 1.",
1961
+ "type": "number",
1962
+ "minimum": 0.1,
1963
+ "maximum": 1,
1964
+ "default": 0.9,
1965
+ "example": 0.85
1966
+ },
1967
+ "maxLines": {
1968
+ "description": "Maximum number of lines to display at once. Must be between 1 and 10.",
1969
+ "type": "integer",
1970
+ "minimum": 1,
1971
+ "maximum": 10,
1972
+ "default": 2,
1973
+ "example": 2
1974
+ }
1975
+ },
1976
+ "required": [
1977
+ "type"
1978
+ ]
1979
+ },
1980
+ "WordTiming": {
1981
+ "description": "Word-level timing information for caption animation.",
1982
+ "type": "object",
1983
+ "properties": {
1984
+ "text": {
1985
+ "description": "The word text to display.",
1986
+ "type": "string",
1987
+ "minLength": 1,
1988
+ "example": "Hello"
1989
+ },
1990
+ "start": {
1991
+ "description": "Start time of the word in milliseconds.",
1992
+ "type": "number",
1993
+ "minimum": 0,
1994
+ "example": 0
1995
+ },
1996
+ "end": {
1997
+ "description": "End time of the word in milliseconds.",
1998
+ "type": "number",
1999
+ "minimum": 0,
2000
+ "example": 400
2001
+ },
2002
+ "confidence": {
2003
+ "description": "Speech-to-text confidence score between 0 and 1.",
2004
+ "type": "number",
2005
+ "minimum": 0,
2006
+ "maximum": 1,
2007
+ "example": 0.98
2008
+ }
2009
+ },
2010
+ "required": [
2011
+ "text",
2012
+ "start",
2013
+ "end"
2014
+ ]
2015
+ },
2016
+ "RichCaptionActiveFont": {
2017
+ "description": "Font properties for the active/highlighted word.",
2018
+ "type": "object",
2019
+ "properties": {
2020
+ "color": {
2021
+ "description": "The active word color using hexadecimal color notation.",
2022
+ "type": "string",
2023
+ "pattern": "^#[A-Fa-f0-9]{6}$",
2024
+ "default": "#ffff00",
2025
+ "example": "#ffff00"
2026
+ },
2027
+ "background": {
2028
+ "description": "The background color behind the active word using hexadecimal color notation.",
2029
+ "type": "string",
2030
+ "pattern": "^#[A-Fa-f0-9]{6}$",
2031
+ "example": "#000000"
2032
+ },
2033
+ "opacity": {
2034
+ "description": "The opacity of the active word where 1 is opaque and 0 is transparent.",
2035
+ "type": "number",
2036
+ "minimum": 0,
2037
+ "maximum": 1,
2038
+ "default": 1,
2039
+ "example": 1
2040
+ }
2041
+ }
2042
+ },
2043
+ "RichCaptionActive": {
2044
+ "description": "Styling properties for the active/highlighted word.",
2045
+ "type": "object",
2046
+ "properties": {
2047
+ "font": {
2048
+ "description": "Font properties for the active word.",
2049
+ "$ref": "#/components/schemas/RichCaptionActiveFont"
2050
+ },
2051
+ "stroke": {
2052
+ "description": "Stroke properties for the active word.",
2053
+ "$ref": "#/components/schemas/RichTextStroke"
2054
+ },
2055
+ "scale": {
2056
+ "description": "Scale multiplier for the active word. 1.0 is normal size, 1.2 is 20% larger.",
2057
+ "type": "number",
2058
+ "minimum": 0.5,
2059
+ "maximum": 2,
2060
+ "default": 1,
2061
+ "example": 1.2
2062
+ }
2063
+ }
2064
+ },
2065
+ "RichCaptionWordAnimation": {
2066
+ "description": "Word-level animation properties for caption effects.",
2067
+ "type": "object",
2068
+ "properties": {
2069
+ "style": {
2070
+ "description": "The animation style to apply to words: <ul>\n <li>`karaoke` - Word-by-word color fill as spoken (shows all words, highlights active)</li>\n <li>`highlight` - Word changes to active color when spoken (shows all words)</li>\n <li>`pop` - Each word scales up when active</li>\n <li>`fade` - Gradual opacity transition per word</li>\n <li>`slide` - Words slide in from a direction</li>\n <li>`bounce` - Spring animation on word appearance</li>\n <li>`typewriter` - Words appear one by one and stay visible</li>\n <li>`none` - No animation, all words visible immediately</li>\n</ul>",
2071
+ "type": "string",
2072
+ "enum": [
2073
+ "karaoke",
2074
+ "highlight",
2075
+ "pop",
2076
+ "fade",
2077
+ "slide",
2078
+ "bounce",
2079
+ "typewriter",
2080
+ "none"
2081
+ ],
2082
+ "default": "karaoke",
2083
+ "example": "karaoke"
2084
+ },
2085
+ "speed": {
2086
+ "description": "Animation speed multiplier. 1.0 is normal speed, 0.5 is half speed, 2.0 is double speed.",
2087
+ "type": "number",
2088
+ "minimum": 0.5,
2089
+ "maximum": 2,
2090
+ "default": 1,
2091
+ "example": 1
2092
+ },
2093
+ "direction": {
2094
+ "description": "Direction for directional animations (slide). Only applicable when style is `slide`.",
2095
+ "type": "string",
2096
+ "enum": [
2097
+ "left",
2098
+ "right",
2099
+ "up",
2100
+ "down"
2101
+ ],
2102
+ "default": "up",
2103
+ "example": "up"
2104
+ }
2105
+ },
2106
+ "required": [
2107
+ "style"
2108
+ ]
2109
+ },
1872
2110
  "TextToImageAsset": {
1873
2111
  "description": "The TextToImageAsset lets you create a dynamic image from a text prompt.",
1874
2112
  "properties": {
@@ -3462,7 +3700,7 @@
3462
3700
  "description": "The text color using hexadecimal color notation.",
3463
3701
  "type": "string",
3464
3702
  "pattern": "^#[A-Fa-f0-9]{6}$",
3465
- "default": "#ffffff",
3703
+ "default": "#000000",
3466
3704
  "example": "#ff0000"
3467
3705
  },
3468
3706
  "opacity": {
@@ -3495,6 +3733,13 @@
3495
3733
  "default": 0,
3496
3734
  "example": 2
3497
3735
  },
3736
+ "wordSpacing": {
3737
+ "description": "Additional spacing between words in pixels. A value of 0 uses the font's natural space width.",
3738
+ "type": "number",
3739
+ "minimum": 0,
3740
+ "default": 0,
3741
+ "example": 10
3742
+ },
3498
3743
  "lineHeight": {
3499
3744
  "description": "The line height as a multiplier of the font size. Must be between 0 and 10.",
3500
3745
  "type": "number",
package/dist/schema.d.ts CHANGED
@@ -583,7 +583,7 @@ export interface components {
583
583
  alias?: string;
584
584
  };
585
585
  /** @description The type of asset to display for the duration of the Clip, i.e. a video clip or an image. Choose from one of the available asset types below. */
586
- Asset: components["schemas"]["VideoAsset"] | components["schemas"]["ImageAsset"] | components["schemas"]["TextAsset"] | components["schemas"]["RichTextAsset"] | components["schemas"]["AudioAsset"] | components["schemas"]["LumaAsset"] | components["schemas"]["CaptionAsset"] | components["schemas"]["HtmlAsset"] | components["schemas"]["TitleAsset"] | components["schemas"]["ShapeAsset"] | components["schemas"]["SvgAsset"] | components["schemas"]["TextToImageAsset"] | components["schemas"]["ImageToVideoAsset"] | components["schemas"]["TextToSpeechAsset"];
586
+ Asset: components["schemas"]["VideoAsset"] | components["schemas"]["ImageAsset"] | components["schemas"]["TextAsset"] | components["schemas"]["RichTextAsset"] | components["schemas"]["AudioAsset"] | components["schemas"]["LumaAsset"] | components["schemas"]["CaptionAsset"] | components["schemas"]["RichCaptionAsset"] | components["schemas"]["HtmlAsset"] | components["schemas"]["TitleAsset"] | components["schemas"]["ShapeAsset"] | components["schemas"]["SvgAsset"] | components["schemas"]["TextToImageAsset"] | components["schemas"]["ImageToVideoAsset"] | components["schemas"]["TextToSpeechAsset"];
587
587
  /** @description The VideoAsset is used to create video sequences from video files. The src must be a publicly accessible URL to a video resource such as an mp4 file. */
588
588
  VideoAsset: {
589
589
  /**
@@ -968,6 +968,150 @@ export interface components {
968
968
  */
969
969
  speed?: number;
970
970
  };
971
+ /**
972
+ * @description The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports
973
+ * karaoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT
974
+ * files or auto-transcription via aliases.
975
+ */
976
+ RichCaptionAsset: {
977
+ /**
978
+ * @description The type of asset - set to `rich-caption` for rich captions. (enum property replaced by openapi-typescript)
979
+ * @enum {string}
980
+ */
981
+ type: "rich-caption";
982
+ /**
983
+ * @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. Mutually exclusive with `words`.
984
+ * @example alias://audio
985
+ */
986
+ src?: string;
987
+ /** @description Pre-provided word-level timing data. Use this instead of `src` when you have word timestamps from an external source. Mutually exclusive with `src`. */
988
+ words?: components["schemas"]["WordTiming"][];
989
+ /** @description Font styling properties for inactive words. */
990
+ font?: components["schemas"]["RichTextFont"];
991
+ /** @description Text style properties including spacing, line height, and transformations. */
992
+ style?: components["schemas"]["RichTextStyle"];
993
+ /** @description Text stroke (outline) properties for inactive words. */
994
+ stroke?: components["schemas"]["RichTextStroke"];
995
+ /** @description Text shadow properties. */
996
+ shadow?: components["schemas"]["RichTextShadow"];
997
+ /** @description Background styling properties for the caption bounding box. */
998
+ background?: components["schemas"]["RichTextBackground"];
999
+ /** @description Padding inside the caption bounding box. Can be a single number (applied to all sides) or an object with individual sides. */
1000
+ padding?: number | components["schemas"]["RichTextAsset"]["padding"]["oneOf"]["1"];
1001
+ /** @description Text alignment properties (horizontal and vertical). */
1002
+ align?: components["schemas"]["RichTextAlignment"];
1003
+ /** @description Styling properties for the active/highlighted word. These override the base styling when a word is being spoken. */
1004
+ active?: components["schemas"]["RichCaptionActive"];
1005
+ /** @description Word-level animation properties controlling how words are highlighted or revealed. */
1006
+ wordAnimation?: components["schemas"]["RichCaptionWordAnimation"];
1007
+ /**
1008
+ * @description Vertical position of the caption on screen.
1009
+ * @default bottom
1010
+ * @example bottom
1011
+ * @enum {string}
1012
+ */
1013
+ position: "top" | "center" | "bottom";
1014
+ /**
1015
+ * @description Maximum width of the caption as a ratio of the frame width. Must be between 0.1 and 1.
1016
+ * @default 0.9
1017
+ * @example 0.85
1018
+ */
1019
+ maxWidth: number;
1020
+ /**
1021
+ * @description Maximum number of lines to display at once. Must be between 1 and 10.
1022
+ * @default 2
1023
+ * @example 2
1024
+ */
1025
+ maxLines: number;
1026
+ };
1027
+ /** @description Word-level timing information for caption animation. */
1028
+ WordTiming: {
1029
+ /**
1030
+ * @description The word text to display.
1031
+ * @example Hello
1032
+ */
1033
+ text: string;
1034
+ /**
1035
+ * @description Start time of the word in milliseconds.
1036
+ * @example 0
1037
+ */
1038
+ start: number;
1039
+ /**
1040
+ * @description End time of the word in milliseconds.
1041
+ * @example 400
1042
+ */
1043
+ end: number;
1044
+ /**
1045
+ * @description Speech-to-text confidence score between 0 and 1.
1046
+ * @example 0.98
1047
+ */
1048
+ confidence?: number;
1049
+ };
1050
+ /** @description Font properties for the active/highlighted word. */
1051
+ RichCaptionActiveFont: {
1052
+ /**
1053
+ * @description The active word color using hexadecimal color notation.
1054
+ * @default #ffff00
1055
+ * @example #ffff00
1056
+ */
1057
+ color: string;
1058
+ /**
1059
+ * @description The background color behind the active word using hexadecimal color notation.
1060
+ * @example #000000
1061
+ */
1062
+ background?: string;
1063
+ /**
1064
+ * @description The opacity of the active word where 1 is opaque and 0 is transparent.
1065
+ * @default 1
1066
+ * @example 1
1067
+ */
1068
+ opacity: number;
1069
+ };
1070
+ /** @description Styling properties for the active/highlighted word. */
1071
+ RichCaptionActive: {
1072
+ /** @description Font properties for the active word. */
1073
+ font?: components["schemas"]["RichCaptionActiveFont"];
1074
+ /** @description Stroke properties for the active word. */
1075
+ stroke?: components["schemas"]["RichTextStroke"];
1076
+ /**
1077
+ * @description Scale multiplier for the active word. 1.0 is normal size, 1.2 is 20% larger.
1078
+ * @default 1
1079
+ * @example 1.2
1080
+ */
1081
+ scale: number;
1082
+ };
1083
+ /** @description Word-level animation properties for caption effects. */
1084
+ RichCaptionWordAnimation: {
1085
+ /**
1086
+ * @description The animation style to apply to words: <ul>
1087
+ * <li>`karaoke` - Word-by-word color fill as spoken (shows all words, highlights active)</li>
1088
+ * <li>`highlight` - Word changes to active color when spoken (shows all words)</li>
1089
+ * <li>`pop` - Each word scales up when active</li>
1090
+ * <li>`fade` - Gradual opacity transition per word</li>
1091
+ * <li>`slide` - Words slide in from a direction</li>
1092
+ * <li>`bounce` - Spring animation on word appearance</li>
1093
+ * <li>`typewriter` - Words appear one by one and stay visible</li>
1094
+ * <li>`none` - No animation, all words visible immediately</li>
1095
+ * </ul>
1096
+ * @default karaoke
1097
+ * @example karaoke
1098
+ * @enum {string}
1099
+ */
1100
+ style: "karaoke" | "highlight" | "pop" | "fade" | "slide" | "bounce" | "typewriter" | "none";
1101
+ /**
1102
+ * @description Animation speed multiplier. 1.0 is normal speed, 0.5 is half speed, 2.0 is double speed.
1103
+ * @default 1
1104
+ * @example 1
1105
+ */
1106
+ speed: number;
1107
+ /**
1108
+ * @description Direction for directional animations (slide). Only applicable when style is `slide`.
1109
+ * @default up
1110
+ * @example up
1111
+ * @enum {string}
1112
+ */
1113
+ direction: "left" | "right" | "up" | "down";
1114
+ };
971
1115
  /** @description The TextToImageAsset lets you create a dynamic image from a text prompt. */
972
1116
  TextToImageAsset: {
973
1117
  /**
@@ -2102,7 +2246,7 @@ export interface components {
2102
2246
  weight: unknown;
2103
2247
  /**
2104
2248
  * @description The text color using hexadecimal color notation.
2105
- * @default #ffffff
2249
+ * @default #000000
2106
2250
  * @example #ff0000
2107
2251
  */
2108
2252
  color: string;
@@ -2128,6 +2272,12 @@ export interface components {
2128
2272
  * @example 2
2129
2273
  */
2130
2274
  letterSpacing: number;
2275
+ /**
2276
+ * @description Additional spacing between words in pixels. A value of 0 uses the font's natural space width.
2277
+ * @default 0
2278
+ * @example 10
2279
+ */
2280
+ wordSpacing: number;
2131
2281
  /**
2132
2282
  * @description The line height as a multiplier of the font size. Must be between 0 and 10.
2133
2283
  * @default 1.2