@boldvideo/bold-js 1.11.1 → 1.13.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 +16 -0
- package/README.md +17 -1
- package/dist/index.d.ts +8 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @boldvideo/bold-js
|
|
2
2
|
|
|
3
|
+
## 1.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4030a6e: Add portal hero configuration and menu item blank property
|
|
8
|
+
|
|
9
|
+
- Added `portal.hero` configuration with `type: 'none' | 'custom'` to control hero section display
|
|
10
|
+
- Added `blank` property to `MenuItem` type for opening links in new windows/tabs
|
|
11
|
+
- Updated `MenuItem.icon` to allow `null` values
|
|
12
|
+
|
|
13
|
+
## 1.12.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- ccd71c9: Add slug field to Video type
|
|
18
|
+
|
|
3
19
|
## 1.11.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -62,8 +62,9 @@ console.log(recs.guidance);
|
|
|
62
62
|
// List latest videos
|
|
63
63
|
const videos = await bold.videos.list();
|
|
64
64
|
|
|
65
|
-
// Get a single video
|
|
65
|
+
// Get a single video by ID or slug
|
|
66
66
|
const video = await bold.videos.get('video-id');
|
|
67
|
+
const videoBySlug = await bold.videos.get('my-video-slug');
|
|
67
68
|
|
|
68
69
|
// Search videos
|
|
69
70
|
const results = await bold.videos.search('pricing strategies');
|
|
@@ -84,6 +85,18 @@ const playlist = await bold.playlists.get('playlist-id');
|
|
|
84
85
|
```typescript
|
|
85
86
|
// Fetch channel settings, menus, and featured playlists
|
|
86
87
|
const settings = await bold.settings();
|
|
88
|
+
|
|
89
|
+
// Access portal hero configuration
|
|
90
|
+
if (settings.portal.hero.type === 'custom') {
|
|
91
|
+
// Render custom hero section
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Menu items with external link handling
|
|
95
|
+
settings.menuItems.forEach(item => {
|
|
96
|
+
// item.blank: true opens in a new window/tab
|
|
97
|
+
// item.isExt: true indicates an external URL
|
|
98
|
+
// item.icon: optional icon path (can be null)
|
|
99
|
+
});
|
|
87
100
|
```
|
|
88
101
|
|
|
89
102
|
---
|
|
@@ -256,6 +269,9 @@ import type {
|
|
|
256
269
|
Video,
|
|
257
270
|
Playlist,
|
|
258
271
|
Settings,
|
|
272
|
+
Portal,
|
|
273
|
+
PortalHero,
|
|
274
|
+
MenuItem,
|
|
259
275
|
AIEvent,
|
|
260
276
|
AIResponse,
|
|
261
277
|
ChatOptions,
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ type Video = {
|
|
|
32
32
|
description: string | null;
|
|
33
33
|
duration: number;
|
|
34
34
|
id: string;
|
|
35
|
+
slug?: string;
|
|
35
36
|
importedFrom: string | null;
|
|
36
37
|
legacyVideoUrl: string | null;
|
|
37
38
|
playbackId: string;
|
|
@@ -61,10 +62,11 @@ type Playlist = {
|
|
|
61
62
|
videos: Video[];
|
|
62
63
|
};
|
|
63
64
|
type MenuItem = {
|
|
64
|
-
icon: string;
|
|
65
|
+
icon: string | null;
|
|
65
66
|
isExt: boolean;
|
|
66
67
|
label: string;
|
|
67
68
|
url: string;
|
|
69
|
+
blank: boolean;
|
|
68
70
|
};
|
|
69
71
|
type PortalDisplay = {
|
|
70
72
|
showChapters: boolean;
|
|
@@ -104,9 +106,13 @@ type PortalTheme = {
|
|
|
104
106
|
dark: ThemeColors;
|
|
105
107
|
cssOverrides: string | null;
|
|
106
108
|
};
|
|
109
|
+
type PortalHero = {
|
|
110
|
+
type: 'none' | 'custom';
|
|
111
|
+
};
|
|
107
112
|
type Portal = {
|
|
108
113
|
colorScheme?: 'toggle' | 'light' | 'dark';
|
|
109
114
|
display: PortalDisplay;
|
|
115
|
+
hero: PortalHero;
|
|
110
116
|
layout: PortalLayout;
|
|
111
117
|
navigation: PortalNavigation;
|
|
112
118
|
theme: PortalTheme;
|
|
@@ -490,4 +496,4 @@ declare const DEFAULT_API_BASE_URL = "https://app.boldvideo.io/api/v1/";
|
|
|
490
496
|
*/
|
|
491
497
|
declare const DEFAULT_INTERNAL_API_BASE_URL = "https://app.boldvideo.io/i/v1/";
|
|
492
498
|
|
|
493
|
-
export { AIContextMessage, AIEvent, AIResponse, AIUsage, Account, AccountAI, AskOptions, AssistantConfig, ChatOptions, Citation, ClientOptions, DEFAULT_API_BASE_URL, DEFAULT_INTERNAL_API_BASE_URL, MenuItem, Playlist, Portal, PortalDisplay, PortalLayout, PortalNavigation, PortalTheme, RecommendOptions, RecommendResponse, Recommendation, RecommendationVideo, RecommendationsOptions, RecommendationsResponse, SearchOptions, Segment, Settings, Source, ThemeColors, ThemeConfig, Video, VideoAttachment, VideoDownloadUrls, VideoMetadata, VideoSubtitles, VideoTranscript, createClient };
|
|
499
|
+
export { AIContextMessage, AIEvent, AIResponse, AIUsage, Account, AccountAI, AskOptions, AssistantConfig, ChatOptions, Citation, ClientOptions, DEFAULT_API_BASE_URL, DEFAULT_INTERNAL_API_BASE_URL, MenuItem, Playlist, Portal, PortalDisplay, PortalHero, PortalLayout, PortalNavigation, PortalTheme, RecommendOptions, RecommendResponse, Recommendation, RecommendationVideo, RecommendationsOptions, RecommendationsResponse, SearchOptions, Segment, Settings, Source, ThemeColors, ThemeConfig, Video, VideoAttachment, VideoDownloadUrls, VideoMetadata, VideoSubtitles, VideoTranscript, createClient };
|