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
@@ -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.CryptopayStaticDepositResponse = void 0;
5
+ var CryptopayStaticDepositResponse;
6
+ (function (CryptopayStaticDepositResponse) {
7
+ CryptopayStaticDepositResponse.Status = {
8
+ Detected: "detected",
9
+ Accepted: "accepted",
10
+ Confirmed: "confirmed",
11
+ Ignored: "ignored",
12
+ Invalidated: "invalidated",
13
+ };
14
+ })(CryptopayStaticDepositResponse || (exports.CryptopayStaticDepositResponse = CryptopayStaticDepositResponse = {}));
@@ -1,6 +1,7 @@
1
+ import type * as SuwardSDK from "../index.js";
1
2
  export interface CryptopayStaticWalletResponse {
2
3
  address?: string | undefined;
3
- allowedAssets?: string[] | undefined;
4
+ allowedAssets?: SuwardSDK.CryptopayAssetId[] | undefined;
4
5
  createdAt?: number | undefined;
5
6
  externalId?: string | undefined;
6
7
  id?: string | undefined;
@@ -1,4 +1,5 @@
1
1
  export * from "./ControllerErrorResponse.js";
2
+ export * from "./CryptopayAssetId.js";
2
3
  export * from "./CryptopayListPaymentsResponse.js";
3
4
  export * from "./CryptopayListStaticDepositsResponse.js";
4
5
  export * from "./CryptopayListStaticWalletsResponse.js";
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ControllerErrorResponse.js"), exports);
18
+ __exportStar(require("./CryptopayAssetId.js"), exports);
18
19
  __exportStar(require("./CryptopayListPaymentsResponse.js"), exports);
19
20
  __exportStar(require("./CryptopayListStaticDepositsResponse.js"), exports);
20
21
  __exportStar(require("./CryptopayListStaticWalletsResponse.js"), exports);
@@ -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]: core.Supplier<string>;
16
+ [PARAM_KEY]?: core.Supplier<string>;
17
17
  };
18
18
  function createInstance(options: Options): core.AuthProvider;
19
19
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.15";
1
+ export declare const SDK_VERSION = "0.0.16";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.15";
4
+ exports.SDK_VERSION = "0.0.16";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "pkg-sdk-test",
9
- "X-Fern-SDK-Version": "0.0.15",
10
- "User-Agent": "pkg-sdk-test/0.0.15",
9
+ "X-Fern-SDK-Version": "0.0.16",
10
+ "User-Agent": "pkg-sdk-test/0.0.16",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -3,3 +3,4 @@ export * as payments from "./payments/index.mjs";
3
3
  export * from "./payments/types/index.mjs";
4
4
  export * from "./staticWallets/client/requests/index.mjs";
5
5
  export * as staticWallets from "./staticWallets/index.mjs";
6
+ export * from "./staticWallets/types/index.mjs";
@@ -3,3 +3,4 @@ export * as payments from "./payments/index.mjs";
3
3
  export * from "./payments/types/index.mjs";
4
4
  export * from "./staticWallets/client/requests/index.mjs";
5
5
  export * as staticWallets from "./staticWallets/index.mjs";
6
+ export * from "./staticWallets/types/index.mjs";
@@ -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
  *
@@ -48,9 +48,9 @@ export class PaymentsClient {
48
48
  __listPayments() {
49
49
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
50
50
  var _a, _b, _c, _d, _e, _f, _g, _h;
51
- const { ordeddddr, limit, lastId } = request;
51
+ const { order, limit, lastId } = request;
52
52
  const _queryParams = {
53
- ordeddddr,
53
+ order: order != null ? order : undefined,
54
54
  limit,
55
55
  lastId,
56
56
  };
@@ -208,6 +208,59 @@ export class PaymentsClient {
208
208
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/payments/{paymentId}");
209
209
  });
210
210
  }
211
+ /**
212
+ * Activate a payment (public, customer-facing)
213
+ *
214
+ * @param {SuwardSDK.PostV1PaymentsPaymentIdActivateRequest} request
215
+ * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
216
+ *
217
+ * @throws {@link SuwardSDK.InternalServerError}
218
+ *
219
+ * @example
220
+ * await client.payments.activatePayment({
221
+ * paymentId: "paymentId"
222
+ * })
223
+ */
224
+ activatePayment(request, requestOptions) {
225
+ return core.HttpResponsePromise.fromPromise(this.__activatePayment(request, requestOptions));
226
+ }
227
+ __activatePayment(request, requestOptions) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ var _a, _b, _c, _d, _e, _f, _g, _h;
230
+ const { paymentId } = request;
231
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
232
+ const _response = yield core.fetcher({
233
+ 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`),
234
+ method: "POST",
235
+ headers: _headers,
236
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
237
+ 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,
238
+ 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,
239
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
240
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
241
+ logging: this._options.logging,
242
+ });
243
+ if (_response.ok) {
244
+ return {
245
+ data: _response.body,
246
+ rawResponse: _response.rawResponse,
247
+ };
248
+ }
249
+ if (_response.error.reason === "status-code") {
250
+ switch (_response.error.statusCode) {
251
+ case 500:
252
+ throw new SuwardSDK.InternalServerError(_response.error.body, _response.rawResponse);
253
+ default:
254
+ throw new errors.SuwardSDKError({
255
+ statusCode: _response.error.statusCode,
256
+ body: _response.error.body,
257
+ rawResponse: _response.rawResponse,
258
+ });
259
+ }
260
+ }
261
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/payments/{paymentId}/activate");
262
+ });
263
+ }
211
264
  /**
212
265
  * Cancel a payment
213
266
  *
@@ -6,7 +6,7 @@ import type * as SuwardSDK from "../../../../index.mjs";
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.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -2,4 +2,5 @@ export type { CryptopayCreatePaymentRequest } from "./CryptopayCreatePaymentRequ
2
2
  export type { CryptopaySimulatePaymentRequest } from "./CryptopaySimulatePaymentRequest.mjs";
3
3
  export type { GetV1PaymentsPaymentIdRequest } from "./GetV1PaymentsPaymentIdRequest.mjs";
4
4
  export type { GetV1PaymentsRequest } from "./GetV1PaymentsRequest.mjs";
5
+ export type { PostV1PaymentsPaymentIdActivateRequest } from "./PostV1PaymentsPaymentIdActivateRequest.mjs";
5
6
  export type { PostV1PaymentsPaymentIdCancelRequest } from "./PostV1PaymentsPaymentIdCancelRequest.mjs";
@@ -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,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetV1PaymentsRequestOrder = {
3
+ Asc: "asc",
4
+ Desc: "desc",
5
+ };
@@ -1 +1,2 @@
1
1
  export * from "./GetV1PaymentsPaymentIdResponse.mjs";
2
+ export * from "./GetV1PaymentsRequestOrder.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./GetV1PaymentsPaymentIdResponse.mjs";
2
+ export * from "./GetV1PaymentsRequestOrder.mjs";
@@ -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
@@ -30,6 +30,7 @@ export class StaticWalletsClient {
30
30
  this._options = normalizeClientOptionsWithAuth(options);
31
31
  }
32
32
  /**
33
+ * @param {SuwardSDK.GetV1StaticWalletsRequest} request
33
34
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
34
35
  *
35
36
  * @throws {@link SuwardSDK.UnauthorizedError}
@@ -37,19 +38,29 @@ export class StaticWalletsClient {
37
38
  * @example
38
39
  * await client.staticWallets.listStaticWallets()
39
40
  */
40
- listStaticWallets(requestOptions) {
41
- return core.HttpResponsePromise.fromPromise(this.__listStaticWallets(requestOptions));
41
+ listStaticWallets(request = {}, requestOptions) {
42
+ return core.HttpResponsePromise.fromPromise(this.__listStaticWallets(request, requestOptions));
42
43
  }
43
- __listStaticWallets(requestOptions) {
44
- return __awaiter(this, void 0, void 0, function* () {
44
+ __listStaticWallets() {
45
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
45
46
  var _a, _b, _c, _d, _e, _f, _g, _h;
47
+ const { order, limit, lastId } = request;
48
+ const _queryParams = {
49
+ order: order != null ? order : undefined,
50
+ limit,
51
+ lastId,
52
+ };
46
53
  const _authRequest = yield this._options.authProvider.getAuthRequest();
47
54
  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
55
  const _response = yield core.fetcher({
49
56
  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"),
50
57
  method: "GET",
51
58
  headers: _headers,
52
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
59
+ queryString: core.url
60
+ .queryBuilder()
61
+ .addMany(_queryParams)
62
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
63
+ .build(),
53
64
  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,
54
65
  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,
55
66
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -307,14 +318,23 @@ export class StaticWalletsClient {
307
318
  __listStaticWalletDeposits(request, requestOptions) {
308
319
  return __awaiter(this, void 0, void 0, function* () {
309
320
  var _a, _b, _c, _d, _e, _f, _g, _h;
310
- const { staticWalletId } = request;
321
+ const { staticWalletId, order, limit, lastId } = request;
322
+ const _queryParams = {
323
+ order: order != null ? order : undefined,
324
+ limit,
325
+ lastId,
326
+ };
311
327
  const _authRequest = yield this._options.authProvider.getAuthRequest();
312
328
  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
329
  const _response = yield core.fetcher({
314
330
  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`),
315
331
  method: "GET",
316
332
  headers: _headers,
317
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
333
+ queryString: core.url
334
+ .queryBuilder()
335
+ .addMany(_queryParams)
336
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
337
+ .build(),
318
338
  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,
319
339
  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,
320
340
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -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?: 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.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?: 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,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?: 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.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
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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 type { CryptopaySimulateStaticDepositRequest } from "./CryptopaySimulateStaticDepositRequest.mjs";
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";
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -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,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetV1StaticWalletsRequestOrder = {
3
+ Asc: "asc",
4
+ Desc: "desc",
5
+ };
@@ -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,5 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const GetV1StaticWalletsStaticWalletIdDepositsRequestOrder = {
3
+ Asc: "asc",
4
+ Desc: "desc",
5
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./GetV1StaticWalletsRequestOrder.mjs";
2
+ export * from "./GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./GetV1StaticWalletsRequestOrder.mjs";
2
+ export * from "./GetV1StaticWalletsStaticWalletIdDepositsRequestOrder.mjs";
@@ -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?: 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,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 = {}));