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

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
@@ -234,6 +234,8 @@ const { sendMessageToGo1, ContentView } = useGo1ContentView(options);
234
234
 
235
235
  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.)
236
236
 
237
+ A currently supported message is `update_experience`, this will update the experience Feature Attribute. An example of its usage is below.
238
+
237
239
  ```typescript
238
240
  function sendMessageToGo1(message: Go1Message): void;
239
241
  ```
@@ -242,7 +244,8 @@ function sendMessageToGo1(message: Go1Message): void;
242
244
 
243
245
  ```typescript
244
246
  const message = {
245
- type: 'return_to_home_screen',
247
+ type: 'update_experience',
248
+ payload: { experience: 'learner' },
246
249
  };
247
250
  sendMessageToGo1(message);
248
251
  ```
package/dist/README.md CHANGED
@@ -234,6 +234,8 @@ const { sendMessageToGo1, ContentView } = useGo1ContentView(options);
234
234
 
235
235
  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.)
236
236
 
237
+ A currently supported message is `update_experience`, this will update the experience Feature Attribute. An example of its usage is below.
238
+
237
239
  ```typescript
238
240
  function sendMessageToGo1(message: Go1Message): void;
239
241
  ```
@@ -242,7 +244,8 @@ function sendMessageToGo1(message: Go1Message): void;
242
244
 
243
245
  ```typescript
244
246
  const message = {
245
- type: 'return_to_home_screen',
247
+ type: 'update_experience',
248
+ payload: { experience: 'learner' },
246
249
  };
247
250
  sendMessageToGo1(message);
248
251
  ```
@@ -9,11 +9,12 @@ export interface AdditionalInfoMessage {
9
9
  themeInformation?: ThemeInformation;
10
10
  integrationSystemId?: string;
11
11
  presentingIntegrationSystemId?: string;
12
+ experience?: FeatureAttributes['experience'];
12
13
  }
13
14
  export interface ThemeInformation {
14
15
  accent: string;
15
16
  }
16
- 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';
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
18
  export interface Go1Message {
18
19
  type: Go1MessageType;
19
20
  payload?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go1/go1-embedding-react-sdk",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
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": [