@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.
@@ -1111,8 +1111,9 @@ export const richcaptionpropertiesRichCaptionActiveSchema = z.object({
1111
1111
  export const richCaptionActiveSchema = richcaptionpropertiesRichCaptionActiveSchema;
1112
1112
  /**
1113
1113
  * The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports
1114
- * karaoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT
1115
- * files or auto-transcription via aliases.
1114
+ * karaoke-style highlighting, word-by-word animations, and advanced typography. Captions can be
1115
+ * sourced from SRT/VTT/TTML subtitle files, from audio/video media URLs (auto-transcribed), or
1116
+ * from alias references to other clips in the same timeline.
1116
1117
  *
1117
1118
  */
1118
1119
  export const richcaptionassetRichCaptionAssetSchema = z.object({
@@ -1137,22 +1138,7 @@ export const richcaptionassetRichCaptionAssetSchema = z.object({
1137
1138
  align: z.optional(richtextpropertiesRichTextAlignmentSchema),
1138
1139
  active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
1139
1140
  animation: z.optional(richcaptionpropertiesRichCaptionAnimationSchema)
1140
- }).strict().superRefine((data, ctx) => {
1141
- if (data.src) {
1142
- try {
1143
- const pathname = new URL(data.src).pathname.toLowerCase();
1144
- const mediaExts = [".m4a", ".mp3", ".wav", ".aac", ".ogg", ".flac", ".wma", ".mp4", ".mov", ".avi", ".mkv", ".webm", ".wmv", ".flv", ".3gp"];
1145
- if (mediaExts.some((ext) => pathname.endsWith(ext))) {
1146
- ctx.addIssue({
1147
- code: z.ZodIssueCode.custom,
1148
- 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/",
1149
- path: ["src"],
1150
- });
1151
- }
1152
- }
1153
- catch { }
1154
- }
1155
- });
1141
+ }).strict();
1156
1142
  export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
1157
1143
  /**
1158
1144
  * Font properties for rich text.
@@ -955,8 +955,9 @@ export const richCaptionActiveSchema = richcaptionpropertiesRichCaptionActiveSch
955
955
 
956
956
  /**
957
957
  * The RichCaptionAsset provides word-level caption animations with rich-text styling. It supports
958
- * karaoke-style highlighting, word-by-word animations, and advanced typography. Use with SRT/VTT
959
- * files or auto-transcription via aliases.
958
+ * karaoke-style highlighting, word-by-word animations, and advanced typography. Captions can be
959
+ * sourced from SRT/VTT/TTML subtitle files, from audio/video media URLs (auto-transcribed), or
960
+ * from alias references to other clips in the same timeline.
960
961
  *
961
962
  */
962
963
  export const richcaptionassetRichCaptionAssetSchema = z.object({
@@ -975,21 +976,7 @@ export const richcaptionassetRichCaptionAssetSchema = z.object({
975
976
  align: z.optional(richtextpropertiesRichTextAlignmentSchema),
976
977
  active: z.optional(richcaptionpropertiesRichCaptionActiveSchema),
977
978
  animation: z.optional(richcaptionpropertiesRichCaptionAnimationSchema)
978
- }).strict().superRefine((data, ctx) => {
979
- if (data.src) {
980
- try {
981
- const pathname = new URL(data.src).pathname.toLowerCase();
982
- const mediaExts = [".m4a",".mp3",".wav",".aac",".ogg",".flac",".wma",".mp4",".mov",".avi",".mkv",".webm",".wmv",".flv",".3gp"];
983
- if (mediaExts.some((ext) => pathname.endsWith(ext))) {
984
- ctx.addIssue({
985
- code: z.ZodIssueCode.custom,
986
- 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/",
987
- path: ["src"],
988
- });
989
- }
990
- } catch {}
991
- }
992
- });
979
+ }).strict();
993
980
 
994
981
  export const richCaptionAssetSchema = richcaptionassetRichCaptionAssetSchema;
995
982
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shotstack/schemas",
3
- "version": "1.10.7",
3
+ "version": "1.10.8",
4
4
  "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",