@payabli/sdk-node 0.0.145 → 0.0.146
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 +2 -10
- package/dist/cjs/BaseClient.d.ts +0 -3
- package/dist/cjs/BaseClient.js +2 -17
- package/dist/cjs/api/resources/bill/client/Client.js +11 -35
- package/dist/cjs/api/resources/boarding/client/Client.js +13 -25
- 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 +4 -8
- package/dist/cjs/api/resources/customer/client/Client.js +6 -10
- package/dist/cjs/api/resources/export/client/Client.js +29 -145
- 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 +3 -7
- package/dist/cjs/api/resources/invoice/client/Client.js +11 -35
- package/dist/cjs/api/resources/lineItem/client/Client.js +5 -9
- package/dist/cjs/api/resources/management/client/Client.js +1 -1
- package/dist/cjs/api/resources/moneyIn/client/Client.js +19 -43
- package/dist/cjs/api/resources/moneyOut/client/Client.js +12 -20
- package/dist/cjs/api/resources/notification/client/Client.js +5 -5
- package/dist/cjs/api/resources/notificationlogs/client/Client.js +4 -8
- 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 +11 -31
- package/dist/cjs/api/resources/paymentMethodDomain/client/Client.js +7 -11
- package/dist/cjs/api/resources/payoutSubscription/client/Client.js +4 -4
- package/dist/cjs/api/resources/paypoint/client/Client.js +8 -12
- package/dist/cjs/api/resources/query/client/Client.js +42 -210
- package/dist/cjs/api/resources/statistic/client/Client.js +4 -20
- package/dist/cjs/api/resources/subscription/client/Client.js +4 -8
- package/dist/cjs/api/resources/templates/client/Client.js +4 -8
- package/dist/cjs/api/resources/tokenStorage/client/Client.js +4 -16
- package/dist/cjs/api/resources/user/client/Client.js +12 -16
- 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/core/auth/AuthProvider.d.ts +0 -1
- package/dist/cjs/core/auth/AuthProvider.js +0 -7
- package/dist/cjs/core/auth/index.d.ts +1 -1
- package/dist/cjs/core/auth/index.js +1 -3
- package/dist/cjs/core/fetcher/Fetcher.d.ts +0 -6
- package/dist/cjs/core/fetcher/Fetcher.js +8 -9
- package/dist/cjs/core/fetcher/requestWithRetries.js +1 -4
- package/dist/cjs/core/url/index.d.ts +0 -1
- package/dist/cjs/core/url/index.js +1 -3
- package/dist/cjs/core/url/qs.d.ts +1 -2
- package/dist/cjs/core/url/qs.js +12 -24
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +0 -3
- package/dist/esm/BaseClient.mjs +2 -17
- package/dist/esm/api/resources/bill/client/Client.mjs +11 -35
- package/dist/esm/api/resources/boarding/client/Client.mjs +13 -25
- 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 +4 -8
- package/dist/esm/api/resources/customer/client/Client.mjs +6 -10
- package/dist/esm/api/resources/export/client/Client.mjs +29 -145
- 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 +3 -7
- package/dist/esm/api/resources/invoice/client/Client.mjs +11 -35
- package/dist/esm/api/resources/lineItem/client/Client.mjs +5 -9
- package/dist/esm/api/resources/management/client/Client.mjs +1 -1
- package/dist/esm/api/resources/moneyIn/client/Client.mjs +19 -43
- package/dist/esm/api/resources/moneyOut/client/Client.mjs +12 -20
- package/dist/esm/api/resources/notification/client/Client.mjs +5 -5
- package/dist/esm/api/resources/notificationlogs/client/Client.mjs +4 -8
- 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 +11 -31
- package/dist/esm/api/resources/paymentMethodDomain/client/Client.mjs +7 -11
- package/dist/esm/api/resources/payoutSubscription/client/Client.mjs +4 -4
- package/dist/esm/api/resources/paypoint/client/Client.mjs +8 -12
- package/dist/esm/api/resources/query/client/Client.mjs +42 -210
- package/dist/esm/api/resources/statistic/client/Client.mjs +4 -20
- package/dist/esm/api/resources/subscription/client/Client.mjs +4 -8
- package/dist/esm/api/resources/templates/client/Client.mjs +4 -8
- package/dist/esm/api/resources/tokenStorage/client/Client.mjs +4 -16
- package/dist/esm/api/resources/user/client/Client.mjs +12 -16
- 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/core/auth/AuthProvider.d.mts +0 -1
- package/dist/esm/core/auth/AuthProvider.mjs +1 -6
- package/dist/esm/core/auth/index.d.mts +1 -1
- package/dist/esm/core/auth/index.mjs +0 -1
- package/dist/esm/core/fetcher/Fetcher.d.mts +0 -6
- package/dist/esm/core/fetcher/Fetcher.mjs +8 -9
- package/dist/esm/core/fetcher/requestWithRetries.mjs +1 -4
- package/dist/esm/core/url/index.d.mts +0 -1
- package/dist/esm/core/url/index.mjs +0 -1
- package/dist/esm/core/url/qs.d.mts +1 -2
- package/dist/esm/core/url/qs.mjs +12 -24
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/dist/cjs/core/url/QueryStringBuilder.d.ts +0 -47
- package/dist/cjs/core/url/QueryStringBuilder.js +0 -83
- package/dist/esm/core/url/QueryStringBuilder.d.mts +0 -47
- package/dist/esm/core/url/QueryStringBuilder.mjs +0 -80
|
@@ -1,47 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.queryBuilder = queryBuilder;
|
|
4
|
-
const qs_js_1 = require("./qs.js");
|
|
5
|
-
/**
|
|
6
|
-
* Creates a fluent builder for constructing URL query strings.
|
|
7
|
-
*
|
|
8
|
-
* Each `.add()` call serializes its value immediately (like C#'s builder),
|
|
9
|
-
* so no format tracking is needed — the style is applied at add-time.
|
|
10
|
-
*
|
|
11
|
-
* Usage (generated code):
|
|
12
|
-
*
|
|
13
|
-
* const qs = core.url.queryBuilder()
|
|
14
|
-
* .add("limit", limit)
|
|
15
|
-
* .add("tags", tags, { style: "comma" }) // explode: false
|
|
16
|
-
* .mergeAdditional(requestOptions?.queryParams)
|
|
17
|
-
* .build();
|
|
18
|
-
*/
|
|
19
|
-
function queryBuilder() {
|
|
20
|
-
return new QueryStringBuilder();
|
|
21
|
-
}
|
|
22
|
-
class QueryStringBuilder {
|
|
23
|
-
constructor() {
|
|
24
|
-
this.parts = new Map();
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Adds a query parameter, serializing it immediately.
|
|
28
|
-
*
|
|
29
|
-
* By default arrays use "repeat" format (`key=a&key=b`).
|
|
30
|
-
* Pass `{ style: "comma" }` for OpenAPI `explode: false` parameters
|
|
31
|
-
* to get comma-separated values (`key=a,b,c`).
|
|
32
|
-
*
|
|
33
|
-
* Null / undefined values are silently skipped.
|
|
34
|
-
*/
|
|
35
|
-
add(key, value, options) {
|
|
36
|
-
if (value === undefined || value === null) {
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
|
-
const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: (options === null || options === void 0 ? void 0 : options.style) === "comma" ? "comma" : "repeat" });
|
|
40
|
-
if (serialized.length > 0) {
|
|
41
|
-
this.parts.set(key, serialized);
|
|
42
|
-
}
|
|
43
|
-
return this;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Adds multiple query parameters at once from a record.
|
|
47
|
-
* All parameters use the default "repeat" array format.
|
|
48
|
-
* Null / undefined values are silently skipped.
|
|
49
|
-
*/
|
|
50
|
-
addMany(params) {
|
|
51
|
-
if (params != null) {
|
|
52
|
-
for (const [key, value] of Object.entries(params)) {
|
|
53
|
-
this.add(key, value);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return this;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Merges additional query parameters supplied at call-time via
|
|
60
|
-
* `requestOptions.queryParams`. Overrides existing keys (last-write-wins).
|
|
61
|
-
*/
|
|
62
|
-
mergeAdditional(additionalParams) {
|
|
63
|
-
if (additionalParams != null) {
|
|
64
|
-
for (const [key, value] of Object.entries(additionalParams)) {
|
|
65
|
-
if (value === undefined || value === null) {
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: "repeat" });
|
|
69
|
-
if (serialized.length > 0) {
|
|
70
|
-
this.parts.set(key, serialized);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return this;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Returns the assembled query string (without the leading `?`).
|
|
78
|
-
* Returns an empty string when no parameters were added.
|
|
79
|
-
*/
|
|
80
|
-
build() {
|
|
81
|
-
return [...this.parts.values()].join("&");
|
|
82
|
-
}
|
|
83
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,80 +0,0 @@
|
|
|
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
|
-
}
|