pkg-sdk-test 0.0.15 → 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.
Files changed (96) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/index.d.ts +1 -0
  3. package/dist/cjs/api/resources/index.js +1 -0
  4. package/dist/cjs/api/resources/payments/client/Client.d.ts +15 -0
  5. package/dist/cjs/api/resources/payments/client/Client.js +55 -2
  6. package/dist/cjs/api/resources/payments/client/requests/CryptopayCreatePaymentRequest.d.ts +1 -1
  7. package/dist/cjs/api/resources/payments/client/requests/GetV1PaymentsRequest.d.ts +3 -2
  8. package/dist/cjs/api/resources/payments/client/requests/PostV1PaymentsPaymentIdActivateRequest.d.ts +10 -0
  9. package/dist/cjs/api/resources/payments/client/requests/PostV1PaymentsPaymentIdActivateRequest.js +3 -0
  10. package/dist/cjs/api/resources/payments/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/payments/types/GetV1PaymentsRequestOrder.d.ts +5 -0
  12. package/dist/cjs/api/resources/payments/types/GetV1PaymentsRequestOrder.js +8 -0
  13. package/dist/cjs/api/resources/payments/types/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/payments/types/index.js +1 -0
  15. package/dist/cjs/api/resources/staticWallets/client/Client.d.ts +2 -1
  16. package/dist/cjs/api/resources/staticWallets/client/Client.js +27 -7
  17. package/dist/cjs/api/resources/staticWallets/client/requests/CryptopayCreateStaticWalletRequest.d.ts +2 -1
  18. package/dist/cjs/api/resources/staticWallets/client/requests/CryptopaySimulateStaticDepositRequest.d.ts +12 -2
  19. package/dist/cjs/api/resources/staticWallets/client/requests/CryptopaySimulateStaticDepositRequest.js +10 -0
  20. package/dist/cjs/api/resources/staticWallets/client/requests/CryptopayUpdateStaticWalletRequest.d.ts +2 -1
  21. package/dist/cjs/api/resources/staticWallets/client/requests/GetV1StaticWalletsRequest.d.ts +13 -0
  22. package/dist/cjs/api/resources/staticWallets/client/requests/GetV1StaticWalletsRequest.js +3 -0
  23. package/dist/cjs/api/resources/staticWallets/client/requests/GetV1StaticWalletsStaticWalletIdDepositsRequest.d.ts +7 -0
  24. package/dist/cjs/api/resources/staticWallets/client/requests/index.d.ts +2 -1
  25. package/dist/cjs/api/resources/staticWallets/client/requests/index.js +3 -0
  26. package/dist/cjs/api/resources/staticWallets/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/staticWallets/index.js +1 -0
  28. package/dist/cjs/api/resources/staticWallets/types/GetV1StaticWalletsRequestOrder.d.ts +5 -0
  29. package/dist/cjs/api/resources/staticWallets/types/GetV1StaticWalletsRequestOrder.js +8 -0
  30. package/dist/cjs/api/resources/staticWallets/types/GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.d.ts +5 -0
  31. package/dist/cjs/api/resources/staticWallets/types/GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.js +8 -0
  32. package/dist/cjs/api/resources/staticWallets/types/index.d.ts +2 -0
  33. package/dist/cjs/api/resources/staticWallets/types/index.js +18 -0
  34. package/dist/cjs/api/types/CryptopayAssetId.d.ts +32 -0
  35. package/dist/cjs/api/types/CryptopayAssetId.js +35 -0
  36. package/dist/cjs/api/types/CryptopayPaymentResponse.d.ts +1 -1
  37. package/dist/cjs/api/types/CryptopayPublicPaymentResponse.d.ts +1 -1
  38. package/dist/cjs/api/types/CryptopayRedirectConfigDto.d.ts +11 -1
  39. package/dist/cjs/api/types/CryptopayRedirectConfigDto.js +11 -0
  40. package/dist/cjs/api/types/CryptopayStaticDepositResponse.d.ts +13 -2
  41. package/dist/cjs/api/types/CryptopayStaticDepositResponse.js +11 -0
  42. package/dist/cjs/api/types/CryptopayStaticWalletResponse.d.ts +2 -1
  43. package/dist/cjs/api/types/index.d.ts +1 -0
  44. package/dist/cjs/api/types/index.js +1 -0
  45. package/dist/cjs/auth/HeaderAuthProvider.d.ts +1 -1
  46. package/dist/cjs/version.d.ts +1 -1
  47. package/dist/cjs/version.js +1 -1
  48. package/dist/esm/BaseClient.mjs +2 -2
  49. package/dist/esm/api/resources/index.d.mts +1 -0
  50. package/dist/esm/api/resources/index.mjs +1 -0
  51. package/dist/esm/api/resources/payments/client/Client.d.mts +15 -0
  52. package/dist/esm/api/resources/payments/client/Client.mjs +55 -2
  53. package/dist/esm/api/resources/payments/client/requests/CryptopayCreatePaymentRequest.d.mts +1 -1
  54. package/dist/esm/api/resources/payments/client/requests/GetV1PaymentsRequest.d.mts +3 -2
  55. package/dist/esm/api/resources/payments/client/requests/PostV1PaymentsPaymentIdActivateRequest.d.mts +10 -0
  56. package/dist/esm/api/resources/payments/client/requests/PostV1PaymentsPaymentIdActivateRequest.mjs +2 -0
  57. package/dist/esm/api/resources/payments/client/requests/index.d.mts +1 -0
  58. package/dist/esm/api/resources/payments/types/GetV1PaymentsRequestOrder.d.mts +5 -0
  59. package/dist/esm/api/resources/payments/types/GetV1PaymentsRequestOrder.mjs +5 -0
  60. package/dist/esm/api/resources/payments/types/index.d.mts +1 -0
  61. package/dist/esm/api/resources/payments/types/index.mjs +1 -0
  62. package/dist/esm/api/resources/staticWallets/client/Client.d.mts +2 -1
  63. package/dist/esm/api/resources/staticWallets/client/Client.mjs +27 -7
  64. package/dist/esm/api/resources/staticWallets/client/requests/CryptopayCreateStaticWalletRequest.d.mts +2 -1
  65. package/dist/esm/api/resources/staticWallets/client/requests/CryptopaySimulateStaticDepositRequest.d.mts +12 -2
  66. package/dist/esm/api/resources/staticWallets/client/requests/CryptopaySimulateStaticDepositRequest.mjs +9 -1
  67. package/dist/esm/api/resources/staticWallets/client/requests/CryptopayUpdateStaticWalletRequest.d.mts +2 -1
  68. package/dist/esm/api/resources/staticWallets/client/requests/GetV1StaticWalletsRequest.d.mts +13 -0
  69. package/dist/esm/api/resources/staticWallets/client/requests/GetV1StaticWalletsRequest.mjs +2 -0
  70. package/dist/esm/api/resources/staticWallets/client/requests/GetV1StaticWalletsStaticWalletIdDepositsRequest.d.mts +7 -0
  71. package/dist/esm/api/resources/staticWallets/client/requests/index.d.mts +2 -1
  72. package/dist/esm/api/resources/staticWallets/client/requests/index.mjs +1 -1
  73. package/dist/esm/api/resources/staticWallets/index.d.mts +1 -0
  74. package/dist/esm/api/resources/staticWallets/index.mjs +1 -0
  75. package/dist/esm/api/resources/staticWallets/types/GetV1StaticWalletsRequestOrder.d.mts +5 -0
  76. package/dist/esm/api/resources/staticWallets/types/GetV1StaticWalletsRequestOrder.mjs +5 -0
  77. package/dist/esm/api/resources/staticWallets/types/GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.d.mts +5 -0
  78. package/dist/esm/api/resources/staticWallets/types/GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.mjs +5 -0
  79. package/dist/esm/api/resources/staticWallets/types/index.d.mts +2 -0
  80. package/dist/esm/api/resources/staticWallets/types/index.mjs +2 -0
  81. package/dist/esm/api/types/CryptopayAssetId.d.mts +32 -0
  82. package/dist/esm/api/types/CryptopayAssetId.mjs +32 -0
  83. package/dist/esm/api/types/CryptopayPaymentResponse.d.mts +1 -1
  84. package/dist/esm/api/types/CryptopayPublicPaymentResponse.d.mts +1 -1
  85. package/dist/esm/api/types/CryptopayRedirectConfigDto.d.mts +11 -1
  86. package/dist/esm/api/types/CryptopayRedirectConfigDto.mjs +10 -1
  87. package/dist/esm/api/types/CryptopayStaticDepositResponse.d.mts +13 -2
  88. package/dist/esm/api/types/CryptopayStaticDepositResponse.mjs +10 -1
  89. package/dist/esm/api/types/CryptopayStaticWalletResponse.d.mts +2 -1
  90. package/dist/esm/api/types/index.d.mts +1 -0
  91. package/dist/esm/api/types/index.mjs +1 -0
  92. package/dist/esm/auth/HeaderAuthProvider.d.mts +1 -1
  93. package/dist/esm/version.d.mts +1 -1
  94. package/dist/esm/version.mjs +1 -1
  95. package/package.json +1 -1
  96. package/reference.md +74 -1
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "pkg-sdk-test",
46
- "X-Fern-SDK-Version": "0.0.15",
47
- "User-Agent": "pkg-sdk-test/0.0.15",
46
+ "X-Fern-SDK-Version": "0.0.16",
47
+ "User-Agent": "pkg-sdk-test/0.0.16",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -3,3 +3,4 @@ export * as payments from "./payments/index.js";
3
3
  export * from "./payments/types/index.js";
4
4
  export * from "./staticWallets/client/requests/index.js";
5
5
  export * as staticWallets from "./staticWallets/index.js";
6
+ export * from "./staticWallets/types/index.js";
@@ -42,3 +42,4 @@ exports.payments = __importStar(require("./payments/index.js"));
42
42
  __exportStar(require("./payments/types/index.js"), exports);
43
43
  __exportStar(require("./staticWallets/client/requests/index.js"), exports);
44
44
  exports.staticWallets = __importStar(require("./staticWallets/index.js"));
45
+ __exportStar(require("./staticWallets/types/index.js"), exports);
@@ -56,6 +56,21 @@ export declare class PaymentsClient {
56
56
  */
57
57
  getPayment(request: SuwardSDK.GetV1PaymentsPaymentIdRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.GetV1PaymentsPaymentIdResponse>;
58
58
  private __getPayment;
59
+ /**
60
+ * Activate a payment (public, customer-facing)
61
+ *
62
+ * @param {SuwardSDK.PostV1PaymentsPaymentIdActivateRequest} request
63
+ * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link SuwardSDK.InternalServerError}
66
+ *
67
+ * @example
68
+ * await client.payments.activatePayment({
69
+ * paymentId: "paymentId"
70
+ * })
71
+ */
72
+ activatePayment(request: SuwardSDK.PostV1PaymentsPaymentIdActivateRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayPublicPaymentResponse>;
73
+ private __activatePayment;
59
74
  /**
60
75
  * Cancel a payment
61
76
  *
@@ -84,9 +84,9 @@ class PaymentsClient {
84
84
  __listPayments() {
85
85
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
86
86
  var _a, _b, _c, _d, _e, _f, _g, _h;
87
- const { ordeddddr, limit, lastId } = request;
87
+ const { order, limit, lastId } = request;
88
88
  const _queryParams = {
89
- ordeddddr,
89
+ order: order != null ? order : undefined,
90
90
  limit,
91
91
  lastId,
92
92
  };
@@ -244,6 +244,59 @@ class PaymentsClient {
244
244
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/payments/{paymentId}");
245
245
  });
246
246
  }
247
+ /**
248
+ * Activate a payment (public, customer-facing)
249
+ *
250
+ * @param {SuwardSDK.PostV1PaymentsPaymentIdActivateRequest} request
251
+ * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
252
+ *
253
+ * @throws {@link SuwardSDK.InternalServerError}
254
+ *
255
+ * @example
256
+ * await client.payments.activatePayment({
257
+ * paymentId: "paymentId"
258
+ * })
259
+ */
260
+ activatePayment(request, requestOptions) {
261
+ return core.HttpResponsePromise.fromPromise(this.__activatePayment(request, requestOptions));
262
+ }
263
+ __activatePayment(request, requestOptions) {
264
+ return __awaiter(this, void 0, void 0, function* () {
265
+ var _a, _b, _c, _d, _e, _f, _g, _h;
266
+ const { paymentId } = request;
267
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
268
+ const _response = yield core.fetcher({
269
+ 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/payments/${core.url.encodePathParam(paymentId)}/activate`),
270
+ method: "POST",
271
+ headers: _headers,
272
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
273
+ 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,
274
+ 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,
275
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
276
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
277
+ logging: this._options.logging,
278
+ });
279
+ if (_response.ok) {
280
+ return {
281
+ data: _response.body,
282
+ rawResponse: _response.rawResponse,
283
+ };
284
+ }
285
+ if (_response.error.reason === "status-code") {
286
+ switch (_response.error.statusCode) {
287
+ case 500:
288
+ throw new SuwardSDK.InternalServerError(_response.error.body, _response.rawResponse);
289
+ default:
290
+ throw new errors.SuwardSDKError({
291
+ statusCode: _response.error.statusCode,
292
+ body: _response.error.body,
293
+ rawResponse: _response.rawResponse,
294
+ });
295
+ }
296
+ }
297
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/payments/{paymentId}/activate");
298
+ });
299
+ }
247
300
  /**
248
301
  * Cancel a payment
249
302
  *
@@ -6,7 +6,7 @@ import type * as SuwardSDK from "../../../../index.js";
6
6
  export interface CryptopayCreatePaymentRequest {
7
7
  activationFlowSeconds?: number;
8
8
  amount?: string;
9
- asset?: string;
9
+ asset?: SuwardSDK.CryptopayAssetId;
10
10
  externalId?: string;
11
11
  isTest?: boolean;
12
12
  metadata?: Record<string, unknown>;
@@ -1,11 +1,12 @@
1
+ import type * as SuwardSDK from "../../../../index.js";
1
2
  /**
2
3
  * @example
3
4
  * {}
4
5
  */
5
6
  export interface GetV1PaymentsRequest {
6
7
  /** Sort order (asc/desc) */
7
- ordeddddr?: string;
8
- /** Limit (default 100) */
8
+ order?: SuwardSDK.GetV1PaymentsRequestOrder;
9
+ /** Limit (default 20, max 100) */
9
10
  limit?: number;
10
11
  /** Last ID for pagination */
11
12
  lastId?: string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * paymentId: "paymentId"
5
+ * }
6
+ */
7
+ export interface PostV1PaymentsPaymentIdActivateRequest {
8
+ /** Payment ID */
9
+ paymentId: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,4 +2,5 @@ export type { CryptopayCreatePaymentRequest } from "./CryptopayCreatePaymentRequ
2
2
  export type { CryptopaySimulatePaymentRequest } from "./CryptopaySimulatePaymentRequest.js";
3
3
  export type { GetV1PaymentsPaymentIdRequest } from "./GetV1PaymentsPaymentIdRequest.js";
4
4
  export type { GetV1PaymentsRequest } from "./GetV1PaymentsRequest.js";
5
+ export type { PostV1PaymentsPaymentIdActivateRequest } from "./PostV1PaymentsPaymentIdActivateRequest.js";
5
6
  export type { PostV1PaymentsPaymentIdCancelRequest } from "./PostV1PaymentsPaymentIdCancelRequest.js";
@@ -0,0 +1,5 @@
1
+ export declare const GetV1PaymentsRequestOrder: {
2
+ readonly Asc: "asc";
3
+ readonly Desc: "desc";
4
+ };
5
+ export type GetV1PaymentsRequestOrder = (typeof GetV1PaymentsRequestOrder)[keyof typeof GetV1PaymentsRequestOrder];
@@ -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.GetV1PaymentsRequestOrder = void 0;
5
+ exports.GetV1PaymentsRequestOrder = {
6
+ Asc: "asc",
7
+ Desc: "desc",
8
+ };
@@ -1 +1,2 @@
1
1
  export * from "./GetV1PaymentsPaymentIdResponse.js";
2
+ export * from "./GetV1PaymentsRequestOrder.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./GetV1PaymentsPaymentIdResponse.js"), exports);
18
+ __exportStar(require("./GetV1PaymentsRequestOrder.js"), exports);
@@ -11,6 +11,7 @@ export declare class StaticWalletsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<StaticWalletsClient.Options>;
12
12
  constructor(options: StaticWalletsClient.Options);
13
13
  /**
14
+ * @param {SuwardSDK.GetV1StaticWalletsRequest} request
14
15
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
15
16
  *
16
17
  * @throws {@link SuwardSDK.UnauthorizedError}
@@ -18,7 +19,7 @@ export declare class StaticWalletsClient {
18
19
  * @example
19
20
  * await client.staticWallets.listStaticWallets()
20
21
  */
21
- listStaticWallets(requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayListStaticWalletsResponse>;
22
+ listStaticWallets(request?: SuwardSDK.GetV1StaticWalletsRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayListStaticWalletsResponse>;
22
23
  private __listStaticWallets;
23
24
  /**
24
25
  * Create a reusable deposit address with an accepted-asset allow-list
@@ -66,6 +66,7 @@ class StaticWalletsClient {
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
72
  * @throws {@link SuwardSDK.UnauthorizedError}
@@ -73,19 +74,29 @@ class StaticWalletsClient {
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(requestOptions) {
80
- return __awaiter(this, void 0, void 0, function* () {
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.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
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,
@@ -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.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
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,
@@ -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?: string[];
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?: string;
12
- status?: string;
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 = {}));
@@ -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?: string[];
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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 type { CryptopaySimulateStaticDepositRequest } from "./CryptopaySimulateStaticDepositRequest.js";
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; } });
@@ -1 +1,2 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,5 @@
1
+ export declare const GetV1StaticWalletsRequestOrder: {
2
+ readonly Asc: "asc";
3
+ readonly Desc: "desc";
4
+ };
5
+ export type GetV1StaticWalletsRequestOrder = (typeof GetV1StaticWalletsRequestOrder)[keyof typeof GetV1StaticWalletsRequestOrder];
@@ -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,2 @@
1
+ export * from "./GetV1StaticWalletsRequestOrder.js";
2
+ export * from "./GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.js";
@@ -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
+ };
@@ -7,7 +7,7 @@ export interface CryptopayPaymentResponse {
7
7
  amount?: string | undefined;
8
8
  amountConfirmed?: string | undefined;
9
9
  amountReceived?: string | undefined;
10
- asset?: string | undefined;
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?: string | undefined;
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?: string[] | undefined;
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 = {}));
@@ -1,8 +1,9 @@
1
+ import type * as SuwardSDK from "../index.js";
1
2
  export interface CryptopayStaticDepositResponse {
2
3
  acceptedAt?: number | undefined;
3
4
  address?: string | undefined;
4
5
  amount?: string | undefined;
5
- asset?: string | undefined;
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?: string | undefined;
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
+ }