pkg-sdk-test 0.0.14 → 0.0.16
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 +295 -0
- package/dist/cjs/BaseClient.js +3 -3
- package/dist/cjs/Client.d.ts +4 -4
- package/dist/cjs/Client.js +3 -3
- package/dist/cjs/api/errors/BadRequestError.d.ts +3 -3
- package/dist/cjs/api/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/errors/InternalServerError.d.ts +3 -3
- package/dist/cjs/api/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/errors/NotFoundError.d.ts +3 -3
- package/dist/cjs/api/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +3 -3
- package/dist/cjs/api/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +1 -0
- package/dist/cjs/api/resources/payments/client/Client.d.ts +38 -23
- package/dist/cjs/api/resources/payments/client/Client.js +89 -36
- package/dist/cjs/api/resources/payments/client/requests/CryptopayCreatePaymentRequest.d.ts +3 -3
- package/dist/cjs/api/resources/payments/client/requests/CryptopaySimulatePaymentRequest.d.ts +2 -2
- package/dist/cjs/api/resources/payments/client/requests/GetV1PaymentsRequest.d.ts +3 -2
- package/dist/cjs/api/resources/payments/client/requests/PostV1PaymentsPaymentIdActivateRequest.d.ts +10 -0
- package/dist/cjs/api/resources/payments/client/requests/PostV1PaymentsPaymentIdActivateRequest.js +3 -0
- package/dist/cjs/api/resources/payments/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/payments/types/GetV1PaymentsPaymentIdResponse.d.ts +2 -2
- package/dist/cjs/api/resources/payments/types/GetV1PaymentsRequestOrder.d.ts +5 -0
- package/dist/cjs/api/resources/payments/types/GetV1PaymentsRequestOrder.js +8 -0
- package/dist/cjs/api/resources/payments/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/payments/types/index.js +1 -0
- package/dist/cjs/api/resources/staticWallets/client/Client.d.ts +24 -23
- package/dist/cjs/api/resources/staticWallets/client/Client.js +59 -39
- package/dist/cjs/api/resources/staticWallets/client/requests/CryptopayCreateStaticWalletRequest.d.ts +2 -1
- package/dist/cjs/api/resources/staticWallets/client/requests/CryptopaySimulateStaticDepositRequest.d.ts +12 -2
- package/dist/cjs/api/resources/staticWallets/client/requests/CryptopaySimulateStaticDepositRequest.js +10 -0
- package/dist/cjs/api/resources/staticWallets/client/requests/CryptopayUpdateStaticWalletRequest.d.ts +2 -1
- package/dist/cjs/api/resources/staticWallets/client/requests/GetV1StaticWalletsRequest.d.ts +13 -0
- package/dist/cjs/api/resources/staticWallets/client/requests/GetV1StaticWalletsRequest.js +3 -0
- package/dist/cjs/api/resources/staticWallets/client/requests/GetV1StaticWalletsStaticWalletIdDepositsRequest.d.ts +7 -0
- package/dist/cjs/api/resources/staticWallets/client/requests/index.d.ts +2 -1
- package/dist/cjs/api/resources/staticWallets/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/staticWallets/index.d.ts +1 -0
- package/dist/cjs/api/resources/staticWallets/index.js +1 -0
- package/dist/cjs/api/resources/staticWallets/types/GetV1StaticWalletsRequestOrder.d.ts +5 -0
- package/dist/cjs/api/resources/staticWallets/types/GetV1StaticWalletsRequestOrder.js +8 -0
- package/dist/cjs/api/resources/staticWallets/types/GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.d.ts +5 -0
- package/dist/cjs/api/resources/staticWallets/types/GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.js +8 -0
- package/dist/cjs/api/resources/staticWallets/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/staticWallets/types/index.js +18 -0
- package/dist/cjs/api/types/CryptopayAssetId.d.ts +32 -0
- package/dist/cjs/api/types/CryptopayAssetId.js +35 -0
- package/dist/cjs/api/types/CryptopayListPaymentsResponse.d.ts +2 -2
- package/dist/cjs/api/types/CryptopayListStaticDepositsResponse.d.ts +2 -2
- package/dist/cjs/api/types/CryptopayListStaticWalletsResponse.d.ts +2 -2
- package/dist/cjs/api/types/CryptopayPaymentResponse.d.ts +6 -6
- package/dist/cjs/api/types/CryptopayPublicPaymentResponse.d.ts +5 -5
- package/dist/cjs/api/types/CryptopayRedirectConfigDto.d.ts +11 -1
- package/dist/cjs/api/types/CryptopayRedirectConfigDto.js +11 -0
- package/dist/cjs/api/types/CryptopayStaticDepositResponse.d.ts +13 -2
- package/dist/cjs/api/types/CryptopayStaticDepositResponse.js +11 -0
- package/dist/cjs/api/types/CryptopayStaticWalletResponse.d.ts +2 -1
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +1 -1
- package/dist/cjs/auth/HeaderAuthProvider.js +1 -1
- package/dist/cjs/errors/{SuwardApiError.d.ts → SuwardSDKError.d.ts} +1 -1
- package/dist/cjs/errors/{SuwardApiError.js → SuwardSDKError.js} +4 -4
- package/dist/{esm/errors/SuwardApiTimeoutError.d.mts → cjs/errors/SuwardSDKTimeoutError.d.ts} +1 -1
- package/dist/cjs/errors/{SuwardApiTimeoutError.js → SuwardSDKTimeoutError.js} +4 -4
- package/dist/cjs/errors/handleNonStatusCodeError.js +5 -5
- package/dist/cjs/errors/index.d.ts +2 -2
- package/dist/cjs/errors/index.js +5 -5
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +3 -3
- package/dist/esm/Client.d.mts +4 -4
- package/dist/esm/Client.mjs +1 -1
- package/dist/esm/api/errors/BadRequestError.d.mts +3 -3
- package/dist/esm/api/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/errors/InternalServerError.d.mts +3 -3
- package/dist/esm/api/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/errors/NotFoundError.d.mts +3 -3
- package/dist/esm/api/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/errors/UnauthorizedError.d.mts +3 -3
- package/dist/esm/api/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -0
- package/dist/esm/api/resources/payments/client/Client.d.mts +38 -23
- package/dist/esm/api/resources/payments/client/Client.mjs +89 -36
- package/dist/esm/api/resources/payments/client/requests/CryptopayCreatePaymentRequest.d.mts +3 -3
- package/dist/esm/api/resources/payments/client/requests/CryptopaySimulatePaymentRequest.d.mts +2 -2
- package/dist/esm/api/resources/payments/client/requests/GetV1PaymentsRequest.d.mts +3 -2
- package/dist/esm/api/resources/payments/client/requests/PostV1PaymentsPaymentIdActivateRequest.d.mts +10 -0
- package/dist/esm/api/resources/payments/client/requests/PostV1PaymentsPaymentIdActivateRequest.mjs +2 -0
- package/dist/esm/api/resources/payments/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/payments/types/GetV1PaymentsPaymentIdResponse.d.mts +2 -2
- package/dist/esm/api/resources/payments/types/GetV1PaymentsRequestOrder.d.mts +5 -0
- package/dist/esm/api/resources/payments/types/GetV1PaymentsRequestOrder.mjs +5 -0
- package/dist/esm/api/resources/payments/types/index.d.mts +1 -0
- package/dist/esm/api/resources/payments/types/index.mjs +1 -0
- package/dist/esm/api/resources/staticWallets/client/Client.d.mts +24 -23
- package/dist/esm/api/resources/staticWallets/client/Client.mjs +59 -39
- package/dist/esm/api/resources/staticWallets/client/requests/CryptopayCreateStaticWalletRequest.d.mts +2 -1
- package/dist/esm/api/resources/staticWallets/client/requests/CryptopaySimulateStaticDepositRequest.d.mts +12 -2
- package/dist/esm/api/resources/staticWallets/client/requests/CryptopaySimulateStaticDepositRequest.mjs +9 -1
- package/dist/esm/api/resources/staticWallets/client/requests/CryptopayUpdateStaticWalletRequest.d.mts +2 -1
- package/dist/esm/api/resources/staticWallets/client/requests/GetV1StaticWalletsRequest.d.mts +13 -0
- package/dist/esm/api/resources/staticWallets/client/requests/GetV1StaticWalletsRequest.mjs +2 -0
- package/dist/esm/api/resources/staticWallets/client/requests/GetV1StaticWalletsStaticWalletIdDepositsRequest.d.mts +7 -0
- package/dist/esm/api/resources/staticWallets/client/requests/index.d.mts +2 -1
- package/dist/esm/api/resources/staticWallets/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/staticWallets/index.d.mts +1 -0
- package/dist/esm/api/resources/staticWallets/index.mjs +1 -0
- package/dist/esm/api/resources/staticWallets/types/GetV1StaticWalletsRequestOrder.d.mts +5 -0
- package/dist/esm/api/resources/staticWallets/types/GetV1StaticWalletsRequestOrder.mjs +5 -0
- package/dist/esm/api/resources/staticWallets/types/GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.d.mts +5 -0
- package/dist/esm/api/resources/staticWallets/types/GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.mjs +5 -0
- package/dist/esm/api/resources/staticWallets/types/index.d.mts +2 -0
- package/dist/esm/api/resources/staticWallets/types/index.mjs +2 -0
- package/dist/esm/api/types/CryptopayAssetId.d.mts +32 -0
- package/dist/esm/api/types/CryptopayAssetId.mjs +32 -0
- package/dist/esm/api/types/CryptopayListPaymentsResponse.d.mts +2 -2
- package/dist/esm/api/types/CryptopayListStaticDepositsResponse.d.mts +2 -2
- package/dist/esm/api/types/CryptopayListStaticWalletsResponse.d.mts +2 -2
- package/dist/esm/api/types/CryptopayPaymentResponse.d.mts +6 -6
- package/dist/esm/api/types/CryptopayPublicPaymentResponse.d.mts +5 -5
- package/dist/esm/api/types/CryptopayRedirectConfigDto.d.mts +11 -1
- package/dist/esm/api/types/CryptopayRedirectConfigDto.mjs +10 -1
- package/dist/esm/api/types/CryptopayStaticDepositResponse.d.mts +13 -2
- package/dist/esm/api/types/CryptopayStaticDepositResponse.mjs +10 -1
- package/dist/esm/api/types/CryptopayStaticWalletResponse.d.mts +2 -1
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/auth/HeaderAuthProvider.d.mts +1 -1
- package/dist/esm/auth/HeaderAuthProvider.mjs +1 -1
- package/dist/esm/errors/{SuwardApiError.d.mts → SuwardSDKError.d.mts} +1 -1
- package/dist/esm/errors/{SuwardApiError.mjs → SuwardSDKError.mjs} +2 -2
- package/dist/{cjs/errors/SuwardApiTimeoutError.d.ts → esm/errors/SuwardSDKTimeoutError.d.mts} +1 -1
- package/dist/esm/errors/{SuwardApiTimeoutError.mjs → SuwardSDKTimeoutError.mjs} +2 -2
- package/dist/esm/errors/handleNonStatusCodeError.mjs +5 -5
- package/dist/esm/errors/index.d.mts +2 -2
- package/dist/esm/errors/index.mjs +2 -2
- package/dist/esm/index.d.mts +3 -3
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +86 -82
- package/reference.md +771 -0
|
@@ -60,32 +60,43 @@ const headers_js_1 = require("../../../../core/headers.js");
|
|
|
60
60
|
const core = __importStar(require("../../../../core/index.js"));
|
|
61
61
|
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
62
62
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
63
|
-
const
|
|
63
|
+
const SuwardSDK = __importStar(require("../../../index.js"));
|
|
64
64
|
class StaticWalletsClient {
|
|
65
65
|
constructor(options) {
|
|
66
66
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
|
+
* @param {SuwardSDK.GetV1StaticWalletsRequest} request
|
|
69
70
|
* @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
71
|
*
|
|
71
|
-
* @throws {@link
|
|
72
|
+
* @throws {@link SuwardSDK.UnauthorizedError}
|
|
72
73
|
*
|
|
73
74
|
* @example
|
|
74
75
|
* await client.staticWallets.listStaticWallets()
|
|
75
76
|
*/
|
|
76
|
-
listStaticWallets(requestOptions) {
|
|
77
|
-
return core.HttpResponsePromise.fromPromise(this.__listStaticWallets(requestOptions));
|
|
77
|
+
listStaticWallets(request = {}, requestOptions) {
|
|
78
|
+
return core.HttpResponsePromise.fromPromise(this.__listStaticWallets(request, requestOptions));
|
|
78
79
|
}
|
|
79
|
-
__listStaticWallets(
|
|
80
|
-
return __awaiter(this,
|
|
80
|
+
__listStaticWallets() {
|
|
81
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
81
82
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
83
|
+
const { order, limit, lastId } = request;
|
|
84
|
+
const _queryParams = {
|
|
85
|
+
order: order != null ? order : undefined,
|
|
86
|
+
limit,
|
|
87
|
+
lastId,
|
|
88
|
+
};
|
|
82
89
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
83
90
|
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);
|
|
84
91
|
const _response = yield core.fetcher({
|
|
85
92
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "v1/static-wallets"),
|
|
86
93
|
method: "GET",
|
|
87
94
|
headers: _headers,
|
|
88
|
-
queryString: core.url
|
|
95
|
+
queryString: core.url
|
|
96
|
+
.queryBuilder()
|
|
97
|
+
.addMany(_queryParams)
|
|
98
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
99
|
+
.build(),
|
|
89
100
|
timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
|
|
90
101
|
maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
|
|
91
102
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -101,9 +112,9 @@ class StaticWalletsClient {
|
|
|
101
112
|
if (_response.error.reason === "status-code") {
|
|
102
113
|
switch (_response.error.statusCode) {
|
|
103
114
|
case 401:
|
|
104
|
-
throw new
|
|
115
|
+
throw new SuwardSDK.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
105
116
|
default:
|
|
106
|
-
throw new errors.
|
|
117
|
+
throw new errors.SuwardSDKError({
|
|
107
118
|
statusCode: _response.error.statusCode,
|
|
108
119
|
body: _response.error.body,
|
|
109
120
|
rawResponse: _response.rawResponse,
|
|
@@ -116,11 +127,11 @@ class StaticWalletsClient {
|
|
|
116
127
|
/**
|
|
117
128
|
* Create a reusable deposit address with an accepted-asset allow-list
|
|
118
129
|
*
|
|
119
|
-
* @param {
|
|
130
|
+
* @param {SuwardSDK.CryptopayCreateStaticWalletRequest} request
|
|
120
131
|
* @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
121
132
|
*
|
|
122
|
-
* @throws {@link
|
|
123
|
-
* @throws {@link
|
|
133
|
+
* @throws {@link SuwardSDK.BadRequestError}
|
|
134
|
+
* @throws {@link SuwardSDK.UnauthorizedError}
|
|
124
135
|
*
|
|
125
136
|
* @example
|
|
126
137
|
* await client.staticWallets.createStaticWallet()
|
|
@@ -156,11 +167,11 @@ class StaticWalletsClient {
|
|
|
156
167
|
if (_response.error.reason === "status-code") {
|
|
157
168
|
switch (_response.error.statusCode) {
|
|
158
169
|
case 400:
|
|
159
|
-
throw new
|
|
170
|
+
throw new SuwardSDK.BadRequestError(_response.error.body, _response.rawResponse);
|
|
160
171
|
case 401:
|
|
161
|
-
throw new
|
|
172
|
+
throw new SuwardSDK.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
162
173
|
default:
|
|
163
|
-
throw new errors.
|
|
174
|
+
throw new errors.SuwardSDKError({
|
|
164
175
|
statusCode: _response.error.statusCode,
|
|
165
176
|
body: _response.error.body,
|
|
166
177
|
rawResponse: _response.rawResponse,
|
|
@@ -171,10 +182,10 @@ class StaticWalletsClient {
|
|
|
171
182
|
});
|
|
172
183
|
}
|
|
173
184
|
/**
|
|
174
|
-
* @param {
|
|
185
|
+
* @param {SuwardSDK.GetV1StaticWalletsStaticWalletIdRequest} request
|
|
175
186
|
* @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
176
187
|
*
|
|
177
|
-
* @throws {@link
|
|
188
|
+
* @throws {@link SuwardSDK.NotFoundError}
|
|
178
189
|
*
|
|
179
190
|
* @example
|
|
180
191
|
* await client.staticWallets.getStaticWallet({
|
|
@@ -210,9 +221,9 @@ class StaticWalletsClient {
|
|
|
210
221
|
if (_response.error.reason === "status-code") {
|
|
211
222
|
switch (_response.error.statusCode) {
|
|
212
223
|
case 404:
|
|
213
|
-
throw new
|
|
224
|
+
throw new SuwardSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
214
225
|
default:
|
|
215
|
-
throw new errors.
|
|
226
|
+
throw new errors.SuwardSDKError({
|
|
216
227
|
statusCode: _response.error.statusCode,
|
|
217
228
|
body: _response.error.body,
|
|
218
229
|
rawResponse: _response.rawResponse,
|
|
@@ -223,10 +234,10 @@ class StaticWalletsClient {
|
|
|
223
234
|
});
|
|
224
235
|
}
|
|
225
236
|
/**
|
|
226
|
-
* @param {
|
|
237
|
+
* @param {SuwardSDK.DeleteV1StaticWalletsStaticWalletIdRequest} request
|
|
227
238
|
* @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
228
239
|
*
|
|
229
|
-
* @throws {@link
|
|
240
|
+
* @throws {@link SuwardSDK.NotFoundError}
|
|
230
241
|
*
|
|
231
242
|
* @example
|
|
232
243
|
* await client.staticWallets.deleteStaticWallet({
|
|
@@ -259,9 +270,9 @@ class StaticWalletsClient {
|
|
|
259
270
|
if (_response.error.reason === "status-code") {
|
|
260
271
|
switch (_response.error.statusCode) {
|
|
261
272
|
case 404:
|
|
262
|
-
throw new
|
|
273
|
+
throw new SuwardSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
263
274
|
default:
|
|
264
|
-
throw new errors.
|
|
275
|
+
throw new errors.SuwardSDKError({
|
|
265
276
|
statusCode: _response.error.statusCode,
|
|
266
277
|
body: _response.error.body,
|
|
267
278
|
rawResponse: _response.rawResponse,
|
|
@@ -272,10 +283,10 @@ class StaticWalletsClient {
|
|
|
272
283
|
});
|
|
273
284
|
}
|
|
274
285
|
/**
|
|
275
|
-
* @param {
|
|
286
|
+
* @param {SuwardSDK.CryptopayUpdateStaticWalletRequest} request
|
|
276
287
|
* @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
277
288
|
*
|
|
278
|
-
* @throws {@link
|
|
289
|
+
* @throws {@link SuwardSDK.BadRequestError}
|
|
279
290
|
*
|
|
280
291
|
* @example
|
|
281
292
|
* await client.staticWallets.updateStaticWallet({
|
|
@@ -314,9 +325,9 @@ class StaticWalletsClient {
|
|
|
314
325
|
if (_response.error.reason === "status-code") {
|
|
315
326
|
switch (_response.error.statusCode) {
|
|
316
327
|
case 400:
|
|
317
|
-
throw new
|
|
328
|
+
throw new SuwardSDK.BadRequestError(_response.error.body, _response.rawResponse);
|
|
318
329
|
default:
|
|
319
|
-
throw new errors.
|
|
330
|
+
throw new errors.SuwardSDKError({
|
|
320
331
|
statusCode: _response.error.statusCode,
|
|
321
332
|
body: _response.error.body,
|
|
322
333
|
rawResponse: _response.rawResponse,
|
|
@@ -327,10 +338,10 @@ class StaticWalletsClient {
|
|
|
327
338
|
});
|
|
328
339
|
}
|
|
329
340
|
/**
|
|
330
|
-
* @param {
|
|
341
|
+
* @param {SuwardSDK.GetV1StaticWalletsStaticWalletIdDepositsRequest} request
|
|
331
342
|
* @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
332
343
|
*
|
|
333
|
-
* @throws {@link
|
|
344
|
+
* @throws {@link SuwardSDK.NotFoundError}
|
|
334
345
|
*
|
|
335
346
|
* @example
|
|
336
347
|
* await client.staticWallets.listStaticWalletDeposits({
|
|
@@ -343,14 +354,23 @@ class StaticWalletsClient {
|
|
|
343
354
|
__listStaticWalletDeposits(request, requestOptions) {
|
|
344
355
|
return __awaiter(this, void 0, void 0, function* () {
|
|
345
356
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
346
|
-
const { staticWalletId } = request;
|
|
357
|
+
const { staticWalletId, order, limit, lastId } = request;
|
|
358
|
+
const _queryParams = {
|
|
359
|
+
order: order != null ? order : undefined,
|
|
360
|
+
limit,
|
|
361
|
+
lastId,
|
|
362
|
+
};
|
|
347
363
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
348
364
|
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);
|
|
349
365
|
const _response = yield core.fetcher({
|
|
350
366
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `v1/static-wallets/${core.url.encodePathParam(staticWalletId)}/deposits`),
|
|
351
367
|
method: "GET",
|
|
352
368
|
headers: _headers,
|
|
353
|
-
queryString: core.url
|
|
369
|
+
queryString: core.url
|
|
370
|
+
.queryBuilder()
|
|
371
|
+
.addMany(_queryParams)
|
|
372
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
373
|
+
.build(),
|
|
354
374
|
timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
|
|
355
375
|
maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
|
|
356
376
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -366,9 +386,9 @@ class StaticWalletsClient {
|
|
|
366
386
|
if (_response.error.reason === "status-code") {
|
|
367
387
|
switch (_response.error.statusCode) {
|
|
368
388
|
case 404:
|
|
369
|
-
throw new
|
|
389
|
+
throw new SuwardSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
370
390
|
default:
|
|
371
|
-
throw new errors.
|
|
391
|
+
throw new errors.SuwardSDKError({
|
|
372
392
|
statusCode: _response.error.statusCode,
|
|
373
393
|
body: _response.error.body,
|
|
374
394
|
rawResponse: _response.rawResponse,
|
|
@@ -381,11 +401,11 @@ class StaticWalletsClient {
|
|
|
381
401
|
/**
|
|
382
402
|
* Drive a synthetic deposit through its lifecycle on a test wallet (no on-chain activity, no balance credit). Test wallets only.
|
|
383
403
|
*
|
|
384
|
-
* @param {
|
|
404
|
+
* @param {SuwardSDK.CryptopaySimulateStaticDepositRequest} request
|
|
385
405
|
* @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
386
406
|
*
|
|
387
|
-
* @throws {@link
|
|
388
|
-
* @throws {@link
|
|
407
|
+
* @throws {@link SuwardSDK.BadRequestError}
|
|
408
|
+
* @throws {@link SuwardSDK.NotFoundError}
|
|
389
409
|
*
|
|
390
410
|
* @example
|
|
391
411
|
* await client.staticWallets.simulateStaticWalletDeposit({
|
|
@@ -424,11 +444,11 @@ class StaticWalletsClient {
|
|
|
424
444
|
if (_response.error.reason === "status-code") {
|
|
425
445
|
switch (_response.error.statusCode) {
|
|
426
446
|
case 400:
|
|
427
|
-
throw new
|
|
447
|
+
throw new SuwardSDK.BadRequestError(_response.error.body, _response.rawResponse);
|
|
428
448
|
case 404:
|
|
429
|
-
throw new
|
|
449
|
+
throw new SuwardSDK.NotFoundError(_response.error.body, _response.rawResponse);
|
|
430
450
|
default:
|
|
431
|
-
throw new errors.
|
|
451
|
+
throw new errors.SuwardSDKError({
|
|
432
452
|
statusCode: _response.error.statusCode,
|
|
433
453
|
body: _response.error.body,
|
|
434
454
|
rawResponse: _response.rawResponse,
|
package/dist/cjs/api/resources/staticWallets/client/requests/CryptopayCreateStaticWalletRequest.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type * as SuwardSDK from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {}
|
|
4
5
|
*/
|
|
5
6
|
export interface CryptopayCreateStaticWalletRequest {
|
|
6
|
-
allowedAssets?:
|
|
7
|
+
allowedAssets?: SuwardSDK.CryptopayAssetId[];
|
|
7
8
|
externalId?: string;
|
|
8
9
|
isTest?: boolean;
|
|
9
10
|
metadata?: Record<string, unknown>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as SuwardSDK from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -8,8 +9,17 @@ export interface CryptopaySimulateStaticDepositRequest {
|
|
|
8
9
|
/** Static wallet ID */
|
|
9
10
|
staticWalletId: string;
|
|
10
11
|
amount?: string;
|
|
11
|
-
asset?:
|
|
12
|
-
status?:
|
|
12
|
+
asset?: SuwardSDK.CryptopayAssetId;
|
|
13
|
+
status?: CryptopaySimulateStaticDepositRequest.Status;
|
|
13
14
|
transferIndex?: string;
|
|
14
15
|
txHash?: string;
|
|
15
16
|
}
|
|
17
|
+
export declare namespace CryptopaySimulateStaticDepositRequest {
|
|
18
|
+
const Status: {
|
|
19
|
+
readonly Detected: "detected";
|
|
20
|
+
readonly Accepted: "accepted";
|
|
21
|
+
readonly Confirmed: "confirmed";
|
|
22
|
+
readonly Invalidated: "invalidated";
|
|
23
|
+
};
|
|
24
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
25
|
+
}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CryptopaySimulateStaticDepositRequest = void 0;
|
|
5
|
+
var CryptopaySimulateStaticDepositRequest;
|
|
6
|
+
(function (CryptopaySimulateStaticDepositRequest) {
|
|
7
|
+
CryptopaySimulateStaticDepositRequest.Status = {
|
|
8
|
+
Detected: "detected",
|
|
9
|
+
Accepted: "accepted",
|
|
10
|
+
Confirmed: "confirmed",
|
|
11
|
+
Invalidated: "invalidated",
|
|
12
|
+
};
|
|
13
|
+
})(CryptopaySimulateStaticDepositRequest || (exports.CryptopaySimulateStaticDepositRequest = CryptopaySimulateStaticDepositRequest = {}));
|
package/dist/cjs/api/resources/staticWallets/client/requests/CryptopayUpdateStaticWalletRequest.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as SuwardSDK from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
export interface CryptopayUpdateStaticWalletRequest {
|
|
8
9
|
/** Static wallet ID */
|
|
9
10
|
staticWalletId: string;
|
|
10
|
-
allowedAssets?:
|
|
11
|
+
allowedAssets?: SuwardSDK.CryptopayAssetId[];
|
|
11
12
|
metadata?: Record<string, unknown>;
|
|
12
13
|
webhookUrl?: string;
|
|
13
14
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as SuwardSDK from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {}
|
|
5
|
+
*/
|
|
6
|
+
export interface GetV1StaticWalletsRequest {
|
|
7
|
+
/** Sort order (asc/desc) */
|
|
8
|
+
order?: SuwardSDK.GetV1StaticWalletsRequestOrder;
|
|
9
|
+
/** Limit (default 20, max 100) */
|
|
10
|
+
limit?: number;
|
|
11
|
+
/** Last ID for pagination */
|
|
12
|
+
lastId?: string;
|
|
13
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as SuwardSDK from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {
|
|
@@ -7,4 +8,10 @@
|
|
|
7
8
|
export interface GetV1StaticWalletsStaticWalletIdDepositsRequest {
|
|
8
9
|
/** Static wallet ID */
|
|
9
10
|
staticWalletId: string;
|
|
11
|
+
/** Sort order (asc/desc) */
|
|
12
|
+
order?: SuwardSDK.GetV1StaticWalletsStaticWalletIdDepositsRequestOrder;
|
|
13
|
+
/** Limit (default 20, max 100) */
|
|
14
|
+
limit?: number;
|
|
15
|
+
/** Last ID for pagination */
|
|
16
|
+
lastId?: string;
|
|
10
17
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export type { CryptopayCreateStaticWalletRequest } from "./CryptopayCreateStaticWalletRequest.js";
|
|
2
|
-
export
|
|
2
|
+
export { CryptopaySimulateStaticDepositRequest } from "./CryptopaySimulateStaticDepositRequest.js";
|
|
3
3
|
export type { CryptopayUpdateStaticWalletRequest } from "./CryptopayUpdateStaticWalletRequest.js";
|
|
4
4
|
export type { DeleteV1StaticWalletsStaticWalletIdRequest } from "./DeleteV1StaticWalletsStaticWalletIdRequest.js";
|
|
5
|
+
export type { GetV1StaticWalletsRequest } from "./GetV1StaticWalletsRequest.js";
|
|
5
6
|
export type { GetV1StaticWalletsStaticWalletIdDepositsRequest } from "./GetV1StaticWalletsStaticWalletIdDepositsRequest.js";
|
|
6
7
|
export type { GetV1StaticWalletsStaticWalletIdRequest } from "./GetV1StaticWalletsStaticWalletIdRequest.js";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CryptopaySimulateStaticDepositRequest = void 0;
|
|
4
|
+
var CryptopaySimulateStaticDepositRequest_js_1 = require("./CryptopaySimulateStaticDepositRequest.js");
|
|
5
|
+
Object.defineProperty(exports, "CryptopaySimulateStaticDepositRequest", { enumerable: true, get: function () { return CryptopaySimulateStaticDepositRequest_js_1.CryptopaySimulateStaticDepositRequest; } });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.GetV1StaticWalletsRequestOrder = void 0;
|
|
5
|
+
exports.GetV1StaticWalletsRequestOrder = {
|
|
6
|
+
Asc: "asc",
|
|
7
|
+
Desc: "desc",
|
|
8
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const GetV1StaticWalletsStaticWalletIdDepositsRequestOrder: {
|
|
2
|
+
readonly Asc: "asc";
|
|
3
|
+
readonly Desc: "desc";
|
|
4
|
+
};
|
|
5
|
+
export type GetV1StaticWalletsStaticWalletIdDepositsRequestOrder = (typeof GetV1StaticWalletsStaticWalletIdDepositsRequestOrder)[keyof typeof GetV1StaticWalletsStaticWalletIdDepositsRequestOrder];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.GetV1StaticWalletsStaticWalletIdDepositsRequestOrder = void 0;
|
|
5
|
+
exports.GetV1StaticWalletsStaticWalletIdDepositsRequestOrder = {
|
|
6
|
+
Asc: "asc",
|
|
7
|
+
Desc: "desc",
|
|
8
|
+
};
|
|
@@ -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("./GetV1StaticWalletsRequestOrder.js"), exports);
|
|
18
|
+
__exportStar(require("./GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.js"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Asset id-string (see GET /v1/assets), e.g. USDT_ETHEREUM. */
|
|
2
|
+
export declare const CryptopayAssetId: {
|
|
3
|
+
readonly UsdtEthereum: "USDT_ETHEREUM";
|
|
4
|
+
readonly UsdtArbitrum: "USDT_ARBITRUM";
|
|
5
|
+
readonly UsdtOptimism: "USDT_OPTIMISM";
|
|
6
|
+
readonly UsdtBase: "USDT_BASE";
|
|
7
|
+
readonly UsdtBsc: "USDT_BSC";
|
|
8
|
+
readonly UsdtPlasma: "USDT_PLASMA";
|
|
9
|
+
readonly UsdtPolygon: "USDT_POLYGON";
|
|
10
|
+
readonly UsdcEthereum: "USDC_ETHEREUM";
|
|
11
|
+
readonly UsdcArbitrum: "USDC_ARBITRUM";
|
|
12
|
+
readonly UsdCeArbitrum: "USDCE_ARBITRUM";
|
|
13
|
+
readonly UsdcOptimism: "USDC_OPTIMISM";
|
|
14
|
+
readonly UsdcBase: "USDC_BASE";
|
|
15
|
+
readonly UsdcBsc: "USDC_BSC";
|
|
16
|
+
readonly UsdcPlasma: "USDC_PLASMA";
|
|
17
|
+
readonly UsdcPolygon: "USDC_POLYGON";
|
|
18
|
+
readonly EthEthereum: "ETH_ETHEREUM";
|
|
19
|
+
readonly EthArbitrum: "ETH_ARBITRUM";
|
|
20
|
+
readonly EthOptimism: "ETH_OPTIMISM";
|
|
21
|
+
readonly EthBase: "ETH_BASE";
|
|
22
|
+
readonly XplPlasma: "XPL_PLASMA";
|
|
23
|
+
readonly BnbBsc: "BNB_BSC";
|
|
24
|
+
readonly PolPolygon: "POL_POLYGON";
|
|
25
|
+
readonly TestcoinEthereum: "TESTCOIN_ETHEREUM";
|
|
26
|
+
readonly TestcoinOptimism: "TESTCOIN_OPTIMISM";
|
|
27
|
+
readonly TestcoinPlasma: "TESTCOIN_PLASMA";
|
|
28
|
+
readonly TeststablecoinEthereum: "TESTSTABLECOIN_ETHEREUM";
|
|
29
|
+
readonly TeststablecoinOptimism: "TESTSTABLECOIN_OPTIMISM";
|
|
30
|
+
readonly TeststablecoinPlasma: "TESTSTABLECOIN_PLASMA";
|
|
31
|
+
};
|
|
32
|
+
export type CryptopayAssetId = (typeof CryptopayAssetId)[keyof typeof CryptopayAssetId];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CryptopayAssetId = void 0;
|
|
5
|
+
/** Asset id-string (see GET /v1/assets), e.g. USDT_ETHEREUM. */
|
|
6
|
+
exports.CryptopayAssetId = {
|
|
7
|
+
UsdtEthereum: "USDT_ETHEREUM",
|
|
8
|
+
UsdtArbitrum: "USDT_ARBITRUM",
|
|
9
|
+
UsdtOptimism: "USDT_OPTIMISM",
|
|
10
|
+
UsdtBase: "USDT_BASE",
|
|
11
|
+
UsdtBsc: "USDT_BSC",
|
|
12
|
+
UsdtPlasma: "USDT_PLASMA",
|
|
13
|
+
UsdtPolygon: "USDT_POLYGON",
|
|
14
|
+
UsdcEthereum: "USDC_ETHEREUM",
|
|
15
|
+
UsdcArbitrum: "USDC_ARBITRUM",
|
|
16
|
+
UsdCeArbitrum: "USDCE_ARBITRUM",
|
|
17
|
+
UsdcOptimism: "USDC_OPTIMISM",
|
|
18
|
+
UsdcBase: "USDC_BASE",
|
|
19
|
+
UsdcBsc: "USDC_BSC",
|
|
20
|
+
UsdcPlasma: "USDC_PLASMA",
|
|
21
|
+
UsdcPolygon: "USDC_POLYGON",
|
|
22
|
+
EthEthereum: "ETH_ETHEREUM",
|
|
23
|
+
EthArbitrum: "ETH_ARBITRUM",
|
|
24
|
+
EthOptimism: "ETH_OPTIMISM",
|
|
25
|
+
EthBase: "ETH_BASE",
|
|
26
|
+
XplPlasma: "XPL_PLASMA",
|
|
27
|
+
BnbBsc: "BNB_BSC",
|
|
28
|
+
PolPolygon: "POL_POLYGON",
|
|
29
|
+
TestcoinEthereum: "TESTCOIN_ETHEREUM",
|
|
30
|
+
TestcoinOptimism: "TESTCOIN_OPTIMISM",
|
|
31
|
+
TestcoinPlasma: "TESTCOIN_PLASMA",
|
|
32
|
+
TeststablecoinEthereum: "TESTSTABLECOIN_ETHEREUM",
|
|
33
|
+
TeststablecoinOptimism: "TESTSTABLECOIN_OPTIMISM",
|
|
34
|
+
TeststablecoinPlasma: "TESTSTABLECOIN_PLASMA",
|
|
35
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as
|
|
1
|
+
import type * as SuwardSDK from "../index.js";
|
|
2
2
|
export interface CryptopayListPaymentsResponse {
|
|
3
3
|
hasMore?: boolean | undefined;
|
|
4
|
-
items?:
|
|
4
|
+
items?: SuwardSDK.CryptopayPaymentResponse[] | undefined;
|
|
5
5
|
lastId?: string | undefined;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as
|
|
1
|
+
import type * as SuwardSDK from "../index.js";
|
|
2
2
|
export interface CryptopayListStaticDepositsResponse {
|
|
3
3
|
hasMore?: boolean | undefined;
|
|
4
|
-
items?:
|
|
4
|
+
items?: SuwardSDK.CryptopayStaticDepositResponse[] | undefined;
|
|
5
5
|
lastId?: string | undefined;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as
|
|
1
|
+
import type * as SuwardSDK from "../index.js";
|
|
2
2
|
export interface CryptopayListStaticWalletsResponse {
|
|
3
3
|
hasMore?: boolean | undefined;
|
|
4
|
-
items?:
|
|
4
|
+
items?: SuwardSDK.CryptopayStaticWalletResponse[] | undefined;
|
|
5
5
|
lastId?: string | undefined;
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type * as
|
|
1
|
+
import type * as SuwardSDK from "../index.js";
|
|
2
2
|
export interface CryptopayPaymentResponse {
|
|
3
3
|
acceptedAt?: number | undefined;
|
|
4
4
|
activatedAt?: number | undefined;
|
|
@@ -7,7 +7,7 @@ export interface CryptopayPaymentResponse {
|
|
|
7
7
|
amount?: string | undefined;
|
|
8
8
|
amountConfirmed?: string | undefined;
|
|
9
9
|
amountReceived?: string | undefined;
|
|
10
|
-
asset?:
|
|
10
|
+
asset?: SuwardSDK.CryptopayAssetId | undefined;
|
|
11
11
|
createdAt?: number | undefined;
|
|
12
12
|
expiresAt?: number | undefined;
|
|
13
13
|
externalId?: string | undefined;
|
|
@@ -18,10 +18,10 @@ export interface CryptopayPaymentResponse {
|
|
|
18
18
|
networkFee?: string | undefined;
|
|
19
19
|
paymentWindowSeconds?: number | undefined;
|
|
20
20
|
projectId?: string | undefined;
|
|
21
|
-
redirect?:
|
|
22
|
-
status?:
|
|
23
|
-
subStatus?:
|
|
24
|
-
transactions?:
|
|
21
|
+
redirect?: SuwardSDK.CryptopayRedirectConfigDto | undefined;
|
|
22
|
+
status?: SuwardSDK.CryptopayPaymentStatusEnum | undefined;
|
|
23
|
+
subStatus?: SuwardSDK.CryptopayPaymentSubStatusEnum | undefined;
|
|
24
|
+
transactions?: SuwardSDK.CryptopayTransactionResponse[] | undefined;
|
|
25
25
|
underpaymentTolerance?: string | undefined;
|
|
26
26
|
updatedAt?: number | undefined;
|
|
27
27
|
webhookUrl?: string | undefined;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type * as
|
|
1
|
+
import type * as SuwardSDK from "../index.js";
|
|
2
2
|
export interface CryptopayPublicPaymentResponse {
|
|
3
3
|
activatedAt?: number | undefined;
|
|
4
4
|
activationFlowSeconds?: number | undefined;
|
|
5
5
|
address?: string | undefined;
|
|
6
6
|
amount?: string | undefined;
|
|
7
7
|
amountReceived?: string | undefined;
|
|
8
|
-
asset?:
|
|
8
|
+
asset?: SuwardSDK.CryptopayAssetId | undefined;
|
|
9
9
|
createdAt?: number | undefined;
|
|
10
10
|
expiresAt?: number | undefined;
|
|
11
11
|
id?: string | undefined;
|
|
12
12
|
paymentWindowSeconds?: number | undefined;
|
|
13
|
-
redirect?:
|
|
14
|
-
status?:
|
|
15
|
-
subStatus?:
|
|
13
|
+
redirect?: SuwardSDK.CryptopayPublicRedirect | undefined;
|
|
14
|
+
status?: SuwardSDK.CryptopayPaymentStatusEnum | undefined;
|
|
15
|
+
subStatus?: SuwardSDK.CryptopayPaymentSubStatusEnum | undefined;
|
|
16
16
|
underpaymentTolerance?: string | undefined;
|
|
17
17
|
updatedAt?: number | undefined;
|
|
18
18
|
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export interface CryptopayRedirectConfigDto {
|
|
2
2
|
data?: string | undefined;
|
|
3
|
-
params?:
|
|
3
|
+
params?: CryptopayRedirectConfigDto.Params.Item[] | undefined;
|
|
4
4
|
url?: string | undefined;
|
|
5
5
|
}
|
|
6
|
+
export declare namespace CryptopayRedirectConfigDto {
|
|
7
|
+
type Params = Params.Item[];
|
|
8
|
+
namespace Params {
|
|
9
|
+
const Item: {
|
|
10
|
+
readonly Id: "id";
|
|
11
|
+
readonly ExternalId: "externalId";
|
|
12
|
+
};
|
|
13
|
+
type Item = (typeof Item)[keyof typeof Item];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CryptopayRedirectConfigDto = void 0;
|
|
5
|
+
var CryptopayRedirectConfigDto;
|
|
6
|
+
(function (CryptopayRedirectConfigDto) {
|
|
7
|
+
let Params;
|
|
8
|
+
(function (Params) {
|
|
9
|
+
Params.Item = {
|
|
10
|
+
Id: "id",
|
|
11
|
+
ExternalId: "externalId",
|
|
12
|
+
};
|
|
13
|
+
})(Params = CryptopayRedirectConfigDto.Params || (CryptopayRedirectConfigDto.Params = {}));
|
|
14
|
+
})(CryptopayRedirectConfigDto || (exports.CryptopayRedirectConfigDto = CryptopayRedirectConfigDto = {}));
|