perimeterx-js-core 0.7.1 → 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.
- package/lib/cjs/action/Action.js +10 -0
- package/lib/cjs/action/ActionData.js +2 -0
- package/lib/cjs/action/ActionPriorityOrder.js +10 -0
- package/lib/cjs/action/Decision.js +2 -0
- package/lib/cjs/action/ProductAction.js +2 -0
- package/lib/cjs/action/index.js +22 -0
- package/lib/cjs/action/utils.js +48 -0
- package/lib/cjs/activities/ActivityType.js +10 -0
- package/lib/cjs/activities/HttpActivityClient.js +121 -0
- package/lib/cjs/activities/HttpBatchedActivityClient.js +137 -0
- package/lib/cjs/activities/IActivityClient.js +2 -0
- package/lib/cjs/activities/constants.js +4 -0
- package/lib/cjs/activities/index.js +23 -0
- package/lib/cjs/activities/model/AsyncActivity.js +2 -0
- package/lib/cjs/activities/model/AsyncActivityDetails.js +2 -0
- package/lib/cjs/activities/model/CommonActivityDetails.js +2 -0
- package/lib/cjs/activities/model/HeaderEntry.js +2 -0
- package/lib/cjs/activities/model/index.js +20 -0
- package/lib/cjs/activities/utils.js +220 -0
- package/lib/cjs/additional_activity_handler/AdditionalActivityHandler.js +2 -0
- package/lib/cjs/additional_activity_handler/AdditionalActivityHandlerUtils.js +65 -0
- package/lib/cjs/additional_activity_handler/index.js +18 -0
- package/lib/cjs/blocker/BlockAction.js +9 -0
- package/lib/cjs/blocker/BlockActionToProductMap.js +10 -0
- package/lib/cjs/blocker/BlockActionToWordMap.js +9 -0
- package/lib/cjs/blocker/IBlocker.js +2 -0
- package/lib/cjs/blocker/IConditionalBlocker.js +2 -0
- package/lib/cjs/blocker/index.js +21 -0
- package/lib/cjs/config/ConfigurationParams.js +2 -0
- package/lib/cjs/config/DefaultConfigurations.js +121 -0
- package/lib/cjs/config/IConfiguration.js +2 -0
- package/lib/cjs/config/StaticConfigurationBase.js +583 -0
- package/lib/cjs/config/index.js +7 -0
- package/lib/cjs/context/DefaultContext.js +111 -0
- package/lib/cjs/context/index.js +18 -0
- package/lib/cjs/context/interfaces/IContext.js +2 -0
- package/lib/cjs/context/interfaces/MobileData.js +2 -0
- package/lib/cjs/context/interfaces/ReadonlyContext.js +2 -0
- package/lib/cjs/context/interfaces/RequestData.js +2 -0
- package/lib/cjs/context/interfaces/RiskApiData.js +2 -0
- package/lib/cjs/context/interfaces/ServerData.js +2 -0
- package/lib/cjs/context/interfaces/TlsData.js +2 -0
- package/lib/cjs/context/interfaces/TokenData.js +2 -0
- package/lib/cjs/context/interfaces/index.js +24 -0
- package/lib/cjs/cors/CustomBlockResponseHeadersHandler.js +2 -0
- package/lib/cjs/cors/CustomPreflightHandler.js +2 -0
- package/lib/cjs/cors/DefaultCors.js +107 -0
- package/lib/cjs/cors/ICors.js +2 -0
- package/lib/cjs/cors/constants.js +5 -0
- package/lib/cjs/cors/index.js +20 -0
- package/lib/cjs/custom_parameters/CustomParameters.js +2 -0
- package/lib/cjs/custom_parameters/CustomParametersFunction.js +2 -0
- package/lib/cjs/custom_parameters/CustomParametersUtils.js +77 -0
- package/lib/cjs/custom_parameters/index.js +5 -0
- package/lib/cjs/enforcer/EnforcerBase.js +282 -0
- package/lib/cjs/enforcer/IEnforcer.js +2 -0
- package/lib/cjs/enforcer/index.js +20 -0
- package/lib/cjs/enforcer/options/EnforcerBaseOptions.js +2 -0
- package/lib/cjs/enforcer/options/EnforcerOptionsType.js +2 -0
- package/lib/cjs/enforcer/options/EnforcerV2Options.js +2 -0
- package/lib/cjs/enforcer/options/EnforcerV3Options.js +2 -0
- package/lib/cjs/enforcer/options/index.js +20 -0
- package/lib/cjs/filter/FilterReason.js +14 -0
- package/lib/cjs/filter/IFilter.js +2 -0
- package/lib/cjs/filter/index.js +18 -0
- package/lib/cjs/first_party/FirstPartyData.js +2 -0
- package/lib/cjs/first_party/IFirstParty.js +2 -0
- package/lib/cjs/first_party/index.js +18 -0
- package/lib/cjs/graphql/DefaultGraphQLParser.js +181 -0
- package/lib/cjs/graphql/IGraphQLParser.js +2 -0
- package/lib/cjs/graphql/index.js +19 -0
- package/lib/cjs/graphql/model/GraphQLData.js +2 -0
- package/lib/cjs/graphql/model/GraphQLOperation.js +2 -0
- package/lib/cjs/graphql/model/GraphQLOperationType.js +9 -0
- package/lib/cjs/graphql/model/index.js +19 -0
- package/lib/cjs/http/index.js +18 -0
- package/lib/cjs/http/interfaces/IBody.js +2 -0
- package/lib/cjs/http/interfaces/IFormData.js +2 -0
- package/lib/cjs/http/interfaces/IHeaders.js +2 -0
- package/lib/cjs/http/interfaces/IHttpClient.js +2 -0
- package/lib/cjs/http/interfaces/IIncomingRequest.js +2 -0
- package/lib/cjs/http/interfaces/IIncomingResponse.js +2 -0
- package/lib/cjs/http/interfaces/IMinimalResponse.js +2 -0
- package/lib/cjs/http/interfaces/IOutgoingRequest.js +2 -0
- package/lib/cjs/http/interfaces/IOutgoingResponse.js +2 -0
- package/lib/cjs/http/interfaces/IURL.js +2 -0
- package/lib/cjs/http/interfaces/IURLSearchParams.js +2 -0
- package/lib/cjs/http/interfaces/ReadonlyHeaders.js +26 -0
- package/lib/cjs/http/interfaces/index.js +28 -0
- package/lib/cjs/http/utils/ContentType.js +13 -0
- package/lib/cjs/http/utils/FormDataImpl.js +43 -0
- package/lib/cjs/http/utils/HttpMethod.js +15 -0
- package/lib/cjs/http/utils/MinimalResponseImpl.js +12 -0
- package/lib/cjs/http/utils/MinimalResponseUtils.js +49 -0
- package/lib/cjs/http/utils/MultipartFormDataUtils.js +49 -0
- package/lib/cjs/http/utils/OutgoingRequestImpl.js +14 -0
- package/lib/cjs/http/utils/URLUtils.js +65 -0
- package/lib/cjs/http/utils/UrlImpl.js +73 -0
- package/lib/cjs/http/utils/UrlSearchParamsImpl.js +126 -0
- package/lib/cjs/http/utils/constants.js +12 -0
- package/lib/cjs/http/utils/index.js +27 -0
- package/lib/cjs/impl/base64/AtobBase64Utils.js +15 -0
- package/lib/cjs/impl/base64/BufferBase64Utils.js +17 -0
- package/lib/cjs/impl/base64/JSBase64Base64Utils.js +16 -0
- package/lib/cjs/impl/cipher/CryptoCipherUtils.js +87 -0
- package/lib/cjs/impl/cipher/SubtleCryptoCipherUtils.js +94 -0
- package/lib/cjs/impl/hash/CryptoHashUtils.js +78 -0
- package/lib/cjs/impl/hash/CryptoJSHashUtils.js +22 -0
- package/lib/cjs/impl/hash/SubtleCryptoHashUtils.js +95 -0
- package/lib/cjs/impl/hmac/CryptoHmacUtils.js +48 -0
- package/lib/cjs/impl/hmac/CryptoJSHmacUtils.js +22 -0
- package/lib/cjs/impl/http/phin/PhinHttpClient.js +84 -0
- package/lib/cjs/impl/http/phin/PhinIncomingResponse.js +99 -0
- package/lib/cjs/impl/http/phin/index.js +18 -0
- package/lib/cjs/impl/ip_range_checker/DefaultIpRangeChecker.js +16 -0
- package/lib/cjs/impl/request_id_generator/UuidRequestIdGenerator.js +13 -0
- package/lib/cjs/impl/url_parser/DefaultUrlParser.js +39 -0
- package/lib/cjs/index.js +38 -0
- package/lib/cjs/logger/DefaultLogger.js +31 -0
- package/lib/cjs/logger/HttpLogServiceClient.js +123 -0
- package/lib/cjs/logger/ILogServiceClient.js +2 -0
- package/lib/cjs/logger/ILogger.js +2 -0
- package/lib/cjs/logger/LoggerBase.js +48 -0
- package/lib/cjs/logger/LoggerSeverity.js +9 -0
- package/lib/cjs/logger/constants.js +5 -0
- package/lib/cjs/logger/index.js +27 -0
- package/lib/cjs/logger/model/EnrichedLogRecord.js +2 -0
- package/lib/cjs/logger/model/LogMetadata.js +2 -0
- package/lib/cjs/logger/model/LogRecord.js +2 -0
- package/lib/cjs/logger/model/index.js +19 -0
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/phase/IPhase.js +2 -0
- package/lib/cjs/phase/PhaseResult.js +2 -0
- package/lib/cjs/phase/flow/EndEnforcerFlow.js +32 -0
- package/lib/cjs/phase/flow/EnforceFlow.js +38 -0
- package/lib/cjs/phase/flow/FilterFlow.js +34 -0
- package/lib/cjs/phase/flow/PostEnforceFlow.js +32 -0
- package/lib/cjs/phase/flow/index.js +20 -0
- package/lib/cjs/phase/impl/AdditionalActivityHandlerPhase.js +59 -0
- package/lib/cjs/phase/impl/CompositePhase.js +72 -0
- package/lib/cjs/phase/impl/CreateBlockResponsePhase.js +110 -0
- package/lib/cjs/phase/impl/DecideActionPhase.js +68 -0
- package/lib/cjs/phase/impl/EnrichContextFromRequestPhase.js +175 -0
- package/lib/cjs/phase/impl/EnrichContextFromResponsePhase.js +95 -0
- package/lib/cjs/phase/impl/FilterPhase.js +53 -0
- package/lib/cjs/phase/impl/FirstPartyPhase.js +100 -0
- package/lib/cjs/phase/impl/ModifyIncomingRequestPhase.js +58 -0
- package/lib/cjs/phase/impl/ModifyOutgoingResponsePhase.js +63 -0
- package/lib/cjs/phase/impl/ParseTokenPhase.js +76 -0
- package/lib/cjs/phase/impl/PreflightPhase.js +68 -0
- package/lib/cjs/phase/impl/RiskApiPhase.js +179 -0
- package/lib/cjs/phase/impl/SendAsyncActivitiesOnRequestPhase.js +74 -0
- package/lib/cjs/phase/impl/SendAsyncActivitiesOnResponsePhase.js +58 -0
- package/lib/cjs/phase/impl/SendLogsPhase.js +66 -0
- package/lib/cjs/phase/impl/TelemetryPhase.js +75 -0
- package/lib/cjs/phase/impl/index.js +33 -0
- package/lib/cjs/phase/index.js +20 -0
- package/lib/cjs/products/account_defender/AccountDefender.js +161 -0
- package/lib/cjs/products/account_defender/AccountDefenderData.js +2 -0
- package/lib/cjs/products/account_defender/IAccountDefender.js +2 -0
- package/lib/cjs/products/account_defender/JwtData.js +2 -0
- package/lib/cjs/products/account_defender/constants.js +4 -0
- package/lib/cjs/products/account_defender/index.js +21 -0
- package/lib/cjs/products/bot_defender/BotDefender.js +208 -0
- package/lib/cjs/products/bot_defender/BotDefenderActionData.js +11 -0
- package/lib/cjs/products/bot_defender/BotDefenderData.js +2 -0
- package/lib/cjs/products/bot_defender/BotDefenderUtils.js +22 -0
- package/lib/cjs/products/bot_defender/IBotDefender.js +2 -0
- package/lib/cjs/products/bot_defender/block/DefaultBotDefenderBlocker.js +46 -0
- package/lib/cjs/products/bot_defender/block/captcha/CaptchaBlocker.js +25 -0
- package/lib/cjs/products/bot_defender/block/captcha/HtmlCaptchaBlocker.js +26 -0
- package/lib/cjs/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +42 -0
- package/lib/cjs/products/bot_defender/block/captcha/MobileCaptchaBlocker.js +40 -0
- package/lib/cjs/products/bot_defender/block/captcha/index.js +20 -0
- package/lib/cjs/products/bot_defender/block/index.js +21 -0
- package/lib/cjs/products/bot_defender/block/model/BlockData.js +2 -0
- package/lib/cjs/products/bot_defender/block/model/JsonBlockPayload.js +2 -0
- package/lib/cjs/products/bot_defender/block/model/MobileBlockPayload.js +2 -0
- package/lib/cjs/products/bot_defender/block/model/index.js +19 -0
- package/lib/cjs/products/bot_defender/block/templates/captcha_template.js +4 -0
- package/lib/cjs/products/bot_defender/block/templates/index.js +18 -0
- package/lib/cjs/products/bot_defender/block/templates/rate_limit_template.js +4 -0
- package/lib/cjs/products/bot_defender/block/utils.js +50 -0
- package/lib/cjs/products/bot_defender/filter/DefaultBotDefenderFilter.js +61 -0
- package/lib/cjs/products/bot_defender/filter/index.js +17 -0
- package/lib/cjs/products/bot_defender/first_party/DefaultBotDefenderFirstParty.js +201 -0
- package/lib/cjs/products/bot_defender/first_party/FirstPartySuffix.js +9 -0
- package/lib/cjs/products/bot_defender/first_party/constants.js +33 -0
- package/lib/cjs/products/bot_defender/first_party/index.js +20 -0
- package/lib/cjs/products/bot_defender/first_party/utils.js +58 -0
- package/lib/cjs/products/bot_defender/index.js +25 -0
- package/lib/cjs/products/bot_defender/reasons/BotDefenderBlockReason.js +8 -0
- package/lib/cjs/products/bot_defender/reasons/BotDefenderPassReason.js +10 -0
- package/lib/cjs/products/bot_defender/reasons/BotDefenderReasonType.js +2 -0
- package/lib/cjs/products/bot_defender/reasons/BotDefenderS2SCallReason.js +16 -0
- package/lib/cjs/products/bot_defender/reasons/index.js +20 -0
- package/lib/cjs/products/credential_intelligence/CredentialIntelligence.js +171 -0
- package/lib/cjs/products/credential_intelligence/ICredentialIntelligence.js +2 -0
- package/lib/cjs/products/credential_intelligence/constants.js +7 -0
- package/lib/cjs/products/credential_intelligence/endpoint/CredentialEndpoint.js +79 -0
- package/lib/cjs/products/credential_intelligence/endpoint/CredentialEndpointConfiguration.js +2 -0
- package/lib/cjs/products/credential_intelligence/endpoint/CredentialEndpointManager.js +78 -0
- package/lib/cjs/products/credential_intelligence/endpoint/ICredentialEndpoint.js +2 -0
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.js +124 -0
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.js +28 -0
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/CustomCredentialExtractor.js +63 -0
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.js +16 -0
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/ICredentialExtractor.js +2 -0
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.js +62 -0
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/SentThrough.js +10 -0
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/index.js +21 -0
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceHashProtocolFactory.js +24 -0
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceVersion.js +9 -0
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/ICredentialIntelligenceHashProtocol.js +2 -0
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.js +78 -0
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/SingleStepAndMultistepHashProtocol.js +60 -0
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.js +100 -0
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/SsoStep.js +8 -0
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/index.js +23 -0
- package/lib/cjs/products/credential_intelligence/endpoint/index.js +24 -0
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/BodyLoginSuccessfulParser.js +54 -0
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulCallback.js +2 -0
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.js +66 -0
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.js +57 -0
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/ILoginSuccessfulParser.js +2 -0
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.js +33 -0
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulReportingMethod.js +10 -0
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.js +53 -0
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/index.js +24 -0
- package/lib/cjs/products/credential_intelligence/endpoint/matcher/CredentialIntelligenceEndpointMatcherFactory.js +22 -0
- package/lib/cjs/products/credential_intelligence/endpoint/matcher/ExactPathEndpointMatcher.js +15 -0
- package/lib/cjs/products/credential_intelligence/endpoint/matcher/ICredentialIntelligenceEndpointMatcher.js +2 -0
- package/lib/cjs/products/credential_intelligence/endpoint/matcher/PathType.js +8 -0
- package/lib/cjs/products/credential_intelligence/endpoint/matcher/RegexPathEndpointMatcher.js +15 -0
- package/lib/cjs/products/credential_intelligence/endpoint/matcher/index.js +21 -0
- package/lib/cjs/products/credential_intelligence/index.js +21 -0
- package/lib/cjs/products/credential_intelligence/model/CredentialData.js +2 -0
- package/lib/cjs/products/credential_intelligence/model/CredentialIntelligenceData.js +2 -0
- package/lib/cjs/products/credential_intelligence/model/Credentials.js +2 -0
- package/lib/cjs/products/credential_intelligence/model/CustomExtractionCallback.js +2 -0
- package/lib/cjs/products/credential_intelligence/model/index.js +20 -0
- package/lib/cjs/products/index.js +21 -0
- package/lib/cjs/products/interfaces/IProduct.js +2 -0
- package/lib/cjs/products/interfaces/ProductData.js +2 -0
- package/lib/cjs/products/interfaces/ProductDataType.js +2 -0
- package/lib/cjs/products/interfaces/ProductType.js +2 -0
- package/lib/cjs/products/interfaces/Products.js +2 -0
- package/lib/cjs/products/interfaces/index.js +21 -0
- package/lib/cjs/products/utils/ProductName.js +11 -0
- package/lib/cjs/products/utils/ProductPriorityOrder.js +11 -0
- package/lib/cjs/products/utils/index.js +19 -0
- package/lib/cjs/products/utils/utils.js +18 -0
- package/lib/cjs/pxde/DefaultDataEnrichment.js +130 -0
- package/lib/cjs/pxde/IDataEnrichment.js +2 -0
- package/lib/cjs/pxde/constants.js +7 -0
- package/lib/cjs/pxde/index.js +20 -0
- package/lib/cjs/pxde/model/PXDE.js +2 -0
- package/lib/cjs/pxde/model/PxdeData.js +2 -0
- package/lib/cjs/pxde/model/index.js +18 -0
- package/lib/cjs/pxhd/PXHDUtils.js +31 -0
- package/lib/cjs/pxhd/index.js +20 -0
- package/lib/cjs/pxhd/model/PXHD.js +2 -0
- package/lib/cjs/pxhd/model/PXHDSource.js +8 -0
- package/lib/cjs/pxhd/model/index.js +18 -0
- package/lib/cjs/risk_api/client/IRiskApiClient.js +2 -0
- package/lib/cjs/risk_api/client/PostRiskApiClientBase.js +232 -0
- package/lib/cjs/risk_api/client/PostRiskApiClientV2.js +31 -0
- package/lib/cjs/risk_api/client/PostRiskApiClientV3.js +31 -0
- package/lib/cjs/risk_api/client/index.js +20 -0
- package/lib/cjs/risk_api/constants.js +4 -0
- package/lib/cjs/risk_api/index.js +20 -0
- package/lib/cjs/risk_api/model/RiskActivity.js +2 -0
- package/lib/cjs/risk_api/model/RiskApiCallResult.js +10 -0
- package/lib/cjs/risk_api/model/RiskStatus.js +8 -0
- package/lib/cjs/risk_api/model/S2SErrorReason.js +12 -0
- package/lib/cjs/risk_api/model/index.js +20 -0
- package/lib/cjs/risk_api/risk_response/IRiskResponse.js +2 -0
- package/lib/cjs/risk_api/risk_response/RiskResponseBase.js +131 -0
- package/lib/cjs/risk_api/risk_response/RiskResponsePayloadType.js +2 -0
- package/lib/cjs/risk_api/risk_response/index.js +20 -0
- package/lib/cjs/risk_api/risk_response/v2/DefaultRiskResponseV2.js +43 -0
- package/lib/cjs/risk_api/risk_response/v2/RiskResponseV2Payload.js +2 -0
- package/lib/cjs/risk_api/risk_response/v2/index.js +18 -0
- package/lib/cjs/risk_api/risk_response/v3/DefaultRiskResponseV3.js +39 -0
- package/lib/cjs/risk_api/risk_response/v3/RiskResponseV3Payload.js +2 -0
- package/lib/cjs/risk_api/risk_response/v3/index.js +18 -0
- package/lib/cjs/risk_token/MobileError.js +10 -0
- package/lib/cjs/risk_token/TokenOrigin.js +8 -0
- package/lib/cjs/risk_token/TokenParseResult.js +10 -0
- package/lib/cjs/risk_token/TokenVersion.js +8 -0
- package/lib/cjs/risk_token/constants.js +12 -0
- package/lib/cjs/risk_token/index.js +29 -0
- package/lib/cjs/risk_token/parser/DefaultTokenV2Parser.js +35 -0
- package/lib/cjs/risk_token/parser/DefaultTokenV3Parser.js +35 -0
- package/lib/cjs/risk_token/parser/ITokenParser.js +2 -0
- package/lib/cjs/risk_token/parser/TokenParserBase.js +154 -0
- package/lib/cjs/risk_token/parser/TokenParserOptions.js +2 -0
- package/lib/cjs/risk_token/parser/index.js +21 -0
- package/lib/cjs/risk_token/token/IToken.js +2 -0
- package/lib/cjs/risk_token/token/TokenBase.js +98 -0
- package/lib/cjs/risk_token/token/TokenPayloadType.js +2 -0
- package/lib/cjs/risk_token/token/index.js +11 -0
- package/lib/cjs/risk_token/token/v2/DefaultTokenV2.js +201 -0
- package/lib/cjs/risk_token/token/v2/TokenV2Payload.js +2 -0
- package/lib/cjs/risk_token/token/v3/DefaultTokenV3.js +233 -0
- package/lib/cjs/risk_token/token/v3/TokenSignField.js +8 -0
- package/lib/cjs/risk_token/token/v3/TokenV3Payload.js +2 -0
- package/lib/cjs/risk_token/utils.js +16 -0
- package/lib/cjs/telemetry/DefaultTelemetry.js +187 -0
- package/lib/cjs/telemetry/ITelemetry.js +2 -0
- package/lib/cjs/telemetry/constants.js +10 -0
- package/lib/cjs/telemetry/index.js +20 -0
- package/lib/cjs/telemetry/model/TelemetryActivity.js +2 -0
- package/lib/cjs/utils/Algorithm.js +8 -0
- package/lib/cjs/utils/ModuleMode.js +8 -0
- package/lib/cjs/utils/VidSource.js +8 -0
- package/lib/cjs/utils/base64/IBase64Utils.js +2 -0
- package/lib/cjs/utils/base64/index.js +17 -0
- package/lib/cjs/utils/cipher/ICipherUtils.js +2 -0
- package/lib/cjs/utils/cipher/index.js +17 -0
- package/lib/cjs/utils/constants.js +15 -0
- package/lib/cjs/utils/cookie_parser/ICookieParser.js +2 -0
- package/lib/cjs/utils/cookie_parser/StringSplitCookieParser.js +36 -0
- package/lib/cjs/utils/cookie_parser/index.js +18 -0
- package/lib/cjs/utils/error/EnforcerError.js +29 -0
- package/lib/cjs/utils/error/EnforcerErrorName.js +8 -0
- package/lib/cjs/utils/error/EnforcerTimeoutError.js +30 -0
- package/lib/cjs/utils/error/index.js +9 -0
- package/lib/cjs/utils/hash/IHashUtils.js +2 -0
- package/lib/cjs/utils/hash/index.js +17 -0
- package/lib/cjs/utils/hmac/IHmacUtils.js +2 -0
- package/lib/cjs/utils/hmac/index.js +17 -0
- package/lib/cjs/utils/index.js +30 -0
- package/lib/cjs/utils/ip_range_checker/IIpRangeChecker.js +2 -0
- package/lib/cjs/utils/ip_range_checker/index.js +17 -0
- package/lib/cjs/utils/request_id_generator/IRequestIdGenerator.js +2 -0
- package/lib/cjs/utils/request_id_generator/index.js +17 -0
- package/lib/cjs/utils/url_parser/IURLParser.js +2 -0
- package/lib/cjs/utils/url_parser/index.js +17 -0
- package/lib/cjs/utils/utils.js +165 -0
- package/lib/esm/action/utils.js +34 -0
- package/lib/esm/activities/HttpActivityClient.js +59 -0
- package/lib/esm/activities/HttpBatchedActivityClient.js +55 -0
- package/lib/esm/activities/model/index.js +4 -0
- package/lib/esm/activities/utils.js +190 -0
- package/lib/esm/additional_activity_handler/AdditionalActivityHandlerUtils.js +14 -0
- package/lib/esm/config/StaticConfigurationBase.js +280 -0
- package/lib/esm/context/DefaultContext.js +117 -0
- package/lib/esm/cors/DefaultCors.js +49 -0
- package/lib/esm/custom_parameters/CustomParametersUtils.js +27 -0
- package/lib/esm/enforcer/EnforcerBase.js +157 -0
- package/lib/esm/graphql/DefaultGraphQLParser.js +117 -0
- package/lib/esm/http/index.js +2 -0
- package/lib/esm/http/interfaces/index.js +12 -0
- package/lib/esm/http/utils/FormDataImpl.js +36 -0
- package/lib/esm/http/utils/MinimalResponseImpl.js +10 -0
- package/lib/esm/http/utils/MinimalResponseUtils.js +30 -0
- package/lib/esm/http/utils/MultipartFormDataUtils.js +44 -0
- package/lib/esm/http/utils/OutgoingRequestImpl.js +13 -0
- package/lib/esm/http/utils/URLUtils.js +62 -0
- package/lib/esm/http/utils/UrlImpl.js +54 -0
- package/lib/esm/http/utils/UrlSearchParamsImpl.js +116 -0
- package/lib/esm/http/utils/index.js +11 -0
- package/lib/esm/impl/base64/BufferBase64Utils.js +11 -0
- package/lib/esm/impl/cipher/CryptoCipherUtils.js +18 -0
- package/lib/esm/impl/cipher/SubtleCryptoCipherUtils.js +38 -0
- package/lib/esm/impl/hash/CryptoHashUtils.js +10 -0
- package/lib/esm/impl/hash/CryptoJSHashUtils.js +12 -0
- package/lib/esm/impl/hash/SubtleCryptoHashUtils.js +21 -0
- package/lib/esm/impl/hmac/CryptoHmacUtils.js +20 -0
- package/lib/esm/impl/hmac/CryptoJSHmacUtils.js +12 -0
- package/lib/esm/impl/http/phin/PhinHttpClient.js +31 -0
- package/lib/esm/impl/http/phin/PhinIncomingResponse.js +23 -0
- package/lib/esm/impl/url_parser/DefaultUrlParser.js +28 -0
- package/lib/esm/logger/HttpLogServiceClient.js +52 -0
- package/lib/esm/logger/LoggerBase.js +43 -0
- package/lib/esm/phase/impl/AdditionalActivityHandlerPhase.js +11 -0
- package/lib/esm/phase/impl/CompositePhase.js +16 -0
- package/lib/esm/phase/impl/CreateBlockResponsePhase.js +50 -0
- package/lib/esm/phase/impl/DecideActionPhase.js +19 -0
- package/lib/esm/phase/impl/EnrichContextFromRequestPhase.js +43 -0
- package/lib/esm/phase/impl/EnrichContextFromResponsePhase.js +20 -0
- package/lib/esm/phase/impl/FilterPhase.js +9 -0
- package/lib/esm/phase/impl/FirstPartyPhase.js +31 -0
- package/lib/esm/phase/impl/ModifyIncomingRequestPhase.js +10 -0
- package/lib/esm/phase/impl/ModifyOutgoingResponsePhase.js +14 -0
- package/lib/esm/phase/impl/ParseTokenPhase.js +27 -0
- package/lib/esm/phase/impl/PreflightPhase.js +20 -0
- package/lib/esm/phase/impl/RiskApiPhase.js +64 -0
- package/lib/esm/phase/impl/SendAsyncActivitiesOnRequestPhase.js +16 -0
- package/lib/esm/phase/impl/SendAsyncActivitiesOnResponsePhase.js +10 -0
- package/lib/esm/phase/impl/SendLogsPhase.js +16 -0
- package/lib/esm/phase/impl/TelemetryPhase.js +17 -0
- package/lib/esm/products/account_defender/AccountDefender.js +79 -0
- package/lib/esm/products/bot_defender/BotDefender.js +114 -0
- package/lib/esm/products/bot_defender/BotDefenderActionData.js +8 -0
- package/lib/esm/products/bot_defender/block/DefaultBotDefenderBlocker.js +41 -0
- package/lib/esm/products/bot_defender/block/captcha/CaptchaBlocker.js +24 -0
- package/lib/esm/products/bot_defender/block/captcha/HtmlCaptchaBlocker.js +21 -0
- package/lib/esm/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +39 -0
- package/lib/esm/products/bot_defender/block/captcha/MobileCaptchaBlocker.js +36 -0
- package/lib/esm/products/bot_defender/block/utils.js +43 -0
- package/lib/esm/products/bot_defender/filter/DefaultBotDefenderFilter.js +57 -0
- package/lib/esm/products/bot_defender/first_party/DefaultBotDefenderFirstParty.js +114 -0
- package/lib/esm/products/bot_defender/first_party/constants.js +29 -0
- package/lib/esm/products/credential_intelligence/CredentialIntelligence.js +75 -0
- package/lib/esm/products/credential_intelligence/endpoint/CredentialEndpoint.js +29 -0
- package/lib/esm/products/credential_intelligence/endpoint/CredentialEndpointManager.js +19 -0
- package/lib/esm/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.js +53 -0
- package/lib/esm/products/credential_intelligence/endpoint/extractor/CustomCredentialExtractor.js +14 -0
- package/lib/esm/products/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.js +13 -0
- package/lib/esm/products/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.js +18 -0
- package/lib/esm/products/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.js +20 -0
- package/lib/esm/products/credential_intelligence/endpoint/hash_protocol/SingleStepAndMultistepHashProtocol.js +16 -0
- package/lib/esm/products/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.js +37 -0
- package/lib/esm/products/credential_intelligence/endpoint/login_successful/BodyLoginSuccessfulParser.js +10 -0
- package/lib/esm/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.js +16 -0
- package/lib/esm/products/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.js +14 -0
- package/lib/esm/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.js +27 -0
- package/lib/esm/products/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.js +9 -0
- package/lib/esm/products/credential_intelligence/endpoint/matcher/ExactPathEndpointMatcher.js +11 -0
- package/lib/esm/products/credential_intelligence/endpoint/matcher/RegexPathEndpointMatcher.js +11 -0
- package/lib/esm/pxde/DefaultDataEnrichment.js +60 -0
- package/lib/esm/pxhd/PXHDUtils.js +28 -0
- package/lib/esm/risk_api/client/PostRiskApiClientBase.js +134 -0
- package/lib/esm/risk_api/risk_response/RiskResponseBase.js +41 -0
- package/lib/esm/risk_api/risk_response/v2/DefaultRiskResponseV2.js +16 -0
- package/lib/esm/risk_api/risk_response/v3/DefaultRiskResponseV3.js +12 -0
- package/lib/esm/risk_token/parser/TokenParserBase.js +83 -0
- package/lib/esm/risk_token/token/TokenBase.js +45 -0
- package/lib/esm/risk_token/token/v2/DefaultTokenV2.js +97 -0
- package/lib/esm/risk_token/token/v3/DefaultTokenV3.js +123 -0
- package/lib/esm/telemetry/DefaultTelemetry.js +107 -0
- package/lib/esm/utils/base64/index.js +1 -0
- package/lib/esm/utils/cipher/index.js +1 -0
- package/lib/esm/utils/constants.js +12 -0
- package/lib/esm/utils/hash/index.js +1 -0
- package/lib/esm/utils/hmac/index.js +1 -0
- package/lib/esm/utils/ip_range_checker/IIpRangeChecker.js +1 -0
- package/lib/esm/utils/ip_range_checker/index.js +1 -0
- package/lib/esm/utils/request_id_generator/IRequestIdGenerator.js +1 -0
- package/lib/esm/utils/request_id_generator/index.js +1 -0
- package/lib/esm/utils/url_parser/IURLParser.js +1 -0
- package/lib/esm/utils/url_parser/index.js +1 -0
- package/lib/esm/utils/utils.js +99 -0
- package/lib/types/activities/HttpActivityClient.d.ts +20 -0
- package/lib/types/activities/HttpBatchedActivityClient.d.ts +21 -0
- package/lib/types/activities/model/AsyncActivity.d.ts +14 -0
- package/lib/types/activities/model/AsyncActivityDetails.d.ts +29 -0
- package/lib/types/activities/model/CommonActivityDetails.d.ts +40 -0
- package/lib/types/activities/model/HeaderEntry.d.ts +4 -0
- package/lib/types/activities/model/index.d.ts +4 -0
- package/lib/types/activities/utils.d.ts +6075 -0
- package/lib/types/additional_activity_handler/AdditionalActivityHandler.d.ts +3 -0
- package/lib/types/config/ConfigurationParams.d.ts +83 -0
- package/lib/types/config/IConfiguration.d.ts +312 -0
- package/lib/types/config/StaticConfigurationBase.d.ts +92 -0
- package/lib/types/context/DefaultContext.d.ts +49 -0
- package/lib/types/context/interfaces/RiskApiData.d.ts +31 -0
- package/lib/types/http/index.d.ts +2 -0
- package/lib/types/http/interfaces/IBody.d.ts +25 -0
- package/lib/types/http/interfaces/IIncomingRequest.d.ts +32 -0
- package/lib/types/http/interfaces/IURL.d.ts +9 -0
- package/lib/types/http/interfaces/IURLSearchParams.d.ts +9 -0
- package/lib/types/http/interfaces/index.d.ts +12 -0
- package/lib/types/http/utils/OutgoingRequestImpl.d.ts +14 -0
- package/lib/types/http/utils/URLUtils.d.ts +7 -0
- package/lib/types/http/utils/UrlImpl.d.ts +18 -0
- package/lib/types/http/utils/UrlSearchParamsImpl.d.ts +19 -0
- package/lib/types/http/utils/index.d.ts +11 -0
- package/lib/types/impl/base64/AtobBase64Utils.d.ts +5 -0
- package/lib/types/impl/base64/BufferBase64Utils.d.ts +6 -0
- package/lib/types/impl/base64/JSBase64Base64Utils.d.ts +5 -0
- package/lib/types/impl/cipher/CryptoCipherUtils.d.ts +10 -0
- package/lib/types/impl/cipher/SubtleCryptoCipherUtils.d.ts +8 -0
- package/lib/types/impl/hash/CryptoHashUtils.d.ts +10 -0
- package/lib/types/impl/hash/CryptoJSHashUtils.d.ts +4 -0
- package/lib/types/impl/hash/SubtleCryptoHashUtils.d.ts +7 -0
- package/lib/types/impl/hmac/CryptoHmacUtils.d.ts +10 -0
- package/lib/types/impl/hmac/CryptoJSHmacUtils.d.ts +4 -0
- package/lib/types/impl/http/phin/PhinHttpClient.d.ts +6 -0
- package/lib/types/impl/http/phin/PhinIncomingResponse.d.ts +13 -0
- package/lib/types/impl/ip_range_checker/DefaultIpRangeChecker.d.ts +4 -0
- package/lib/types/impl/request_id_generator/UuidRequestIdGenerator.d.ts +4 -0
- package/lib/types/impl/url_parser/DefaultUrlParser.d.ts +13 -0
- package/lib/types/products/bot_defender/block/DefaultBotDefenderBlocker.d.ts +14 -0
- package/lib/types/products/bot_defender/block/captcha/CaptchaBlocker.d.ts +16 -0
- package/lib/types/products/bot_defender/block/captcha/HtmlCaptchaBlocker.d.ts +9 -0
- package/lib/types/products/bot_defender/block/captcha/JsonCaptchaBlocker.d.ts +10 -0
- package/lib/types/products/bot_defender/block/captcha/MobileCaptchaBlocker.d.ts +12 -0
- package/lib/types/products/bot_defender/first_party/constants.d.ts +24 -0
- package/lib/types/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.d.ts +15 -0
- package/lib/types/products/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.d.ts +10 -0
- package/lib/types/risk_api/client/PostRiskApiClientBase.d.ts +39 -0
- package/lib/types/risk_api/model/RiskActivity.d.ts +16 -0
- package/lib/types/risk_api/risk_response/IRiskResponse.d.ts +16 -0
- package/lib/types/risk_api/risk_response/RiskResponseBase.d.ts +23 -0
- package/lib/types/risk_api/risk_response/v2/DefaultRiskResponseV2.d.ts +8 -0
- package/lib/types/risk_api/risk_response/v2/RiskResponseV2Payload.d.ts +14 -0
- package/lib/types/risk_api/risk_response/v3/RiskResponseV3Payload.d.ts +14 -0
- package/lib/types/utils/base64/index.d.ts +1 -0
- package/lib/types/utils/cipher/index.d.ts +1 -0
- package/lib/types/utils/constants.d.ts +12 -0
- package/lib/types/utils/hash/index.d.ts +1 -0
- package/lib/types/utils/hmac/index.d.ts +1 -0
- package/lib/types/utils/ip_range_checker/index.d.ts +1 -0
- package/lib/types/utils/request_id_generator/index.d.ts +1 -0
- package/lib/types/utils/url_parser/index.d.ts +1 -0
- package/lib/types/utils/utils.d.ts +18 -0
- package/package.json +25 -7
- package/lib/action/utils.js +0 -34
- package/lib/activities/HttpActivityClient.d.ts +0 -20
- package/lib/activities/HttpActivityClient.js +0 -70
- package/lib/activities/HttpBatchedActivityClient.d.ts +0 -21
- package/lib/activities/HttpBatchedActivityClient.js +0 -68
- package/lib/activities/model/Activity.d.ts +0 -13
- package/lib/activities/model/ActivityDetails.d.ts +0 -46
- package/lib/activities/model/index.d.ts +0 -2
- package/lib/activities/model/index.js +0 -2
- package/lib/activities/utils.d.ts +0 -13
- package/lib/activities/utils.js +0 -114
- package/lib/additional_activity_handler/AdditionalActivityHandler.d.ts +0 -3
- package/lib/additional_activity_handler/AdditionalActivityHandlerUtils.js +0 -22
- package/lib/config/ConfigurationParams.d.ts +0 -83
- package/lib/config/IConfiguration.d.ts +0 -312
- package/lib/config/StaticConfigurationBase.d.ts +0 -92
- package/lib/config/StaticConfigurationBase.js +0 -278
- package/lib/context/DefaultContext.d.ts +0 -49
- package/lib/context/DefaultContext.js +0 -85
- package/lib/context/interfaces/RiskApiData.d.ts +0 -27
- package/lib/cors/DefaultCors.js +0 -59
- package/lib/custom_parameters/CustomParametersUtils.js +0 -36
- package/lib/enforcer/EnforcerBase.js +0 -168
- package/lib/graphql/DefaultGraphQLParser.js +0 -126
- package/lib/http/impl/FormDataImpl.js +0 -36
- package/lib/http/impl/MinimalResponseImpl.js +0 -7
- package/lib/http/impl/OutgoingRequestImpl.d.ts +0 -14
- package/lib/http/impl/OutgoingRequestImpl.js +0 -9
- package/lib/http/impl/index.d.ts +0 -4
- package/lib/http/impl/index.js +0 -4
- package/lib/http/impl/phin/PhinHttpClient.d.ts +0 -6
- package/lib/http/impl/phin/PhinHttpClient.js +0 -41
- package/lib/http/impl/phin/PhinIncomingResponse.d.ts +0 -13
- package/lib/http/impl/phin/PhinIncomingResponse.js +0 -38
- package/lib/http/index.d.ts +0 -3
- package/lib/http/index.js +0 -3
- package/lib/http/interfaces/IBody.d.ts +0 -24
- package/lib/http/interfaces/IIncomingRequest.d.ts +0 -28
- package/lib/http/interfaces/IURL.d.ts +0 -6
- package/lib/http/interfaces/index.d.ts +0 -11
- package/lib/http/interfaces/index.js +0 -11
- package/lib/http/utils/MinimalResponseUtils.js +0 -32
- package/lib/http/utils/MultipartFormDataUtils.js +0 -45
- package/lib/http/utils/index.d.ts +0 -5
- package/lib/http/utils/index.js +0 -5
- package/lib/logger/HttpLogServiceClient.js +0 -60
- package/lib/logger/LoggerBase.js +0 -41
- package/lib/phase/impl/AdditionalActivityHandlerPhase.js +0 -22
- package/lib/phase/impl/CompositePhase.js +0 -26
- package/lib/phase/impl/CreateBlockResponsePhase.js +0 -61
- package/lib/phase/impl/DecideActionPhase.js +0 -29
- package/lib/phase/impl/EnrichContextFromRequestPhase.js +0 -60
- package/lib/phase/impl/EnrichContextFromResponsePhase.js +0 -31
- package/lib/phase/impl/FilterPhase.js +0 -19
- package/lib/phase/impl/FirstPartyPhase.js +0 -42
- package/lib/phase/impl/ModifyIncomingRequestPhase.js +0 -20
- package/lib/phase/impl/ModifyOutgoingResponsePhase.js +0 -25
- package/lib/phase/impl/ParseTokenPhase.js +0 -37
- package/lib/phase/impl/PreflightPhase.js +0 -28
- package/lib/phase/impl/RiskApiPhase.js +0 -76
- package/lib/phase/impl/SendAsyncActivitiesOnRequestPhase.js +0 -28
- package/lib/phase/impl/SendAsyncActivitiesOnResponsePhase.js +0 -20
- package/lib/phase/impl/SendLogsPhase.js +0 -26
- package/lib/phase/impl/TelemetryPhase.js +0 -29
- package/lib/products/account_defender/AccountDefender.js +0 -98
- package/lib/products/bot_defender/BotDefender.js +0 -135
- package/lib/products/bot_defender/BotDefenderActionData.js +0 -6
- package/lib/products/bot_defender/block/DefaultBotDefenderBlocker.d.ts +0 -14
- package/lib/products/bot_defender/block/DefaultBotDefenderBlocker.js +0 -39
- package/lib/products/bot_defender/block/captcha/CaptchaBlocker.d.ts +0 -13
- package/lib/products/bot_defender/block/captcha/CaptchaBlocker.js +0 -20
- package/lib/products/bot_defender/block/captcha/HtmlCaptchaBlocker.d.ts +0 -9
- package/lib/products/bot_defender/block/captcha/HtmlCaptchaBlocker.js +0 -20
- package/lib/products/bot_defender/block/captcha/JsonCaptchaBlocker.d.ts +0 -10
- package/lib/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +0 -38
- package/lib/products/bot_defender/block/captcha/MobileCaptchaBlocker.d.ts +0 -12
- package/lib/products/bot_defender/block/captcha/MobileCaptchaBlocker.js +0 -34
- package/lib/products/bot_defender/block/utils.js +0 -44
- package/lib/products/bot_defender/filter/DefaultBotDefenderFilter.js +0 -55
- package/lib/products/bot_defender/first_party/DefaultBotDefenderFirstParty.js +0 -131
- package/lib/products/bot_defender/first_party/constants.d.ts +0 -28
- package/lib/products/bot_defender/first_party/constants.js +0 -36
- package/lib/products/credential_intelligence/CredentialIntelligence.js +0 -96
- package/lib/products/credential_intelligence/endpoint/CredentialEndpoint.js +0 -37
- package/lib/products/credential_intelligence/endpoint/CredentialEndpointManager.js +0 -32
- package/lib/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.d.ts +0 -15
- package/lib/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.js +0 -64
- package/lib/products/credential_intelligence/endpoint/extractor/CustomCredentialExtractor.js +0 -24
- package/lib/products/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.js +0 -11
- package/lib/products/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.d.ts +0 -10
- package/lib/products/credential_intelligence/endpoint/extractor/QueryParamCredentialExtractor.js +0 -23
- package/lib/products/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.js +0 -30
- package/lib/products/credential_intelligence/endpoint/hash_protocol/SingleStepAndMultistepHashProtocol.js +0 -25
- package/lib/products/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.js +0 -49
- package/lib/products/credential_intelligence/endpoint/login_successful/BodyLoginSuccessfulParser.js +0 -20
- package/lib/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.js +0 -26
- package/lib/products/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.js +0 -23
- package/lib/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.js +0 -26
- package/lib/products/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.js +0 -19
- package/lib/products/credential_intelligence/endpoint/matcher/ExactPathEndpointMatcher.js +0 -9
- package/lib/products/credential_intelligence/endpoint/matcher/RegexPathEndpointMatcher.js +0 -9
- package/lib/pxde/DefaultDataEnrichment.js +0 -74
- package/lib/pxhd/PXHDUtils.js +0 -28
- package/lib/risk_api/client/PostRiskApiClientBase.d.ts +0 -44
- package/lib/risk_api/client/PostRiskApiClientBase.js +0 -235
- package/lib/risk_api/model/RiskActivity.d.ts +0 -56
- package/lib/risk_api/risk_response/IRiskResponse.d.ts +0 -15
- package/lib/risk_api/risk_response/RiskResponseBase.d.ts +0 -22
- package/lib/risk_api/risk_response/RiskResponseBase.js +0 -54
- package/lib/risk_api/risk_response/v2/DefaultRiskResponseV2.d.ts +0 -8
- package/lib/risk_api/risk_response/v2/DefaultRiskResponseV2.js +0 -18
- package/lib/risk_api/risk_response/v2/RiskResponseV2Payload.d.ts +0 -13
- package/lib/risk_api/risk_response/v3/DefaultRiskResponseV3.js +0 -14
- package/lib/risk_api/risk_response/v3/RiskResponseV3Payload.d.ts +0 -13
- package/lib/risk_token/parser/TokenParserBase.js +0 -94
- package/lib/risk_token/token/TokenBase.js +0 -50
- package/lib/risk_token/token/v2/DefaultTokenV2.js +0 -112
- package/lib/risk_token/token/v3/DefaultTokenV3.js +0 -137
- package/lib/telemetry/DefaultTelemetry.js +0 -119
- package/lib/utils/base64/AtobBase64Utils.d.ts +0 -5
- package/lib/utils/base64/BufferBase64Utils.d.ts +0 -6
- package/lib/utils/base64/BufferBase64Utils.js +0 -11
- package/lib/utils/base64/JSBase64Base64Utils.d.ts +0 -5
- package/lib/utils/base64/index.d.ts +0 -4
- package/lib/utils/base64/index.js +0 -4
- package/lib/utils/cipher/CryptoCipherUtils.d.ts +0 -10
- package/lib/utils/cipher/CryptoCipherUtils.js +0 -28
- package/lib/utils/cipher/SubtleCryptoCipherUtils.d.ts +0 -9
- package/lib/utils/cipher/SubtleCryptoCipherUtils.js +0 -47
- package/lib/utils/cipher/index.d.ts +0 -3
- package/lib/utils/cipher/index.js +0 -2
- package/lib/utils/constants.d.ts +0 -11
- package/lib/utils/constants.js +0 -11
- package/lib/utils/hash/CryptoHashUtils.d.ts +0 -11
- package/lib/utils/hash/CryptoHashUtils.js +0 -20
- package/lib/utils/hash/CryptoJSHashUtils.d.ts +0 -5
- package/lib/utils/hash/CryptoJSHashUtils.js +0 -12
- package/lib/utils/hash/SubtleCryptoHashUtils.d.ts +0 -8
- package/lib/utils/hash/SubtleCryptoHashUtils.js +0 -31
- package/lib/utils/hash/index.d.ts +0 -4
- package/lib/utils/hash/index.js +0 -4
- package/lib/utils/hmac/CryptoHmacUtils.d.ts +0 -11
- package/lib/utils/hmac/CryptoHmacUtils.js +0 -19
- package/lib/utils/hmac/CryptoJSHmacUtils.d.ts +0 -5
- package/lib/utils/hmac/CryptoJSHmacUtils.js +0 -12
- package/lib/utils/hmac/index.d.ts +0 -3
- package/lib/utils/hmac/index.js +0 -3
- package/lib/utils/ip_range_checker/DefaultIpRangeChecker.d.ts +0 -4
- package/lib/utils/ip_range_checker/index.d.ts +0 -2
- package/lib/utils/ip_range_checker/index.js +0 -1
- package/lib/utils/request_id_generator/UuidRequestIdGenerator.d.ts +0 -4
- package/lib/utils/request_id_generator/index.d.ts +0 -2
- package/lib/utils/request_id_generator/index.js +0 -1
- package/lib/utils/url_parser/DefaultUrlParser.d.ts +0 -13
- package/lib/utils/url_parser/DefaultUrlParser.js +0 -21
- package/lib/utils/url_parser/index.d.ts +0 -2
- package/lib/utils/url_parser/index.js +0 -2
- package/lib/utils/utils.d.ts +0 -24
- package/lib/utils/utils.js +0 -121
- /package/lib/{action → esm/action}/Action.js +0 -0
- /package/lib/{action → esm/action}/ActionData.js +0 -0
- /package/lib/{action → esm/action}/ActionPriorityOrder.js +0 -0
- /package/lib/{action → esm/action}/Decision.js +0 -0
- /package/lib/{action → esm/action}/ProductAction.js +0 -0
- /package/lib/{action → esm/action}/index.js +0 -0
- /package/lib/{activities → esm/activities}/ActivityType.js +0 -0
- /package/lib/{activities → esm/activities}/IActivityClient.js +0 -0
- /package/lib/{activities → esm/activities}/constants.js +0 -0
- /package/lib/{activities → esm/activities}/index.js +0 -0
- /package/lib/{activities/model/Activity.js → esm/activities/model/AsyncActivity.js} +0 -0
- /package/lib/{activities/model/ActivityDetails.js → esm/activities/model/AsyncActivityDetails.js} +0 -0
- /package/lib/{additional_activity_handler/AdditionalActivityHandler.js → esm/activities/model/CommonActivityDetails.js} +0 -0
- /package/lib/{blocker/IBlocker.js → esm/activities/model/HeaderEntry.js} +0 -0
- /package/lib/{blocker/IConditionalBlocker.js → esm/additional_activity_handler/AdditionalActivityHandler.js} +0 -0
- /package/lib/{additional_activity_handler → esm/additional_activity_handler}/index.js +0 -0
- /package/lib/{blocker → esm/blocker}/BlockAction.js +0 -0
- /package/lib/{blocker → esm/blocker}/BlockActionToProductMap.js +0 -0
- /package/lib/{blocker → esm/blocker}/BlockActionToWordMap.js +0 -0
- /package/lib/{config/ConfigurationParams.js → esm/blocker/IBlocker.js} +0 -0
- /package/lib/{config/IConfiguration.js → esm/blocker/IConditionalBlocker.js} +0 -0
- /package/lib/{blocker → esm/blocker}/index.js +0 -0
- /package/lib/{context/interfaces/IContext.js → esm/config/ConfigurationParams.js} +0 -0
- /package/lib/{config → esm/config}/DefaultConfigurations.js +0 -0
- /package/lib/{context/interfaces/MobileData.js → esm/config/IConfiguration.js} +0 -0
- /package/lib/{config → esm/config}/index.js +0 -0
- /package/lib/{context → esm/context}/index.js +0 -0
- /package/lib/{context/interfaces/ReadonlyContext.js → esm/context/interfaces/IContext.js} +0 -0
- /package/lib/{context/interfaces/RequestData.js → esm/context/interfaces/MobileData.js} +0 -0
- /package/lib/{context/interfaces/RiskApiData.js → esm/context/interfaces/ReadonlyContext.js} +0 -0
- /package/lib/{context/interfaces/ServerData.js → esm/context/interfaces/RequestData.js} +0 -0
- /package/lib/{context/interfaces/TlsData.js → esm/context/interfaces/RiskApiData.js} +0 -0
- /package/lib/{context/interfaces/TokenData.js → esm/context/interfaces/ServerData.js} +0 -0
- /package/lib/{cors/CustomBlockResponseHeadersHandler.js → esm/context/interfaces/TlsData.js} +0 -0
- /package/lib/{cors/CustomPreflightHandler.js → esm/context/interfaces/TokenData.js} +0 -0
- /package/lib/{context → esm/context}/interfaces/index.js +0 -0
- /package/lib/{cors/ICors.js → esm/cors/CustomBlockResponseHeadersHandler.js} +0 -0
- /package/lib/{custom_parameters/CustomParameters.js → esm/cors/CustomPreflightHandler.js} +0 -0
- /package/lib/{custom_parameters/CustomParametersFunction.js → esm/cors/ICors.js} +0 -0
- /package/lib/{cors → esm/cors}/constants.js +0 -0
- /package/lib/{cors → esm/cors}/index.js +0 -0
- /package/lib/{enforcer/IEnforcer.js → esm/custom_parameters/CustomParameters.js} +0 -0
- /package/lib/{enforcer/options/EnforcerBaseOptions.js → esm/custom_parameters/CustomParametersFunction.js} +0 -0
- /package/lib/{custom_parameters → esm/custom_parameters}/index.js +0 -0
- /package/lib/{enforcer/options/EnforcerOptionsType.js → esm/enforcer/IEnforcer.js} +0 -0
- /package/lib/{enforcer → esm/enforcer}/index.js +0 -0
- /package/lib/{enforcer/options/EnforcerV2Options.js → esm/enforcer/options/EnforcerBaseOptions.js} +0 -0
- /package/lib/{enforcer/options/EnforcerV3Options.js → esm/enforcer/options/EnforcerOptionsType.js} +0 -0
- /package/lib/{filter/IFilter.js → esm/enforcer/options/EnforcerV2Options.js} +0 -0
- /package/lib/{first_party/FirstPartyData.js → esm/enforcer/options/EnforcerV3Options.js} +0 -0
- /package/lib/{enforcer → esm/enforcer}/options/index.js +0 -0
- /package/lib/{filter → esm/filter}/FilterReason.js +0 -0
- /package/lib/{first_party/IFirstParty.js → esm/filter/IFilter.js} +0 -0
- /package/lib/{filter → esm/filter}/index.js +0 -0
- /package/lib/{graphql/IGraphQLParser.js → esm/first_party/FirstPartyData.js} +0 -0
- /package/lib/{graphql/model/GraphQLData.js → esm/first_party/IFirstParty.js} +0 -0
- /package/lib/{first_party → esm/first_party}/index.js +0 -0
- /package/lib/{graphql/model/GraphQLOperation.js → esm/graphql/IGraphQLParser.js} +0 -0
- /package/lib/{graphql → esm/graphql}/index.js +0 -0
- /package/lib/{http/interfaces/IBody.js → esm/graphql/model/GraphQLData.js} +0 -0
- /package/lib/{http/interfaces/IFormData.js → esm/graphql/model/GraphQLOperation.js} +0 -0
- /package/lib/{graphql → esm/graphql}/model/GraphQLOperationType.js +0 -0
- /package/lib/{graphql → esm/graphql}/model/index.js +0 -0
- /package/lib/{http/interfaces/IHeaders.js → esm/http/interfaces/IBody.js} +0 -0
- /package/lib/{http/interfaces/IHttpClient.js → esm/http/interfaces/IFormData.js} +0 -0
- /package/lib/{http/interfaces/IIncomingRequest.js → esm/http/interfaces/IHeaders.js} +0 -0
- /package/lib/{http/interfaces/IIncomingResponse.js → esm/http/interfaces/IHttpClient.js} +0 -0
- /package/lib/{http/interfaces/IMinimalResponse.js → esm/http/interfaces/IIncomingRequest.js} +0 -0
- /package/lib/{http/interfaces/IOutgoingRequest.js → esm/http/interfaces/IIncomingResponse.js} +0 -0
- /package/lib/{http/interfaces/IOutgoingResponse.js → esm/http/interfaces/IMinimalResponse.js} +0 -0
- /package/lib/{http/interfaces/IURL.js → esm/http/interfaces/IOutgoingRequest.js} +0 -0
- /package/lib/{logger/ILogServiceClient.js → esm/http/interfaces/IOutgoingResponse.js} +0 -0
- /package/lib/{logger/ILogger.js → esm/http/interfaces/IURL.js} +0 -0
- /package/lib/{logger/model/EnrichedLogRecord.js → esm/http/interfaces/IURLSearchParams.js} +0 -0
- /package/lib/{http → esm/http}/interfaces/ReadonlyHeaders.js +0 -0
- /package/lib/{http → esm/http}/utils/ContentType.js +0 -0
- /package/lib/{http → esm/http}/utils/HttpMethod.js +0 -0
- /package/lib/{http → esm/http}/utils/constants.js +0 -0
- /package/lib/{utils → esm/impl}/base64/AtobBase64Utils.js +0 -0
- /package/lib/{utils → esm/impl}/base64/JSBase64Base64Utils.js +0 -0
- /package/lib/{http/impl → esm/impl/http}/phin/index.js +0 -0
- /package/lib/{utils → esm/impl}/ip_range_checker/DefaultIpRangeChecker.js +0 -0
- /package/lib/{utils → esm/impl}/request_id_generator/UuidRequestIdGenerator.js +0 -0
- /package/lib/{index.js → esm/index.js} +0 -0
- /package/lib/{logger → esm/logger}/DefaultLogger.js +0 -0
- /package/lib/{logger/model/LogMetadata.js → esm/logger/ILogServiceClient.js} +0 -0
- /package/lib/{logger/model/LogRecord.js → esm/logger/ILogger.js} +0 -0
- /package/lib/{logger → esm/logger}/LoggerSeverity.js +0 -0
- /package/lib/{logger → esm/logger}/constants.js +0 -0
- /package/lib/{logger → esm/logger}/index.js +0 -0
- /package/lib/{phase/IPhase.js → esm/logger/model/EnrichedLogRecord.js} +0 -0
- /package/lib/{phase/PhaseResult.js → esm/logger/model/LogMetadata.js} +0 -0
- /package/lib/{products/account_defender/AccountDefenderData.js → esm/logger/model/LogRecord.js} +0 -0
- /package/lib/{logger → esm/logger}/model/index.js +0 -0
- /package/lib/{products/account_defender/IAccountDefender.js → esm/phase/IPhase.js} +0 -0
- /package/lib/{products/account_defender/JwtData.js → esm/phase/PhaseResult.js} +0 -0
- /package/lib/{phase → esm/phase}/flow/EndEnforcerFlow.js +0 -0
- /package/lib/{phase → esm/phase}/flow/EnforceFlow.js +0 -0
- /package/lib/{phase → esm/phase}/flow/FilterFlow.js +0 -0
- /package/lib/{phase → esm/phase}/flow/PostEnforceFlow.js +0 -0
- /package/lib/{phase → esm/phase}/flow/index.js +0 -0
- /package/lib/{phase → esm/phase}/impl/index.js +0 -0
- /package/lib/{phase → esm/phase}/index.js +0 -0
- /package/lib/{products/bot_defender/BotDefenderData.js → esm/products/account_defender/AccountDefenderData.js} +0 -0
- /package/lib/{products/bot_defender/IBotDefender.js → esm/products/account_defender/IAccountDefender.js} +0 -0
- /package/lib/{products/bot_defender/block/model/BlockData.js → esm/products/account_defender/JwtData.js} +0 -0
- /package/lib/{products → esm/products}/account_defender/constants.js +0 -0
- /package/lib/{products → esm/products}/account_defender/index.js +0 -0
- /package/lib/{products/bot_defender/block/model/JsonBlockPayload.js → esm/products/bot_defender/BotDefenderData.js} +0 -0
- /package/lib/{products → esm/products}/bot_defender/BotDefenderUtils.js +0 -0
- /package/lib/{products/bot_defender/block/model/MobileBlockPayload.js → esm/products/bot_defender/IBotDefender.js} +0 -0
- /package/lib/{products → esm/products}/bot_defender/block/captcha/index.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/block/index.js +0 -0
- /package/lib/{products/bot_defender/reasons/BotDefenderReasonType.js → esm/products/bot_defender/block/model/BlockData.js} +0 -0
- /package/lib/{products/credential_intelligence/ICredentialIntelligence.js → esm/products/bot_defender/block/model/JsonBlockPayload.js} +0 -0
- /package/lib/{products/credential_intelligence/endpoint/CredentialEndpointConfiguration.js → esm/products/bot_defender/block/model/MobileBlockPayload.js} +0 -0
- /package/lib/{products → esm/products}/bot_defender/block/model/index.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/block/templates/captcha_template.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/block/templates/index.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/block/templates/rate_limit_template.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/filter/index.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/first_party/FirstPartySuffix.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/first_party/index.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/first_party/utils.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/index.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/reasons/BotDefenderBlockReason.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/reasons/BotDefenderPassReason.js +0 -0
- /package/lib/{products/credential_intelligence/endpoint/ICredentialEndpoint.js → esm/products/bot_defender/reasons/BotDefenderReasonType.js} +0 -0
- /package/lib/{products → esm/products}/bot_defender/reasons/BotDefenderS2SCallReason.js +0 -0
- /package/lib/{products → esm/products}/bot_defender/reasons/index.js +0 -0
- /package/lib/{products/credential_intelligence/endpoint/extractor/ICredentialExtractor.js → esm/products/credential_intelligence/ICredentialIntelligence.js} +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/constants.js +0 -0
- /package/lib/{products/credential_intelligence/endpoint/hash_protocol/ICredentialIntelligenceHashProtocol.js → esm/products/credential_intelligence/endpoint/CredentialEndpointConfiguration.js} +0 -0
- /package/lib/{products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulCallback.js → esm/products/credential_intelligence/endpoint/ICredentialEndpoint.js} +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.js +0 -0
- /package/lib/{products/credential_intelligence/endpoint/login_successful/ILoginSuccessfulParser.js → esm/products/credential_intelligence/endpoint/extractor/ICredentialExtractor.js} +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/SentThrough.js +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/extractor/index.js +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceHashProtocolFactory.js +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceVersion.js +0 -0
- /package/lib/{products/credential_intelligence/endpoint/matcher/ICredentialIntelligenceEndpointMatcher.js → esm/products/credential_intelligence/endpoint/hash_protocol/ICredentialIntelligenceHashProtocol.js} +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/SsoStep.js +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/hash_protocol/index.js +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/index.js +0 -0
- /package/lib/{products/credential_intelligence/model/CredentialData.js → esm/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulCallback.js} +0 -0
- /package/lib/{products/credential_intelligence/model/CredentialIntelligenceData.js → esm/products/credential_intelligence/endpoint/login_successful/ILoginSuccessfulParser.js} +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/LoginSuccessfulReportingMethod.js +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/login_successful/index.js +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/matcher/CredentialIntelligenceEndpointMatcherFactory.js +0 -0
- /package/lib/{products/credential_intelligence/model/Credentials.js → esm/products/credential_intelligence/endpoint/matcher/ICredentialIntelligenceEndpointMatcher.js} +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/matcher/PathType.js +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/endpoint/matcher/index.js +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/index.js +0 -0
- /package/lib/{products/credential_intelligence/model/CustomExtractionCallback.js → esm/products/credential_intelligence/model/CredentialData.js} +0 -0
- /package/lib/{products/interfaces/IProduct.js → esm/products/credential_intelligence/model/CredentialIntelligenceData.js} +0 -0
- /package/lib/{products/interfaces/ProductData.js → esm/products/credential_intelligence/model/Credentials.js} +0 -0
- /package/lib/{products/interfaces/ProductDataType.js → esm/products/credential_intelligence/model/CustomExtractionCallback.js} +0 -0
- /package/lib/{products → esm/products}/credential_intelligence/model/index.js +0 -0
- /package/lib/{products → esm/products}/index.js +0 -0
- /package/lib/{products/interfaces/ProductType.js → esm/products/interfaces/IProduct.js} +0 -0
- /package/lib/{products/interfaces/Products.js → esm/products/interfaces/ProductData.js} +0 -0
- /package/lib/{pxde/IDataEnrichment.js → esm/products/interfaces/ProductDataType.js} +0 -0
- /package/lib/{pxde/model/PXDE.js → esm/products/interfaces/ProductType.js} +0 -0
- /package/lib/{pxde/model/PxdeData.js → esm/products/interfaces/Products.js} +0 -0
- /package/lib/{products → esm/products}/interfaces/index.js +0 -0
- /package/lib/{products → esm/products}/utils/ProductName.js +0 -0
- /package/lib/{products → esm/products}/utils/ProductPriorityOrder.js +0 -0
- /package/lib/{products → esm/products}/utils/index.js +0 -0
- /package/lib/{products → esm/products}/utils/utils.js +0 -0
- /package/lib/{pxhd/model/PXHD.js → esm/pxde/IDataEnrichment.js} +0 -0
- /package/lib/{pxde → esm/pxde}/constants.js +0 -0
- /package/lib/{pxde → esm/pxde}/index.js +0 -0
- /package/lib/{risk_api/client/IRiskApiClient.js → esm/pxde/model/PXDE.js} +0 -0
- /package/lib/{risk_api/model/RiskActivity.js → esm/pxde/model/PxdeData.js} +0 -0
- /package/lib/{pxde → esm/pxde}/model/index.js +0 -0
- /package/lib/{pxhd → esm/pxhd}/index.js +0 -0
- /package/lib/{risk_api/risk_response/IRiskResponse.js → esm/pxhd/model/PXHD.js} +0 -0
- /package/lib/{pxhd → esm/pxhd}/model/PXHDSource.js +0 -0
- /package/lib/{pxhd → esm/pxhd}/model/index.js +0 -0
- /package/lib/{risk_api/risk_response/RiskResponsePayloadType.js → esm/risk_api/client/IRiskApiClient.js} +0 -0
- /package/lib/{risk_api → esm/risk_api}/client/PostRiskApiClientV2.js +0 -0
- /package/lib/{risk_api → esm/risk_api}/client/PostRiskApiClientV3.js +0 -0
- /package/lib/{risk_api → esm/risk_api}/client/index.js +0 -0
- /package/lib/{risk_api → esm/risk_api}/constants.js +0 -0
- /package/lib/{risk_api → esm/risk_api}/index.js +0 -0
- /package/lib/{risk_api/risk_response/v2/RiskResponseV2Payload.js → esm/risk_api/model/RiskActivity.js} +0 -0
- /package/lib/{risk_api → esm/risk_api}/model/RiskApiCallResult.js +0 -0
- /package/lib/{risk_api → esm/risk_api}/model/RiskStatus.js +0 -0
- /package/lib/{risk_api → esm/risk_api}/model/S2SErrorReason.js +0 -0
- /package/lib/{risk_api → esm/risk_api}/model/index.js +0 -0
- /package/lib/{risk_api/risk_response/v3/RiskResponseV3Payload.js → esm/risk_api/risk_response/IRiskResponse.js} +0 -0
- /package/lib/{risk_token/parser/ITokenParser.js → esm/risk_api/risk_response/RiskResponsePayloadType.js} +0 -0
- /package/lib/{risk_api → esm/risk_api}/risk_response/index.js +0 -0
- /package/lib/{risk_token/parser/TokenParserOptions.js → esm/risk_api/risk_response/v2/RiskResponseV2Payload.js} +0 -0
- /package/lib/{risk_api → esm/risk_api}/risk_response/v2/index.js +0 -0
- /package/lib/{risk_token/token/IToken.js → esm/risk_api/risk_response/v3/RiskResponseV3Payload.js} +0 -0
- /package/lib/{risk_api → esm/risk_api}/risk_response/v3/index.js +0 -0
- /package/lib/{risk_token → esm/risk_token}/MobileError.js +0 -0
- /package/lib/{risk_token → esm/risk_token}/TokenOrigin.js +0 -0
- /package/lib/{risk_token → esm/risk_token}/TokenParseResult.js +0 -0
- /package/lib/{risk_token → esm/risk_token}/TokenVersion.js +0 -0
- /package/lib/{risk_token → esm/risk_token}/constants.js +0 -0
- /package/lib/{risk_token → esm/risk_token}/index.js +0 -0
- /package/lib/{risk_token → esm/risk_token}/parser/DefaultTokenV2Parser.js +0 -0
- /package/lib/{risk_token → esm/risk_token}/parser/DefaultTokenV3Parser.js +0 -0
- /package/lib/{risk_token/token/TokenPayloadType.js → esm/risk_token/parser/ITokenParser.js} +0 -0
- /package/lib/{risk_token/token/v2/TokenV2Payload.js → esm/risk_token/parser/TokenParserOptions.js} +0 -0
- /package/lib/{risk_token → esm/risk_token}/parser/index.js +0 -0
- /package/lib/{risk_token/token/v3/TokenV3Payload.js → esm/risk_token/token/IToken.js} +0 -0
- /package/lib/{telemetry/ITelemetry.js → esm/risk_token/token/TokenPayloadType.js} +0 -0
- /package/lib/{risk_token → esm/risk_token}/token/index.js +0 -0
- /package/lib/{telemetry/model/TelemetryActivity.js → esm/risk_token/token/v2/TokenV2Payload.js} +0 -0
- /package/lib/{risk_token → esm/risk_token}/token/v3/TokenSignField.js +0 -0
- /package/lib/{utils/base64/IBase64Utils.js → esm/risk_token/token/v3/TokenV3Payload.js} +0 -0
- /package/lib/{risk_token → esm/risk_token}/utils.js +0 -0
- /package/lib/{utils/cipher/ICipherUtils.js → esm/telemetry/ITelemetry.js} +0 -0
- /package/lib/{telemetry → esm/telemetry}/constants.js +0 -0
- /package/lib/{telemetry → esm/telemetry}/index.js +0 -0
- /package/lib/{utils/cookie_parser/ICookieParser.js → esm/telemetry/model/TelemetryActivity.js} +0 -0
- /package/lib/{utils → esm/utils}/Algorithm.js +0 -0
- /package/lib/{utils → esm/utils}/ModuleMode.js +0 -0
- /package/lib/{utils → esm/utils}/VidSource.js +0 -0
- /package/lib/{utils/hash/IHashUtils.js → esm/utils/base64/IBase64Utils.js} +0 -0
- /package/lib/{utils/hmac/IHmacUtils.js → esm/utils/cipher/ICipherUtils.js} +0 -0
- /package/lib/{utils/ip_range_checker/IIpRangeChecker.js → esm/utils/cookie_parser/ICookieParser.js} +0 -0
- /package/lib/{utils → esm/utils}/cookie_parser/StringSplitCookieParser.js +0 -0
- /package/lib/{utils → esm/utils}/cookie_parser/index.js +0 -0
- /package/lib/{utils → esm/utils}/error/EnforcerError.js +0 -0
- /package/lib/{utils → esm/utils}/error/EnforcerErrorName.js +0 -0
- /package/lib/{utils → esm/utils}/error/EnforcerTimeoutError.js +0 -0
- /package/lib/{utils → esm/utils}/error/index.js +0 -0
- /package/lib/{utils/request_id_generator/IRequestIdGenerator.js → esm/utils/hash/IHashUtils.js} +0 -0
- /package/lib/{utils/url_parser/IURLParser.js → esm/utils/hmac/IHmacUtils.js} +0 -0
- /package/lib/{utils → esm/utils}/index.js +0 -0
- /package/lib/{action → types/action}/Action.d.ts +0 -0
- /package/lib/{action → types/action}/ActionData.d.ts +0 -0
- /package/lib/{action → types/action}/ActionPriorityOrder.d.ts +0 -0
- /package/lib/{action → types/action}/Decision.d.ts +0 -0
- /package/lib/{action → types/action}/ProductAction.d.ts +0 -0
- /package/lib/{action → types/action}/index.d.ts +0 -0
- /package/lib/{action → types/action}/utils.d.ts +0 -0
- /package/lib/{activities → types/activities}/ActivityType.d.ts +0 -0
- /package/lib/{activities → types/activities}/IActivityClient.d.ts +0 -0
- /package/lib/{activities → types/activities}/constants.d.ts +0 -0
- /package/lib/{activities → types/activities}/index.d.ts +0 -0
- /package/lib/{additional_activity_handler → types/additional_activity_handler}/AdditionalActivityHandlerUtils.d.ts +0 -0
- /package/lib/{additional_activity_handler → types/additional_activity_handler}/index.d.ts +0 -0
- /package/lib/{blocker → types/blocker}/BlockAction.d.ts +0 -0
- /package/lib/{blocker → types/blocker}/BlockActionToProductMap.d.ts +0 -0
- /package/lib/{blocker → types/blocker}/BlockActionToWordMap.d.ts +0 -0
- /package/lib/{blocker → types/blocker}/IBlocker.d.ts +0 -0
- /package/lib/{blocker → types/blocker}/IConditionalBlocker.d.ts +0 -0
- /package/lib/{blocker → types/blocker}/index.d.ts +0 -0
- /package/lib/{config → types/config}/DefaultConfigurations.d.ts +0 -0
- /package/lib/{config → types/config}/index.d.ts +0 -0
- /package/lib/{context → types/context}/index.d.ts +0 -0
- /package/lib/{context → types/context}/interfaces/IContext.d.ts +0 -0
- /package/lib/{context → types/context}/interfaces/MobileData.d.ts +0 -0
- /package/lib/{context → types/context}/interfaces/ReadonlyContext.d.ts +0 -0
- /package/lib/{context → types/context}/interfaces/RequestData.d.ts +0 -0
- /package/lib/{context → types/context}/interfaces/ServerData.d.ts +0 -0
- /package/lib/{context → types/context}/interfaces/TlsData.d.ts +0 -0
- /package/lib/{context → types/context}/interfaces/TokenData.d.ts +0 -0
- /package/lib/{context → types/context}/interfaces/index.d.ts +0 -0
- /package/lib/{cors → types/cors}/CustomBlockResponseHeadersHandler.d.ts +0 -0
- /package/lib/{cors → types/cors}/CustomPreflightHandler.d.ts +0 -0
- /package/lib/{cors → types/cors}/DefaultCors.d.ts +0 -0
- /package/lib/{cors → types/cors}/ICors.d.ts +0 -0
- /package/lib/{cors → types/cors}/constants.d.ts +0 -0
- /package/lib/{cors → types/cors}/index.d.ts +0 -0
- /package/lib/{custom_parameters → types/custom_parameters}/CustomParameters.d.ts +0 -0
- /package/lib/{custom_parameters → types/custom_parameters}/CustomParametersFunction.d.ts +0 -0
- /package/lib/{custom_parameters → types/custom_parameters}/CustomParametersUtils.d.ts +0 -0
- /package/lib/{custom_parameters → types/custom_parameters}/index.d.ts +0 -0
- /package/lib/{enforcer → types/enforcer}/EnforcerBase.d.ts +0 -0
- /package/lib/{enforcer → types/enforcer}/IEnforcer.d.ts +0 -0
- /package/lib/{enforcer → types/enforcer}/index.d.ts +0 -0
- /package/lib/{enforcer → types/enforcer}/options/EnforcerBaseOptions.d.ts +0 -0
- /package/lib/{enforcer → types/enforcer}/options/EnforcerOptionsType.d.ts +0 -0
- /package/lib/{enforcer → types/enforcer}/options/EnforcerV2Options.d.ts +0 -0
- /package/lib/{enforcer → types/enforcer}/options/EnforcerV3Options.d.ts +0 -0
- /package/lib/{enforcer → types/enforcer}/options/index.d.ts +0 -0
- /package/lib/{filter → types/filter}/FilterReason.d.ts +0 -0
- /package/lib/{filter → types/filter}/IFilter.d.ts +0 -0
- /package/lib/{filter → types/filter}/index.d.ts +0 -0
- /package/lib/{first_party → types/first_party}/FirstPartyData.d.ts +0 -0
- /package/lib/{first_party → types/first_party}/IFirstParty.d.ts +0 -0
- /package/lib/{first_party → types/first_party}/index.d.ts +0 -0
- /package/lib/{graphql → types/graphql}/DefaultGraphQLParser.d.ts +0 -0
- /package/lib/{graphql → types/graphql}/IGraphQLParser.d.ts +0 -0
- /package/lib/{graphql → types/graphql}/index.d.ts +0 -0
- /package/lib/{graphql → types/graphql}/model/GraphQLData.d.ts +0 -0
- /package/lib/{graphql → types/graphql}/model/GraphQLOperation.d.ts +0 -0
- /package/lib/{graphql → types/graphql}/model/GraphQLOperationType.d.ts +0 -0
- /package/lib/{graphql → types/graphql}/model/index.d.ts +0 -0
- /package/lib/{http → types/http}/interfaces/IFormData.d.ts +0 -0
- /package/lib/{http → types/http}/interfaces/IHeaders.d.ts +0 -0
- /package/lib/{http → types/http}/interfaces/IHttpClient.d.ts +0 -0
- /package/lib/{http → types/http}/interfaces/IIncomingResponse.d.ts +0 -0
- /package/lib/{http → types/http}/interfaces/IMinimalResponse.d.ts +0 -0
- /package/lib/{http → types/http}/interfaces/IOutgoingRequest.d.ts +0 -0
- /package/lib/{http → types/http}/interfaces/IOutgoingResponse.d.ts +0 -0
- /package/lib/{http → types/http}/interfaces/ReadonlyHeaders.d.ts +0 -0
- /package/lib/{http → types/http}/utils/ContentType.d.ts +0 -0
- /package/lib/{http/impl → types/http/utils}/FormDataImpl.d.ts +0 -0
- /package/lib/{http → types/http}/utils/HttpMethod.d.ts +0 -0
- /package/lib/{http/impl → types/http/utils}/MinimalResponseImpl.d.ts +0 -0
- /package/lib/{http → types/http}/utils/MinimalResponseUtils.d.ts +0 -0
- /package/lib/{http → types/http}/utils/MultipartFormDataUtils.d.ts +0 -0
- /package/lib/{http → types/http}/utils/constants.d.ts +0 -0
- /package/lib/{http/impl → types/impl/http}/phin/index.d.ts +0 -0
- /package/lib/{index.d.ts → types/index.d.ts} +0 -0
- /package/lib/{logger → types/logger}/DefaultLogger.d.ts +0 -0
- /package/lib/{logger → types/logger}/HttpLogServiceClient.d.ts +0 -0
- /package/lib/{logger → types/logger}/ILogServiceClient.d.ts +0 -0
- /package/lib/{logger → types/logger}/ILogger.d.ts +0 -0
- /package/lib/{logger → types/logger}/LoggerBase.d.ts +0 -0
- /package/lib/{logger → types/logger}/LoggerSeverity.d.ts +0 -0
- /package/lib/{logger → types/logger}/constants.d.ts +0 -0
- /package/lib/{logger → types/logger}/index.d.ts +0 -0
- /package/lib/{logger → types/logger}/model/EnrichedLogRecord.d.ts +0 -0
- /package/lib/{logger → types/logger}/model/LogMetadata.d.ts +0 -0
- /package/lib/{logger → types/logger}/model/LogRecord.d.ts +0 -0
- /package/lib/{logger → types/logger}/model/index.d.ts +0 -0
- /package/lib/{phase → types/phase}/IPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/PhaseResult.d.ts +0 -0
- /package/lib/{phase → types/phase}/flow/EndEnforcerFlow.d.ts +0 -0
- /package/lib/{phase → types/phase}/flow/EnforceFlow.d.ts +0 -0
- /package/lib/{phase → types/phase}/flow/FilterFlow.d.ts +0 -0
- /package/lib/{phase → types/phase}/flow/PostEnforceFlow.d.ts +0 -0
- /package/lib/{phase → types/phase}/flow/index.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/AdditionalActivityHandlerPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/CompositePhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/CreateBlockResponsePhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/DecideActionPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/EnrichContextFromRequestPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/EnrichContextFromResponsePhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/FilterPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/FirstPartyPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/ModifyIncomingRequestPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/ModifyOutgoingResponsePhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/ParseTokenPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/PreflightPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/RiskApiPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/SendAsyncActivitiesOnRequestPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/SendAsyncActivitiesOnResponsePhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/SendLogsPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/TelemetryPhase.d.ts +0 -0
- /package/lib/{phase → types/phase}/impl/index.d.ts +0 -0
- /package/lib/{phase → types/phase}/index.d.ts +0 -0
- /package/lib/{products → types/products}/account_defender/AccountDefender.d.ts +0 -0
- /package/lib/{products → types/products}/account_defender/AccountDefenderData.d.ts +0 -0
- /package/lib/{products → types/products}/account_defender/IAccountDefender.d.ts +0 -0
- /package/lib/{products → types/products}/account_defender/JwtData.d.ts +0 -0
- /package/lib/{products → types/products}/account_defender/constants.d.ts +0 -0
- /package/lib/{products → types/products}/account_defender/index.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/BotDefender.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/BotDefenderActionData.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/BotDefenderData.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/BotDefenderUtils.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/IBotDefender.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/captcha/index.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/index.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/model/BlockData.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/model/JsonBlockPayload.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/model/MobileBlockPayload.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/model/index.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/templates/captcha_template.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/templates/index.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/templates/rate_limit_template.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/block/utils.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/filter/DefaultBotDefenderFilter.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/filter/index.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/first_party/DefaultBotDefenderFirstParty.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/first_party/FirstPartySuffix.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/first_party/index.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/first_party/utils.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/index.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/reasons/BotDefenderBlockReason.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/reasons/BotDefenderPassReason.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/reasons/BotDefenderReasonType.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/reasons/BotDefenderS2SCallReason.d.ts +0 -0
- /package/lib/{products → types/products}/bot_defender/reasons/index.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/CredentialIntelligence.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/ICredentialIntelligence.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/constants.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/CredentialEndpoint.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/CredentialEndpointConfiguration.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/CredentialEndpointManager.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/ICredentialEndpoint.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/CustomCredentialExtractor.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/HeaderCredentialExtractor.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/ICredentialExtractor.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/SentThrough.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/extractor/index.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceHashProtocolFactory.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceVersion.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/ICredentialIntelligenceHashProtocol.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/SingleStepAndMultistepHashProtocol.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/SsoStep.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/hash_protocol/index.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/index.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/BodyLoginSuccessfulParser.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulCallback.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulParser.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/ILoginSuccessfulParser.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/LoginSuccessfulReportingMethod.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/StatusLoginSuccessfulParser.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/login_successful/index.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/CredentialIntelligenceEndpointMatcherFactory.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/ExactPathEndpointMatcher.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/ICredentialIntelligenceEndpointMatcher.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/PathType.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/RegexPathEndpointMatcher.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/endpoint/matcher/index.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/index.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/model/CredentialData.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/model/CredentialIntelligenceData.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/model/Credentials.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/model/CustomExtractionCallback.d.ts +0 -0
- /package/lib/{products → types/products}/credential_intelligence/model/index.d.ts +0 -0
- /package/lib/{products → types/products}/index.d.ts +0 -0
- /package/lib/{products → types/products}/interfaces/IProduct.d.ts +0 -0
- /package/lib/{products → types/products}/interfaces/ProductData.d.ts +0 -0
- /package/lib/{products → types/products}/interfaces/ProductDataType.d.ts +0 -0
- /package/lib/{products → types/products}/interfaces/ProductType.d.ts +0 -0
- /package/lib/{products → types/products}/interfaces/Products.d.ts +0 -0
- /package/lib/{products → types/products}/interfaces/index.d.ts +0 -0
- /package/lib/{products → types/products}/utils/ProductName.d.ts +0 -0
- /package/lib/{products → types/products}/utils/ProductPriorityOrder.d.ts +0 -0
- /package/lib/{products → types/products}/utils/index.d.ts +0 -0
- /package/lib/{products → types/products}/utils/utils.d.ts +0 -0
- /package/lib/{pxde → types/pxde}/DefaultDataEnrichment.d.ts +0 -0
- /package/lib/{pxde → types/pxde}/IDataEnrichment.d.ts +0 -0
- /package/lib/{pxde → types/pxde}/constants.d.ts +0 -0
- /package/lib/{pxde → types/pxde}/index.d.ts +0 -0
- /package/lib/{pxde → types/pxde}/model/PXDE.d.ts +0 -0
- /package/lib/{pxde → types/pxde}/model/PxdeData.d.ts +0 -0
- /package/lib/{pxde → types/pxde}/model/index.d.ts +0 -0
- /package/lib/{pxhd → types/pxhd}/PXHDUtils.d.ts +0 -0
- /package/lib/{pxhd → types/pxhd}/index.d.ts +0 -0
- /package/lib/{pxhd → types/pxhd}/model/PXHD.d.ts +0 -0
- /package/lib/{pxhd → types/pxhd}/model/PXHDSource.d.ts +0 -0
- /package/lib/{pxhd → types/pxhd}/model/index.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/client/IRiskApiClient.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/client/PostRiskApiClientV2.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/client/PostRiskApiClientV3.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/client/index.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/constants.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/index.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/model/RiskApiCallResult.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/model/RiskStatus.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/model/S2SErrorReason.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/model/index.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/risk_response/RiskResponsePayloadType.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/risk_response/index.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/risk_response/v2/index.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/risk_response/v3/DefaultRiskResponseV3.d.ts +0 -0
- /package/lib/{risk_api → types/risk_api}/risk_response/v3/index.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/MobileError.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/TokenOrigin.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/TokenParseResult.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/TokenVersion.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/constants.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/index.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/parser/DefaultTokenV2Parser.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/parser/DefaultTokenV3Parser.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/parser/ITokenParser.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/parser/TokenParserBase.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/parser/TokenParserOptions.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/parser/index.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/token/IToken.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/token/TokenBase.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/token/TokenPayloadType.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/token/index.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/token/v2/DefaultTokenV2.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/token/v2/TokenV2Payload.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/token/v3/DefaultTokenV3.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/token/v3/TokenSignField.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/token/v3/TokenV3Payload.d.ts +0 -0
- /package/lib/{risk_token → types/risk_token}/utils.d.ts +0 -0
- /package/lib/{telemetry → types/telemetry}/DefaultTelemetry.d.ts +0 -0
- /package/lib/{telemetry → types/telemetry}/ITelemetry.d.ts +0 -0
- /package/lib/{telemetry → types/telemetry}/constants.d.ts +0 -0
- /package/lib/{telemetry → types/telemetry}/index.d.ts +0 -0
- /package/lib/{telemetry → types/telemetry}/model/TelemetryActivity.d.ts +0 -0
- /package/lib/{utils → types/utils}/Algorithm.d.ts +0 -0
- /package/lib/{utils → types/utils}/ModuleMode.d.ts +0 -0
- /package/lib/{utils → types/utils}/VidSource.d.ts +0 -0
- /package/lib/{utils → types/utils}/base64/IBase64Utils.d.ts +0 -0
- /package/lib/{utils → types/utils}/cipher/ICipherUtils.d.ts +0 -0
- /package/lib/{utils → types/utils}/cookie_parser/ICookieParser.d.ts +0 -0
- /package/lib/{utils → types/utils}/cookie_parser/StringSplitCookieParser.d.ts +0 -0
- /package/lib/{utils → types/utils}/cookie_parser/index.d.ts +0 -0
- /package/lib/{utils → types/utils}/error/EnforcerError.d.ts +0 -0
- /package/lib/{utils → types/utils}/error/EnforcerErrorName.d.ts +0 -0
- /package/lib/{utils → types/utils}/error/EnforcerTimeoutError.d.ts +0 -0
- /package/lib/{utils → types/utils}/error/index.d.ts +0 -0
- /package/lib/{utils → types/utils}/hash/IHashUtils.d.ts +0 -0
- /package/lib/{utils → types/utils}/hmac/IHmacUtils.d.ts +0 -0
- /package/lib/{utils → types/utils}/index.d.ts +0 -0
- /package/lib/{utils → types/utils}/ip_range_checker/IIpRangeChecker.d.ts +0 -0
- /package/lib/{utils → types/utils}/request_id_generator/IRequestIdGenerator.d.ts +0 -0
- /package/lib/{utils → types/utils}/url_parser/IURLParser.d.ts +0 -0
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { Agent as HttpAgent } from 'http';
|
|
11
|
-
import { Agent as HttpsAgent } from 'https';
|
|
12
|
-
import phin from 'phin';
|
|
13
|
-
import { EnforcerTimeoutError } from '../../../utils';
|
|
14
|
-
import { joinHeaderValues } from '../../interfaces';
|
|
15
|
-
import { PhinIncomingResponse } from './PhinIncomingResponse';
|
|
16
|
-
export class PhinHttpClient {
|
|
17
|
-
constructor() {
|
|
18
|
-
this.httpsKeepAliveAgent = new HttpsAgent({ keepAlive: true });
|
|
19
|
-
}
|
|
20
|
-
send(request, options) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
try {
|
|
23
|
-
const res = yield phin.promisified({
|
|
24
|
-
url: request.url,
|
|
25
|
-
method: request.method,
|
|
26
|
-
headers: joinHeaderValues(request.headers),
|
|
27
|
-
data: request.body,
|
|
28
|
-
timeout: (options === null || options === void 0 ? void 0 : options.timeoutMs) || null,
|
|
29
|
-
core: {
|
|
30
|
-
agent: request.url.startsWith('https://') ? this.httpsKeepAliveAgent : new HttpAgent(),
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
return new PhinIncomingResponse(res);
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
const isTimeout = e.toString().toLowerCase().includes('timeout');
|
|
37
|
-
throw isTimeout ? new EnforcerTimeoutError(options.timeoutMs) : e;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { IResponse } from 'phin';
|
|
3
|
-
import { IFormData, IIncomingResponse, ReadonlyHeaders } from '../../interfaces';
|
|
4
|
-
export declare class PhinIncomingResponse implements IIncomingResponse {
|
|
5
|
-
readonly status: number;
|
|
6
|
-
readonly headers: ReadonlyHeaders;
|
|
7
|
-
readonly body: Buffer;
|
|
8
|
-
constructor(response: IResponse);
|
|
9
|
-
formData(): Promise<IFormData>;
|
|
10
|
-
formUrlEncoded(): Promise<URLSearchParams>;
|
|
11
|
-
json(): Promise<any>;
|
|
12
|
-
text(): Promise<string>;
|
|
13
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { CONTENT_TYPE_HEADER_NAME, MultipartFormDataUtils } from '../../utils';
|
|
11
|
-
export class PhinIncomingResponse {
|
|
12
|
-
constructor(response) {
|
|
13
|
-
this.status = response.statusCode;
|
|
14
|
-
this.body = response.body;
|
|
15
|
-
this.headers = Object.fromEntries(Object.entries(response.headers).map(([key, val]) => [key, typeof val === 'string' ? [val] : val]));
|
|
16
|
-
}
|
|
17
|
-
formData() {
|
|
18
|
-
var _a;
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
return MultipartFormDataUtils.createFormDataWithoutFiles(yield this.text(), (_a = this.headers[CONTENT_TYPE_HEADER_NAME]) === null || _a === void 0 ? void 0 : _a[0]);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
formUrlEncoded() {
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
return new URLSearchParams(yield this.text());
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
json() {
|
|
29
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
return JSON.parse(yield this.text());
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
text() {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
return this.body.toString();
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
package/lib/http/index.d.ts
DELETED
package/lib/http/index.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { AsyncOrSync } from 'ts-essentials';
|
|
2
|
-
import { IFormData } from './IFormData';
|
|
3
|
-
export interface IBody {
|
|
4
|
-
/**
|
|
5
|
-
* the unread body.
|
|
6
|
-
*/
|
|
7
|
-
readonly body: any;
|
|
8
|
-
/**
|
|
9
|
-
* Converts the body to json (application/json)
|
|
10
|
-
*/
|
|
11
|
-
json(): AsyncOrSync<any>;
|
|
12
|
-
/**
|
|
13
|
-
* Converts the body to formData (multipart/form-data)
|
|
14
|
-
*/
|
|
15
|
-
formData(): AsyncOrSync<IFormData>;
|
|
16
|
-
/**
|
|
17
|
-
* Converts the body to text (plain/text, text/html, etc.)
|
|
18
|
-
*/
|
|
19
|
-
text(): AsyncOrSync<string>;
|
|
20
|
-
/**
|
|
21
|
-
* Converts the body to URLSearchParams (application/x-www-form-urlencoded)
|
|
22
|
-
*/
|
|
23
|
-
formUrlEncoded(): AsyncOrSync<URLSearchParams>;
|
|
24
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { HttpMethod } from '../utils';
|
|
2
|
-
import { IBody } from './IBody';
|
|
3
|
-
import { IHeaders } from './IHeaders';
|
|
4
|
-
/**
|
|
5
|
-
* Describes a request that comes from the end user.
|
|
6
|
-
*/
|
|
7
|
-
export interface IIncomingRequest<Req> extends IBody {
|
|
8
|
-
/**
|
|
9
|
-
* Returns a url.
|
|
10
|
-
*/
|
|
11
|
-
url: string;
|
|
12
|
-
/**
|
|
13
|
-
* Returns the method.
|
|
14
|
-
*/
|
|
15
|
-
readonly method: HttpMethod;
|
|
16
|
-
/**
|
|
17
|
-
* Returns the request headers (for read usage).
|
|
18
|
-
*/
|
|
19
|
-
readonly headers: IHeaders;
|
|
20
|
-
/**
|
|
21
|
-
* Return the client IP provided by the environment or null.
|
|
22
|
-
*/
|
|
23
|
-
readonly clientIP: string | null;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the platform-specific request implementation of the request.
|
|
26
|
-
*/
|
|
27
|
-
getUnderlyingRequest(): Req;
|
|
28
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './IHttpClient';
|
|
2
|
-
export * from './IIncomingResponse';
|
|
3
|
-
export * from './IIncomingRequest';
|
|
4
|
-
export * from './IMinimalResponse';
|
|
5
|
-
export * from './IOutgoingRequest';
|
|
6
|
-
export * from './IOutgoingResponse';
|
|
7
|
-
export * from './IBody';
|
|
8
|
-
export * from './IHeaders';
|
|
9
|
-
export * from './IFormData';
|
|
10
|
-
export * from './ReadonlyHeaders';
|
|
11
|
-
export * from './IURL';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './IHttpClient';
|
|
2
|
-
export * from './IIncomingResponse';
|
|
3
|
-
export * from './IIncomingRequest';
|
|
4
|
-
export * from './IMinimalResponse';
|
|
5
|
-
export * from './IOutgoingRequest';
|
|
6
|
-
export * from './IOutgoingResponse';
|
|
7
|
-
export * from './IBody';
|
|
8
|
-
export * from './IHeaders';
|
|
9
|
-
export * from './IFormData';
|
|
10
|
-
export * from './ReadonlyHeaders';
|
|
11
|
-
export * from './IURL';
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { MinimalResponseImpl } from '../impl';
|
|
2
|
-
export var MinimalResponseUtils;
|
|
3
|
-
(function (MinimalResponseUtils) {
|
|
4
|
-
MinimalResponseUtils.appendHeader = (response, name, value) => {
|
|
5
|
-
return MinimalResponseUtils.appendHeaders(response, {
|
|
6
|
-
[name]: [value],
|
|
7
|
-
});
|
|
8
|
-
};
|
|
9
|
-
MinimalResponseUtils.appendHeaders = (response, headers) => {
|
|
10
|
-
const body = response.body;
|
|
11
|
-
const statusCode = response.status;
|
|
12
|
-
const responseHeaders = response.headers;
|
|
13
|
-
const newHeaders = Object.assign({}, responseHeaders);
|
|
14
|
-
Object.entries(headers).forEach(([name, values]) => {
|
|
15
|
-
newHeaders[name] = (newHeaders[name] || []).concat(values);
|
|
16
|
-
});
|
|
17
|
-
return new MinimalResponseImpl({
|
|
18
|
-
body,
|
|
19
|
-
headers: newHeaders,
|
|
20
|
-
status: statusCode,
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
MinimalResponseUtils.from = (response) => {
|
|
24
|
-
return new (class {
|
|
25
|
-
constructor() {
|
|
26
|
-
this.body = response.body;
|
|
27
|
-
this.headers = response.headers;
|
|
28
|
-
this.status = response.status;
|
|
29
|
-
}
|
|
30
|
-
})();
|
|
31
|
-
};
|
|
32
|
-
})(MinimalResponseUtils || (MinimalResponseUtils = {}));
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { FormDataImpl } from '../impl';
|
|
2
|
-
export var MultipartFormDataUtils;
|
|
3
|
-
(function (MultipartFormDataUtils) {
|
|
4
|
-
MultipartFormDataUtils.createFormDataWithoutFiles = (rawBody, contentType) => {
|
|
5
|
-
const boundary = MultipartFormDataUtils.getBoundary(contentType);
|
|
6
|
-
const data = MultipartFormDataUtils.parseMultipartBodyWithoutFiles(boundary, rawBody);
|
|
7
|
-
return data ? new FormDataImpl(data) : null;
|
|
8
|
-
};
|
|
9
|
-
MultipartFormDataUtils.getBoundary = (contentTypeValue) => {
|
|
10
|
-
if (!contentTypeValue) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
const BOUNDARY_PREFIX = 'boundary=';
|
|
14
|
-
const contentTypeArray = contentTypeValue.split(';').map((el) => el.trim());
|
|
15
|
-
const boundary = contentTypeArray.find((substr) => substr.startsWith(BOUNDARY_PREFIX));
|
|
16
|
-
if (!boundary) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
return boundary.slice(BOUNDARY_PREFIX.length).trim();
|
|
20
|
-
};
|
|
21
|
-
MultipartFormDataUtils.parseMultipartBodyWithoutFiles = (boundary, rawBody) => {
|
|
22
|
-
var _a, _b, _c, _d, _e, _f;
|
|
23
|
-
if (!rawBody || !boundary) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
const body = {};
|
|
27
|
-
const entries = rawBody.split(boundary);
|
|
28
|
-
for (const item of entries) {
|
|
29
|
-
const filename = (_b = (_a = item.match(/filename="(.+?)"/)) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.trim();
|
|
30
|
-
if (filename) {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
const name = (_d = (_c = item.match(/name="(.+?)"/)) === null || _c === void 0 ? void 0 : _c[1]) === null || _d === void 0 ? void 0 : _d.trim();
|
|
34
|
-
if (!name) {
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
const value = (_f = (_e = item.match(/\r\n\r\n([^\r\n\v]*)\r\n--$/)) === null || _e === void 0 ? void 0 : _e[1]) === null || _f === void 0 ? void 0 : _f.trim();
|
|
38
|
-
if (!value) {
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
body[name] = [value];
|
|
42
|
-
}
|
|
43
|
-
return body;
|
|
44
|
-
};
|
|
45
|
-
})(MultipartFormDataUtils || (MultipartFormDataUtils = {}));
|
package/lib/http/utils/index.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { EXTERNAL_LOGGER_SERVICE_PATH } from './constants';
|
|
11
|
-
import { AUTHORIZATION_HEADER_NAME, CONTENT_TYPE_HEADER_NAME, ContentType, HttpMethod, OutgoingRequestImpl, } from '../http';
|
|
12
|
-
import { getAuthorizationHeader } from '../utils';
|
|
13
|
-
export class HttpLogServiceClient {
|
|
14
|
-
constructor(config, httpClient) {
|
|
15
|
-
this.appId = config.appId;
|
|
16
|
-
this.backendUrl = config.backendScoreApiUrl;
|
|
17
|
-
this.loggerAuthToken = config.loggerAuthToken;
|
|
18
|
-
this.logger = config.logger;
|
|
19
|
-
this.httpClient = httpClient;
|
|
20
|
-
}
|
|
21
|
-
sendLogs(context, logs) {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
try {
|
|
24
|
-
const enrichedLogs = logs.map((log) => this.enrichLogRecord(context, log));
|
|
25
|
-
yield this.postLogs(enrichedLogs);
|
|
26
|
-
}
|
|
27
|
-
catch (e) {
|
|
28
|
-
this.logger.error(`unable to send logs: ${e}`);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
enrichLogRecord(context, log) {
|
|
33
|
-
const requestData = context.requestData;
|
|
34
|
-
const url = new URL(requestData.rawUrl);
|
|
35
|
-
const logMeta = {
|
|
36
|
-
container: 'enforcer',
|
|
37
|
-
appID: this.appId,
|
|
38
|
-
method: requestData.method,
|
|
39
|
-
host: url.host,
|
|
40
|
-
url: requestData.rawUrl,
|
|
41
|
-
path: url.pathname + requestData.url.search,
|
|
42
|
-
requestId: context.requestId,
|
|
43
|
-
};
|
|
44
|
-
return Object.assign(Object.assign({}, logMeta), log);
|
|
45
|
-
}
|
|
46
|
-
postLogs(logRecords) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const url = `${this.backendUrl}${EXTERNAL_LOGGER_SERVICE_PATH}`;
|
|
49
|
-
const method = HttpMethod.POST;
|
|
50
|
-
const headers = {
|
|
51
|
-
[CONTENT_TYPE_HEADER_NAME]: [ContentType.APPLICATION_JSON],
|
|
52
|
-
[AUTHORIZATION_HEADER_NAME]: [getAuthorizationHeader(this.loggerAuthToken)],
|
|
53
|
-
};
|
|
54
|
-
const body = JSON.stringify(logRecords);
|
|
55
|
-
const req = new OutgoingRequestImpl({ url, method, headers, body });
|
|
56
|
-
const res = yield this.httpClient.send(req);
|
|
57
|
-
return (res === null || res === void 0 ? void 0 : res.status) === 200;
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
package/lib/logger/LoggerBase.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { LoggerSeverity } from './LoggerSeverity';
|
|
2
|
-
export class LoggerBase {
|
|
3
|
-
constructor(loggerSeverity = LoggerSeverity.ERROR, logs = []) {
|
|
4
|
-
this.loggerSeverity = loggerSeverity;
|
|
5
|
-
this.logs = logs;
|
|
6
|
-
}
|
|
7
|
-
debug(message) {
|
|
8
|
-
this.recordLog(message, LoggerSeverity.DEBUG);
|
|
9
|
-
if (this.loggerSeverity == LoggerSeverity.DEBUG) {
|
|
10
|
-
this.logDebug(message);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
error(message) {
|
|
14
|
-
this.recordLog(message, LoggerSeverity.ERROR);
|
|
15
|
-
if (this.loggerSeverity != LoggerSeverity.NONE) {
|
|
16
|
-
this.logError(message);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
getLoggerSeverity() {
|
|
20
|
-
return this.loggerSeverity;
|
|
21
|
-
}
|
|
22
|
-
setLoggerSeverity(loggerSeverity) {
|
|
23
|
-
this.loggerSeverity = loggerSeverity;
|
|
24
|
-
}
|
|
25
|
-
// default implementation, can be overridden
|
|
26
|
-
logError(message) {
|
|
27
|
-
this.log(message);
|
|
28
|
-
}
|
|
29
|
-
// default implementation, can be overridden
|
|
30
|
-
logDebug(message) {
|
|
31
|
-
this.log(message);
|
|
32
|
-
}
|
|
33
|
-
// default implementation, can be overridden
|
|
34
|
-
getLogs() {
|
|
35
|
-
return this.logs;
|
|
36
|
-
}
|
|
37
|
-
recordLog(message, loggerSeverity) {
|
|
38
|
-
const logRecord = { message: message, severity: loggerSeverity, messageTimestamp: Date.now() };
|
|
39
|
-
this.logs.push(logRecord);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { AdditionalActivityHandlerUtils } from '../../additional_activity_handler';
|
|
11
|
-
export class AdditionalActivityHandlerPhase {
|
|
12
|
-
constructor(config) {
|
|
13
|
-
this.config = config;
|
|
14
|
-
}
|
|
15
|
-
execute(context) {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
this.config.logger.debug('calling additional activity handler');
|
|
18
|
-
yield AdditionalActivityHandlerUtils.invokeAdditionalActivityHandler(this.config, context);
|
|
19
|
-
return { done: false };
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
export class CompositePhase {
|
|
11
|
-
constructor(phases) {
|
|
12
|
-
this.phases = phases;
|
|
13
|
-
}
|
|
14
|
-
execute(context) {
|
|
15
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
let result;
|
|
17
|
-
for (const phase of this.phases) {
|
|
18
|
-
result = yield phase.execute(context);
|
|
19
|
-
if (result.done) {
|
|
20
|
-
break;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return result;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { MinimalResponseUtils } from '../../http';
|
|
11
|
-
import { PXHDSource, PXHDUtils } from '../../pxhd';
|
|
12
|
-
import { Action } from '../../action';
|
|
13
|
-
import { PRODUCT_PRIORITY_ORDER } from '../../products';
|
|
14
|
-
export class CreateBlockResponsePhase {
|
|
15
|
-
constructor(config, blockers, cors) {
|
|
16
|
-
this.config = config;
|
|
17
|
-
this.blockers = blockers;
|
|
18
|
-
this.cors = cors;
|
|
19
|
-
}
|
|
20
|
-
execute(context) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
if (context.action !== Action.BLOCK) {
|
|
23
|
-
return { done: false };
|
|
24
|
-
}
|
|
25
|
-
this.config.logger.debug('create block response phase');
|
|
26
|
-
let response = this.createBlockResponse(context);
|
|
27
|
-
if (!response) {
|
|
28
|
-
return { done: false };
|
|
29
|
-
}
|
|
30
|
-
response = yield this.addHeadersToResponse(response, context);
|
|
31
|
-
return { done: true, response };
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
createBlockResponse(context) {
|
|
35
|
-
let response = null;
|
|
36
|
-
for (const name of PRODUCT_PRIORITY_ORDER) {
|
|
37
|
-
if (context.reasons[name]) {
|
|
38
|
-
const blocker = this.blockers[name];
|
|
39
|
-
if (blocker === null || blocker === void 0 ? void 0 : blocker.shouldBlock(context)) {
|
|
40
|
-
this.config.logger.debug(`returning ${name} block response`);
|
|
41
|
-
response = blocker.createBlockResponse(context);
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return response;
|
|
47
|
-
}
|
|
48
|
-
addHeadersToResponse(response, context) {
|
|
49
|
-
var _a, _b;
|
|
50
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
if (!context.isMobile && ((_a = context.pxhd) === null || _a === void 0 ? void 0 : _a.source) === PXHDSource.RISK) {
|
|
52
|
-
response = PXHDUtils.addPxhdToMinimalResponse(context, response);
|
|
53
|
-
}
|
|
54
|
-
if (this.config.corsSupportEnabled && ((_b = this.cors) === null || _b === void 0 ? void 0 : _b.isCorsRequest(context))) {
|
|
55
|
-
const corsHeaders = yield this.cors.getCorsBlockHeaders(context);
|
|
56
|
-
response = MinimalResponseUtils.appendHeaders(response, corsHeaders);
|
|
57
|
-
}
|
|
58
|
-
return response;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { LoggerSeverity } from '../../logger';
|
|
11
|
-
import { getDecisionFromContext } from '../../action';
|
|
12
|
-
export class DecideActionPhase {
|
|
13
|
-
constructor(config) {
|
|
14
|
-
this.config = config;
|
|
15
|
-
}
|
|
16
|
-
updateContextDecision(context) {
|
|
17
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
const { action, reasons } = getDecisionFromContext(context);
|
|
19
|
-
if (this.config.logger.getLoggerSeverity() === LoggerSeverity.DEBUG) {
|
|
20
|
-
const productReasons = Object.entries(reasons)
|
|
21
|
-
.map(([prod, reason]) => `${prod} -> ${reason}`)
|
|
22
|
-
.join(', ');
|
|
23
|
-
this.config.logger.debug(`decision: ${action}, reasons: ${productReasons}`);
|
|
24
|
-
}
|
|
25
|
-
context.action = action;
|
|
26
|
-
context.reasons = reasons;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { CustomParametersUtils } from '../../custom_parameters';
|
|
11
|
-
import { DecideActionPhase } from './DecideActionPhase';
|
|
12
|
-
export class EnrichContextFromRequestPhase extends DecideActionPhase {
|
|
13
|
-
constructor(config, products, dataEnrichment, graphQLParser) {
|
|
14
|
-
super(config);
|
|
15
|
-
this.products = products;
|
|
16
|
-
this.dataEnrichment = dataEnrichment;
|
|
17
|
-
this.graphQLParser = graphQLParser;
|
|
18
|
-
}
|
|
19
|
-
execute(context) {
|
|
20
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
this.config.logger.debug('enrich context from request phase');
|
|
22
|
-
yield this.addPxdeToContext(context);
|
|
23
|
-
yield this.addGraphQLDataToContext(context);
|
|
24
|
-
yield this.addProductDataToContext(context);
|
|
25
|
-
yield this.addCustomParametersToContext(context);
|
|
26
|
-
yield this.updateContextDecision(context);
|
|
27
|
-
return { done: false };
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
addPxdeToContext(context) {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
const pxdeData = yield this.dataEnrichment.handlePxde(context);
|
|
33
|
-
if (pxdeData) {
|
|
34
|
-
context.pxde = pxdeData.pxde;
|
|
35
|
-
context.pxdeVerified = pxdeData.pxdeVerified;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
addGraphQLDataToContext(context) {
|
|
40
|
-
var _a;
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
if ((_a = this.graphQLParser) === null || _a === void 0 ? void 0 : _a.isGraphQLRequest(context)) {
|
|
43
|
-
context.graphqlData = yield this.graphQLParser.parseGraphQLRequest(context);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
addProductDataToContext(context) {
|
|
48
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
yield Promise.all(Object.entries(this.products).map(([name, product]) => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
context.productData[name] = yield (product === null || product === void 0 ? void 0 : product.enrichContextFromRequest(context));
|
|
52
|
-
})));
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
addCustomParametersToContext(context) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
context.customParameters = yield CustomParametersUtils.createCustomParameters(this.config, context);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
export class EnrichContextFromResponsePhase {
|
|
11
|
-
constructor(config, products) {
|
|
12
|
-
this.config = config;
|
|
13
|
-
this.products = products;
|
|
14
|
-
}
|
|
15
|
-
execute(context) {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
this.config.logger.debug('enrich context from response phase');
|
|
18
|
-
yield this.addProductDataToContext(context);
|
|
19
|
-
return { done: false };
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
addProductDataToContext(context) {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
yield Promise.all(Object.entries(this.products)
|
|
25
|
-
.filter(([name, _]) => !!context.productData[name])
|
|
26
|
-
.map(([name, product]) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
Object.assign(context.productData[name], yield (product === null || product === void 0 ? void 0 : product.enrichContextFromResponse(context)));
|
|
28
|
-
})));
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
export class FilterPhase {
|
|
11
|
-
constructor(filters) {
|
|
12
|
-
this.filters = filters;
|
|
13
|
-
}
|
|
14
|
-
execute(context) {
|
|
15
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
return { done: this.filters.some((filter) => filter.shouldFilter(context)) };
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|