@go1/go1-embedding-react-sdk 0.0.33 → 0.0.35
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
|
@@ -85,14 +85,14 @@ export interface Go1Message {
|
|
|
85
85
|
|
|
86
86
|
interface FeatureAttributeCommon {
|
|
87
87
|
shouldSuppressPreview?: boolean;
|
|
88
|
-
|
|
88
|
+
experience?: 'manager' | 'learner';
|
|
89
|
+
shouldShowGo1FeedbackButton?: boolean;
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
/**
|
|
92
93
|
* Used to configure the `ai-chat` feature
|
|
93
94
|
*/
|
|
94
95
|
export interface FeatureAttributesAIChat extends FeatureAttributeCommon {
|
|
95
|
-
experience: 'manager' | 'learner';
|
|
96
96
|
intent?: 'skill_gap' | 'improve_skills' | 'next_role' | 'aspirations';
|
|
97
97
|
message?: string; // The desired message to start the chat, which will be shown to the user
|
|
98
98
|
existingSkills?: string[]; // max items 7, any more are discarded
|
|
@@ -105,7 +105,6 @@ export interface FeatureAttributesAIChat extends FeatureAttributeCommon {
|
|
|
105
105
|
*/
|
|
106
106
|
export interface FeatureAttributesPreview extends FeatureAttributeCommon {
|
|
107
107
|
id: number;
|
|
108
|
-
experience?: 'manager' | 'learner';
|
|
109
108
|
startWith1Player?: boolean;
|
|
110
109
|
showFooter?: boolean;
|
|
111
110
|
}
|
|
@@ -175,6 +174,8 @@ export interface InitOptions {
|
|
|
175
174
|
themeInformation?: ThemeInformation;
|
|
176
175
|
/** Optional token that is used to pre-authorize the user without them needing to log in */
|
|
177
176
|
oneTimeToken?: string;
|
|
177
|
+
/** Optional Id that let us know users are coming from which integration system (will be required in the future)*/
|
|
178
|
+
integrationSystemId?: string;
|
|
178
179
|
}
|
|
179
180
|
```
|
|
180
181
|
|
|
@@ -215,6 +216,7 @@ const options = useMemo<ContentViewProps>(() => {
|
|
|
215
216
|
accent: '#0437F2',
|
|
216
217
|
},
|
|
217
218
|
oneTimeToken: '907687a6e81a458190fe4c21f05ee689',
|
|
219
|
+
integrationSystemId: 'int_nI7rPykBRm0C',
|
|
218
220
|
};
|
|
219
221
|
}, []);
|
|
220
222
|
|
package/dist/README.md
CHANGED
|
@@ -85,14 +85,14 @@ export interface Go1Message {
|
|
|
85
85
|
|
|
86
86
|
interface FeatureAttributeCommon {
|
|
87
87
|
shouldSuppressPreview?: boolean;
|
|
88
|
-
|
|
88
|
+
experience?: 'manager' | 'learner';
|
|
89
|
+
shouldShowGo1FeedbackButton?: boolean;
|
|
89
90
|
}
|
|
90
91
|
|
|
91
92
|
/**
|
|
92
93
|
* Used to configure the `ai-chat` feature
|
|
93
94
|
*/
|
|
94
95
|
export interface FeatureAttributesAIChat extends FeatureAttributeCommon {
|
|
95
|
-
experience: 'manager' | 'learner';
|
|
96
96
|
intent?: 'skill_gap' | 'improve_skills' | 'next_role' | 'aspirations';
|
|
97
97
|
message?: string; // The desired message to start the chat, which will be shown to the user
|
|
98
98
|
existingSkills?: string[]; // max items 7, any more are discarded
|
|
@@ -105,7 +105,6 @@ export interface FeatureAttributesAIChat extends FeatureAttributeCommon {
|
|
|
105
105
|
*/
|
|
106
106
|
export interface FeatureAttributesPreview extends FeatureAttributeCommon {
|
|
107
107
|
id: number;
|
|
108
|
-
experience?: 'manager' | 'learner';
|
|
109
108
|
startWith1Player?: boolean;
|
|
110
109
|
showFooter?: boolean;
|
|
111
110
|
}
|
|
@@ -175,6 +174,8 @@ export interface InitOptions {
|
|
|
175
174
|
themeInformation?: ThemeInformation;
|
|
176
175
|
/** Optional token that is used to pre-authorize the user without them needing to log in */
|
|
177
176
|
oneTimeToken?: string;
|
|
177
|
+
/** Optional Id that let us know users are coming from which integration system (will be required in the future)*/
|
|
178
|
+
integrationSystemId?: string;
|
|
178
179
|
}
|
|
179
180
|
```
|
|
180
181
|
|
|
@@ -215,6 +216,7 @@ const options = useMemo<ContentViewProps>(() => {
|
|
|
215
216
|
accent: '#0437F2',
|
|
216
217
|
},
|
|
217
218
|
oneTimeToken: '907687a6e81a458190fe4c21f05ee689',
|
|
219
|
+
integrationSystemId: 'int_nI7rPykBRm0C',
|
|
218
220
|
};
|
|
219
221
|
}, []);
|
|
220
222
|
|
package/dist/common/types.d.ts
CHANGED
|
@@ -16,16 +16,16 @@ export interface Go1Message {
|
|
|
16
16
|
type: Go1MessageType;
|
|
17
17
|
payload?: any;
|
|
18
18
|
}
|
|
19
|
-
interface FeatureAttributeCommon {
|
|
19
|
+
export interface FeatureAttributeCommon {
|
|
20
20
|
shouldSuppressPreview?: boolean;
|
|
21
|
-
|
|
21
|
+
experience?: 'manager' | 'learner';
|
|
22
|
+
shouldShowGo1FeedbackButton?: boolean;
|
|
22
23
|
}
|
|
23
24
|
interface FeatureAttributesPreviewCommon extends FeatureAttributeCommon {
|
|
24
25
|
startWith1Player?: boolean;
|
|
25
26
|
showFooter?: boolean;
|
|
26
27
|
}
|
|
27
28
|
export interface FeatureAttributesAIChat extends FeatureAttributesPreviewCommon {
|
|
28
|
-
experience: 'manager' | 'learner';
|
|
29
29
|
intent?: 'skill_gap' | 'improve_skills' | 'next_role' | 'aspirations';
|
|
30
30
|
message?: string;
|
|
31
31
|
existingSkills?: string[];
|
|
@@ -34,7 +34,6 @@ export interface FeatureAttributesAIChat extends FeatureAttributesPreviewCommon
|
|
|
34
34
|
}
|
|
35
35
|
export interface FeatureAttributesPreview extends FeatureAttributesPreviewCommon {
|
|
36
36
|
id: number;
|
|
37
|
-
experience?: 'manager' | 'learner';
|
|
38
37
|
}
|
|
39
38
|
export interface FeatureAttributesWallet extends FeatureAttributeCommon {
|
|
40
39
|
walletMode: 'setup' | 'main';
|
|
@@ -72,5 +71,6 @@ export interface InitOptions {
|
|
|
72
71
|
additionalUserInfo?: AdditionalUserInfo;
|
|
73
72
|
themeInformation?: ThemeInformation;
|
|
74
73
|
oneTimeToken?: string;
|
|
74
|
+
integrationSystemId?: string;
|
|
75
75
|
}
|
|
76
76
|
export {};
|
|
@@ -6,7 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const constants_1 = require("../../common/constants");
|
|
7
7
|
const params_1 = require("../../common/params");
|
|
8
8
|
function useGo1ContentView(props) {
|
|
9
|
-
const { feature, featureAttributes, portalURL, oneTimeToken, onGo1MessageReceived, additionalUserInfo, themeInformation, env = 'production', } = props;
|
|
9
|
+
const { feature, featureAttributes, portalURL, oneTimeToken, onGo1MessageReceived, additionalUserInfo, themeInformation, integrationSystemId, env = 'production', } = props;
|
|
10
10
|
const iframeRef = (0, react_1.useRef)(null);
|
|
11
11
|
let url = 'https://embedding.go1.com';
|
|
12
12
|
if (env === 'staging') {
|
|
@@ -26,6 +26,9 @@ function useGo1ContentView(props) {
|
|
|
26
26
|
if (oneTimeToken) {
|
|
27
27
|
(0, params_1.addOneTimeToken)(iframeURL, oneTimeToken);
|
|
28
28
|
}
|
|
29
|
+
if (integrationSystemId) {
|
|
30
|
+
iframeURL.searchParams.append('integration_system_id', integrationSystemId);
|
|
31
|
+
}
|
|
29
32
|
const iframeID = `go1-iframe-${feature}`;
|
|
30
33
|
return { iframeURL, iframeID };
|
|
31
34
|
}, [url, feature, portalURL, oneTimeToken, env]);
|