perimeterx-js-core 0.21.1 → 0.21.3

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.
Files changed (28) hide show
  1. package/lib/cjs/products/bot_defender/BotDefender.js +1 -1
  2. package/lib/cjs/products/bot_defender/block/DefaultBotDefenderBlocker.js +11 -2
  3. package/lib/cjs/products/bot_defender/block/captcha/CaptchaBlocker.js +8 -5
  4. package/lib/cjs/products/bot_defender/block/captcha/HtmlCaptchaBlocker.js +5 -4
  5. package/lib/cjs/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +3 -3
  6. package/lib/cjs/products/bot_defender/block/captcha/MobileCaptchaBlocker.js +2 -2
  7. package/lib/cjs/utils/constants.js +1 -1
  8. package/lib/esm/products/bot_defender/BotDefender.js +1 -1
  9. package/lib/esm/products/bot_defender/block/DefaultBotDefenderBlocker.js +12 -3
  10. package/lib/esm/products/bot_defender/block/captcha/CaptchaBlocker.js +8 -5
  11. package/lib/esm/products/bot_defender/block/captcha/HtmlCaptchaBlocker.js +6 -4
  12. package/lib/esm/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +3 -3
  13. package/lib/esm/products/bot_defender/block/captcha/MobileCaptchaBlocker.js +2 -2
  14. package/lib/esm/utils/constants.js +1 -1
  15. package/lib/types/activities/utils.d.ts +0 -31
  16. package/lib/types/blocker/utils.d.ts +0 -3
  17. package/lib/types/monitored_request/MonitoredRequestUtils.d.ts +0 -9
  18. package/lib/types/products/bot_defender/block/DefaultBotDefenderBlocker.d.ts +6 -1
  19. package/lib/types/products/bot_defender/block/captcha/CaptchaBlocker.d.ts +21 -9
  20. package/lib/types/products/bot_defender/block/captcha/HtmlCaptchaBlocker.d.ts +7 -1
  21. package/lib/types/products/bot_defender/block/captcha/JsonCaptchaBlocker.d.ts +5 -1
  22. package/lib/types/products/bot_defender/block/captcha/MobileCaptchaBlocker.d.ts +6 -1
  23. package/lib/types/products/credential_intelligence/endpoint/CredentialEndpointConfiguration.d.ts +2 -2
  24. package/lib/types/pxhd/PXHDUtils.d.ts +0 -6
  25. package/lib/types/sensitive_request/SensitiveRequestUtils.d.ts +0 -6
  26. package/lib/types/utils/constants.d.ts +1 -1
  27. package/lib/types/utils/url/IUrlSearchParams.d.ts +0 -1
  28. package/package.json +3 -3
@@ -67,7 +67,7 @@ var BotDefender = /** @class */ (function () {
67
67
  this.firstParty =
68
68
  (_a = options.firstParty) !== null && _a !== void 0 ? _a : new first_party_1.DefaultBotDefenderFirstParty(config, { urlUtils: options.urlUtils });
69
69
  this.filter = (_b = options.filter) !== null && _b !== void 0 ? _b : new filter_1.DefaultBotDefenderFilter(config, options.ipRangeChecker);
70
- this.blocker = (_c = options.blocker) !== null && _c !== void 0 ? _c : new block_1.DefaultBotDefenderBlocker(config, options.base64Utils);
70
+ this.blocker = (_c = options.blocker) !== null && _c !== void 0 ? _c : new block_1.DefaultBotDefenderBlocker(config, { base64Utils: options.base64Utils });
71
71
  }
72
72
  BotDefender.prototype.handleFirstPartyRequest = function (context) {
73
73
  return __awaiter(this, void 0, void 0, function () {
@@ -8,9 +8,18 @@ var utils_1 = require("../../utils");
8
8
  var captcha_1 = require("./captcha");
9
9
  var templates_1 = require("./templates");
10
10
  var DefaultBotDefenderBlocker = /** @class */ (function () {
11
- function DefaultBotDefenderBlocker(config, base64Utils) {
11
+ function DefaultBotDefenderBlocker(config, options) {
12
12
  this.config = config;
13
- this.captchaBlocker = new captcha_1.CaptchaBlocker(config, base64Utils);
13
+ if ('captchaBlocker' in options) {
14
+ this.captchaBlocker = options.captchaBlocker;
15
+ }
16
+ else {
17
+ this.captchaBlocker = new captcha_1.CaptchaBlocker({
18
+ config: config,
19
+ base64Utils: options.base64Utils,
20
+ captchaTemplate: templates_1.CAPTCHA_TEMPLATE,
21
+ });
22
+ }
14
23
  }
15
24
  DefaultBotDefenderBlocker.prototype.shouldBlock = function (_a) {
16
25
  var action = _a.action, reasons = _a.reasons, productData = _a.productData;
@@ -5,11 +5,14 @@ var JsonCaptchaBlocker_1 = require("./JsonCaptchaBlocker");
5
5
  var MobileCaptchaBlocker_1 = require("./MobileCaptchaBlocker");
6
6
  var HtmlCaptchaBlocker_1 = require("./HtmlCaptchaBlocker");
7
7
  var CaptchaBlocker = /** @class */ (function () {
8
- function CaptchaBlocker(config, base64Utils) {
9
- this.config = config;
10
- this.jsonCaptchaBlocker = new JsonCaptchaBlocker_1.JsonCaptchaBlocker(config, base64Utils);
11
- this.mobileCaptchaBlocker = new MobileCaptchaBlocker_1.MobileCaptchaBlocker(config, base64Utils);
12
- this.htmlCaptchaBlocker = new HtmlCaptchaBlocker_1.HtmlCaptchaBlocker(config, base64Utils);
8
+ function CaptchaBlocker(options) {
9
+ this.config = options.config;
10
+ this.jsonCaptchaBlocker =
11
+ 'jsonCaptchaBlocker' in options ? options.jsonCaptchaBlocker : new JsonCaptchaBlocker_1.JsonCaptchaBlocker(options);
12
+ this.mobileCaptchaBlocker =
13
+ 'mobileCaptchaBlocker' in options ? options.mobileCaptchaBlocker : new MobileCaptchaBlocker_1.MobileCaptchaBlocker(options);
14
+ this.htmlCaptchaBlocker =
15
+ 'htmlCaptchaBlocker' in options ? options.htmlCaptchaBlocker : new HtmlCaptchaBlocker_1.HtmlCaptchaBlocker(options);
13
16
  }
14
17
  CaptchaBlocker.prototype.createBlockResponse = function (context) {
15
18
  if (this.mobileCaptchaBlocker.shouldBlock(context)) {
@@ -21,14 +21,15 @@ var blocker_1 = require("../../../../blocker");
21
21
  var templates_1 = require("../templates");
22
22
  var HtmlCaptchaBlocker = /** @class */ (function (_super) {
23
23
  __extends(HtmlCaptchaBlocker, _super);
24
- function HtmlCaptchaBlocker(config, base64Utils) {
24
+ function HtmlCaptchaBlocker(options) {
25
25
  var _this = _super.call(this, http_1.ContentType.TEXT_HTML) || this;
26
- _this.config = config;
27
- _this.base64Utils = base64Utils;
26
+ _this.config = options.config;
27
+ _this.base64Utils = options.base64Utils;
28
+ _this.captchaTemplate = options.captchaTemplate || templates_1.CAPTCHA_TEMPLATE;
28
29
  return _this;
29
30
  }
30
31
  HtmlCaptchaBlocker.prototype.createBlockBody = function (context) {
31
- return (0, blocker_1.renderHtml)(templates_1.CAPTCHA_TEMPLATE, (0, blocker_1.createBlockData)(this.config, context, this.base64Utils));
32
+ return (0, blocker_1.renderHtml)(this.captchaTemplate, (0, blocker_1.createBlockData)(this.config, context, this.base64Utils));
32
33
  };
33
34
  return HtmlCaptchaBlocker;
34
35
  }(blocker_1.BlockerBase));
@@ -19,10 +19,10 @@ exports.JsonCaptchaBlocker = void 0;
19
19
  var blocker_1 = require("../../../../blocker");
20
20
  var JsonCaptchaBlocker = /** @class */ (function (_super) {
21
21
  __extends(JsonCaptchaBlocker, _super);
22
- function JsonCaptchaBlocker(config, base64Utils) {
22
+ function JsonCaptchaBlocker(options) {
23
23
  var _this = _super.call(this) || this;
24
- _this.config = config;
25
- _this.base64Utils = base64Utils;
24
+ _this.config = options.config;
25
+ _this.base64Utils = options.base64Utils;
26
26
  return _this;
27
27
  }
28
28
  JsonCaptchaBlocker.prototype.shouldBlock = function (context) {
@@ -20,8 +20,8 @@ var blocker_1 = require("../../../../blocker");
20
20
  var templates_1 = require("../templates");
21
21
  var MobileCaptchaBlocker = /** @class */ (function (_super) {
22
22
  __extends(MobileCaptchaBlocker, _super);
23
- function MobileCaptchaBlocker(config, base64Utils) {
24
- return _super.call(this, config, base64Utils, templates_1.CAPTCHA_TEMPLATE) || this;
23
+ function MobileCaptchaBlocker(options) {
24
+ return _super.call(this, options.config, options.base64Utils, options.captchaTemplate || templates_1.CAPTCHA_TEMPLATE) || this;
25
25
  }
26
26
  return MobileCaptchaBlocker;
27
27
  }(blocker_1.MobileBlocker));
@@ -14,4 +14,4 @@ exports.PUSH_DATA_FEATURE_HEADER_NAME = 'x-px-feature';
14
14
  exports.EMAIL_ADDRESS_REGEX = /^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$/;
15
15
  exports.URL_REGEX = /^(https?\:)\/\/(([^@\s:]+):?([^@\s]*)@)?(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/;
16
16
  exports.REGEX_STRUCTURE = /^\/(.+?)\/([gimsuyvd]*)$/;
17
- exports.CORE_MODULE_VERSION = 'JS Core 0.21.1';
17
+ exports.CORE_MODULE_VERSION = 'JS Core 0.21.3';
@@ -20,7 +20,7 @@ export class BotDefender {
20
20
  this.firstParty =
21
21
  options.firstParty ?? new DefaultBotDefenderFirstParty(config, { urlUtils: options.urlUtils });
22
22
  this.filter = options.filter ?? new DefaultBotDefenderFilter(config, options.ipRangeChecker);
23
- this.blocker = options.blocker ?? new DefaultBotDefenderBlocker(config, options.base64Utils);
23
+ this.blocker = options.blocker ?? new DefaultBotDefenderBlocker(config, { base64Utils: options.base64Utils });
24
24
  }
25
25
  async handleFirstPartyRequest(context) {
26
26
  return this.firstParty.handleFirstPartyRequest(context);
@@ -3,13 +3,22 @@ import { BlockAction } from '../../../blocker';
3
3
  import { ContentType, CONTENT_TYPE_HEADER_NAME, MinimalResponseImpl } from '../../../http';
4
4
  import { ProductName } from '../../utils';
5
5
  import { CaptchaBlocker } from './captcha';
6
- import { RATE_LIMIT_TEMPLATE } from './templates';
6
+ import { CAPTCHA_TEMPLATE, RATE_LIMIT_TEMPLATE } from './templates';
7
7
  export class DefaultBotDefenderBlocker {
8
8
  config;
9
9
  captchaBlocker;
10
- constructor(config, base64Utils) {
10
+ constructor(config, options) {
11
11
  this.config = config;
12
- this.captchaBlocker = new CaptchaBlocker(config, base64Utils);
12
+ if ('captchaBlocker' in options) {
13
+ this.captchaBlocker = options.captchaBlocker;
14
+ }
15
+ else {
16
+ this.captchaBlocker = new CaptchaBlocker({
17
+ config,
18
+ base64Utils: options.base64Utils,
19
+ captchaTemplate: CAPTCHA_TEMPLATE,
20
+ });
21
+ }
13
22
  }
14
23
  shouldBlock({ action, reasons, productData }) {
15
24
  return action === Action.BLOCK && !!reasons?.[ProductName.BOT_DEFENDER];
@@ -6,11 +6,14 @@ export class CaptchaBlocker {
6
6
  jsonCaptchaBlocker;
7
7
  mobileCaptchaBlocker;
8
8
  htmlCaptchaBlocker;
9
- constructor(config, base64Utils) {
10
- this.config = config;
11
- this.jsonCaptchaBlocker = new JsonCaptchaBlocker(config, base64Utils);
12
- this.mobileCaptchaBlocker = new MobileCaptchaBlocker(config, base64Utils);
13
- this.htmlCaptchaBlocker = new HtmlCaptchaBlocker(config, base64Utils);
9
+ constructor(options) {
10
+ this.config = options.config;
11
+ this.jsonCaptchaBlocker =
12
+ 'jsonCaptchaBlocker' in options ? options.jsonCaptchaBlocker : new JsonCaptchaBlocker(options);
13
+ this.mobileCaptchaBlocker =
14
+ 'mobileCaptchaBlocker' in options ? options.mobileCaptchaBlocker : new MobileCaptchaBlocker(options);
15
+ this.htmlCaptchaBlocker =
16
+ 'htmlCaptchaBlocker' in options ? options.htmlCaptchaBlocker : new HtmlCaptchaBlocker(options);
14
17
  }
15
18
  createBlockResponse(context) {
16
19
  if (this.mobileCaptchaBlocker.shouldBlock(context)) {
@@ -4,12 +4,14 @@ import { CAPTCHA_TEMPLATE } from '../templates';
4
4
  export class HtmlCaptchaBlocker extends BlockerBase {
5
5
  config;
6
6
  base64Utils;
7
- constructor(config, base64Utils) {
7
+ captchaTemplate;
8
+ constructor(options) {
8
9
  super(ContentType.TEXT_HTML);
9
- this.config = config;
10
- this.base64Utils = base64Utils;
10
+ this.config = options.config;
11
+ this.base64Utils = options.base64Utils;
12
+ this.captchaTemplate = options.captchaTemplate || CAPTCHA_TEMPLATE;
11
13
  }
12
14
  createBlockBody(context) {
13
- return renderHtml(CAPTCHA_TEMPLATE, createBlockData(this.config, context, this.base64Utils));
15
+ return renderHtml(this.captchaTemplate, createBlockData(this.config, context, this.base64Utils));
14
16
  }
15
17
  }
@@ -2,10 +2,10 @@ import { BlockAction, createBlockData, JsonBlockerBase } from '../../../../block
2
2
  export class JsonCaptchaBlocker extends JsonBlockerBase {
3
3
  config;
4
4
  base64Utils;
5
- constructor(config, base64Utils) {
5
+ constructor(options) {
6
6
  super();
7
- this.config = config;
8
- this.base64Utils = base64Utils;
7
+ this.config = options.config;
8
+ this.base64Utils = options.base64Utils;
9
9
  }
10
10
  shouldBlock(context) {
11
11
  if (!this.config.advancedBlockingResponseEnabled) {
@@ -1,7 +1,7 @@
1
1
  import { MobileBlocker } from '../../../../blocker';
2
2
  import { CAPTCHA_TEMPLATE } from '../templates';
3
3
  export class MobileCaptchaBlocker extends MobileBlocker {
4
- constructor(config, base64Utils) {
5
- super(config, base64Utils, CAPTCHA_TEMPLATE);
4
+ constructor(options) {
5
+ super(options.config, options.base64Utils, options.captchaTemplate || CAPTCHA_TEMPLATE);
6
6
  }
7
7
  }
@@ -11,4 +11,4 @@ export const PUSH_DATA_FEATURE_HEADER_NAME = 'x-px-feature';
11
11
  export const EMAIL_ADDRESS_REGEX = /^[a-zA-Z0-9_+&*-]+(?:\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}$/;
12
12
  export const URL_REGEX = /^(https?\:)\/\/(([^@\s:]+):?([^@\s]*)@)?(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/;
13
13
  export const REGEX_STRUCTURE = /^\/(.+?)\/([gimsuyvd]*)$/;
14
- export const CORE_MODULE_VERSION = 'JS Core 0.21.1';
14
+ export const CORE_MODULE_VERSION = 'JS Core 0.21.3';
@@ -32,7 +32,6 @@ export declare const createAsyncActivity: <Req, Res>(activityType: ActivityType,
32
32
  readonly append: (name: string, value: string) => void;
33
33
  readonly delete: (name: string) => void;
34
34
  readonly has: (name: string) => boolean;
35
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
36
35
  };
37
36
  readonly toJSON: () => string;
38
37
  };
@@ -105,7 +104,6 @@ export declare const createAsyncActivity: <Req, Res>(activityType: ActivityType,
105
104
  readonly append: (name: string, value: string) => void;
106
105
  readonly delete: (name: string) => void;
107
106
  readonly has: (name: string) => boolean;
108
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
109
107
  };
110
108
  readonly toJSON: () => string;
111
109
  };
@@ -333,7 +331,6 @@ export declare const createAsyncActivity: <Req, Res>(activityType: ActivityType,
333
331
  readonly append: (name: string, value: string) => void;
334
332
  readonly delete: (name: string) => void;
335
333
  readonly has: (name: string) => boolean;
336
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
337
334
  };
338
335
  readonly toJSON: () => string;
339
336
  };
@@ -704,7 +701,6 @@ export declare const createActivityDetails: <Req, Res>(activityType: ActivityTyp
704
701
  readonly append: (name: string, value: string) => void;
705
702
  readonly delete: (name: string) => void;
706
703
  readonly has: (name: string) => boolean;
707
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
708
704
  };
709
705
  readonly toJSON: () => string;
710
706
  };
@@ -777,7 +773,6 @@ export declare const createActivityDetails: <Req, Res>(activityType: ActivityTyp
777
773
  readonly append: (name: string, value: string) => void;
778
774
  readonly delete: (name: string) => void;
779
775
  readonly has: (name: string) => boolean;
780
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
781
776
  };
782
777
  readonly toJSON: () => string;
783
778
  };
@@ -1005,7 +1000,6 @@ export declare const createActivityDetails: <Req, Res>(activityType: ActivityTyp
1005
1000
  readonly append: (name: string, value: string) => void;
1006
1001
  readonly delete: (name: string) => void;
1007
1002
  readonly has: (name: string) => boolean;
1008
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1009
1003
  };
1010
1004
  readonly toJSON: () => string;
1011
1005
  };
@@ -1376,7 +1370,6 @@ export declare const createAsyncActivityCommonDetails: <Req, Res>(context: {
1376
1370
  readonly append: (name: string, value: string) => void;
1377
1371
  readonly delete: (name: string) => void;
1378
1372
  readonly has: (name: string) => boolean;
1379
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1380
1373
  };
1381
1374
  readonly toJSON: () => string;
1382
1375
  };
@@ -1449,7 +1442,6 @@ export declare const createAsyncActivityCommonDetails: <Req, Res>(context: {
1449
1442
  readonly append: (name: string, value: string) => void;
1450
1443
  readonly delete: (name: string) => void;
1451
1444
  readonly has: (name: string) => boolean;
1452
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1453
1445
  };
1454
1446
  readonly toJSON: () => string;
1455
1447
  };
@@ -1677,7 +1669,6 @@ export declare const createAsyncActivityCommonDetails: <Req, Res>(context: {
1677
1669
  readonly append: (name: string, value: string) => void;
1678
1670
  readonly delete: (name: string) => void;
1679
1671
  readonly has: (name: string) => boolean;
1680
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1681
1672
  };
1682
1673
  readonly toJSON: () => string;
1683
1674
  };
@@ -2048,7 +2039,6 @@ export declare const createCommonActivityDetails: <Req, Res>(config: IConfigurat
2048
2039
  readonly append: (name: string, value: string) => void;
2049
2040
  readonly delete: (name: string) => void;
2050
2041
  readonly has: (name: string) => boolean;
2051
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
2052
2042
  };
2053
2043
  readonly toJSON: () => string;
2054
2044
  };
@@ -2121,7 +2111,6 @@ export declare const createCommonActivityDetails: <Req, Res>(config: IConfigurat
2121
2111
  readonly append: (name: string, value: string) => void;
2122
2112
  readonly delete: (name: string) => void;
2123
2113
  readonly has: (name: string) => boolean;
2124
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
2125
2114
  };
2126
2115
  readonly toJSON: () => string;
2127
2116
  };
@@ -2349,7 +2338,6 @@ export declare const createCommonActivityDetails: <Req, Res>(config: IConfigurat
2349
2338
  readonly append: (name: string, value: string) => void;
2350
2339
  readonly delete: (name: string) => void;
2351
2340
  readonly has: (name: string) => boolean;
2352
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
2353
2341
  };
2354
2342
  readonly toJSON: () => string;
2355
2343
  };
@@ -2720,7 +2708,6 @@ export declare const addRootContextDataToDetails: <Req, Res>(details: CommonActi
2720
2708
  readonly append: (name: string, value: string) => void;
2721
2709
  readonly delete: (name: string) => void;
2722
2710
  readonly has: (name: string) => boolean;
2723
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
2724
2711
  };
2725
2712
  readonly toJSON: () => string;
2726
2713
  };
@@ -2793,7 +2780,6 @@ export declare const addRootContextDataToDetails: <Req, Res>(details: CommonActi
2793
2780
  readonly append: (name: string, value: string) => void;
2794
2781
  readonly delete: (name: string) => void;
2795
2782
  readonly has: (name: string) => boolean;
2796
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
2797
2783
  };
2798
2784
  readonly toJSON: () => string;
2799
2785
  };
@@ -3021,7 +3007,6 @@ export declare const addRootContextDataToDetails: <Req, Res>(details: CommonActi
3021
3007
  readonly append: (name: string, value: string) => void;
3022
3008
  readonly delete: (name: string) => void;
3023
3009
  readonly has: (name: string) => boolean;
3024
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
3025
3010
  };
3026
3011
  readonly toJSON: () => string;
3027
3012
  };
@@ -3386,7 +3371,6 @@ export declare const addRequestDataToDetails: <Req>(details: CommonActivityDetai
3386
3371
  readonly append: (name: string, value: string) => void;
3387
3372
  readonly delete: (name: string) => void;
3388
3373
  readonly has: (name: string) => boolean;
3389
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
3390
3374
  };
3391
3375
  readonly toJSON: () => string;
3392
3376
  };
@@ -3450,7 +3434,6 @@ export declare const addRiskApiDataToAsyncActivityCommonDetails: <Req, Res>(deta
3450
3434
  readonly append: (name: string, value: string) => void;
3451
3435
  readonly delete: (name: string) => void;
3452
3436
  readonly has: (name: string) => boolean;
3453
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
3454
3437
  };
3455
3438
  readonly toJSON: () => string;
3456
3439
  };
@@ -3523,7 +3506,6 @@ export declare const addRiskApiDataToAsyncActivityCommonDetails: <Req, Res>(deta
3523
3506
  readonly append: (name: string, value: string) => void;
3524
3507
  readonly delete: (name: string) => void;
3525
3508
  readonly has: (name: string) => boolean;
3526
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
3527
3509
  };
3528
3510
  readonly toJSON: () => string;
3529
3511
  };
@@ -3751,7 +3733,6 @@ export declare const addRiskApiDataToAsyncActivityCommonDetails: <Req, Res>(deta
3751
3733
  readonly append: (name: string, value: string) => void;
3752
3734
  readonly delete: (name: string) => void;
3753
3735
  readonly has: (name: string) => boolean;
3754
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
3755
3736
  };
3756
3737
  readonly toJSON: () => string;
3757
3738
  };
@@ -4122,7 +4103,6 @@ export declare const addResponseDataToAsyncActivityCommonDetails: <Req, Res>(det
4122
4103
  readonly append: (name: string, value: string) => void;
4123
4104
  readonly delete: (name: string) => void;
4124
4105
  readonly has: (name: string) => boolean;
4125
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
4126
4106
  };
4127
4107
  readonly toJSON: () => string;
4128
4108
  };
@@ -4195,7 +4175,6 @@ export declare const addResponseDataToAsyncActivityCommonDetails: <Req, Res>(det
4195
4175
  readonly append: (name: string, value: string) => void;
4196
4176
  readonly delete: (name: string) => void;
4197
4177
  readonly has: (name: string) => boolean;
4198
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
4199
4178
  };
4200
4179
  readonly toJSON: () => string;
4201
4180
  };
@@ -4423,7 +4402,6 @@ export declare const addResponseDataToAsyncActivityCommonDetails: <Req, Res>(det
4423
4402
  readonly append: (name: string, value: string) => void;
4424
4403
  readonly delete: (name: string) => void;
4425
4404
  readonly has: (name: string) => boolean;
4426
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
4427
4405
  };
4428
4406
  readonly toJSON: () => string;
4429
4407
  };
@@ -4794,7 +4772,6 @@ export declare const createPageRequestedActivityDetails: <Req, Res>(context: {
4794
4772
  readonly append: (name: string, value: string) => void;
4795
4773
  readonly delete: (name: string) => void;
4796
4774
  readonly has: (name: string) => boolean;
4797
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
4798
4775
  };
4799
4776
  readonly toJSON: () => string;
4800
4777
  };
@@ -4867,7 +4844,6 @@ export declare const createPageRequestedActivityDetails: <Req, Res>(context: {
4867
4844
  readonly append: (name: string, value: string) => void;
4868
4845
  readonly delete: (name: string) => void;
4869
4846
  readonly has: (name: string) => boolean;
4870
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
4871
4847
  };
4872
4848
  readonly toJSON: () => string;
4873
4849
  };
@@ -5095,7 +5071,6 @@ export declare const createPageRequestedActivityDetails: <Req, Res>(context: {
5095
5071
  readonly append: (name: string, value: string) => void;
5096
5072
  readonly delete: (name: string) => void;
5097
5073
  readonly has: (name: string) => boolean;
5098
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
5099
5074
  };
5100
5075
  readonly toJSON: () => string;
5101
5076
  };
@@ -5466,7 +5441,6 @@ export declare const createBlockActivityDetails: <Req, Res>(context: {
5466
5441
  readonly append: (name: string, value: string) => void;
5467
5442
  readonly delete: (name: string) => void;
5468
5443
  readonly has: (name: string) => boolean;
5469
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
5470
5444
  };
5471
5445
  readonly toJSON: () => string;
5472
5446
  };
@@ -5539,7 +5513,6 @@ export declare const createBlockActivityDetails: <Req, Res>(context: {
5539
5513
  readonly append: (name: string, value: string) => void;
5540
5514
  readonly delete: (name: string) => void;
5541
5515
  readonly has: (name: string) => boolean;
5542
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
5543
5516
  };
5544
5517
  readonly toJSON: () => string;
5545
5518
  };
@@ -5767,7 +5740,6 @@ export declare const createBlockActivityDetails: <Req, Res>(context: {
5767
5740
  readonly append: (name: string, value: string) => void;
5768
5741
  readonly delete: (name: string) => void;
5769
5742
  readonly has: (name: string) => boolean;
5770
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
5771
5743
  };
5772
5744
  readonly toJSON: () => string;
5773
5745
  };
@@ -6138,7 +6110,6 @@ export declare const createAdditionalS2SActivityDetails: <Req, Res>({ ciSendRawU
6138
6110
  readonly append: (name: string, value: string) => void;
6139
6111
  readonly delete: (name: string) => void;
6140
6112
  readonly has: (name: string) => boolean;
6141
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
6142
6113
  };
6143
6114
  readonly toJSON: () => string;
6144
6115
  };
@@ -6211,7 +6182,6 @@ export declare const createAdditionalS2SActivityDetails: <Req, Res>({ ciSendRawU
6211
6182
  readonly append: (name: string, value: string) => void;
6212
6183
  readonly delete: (name: string) => void;
6213
6184
  readonly has: (name: string) => boolean;
6214
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
6215
6185
  };
6216
6186
  readonly toJSON: () => string;
6217
6187
  };
@@ -6439,7 +6409,6 @@ export declare const createAdditionalS2SActivityDetails: <Req, Res>({ ciSendRawU
6439
6409
  readonly append: (name: string, value: string) => void;
6440
6410
  readonly delete: (name: string) => void;
6441
6411
  readonly has: (name: string) => boolean;
6442
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
6443
6412
  };
6444
6413
  readonly toJSON: () => string;
6445
6414
  };
@@ -28,7 +28,6 @@ export declare const createBlockData: <Req, Res>(config: IConfiguration<Req, Res
28
28
  readonly append: (name: string, value: string) => void;
29
29
  readonly delete: (name: string) => void;
30
30
  readonly has: (name: string) => boolean;
31
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
32
31
  };
33
32
  readonly toJSON: () => string;
34
33
  };
@@ -101,7 +100,6 @@ export declare const createBlockData: <Req, Res>(config: IConfiguration<Req, Res
101
100
  readonly append: (name: string, value: string) => void;
102
101
  readonly delete: (name: string) => void;
103
102
  readonly has: (name: string) => boolean;
104
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
105
103
  };
106
104
  readonly toJSON: () => string;
107
105
  };
@@ -329,7 +327,6 @@ export declare const createBlockData: <Req, Res>(config: IConfiguration<Req, Res
329
327
  readonly append: (name: string, value: string) => void;
330
328
  readonly delete: (name: string) => void;
331
329
  readonly has: (name: string) => boolean;
332
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
333
330
  };
334
331
  readonly toJSON: () => string;
335
332
  };
@@ -28,7 +28,6 @@ export declare namespace MonitoredRequestUtils {
28
28
  readonly append: (name: string, value: string) => void;
29
29
  readonly delete: (name: string) => void;
30
30
  readonly has: (name: string) => boolean;
31
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
32
31
  };
33
32
  readonly toJSON: () => string;
34
33
  };
@@ -101,7 +100,6 @@ export declare namespace MonitoredRequestUtils {
101
100
  readonly append: (name: string, value: string) => void;
102
101
  readonly delete: (name: string) => void;
103
102
  readonly has: (name: string) => boolean;
104
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
105
103
  };
106
104
  readonly toJSON: () => string;
107
105
  };
@@ -329,7 +327,6 @@ export declare namespace MonitoredRequestUtils {
329
327
  readonly append: (name: string, value: string) => void;
330
328
  readonly delete: (name: string) => void;
331
329
  readonly has: (name: string) => boolean;
332
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
333
330
  };
334
331
  readonly toJSON: () => string;
335
332
  };
@@ -702,7 +699,6 @@ export declare namespace MonitoredRequestUtils {
702
699
  readonly append: (name: string, value: string) => void;
703
700
  readonly delete: (name: string) => void;
704
701
  readonly has: (name: string) => boolean;
705
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
706
702
  };
707
703
  readonly toJSON: () => string;
708
704
  };
@@ -775,7 +771,6 @@ export declare namespace MonitoredRequestUtils {
775
771
  readonly append: (name: string, value: string) => void;
776
772
  readonly delete: (name: string) => void;
777
773
  readonly has: (name: string) => boolean;
778
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
779
774
  };
780
775
  readonly toJSON: () => string;
781
776
  };
@@ -1003,7 +998,6 @@ export declare namespace MonitoredRequestUtils {
1003
998
  readonly append: (name: string, value: string) => void;
1004
999
  readonly delete: (name: string) => void;
1005
1000
  readonly has: (name: string) => boolean;
1006
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1007
1001
  };
1008
1002
  readonly toJSON: () => string;
1009
1003
  };
@@ -1374,7 +1368,6 @@ export declare namespace MonitoredRequestUtils {
1374
1368
  readonly append: (name: string, value: string) => void;
1375
1369
  readonly delete: (name: string) => void;
1376
1370
  readonly has: (name: string) => boolean;
1377
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1378
1371
  };
1379
1372
  readonly toJSON: () => string;
1380
1373
  };
@@ -1447,7 +1440,6 @@ export declare namespace MonitoredRequestUtils {
1447
1440
  readonly append: (name: string, value: string) => void;
1448
1441
  readonly delete: (name: string) => void;
1449
1442
  readonly has: (name: string) => boolean;
1450
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1451
1443
  };
1452
1444
  readonly toJSON: () => string;
1453
1445
  };
@@ -1675,7 +1667,6 @@ export declare namespace MonitoredRequestUtils {
1675
1667
  readonly append: (name: string, value: string) => void;
1676
1668
  readonly delete: (name: string) => void;
1677
1669
  readonly has: (name: string) => boolean;
1678
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1679
1670
  };
1680
1671
  readonly toJSON: () => string;
1681
1672
  };
@@ -3,10 +3,15 @@ import { IConfiguration } from '../../../config';
3
3
  import { IBase64Utils } from '../../../utils';
4
4
  import { IBlocker, IConditionalBlocker } from '../../../blocker';
5
5
  import { IMinimalResponse } from '../../../http';
6
+ export type DefaultBotDefenderBlockerConstructorOptions<Req, Res> = {
7
+ base64Utils: IBase64Utils;
8
+ } | {
9
+ captchaBlocker: IBlocker<Req, Res>;
10
+ };
6
11
  export declare class DefaultBotDefenderBlocker<Req, Res> implements IConditionalBlocker<Req, Res> {
7
12
  protected readonly config: IConfiguration<Req, Res>;
8
13
  protected readonly captchaBlocker: IBlocker<Req, Res>;
9
- constructor(config: IConfiguration<Req, Res>, base64Utils: IBase64Utils);
14
+ constructor(config: IConfiguration<Req, Res>, options: DefaultBotDefenderBlockerConstructorOptions<Req, Res>);
10
15
  shouldBlock({ action, reasons, productData }: ReadonlyContext<Req, Res>): boolean;
11
16
  createBlockResponse(context: ReadonlyContext<Req, Res>): IMinimalResponse;
12
17
  protected createRateLimitResponse(): IMinimalResponse;
@@ -1,16 +1,28 @@
1
1
  import { IConfiguration } from '../../../../config';
2
2
  import { ReadonlyContext } from '../../../../context';
3
- import { IBase64Utils } from '../../../../utils';
4
- import { IBlocker } from '../../../../blocker';
3
+ import { IBlocker, IConditionalBlocker } from '../../../../blocker';
5
4
  import { IMinimalResponse } from '../../../../http';
6
- import { JsonCaptchaBlocker } from './JsonCaptchaBlocker';
7
- import { MobileCaptchaBlocker } from './MobileCaptchaBlocker';
8
- import { HtmlCaptchaBlocker } from './HtmlCaptchaBlocker';
5
+ import { JsonCaptchaBlockerConstructorOptions } from './JsonCaptchaBlocker';
6
+ import { MobileCaptchaBlockerConstructorOptions } from './MobileCaptchaBlocker';
7
+ import { HtmlCaptchaBlockerConstructorOptions } from './HtmlCaptchaBlocker';
8
+ type JsonBlockerOptions<Req, Res> = {
9
+ jsonCaptchaBlocker: IConditionalBlocker<Req, Res>;
10
+ } | JsonCaptchaBlockerConstructorOptions<Req, Res>;
11
+ type MobileCaptchaBlockerOptions<Req, Res> = {
12
+ mobileCaptchaBlocker: IConditionalBlocker<Req, Res>;
13
+ } | MobileCaptchaBlockerConstructorOptions<Req, Res>;
14
+ type HtmlCaptchaBlockerOptions<Req, Res> = {
15
+ htmlCaptchaBlocker: IBlocker<Req, Res>;
16
+ } | HtmlCaptchaBlockerConstructorOptions<Req, Res>;
17
+ export type CaptchaBlockerConstructorOptions<Req, Res> = {
18
+ config: IConfiguration<Req, Res>;
19
+ } & JsonBlockerOptions<Req, Res> & MobileCaptchaBlockerOptions<Req, Res> & HtmlCaptchaBlockerOptions<Req, Res>;
9
20
  export declare class CaptchaBlocker<Req, Res> implements IBlocker<Req, Res> {
10
21
  protected readonly config: IConfiguration<Req, Res>;
11
- protected readonly jsonCaptchaBlocker: JsonCaptchaBlocker<Req, Res>;
12
- protected readonly mobileCaptchaBlocker: MobileCaptchaBlocker<Req, Res>;
13
- protected readonly htmlCaptchaBlocker: HtmlCaptchaBlocker<Req, Res>;
14
- constructor(config: IConfiguration<Req, Res>, base64Utils: IBase64Utils);
22
+ protected readonly jsonCaptchaBlocker: IConditionalBlocker<Req, Res>;
23
+ protected readonly mobileCaptchaBlocker: IConditionalBlocker<Req, Res>;
24
+ protected readonly htmlCaptchaBlocker: IBlocker<Req, Res>;
25
+ constructor(options: CaptchaBlockerConstructorOptions<Req, Res>);
15
26
  createBlockResponse(context: ReadonlyContext<Req, Res>): IMinimalResponse;
16
27
  }
28
+ export {};
@@ -2,9 +2,15 @@ import { IConfiguration } from '../../../../config';
2
2
  import { ReadonlyContext } from '../../../../context';
3
3
  import { IBase64Utils } from '../../../../utils';
4
4
  import { BlockerBase } from '../../../../blocker';
5
+ export type HtmlCaptchaBlockerConstructorOptions<Req, Res> = {
6
+ config: IConfiguration<Req, Res>;
7
+ base64Utils: IBase64Utils;
8
+ captchaTemplate?: string;
9
+ };
5
10
  export declare class HtmlCaptchaBlocker<Req, Res> extends BlockerBase<Req, Res> {
6
11
  protected readonly config: IConfiguration<Req, Res>;
7
12
  protected readonly base64Utils: IBase64Utils;
8
- constructor(config: IConfiguration<Req, Res>, base64Utils: IBase64Utils);
13
+ protected readonly captchaTemplate: string;
14
+ constructor(options: HtmlCaptchaBlockerConstructorOptions<Req, Res>);
9
15
  protected createBlockBody(context: ReadonlyContext<Req, Res>): string;
10
16
  }
@@ -3,10 +3,14 @@ import { ReadonlyContext } from '../../../../context';
3
3
  import { IConditionalBlocker, JsonBlockerBase } from '../../../../blocker';
4
4
  import { JsonCaptchaBlockPayload } from '../model';
5
5
  import { IBase64Utils } from '../../../../utils';
6
+ export type JsonCaptchaBlockerConstructorOptions<Req, Res> = {
7
+ config: IConfiguration<Req, Res>;
8
+ base64Utils: IBase64Utils;
9
+ };
6
10
  export declare class JsonCaptchaBlocker<Req, Res> extends JsonBlockerBase<Req, Res, JsonCaptchaBlockPayload> implements IConditionalBlocker<Req, Res> {
7
11
  protected readonly config: IConfiguration<Req, Res>;
8
12
  protected readonly base64Utils: IBase64Utils;
9
- constructor(config: IConfiguration<Req, Res>, base64Utils: IBase64Utils);
13
+ constructor(options: JsonCaptchaBlockerConstructorOptions<Req, Res>);
10
14
  shouldBlock(context: ReadonlyContext<Req, Res>): boolean;
11
15
  protected createJsonPayload(context: ReadonlyContext<Req, Res>): JsonCaptchaBlockPayload;
12
16
  }
@@ -1,6 +1,11 @@
1
1
  import { IConfiguration } from '../../../../config';
2
2
  import { IBase64Utils } from '../../../../utils';
3
3
  import { MobileBlocker } from '../../../../blocker';
4
+ export type MobileCaptchaBlockerConstructorOptions<Req, Res> = {
5
+ config: IConfiguration<Req, Res>;
6
+ base64Utils: IBase64Utils;
7
+ captchaTemplate?: string;
8
+ };
4
9
  export declare class MobileCaptchaBlocker<Req, Res> extends MobileBlocker<Req, Res> {
5
- constructor(config: IConfiguration<Req, Res>, base64Utils: IBase64Utils);
10
+ constructor(options: MobileCaptchaBlockerConstructorOptions<Req, Res>);
6
11
  }
@@ -24,7 +24,7 @@ export type CredentialEndpointConfiguration<Req, Res> = {
24
24
  /**
25
25
  * Whether the credentials are sent through the request headers, query params, body, or custom callback.
26
26
  */
27
- sent_through: 'body' | 'header' | 'query-param' | 'custom' | SentThrough;
27
+ sent_through?: 'body' | 'header' | 'query-param' | 'custom' | SentThrough;
28
28
  /**
29
29
  * A custom credential extraction callback that returns the raw credentials from the request.
30
30
  * Does not need to be defined if the sent_through, user_field, and pass_field values have been configured.
@@ -43,7 +43,7 @@ export type CredentialEndpointConfiguration<Req, Res> = {
43
43
  /**
44
44
  * The method by which the module will determine whether the login request was successful.
45
45
  */
46
- login_successful_reporting_method: 'status' | 'header' | 'body' | 'custom' | LoginSuccessfulReportingMethod;
46
+ login_successful_reporting_method?: 'status' | 'header' | 'body' | 'custom' | LoginSuccessfulReportingMethod;
47
47
  /**
48
48
  * An array of HTTP statuses signifying a successful login. All other status codes
49
49
  * will be treated as unsuccessful login attempts.
@@ -30,7 +30,6 @@ export declare namespace PXHDUtils {
30
30
  readonly append: (name: string, value: string) => void;
31
31
  readonly delete: (name: string) => void;
32
32
  readonly has: (name: string) => boolean;
33
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
34
33
  };
35
34
  readonly toJSON: () => string;
36
35
  };
@@ -103,7 +102,6 @@ export declare namespace PXHDUtils {
103
102
  readonly append: (name: string, value: string) => void;
104
103
  readonly delete: (name: string) => void;
105
104
  readonly has: (name: string) => boolean;
106
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
107
105
  };
108
106
  readonly toJSON: () => string;
109
107
  };
@@ -331,7 +329,6 @@ export declare namespace PXHDUtils {
331
329
  readonly append: (name: string, value: string) => void;
332
330
  readonly delete: (name: string) => void;
333
331
  readonly has: (name: string) => boolean;
334
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
335
332
  };
336
333
  readonly toJSON: () => string;
337
334
  };
@@ -702,7 +699,6 @@ export declare namespace PXHDUtils {
702
699
  readonly append: (name: string, value: string) => void;
703
700
  readonly delete: (name: string) => void;
704
701
  readonly has: (name: string) => boolean;
705
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
706
702
  };
707
703
  readonly toJSON: () => string;
708
704
  };
@@ -775,7 +771,6 @@ export declare namespace PXHDUtils {
775
771
  readonly append: (name: string, value: string) => void;
776
772
  readonly delete: (name: string) => void;
777
773
  readonly has: (name: string) => boolean;
778
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
779
774
  };
780
775
  readonly toJSON: () => string;
781
776
  };
@@ -1003,7 +998,6 @@ export declare namespace PXHDUtils {
1003
998
  readonly append: (name: string, value: string) => void;
1004
999
  readonly delete: (name: string) => void;
1005
1000
  readonly has: (name: string) => boolean;
1006
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1007
1001
  };
1008
1002
  readonly toJSON: () => string;
1009
1003
  };
@@ -29,7 +29,6 @@ export declare namespace SensitiveRequestUtils {
29
29
  readonly append: (name: string, value: string) => void;
30
30
  readonly delete: (name: string) => void;
31
31
  readonly has: (name: string) => boolean;
32
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
33
32
  };
34
33
  readonly toJSON: () => string;
35
34
  };
@@ -102,7 +101,6 @@ export declare namespace SensitiveRequestUtils {
102
101
  readonly append: (name: string, value: string) => void;
103
102
  readonly delete: (name: string) => void;
104
103
  readonly has: (name: string) => boolean;
105
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
106
104
  };
107
105
  readonly toJSON: () => string;
108
106
  };
@@ -330,7 +328,6 @@ export declare namespace SensitiveRequestUtils {
330
328
  readonly append: (name: string, value: string) => void;
331
329
  readonly delete: (name: string) => void;
332
330
  readonly has: (name: string) => boolean;
333
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
334
331
  };
335
332
  readonly toJSON: () => string;
336
333
  };
@@ -703,7 +700,6 @@ export declare namespace SensitiveRequestUtils {
703
700
  readonly append: (name: string, value: string) => void;
704
701
  readonly delete: (name: string) => void;
705
702
  readonly has: (name: string) => boolean;
706
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
707
703
  };
708
704
  readonly toJSON: () => string;
709
705
  };
@@ -776,7 +772,6 @@ export declare namespace SensitiveRequestUtils {
776
772
  readonly append: (name: string, value: string) => void;
777
773
  readonly delete: (name: string) => void;
778
774
  readonly has: (name: string) => boolean;
779
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
780
775
  };
781
776
  readonly toJSON: () => string;
782
777
  };
@@ -1004,7 +999,6 @@ export declare namespace SensitiveRequestUtils {
1004
999
  readonly append: (name: string, value: string) => void;
1005
1000
  readonly delete: (name: string) => void;
1006
1001
  readonly has: (name: string) => boolean;
1007
- readonly forEach: (callback: (value: string, key: string, params?: import("../utils").IUrlSearchParams, thisArg?: any) => void) => void;
1008
1002
  };
1009
1003
  readonly toJSON: () => string;
1010
1004
  };
@@ -11,4 +11,4 @@ export declare const PUSH_DATA_FEATURE_HEADER_NAME = "x-px-feature";
11
11
  export declare const EMAIL_ADDRESS_REGEX: RegExp;
12
12
  export declare const URL_REGEX: RegExp;
13
13
  export declare const REGEX_STRUCTURE: RegExp;
14
- export declare const CORE_MODULE_VERSION = "JS Core 0.21.1";
14
+ export declare const CORE_MODULE_VERSION = "JS Core 0.21.3";
@@ -5,5 +5,4 @@ export interface IUrlSearchParams {
5
5
  append(name: string, value: string): void;
6
6
  delete(name: string): void;
7
7
  has(name: string): boolean;
8
- forEach(callback: (value: string, key: string, params?: IUrlSearchParams, thisArg?: any) => void): void;
9
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perimeterx-js-core",
3
- "version": "0.21.1",
3
+ "version": "0.21.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "typesVersions": {
@@ -48,7 +48,7 @@
48
48
  "js-base64": "^3.7.2",
49
49
  "phin": "^3.7.0",
50
50
  "ts-essentials": "^10.0.0",
51
- "uuid": "^9.0.0"
51
+ "uuid": "^10.0.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/chai": "^4.3.3",
@@ -56,7 +56,7 @@
56
56
  "@types/crypto-js": "^4.1.1",
57
57
  "@types/mocha": "^10.0.0",
58
58
  "@types/sinon": "^17.0.1",
59
- "@types/uuid": "^9.0.2",
59
+ "@types/uuid": "^10.0.0",
60
60
  "@typescript-eslint/eslint-plugin": "^5.40.0",
61
61
  "@typescript-eslint/parser": "^5.40.0",
62
62
  "chai": "^4.3.6",