@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 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
 
@@ -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
  }
@@ -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
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _default = '2.65.0';
7
+ var _default = '2.65.1';
8
8
  exports["default"] = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-client-javascript",
3
- "version": "2.65.0",
3
+ "version": "2.65.1",
4
4
  "description": "Constructor.io JavaScript client",
5
5
  "main": "lib/constructorio.js",
6
6
  "types": "lib/types/index.d.ts",