@boldvideo/bold-js 0.8.2 → 0.9.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @boldvideo/bold-js
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fa0d80f: refactor: Align Citation type with backend Video schema
8
+
9
+ **BREAKING CHANGE**: The `Citation` interface has been restructured to match the backend API changes.
10
+
11
+ **Before:**
12
+
13
+ ```typescript
14
+ interface Citation {
15
+ video_id: string;
16
+ title: string;
17
+ timestamp_ms: number;
18
+ text: string;
19
+ }
20
+ ```
21
+
22
+ **After:**
23
+
24
+ ```typescript
25
+ interface Citation {
26
+ video: Pick<Video, "internal_id" | "title" | "playback_id">;
27
+ start_ms: number;
28
+ end_ms: number;
29
+ text: string;
30
+ }
31
+ ```
32
+
33
+ Migration:
34
+
35
+ - `citation.video_id` → `citation.video.internal_id`
36
+ - `citation.title` → `citation.video.title`
37
+ - `citation.timestamp_ms` → `citation.start_ms`
38
+ - New: `citation.video.playback_id` and `citation.end_ms`
39
+
3
40
  ## 0.8.2
4
41
 
5
42
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -46,7 +46,7 @@ type Video = {
46
46
  attachments?: VideoAttachment[];
47
47
  cta?: any | null;
48
48
  download_urls?: VideoDownloadUrls;
49
- internal_id?: string;
49
+ internal_id: string;
50
50
  playback_speed?: number;
51
51
  subtitles?: VideoSubtitles;
52
52
  tags?: string[];
@@ -163,9 +163,9 @@ type Settings = {
163
163
  version: string;
164
164
  };
165
165
  interface Citation {
166
- video_id: string;
167
- title: string;
168
- timestamp_ms: number;
166
+ video: Pick<Video, 'internal_id' | 'title' | 'playback_id'>;
167
+ start_ms: number;
168
+ end_ms: number;
169
169
  text: string;
170
170
  }
171
171
  interface Usage {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@boldvideo/bold-js",
3
3
  "license": "MIT",
4
- "version": "0.8.2",
4
+ "version": "0.9.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",