perimeterx-js-core 0.22.0 → 0.23.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.
Files changed (300) hide show
  1. package/lib/cjs/action/utils.js +9 -2
  2. package/lib/cjs/activities/HttpActivityClient.js +1 -1
  3. package/lib/cjs/activities/utils.js +17 -14
  4. package/lib/cjs/blocker/BlockerBase.js +2 -2
  5. package/lib/cjs/config/ConfigurationBase.js +117 -100
  6. package/lib/cjs/config/defaults/DefaultConfigurationParams.js +5 -4
  7. package/lib/cjs/config/params/index.js +4 -7
  8. package/lib/cjs/config/remote_config/DefaultRemoteConfigUpdater.js +7 -2
  9. package/lib/cjs/config/remote_config/RemoteConfigUtils.js +1 -1
  10. package/lib/cjs/config/remote_config/service_client/HttpRemoteConfigServiceClient.js +3 -3
  11. package/lib/cjs/context/DefaultContext.js +9 -4
  12. package/lib/cjs/context/SerializedContext.js +1 -1
  13. package/lib/cjs/cors/DefaultCors.js +6 -2
  14. package/lib/cjs/enforcer/EnforcerBase.js +0 -1
  15. package/lib/cjs/enforcer/utils.js +5 -4
  16. package/lib/cjs/graphql/DefaultGraphQLParser.js +22 -17
  17. package/lib/cjs/http/utils/FormDataImpl.js +1 -1
  18. package/lib/cjs/impl/base64/BufferBase64Utils.js +2 -1
  19. package/lib/cjs/impl/cipher/CryptoJsCipherUtils.js +69 -0
  20. package/lib/cjs/impl/hash/CryptoJSHashUtils.js +1 -1
  21. package/lib/cjs/impl/http/phin/PhinHttpClient.js +3 -3
  22. package/lib/cjs/impl/http/phin/PhinIncomingResponse.js +22 -6
  23. package/lib/cjs/impl/url/CustomImplUrlUtils.js +2 -2
  24. package/lib/cjs/impl/url/UrlImpl.js +4 -1
  25. package/lib/cjs/impl/url/UrlSearchParamsImpl.js +6 -5
  26. package/lib/cjs/phase/flow/EndEnforcerFlow.js +7 -1
  27. package/lib/cjs/phase/flow/EnforceFlow.js +1 -1
  28. package/lib/cjs/phase/flow/FilterFlow.js +18 -6
  29. package/lib/cjs/phase/impl/ClearLogsPhase.js +53 -0
  30. package/lib/cjs/phase/impl/CompositePhase.js +1 -1
  31. package/lib/cjs/phase/impl/CreateBlockResponsePhase.js +9 -7
  32. package/lib/cjs/phase/impl/EnrichContextFromRequestPhase.js +20 -22
  33. package/lib/cjs/phase/impl/EnrichContextFromResponsePhase.js +18 -21
  34. package/lib/cjs/phase/impl/FirstPartyPhase.js +9 -9
  35. package/lib/cjs/phase/impl/ModifyOutgoingResponsePhase.js +2 -2
  36. package/lib/cjs/phase/impl/RiskApiPhase.js +18 -19
  37. package/lib/cjs/phase/impl/SendLogsPhase.js +7 -11
  38. package/lib/cjs/phase/impl/index.js +1 -0
  39. package/lib/cjs/products/account_defender/AccountDefender.js +18 -10
  40. package/lib/cjs/products/bot_defender/BotDefender.js +10 -11
  41. package/lib/cjs/products/bot_defender/block/DefaultBotDefenderBlocker.js +1 -1
  42. package/lib/cjs/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +3 -2
  43. package/lib/cjs/products/bot_defender/first_party/IDefaultBotDefenderFirstPartyConfiguration.js +1 -0
  44. package/lib/cjs/products/credential_intelligence/CredentialIntelligence.js +13 -11
  45. package/lib/cjs/products/credential_intelligence/endpoint/CredentialEndpoint.js +3 -3
  46. package/lib/cjs/products/credential_intelligence/endpoint/CredentialEndpointManager.js +12 -14
  47. package/lib/cjs/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.js +5 -4
  48. package/lib/cjs/products/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.js +15 -3
  49. package/lib/cjs/products/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.js +3 -2
  50. package/lib/cjs/products/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.js +4 -3
  51. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.js +10 -10
  52. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.js +14 -14
  53. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/BodyLoginSuccessfulParser.js +3 -4
  54. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.js +7 -6
  55. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.js +7 -1
  56. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.js +6 -2
  57. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.js +3 -0
  58. package/lib/cjs/products/hype_sale_challenge/HypeSaleChallenge.js +11 -10
  59. package/lib/cjs/pxde/DefaultDataEnrichment.js +7 -4
  60. package/lib/cjs/pxhd/PXHDUtils.js +2 -1
  61. package/lib/cjs/risk_api/client/PostRiskApiClientBase.js +19 -15
  62. package/lib/cjs/risk_api/risk_response/v2/DefaultRiskResponseV2.js +4 -3
  63. package/lib/cjs/risk_token/index.js +2 -3
  64. package/lib/cjs/risk_token/parser/TokenParserBase.js +13 -10
  65. package/lib/cjs/risk_token/token/TokenBase.js +27 -0
  66. package/lib/cjs/risk_token/token/serialize/SerializedToken.js +5 -2
  67. package/lib/cjs/risk_token/token/v2/DefaultTokenV2.js +23 -43
  68. package/lib/cjs/risk_token/token/v3/DefaultTokenV3.js +23 -38
  69. package/lib/cjs/utils/constants.js +1 -1
  70. package/lib/cjs/utils/cookie_parser/StringSplitCookieParser.js +6 -2
  71. package/lib/cjs/utils/error/EnforcerConfigurationError.js +35 -0
  72. package/lib/cjs/utils/error/EnforcerErrorName.js +1 -0
  73. package/lib/cjs/utils/error/index.js +18 -7
  74. package/lib/cjs/utils/timestamp_hmac_header_validator/DefaultTimestampHmacHeaderValidator.js +5 -3
  75. package/lib/cjs/utils/utils.js +20 -14
  76. package/lib/esm/action/utils.js +8 -2
  77. package/lib/esm/activities/HttpActivityClient.js +1 -1
  78. package/lib/esm/activities/utils.js +15 -12
  79. package/lib/esm/blocker/BlockerBase.js +2 -2
  80. package/lib/esm/config/ConfigurationBase.js +117 -101
  81. package/lib/esm/config/defaults/DefaultConfigurationParams.js +3 -3
  82. package/lib/esm/config/params/index.js +4 -7
  83. package/lib/esm/config/remote_config/DefaultRemoteConfigUpdater.js +6 -2
  84. package/lib/esm/config/remote_config/RemoteConfigUtils.js +2 -2
  85. package/lib/esm/config/remote_config/service_client/HttpRemoteConfigServiceClient.js +3 -3
  86. package/lib/esm/context/DefaultContext.js +9 -5
  87. package/lib/esm/context/SerializedContext.js +1 -1
  88. package/lib/esm/cors/DefaultCors.js +6 -2
  89. package/lib/esm/enforcer/EnforcerBase.js +0 -1
  90. package/lib/esm/enforcer/utils.js +5 -5
  91. package/lib/esm/graphql/DefaultGraphQLParser.js +8 -8
  92. package/lib/esm/http/utils/FormDataImpl.js +1 -1
  93. package/lib/esm/impl/cipher/CryptoJsCipherUtils.js +18 -0
  94. package/lib/esm/impl/hash/CryptoJSHashUtils.js +2 -2
  95. package/lib/esm/impl/http/phin/PhinHttpClient.js +3 -3
  96. package/lib/esm/impl/http/phin/PhinIncomingResponse.js +14 -3
  97. package/lib/esm/impl/url/CustomImplUrlUtils.js +2 -2
  98. package/lib/esm/impl/url/UrlImpl.js +4 -1
  99. package/lib/esm/impl/url/UrlSearchParamsImpl.js +6 -4
  100. package/lib/esm/phase/flow/EndEnforcerFlow.js +7 -1
  101. package/lib/esm/phase/flow/EnforceFlow.js +1 -1
  102. package/lib/esm/phase/flow/FilterFlow.js +19 -7
  103. package/lib/esm/phase/flow/PostEnforceFlow.js +1 -1
  104. package/lib/esm/phase/impl/ClearLogsPhase.js +6 -0
  105. package/lib/esm/phase/impl/CompositePhase.js +1 -1
  106. package/lib/esm/phase/impl/CreateBlockResponsePhase.js +4 -2
  107. package/lib/esm/phase/impl/EnrichContextFromResponsePhase.js +6 -4
  108. package/lib/esm/phase/impl/ModifyOutgoingResponsePhase.js +1 -1
  109. package/lib/esm/phase/impl/RiskApiPhase.js +5 -4
  110. package/lib/esm/phase/impl/SendLogsPhase.js +2 -5
  111. package/lib/esm/phase/impl/index.js +1 -0
  112. package/lib/esm/products/account_defender/AccountDefender.js +17 -9
  113. package/lib/esm/products/bot_defender/BotDefender.js +7 -7
  114. package/lib/esm/products/bot_defender/block/DefaultBotDefenderBlocker.js +1 -1
  115. package/lib/esm/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +2 -2
  116. package/lib/esm/products/bot_defender/first_party/IDefaultBotDefenderFirstPartyConfiguration.js +1 -0
  117. package/lib/esm/products/credential_intelligence/CredentialIntelligence.js +8 -6
  118. package/lib/esm/products/credential_intelligence/endpoint/CredentialEndpoint.js +3 -3
  119. package/lib/esm/products/credential_intelligence/endpoint/CredentialEndpointManager.js +9 -5
  120. package/lib/esm/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.js +4 -4
  121. package/lib/esm/products/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.js +15 -3
  122. package/lib/esm/products/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.js +2 -2
  123. package/lib/esm/products/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.js +2 -2
  124. package/lib/esm/products/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.js +2 -2
  125. package/lib/esm/products/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.js +5 -2
  126. package/lib/esm/products/credential_intelligence/endpoint/login_successful/BodyLoginSuccessfulParser.js +1 -1
  127. package/lib/esm/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.js +1 -1
  128. package/lib/esm/products/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.js +7 -1
  129. package/lib/esm/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.js +7 -3
  130. package/lib/esm/products/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.js +3 -0
  131. package/lib/esm/products/hype_sale_challenge/HypeSaleChallenge.js +10 -10
  132. package/lib/esm/pxde/DefaultDataEnrichment.js +5 -2
  133. package/lib/esm/pxhd/PXHDUtils.js +1 -1
  134. package/lib/esm/risk_api/client/PostRiskApiClientBase.js +7 -5
  135. package/lib/esm/risk_api/risk_response/v2/DefaultRiskResponseV2.js +3 -2
  136. package/lib/esm/risk_token/index.js +1 -1
  137. package/lib/esm/risk_token/parser/TokenParserBase.js +4 -2
  138. package/lib/esm/risk_token/token/TokenBase.js +12 -0
  139. package/lib/esm/risk_token/token/serialize/SerializedToken.js +5 -2
  140. package/lib/esm/risk_token/token/v2/DefaultTokenV2.js +12 -17
  141. package/lib/esm/risk_token/token/v3/DefaultTokenV3.js +21 -20
  142. package/lib/esm/utils/constants.js +1 -1
  143. package/lib/esm/utils/cookie_parser/StringSplitCookieParser.js +6 -2
  144. package/lib/esm/utils/error/EnforcerConfigurationError.js +12 -0
  145. package/lib/esm/utils/error/EnforcerErrorName.js +1 -0
  146. package/lib/esm/utils/error/index.js +4 -3
  147. package/lib/esm/utils/timestamp_hmac_header_validator/DefaultTimestampHmacHeaderValidator.js +4 -2
  148. package/lib/esm/utils/utils.js +15 -15
  149. package/lib/types/action/Decision.d.ts +2 -2
  150. package/lib/types/activities/HttpActivityClient.d.ts +3 -3
  151. package/lib/types/activities/HttpBatchedActivityClient.d.ts +2 -2
  152. package/lib/types/activities/model/AsyncActivityDetails.d.ts +1 -1
  153. package/lib/types/activities/utils.d.ts +13 -6775
  154. package/lib/types/additional_activity_handler/AdditionalActivityHandler.d.ts +2 -2
  155. package/lib/types/additional_activity_handler/AdditionalActivityHandlerUtils.d.ts +1 -1
  156. package/lib/types/blocker/BlockerBase.d.ts +1 -1
  157. package/lib/types/blocker/MobileBlocker.d.ts +3 -3
  158. package/lib/types/blocker/model/BlockData.d.ts +1 -1
  159. package/lib/types/blocker/utils.d.ts +1 -672
  160. package/lib/types/config/ConfigurationBase.d.ts +34 -33
  161. package/lib/types/config/ConfigurationBuilderBase.d.ts +6 -6
  162. package/lib/types/config/IConfiguration.d.ts +22 -22
  163. package/lib/types/config/defaults/DefaultConfigurationParams.d.ts +2 -2
  164. package/lib/types/config/params/ActiveConfigurationParams.d.ts +2 -0
  165. package/lib/types/config/params/AllConfigurationParams.d.ts +4 -0
  166. package/lib/types/config/params/{CommonConfigurationParams.d.ts → CoreConfigurationParams.d.ts} +45 -18
  167. package/lib/types/config/params/RemoteConfigurationParams.d.ts +2 -3
  168. package/lib/types/config/params/StaticConfigurationParams.d.ts +3 -3
  169. package/lib/types/config/params/index.d.ts +4 -7
  170. package/lib/types/config/remote_config/DefaultRemoteConfigUpdater.d.ts +14 -15
  171. package/lib/types/config/remote_config/RemoteConfigUtils.d.ts +2 -2
  172. package/lib/types/config/remote_config/model/RemoteConfigData.d.ts +2 -2
  173. package/lib/types/config/remote_config/service_client/HttpRemoteConfigServiceClient.d.ts +6 -6
  174. package/lib/types/config/remote_config/service_client/IRemoteConfigServiceClient.d.ts +2 -2
  175. package/lib/types/config/remote_config/storage_client/IRemoteConfigStorageClient.d.ts +3 -3
  176. package/lib/types/context/ContextJson.d.ts +3 -3
  177. package/lib/types/context/DefaultContext.d.ts +11 -11
  178. package/lib/types/context/SerializedContext.d.ts +8 -8
  179. package/lib/types/context/interfaces/IContext.d.ts +6 -6
  180. package/lib/types/context/interfaces/MobileData.d.ts +1 -1
  181. package/lib/types/context/interfaces/TokenData.d.ts +1 -1
  182. package/lib/types/cors/DefaultCors.d.ts +3 -3
  183. package/lib/types/cors/ICors.d.ts +3 -3
  184. package/lib/types/custom_parameters/CustomParametersFunction.d.ts +2 -2
  185. package/lib/types/custom_parameters/CustomParametersUtils.d.ts +2 -2
  186. package/lib/types/enforcer/EnforcerBase.d.ts +7 -8
  187. package/lib/types/enforcer/EnforcerOptions.d.ts +6 -6
  188. package/lib/types/enforcer/utils.d.ts +2 -2
  189. package/lib/types/graphql/DefaultGraphQLParser.d.ts +13 -12
  190. package/lib/types/graphql/ExtractGraphQLKeywordsFunction.d.ts +1 -1
  191. package/lib/types/graphql/IGraphQLParser.d.ts +1 -1
  192. package/lib/types/http/interfaces/IFormData.d.ts +1 -1
  193. package/lib/types/http/utils/FormDataImpl.d.ts +2 -2
  194. package/lib/types/http/utils/MultipartFormDataUtils.d.ts +2 -2
  195. package/lib/types/impl/cipher/CryptoCipherUtils.d.ts +0 -1
  196. package/lib/types/impl/cipher/CryptoJsCipherUtils.d.ts +4 -0
  197. package/lib/types/impl/hash/CryptoHashUtils.d.ts +0 -1
  198. package/lib/types/impl/hmac/CryptoHmacUtils.d.ts +0 -1
  199. package/lib/types/impl/http/phin/PhinIncomingResponse.d.ts +0 -1
  200. package/lib/types/impl/url/CustomImplUrlUtils.d.ts +2 -2
  201. package/lib/types/impl/url/UrlImpl.d.ts +3 -3
  202. package/lib/types/impl/url/UrlSearchParamsImpl.d.ts +1 -1
  203. package/lib/types/logger/DefaultLogger.d.ts +1 -1
  204. package/lib/types/logger/HttpLogServiceClient.d.ts +3 -3
  205. package/lib/types/logger/ILogger.d.ts +2 -2
  206. package/lib/types/logger/LoggerBase.d.ts +4 -4
  207. package/lib/types/monitored_request/MonitoredRequestUtils.d.ts +3 -2016
  208. package/lib/types/phase/flow/EndEnforcerFlow.d.ts +2 -2
  209. package/lib/types/phase/flow/EnforceFlow.d.ts +2 -2
  210. package/lib/types/phase/flow/FilterFlow.d.ts +7 -2
  211. package/lib/types/phase/flow/PostEnforceFlow.d.ts +2 -2
  212. package/lib/types/phase/impl/AdditionalActivityHandlerPhase.d.ts +3 -3
  213. package/lib/types/phase/impl/ClearLogsPhase.d.ts +6 -0
  214. package/lib/types/phase/impl/CreateBlockResponsePhase.d.ts +4 -4
  215. package/lib/types/phase/impl/EnrichContextFromRequestPhase.d.ts +3 -3
  216. package/lib/types/phase/impl/EnrichContextFromResponsePhase.d.ts +3 -3
  217. package/lib/types/phase/impl/FirstPartyPhase.d.ts +3 -3
  218. package/lib/types/phase/impl/ModifyOutgoingResponsePhase.d.ts +3 -3
  219. package/lib/types/phase/impl/PreflightPhase.d.ts +2 -2
  220. package/lib/types/phase/impl/RiskApiPhase.d.ts +1 -2
  221. package/lib/types/phase/impl/SendLogsPhase.d.ts +2 -3
  222. package/lib/types/phase/impl/UpdateRemoteConfigPhase.d.ts +3 -3
  223. package/lib/types/phase/impl/index.d.ts +1 -0
  224. package/lib/types/products/account_defender/AccountDefender.d.ts +7 -7
  225. package/lib/types/products/bot_defender/BotDefender.d.ts +12 -11
  226. package/lib/types/products/bot_defender/block/DefaultBotDefenderBlocker.d.ts +4 -4
  227. package/lib/types/products/bot_defender/block/captcha/CaptchaBlocker.d.ts +12 -12
  228. package/lib/types/products/bot_defender/block/captcha/HtmlCaptchaBlocker.d.ts +5 -5
  229. package/lib/types/products/bot_defender/block/captcha/JsonCaptchaBlocker.d.ts +5 -5
  230. package/lib/types/products/bot_defender/block/captcha/MobileCaptchaBlocker.d.ts +4 -4
  231. package/lib/types/products/bot_defender/filter/DefaultBotDefenderFilter.d.ts +2 -2
  232. package/lib/types/products/bot_defender/first_party/DefaultBotDefenderFirstParty.d.ts +3 -3
  233. package/lib/types/products/bot_defender/first_party/utils.d.ts +7 -7
  234. package/lib/types/products/credential_intelligence/CredentialIntelligence.d.ts +9 -9
  235. package/lib/types/products/credential_intelligence/endpoint/CredentialEndpoint.d.ts +4 -4
  236. package/lib/types/products/credential_intelligence/endpoint/CredentialEndpointConfiguration.d.ts +4 -4
  237. package/lib/types/products/credential_intelligence/endpoint/CredentialEndpointManager.d.ts +2 -4
  238. package/lib/types/products/credential_intelligence/endpoint/ICredentialEndpoint.d.ts +3 -2
  239. package/lib/types/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.d.ts +2 -2
  240. package/lib/types/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.d.ts +3 -3
  241. package/lib/types/products/credential_intelligence/endpoint/login_successful/ILoginSuccessfulParser.d.ts +1 -1
  242. package/lib/types/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.d.ts +1 -1
  243. package/lib/types/products/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.d.ts +1 -1
  244. package/lib/types/products/credential_intelligence/model/CredentialIntelligenceData.d.ts +1 -1
  245. package/lib/types/products/hype_sale_challenge/HypeSaleChallenge.d.ts +8 -8
  246. package/lib/types/products/hype_sale_challenge/block/JsonHypeSaleChallengeBlocker.d.ts +3 -3
  247. package/lib/types/products/hype_sale_challenge/block/MobileHypeSaleChallengeBlocker.d.ts +2 -2
  248. package/lib/types/products/interfaces/IProduct.d.ts +3 -3
  249. package/lib/types/products/interfaces/ProductType.d.ts +2 -1
  250. package/lib/types/pxde/DefaultDataEnrichment.d.ts +2 -2
  251. package/lib/types/pxde/model/PxdeData.d.ts +1 -1
  252. package/lib/types/pxhd/PXHDUtils.d.ts +2 -1344
  253. package/lib/types/risk_api/client/PostRiskApiClientBase.d.ts +4 -3
  254. package/lib/types/risk_api/client/PostRiskApiClientV2.d.ts +2 -2
  255. package/lib/types/risk_api/client/PostRiskApiClientV3.d.ts +2 -2
  256. package/lib/types/risk_api/risk_response/IRiskResponse.d.ts +4 -4
  257. package/lib/types/risk_api/risk_response/RiskResponseBase.d.ts +13 -13
  258. package/lib/types/risk_api/risk_response/serialize/RiskResponseJson.d.ts +4 -4
  259. package/lib/types/risk_api/risk_response/serialize/SerializedRiskResponse.d.ts +10 -10
  260. package/lib/types/risk_api/risk_response/v2/DefaultRiskResponseV2.d.ts +1 -1
  261. package/lib/types/risk_api/risk_response/v3/DefaultRiskResponseV3.d.ts +1 -1
  262. package/lib/types/risk_token/index.d.ts +1 -1
  263. package/lib/types/risk_token/parser/DefaultTokenV2Parser.d.ts +3 -3
  264. package/lib/types/risk_token/parser/DefaultTokenV3Parser.d.ts +3 -3
  265. package/lib/types/risk_token/parser/TokenParserBase.d.ts +5 -5
  266. package/lib/types/risk_token/token/IToken.d.ts +7 -7
  267. package/lib/types/risk_token/token/TokenBase.d.ts +12 -12
  268. package/lib/types/risk_token/token/serialize/SerializedToken.d.ts +10 -10
  269. package/lib/types/risk_token/token/serialize/TokenJson.d.ts +5 -5
  270. package/lib/types/risk_token/token/v2/DefaultTokenV2.d.ts +7 -11
  271. package/lib/types/risk_token/token/v3/DefaultTokenV3.d.ts +9 -13
  272. package/lib/types/sensitive_request/SensitiveRequestUtils.d.ts +3 -1345
  273. package/lib/types/telemetry/DefaultTelemetry.d.ts +4 -4
  274. package/lib/types/telemetry/model/TelemetryActivity.d.ts +9 -9
  275. package/lib/types/utils/WaitsUntil.d.ts +1 -1
  276. package/lib/types/utils/constants.d.ts +1 -1
  277. package/lib/types/utils/error/EnforcerConfigurationError.d.ts +4 -0
  278. package/lib/types/utils/error/EnforcerErrorName.d.ts +2 -1
  279. package/lib/types/utils/error/index.d.ts +4 -3
  280. package/lib/types/utils/timestamp_hmac_header_validator/DefaultTimestampHmacHeaderValidator.d.ts +3 -3
  281. package/lib/types/utils/url/IUrlSearchParams.d.ts +1 -1
  282. package/lib/types/utils/utils.d.ts +12 -9
  283. package/package.json +1 -1
  284. package/lib/cjs/config/params/RemoteConfigurationParamsOnly.js +0 -2
  285. package/lib/cjs/config/params/StaticConfigurationParamsOnly.js +0 -2
  286. package/lib/cjs/config/params/TokenV3ConfigurationParamsOnly.js +0 -2
  287. package/lib/esm/config/params/RemoteConfigurationParamsOnly.js +0 -1
  288. package/lib/esm/config/params/StaticConfigurationParamsOnly.js +0 -1
  289. package/lib/esm/config/params/TokenV3ConfigurationParamsOnly.js +0 -1
  290. package/lib/types/config/params/BatchedActivitiesConfigParams.d.ts +0 -4
  291. package/lib/types/config/params/ConfigurationParams.d.ts +0 -4
  292. package/lib/types/config/params/RemoteConfigurationParamsOnly.d.ts +0 -10
  293. package/lib/types/config/params/StaticConfigurationParamsOnly.d.ts +0 -7
  294. package/lib/types/config/params/TokenV3ConfigurationParamsOnly.d.ts +0 -7
  295. /package/lib/cjs/config/params/{BatchedActivitiesConfigParams.js → ActiveConfigurationParams.js} +0 -0
  296. /package/lib/cjs/config/params/{CommonConfigurationParams.js → AllConfigurationParams.js} +0 -0
  297. /package/lib/cjs/config/params/{ConfigurationParams.js → CoreConfigurationParams.js} +0 -0
  298. /package/lib/esm/config/params/{BatchedActivitiesConfigParams.js → ActiveConfigurationParams.js} +0 -0
  299. /package/lib/esm/config/params/{CommonConfigurationParams.js → AllConfigurationParams.js} +0 -0
  300. /package/lib/esm/config/params/{ConfigurationParams.js → CoreConfigurationParams.js} +0 -0
@@ -16,18 +16,21 @@ var defaults_1 = require("./defaults");
16
16
  var logger_1 = require("../logger");
17
17
  var utils_1 = require("../utils");
18
18
  var remote_config_1 = require("./remote_config");
19
+ var risk_token_1 = require("../risk_token");
19
20
  var ConfigurationBase = /** @class */ (function () {
20
- function ConfigurationBase(params, defaultParams) {
21
- this.defaultConfigParams = __assign(__assign({}, defaults_1.DEFAULT_CONFIGURATION_PARAMS), defaultParams);
22
- this.activeConfigParams = this.createActiveConfiguration(params, this.defaultConfigParams);
21
+ function ConfigurationBase(params, defaultParams, removedParams) {
22
+ this.defaultConfigParams = __assign(__assign({}, (0, defaults_1.defaultConfigurationParams)()), defaultParams);
23
+ this.configParams = this.createActiveConfiguration(params, this.defaultConfigParams);
23
24
  this.staticConfigParams = params;
25
+ this.removedParams = removedParams;
24
26
  }
25
27
  ConfigurationBase.prototype.createActiveConfiguration = function (params, defaultParams) {
26
28
  var _this = this;
27
29
  this.throwIfMissingRequiredField(params);
28
30
  var config = {};
29
31
  Object.keys(defaultParams).forEach(function (k) {
30
- config[k] = _this.getValidConfigValue(params, defaultParams, k);
32
+ var key = k;
33
+ config[key] = _this.getValidConfigValue(params, defaultParams, key);
31
34
  });
32
35
  this.internalLogger = this.createInternalLogger(config);
33
36
  return config;
@@ -35,14 +38,15 @@ var ConfigurationBase = /** @class */ (function () {
35
38
  ConfigurationBase.prototype.throwIfMissingRequiredField = function (params) {
36
39
  var REQUIRED_FIELDS = ['px_app_id', 'px_cookie_secret', 'px_auth_token'];
37
40
  REQUIRED_FIELDS.forEach(function (key) {
38
- if (!params[key]) {
39
- throw new utils_1.EnforcerError("".concat(String(key), " cannot be empty!"));
41
+ if (!params[key] || params[key].length === 0) {
42
+ throw new utils_1.EnforcerConfigurationError(String(key), params[key]);
40
43
  }
41
44
  });
42
45
  };
43
46
  ConfigurationBase.prototype.getValidConfigValue = function (params, defaultParams, key) {
44
- if (params[key] != null && this.isValidConfigValue(params, defaultParams, key)) {
45
- return params[key];
47
+ var paramsValue = params[key];
48
+ if (!(0, utils_1.isNullOrUndefined)(paramsValue) && this.isValidConfigValue(params, defaultParams, key)) {
49
+ return paramsValue;
46
50
  }
47
51
  else {
48
52
  return this.getDefaultConfigurationValue(params, defaultParams, key);
@@ -54,6 +58,8 @@ var ConfigurationBase = /** @class */ (function () {
54
58
  return (0, utils_1.isValidEnumValue)(logger_1.LoggerSeverity, params[key]);
55
59
  case 'px_module_mode':
56
60
  return (0, utils_1.isValidEnumValue)(utils_1.ModuleMode, params[key]);
61
+ case 'px_token_version':
62
+ return (0, utils_1.isValidEnumValue)(risk_token_1.TokenVersion, params[key]);
57
63
  case 'px_cookie_secret':
58
64
  return typeof params[key] === 'string' || Array.isArray(params[key]);
59
65
  default:
@@ -82,10 +88,15 @@ var ConfigurationBase = /** @class */ (function () {
82
88
  ConfigurationBase.prototype.addRemoteConfig = function (remoteConfigParams) {
83
89
  this.remoteConfigParams = remoteConfigParams;
84
90
  var mergedParams = __assign(__assign({}, this.staticConfigParams), remote_config_1.RemoteConfigUtils.prepareRemoteConfigParams(remoteConfigParams, this.logger));
85
- this.activeConfigParams = this.createActiveConfiguration(mergedParams, this.defaultConfigParams);
91
+ this.configParams = this.createActiveConfiguration(mergedParams, this.defaultConfigParams);
86
92
  };
87
93
  ConfigurationBase.prototype.getActiveConfig = function () {
88
- return Object.assign({}, this.activeConfigParams);
94
+ var activeConfig = Object.assign({}, this.configParams);
95
+ for (var key in this.removedParams) {
96
+ // @ts-ignore
97
+ delete activeConfig[key];
98
+ }
99
+ return activeConfig;
89
100
  };
90
101
  ConfigurationBase.prototype.getStaticConfig = function () {
91
102
  return Object.assign({}, this.staticConfigParams);
@@ -109,152 +120,151 @@ var ConfigurationBase = /** @class */ (function () {
109
120
  });
110
121
  Object.defineProperty(ConfigurationBase.prototype, "appId", {
111
122
  get: function () {
112
- return this.activeConfigParams.px_app_id;
123
+ return this.configParams.px_app_id;
113
124
  },
114
125
  enumerable: false,
115
126
  configurable: true
116
127
  });
117
128
  Object.defineProperty(ConfigurationBase.prototype, "authToken", {
118
129
  get: function () {
119
- return this.activeConfigParams.px_auth_token;
130
+ return this.configParams.px_auth_token;
120
131
  },
121
132
  enumerable: false,
122
133
  configurable: true
123
134
  });
124
- Object.defineProperty(ConfigurationBase.prototype, "blockingScore", {
135
+ Object.defineProperty(ConfigurationBase.prototype, "cookieSecret", {
125
136
  get: function () {
126
- return this.activeConfigParams.px_blocking_score;
137
+ if (typeof this.configParams.px_cookie_secret === 'string') {
138
+ return [this.configParams.px_cookie_secret];
139
+ }
140
+ return this.configParams.px_cookie_secret;
127
141
  },
128
142
  enumerable: false,
129
143
  configurable: true
130
144
  });
131
- Object.defineProperty(ConfigurationBase.prototype, "bypassMonitorHeader", {
145
+ Object.defineProperty(ConfigurationBase.prototype, "blockingScore", {
132
146
  get: function () {
133
- return this.activeConfigParams.px_bypass_monitor_header;
147
+ return this.configParams.px_blocking_score;
134
148
  },
135
149
  enumerable: false,
136
150
  configurable: true
137
151
  });
138
- Object.defineProperty(ConfigurationBase.prototype, "cookieSecret", {
152
+ Object.defineProperty(ConfigurationBase.prototype, "bypassMonitorHeader", {
139
153
  get: function () {
140
- if (typeof this.activeConfigParams.px_cookie_secret == 'string') {
141
- return [this.activeConfigParams.px_cookie_secret];
142
- }
143
- return this.activeConfigParams.px_cookie_secret;
154
+ return this.configParams.px_bypass_monitor_header;
144
155
  },
145
156
  enumerable: false,
146
157
  configurable: true
147
158
  });
148
159
  Object.defineProperty(ConfigurationBase.prototype, "customCookieHeader", {
149
160
  get: function () {
150
- return this.activeConfigParams.px_custom_cookie_header;
161
+ return this.configParams.px_custom_cookie_header;
151
162
  },
152
163
  enumerable: false,
153
164
  configurable: true
154
165
  });
155
166
  Object.defineProperty(ConfigurationBase.prototype, "customLogo", {
156
167
  get: function () {
157
- return this.activeConfigParams.px_custom_logo;
168
+ return this.configParams.px_custom_logo;
158
169
  },
159
170
  enumerable: false,
160
171
  configurable: true
161
172
  });
162
173
  Object.defineProperty(ConfigurationBase.prototype, "enforcedRoutes", {
163
174
  get: function () {
164
- return this.activeConfigParams.px_enforced_routes;
175
+ return this.configParams.px_enforced_routes;
165
176
  },
166
177
  enumerable: false,
167
178
  configurable: true
168
179
  });
169
180
  Object.defineProperty(ConfigurationBase.prototype, "customIsEnforcedRequest", {
170
181
  get: function () {
171
- return this.activeConfigParams.px_custom_is_enforced_request;
182
+ return this.configParams.px_custom_is_enforced_request;
172
183
  },
173
184
  enumerable: false,
174
185
  configurable: true
175
186
  });
176
187
  Object.defineProperty(ConfigurationBase.prototype, "filteredExtensions", {
177
188
  get: function () {
178
- return this.activeConfigParams.px_filter_by_extension.map(function (ext) {
179
- return ext.startsWith('.') ? ext : ".".concat(ext);
180
- });
189
+ var _a;
190
+ return (_a = this.configParams.px_filter_by_extension) === null || _a === void 0 ? void 0 : _a.map(function (ext) { return (ext.startsWith('.') ? ext : ".".concat(ext)); });
181
191
  },
182
192
  enumerable: false,
183
193
  configurable: true
184
194
  });
185
195
  Object.defineProperty(ConfigurationBase.prototype, "filteredHttpMethods", {
186
196
  get: function () {
187
- return this.activeConfigParams.px_filter_by_http_method;
197
+ return this.configParams.px_filter_by_http_method;
188
198
  },
189
199
  enumerable: false,
190
200
  configurable: true
191
201
  });
192
202
  Object.defineProperty(ConfigurationBase.prototype, "filteredIps", {
193
203
  get: function () {
194
- return this.activeConfigParams.px_filter_by_ip;
204
+ return this.configParams.px_filter_by_ip;
195
205
  },
196
206
  enumerable: false,
197
207
  configurable: true
198
208
  });
199
209
  Object.defineProperty(ConfigurationBase.prototype, "filteredRoutes", {
200
210
  get: function () {
201
- return this.activeConfigParams.px_filter_by_route;
211
+ return this.configParams.px_filter_by_route;
202
212
  },
203
213
  enumerable: false,
204
214
  configurable: true
205
215
  });
206
216
  Object.defineProperty(ConfigurationBase.prototype, "filteredUserAgents", {
207
217
  get: function () {
208
- return this.activeConfigParams.px_filter_by_user_agent;
218
+ return this.configParams.px_filter_by_user_agent;
209
219
  },
210
220
  enumerable: false,
211
221
  configurable: true
212
222
  });
213
223
  Object.defineProperty(ConfigurationBase.prototype, "firstPartyEnabled", {
214
224
  get: function () {
215
- return this.activeConfigParams.px_first_party_enabled;
225
+ return this.configParams.px_first_party_enabled;
216
226
  },
217
227
  enumerable: false,
218
228
  configurable: true
219
229
  });
220
230
  Object.defineProperty(ConfigurationBase.prototype, "customIsFilteredRequest", {
221
231
  get: function () {
222
- return this.activeConfigParams.px_custom_is_filtered_request;
232
+ return this.configParams.px_custom_is_filtered_request;
223
233
  },
224
234
  enumerable: false,
225
235
  configurable: true
226
236
  });
227
237
  Object.defineProperty(ConfigurationBase.prototype, "customFirstPartyPrefix", {
228
238
  get: function () {
229
- return this.activeConfigParams.px_custom_first_party_prefix;
239
+ return this.configParams.px_custom_first_party_prefix;
230
240
  },
231
241
  enumerable: false,
232
242
  configurable: true
233
243
  });
234
244
  Object.defineProperty(ConfigurationBase.prototype, "customFirstPartySensorEndpoint", {
235
245
  get: function () {
236
- return this.activeConfigParams.px_custom_first_party_sensor_endpoint;
246
+ return this.configParams.px_custom_first_party_sensor_endpoint;
237
247
  },
238
248
  enumerable: false,
239
249
  configurable: true
240
250
  });
241
251
  Object.defineProperty(ConfigurationBase.prototype, "customFirstPartyXhrEndpoint", {
242
252
  get: function () {
243
- return this.activeConfigParams.px_custom_first_party_xhr_endpoint;
253
+ return this.configParams.px_custom_first_party_xhr_endpoint;
244
254
  },
245
255
  enumerable: false,
246
256
  configurable: true
247
257
  });
248
258
  Object.defineProperty(ConfigurationBase.prototype, "customFirstPartyCaptchaEndpoint", {
249
259
  get: function () {
250
- return this.activeConfigParams.px_custom_first_party_captcha_endpoint;
260
+ return this.configParams.px_custom_first_party_captcha_endpoint;
251
261
  },
252
262
  enumerable: false,
253
263
  configurable: true
254
264
  });
255
265
  Object.defineProperty(ConfigurationBase.prototype, "firstPartyTimeoutMs", {
256
266
  get: function () {
257
- return this.activeConfigParams.px_first_party_timeout_ms;
267
+ return this.configParams.px_first_party_timeout_ms;
258
268
  },
259
269
  enumerable: false,
260
270
  configurable: true
@@ -268,210 +278,210 @@ var ConfigurationBase = /** @class */ (function () {
268
278
  });
269
279
  Object.defineProperty(ConfigurationBase.prototype, "moduleEnabled", {
270
280
  get: function () {
271
- return this.activeConfigParams.px_module_enabled;
281
+ return this.configParams.px_module_enabled;
272
282
  },
273
283
  enumerable: false,
274
284
  configurable: true
275
285
  });
276
286
  Object.defineProperty(ConfigurationBase.prototype, "moduleMode", {
277
287
  get: function () {
278
- return this.activeConfigParams.px_module_mode;
288
+ return this.configParams.px_module_mode;
279
289
  },
280
290
  enumerable: false,
281
291
  configurable: true
282
292
  });
283
293
  Object.defineProperty(ConfigurationBase.prototype, "monitoredRoutes", {
284
294
  get: function () {
285
- return this.activeConfigParams.px_monitored_routes;
295
+ return this.configParams.px_monitored_routes;
286
296
  },
287
297
  enumerable: false,
288
298
  configurable: true
289
299
  });
290
300
  Object.defineProperty(ConfigurationBase.prototype, "customIsMonitoredRequest", {
291
301
  get: function () {
292
- return this.activeConfigParams.px_custom_is_monitored_request;
302
+ return this.configParams.px_custom_is_monitored_request;
293
303
  },
294
304
  enumerable: false,
295
305
  configurable: true
296
306
  });
297
307
  Object.defineProperty(ConfigurationBase.prototype, "s2sTimeout", {
298
308
  get: function () {
299
- return this.activeConfigParams.px_s2s_timeout;
309
+ return this.configParams.px_s2s_timeout;
300
310
  },
301
311
  enumerable: false,
302
312
  configurable: true
303
313
  });
304
314
  Object.defineProperty(ConfigurationBase.prototype, "sensitiveHeaders", {
305
315
  get: function () {
306
- return this.activeConfigParams.px_sensitive_headers;
316
+ return this.configParams.px_sensitive_headers;
307
317
  },
308
318
  enumerable: false,
309
319
  configurable: true
310
320
  });
311
321
  Object.defineProperty(ConfigurationBase.prototype, "sensitiveRoutes", {
312
322
  get: function () {
313
- return this.activeConfigParams.px_sensitive_routes;
323
+ return this.configParams.px_sensitive_routes;
314
324
  },
315
325
  enumerable: false,
316
326
  configurable: true
317
327
  });
318
328
  Object.defineProperty(ConfigurationBase.prototype, "customIsSensitiveRequest", {
319
329
  get: function () {
320
- return this.activeConfigParams.px_custom_is_sensitive_request;
330
+ return this.configParams.px_custom_is_sensitive_request;
321
331
  },
322
332
  enumerable: false,
323
333
  configurable: true
324
334
  });
325
335
  Object.defineProperty(ConfigurationBase.prototype, "advancedBlockingResponseEnabled", {
326
336
  get: function () {
327
- return this.activeConfigParams.px_advanced_blocking_response_enabled;
337
+ return this.configParams.px_advanced_blocking_response_enabled;
328
338
  },
329
339
  enumerable: false,
330
340
  configurable: true
331
341
  });
332
342
  Object.defineProperty(ConfigurationBase.prototype, "backendScoreApiUrl", {
333
343
  get: function () {
334
- return this.activeConfigParams.px_backend_url;
344
+ return this.configParams.px_backend_url;
335
345
  },
336
346
  enumerable: false,
337
347
  configurable: true
338
348
  });
339
349
  Object.defineProperty(ConfigurationBase.prototype, "ipHeaders", {
340
350
  get: function () {
341
- return this.activeConfigParams.px_ip_headers;
351
+ return this.configParams.px_ip_headers;
342
352
  },
343
353
  enumerable: false,
344
354
  configurable: true
345
355
  });
346
356
  Object.defineProperty(ConfigurationBase.prototype, "backendCaptchaUrl", {
347
357
  get: function () {
348
- return this.activeConfigParams.px_backend_captcha_url;
358
+ return this.configParams.px_backend_captcha_url;
349
359
  },
350
360
  enumerable: false,
351
361
  configurable: true
352
362
  });
353
363
  Object.defineProperty(ConfigurationBase.prototype, "backendClientUrl", {
354
364
  get: function () {
355
- return this.activeConfigParams.px_backend_client_url;
365
+ return this.configParams.px_backend_client_url;
356
366
  },
357
367
  enumerable: false,
358
368
  configurable: true
359
369
  });
360
370
  Object.defineProperty(ConfigurationBase.prototype, "backendCollectorUrl", {
361
371
  get: function () {
362
- return this.activeConfigParams.px_backend_collector_url;
372
+ return this.configParams.px_backend_collector_url;
363
373
  },
364
374
  enumerable: false,
365
375
  configurable: true
366
376
  });
367
377
  Object.defineProperty(ConfigurationBase.prototype, "cssRef", {
368
378
  get: function () {
369
- return this.activeConfigParams.px_css_ref;
379
+ return this.configParams.px_css_ref;
370
380
  },
371
381
  enumerable: false,
372
382
  configurable: true
373
383
  });
374
384
  Object.defineProperty(ConfigurationBase.prototype, "jsRef", {
375
385
  get: function () {
376
- return this.activeConfigParams.px_js_ref;
386
+ return this.configParams.px_js_ref;
377
387
  },
378
388
  enumerable: false,
379
389
  configurable: true
380
390
  });
381
391
  Object.defineProperty(ConfigurationBase.prototype, "riskCookieMaxIterations", {
382
392
  get: function () {
383
- return this.activeConfigParams.px_risk_cookie_max_iterations;
393
+ return this.configParams.px_risk_cookie_max_iterations;
384
394
  },
385
395
  enumerable: false,
386
396
  configurable: true
387
397
  });
388
398
  Object.defineProperty(ConfigurationBase.prototype, "riskCookieMinIterations", {
389
399
  get: function () {
390
- return this.activeConfigParams.px_risk_cookie_min_iterations;
400
+ return this.configParams.px_risk_cookie_min_iterations;
391
401
  },
392
402
  enumerable: false,
393
403
  configurable: true
394
404
  });
395
405
  Object.defineProperty(ConfigurationBase.prototype, "riskCookieMaxLength", {
396
406
  get: function () {
397
- return this.activeConfigParams.px_risk_cookie_max_length;
407
+ return this.configParams.px_risk_cookie_max_length;
398
408
  },
399
409
  enumerable: false,
400
410
  configurable: true
401
411
  });
402
412
  Object.defineProperty(ConfigurationBase.prototype, "userAgentMaxLength", {
403
413
  get: function () {
404
- return this.activeConfigParams.px_user_agent_max_length;
414
+ return this.configParams.px_user_agent_max_length;
405
415
  },
406
416
  enumerable: false,
407
417
  configurable: true
408
418
  });
409
419
  Object.defineProperty(ConfigurationBase.prototype, "maxActivityBatchSize", {
410
420
  get: function () {
411
- return this.activeConfigParams.px_max_activity_batch_size;
421
+ return this.configParams.px_max_activity_batch_size;
412
422
  },
413
423
  enumerable: false,
414
424
  configurable: true
415
425
  });
416
426
  Object.defineProperty(ConfigurationBase.prototype, "activityBatchTimeoutMs", {
417
427
  get: function () {
418
- return this.activeConfigParams.px_batch_activities_timeout_ms;
428
+ return this.configParams.px_batch_activities_timeout_ms;
419
429
  },
420
430
  enumerable: false,
421
431
  configurable: true
422
432
  });
423
433
  Object.defineProperty(ConfigurationBase.prototype, "graphqlEnabled", {
424
434
  get: function () {
425
- return this.activeConfigParams.px_graphql_enabled;
435
+ return this.configParams.px_graphql_enabled;
426
436
  },
427
437
  enumerable: false,
428
438
  configurable: true
429
439
  });
430
440
  Object.defineProperty(ConfigurationBase.prototype, "graphqlRoutes", {
431
441
  get: function () {
432
- return this.activeConfigParams.px_graphql_routes;
442
+ return this.configParams.px_graphql_routes;
433
443
  },
434
444
  enumerable: false,
435
445
  configurable: true
436
446
  });
437
447
  Object.defineProperty(ConfigurationBase.prototype, "graphqlKeywords", {
438
448
  get: function () {
439
- return this.activeConfigParams.px_graphql_keywords;
449
+ return this.configParams.px_graphql_keywords;
440
450
  },
441
451
  enumerable: false,
442
452
  configurable: true
443
453
  });
444
454
  Object.defineProperty(ConfigurationBase.prototype, "extractGraphQLKeywords", {
445
455
  get: function () {
446
- return this.activeConfigParams.px_extract_graphql_keywords;
456
+ return this.configParams.px_extract_graphql_keywords;
447
457
  },
448
458
  enumerable: false,
449
459
  configurable: true
450
460
  });
451
461
  Object.defineProperty(ConfigurationBase.prototype, "sensitiveGraphqlOperationNames", {
452
462
  get: function () {
453
- return this.activeConfigParams.px_sensitive_graphql_operation_names;
463
+ return this.configParams.px_sensitive_graphql_operation_names;
454
464
  },
455
465
  enumerable: false,
456
466
  configurable: true
457
467
  });
458
468
  Object.defineProperty(ConfigurationBase.prototype, "sensitiveGraphqlOperationTypes", {
459
469
  get: function () {
460
- return this.activeConfigParams.px_sensitive_graphql_operation_types;
470
+ return this.configParams.px_sensitive_graphql_operation_types;
461
471
  },
462
472
  enumerable: false,
463
473
  configurable: true
464
474
  });
465
475
  Object.defineProperty(ConfigurationBase.prototype, "enrichCustomParameters", {
466
476
  get: function () {
467
- return this.activeConfigParams.px_enrich_custom_parameters || null;
477
+ return this.configParams.px_enrich_custom_parameters;
468
478
  },
469
479
  enumerable: false,
470
480
  configurable: true
471
481
  });
472
482
  Object.defineProperty(ConfigurationBase.prototype, "additionalActivityHandler", {
473
483
  get: function () {
474
- return this.activeConfigParams.px_additional_activity_handler || null;
484
+ return this.configParams.px_additional_activity_handler;
475
485
  },
476
486
  enumerable: false,
477
487
  configurable: true
@@ -485,217 +495,224 @@ var ConfigurationBase = /** @class */ (function () {
485
495
  });
486
496
  Object.defineProperty(ConfigurationBase.prototype, "corsSupportEnabled", {
487
497
  get: function () {
488
- return this.activeConfigParams.px_cors_support_enabled;
498
+ return this.configParams.px_cors_support_enabled;
489
499
  },
490
500
  enumerable: false,
491
501
  configurable: true
492
502
  });
493
503
  Object.defineProperty(ConfigurationBase.prototype, "corsCustomPreflightHandler", {
494
504
  get: function () {
495
- return this.activeConfigParams.px_cors_custom_preflight_handler || null;
505
+ return this.configParams.px_cors_custom_preflight_handler;
496
506
  },
497
507
  enumerable: false,
498
508
  configurable: true
499
509
  });
500
510
  Object.defineProperty(ConfigurationBase.prototype, "corsPreflightRequestFilterEnabled", {
501
511
  get: function () {
502
- return this.activeConfigParams.px_cors_preflight_request_filter_enabled;
512
+ return this.configParams.px_cors_preflight_request_filter_enabled;
503
513
  },
504
514
  enumerable: false,
505
515
  configurable: true
506
516
  });
507
517
  Object.defineProperty(ConfigurationBase.prototype, "corsCreateCustomBlockResponseHeaders", {
508
518
  get: function () {
509
- return this.activeConfigParams.px_cors_create_custom_block_response_headers || null;
519
+ return this.configParams.px_cors_create_custom_block_response_headers;
510
520
  },
511
521
  enumerable: false,
512
522
  configurable: true
513
523
  });
514
524
  Object.defineProperty(ConfigurationBase.prototype, "jwtCookieAdditionalFieldNames", {
515
525
  get: function () {
516
- return this.activeConfigParams.px_jwt_cookie_additional_field_names;
526
+ return this.configParams.px_jwt_cookie_additional_field_names;
517
527
  },
518
528
  enumerable: false,
519
529
  configurable: true
520
530
  });
521
531
  Object.defineProperty(ConfigurationBase.prototype, "jwtCookieName", {
522
532
  get: function () {
523
- return this.activeConfigParams.px_jwt_cookie_name;
533
+ return this.configParams.px_jwt_cookie_name;
524
534
  },
525
535
  enumerable: false,
526
536
  configurable: true
527
537
  });
528
538
  Object.defineProperty(ConfigurationBase.prototype, "jwtCookieUserIdFieldName", {
529
539
  get: function () {
530
- return this.activeConfigParams.px_jwt_cookie_user_id_field_name;
540
+ return this.configParams.px_jwt_cookie_user_id_field_name;
531
541
  },
532
542
  enumerable: false,
533
543
  configurable: true
534
544
  });
535
545
  Object.defineProperty(ConfigurationBase.prototype, "jwtHeaderAdditionalFieldNames", {
536
546
  get: function () {
537
- return this.activeConfigParams.px_jwt_header_additional_field_names;
547
+ return this.configParams.px_jwt_header_additional_field_names;
538
548
  },
539
549
  enumerable: false,
540
550
  configurable: true
541
551
  });
542
552
  Object.defineProperty(ConfigurationBase.prototype, "jwtHeaderName", {
543
553
  get: function () {
544
- return this.activeConfigParams.px_jwt_header_name;
554
+ return this.configParams.px_jwt_header_name;
545
555
  },
546
556
  enumerable: false,
547
557
  configurable: true
548
558
  });
549
559
  Object.defineProperty(ConfigurationBase.prototype, "jwtHeaderUserIdFieldName", {
550
560
  get: function () {
551
- return this.activeConfigParams.px_jwt_header_user_id_field_name;
561
+ return this.configParams.px_jwt_header_user_id_field_name;
552
562
  },
553
563
  enumerable: false,
554
564
  configurable: true
555
565
  });
556
566
  Object.defineProperty(ConfigurationBase.prototype, "ciEnabled", {
557
567
  get: function () {
558
- return this.activeConfigParams.px_login_credentials_extraction_enabled;
568
+ return this.configParams.px_login_credentials_extraction_enabled;
559
569
  },
560
570
  enumerable: false,
561
571
  configurable: true
562
572
  });
563
573
  Object.defineProperty(ConfigurationBase.prototype, "loggerAuthToken", {
564
574
  get: function () {
565
- return this.activeConfigParams.px_logger_auth_token;
575
+ return this.configParams.px_logger_auth_token;
566
576
  },
567
577
  enumerable: false,
568
578
  configurable: true
569
579
  });
570
580
  Object.defineProperty(ConfigurationBase.prototype, "ciEndpoints", {
571
581
  get: function () {
572
- return this.activeConfigParams.px_login_credentials_extraction;
582
+ return this.configParams.px_login_credentials_extraction;
573
583
  },
574
584
  enumerable: false,
575
585
  configurable: true
576
586
  });
577
587
  Object.defineProperty(ConfigurationBase.prototype, "ciCompromisedCredentialsHeaderName", {
578
588
  get: function () {
579
- return this.activeConfigParams.px_compromised_credentials_header;
589
+ return this.configParams.px_compromised_credentials_header;
580
590
  },
581
591
  enumerable: false,
582
592
  configurable: true
583
593
  });
584
594
  Object.defineProperty(ConfigurationBase.prototype, "ciSendRawUsernameOnAdditionalS2SActivity", {
585
595
  get: function () {
586
- return this.activeConfigParams.px_send_raw_username_on_additional_s2s_activity;
596
+ return this.configParams.px_send_raw_username_on_additional_s2s_activity;
587
597
  },
588
598
  enumerable: false,
589
599
  configurable: true
590
600
  });
591
601
  Object.defineProperty(ConfigurationBase.prototype, "ciAutomaticAdditionalS2SEnabled", {
592
602
  get: function () {
593
- return this.activeConfigParams.px_automatic_additional_s2s_activity_enabled;
603
+ return this.configParams.px_automatic_additional_s2s_activity_enabled;
594
604
  },
595
605
  enumerable: false,
596
606
  configurable: true
597
607
  });
598
608
  Object.defineProperty(ConfigurationBase.prototype, "ciAdditionalS2SHeaderEnabled", {
599
609
  get: function () {
600
- return this.activeConfigParams.px_additional_s2s_activity_header_enabled;
610
+ return this.configParams.px_additional_s2s_activity_header_enabled;
601
611
  },
602
612
  enumerable: false,
603
613
  configurable: true
604
614
  });
605
615
  Object.defineProperty(ConfigurationBase.prototype, "ciDefaultVersion", {
606
616
  get: function () {
607
- return this.activeConfigParams.px_credentials_intelligence_version;
617
+ return this.configParams.px_credentials_intelligence_version;
608
618
  },
609
619
  enumerable: false,
610
620
  configurable: true
611
621
  });
612
622
  Object.defineProperty(ConfigurationBase.prototype, "ciDefaultLoginSuccessfulReportingMethod", {
613
623
  get: function () {
614
- return this.activeConfigParams.px_login_successful_reporting_method;
624
+ return this.configParams.px_login_successful_reporting_method;
615
625
  },
616
626
  enumerable: false,
617
627
  configurable: true
618
628
  });
619
629
  Object.defineProperty(ConfigurationBase.prototype, "ciDefaultLoginSuccessfulStatus", {
620
630
  get: function () {
621
- return this.activeConfigParams.px_login_successful_status;
631
+ return this.configParams.px_login_successful_status;
622
632
  },
623
633
  enumerable: false,
624
634
  configurable: true
625
635
  });
626
636
  Object.defineProperty(ConfigurationBase.prototype, "ciDefaultLoginSuccessfulBodyRegex", {
627
637
  get: function () {
628
- return this.activeConfigParams.px_login_successful_body_regex;
638
+ return this.configParams.px_login_successful_body_regex;
629
639
  },
630
640
  enumerable: false,
631
641
  configurable: true
632
642
  });
633
643
  Object.defineProperty(ConfigurationBase.prototype, "ciDefaultLoginSuccessfulHeaderName", {
634
644
  get: function () {
635
- return this.activeConfigParams.px_login_successful_header_name;
645
+ return this.configParams.px_login_successful_header_name;
636
646
  },
637
647
  enumerable: false,
638
648
  configurable: true
639
649
  });
640
650
  Object.defineProperty(ConfigurationBase.prototype, "ciDefaultLoginSuccessfulHeaderValue", {
641
651
  get: function () {
642
- return this.activeConfigParams.px_login_successful_header_value;
652
+ return this.configParams.px_login_successful_header_value;
643
653
  },
644
654
  enumerable: false,
645
655
  configurable: true
646
656
  });
647
657
  Object.defineProperty(ConfigurationBase.prototype, "ciDefaultLoginSuccessfulCustomCallback", {
648
658
  get: function () {
649
- return this.activeConfigParams.px_login_successful_custom_callback;
659
+ return this.configParams.px_login_successful_custom_callback;
650
660
  },
651
661
  enumerable: false,
652
662
  configurable: true
653
663
  });
654
664
  Object.defineProperty(ConfigurationBase.prototype, "remoteConfigAuthToken", {
655
665
  get: function () {
656
- return this.activeConfigParams.px_remote_config_auth_token;
666
+ return this.configParams.px_remote_config_auth_token;
657
667
  },
658
668
  enumerable: false,
659
669
  configurable: true
660
670
  });
661
671
  Object.defineProperty(ConfigurationBase.prototype, "remoteConfigVersion", {
662
672
  get: function () {
663
- return this.activeConfigParams.px_remote_config_version;
673
+ return this.configParams.px_remote_config_version;
664
674
  },
665
675
  enumerable: false,
666
676
  configurable: true
667
677
  });
668
678
  Object.defineProperty(ConfigurationBase.prototype, "remoteConfigId", {
669
679
  get: function () {
670
- return this.activeConfigParams.px_remote_config_id;
680
+ return this.configParams.px_remote_config_id;
671
681
  },
672
682
  enumerable: false,
673
683
  configurable: true
674
684
  });
675
685
  Object.defineProperty(ConfigurationBase.prototype, "remoteConfigRetryIntervalMs", {
676
686
  get: function () {
677
- return this.activeConfigParams.px_remote_config_retry_interval_ms;
687
+ return this.configParams.px_remote_config_retry_interval_ms;
678
688
  },
679
689
  enumerable: false,
680
690
  configurable: true
681
691
  });
682
692
  Object.defineProperty(ConfigurationBase.prototype, "remoteConfigMaxFetchAttempts", {
683
693
  get: function () {
684
- return this.activeConfigParams.px_remote_config_max_fetch_attempts;
694
+ return this.configParams.px_remote_config_max_fetch_attempts;
685
695
  },
686
696
  enumerable: false,
687
697
  configurable: true
688
698
  });
689
699
  Object.defineProperty(ConfigurationBase.prototype, "urlDecodeReservedCharacters", {
690
700
  get: function () {
691
- return this.activeConfigParams.px_url_decode_reserved_characters;
701
+ return this.configParams.px_url_decode_reserved_characters;
692
702
  },
693
703
  enumerable: false,
694
704
  configurable: true
695
705
  });
696
706
  Object.defineProperty(ConfigurationBase.prototype, "securedPxhdEnabled", {
697
707
  get: function () {
698
- return this.activeConfigParams.px_secured_pxhd_enabled;
708
+ return this.configParams.px_secured_pxhd_enabled;
709
+ },
710
+ enumerable: false,
711
+ configurable: true
712
+ });
713
+ Object.defineProperty(ConfigurationBase.prototype, "tokenVersion", {
714
+ get: function () {
715
+ return this.configParams.px_token_version;
699
716
  },
700
717
  enumerable: false,
701
718
  configurable: true