pkg-sdk-test 0.0.15 → 0.0.17
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 +14 -1
- package/dist/cjs/BaseClient.d.ts +2 -1
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +1 -1
- package/dist/cjs/Client.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 +16 -1
- package/dist/cjs/api/resources/payments/client/Client.js +82 -28
- package/dist/cjs/api/resources/payments/client/requests/CryptopayCreatePaymentRequest.d.ts +1 -1
- 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/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 +3 -2
- package/dist/cjs/api/resources/staticWallets/client/Client.js +64 -43
- 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/CryptopayPaymentResponse.d.ts +1 -1
- package/dist/cjs/api/types/CryptopayPublicPaymentResponse.d.ts +1 -1
- 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/environments.d.ts +4 -0
- package/dist/cjs/environments.js +7 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +2 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +1 -1
- package/dist/esm/Client.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 +16 -1
- package/dist/esm/api/resources/payments/client/Client.mjs +82 -28
- package/dist/esm/api/resources/payments/client/requests/CryptopayCreatePaymentRequest.d.mts +1 -1
- 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/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 +3 -2
- package/dist/esm/api/resources/staticWallets/client/Client.mjs +64 -43
- 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/CryptopayPaymentResponse.d.mts +1 -1
- package/dist/esm/api/types/CryptopayPublicPaymentResponse.d.mts +1 -1
- 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/environments.d.mts +4 -0
- package/dist/esm/environments.mjs +4 -0
- package/dist/esm/index.d.mts +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +74 -1
|
@@ -22,14 +22,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
23
23
|
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
24
24
|
import * as core from "../../../../core/index.mjs";
|
|
25
|
+
import * as environments from "../../../../environments.mjs";
|
|
25
26
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
26
27
|
import * as errors from "../../../../errors/index.mjs";
|
|
27
28
|
import * as SuwardSDK from "../../../index.mjs";
|
|
28
29
|
export class StaticWalletsClient {
|
|
29
|
-
constructor(options) {
|
|
30
|
+
constructor(options = {}) {
|
|
30
31
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
34
|
+
* @param {SuwardSDK.GetV1StaticWalletsRequest} request
|
|
33
35
|
* @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
36
|
*
|
|
35
37
|
* @throws {@link SuwardSDK.UnauthorizedError}
|
|
@@ -37,23 +39,33 @@ export class StaticWalletsClient {
|
|
|
37
39
|
* @example
|
|
38
40
|
* await client.staticWallets.listStaticWallets()
|
|
39
41
|
*/
|
|
40
|
-
listStaticWallets(requestOptions) {
|
|
41
|
-
return core.HttpResponsePromise.fromPromise(this.__listStaticWallets(requestOptions));
|
|
42
|
+
listStaticWallets(request = {}, requestOptions) {
|
|
43
|
+
return core.HttpResponsePromise.fromPromise(this.__listStaticWallets(request, requestOptions));
|
|
42
44
|
}
|
|
43
|
-
__listStaticWallets(
|
|
44
|
-
return __awaiter(this,
|
|
45
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
45
|
+
__listStaticWallets() {
|
|
46
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
47
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
48
|
+
const { order, limit, lastId } = request;
|
|
49
|
+
const _queryParams = {
|
|
50
|
+
order: order != null ? order : undefined,
|
|
51
|
+
limit,
|
|
52
|
+
lastId,
|
|
53
|
+
};
|
|
46
54
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
47
55
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
48
56
|
const _response = yield core.fetcher({
|
|
49
|
-
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"),
|
|
57
|
+
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.SuwardSDKEnvironment.Default, "v1/static-wallets"),
|
|
50
58
|
method: "GET",
|
|
51
59
|
headers: _headers,
|
|
52
|
-
queryString: core.url
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
queryString: core.url
|
|
61
|
+
.queryBuilder()
|
|
62
|
+
.addMany(_queryParams)
|
|
63
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
64
|
+
.build(),
|
|
65
|
+
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,
|
|
66
|
+
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,
|
|
55
67
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
56
|
-
fetchFn: (
|
|
68
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
57
69
|
logging: this._options.logging,
|
|
58
70
|
});
|
|
59
71
|
if (_response.ok) {
|
|
@@ -94,21 +106,21 @@ export class StaticWalletsClient {
|
|
|
94
106
|
}
|
|
95
107
|
__createStaticWallet() {
|
|
96
108
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
97
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
109
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
98
110
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
99
111
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
100
112
|
const _response = yield core.fetcher({
|
|
101
|
-
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"),
|
|
113
|
+
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.SuwardSDKEnvironment.Default, "v1/static-wallets"),
|
|
102
114
|
method: "POST",
|
|
103
115
|
headers: _headers,
|
|
104
116
|
contentType: "application/json",
|
|
105
117
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
106
118
|
requestType: "json",
|
|
107
119
|
body: request,
|
|
108
|
-
timeoutMs: ((
|
|
109
|
-
maxRetries: (
|
|
120
|
+
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,
|
|
121
|
+
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,
|
|
110
122
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
111
|
-
fetchFn: (
|
|
123
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
112
124
|
logging: this._options.logging,
|
|
113
125
|
});
|
|
114
126
|
if (_response.ok) {
|
|
@@ -150,19 +162,19 @@ export class StaticWalletsClient {
|
|
|
150
162
|
}
|
|
151
163
|
__getStaticWallet(request, requestOptions) {
|
|
152
164
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
165
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
154
166
|
const { staticWalletId } = request;
|
|
155
167
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
156
168
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
157
169
|
const _response = yield core.fetcher({
|
|
158
|
-
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)}`),
|
|
170
|
+
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.SuwardSDKEnvironment.Default, `v1/static-wallets/${core.url.encodePathParam(staticWalletId)}`),
|
|
159
171
|
method: "GET",
|
|
160
172
|
headers: _headers,
|
|
161
173
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
162
|
-
timeoutMs: ((
|
|
163
|
-
maxRetries: (
|
|
174
|
+
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,
|
|
175
|
+
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,
|
|
164
176
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
165
|
-
fetchFn: (
|
|
177
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
166
178
|
logging: this._options.logging,
|
|
167
179
|
});
|
|
168
180
|
if (_response.ok) {
|
|
@@ -202,19 +214,19 @@ export class StaticWalletsClient {
|
|
|
202
214
|
}
|
|
203
215
|
__deleteStaticWallet(request, requestOptions) {
|
|
204
216
|
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
217
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
206
218
|
const { staticWalletId } = request;
|
|
207
219
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
208
220
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
209
221
|
const _response = yield core.fetcher({
|
|
210
|
-
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)}`),
|
|
222
|
+
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.SuwardSDKEnvironment.Default, `v1/static-wallets/${core.url.encodePathParam(staticWalletId)}`),
|
|
211
223
|
method: "DELETE",
|
|
212
224
|
headers: _headers,
|
|
213
225
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
214
|
-
timeoutMs: ((
|
|
215
|
-
maxRetries: (
|
|
226
|
+
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,
|
|
227
|
+
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,
|
|
216
228
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
217
|
-
fetchFn: (
|
|
229
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
218
230
|
logging: this._options.logging,
|
|
219
231
|
});
|
|
220
232
|
if (_response.ok) {
|
|
@@ -251,22 +263,22 @@ export class StaticWalletsClient {
|
|
|
251
263
|
}
|
|
252
264
|
__updateStaticWallet(request, requestOptions) {
|
|
253
265
|
return __awaiter(this, void 0, void 0, function* () {
|
|
254
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
266
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
255
267
|
const { staticWalletId } = request, _body = __rest(request, ["staticWalletId"]);
|
|
256
268
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
257
269
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
258
270
|
const _response = yield core.fetcher({
|
|
259
|
-
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)}`),
|
|
271
|
+
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.SuwardSDKEnvironment.Default, `v1/static-wallets/${core.url.encodePathParam(staticWalletId)}`),
|
|
260
272
|
method: "PATCH",
|
|
261
273
|
headers: _headers,
|
|
262
274
|
contentType: "application/json",
|
|
263
275
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
264
276
|
requestType: "json",
|
|
265
277
|
body: _body,
|
|
266
|
-
timeoutMs: ((
|
|
267
|
-
maxRetries: (
|
|
278
|
+
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,
|
|
279
|
+
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,
|
|
268
280
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
269
|
-
fetchFn: (
|
|
281
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
270
282
|
logging: this._options.logging,
|
|
271
283
|
});
|
|
272
284
|
if (_response.ok) {
|
|
@@ -306,19 +318,28 @@ export class StaticWalletsClient {
|
|
|
306
318
|
}
|
|
307
319
|
__listStaticWalletDeposits(request, requestOptions) {
|
|
308
320
|
return __awaiter(this, void 0, void 0, function* () {
|
|
309
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
310
|
-
const { staticWalletId } = request;
|
|
321
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
322
|
+
const { staticWalletId, order, limit, lastId } = request;
|
|
323
|
+
const _queryParams = {
|
|
324
|
+
order: order != null ? order : undefined,
|
|
325
|
+
limit,
|
|
326
|
+
lastId,
|
|
327
|
+
};
|
|
311
328
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
312
329
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
313
330
|
const _response = yield core.fetcher({
|
|
314
|
-
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`),
|
|
331
|
+
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.SuwardSDKEnvironment.Default, `v1/static-wallets/${core.url.encodePathParam(staticWalletId)}/deposits`),
|
|
315
332
|
method: "GET",
|
|
316
333
|
headers: _headers,
|
|
317
|
-
queryString: core.url
|
|
318
|
-
|
|
319
|
-
|
|
334
|
+
queryString: core.url
|
|
335
|
+
.queryBuilder()
|
|
336
|
+
.addMany(_queryParams)
|
|
337
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
338
|
+
.build(),
|
|
339
|
+
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,
|
|
340
|
+
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,
|
|
320
341
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
321
|
-
fetchFn: (
|
|
342
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
322
343
|
logging: this._options.logging,
|
|
323
344
|
});
|
|
324
345
|
if (_response.ok) {
|
|
@@ -361,22 +382,22 @@ export class StaticWalletsClient {
|
|
|
361
382
|
}
|
|
362
383
|
__simulateStaticWalletDeposit(request, requestOptions) {
|
|
363
384
|
return __awaiter(this, void 0, void 0, function* () {
|
|
364
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
385
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
365
386
|
const { staticWalletId } = request, _body = __rest(request, ["staticWalletId"]);
|
|
366
387
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
367
388
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
368
389
|
const _response = yield core.fetcher({
|
|
369
|
-
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)}/simulate`),
|
|
390
|
+
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.SuwardSDKEnvironment.Default, `v1/static-wallets/${core.url.encodePathParam(staticWalletId)}/simulate`),
|
|
370
391
|
method: "POST",
|
|
371
392
|
headers: _headers,
|
|
372
393
|
contentType: "application/json",
|
|
373
394
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
374
395
|
requestType: "json",
|
|
375
396
|
body: _body,
|
|
376
|
-
timeoutMs: ((
|
|
377
|
-
maxRetries: (
|
|
397
|
+
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,
|
|
398
|
+
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,
|
|
378
399
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
379
|
-
fetchFn: (
|
|
400
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
380
401
|
logging: this._options.logging,
|
|
381
402
|
});
|
|
382
403
|
if (_response.ok) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type * as SuwardSDK from "../../../../index.mjs";
|
|
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.mjs";
|
|
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,2 +1,10 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
2
|
+
export var CryptopaySimulateStaticDepositRequest;
|
|
3
|
+
(function (CryptopaySimulateStaticDepositRequest) {
|
|
4
|
+
CryptopaySimulateStaticDepositRequest.Status = {
|
|
5
|
+
Detected: "detected",
|
|
6
|
+
Accepted: "accepted",
|
|
7
|
+
Confirmed: "confirmed",
|
|
8
|
+
Invalidated: "invalidated",
|
|
9
|
+
};
|
|
10
|
+
})(CryptopaySimulateStaticDepositRequest || (CryptopaySimulateStaticDepositRequest = {}));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as SuwardSDK from "../../../../index.mjs";
|
|
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.mjs";
|
|
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.mjs";
|
|
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.mjs";
|
|
2
|
-
export
|
|
2
|
+
export { CryptopaySimulateStaticDepositRequest } from "./CryptopaySimulateStaticDepositRequest.mjs";
|
|
3
3
|
export type { CryptopayUpdateStaticWalletRequest } from "./CryptopayUpdateStaticWalletRequest.mjs";
|
|
4
4
|
export type { DeleteV1StaticWalletsStaticWalletIdRequest } from "./DeleteV1StaticWalletsStaticWalletIdRequest.mjs";
|
|
5
|
+
export type { GetV1StaticWalletsRequest } from "./GetV1StaticWalletsRequest.mjs";
|
|
5
6
|
export type { GetV1StaticWalletsStaticWalletIdDepositsRequest } from "./GetV1StaticWalletsStaticWalletIdDepositsRequest.mjs";
|
|
6
7
|
export type { GetV1StaticWalletsStaticWalletIdRequest } from "./GetV1StaticWalletsStaticWalletIdRequest.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { CryptopaySimulateStaticDepositRequest } from "./CryptopaySimulateStaticDepositRequest.mjs";
|
|
@@ -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,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,32 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
/** Asset id-string (see GET /v1/assets), e.g. USDT_ETHEREUM. */
|
|
3
|
+
export const CryptopayAssetId = {
|
|
4
|
+
UsdtEthereum: "USDT_ETHEREUM",
|
|
5
|
+
UsdtArbitrum: "USDT_ARBITRUM",
|
|
6
|
+
UsdtOptimism: "USDT_OPTIMISM",
|
|
7
|
+
UsdtBase: "USDT_BASE",
|
|
8
|
+
UsdtBsc: "USDT_BSC",
|
|
9
|
+
UsdtPlasma: "USDT_PLASMA",
|
|
10
|
+
UsdtPolygon: "USDT_POLYGON",
|
|
11
|
+
UsdcEthereum: "USDC_ETHEREUM",
|
|
12
|
+
UsdcArbitrum: "USDC_ARBITRUM",
|
|
13
|
+
UsdCeArbitrum: "USDCE_ARBITRUM",
|
|
14
|
+
UsdcOptimism: "USDC_OPTIMISM",
|
|
15
|
+
UsdcBase: "USDC_BASE",
|
|
16
|
+
UsdcBsc: "USDC_BSC",
|
|
17
|
+
UsdcPlasma: "USDC_PLASMA",
|
|
18
|
+
UsdcPolygon: "USDC_POLYGON",
|
|
19
|
+
EthEthereum: "ETH_ETHEREUM",
|
|
20
|
+
EthArbitrum: "ETH_ARBITRUM",
|
|
21
|
+
EthOptimism: "ETH_OPTIMISM",
|
|
22
|
+
EthBase: "ETH_BASE",
|
|
23
|
+
XplPlasma: "XPL_PLASMA",
|
|
24
|
+
BnbBsc: "BNB_BSC",
|
|
25
|
+
PolPolygon: "POL_POLYGON",
|
|
26
|
+
TestcoinEthereum: "TESTCOIN_ETHEREUM",
|
|
27
|
+
TestcoinOptimism: "TESTCOIN_OPTIMISM",
|
|
28
|
+
TestcoinPlasma: "TESTCOIN_PLASMA",
|
|
29
|
+
TeststablecoinEthereum: "TESTSTABLECOIN_ETHEREUM",
|
|
30
|
+
TeststablecoinOptimism: "TESTSTABLECOIN_OPTIMISM",
|
|
31
|
+
TeststablecoinPlasma: "TESTSTABLECOIN_PLASMA",
|
|
32
|
+
};
|
|
@@ -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;
|
|
@@ -5,7 +5,7 @@ export interface CryptopayPublicPaymentResponse {
|
|
|
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;
|
|
@@ -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,2 +1,11 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
2
|
+
export var CryptopayRedirectConfigDto;
|
|
3
|
+
(function (CryptopayRedirectConfigDto) {
|
|
4
|
+
let Params;
|
|
5
|
+
(function (Params) {
|
|
6
|
+
Params.Item = {
|
|
7
|
+
Id: "id",
|
|
8
|
+
ExternalId: "externalId",
|
|
9
|
+
};
|
|
10
|
+
})(Params = CryptopayRedirectConfigDto.Params || (CryptopayRedirectConfigDto.Params = {}));
|
|
11
|
+
})(CryptopayRedirectConfigDto || (CryptopayRedirectConfigDto = {}));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type * as SuwardSDK from "../index.mjs";
|
|
1
2
|
export interface CryptopayStaticDepositResponse {
|
|
2
3
|
acceptedAt?: number | undefined;
|
|
3
4
|
address?: string | undefined;
|
|
4
5
|
amount?: string | undefined;
|
|
5
|
-
asset?:
|
|
6
|
+
asset?: SuwardSDK.CryptopayAssetId | undefined;
|
|
6
7
|
confirmedAt?: number | undefined;
|
|
7
8
|
createdAt?: number | undefined;
|
|
8
9
|
detectedAt?: number | undefined;
|
|
@@ -13,8 +14,18 @@ export interface CryptopayStaticDepositResponse {
|
|
|
13
14
|
networkFee?: string | undefined;
|
|
14
15
|
projectId?: string | undefined;
|
|
15
16
|
staticWalletId?: string | undefined;
|
|
16
|
-
status?:
|
|
17
|
+
status?: CryptopayStaticDepositResponse.Status | undefined;
|
|
17
18
|
transferIndex?: string | undefined;
|
|
18
19
|
txHash?: string | undefined;
|
|
19
20
|
updatedAt?: number | undefined;
|
|
20
21
|
}
|
|
22
|
+
export declare namespace CryptopayStaticDepositResponse {
|
|
23
|
+
const Status: {
|
|
24
|
+
readonly Detected: "detected";
|
|
25
|
+
readonly Accepted: "accepted";
|
|
26
|
+
readonly Confirmed: "confirmed";
|
|
27
|
+
readonly Ignored: "ignored";
|
|
28
|
+
readonly Invalidated: "invalidated";
|
|
29
|
+
};
|
|
30
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
31
|
+
}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
2
|
+
export var CryptopayStaticDepositResponse;
|
|
3
|
+
(function (CryptopayStaticDepositResponse) {
|
|
4
|
+
CryptopayStaticDepositResponse.Status = {
|
|
5
|
+
Detected: "detected",
|
|
6
|
+
Accepted: "accepted",
|
|
7
|
+
Confirmed: "confirmed",
|
|
8
|
+
Ignored: "ignored",
|
|
9
|
+
Invalidated: "invalidated",
|
|
10
|
+
};
|
|
11
|
+
})(CryptopayStaticDepositResponse || (CryptopayStaticDepositResponse = {}));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type * as SuwardSDK from "../index.mjs";
|
|
1
2
|
export interface CryptopayStaticWalletResponse {
|
|
2
3
|
address?: string | undefined;
|
|
3
|
-
allowedAssets?:
|
|
4
|
+
allowedAssets?: SuwardSDK.CryptopayAssetId[] | undefined;
|
|
4
5
|
createdAt?: number | undefined;
|
|
5
6
|
externalId?: string | undefined;
|
|
6
7
|
id?: string | undefined;
|
|
@@ -13,7 +13,7 @@ export declare namespace HeaderAuthProvider {
|
|
|
13
13
|
const AUTH_CONFIG_ERROR_MESSAGE: string;
|
|
14
14
|
type Options = AuthOptions;
|
|
15
15
|
type AuthOptions = {
|
|
16
|
-
[PARAM_KEY]
|
|
16
|
+
[PARAM_KEY]?: core.Supplier<string>;
|
|
17
17
|
};
|
|
18
18
|
function createInstance(options: Options): core.AuthProvider;
|
|
19
19
|
}
|
package/dist/esm/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * as SuwardSDK from "./api/index.mjs";
|
|
2
2
|
export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
|
|
3
3
|
export { SuwardSDKClient } from "./Client.mjs";
|
|
4
|
+
export { SuwardSDKEnvironment } from "./environments.mjs";
|
|
4
5
|
export { SuwardSDKError, SuwardSDKTimeoutError } from "./errors/index.mjs";
|
|
5
6
|
export * from "./exports.mjs";
|