perimeterx-js-core 0.32.1 → 0.33.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.
@@ -156,6 +156,11 @@ var addProductDataToDetails = function (details, productData) {
156
156
  details.cpa = productData.hsc.isTokenHscApproved;
157
157
  }
158
158
  }
159
+ if (productData.bd) {
160
+ if (typeof productData.bd.isSensitiveRequest === 'boolean') {
161
+ details.is_sensitive_route = productData.bd.isSensitiveRequest;
162
+ }
163
+ }
159
164
  };
160
165
  exports.addProductDataToDetails = addProductDataToDetails;
161
166
  var addTlsDataToDetails = function (details, tlsData) {
@@ -182,4 +182,8 @@ exports.RISK_ACTIVITY_ADDITIONAL_FIELDS_TO_HEADER_NAMES = {
182
182
  s2s_call_reason: {
183
183
  header: 'x-px-add-s2s-call-reason',
184
184
  },
185
+ is_sensitive_route: {
186
+ header: 'x-px-add-is-sensitive-route',
187
+ convertToString: function (value) { return "".concat(value); },
188
+ },
185
189
  };
@@ -15,4 +15,4 @@ exports.PUSH_DATA_FEATURE_HEADER_NAME = 'x-px-feature';
15
15
  exports.EMAIL_ADDRESS_REGEX = /^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$/;
16
16
  exports.URL_REGEX = /^(https?:)\/\/(([^@\s:\/]+):?([^@\s\/]*)@)?(([^:\/?#]*)(?:\:([0-9]+))?)(\/?[^?#]*)(\?[^#]*|)(#.*|)$/;
17
17
  exports.REGEX_STRUCTURE = /^\/(.+?)\/([gimsuyvd]*)$/;
18
- exports.CORE_MODULE_VERSION = 'JS Core 0.32.1';
18
+ exports.CORE_MODULE_VERSION = 'JS Core 0.33.0';
@@ -143,6 +143,11 @@ export const addProductDataToDetails = (details, productData) => {
143
143
  details.cpa = productData.hsc.isTokenHscApproved;
144
144
  }
145
145
  }
146
+ if (productData.bd) {
147
+ if (typeof productData.bd.isSensitiveRequest === 'boolean') {
148
+ details.is_sensitive_route = productData.bd.isSensitiveRequest;
149
+ }
150
+ }
146
151
  };
147
152
  export const addTlsDataToDetails = (details, tlsData) => {
148
153
  if (tlsData.tlsCipher) {
@@ -179,4 +179,8 @@ export const RISK_ACTIVITY_ADDITIONAL_FIELDS_TO_HEADER_NAMES = {
179
179
  s2s_call_reason: {
180
180
  header: 'x-px-add-s2s-call-reason',
181
181
  },
182
+ is_sensitive_route: {
183
+ header: 'x-px-add-is-sensitive-route',
184
+ convertToString: (value) => `${value}`,
185
+ },
182
186
  };
@@ -12,4 +12,4 @@ export const PUSH_DATA_FEATURE_HEADER_NAME = 'x-px-feature';
12
12
  export const EMAIL_ADDRESS_REGEX = /^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$/;
13
13
  export const URL_REGEX = /^(https?:)\/\/(([^@\s:\/]+):?([^@\s\/]*)@)?(([^:\/?#]*)(?:\:([0-9]+))?)(\/?[^?#]*)(\?[^#]*|)(#.*|)$/;
14
14
  export const REGEX_STRUCTURE = /^\/(.+?)\/([gimsuyvd]*)$/;
15
- export const CORE_MODULE_VERSION = 'JS Core 0.32.1';
15
+ export const CORE_MODULE_VERSION = 'JS Core 0.33.0';
@@ -46,4 +46,5 @@ export type CommonActivityDetails = {
46
46
  enforcer_start_time: number;
47
47
  raw_url?: string;
48
48
  used_cookie_secret?: string;
49
+ is_sensitive_route?: boolean;
49
50
  } & CustomParameters;
@@ -53,6 +53,7 @@ export declare const createRiskApiActivity: <Req, Res, Supported extends string,
53
53
  enforcer_start_time: number;
54
54
  raw_url?: string;
55
55
  used_cookie_secret?: string;
56
+ is_sensitive_route?: boolean;
56
57
  custom_param1?: any;
57
58
  custom_param2?: any;
58
59
  custom_param3?: any;
@@ -12,4 +12,4 @@ export declare const PUSH_DATA_FEATURE_HEADER_NAME = "x-px-feature";
12
12
  export declare const EMAIL_ADDRESS_REGEX: RegExp;
13
13
  export declare const URL_REGEX: RegExp;
14
14
  export declare const REGEX_STRUCTURE: RegExp;
15
- export declare const CORE_MODULE_VERSION = "JS Core 0.32.1";
15
+ export declare const CORE_MODULE_VERSION = "JS Core 0.33.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perimeterx-js-core",
3
- "version": "0.32.1",
3
+ "version": "0.33.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "typesVersions": {