@payabli/sdk-node 0.0.116 → 0.0.117
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 +24 -7
- package/dist/cjs/BaseClient.d.ts +10 -1
- package/dist/cjs/BaseClient.js +57 -0
- package/dist/cjs/Client.d.ts +87 -86
- package/dist/cjs/Client.js +31 -72
- package/dist/cjs/api/resources/bill/client/Client.d.ts +33 -33
- package/dist/cjs/api/resources/bill/client/Client.js +69 -216
- package/dist/cjs/api/resources/boarding/client/Client.d.ts +27 -27
- package/dist/cjs/api/resources/boarding/client/Client.js +51 -198
- package/dist/cjs/api/resources/chargeBacks/client/Client.d.ts +17 -15
- package/dist/cjs/api/resources/chargeBacks/client/Client.js +38 -79
- package/dist/cjs/api/resources/checkCapture/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/checkCapture/client/Client.js +11 -28
- package/dist/cjs/api/resources/cloud/client/Client.d.ts +17 -17
- package/dist/cjs/api/resources/cloud/client/Client.js +33 -89
- package/dist/cjs/api/resources/customer/client/Client.d.ts +17 -17
- package/dist/cjs/api/resources/customer/client/Client.js +31 -113
- package/dist/cjs/api/resources/export/client/Client.d.ts +93 -89
- package/dist/cjs/api/resources/export/client/Client.js +205 -582
- package/dist/cjs/api/resources/hostedPaymentPages/client/Client.d.ts +11 -11
- package/dist/cjs/api/resources/hostedPaymentPages/client/Client.js +19 -62
- package/dist/cjs/api/resources/import/client/Client.d.ts +11 -11
- package/dist/cjs/api/resources/import/client/Client.js +19 -62
- package/dist/cjs/api/resources/invoice/client/Client.d.ts +31 -31
- package/dist/cjs/api/resources/invoice/client/Client.js +62 -209
- package/dist/cjs/api/resources/lineItem/client/Client.d.ts +15 -15
- package/dist/cjs/api/resources/lineItem/client/Client.js +27 -96
- package/dist/cjs/api/resources/moneyIn/client/Client.d.ts +39 -39
- package/dist/cjs/api/resources/moneyIn/client/Client.js +79 -249
- package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +43 -26
- package/dist/cjs/api/resources/moneyOut/client/Client.js +105 -168
- package/dist/cjs/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.ts +2 -1
- package/dist/cjs/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.ts +3 -1
- package/dist/cjs/api/resources/notification/client/Client.d.ts +16 -16
- package/dist/cjs/api/resources/notification/client/Client.js +32 -101
- package/dist/cjs/api/resources/notificationlogs/client/Client.d.ts +13 -13
- package/dist/cjs/api/resources/notificationlogs/client/Client.js +23 -79
- package/dist/cjs/api/resources/ocr/client/Client.d.ts +13 -9
- package/dist/cjs/api/resources/ocr/client/Client.js +19 -45
- package/dist/cjs/api/resources/organization/client/Client.d.ts +19 -19
- package/dist/cjs/api/resources/organization/client/Client.js +35 -130
- package/dist/cjs/api/resources/paymentLink/client/Client.d.ts +23 -23
- package/dist/cjs/api/resources/paymentLink/client/Client.js +43 -164
- package/dist/cjs/api/resources/paymentMethodDomain/client/Client.d.ts +19 -19
- package/dist/cjs/api/resources/paymentMethodDomain/client/Client.js +35 -130
- package/dist/cjs/api/resources/paypoint/client/Client.d.ts +22 -22
- package/dist/cjs/api/resources/paypoint/client/Client.js +44 -152
- package/dist/cjs/api/resources/query/client/Client.d.ts +71 -71
- package/dist/cjs/api/resources/query/client/Client.js +137 -572
- package/dist/cjs/api/resources/query/client/requests/ListPayoutOrgRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/ListPayoutRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/ListTransactionsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/statistic/client/Client.d.ts +50 -50
- package/dist/cjs/api/resources/statistic/client/Client.js +80 -133
- package/dist/cjs/api/resources/statistic/client/requests/BasicStatsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/statistic/types/StatBasicExtendedQueryRecord.d.ts +76 -0
- package/dist/cjs/api/resources/statistic/types/StatBasicExtendedQueryRecord.js +3 -0
- package/dist/cjs/api/resources/statistic/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/statistic/types/index.js +1 -0
- package/dist/cjs/api/resources/subscription/client/Client.d.ts +13 -13
- package/dist/cjs/api/resources/subscription/client/Client.js +23 -79
- package/dist/cjs/api/resources/templates/client/Client.d.ts +15 -15
- package/dist/cjs/api/resources/templates/client/Client.js +28 -84
- package/dist/cjs/api/resources/tokenStorage/client/Client.d.ts +13 -13
- package/dist/cjs/api/resources/tokenStorage/client/Client.js +23 -79
- package/dist/cjs/api/resources/user/client/Client.d.ts +54 -32
- package/dist/cjs/api/resources/user/client/Client.js +84 -222
- package/dist/cjs/api/resources/vendor/client/Client.d.ts +13 -13
- package/dist/cjs/api/resources/vendor/client/Client.js +23 -79
- package/dist/cjs/api/resources/wallet/client/Client.d.ts +13 -13
- package/dist/cjs/api/resources/wallet/client/Client.js +23 -79
- package/dist/cjs/api/types/ApplicationDetailsRecord.d.ts +2 -2
- package/dist/cjs/api/types/NotificationContent.d.ts +1 -0
- package/dist/cjs/api/types/NotificationContent.js +1 -0
- package/dist/cjs/api/types/NotificationStandardRequest.d.ts +1 -0
- package/dist/cjs/api/types/NotificationStandardRequest.js +1 -0
- package/dist/cjs/api/types/QueryResponseSettlements.d.ts +1 -1
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +14 -0
- package/dist/cjs/auth/HeaderAuthProvider.js +71 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
- package/dist/cjs/{version.js → core/auth/AuthProvider.js} +0 -2
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +27 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
- package/dist/cjs/core/auth/BearerToken.js +16 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +5 -0
- package/dist/cjs/core/auth/index.js +9 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
- package/dist/cjs/core/fetcher/Fetcher.d.ts +5 -1
- package/dist/cjs/core/fetcher/Fetcher.js +42 -24
- package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +0 -2
- package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
- package/dist/cjs/core/fetcher/signals.d.ts +1 -7
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/index.d.ts +2 -0
- package/dist/cjs/core/index.js +2 -0
- package/dist/cjs/core/logging/logger.js +1 -1
- package/dist/cjs/core/runtime/runtime.js +11 -10
- package/dist/cjs/core/url/join.js +0 -1
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/esm/BaseClient.d.mts +10 -1
- package/dist/esm/BaseClient.mjs +22 -1
- package/dist/esm/Client.d.mts +87 -86
- package/dist/esm/Client.mjs +59 -67
- package/dist/esm/api/resources/bill/client/Client.d.mts +33 -33
- package/dist/esm/api/resources/bill/client/Client.mjs +67 -214
- package/dist/esm/api/resources/boarding/client/Client.d.mts +27 -27
- package/dist/esm/api/resources/boarding/client/Client.mjs +50 -197
- package/dist/esm/api/resources/chargeBacks/client/Client.d.mts +17 -15
- package/dist/esm/api/resources/chargeBacks/client/Client.mjs +36 -77
- package/dist/esm/api/resources/checkCapture/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/checkCapture/client/Client.mjs +10 -27
- package/dist/esm/api/resources/cloud/client/Client.d.mts +17 -17
- package/dist/esm/api/resources/cloud/client/Client.mjs +31 -87
- package/dist/esm/api/resources/customer/client/Client.d.mts +17 -17
- package/dist/esm/api/resources/customer/client/Client.mjs +29 -111
- package/dist/esm/api/resources/export/client/Client.d.mts +93 -89
- package/dist/esm/api/resources/export/client/Client.mjs +204 -581
- package/dist/esm/api/resources/hostedPaymentPages/client/Client.d.mts +11 -11
- package/dist/esm/api/resources/hostedPaymentPages/client/Client.mjs +17 -60
- package/dist/esm/api/resources/import/client/Client.d.mts +11 -11
- package/dist/esm/api/resources/import/client/Client.mjs +17 -60
- package/dist/esm/api/resources/invoice/client/Client.d.mts +31 -31
- package/dist/esm/api/resources/invoice/client/Client.mjs +60 -207
- package/dist/esm/api/resources/lineItem/client/Client.d.mts +15 -15
- package/dist/esm/api/resources/lineItem/client/Client.mjs +25 -94
- package/dist/esm/api/resources/moneyIn/client/Client.d.mts +39 -39
- package/dist/esm/api/resources/moneyIn/client/Client.mjs +77 -247
- package/dist/esm/api/resources/moneyOut/client/Client.d.mts +43 -26
- package/dist/esm/api/resources/moneyOut/client/Client.mjs +103 -166
- package/dist/esm/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.mts +2 -1
- package/dist/esm/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.mts +3 -1
- package/dist/esm/api/resources/notification/client/Client.d.mts +16 -16
- package/dist/esm/api/resources/notification/client/Client.mjs +31 -100
- package/dist/esm/api/resources/notificationlogs/client/Client.d.mts +13 -13
- package/dist/esm/api/resources/notificationlogs/client/Client.mjs +22 -78
- package/dist/esm/api/resources/ocr/client/Client.d.mts +13 -9
- package/dist/esm/api/resources/ocr/client/Client.mjs +18 -44
- package/dist/esm/api/resources/organization/client/Client.d.mts +19 -19
- package/dist/esm/api/resources/organization/client/Client.mjs +33 -128
- package/dist/esm/api/resources/paymentLink/client/Client.d.mts +23 -23
- package/dist/esm/api/resources/paymentLink/client/Client.mjs +41 -162
- package/dist/esm/api/resources/paymentMethodDomain/client/Client.d.mts +19 -19
- package/dist/esm/api/resources/paymentMethodDomain/client/Client.mjs +34 -129
- package/dist/esm/api/resources/paypoint/client/Client.d.mts +22 -22
- package/dist/esm/api/resources/paypoint/client/Client.mjs +43 -151
- package/dist/esm/api/resources/query/client/Client.d.mts +71 -71
- package/dist/esm/api/resources/query/client/Client.mjs +136 -571
- package/dist/esm/api/resources/query/client/requests/ListPayoutOrgRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/ListPayoutRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/ListTransactionsRequest.d.mts +1 -0
- package/dist/esm/api/resources/statistic/client/Client.d.mts +50 -50
- package/dist/esm/api/resources/statistic/client/Client.mjs +79 -132
- package/dist/esm/api/resources/statistic/client/requests/BasicStatsRequest.d.mts +2 -2
- package/dist/esm/api/resources/statistic/types/StatBasicExtendedQueryRecord.d.mts +76 -0
- package/dist/esm/api/resources/statistic/types/StatBasicExtendedQueryRecord.mjs +2 -0
- package/dist/esm/api/resources/statistic/types/index.d.mts +1 -0
- package/dist/esm/api/resources/statistic/types/index.mjs +1 -0
- package/dist/esm/api/resources/subscription/client/Client.d.mts +13 -13
- package/dist/esm/api/resources/subscription/client/Client.mjs +21 -77
- package/dist/esm/api/resources/templates/client/Client.d.mts +15 -15
- package/dist/esm/api/resources/templates/client/Client.mjs +27 -83
- package/dist/esm/api/resources/tokenStorage/client/Client.d.mts +13 -13
- package/dist/esm/api/resources/tokenStorage/client/Client.mjs +21 -77
- package/dist/esm/api/resources/user/client/Client.d.mts +54 -32
- package/dist/esm/api/resources/user/client/Client.mjs +83 -221
- package/dist/esm/api/resources/vendor/client/Client.d.mts +13 -13
- package/dist/esm/api/resources/vendor/client/Client.mjs +22 -78
- package/dist/esm/api/resources/wallet/client/Client.d.mts +13 -13
- package/dist/esm/api/resources/wallet/client/Client.mjs +22 -78
- package/dist/esm/api/types/ApplicationDetailsRecord.d.mts +2 -2
- package/dist/esm/api/types/NotificationContent.d.mts +1 -0
- package/dist/esm/api/types/NotificationContent.mjs +1 -0
- package/dist/esm/api/types/NotificationStandardRequest.d.mts +1 -0
- package/dist/esm/api/types/NotificationStandardRequest.mjs +1 -0
- package/dist/esm/api/types/QueryResponseSettlements.d.mts +1 -1
- package/dist/esm/auth/HeaderAuthProvider.d.mts +14 -0
- package/dist/esm/auth/HeaderAuthProvider.mjs +34 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +24 -0
- package/dist/esm/core/auth/BearerToken.d.mts +7 -0
- package/dist/esm/core/auth/BearerToken.mjs +13 -0
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +5 -0
- package/dist/esm/core/auth/index.mjs +3 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
- package/dist/esm/core/fetcher/Fetcher.d.mts +5 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +42 -24
- package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
- package/dist/esm/core/fetcher/signals.d.mts +1 -7
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/index.d.mts +2 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/core/logging/logger.mjs +1 -1
- package/dist/esm/core/runtime/runtime.mjs +11 -10
- package/dist/esm/core/url/join.mjs +0 -1
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/package.json +4 -4
- package/reference.md +761 -473
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
- package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
- package/dist/cjs/version.d.ts +0 -1
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
- package/dist/esm/version.d.mts +0 -1
- package/dist/esm/version.mjs +0 -1
|
@@ -43,22 +43,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.BoardingClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
47
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
48
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
49
50
|
const json_js_1 = require("../../../../core/json.js");
|
|
50
51
|
const environments = __importStar(require("../../../../environments.js"));
|
|
52
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
51
53
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
52
54
|
const Payabli = __importStar(require("../../../index.js"));
|
|
53
|
-
class
|
|
54
|
-
constructor(
|
|
55
|
-
this._options =
|
|
55
|
+
class BoardingClient {
|
|
56
|
+
constructor(options = {}) {
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
60
|
* Creates a boarding application in an organization. This endpoint requires an application API token.
|
|
59
61
|
*
|
|
60
62
|
* @param {Payabli.AddApplicationRequest} request
|
|
61
|
-
* @param {
|
|
63
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
64
|
*
|
|
63
65
|
* @throws {@link Payabli.BadRequestError}
|
|
64
66
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -546,7 +548,8 @@ class Boarding {
|
|
|
546
548
|
__addApplication(request, requestOptions) {
|
|
547
549
|
return __awaiter(this, void 0, void 0, function* () {
|
|
548
550
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
549
|
-
const
|
|
551
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
552
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
550
553
|
const _response = yield core.fetcher({
|
|
551
554
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, "Boarding/app"),
|
|
552
555
|
method: "POST",
|
|
@@ -585,28 +588,14 @@ class Boarding {
|
|
|
585
588
|
});
|
|
586
589
|
}
|
|
587
590
|
}
|
|
588
|
-
|
|
589
|
-
case "non-json":
|
|
590
|
-
throw new errors.PayabliError({
|
|
591
|
-
statusCode: _response.error.statusCode,
|
|
592
|
-
body: _response.error.rawBody,
|
|
593
|
-
rawResponse: _response.rawResponse,
|
|
594
|
-
});
|
|
595
|
-
case "timeout":
|
|
596
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /Boarding/app.");
|
|
597
|
-
case "unknown":
|
|
598
|
-
throw new errors.PayabliError({
|
|
599
|
-
message: _response.error.errorMessage,
|
|
600
|
-
rawResponse: _response.rawResponse,
|
|
601
|
-
});
|
|
602
|
-
}
|
|
591
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/Boarding/app");
|
|
603
592
|
});
|
|
604
593
|
}
|
|
605
594
|
/**
|
|
606
595
|
* Deletes a boarding application by ID.
|
|
607
596
|
*
|
|
608
597
|
* @param {number} appId - Boarding application ID.
|
|
609
|
-
* @param {
|
|
598
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
610
599
|
*
|
|
611
600
|
* @throws {@link Payabli.BadRequestError}
|
|
612
601
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -622,7 +611,8 @@ class Boarding {
|
|
|
622
611
|
__deleteApplication(appId, requestOptions) {
|
|
623
612
|
return __awaiter(this, void 0, void 0, function* () {
|
|
624
613
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
625
|
-
const
|
|
614
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
615
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
626
616
|
const _response = yield core.fetcher({
|
|
627
617
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Boarding/app/${core.url.encodePathParam(appId)}`),
|
|
628
618
|
method: "DELETE",
|
|
@@ -658,28 +648,14 @@ class Boarding {
|
|
|
658
648
|
});
|
|
659
649
|
}
|
|
660
650
|
}
|
|
661
|
-
|
|
662
|
-
case "non-json":
|
|
663
|
-
throw new errors.PayabliError({
|
|
664
|
-
statusCode: _response.error.statusCode,
|
|
665
|
-
body: _response.error.rawBody,
|
|
666
|
-
rawResponse: _response.rawResponse,
|
|
667
|
-
});
|
|
668
|
-
case "timeout":
|
|
669
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling DELETE /Boarding/app/{appId}.");
|
|
670
|
-
case "unknown":
|
|
671
|
-
throw new errors.PayabliError({
|
|
672
|
-
message: _response.error.errorMessage,
|
|
673
|
-
rawResponse: _response.rawResponse,
|
|
674
|
-
});
|
|
675
|
-
}
|
|
651
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/Boarding/app/{appId}");
|
|
676
652
|
});
|
|
677
653
|
}
|
|
678
654
|
/**
|
|
679
655
|
* Retrieves the details for a boarding application by ID.
|
|
680
656
|
*
|
|
681
657
|
* @param {number} appId - Boarding application ID.
|
|
682
|
-
* @param {
|
|
658
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
683
659
|
*
|
|
684
660
|
* @throws {@link Payabli.BadRequestError}
|
|
685
661
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -695,7 +671,8 @@ class Boarding {
|
|
|
695
671
|
__getApplication(appId, requestOptions) {
|
|
696
672
|
return __awaiter(this, void 0, void 0, function* () {
|
|
697
673
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
698
|
-
const
|
|
674
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
675
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
699
676
|
const _response = yield core.fetcher({
|
|
700
677
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Boarding/read/${core.url.encodePathParam(appId)}`),
|
|
701
678
|
method: "GET",
|
|
@@ -728,21 +705,7 @@ class Boarding {
|
|
|
728
705
|
});
|
|
729
706
|
}
|
|
730
707
|
}
|
|
731
|
-
|
|
732
|
-
case "non-json":
|
|
733
|
-
throw new errors.PayabliError({
|
|
734
|
-
statusCode: _response.error.statusCode,
|
|
735
|
-
body: _response.error.rawBody,
|
|
736
|
-
rawResponse: _response.rawResponse,
|
|
737
|
-
});
|
|
738
|
-
case "timeout":
|
|
739
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /Boarding/read/{appId}.");
|
|
740
|
-
case "unknown":
|
|
741
|
-
throw new errors.PayabliError({
|
|
742
|
-
message: _response.error.errorMessage,
|
|
743
|
-
rawResponse: _response.rawResponse,
|
|
744
|
-
});
|
|
745
|
-
}
|
|
708
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Boarding/read/{appId}");
|
|
746
709
|
});
|
|
747
710
|
}
|
|
748
711
|
/**
|
|
@@ -750,7 +713,7 @@ class Boarding {
|
|
|
750
713
|
*
|
|
751
714
|
* @param {string} xId - The application ID in Hex format. Find this at the end of the boarding link URL returned in a call to api/Boarding/applink/{appId}/{mail2}. For example in: `https://boarding-sandbox.payabli.com/boarding/externalapp/load/17E`, the xId is `17E`.
|
|
752
715
|
* @param {Payabli.RequestAppByAuth} request
|
|
753
|
-
* @param {
|
|
716
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
754
717
|
*
|
|
755
718
|
* @throws {@link Payabli.BadRequestError}
|
|
756
719
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -769,7 +732,8 @@ class Boarding {
|
|
|
769
732
|
__getApplicationByAuth(xId_1) {
|
|
770
733
|
return __awaiter(this, arguments, void 0, function* (xId, request = {}, requestOptions) {
|
|
771
734
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
772
|
-
const
|
|
735
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
736
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
773
737
|
const _response = yield core.fetcher({
|
|
774
738
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Boarding/read/${core.url.encodePathParam(xId)}`),
|
|
775
739
|
method: "POST",
|
|
@@ -805,28 +769,14 @@ class Boarding {
|
|
|
805
769
|
});
|
|
806
770
|
}
|
|
807
771
|
}
|
|
808
|
-
|
|
809
|
-
case "non-json":
|
|
810
|
-
throw new errors.PayabliError({
|
|
811
|
-
statusCode: _response.error.statusCode,
|
|
812
|
-
body: _response.error.rawBody,
|
|
813
|
-
rawResponse: _response.rawResponse,
|
|
814
|
-
});
|
|
815
|
-
case "timeout":
|
|
816
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /Boarding/read/{xId}.");
|
|
817
|
-
case "unknown":
|
|
818
|
-
throw new errors.PayabliError({
|
|
819
|
-
message: _response.error.errorMessage,
|
|
820
|
-
rawResponse: _response.rawResponse,
|
|
821
|
-
});
|
|
822
|
-
}
|
|
772
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/Boarding/read/{xId}");
|
|
823
773
|
});
|
|
824
774
|
}
|
|
825
775
|
/**
|
|
826
776
|
* Retrieves details for a boarding link, by ID.
|
|
827
777
|
*
|
|
828
778
|
* @param {number} boardingLinkId - The boarding link ID. You can find this at the end of the boarding link reference name. For example `https://boarding.payabli.com/boarding/app/myorgaccountname-00091`. The ID is `91`.
|
|
829
|
-
* @param {
|
|
779
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
830
780
|
*
|
|
831
781
|
* @throws {@link Payabli.BadRequestError}
|
|
832
782
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -842,7 +792,8 @@ class Boarding {
|
|
|
842
792
|
__getByIdLinkApplication(boardingLinkId, requestOptions) {
|
|
843
793
|
return __awaiter(this, void 0, void 0, function* () {
|
|
844
794
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
845
|
-
const
|
|
795
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
796
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
846
797
|
const _response = yield core.fetcher({
|
|
847
798
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Boarding/linkbyId/${core.url.encodePathParam(boardingLinkId)}`),
|
|
848
799
|
method: "GET",
|
|
@@ -875,28 +826,14 @@ class Boarding {
|
|
|
875
826
|
});
|
|
876
827
|
}
|
|
877
828
|
}
|
|
878
|
-
|
|
879
|
-
case "non-json":
|
|
880
|
-
throw new errors.PayabliError({
|
|
881
|
-
statusCode: _response.error.statusCode,
|
|
882
|
-
body: _response.error.rawBody,
|
|
883
|
-
rawResponse: _response.rawResponse,
|
|
884
|
-
});
|
|
885
|
-
case "timeout":
|
|
886
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /Boarding/linkbyId/{boardingLinkId}.");
|
|
887
|
-
case "unknown":
|
|
888
|
-
throw new errors.PayabliError({
|
|
889
|
-
message: _response.error.errorMessage,
|
|
890
|
-
rawResponse: _response.rawResponse,
|
|
891
|
-
});
|
|
892
|
-
}
|
|
829
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Boarding/linkbyId/{boardingLinkId}");
|
|
893
830
|
});
|
|
894
831
|
}
|
|
895
832
|
/**
|
|
896
833
|
* Get details for a boarding link using the boarding template ID. This endpoint requires an application API token.
|
|
897
834
|
*
|
|
898
835
|
* @param {number} templateId - The boarding template ID. You can find this at the end of the boarding template URL in PartnerHub. Example: `https://partner-sandbox.payabli.com/myorganization/boarding/edittemplate/80`. Here, the template ID is `80`.
|
|
899
|
-
* @param {
|
|
836
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
900
837
|
*
|
|
901
838
|
* @throws {@link Payabli.BadRequestError}
|
|
902
839
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -912,7 +849,8 @@ class Boarding {
|
|
|
912
849
|
__getByTemplateIdLinkApplication(templateId, requestOptions) {
|
|
913
850
|
return __awaiter(this, void 0, void 0, function* () {
|
|
914
851
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
915
|
-
const
|
|
852
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
853
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
916
854
|
const _response = yield core.fetcher({
|
|
917
855
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Boarding/linkbyTemplate/${core.url.encodePathParam(templateId)}`),
|
|
918
856
|
method: "GET",
|
|
@@ -945,21 +883,7 @@ class Boarding {
|
|
|
945
883
|
});
|
|
946
884
|
}
|
|
947
885
|
}
|
|
948
|
-
|
|
949
|
-
case "non-json":
|
|
950
|
-
throw new errors.PayabliError({
|
|
951
|
-
statusCode: _response.error.statusCode,
|
|
952
|
-
body: _response.error.rawBody,
|
|
953
|
-
rawResponse: _response.rawResponse,
|
|
954
|
-
});
|
|
955
|
-
case "timeout":
|
|
956
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /Boarding/linkbyTemplate/{templateId}.");
|
|
957
|
-
case "unknown":
|
|
958
|
-
throw new errors.PayabliError({
|
|
959
|
-
message: _response.error.errorMessage,
|
|
960
|
-
rawResponse: _response.rawResponse,
|
|
961
|
-
});
|
|
962
|
-
}
|
|
886
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Boarding/linkbyTemplate/{templateId}");
|
|
963
887
|
});
|
|
964
888
|
}
|
|
965
889
|
/**
|
|
@@ -968,7 +892,7 @@ class Boarding {
|
|
|
968
892
|
* @param {number} appId - Boarding application ID.
|
|
969
893
|
* @param {string} mail2 - Email address used to access the application. If `sendEmail` parameter is true, a link to the application is sent to this email address.
|
|
970
894
|
* @param {Payabli.GetExternalApplicationRequest} request
|
|
971
|
-
* @param {
|
|
895
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
972
896
|
*
|
|
973
897
|
* @throws {@link Payabli.BadRequestError}
|
|
974
898
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -989,7 +913,8 @@ class Boarding {
|
|
|
989
913
|
if (sendEmail != null) {
|
|
990
914
|
_queryParams.sendEmail = sendEmail.toString();
|
|
991
915
|
}
|
|
992
|
-
const
|
|
916
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
917
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
993
918
|
const _response = yield core.fetcher({
|
|
994
919
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Boarding/applink/${core.url.encodePathParam(appId)}/${core.url.encodePathParam(mail2)}`),
|
|
995
920
|
method: "PUT",
|
|
@@ -1022,28 +947,14 @@ class Boarding {
|
|
|
1022
947
|
});
|
|
1023
948
|
}
|
|
1024
949
|
}
|
|
1025
|
-
|
|
1026
|
-
case "non-json":
|
|
1027
|
-
throw new errors.PayabliError({
|
|
1028
|
-
statusCode: _response.error.statusCode,
|
|
1029
|
-
body: _response.error.rawBody,
|
|
1030
|
-
rawResponse: _response.rawResponse,
|
|
1031
|
-
});
|
|
1032
|
-
case "timeout":
|
|
1033
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling PUT /Boarding/applink/{appId}/{mail2}.");
|
|
1034
|
-
case "unknown":
|
|
1035
|
-
throw new errors.PayabliError({
|
|
1036
|
-
message: _response.error.errorMessage,
|
|
1037
|
-
rawResponse: _response.rawResponse,
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
950
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/Boarding/applink/{appId}/{mail2}");
|
|
1040
951
|
});
|
|
1041
952
|
}
|
|
1042
953
|
/**
|
|
1043
954
|
* Retrieves the details for a boarding link, by reference name. This endpoint requires an application API token.
|
|
1044
955
|
*
|
|
1045
956
|
* @param {string} boardingLinkReference - The boarding link reference name. You can find this at the end of the boarding link URL. For example `https://boarding.payabli.com/boarding/app/myorgaccountname-00091`
|
|
1046
|
-
* @param {
|
|
957
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1047
958
|
*
|
|
1048
959
|
* @throws {@link Payabli.BadRequestError}
|
|
1049
960
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -1059,7 +970,8 @@ class Boarding {
|
|
|
1059
970
|
__getLinkApplication(boardingLinkReference, requestOptions) {
|
|
1060
971
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1061
972
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1062
|
-
const
|
|
973
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
974
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1063
975
|
const _response = yield core.fetcher({
|
|
1064
976
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Boarding/link/${core.url.encodePathParam(boardingLinkReference)}`),
|
|
1065
977
|
method: "GET",
|
|
@@ -1092,21 +1004,7 @@ class Boarding {
|
|
|
1092
1004
|
});
|
|
1093
1005
|
}
|
|
1094
1006
|
}
|
|
1095
|
-
|
|
1096
|
-
case "non-json":
|
|
1097
|
-
throw new errors.PayabliError({
|
|
1098
|
-
statusCode: _response.error.statusCode,
|
|
1099
|
-
body: _response.error.rawBody,
|
|
1100
|
-
rawResponse: _response.rawResponse,
|
|
1101
|
-
});
|
|
1102
|
-
case "timeout":
|
|
1103
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /Boarding/link/{boardingLinkReference}.");
|
|
1104
|
-
case "unknown":
|
|
1105
|
-
throw new errors.PayabliError({
|
|
1106
|
-
message: _response.error.errorMessage,
|
|
1107
|
-
rawResponse: _response.rawResponse,
|
|
1108
|
-
});
|
|
1109
|
-
}
|
|
1007
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Boarding/link/{boardingLinkReference}");
|
|
1110
1008
|
});
|
|
1111
1009
|
}
|
|
1112
1010
|
/**
|
|
@@ -1114,7 +1012,7 @@ class Boarding {
|
|
|
1114
1012
|
*
|
|
1115
1013
|
* @param {number} orgId - The numeric identifier for organization, assigned by Payabli.
|
|
1116
1014
|
* @param {Payabli.ListApplicationsRequest} request
|
|
1117
|
-
* @param {
|
|
1015
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1118
1016
|
*
|
|
1119
1017
|
* @throws {@link Payabli.BadRequestError}
|
|
1120
1018
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -1151,7 +1049,8 @@ class Boarding {
|
|
|
1151
1049
|
if (sortBy != null) {
|
|
1152
1050
|
_queryParams.sortBy = sortBy;
|
|
1153
1051
|
}
|
|
1154
|
-
const
|
|
1052
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1053
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1155
1054
|
const _response = yield core.fetcher({
|
|
1156
1055
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Query/boarding/${core.url.encodePathParam(orgId)}`),
|
|
1157
1056
|
method: "GET",
|
|
@@ -1187,21 +1086,7 @@ class Boarding {
|
|
|
1187
1086
|
});
|
|
1188
1087
|
}
|
|
1189
1088
|
}
|
|
1190
|
-
|
|
1191
|
-
case "non-json":
|
|
1192
|
-
throw new errors.PayabliError({
|
|
1193
|
-
statusCode: _response.error.statusCode,
|
|
1194
|
-
body: _response.error.rawBody,
|
|
1195
|
-
rawResponse: _response.rawResponse,
|
|
1196
|
-
});
|
|
1197
|
-
case "timeout":
|
|
1198
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /Query/boarding/{orgId}.");
|
|
1199
|
-
case "unknown":
|
|
1200
|
-
throw new errors.PayabliError({
|
|
1201
|
-
message: _response.error.errorMessage,
|
|
1202
|
-
rawResponse: _response.rawResponse,
|
|
1203
|
-
});
|
|
1204
|
-
}
|
|
1089
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Query/boarding/{orgId}");
|
|
1205
1090
|
});
|
|
1206
1091
|
}
|
|
1207
1092
|
/**
|
|
@@ -1209,7 +1094,7 @@ class Boarding {
|
|
|
1209
1094
|
*
|
|
1210
1095
|
* @param {number} orgId - The numeric identifier for organization, assigned by Payabli.
|
|
1211
1096
|
* @param {Payabli.ListBoardingLinksRequest} request
|
|
1212
|
-
* @param {
|
|
1097
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1213
1098
|
*
|
|
1214
1099
|
* @throws {@link Payabli.BadRequestError}
|
|
1215
1100
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -1243,7 +1128,8 @@ class Boarding {
|
|
|
1243
1128
|
if (sortBy != null) {
|
|
1244
1129
|
_queryParams.sortBy = sortBy;
|
|
1245
1130
|
}
|
|
1246
|
-
const
|
|
1131
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1132
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1247
1133
|
const _response = yield core.fetcher({
|
|
1248
1134
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Query/boardinglinks/${core.url.encodePathParam(orgId)}`),
|
|
1249
1135
|
method: "GET",
|
|
@@ -1276,21 +1162,7 @@ class Boarding {
|
|
|
1276
1162
|
});
|
|
1277
1163
|
}
|
|
1278
1164
|
}
|
|
1279
|
-
|
|
1280
|
-
case "non-json":
|
|
1281
|
-
throw new errors.PayabliError({
|
|
1282
|
-
statusCode: _response.error.statusCode,
|
|
1283
|
-
body: _response.error.rawBody,
|
|
1284
|
-
rawResponse: _response.rawResponse,
|
|
1285
|
-
});
|
|
1286
|
-
case "timeout":
|
|
1287
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /Query/boardinglinks/{orgId}.");
|
|
1288
|
-
case "unknown":
|
|
1289
|
-
throw new errors.PayabliError({
|
|
1290
|
-
message: _response.error.errorMessage,
|
|
1291
|
-
rawResponse: _response.rawResponse,
|
|
1292
|
-
});
|
|
1293
|
-
}
|
|
1165
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Query/boardinglinks/{orgId}");
|
|
1294
1166
|
});
|
|
1295
1167
|
}
|
|
1296
1168
|
/**
|
|
@@ -1298,7 +1170,7 @@ class Boarding {
|
|
|
1298
1170
|
*
|
|
1299
1171
|
* @param {number} appId - Boarding application ID.
|
|
1300
1172
|
* @param {Payabli.ApplicationData} request
|
|
1301
|
-
* @param {
|
|
1173
|
+
* @param {BoardingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
1302
1174
|
*
|
|
1303
1175
|
* @throws {@link Payabli.BadRequestError}
|
|
1304
1176
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -1314,7 +1186,8 @@ class Boarding {
|
|
|
1314
1186
|
__updateApplication(appId, request, requestOptions) {
|
|
1315
1187
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1316
1188
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1317
|
-
const
|
|
1189
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
1190
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
1318
1191
|
const _response = yield core.fetcher({
|
|
1319
1192
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `Boarding/app/${core.url.encodePathParam(appId)}`),
|
|
1320
1193
|
method: "PUT",
|
|
@@ -1353,28 +1226,8 @@ class Boarding {
|
|
|
1353
1226
|
});
|
|
1354
1227
|
}
|
|
1355
1228
|
}
|
|
1356
|
-
|
|
1357
|
-
case "non-json":
|
|
1358
|
-
throw new errors.PayabliError({
|
|
1359
|
-
statusCode: _response.error.statusCode,
|
|
1360
|
-
body: _response.error.rawBody,
|
|
1361
|
-
rawResponse: _response.rawResponse,
|
|
1362
|
-
});
|
|
1363
|
-
case "timeout":
|
|
1364
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling PUT /Boarding/app/{appId}.");
|
|
1365
|
-
case "unknown":
|
|
1366
|
-
throw new errors.PayabliError({
|
|
1367
|
-
message: _response.error.errorMessage,
|
|
1368
|
-
rawResponse: _response.rawResponse,
|
|
1369
|
-
});
|
|
1370
|
-
}
|
|
1371
|
-
});
|
|
1372
|
-
}
|
|
1373
|
-
_getCustomAuthorizationHeaders() {
|
|
1374
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1375
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
1376
|
-
return { requestToken: apiKeyValue };
|
|
1229
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/Boarding/app/{appId}");
|
|
1377
1230
|
});
|
|
1378
1231
|
}
|
|
1379
1232
|
}
|
|
1380
|
-
exports.
|
|
1233
|
+
exports.BoardingClient = BoardingClient;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../core/index.js";
|
|
3
4
|
import * as Payabli from "../../../index.js";
|
|
4
|
-
export declare namespace
|
|
5
|
+
export declare namespace ChargeBacksClient {
|
|
5
6
|
interface Options extends BaseClientOptions {
|
|
6
7
|
}
|
|
7
8
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
9
|
}
|
|
9
10
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
11
|
+
export declare class ChargeBacksClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ChargeBacksClient.Options>;
|
|
13
|
+
constructor(options?: ChargeBacksClient.Options);
|
|
13
14
|
/**
|
|
14
15
|
* Add a response to a chargeback or ACH return.
|
|
15
16
|
*
|
|
16
|
-
* @param {number}
|
|
17
|
+
* @param {number} Id - ID of the chargeback or return record.
|
|
17
18
|
* @param {Payabli.ResponseChargeBack} request
|
|
18
|
-
* @param {
|
|
19
|
+
* @param {ChargeBacksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
19
20
|
*
|
|
20
21
|
* @throws {@link Payabli.BadRequestError}
|
|
21
22
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -27,13 +28,13 @@ export declare class ChargeBacks {
|
|
|
27
28
|
* idempotencyKey: "6B29FC40-CA47-1067-B31D-00DD010662DA"
|
|
28
29
|
* })
|
|
29
30
|
*/
|
|
30
|
-
addResponse(
|
|
31
|
+
addResponse(Id: number, request?: Payabli.ResponseChargeBack, requestOptions?: ChargeBacksClient.RequestOptions): core.HttpResponsePromise<Payabli.AddResponseResponse>;
|
|
31
32
|
private __addResponse;
|
|
32
33
|
/**
|
|
33
34
|
* Retrieves a chargeback record and its details.
|
|
34
35
|
*
|
|
35
|
-
* @param {number}
|
|
36
|
-
* @param {
|
|
36
|
+
* @param {number} Id - ID of the chargeback or return record. This is returned as `chargebackId` in the [RecievedChargeback](/developers/developer-guides/webhook-payloads#receivedChargeback) and [ReceivedAchReturn](/developers/developer-guides/webhook-payloads#receivedachreturn) webhook notifications.
|
|
37
|
+
* @param {ChargeBacksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
38
|
*
|
|
38
39
|
* @throws {@link Payabli.BadRequestError}
|
|
39
40
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -43,12 +44,14 @@ export declare class ChargeBacks {
|
|
|
43
44
|
* @example
|
|
44
45
|
* await client.chargeBacks.getChargeback(1000000)
|
|
45
46
|
*/
|
|
46
|
-
getChargeback(
|
|
47
|
+
getChargeback(Id: number, requestOptions?: ChargeBacksClient.RequestOptions): core.HttpResponsePromise<Payabli.ChargebackQueryRecords>;
|
|
47
48
|
private __getChargeback;
|
|
48
49
|
/**
|
|
50
|
+
* Retrieves a chargeback attachment file by its file name.
|
|
51
|
+
*
|
|
52
|
+
* @param {number} Id - The ID of chargeback or return record.
|
|
49
53
|
* @param {string} fileName - The chargeback attachment's file name.
|
|
50
|
-
* @param {
|
|
51
|
-
* @param {ChargeBacks.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
|
+
* @param {ChargeBacksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
55
|
*
|
|
53
56
|
* @throws {@link Payabli.BadRequestError}
|
|
54
57
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -56,9 +59,8 @@ export declare class ChargeBacks {
|
|
|
56
59
|
* @throws {@link Payabli.ServiceUnavailableError}
|
|
57
60
|
*
|
|
58
61
|
* @example
|
|
59
|
-
* await client.chargeBacks.getChargebackAttachment("fileName"
|
|
62
|
+
* await client.chargeBacks.getChargebackAttachment(1000000, "fileName")
|
|
60
63
|
*/
|
|
61
|
-
getChargebackAttachment(
|
|
64
|
+
getChargebackAttachment(Id: number, fileName: string, requestOptions?: ChargeBacksClient.RequestOptions): core.HttpResponsePromise<string>;
|
|
62
65
|
private __getChargebackAttachment;
|
|
63
|
-
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
64
66
|
}
|