@go1/go1-embedding-react-sdk 0.4.0 → 0.6.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/README.md CHANGED
@@ -51,12 +51,17 @@ export type SendMessageToGo1 = (message: Go1Message) => void;
51
51
 
52
52
  export type IframesMap = { [key: string]: HTMLIFrameElement };
53
53
 
54
- export interface AdditionalInfoMessage {
55
- additionalUserInfo?: AdditionalUserInfo;
56
- featureAttributes?: FeatureAttributes;
57
- themeInformation?: ThemeInformation;
54
+ export interface FeatureAttributeCommon {
55
+ shouldSuppressPreview?: boolean;
56
+ shouldSuppressOpeningPlayer?: boolean;
57
+ shouldShowSelectWelcomeModal?: boolean;
58
+ shouldSuppressBookmark?: boolean;
59
+ shouldSuppressPlaylistAdministration?: boolean;
60
+ shouldSuppressShareLink?: boolean;
61
+ contentScope?: 'subscription' | 'library';
58
62
  }
59
63
 
64
+
60
65
  export interface ThemeInformation {
61
66
  /** Hex string, starting with a #. Example #0437F2 */
62
67
  accent: string;
@@ -84,18 +89,21 @@ export type Go1MessageType =
84
89
  | 'swap_out_open'
85
90
  | 'swap_out_close'
86
91
  | 'play_content'
87
- | 'go1pay_custom_data';
92
+ | 'library_content_added';
88
93
 
89
94
  export interface Go1Message {
90
95
  type: Go1MessageType;
91
96
  payload?: any;
92
97
  }
93
98
 
94
- export type Experience = 'manager' | 'learner' | 'role-aware'
95
99
 
96
- interface FeatureAttributeCommon {
100
+ export interface FeatureAttributeCommon {
97
101
  shouldSuppressPreview?: boolean;
98
- experience?: Experience; // Defaults to `manager`
102
+ shouldSuppressOpeningPlayer?: boolean;
103
+ shouldShowSelectWelcomeModal?: boolean;
104
+ shouldSuppressBookmark?: boolean;
105
+ shouldSuppressPlaylistAdministration?: boolean;
106
+ shouldSuppressShareLink?: boolean;
99
107
  contentScope?: 'subscription' | 'library';
100
108
  }
101
109
 
@@ -130,11 +138,6 @@ export interface FeatureAttributesWallet extends FeatureAttributeCommon {
130
138
  oneClickBuyUrl?: string;
131
139
  }
132
140
 
133
- export interface FeatureAttributesLearnerSearch extends FeatureAttributeCommon {
134
- isGo1MobileApp?: boolean;
135
- experience?: 'learner';
136
- }
137
-
138
141
  export interface FeatureAttributesLibrary extends FeatureAttributeCommon, FeatureAttributesRetirement {
139
142
  libraryEmptyStateDescription?: string;
140
143
  shouldShowLibraryTabs?: boolean;
@@ -154,7 +157,13 @@ export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCo
154
157
 
155
158
  export interface FeatureAttributesMyLearning extends FeatureAttributeCommon {}
156
159
 
157
- export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon {
160
+ export interface FeatureAttributesProspect {
161
+ isProspectExperience?: boolean;
162
+ }
163
+
164
+ export interface FeatureAttributesGo1LearnSearch
165
+ extends FeatureAttributeCommon,
166
+ FeatureAttributesProspect {
158
167
  searchTerm?: string; // If the embedding search feature includes a search term, the app will initialize with the pre-filled search term.
159
168
  searchProvider?: string; // If the embedding search feature includes a search provider, the app will initialize with the pre-filled search provider.
160
169
  }
@@ -184,13 +193,8 @@ export type FeatureType =
184
193
  | 'ai-chat'
185
194
  | 'content-hub'
186
195
  | 'preview'
187
- | 'library'
188
196
  | 'search'
189
- | 'wallet'
190
- | 'content-retirement'
191
- | 'my-playlists'
192
- | 'activity-feed'
193
- | 'my-learning';
197
+ | 'admin-curation';
194
198
 
195
199
  export interface InitOptions {
196
200
  /** Mandatory identifier for the embedded feature */
@@ -209,8 +213,10 @@ export interface InitOptions {
209
213
  additionalUserInfo?: AdditionalUserInfo;
210
214
  /** Optional UI configuration */
211
215
  themeInformation?: ThemeInformation;
212
- /** Optional token that is used to pre-authorize the user without them needing to log in */
216
+ /** Optional one time token that is used to pre-authorize the user without them needing to log in */
213
217
  oneTimeToken?: string;
218
+ /** Optional OAuth token that is used to pre-authorize the user without them needing to log in */
219
+ accessToken?: string;
214
220
  /** Optional Id that let us know which integration system users are coming from (will be required in the future)*/
215
221
  integrationSystemId?: string;
216
222
  /** Optional Id that let us know which integration system users are coming from, if using an intermediary system to embed */
@@ -245,7 +251,7 @@ const options = useMemo<ContentViewProps>(() => {
245
251
  feature: 'ai-chat',
246
252
  portalURL: 'learning-incorporated-usa.mygo1.com',
247
253
  featureAttributes: {
248
- experience: 'manager',
254
+ shouldSuppressShareLink: true,
249
255
  },
250
256
  onGo1MessageReceived,
251
257
  additionalUserInfo: {
@@ -268,7 +274,7 @@ const { sendMessageToGo1, ContentView } = useGo1ContentView(options);
268
274
 
269
275
  Send a message to the Go1 content view. Useful to control the user experience when an event starts on your website and the Go1 content view needs to be aware of it (and potentially perform other actions - this is `feature` dependent.)
270
276
 
271
- A currently supported message is `update_experience`, this will update the experience Feature Attribute. An example of its usage is below.
277
+ An example of its usage is below.
272
278
 
273
279
  ```typescript
274
280
  function sendMessageToGo1(message: Go1Message): void;
@@ -278,8 +284,8 @@ function sendMessageToGo1(message: Go1Message): void;
278
284
 
279
285
  ```typescript
280
286
  const message = {
281
- type: 'update_experience',
282
- payload: { experience: 'learner' },
287
+ type: 'logout',
288
+ payload: {},
283
289
  };
284
290
  sendMessageToGo1(message);
285
291
  ```
@@ -317,7 +323,8 @@ Item has been added to the library
317
323
  {
318
324
  "type": "library_content_added",
319
325
  "payload": {
320
- "id": "3510462"
326
+ "id": "3510462",
327
+ "type": "lo"
321
328
  }
322
329
  }
323
330
  ```
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @go1/go1-embedding-react-sdk
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - - Adding isProspectExperience to featureAttributes. Allowing partners to use the Prospect experience
8
+
9
+ ## 0.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - New featureAttributes for Select Welcome Modal and Recommendation
14
+ - new Go1MessageType 'contact_go1_navigation'
15
+ - Add new feature auth-clients
16
+
17
+ ### Patch Changes
18
+
19
+ - Add new message library_content_added
20
+ - Remove message elysium_modal_open and elysium_modal_close
21
+ - Adding shouldSuppressBookmark and shouldSuppressPlaylistAdministration to featureAttributes, allowing partners to hide the bookmark and playlist functionality
22
+
3
23
  ## 0.4.0
4
24
 
5
25
  ### Minor Changes
package/dist/README.md CHANGED
@@ -51,12 +51,17 @@ export type SendMessageToGo1 = (message: Go1Message) => void;
51
51
 
52
52
  export type IframesMap = { [key: string]: HTMLIFrameElement };
53
53
 
54
- export interface AdditionalInfoMessage {
55
- additionalUserInfo?: AdditionalUserInfo;
56
- featureAttributes?: FeatureAttributes;
57
- themeInformation?: ThemeInformation;
54
+ export interface FeatureAttributeCommon {
55
+ shouldSuppressPreview?: boolean;
56
+ shouldSuppressOpeningPlayer?: boolean;
57
+ shouldShowSelectWelcomeModal?: boolean;
58
+ shouldSuppressBookmark?: boolean;
59
+ shouldSuppressPlaylistAdministration?: boolean;
60
+ shouldSuppressShareLink?: boolean;
61
+ contentScope?: 'subscription' | 'library';
58
62
  }
59
63
 
64
+
60
65
  export interface ThemeInformation {
61
66
  /** Hex string, starting with a #. Example #0437F2 */
62
67
  accent: string;
@@ -84,18 +89,21 @@ export type Go1MessageType =
84
89
  | 'swap_out_open'
85
90
  | 'swap_out_close'
86
91
  | 'play_content'
87
- | 'go1pay_custom_data';
92
+ | 'library_content_added';
88
93
 
89
94
  export interface Go1Message {
90
95
  type: Go1MessageType;
91
96
  payload?: any;
92
97
  }
93
98
 
94
- export type Experience = 'manager' | 'learner' | 'role-aware'
95
99
 
96
- interface FeatureAttributeCommon {
100
+ export interface FeatureAttributeCommon {
97
101
  shouldSuppressPreview?: boolean;
98
- experience?: Experience; // Defaults to `manager`
102
+ shouldSuppressOpeningPlayer?: boolean;
103
+ shouldShowSelectWelcomeModal?: boolean;
104
+ shouldSuppressBookmark?: boolean;
105
+ shouldSuppressPlaylistAdministration?: boolean;
106
+ shouldSuppressShareLink?: boolean;
99
107
  contentScope?: 'subscription' | 'library';
100
108
  }
101
109
 
@@ -130,11 +138,6 @@ export interface FeatureAttributesWallet extends FeatureAttributeCommon {
130
138
  oneClickBuyUrl?: string;
131
139
  }
132
140
 
133
- export interface FeatureAttributesLearnerSearch extends FeatureAttributeCommon {
134
- isGo1MobileApp?: boolean;
135
- experience?: 'learner';
136
- }
137
-
138
141
  export interface FeatureAttributesLibrary extends FeatureAttributeCommon, FeatureAttributesRetirement {
139
142
  libraryEmptyStateDescription?: string;
140
143
  shouldShowLibraryTabs?: boolean;
@@ -154,7 +157,13 @@ export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCo
154
157
 
155
158
  export interface FeatureAttributesMyLearning extends FeatureAttributeCommon {}
156
159
 
157
- export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon {
160
+ export interface FeatureAttributesProspect {
161
+ isProspectExperience?: boolean;
162
+ }
163
+
164
+ export interface FeatureAttributesGo1LearnSearch
165
+ extends FeatureAttributeCommon,
166
+ FeatureAttributesProspect {
158
167
  searchTerm?: string; // If the embedding search feature includes a search term, the app will initialize with the pre-filled search term.
159
168
  searchProvider?: string; // If the embedding search feature includes a search provider, the app will initialize with the pre-filled search provider.
160
169
  }
@@ -184,13 +193,8 @@ export type FeatureType =
184
193
  | 'ai-chat'
185
194
  | 'content-hub'
186
195
  | 'preview'
187
- | 'library'
188
196
  | 'search'
189
- | 'wallet'
190
- | 'content-retirement'
191
- | 'my-playlists'
192
- | 'activity-feed'
193
- | 'my-learning';
197
+ | 'admin-curation';
194
198
 
195
199
  export interface InitOptions {
196
200
  /** Mandatory identifier for the embedded feature */
@@ -209,8 +213,10 @@ export interface InitOptions {
209
213
  additionalUserInfo?: AdditionalUserInfo;
210
214
  /** Optional UI configuration */
211
215
  themeInformation?: ThemeInformation;
212
- /** Optional token that is used to pre-authorize the user without them needing to log in */
216
+ /** Optional one time token that is used to pre-authorize the user without them needing to log in */
213
217
  oneTimeToken?: string;
218
+ /** Optional OAuth token that is used to pre-authorize the user without them needing to log in */
219
+ accessToken?: string;
214
220
  /** Optional Id that let us know which integration system users are coming from (will be required in the future)*/
215
221
  integrationSystemId?: string;
216
222
  /** Optional Id that let us know which integration system users are coming from, if using an intermediary system to embed */
@@ -245,7 +251,7 @@ const options = useMemo<ContentViewProps>(() => {
245
251
  feature: 'ai-chat',
246
252
  portalURL: 'learning-incorporated-usa.mygo1.com',
247
253
  featureAttributes: {
248
- experience: 'manager',
254
+ shouldSuppressShareLink: true,
249
255
  },
250
256
  onGo1MessageReceived,
251
257
  additionalUserInfo: {
@@ -268,7 +274,7 @@ const { sendMessageToGo1, ContentView } = useGo1ContentView(options);
268
274
 
269
275
  Send a message to the Go1 content view. Useful to control the user experience when an event starts on your website and the Go1 content view needs to be aware of it (and potentially perform other actions - this is `feature` dependent.)
270
276
 
271
- A currently supported message is `update_experience`, this will update the experience Feature Attribute. An example of its usage is below.
277
+ An example of its usage is below.
272
278
 
273
279
  ```typescript
274
280
  function sendMessageToGo1(message: Go1Message): void;
@@ -278,8 +284,8 @@ function sendMessageToGo1(message: Go1Message): void;
278
284
 
279
285
  ```typescript
280
286
  const message = {
281
- type: 'update_experience',
282
- payload: { experience: 'learner' },
287
+ type: 'logout',
288
+ payload: {},
283
289
  };
284
290
  sendMessageToGo1(message);
285
291
  ```
@@ -317,7 +323,8 @@ Item has been added to the library
317
323
  {
318
324
  "type": "library_content_added",
319
325
  "payload": {
320
- "id": "3510462"
326
+ "id": "3510462",
327
+ "type": "lo"
321
328
  }
322
329
  }
323
330
  ```
@@ -19,7 +19,7 @@ export interface ThemeInformation {
19
19
  export interface ThemeInformationElysium {
20
20
  brandColor: string;
21
21
  }
22
- 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' | 'set_access_token' | 'logout' | 'sync_content' | 'open_save_to_playlist_modal' | 'update_experience' | 'inter_feature_navigation' | 'side_drawer_open' | 'side_drawer_close' | 'elysium_modal_open' | 'elysium_modal_close' | 'play_content' | 'go1pay_custom_data' | 'bulk_upload_content' | 'bulk_upload_metadata' | 'bulk_upload_close' | 'contact_go1_navigation' | 'library_content_added';
22
+ 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' | 'set_access_token' | 'logout' | 'sync_content' | 'open_save_to_playlist_modal' | 'update_experience' | 'inter_feature_navigation' | 'side_drawer_open' | 'side_drawer_close' | 'play_content' | 'go1pay_custom_data' | 'bulk_upload_content' | 'bulk_upload_metadata' | 'bulk_upload_close' | 'contact_go1_navigation' | 'library_content_added';
23
23
  interface Go1MessageUpdateExperience {
24
24
  type: 'update_experience';
25
25
  payload: {
@@ -36,6 +36,9 @@ export interface FeatureAttributeCommon {
36
36
  shouldSuppressPreview?: boolean;
37
37
  shouldSuppressOpeningPlayer?: boolean;
38
38
  shouldShowSelectWelcomeModal?: boolean;
39
+ shouldSuppressBookmark?: boolean;
40
+ shouldSuppressPlaylistAdministration?: boolean;
41
+ shouldSuppressShareLink?: boolean;
39
42
  experience?: ExternalExperience;
40
43
  contentScope?: 'subscription' | 'library';
41
44
  }
@@ -89,7 +92,10 @@ export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCo
89
92
  export interface FeatureAttributesMyLearning extends FeatureAttributeCommon {
90
93
  selectingTab?: 'saved' | 'in-progress' | 'assigned' | 'completed';
91
94
  }
92
- export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon {
95
+ export interface FeatureAttributesProspect {
96
+ isProspectExperience?: boolean;
97
+ }
98
+ export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon, FeatureAttributesProspect {
93
99
  searchTerm?: string;
94
100
  searchProvider?: string;
95
101
  }
@@ -104,7 +110,7 @@ export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPrevi
104
110
  export interface AdditionalUserInfo {
105
111
  jobTitle: string;
106
112
  }
107
- export declare const features: readonly ["auth-clients", "go1-learn/learner-content", "go1-learn/library", "go1-learn/my-learning", "go1-learn/search", "insights", "activity-feed", "ai-chat", "bulk-upload", "content-hub", "content-retirement", "content-status", "home", "library", "my-learning", "my-playlists", "partner-sales", "preview", "recommendations", "search", "wallet"];
113
+ export declare const features: readonly ["auth-clients", "go1-learn/library", "go1-learn/my-learning", "go1-learn/search", "admin-curation", "activity-feed", "ai-chat", "bulk-upload", "content-hub", "content-retirement", "content-status", "library", "my-learning", "my-playlists", "partner-sales", "preview", "recommendations", "search", "wallet"];
108
114
  export type FeatureType = (typeof features)[number];
109
115
  export interface InitOptions {
110
116
  feature: FeatureType;
@@ -3,18 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.features = void 0;
4
4
  exports.features = [
5
5
  'auth-clients',
6
- 'go1-learn/learner-content',
7
6
  'go1-learn/library',
8
7
  'go1-learn/my-learning',
9
8
  'go1-learn/search',
10
- 'insights',
9
+ 'admin-curation',
11
10
  'activity-feed',
12
11
  'ai-chat',
13
12
  'bulk-upload',
14
13
  'content-hub',
15
14
  'content-retirement',
16
15
  'content-status',
17
- 'home',
18
16
  'library',
19
17
  'my-learning',
20
18
  'my-playlists',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go1/go1-embedding-react-sdk",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
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": [
@@ -15,9 +15,6 @@
15
15
  "@go1/go1-embedding-js-sdk",
16
16
  "Go1"
17
17
  ],
18
- "scripts": {
19
- "test": "jest"
20
- },
21
18
  "license": "ISC",
22
19
  "devDependencies": {
23
20
  "@testing-library/jest-dom": "5.17.0",
@@ -31,5 +28,8 @@
31
28
  },
32
29
  "peerDependencies": {
33
30
  "react": ">=16.8"
31
+ },
32
+ "scripts": {
33
+ "test": "jest"
34
34
  }
35
- }
35
+ }