pkg-sdk-test 0.0.14 → 0.0.15

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 (75) hide show
  1. package/README.md +295 -0
  2. package/dist/cjs/BaseClient.js +3 -3
  3. package/dist/cjs/Client.d.ts +4 -4
  4. package/dist/cjs/Client.js +3 -3
  5. package/dist/cjs/api/errors/BadRequestError.d.ts +3 -3
  6. package/dist/cjs/api/errors/BadRequestError.js +1 -1
  7. package/dist/cjs/api/errors/InternalServerError.d.ts +3 -3
  8. package/dist/cjs/api/errors/InternalServerError.js +1 -1
  9. package/dist/cjs/api/errors/NotFoundError.d.ts +3 -3
  10. package/dist/cjs/api/errors/NotFoundError.js +1 -1
  11. package/dist/cjs/api/errors/UnauthorizedError.d.ts +3 -3
  12. package/dist/cjs/api/errors/UnauthorizedError.js +1 -1
  13. package/dist/cjs/api/resources/payments/client/Client.d.ts +23 -23
  14. package/dist/cjs/api/resources/payments/client/Client.js +37 -37
  15. package/dist/cjs/api/resources/payments/client/requests/CryptopayCreatePaymentRequest.d.ts +2 -2
  16. package/dist/cjs/api/resources/payments/client/requests/CryptopaySimulatePaymentRequest.d.ts +2 -2
  17. package/dist/cjs/api/resources/payments/client/requests/GetV1PaymentsRequest.d.ts +1 -1
  18. package/dist/cjs/api/resources/payments/types/GetV1PaymentsPaymentIdResponse.d.ts +2 -2
  19. package/dist/cjs/api/resources/staticWallets/client/Client.d.ts +23 -23
  20. package/dist/cjs/api/resources/staticWallets/client/Client.js +32 -32
  21. package/dist/cjs/api/types/CryptopayListPaymentsResponse.d.ts +2 -2
  22. package/dist/cjs/api/types/CryptopayListStaticDepositsResponse.d.ts +2 -2
  23. package/dist/cjs/api/types/CryptopayListStaticWalletsResponse.d.ts +2 -2
  24. package/dist/cjs/api/types/CryptopayPaymentResponse.d.ts +5 -5
  25. package/dist/cjs/api/types/CryptopayPublicPaymentResponse.d.ts +4 -4
  26. package/dist/cjs/auth/HeaderAuthProvider.js +1 -1
  27. package/dist/cjs/errors/{SuwardApiError.d.ts → SuwardSDKError.d.ts} +1 -1
  28. package/dist/cjs/errors/{SuwardApiError.js → SuwardSDKError.js} +4 -4
  29. package/dist/{esm/errors/SuwardApiTimeoutError.d.mts → cjs/errors/SuwardSDKTimeoutError.d.ts} +1 -1
  30. package/dist/cjs/errors/{SuwardApiTimeoutError.js → SuwardSDKTimeoutError.js} +4 -4
  31. package/dist/cjs/errors/handleNonStatusCodeError.js +5 -5
  32. package/dist/cjs/errors/index.d.ts +2 -2
  33. package/dist/cjs/errors/index.js +5 -5
  34. package/dist/cjs/index.d.ts +3 -3
  35. package/dist/cjs/index.js +5 -5
  36. package/dist/cjs/version.d.ts +1 -1
  37. package/dist/cjs/version.js +1 -1
  38. package/dist/esm/BaseClient.mjs +3 -3
  39. package/dist/esm/Client.d.mts +4 -4
  40. package/dist/esm/Client.mjs +1 -1
  41. package/dist/esm/api/errors/BadRequestError.d.mts +3 -3
  42. package/dist/esm/api/errors/BadRequestError.mjs +1 -1
  43. package/dist/esm/api/errors/InternalServerError.d.mts +3 -3
  44. package/dist/esm/api/errors/InternalServerError.mjs +1 -1
  45. package/dist/esm/api/errors/NotFoundError.d.mts +3 -3
  46. package/dist/esm/api/errors/NotFoundError.mjs +1 -1
  47. package/dist/esm/api/errors/UnauthorizedError.d.mts +3 -3
  48. package/dist/esm/api/errors/UnauthorizedError.mjs +1 -1
  49. package/dist/esm/api/resources/payments/client/Client.d.mts +23 -23
  50. package/dist/esm/api/resources/payments/client/Client.mjs +37 -37
  51. package/dist/esm/api/resources/payments/client/requests/CryptopayCreatePaymentRequest.d.mts +2 -2
  52. package/dist/esm/api/resources/payments/client/requests/CryptopaySimulatePaymentRequest.d.mts +2 -2
  53. package/dist/esm/api/resources/payments/client/requests/GetV1PaymentsRequest.d.mts +1 -1
  54. package/dist/esm/api/resources/payments/types/GetV1PaymentsPaymentIdResponse.d.mts +2 -2
  55. package/dist/esm/api/resources/staticWallets/client/Client.d.mts +23 -23
  56. package/dist/esm/api/resources/staticWallets/client/Client.mjs +32 -32
  57. package/dist/esm/api/types/CryptopayListPaymentsResponse.d.mts +2 -2
  58. package/dist/esm/api/types/CryptopayListStaticDepositsResponse.d.mts +2 -2
  59. package/dist/esm/api/types/CryptopayListStaticWalletsResponse.d.mts +2 -2
  60. package/dist/esm/api/types/CryptopayPaymentResponse.d.mts +5 -5
  61. package/dist/esm/api/types/CryptopayPublicPaymentResponse.d.mts +4 -4
  62. package/dist/esm/auth/HeaderAuthProvider.mjs +1 -1
  63. package/dist/esm/errors/{SuwardApiError.d.mts → SuwardSDKError.d.mts} +1 -1
  64. package/dist/esm/errors/{SuwardApiError.mjs → SuwardSDKError.mjs} +2 -2
  65. package/dist/{cjs/errors/SuwardApiTimeoutError.d.ts → esm/errors/SuwardSDKTimeoutError.d.mts} +1 -1
  66. package/dist/esm/errors/{SuwardApiTimeoutError.mjs → SuwardSDKTimeoutError.mjs} +2 -2
  67. package/dist/esm/errors/handleNonStatusCodeError.mjs +5 -5
  68. package/dist/esm/errors/index.d.mts +2 -2
  69. package/dist/esm/errors/index.mjs +2 -2
  70. package/dist/esm/index.d.mts +3 -3
  71. package/dist/esm/index.mjs +3 -3
  72. package/dist/esm/version.d.mts +1 -1
  73. package/dist/esm/version.mjs +1 -1
  74. package/package.json +86 -82
  75. package/reference.md +698 -0
@@ -1,7 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
- import * as SuwardApi from "../../../index.mjs";
4
+ import * as SuwardSDK from "../../../index.mjs";
5
5
  export declare namespace StaticWalletsClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
@@ -13,93 +13,93 @@ export declare class StaticWalletsClient {
13
13
  /**
14
14
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
15
15
  *
16
- * @throws {@link SuwardApi.UnauthorizedError}
16
+ * @throws {@link SuwardSDK.UnauthorizedError}
17
17
  *
18
18
  * @example
19
19
  * await client.staticWallets.listStaticWallets()
20
20
  */
21
- listStaticWallets(requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayListStaticWalletsResponse>;
21
+ listStaticWallets(requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayListStaticWalletsResponse>;
22
22
  private __listStaticWallets;
23
23
  /**
24
24
  * Create a reusable deposit address with an accepted-asset allow-list
25
25
  *
26
- * @param {SuwardApi.CryptopayCreateStaticWalletRequest} request
26
+ * @param {SuwardSDK.CryptopayCreateStaticWalletRequest} request
27
27
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
28
28
  *
29
- * @throws {@link SuwardApi.BadRequestError}
30
- * @throws {@link SuwardApi.UnauthorizedError}
29
+ * @throws {@link SuwardSDK.BadRequestError}
30
+ * @throws {@link SuwardSDK.UnauthorizedError}
31
31
  *
32
32
  * @example
33
33
  * await client.staticWallets.createStaticWallet()
34
34
  */
35
- createStaticWallet(request?: SuwardApi.CryptopayCreateStaticWalletRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayStaticWalletResponse>;
35
+ createStaticWallet(request?: SuwardSDK.CryptopayCreateStaticWalletRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayStaticWalletResponse>;
36
36
  private __createStaticWallet;
37
37
  /**
38
- * @param {SuwardApi.GetV1StaticWalletsStaticWalletIdRequest} request
38
+ * @param {SuwardSDK.GetV1StaticWalletsStaticWalletIdRequest} request
39
39
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
40
40
  *
41
- * @throws {@link SuwardApi.NotFoundError}
41
+ * @throws {@link SuwardSDK.NotFoundError}
42
42
  *
43
43
  * @example
44
44
  * await client.staticWallets.getStaticWallet({
45
45
  * staticWalletId: "staticWalletId"
46
46
  * })
47
47
  */
48
- getStaticWallet(request: SuwardApi.GetV1StaticWalletsStaticWalletIdRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayStaticWalletResponse>;
48
+ getStaticWallet(request: SuwardSDK.GetV1StaticWalletsStaticWalletIdRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayStaticWalletResponse>;
49
49
  private __getStaticWallet;
50
50
  /**
51
- * @param {SuwardApi.DeleteV1StaticWalletsStaticWalletIdRequest} request
51
+ * @param {SuwardSDK.DeleteV1StaticWalletsStaticWalletIdRequest} request
52
52
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
53
53
  *
54
- * @throws {@link SuwardApi.NotFoundError}
54
+ * @throws {@link SuwardSDK.NotFoundError}
55
55
  *
56
56
  * @example
57
57
  * await client.staticWallets.deleteStaticWallet({
58
58
  * staticWalletId: "staticWalletId"
59
59
  * })
60
60
  */
61
- deleteStaticWallet(request: SuwardApi.DeleteV1StaticWalletsStaticWalletIdRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<Record<string, boolean>>;
61
+ deleteStaticWallet(request: SuwardSDK.DeleteV1StaticWalletsStaticWalletIdRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<Record<string, boolean>>;
62
62
  private __deleteStaticWallet;
63
63
  /**
64
- * @param {SuwardApi.CryptopayUpdateStaticWalletRequest} request
64
+ * @param {SuwardSDK.CryptopayUpdateStaticWalletRequest} request
65
65
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
66
66
  *
67
- * @throws {@link SuwardApi.BadRequestError}
67
+ * @throws {@link SuwardSDK.BadRequestError}
68
68
  *
69
69
  * @example
70
70
  * await client.staticWallets.updateStaticWallet({
71
71
  * staticWalletId: "staticWalletId"
72
72
  * })
73
73
  */
74
- updateStaticWallet(request: SuwardApi.CryptopayUpdateStaticWalletRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayStaticWalletResponse>;
74
+ updateStaticWallet(request: SuwardSDK.CryptopayUpdateStaticWalletRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayStaticWalletResponse>;
75
75
  private __updateStaticWallet;
76
76
  /**
77
- * @param {SuwardApi.GetV1StaticWalletsStaticWalletIdDepositsRequest} request
77
+ * @param {SuwardSDK.GetV1StaticWalletsStaticWalletIdDepositsRequest} request
78
78
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
79
79
  *
80
- * @throws {@link SuwardApi.NotFoundError}
80
+ * @throws {@link SuwardSDK.NotFoundError}
81
81
  *
82
82
  * @example
83
83
  * await client.staticWallets.listStaticWalletDeposits({
84
84
  * staticWalletId: "staticWalletId"
85
85
  * })
86
86
  */
87
- listStaticWalletDeposits(request: SuwardApi.GetV1StaticWalletsStaticWalletIdDepositsRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayListStaticDepositsResponse>;
87
+ listStaticWalletDeposits(request: SuwardSDK.GetV1StaticWalletsStaticWalletIdDepositsRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayListStaticDepositsResponse>;
88
88
  private __listStaticWalletDeposits;
89
89
  /**
90
90
  * Drive a synthetic deposit through its lifecycle on a test wallet (no on-chain activity, no balance credit). Test wallets only.
91
91
  *
92
- * @param {SuwardApi.CryptopaySimulateStaticDepositRequest} request
92
+ * @param {SuwardSDK.CryptopaySimulateStaticDepositRequest} request
93
93
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
94
94
  *
95
- * @throws {@link SuwardApi.BadRequestError}
96
- * @throws {@link SuwardApi.NotFoundError}
95
+ * @throws {@link SuwardSDK.BadRequestError}
96
+ * @throws {@link SuwardSDK.NotFoundError}
97
97
  *
98
98
  * @example
99
99
  * await client.staticWallets.simulateStaticWalletDeposit({
100
100
  * staticWalletId: "staticWalletId"
101
101
  * })
102
102
  */
103
- simulateStaticWalletDeposit(request: SuwardApi.CryptopaySimulateStaticDepositRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayStaticDepositResponse>;
103
+ simulateStaticWalletDeposit(request: SuwardSDK.CryptopaySimulateStaticDepositRequest, requestOptions?: StaticWalletsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayStaticDepositResponse>;
104
104
  private __simulateStaticWalletDeposit;
105
105
  }
@@ -24,7 +24,7 @@ import { mergeHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
26
26
  import * as errors from "../../../../errors/index.mjs";
27
- import * as SuwardApi from "../../../index.mjs";
27
+ import * as SuwardSDK from "../../../index.mjs";
28
28
  export class StaticWalletsClient {
29
29
  constructor(options) {
30
30
  this._options = normalizeClientOptionsWithAuth(options);
@@ -32,7 +32,7 @@ export class StaticWalletsClient {
32
32
  /**
33
33
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
34
34
  *
35
- * @throws {@link SuwardApi.UnauthorizedError}
35
+ * @throws {@link SuwardSDK.UnauthorizedError}
36
36
  *
37
37
  * @example
38
38
  * await client.staticWallets.listStaticWallets()
@@ -65,9 +65,9 @@ export class StaticWalletsClient {
65
65
  if (_response.error.reason === "status-code") {
66
66
  switch (_response.error.statusCode) {
67
67
  case 401:
68
- throw new SuwardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
68
+ throw new SuwardSDK.UnauthorizedError(_response.error.body, _response.rawResponse);
69
69
  default:
70
- throw new errors.SuwardApiError({
70
+ throw new errors.SuwardSDKError({
71
71
  statusCode: _response.error.statusCode,
72
72
  body: _response.error.body,
73
73
  rawResponse: _response.rawResponse,
@@ -80,11 +80,11 @@ export class StaticWalletsClient {
80
80
  /**
81
81
  * Create a reusable deposit address with an accepted-asset allow-list
82
82
  *
83
- * @param {SuwardApi.CryptopayCreateStaticWalletRequest} request
83
+ * @param {SuwardSDK.CryptopayCreateStaticWalletRequest} request
84
84
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
85
85
  *
86
- * @throws {@link SuwardApi.BadRequestError}
87
- * @throws {@link SuwardApi.UnauthorizedError}
86
+ * @throws {@link SuwardSDK.BadRequestError}
87
+ * @throws {@link SuwardSDK.UnauthorizedError}
88
88
  *
89
89
  * @example
90
90
  * await client.staticWallets.createStaticWallet()
@@ -120,11 +120,11 @@ export class StaticWalletsClient {
120
120
  if (_response.error.reason === "status-code") {
121
121
  switch (_response.error.statusCode) {
122
122
  case 400:
123
- throw new SuwardApi.BadRequestError(_response.error.body, _response.rawResponse);
123
+ throw new SuwardSDK.BadRequestError(_response.error.body, _response.rawResponse);
124
124
  case 401:
125
- throw new SuwardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
125
+ throw new SuwardSDK.UnauthorizedError(_response.error.body, _response.rawResponse);
126
126
  default:
127
- throw new errors.SuwardApiError({
127
+ throw new errors.SuwardSDKError({
128
128
  statusCode: _response.error.statusCode,
129
129
  body: _response.error.body,
130
130
  rawResponse: _response.rawResponse,
@@ -135,10 +135,10 @@ export class StaticWalletsClient {
135
135
  });
136
136
  }
137
137
  /**
138
- * @param {SuwardApi.GetV1StaticWalletsStaticWalletIdRequest} request
138
+ * @param {SuwardSDK.GetV1StaticWalletsStaticWalletIdRequest} request
139
139
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
140
140
  *
141
- * @throws {@link SuwardApi.NotFoundError}
141
+ * @throws {@link SuwardSDK.NotFoundError}
142
142
  *
143
143
  * @example
144
144
  * await client.staticWallets.getStaticWallet({
@@ -174,9 +174,9 @@ export class StaticWalletsClient {
174
174
  if (_response.error.reason === "status-code") {
175
175
  switch (_response.error.statusCode) {
176
176
  case 404:
177
- throw new SuwardApi.NotFoundError(_response.error.body, _response.rawResponse);
177
+ throw new SuwardSDK.NotFoundError(_response.error.body, _response.rawResponse);
178
178
  default:
179
- throw new errors.SuwardApiError({
179
+ throw new errors.SuwardSDKError({
180
180
  statusCode: _response.error.statusCode,
181
181
  body: _response.error.body,
182
182
  rawResponse: _response.rawResponse,
@@ -187,10 +187,10 @@ export class StaticWalletsClient {
187
187
  });
188
188
  }
189
189
  /**
190
- * @param {SuwardApi.DeleteV1StaticWalletsStaticWalletIdRequest} request
190
+ * @param {SuwardSDK.DeleteV1StaticWalletsStaticWalletIdRequest} request
191
191
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
192
192
  *
193
- * @throws {@link SuwardApi.NotFoundError}
193
+ * @throws {@link SuwardSDK.NotFoundError}
194
194
  *
195
195
  * @example
196
196
  * await client.staticWallets.deleteStaticWallet({
@@ -223,9 +223,9 @@ export class StaticWalletsClient {
223
223
  if (_response.error.reason === "status-code") {
224
224
  switch (_response.error.statusCode) {
225
225
  case 404:
226
- throw new SuwardApi.NotFoundError(_response.error.body, _response.rawResponse);
226
+ throw new SuwardSDK.NotFoundError(_response.error.body, _response.rawResponse);
227
227
  default:
228
- throw new errors.SuwardApiError({
228
+ throw new errors.SuwardSDKError({
229
229
  statusCode: _response.error.statusCode,
230
230
  body: _response.error.body,
231
231
  rawResponse: _response.rawResponse,
@@ -236,10 +236,10 @@ export class StaticWalletsClient {
236
236
  });
237
237
  }
238
238
  /**
239
- * @param {SuwardApi.CryptopayUpdateStaticWalletRequest} request
239
+ * @param {SuwardSDK.CryptopayUpdateStaticWalletRequest} request
240
240
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
241
241
  *
242
- * @throws {@link SuwardApi.BadRequestError}
242
+ * @throws {@link SuwardSDK.BadRequestError}
243
243
  *
244
244
  * @example
245
245
  * await client.staticWallets.updateStaticWallet({
@@ -278,9 +278,9 @@ export class StaticWalletsClient {
278
278
  if (_response.error.reason === "status-code") {
279
279
  switch (_response.error.statusCode) {
280
280
  case 400:
281
- throw new SuwardApi.BadRequestError(_response.error.body, _response.rawResponse);
281
+ throw new SuwardSDK.BadRequestError(_response.error.body, _response.rawResponse);
282
282
  default:
283
- throw new errors.SuwardApiError({
283
+ throw new errors.SuwardSDKError({
284
284
  statusCode: _response.error.statusCode,
285
285
  body: _response.error.body,
286
286
  rawResponse: _response.rawResponse,
@@ -291,10 +291,10 @@ export class StaticWalletsClient {
291
291
  });
292
292
  }
293
293
  /**
294
- * @param {SuwardApi.GetV1StaticWalletsStaticWalletIdDepositsRequest} request
294
+ * @param {SuwardSDK.GetV1StaticWalletsStaticWalletIdDepositsRequest} request
295
295
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
296
296
  *
297
- * @throws {@link SuwardApi.NotFoundError}
297
+ * @throws {@link SuwardSDK.NotFoundError}
298
298
  *
299
299
  * @example
300
300
  * await client.staticWallets.listStaticWalletDeposits({
@@ -330,9 +330,9 @@ export class StaticWalletsClient {
330
330
  if (_response.error.reason === "status-code") {
331
331
  switch (_response.error.statusCode) {
332
332
  case 404:
333
- throw new SuwardApi.NotFoundError(_response.error.body, _response.rawResponse);
333
+ throw new SuwardSDK.NotFoundError(_response.error.body, _response.rawResponse);
334
334
  default:
335
- throw new errors.SuwardApiError({
335
+ throw new errors.SuwardSDKError({
336
336
  statusCode: _response.error.statusCode,
337
337
  body: _response.error.body,
338
338
  rawResponse: _response.rawResponse,
@@ -345,11 +345,11 @@ export class StaticWalletsClient {
345
345
  /**
346
346
  * Drive a synthetic deposit through its lifecycle on a test wallet (no on-chain activity, no balance credit). Test wallets only.
347
347
  *
348
- * @param {SuwardApi.CryptopaySimulateStaticDepositRequest} request
348
+ * @param {SuwardSDK.CryptopaySimulateStaticDepositRequest} request
349
349
  * @param {StaticWalletsClient.RequestOptions} requestOptions - Request-specific configuration.
350
350
  *
351
- * @throws {@link SuwardApi.BadRequestError}
352
- * @throws {@link SuwardApi.NotFoundError}
351
+ * @throws {@link SuwardSDK.BadRequestError}
352
+ * @throws {@link SuwardSDK.NotFoundError}
353
353
  *
354
354
  * @example
355
355
  * await client.staticWallets.simulateStaticWalletDeposit({
@@ -388,11 +388,11 @@ export class StaticWalletsClient {
388
388
  if (_response.error.reason === "status-code") {
389
389
  switch (_response.error.statusCode) {
390
390
  case 400:
391
- throw new SuwardApi.BadRequestError(_response.error.body, _response.rawResponse);
391
+ throw new SuwardSDK.BadRequestError(_response.error.body, _response.rawResponse);
392
392
  case 404:
393
- throw new SuwardApi.NotFoundError(_response.error.body, _response.rawResponse);
393
+ throw new SuwardSDK.NotFoundError(_response.error.body, _response.rawResponse);
394
394
  default:
395
- throw new errors.SuwardApiError({
395
+ throw new errors.SuwardSDKError({
396
396
  statusCode: _response.error.statusCode,
397
397
  body: _response.error.body,
398
398
  rawResponse: _response.rawResponse,
@@ -1,6 +1,6 @@
1
- import type * as SuwardApi from "../index.mjs";
1
+ import type * as SuwardSDK from "../index.mjs";
2
2
  export interface CryptopayListPaymentsResponse {
3
3
  hasMore?: boolean | undefined;
4
- items?: SuwardApi.CryptopayPaymentResponse[] | undefined;
4
+ items?: SuwardSDK.CryptopayPaymentResponse[] | undefined;
5
5
  lastId?: string | undefined;
6
6
  }
@@ -1,6 +1,6 @@
1
- import type * as SuwardApi from "../index.mjs";
1
+ import type * as SuwardSDK from "../index.mjs";
2
2
  export interface CryptopayListStaticDepositsResponse {
3
3
  hasMore?: boolean | undefined;
4
- items?: SuwardApi.CryptopayStaticDepositResponse[] | undefined;
4
+ items?: SuwardSDK.CryptopayStaticDepositResponse[] | undefined;
5
5
  lastId?: string | undefined;
6
6
  }
@@ -1,6 +1,6 @@
1
- import type * as SuwardApi from "../index.mjs";
1
+ import type * as SuwardSDK from "../index.mjs";
2
2
  export interface CryptopayListStaticWalletsResponse {
3
3
  hasMore?: boolean | undefined;
4
- items?: SuwardApi.CryptopayStaticWalletResponse[] | undefined;
4
+ items?: SuwardSDK.CryptopayStaticWalletResponse[] | undefined;
5
5
  lastId?: string | undefined;
6
6
  }
@@ -1,4 +1,4 @@
1
- import type * as SuwardApi from "../index.mjs";
1
+ import type * as SuwardSDK from "../index.mjs";
2
2
  export interface CryptopayPaymentResponse {
3
3
  acceptedAt?: number | undefined;
4
4
  activatedAt?: number | undefined;
@@ -18,10 +18,10 @@ export interface CryptopayPaymentResponse {
18
18
  networkFee?: string | undefined;
19
19
  paymentWindowSeconds?: number | undefined;
20
20
  projectId?: string | undefined;
21
- redirect?: SuwardApi.CryptopayRedirectConfigDto | undefined;
22
- status?: SuwardApi.CryptopayPaymentStatusEnum | undefined;
23
- subStatus?: SuwardApi.CryptopayPaymentSubStatusEnum | undefined;
24
- transactions?: SuwardApi.CryptopayTransactionResponse[] | undefined;
21
+ redirect?: SuwardSDK.CryptopayRedirectConfigDto | undefined;
22
+ status?: SuwardSDK.CryptopayPaymentStatusEnum | undefined;
23
+ subStatus?: SuwardSDK.CryptopayPaymentSubStatusEnum | undefined;
24
+ transactions?: SuwardSDK.CryptopayTransactionResponse[] | undefined;
25
25
  underpaymentTolerance?: string | undefined;
26
26
  updatedAt?: number | undefined;
27
27
  webhookUrl?: string | undefined;
@@ -1,4 +1,4 @@
1
- import type * as SuwardApi from "../index.mjs";
1
+ import type * as SuwardSDK from "../index.mjs";
2
2
  export interface CryptopayPublicPaymentResponse {
3
3
  activatedAt?: number | undefined;
4
4
  activationFlowSeconds?: number | undefined;
@@ -10,9 +10,9 @@ export interface CryptopayPublicPaymentResponse {
10
10
  expiresAt?: number | undefined;
11
11
  id?: string | undefined;
12
12
  paymentWindowSeconds?: number | undefined;
13
- redirect?: SuwardApi.CryptopayPublicRedirect | undefined;
14
- status?: SuwardApi.CryptopayPaymentStatusEnum | undefined;
15
- subStatus?: SuwardApi.CryptopayPaymentSubStatusEnum | undefined;
13
+ redirect?: SuwardSDK.CryptopayPublicRedirect | undefined;
14
+ status?: SuwardSDK.CryptopayPaymentStatusEnum | undefined;
15
+ subStatus?: SuwardSDK.CryptopayPaymentSubStatusEnum | undefined;
16
16
  underpaymentTolerance?: string | undefined;
17
17
  updatedAt?: number | undefined;
18
18
  }
@@ -23,7 +23,7 @@ export class HeaderAuthProvider {
23
23
  return __awaiter(this, arguments, void 0, function* ({ endpointMetadata, } = {}) {
24
24
  const headerValue = yield core.Supplier.get(this.options[PARAM_KEY]);
25
25
  if (headerValue == null) {
26
- throw new errors.SuwardApiError({
26
+ throw new errors.SuwardSDKError({
27
27
  message: HeaderAuthProvider.AUTH_CONFIG_ERROR_MESSAGE,
28
28
  });
29
29
  }
@@ -1,5 +1,5 @@
1
1
  import type * as core from "../core/index.mjs";
2
- export declare class SuwardApiError extends Error {
2
+ export declare class SuwardSDKError extends Error {
3
3
  readonly statusCode?: number;
4
4
  readonly body?: unknown;
5
5
  readonly rawResponse?: core.RawResponse;
@@ -1,13 +1,13 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import { toJson } from "../core/json.mjs";
3
- export class SuwardApiError extends Error {
3
+ export class SuwardSDKError extends Error {
4
4
  constructor({ message, statusCode, body, rawResponse, cause, }) {
5
5
  super(buildMessage({ message, statusCode, body }));
6
6
  Object.setPrototypeOf(this, new.target.prototype);
7
7
  if (Error.captureStackTrace) {
8
8
  Error.captureStackTrace(this, this.constructor);
9
9
  }
10
- this.name = "SuwardApiError";
10
+ this.name = "SuwardSDKError";
11
11
  this.statusCode = statusCode;
12
12
  this.body = body;
13
13
  this.rawResponse = rawResponse;
@@ -1,4 +1,4 @@
1
- export declare class SuwardApiTimeoutError extends Error {
1
+ export declare class SuwardSDKTimeoutError extends Error {
2
2
  readonly cause?: unknown;
3
3
  constructor(message: string, opts?: {
4
4
  cause?: unknown;
@@ -1,12 +1,12 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export class SuwardApiTimeoutError extends Error {
2
+ export class SuwardSDKTimeoutError extends Error {
3
3
  constructor(message, opts) {
4
4
  super(message);
5
5
  Object.setPrototypeOf(this, new.target.prototype);
6
6
  if (Error.captureStackTrace) {
7
7
  Error.captureStackTrace(this, this.constructor);
8
8
  }
9
- this.name = "SuwardApiTimeoutError";
9
+ this.name = "SuwardSDKTimeoutError";
10
10
  if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
11
11
  this.cause = opts.cause;
12
12
  }
@@ -3,28 +3,28 @@ import * as errors from "./index.mjs";
3
3
  export function handleNonStatusCodeError(error, rawResponse, method, path) {
4
4
  switch (error.reason) {
5
5
  case "non-json":
6
- throw new errors.SuwardApiError({
6
+ throw new errors.SuwardSDKError({
7
7
  statusCode: error.statusCode,
8
8
  body: error.rawBody,
9
9
  rawResponse: rawResponse,
10
10
  });
11
11
  case "body-is-null":
12
- throw new errors.SuwardApiError({
12
+ throw new errors.SuwardSDKError({
13
13
  statusCode: error.statusCode,
14
14
  rawResponse: rawResponse,
15
15
  });
16
16
  case "timeout":
17
- throw new errors.SuwardApiTimeoutError(`Timeout exceeded when calling ${method} ${path}.`, {
17
+ throw new errors.SuwardSDKTimeoutError(`Timeout exceeded when calling ${method} ${path}.`, {
18
18
  cause: error.cause,
19
19
  });
20
20
  case "unknown":
21
- throw new errors.SuwardApiError({
21
+ throw new errors.SuwardSDKError({
22
22
  message: error.errorMessage,
23
23
  rawResponse: rawResponse,
24
24
  cause: error.cause,
25
25
  });
26
26
  default:
27
- throw new errors.SuwardApiError({
27
+ throw new errors.SuwardSDKError({
28
28
  message: "Unknown error",
29
29
  rawResponse: rawResponse,
30
30
  });
@@ -1,2 +1,2 @@
1
- export { SuwardApiError } from "./SuwardApiError.mjs";
2
- export { SuwardApiTimeoutError } from "./SuwardApiTimeoutError.mjs";
1
+ export { SuwardSDKError } from "./SuwardSDKError.mjs";
2
+ export { SuwardSDKTimeoutError } from "./SuwardSDKTimeoutError.mjs";
@@ -1,2 +1,2 @@
1
- export { SuwardApiError } from "./SuwardApiError.mjs";
2
- export { SuwardApiTimeoutError } from "./SuwardApiTimeoutError.mjs";
1
+ export { SuwardSDKError } from "./SuwardSDKError.mjs";
2
+ export { SuwardSDKTimeoutError } from "./SuwardSDKTimeoutError.mjs";
@@ -1,5 +1,5 @@
1
- export * as SuwardApi from "./api/index.mjs";
1
+ export * as SuwardSDK from "./api/index.mjs";
2
2
  export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
3
- export { SuwardApiClient } from "./Client.mjs";
4
- export { SuwardApiError, SuwardApiTimeoutError } from "./errors/index.mjs";
3
+ export { SuwardSDKClient } from "./Client.mjs";
4
+ export { SuwardSDKError, SuwardSDKTimeoutError } from "./errors/index.mjs";
5
5
  export * from "./exports.mjs";
@@ -1,4 +1,4 @@
1
- export * as SuwardApi from "./api/index.mjs";
2
- export { SuwardApiClient } from "./Client.mjs";
3
- export { SuwardApiError, SuwardApiTimeoutError } from "./errors/index.mjs";
1
+ export * as SuwardSDK from "./api/index.mjs";
2
+ export { SuwardSDKClient } from "./Client.mjs";
3
+ export { SuwardSDKError, SuwardSDKTimeoutError } from "./errors/index.mjs";
4
4
  export * from "./exports.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.14";
1
+ export declare const SDK_VERSION = "0.0.15";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.14";
1
+ export const SDK_VERSION = "0.0.15";