From ed155da7ed744a7b4ade0d4e63528375c063f0cd Mon Sep 17 00:00:00 2001 From: Kratos2k7 Date: Tue, 3 Mar 2026 18:28:03 +0500 Subject: [PATCH 1/2] refactor: remove WordTiming schema and clean up RichCaptionAsset properties --- api.oas3.yaml | 3 --- schemas/richcaptionasset.yaml | 37 ++++-------------------------- schemas/richcaptionproperties.yaml | 31 ------------------------- 3 files changed, 5 insertions(+), 66 deletions(-) diff --git a/api.oas3.yaml b/api.oas3.yaml index 58a293f..b4f84ee 100644 --- a/api.oas3.yaml +++ b/api.oas3.yaml @@ -190,9 +190,6 @@ components: RichCaptionAsset: $ref: "./schemas/richcaptionasset.yaml#/RichCaptionAsset" - WordTiming: - $ref: "./schemas/richcaptionproperties.yaml#/WordTiming" - RichCaptionActiveFont: $ref: "./schemas/richcaptionproperties.yaml#/RichCaptionActiveFont" diff --git a/schemas/richcaptionasset.yaml b/schemas/richcaptionasset.yaml index da4edcf..511fc8e 100644 --- a/schemas/richcaptionasset.yaml +++ b/schemas/richcaptionasset.yaml @@ -15,18 +15,10 @@ RichCaptionAsset: 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`. + the alias of an audio, video, or text-to-speech clip. type: string minLength: 1 example: "alias://audio" - words: - 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`. - type: array - items: - $ref: "./richcaptionproperties.yaml#/WordTiming" - maxItems: 100000 font: description: Font styling properties for inactive words. $ref: "./richcaptionproperties.yaml#/RichCaptionFont" @@ -42,6 +34,9 @@ RichCaptionAsset: background: description: Background styling properties for the caption bounding box. $ref: "./richtextproperties.yaml#/RichTextBackground" + border: + description: Border styling properties for the caption bounding box. + $ref: "./richtextproperties.yaml#/RichTextBorder" padding: description: >- Padding inside the caption bounding box. Can be a single number (applied to all sides) @@ -61,29 +56,7 @@ RichCaptionAsset: wordAnimation: description: Word-level animation properties controlling how words are highlighted or revealed. $ref: "./richcaptionproperties.yaml#/RichCaptionWordAnimation" - position: - description: Vertical position of the caption on screen. - type: string - enum: - - top - - center - - bottom - default: "bottom" - example: "bottom" - maxWidth: - description: Maximum width of the caption as a ratio of the frame width. Must be between 0.1 and 1. - type: number - minimum: 0.1 - maximum: 1 - default: 0.9 - example: 0.85 - maxLines: - description: Maximum number of lines to display at once. Must be between 1 and 10. - type: integer - minimum: 1 - maximum: 10 - default: 2 - example: 2 additionalProperties: false required: - type + - src diff --git a/schemas/richcaptionproperties.yaml b/schemas/richcaptionproperties.yaml index 7dd0a8e..82b44ab 100644 --- a/schemas/richcaptionproperties.yaml +++ b/schemas/richcaptionproperties.yaml @@ -1,34 +1,3 @@ -WordTiming: - description: Word-level timing information for caption animation. - type: object - properties: - text: - description: The word text to display. - type: string - minLength: 1 - example: "Hello" - start: - description: Start time of the word in milliseconds. - type: number - minimum: 0 - example: 0 - end: - description: End time of the word in milliseconds. - type: number - minimum: 0 - example: 400 - confidence: - description: Speech-to-text confidence score between 0 and 1. - type: number - minimum: 0 - maximum: 1 - example: 0.98 - additionalProperties: false - required: - - text - - start - - end - RichCaptionActiveFont: description: Font properties for the active/highlighted word. type: object From e6d29a5ebb006e4138f46f128c4903264a90fff5 Mon Sep 17 00:00:00 2001 From: Kratos2k7 Date: Tue, 3 Mar 2026 18:29:36 +0500 Subject: [PATCH 2/2] chore: update version to 1.8.7 in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bd16ffe..6ac8d06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shotstack/schemas", - "version": "1.8.6", + "version": "1.8.7", "description": "Centralized OpenAPI schemas and TypeScript types for Shotstack API", "type": "module", "main": "dist/index.js",