perimeterx-js-core 0.6.2 → 0.7.1
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/action/ActionData.d.ts +1 -1
- package/lib/action/Decision.d.ts +1 -1
- package/lib/action/ProductAction.d.ts +1 -1
- package/lib/activities/model/Activity.d.ts +1 -1
- package/lib/activities/model/ActivityDetails.d.ts +5 -5
- package/lib/activities/utils.js +1 -1
- package/lib/additional_activity_handler/AdditionalActivityHandler.d.ts +1 -1
- package/lib/config/ConfigurationParams.d.ts +2 -1
- package/lib/config/DefaultConfigurations.js +1 -0
- package/lib/config/IConfiguration.d.ts +4 -0
- package/lib/config/StaticConfigurationBase.d.ts +1 -0
- package/lib/config/StaticConfigurationBase.js +3 -0
- package/lib/context/DefaultContext.d.ts +4 -1
- package/lib/context/DefaultContext.js +6 -3
- package/lib/context/interfaces/MobileData.d.ts +1 -1
- package/lib/context/interfaces/ReadonlyContext.d.ts +1 -1
- package/lib/context/interfaces/RequestData.d.ts +6 -1
- package/lib/context/interfaces/RiskApiData.d.ts +1 -1
- package/lib/context/interfaces/ServerData.d.ts +1 -1
- package/lib/context/interfaces/TlsData.d.ts +1 -1
- package/lib/context/interfaces/TokenData.d.ts +1 -1
- package/lib/cors/CustomBlockResponseHeadersHandler.d.ts +1 -1
- package/lib/cors/CustomPreflightHandler.d.ts +1 -1
- package/lib/custom_parameters/CustomParameters.d.ts +1 -1
- package/lib/custom_parameters/CustomParametersFunction.d.ts +1 -1
- package/lib/enforcer/EnforcerBase.d.ts +2 -1
- package/lib/enforcer/EnforcerBase.js +13 -3
- package/lib/enforcer/options/EnforcerBaseOptions.d.ts +3 -1
- package/lib/enforcer/options/EnforcerOptionsType.d.ts +1 -1
- package/lib/enforcer/options/EnforcerV2Options.d.ts +1 -1
- package/lib/enforcer/options/EnforcerV3Options.d.ts +1 -1
- package/lib/first_party/FirstPartyData.d.ts +1 -1
- package/lib/graphql/model/GraphQLData.d.ts +1 -1
- package/lib/graphql/model/GraphQLOperation.d.ts +1 -1
- package/lib/http/impl/FormDataImpl.js +2 -2
- package/lib/http/impl/MinimalResponseImpl.d.ts +1 -1
- package/lib/http/impl/OutgoingRequestImpl.d.ts +1 -1
- package/lib/http/interfaces/IHttpClient.d.ts +1 -1
- package/lib/http/interfaces/ReadonlyHeaders.d.ts +1 -1
- package/lib/logger/HttpLogServiceClient.d.ts +17 -0
- package/lib/logger/HttpLogServiceClient.js +60 -0
- package/lib/logger/ILogServiceClient.d.ts +6 -0
- package/lib/logger/ILogServiceClient.js +1 -0
- package/lib/logger/ILogger.d.ts +6 -0
- package/lib/logger/LoggerBase.d.ts +6 -2
- package/lib/logger/LoggerBase.js +12 -1
- package/lib/logger/constants.d.ts +2 -0
- package/lib/logger/constants.js +2 -0
- package/lib/logger/index.d.ts +4 -0
- package/lib/logger/index.js +3 -0
- package/lib/logger/model/EnrichedLogRecord.d.ts +3 -0
- package/lib/logger/model/EnrichedLogRecord.js +1 -0
- package/lib/logger/model/LogMetadata.d.ts +9 -0
- package/lib/logger/model/LogMetadata.js +1 -0
- package/lib/logger/model/LogRecord.d.ts +6 -0
- package/lib/logger/model/LogRecord.js +1 -0
- package/lib/logger/model/index.d.ts +3 -0
- package/lib/logger/model/index.js +3 -0
- package/lib/phase/PhaseResult.d.ts +1 -1
- package/lib/phase/flow/EndEnforcerFlow.d.ts +6 -0
- package/lib/phase/flow/EndEnforcerFlow.js +10 -0
- package/lib/phase/flow/index.d.ts +1 -0
- package/lib/phase/flow/index.js +1 -0
- package/lib/phase/impl/SendLogsPhase.d.ts +11 -0
- package/lib/phase/impl/SendLogsPhase.js +26 -0
- package/lib/phase/impl/index.d.ts +1 -0
- package/lib/phase/impl/index.js +1 -0
- package/lib/products/account_defender/AccountDefender.d.ts +1 -1
- package/lib/products/account_defender/AccountDefenderData.d.ts +1 -1
- package/lib/products/account_defender/JwtData.d.ts +1 -1
- package/lib/products/bot_defender/BotDefender.d.ts +1 -1
- package/lib/products/bot_defender/BotDefenderData.d.ts +1 -1
- package/lib/products/bot_defender/block/model/BlockData.d.ts +1 -1
- package/lib/products/bot_defender/block/model/JsonBlockPayload.d.ts +1 -1
- package/lib/products/bot_defender/block/model/MobileBlockPayload.d.ts +1 -1
- package/lib/products/bot_defender/block/utils.js +5 -4
- package/lib/products/bot_defender/filter/DefaultBotDefenderFilter.js +5 -1
- package/lib/products/bot_defender/reasons/BotDefenderReasonType.d.ts +1 -1
- package/lib/products/credential_intelligence/endpoint/CredentialEndpointConfiguration.d.ts +1 -1
- package/lib/products/credential_intelligence/endpoint/login_successful/CustomLoginSuccessfulCallback.d.ts +1 -1
- package/lib/products/credential_intelligence/model/CredentialData.d.ts +1 -1
- package/lib/products/credential_intelligence/model/CredentialIntelligenceData.d.ts +1 -1
- package/lib/products/credential_intelligence/model/Credentials.d.ts +1 -1
- package/lib/products/credential_intelligence/model/CustomExtractionCallback.d.ts +1 -1
- package/lib/products/interfaces/ProductData.d.ts +1 -1
- package/lib/products/interfaces/ProductDataType.d.ts +1 -1
- package/lib/products/interfaces/ProductType.d.ts +1 -1
- package/lib/products/interfaces/Products.d.ts +1 -1
- package/lib/pxde/model/PXDE.d.ts +1 -1
- package/lib/pxde/model/PxdeData.d.ts +1 -1
- package/lib/pxhd/model/PXHD.d.ts +1 -1
- package/lib/risk_api/client/PostRiskApiClientBase.js +1 -1
- package/lib/risk_api/model/RiskActivity.d.ts +4 -4
- package/lib/risk_api/risk_response/RiskResponsePayloadType.d.ts +1 -1
- package/lib/risk_api/risk_response/v2/RiskResponseV2Payload.d.ts +1 -1
- package/lib/risk_api/risk_response/v3/RiskResponseV3Payload.d.ts +1 -1
- package/lib/risk_token/parser/DefaultTokenV2Parser.d.ts +1 -1
- package/lib/risk_token/parser/DefaultTokenV3Parser.d.ts +1 -1
- package/lib/risk_token/parser/TokenParserOptions.d.ts +1 -1
- package/lib/risk_token/token/TokenPayloadType.d.ts +1 -1
- package/lib/risk_token/token/v2/TokenV2Payload.d.ts +1 -1
- package/lib/risk_token/token/v3/TokenV3Payload.d.ts +1 -1
- package/lib/telemetry/model/TelemetryActivity.d.ts +2 -2
- package/lib/utils/cipher/ICipherUtils.d.ts +1 -1
- package/lib/utils/constants.d.ts +1 -1
- package/lib/utils/constants.js +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/url_parser/DefaultUrlParser.d.ts +13 -0
- package/lib/utils/url_parser/DefaultUrlParser.js +21 -0
- package/lib/utils/url_parser/IURLParser.d.ts +4 -0
- package/lib/utils/url_parser/IURLParser.js +1 -0
- package/lib/utils/url_parser/index.d.ts +2 -0
- package/lib/utils/url_parser/index.js +2 -0
- package/lib/utils/utils.d.ts +5 -0
- package/lib/utils/utils.js +5 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export declare const getScoreApiDomain: (appId: string) => string;
|
|
|
6
6
|
export declare const getCollectorDomain: (appId: string) => string;
|
|
7
7
|
export declare const getAuthorizationHeader: (authToken: string) => string;
|
|
8
8
|
export declare const getExtension: (route: string) => string;
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param rawUrl
|
|
12
|
+
* @deprecated use {@link IURLParser} instead.
|
|
13
|
+
*/
|
|
9
14
|
export declare const getDecodedUrl: (rawUrl: string) => IURL;
|
|
10
15
|
export declare const removeSensitiveFields: <T extends Record<string, any>>(object: T, sensitiveFields: (keyof T)[]) => T;
|
|
11
16
|
export declare const removeSensitiveHeaders: (headers: ReadonlyHeaders, sensitiveHeaderNames: string[]) => Record<string, string[]>;
|
package/lib/utils/utils.js
CHANGED
|
@@ -39,8 +39,12 @@ export const getExtension = (route) => {
|
|
|
39
39
|
}
|
|
40
40
|
return endOfPath.substring(extensionIndex);
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @param rawUrl
|
|
45
|
+
* @deprecated use {@link IURLParser} instead.
|
|
46
|
+
*/
|
|
42
47
|
export const getDecodedUrl = (rawUrl) => {
|
|
43
|
-
rawUrl = rawUrl.replace(/%/g, '%25');
|
|
44
48
|
try {
|
|
45
49
|
return new URL(decodeURIComponent(rawUrl));
|
|
46
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "perimeterx-js-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/crypto-js": "^4.1.1",
|
|
36
36
|
"@types/mocha": "^10.0.0",
|
|
37
37
|
"@types/sinon": "^10.0.13",
|
|
38
|
-
"@types/uuid": "^
|
|
38
|
+
"@types/uuid": "^9.0.2",
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
|
40
40
|
"@typescript-eslint/parser": "^5.40.0",
|
|
41
41
|
"chai": "^4.3.6",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"mocha": "^10.0.0",
|
|
50
50
|
"nyc": "^15.1.0",
|
|
51
51
|
"prettier": "^2.7.1",
|
|
52
|
-
"sinon": "^
|
|
52
|
+
"sinon": "^15.2.0",
|
|
53
53
|
"ts-loader": "^9.4.1",
|
|
54
54
|
"ts-node": "^10.9.1",
|
|
55
|
-
"typescript": "^
|
|
55
|
+
"typescript": "^5.1.6"
|
|
56
56
|
},
|
|
57
57
|
"lint-staged": {
|
|
58
58
|
"*.ts": "npm run lint:fix"
|