@constructor-io/constructorio-client-javascript 2.67.4 → 2.67.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 +3 -2
- package/lib/types/quizzes.d.ts +2 -0
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,10 +37,11 @@ const constructorio = new ConstructorioClient({
|
|
|
37
37
|
|
|
38
38
|
## 4. Retrieve Results
|
|
39
39
|
|
|
40
|
-
After instantiating an instance of the client,
|
|
40
|
+
After instantiating an instance of the client, seven modules will be exposed as properties to help retrieve data or send behavioral events: `search`, `browse`, `autocomplete`, `recommendations`, `quizzes`, `agent`, and `tracker`.
|
|
41
41
|
|
|
42
42
|
#### Dispatched events
|
|
43
|
-
|
|
43
|
+
|
|
44
|
+
Modules may dispatch custom events on the browser `window` with response data when a request has been completed. The event name follows the following structure: `cio.client.[moduleName].[methodName].completed`. Example consuming code can be found below:
|
|
44
45
|
|
|
45
46
|
```javascript
|
|
46
47
|
window.addEventListener('cio.client.search.getSearchResults.completed', (event) => {
|
package/lib/types/quizzes.d.ts
CHANGED
|
@@ -123,6 +123,7 @@ export interface BaseQuestion extends Record<string, any> {
|
|
|
123
123
|
description: string;
|
|
124
124
|
cta_text: Nullable<string>;
|
|
125
125
|
images?: Nullable<QuestionImages>;
|
|
126
|
+
is_skippable: Boolean;
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
export interface FilterValueQuestion extends BaseQuestion {
|
|
@@ -188,6 +189,7 @@ export interface QuizResultsConfig extends Record<string, any> {
|
|
|
188
189
|
}
|
|
189
190
|
|
|
190
191
|
export interface QuizResultsConfigResponse extends Record<string, any> {
|
|
192
|
+
metadata: Nullable<object>,
|
|
191
193
|
results_config: QuizResultsConfig,
|
|
192
194
|
quiz_version_id: string;
|
|
193
195
|
quiz_id: string;
|
package/lib/version.js
CHANGED