@payabli/sdk-node 0.0.141 → 0.0.142
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 +11 -15
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +41 -36
- package/dist/cjs/api/resources/cloud/client/Client.d.ts +4 -0
- package/dist/cjs/api/resources/cloud/client/Client.js +4 -0
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/management/client/Client.d.ts +41 -0
- package/dist/cjs/api/resources/management/client/Client.js +131 -0
- package/dist/cjs/api/resources/management/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/management/client/index.js +17 -0
- package/dist/cjs/api/resources/management/client/requests/VerifyAccountDetailsRequest.d.ts +25 -0
- package/dist/cjs/api/resources/management/client/requests/VerifyAccountDetailsRequest.js +3 -0
- package/dist/cjs/api/resources/management/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/management/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/management/exports.d.ts +2 -0
- package/dist/cjs/api/resources/management/exports.js +21 -0
- package/dist/cjs/api/resources/management/index.d.ts +2 -0
- package/dist/cjs/api/resources/management/index.js +18 -0
- package/dist/cjs/api/resources/management/types/BankAccountVerificationDetailsResponse.d.ts +31 -0
- package/dist/cjs/api/resources/management/types/BankAccountVerificationDetailsResponse.js +3 -0
- package/dist/cjs/api/resources/management/types/VerifyAccountDetailsResponse.d.ts +9 -0
- package/dist/cjs/api/resources/management/types/VerifyAccountDetailsResponse.js +3 -0
- package/dist/cjs/api/resources/management/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/management/types/index.js +18 -0
- package/dist/cjs/api/resources/moneyIn/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/moneyIn/client/Client.js +1 -1
- package/dist/cjs/api/resources/moneyIn/types/TransactionDetailPaymentData.d.ts +1 -1
- package/dist/cjs/api/resources/query/client/Client.d.ts +42 -0
- package/dist/cjs/api/resources/query/client/Client.js +140 -0
- package/dist/cjs/api/resources/query/client/requests/ListDevicesOrgRequest.d.ts +113 -0
- package/dist/cjs/api/resources/query/client/requests/ListDevicesOrgRequest.js +3 -0
- package/dist/cjs/api/resources/query/client/requests/ListDevicesRequest.d.ts +113 -0
- package/dist/cjs/api/resources/query/client/requests/ListDevicesRequest.js +3 -0
- package/dist/cjs/api/resources/query/client/requests/ListVcardsOrgRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/ListVcardsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/queryTypes/types/DeviceQueryRecord.d.ts +50 -0
- package/dist/cjs/api/resources/queryTypes/types/DeviceQueryRecord.js +3 -0
- package/dist/cjs/api/resources/queryTypes/types/QueryDeviceResponse.d.ts +45 -0
- package/dist/cjs/api/resources/queryTypes/types/QueryDeviceResponse.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/types/BinData.d.ts +4 -1
- package/dist/cjs/api/types/ProcessingSection.d.ts +5 -0
- package/dist/cjs/api/types/QueryChargebacksResponse.d.ts +10 -1
- package/dist/cjs/api/types/TemplateElement.d.ts +1 -0
- package/dist/cjs/api/types/VCardCardType.d.ts +6 -0
- package/dist/cjs/api/types/VCardCardType.js +3 -0
- package/dist/cjs/api/types/VCardRecord.d.ts +2 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/cloud/client/Client.d.mts +4 -0
- package/dist/esm/api/resources/cloud/client/Client.mjs +4 -0
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/management/client/Client.d.mts +41 -0
- package/dist/esm/api/resources/management/client/Client.mjs +94 -0
- package/dist/esm/api/resources/management/client/index.d.mts +1 -0
- package/dist/esm/api/resources/management/client/index.mjs +1 -0
- package/dist/esm/api/resources/management/client/requests/VerifyAccountDetailsRequest.d.mts +25 -0
- package/dist/esm/api/resources/management/client/requests/VerifyAccountDetailsRequest.mjs +2 -0
- package/dist/esm/api/resources/management/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/management/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/management/exports.d.mts +2 -0
- package/dist/esm/api/resources/management/exports.mjs +3 -0
- package/dist/esm/api/resources/management/index.d.mts +2 -0
- package/dist/esm/api/resources/management/index.mjs +2 -0
- package/dist/esm/api/resources/management/types/BankAccountVerificationDetailsResponse.d.mts +31 -0
- package/dist/esm/api/resources/management/types/BankAccountVerificationDetailsResponse.mjs +2 -0
- package/dist/esm/api/resources/management/types/VerifyAccountDetailsResponse.d.mts +9 -0
- package/dist/esm/api/resources/management/types/VerifyAccountDetailsResponse.mjs +2 -0
- package/dist/esm/api/resources/management/types/index.d.mts +2 -0
- package/dist/esm/api/resources/management/types/index.mjs +2 -0
- package/dist/esm/api/resources/moneyIn/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/moneyIn/client/Client.mjs +1 -1
- package/dist/esm/api/resources/moneyIn/types/TransactionDetailPaymentData.d.mts +1 -1
- package/dist/esm/api/resources/query/client/Client.d.mts +42 -0
- package/dist/esm/api/resources/query/client/Client.mjs +140 -0
- package/dist/esm/api/resources/query/client/requests/ListDevicesOrgRequest.d.mts +113 -0
- package/dist/esm/api/resources/query/client/requests/ListDevicesOrgRequest.mjs +2 -0
- package/dist/esm/api/resources/query/client/requests/ListDevicesRequest.d.mts +113 -0
- package/dist/esm/api/resources/query/client/requests/ListDevicesRequest.mjs +2 -0
- package/dist/esm/api/resources/query/client/requests/ListVcardsOrgRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/ListVcardsRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/queryTypes/types/DeviceQueryRecord.d.mts +50 -0
- package/dist/esm/api/resources/queryTypes/types/DeviceQueryRecord.mjs +2 -0
- package/dist/esm/api/resources/queryTypes/types/QueryDeviceResponse.d.mts +45 -0
- package/dist/esm/api/resources/queryTypes/types/QueryDeviceResponse.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/types/BinData.d.mts +4 -1
- package/dist/esm/api/types/ProcessingSection.d.mts +5 -0
- package/dist/esm/api/types/QueryChargebacksResponse.d.mts +10 -1
- package/dist/esm/api/types/TemplateElement.d.mts +1 -0
- package/dist/esm/api/types/VCardCardType.d.mts +6 -0
- package/dist/esm/api/types/VCardCardType.mjs +2 -0
- package/dist/esm/api/types/VCardRecord.d.mts +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +12 -1
- package/reference.md +236 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detailed bank account verification results from the verification network.
|
|
3
|
+
*/
|
|
4
|
+
export interface BankAccountVerificationDetailsResponse {
|
|
5
|
+
/** The ABA routing number that was verified. */
|
|
6
|
+
aba?: string | undefined;
|
|
7
|
+
/** The account number that was verified. */
|
|
8
|
+
accountNumber?: string | undefined;
|
|
9
|
+
/** Whether the bank account passed verification. */
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
/** Error message if the verification request failed. */
|
|
12
|
+
errorMessage?: string | undefined;
|
|
13
|
+
/** Overall verification outcome. Possible values include `Pass`, `Verified`, `Declined`, `NoData`, `Bypassed`, and `Error`. */
|
|
14
|
+
verificationResponse?: string | undefined;
|
|
15
|
+
/** Response code returned by the verification network. */
|
|
16
|
+
responseCode?: string | undefined;
|
|
17
|
+
/** Response value associated with the verification outcome. */
|
|
18
|
+
responseValue?: string | undefined;
|
|
19
|
+
/** Human-readable description of the verification outcome. */
|
|
20
|
+
responseDescription?: string | undefined;
|
|
21
|
+
/** Name of the bank associated with the routing number. */
|
|
22
|
+
bankName?: string | undefined;
|
|
23
|
+
/** Account type as reported by the verification network, such as `Checking` or `Savings`. */
|
|
24
|
+
reportedAccountType?: string | undefined;
|
|
25
|
+
/** Date the account was first seen by the verification network (ISO 8601 format). */
|
|
26
|
+
accountAddedDate?: string | undefined;
|
|
27
|
+
/** Date the account record was last updated in the verification network (ISO 8601 format). */
|
|
28
|
+
accountLastUpdatedDate?: string | undefined;
|
|
29
|
+
/** Date the account was closed, if applicable (ISO 8601 format). */
|
|
30
|
+
accountClosedDate?: string | undefined;
|
|
31
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Payabli from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Response wrapper for the bank account verification details endpoint.
|
|
4
|
+
*/
|
|
5
|
+
export interface VerifyAccountDetailsResponse {
|
|
6
|
+
isSuccess?: Payabli.IsSuccess | undefined;
|
|
7
|
+
responseText: Payabli.ResponseText;
|
|
8
|
+
responseData?: Payabli.BankAccountVerificationDetailsResponse | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BankAccountVerificationDetailsResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./VerifyAccountDetailsResponse.js"), exports);
|
|
@@ -389,7 +389,7 @@ export declare class MoneyInClient {
|
|
|
389
389
|
getpaid(request: Payabli.RequestPayment, requestOptions?: MoneyInClient.RequestOptions): core.HttpResponsePromise<Payabli.PayabliApiResponseGetPaid>;
|
|
390
390
|
private __getpaid;
|
|
391
391
|
/**
|
|
392
|
-
* A reversal either refunds or voids a transaction independent of the transaction's settlement status. Send a reversal request for a transaction, and Payabli automatically determines whether it's a refund or void. You don't need to know whether the transaction is settled or not.
|
|
392
|
+
* A reversal either refunds or voids a transaction independent of the transaction's settlement status. Send a reversal request for a transaction, and Payabli automatically determines whether it's a refund or void. You don't need to know whether the transaction is settled or not. This endpoint only works on transactions made with the v1 API. For v2 transactions, check the transaction's settlement status and call v2 void or v2 refund based on the result.
|
|
393
393
|
*
|
|
394
394
|
* @param {string} transId - ReferenceId for the transaction (PaymentId).
|
|
395
395
|
* @param {number} amount -
|
|
@@ -720,7 +720,7 @@ class MoneyInClient {
|
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
722
|
/**
|
|
723
|
-
* A reversal either refunds or voids a transaction independent of the transaction's settlement status. Send a reversal request for a transaction, and Payabli automatically determines whether it's a refund or void. You don't need to know whether the transaction is settled or not.
|
|
723
|
+
* A reversal either refunds or voids a transaction independent of the transaction's settlement status. Send a reversal request for a transaction, and Payabli automatically determines whether it's a refund or void. You don't need to know whether the transaction is settled or not. This endpoint only works on transactions made with the v1 API. For v2 transactions, check the transaction's settlement status and call v2 void or v2 refund based on the result.
|
|
724
724
|
*
|
|
725
725
|
* @param {string} transId - ReferenceId for the transaction (PaymentId).
|
|
726
726
|
* @param {number} amount -
|
|
@@ -11,7 +11,7 @@ export interface TransactionDetailPaymentData {
|
|
|
11
11
|
initiator: Payabli.Initiator | null;
|
|
12
12
|
storedMethodUsageType: Payabli.StoredMethodUsageType | null;
|
|
13
13
|
sequence: Payabli.Sequence | null;
|
|
14
|
-
orderDescription: Payabli.Orderdescription;
|
|
14
|
+
orderDescription: Payabli.Orderdescription | null;
|
|
15
15
|
accountId: Payabli.AccountId | null;
|
|
16
16
|
signatureData: Payabli.Signaturedata | null;
|
|
17
17
|
binData: Payabli.BinData | null;
|
|
@@ -221,6 +221,48 @@ export declare class QueryClient {
|
|
|
221
221
|
*/
|
|
222
222
|
listCustomersOrg(orgId: number, request?: Payabli.ListCustomersOrgRequest, requestOptions?: QueryClient.RequestOptions): core.HttpResponsePromise<Payabli.QueryCustomerResponse>;
|
|
223
223
|
private __listCustomersOrg;
|
|
224
|
+
/**
|
|
225
|
+
* Returns a list of cloud devices for a single paypoint. Use filters to limit results. Include the `exportFormat` query parameter to return the results as a file instead of a JSON response.
|
|
226
|
+
*
|
|
227
|
+
* @param {Payabli.Entry} entry
|
|
228
|
+
* @param {Payabli.ListDevicesRequest} request
|
|
229
|
+
* @param {QueryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
230
|
+
*
|
|
231
|
+
* @throws {@link Payabli.BadRequestError}
|
|
232
|
+
* @throws {@link Payabli.UnauthorizedError}
|
|
233
|
+
* @throws {@link Payabli.InternalServerError}
|
|
234
|
+
* @throws {@link Payabli.ServiceUnavailableError}
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* await client.query.listDevices("8cfec329267", {
|
|
238
|
+
* fromRecord: 0,
|
|
239
|
+
* limitRecord: 20,
|
|
240
|
+
* sortBy: "desc(createdAt)"
|
|
241
|
+
* })
|
|
242
|
+
*/
|
|
243
|
+
listDevices(entry: Payabli.Entry, request?: Payabli.ListDevicesRequest, requestOptions?: QueryClient.RequestOptions): core.HttpResponsePromise<Payabli.QueryDeviceResponse>;
|
|
244
|
+
private __listDevices;
|
|
245
|
+
/**
|
|
246
|
+
* Returns a list of cloud devices for a single organization. Use filters to limit results. Include the `exportFormat` query parameter to return the results as a file instead of a JSON response.
|
|
247
|
+
*
|
|
248
|
+
* @param {number} orgId - The numeric identifier for organization, assigned by Payabli.
|
|
249
|
+
* @param {Payabli.ListDevicesOrgRequest} request
|
|
250
|
+
* @param {QueryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
251
|
+
*
|
|
252
|
+
* @throws {@link Payabli.BadRequestError}
|
|
253
|
+
* @throws {@link Payabli.UnauthorizedError}
|
|
254
|
+
* @throws {@link Payabli.InternalServerError}
|
|
255
|
+
* @throws {@link Payabli.ServiceUnavailableError}
|
|
256
|
+
*
|
|
257
|
+
* @example
|
|
258
|
+
* await client.query.listDevicesOrg(100, {
|
|
259
|
+
* fromRecord: 0,
|
|
260
|
+
* limitRecord: 20,
|
|
261
|
+
* sortBy: "desc(createdAt)"
|
|
262
|
+
* })
|
|
263
|
+
*/
|
|
264
|
+
listDevicesOrg(orgId: number, request?: Payabli.ListDevicesOrgRequest, requestOptions?: QueryClient.RequestOptions): core.HttpResponsePromise<Payabli.QueryDeviceResponse>;
|
|
265
|
+
private __listDevicesOrg;
|
|
224
266
|
/**
|
|
225
267
|
* Returns a list of all reports generated in the last 60 days for a single entrypoint. Use filters to limit results.
|
|
226
268
|
*
|
|
@@ -757,6 +757,146 @@ class QueryClient {
|
|
|
757
757
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Query/customers/org/{orgId}");
|
|
758
758
|
});
|
|
759
759
|
}
|
|
760
|
+
/**
|
|
761
|
+
* Returns a list of cloud devices for a single paypoint. Use filters to limit results. Include the `exportFormat` query parameter to return the results as a file instead of a JSON response.
|
|
762
|
+
*
|
|
763
|
+
* @param {Payabli.Entry} entry
|
|
764
|
+
* @param {Payabli.ListDevicesRequest} request
|
|
765
|
+
* @param {QueryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
766
|
+
*
|
|
767
|
+
* @throws {@link Payabli.BadRequestError}
|
|
768
|
+
* @throws {@link Payabli.UnauthorizedError}
|
|
769
|
+
* @throws {@link Payabli.InternalServerError}
|
|
770
|
+
* @throws {@link Payabli.ServiceUnavailableError}
|
|
771
|
+
*
|
|
772
|
+
* @example
|
|
773
|
+
* await client.query.listDevices("8cfec329267", {
|
|
774
|
+
* fromRecord: 0,
|
|
775
|
+
* limitRecord: 20,
|
|
776
|
+
* sortBy: "desc(createdAt)"
|
|
777
|
+
* })
|
|
778
|
+
*/
|
|
779
|
+
listDevices(entry, request = {}, requestOptions) {
|
|
780
|
+
return core.HttpResponsePromise.fromPromise(this.__listDevices(entry, request, requestOptions));
|
|
781
|
+
}
|
|
782
|
+
__listDevices(entry_1) {
|
|
783
|
+
return __awaiter(this, arguments, void 0, function* (entry, request = {}, requestOptions) {
|
|
784
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
785
|
+
const { exportFormat, fromRecord, limitRecord, parameters, sortBy } = request;
|
|
786
|
+
const _queryParams = {
|
|
787
|
+
exportFormat: exportFormat != null ? exportFormat : undefined,
|
|
788
|
+
fromRecord,
|
|
789
|
+
limitRecord,
|
|
790
|
+
parameters: parameters != null ? (0, json_js_1.toJson)(parameters) : undefined,
|
|
791
|
+
sortBy,
|
|
792
|
+
};
|
|
793
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
794
|
+
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);
|
|
795
|
+
const _response = yield core.fetcher({
|
|
796
|
+
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/devices/${core.url.encodePathParam(entry)}`),
|
|
797
|
+
method: "GET",
|
|
798
|
+
headers: _headers,
|
|
799
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
800
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
801
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
802
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
803
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
804
|
+
logging: this._options.logging,
|
|
805
|
+
});
|
|
806
|
+
if (_response.ok) {
|
|
807
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
808
|
+
}
|
|
809
|
+
if (_response.error.reason === "status-code") {
|
|
810
|
+
switch (_response.error.statusCode) {
|
|
811
|
+
case 400:
|
|
812
|
+
throw new Payabli.BadRequestError(_response.error.body, _response.rawResponse);
|
|
813
|
+
case 401:
|
|
814
|
+
throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
815
|
+
case 500:
|
|
816
|
+
throw new Payabli.InternalServerError(_response.error.body, _response.rawResponse);
|
|
817
|
+
case 503:
|
|
818
|
+
throw new Payabli.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
819
|
+
default:
|
|
820
|
+
throw new errors.PayabliError({
|
|
821
|
+
statusCode: _response.error.statusCode,
|
|
822
|
+
body: _response.error.body,
|
|
823
|
+
rawResponse: _response.rawResponse,
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Query/devices/{entry}");
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Returns a list of cloud devices for a single organization. Use filters to limit results. Include the `exportFormat` query parameter to return the results as a file instead of a JSON response.
|
|
832
|
+
*
|
|
833
|
+
* @param {number} orgId - The numeric identifier for organization, assigned by Payabli.
|
|
834
|
+
* @param {Payabli.ListDevicesOrgRequest} request
|
|
835
|
+
* @param {QueryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
836
|
+
*
|
|
837
|
+
* @throws {@link Payabli.BadRequestError}
|
|
838
|
+
* @throws {@link Payabli.UnauthorizedError}
|
|
839
|
+
* @throws {@link Payabli.InternalServerError}
|
|
840
|
+
* @throws {@link Payabli.ServiceUnavailableError}
|
|
841
|
+
*
|
|
842
|
+
* @example
|
|
843
|
+
* await client.query.listDevicesOrg(100, {
|
|
844
|
+
* fromRecord: 0,
|
|
845
|
+
* limitRecord: 20,
|
|
846
|
+
* sortBy: "desc(createdAt)"
|
|
847
|
+
* })
|
|
848
|
+
*/
|
|
849
|
+
listDevicesOrg(orgId, request = {}, requestOptions) {
|
|
850
|
+
return core.HttpResponsePromise.fromPromise(this.__listDevicesOrg(orgId, request, requestOptions));
|
|
851
|
+
}
|
|
852
|
+
__listDevicesOrg(orgId_1) {
|
|
853
|
+
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
854
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
855
|
+
const { exportFormat, fromRecord, limitRecord, parameters, sortBy } = request;
|
|
856
|
+
const _queryParams = {
|
|
857
|
+
exportFormat: exportFormat != null ? exportFormat : undefined,
|
|
858
|
+
fromRecord,
|
|
859
|
+
limitRecord,
|
|
860
|
+
parameters: parameters != null ? (0, json_js_1.toJson)(parameters) : undefined,
|
|
861
|
+
sortBy,
|
|
862
|
+
};
|
|
863
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
864
|
+
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);
|
|
865
|
+
const _response = yield core.fetcher({
|
|
866
|
+
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/devices/org/${core.url.encodePathParam(orgId)}`),
|
|
867
|
+
method: "GET",
|
|
868
|
+
headers: _headers,
|
|
869
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
870
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
871
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
872
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
873
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
874
|
+
logging: this._options.logging,
|
|
875
|
+
});
|
|
876
|
+
if (_response.ok) {
|
|
877
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
878
|
+
}
|
|
879
|
+
if (_response.error.reason === "status-code") {
|
|
880
|
+
switch (_response.error.statusCode) {
|
|
881
|
+
case 400:
|
|
882
|
+
throw new Payabli.BadRequestError(_response.error.body, _response.rawResponse);
|
|
883
|
+
case 401:
|
|
884
|
+
throw new Payabli.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
885
|
+
case 500:
|
|
886
|
+
throw new Payabli.InternalServerError(_response.error.body, _response.rawResponse);
|
|
887
|
+
case 503:
|
|
888
|
+
throw new Payabli.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
889
|
+
default:
|
|
890
|
+
throw new errors.PayabliError({
|
|
891
|
+
statusCode: _response.error.statusCode,
|
|
892
|
+
body: _response.error.body,
|
|
893
|
+
rawResponse: _response.rawResponse,
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/Query/devices/org/{orgId}");
|
|
898
|
+
});
|
|
899
|
+
}
|
|
760
900
|
/**
|
|
761
901
|
* Returns a list of all reports generated in the last 60 days for a single entrypoint. Use filters to limit results.
|
|
762
902
|
*
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type * as Payabli from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* fromRecord: 0,
|
|
6
|
+
* limitRecord: 20,
|
|
7
|
+
* sortBy: "desc(createdAt)"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface ListDevicesOrgRequest {
|
|
11
|
+
exportFormat?: Payabli.ExportFormat;
|
|
12
|
+
/** The number of records to skip before starting to collect the result set. */
|
|
13
|
+
fromRecord?: number;
|
|
14
|
+
/** Max number of records to return for the query. Use `0` or negative value to return all records. */
|
|
15
|
+
limitRecord?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Collection of field names, conditions, and values used to filter
|
|
18
|
+
* the query.
|
|
19
|
+
*
|
|
20
|
+
* <Info>
|
|
21
|
+
* **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**
|
|
22
|
+
*
|
|
23
|
+
* Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.
|
|
24
|
+
*
|
|
25
|
+
* For example:
|
|
26
|
+
*
|
|
27
|
+
* --url https://api-sandbox.payabli.com/api/Query/devices/org/236?parameters=status=1&limitRecord=20
|
|
28
|
+
*
|
|
29
|
+
* should become:
|
|
30
|
+
*
|
|
31
|
+
* --url https://api-sandbox.payabli.com/api/Query/devices/org/236?status=1&limitRecord=20
|
|
32
|
+
* </Info>
|
|
33
|
+
*
|
|
34
|
+
* See [Filters and Conditions
|
|
35
|
+
* Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference)
|
|
36
|
+
* for more information.
|
|
37
|
+
*
|
|
38
|
+
* **List of field names accepted:**
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
* - `deviceId` (eq, ne, ct, nct)
|
|
42
|
+
*
|
|
43
|
+
* - `serialNumber` (eq, ne, ct, nct)
|
|
44
|
+
*
|
|
45
|
+
* - `friendlyName` (eq, ne, ct, nct)
|
|
46
|
+
*
|
|
47
|
+
* - `description` (eq, ne, ct, nct)
|
|
48
|
+
*
|
|
49
|
+
* - `model` (eq, ne, ct, nct)
|
|
50
|
+
*
|
|
51
|
+
* - `make` (eq, ne, ct, nct)
|
|
52
|
+
*
|
|
53
|
+
* - `macAddress` (eq, ne, ct, nct)
|
|
54
|
+
*
|
|
55
|
+
* - `registrationCode` (eq, ne, ct, nct)
|
|
56
|
+
*
|
|
57
|
+
* - `status` (eq, ne, in, nin)
|
|
58
|
+
*
|
|
59
|
+
* - `deviceType` (eq, ne, in, nin)
|
|
60
|
+
*
|
|
61
|
+
* - `deviceOs` (eq, ne, in, nin)
|
|
62
|
+
*
|
|
63
|
+
* - `activationAttempts` (eq, ne, gt, ge, lt, le)
|
|
64
|
+
*
|
|
65
|
+
* - `createdDate` (gt, ge, lt, le, eq, ne)
|
|
66
|
+
*
|
|
67
|
+
* - `updatedDate` (gt, ge, lt, le, eq, ne)
|
|
68
|
+
*
|
|
69
|
+
* - `lastHealthCheck` (gt, ge, lt, le, eq, ne)
|
|
70
|
+
*
|
|
71
|
+
* - `activationExpiry` (gt, ge, lt, le, eq, ne). This filter corresponds to the `activationCodeExpiry` response field.
|
|
72
|
+
*
|
|
73
|
+
* - `paypointId` (eq, ne)
|
|
74
|
+
*
|
|
75
|
+
* - `paypointDba` (eq, ne, ct, nct)
|
|
76
|
+
*
|
|
77
|
+
* - `paypointLegal` (eq, ne, ct, nct)
|
|
78
|
+
*
|
|
79
|
+
* - `paypointEntry` (eq, ne, ct, nct)
|
|
80
|
+
*
|
|
81
|
+
* - `externalPaypointId` (eq, ne, ct, nct)
|
|
82
|
+
*
|
|
83
|
+
* - `parentOrgId` (eq, ne)
|
|
84
|
+
*
|
|
85
|
+
* - `parentOrgName` (eq, ne, ct, nct)
|
|
86
|
+
*
|
|
87
|
+
*
|
|
88
|
+
* **List of comparison operators accepted:**
|
|
89
|
+
*
|
|
90
|
+
* - `eq` or empty => equal
|
|
91
|
+
*
|
|
92
|
+
* - `gt` => greater than
|
|
93
|
+
*
|
|
94
|
+
* - `ge` => greater or equal
|
|
95
|
+
*
|
|
96
|
+
* - `lt` => less than
|
|
97
|
+
*
|
|
98
|
+
* - `le` => less or equal
|
|
99
|
+
*
|
|
100
|
+
* - `ne` => not equal
|
|
101
|
+
*
|
|
102
|
+
* - `ct` => contains
|
|
103
|
+
*
|
|
104
|
+
* - `nct` => not contains
|
|
105
|
+
*
|
|
106
|
+
* - `in` => inside array
|
|
107
|
+
*
|
|
108
|
+
* - `nin` => not inside array
|
|
109
|
+
*/
|
|
110
|
+
parameters?: Record<string, string>;
|
|
111
|
+
/** The field name to use for sorting results. Use `desc(field_name)` to sort descending by `field_name`, and use `asc(field_name)` to sort ascending by `field_name`. */
|
|
112
|
+
sortBy?: string;
|
|
113
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type * as Payabli from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* fromRecord: 0,
|
|
6
|
+
* limitRecord: 20,
|
|
7
|
+
* sortBy: "desc(createdAt)"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface ListDevicesRequest {
|
|
11
|
+
exportFormat?: Payabli.ExportFormat;
|
|
12
|
+
/** The number of records to skip before starting to collect the result set. */
|
|
13
|
+
fromRecord?: number;
|
|
14
|
+
/** Max number of records to return for the query. Use `0` or negative value to return all records. */
|
|
15
|
+
limitRecord?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Collection of field names, conditions, and values used to filter
|
|
18
|
+
* the query.
|
|
19
|
+
*
|
|
20
|
+
* <Info>
|
|
21
|
+
* **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**
|
|
22
|
+
*
|
|
23
|
+
* Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.
|
|
24
|
+
*
|
|
25
|
+
* For example:
|
|
26
|
+
*
|
|
27
|
+
* --url https://api-sandbox.payabli.com/api/Query/devices/8cfec329267?parameters=status=1&limitRecord=20
|
|
28
|
+
*
|
|
29
|
+
* should become:
|
|
30
|
+
*
|
|
31
|
+
* --url https://api-sandbox.payabli.com/api/Query/devices/8cfec329267?status=1&limitRecord=20
|
|
32
|
+
* </Info>
|
|
33
|
+
*
|
|
34
|
+
* See [Filters and Conditions
|
|
35
|
+
* Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference)
|
|
36
|
+
* for more information.
|
|
37
|
+
*
|
|
38
|
+
* **List of field names accepted:**
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
* - `deviceId` (eq, ne, ct, nct)
|
|
42
|
+
*
|
|
43
|
+
* - `serialNumber` (eq, ne, ct, nct)
|
|
44
|
+
*
|
|
45
|
+
* - `friendlyName` (eq, ne, ct, nct)
|
|
46
|
+
*
|
|
47
|
+
* - `description` (eq, ne, ct, nct)
|
|
48
|
+
*
|
|
49
|
+
* - `model` (eq, ne, ct, nct)
|
|
50
|
+
*
|
|
51
|
+
* - `make` (eq, ne, ct, nct)
|
|
52
|
+
*
|
|
53
|
+
* - `macAddress` (eq, ne, ct, nct)
|
|
54
|
+
*
|
|
55
|
+
* - `registrationCode` (eq, ne, ct, nct)
|
|
56
|
+
*
|
|
57
|
+
* - `status` (eq, ne, in, nin)
|
|
58
|
+
*
|
|
59
|
+
* - `deviceType` (eq, ne, in, nin)
|
|
60
|
+
*
|
|
61
|
+
* - `deviceOs` (eq, ne, in, nin)
|
|
62
|
+
*
|
|
63
|
+
* - `activationAttempts` (eq, ne, gt, ge, lt, le)
|
|
64
|
+
*
|
|
65
|
+
* - `createdDate` (gt, ge, lt, le, eq, ne)
|
|
66
|
+
*
|
|
67
|
+
* - `updatedDate` (gt, ge, lt, le, eq, ne)
|
|
68
|
+
*
|
|
69
|
+
* - `lastHealthCheck` (gt, ge, lt, le, eq, ne)
|
|
70
|
+
*
|
|
71
|
+
* - `activationExpiry` (gt, ge, lt, le, eq, ne). This filter corresponds to the `activationCodeExpiry` response field.
|
|
72
|
+
*
|
|
73
|
+
* - `paypointId` (eq, ne)
|
|
74
|
+
*
|
|
75
|
+
* - `paypointDba` (eq, ne, ct, nct)
|
|
76
|
+
*
|
|
77
|
+
* - `paypointLegal` (eq, ne, ct, nct)
|
|
78
|
+
*
|
|
79
|
+
* - `paypointEntry` (eq, ne, ct, nct)
|
|
80
|
+
*
|
|
81
|
+
* - `externalPaypointId` (eq, ne, ct, nct)
|
|
82
|
+
*
|
|
83
|
+
* - `parentOrgId` (eq, ne)
|
|
84
|
+
*
|
|
85
|
+
* - `parentOrgName` (eq, ne, ct, nct)
|
|
86
|
+
*
|
|
87
|
+
*
|
|
88
|
+
* **List of comparison operators accepted:**
|
|
89
|
+
*
|
|
90
|
+
* - `eq` or empty => equal
|
|
91
|
+
*
|
|
92
|
+
* - `gt` => greater than
|
|
93
|
+
*
|
|
94
|
+
* - `ge` => greater or equal
|
|
95
|
+
*
|
|
96
|
+
* - `lt` => less than
|
|
97
|
+
*
|
|
98
|
+
* - `le` => less or equal
|
|
99
|
+
*
|
|
100
|
+
* - `ne` => not equal
|
|
101
|
+
*
|
|
102
|
+
* - `ct` => contains
|
|
103
|
+
*
|
|
104
|
+
* - `nct` => not contains
|
|
105
|
+
*
|
|
106
|
+
* - `in` => inside array
|
|
107
|
+
*
|
|
108
|
+
* - `nin` => not inside array
|
|
109
|
+
*/
|
|
110
|
+
parameters?: Record<string, string>;
|
|
111
|
+
/** The field name to use for sorting results. Use `desc(field_name)` to sort descending by `field_name`, and use `asc(field_name)` to sort ascending by `field_name`. */
|
|
112
|
+
sortBy?: string;
|
|
113
|
+
}
|
|
@@ -8,6 +8,8 @@ export type { ListChargebacksOrgRequest } from "./ListChargebacksOrgRequest.js";
|
|
|
8
8
|
export type { ListChargebacksRequest } from "./ListChargebacksRequest.js";
|
|
9
9
|
export type { ListCustomersOrgRequest } from "./ListCustomersOrgRequest.js";
|
|
10
10
|
export type { ListCustomersRequest } from "./ListCustomersRequest.js";
|
|
11
|
+
export type { ListDevicesOrgRequest } from "./ListDevicesOrgRequest.js";
|
|
12
|
+
export type { ListDevicesRequest } from "./ListDevicesRequest.js";
|
|
11
13
|
export type { ListNotificationReportsOrgRequest } from "./ListNotificationReportsOrgRequest.js";
|
|
12
14
|
export type { ListNotificationReportsRequest } from "./ListNotificationReportsRequest.js";
|
|
13
15
|
export type { ListNotificationsOrgRequest } from "./ListNotificationsOrgRequest.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export interface DeviceQueryRecord {
|
|
2
|
+
/** Unique identifier for the cloud device. */
|
|
3
|
+
deviceId: string | null;
|
|
4
|
+
/** Internal cloud device record ID. */
|
|
5
|
+
idCloud: number | null;
|
|
6
|
+
/** Description of the device. */
|
|
7
|
+
description: string | null;
|
|
8
|
+
/** Serial number of the device. */
|
|
9
|
+
serialNumber: string | null;
|
|
10
|
+
/** Human-readable name for the device. */
|
|
11
|
+
friendlyName: string | null;
|
|
12
|
+
/** Manufacturer of the device. */
|
|
13
|
+
make: string | null;
|
|
14
|
+
/** Model name of the device. */
|
|
15
|
+
model: string | null;
|
|
16
|
+
/** Type of device. */
|
|
17
|
+
deviceType: number | null;
|
|
18
|
+
/** Current status of the device. */
|
|
19
|
+
deviceStatus: number | null;
|
|
20
|
+
/** Operating system of the device. */
|
|
21
|
+
deviceOs: number | null;
|
|
22
|
+
/** MAC address of the device. */
|
|
23
|
+
macAddress: string | null;
|
|
24
|
+
/** Timestamp of the last health check from the device. */
|
|
25
|
+
lastHealthCheck: string | null;
|
|
26
|
+
/** Registration code used to activate the device. */
|
|
27
|
+
registrationCode: string | null;
|
|
28
|
+
/** Number of activation attempts for the device. */
|
|
29
|
+
activationAttempts: number | null;
|
|
30
|
+
/** Expiration timestamp for the device activation code. */
|
|
31
|
+
activationCodeExpiry: string | null;
|
|
32
|
+
/** Timestamp when the device record was created. */
|
|
33
|
+
createdAt: string | null;
|
|
34
|
+
/** Timestamp when the device record was last updated. */
|
|
35
|
+
updatedAt: string | null;
|
|
36
|
+
/** Numeric identifier for the paypoint. */
|
|
37
|
+
paypointId: number | null;
|
|
38
|
+
/** DBA name for the paypoint. */
|
|
39
|
+
paypointDba: string | null;
|
|
40
|
+
/** Legal name for the paypoint. */
|
|
41
|
+
paypointLegal: string | null;
|
|
42
|
+
/** Entry identifier for the paypoint. */
|
|
43
|
+
paypointEntry: string | null;
|
|
44
|
+
/** External identifier for the paypoint. */
|
|
45
|
+
externalPaypointId: string | null;
|
|
46
|
+
/** Numeric identifier for the parent organization. */
|
|
47
|
+
parentOrgId: number | null;
|
|
48
|
+
/** Name of the parent organization. */
|
|
49
|
+
parentOrgName: string | null;
|
|
50
|
+
}
|