@go1/go1-embedding-react-sdk 0.0.4 → 0.0.5
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 +28 -18
- package/dist/README.md +28 -18
- package/dist/common/types.d.ts +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,25 +60,36 @@ interface ThemeInformation {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* Used to
|
|
64
|
-
* example:
|
|
65
|
-
* {
|
|
66
|
-
* id: 341134,
|
|
67
|
-
* shouldShowHeading: false
|
|
68
|
-
* }
|
|
63
|
+
* Used to configure the `ai-chat` feature
|
|
69
64
|
*/
|
|
70
|
-
interface
|
|
71
|
-
|
|
65
|
+
export interface FeatureAttributesAIChat {
|
|
66
|
+
experience: 'manager' | 'learner';
|
|
67
|
+
intent?: 'skill_gap' | 'improve_skills' | 'next_role' | 'aspirational';
|
|
68
|
+
existingSkills?: string[]; // max items 7, any more are discarded
|
|
69
|
+
desiredSkills?: string[]; // max items 7, any more are discarded
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type FeatureAttributes = FeatureAttributesAIChat
|
|
73
|
+
|
|
74
|
+
export interface AdditionalUserInfo {
|
|
75
|
+
jobTitle: string;
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
interface InitOptions {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
/** Mandatory identifier for the embedded feature */
|
|
80
|
+
feature: 'ai-chat' | 'content-hub' | 'preview';
|
|
81
|
+
/** Optional parameters to configure the feature. See associated types for examples */
|
|
82
|
+
featureAttributes?: FeatureAttributes;
|
|
83
|
+
/** Optional Go1 portal URL, used for login purposes if no `oneTimeToken` is provided */
|
|
84
|
+
portalURL?: string;
|
|
85
|
+
/** Optional function that is invoked when the Go1 content view emits a message */
|
|
86
|
+
onGo1MessageReceived?: OnGo1MessageReceived;
|
|
87
|
+
/** Optional end user information that can enhance the context and provide a better experience. No PII is needed, please do not send any. */
|
|
88
|
+
additionalUserInfo?: AdditionalUserInfo;
|
|
89
|
+
/** Optional UI configuration */
|
|
90
|
+
themeInformation?: ThemeInformation
|
|
91
|
+
/** Optional token that is used to pre-authorize the user without them needing to log in */
|
|
92
|
+
oneTimeToken?: string;
|
|
82
93
|
}
|
|
83
94
|
```
|
|
84
95
|
|
|
@@ -109,12 +120,11 @@ const options = useMemo<ContentViewProps>(() => {
|
|
|
109
120
|
feature: 'ai-chat',
|
|
110
121
|
portalURL: 'learning-incorporated-usa.mygo1.com',
|
|
111
122
|
featureAttributes: {
|
|
112
|
-
|
|
123
|
+
experience: 'manager',
|
|
113
124
|
},
|
|
114
125
|
onGo1MessageReceived,
|
|
115
126
|
additionalUserInfo: {
|
|
116
|
-
|
|
117
|
-
goals: ['leadership', 'management']
|
|
127
|
+
jobTitle: 'Sales development representative'
|
|
118
128
|
},
|
|
119
129
|
themeInformation: {
|
|
120
130
|
accent: '#0437F2'
|
package/dist/README.md
CHANGED
|
@@ -60,25 +60,36 @@ interface ThemeInformation {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* Used to
|
|
64
|
-
* example:
|
|
65
|
-
* {
|
|
66
|
-
* id: 341134,
|
|
67
|
-
* shouldShowHeading: false
|
|
68
|
-
* }
|
|
63
|
+
* Used to configure the `ai-chat` feature
|
|
69
64
|
*/
|
|
70
|
-
interface
|
|
71
|
-
|
|
65
|
+
export interface FeatureAttributesAIChat {
|
|
66
|
+
experience: 'manager' | 'learner';
|
|
67
|
+
intent?: 'skill_gap' | 'improve_skills' | 'next_role' | 'aspirational';
|
|
68
|
+
existingSkills?: string[]; // max items 7, any more are discarded
|
|
69
|
+
desiredSkills?: string[]; // max items 7, any more are discarded
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type FeatureAttributes = FeatureAttributesAIChat
|
|
73
|
+
|
|
74
|
+
export interface AdditionalUserInfo {
|
|
75
|
+
jobTitle: string;
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
interface InitOptions {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
/** Mandatory identifier for the embedded feature */
|
|
80
|
+
feature: 'ai-chat' | 'content-hub' | 'preview';
|
|
81
|
+
/** Optional parameters to configure the feature. See associated types for examples */
|
|
82
|
+
featureAttributes?: FeatureAttributes;
|
|
83
|
+
/** Optional Go1 portal URL, used for login purposes if no `oneTimeToken` is provided */
|
|
84
|
+
portalURL?: string;
|
|
85
|
+
/** Optional function that is invoked when the Go1 content view emits a message */
|
|
86
|
+
onGo1MessageReceived?: OnGo1MessageReceived;
|
|
87
|
+
/** Optional end user information that can enhance the context and provide a better experience. No PII is needed, please do not send any. */
|
|
88
|
+
additionalUserInfo?: AdditionalUserInfo;
|
|
89
|
+
/** Optional UI configuration */
|
|
90
|
+
themeInformation?: ThemeInformation
|
|
91
|
+
/** Optional token that is used to pre-authorize the user without them needing to log in */
|
|
92
|
+
oneTimeToken?: string;
|
|
82
93
|
}
|
|
83
94
|
```
|
|
84
95
|
|
|
@@ -109,12 +120,11 @@ const options = useMemo<ContentViewProps>(() => {
|
|
|
109
120
|
feature: 'ai-chat',
|
|
110
121
|
portalURL: 'learning-incorporated-usa.mygo1.com',
|
|
111
122
|
featureAttributes: {
|
|
112
|
-
|
|
123
|
+
experience: 'manager',
|
|
113
124
|
},
|
|
114
125
|
onGo1MessageReceived,
|
|
115
126
|
additionalUserInfo: {
|
|
116
|
-
|
|
117
|
-
goals: ['leadership', 'management']
|
|
127
|
+
jobTitle: 'Sales development representative'
|
|
118
128
|
},
|
|
119
129
|
themeInformation: {
|
|
120
130
|
accent: '#0437F2'
|
package/dist/common/types.d.ts
CHANGED
|
@@ -15,14 +15,18 @@ export interface Go1Message {
|
|
|
15
15
|
type: string;
|
|
16
16
|
payload?: any;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
19
|
-
|
|
18
|
+
export interface FeatureAttributesAIChat {
|
|
19
|
+
experience: 'manager' | 'learner';
|
|
20
|
+
intent?: 'skill_gap' | 'improve_skills' | 'next_role' | 'aspirational';
|
|
21
|
+
existingSkills?: string[];
|
|
22
|
+
desiredSkills?: string[];
|
|
20
23
|
}
|
|
24
|
+
export type FeatureAttributes = FeatureAttributesAIChat;
|
|
21
25
|
export interface AdditionalUserInfo {
|
|
22
|
-
|
|
26
|
+
jobTitle: string;
|
|
23
27
|
}
|
|
24
28
|
export interface InitOptions {
|
|
25
|
-
feature:
|
|
29
|
+
feature: 'ai-chat' | 'content-hub' | 'preview';
|
|
26
30
|
iframeParentId?: string;
|
|
27
31
|
iframeParentElement?: HTMLElement;
|
|
28
32
|
featureAttributes?: FeatureAttributes;
|