@constructor-io/constructorio-client-javascript 2.65.0 → 2.65.1
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 +1 -1
- package/lib/modules/quizzes.js +1 -1
- package/lib/types/quizzes.d.ts +7 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Alternatively, a bundled version consisting of a single JavaScript file is publi
|
|
|
21
21
|
|
|
22
22
|
## 2. Retrieve an API key
|
|
23
23
|
|
|
24
|
-
You can find this in your [Constructor.io dashboard](https://constructor.io/dashboard). Contact sales if you'd like to sign up, or support if you believe your company already has an account.
|
|
24
|
+
You can find this in your [Constructor.io dashboard](https://app.constructor.io/dashboard). Contact sales if you'd like to sign up, or support if you believe your company already has an account.
|
|
25
25
|
|
|
26
26
|
## 3. Implement the Client
|
|
27
27
|
|
package/lib/modules/quizzes.js
CHANGED
|
@@ -75,7 +75,7 @@ function createQuizUrl(quizId, parameters, options, path) {
|
|
|
75
75
|
if (answers && answers.length) {
|
|
76
76
|
answersParamString = "&".concat(helpers.stringify({
|
|
77
77
|
a: answers.map(function (ans) {
|
|
78
|
-
return (0, _toConsumableArray2["default"])(ans).join(',');
|
|
78
|
+
return (0, _toConsumableArray2["default"])(ans.map(encodeURIComponent)).join(',');
|
|
79
79
|
})
|
|
80
80
|
}));
|
|
81
81
|
}
|
package/lib/types/quizzes.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ export interface QuizResultData extends Record<string, any> {
|
|
|
115
115
|
variations: Record<string, any>[];
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
export type Question = SelectQuestion | OpenQuestion | CoverQuestion;
|
|
118
|
+
export type Question = SelectQuestion | FilterValueQuestion | OpenQuestion | CoverQuestion;
|
|
119
119
|
|
|
120
120
|
export interface BaseQuestion extends Record<string, any> {
|
|
121
121
|
id: number;
|
|
@@ -125,6 +125,12 @@ export interface BaseQuestion extends Record<string, any> {
|
|
|
125
125
|
images?: Nullable<QuestionImages>;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
export interface FilterValueQuestion extends BaseQuestion {
|
|
129
|
+
type: 'single_filter_value' |'multiple_filter_values';
|
|
130
|
+
filter_name: string;
|
|
131
|
+
options: QuestionOption[];
|
|
132
|
+
}
|
|
133
|
+
|
|
128
134
|
export interface SelectQuestion extends BaseQuestion {
|
|
129
135
|
type: 'single' | 'multiple';
|
|
130
136
|
options: QuestionOption[];
|
package/lib/version.js
CHANGED