@go1/go1-embedding-react-sdk 0.2.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 +16 -3
- package/dist/CHANGELOG.md +20 -0
- package/dist/README.md +16 -3
- package/dist/common/types.d.ts +17 -7
- package/dist/common/types.js +14 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Go1 Embedding React SDK
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A React hook to embed a Go1 content view in your site. Includes two-way messaging between your site and the Go1 content view.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -95,7 +95,7 @@ export type Experience = 'manager' | 'learner' | 'role-aware'
|
|
|
95
95
|
|
|
96
96
|
interface FeatureAttributeCommon {
|
|
97
97
|
shouldSuppressPreview?: boolean;
|
|
98
|
-
experience?: Experience;
|
|
98
|
+
experience?: Experience; // Defaults to `manager`
|
|
99
99
|
contentScope?: 'subscription' | 'library';
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -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
|
-
https://www.go1.com/developers
|
|
327
|
+
<https://www.go1.com/developers>
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
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
|
+
|
|
15
|
+
## 0.3.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- New featureAttributes for Select Welcome Modal and Recommendation
|
|
20
|
+
- new Go1MessageType 'contact_go1_navigation'
|
|
21
|
+
- Add new feature auth-clients
|
|
22
|
+
|
|
3
23
|
## 0.2.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/dist/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Go1 Embedding React SDK
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A React hook to embed a Go1 content view in your site. Includes two-way messaging between your site and the Go1 content view.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -95,7 +95,7 @@ export type Experience = 'manager' | 'learner' | 'role-aware'
|
|
|
95
95
|
|
|
96
96
|
interface FeatureAttributeCommon {
|
|
97
97
|
shouldSuppressPreview?: boolean;
|
|
98
|
-
experience?: Experience;
|
|
98
|
+
experience?: Experience; // Defaults to `manager`
|
|
99
99
|
contentScope?: 'subscription' | 'library';
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -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
|
-
https://www.go1.com/developers
|
|
327
|
+
<https://www.go1.com/developers>
|
package/dist/common/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface AdditionalInfoMessage {
|
|
|
7
7
|
feature: FeatureType;
|
|
8
8
|
additionalUserInfo?: AdditionalUserInfo;
|
|
9
9
|
featureAttributes?: FeatureAttributes;
|
|
10
|
-
themeInformation?: ThemeInformation;
|
|
10
|
+
themeInformation?: ThemeInformation | ThemeInformationElysium;
|
|
11
11
|
integrationSystemId?: string;
|
|
12
12
|
presentingIntegrationSystemId?: string;
|
|
13
13
|
experience?: FeatureAttributes['experience'];
|
|
@@ -16,11 +16,21 @@ export interface AdditionalInfoMessage {
|
|
|
16
16
|
export interface ThemeInformation {
|
|
17
17
|
accent: string;
|
|
18
18
|
}
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
export interface ThemeInformationElysium {
|
|
20
|
+
brandColor: string;
|
|
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';
|
|
23
|
+
interface Go1MessageUpdateExperience {
|
|
24
|
+
type: 'update_experience';
|
|
25
|
+
payload: {
|
|
26
|
+
experience: ExternalExperience;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface Go1MessageGeneric {
|
|
30
|
+
type: Exclude<Go1MessageType, 'update_experience'>;
|
|
22
31
|
payload?: any;
|
|
23
|
-
}
|
|
32
|
+
}
|
|
33
|
+
export type Go1Message = Go1MessageUpdateExperience | Go1MessageGeneric;
|
|
24
34
|
export type ExternalExperience = 'manager' | 'learner' | 'role-aware';
|
|
25
35
|
export interface FeatureAttributeCommon {
|
|
26
36
|
shouldSuppressPreview?: boolean;
|
|
@@ -46,7 +56,7 @@ export interface FeatureAttributesPreview extends FeatureAttributesPreviewCommon
|
|
|
46
56
|
id: number;
|
|
47
57
|
}
|
|
48
58
|
export interface FeatureAttributesWallet extends FeatureAttributeCommon {
|
|
49
|
-
walletMode: 'setup' | 'main'
|
|
59
|
+
walletMode: 'setup' | 'main';
|
|
50
60
|
deepLink?: string;
|
|
51
61
|
oneClickBuyUrl?: string;
|
|
52
62
|
}
|
|
@@ -94,7 +104,7 @@ export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPrevi
|
|
|
94
104
|
export interface AdditionalUserInfo {
|
|
95
105
|
jobTitle: string;
|
|
96
106
|
}
|
|
97
|
-
export declare const features: readonly ["
|
|
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"];
|
|
98
108
|
export type FeatureType = (typeof features)[number];
|
|
99
109
|
export interface InitOptions {
|
|
100
110
|
feature: FeatureType;
|
package/dist/common/types.js
CHANGED
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.features = void 0;
|
|
4
4
|
exports.features = [
|
|
5
|
-
'
|
|
6
|
-
'content
|
|
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',
|
|
24
|
+
'search',
|
|
25
|
+
'wallet',
|
|
25
26
|
];
|