@go1/go1-embedding-react-sdk 0.3.0 → 0.4.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
@@ -309,6 +309,19 @@ const onGo1MessageReceived = (message) => {
309
309
  };
310
310
  ```
311
311
 
312
+ ### Go1 Message Example Payloads
313
+
314
+ Item has been added to the library
315
+
316
+ ```typescript
317
+ {
318
+ "type": "library_content_added",
319
+ "payload": {
320
+ "id": "3510462"
321
+ }
322
+ }
323
+ ```
324
+
312
325
  ## Support
313
326
 
314
327
  <https://www.go1.com/developers>
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @go1/go1-embedding-react-sdk
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - New featureAttributes for Select Welcome Modal and Recommendation
8
+ - new Go1MessageType 'contact_go1_navigation'
9
+ - Add new feature auth-clients
10
+
11
+ ### Patch Changes
12
+
13
+ - Add new message library_content_added
14
+
3
15
  ## 0.3.0
4
16
 
5
17
  ### Minor Changes
package/dist/README.md CHANGED
@@ -309,6 +309,19 @@ const onGo1MessageReceived = (message) => {
309
309
  };
310
310
  ```
311
311
 
312
+ ### Go1 Message Example Payloads
313
+
314
+ Item has been added to the library
315
+
316
+ ```typescript
317
+ {
318
+ "type": "library_content_added",
319
+ "payload": {
320
+ "id": "3510462"
321
+ }
322
+ }
323
+ ```
324
+
312
325
  ## Support
313
326
 
314
327
  <https://www.go1.com/developers>
@@ -19,11 +19,18 @@ 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';
23
- export type Go1Message = {
24
- type: Go1MessageType;
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';
23
+ interface Go1MessageUpdateExperience {
24
+ type: 'update_experience';
25
+ payload: {
26
+ experience: ExternalExperience;
27
+ };
28
+ }
29
+ interface Go1MessageGeneric {
30
+ type: Exclude<Go1MessageType, 'update_experience'>;
25
31
  payload?: any;
26
- };
32
+ }
33
+ export type Go1Message = Go1MessageUpdateExperience | Go1MessageGeneric;
27
34
  export type ExternalExperience = 'manager' | 'learner' | 'role-aware';
28
35
  export interface FeatureAttributeCommon {
29
36
  shouldSuppressPreview?: boolean;
@@ -49,7 +56,7 @@ export interface FeatureAttributesPreview extends FeatureAttributesPreviewCommon
49
56
  id: number;
50
57
  }
51
58
  export interface FeatureAttributesWallet extends FeatureAttributeCommon {
52
- walletMode: 'setup' | 'main' | 'request_admin';
59
+ walletMode: 'setup' | 'main';
53
60
  deepLink?: string;
54
61
  oneClickBuyUrl?: string;
55
62
  }
@@ -97,7 +104,7 @@ export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPrevi
97
104
  export interface AdditionalUserInfo {
98
105
  jobTitle: string;
99
106
  }
100
- export declare const features: readonly ["ai-chat", "content-hub", "preview", "library", "search", "wallet", "content-retirement", "my-playlists", "activity-feed", "my-learning", "insights", "go1-learn/library", "go1-learn/my-learning", "go1-learn/learner-content", "go1-learn/search", "bulk-upload", "content-status", "partner-sales", "home", "recommendations", "auth-clients"];
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"];
101
108
  export type FeatureType = (typeof features)[number];
102
109
  export interface InitOptions {
103
110
  feature: FeatureType;
@@ -2,25 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.features = void 0;
4
4
  exports.features = [
5
- 'ai-chat',
6
- 'content-hub',
7
- 'preview',
8
- 'library',
9
- 'search',
10
- 'wallet',
11
- 'content-retirement',
12
- 'my-playlists',
13
- 'activity-feed',
14
- 'my-learning',
15
- 'insights',
5
+ 'auth-clients',
6
+ 'go1-learn/learner-content',
16
7
  'go1-learn/library',
17
8
  'go1-learn/my-learning',
18
- 'go1-learn/learner-content',
19
9
  'go1-learn/search',
10
+ 'insights',
11
+ 'activity-feed',
12
+ 'ai-chat',
20
13
  'bulk-upload',
14
+ 'content-hub',
15
+ 'content-retirement',
21
16
  'content-status',
22
- 'partner-sales',
23
17
  'home',
18
+ 'library',
19
+ 'my-learning',
20
+ 'my-playlists',
21
+ 'partner-sales',
22
+ 'preview',
24
23
  'recommendations',
25
- 'auth-clients',
24
+ 'search',
25
+ 'wallet',
26
26
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go1/go1-embedding-react-sdk",
3
- "version": "0.3.0",
3
+ "version": "0.4.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": [