@payabli/sdk-node 0.0.143 → 0.0.145
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/README.md +10 -2
- package/dist/cjs/BaseClient.d.ts +3 -0
- package/dist/cjs/BaseClient.js +17 -2
- package/dist/cjs/api/resources/bill/client/Client.js +35 -11
- package/dist/cjs/api/resources/boarding/client/Client.d.ts +38 -0
- package/dist/cjs/api/resources/boarding/client/Client.js +152 -11
- package/dist/cjs/api/resources/boarding/types/CreateApplicationFromPaypointRequest.d.ts +15 -0
- package/dist/cjs/api/resources/boarding/types/CreateApplicationFromPaypointRequest.js +3 -0
- package/dist/cjs/api/resources/boarding/types/CreateApplicationFromPaypointResponse.d.ts +20 -0
- package/dist/cjs/api/resources/boarding/types/CreateApplicationFromPaypointResponse.js +3 -0
- package/dist/cjs/api/resources/boarding/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/boarding/types/index.js +2 -0
- package/dist/cjs/api/resources/chargeBacks/client/Client.js +3 -3
- package/dist/cjs/api/resources/checkCapture/client/Client.js +1 -1
- package/dist/cjs/api/resources/cloud/client/Client.js +8 -4
- package/dist/cjs/api/resources/customer/client/Client.js +10 -6
- package/dist/cjs/api/resources/export/client/Client.js +145 -29
- package/dist/cjs/api/resources/ghostCard/client/Client.js +2 -2
- package/dist/cjs/api/resources/hostedPaymentPages/client/Client.js +3 -3
- package/dist/cjs/api/resources/import/client/Client.js +7 -3
- package/dist/cjs/api/resources/invoice/client/Client.js +35 -11
- package/dist/cjs/api/resources/lineItem/client/Client.js +9 -5
- package/dist/cjs/api/resources/management/client/Client.js +1 -1
- package/dist/cjs/api/resources/moneyIn/client/Client.js +43 -19
- package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +5 -1
- package/dist/cjs/api/resources/moneyOut/client/Client.js +25 -13
- package/dist/cjs/api/resources/notification/client/Client.js +5 -5
- package/dist/cjs/api/resources/notificationlogs/client/Client.js +8 -4
- package/dist/cjs/api/resources/ocr/client/Client.js +2 -2
- package/dist/cjs/api/resources/organization/client/Client.js +7 -7
- package/dist/cjs/api/resources/paymentLink/client/Client.js +31 -11
- package/dist/cjs/api/resources/paymentMethodDomain/client/Client.js +11 -7
- package/dist/cjs/api/resources/payoutSubscription/client/Client.js +4 -4
- package/dist/cjs/api/resources/paypoint/client/Client.js +12 -8
- package/dist/cjs/api/resources/query/client/Client.d.ts +58 -0
- package/dist/cjs/api/resources/query/client/Client.js +368 -40
- package/dist/cjs/api/resources/query/client/requests/ListSubscriptionsOrgRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/ListSubscriptionsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/ListTransactionsOrgRequest.d.ts +9 -0
- package/dist/cjs/api/resources/query/client/requests/ListTransactionsRequest.d.ts +9 -0
- package/dist/cjs/api/resources/query/client/requests/ListVcardsOrgRequest.d.ts +8 -6
- package/dist/cjs/api/resources/query/client/requests/ListVcardsRequest.d.ts +8 -6
- package/dist/cjs/api/resources/query/client/requests/ListVcardsTransactionsOrgRequest.d.ts +72 -0
- package/dist/cjs/api/resources/query/client/requests/ListVcardsTransactionsOrgRequest.js +3 -0
- package/dist/cjs/api/resources/query/client/requests/ListVcardsTransactionsRequest.d.ts +72 -0
- package/dist/cjs/api/resources/query/client/requests/ListVcardsTransactionsRequest.js +3 -0
- package/dist/cjs/api/resources/query/client/requests/ListVendorsOrgRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/ListVendorsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/queryTypes/types/QueryTransferDetailResponse.d.ts +2 -0
- package/dist/cjs/api/resources/queryTypes/types/QueryTransferSummary.d.ts +2 -0
- package/dist/cjs/api/resources/queryTypes/types/VCardTransactionQueryResponse.d.ts +49 -0
- package/dist/cjs/api/resources/queryTypes/types/VCardTransactionQueryResponse.js +3 -0
- package/dist/cjs/api/resources/queryTypes/types/VCardTransactionRecord.d.ts +86 -0
- package/dist/cjs/api/resources/queryTypes/types/VCardTransactionRecord.js +3 -0
- package/dist/cjs/api/resources/queryTypes/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/queryTypes/types/index.js +2 -0
- package/dist/cjs/api/resources/statistic/client/Client.js +20 -4
- package/dist/cjs/api/resources/subscription/client/Client.js +8 -4
- package/dist/cjs/api/resources/templates/client/Client.js +8 -4
- package/dist/cjs/api/resources/tokenStorage/client/Client.js +16 -4
- package/dist/cjs/api/resources/user/client/Client.js +16 -12
- package/dist/cjs/api/resources/v2MoneyInTypes/types/V2TransactionDetails.d.ts +1 -1
- package/dist/cjs/api/resources/vendor/client/Client.js +5 -5
- package/dist/cjs/api/resources/wallet/client/Client.js +4 -4
- package/dist/cjs/api/types/AutoCapture.d.ts +5 -1
- package/dist/cjs/api/types/CustomerQueryRecords.d.ts +10 -8
- package/dist/cjs/api/types/CustomerSummaryRecord.d.ts +4 -4
- package/dist/cjs/api/types/QueryResponseTransactions.d.ts +74 -0
- package/dist/cjs/api/types/SplitCount.d.ts +4 -0
- package/dist/cjs/api/types/SplitCount.js +3 -0
- package/dist/cjs/api/types/SubscriptionQueryRecords.d.ts +11 -1
- package/dist/cjs/api/types/TransactionQueryRecords.d.ts +2 -1
- package/dist/cjs/api/types/TransactionQueryRecordsCustomer.d.ts +1 -0
- package/dist/cjs/api/types/VCardSummary.d.ts +4 -2
- package/dist/cjs/api/types/VendorResponseStoredMethod.d.ts +2 -1
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
- package/dist/cjs/core/auth/AuthProvider.js +7 -0
- package/dist/cjs/core/auth/index.d.ts +1 -1
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +6 -0
- package/dist/cjs/core/fetcher/Fetcher.js +9 -8
- package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
- package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/qs.d.ts +2 -1
- package/dist/cjs/core/url/qs.js +24 -12
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +3 -0
- package/dist/esm/BaseClient.mjs +17 -2
- package/dist/esm/api/resources/bill/client/Client.mjs +35 -11
- package/dist/esm/api/resources/boarding/client/Client.d.mts +38 -0
- package/dist/esm/api/resources/boarding/client/Client.mjs +152 -11
- package/dist/esm/api/resources/boarding/types/CreateApplicationFromPaypointRequest.d.mts +15 -0
- package/dist/esm/api/resources/boarding/types/CreateApplicationFromPaypointRequest.mjs +2 -0
- package/dist/esm/api/resources/boarding/types/CreateApplicationFromPaypointResponse.d.mts +20 -0
- package/dist/esm/api/resources/boarding/types/CreateApplicationFromPaypointResponse.mjs +2 -0
- package/dist/esm/api/resources/boarding/types/index.d.mts +2 -0
- package/dist/esm/api/resources/boarding/types/index.mjs +2 -0
- package/dist/esm/api/resources/chargeBacks/client/Client.mjs +3 -3
- package/dist/esm/api/resources/checkCapture/client/Client.mjs +1 -1
- package/dist/esm/api/resources/cloud/client/Client.mjs +8 -4
- package/dist/esm/api/resources/customer/client/Client.mjs +10 -6
- package/dist/esm/api/resources/export/client/Client.mjs +145 -29
- package/dist/esm/api/resources/ghostCard/client/Client.mjs +2 -2
- package/dist/esm/api/resources/hostedPaymentPages/client/Client.mjs +3 -3
- package/dist/esm/api/resources/import/client/Client.mjs +7 -3
- package/dist/esm/api/resources/invoice/client/Client.mjs +35 -11
- package/dist/esm/api/resources/lineItem/client/Client.mjs +9 -5
- package/dist/esm/api/resources/management/client/Client.mjs +1 -1
- package/dist/esm/api/resources/moneyIn/client/Client.mjs +43 -19
- package/dist/esm/api/resources/moneyOut/client/Client.d.mts +5 -1
- package/dist/esm/api/resources/moneyOut/client/Client.mjs +25 -13
- package/dist/esm/api/resources/notification/client/Client.mjs +5 -5
- package/dist/esm/api/resources/notificationlogs/client/Client.mjs +8 -4
- package/dist/esm/api/resources/ocr/client/Client.mjs +2 -2
- package/dist/esm/api/resources/organization/client/Client.mjs +7 -7
- package/dist/esm/api/resources/paymentLink/client/Client.mjs +31 -11
- package/dist/esm/api/resources/paymentMethodDomain/client/Client.mjs +11 -7
- package/dist/esm/api/resources/payoutSubscription/client/Client.mjs +4 -4
- package/dist/esm/api/resources/paypoint/client/Client.mjs +12 -8
- package/dist/esm/api/resources/query/client/Client.d.mts +58 -0
- package/dist/esm/api/resources/query/client/Client.mjs +368 -40
- package/dist/esm/api/resources/query/client/requests/ListSubscriptionsOrgRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/ListSubscriptionsRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/ListTransactionsOrgRequest.d.mts +9 -0
- package/dist/esm/api/resources/query/client/requests/ListTransactionsRequest.d.mts +9 -0
- package/dist/esm/api/resources/query/client/requests/ListVcardsOrgRequest.d.mts +8 -6
- package/dist/esm/api/resources/query/client/requests/ListVcardsRequest.d.mts +8 -6
- package/dist/esm/api/resources/query/client/requests/ListVcardsTransactionsOrgRequest.d.mts +72 -0
- package/dist/esm/api/resources/query/client/requests/ListVcardsTransactionsOrgRequest.mjs +2 -0
- package/dist/esm/api/resources/query/client/requests/ListVcardsTransactionsRequest.d.mts +72 -0
- package/dist/esm/api/resources/query/client/requests/ListVcardsTransactionsRequest.mjs +2 -0
- package/dist/esm/api/resources/query/client/requests/ListVendorsOrgRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/ListVendorsRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/queryTypes/types/QueryTransferDetailResponse.d.mts +2 -0
- package/dist/esm/api/resources/queryTypes/types/QueryTransferSummary.d.mts +2 -0
- package/dist/esm/api/resources/queryTypes/types/VCardTransactionQueryResponse.d.mts +49 -0
- package/dist/esm/api/resources/queryTypes/types/VCardTransactionQueryResponse.mjs +2 -0
- package/dist/esm/api/resources/queryTypes/types/VCardTransactionRecord.d.mts +86 -0
- package/dist/esm/api/resources/queryTypes/types/VCardTransactionRecord.mjs +2 -0
- package/dist/esm/api/resources/queryTypes/types/index.d.mts +2 -0
- package/dist/esm/api/resources/queryTypes/types/index.mjs +2 -0
- package/dist/esm/api/resources/statistic/client/Client.mjs +20 -4
- package/dist/esm/api/resources/subscription/client/Client.mjs +8 -4
- package/dist/esm/api/resources/templates/client/Client.mjs +8 -4
- package/dist/esm/api/resources/tokenStorage/client/Client.mjs +16 -4
- package/dist/esm/api/resources/user/client/Client.mjs +16 -12
- package/dist/esm/api/resources/v2MoneyInTypes/types/V2TransactionDetails.d.mts +1 -1
- package/dist/esm/api/resources/vendor/client/Client.mjs +5 -5
- package/dist/esm/api/resources/wallet/client/Client.mjs +4 -4
- package/dist/esm/api/types/AutoCapture.d.mts +5 -1
- package/dist/esm/api/types/CustomerQueryRecords.d.mts +10 -8
- package/dist/esm/api/types/CustomerSummaryRecord.d.mts +4 -4
- package/dist/esm/api/types/QueryResponseTransactions.d.mts +74 -0
- package/dist/esm/api/types/SplitCount.d.mts +4 -0
- package/dist/esm/api/types/SplitCount.mjs +2 -0
- package/dist/esm/api/types/SubscriptionQueryRecords.d.mts +11 -1
- package/dist/esm/api/types/TransactionQueryRecords.d.mts +2 -1
- package/dist/esm/api/types/TransactionQueryRecordsCustomer.d.mts +1 -0
- package/dist/esm/api/types/VCardSummary.d.mts +4 -2
- package/dist/esm/api/types/VendorResponseStoredMethod.d.mts +2 -1
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
- package/dist/esm/core/auth/AuthProvider.mjs +6 -1
- package/dist/esm/core/auth/index.d.mts +1 -1
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +6 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +9 -8
- package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
- package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
- package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/qs.d.mts +2 -1
- package/dist/esm/core/url/qs.mjs +24 -12
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +287 -1
|
@@ -8,7 +8,13 @@ export declare namespace Fetcher {
|
|
|
8
8
|
method: string;
|
|
9
9
|
contentType?: string;
|
|
10
10
|
headers?: Record<string, unknown>;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Prefer `queryString` (produced by `core.url.queryBuilder()`).
|
|
13
|
+
* Retained for backwards compatibility with custom fetchers and callers that
|
|
14
|
+
* still construct request args with a query-parameter object.
|
|
15
|
+
*/
|
|
11
16
|
queryParameters?: Record<string, unknown>;
|
|
17
|
+
queryString?: string;
|
|
12
18
|
body?: unknown;
|
|
13
19
|
timeoutMs?: number;
|
|
14
20
|
maxRetries?: number;
|
|
@@ -71,16 +71,11 @@ const SENSITIVE_QUERY_PARAMS = new Set([
|
|
|
71
71
|
]);
|
|
72
72
|
function redactQueryParameters(queryParameters) {
|
|
73
73
|
if (queryParameters == null) {
|
|
74
|
-
return
|
|
74
|
+
return undefined;
|
|
75
75
|
}
|
|
76
76
|
const redacted = {};
|
|
77
77
|
for (const [key, value] of Object.entries(queryParameters)) {
|
|
78
|
-
|
|
79
|
-
redacted[key] = "[REDACTED]";
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
redacted[key] = value;
|
|
83
|
-
}
|
|
78
|
+
redacted[key] = SENSITIVE_QUERY_PARAMS.has(key.toLowerCase()) ? "[REDACTED]" : value;
|
|
84
79
|
}
|
|
85
80
|
return redacted;
|
|
86
81
|
}
|
|
@@ -182,7 +177,13 @@ function getHeaders(args) {
|
|
|
182
177
|
export function fetcherImpl(args) {
|
|
183
178
|
return __awaiter(this, void 0, void 0, function* () {
|
|
184
179
|
var _a, _b, _c;
|
|
185
|
-
|
|
180
|
+
let url = args.url;
|
|
181
|
+
if (args.queryString != null && args.queryString.length > 0) {
|
|
182
|
+
url = `${url}?${args.queryString}`;
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
url = createRequestUrl(args.url, args.queryParameters);
|
|
186
|
+
}
|
|
186
187
|
const requestBody = yield getRequestBody({
|
|
187
188
|
body: args.body,
|
|
188
189
|
type: (_a = args.requestType) !== null && _a !== void 0 ? _a : "other",
|
|
@@ -11,6 +11,9 @@ const INITIAL_RETRY_DELAY = 1000; // in milliseconds
|
|
|
11
11
|
const MAX_RETRY_DELAY = 60000; // in milliseconds
|
|
12
12
|
const DEFAULT_MAX_RETRIES = 2;
|
|
13
13
|
const JITTER_FACTOR = 0.2; // 20% random jitter
|
|
14
|
+
function isRetryableStatusCode(statusCode) {
|
|
15
|
+
return [408, 429].includes(statusCode) || statusCode >= 500;
|
|
16
|
+
}
|
|
14
17
|
function addPositiveJitter(delay) {
|
|
15
18
|
const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;
|
|
16
19
|
return delay * jitterMultiplier;
|
|
@@ -50,7 +53,7 @@ export function requestWithRetries(requestFn_1) {
|
|
|
50
53
|
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
51
54
|
let response = yield requestFn();
|
|
52
55
|
for (let i = 0; i < maxRetries; ++i) {
|
|
53
|
-
if (
|
|
56
|
+
if (isRetryableStatusCode(response.status)) {
|
|
54
57
|
const delay = getRetryDelayFromHeaders(response, i);
|
|
55
58
|
yield new Promise((resolve) => setTimeout(resolve, delay));
|
|
56
59
|
response = yield requestFn();
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a fluent builder for constructing URL query strings.
|
|
3
|
+
*
|
|
4
|
+
* Each `.add()` call serializes its value immediately (like C#'s builder),
|
|
5
|
+
* so no format tracking is needed — the style is applied at add-time.
|
|
6
|
+
*
|
|
7
|
+
* Usage (generated code):
|
|
8
|
+
*
|
|
9
|
+
* const qs = core.url.queryBuilder()
|
|
10
|
+
* .add("limit", limit)
|
|
11
|
+
* .add("tags", tags, { style: "comma" }) // explode: false
|
|
12
|
+
* .mergeAdditional(requestOptions?.queryParams)
|
|
13
|
+
* .build();
|
|
14
|
+
*/
|
|
15
|
+
export declare function queryBuilder(): QueryStringBuilder;
|
|
16
|
+
declare class QueryStringBuilder {
|
|
17
|
+
private parts;
|
|
18
|
+
/**
|
|
19
|
+
* Adds a query parameter, serializing it immediately.
|
|
20
|
+
*
|
|
21
|
+
* By default arrays use "repeat" format (`key=a&key=b`).
|
|
22
|
+
* Pass `{ style: "comma" }` for OpenAPI `explode: false` parameters
|
|
23
|
+
* to get comma-separated values (`key=a,b,c`).
|
|
24
|
+
*
|
|
25
|
+
* Null / undefined values are silently skipped.
|
|
26
|
+
*/
|
|
27
|
+
add(key: string, value: unknown, options?: {
|
|
28
|
+
style?: "comma";
|
|
29
|
+
}): this;
|
|
30
|
+
/**
|
|
31
|
+
* Adds multiple query parameters at once from a record.
|
|
32
|
+
* All parameters use the default "repeat" array format.
|
|
33
|
+
* Null / undefined values are silently skipped.
|
|
34
|
+
*/
|
|
35
|
+
addMany(params: Record<string, unknown>): this;
|
|
36
|
+
/**
|
|
37
|
+
* Merges additional query parameters supplied at call-time via
|
|
38
|
+
* `requestOptions.queryParams`. Overrides existing keys (last-write-wins).
|
|
39
|
+
*/
|
|
40
|
+
mergeAdditional(additionalParams?: Record<string, unknown>): this;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the assembled query string (without the leading `?`).
|
|
43
|
+
* Returns an empty string when no parameters were added.
|
|
44
|
+
*/
|
|
45
|
+
build(): string;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { toQueryString } from "./qs.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a fluent builder for constructing URL query strings.
|
|
4
|
+
*
|
|
5
|
+
* Each `.add()` call serializes its value immediately (like C#'s builder),
|
|
6
|
+
* so no format tracking is needed — the style is applied at add-time.
|
|
7
|
+
*
|
|
8
|
+
* Usage (generated code):
|
|
9
|
+
*
|
|
10
|
+
* const qs = core.url.queryBuilder()
|
|
11
|
+
* .add("limit", limit)
|
|
12
|
+
* .add("tags", tags, { style: "comma" }) // explode: false
|
|
13
|
+
* .mergeAdditional(requestOptions?.queryParams)
|
|
14
|
+
* .build();
|
|
15
|
+
*/
|
|
16
|
+
export function queryBuilder() {
|
|
17
|
+
return new QueryStringBuilder();
|
|
18
|
+
}
|
|
19
|
+
class QueryStringBuilder {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.parts = new Map();
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Adds a query parameter, serializing it immediately.
|
|
25
|
+
*
|
|
26
|
+
* By default arrays use "repeat" format (`key=a&key=b`).
|
|
27
|
+
* Pass `{ style: "comma" }` for OpenAPI `explode: false` parameters
|
|
28
|
+
* to get comma-separated values (`key=a,b,c`).
|
|
29
|
+
*
|
|
30
|
+
* Null / undefined values are silently skipped.
|
|
31
|
+
*/
|
|
32
|
+
add(key, value, options) {
|
|
33
|
+
if (value === undefined || value === null) {
|
|
34
|
+
return this;
|
|
35
|
+
}
|
|
36
|
+
const serialized = toQueryString({ [key]: value }, { arrayFormat: (options === null || options === void 0 ? void 0 : options.style) === "comma" ? "comma" : "repeat" });
|
|
37
|
+
if (serialized.length > 0) {
|
|
38
|
+
this.parts.set(key, serialized);
|
|
39
|
+
}
|
|
40
|
+
return this;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Adds multiple query parameters at once from a record.
|
|
44
|
+
* All parameters use the default "repeat" array format.
|
|
45
|
+
* Null / undefined values are silently skipped.
|
|
46
|
+
*/
|
|
47
|
+
addMany(params) {
|
|
48
|
+
if (params != null) {
|
|
49
|
+
for (const [key, value] of Object.entries(params)) {
|
|
50
|
+
this.add(key, value);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return this;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Merges additional query parameters supplied at call-time via
|
|
57
|
+
* `requestOptions.queryParams`. Overrides existing keys (last-write-wins).
|
|
58
|
+
*/
|
|
59
|
+
mergeAdditional(additionalParams) {
|
|
60
|
+
if (additionalParams != null) {
|
|
61
|
+
for (const [key, value] of Object.entries(additionalParams)) {
|
|
62
|
+
if (value === undefined || value === null) {
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const serialized = toQueryString({ [key]: value }, { arrayFormat: "repeat" });
|
|
66
|
+
if (serialized.length > 0) {
|
|
67
|
+
this.parts.set(key, serialized);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return this;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Returns the assembled query string (without the leading `?`).
|
|
75
|
+
* Returns an empty string when no parameters were added.
|
|
76
|
+
*/
|
|
77
|
+
build() {
|
|
78
|
+
return [...this.parts.values()].join("&");
|
|
79
|
+
}
|
|
80
|
+
}
|
package/dist/esm/core/url/qs.mjs
CHANGED
|
@@ -23,19 +23,31 @@ function stringifyObject(obj, prefix = "", options) {
|
|
|
23
23
|
if (value.length === 0) {
|
|
24
24
|
continue;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const effectiveFormat = options.arrayFormat;
|
|
27
|
+
if (effectiveFormat === "comma") {
|
|
28
|
+
const encodedKey = options.encode ? encodeURIComponent(fullKey) : fullKey;
|
|
29
|
+
const encodedValues = value
|
|
30
|
+
.filter((item) => item !== undefined && item !== null)
|
|
31
|
+
.map((item) => encodeValue(item, options.encode));
|
|
32
|
+
if (encodedValues.length > 0) {
|
|
33
|
+
parts.push(`${encodedKey}=${encodedValues.join(",")}`);
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
for (let i = 0; i < value.length; i++) {
|
|
38
|
+
const item = value[i];
|
|
39
|
+
if (item === undefined) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (typeof item === "object" && !Array.isArray(item) && item !== null) {
|
|
43
|
+
const arrayKey = effectiveFormat === "indices" ? `${fullKey}[${i}]` : fullKey;
|
|
44
|
+
parts.push(...stringifyObject(item, arrayKey, options));
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
const arrayKey = effectiveFormat === "indices" ? `${fullKey}[${i}]` : fullKey;
|
|
48
|
+
const encodedKey = options.encode ? encodeURIComponent(arrayKey) : arrayKey;
|
|
49
|
+
parts.push(`${encodedKey}=${encodeValue(item, options.encode)}`);
|
|
50
|
+
}
|
|
39
51
|
}
|
|
40
52
|
}
|
|
41
53
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.145";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.145";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -1740,6 +1740,138 @@ await client.boarding.updateApplication(352, {});
|
|
|
1740
1740
|
</dl>
|
|
1741
1741
|
|
|
1742
1742
|
|
|
1743
|
+
</dd>
|
|
1744
|
+
</dl>
|
|
1745
|
+
</details>
|
|
1746
|
+
|
|
1747
|
+
<details><summary><code>client.boarding.<a href="/src/api/resources/boarding/client/Client.ts">addServiceToPaypointFromApp</a>({ ...params }) -> Payabli.CreateApplicationFromPaypointResponse</code></summary>
|
|
1748
|
+
<dl>
|
|
1749
|
+
<dd>
|
|
1750
|
+
|
|
1751
|
+
#### 📝 Description
|
|
1752
|
+
|
|
1753
|
+
<dl>
|
|
1754
|
+
<dd>
|
|
1755
|
+
|
|
1756
|
+
<dl>
|
|
1757
|
+
<dd>
|
|
1758
|
+
|
|
1759
|
+
Creates a new boarding application linked to an existing paypoint as part of the multi-product boarding flow. Use this endpoint to add new services to a paypoint without creating a duplicate record. The system copies eligible business, contact, banking, and address data from the paypoint to the new application based on 1:1 field matching. The merchant only needs to provide fields that are specific to the new service. See the [Multi-product boarding](/guides/pay-ops-developer-boarding-multi-product) guide for the full flow.
|
|
1760
|
+
</dd>
|
|
1761
|
+
</dl>
|
|
1762
|
+
</dd>
|
|
1763
|
+
</dl>
|
|
1764
|
+
|
|
1765
|
+
#### 🔌 Usage
|
|
1766
|
+
|
|
1767
|
+
<dl>
|
|
1768
|
+
<dd>
|
|
1769
|
+
|
|
1770
|
+
<dl>
|
|
1771
|
+
<dd>
|
|
1772
|
+
|
|
1773
|
+
```typescript
|
|
1774
|
+
await client.boarding.addServiceToPaypointFromApp({
|
|
1775
|
+
paypointId: 123,
|
|
1776
|
+
templateId: 456,
|
|
1777
|
+
recipientEmail: "merchant@example.com",
|
|
1778
|
+
returnBoardingAccessInfoInLine: true,
|
|
1779
|
+
onCreate: ["submitApplication"]
|
|
1780
|
+
});
|
|
1781
|
+
|
|
1782
|
+
```
|
|
1783
|
+
</dd>
|
|
1784
|
+
</dl>
|
|
1785
|
+
</dd>
|
|
1786
|
+
</dl>
|
|
1787
|
+
|
|
1788
|
+
#### ⚙️ Parameters
|
|
1789
|
+
|
|
1790
|
+
<dl>
|
|
1791
|
+
<dd>
|
|
1792
|
+
|
|
1793
|
+
<dl>
|
|
1794
|
+
<dd>
|
|
1795
|
+
|
|
1796
|
+
**request:** `Payabli.CreateApplicationFromPaypointRequest`
|
|
1797
|
+
|
|
1798
|
+
</dd>
|
|
1799
|
+
</dl>
|
|
1800
|
+
|
|
1801
|
+
<dl>
|
|
1802
|
+
<dd>
|
|
1803
|
+
|
|
1804
|
+
**requestOptions:** `BoardingClient.RequestOptions`
|
|
1805
|
+
|
|
1806
|
+
</dd>
|
|
1807
|
+
</dl>
|
|
1808
|
+
</dd>
|
|
1809
|
+
</dl>
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
</dd>
|
|
1813
|
+
</dl>
|
|
1814
|
+
</details>
|
|
1815
|
+
|
|
1816
|
+
<details><summary><code>client.boarding.<a href="/src/api/resources/boarding/client/Client.ts">getApplicationsByPaypointId</a>(paypointId) -> Payabli.QueryBoardingAppsListResponse</code></summary>
|
|
1817
|
+
<dl>
|
|
1818
|
+
<dd>
|
|
1819
|
+
|
|
1820
|
+
#### 📝 Description
|
|
1821
|
+
|
|
1822
|
+
<dl>
|
|
1823
|
+
<dd>
|
|
1824
|
+
|
|
1825
|
+
<dl>
|
|
1826
|
+
<dd>
|
|
1827
|
+
|
|
1828
|
+
Returns all boarding applications associated with a specific paypoint, including those created through the multi-product boarding flow. Use this endpoint to track underwriting progress across multiple service additions or to build reporting views. See the [Multi-product boarding](/guides/pay-ops-developer-boarding-multi-product) guide for the full flow.
|
|
1829
|
+
</dd>
|
|
1830
|
+
</dl>
|
|
1831
|
+
</dd>
|
|
1832
|
+
</dl>
|
|
1833
|
+
|
|
1834
|
+
#### 🔌 Usage
|
|
1835
|
+
|
|
1836
|
+
<dl>
|
|
1837
|
+
<dd>
|
|
1838
|
+
|
|
1839
|
+
<dl>
|
|
1840
|
+
<dd>
|
|
1841
|
+
|
|
1842
|
+
```typescript
|
|
1843
|
+
await client.boarding.getApplicationsByPaypointId(12345);
|
|
1844
|
+
|
|
1845
|
+
```
|
|
1846
|
+
</dd>
|
|
1847
|
+
</dl>
|
|
1848
|
+
</dd>
|
|
1849
|
+
</dl>
|
|
1850
|
+
|
|
1851
|
+
#### ⚙️ Parameters
|
|
1852
|
+
|
|
1853
|
+
<dl>
|
|
1854
|
+
<dd>
|
|
1855
|
+
|
|
1856
|
+
<dl>
|
|
1857
|
+
<dd>
|
|
1858
|
+
|
|
1859
|
+
**paypointId:** `number` — ID of the paypoint to retrieve applications for.
|
|
1860
|
+
|
|
1861
|
+
</dd>
|
|
1862
|
+
</dl>
|
|
1863
|
+
|
|
1864
|
+
<dl>
|
|
1865
|
+
<dd>
|
|
1866
|
+
|
|
1867
|
+
**requestOptions:** `BoardingClient.RequestOptions`
|
|
1868
|
+
|
|
1869
|
+
</dd>
|
|
1870
|
+
</dl>
|
|
1871
|
+
</dd>
|
|
1872
|
+
</dl>
|
|
1873
|
+
|
|
1874
|
+
|
|
1743
1875
|
</dd>
|
|
1744
1876
|
</dl>
|
|
1745
1877
|
</details>
|
|
@@ -8507,7 +8639,11 @@ await client.moneyIn.voidv2("10-3ffa27df-b171-44e0-b251-e95fbfc7a723");
|
|
|
8507
8639
|
<dl>
|
|
8508
8640
|
<dd>
|
|
8509
8641
|
|
|
8510
|
-
Authorizes transaction for payout.
|
|
8642
|
+
Authorizes a transaction for payout.
|
|
8643
|
+
|
|
8644
|
+
If you don't pass `autoCapture` with a value of `true`, authorized transactions aren't flagged for settlement until captured. Use the `referenceId` returned in the response to capture the transaction.
|
|
8645
|
+
|
|
8646
|
+
When `autoCapture` is `true`, Payabli captures the transaction asynchronously after authorization. The response confirms only that the transaction was authorized; it doesn't confirm that capture succeeded. To confirm capture, listen for the [`payout_transaction_approvedcaptured`](/developers/webhooks/payout-transaction-approved-captured) webhook event.
|
|
8511
8647
|
</dd>
|
|
8512
8648
|
</dl>
|
|
8513
8649
|
</dd>
|
|
@@ -15928,6 +16064,156 @@ await client.query.listVcards("8cfec329267", {
|
|
|
15928
16064
|
</dl>
|
|
15929
16065
|
|
|
15930
16066
|
|
|
16067
|
+
</dd>
|
|
16068
|
+
</dl>
|
|
16069
|
+
</details>
|
|
16070
|
+
|
|
16071
|
+
<details><summary><code>client.query.<a href="/src/api/resources/query/client/Client.ts">listVcardsTransactions</a>(entry, { ...params }) -> Payabli.VCardTransactionQueryResponse</code></summary>
|
|
16072
|
+
<dl>
|
|
16073
|
+
<dd>
|
|
16074
|
+
|
|
16075
|
+
#### 📝 Description
|
|
16076
|
+
|
|
16077
|
+
<dl>
|
|
16078
|
+
<dd>
|
|
16079
|
+
|
|
16080
|
+
<dl>
|
|
16081
|
+
<dd>
|
|
16082
|
+
|
|
16083
|
+
Retrieve a list of virtual card transactions for an entrypoint. Use filters to limit results.
|
|
16084
|
+
</dd>
|
|
16085
|
+
</dl>
|
|
16086
|
+
</dd>
|
|
16087
|
+
</dl>
|
|
16088
|
+
|
|
16089
|
+
#### 🔌 Usage
|
|
16090
|
+
|
|
16091
|
+
<dl>
|
|
16092
|
+
<dd>
|
|
16093
|
+
|
|
16094
|
+
<dl>
|
|
16095
|
+
<dd>
|
|
16096
|
+
|
|
16097
|
+
```typescript
|
|
16098
|
+
await client.query.listVcardsTransactions("8cfec329267", {
|
|
16099
|
+
fromRecord: 0,
|
|
16100
|
+
limitRecord: 20,
|
|
16101
|
+
sortBy: "desc(CreatedOn)"
|
|
16102
|
+
});
|
|
16103
|
+
|
|
16104
|
+
```
|
|
16105
|
+
</dd>
|
|
16106
|
+
</dl>
|
|
16107
|
+
</dd>
|
|
16108
|
+
</dl>
|
|
16109
|
+
|
|
16110
|
+
#### ⚙️ Parameters
|
|
16111
|
+
|
|
16112
|
+
<dl>
|
|
16113
|
+
<dd>
|
|
16114
|
+
|
|
16115
|
+
<dl>
|
|
16116
|
+
<dd>
|
|
16117
|
+
|
|
16118
|
+
**entry:** `Payabli.Entry`
|
|
16119
|
+
|
|
16120
|
+
</dd>
|
|
16121
|
+
</dl>
|
|
16122
|
+
|
|
16123
|
+
<dl>
|
|
16124
|
+
<dd>
|
|
16125
|
+
|
|
16126
|
+
**request:** `Payabli.ListVcardsTransactionsRequest`
|
|
16127
|
+
|
|
16128
|
+
</dd>
|
|
16129
|
+
</dl>
|
|
16130
|
+
|
|
16131
|
+
<dl>
|
|
16132
|
+
<dd>
|
|
16133
|
+
|
|
16134
|
+
**requestOptions:** `QueryClient.RequestOptions`
|
|
16135
|
+
|
|
16136
|
+
</dd>
|
|
16137
|
+
</dl>
|
|
16138
|
+
</dd>
|
|
16139
|
+
</dl>
|
|
16140
|
+
|
|
16141
|
+
|
|
16142
|
+
</dd>
|
|
16143
|
+
</dl>
|
|
16144
|
+
</details>
|
|
16145
|
+
|
|
16146
|
+
<details><summary><code>client.query.<a href="/src/api/resources/query/client/Client.ts">listVcardsTransactionsOrg</a>(orgId, { ...params }) -> Payabli.VCardTransactionQueryResponse</code></summary>
|
|
16147
|
+
<dl>
|
|
16148
|
+
<dd>
|
|
16149
|
+
|
|
16150
|
+
#### 📝 Description
|
|
16151
|
+
|
|
16152
|
+
<dl>
|
|
16153
|
+
<dd>
|
|
16154
|
+
|
|
16155
|
+
<dl>
|
|
16156
|
+
<dd>
|
|
16157
|
+
|
|
16158
|
+
Retrieve a list of virtual card transactions for an organization. Use filters to limit results.
|
|
16159
|
+
</dd>
|
|
16160
|
+
</dl>
|
|
16161
|
+
</dd>
|
|
16162
|
+
</dl>
|
|
16163
|
+
|
|
16164
|
+
#### 🔌 Usage
|
|
16165
|
+
|
|
16166
|
+
<dl>
|
|
16167
|
+
<dd>
|
|
16168
|
+
|
|
16169
|
+
<dl>
|
|
16170
|
+
<dd>
|
|
16171
|
+
|
|
16172
|
+
```typescript
|
|
16173
|
+
await client.query.listVcardsTransactionsOrg(123, {
|
|
16174
|
+
fromRecord: 0,
|
|
16175
|
+
limitRecord: 20,
|
|
16176
|
+
sortBy: "desc(CreatedOn)"
|
|
16177
|
+
});
|
|
16178
|
+
|
|
16179
|
+
```
|
|
16180
|
+
</dd>
|
|
16181
|
+
</dl>
|
|
16182
|
+
</dd>
|
|
16183
|
+
</dl>
|
|
16184
|
+
|
|
16185
|
+
#### ⚙️ Parameters
|
|
16186
|
+
|
|
16187
|
+
<dl>
|
|
16188
|
+
<dd>
|
|
16189
|
+
|
|
16190
|
+
<dl>
|
|
16191
|
+
<dd>
|
|
16192
|
+
|
|
16193
|
+
**orgId:** `number` — The numeric identifier for organization, assigned by Payabli.
|
|
16194
|
+
|
|
16195
|
+
</dd>
|
|
16196
|
+
</dl>
|
|
16197
|
+
|
|
16198
|
+
<dl>
|
|
16199
|
+
<dd>
|
|
16200
|
+
|
|
16201
|
+
**request:** `Payabli.ListVcardsTransactionsOrgRequest`
|
|
16202
|
+
|
|
16203
|
+
</dd>
|
|
16204
|
+
</dl>
|
|
16205
|
+
|
|
16206
|
+
<dl>
|
|
16207
|
+
<dd>
|
|
16208
|
+
|
|
16209
|
+
**requestOptions:** `QueryClient.RequestOptions`
|
|
16210
|
+
|
|
16211
|
+
</dd>
|
|
16212
|
+
</dl>
|
|
16213
|
+
</dd>
|
|
16214
|
+
</dl>
|
|
16215
|
+
|
|
16216
|
+
|
|
15931
16217
|
</dd>
|
|
15932
16218
|
</dl>
|
|
15933
16219
|
</details>
|