@constructor-io/constructorio-client-javascript 2.37.3 → 2.38.0

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.
@@ -189,11 +189,14 @@ export interface Item extends Record<string, any> {
189
189
  labels: Record<string, unknown>;
190
190
  matched_terms: string[];
191
191
  data?: ItemData;
192
+ strategy?: { id: string };
193
+ variations?: { data?: ItemData, value: string }[]
192
194
  }
193
195
 
194
196
  export interface ItemData extends Record<string, any> {
195
197
  url?: string;
196
198
  id?: string;
199
+ variation_id?: string;
197
200
  image_url?: string;
198
201
  group_ids?: string[];
199
202
  groups?: Group[]
@@ -49,7 +49,6 @@ declare class Quizzes {
49
49
  /* quizzes results returned from server */
50
50
  export interface NextQuestionResponse extends Record<string, any> {
51
51
  next_question: Question;
52
- is_last_question?: boolean;
53
52
  quiz_version_id?: string;
54
53
  quiz_id?: string;
55
54
  quiz_session_id?: string;
@@ -9,7 +9,7 @@ var purchaseEventStorageKey = '_constructorio_purchase_order_ids';
9
9
  var PII_REGEX = {
10
10
  email: /^[\w\-+\\.]+@([\w-]+\.)+[\w-]{2,4}$/,
11
11
  phoneNumber: /^(?:\+\d{11,12}|\+\d{1,3}\s\d{3}\s\d{3}\s\d{3,4}|\(\d{3}\)\d{7}|\(\d{3}\)\s\d{3}\s\d{4}|\(\d{3}\)\d{3}-\d{4}|\(\d{3}\)\s\d{3}-\d{4})$/,
12
- creditCard: /^(?:4[0-9]{12}(?:[0-9]{3})?|(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|6(?:011|5[0-9]{2})[0-9]{12}|(?:2131|1800|35\d{3})\d{11})$/ // Visa, Mastercard, Amex, Discover, JCB and Diners Club, regex source: https://www.regular-expressions.info/creditcard.html
12
+ creditCard: /^(?:4[0-9]{15}|(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|6(?:011|5[0-9]{2})[0-9]{12}|(?:2131|1800|35\d{3})\d{11})$/ // Visa, Mastercard, Amex, Discover, JCB and Diners Club, regex source: https://www.regular-expressions.info/creditcard.html
13
13
  // Add more PII REGEX
14
14
  };
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-client-javascript",
3
- "version": "2.37.3",
3
+ "version": "2.38.0",
4
4
  "description": "Constructor.io JavaScript client",
5
5
  "main": "lib/constructorio.js",
6
6
  "types": "lib/types/index.d.ts",