@naturalpay/sdk 1.6.3 → 1.6.5
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/types/BadGatewayErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/BadGatewayErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/BadGatewayErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/BadRequestErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/BadRequestErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/BadRequestErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/ConflictErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/ConflictErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/ConflictErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/ForbiddenErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/ForbiddenErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/ForbiddenErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/InternalServerErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/InternalServerErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/InternalServerErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/NotFoundErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/NotFoundErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/NotFoundErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/NotImplementedErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/NotImplementedErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/NotImplementedErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/PreconditionErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/PreconditionErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/PreconditionErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/ServiceUnavailableErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/ServiceUnavailableErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/ServiceUnavailableErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/TooManyRequestsErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/TooManyRequestsErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/TooManyRequestsErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/UnauthorizedErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/UnauthorizedErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/UnauthorizedErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/UnprocessableEntityErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/api/types/UnprocessableEntityErrorBodyErrorsItemMetaLimitScope.d.ts +6 -0
- package/dist/cjs/api/types/UnprocessableEntityErrorBodyErrorsItemMetaLimitScope.js +9 -0
- package/dist/cjs/api/types/index.d.ts +12 -0
- package/dist/cjs/api/types/index.js +12 -0
- package/dist/cjs/core/fetcher/Fetcher.js +9 -92
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +26 -4
- package/dist/cjs/core/fetcher/redactUrl.d.ts +2 -0
- package/dist/cjs/core/fetcher/redactUrl.js +88 -0
- package/dist/cjs/serialization/types/BadGatewayErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/BadGatewayErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/BadGatewayErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/BadGatewayErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/BadRequestErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/BadRequestErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/BadRequestErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/BadRequestErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/ConflictErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/ConflictErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/ConflictErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/ConflictErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/ForbiddenErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/ForbiddenErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/ForbiddenErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/ForbiddenErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/InternalServerErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/InternalServerErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/InternalServerErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/InternalServerErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/NotFoundErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/NotFoundErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/NotFoundErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/NotFoundErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/NotImplementedErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/NotImplementedErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/NotImplementedErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/NotImplementedErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/PreconditionErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/PreconditionErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/PreconditionErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/PreconditionErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/ServiceUnavailableErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/TooManyRequestsErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/UnauthorizedErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/UnauthorizedErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/UnauthorizedErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/UnauthorizedErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/UnprocessableEntityErrorBodyErrorsItemMeta.d.ts +2 -0
- package/dist/cjs/serialization/types/UnprocessableEntityErrorBodyErrorsItemMeta.js +2 -0
- package/dist/cjs/serialization/types/UnprocessableEntityErrorBodyErrorsItemMetaLimitScope.d.ts +7 -0
- package/dist/cjs/serialization/types/UnprocessableEntityErrorBodyErrorsItemMetaLimitScope.js +39 -0
- package/dist/cjs/serialization/types/index.d.ts +12 -0
- package/dist/cjs/serialization/types/index.js +12 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/types/BadGatewayErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/BadGatewayErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/BadGatewayErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/BadRequestErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/BadRequestErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/BadRequestErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/ConflictErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/ConflictErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/ConflictErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/ForbiddenErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/ForbiddenErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/ForbiddenErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/InternalServerErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/InternalServerErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/InternalServerErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/NotFoundErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/NotFoundErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/NotFoundErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/NotImplementedErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/NotImplementedErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/NotImplementedErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/PreconditionErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/PreconditionErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/PreconditionErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/ServiceUnavailableErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/ServiceUnavailableErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/ServiceUnavailableErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/TooManyRequestsErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/TooManyRequestsErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/TooManyRequestsErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/UnauthorizedErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/UnauthorizedErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/UnauthorizedErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/UnprocessableEntityErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/api/types/UnprocessableEntityErrorBodyErrorsItemMetaLimitScope.d.mts +6 -0
- package/dist/esm/api/types/UnprocessableEntityErrorBodyErrorsItemMetaLimitScope.mjs +6 -0
- package/dist/esm/api/types/index.d.mts +12 -0
- package/dist/esm/api/types/index.mjs +12 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +1 -84
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +26 -4
- package/dist/esm/core/fetcher/redactUrl.d.mts +2 -0
- package/dist/esm/core/fetcher/redactUrl.mjs +84 -0
- package/dist/esm/serialization/types/BadGatewayErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/BadGatewayErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/BadGatewayErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/BadGatewayErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/BadRequestErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/BadRequestErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/BadRequestErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/BadRequestErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/ConflictErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/ConflictErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/ConflictErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/ConflictErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/ForbiddenErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/ForbiddenErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/ForbiddenErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/ForbiddenErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/InternalServerErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/InternalServerErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/InternalServerErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/InternalServerErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/NotFoundErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/NotFoundErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/NotFoundErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/NotFoundErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/NotImplementedErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/NotImplementedErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/NotImplementedErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/NotImplementedErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/PreconditionErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/PreconditionErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/PreconditionErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/PreconditionErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/ServiceUnavailableErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/TooManyRequestsErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/UnauthorizedErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/UnauthorizedErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/UnauthorizedErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/UnauthorizedErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/UnprocessableEntityErrorBodyErrorsItemMeta.d.mts +2 -0
- package/dist/esm/serialization/types/UnprocessableEntityErrorBodyErrorsItemMeta.mjs +2 -0
- package/dist/esm/serialization/types/UnprocessableEntityErrorBodyErrorsItemMetaLimitScope.d.mts +7 -0
- package/dist/esm/serialization/types/UnprocessableEntityErrorBodyErrorsItemMetaLimitScope.mjs +3 -0
- package/dist/esm/serialization/types/index.d.mts +12 -0
- package/dist/esm/serialization/types/index.mjs +12 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ const getResponseBody_js_1 = require("./getResponseBody.js");
|
|
|
22
22
|
const Headers_js_1 = require("./Headers.js");
|
|
23
23
|
const makeRequest_js_1 = require("./makeRequest.js");
|
|
24
24
|
const RawResponse_js_1 = require("./RawResponse.js");
|
|
25
|
+
const redactUrl_js_1 = require("./redactUrl.js");
|
|
25
26
|
const requestWithRetries_js_1 = require("./requestWithRetries.js");
|
|
26
27
|
const SENSITIVE_HEADERS = new Set([
|
|
27
28
|
"authorization",
|
|
@@ -53,100 +54,16 @@ function redactHeaders(headers) {
|
|
|
53
54
|
}
|
|
54
55
|
return filtered;
|
|
55
56
|
}
|
|
56
|
-
const SENSITIVE_QUERY_PARAMS = new Set([
|
|
57
|
-
"api_key",
|
|
58
|
-
"api-key",
|
|
59
|
-
"apikey",
|
|
60
|
-
"token",
|
|
61
|
-
"access_token",
|
|
62
|
-
"access-token",
|
|
63
|
-
"auth_token",
|
|
64
|
-
"auth-token",
|
|
65
|
-
"password",
|
|
66
|
-
"passwd",
|
|
67
|
-
"secret",
|
|
68
|
-
"api_secret",
|
|
69
|
-
"api-secret",
|
|
70
|
-
"apisecret",
|
|
71
|
-
"key",
|
|
72
|
-
"session",
|
|
73
|
-
"session_id",
|
|
74
|
-
"session-id",
|
|
75
|
-
]);
|
|
76
57
|
function redactQueryParameters(queryParameters) {
|
|
77
58
|
if (queryParameters == null) {
|
|
78
59
|
return undefined;
|
|
79
60
|
}
|
|
80
61
|
const redacted = {};
|
|
81
62
|
for (const [key, value] of Object.entries(queryParameters)) {
|
|
82
|
-
redacted[key] = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase()) ? "[REDACTED]" : value;
|
|
63
|
+
redacted[key] = redactUrl_js_1.SENSITIVE_QUERY_PARAMS.has(key.toLowerCase()) ? "[REDACTED]" : value;
|
|
83
64
|
}
|
|
84
65
|
return redacted;
|
|
85
66
|
}
|
|
86
|
-
function redactUrl(url) {
|
|
87
|
-
const protocolIndex = url.indexOf("://");
|
|
88
|
-
if (protocolIndex === -1)
|
|
89
|
-
return url;
|
|
90
|
-
const afterProtocol = protocolIndex + 3;
|
|
91
|
-
// Find the first delimiter that marks the end of the authority section
|
|
92
|
-
const pathStart = url.indexOf("/", afterProtocol);
|
|
93
|
-
let queryStart = url.indexOf("?", afterProtocol);
|
|
94
|
-
let fragmentStart = url.indexOf("#", afterProtocol);
|
|
95
|
-
const firstDelimiter = Math.min(pathStart === -1 ? url.length : pathStart, queryStart === -1 ? url.length : queryStart, fragmentStart === -1 ? url.length : fragmentStart);
|
|
96
|
-
// Find the LAST @ before the delimiter (handles multiple @ in credentials)
|
|
97
|
-
let atIndex = -1;
|
|
98
|
-
for (let i = afterProtocol; i < firstDelimiter; i++) {
|
|
99
|
-
if (url[i] === "@") {
|
|
100
|
-
atIndex = i;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
if (atIndex !== -1) {
|
|
104
|
-
url = `${url.slice(0, afterProtocol)}[REDACTED]@${url.slice(atIndex + 1)}`;
|
|
105
|
-
}
|
|
106
|
-
// Recalculate queryStart since url might have changed
|
|
107
|
-
queryStart = url.indexOf("?");
|
|
108
|
-
if (queryStart === -1)
|
|
109
|
-
return url;
|
|
110
|
-
fragmentStart = url.indexOf("#", queryStart);
|
|
111
|
-
const queryEnd = fragmentStart !== -1 ? fragmentStart : url.length;
|
|
112
|
-
const queryString = url.slice(queryStart + 1, queryEnd);
|
|
113
|
-
if (queryString.length === 0)
|
|
114
|
-
return url;
|
|
115
|
-
// FAST PATH: Quick check if any sensitive keywords present
|
|
116
|
-
// Using indexOf is faster than regex for simple substring matching
|
|
117
|
-
const lower = queryString.toLowerCase();
|
|
118
|
-
const hasSensitive = lower.includes("token") ||
|
|
119
|
-
lower.includes("key") ||
|
|
120
|
-
lower.includes("password") ||
|
|
121
|
-
lower.includes("passwd") ||
|
|
122
|
-
lower.includes("secret") ||
|
|
123
|
-
lower.includes("session") ||
|
|
124
|
-
lower.includes("auth");
|
|
125
|
-
if (!hasSensitive) {
|
|
126
|
-
return url;
|
|
127
|
-
}
|
|
128
|
-
// SLOW PATH: Parse and redact
|
|
129
|
-
const redactedParams = [];
|
|
130
|
-
const params = queryString.split("&");
|
|
131
|
-
for (const param of params) {
|
|
132
|
-
const equalIndex = param.indexOf("=");
|
|
133
|
-
if (equalIndex === -1) {
|
|
134
|
-
redactedParams.push(param);
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
const key = param.slice(0, equalIndex);
|
|
138
|
-
let shouldRedact = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase());
|
|
139
|
-
if (!shouldRedact && key.includes("%")) {
|
|
140
|
-
try {
|
|
141
|
-
const decodedKey = decodeURIComponent(key);
|
|
142
|
-
shouldRedact = SENSITIVE_QUERY_PARAMS.has(decodedKey.toLowerCase());
|
|
143
|
-
}
|
|
144
|
-
catch (_a) { }
|
|
145
|
-
}
|
|
146
|
-
redactedParams.push(shouldRedact ? `${key}=[REDACTED]` : param);
|
|
147
|
-
}
|
|
148
|
-
return url.slice(0, queryStart + 1) + redactedParams.join("&") + url.slice(queryEnd);
|
|
149
|
-
}
|
|
150
67
|
function getHeaders(args) {
|
|
151
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
152
69
|
var _a;
|
|
@@ -198,7 +115,7 @@ function fetcherImpl(args) {
|
|
|
198
115
|
if (logger.isDebug()) {
|
|
199
116
|
const metadata = {
|
|
200
117
|
method: args.method,
|
|
201
|
-
url: redactUrl(url),
|
|
118
|
+
url: (0, redactUrl_js_1.redactUrl)(url),
|
|
202
119
|
headers: redactHeaders(headers),
|
|
203
120
|
queryParameters: redactQueryParameters(args.queryParameters),
|
|
204
121
|
hasBody: requestBody != null,
|
|
@@ -213,7 +130,7 @@ function fetcherImpl(args) {
|
|
|
213
130
|
if (logger.isDebug()) {
|
|
214
131
|
const metadata = {
|
|
215
132
|
method: args.method,
|
|
216
|
-
url: redactUrl(url),
|
|
133
|
+
url: (0, redactUrl_js_1.redactUrl)(url),
|
|
217
134
|
statusCode: response.status,
|
|
218
135
|
responseHeaders: redactHeaders(response.headers),
|
|
219
136
|
};
|
|
@@ -231,7 +148,7 @@ function fetcherImpl(args) {
|
|
|
231
148
|
if (logger.isError()) {
|
|
232
149
|
const metadata = {
|
|
233
150
|
method: args.method,
|
|
234
|
-
url: redactUrl(url),
|
|
151
|
+
url: (0, redactUrl_js_1.redactUrl)(url),
|
|
235
152
|
statusCode: response.status,
|
|
236
153
|
responseHeaders: redactHeaders(Object.fromEntries(response.headers.entries())),
|
|
237
154
|
};
|
|
@@ -253,7 +170,7 @@ function fetcherImpl(args) {
|
|
|
253
170
|
if (logger.isError()) {
|
|
254
171
|
const metadata = {
|
|
255
172
|
method: args.method,
|
|
256
|
-
url: redactUrl(url),
|
|
173
|
+
url: (0, redactUrl_js_1.redactUrl)(url),
|
|
257
174
|
};
|
|
258
175
|
logger.error("HTTP request was aborted", metadata);
|
|
259
176
|
}
|
|
@@ -271,7 +188,7 @@ function fetcherImpl(args) {
|
|
|
271
188
|
if (logger.isError()) {
|
|
272
189
|
const metadata = {
|
|
273
190
|
method: args.method,
|
|
274
|
-
url: redactUrl(url),
|
|
191
|
+
url: (0, redactUrl_js_1.redactUrl)(url),
|
|
275
192
|
timeoutMs: args.timeoutMs,
|
|
276
193
|
};
|
|
277
194
|
logger.error("HTTP request timed out", metadata);
|
|
@@ -289,7 +206,7 @@ function fetcherImpl(args) {
|
|
|
289
206
|
if (logger.isError()) {
|
|
290
207
|
const metadata = {
|
|
291
208
|
method: args.method,
|
|
292
|
-
url: redactUrl(url),
|
|
209
|
+
url: (0, redactUrl_js_1.redactUrl)(url),
|
|
293
210
|
errorMessage: error.message,
|
|
294
211
|
};
|
|
295
212
|
logger.error("HTTP request failed with error", metadata);
|
|
@@ -307,7 +224,7 @@ function fetcherImpl(args) {
|
|
|
307
224
|
if (logger.isError()) {
|
|
308
225
|
const metadata = {
|
|
309
226
|
method: args.method,
|
|
310
|
-
url: redactUrl(url),
|
|
227
|
+
url: (0, redactUrl_js_1.redactUrl)(url),
|
|
311
228
|
error: (0, json_js_1.toJson)(error),
|
|
312
229
|
};
|
|
313
230
|
logger.error("HTTP request failed with unknown error", metadata);
|
|
@@ -15,6 +15,7 @@ const join_js_1 = require("../url/join.js");
|
|
|
15
15
|
const EndpointSupplier_js_1 = require("./EndpointSupplier.js");
|
|
16
16
|
const getFetchFn_js_1 = require("./getFetchFn.js");
|
|
17
17
|
const makeRequest_js_1 = require("./makeRequest.js");
|
|
18
|
+
const redactUrl_js_1 = require("./redactUrl.js");
|
|
18
19
|
const requestWithRetries_js_1 = require("./requestWithRetries.js");
|
|
19
20
|
const Supplier_js_1 = require("./Supplier.js");
|
|
20
21
|
/**
|
|
@@ -79,8 +80,10 @@ function makePassthroughRequest(input, init, clientOptions, requestOptions) {
|
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
|
-
// Apply auth headers
|
|
83
|
-
|
|
83
|
+
// Apply auth headers, but only when the resolved URL targets the configured base URL.
|
|
84
|
+
// This prevents the SDK's credentials from leaking to an unrelated host when a caller
|
|
85
|
+
// passes an absolute cross-origin URL into the passthrough fetch escape hatch.
|
|
86
|
+
if (clientOptions.getAuthHeaders != null && targetsBaseUrl(fullUrl, baseUrl)) {
|
|
84
87
|
const authHeaders = yield clientOptions.getAuthHeaders();
|
|
85
88
|
for (const [key, value] of Object.entries(authHeaders)) {
|
|
86
89
|
mergedHeaders[key.toLowerCase()] = value;
|
|
@@ -115,7 +118,7 @@ function makePassthroughRequest(input, init, clientOptions, requestOptions) {
|
|
|
115
118
|
if (logger.isDebug()) {
|
|
116
119
|
logger.debug("Making passthrough HTTP request", {
|
|
117
120
|
method,
|
|
118
|
-
url: fullUrl,
|
|
121
|
+
url: (0, redactUrl_js_1.redactUrl)(fullUrl),
|
|
119
122
|
hasBody: body != null,
|
|
120
123
|
});
|
|
121
124
|
}
|
|
@@ -126,10 +129,29 @@ function makePassthroughRequest(input, init, clientOptions, requestOptions) {
|
|
|
126
129
|
if (logger.isDebug()) {
|
|
127
130
|
logger.debug("Passthrough HTTP request completed", {
|
|
128
131
|
method,
|
|
129
|
-
url: fullUrl,
|
|
132
|
+
url: (0, redactUrl_js_1.redactUrl)(fullUrl),
|
|
130
133
|
statusCode: response.status,
|
|
131
134
|
});
|
|
132
135
|
}
|
|
133
136
|
return response;
|
|
134
137
|
});
|
|
135
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* Returns true when the resolved request URL points at the same origin as the
|
|
141
|
+
* configured base URL. Relative paths are always joined onto the base URL, so
|
|
142
|
+
* they resolve to the base origin and return true. Absolute URLs only match when
|
|
143
|
+
* their origin equals the base origin. When there is no base URL to compare
|
|
144
|
+
* against, or either value is not a parseable absolute URL, this returns false so
|
|
145
|
+
* auth headers are not attached.
|
|
146
|
+
*/
|
|
147
|
+
function targetsBaseUrl(fullUrl, baseUrl) {
|
|
148
|
+
if (baseUrl == null) {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
return new URL(fullUrl).origin === new URL(baseUrl).origin;
|
|
153
|
+
}
|
|
154
|
+
catch (_a) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SENSITIVE_QUERY_PARAMS = void 0;
|
|
4
|
+
exports.redactUrl = redactUrl;
|
|
5
|
+
exports.SENSITIVE_QUERY_PARAMS = new Set([
|
|
6
|
+
"api_key",
|
|
7
|
+
"api-key",
|
|
8
|
+
"apikey",
|
|
9
|
+
"token",
|
|
10
|
+
"access_token",
|
|
11
|
+
"access-token",
|
|
12
|
+
"auth_token",
|
|
13
|
+
"auth-token",
|
|
14
|
+
"password",
|
|
15
|
+
"passwd",
|
|
16
|
+
"secret",
|
|
17
|
+
"api_secret",
|
|
18
|
+
"api-secret",
|
|
19
|
+
"apisecret",
|
|
20
|
+
"key",
|
|
21
|
+
"session",
|
|
22
|
+
"session_id",
|
|
23
|
+
"session-id",
|
|
24
|
+
]);
|
|
25
|
+
function redactUrl(url) {
|
|
26
|
+
const protocolIndex = url.indexOf("://");
|
|
27
|
+
if (protocolIndex === -1)
|
|
28
|
+
return url;
|
|
29
|
+
const afterProtocol = protocolIndex + 3;
|
|
30
|
+
// Find the first delimiter that marks the end of the authority section
|
|
31
|
+
const pathStart = url.indexOf("/", afterProtocol);
|
|
32
|
+
let queryStart = url.indexOf("?", afterProtocol);
|
|
33
|
+
let fragmentStart = url.indexOf("#", afterProtocol);
|
|
34
|
+
const firstDelimiter = Math.min(pathStart === -1 ? url.length : pathStart, queryStart === -1 ? url.length : queryStart, fragmentStart === -1 ? url.length : fragmentStart);
|
|
35
|
+
// Find the LAST @ before the delimiter (handles multiple @ in credentials)
|
|
36
|
+
let atIndex = -1;
|
|
37
|
+
for (let i = afterProtocol; i < firstDelimiter; i++) {
|
|
38
|
+
if (url[i] === "@") {
|
|
39
|
+
atIndex = i;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (atIndex !== -1) {
|
|
43
|
+
url = `${url.slice(0, afterProtocol)}[REDACTED]@${url.slice(atIndex + 1)}`;
|
|
44
|
+
}
|
|
45
|
+
// Recalculate queryStart since url might have changed
|
|
46
|
+
queryStart = url.indexOf("?");
|
|
47
|
+
if (queryStart === -1)
|
|
48
|
+
return url;
|
|
49
|
+
fragmentStart = url.indexOf("#", queryStart);
|
|
50
|
+
const queryEnd = fragmentStart !== -1 ? fragmentStart : url.length;
|
|
51
|
+
const queryString = url.slice(queryStart + 1, queryEnd);
|
|
52
|
+
if (queryString.length === 0)
|
|
53
|
+
return url;
|
|
54
|
+
// FAST PATH: Quick check if any sensitive keywords present
|
|
55
|
+
// Using indexOf is faster than regex for simple substring matching
|
|
56
|
+
const lower = queryString.toLowerCase();
|
|
57
|
+
const hasSensitive = lower.includes("token") ||
|
|
58
|
+
lower.includes("key") ||
|
|
59
|
+
lower.includes("password") ||
|
|
60
|
+
lower.includes("passwd") ||
|
|
61
|
+
lower.includes("secret") ||
|
|
62
|
+
lower.includes("session") ||
|
|
63
|
+
lower.includes("auth");
|
|
64
|
+
if (!hasSensitive) {
|
|
65
|
+
return url;
|
|
66
|
+
}
|
|
67
|
+
// SLOW PATH: Parse and redact
|
|
68
|
+
const redactedParams = [];
|
|
69
|
+
const params = queryString.split("&");
|
|
70
|
+
for (const param of params) {
|
|
71
|
+
const equalIndex = param.indexOf("=");
|
|
72
|
+
if (equalIndex === -1) {
|
|
73
|
+
redactedParams.push(param);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
const key = param.slice(0, equalIndex);
|
|
77
|
+
let shouldRedact = exports.SENSITIVE_QUERY_PARAMS.has(key.toLowerCase());
|
|
78
|
+
if (!shouldRedact && key.includes("%")) {
|
|
79
|
+
try {
|
|
80
|
+
const decodedKey = decodeURIComponent(key);
|
|
81
|
+
shouldRedact = exports.SENSITIVE_QUERY_PARAMS.has(decodedKey.toLowerCase());
|
|
82
|
+
}
|
|
83
|
+
catch (_a) { }
|
|
84
|
+
}
|
|
85
|
+
redactedParams.push(shouldRedact ? `${key}=[REDACTED]` : param);
|
|
86
|
+
}
|
|
87
|
+
return url.slice(0, queryStart + 1) + redactedParams.join("&") + url.slice(queryEnd);
|
|
88
|
+
}
|
|
@@ -2,11 +2,13 @@ import type * as Natural from "../../api/index.js";
|
|
|
2
2
|
import * as core from "../../core/index.js";
|
|
3
3
|
import type * as serializers from "../index.js";
|
|
4
4
|
import { BadGatewayErrorBodyErrorsItemMetaConnectionStatus } from "./BadGatewayErrorBodyErrorsItemMetaConnectionStatus.js";
|
|
5
|
+
import { BadGatewayErrorBodyErrorsItemMetaLimitScope } from "./BadGatewayErrorBodyErrorsItemMetaLimitScope.js";
|
|
5
6
|
import { BadGatewayErrorBodyErrorsItemMetaProvider } from "./BadGatewayErrorBodyErrorsItemMetaProvider.js";
|
|
6
7
|
export declare const BadGatewayErrorBodyErrorsItemMeta: core.serialization.ObjectSchema<serializers.BadGatewayErrorBodyErrorsItemMeta.Raw, Natural.BadGatewayErrorBodyErrorsItemMeta>;
|
|
7
8
|
export declare namespace BadGatewayErrorBodyErrorsItemMeta {
|
|
8
9
|
interface Raw {
|
|
9
10
|
supportId: string;
|
|
11
|
+
limitScope?: BadGatewayErrorBodyErrorsItemMetaLimitScope.Raw | null;
|
|
10
12
|
connectionStatus?: BadGatewayErrorBodyErrorsItemMetaConnectionStatus.Raw | null;
|
|
11
13
|
provider?: BadGatewayErrorBodyErrorsItemMetaProvider.Raw | null;
|
|
12
14
|
}
|
|
@@ -37,9 +37,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.BadGatewayErrorBodyErrorsItemMeta = void 0;
|
|
38
38
|
const core = __importStar(require("../../core/index.js"));
|
|
39
39
|
const BadGatewayErrorBodyErrorsItemMetaConnectionStatus_js_1 = require("./BadGatewayErrorBodyErrorsItemMetaConnectionStatus.js");
|
|
40
|
+
const BadGatewayErrorBodyErrorsItemMetaLimitScope_js_1 = require("./BadGatewayErrorBodyErrorsItemMetaLimitScope.js");
|
|
40
41
|
const BadGatewayErrorBodyErrorsItemMetaProvider_js_1 = require("./BadGatewayErrorBodyErrorsItemMetaProvider.js");
|
|
41
42
|
exports.BadGatewayErrorBodyErrorsItemMeta = core.serialization.object({
|
|
42
43
|
supportId: core.serialization.string(),
|
|
44
|
+
limitScope: BadGatewayErrorBodyErrorsItemMetaLimitScope_js_1.BadGatewayErrorBodyErrorsItemMetaLimitScope.optional(),
|
|
43
45
|
connectionStatus: BadGatewayErrorBodyErrorsItemMetaConnectionStatus_js_1.BadGatewayErrorBodyErrorsItemMetaConnectionStatus.optional(),
|
|
44
46
|
provider: BadGatewayErrorBodyErrorsItemMetaProvider_js_1.BadGatewayErrorBodyErrorsItemMetaProvider.optional(),
|
|
45
47
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as Natural from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const BadGatewayErrorBodyErrorsItemMetaLimitScope: core.serialization.Schema<serializers.BadGatewayErrorBodyErrorsItemMetaLimitScope.Raw, Natural.BadGatewayErrorBodyErrorsItemMetaLimitScope>;
|
|
5
|
+
export declare namespace BadGatewayErrorBodyErrorsItemMetaLimitScope {
|
|
6
|
+
type Raw = "merchant" | "program";
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.BadGatewayErrorBodyErrorsItemMetaLimitScope = void 0;
|
|
38
|
+
const core = __importStar(require("../../core/index.js"));
|
|
39
|
+
exports.BadGatewayErrorBodyErrorsItemMetaLimitScope = core.serialization.enum_(["merchant", "program"]);
|
|
@@ -2,11 +2,13 @@ import type * as Natural from "../../api/index.js";
|
|
|
2
2
|
import * as core from "../../core/index.js";
|
|
3
3
|
import type * as serializers from "../index.js";
|
|
4
4
|
import { BadRequestErrorBodyErrorsItemMetaConnectionStatus } from "./BadRequestErrorBodyErrorsItemMetaConnectionStatus.js";
|
|
5
|
+
import { BadRequestErrorBodyErrorsItemMetaLimitScope } from "./BadRequestErrorBodyErrorsItemMetaLimitScope.js";
|
|
5
6
|
import { BadRequestErrorBodyErrorsItemMetaProvider } from "./BadRequestErrorBodyErrorsItemMetaProvider.js";
|
|
6
7
|
export declare const BadRequestErrorBodyErrorsItemMeta: core.serialization.ObjectSchema<serializers.BadRequestErrorBodyErrorsItemMeta.Raw, Natural.BadRequestErrorBodyErrorsItemMeta>;
|
|
7
8
|
export declare namespace BadRequestErrorBodyErrorsItemMeta {
|
|
8
9
|
interface Raw {
|
|
9
10
|
supportId: string;
|
|
11
|
+
limitScope?: BadRequestErrorBodyErrorsItemMetaLimitScope.Raw | null;
|
|
10
12
|
connectionStatus?: BadRequestErrorBodyErrorsItemMetaConnectionStatus.Raw | null;
|
|
11
13
|
provider?: BadRequestErrorBodyErrorsItemMetaProvider.Raw | null;
|
|
12
14
|
}
|
|
@@ -37,9 +37,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.BadRequestErrorBodyErrorsItemMeta = void 0;
|
|
38
38
|
const core = __importStar(require("../../core/index.js"));
|
|
39
39
|
const BadRequestErrorBodyErrorsItemMetaConnectionStatus_js_1 = require("./BadRequestErrorBodyErrorsItemMetaConnectionStatus.js");
|
|
40
|
+
const BadRequestErrorBodyErrorsItemMetaLimitScope_js_1 = require("./BadRequestErrorBodyErrorsItemMetaLimitScope.js");
|
|
40
41
|
const BadRequestErrorBodyErrorsItemMetaProvider_js_1 = require("./BadRequestErrorBodyErrorsItemMetaProvider.js");
|
|
41
42
|
exports.BadRequestErrorBodyErrorsItemMeta = core.serialization.object({
|
|
42
43
|
supportId: core.serialization.string(),
|
|
44
|
+
limitScope: BadRequestErrorBodyErrorsItemMetaLimitScope_js_1.BadRequestErrorBodyErrorsItemMetaLimitScope.optional(),
|
|
43
45
|
connectionStatus: BadRequestErrorBodyErrorsItemMetaConnectionStatus_js_1.BadRequestErrorBodyErrorsItemMetaConnectionStatus.optional(),
|
|
44
46
|
provider: BadRequestErrorBodyErrorsItemMetaProvider_js_1.BadRequestErrorBodyErrorsItemMetaProvider.optional(),
|
|
45
47
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as Natural from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const BadRequestErrorBodyErrorsItemMetaLimitScope: core.serialization.Schema<serializers.BadRequestErrorBodyErrorsItemMetaLimitScope.Raw, Natural.BadRequestErrorBodyErrorsItemMetaLimitScope>;
|
|
5
|
+
export declare namespace BadRequestErrorBodyErrorsItemMetaLimitScope {
|
|
6
|
+
type Raw = "merchant" | "program";
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.BadRequestErrorBodyErrorsItemMetaLimitScope = void 0;
|
|
38
|
+
const core = __importStar(require("../../core/index.js"));
|
|
39
|
+
exports.BadRequestErrorBodyErrorsItemMetaLimitScope = core.serialization.enum_(["merchant", "program"]);
|
|
@@ -2,11 +2,13 @@ import type * as Natural from "../../api/index.js";
|
|
|
2
2
|
import * as core from "../../core/index.js";
|
|
3
3
|
import type * as serializers from "../index.js";
|
|
4
4
|
import { ConflictErrorBodyErrorsItemMetaConnectionStatus } from "./ConflictErrorBodyErrorsItemMetaConnectionStatus.js";
|
|
5
|
+
import { ConflictErrorBodyErrorsItemMetaLimitScope } from "./ConflictErrorBodyErrorsItemMetaLimitScope.js";
|
|
5
6
|
import { ConflictErrorBodyErrorsItemMetaProvider } from "./ConflictErrorBodyErrorsItemMetaProvider.js";
|
|
6
7
|
export declare const ConflictErrorBodyErrorsItemMeta: core.serialization.ObjectSchema<serializers.ConflictErrorBodyErrorsItemMeta.Raw, Natural.ConflictErrorBodyErrorsItemMeta>;
|
|
7
8
|
export declare namespace ConflictErrorBodyErrorsItemMeta {
|
|
8
9
|
interface Raw {
|
|
9
10
|
supportId: string;
|
|
11
|
+
limitScope?: ConflictErrorBodyErrorsItemMetaLimitScope.Raw | null;
|
|
10
12
|
connectionStatus?: ConflictErrorBodyErrorsItemMetaConnectionStatus.Raw | null;
|
|
11
13
|
provider?: ConflictErrorBodyErrorsItemMetaProvider.Raw | null;
|
|
12
14
|
}
|
|
@@ -37,9 +37,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.ConflictErrorBodyErrorsItemMeta = void 0;
|
|
38
38
|
const core = __importStar(require("../../core/index.js"));
|
|
39
39
|
const ConflictErrorBodyErrorsItemMetaConnectionStatus_js_1 = require("./ConflictErrorBodyErrorsItemMetaConnectionStatus.js");
|
|
40
|
+
const ConflictErrorBodyErrorsItemMetaLimitScope_js_1 = require("./ConflictErrorBodyErrorsItemMetaLimitScope.js");
|
|
40
41
|
const ConflictErrorBodyErrorsItemMetaProvider_js_1 = require("./ConflictErrorBodyErrorsItemMetaProvider.js");
|
|
41
42
|
exports.ConflictErrorBodyErrorsItemMeta = core.serialization.object({
|
|
42
43
|
supportId: core.serialization.string(),
|
|
44
|
+
limitScope: ConflictErrorBodyErrorsItemMetaLimitScope_js_1.ConflictErrorBodyErrorsItemMetaLimitScope.optional(),
|
|
43
45
|
connectionStatus: ConflictErrorBodyErrorsItemMetaConnectionStatus_js_1.ConflictErrorBodyErrorsItemMetaConnectionStatus.optional(),
|
|
44
46
|
provider: ConflictErrorBodyErrorsItemMetaProvider_js_1.ConflictErrorBodyErrorsItemMetaProvider.optional(),
|
|
45
47
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as Natural from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const ConflictErrorBodyErrorsItemMetaLimitScope: core.serialization.Schema<serializers.ConflictErrorBodyErrorsItemMetaLimitScope.Raw, Natural.ConflictErrorBodyErrorsItemMetaLimitScope>;
|
|
5
|
+
export declare namespace ConflictErrorBodyErrorsItemMetaLimitScope {
|
|
6
|
+
type Raw = "merchant" | "program";
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ConflictErrorBodyErrorsItemMetaLimitScope = void 0;
|
|
38
|
+
const core = __importStar(require("../../core/index.js"));
|
|
39
|
+
exports.ConflictErrorBodyErrorsItemMetaLimitScope = core.serialization.enum_(["merchant", "program"]);
|
|
@@ -2,11 +2,13 @@ import type * as Natural from "../../api/index.js";
|
|
|
2
2
|
import * as core from "../../core/index.js";
|
|
3
3
|
import type * as serializers from "../index.js";
|
|
4
4
|
import { ForbiddenErrorBodyErrorsItemMetaConnectionStatus } from "./ForbiddenErrorBodyErrorsItemMetaConnectionStatus.js";
|
|
5
|
+
import { ForbiddenErrorBodyErrorsItemMetaLimitScope } from "./ForbiddenErrorBodyErrorsItemMetaLimitScope.js";
|
|
5
6
|
import { ForbiddenErrorBodyErrorsItemMetaProvider } from "./ForbiddenErrorBodyErrorsItemMetaProvider.js";
|
|
6
7
|
export declare const ForbiddenErrorBodyErrorsItemMeta: core.serialization.ObjectSchema<serializers.ForbiddenErrorBodyErrorsItemMeta.Raw, Natural.ForbiddenErrorBodyErrorsItemMeta>;
|
|
7
8
|
export declare namespace ForbiddenErrorBodyErrorsItemMeta {
|
|
8
9
|
interface Raw {
|
|
9
10
|
supportId: string;
|
|
11
|
+
limitScope?: ForbiddenErrorBodyErrorsItemMetaLimitScope.Raw | null;
|
|
10
12
|
connectionStatus?: ForbiddenErrorBodyErrorsItemMetaConnectionStatus.Raw | null;
|
|
11
13
|
provider?: ForbiddenErrorBodyErrorsItemMetaProvider.Raw | null;
|
|
12
14
|
}
|
|
@@ -37,9 +37,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
37
37
|
exports.ForbiddenErrorBodyErrorsItemMeta = void 0;
|
|
38
38
|
const core = __importStar(require("../../core/index.js"));
|
|
39
39
|
const ForbiddenErrorBodyErrorsItemMetaConnectionStatus_js_1 = require("./ForbiddenErrorBodyErrorsItemMetaConnectionStatus.js");
|
|
40
|
+
const ForbiddenErrorBodyErrorsItemMetaLimitScope_js_1 = require("./ForbiddenErrorBodyErrorsItemMetaLimitScope.js");
|
|
40
41
|
const ForbiddenErrorBodyErrorsItemMetaProvider_js_1 = require("./ForbiddenErrorBodyErrorsItemMetaProvider.js");
|
|
41
42
|
exports.ForbiddenErrorBodyErrorsItemMeta = core.serialization.object({
|
|
42
43
|
supportId: core.serialization.string(),
|
|
44
|
+
limitScope: ForbiddenErrorBodyErrorsItemMetaLimitScope_js_1.ForbiddenErrorBodyErrorsItemMetaLimitScope.optional(),
|
|
43
45
|
connectionStatus: ForbiddenErrorBodyErrorsItemMetaConnectionStatus_js_1.ForbiddenErrorBodyErrorsItemMetaConnectionStatus.optional(),
|
|
44
46
|
provider: ForbiddenErrorBodyErrorsItemMetaProvider_js_1.ForbiddenErrorBodyErrorsItemMetaProvider.optional(),
|
|
45
47
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as Natural from "../../api/index.js";
|
|
2
|
+
import * as core from "../../core/index.js";
|
|
3
|
+
import type * as serializers from "../index.js";
|
|
4
|
+
export declare const ForbiddenErrorBodyErrorsItemMetaLimitScope: core.serialization.Schema<serializers.ForbiddenErrorBodyErrorsItemMetaLimitScope.Raw, Natural.ForbiddenErrorBodyErrorsItemMetaLimitScope>;
|
|
5
|
+
export declare namespace ForbiddenErrorBodyErrorsItemMetaLimitScope {
|
|
6
|
+
type Raw = "merchant" | "program";
|
|
7
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.ForbiddenErrorBodyErrorsItemMetaLimitScope = void 0;
|
|
38
|
+
const core = __importStar(require("../../core/index.js"));
|
|
39
|
+
exports.ForbiddenErrorBodyErrorsItemMetaLimitScope = core.serialization.enum_(["merchant", "program"]);
|
|
@@ -2,11 +2,13 @@ import type * as Natural from "../../api/index.js";
|
|
|
2
2
|
import * as core from "../../core/index.js";
|
|
3
3
|
import type * as serializers from "../index.js";
|
|
4
4
|
import { InternalServerErrorBodyErrorsItemMetaConnectionStatus } from "./InternalServerErrorBodyErrorsItemMetaConnectionStatus.js";
|
|
5
|
+
import { InternalServerErrorBodyErrorsItemMetaLimitScope } from "./InternalServerErrorBodyErrorsItemMetaLimitScope.js";
|
|
5
6
|
import { InternalServerErrorBodyErrorsItemMetaProvider } from "./InternalServerErrorBodyErrorsItemMetaProvider.js";
|
|
6
7
|
export declare const InternalServerErrorBodyErrorsItemMeta: core.serialization.ObjectSchema<serializers.InternalServerErrorBodyErrorsItemMeta.Raw, Natural.InternalServerErrorBodyErrorsItemMeta>;
|
|
7
8
|
export declare namespace InternalServerErrorBodyErrorsItemMeta {
|
|
8
9
|
interface Raw {
|
|
9
10
|
supportId: string;
|
|
11
|
+
limitScope?: InternalServerErrorBodyErrorsItemMetaLimitScope.Raw | null;
|
|
10
12
|
connectionStatus?: InternalServerErrorBodyErrorsItemMetaConnectionStatus.Raw | null;
|
|
11
13
|
provider?: InternalServerErrorBodyErrorsItemMetaProvider.Raw | null;
|
|
12
14
|
}
|