@go1/go1-embedding-react-sdk 0.0.46 → 0.0.49

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/README.md CHANGED
@@ -77,7 +77,8 @@ export type Go1MessageType =
77
77
  | 'search_filter_toggle'
78
78
  | 'pass_ott'
79
79
  | 'logout',
80
- | 'sync_content';
80
+ | 'sync_content'
81
+ | 'inter_feature_navigation';
81
82
 
82
83
  export interface Go1Message {
83
84
  type: Go1MessageType;
@@ -88,7 +89,6 @@ interface FeatureAttributeCommon {
88
89
  shouldSuppressPreview?: boolean;
89
90
  experience?: 'manager' | 'learner';
90
91
  shouldShowGo1FeedbackButton?: boolean;
91
- shouldShowSaveToPlaylistButton?: boolean;
92
92
  contentScope?: 'subscription' | 'library';
93
93
  }
94
94
 
@@ -118,6 +118,8 @@ export interface FeatureAttributesPreview extends FeatureAttributeCommon {
118
118
  */
119
119
  export interface FeatureAttributesWallet extends FeatureAttributeCommon {
120
120
  walletMode: 'setup' | 'main';
121
+ deepLink?: string;
122
+ oneClickBuyUrl?: string;
121
123
  }
122
124
 
123
125
  export interface FeatureAttributesLearnerSearch extends FeatureAttributeCommon {
@@ -136,13 +138,17 @@ export interface FeatureAttributesRetirement extends FeatureAttributeCommon {
136
138
  }
137
139
 
138
140
  export interface FeatureAttributesSearch extends FeatureAttributeCommon {}
141
+ export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCommon {
142
+ playlistId?: number; // If embedding my-playlists feature with playlistId, the app will initialise with the specified playlistId page.
143
+ }
139
144
 
140
145
  export type FeatureAttributes =
141
146
  | FeatureAttributesAIChat
142
147
  | FeatureAttributesPreview
143
148
  | FeatureAttributesWallet
144
149
  | FeatureAttributesLibrary
145
- | FeatureAttributesSearch;
150
+ | FeatureAttributesSearch
151
+ | FeatureAttributesMyPlaylists;
146
152
 
147
153
  export interface AdditionalUserInfo {
148
154
  jobTitle: string;
@@ -156,7 +162,8 @@ export type FeatureType =
156
162
  | 'search'
157
163
  | 'wallet'
158
164
  | 'content-retirement'
159
- | 'my-playlists';
165
+ | 'my-playlists'
166
+ | 'activity-feed';
160
167
 
161
168
  export interface InitOptions {
162
169
  /** Mandatory identifier for the embedded feature */
package/dist/README.md CHANGED
@@ -77,7 +77,8 @@ export type Go1MessageType =
77
77
  | 'search_filter_toggle'
78
78
  | 'pass_ott'
79
79
  | 'logout',
80
- | 'sync_content';
80
+ | 'sync_content'
81
+ | 'inter_feature_navigation';
81
82
 
82
83
  export interface Go1Message {
83
84
  type: Go1MessageType;
@@ -88,7 +89,6 @@ interface FeatureAttributeCommon {
88
89
  shouldSuppressPreview?: boolean;
89
90
  experience?: 'manager' | 'learner';
90
91
  shouldShowGo1FeedbackButton?: boolean;
91
- shouldShowSaveToPlaylistButton?: boolean;
92
92
  contentScope?: 'subscription' | 'library';
93
93
  }
94
94
 
@@ -118,6 +118,8 @@ export interface FeatureAttributesPreview extends FeatureAttributeCommon {
118
118
  */
119
119
  export interface FeatureAttributesWallet extends FeatureAttributeCommon {
120
120
  walletMode: 'setup' | 'main';
121
+ deepLink?: string;
122
+ oneClickBuyUrl?: string;
121
123
  }
122
124
 
123
125
  export interface FeatureAttributesLearnerSearch extends FeatureAttributeCommon {
@@ -136,13 +138,17 @@ export interface FeatureAttributesRetirement extends FeatureAttributeCommon {
136
138
  }
137
139
 
138
140
  export interface FeatureAttributesSearch extends FeatureAttributeCommon {}
141
+ export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCommon {
142
+ playlistId?: number; // If embedding my-playlists feature with playlistId, the app will initialise with the specified playlistId page.
143
+ }
139
144
 
140
145
  export type FeatureAttributes =
141
146
  | FeatureAttributesAIChat
142
147
  | FeatureAttributesPreview
143
148
  | FeatureAttributesWallet
144
149
  | FeatureAttributesLibrary
145
- | FeatureAttributesSearch;
150
+ | FeatureAttributesSearch
151
+ | FeatureAttributesMyPlaylists;
146
152
 
147
153
  export interface AdditionalUserInfo {
148
154
  jobTitle: string;
@@ -156,7 +162,8 @@ export type FeatureType =
156
162
  | 'search'
157
163
  | 'wallet'
158
164
  | 'content-retirement'
159
- | 'my-playlists';
165
+ | 'my-playlists'
166
+ | 'activity-feed';
160
167
 
161
168
  export interface InitOptions {
162
169
  /** Mandatory identifier for the embedded feature */
@@ -14,16 +14,16 @@ export interface AdditionalInfoMessage {
14
14
  export interface ThemeInformation {
15
15
  accent: string;
16
16
  }
17
- export type Go1MessageType = 'preview_start_content' | 'preview_close' | 'preview_add_content_success' | 'preview_add_content_failure' | 'preview_remove_content_success' | 'preview_remove_content_failure' | 'parent_show_preview' | 'set_additional_embedding_data' | 'go1_app_initialised' | 'ott_required' | 'search_result_selected' | 'search_filter_toggle' | 'search_redirected' | 'pass_ott' | 'logout' | 'sync_content' | 'open_save_to_playlist_modal' | 'update_experience';
17
+ export type Go1MessageType = 'preview_start_content' | 'preview_close' | 'preview_add_content_success' | 'preview_add_content_failure' | 'preview_remove_content_success' | 'preview_remove_content_failure' | 'parent_show_preview' | 'set_additional_embedding_data' | 'go1_app_initialised' | 'ott_required' | 'search_result_selected' | 'search_filter_toggle' | 'search_redirected' | 'pass_ott' | 'logout' | 'sync_content' | 'open_save_to_playlist_modal' | 'update_experience' | 'inter_feature_navigation';
18
18
  export interface Go1Message {
19
19
  type: Go1MessageType;
20
20
  payload?: any;
21
21
  }
22
+ type go1OnlyEnabledFeatures = Array<'ai-chat' | 'library' | 'my-playlists' | 'search'>;
22
23
  export interface FeatureAttributeCommon {
23
24
  shouldSuppressPreview?: boolean;
24
25
  experience?: 'manager' | 'learner';
25
26
  shouldShowGo1FeedbackButton?: boolean;
26
- shouldShowSaveToPlaylistButton?: boolean;
27
27
  featureName?: string;
28
28
  contentScope?: 'subscription' | 'library';
29
29
  }
@@ -38,13 +38,16 @@ export interface FeatureAttributesAIChat extends FeatureAttributesPreviewCommon
38
38
  existingSkills?: string[];
39
39
  desiredSkills?: string[];
40
40
  desiredRole?: string;
41
+ go1OnlySaveToMyPlaylistsOverride?: boolean;
42
+ go1OnlyEnabledFeatures?: go1OnlyEnabledFeatures;
41
43
  }
42
44
  export interface FeatureAttributesPreview extends FeatureAttributesPreviewCommon {
43
45
  id: number;
44
46
  }
45
47
  export interface FeatureAttributesWallet extends FeatureAttributeCommon {
46
48
  walletMode: 'setup' | 'main';
47
- deepLink: string;
49
+ deepLink?: string;
50
+ oneClickBuyUrl?: string;
48
51
  }
49
52
  export interface FeatureAttributesLearnerSearch extends FeatureAttributeCommon {
50
53
  isGo1MobileApp?: boolean;
@@ -53,20 +56,26 @@ export interface FeatureAttributesLearnerSearch extends FeatureAttributeCommon {
53
56
  export interface FeatureAttributesLibrary extends FeatureAttributesPreviewCommon, FeatureAttributesRetirement {
54
57
  libraryEmptyStateDescription?: string;
55
58
  shouldShowLibraryTabs?: boolean;
59
+ go1OnlyEnabledFeatures?: go1OnlyEnabledFeatures;
56
60
  }
57
61
  export interface FeatureAttributesRetirement extends FeatureAttributesPreviewCommon {
58
62
  shouldShowAlternativesSearchButton?: boolean;
59
63
  shouldShowNotificationEmailRegisterSwitch?: boolean;
60
64
  }
61
65
  export interface FeatureAttributesSearch extends FeatureAttributesPreviewCommon {
66
+ go1OnlyEnabledFeatures?: go1OnlyEnabledFeatures;
62
67
  }
63
68
  export interface FeatureAttributesContentHub extends FeatureAttributesPreviewCommon {
64
69
  }
65
- export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPreview | FeatureAttributesWallet | FeatureAttributesLibrary | FeatureAttributesSearch;
70
+ export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCommon {
71
+ playlistId?: number;
72
+ go1OnlyEnabledFeatures?: go1OnlyEnabledFeatures;
73
+ }
74
+ export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPreview | FeatureAttributesWallet | FeatureAttributesLibrary | FeatureAttributesSearch | FeatureAttributesMyPlaylists;
66
75
  export interface AdditionalUserInfo {
67
76
  jobTitle: string;
68
77
  }
69
- export declare const features: readonly ["ai-chat", "content-hub", "preview", "library", "search", "wallet", "content-retirement", "my-playlists"];
78
+ export declare const features: readonly ["ai-chat", "content-hub", "preview", "library", "search", "wallet", "content-retirement", "my-playlists", "activity-feed"];
70
79
  export type FeatureType = (typeof features)[number];
71
80
  export interface InitOptions {
72
81
  feature: FeatureType;
@@ -10,4 +10,5 @@ exports.features = [
10
10
  'wallet',
11
11
  'content-retirement',
12
12
  'my-playlists',
13
+ 'activity-feed',
13
14
  ];
@@ -19,7 +19,7 @@ function useGo1ContentView(props) {
19
19
  iframeRef.current?.contentWindow?.postMessage(message, url);
20
20
  }, [url]);
21
21
  let { iframeURL, iframeID } = (0, react_1.useMemo)(() => {
22
- let iframeURL = new URL(`${url}/${feature === 'my-playlists' ? 'my-playlists/own' : `${feature}`}`);
22
+ let iframeURL = new URL(`${url}/${feature}`);
23
23
  if (portalURL) {
24
24
  (0, params_1.addPortalURL)(iframeURL, portalURL, env);
25
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go1/go1-embedding-react-sdk",
3
- "version": "0.0.46",
3
+ "version": "0.0.49",
4
4
  "description": "A React library to embed Go1 content into your website.",
5
5
  "main": "dist/go1-embedding-react-sdk/src/index.js",
6
6
  "files": [