@go1/go1-embedding-react-sdk 0.0.34 → 0.0.36

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
@@ -76,7 +76,8 @@ export type Go1MessageType =
76
76
  | 'search_result_selected'
77
77
  | 'search_filter_toggle'
78
78
  | 'pass_ott'
79
- | 'logout';
79
+ | 'logout',
80
+ | 'sync_content';
80
81
 
81
82
  export interface Go1Message {
82
83
  type: Go1MessageType;
@@ -85,6 +86,7 @@ export interface Go1Message {
85
86
 
86
87
  interface FeatureAttributeCommon {
87
88
  shouldSuppressPreview?: boolean;
89
+ experience?: 'manager' | 'learner';
88
90
  shouldShowGo1FeedbackButton?: boolean;
89
91
  }
90
92
 
@@ -92,7 +94,6 @@ interface FeatureAttributeCommon {
92
94
  * Used to configure the `ai-chat` feature
93
95
  */
94
96
  export interface FeatureAttributesAIChat extends FeatureAttributeCommon {
95
- experience: 'manager' | 'learner';
96
97
  intent?: 'skill_gap' | 'improve_skills' | 'next_role' | 'aspirations';
97
98
  message?: string; // The desired message to start the chat, which will be shown to the user
98
99
  existingSkills?: string[]; // max items 7, any more are discarded
@@ -105,7 +106,6 @@ export interface FeatureAttributesAIChat extends FeatureAttributeCommon {
105
106
  */
106
107
  export interface FeatureAttributesPreview extends FeatureAttributeCommon {
107
108
  id: number;
108
- experience?: 'manager' | 'learner';
109
109
  startWith1Player?: boolean;
110
110
  showFooter?: boolean;
111
111
  }
@@ -175,6 +175,8 @@ export interface InitOptions {
175
175
  themeInformation?: ThemeInformation;
176
176
  /** Optional token that is used to pre-authorize the user without them needing to log in */
177
177
  oneTimeToken?: string;
178
+ /** Optional Id that let us know users are coming from which integration system (will be required in the future)*/
179
+ integrationSystemId?: string;
178
180
  }
179
181
  ```
180
182
 
@@ -215,6 +217,7 @@ const options = useMemo<ContentViewProps>(() => {
215
217
  accent: '#0437F2',
216
218
  },
217
219
  oneTimeToken: '907687a6e81a458190fe4c21f05ee689',
220
+ integrationSystemId: 'int_nI7rPykBRm0C',
218
221
  };
219
222
  }, []);
220
223
 
package/dist/README.md CHANGED
@@ -76,7 +76,8 @@ export type Go1MessageType =
76
76
  | 'search_result_selected'
77
77
  | 'search_filter_toggle'
78
78
  | 'pass_ott'
79
- | 'logout';
79
+ | 'logout',
80
+ | 'sync_content';
80
81
 
81
82
  export interface Go1Message {
82
83
  type: Go1MessageType;
@@ -85,6 +86,7 @@ export interface Go1Message {
85
86
 
86
87
  interface FeatureAttributeCommon {
87
88
  shouldSuppressPreview?: boolean;
89
+ experience?: 'manager' | 'learner';
88
90
  shouldShowGo1FeedbackButton?: boolean;
89
91
  }
90
92
 
@@ -92,7 +94,6 @@ interface FeatureAttributeCommon {
92
94
  * Used to configure the `ai-chat` feature
93
95
  */
94
96
  export interface FeatureAttributesAIChat extends FeatureAttributeCommon {
95
- experience: 'manager' | 'learner';
96
97
  intent?: 'skill_gap' | 'improve_skills' | 'next_role' | 'aspirations';
97
98
  message?: string; // The desired message to start the chat, which will be shown to the user
98
99
  existingSkills?: string[]; // max items 7, any more are discarded
@@ -105,7 +106,6 @@ export interface FeatureAttributesAIChat extends FeatureAttributeCommon {
105
106
  */
106
107
  export interface FeatureAttributesPreview extends FeatureAttributeCommon {
107
108
  id: number;
108
- experience?: 'manager' | 'learner';
109
109
  startWith1Player?: boolean;
110
110
  showFooter?: boolean;
111
111
  }
@@ -175,6 +175,8 @@ export interface InitOptions {
175
175
  themeInformation?: ThemeInformation;
176
176
  /** Optional token that is used to pre-authorize the user without them needing to log in */
177
177
  oneTimeToken?: string;
178
+ /** Optional Id that let us know users are coming from which integration system (will be required in the future)*/
179
+ integrationSystemId?: string;
178
180
  }
179
181
  ```
180
182
 
@@ -215,6 +217,7 @@ const options = useMemo<ContentViewProps>(() => {
215
217
  accent: '#0437F2',
216
218
  },
217
219
  oneTimeToken: '907687a6e81a458190fe4c21f05ee689',
220
+ integrationSystemId: 'int_nI7rPykBRm0C',
218
221
  };
219
222
  }, []);
220
223
 
@@ -11,13 +11,14 @@ export interface AdditionalInfoMessage {
11
11
  export interface ThemeInformation {
12
12
  accent: string;
13
13
  }
14
- 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';
14
+ 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';
15
15
  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
+ experience?: 'manager' | 'learner';
21
22
  shouldShowGo1FeedbackButton?: boolean;
22
23
  }
23
24
  interface FeatureAttributesPreviewCommon extends FeatureAttributeCommon {
@@ -25,7 +26,6 @@ interface FeatureAttributesPreviewCommon extends FeatureAttributeCommon {
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,9 +26,12 @@ 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
- }, [url, feature, portalURL, oneTimeToken, env]);
34
+ }, [url, feature, portalURL, oneTimeToken, integrationSystemId, env]);
32
35
  const eventListenerInstance = (0, react_1.useCallback)((event) => {
33
36
  const { _type, ...rest } = event.data;
34
37
  if (_type === constants_1.GO1_MESSAGE) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go1/go1-embedding-react-sdk",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
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": [