perimeterx-js-core 0.8.0 → 0.9.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 (1021) hide show
  1. package/lib/cjs/action/Action.js +10 -0
  2. package/lib/cjs/action/ActionData.js +2 -0
  3. package/lib/cjs/action/ActionPriorityOrder.js +10 -0
  4. package/lib/cjs/action/Decision.js +2 -0
  5. package/lib/cjs/action/ProductAction.js +2 -0
  6. package/lib/cjs/action/index.js +22 -0
  7. package/lib/cjs/action/utils.js +48 -0
  8. package/lib/cjs/activities/ActivityType.js +10 -0
  9. package/lib/cjs/activities/HttpActivityClient.js +121 -0
  10. package/lib/cjs/activities/HttpBatchedActivityClient.js +137 -0
  11. package/lib/cjs/activities/IActivityClient.js +2 -0
  12. package/lib/cjs/activities/constants.js +4 -0
  13. package/lib/cjs/activities/index.js +23 -0
  14. package/lib/cjs/activities/model/AsyncActivity.js +2 -0
  15. package/lib/cjs/activities/model/AsyncActivityDetails.js +2 -0
  16. package/lib/cjs/activities/model/CommonActivityDetails.js +2 -0
  17. package/lib/cjs/activities/model/HeaderEntry.js +2 -0
  18. package/lib/cjs/activities/model/index.js +20 -0
  19. package/lib/cjs/activities/utils.js +220 -0
  20. package/lib/cjs/additional_activity_handler/AdditionalActivityHandler.js +2 -0
  21. package/lib/cjs/additional_activity_handler/AdditionalActivityHandlerUtils.js +65 -0
  22. package/lib/cjs/additional_activity_handler/index.js +18 -0
  23. package/lib/cjs/blocker/BlockAction.js +9 -0
  24. package/lib/cjs/blocker/BlockActionToProductMap.js +10 -0
  25. package/lib/cjs/blocker/BlockActionToWordMap.js +9 -0
  26. package/lib/cjs/blocker/IBlocker.js +2 -0
  27. package/lib/cjs/blocker/IConditionalBlocker.js +2 -0
  28. package/lib/cjs/blocker/index.js +21 -0
  29. package/lib/cjs/config/ConfigurationParams.js +2 -0
  30. package/lib/cjs/config/DefaultConfigurations.js +121 -0
  31. package/lib/cjs/config/IConfiguration.js +2 -0
  32. package/lib/cjs/config/StaticConfigurationBase.js +583 -0
  33. package/lib/cjs/config/index.js +7 -0
  34. package/lib/cjs/context/DefaultContext.js +111 -0
  35. package/lib/cjs/context/index.js +18 -0
  36. package/lib/cjs/context/interfaces/IContext.js +2 -0
  37. package/lib/cjs/context/interfaces/MobileData.js +2 -0
  38. package/lib/cjs/context/interfaces/ReadonlyContext.js +2 -0
  39. package/lib/cjs/context/interfaces/RequestData.js +2 -0
  40. package/lib/cjs/context/interfaces/RiskApiData.js +2 -0
  41. package/lib/cjs/context/interfaces/ServerData.js +2 -0
  42. package/lib/cjs/context/interfaces/TlsData.js +2 -0
  43. package/lib/cjs/context/interfaces/TokenData.js +2 -0
  44. package/lib/cjs/context/interfaces/index.js +24 -0
  45. package/lib/cjs/cors/CustomBlockResponseHeadersHandler.js +2 -0
  46. package/lib/cjs/cors/CustomPreflightHandler.js +2 -0
  47. package/lib/cjs/cors/DefaultCors.js +107 -0
  48. package/lib/cjs/cors/ICors.js +2 -0
  49. package/lib/cjs/cors/constants.js +5 -0
  50. package/lib/cjs/cors/index.js +20 -0
  51. package/lib/cjs/custom_parameters/CustomParameters.js +2 -0
  52. package/lib/cjs/custom_parameters/CustomParametersFunction.js +2 -0
  53. package/lib/cjs/custom_parameters/CustomParametersUtils.js +77 -0
  54. package/lib/cjs/custom_parameters/index.js +5 -0
  55. package/lib/cjs/enforcer/EnforcerBase.js +282 -0
  56. package/lib/cjs/enforcer/IEnforcer.js +2 -0
  57. package/lib/cjs/enforcer/index.js +20 -0
  58. package/lib/cjs/enforcer/options/EnforcerBaseOptions.js +2 -0
  59. package/lib/cjs/enforcer/options/EnforcerOptionsType.js +2 -0
  60. package/lib/cjs/enforcer/options/EnforcerV2Options.js +2 -0
  61. package/lib/cjs/enforcer/options/EnforcerV3Options.js +2 -0
  62. package/lib/cjs/enforcer/options/index.js +20 -0
  63. package/lib/cjs/filter/FilterReason.js +14 -0
  64. package/lib/cjs/filter/IFilter.js +2 -0
  65. package/lib/cjs/filter/index.js +18 -0
  66. package/lib/cjs/first_party/FirstPartyData.js +2 -0
  67. package/lib/cjs/first_party/IFirstParty.js +2 -0
  68. package/lib/cjs/first_party/index.js +18 -0
  69. package/lib/cjs/graphql/DefaultGraphQLParser.js +181 -0
  70. package/lib/cjs/graphql/IGraphQLParser.js +2 -0
  71. package/lib/cjs/graphql/index.js +19 -0
  72. package/lib/cjs/graphql/model/GraphQLData.js +2 -0
  73. package/lib/cjs/graphql/model/GraphQLOperation.js +2 -0
  74. package/lib/cjs/graphql/model/GraphQLOperationType.js +9 -0
  75. package/lib/cjs/graphql/model/index.js +19 -0
  76. package/lib/cjs/http/index.js +18 -0
  77. package/lib/cjs/http/interfaces/IBody.js +2 -0
  78. package/lib/cjs/http/interfaces/IFormData.js +2 -0
  79. package/lib/cjs/http/interfaces/IHeaders.js +2 -0
  80. package/lib/cjs/http/interfaces/IHttpClient.js +2 -0
  81. package/lib/cjs/http/interfaces/IIncomingRequest.js +2 -0
  82. package/lib/cjs/http/interfaces/IIncomingResponse.js +2 -0
  83. package/lib/cjs/http/interfaces/IMinimalResponse.js +2 -0
  84. package/lib/cjs/http/interfaces/IOutgoingRequest.js +2 -0
  85. package/lib/cjs/http/interfaces/IOutgoingResponse.js +2 -0
  86. package/lib/cjs/http/interfaces/IURL.js +2 -0
  87. package/lib/cjs/http/interfaces/IURLSearchParams.js +2 -0
  88. package/lib/cjs/http/interfaces/ReadonlyHeaders.js +26 -0
  89. package/lib/cjs/http/interfaces/index.js +28 -0
  90. package/lib/cjs/http/utils/ContentType.js +13 -0
  91. package/lib/cjs/http/utils/FormDataImpl.js +43 -0
  92. package/lib/cjs/http/utils/HttpMethod.js +15 -0
  93. package/lib/cjs/http/utils/MinimalResponseImpl.js +12 -0
  94. package/lib/cjs/http/utils/MinimalResponseUtils.js +49 -0
  95. package/lib/cjs/http/utils/MultipartFormDataUtils.js +49 -0
  96. package/lib/cjs/http/utils/OutgoingRequestImpl.js +14 -0
  97. package/lib/cjs/http/utils/URLUtils.js +65 -0
  98. package/lib/cjs/http/utils/UrlImpl.js +73 -0
  99. package/lib/cjs/http/utils/UrlSearchParamsImpl.js +126 -0
  100. package/lib/cjs/http/utils/constants.js +12 -0
  101. package/lib/cjs/http/utils/index.js +27 -0
  102. package/lib/cjs/impl/base64/AtobBase64Utils.js +15 -0
  103. package/lib/cjs/impl/base64/BufferBase64Utils.js +17 -0
  104. package/lib/cjs/impl/base64/JSBase64Base64Utils.js +16 -0
  105. package/lib/cjs/impl/cipher/CryptoCipherUtils.js +87 -0
  106. package/lib/cjs/impl/cipher/SubtleCryptoCipherUtils.js +94 -0
  107. package/lib/cjs/impl/hash/CryptoHashUtils.js +78 -0
  108. package/lib/cjs/impl/hash/CryptoJSHashUtils.js +22 -0
  109. package/lib/cjs/impl/hash/SubtleCryptoHashUtils.js +95 -0
  110. package/lib/cjs/impl/hmac/CryptoHmacUtils.js +48 -0
  111. package/lib/cjs/impl/hmac/CryptoJSHmacUtils.js +22 -0
  112. package/lib/cjs/impl/http/phin/PhinHttpClient.js +84 -0
  113. package/lib/cjs/impl/http/phin/PhinIncomingResponse.js +99 -0
  114. package/lib/cjs/impl/http/phin/index.js +18 -0
  115. package/lib/cjs/impl/ip_range_checker/DefaultIpRangeChecker.js +16 -0
  116. package/lib/cjs/impl/request_id_generator/UuidRequestIdGenerator.js +13 -0
  117. package/lib/cjs/impl/url_parser/DefaultUrlParser.js +39 -0
  118. package/lib/cjs/index.js +38 -0
  119. package/lib/cjs/logger/DefaultLogger.js +31 -0
  120. package/lib/cjs/logger/HttpLogServiceClient.js +123 -0
  121. package/lib/cjs/logger/ILogServiceClient.js +2 -0
  122. package/lib/cjs/logger/ILogger.js +2 -0
  123. package/lib/cjs/logger/LoggerBase.js +48 -0
  124. package/lib/cjs/logger/LoggerSeverity.js +9 -0
  125. package/lib/cjs/logger/constants.js +5 -0
  126. package/lib/cjs/logger/index.js +27 -0
  127. package/lib/cjs/logger/model/EnrichedLogRecord.js +2 -0
  128. package/lib/cjs/logger/model/LogMetadata.js +2 -0
  129. package/lib/cjs/logger/model/LogRecord.js +2 -0
  130. package/lib/cjs/logger/model/index.js +19 -0
  131. package/lib/cjs/package.json +1 -0
  132. package/lib/cjs/phase/IPhase.js +2 -0
  133. package/lib/cjs/phase/PhaseResult.js +2 -0
  134. package/lib/cjs/phase/flow/EndEnforcerFlow.js +32 -0
  135. package/lib/cjs/phase/flow/EnforceFlow.js +38 -0
  136. package/lib/cjs/phase/flow/FilterFlow.js +34 -0
  137. package/lib/cjs/phase/flow/PostEnforceFlow.js +32 -0
  138. package/lib/cjs/phase/flow/index.js +20 -0
  139. package/lib/cjs/phase/impl/AdditionalActivityHandlerPhase.js +59 -0
  140. package/lib/cjs/phase/impl/CompositePhase.js +72 -0
  141. package/lib/cjs/phase/impl/CreateBlockResponsePhase.js +110 -0
  142. package/lib/cjs/phase/impl/DecideActionPhase.js +68 -0
  143. package/lib/cjs/phase/impl/EnrichContextFromRequestPhase.js +175 -0
  144. package/lib/cjs/phase/impl/EnrichContextFromResponsePhase.js +95 -0
  145. package/lib/cjs/phase/impl/FilterPhase.js +53 -0
  146. package/lib/cjs/phase/impl/FirstPartyPhase.js +100 -0
  147. package/lib/cjs/phase/impl/ModifyIncomingRequestPhase.js +58 -0
  148. package/lib/cjs/phase/impl/ModifyOutgoingResponsePhase.js +63 -0
  149. package/lib/cjs/phase/impl/ParseTokenPhase.js +76 -0
  150. package/lib/cjs/phase/impl/PreflightPhase.js +68 -0
  151. package/lib/cjs/phase/impl/RiskApiPhase.js +179 -0
  152. package/lib/cjs/phase/impl/SendAsyncActivitiesOnRequestPhase.js +74 -0
  153. package/lib/cjs/phase/impl/SendAsyncActivitiesOnResponsePhase.js +58 -0
  154. package/lib/cjs/phase/impl/SendLogsPhase.js +66 -0
  155. package/lib/cjs/phase/impl/TelemetryPhase.js +75 -0
  156. package/lib/cjs/phase/impl/index.js +33 -0
  157. package/lib/cjs/phase/index.js +20 -0
  158. package/lib/cjs/products/account_defender/AccountDefender.js +161 -0
  159. package/lib/cjs/products/account_defender/AccountDefenderData.js +2 -0
  160. package/lib/cjs/products/account_defender/IAccountDefender.js +2 -0
  161. package/lib/cjs/products/account_defender/JwtData.js +2 -0
  162. package/lib/cjs/products/account_defender/constants.js +4 -0
  163. package/lib/cjs/products/account_defender/index.js +21 -0
  164. package/lib/cjs/products/bot_defender/BotDefender.js +208 -0
  165. package/lib/cjs/products/bot_defender/BotDefenderActionData.js +11 -0
  166. package/lib/cjs/products/bot_defender/BotDefenderData.js +2 -0
  167. package/lib/cjs/products/bot_defender/BotDefenderUtils.js +22 -0
  168. package/lib/cjs/products/bot_defender/IBotDefender.js +2 -0
  169. package/lib/cjs/products/bot_defender/block/DefaultBotDefenderBlocker.js +46 -0
  170. package/lib/cjs/products/bot_defender/block/captcha/CaptchaBlocker.js +25 -0
  171. package/lib/cjs/products/bot_defender/block/captcha/HtmlCaptchaBlocker.js +26 -0
  172. package/lib/cjs/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +42 -0
  173. package/lib/cjs/products/bot_defender/block/captcha/MobileCaptchaBlocker.js +40 -0
  174. package/lib/cjs/products/bot_defender/block/captcha/index.js +20 -0
  175. package/lib/cjs/products/bot_defender/block/index.js +21 -0
  176. package/lib/cjs/products/bot_defender/block/model/BlockData.js +2 -0
  177. package/lib/cjs/products/bot_defender/block/model/JsonBlockPayload.js +2 -0
  178. package/lib/cjs/products/bot_defender/block/model/MobileBlockPayload.js +2 -0
  179. package/lib/cjs/products/bot_defender/block/model/index.js +19 -0
  180. package/lib/cjs/products/bot_defender/block/templates/captcha_template.js +4 -0
  181. package/lib/cjs/products/bot_defender/block/templates/index.js +18 -0
  182. package/lib/cjs/products/bot_defender/block/templates/rate_limit_template.js +4 -0
  183. package/lib/cjs/products/bot_defender/block/utils.js +50 -0
  184. package/lib/cjs/products/bot_defender/filter/DefaultBotDefenderFilter.js +61 -0
  185. package/lib/cjs/products/bot_defender/filter/index.js +17 -0
  186. package/lib/cjs/products/bot_defender/first_party/DefaultBotDefenderFirstParty.js +201 -0
  187. package/lib/cjs/products/bot_defender/first_party/FirstPartySuffix.js +9 -0
  188. package/lib/cjs/products/bot_defender/first_party/constants.js +33 -0
  189. package/lib/cjs/products/bot_defender/first_party/index.js +20 -0
  190. package/lib/cjs/products/bot_defender/first_party/utils.js +58 -0
  191. package/lib/cjs/products/bot_defender/index.js +25 -0
  192. package/lib/cjs/products/bot_defender/reasons/BotDefenderBlockReason.js +8 -0
  193. package/lib/cjs/products/bot_defender/reasons/BotDefenderPassReason.js +10 -0
  194. package/lib/cjs/products/bot_defender/reasons/BotDefenderReasonType.js +2 -0
  195. package/lib/cjs/products/bot_defender/reasons/BotDefenderS2SCallReason.js +16 -0
  196. package/lib/cjs/products/bot_defender/reasons/index.js +20 -0
  197. package/lib/cjs/products/credential_intelligence/CredentialIntelligence.js +171 -0
  198. package/lib/cjs/products/credential_intelligence/ICredentialIntelligence.js +2 -0
  199. package/lib/cjs/products/credential_intelligence/constants.js +7 -0
  200. package/lib/cjs/products/credential_intelligence/endpoint/CredentialEndpoint.js +79 -0
  201. package/lib/cjs/products/credential_intelligence/endpoint/CredentialEndpointConfiguration.js +2 -0
  202. package/lib/cjs/products/credential_intelligence/endpoint/CredentialEndpointManager.js +78 -0
  203. package/lib/cjs/products/credential_intelligence/endpoint/ICredentialEndpoint.js +2 -0
  204. package/lib/cjs/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.js +124 -0
  205. package/lib/cjs/products/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.js +28 -0
  206. package/lib/cjs/products/credential_intelligence/endpoint/extractor/CustomCredentialExtractor.js +63 -0
  207. package/lib/cjs/products/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.js +16 -0
  208. package/lib/cjs/products/credential_intelligence/endpoint/extractor/ICredentialExtractor.js +2 -0
  209. package/lib/cjs/products/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.js +62 -0
  210. package/lib/cjs/products/credential_intelligence/endpoint/extractor/SentThrough.js +10 -0
  211. package/lib/cjs/products/credential_intelligence/endpoint/extractor/index.js +21 -0
  212. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceHashProtocolFactory.js +24 -0
  213. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceVersion.js +9 -0
  214. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/ICredentialIntelligenceHashProtocol.js +2 -0
  215. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.js +78 -0
  216. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/SingleStepAndMultistepHashProtocol.js +60 -0
  217. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.js +100 -0
  218. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/SsoStep.js +8 -0
  219. package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/index.js +23 -0
  220. package/lib/cjs/products/credential_intelligence/endpoint/index.js +24 -0
  221. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/BodyLoginSuccessfulParser.js +54 -0
  222. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulCallback.js +2 -0
  223. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.js +66 -0
  224. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.js +57 -0
  225. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/ILoginSuccessfulParser.js +2 -0
  226. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.js +33 -0
  227. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulReportingMethod.js +10 -0
  228. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.js +53 -0
  229. package/lib/cjs/products/credential_intelligence/endpoint/login_successful/index.js +24 -0
  230. package/lib/cjs/products/credential_intelligence/endpoint/matcher/CredentialIntelligenceEndpointMatcherFactory.js +22 -0
  231. package/lib/cjs/products/credential_intelligence/endpoint/matcher/ExactPathEndpointMatcher.js +15 -0
  232. package/lib/cjs/products/credential_intelligence/endpoint/matcher/ICredentialIntelligenceEndpointMatcher.js +2 -0
  233. package/lib/cjs/products/credential_intelligence/endpoint/matcher/PathType.js +8 -0
  234. package/lib/cjs/products/credential_intelligence/endpoint/matcher/RegexPathEndpointMatcher.js +15 -0
  235. package/lib/cjs/products/credential_intelligence/endpoint/matcher/index.js +21 -0
  236. package/lib/cjs/products/credential_intelligence/index.js +21 -0
  237. package/lib/cjs/products/credential_intelligence/model/CredentialData.js +2 -0
  238. package/lib/cjs/products/credential_intelligence/model/CredentialIntelligenceData.js +2 -0
  239. package/lib/cjs/products/credential_intelligence/model/Credentials.js +2 -0
  240. package/lib/cjs/products/credential_intelligence/model/CustomExtractionCallback.js +2 -0
  241. package/lib/cjs/products/credential_intelligence/model/index.js +20 -0
  242. package/lib/cjs/products/index.js +21 -0
  243. package/lib/cjs/products/interfaces/IProduct.js +2 -0
  244. package/lib/cjs/products/interfaces/ProductData.js +2 -0
  245. package/lib/cjs/products/interfaces/ProductDataType.js +2 -0
  246. package/lib/cjs/products/interfaces/ProductType.js +2 -0
  247. package/lib/cjs/products/interfaces/Products.js +2 -0
  248. package/lib/cjs/products/interfaces/index.js +21 -0
  249. package/lib/cjs/products/utils/ProductName.js +11 -0
  250. package/lib/cjs/products/utils/ProductPriorityOrder.js +11 -0
  251. package/lib/cjs/products/utils/index.js +19 -0
  252. package/lib/cjs/products/utils/utils.js +18 -0
  253. package/lib/cjs/pxde/DefaultDataEnrichment.js +130 -0
  254. package/lib/cjs/pxde/IDataEnrichment.js +2 -0
  255. package/lib/cjs/pxde/constants.js +7 -0
  256. package/lib/cjs/pxde/index.js +20 -0
  257. package/lib/cjs/pxde/model/PXDE.js +2 -0
  258. package/lib/cjs/pxde/model/PxdeData.js +2 -0
  259. package/lib/cjs/pxde/model/index.js +18 -0
  260. package/lib/cjs/pxhd/PXHDUtils.js +31 -0
  261. package/lib/cjs/pxhd/index.js +20 -0
  262. package/lib/cjs/pxhd/model/PXHD.js +2 -0
  263. package/lib/cjs/pxhd/model/PXHDSource.js +8 -0
  264. package/lib/cjs/pxhd/model/index.js +18 -0
  265. package/lib/cjs/risk_api/client/IRiskApiClient.js +2 -0
  266. package/lib/cjs/risk_api/client/PostRiskApiClientBase.js +232 -0
  267. package/lib/cjs/risk_api/client/PostRiskApiClientV2.js +31 -0
  268. package/lib/cjs/risk_api/client/PostRiskApiClientV3.js +31 -0
  269. package/lib/cjs/risk_api/client/index.js +20 -0
  270. package/lib/cjs/risk_api/constants.js +4 -0
  271. package/lib/cjs/risk_api/index.js +20 -0
  272. package/lib/cjs/risk_api/model/RiskActivity.js +2 -0
  273. package/lib/cjs/risk_api/model/RiskApiCallResult.js +10 -0
  274. package/lib/cjs/risk_api/model/RiskStatus.js +8 -0
  275. package/lib/cjs/risk_api/model/S2SErrorReason.js +12 -0
  276. package/lib/cjs/risk_api/model/index.js +20 -0
  277. package/lib/cjs/risk_api/risk_response/IRiskResponse.js +2 -0
  278. package/lib/cjs/risk_api/risk_response/RiskResponseBase.js +131 -0
  279. package/lib/cjs/risk_api/risk_response/RiskResponsePayloadType.js +2 -0
  280. package/lib/cjs/risk_api/risk_response/index.js +20 -0
  281. package/lib/cjs/risk_api/risk_response/v2/DefaultRiskResponseV2.js +43 -0
  282. package/lib/cjs/risk_api/risk_response/v2/RiskResponseV2Payload.js +2 -0
  283. package/lib/cjs/risk_api/risk_response/v2/index.js +18 -0
  284. package/lib/cjs/risk_api/risk_response/v3/DefaultRiskResponseV3.js +39 -0
  285. package/lib/cjs/risk_api/risk_response/v3/RiskResponseV3Payload.js +2 -0
  286. package/lib/cjs/risk_api/risk_response/v3/index.js +18 -0
  287. package/lib/cjs/risk_token/MobileError.js +10 -0
  288. package/lib/cjs/risk_token/TokenOrigin.js +8 -0
  289. package/lib/cjs/risk_token/TokenParseResult.js +10 -0
  290. package/lib/cjs/risk_token/TokenVersion.js +8 -0
  291. package/lib/cjs/risk_token/constants.js +12 -0
  292. package/lib/cjs/risk_token/index.js +29 -0
  293. package/lib/cjs/risk_token/parser/DefaultTokenV2Parser.js +35 -0
  294. package/lib/cjs/risk_token/parser/DefaultTokenV3Parser.js +35 -0
  295. package/lib/cjs/risk_token/parser/ITokenParser.js +2 -0
  296. package/lib/cjs/risk_token/parser/TokenParserBase.js +154 -0
  297. package/lib/cjs/risk_token/parser/TokenParserOptions.js +2 -0
  298. package/lib/cjs/risk_token/parser/index.js +21 -0
  299. package/lib/cjs/risk_token/token/IToken.js +2 -0
  300. package/lib/cjs/risk_token/token/TokenBase.js +98 -0
  301. package/lib/cjs/risk_token/token/TokenPayloadType.js +2 -0
  302. package/lib/cjs/risk_token/token/index.js +11 -0
  303. package/lib/cjs/risk_token/token/v2/DefaultTokenV2.js +201 -0
  304. package/lib/cjs/risk_token/token/v2/TokenV2Payload.js +2 -0
  305. package/lib/cjs/risk_token/token/v3/DefaultTokenV3.js +233 -0
  306. package/lib/cjs/risk_token/token/v3/TokenSignField.js +8 -0
  307. package/lib/cjs/risk_token/token/v3/TokenV3Payload.js +2 -0
  308. package/lib/cjs/risk_token/utils.js +16 -0
  309. package/lib/cjs/telemetry/DefaultTelemetry.js +187 -0
  310. package/lib/cjs/telemetry/ITelemetry.js +2 -0
  311. package/lib/cjs/telemetry/constants.js +10 -0
  312. package/lib/cjs/telemetry/index.js +20 -0
  313. package/lib/cjs/telemetry/model/TelemetryActivity.js +2 -0
  314. package/lib/cjs/utils/Algorithm.js +8 -0
  315. package/lib/cjs/utils/ModuleMode.js +8 -0
  316. package/lib/cjs/utils/VidSource.js +8 -0
  317. package/lib/cjs/utils/base64/IBase64Utils.js +2 -0
  318. package/lib/cjs/utils/base64/index.js +17 -0
  319. package/lib/cjs/utils/cipher/ICipherUtils.js +2 -0
  320. package/lib/cjs/utils/cipher/index.js +17 -0
  321. package/lib/cjs/utils/constants.js +15 -0
  322. package/lib/cjs/utils/cookie_parser/ICookieParser.js +2 -0
  323. package/lib/cjs/utils/cookie_parser/StringSplitCookieParser.js +36 -0
  324. package/lib/cjs/utils/cookie_parser/index.js +18 -0
  325. package/lib/cjs/utils/error/EnforcerError.js +29 -0
  326. package/lib/cjs/utils/error/EnforcerErrorName.js +8 -0
  327. package/lib/cjs/utils/error/EnforcerTimeoutError.js +30 -0
  328. package/lib/cjs/utils/error/index.js +9 -0
  329. package/lib/cjs/utils/hash/IHashUtils.js +2 -0
  330. package/lib/cjs/utils/hash/index.js +17 -0
  331. package/lib/cjs/utils/hmac/IHmacUtils.js +2 -0
  332. package/lib/cjs/utils/hmac/index.js +17 -0
  333. package/lib/cjs/utils/index.js +30 -0
  334. package/lib/cjs/utils/ip_range_checker/IIpRangeChecker.js +2 -0
  335. package/lib/cjs/utils/ip_range_checker/index.js +17 -0
  336. package/lib/cjs/utils/request_id_generator/IRequestIdGenerator.js +2 -0
  337. package/lib/cjs/utils/request_id_generator/index.js +17 -0
  338. package/lib/cjs/utils/url_parser/IURLParser.js +2 -0
  339. package/lib/cjs/utils/url_parser/index.js +17 -0
  340. package/lib/cjs/utils/utils.js +165 -0
  341. package/lib/esm/utils/constants.js +12 -0
  342. package/lib/types/utils/constants.d.ts +12 -0
  343. package/package.json +17 -5
  344. package/lib/utils/constants.d.ts +0 -12
  345. package/lib/utils/constants.js +0 -12
  346. /package/lib/{action → esm/action}/Action.js +0 -0
  347. /package/lib/{action → esm/action}/ActionData.js +0 -0
  348. /package/lib/{action → esm/action}/ActionPriorityOrder.js +0 -0
  349. /package/lib/{action → esm/action}/Decision.js +0 -0
  350. /package/lib/{action → esm/action}/ProductAction.js +0 -0
  351. /package/lib/{action → esm/action}/index.js +0 -0
  352. /package/lib/{action → esm/action}/utils.js +0 -0
  353. /package/lib/{activities → esm/activities}/ActivityType.js +0 -0
  354. /package/lib/{activities → esm/activities}/HttpActivityClient.js +0 -0
  355. /package/lib/{activities → esm/activities}/HttpBatchedActivityClient.js +0 -0
  356. /package/lib/{activities → esm/activities}/IActivityClient.js +0 -0
  357. /package/lib/{activities → esm/activities}/constants.js +0 -0
  358. /package/lib/{activities → esm/activities}/index.js +0 -0
  359. /package/lib/{activities → esm/activities}/model/AsyncActivity.js +0 -0
  360. /package/lib/{activities → esm/activities}/model/AsyncActivityDetails.js +0 -0
  361. /package/lib/{activities → esm/activities}/model/CommonActivityDetails.js +0 -0
  362. /package/lib/{activities → esm/activities}/model/HeaderEntry.js +0 -0
  363. /package/lib/{activities → esm/activities}/model/index.js +0 -0
  364. /package/lib/{activities → esm/activities}/utils.js +0 -0
  365. /package/lib/{additional_activity_handler → esm/additional_activity_handler}/AdditionalActivityHandler.js +0 -0
  366. /package/lib/{additional_activity_handler → esm/additional_activity_handler}/AdditionalActivityHandlerUtils.js +0 -0
  367. /package/lib/{additional_activity_handler → esm/additional_activity_handler}/index.js +0 -0
  368. /package/lib/{blocker → esm/blocker}/BlockAction.js +0 -0
  369. /package/lib/{blocker → esm/blocker}/BlockActionToProductMap.js +0 -0
  370. /package/lib/{blocker → esm/blocker}/BlockActionToWordMap.js +0 -0
  371. /package/lib/{blocker → esm/blocker}/IBlocker.js +0 -0
  372. /package/lib/{blocker → esm/blocker}/IConditionalBlocker.js +0 -0
  373. /package/lib/{blocker → esm/blocker}/index.js +0 -0
  374. /package/lib/{config → esm/config}/ConfigurationParams.js +0 -0
  375. /package/lib/{config → esm/config}/DefaultConfigurations.js +0 -0
  376. /package/lib/{config → esm/config}/IConfiguration.js +0 -0
  377. /package/lib/{config → esm/config}/StaticConfigurationBase.js +0 -0
  378. /package/lib/{config → esm/config}/index.js +0 -0
  379. /package/lib/{context → esm/context}/DefaultContext.js +0 -0
  380. /package/lib/{context → esm/context}/index.js +0 -0
  381. /package/lib/{context → esm/context}/interfaces/IContext.js +0 -0
  382. /package/lib/{context → esm/context}/interfaces/MobileData.js +0 -0
  383. /package/lib/{context → esm/context}/interfaces/ReadonlyContext.js +0 -0
  384. /package/lib/{context → esm/context}/interfaces/RequestData.js +0 -0
  385. /package/lib/{context → esm/context}/interfaces/RiskApiData.js +0 -0
  386. /package/lib/{context → esm/context}/interfaces/ServerData.js +0 -0
  387. /package/lib/{context → esm/context}/interfaces/TlsData.js +0 -0
  388. /package/lib/{context → esm/context}/interfaces/TokenData.js +0 -0
  389. /package/lib/{context → esm/context}/interfaces/index.js +0 -0
  390. /package/lib/{cors → esm/cors}/CustomBlockResponseHeadersHandler.js +0 -0
  391. /package/lib/{cors → esm/cors}/CustomPreflightHandler.js +0 -0
  392. /package/lib/{cors → esm/cors}/DefaultCors.js +0 -0
  393. /package/lib/{cors → esm/cors}/ICors.js +0 -0
  394. /package/lib/{cors → esm/cors}/constants.js +0 -0
  395. /package/lib/{cors → esm/cors}/index.js +0 -0
  396. /package/lib/{custom_parameters → esm/custom_parameters}/CustomParameters.js +0 -0
  397. /package/lib/{custom_parameters → esm/custom_parameters}/CustomParametersFunction.js +0 -0
  398. /package/lib/{custom_parameters → esm/custom_parameters}/CustomParametersUtils.js +0 -0
  399. /package/lib/{custom_parameters → esm/custom_parameters}/index.js +0 -0
  400. /package/lib/{enforcer → esm/enforcer}/EnforcerBase.js +0 -0
  401. /package/lib/{enforcer → esm/enforcer}/IEnforcer.js +0 -0
  402. /package/lib/{enforcer → esm/enforcer}/index.js +0 -0
  403. /package/lib/{enforcer → esm/enforcer}/options/EnforcerBaseOptions.js +0 -0
  404. /package/lib/{enforcer → esm/enforcer}/options/EnforcerOptionsType.js +0 -0
  405. /package/lib/{enforcer → esm/enforcer}/options/EnforcerV2Options.js +0 -0
  406. /package/lib/{enforcer → esm/enforcer}/options/EnforcerV3Options.js +0 -0
  407. /package/lib/{enforcer → esm/enforcer}/options/index.js +0 -0
  408. /package/lib/{filter → esm/filter}/FilterReason.js +0 -0
  409. /package/lib/{filter → esm/filter}/IFilter.js +0 -0
  410. /package/lib/{filter → esm/filter}/index.js +0 -0
  411. /package/lib/{first_party → esm/first_party}/FirstPartyData.js +0 -0
  412. /package/lib/{first_party → esm/first_party}/IFirstParty.js +0 -0
  413. /package/lib/{first_party → esm/first_party}/index.js +0 -0
  414. /package/lib/{graphql → esm/graphql}/DefaultGraphQLParser.js +0 -0
  415. /package/lib/{graphql → esm/graphql}/IGraphQLParser.js +0 -0
  416. /package/lib/{graphql → esm/graphql}/index.js +0 -0
  417. /package/lib/{graphql → esm/graphql}/model/GraphQLData.js +0 -0
  418. /package/lib/{graphql → esm/graphql}/model/GraphQLOperation.js +0 -0
  419. /package/lib/{graphql → esm/graphql}/model/GraphQLOperationType.js +0 -0
  420. /package/lib/{graphql → esm/graphql}/model/index.js +0 -0
  421. /package/lib/{http → esm/http}/index.js +0 -0
  422. /package/lib/{http → esm/http}/interfaces/IBody.js +0 -0
  423. /package/lib/{http → esm/http}/interfaces/IFormData.js +0 -0
  424. /package/lib/{http → esm/http}/interfaces/IHeaders.js +0 -0
  425. /package/lib/{http → esm/http}/interfaces/IHttpClient.js +0 -0
  426. /package/lib/{http → esm/http}/interfaces/IIncomingRequest.js +0 -0
  427. /package/lib/{http → esm/http}/interfaces/IIncomingResponse.js +0 -0
  428. /package/lib/{http → esm/http}/interfaces/IMinimalResponse.js +0 -0
  429. /package/lib/{http → esm/http}/interfaces/IOutgoingRequest.js +0 -0
  430. /package/lib/{http → esm/http}/interfaces/IOutgoingResponse.js +0 -0
  431. /package/lib/{http → esm/http}/interfaces/IURL.js +0 -0
  432. /package/lib/{http → esm/http}/interfaces/IURLSearchParams.js +0 -0
  433. /package/lib/{http → esm/http}/interfaces/ReadonlyHeaders.js +0 -0
  434. /package/lib/{http → esm/http}/interfaces/index.js +0 -0
  435. /package/lib/{http → esm/http}/utils/ContentType.js +0 -0
  436. /package/lib/{http → esm/http}/utils/FormDataImpl.js +0 -0
  437. /package/lib/{http → esm/http}/utils/HttpMethod.js +0 -0
  438. /package/lib/{http → esm/http}/utils/MinimalResponseImpl.js +0 -0
  439. /package/lib/{http → esm/http}/utils/MinimalResponseUtils.js +0 -0
  440. /package/lib/{http → esm/http}/utils/MultipartFormDataUtils.js +0 -0
  441. /package/lib/{http → esm/http}/utils/OutgoingRequestImpl.js +0 -0
  442. /package/lib/{http → esm/http}/utils/URLUtils.js +0 -0
  443. /package/lib/{http → esm/http}/utils/UrlImpl.js +0 -0
  444. /package/lib/{http → esm/http}/utils/UrlSearchParamsImpl.js +0 -0
  445. /package/lib/{http → esm/http}/utils/constants.js +0 -0
  446. /package/lib/{http → esm/http}/utils/index.js +0 -0
  447. /package/lib/{impl → esm/impl}/base64/AtobBase64Utils.js +0 -0
  448. /package/lib/{impl → esm/impl}/base64/BufferBase64Utils.js +0 -0
  449. /package/lib/{impl → esm/impl}/base64/JSBase64Base64Utils.js +0 -0
  450. /package/lib/{impl → esm/impl}/cipher/CryptoCipherUtils.js +0 -0
  451. /package/lib/{impl → esm/impl}/cipher/SubtleCryptoCipherUtils.js +0 -0
  452. /package/lib/{impl → esm/impl}/hash/CryptoHashUtils.js +0 -0
  453. /package/lib/{impl → esm/impl}/hash/CryptoJSHashUtils.js +0 -0
  454. /package/lib/{impl → esm/impl}/hash/SubtleCryptoHashUtils.js +0 -0
  455. /package/lib/{impl → esm/impl}/hmac/CryptoHmacUtils.js +0 -0
  456. /package/lib/{impl → esm/impl}/hmac/CryptoJSHmacUtils.js +0 -0
  457. /package/lib/{impl → esm/impl}/http/phin/PhinHttpClient.js +0 -0
  458. /package/lib/{impl → esm/impl}/http/phin/PhinIncomingResponse.js +0 -0
  459. /package/lib/{impl → esm/impl}/http/phin/index.js +0 -0
  460. /package/lib/{impl → esm/impl}/ip_range_checker/DefaultIpRangeChecker.js +0 -0
  461. /package/lib/{impl → esm/impl}/request_id_generator/UuidRequestIdGenerator.js +0 -0
  462. /package/lib/{impl → esm/impl}/url_parser/DefaultUrlParser.js +0 -0
  463. /package/lib/{index.js → esm/index.js} +0 -0
  464. /package/lib/{logger → esm/logger}/DefaultLogger.js +0 -0
  465. /package/lib/{logger → esm/logger}/HttpLogServiceClient.js +0 -0
  466. /package/lib/{logger → esm/logger}/ILogServiceClient.js +0 -0
  467. /package/lib/{logger → esm/logger}/ILogger.js +0 -0
  468. /package/lib/{logger → esm/logger}/LoggerBase.js +0 -0
  469. /package/lib/{logger → esm/logger}/LoggerSeverity.js +0 -0
  470. /package/lib/{logger → esm/logger}/constants.js +0 -0
  471. /package/lib/{logger → esm/logger}/index.js +0 -0
  472. /package/lib/{logger → esm/logger}/model/EnrichedLogRecord.js +0 -0
  473. /package/lib/{logger → esm/logger}/model/LogMetadata.js +0 -0
  474. /package/lib/{logger → esm/logger}/model/LogRecord.js +0 -0
  475. /package/lib/{logger → esm/logger}/model/index.js +0 -0
  476. /package/lib/{phase → esm/phase}/IPhase.js +0 -0
  477. /package/lib/{phase → esm/phase}/PhaseResult.js +0 -0
  478. /package/lib/{phase → esm/phase}/flow/EndEnforcerFlow.js +0 -0
  479. /package/lib/{phase → esm/phase}/flow/EnforceFlow.js +0 -0
  480. /package/lib/{phase → esm/phase}/flow/FilterFlow.js +0 -0
  481. /package/lib/{phase → esm/phase}/flow/PostEnforceFlow.js +0 -0
  482. /package/lib/{phase → esm/phase}/flow/index.js +0 -0
  483. /package/lib/{phase → esm/phase}/impl/AdditionalActivityHandlerPhase.js +0 -0
  484. /package/lib/{phase → esm/phase}/impl/CompositePhase.js +0 -0
  485. /package/lib/{phase → esm/phase}/impl/CreateBlockResponsePhase.js +0 -0
  486. /package/lib/{phase → esm/phase}/impl/DecideActionPhase.js +0 -0
  487. /package/lib/{phase → esm/phase}/impl/EnrichContextFromRequestPhase.js +0 -0
  488. /package/lib/{phase → esm/phase}/impl/EnrichContextFromResponsePhase.js +0 -0
  489. /package/lib/{phase → esm/phase}/impl/FilterPhase.js +0 -0
  490. /package/lib/{phase → esm/phase}/impl/FirstPartyPhase.js +0 -0
  491. /package/lib/{phase → esm/phase}/impl/ModifyIncomingRequestPhase.js +0 -0
  492. /package/lib/{phase → esm/phase}/impl/ModifyOutgoingResponsePhase.js +0 -0
  493. /package/lib/{phase → esm/phase}/impl/ParseTokenPhase.js +0 -0
  494. /package/lib/{phase → esm/phase}/impl/PreflightPhase.js +0 -0
  495. /package/lib/{phase → esm/phase}/impl/RiskApiPhase.js +0 -0
  496. /package/lib/{phase → esm/phase}/impl/SendAsyncActivitiesOnRequestPhase.js +0 -0
  497. /package/lib/{phase → esm/phase}/impl/SendAsyncActivitiesOnResponsePhase.js +0 -0
  498. /package/lib/{phase → esm/phase}/impl/SendLogsPhase.js +0 -0
  499. /package/lib/{phase → esm/phase}/impl/TelemetryPhase.js +0 -0
  500. /package/lib/{phase → esm/phase}/impl/index.js +0 -0
  501. /package/lib/{phase → esm/phase}/index.js +0 -0
  502. /package/lib/{products → esm/products}/account_defender/AccountDefender.js +0 -0
  503. /package/lib/{products → esm/products}/account_defender/AccountDefenderData.js +0 -0
  504. /package/lib/{products → esm/products}/account_defender/IAccountDefender.js +0 -0
  505. /package/lib/{products → esm/products}/account_defender/JwtData.js +0 -0
  506. /package/lib/{products → esm/products}/account_defender/constants.js +0 -0
  507. /package/lib/{products → esm/products}/account_defender/index.js +0 -0
  508. /package/lib/{products → esm/products}/bot_defender/BotDefender.js +0 -0
  509. /package/lib/{products → esm/products}/bot_defender/BotDefenderActionData.js +0 -0
  510. /package/lib/{products → esm/products}/bot_defender/BotDefenderData.js +0 -0
  511. /package/lib/{products → esm/products}/bot_defender/BotDefenderUtils.js +0 -0
  512. /package/lib/{products → esm/products}/bot_defender/IBotDefender.js +0 -0
  513. /package/lib/{products → esm/products}/bot_defender/block/DefaultBotDefenderBlocker.js +0 -0
  514. /package/lib/{products → esm/products}/bot_defender/block/captcha/CaptchaBlocker.js +0 -0
  515. /package/lib/{products → esm/products}/bot_defender/block/captcha/HtmlCaptchaBlocker.js +0 -0
  516. /package/lib/{products → esm/products}/bot_defender/block/captcha/JsonCaptchaBlocker.js +0 -0
  517. /package/lib/{products → esm/products}/bot_defender/block/captcha/MobileCaptchaBlocker.js +0 -0
  518. /package/lib/{products → esm/products}/bot_defender/block/captcha/index.js +0 -0
  519. /package/lib/{products → esm/products}/bot_defender/block/index.js +0 -0
  520. /package/lib/{products → esm/products}/bot_defender/block/model/BlockData.js +0 -0
  521. /package/lib/{products → esm/products}/bot_defender/block/model/JsonBlockPayload.js +0 -0
  522. /package/lib/{products → esm/products}/bot_defender/block/model/MobileBlockPayload.js +0 -0
  523. /package/lib/{products → esm/products}/bot_defender/block/model/index.js +0 -0
  524. /package/lib/{products → esm/products}/bot_defender/block/templates/captcha_template.js +0 -0
  525. /package/lib/{products → esm/products}/bot_defender/block/templates/index.js +0 -0
  526. /package/lib/{products → esm/products}/bot_defender/block/templates/rate_limit_template.js +0 -0
  527. /package/lib/{products → esm/products}/bot_defender/block/utils.js +0 -0
  528. /package/lib/{products → esm/products}/bot_defender/filter/DefaultBotDefenderFilter.js +0 -0
  529. /package/lib/{products → esm/products}/bot_defender/filter/index.js +0 -0
  530. /package/lib/{products → esm/products}/bot_defender/first_party/DefaultBotDefenderFirstParty.js +0 -0
  531. /package/lib/{products → esm/products}/bot_defender/first_party/FirstPartySuffix.js +0 -0
  532. /package/lib/{products → esm/products}/bot_defender/first_party/constants.js +0 -0
  533. /package/lib/{products → esm/products}/bot_defender/first_party/index.js +0 -0
  534. /package/lib/{products → esm/products}/bot_defender/first_party/utils.js +0 -0
  535. /package/lib/{products → esm/products}/bot_defender/index.js +0 -0
  536. /package/lib/{products → esm/products}/bot_defender/reasons/BotDefenderBlockReason.js +0 -0
  537. /package/lib/{products → esm/products}/bot_defender/reasons/BotDefenderPassReason.js +0 -0
  538. /package/lib/{products → esm/products}/bot_defender/reasons/BotDefenderReasonType.js +0 -0
  539. /package/lib/{products → esm/products}/bot_defender/reasons/BotDefenderS2SCallReason.js +0 -0
  540. /package/lib/{products → esm/products}/bot_defender/reasons/index.js +0 -0
  541. /package/lib/{products → esm/products}/credential_intelligence/CredentialIntelligence.js +0 -0
  542. /package/lib/{products → esm/products}/credential_intelligence/ICredentialIntelligence.js +0 -0
  543. /package/lib/{products → esm/products}/credential_intelligence/constants.js +0 -0
  544. /package/lib/{products → esm/products}/credential_intelligence/endpoint/CredentialEndpoint.js +0 -0
  545. /package/lib/{products → esm/products}/credential_intelligence/endpoint/CredentialEndpointConfiguration.js +0 -0
  546. /package/lib/{products → esm/products}/credential_intelligence/endpoint/CredentialEndpointManager.js +0 -0
  547. /package/lib/{products → esm/products}/credential_intelligence/endpoint/ICredentialEndpoint.js +0 -0
  548. /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.js +0 -0
  549. /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.js +0 -0
  550. /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/CustomCredentialExtractor.js +0 -0
  551. /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.js +0 -0
  552. /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/ICredentialExtractor.js +0 -0
  553. /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.js +0 -0
  554. /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/SentThrough.js +0 -0
  555. /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/index.js +0 -0
  556. /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceHashProtocolFactory.js +0 -0
  557. /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceVersion.js +0 -0
  558. /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/ICredentialIntelligenceHashProtocol.js +0 -0
  559. /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.js +0 -0
  560. /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/SingleStepAndMultistepHashProtocol.js +0 -0
  561. /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.js +0 -0
  562. /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/SsoStep.js +0 -0
  563. /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/index.js +0 -0
  564. /package/lib/{products → esm/products}/credential_intelligence/endpoint/index.js +0 -0
  565. /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/BodyLoginSuccessfulParser.js +0 -0
  566. /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulCallback.js +0 -0
  567. /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.js +0 -0
  568. /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.js +0 -0
  569. /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/ILoginSuccessfulParser.js +0 -0
  570. /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.js +0 -0
  571. /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/LoginSuccessfulReportingMethod.js +0 -0
  572. /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.js +0 -0
  573. /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/index.js +0 -0
  574. /package/lib/{products → esm/products}/credential_intelligence/endpoint/matcher/CredentialIntelligenceEndpointMatcherFactory.js +0 -0
  575. /package/lib/{products → esm/products}/credential_intelligence/endpoint/matcher/ExactPathEndpointMatcher.js +0 -0
  576. /package/lib/{products → esm/products}/credential_intelligence/endpoint/matcher/ICredentialIntelligenceEndpointMatcher.js +0 -0
  577. /package/lib/{products → esm/products}/credential_intelligence/endpoint/matcher/PathType.js +0 -0
  578. /package/lib/{products → esm/products}/credential_intelligence/endpoint/matcher/RegexPathEndpointMatcher.js +0 -0
  579. /package/lib/{products → esm/products}/credential_intelligence/endpoint/matcher/index.js +0 -0
  580. /package/lib/{products → esm/products}/credential_intelligence/index.js +0 -0
  581. /package/lib/{products → esm/products}/credential_intelligence/model/CredentialData.js +0 -0
  582. /package/lib/{products → esm/products}/credential_intelligence/model/CredentialIntelligenceData.js +0 -0
  583. /package/lib/{products → esm/products}/credential_intelligence/model/Credentials.js +0 -0
  584. /package/lib/{products → esm/products}/credential_intelligence/model/CustomExtractionCallback.js +0 -0
  585. /package/lib/{products → esm/products}/credential_intelligence/model/index.js +0 -0
  586. /package/lib/{products → esm/products}/index.js +0 -0
  587. /package/lib/{products → esm/products}/interfaces/IProduct.js +0 -0
  588. /package/lib/{products → esm/products}/interfaces/ProductData.js +0 -0
  589. /package/lib/{products → esm/products}/interfaces/ProductDataType.js +0 -0
  590. /package/lib/{products → esm/products}/interfaces/ProductType.js +0 -0
  591. /package/lib/{products → esm/products}/interfaces/Products.js +0 -0
  592. /package/lib/{products → esm/products}/interfaces/index.js +0 -0
  593. /package/lib/{products → esm/products}/utils/ProductName.js +0 -0
  594. /package/lib/{products → esm/products}/utils/ProductPriorityOrder.js +0 -0
  595. /package/lib/{products → esm/products}/utils/index.js +0 -0
  596. /package/lib/{products → esm/products}/utils/utils.js +0 -0
  597. /package/lib/{pxde → esm/pxde}/DefaultDataEnrichment.js +0 -0
  598. /package/lib/{pxde → esm/pxde}/IDataEnrichment.js +0 -0
  599. /package/lib/{pxde → esm/pxde}/constants.js +0 -0
  600. /package/lib/{pxde → esm/pxde}/index.js +0 -0
  601. /package/lib/{pxde → esm/pxde}/model/PXDE.js +0 -0
  602. /package/lib/{pxde → esm/pxde}/model/PxdeData.js +0 -0
  603. /package/lib/{pxde → esm/pxde}/model/index.js +0 -0
  604. /package/lib/{pxhd → esm/pxhd}/PXHDUtils.js +0 -0
  605. /package/lib/{pxhd → esm/pxhd}/index.js +0 -0
  606. /package/lib/{pxhd → esm/pxhd}/model/PXHD.js +0 -0
  607. /package/lib/{pxhd → esm/pxhd}/model/PXHDSource.js +0 -0
  608. /package/lib/{pxhd → esm/pxhd}/model/index.js +0 -0
  609. /package/lib/{risk_api → esm/risk_api}/client/IRiskApiClient.js +0 -0
  610. /package/lib/{risk_api → esm/risk_api}/client/PostRiskApiClientBase.js +0 -0
  611. /package/lib/{risk_api → esm/risk_api}/client/PostRiskApiClientV2.js +0 -0
  612. /package/lib/{risk_api → esm/risk_api}/client/PostRiskApiClientV3.js +0 -0
  613. /package/lib/{risk_api → esm/risk_api}/client/index.js +0 -0
  614. /package/lib/{risk_api → esm/risk_api}/constants.js +0 -0
  615. /package/lib/{risk_api → esm/risk_api}/index.js +0 -0
  616. /package/lib/{risk_api → esm/risk_api}/model/RiskActivity.js +0 -0
  617. /package/lib/{risk_api → esm/risk_api}/model/RiskApiCallResult.js +0 -0
  618. /package/lib/{risk_api → esm/risk_api}/model/RiskStatus.js +0 -0
  619. /package/lib/{risk_api → esm/risk_api}/model/S2SErrorReason.js +0 -0
  620. /package/lib/{risk_api → esm/risk_api}/model/index.js +0 -0
  621. /package/lib/{risk_api → esm/risk_api}/risk_response/IRiskResponse.js +0 -0
  622. /package/lib/{risk_api → esm/risk_api}/risk_response/RiskResponseBase.js +0 -0
  623. /package/lib/{risk_api → esm/risk_api}/risk_response/RiskResponsePayloadType.js +0 -0
  624. /package/lib/{risk_api → esm/risk_api}/risk_response/index.js +0 -0
  625. /package/lib/{risk_api → esm/risk_api}/risk_response/v2/DefaultRiskResponseV2.js +0 -0
  626. /package/lib/{risk_api → esm/risk_api}/risk_response/v2/RiskResponseV2Payload.js +0 -0
  627. /package/lib/{risk_api → esm/risk_api}/risk_response/v2/index.js +0 -0
  628. /package/lib/{risk_api → esm/risk_api}/risk_response/v3/DefaultRiskResponseV3.js +0 -0
  629. /package/lib/{risk_api → esm/risk_api}/risk_response/v3/RiskResponseV3Payload.js +0 -0
  630. /package/lib/{risk_api → esm/risk_api}/risk_response/v3/index.js +0 -0
  631. /package/lib/{risk_token → esm/risk_token}/MobileError.js +0 -0
  632. /package/lib/{risk_token → esm/risk_token}/TokenOrigin.js +0 -0
  633. /package/lib/{risk_token → esm/risk_token}/TokenParseResult.js +0 -0
  634. /package/lib/{risk_token → esm/risk_token}/TokenVersion.js +0 -0
  635. /package/lib/{risk_token → esm/risk_token}/constants.js +0 -0
  636. /package/lib/{risk_token → esm/risk_token}/index.js +0 -0
  637. /package/lib/{risk_token → esm/risk_token}/parser/DefaultTokenV2Parser.js +0 -0
  638. /package/lib/{risk_token → esm/risk_token}/parser/DefaultTokenV3Parser.js +0 -0
  639. /package/lib/{risk_token → esm/risk_token}/parser/ITokenParser.js +0 -0
  640. /package/lib/{risk_token → esm/risk_token}/parser/TokenParserBase.js +0 -0
  641. /package/lib/{risk_token → esm/risk_token}/parser/TokenParserOptions.js +0 -0
  642. /package/lib/{risk_token → esm/risk_token}/parser/index.js +0 -0
  643. /package/lib/{risk_token → esm/risk_token}/token/IToken.js +0 -0
  644. /package/lib/{risk_token → esm/risk_token}/token/TokenBase.js +0 -0
  645. /package/lib/{risk_token → esm/risk_token}/token/TokenPayloadType.js +0 -0
  646. /package/lib/{risk_token → esm/risk_token}/token/index.js +0 -0
  647. /package/lib/{risk_token → esm/risk_token}/token/v2/DefaultTokenV2.js +0 -0
  648. /package/lib/{risk_token → esm/risk_token}/token/v2/TokenV2Payload.js +0 -0
  649. /package/lib/{risk_token → esm/risk_token}/token/v3/DefaultTokenV3.js +0 -0
  650. /package/lib/{risk_token → esm/risk_token}/token/v3/TokenSignField.js +0 -0
  651. /package/lib/{risk_token → esm/risk_token}/token/v3/TokenV3Payload.js +0 -0
  652. /package/lib/{risk_token → esm/risk_token}/utils.js +0 -0
  653. /package/lib/{telemetry → esm/telemetry}/DefaultTelemetry.js +0 -0
  654. /package/lib/{telemetry → esm/telemetry}/ITelemetry.js +0 -0
  655. /package/lib/{telemetry → esm/telemetry}/constants.js +0 -0
  656. /package/lib/{telemetry → esm/telemetry}/index.js +0 -0
  657. /package/lib/{telemetry → esm/telemetry}/model/TelemetryActivity.js +0 -0
  658. /package/lib/{utils → esm/utils}/Algorithm.js +0 -0
  659. /package/lib/{utils → esm/utils}/ModuleMode.js +0 -0
  660. /package/lib/{utils → esm/utils}/VidSource.js +0 -0
  661. /package/lib/{utils → esm/utils}/base64/IBase64Utils.js +0 -0
  662. /package/lib/{utils → esm/utils}/base64/index.js +0 -0
  663. /package/lib/{utils → esm/utils}/cipher/ICipherUtils.js +0 -0
  664. /package/lib/{utils → esm/utils}/cipher/index.js +0 -0
  665. /package/lib/{utils → esm/utils}/cookie_parser/ICookieParser.js +0 -0
  666. /package/lib/{utils → esm/utils}/cookie_parser/StringSplitCookieParser.js +0 -0
  667. /package/lib/{utils → esm/utils}/cookie_parser/index.js +0 -0
  668. /package/lib/{utils → esm/utils}/error/EnforcerError.js +0 -0
  669. /package/lib/{utils → esm/utils}/error/EnforcerErrorName.js +0 -0
  670. /package/lib/{utils → esm/utils}/error/EnforcerTimeoutError.js +0 -0
  671. /package/lib/{utils → esm/utils}/error/index.js +0 -0
  672. /package/lib/{utils → esm/utils}/hash/IHashUtils.js +0 -0
  673. /package/lib/{utils → esm/utils}/hash/index.js +0 -0
  674. /package/lib/{utils → esm/utils}/hmac/IHmacUtils.js +0 -0
  675. /package/lib/{utils → esm/utils}/hmac/index.js +0 -0
  676. /package/lib/{utils → esm/utils}/index.js +0 -0
  677. /package/lib/{utils → esm/utils}/ip_range_checker/IIpRangeChecker.js +0 -0
  678. /package/lib/{utils → esm/utils}/ip_range_checker/index.js +0 -0
  679. /package/lib/{utils → esm/utils}/request_id_generator/IRequestIdGenerator.js +0 -0
  680. /package/lib/{utils → esm/utils}/request_id_generator/index.js +0 -0
  681. /package/lib/{utils → esm/utils}/url_parser/IURLParser.js +0 -0
  682. /package/lib/{utils → esm/utils}/url_parser/index.js +0 -0
  683. /package/lib/{utils → esm/utils}/utils.js +0 -0
  684. /package/lib/{action → types/action}/Action.d.ts +0 -0
  685. /package/lib/{action → types/action}/ActionData.d.ts +0 -0
  686. /package/lib/{action → types/action}/ActionPriorityOrder.d.ts +0 -0
  687. /package/lib/{action → types/action}/Decision.d.ts +0 -0
  688. /package/lib/{action → types/action}/ProductAction.d.ts +0 -0
  689. /package/lib/{action → types/action}/index.d.ts +0 -0
  690. /package/lib/{action → types/action}/utils.d.ts +0 -0
  691. /package/lib/{activities → types/activities}/ActivityType.d.ts +0 -0
  692. /package/lib/{activities → types/activities}/HttpActivityClient.d.ts +0 -0
  693. /package/lib/{activities → types/activities}/HttpBatchedActivityClient.d.ts +0 -0
  694. /package/lib/{activities → types/activities}/IActivityClient.d.ts +0 -0
  695. /package/lib/{activities → types/activities}/constants.d.ts +0 -0
  696. /package/lib/{activities → types/activities}/index.d.ts +0 -0
  697. /package/lib/{activities → types/activities}/model/AsyncActivity.d.ts +0 -0
  698. /package/lib/{activities → types/activities}/model/AsyncActivityDetails.d.ts +0 -0
  699. /package/lib/{activities → types/activities}/model/CommonActivityDetails.d.ts +0 -0
  700. /package/lib/{activities → types/activities}/model/HeaderEntry.d.ts +0 -0
  701. /package/lib/{activities → types/activities}/model/index.d.ts +0 -0
  702. /package/lib/{activities → types/activities}/utils.d.ts +0 -0
  703. /package/lib/{additional_activity_handler → types/additional_activity_handler}/AdditionalActivityHandler.d.ts +0 -0
  704. /package/lib/{additional_activity_handler → types/additional_activity_handler}/AdditionalActivityHandlerUtils.d.ts +0 -0
  705. /package/lib/{additional_activity_handler → types/additional_activity_handler}/index.d.ts +0 -0
  706. /package/lib/{blocker → types/blocker}/BlockAction.d.ts +0 -0
  707. /package/lib/{blocker → types/blocker}/BlockActionToProductMap.d.ts +0 -0
  708. /package/lib/{blocker → types/blocker}/BlockActionToWordMap.d.ts +0 -0
  709. /package/lib/{blocker → types/blocker}/IBlocker.d.ts +0 -0
  710. /package/lib/{blocker → types/blocker}/IConditionalBlocker.d.ts +0 -0
  711. /package/lib/{blocker → types/blocker}/index.d.ts +0 -0
  712. /package/lib/{config → types/config}/ConfigurationParams.d.ts +0 -0
  713. /package/lib/{config → types/config}/DefaultConfigurations.d.ts +0 -0
  714. /package/lib/{config → types/config}/IConfiguration.d.ts +0 -0
  715. /package/lib/{config → types/config}/StaticConfigurationBase.d.ts +0 -0
  716. /package/lib/{config → types/config}/index.d.ts +0 -0
  717. /package/lib/{context → types/context}/DefaultContext.d.ts +0 -0
  718. /package/lib/{context → types/context}/index.d.ts +0 -0
  719. /package/lib/{context → types/context}/interfaces/IContext.d.ts +0 -0
  720. /package/lib/{context → types/context}/interfaces/MobileData.d.ts +0 -0
  721. /package/lib/{context → types/context}/interfaces/ReadonlyContext.d.ts +0 -0
  722. /package/lib/{context → types/context}/interfaces/RequestData.d.ts +0 -0
  723. /package/lib/{context → types/context}/interfaces/RiskApiData.d.ts +0 -0
  724. /package/lib/{context → types/context}/interfaces/ServerData.d.ts +0 -0
  725. /package/lib/{context → types/context}/interfaces/TlsData.d.ts +0 -0
  726. /package/lib/{context → types/context}/interfaces/TokenData.d.ts +0 -0
  727. /package/lib/{context → types/context}/interfaces/index.d.ts +0 -0
  728. /package/lib/{cors → types/cors}/CustomBlockResponseHeadersHandler.d.ts +0 -0
  729. /package/lib/{cors → types/cors}/CustomPreflightHandler.d.ts +0 -0
  730. /package/lib/{cors → types/cors}/DefaultCors.d.ts +0 -0
  731. /package/lib/{cors → types/cors}/ICors.d.ts +0 -0
  732. /package/lib/{cors → types/cors}/constants.d.ts +0 -0
  733. /package/lib/{cors → types/cors}/index.d.ts +0 -0
  734. /package/lib/{custom_parameters → types/custom_parameters}/CustomParameters.d.ts +0 -0
  735. /package/lib/{custom_parameters → types/custom_parameters}/CustomParametersFunction.d.ts +0 -0
  736. /package/lib/{custom_parameters → types/custom_parameters}/CustomParametersUtils.d.ts +0 -0
  737. /package/lib/{custom_parameters → types/custom_parameters}/index.d.ts +0 -0
  738. /package/lib/{enforcer → types/enforcer}/EnforcerBase.d.ts +0 -0
  739. /package/lib/{enforcer → types/enforcer}/IEnforcer.d.ts +0 -0
  740. /package/lib/{enforcer → types/enforcer}/index.d.ts +0 -0
  741. /package/lib/{enforcer → types/enforcer}/options/EnforcerBaseOptions.d.ts +0 -0
  742. /package/lib/{enforcer → types/enforcer}/options/EnforcerOptionsType.d.ts +0 -0
  743. /package/lib/{enforcer → types/enforcer}/options/EnforcerV2Options.d.ts +0 -0
  744. /package/lib/{enforcer → types/enforcer}/options/EnforcerV3Options.d.ts +0 -0
  745. /package/lib/{enforcer → types/enforcer}/options/index.d.ts +0 -0
  746. /package/lib/{filter → types/filter}/FilterReason.d.ts +0 -0
  747. /package/lib/{filter → types/filter}/IFilter.d.ts +0 -0
  748. /package/lib/{filter → types/filter}/index.d.ts +0 -0
  749. /package/lib/{first_party → types/first_party}/FirstPartyData.d.ts +0 -0
  750. /package/lib/{first_party → types/first_party}/IFirstParty.d.ts +0 -0
  751. /package/lib/{first_party → types/first_party}/index.d.ts +0 -0
  752. /package/lib/{graphql → types/graphql}/DefaultGraphQLParser.d.ts +0 -0
  753. /package/lib/{graphql → types/graphql}/IGraphQLParser.d.ts +0 -0
  754. /package/lib/{graphql → types/graphql}/index.d.ts +0 -0
  755. /package/lib/{graphql → types/graphql}/model/GraphQLData.d.ts +0 -0
  756. /package/lib/{graphql → types/graphql}/model/GraphQLOperation.d.ts +0 -0
  757. /package/lib/{graphql → types/graphql}/model/GraphQLOperationType.d.ts +0 -0
  758. /package/lib/{graphql → types/graphql}/model/index.d.ts +0 -0
  759. /package/lib/{http → types/http}/index.d.ts +0 -0
  760. /package/lib/{http → types/http}/interfaces/IBody.d.ts +0 -0
  761. /package/lib/{http → types/http}/interfaces/IFormData.d.ts +0 -0
  762. /package/lib/{http → types/http}/interfaces/IHeaders.d.ts +0 -0
  763. /package/lib/{http → types/http}/interfaces/IHttpClient.d.ts +0 -0
  764. /package/lib/{http → types/http}/interfaces/IIncomingRequest.d.ts +0 -0
  765. /package/lib/{http → types/http}/interfaces/IIncomingResponse.d.ts +0 -0
  766. /package/lib/{http → types/http}/interfaces/IMinimalResponse.d.ts +0 -0
  767. /package/lib/{http → types/http}/interfaces/IOutgoingRequest.d.ts +0 -0
  768. /package/lib/{http → types/http}/interfaces/IOutgoingResponse.d.ts +0 -0
  769. /package/lib/{http → types/http}/interfaces/IURL.d.ts +0 -0
  770. /package/lib/{http → types/http}/interfaces/IURLSearchParams.d.ts +0 -0
  771. /package/lib/{http → types/http}/interfaces/ReadonlyHeaders.d.ts +0 -0
  772. /package/lib/{http → types/http}/interfaces/index.d.ts +0 -0
  773. /package/lib/{http → types/http}/utils/ContentType.d.ts +0 -0
  774. /package/lib/{http → types/http}/utils/FormDataImpl.d.ts +0 -0
  775. /package/lib/{http → types/http}/utils/HttpMethod.d.ts +0 -0
  776. /package/lib/{http → types/http}/utils/MinimalResponseImpl.d.ts +0 -0
  777. /package/lib/{http → types/http}/utils/MinimalResponseUtils.d.ts +0 -0
  778. /package/lib/{http → types/http}/utils/MultipartFormDataUtils.d.ts +0 -0
  779. /package/lib/{http → types/http}/utils/OutgoingRequestImpl.d.ts +0 -0
  780. /package/lib/{http → types/http}/utils/URLUtils.d.ts +0 -0
  781. /package/lib/{http → types/http}/utils/UrlImpl.d.ts +0 -0
  782. /package/lib/{http → types/http}/utils/UrlSearchParamsImpl.d.ts +0 -0
  783. /package/lib/{http → types/http}/utils/constants.d.ts +0 -0
  784. /package/lib/{http → types/http}/utils/index.d.ts +0 -0
  785. /package/lib/{impl → types/impl}/base64/AtobBase64Utils.d.ts +0 -0
  786. /package/lib/{impl → types/impl}/base64/BufferBase64Utils.d.ts +0 -0
  787. /package/lib/{impl → types/impl}/base64/JSBase64Base64Utils.d.ts +0 -0
  788. /package/lib/{impl → types/impl}/cipher/CryptoCipherUtils.d.ts +0 -0
  789. /package/lib/{impl → types/impl}/cipher/SubtleCryptoCipherUtils.d.ts +0 -0
  790. /package/lib/{impl → types/impl}/hash/CryptoHashUtils.d.ts +0 -0
  791. /package/lib/{impl → types/impl}/hash/CryptoJSHashUtils.d.ts +0 -0
  792. /package/lib/{impl → types/impl}/hash/SubtleCryptoHashUtils.d.ts +0 -0
  793. /package/lib/{impl → types/impl}/hmac/CryptoHmacUtils.d.ts +0 -0
  794. /package/lib/{impl → types/impl}/hmac/CryptoJSHmacUtils.d.ts +0 -0
  795. /package/lib/{impl → types/impl}/http/phin/PhinHttpClient.d.ts +0 -0
  796. /package/lib/{impl → types/impl}/http/phin/PhinIncomingResponse.d.ts +0 -0
  797. /package/lib/{impl → types/impl}/http/phin/index.d.ts +0 -0
  798. /package/lib/{impl → types/impl}/ip_range_checker/DefaultIpRangeChecker.d.ts +0 -0
  799. /package/lib/{impl → types/impl}/request_id_generator/UuidRequestIdGenerator.d.ts +0 -0
  800. /package/lib/{impl → types/impl}/url_parser/DefaultUrlParser.d.ts +0 -0
  801. /package/lib/{index.d.ts → types/index.d.ts} +0 -0
  802. /package/lib/{logger → types/logger}/DefaultLogger.d.ts +0 -0
  803. /package/lib/{logger → types/logger}/HttpLogServiceClient.d.ts +0 -0
  804. /package/lib/{logger → types/logger}/ILogServiceClient.d.ts +0 -0
  805. /package/lib/{logger → types/logger}/ILogger.d.ts +0 -0
  806. /package/lib/{logger → types/logger}/LoggerBase.d.ts +0 -0
  807. /package/lib/{logger → types/logger}/LoggerSeverity.d.ts +0 -0
  808. /package/lib/{logger → types/logger}/constants.d.ts +0 -0
  809. /package/lib/{logger → types/logger}/index.d.ts +0 -0
  810. /package/lib/{logger → types/logger}/model/EnrichedLogRecord.d.ts +0 -0
  811. /package/lib/{logger → types/logger}/model/LogMetadata.d.ts +0 -0
  812. /package/lib/{logger → types/logger}/model/LogRecord.d.ts +0 -0
  813. /package/lib/{logger → types/logger}/model/index.d.ts +0 -0
  814. /package/lib/{phase → types/phase}/IPhase.d.ts +0 -0
  815. /package/lib/{phase → types/phase}/PhaseResult.d.ts +0 -0
  816. /package/lib/{phase → types/phase}/flow/EndEnforcerFlow.d.ts +0 -0
  817. /package/lib/{phase → types/phase}/flow/EnforceFlow.d.ts +0 -0
  818. /package/lib/{phase → types/phase}/flow/FilterFlow.d.ts +0 -0
  819. /package/lib/{phase → types/phase}/flow/PostEnforceFlow.d.ts +0 -0
  820. /package/lib/{phase → types/phase}/flow/index.d.ts +0 -0
  821. /package/lib/{phase → types/phase}/impl/AdditionalActivityHandlerPhase.d.ts +0 -0
  822. /package/lib/{phase → types/phase}/impl/CompositePhase.d.ts +0 -0
  823. /package/lib/{phase → types/phase}/impl/CreateBlockResponsePhase.d.ts +0 -0
  824. /package/lib/{phase → types/phase}/impl/DecideActionPhase.d.ts +0 -0
  825. /package/lib/{phase → types/phase}/impl/EnrichContextFromRequestPhase.d.ts +0 -0
  826. /package/lib/{phase → types/phase}/impl/EnrichContextFromResponsePhase.d.ts +0 -0
  827. /package/lib/{phase → types/phase}/impl/FilterPhase.d.ts +0 -0
  828. /package/lib/{phase → types/phase}/impl/FirstPartyPhase.d.ts +0 -0
  829. /package/lib/{phase → types/phase}/impl/ModifyIncomingRequestPhase.d.ts +0 -0
  830. /package/lib/{phase → types/phase}/impl/ModifyOutgoingResponsePhase.d.ts +0 -0
  831. /package/lib/{phase → types/phase}/impl/ParseTokenPhase.d.ts +0 -0
  832. /package/lib/{phase → types/phase}/impl/PreflightPhase.d.ts +0 -0
  833. /package/lib/{phase → types/phase}/impl/RiskApiPhase.d.ts +0 -0
  834. /package/lib/{phase → types/phase}/impl/SendAsyncActivitiesOnRequestPhase.d.ts +0 -0
  835. /package/lib/{phase → types/phase}/impl/SendAsyncActivitiesOnResponsePhase.d.ts +0 -0
  836. /package/lib/{phase → types/phase}/impl/SendLogsPhase.d.ts +0 -0
  837. /package/lib/{phase → types/phase}/impl/TelemetryPhase.d.ts +0 -0
  838. /package/lib/{phase → types/phase}/impl/index.d.ts +0 -0
  839. /package/lib/{phase → types/phase}/index.d.ts +0 -0
  840. /package/lib/{products → types/products}/account_defender/AccountDefender.d.ts +0 -0
  841. /package/lib/{products → types/products}/account_defender/AccountDefenderData.d.ts +0 -0
  842. /package/lib/{products → types/products}/account_defender/IAccountDefender.d.ts +0 -0
  843. /package/lib/{products → types/products}/account_defender/JwtData.d.ts +0 -0
  844. /package/lib/{products → types/products}/account_defender/constants.d.ts +0 -0
  845. /package/lib/{products → types/products}/account_defender/index.d.ts +0 -0
  846. /package/lib/{products → types/products}/bot_defender/BotDefender.d.ts +0 -0
  847. /package/lib/{products → types/products}/bot_defender/BotDefenderActionData.d.ts +0 -0
  848. /package/lib/{products → types/products}/bot_defender/BotDefenderData.d.ts +0 -0
  849. /package/lib/{products → types/products}/bot_defender/BotDefenderUtils.d.ts +0 -0
  850. /package/lib/{products → types/products}/bot_defender/IBotDefender.d.ts +0 -0
  851. /package/lib/{products → types/products}/bot_defender/block/DefaultBotDefenderBlocker.d.ts +0 -0
  852. /package/lib/{products → types/products}/bot_defender/block/captcha/CaptchaBlocker.d.ts +0 -0
  853. /package/lib/{products → types/products}/bot_defender/block/captcha/HtmlCaptchaBlocker.d.ts +0 -0
  854. /package/lib/{products → types/products}/bot_defender/block/captcha/JsonCaptchaBlocker.d.ts +0 -0
  855. /package/lib/{products → types/products}/bot_defender/block/captcha/MobileCaptchaBlocker.d.ts +0 -0
  856. /package/lib/{products → types/products}/bot_defender/block/captcha/index.d.ts +0 -0
  857. /package/lib/{products → types/products}/bot_defender/block/index.d.ts +0 -0
  858. /package/lib/{products → types/products}/bot_defender/block/model/BlockData.d.ts +0 -0
  859. /package/lib/{products → types/products}/bot_defender/block/model/JsonBlockPayload.d.ts +0 -0
  860. /package/lib/{products → types/products}/bot_defender/block/model/MobileBlockPayload.d.ts +0 -0
  861. /package/lib/{products → types/products}/bot_defender/block/model/index.d.ts +0 -0
  862. /package/lib/{products → types/products}/bot_defender/block/templates/captcha_template.d.ts +0 -0
  863. /package/lib/{products → types/products}/bot_defender/block/templates/index.d.ts +0 -0
  864. /package/lib/{products → types/products}/bot_defender/block/templates/rate_limit_template.d.ts +0 -0
  865. /package/lib/{products → types/products}/bot_defender/block/utils.d.ts +0 -0
  866. /package/lib/{products → types/products}/bot_defender/filter/DefaultBotDefenderFilter.d.ts +0 -0
  867. /package/lib/{products → types/products}/bot_defender/filter/index.d.ts +0 -0
  868. /package/lib/{products → types/products}/bot_defender/first_party/DefaultBotDefenderFirstParty.d.ts +0 -0
  869. /package/lib/{products → types/products}/bot_defender/first_party/FirstPartySuffix.d.ts +0 -0
  870. /package/lib/{products → types/products}/bot_defender/first_party/constants.d.ts +0 -0
  871. /package/lib/{products → types/products}/bot_defender/first_party/index.d.ts +0 -0
  872. /package/lib/{products → types/products}/bot_defender/first_party/utils.d.ts +0 -0
  873. /package/lib/{products → types/products}/bot_defender/index.d.ts +0 -0
  874. /package/lib/{products → types/products}/bot_defender/reasons/BotDefenderBlockReason.d.ts +0 -0
  875. /package/lib/{products → types/products}/bot_defender/reasons/BotDefenderPassReason.d.ts +0 -0
  876. /package/lib/{products → types/products}/bot_defender/reasons/BotDefenderReasonType.d.ts +0 -0
  877. /package/lib/{products → types/products}/bot_defender/reasons/BotDefenderS2SCallReason.d.ts +0 -0
  878. /package/lib/{products → types/products}/bot_defender/reasons/index.d.ts +0 -0
  879. /package/lib/{products → types/products}/credential_intelligence/CredentialIntelligence.d.ts +0 -0
  880. /package/lib/{products → types/products}/credential_intelligence/ICredentialIntelligence.d.ts +0 -0
  881. /package/lib/{products → types/products}/credential_intelligence/constants.d.ts +0 -0
  882. /package/lib/{products → types/products}/credential_intelligence/endpoint/CredentialEndpoint.d.ts +0 -0
  883. /package/lib/{products → types/products}/credential_intelligence/endpoint/CredentialEndpointConfiguration.d.ts +0 -0
  884. /package/lib/{products → types/products}/credential_intelligence/endpoint/CredentialEndpointManager.d.ts +0 -0
  885. /package/lib/{products → types/products}/credential_intelligence/endpoint/ICredentialEndpoint.d.ts +0 -0
  886. /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.d.ts +0 -0
  887. /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.d.ts +0 -0
  888. /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/CustomCredentialExtractor.d.ts +0 -0
  889. /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.d.ts +0 -0
  890. /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/ICredentialExtractor.d.ts +0 -0
  891. /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.d.ts +0 -0
  892. /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/SentThrough.d.ts +0 -0
  893. /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/index.d.ts +0 -0
  894. /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceHashProtocolFactory.d.ts +0 -0
  895. /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceVersion.d.ts +0 -0
  896. /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/ICredentialIntelligenceHashProtocol.d.ts +0 -0
  897. /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.d.ts +0 -0
  898. /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/SingleStepAndMultistepHashProtocol.d.ts +0 -0
  899. /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.d.ts +0 -0
  900. /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/SsoStep.d.ts +0 -0
  901. /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/index.d.ts +0 -0
  902. /package/lib/{products → types/products}/credential_intelligence/endpoint/index.d.ts +0 -0
  903. /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/BodyLoginSuccessfulParser.d.ts +0 -0
  904. /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulCallback.d.ts +0 -0
  905. /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.d.ts +0 -0
  906. /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.d.ts +0 -0
  907. /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/ILoginSuccessfulParser.d.ts +0 -0
  908. /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.d.ts +0 -0
  909. /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/LoginSuccessfulReportingMethod.d.ts +0 -0
  910. /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.d.ts +0 -0
  911. /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/index.d.ts +0 -0
  912. /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/CredentialIntelligenceEndpointMatcherFactory.d.ts +0 -0
  913. /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/ExactPathEndpointMatcher.d.ts +0 -0
  914. /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/ICredentialIntelligenceEndpointMatcher.d.ts +0 -0
  915. /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/PathType.d.ts +0 -0
  916. /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/RegexPathEndpointMatcher.d.ts +0 -0
  917. /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/index.d.ts +0 -0
  918. /package/lib/{products → types/products}/credential_intelligence/index.d.ts +0 -0
  919. /package/lib/{products → types/products}/credential_intelligence/model/CredentialData.d.ts +0 -0
  920. /package/lib/{products → types/products}/credential_intelligence/model/CredentialIntelligenceData.d.ts +0 -0
  921. /package/lib/{products → types/products}/credential_intelligence/model/Credentials.d.ts +0 -0
  922. /package/lib/{products → types/products}/credential_intelligence/model/CustomExtractionCallback.d.ts +0 -0
  923. /package/lib/{products → types/products}/credential_intelligence/model/index.d.ts +0 -0
  924. /package/lib/{products → types/products}/index.d.ts +0 -0
  925. /package/lib/{products → types/products}/interfaces/IProduct.d.ts +0 -0
  926. /package/lib/{products → types/products}/interfaces/ProductData.d.ts +0 -0
  927. /package/lib/{products → types/products}/interfaces/ProductDataType.d.ts +0 -0
  928. /package/lib/{products → types/products}/interfaces/ProductType.d.ts +0 -0
  929. /package/lib/{products → types/products}/interfaces/Products.d.ts +0 -0
  930. /package/lib/{products → types/products}/interfaces/index.d.ts +0 -0
  931. /package/lib/{products → types/products}/utils/ProductName.d.ts +0 -0
  932. /package/lib/{products → types/products}/utils/ProductPriorityOrder.d.ts +0 -0
  933. /package/lib/{products → types/products}/utils/index.d.ts +0 -0
  934. /package/lib/{products → types/products}/utils/utils.d.ts +0 -0
  935. /package/lib/{pxde → types/pxde}/DefaultDataEnrichment.d.ts +0 -0
  936. /package/lib/{pxde → types/pxde}/IDataEnrichment.d.ts +0 -0
  937. /package/lib/{pxde → types/pxde}/constants.d.ts +0 -0
  938. /package/lib/{pxde → types/pxde}/index.d.ts +0 -0
  939. /package/lib/{pxde → types/pxde}/model/PXDE.d.ts +0 -0
  940. /package/lib/{pxde → types/pxde}/model/PxdeData.d.ts +0 -0
  941. /package/lib/{pxde → types/pxde}/model/index.d.ts +0 -0
  942. /package/lib/{pxhd → types/pxhd}/PXHDUtils.d.ts +0 -0
  943. /package/lib/{pxhd → types/pxhd}/index.d.ts +0 -0
  944. /package/lib/{pxhd → types/pxhd}/model/PXHD.d.ts +0 -0
  945. /package/lib/{pxhd → types/pxhd}/model/PXHDSource.d.ts +0 -0
  946. /package/lib/{pxhd → types/pxhd}/model/index.d.ts +0 -0
  947. /package/lib/{risk_api → types/risk_api}/client/IRiskApiClient.d.ts +0 -0
  948. /package/lib/{risk_api → types/risk_api}/client/PostRiskApiClientBase.d.ts +0 -0
  949. /package/lib/{risk_api → types/risk_api}/client/PostRiskApiClientV2.d.ts +0 -0
  950. /package/lib/{risk_api → types/risk_api}/client/PostRiskApiClientV3.d.ts +0 -0
  951. /package/lib/{risk_api → types/risk_api}/client/index.d.ts +0 -0
  952. /package/lib/{risk_api → types/risk_api}/constants.d.ts +0 -0
  953. /package/lib/{risk_api → types/risk_api}/index.d.ts +0 -0
  954. /package/lib/{risk_api → types/risk_api}/model/RiskActivity.d.ts +0 -0
  955. /package/lib/{risk_api → types/risk_api}/model/RiskApiCallResult.d.ts +0 -0
  956. /package/lib/{risk_api → types/risk_api}/model/RiskStatus.d.ts +0 -0
  957. /package/lib/{risk_api → types/risk_api}/model/S2SErrorReason.d.ts +0 -0
  958. /package/lib/{risk_api → types/risk_api}/model/index.d.ts +0 -0
  959. /package/lib/{risk_api → types/risk_api}/risk_response/IRiskResponse.d.ts +0 -0
  960. /package/lib/{risk_api → types/risk_api}/risk_response/RiskResponseBase.d.ts +0 -0
  961. /package/lib/{risk_api → types/risk_api}/risk_response/RiskResponsePayloadType.d.ts +0 -0
  962. /package/lib/{risk_api → types/risk_api}/risk_response/index.d.ts +0 -0
  963. /package/lib/{risk_api → types/risk_api}/risk_response/v2/DefaultRiskResponseV2.d.ts +0 -0
  964. /package/lib/{risk_api → types/risk_api}/risk_response/v2/RiskResponseV2Payload.d.ts +0 -0
  965. /package/lib/{risk_api → types/risk_api}/risk_response/v2/index.d.ts +0 -0
  966. /package/lib/{risk_api → types/risk_api}/risk_response/v3/DefaultRiskResponseV3.d.ts +0 -0
  967. /package/lib/{risk_api → types/risk_api}/risk_response/v3/RiskResponseV3Payload.d.ts +0 -0
  968. /package/lib/{risk_api → types/risk_api}/risk_response/v3/index.d.ts +0 -0
  969. /package/lib/{risk_token → types/risk_token}/MobileError.d.ts +0 -0
  970. /package/lib/{risk_token → types/risk_token}/TokenOrigin.d.ts +0 -0
  971. /package/lib/{risk_token → types/risk_token}/TokenParseResult.d.ts +0 -0
  972. /package/lib/{risk_token → types/risk_token}/TokenVersion.d.ts +0 -0
  973. /package/lib/{risk_token → types/risk_token}/constants.d.ts +0 -0
  974. /package/lib/{risk_token → types/risk_token}/index.d.ts +0 -0
  975. /package/lib/{risk_token → types/risk_token}/parser/DefaultTokenV2Parser.d.ts +0 -0
  976. /package/lib/{risk_token → types/risk_token}/parser/DefaultTokenV3Parser.d.ts +0 -0
  977. /package/lib/{risk_token → types/risk_token}/parser/ITokenParser.d.ts +0 -0
  978. /package/lib/{risk_token → types/risk_token}/parser/TokenParserBase.d.ts +0 -0
  979. /package/lib/{risk_token → types/risk_token}/parser/TokenParserOptions.d.ts +0 -0
  980. /package/lib/{risk_token → types/risk_token}/parser/index.d.ts +0 -0
  981. /package/lib/{risk_token → types/risk_token}/token/IToken.d.ts +0 -0
  982. /package/lib/{risk_token → types/risk_token}/token/TokenBase.d.ts +0 -0
  983. /package/lib/{risk_token → types/risk_token}/token/TokenPayloadType.d.ts +0 -0
  984. /package/lib/{risk_token → types/risk_token}/token/index.d.ts +0 -0
  985. /package/lib/{risk_token → types/risk_token}/token/v2/DefaultTokenV2.d.ts +0 -0
  986. /package/lib/{risk_token → types/risk_token}/token/v2/TokenV2Payload.d.ts +0 -0
  987. /package/lib/{risk_token → types/risk_token}/token/v3/DefaultTokenV3.d.ts +0 -0
  988. /package/lib/{risk_token → types/risk_token}/token/v3/TokenSignField.d.ts +0 -0
  989. /package/lib/{risk_token → types/risk_token}/token/v3/TokenV3Payload.d.ts +0 -0
  990. /package/lib/{risk_token → types/risk_token}/utils.d.ts +0 -0
  991. /package/lib/{telemetry → types/telemetry}/DefaultTelemetry.d.ts +0 -0
  992. /package/lib/{telemetry → types/telemetry}/ITelemetry.d.ts +0 -0
  993. /package/lib/{telemetry → types/telemetry}/constants.d.ts +0 -0
  994. /package/lib/{telemetry → types/telemetry}/index.d.ts +0 -0
  995. /package/lib/{telemetry → types/telemetry}/model/TelemetryActivity.d.ts +0 -0
  996. /package/lib/{utils → types/utils}/Algorithm.d.ts +0 -0
  997. /package/lib/{utils → types/utils}/ModuleMode.d.ts +0 -0
  998. /package/lib/{utils → types/utils}/VidSource.d.ts +0 -0
  999. /package/lib/{utils → types/utils}/base64/IBase64Utils.d.ts +0 -0
  1000. /package/lib/{utils → types/utils}/base64/index.d.ts +0 -0
  1001. /package/lib/{utils → types/utils}/cipher/ICipherUtils.d.ts +0 -0
  1002. /package/lib/{utils → types/utils}/cipher/index.d.ts +0 -0
  1003. /package/lib/{utils → types/utils}/cookie_parser/ICookieParser.d.ts +0 -0
  1004. /package/lib/{utils → types/utils}/cookie_parser/StringSplitCookieParser.d.ts +0 -0
  1005. /package/lib/{utils → types/utils}/cookie_parser/index.d.ts +0 -0
  1006. /package/lib/{utils → types/utils}/error/EnforcerError.d.ts +0 -0
  1007. /package/lib/{utils → types/utils}/error/EnforcerErrorName.d.ts +0 -0
  1008. /package/lib/{utils → types/utils}/error/EnforcerTimeoutError.d.ts +0 -0
  1009. /package/lib/{utils → types/utils}/error/index.d.ts +0 -0
  1010. /package/lib/{utils → types/utils}/hash/IHashUtils.d.ts +0 -0
  1011. /package/lib/{utils → types/utils}/hash/index.d.ts +0 -0
  1012. /package/lib/{utils → types/utils}/hmac/IHmacUtils.d.ts +0 -0
  1013. /package/lib/{utils → types/utils}/hmac/index.d.ts +0 -0
  1014. /package/lib/{utils → types/utils}/index.d.ts +0 -0
  1015. /package/lib/{utils → types/utils}/ip_range_checker/IIpRangeChecker.d.ts +0 -0
  1016. /package/lib/{utils → types/utils}/ip_range_checker/index.d.ts +0 -0
  1017. /package/lib/{utils → types/utils}/request_id_generator/IRequestIdGenerator.d.ts +0 -0
  1018. /package/lib/{utils → types/utils}/request_id_generator/index.d.ts +0 -0
  1019. /package/lib/{utils → types/utils}/url_parser/IURLParser.d.ts +0 -0
  1020. /package/lib/{utils → types/utils}/url_parser/index.d.ts +0 -0
  1021. /package/lib/{utils → types/utils}/utils.d.ts +0 -0
@@ -0,0 +1,583 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.StaticConfigurationBase = void 0;
15
+ var DefaultConfigurations_1 = require("./DefaultConfigurations");
16
+ var logger_1 = require("../logger");
17
+ var utils_1 = require("../utils");
18
+ var StaticConfigurationBase = /** @class */ (function () {
19
+ function StaticConfigurationBase(params, defaultParams) {
20
+ this.configParams = this.initialize(params, __assign(__assign({}, DefaultConfigurations_1.DEFAULT_CONFIGURATIONS), defaultParams));
21
+ this.internalLogger = new logger_1.DefaultLogger(this.configParams.px_logger_severity);
22
+ }
23
+ StaticConfigurationBase.prototype.initialize = function (params, defaultParams) {
24
+ var _this = this;
25
+ this.throwIfMissingRequiredField(params);
26
+ var config = {};
27
+ Object.keys(defaultParams).forEach(function (k) {
28
+ config[k] = _this.getValidConfigValue(params, defaultParams, k);
29
+ });
30
+ return config;
31
+ };
32
+ StaticConfigurationBase.prototype.throwIfMissingRequiredField = function (params) {
33
+ var REQUIRED_FIELDS = ['px_app_id', 'px_cookie_secret', 'px_auth_token'];
34
+ REQUIRED_FIELDS.forEach(function (key) {
35
+ if (!params[key]) {
36
+ throw new utils_1.EnforcerError("".concat(String(key), " cannot be empty!"));
37
+ }
38
+ });
39
+ };
40
+ StaticConfigurationBase.prototype.getValidConfigValue = function (params, defaultParams, key) {
41
+ if (params[key] != null && this.isValidConfigValue(params, defaultParams, key)) {
42
+ return params[key];
43
+ }
44
+ else {
45
+ return this.getDefaultConfigurationValue(params, defaultParams, key);
46
+ }
47
+ };
48
+ StaticConfigurationBase.prototype.isValidConfigValue = function (params, defaultParams, key) {
49
+ switch (key) {
50
+ case 'px_logger_severity':
51
+ return (0, utils_1.isValidEnumValue)(logger_1.LoggerSeverity, params[key]);
52
+ case 'px_module_mode':
53
+ return (0, utils_1.isValidEnumValue)(utils_1.ModuleMode, params[key]);
54
+ default:
55
+ if (defaultParams[key] === null) {
56
+ return typeof params[key] === 'function';
57
+ }
58
+ if (Array.isArray(defaultParams[key])) {
59
+ return Array.isArray(params[key]);
60
+ }
61
+ return typeof params[key] === typeof defaultParams[key];
62
+ }
63
+ };
64
+ StaticConfigurationBase.prototype.getDefaultConfigurationValue = function (params, defaultParams, key) {
65
+ switch (key) {
66
+ case 'px_backend_url':
67
+ return "https://".concat((0, utils_1.getScoreApiDomain)(params.px_app_id));
68
+ case 'px_backend_collector_url':
69
+ return "https://".concat((0, utils_1.getCollectorDomain)(params.px_app_id));
70
+ default:
71
+ return defaultParams[key];
72
+ }
73
+ };
74
+ StaticConfigurationBase.prototype.toParams = function () {
75
+ return Object.assign({}, this.configParams);
76
+ };
77
+ Object.defineProperty(StaticConfigurationBase.prototype, "moduleVersion", {
78
+ get: function () {
79
+ return "".concat(this.getModuleVersion(), " (").concat(utils_1.CORE_MODULE_VERSION, ")");
80
+ },
81
+ enumerable: false,
82
+ configurable: true
83
+ });
84
+ Object.defineProperty(StaticConfigurationBase.prototype, "logger", {
85
+ get: function () {
86
+ return this.internalLogger;
87
+ },
88
+ enumerable: false,
89
+ configurable: true
90
+ });
91
+ Object.defineProperty(StaticConfigurationBase.prototype, "appId", {
92
+ get: function () {
93
+ return this.configParams.px_app_id;
94
+ },
95
+ enumerable: false,
96
+ configurable: true
97
+ });
98
+ Object.defineProperty(StaticConfigurationBase.prototype, "authToken", {
99
+ get: function () {
100
+ return this.configParams.px_auth_token;
101
+ },
102
+ enumerable: false,
103
+ configurable: true
104
+ });
105
+ Object.defineProperty(StaticConfigurationBase.prototype, "blockingScore", {
106
+ get: function () {
107
+ return this.configParams.px_blocking_score;
108
+ },
109
+ enumerable: false,
110
+ configurable: true
111
+ });
112
+ Object.defineProperty(StaticConfigurationBase.prototype, "bypassMonitorHeader", {
113
+ get: function () {
114
+ return this.configParams.px_bypass_monitor_header;
115
+ },
116
+ enumerable: false,
117
+ configurable: true
118
+ });
119
+ Object.defineProperty(StaticConfigurationBase.prototype, "cookieSecret", {
120
+ get: function () {
121
+ return this.configParams.px_cookie_secret;
122
+ },
123
+ enumerable: false,
124
+ configurable: true
125
+ });
126
+ Object.defineProperty(StaticConfigurationBase.prototype, "customCookieHeader", {
127
+ get: function () {
128
+ return this.configParams.px_custom_cookie_header;
129
+ },
130
+ enumerable: false,
131
+ configurable: true
132
+ });
133
+ Object.defineProperty(StaticConfigurationBase.prototype, "customLogo", {
134
+ get: function () {
135
+ return this.configParams.px_custom_logo;
136
+ },
137
+ enumerable: false,
138
+ configurable: true
139
+ });
140
+ Object.defineProperty(StaticConfigurationBase.prototype, "enforcedRoutes", {
141
+ get: function () {
142
+ return this.configParams.px_enforced_routes;
143
+ },
144
+ enumerable: false,
145
+ configurable: true
146
+ });
147
+ Object.defineProperty(StaticConfigurationBase.prototype, "filteredExtensions", {
148
+ get: function () {
149
+ return this.configParams.px_filter_by_extension.map(function (ext) { return (ext.startsWith('.') ? ext : ".".concat(ext)); });
150
+ },
151
+ enumerable: false,
152
+ configurable: true
153
+ });
154
+ Object.defineProperty(StaticConfigurationBase.prototype, "filteredHttpMethods", {
155
+ get: function () {
156
+ return this.configParams.px_filter_by_http_method;
157
+ },
158
+ enumerable: false,
159
+ configurable: true
160
+ });
161
+ Object.defineProperty(StaticConfigurationBase.prototype, "filteredIps", {
162
+ get: function () {
163
+ return this.configParams.px_filter_by_ip;
164
+ },
165
+ enumerable: false,
166
+ configurable: true
167
+ });
168
+ Object.defineProperty(StaticConfigurationBase.prototype, "filteredRoutes", {
169
+ get: function () {
170
+ return this.configParams.px_filter_by_route;
171
+ },
172
+ enumerable: false,
173
+ configurable: true
174
+ });
175
+ Object.defineProperty(StaticConfigurationBase.prototype, "filteredUserAgents", {
176
+ get: function () {
177
+ return this.configParams.px_filter_by_user_agent;
178
+ },
179
+ enumerable: false,
180
+ configurable: true
181
+ });
182
+ Object.defineProperty(StaticConfigurationBase.prototype, "firstPartyEnabled", {
183
+ get: function () {
184
+ return this.configParams.px_first_party_enabled;
185
+ },
186
+ enumerable: false,
187
+ configurable: true
188
+ });
189
+ Object.defineProperty(StaticConfigurationBase.prototype, "customFirstPartyPrefix", {
190
+ get: function () {
191
+ return this.configParams.px_custom_first_party_prefix;
192
+ },
193
+ enumerable: false,
194
+ configurable: true
195
+ });
196
+ Object.defineProperty(StaticConfigurationBase.prototype, "customFirstPartySensorEndpoint", {
197
+ get: function () {
198
+ return this.configParams.px_custom_first_party_sensor_endpoint;
199
+ },
200
+ enumerable: false,
201
+ configurable: true
202
+ });
203
+ Object.defineProperty(StaticConfigurationBase.prototype, "customFirstPartyXhrEndpoint", {
204
+ get: function () {
205
+ return this.configParams.px_custom_first_party_xhr_endpoint;
206
+ },
207
+ enumerable: false,
208
+ configurable: true
209
+ });
210
+ Object.defineProperty(StaticConfigurationBase.prototype, "customFirstPartyCaptchaEndpoint", {
211
+ get: function () {
212
+ return this.configParams.px_custom_first_party_captcha_endpoint;
213
+ },
214
+ enumerable: false,
215
+ configurable: true
216
+ });
217
+ Object.defineProperty(StaticConfigurationBase.prototype, "loggerSeverity", {
218
+ get: function () {
219
+ return this.logger.getLoggerSeverity();
220
+ },
221
+ enumerable: false,
222
+ configurable: true
223
+ });
224
+ Object.defineProperty(StaticConfigurationBase.prototype, "moduleEnabled", {
225
+ get: function () {
226
+ return this.configParams.px_module_enabled;
227
+ },
228
+ enumerable: false,
229
+ configurable: true
230
+ });
231
+ Object.defineProperty(StaticConfigurationBase.prototype, "moduleMode", {
232
+ get: function () {
233
+ return this.configParams.px_module_mode;
234
+ },
235
+ enumerable: false,
236
+ configurable: true
237
+ });
238
+ Object.defineProperty(StaticConfigurationBase.prototype, "monitoredRoutes", {
239
+ get: function () {
240
+ return this.configParams.px_monitored_routes;
241
+ },
242
+ enumerable: false,
243
+ configurable: true
244
+ });
245
+ Object.defineProperty(StaticConfigurationBase.prototype, "s2sTimeout", {
246
+ get: function () {
247
+ return this.configParams.px_s2s_timeout;
248
+ },
249
+ enumerable: false,
250
+ configurable: true
251
+ });
252
+ Object.defineProperty(StaticConfigurationBase.prototype, "sensitiveHeaders", {
253
+ get: function () {
254
+ return this.configParams.px_sensitive_headers;
255
+ },
256
+ enumerable: false,
257
+ configurable: true
258
+ });
259
+ Object.defineProperty(StaticConfigurationBase.prototype, "sensitiveRoutes", {
260
+ get: function () {
261
+ return this.configParams.px_sensitive_routes;
262
+ },
263
+ enumerable: false,
264
+ configurable: true
265
+ });
266
+ Object.defineProperty(StaticConfigurationBase.prototype, "advancedBlockingResponseEnabled", {
267
+ get: function () {
268
+ return this.configParams.px_advanced_blocking_response_enabled;
269
+ },
270
+ enumerable: false,
271
+ configurable: true
272
+ });
273
+ Object.defineProperty(StaticConfigurationBase.prototype, "backendScoreApiUrl", {
274
+ get: function () {
275
+ return this.configParams.px_backend_url;
276
+ },
277
+ enumerable: false,
278
+ configurable: true
279
+ });
280
+ Object.defineProperty(StaticConfigurationBase.prototype, "ipHeaders", {
281
+ get: function () {
282
+ return this.configParams.px_ip_headers;
283
+ },
284
+ enumerable: false,
285
+ configurable: true
286
+ });
287
+ Object.defineProperty(StaticConfigurationBase.prototype, "backendCaptchaUrl", {
288
+ get: function () {
289
+ return this.configParams.px_backend_captcha_url;
290
+ },
291
+ enumerable: false,
292
+ configurable: true
293
+ });
294
+ Object.defineProperty(StaticConfigurationBase.prototype, "backendClientUrl", {
295
+ get: function () {
296
+ return this.configParams.px_backend_client_url;
297
+ },
298
+ enumerable: false,
299
+ configurable: true
300
+ });
301
+ Object.defineProperty(StaticConfigurationBase.prototype, "backendCollectorUrl", {
302
+ get: function () {
303
+ return this.configParams.px_backend_collector_url;
304
+ },
305
+ enumerable: false,
306
+ configurable: true
307
+ });
308
+ Object.defineProperty(StaticConfigurationBase.prototype, "cssRef", {
309
+ get: function () {
310
+ return this.configParams.px_css_ref;
311
+ },
312
+ enumerable: false,
313
+ configurable: true
314
+ });
315
+ Object.defineProperty(StaticConfigurationBase.prototype, "jsRef", {
316
+ get: function () {
317
+ return this.configParams.px_js_ref;
318
+ },
319
+ enumerable: false,
320
+ configurable: true
321
+ });
322
+ Object.defineProperty(StaticConfigurationBase.prototype, "riskCookieMaxIterations", {
323
+ get: function () {
324
+ return this.configParams.px_risk_cookie_max_iterations;
325
+ },
326
+ enumerable: false,
327
+ configurable: true
328
+ });
329
+ Object.defineProperty(StaticConfigurationBase.prototype, "riskCookieMinIterations", {
330
+ get: function () {
331
+ return this.configParams.px_risk_cookie_min_iterations;
332
+ },
333
+ enumerable: false,
334
+ configurable: true
335
+ });
336
+ Object.defineProperty(StaticConfigurationBase.prototype, "riskCookieMaxLength", {
337
+ get: function () {
338
+ return this.configParams.px_risk_cookie_max_length;
339
+ },
340
+ enumerable: false,
341
+ configurable: true
342
+ });
343
+ Object.defineProperty(StaticConfigurationBase.prototype, "userAgentMaxLength", {
344
+ get: function () {
345
+ return this.configParams.px_user_agent_max_length;
346
+ },
347
+ enumerable: false,
348
+ configurable: true
349
+ });
350
+ Object.defineProperty(StaticConfigurationBase.prototype, "maxActivityBatchSize", {
351
+ get: function () {
352
+ return this.configParams.px_max_activity_batch_size;
353
+ },
354
+ enumerable: false,
355
+ configurable: true
356
+ });
357
+ Object.defineProperty(StaticConfigurationBase.prototype, "activityBatchTimeoutMs", {
358
+ get: function () {
359
+ return this.configParams.px_batch_activities_timeout_ms;
360
+ },
361
+ enumerable: false,
362
+ configurable: true
363
+ });
364
+ Object.defineProperty(StaticConfigurationBase.prototype, "graphqlEnabled", {
365
+ get: function () {
366
+ return this.configParams.px_graphql_enabled;
367
+ },
368
+ enumerable: false,
369
+ configurable: true
370
+ });
371
+ Object.defineProperty(StaticConfigurationBase.prototype, "graphqlRoutes", {
372
+ get: function () {
373
+ return this.configParams.px_graphql_routes;
374
+ },
375
+ enumerable: false,
376
+ configurable: true
377
+ });
378
+ Object.defineProperty(StaticConfigurationBase.prototype, "sensitiveGraphqlOperationNames", {
379
+ get: function () {
380
+ return this.configParams.px_sensitive_graphql_operation_names;
381
+ },
382
+ enumerable: false,
383
+ configurable: true
384
+ });
385
+ Object.defineProperty(StaticConfigurationBase.prototype, "sensitiveGraphqlOperationTypes", {
386
+ get: function () {
387
+ return this.configParams.px_sensitive_graphql_operation_types;
388
+ },
389
+ enumerable: false,
390
+ configurable: true
391
+ });
392
+ Object.defineProperty(StaticConfigurationBase.prototype, "enrichCustomParameters", {
393
+ get: function () {
394
+ return this.configParams.px_enrich_custom_parameters || null;
395
+ },
396
+ enumerable: false,
397
+ configurable: true
398
+ });
399
+ Object.defineProperty(StaticConfigurationBase.prototype, "additionalActivityHandler", {
400
+ get: function () {
401
+ return this.configParams.px_additional_activity_handler || null;
402
+ },
403
+ enumerable: false,
404
+ configurable: true
405
+ });
406
+ Object.defineProperty(StaticConfigurationBase.prototype, "altBackendCaptchaUrl", {
407
+ get: function () {
408
+ return 'https://captcha.px-cloud.net';
409
+ },
410
+ enumerable: false,
411
+ configurable: true
412
+ });
413
+ Object.defineProperty(StaticConfigurationBase.prototype, "corsSupportEnabled", {
414
+ get: function () {
415
+ return this.configParams.px_cors_support_enabled;
416
+ },
417
+ enumerable: false,
418
+ configurable: true
419
+ });
420
+ Object.defineProperty(StaticConfigurationBase.prototype, "corsCustomPreflightHandler", {
421
+ get: function () {
422
+ return this.configParams.px_cors_custom_preflight_handler || null;
423
+ },
424
+ enumerable: false,
425
+ configurable: true
426
+ });
427
+ Object.defineProperty(StaticConfigurationBase.prototype, "corsPreflightRequestFilterEnabled", {
428
+ get: function () {
429
+ return this.configParams.px_cors_preflight_request_filter_enabled;
430
+ },
431
+ enumerable: false,
432
+ configurable: true
433
+ });
434
+ Object.defineProperty(StaticConfigurationBase.prototype, "corsCreateCustomBlockResponseHeaders", {
435
+ get: function () {
436
+ return this.configParams.px_cors_create_custom_block_response_headers || null;
437
+ },
438
+ enumerable: false,
439
+ configurable: true
440
+ });
441
+ Object.defineProperty(StaticConfigurationBase.prototype, "jwtCookieAdditionalFieldNames", {
442
+ get: function () {
443
+ return this.configParams.px_jwt_cookie_additional_field_names;
444
+ },
445
+ enumerable: false,
446
+ configurable: true
447
+ });
448
+ Object.defineProperty(StaticConfigurationBase.prototype, "jwtCookieName", {
449
+ get: function () {
450
+ return this.configParams.px_jwt_cookie_name;
451
+ },
452
+ enumerable: false,
453
+ configurable: true
454
+ });
455
+ Object.defineProperty(StaticConfigurationBase.prototype, "jwtCookieUserIdFieldName", {
456
+ get: function () {
457
+ return this.configParams.px_jwt_cookie_user_id_field_name;
458
+ },
459
+ enumerable: false,
460
+ configurable: true
461
+ });
462
+ Object.defineProperty(StaticConfigurationBase.prototype, "jwtHeaderAdditionalFieldNames", {
463
+ get: function () {
464
+ return this.configParams.px_jwt_header_additional_field_names;
465
+ },
466
+ enumerable: false,
467
+ configurable: true
468
+ });
469
+ Object.defineProperty(StaticConfigurationBase.prototype, "jwtHeaderName", {
470
+ get: function () {
471
+ return this.configParams.px_jwt_header_name;
472
+ },
473
+ enumerable: false,
474
+ configurable: true
475
+ });
476
+ Object.defineProperty(StaticConfigurationBase.prototype, "jwtHeaderUserIdFieldName", {
477
+ get: function () {
478
+ return this.configParams.px_jwt_header_user_id_field_name;
479
+ },
480
+ enumerable: false,
481
+ configurable: true
482
+ });
483
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciEnabled", {
484
+ get: function () {
485
+ return this.configParams.px_login_credentials_extraction_enabled;
486
+ },
487
+ enumerable: false,
488
+ configurable: true
489
+ });
490
+ Object.defineProperty(StaticConfigurationBase.prototype, "loggerAuthToken", {
491
+ get: function () {
492
+ return this.configParams.px_logger_auth_token;
493
+ },
494
+ enumerable: false,
495
+ configurable: true
496
+ });
497
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciEndpoints", {
498
+ get: function () {
499
+ return this.configParams.px_login_credentials_extraction;
500
+ },
501
+ enumerable: false,
502
+ configurable: true
503
+ });
504
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciCompromisedCredentialsHeaderName", {
505
+ get: function () {
506
+ return this.configParams.px_compromised_credentials_header;
507
+ },
508
+ enumerable: false,
509
+ configurable: true
510
+ });
511
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciSendRawUsernameOnAdditionalS2SActivity", {
512
+ get: function () {
513
+ return this.configParams.px_send_raw_username_on_additional_s2s_activity;
514
+ },
515
+ enumerable: false,
516
+ configurable: true
517
+ });
518
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciAutomaticAdditionalS2SEnabled", {
519
+ get: function () {
520
+ return this.configParams.px_automatic_additional_s2s_activity_enabled;
521
+ },
522
+ enumerable: false,
523
+ configurable: true
524
+ });
525
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciAdditionalS2SHeaderEnabled", {
526
+ get: function () {
527
+ return this.configParams.px_additional_s2s_activity_header_enabled;
528
+ },
529
+ enumerable: false,
530
+ configurable: true
531
+ });
532
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciDefaultVersion", {
533
+ get: function () {
534
+ return this.configParams.px_credentials_intelligence_version;
535
+ },
536
+ enumerable: false,
537
+ configurable: true
538
+ });
539
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciDefaultLoginSuccessfulReportingMethod", {
540
+ get: function () {
541
+ return this.configParams.px_login_successful_reporting_method;
542
+ },
543
+ enumerable: false,
544
+ configurable: true
545
+ });
546
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciDefaultLoginSuccessfulStatus", {
547
+ get: function () {
548
+ return this.configParams.px_login_successful_status;
549
+ },
550
+ enumerable: false,
551
+ configurable: true
552
+ });
553
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciDefaultLoginSuccessfulBodyRegex", {
554
+ get: function () {
555
+ return this.configParams.px_login_successful_body_regex;
556
+ },
557
+ enumerable: false,
558
+ configurable: true
559
+ });
560
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciDefaultLoginSuccessfulHeaderName", {
561
+ get: function () {
562
+ return this.configParams.px_login_successful_header_name;
563
+ },
564
+ enumerable: false,
565
+ configurable: true
566
+ });
567
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciDefaultLoginSuccessfulHeaderValue", {
568
+ get: function () {
569
+ return this.configParams.px_login_successful_header_value;
570
+ },
571
+ enumerable: false,
572
+ configurable: true
573
+ });
574
+ Object.defineProperty(StaticConfigurationBase.prototype, "ciDefaultLoginSuccessfulCustomCallback", {
575
+ get: function () {
576
+ return this.configParams.px_login_successful_custom_callback;
577
+ },
578
+ enumerable: false,
579
+ configurable: true
580
+ });
581
+ return StaticConfigurationBase;
582
+ }());
583
+ exports.StaticConfigurationBase = StaticConfigurationBase;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StaticConfigurationBase = exports.DEFAULT_CONFIGURATIONS = void 0;
4
+ var DefaultConfigurations_1 = require("./DefaultConfigurations");
5
+ Object.defineProperty(exports, "DEFAULT_CONFIGURATIONS", { enumerable: true, get: function () { return DefaultConfigurations_1.DEFAULT_CONFIGURATIONS; } });
6
+ var StaticConfigurationBase_1 = require("./StaticConfigurationBase");
7
+ Object.defineProperty(exports, "StaticConfigurationBase", { enumerable: true, get: function () { return StaticConfigurationBase_1.StaticConfigurationBase; } });
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DefaultContext = void 0;
4
+ var blocker_1 = require("../blocker");
5
+ var pxhd_1 = require("../pxhd");
6
+ var risk_token_1 = require("../risk_token");
7
+ var risk_api_1 = require("../risk_api");
8
+ var http_1 = require("../http");
9
+ var utils_1 = require("../utils");
10
+ var DefaultUrlParser_1 = require("../impl/url_parser/DefaultUrlParser");
11
+ var DefaultContext = /** @class */ (function () {
12
+ function DefaultContext(config, request, options) {
13
+ this.config = config;
14
+ this.urlParser = options.urlParser || new DefaultUrlParser_1.DefaultUrlParser();
15
+ this.tokenData = {
16
+ tokenParseResult: risk_token_1.TokenParseResult.NONE,
17
+ };
18
+ this.riskApiData = {
19
+ riskApiCallResult: risk_api_1.RiskApiCallResult.NONE,
20
+ };
21
+ this.tlsData = {};
22
+ this.serverData = {};
23
+ this.productData = {};
24
+ this.requestId = options.requestIdGenerator.generateRequestId();
25
+ this.blockAction = blocker_1.BlockAction.CAPTCHA;
26
+ this.pxdeVerified = false;
27
+ this.requestData = this.createRequestData(config, request, options.cookieParser);
28
+ this.tokenOrigin = this.getTokenOrigin(request);
29
+ if (!this.isMobile) {
30
+ this.setCookiesOnContext();
31
+ }
32
+ }
33
+ Object.defineProperty(DefaultContext.prototype, "isMobile", {
34
+ get: function () {
35
+ return this.tokenOrigin === risk_token_1.TokenOrigin.HEADER;
36
+ },
37
+ enumerable: false,
38
+ configurable: true
39
+ });
40
+ DefaultContext.prototype.createRequestData = function (config, request, cookieParser) {
41
+ if (cookieParser === void 0) { cookieParser = new utils_1.StringSplitCookieParser(); }
42
+ var rawUrl = request.url;
43
+ var url = this.urlParser.parse(rawUrl);
44
+ var method = request.method;
45
+ var headers = request.headers;
46
+ var cookies = DefaultContext.getCookies(cookieParser, request.headers.get(http_1.COOKIE_HEADER_NAME), request.headers.get(config.customCookieHeader));
47
+ var requestCookieNames = Object.keys(cookies);
48
+ var readOnlyHeaders = (0, http_1.toReadonlyHeaders)(headers);
49
+ var userAgent = this.extractUserAgentFromHeader(config, readOnlyHeaders);
50
+ var ip = this.extractIpFromHeader(config, readOnlyHeaders) || request.clientIP;
51
+ var httpVersion = request.httpVersion;
52
+ return {
53
+ url: url,
54
+ rawUrl: rawUrl,
55
+ method: method,
56
+ headers: readOnlyHeaders,
57
+ cookies: cookies,
58
+ ip: ip,
59
+ userAgent: userAgent,
60
+ requestCookieNames: requestCookieNames,
61
+ request: request,
62
+ httpVersion: httpVersion,
63
+ };
64
+ };
65
+ DefaultContext.getCookies = function (cookieParser) {
66
+ var cookieHeaderValues = [];
67
+ for (var _i = 1; _i < arguments.length; _i++) {
68
+ cookieHeaderValues[_i - 1] = arguments[_i];
69
+ }
70
+ var cookies = {};
71
+ cookieHeaderValues.forEach(function (value) {
72
+ Object.assign(cookies, value ? cookieParser.parseCookies(value) : null);
73
+ });
74
+ return cookies;
75
+ };
76
+ DefaultContext.prototype.extractUserAgentFromHeader = function (config, headers) {
77
+ var _a;
78
+ var userAgent = ((_a = headers[http_1.USER_AGENT_HEADER_NAME]) === null || _a === void 0 ? void 0 : _a[0]) || '';
79
+ if (userAgent.length > config.userAgentMaxLength) {
80
+ userAgent = userAgent.substring(0, config.userAgentMaxLength);
81
+ }
82
+ return userAgent;
83
+ };
84
+ DefaultContext.prototype.extractIpFromHeader = function (config, headers) {
85
+ var ip;
86
+ config.ipHeaders.some(function (ipHeader) {
87
+ var _a;
88
+ var headerValue = (_a = headers[ipHeader]) === null || _a === void 0 ? void 0 : _a[0];
89
+ if (headerValue) {
90
+ ip = headerValue;
91
+ return true;
92
+ }
93
+ });
94
+ return ip;
95
+ };
96
+ DefaultContext.prototype.getTokenOrigin = function (request) {
97
+ return request.headers.get(utils_1.X_PX_AUTHORIZATION_HEADER_NAME) ? risk_token_1.TokenOrigin.HEADER : risk_token_1.TokenOrigin.COOKIE;
98
+ };
99
+ DefaultContext.prototype.setCookiesOnContext = function () {
100
+ this.vid = this.requestData.cookies[utils_1.PXVID_COOKIE_NAME];
101
+ var pxhdCookie = this.requestData.cookies[utils_1.PXHD_COOKIE_NAME];
102
+ if (pxhdCookie) {
103
+ this.pxhd = {
104
+ value: pxhdCookie,
105
+ source: pxhd_1.PXHDSource.COOKIE,
106
+ };
107
+ }
108
+ };
109
+ return DefaultContext;
110
+ }());
111
+ exports.DefaultContext = DefaultContext;