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,16 +1,16 @@
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.SuwardApiError = void 0;
4
+ exports.SuwardSDKError = void 0;
5
5
  const json_js_1 = require("../core/json.js");
6
- class SuwardApiError extends Error {
6
+ class SuwardSDKError extends Error {
7
7
  constructor({ message, statusCode, body, rawResponse, cause, }) {
8
8
  super(buildMessage({ message, statusCode, body }));
9
9
  Object.setPrototypeOf(this, new.target.prototype);
10
10
  if (Error.captureStackTrace) {
11
11
  Error.captureStackTrace(this, this.constructor);
12
12
  }
13
- this.name = "SuwardApiError";
13
+ this.name = "SuwardSDKError";
14
14
  this.statusCode = statusCode;
15
15
  this.body = body;
16
16
  this.rawResponse = rawResponse;
@@ -19,7 +19,7 @@ class SuwardApiError extends Error {
19
19
  }
20
20
  }
21
21
  }
22
- exports.SuwardApiError = SuwardApiError;
22
+ exports.SuwardSDKError = SuwardSDKError;
23
23
  function buildMessage({ message, statusCode, body, }) {
24
24
  const lines = [];
25
25
  if (message != null) {
@@ -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,18 +1,18 @@
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.SuwardApiTimeoutError = void 0;
5
- class SuwardApiTimeoutError extends Error {
4
+ exports.SuwardSDKTimeoutError = void 0;
5
+ class SuwardSDKTimeoutError extends Error {
6
6
  constructor(message, opts) {
7
7
  super(message);
8
8
  Object.setPrototypeOf(this, new.target.prototype);
9
9
  if (Error.captureStackTrace) {
10
10
  Error.captureStackTrace(this, this.constructor);
11
11
  }
12
- this.name = "SuwardApiTimeoutError";
12
+ this.name = "SuwardSDKTimeoutError";
13
13
  if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
14
14
  this.cause = opts.cause;
15
15
  }
16
16
  }
17
17
  }
18
- exports.SuwardApiTimeoutError = SuwardApiTimeoutError;
18
+ exports.SuwardSDKTimeoutError = SuwardSDKTimeoutError;
@@ -39,28 +39,28 @@ const errors = __importStar(require("./index.js"));
39
39
  function handleNonStatusCodeError(error, rawResponse, method, path) {
40
40
  switch (error.reason) {
41
41
  case "non-json":
42
- throw new errors.SuwardApiError({
42
+ throw new errors.SuwardSDKError({
43
43
  statusCode: error.statusCode,
44
44
  body: error.rawBody,
45
45
  rawResponse: rawResponse,
46
46
  });
47
47
  case "body-is-null":
48
- throw new errors.SuwardApiError({
48
+ throw new errors.SuwardSDKError({
49
49
  statusCode: error.statusCode,
50
50
  rawResponse: rawResponse,
51
51
  });
52
52
  case "timeout":
53
- throw new errors.SuwardApiTimeoutError(`Timeout exceeded when calling ${method} ${path}.`, {
53
+ throw new errors.SuwardSDKTimeoutError(`Timeout exceeded when calling ${method} ${path}.`, {
54
54
  cause: error.cause,
55
55
  });
56
56
  case "unknown":
57
- throw new errors.SuwardApiError({
57
+ throw new errors.SuwardSDKError({
58
58
  message: error.errorMessage,
59
59
  rawResponse: rawResponse,
60
60
  cause: error.cause,
61
61
  });
62
62
  default:
63
- throw new errors.SuwardApiError({
63
+ throw new errors.SuwardSDKError({
64
64
  message: "Unknown error",
65
65
  rawResponse: rawResponse,
66
66
  });
@@ -1,2 +1,2 @@
1
- export { SuwardApiError } from "./SuwardApiError.js";
2
- export { SuwardApiTimeoutError } from "./SuwardApiTimeoutError.js";
1
+ export { SuwardSDKError } from "./SuwardSDKError.js";
2
+ export { SuwardSDKTimeoutError } from "./SuwardSDKTimeoutError.js";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SuwardApiTimeoutError = exports.SuwardApiError = void 0;
4
- var SuwardApiError_js_1 = require("./SuwardApiError.js");
5
- Object.defineProperty(exports, "SuwardApiError", { enumerable: true, get: function () { return SuwardApiError_js_1.SuwardApiError; } });
6
- var SuwardApiTimeoutError_js_1 = require("./SuwardApiTimeoutError.js");
7
- Object.defineProperty(exports, "SuwardApiTimeoutError", { enumerable: true, get: function () { return SuwardApiTimeoutError_js_1.SuwardApiTimeoutError; } });
3
+ exports.SuwardSDKTimeoutError = exports.SuwardSDKError = void 0;
4
+ var SuwardSDKError_js_1 = require("./SuwardSDKError.js");
5
+ Object.defineProperty(exports, "SuwardSDKError", { enumerable: true, get: function () { return SuwardSDKError_js_1.SuwardSDKError; } });
6
+ var SuwardSDKTimeoutError_js_1 = require("./SuwardSDKTimeoutError.js");
7
+ Object.defineProperty(exports, "SuwardSDKTimeoutError", { enumerable: true, get: function () { return SuwardSDKTimeoutError_js_1.SuwardSDKTimeoutError; } });
@@ -1,5 +1,5 @@
1
- export * as SuwardApi from "./api/index.js";
1
+ export * as SuwardSDK from "./api/index.js";
2
2
  export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
3
- export { SuwardApiClient } from "./Client.js";
4
- export { SuwardApiError, SuwardApiTimeoutError } from "./errors/index.js";
3
+ export { SuwardSDKClient } from "./Client.js";
4
+ export { SuwardSDKError, SuwardSDKTimeoutError } from "./errors/index.js";
5
5
  export * from "./exports.js";
package/dist/cjs/index.js CHANGED
@@ -36,11 +36,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.SuwardApiTimeoutError = exports.SuwardApiError = exports.SuwardApiClient = exports.SuwardApi = void 0;
40
- exports.SuwardApi = __importStar(require("./api/index.js"));
39
+ exports.SuwardSDKTimeoutError = exports.SuwardSDKError = exports.SuwardSDKClient = exports.SuwardSDK = void 0;
40
+ exports.SuwardSDK = __importStar(require("./api/index.js"));
41
41
  var Client_js_1 = require("./Client.js");
42
- Object.defineProperty(exports, "SuwardApiClient", { enumerable: true, get: function () { return Client_js_1.SuwardApiClient; } });
42
+ Object.defineProperty(exports, "SuwardSDKClient", { enumerable: true, get: function () { return Client_js_1.SuwardSDKClient; } });
43
43
  var index_js_1 = require("./errors/index.js");
44
- Object.defineProperty(exports, "SuwardApiError", { enumerable: true, get: function () { return index_js_1.SuwardApiError; } });
45
- Object.defineProperty(exports, "SuwardApiTimeoutError", { enumerable: true, get: function () { return index_js_1.SuwardApiTimeoutError; } });
44
+ Object.defineProperty(exports, "SuwardSDKError", { enumerable: true, get: function () { return index_js_1.SuwardSDKError; } });
45
+ Object.defineProperty(exports, "SuwardSDKTimeoutError", { enumerable: true, get: function () { return index_js_1.SuwardSDKTimeoutError; } });
46
46
  __exportStar(require("./exports.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.14";
1
+ export declare const SDK_VERSION = "0.0.15";
@@ -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.14";
4
+ exports.SDK_VERSION = "0.0.15";
@@ -5,9 +5,9 @@ import * as core from "./core/index.mjs";
5
5
  export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
- "X-Fern-SDK-Name": "@suward/sdk",
9
- "X-Fern-SDK-Version": "0.0.14",
10
- "User-Agent": "@suward/sdk/0.0.14",
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",
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,16 +3,16 @@ import { StaticWalletsClient } from "./api/resources/staticWallets/client/Client
3
3
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
4
4
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.mjs";
5
5
  import * as core from "./core/index.mjs";
6
- export declare namespace SuwardApiClient {
6
+ export declare namespace SuwardSDKClient {
7
7
  type Options = BaseClientOptions;
8
8
  interface RequestOptions extends BaseRequestOptions {
9
9
  }
10
10
  }
11
- export declare class SuwardApiClient {
12
- protected readonly _options: NormalizedClientOptionsWithAuth<SuwardApiClient.Options>;
11
+ export declare class SuwardSDKClient {
12
+ protected readonly _options: NormalizedClientOptionsWithAuth<SuwardSDKClient.Options>;
13
13
  protected _payments: PaymentsClient | undefined;
14
14
  protected _staticWallets: StaticWalletsClient | undefined;
15
- constructor(options: SuwardApiClient.Options);
15
+ constructor(options: SuwardSDKClient.Options);
16
16
  get payments(): PaymentsClient;
17
17
  get staticWallets(): StaticWalletsClient;
18
18
  /**
@@ -12,7 +12,7 @@ import { PaymentsClient } from "./api/resources/payments/client/Client.mjs";
12
12
  import { StaticWalletsClient } from "./api/resources/staticWallets/client/Client.mjs";
13
13
  import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
14
14
  import * as core from "./core/index.mjs";
15
- export class SuwardApiClient {
15
+ export class SuwardSDKClient {
16
16
  constructor(options) {
17
17
  this._options = normalizeClientOptionsWithAuth(options);
18
18
  }
@@ -1,6 +1,6 @@
1
1
  import type * as core from "../../core/index.mjs";
2
2
  import * as errors from "../../errors/index.mjs";
3
- import type * as SuwardApi from "../index.mjs";
4
- export declare class BadRequestError extends errors.SuwardApiError {
5
- constructor(body: SuwardApi.ControllerErrorResponse, rawResponse?: core.RawResponse);
3
+ import type * as SuwardSDK from "../index.mjs";
4
+ export declare class BadRequestError extends errors.SuwardSDKError {
5
+ constructor(body: SuwardSDK.ControllerErrorResponse, rawResponse?: core.RawResponse);
6
6
  }
@@ -1,6 +1,6 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as errors from "../../errors/index.mjs";
3
- export class BadRequestError extends errors.SuwardApiError {
3
+ export class BadRequestError extends errors.SuwardSDKError {
4
4
  constructor(body, rawResponse) {
5
5
  super({
6
6
  message: "BadRequestError",
@@ -1,6 +1,6 @@
1
1
  import type * as core from "../../core/index.mjs";
2
2
  import * as errors from "../../errors/index.mjs";
3
- import type * as SuwardApi from "../index.mjs";
4
- export declare class InternalServerError extends errors.SuwardApiError {
5
- constructor(body: SuwardApi.ControllerErrorResponse, rawResponse?: core.RawResponse);
3
+ import type * as SuwardSDK from "../index.mjs";
4
+ export declare class InternalServerError extends errors.SuwardSDKError {
5
+ constructor(body: SuwardSDK.ControllerErrorResponse, rawResponse?: core.RawResponse);
6
6
  }
@@ -1,6 +1,6 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as errors from "../../errors/index.mjs";
3
- export class InternalServerError extends errors.SuwardApiError {
3
+ export class InternalServerError extends errors.SuwardSDKError {
4
4
  constructor(body, rawResponse) {
5
5
  super({
6
6
  message: "InternalServerError",
@@ -1,6 +1,6 @@
1
1
  import type * as core from "../../core/index.mjs";
2
2
  import * as errors from "../../errors/index.mjs";
3
- import type * as SuwardApi from "../index.mjs";
4
- export declare class NotFoundError extends errors.SuwardApiError {
5
- constructor(body: SuwardApi.ControllerErrorResponse, rawResponse?: core.RawResponse);
3
+ import type * as SuwardSDK from "../index.mjs";
4
+ export declare class NotFoundError extends errors.SuwardSDKError {
5
+ constructor(body: SuwardSDK.ControllerErrorResponse, rawResponse?: core.RawResponse);
6
6
  }
@@ -1,6 +1,6 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as errors from "../../errors/index.mjs";
3
- export class NotFoundError extends errors.SuwardApiError {
3
+ export class NotFoundError extends errors.SuwardSDKError {
4
4
  constructor(body, rawResponse) {
5
5
  super({
6
6
  message: "NotFoundError",
@@ -1,6 +1,6 @@
1
1
  import type * as core from "../../core/index.mjs";
2
2
  import * as errors from "../../errors/index.mjs";
3
- import type * as SuwardApi from "../index.mjs";
4
- export declare class UnauthorizedError extends errors.SuwardApiError {
5
- constructor(body: SuwardApi.ControllerErrorResponse, rawResponse?: core.RawResponse);
3
+ import type * as SuwardSDK from "../index.mjs";
4
+ export declare class UnauthorizedError extends errors.SuwardSDKError {
5
+ constructor(body: SuwardSDK.ControllerErrorResponse, rawResponse?: core.RawResponse);
6
6
  }
@@ -1,6 +1,6 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as errors from "../../errors/index.mjs";
3
- export class UnauthorizedError extends errors.SuwardApiError {
3
+ export class UnauthorizedError extends errors.SuwardSDKError {
4
4
  constructor(body, rawResponse) {
5
5
  super({
6
6
  message: "UnauthorizedError",
@@ -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 PaymentsClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
@@ -13,80 +13,80 @@ export declare class PaymentsClient {
13
13
  /**
14
14
  * List payments for a project
15
15
  *
16
- * @param {SuwardApi.GetV1PaymentsRequest} request
16
+ * @param {SuwardSDK.GetV1PaymentsRequest} request
17
17
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
18
18
  *
19
- * @throws {@link SuwardApi.BadRequestError}
20
- * @throws {@link SuwardApi.UnauthorizedError}
21
- * @throws {@link SuwardApi.InternalServerError}
19
+ * @throws {@link SuwardSDK.BadRequestError}
20
+ * @throws {@link SuwardSDK.UnauthorizedError}
21
+ * @throws {@link SuwardSDK.InternalServerError}
22
22
  *
23
23
  * @example
24
24
  * await client.payments.listPayments()
25
25
  */
26
- listPayments(request?: SuwardApi.GetV1PaymentsRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayListPaymentsResponse>;
26
+ listPayments(request?: SuwardSDK.GetV1PaymentsRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayListPaymentsResponse>;
27
27
  private __listPayments;
28
28
  /**
29
29
  * Create a new payment
30
30
  *
31
- * @param {SuwardApi.CryptopayCreatePaymentRequest} request
31
+ * @param {SuwardSDK.CryptopayCreatePaymentRequest} request
32
32
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
33
33
  *
34
- * @throws {@link SuwardApi.BadRequestError}
35
- * @throws {@link SuwardApi.UnauthorizedError}
36
- * @throws {@link SuwardApi.InternalServerError}
34
+ * @throws {@link SuwardSDK.BadRequestError}
35
+ * @throws {@link SuwardSDK.UnauthorizedError}
36
+ * @throws {@link SuwardSDK.InternalServerError}
37
37
  *
38
38
  * @example
39
39
  * await client.payments.createPayment()
40
40
  */
41
- createPayment(request?: SuwardApi.CryptopayCreatePaymentRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayPaymentResponse>;
41
+ createPayment(request?: SuwardSDK.CryptopayCreatePaymentRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayPaymentResponse>;
42
42
  private __createPayment;
43
43
  /**
44
44
  * Returns full payment details when called with an API key (merchant view).
45
45
  * Returns limited payment details when called without an API key (customer view).
46
46
  *
47
- * @param {SuwardApi.GetV1PaymentsPaymentIdRequest} request
47
+ * @param {SuwardSDK.GetV1PaymentsPaymentIdRequest} request
48
48
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
49
49
  *
50
- * @throws {@link SuwardApi.InternalServerError}
50
+ * @throws {@link SuwardSDK.InternalServerError}
51
51
  *
52
52
  * @example
53
53
  * await client.payments.getPayment({
54
54
  * paymentId: "paymentId"
55
55
  * })
56
56
  */
57
- getPayment(request: SuwardApi.GetV1PaymentsPaymentIdRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.GetV1PaymentsPaymentIdResponse>;
57
+ getPayment(request: SuwardSDK.GetV1PaymentsPaymentIdRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.GetV1PaymentsPaymentIdResponse>;
58
58
  private __getPayment;
59
59
  /**
60
60
  * Cancel a payment
61
61
  *
62
- * @param {SuwardApi.PostV1PaymentsPaymentIdCancelRequest} request
62
+ * @param {SuwardSDK.PostV1PaymentsPaymentIdCancelRequest} request
63
63
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
64
64
  *
65
- * @throws {@link SuwardApi.UnauthorizedError}
66
- * @throws {@link SuwardApi.InternalServerError}
65
+ * @throws {@link SuwardSDK.UnauthorizedError}
66
+ * @throws {@link SuwardSDK.InternalServerError}
67
67
  *
68
68
  * @example
69
69
  * await client.payments.cancelPayment({
70
70
  * paymentId: "paymentId"
71
71
  * })
72
72
  */
73
- cancelPayment(request: SuwardApi.PostV1PaymentsPaymentIdCancelRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayPaymentResponse>;
73
+ cancelPayment(request: SuwardSDK.PostV1PaymentsPaymentIdCancelRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayPaymentResponse>;
74
74
  private __cancelPayment;
75
75
  /**
76
76
  * Simulate payment status change (test mode only)
77
77
  *
78
- * @param {SuwardApi.CryptopaySimulatePaymentRequest} request
78
+ * @param {SuwardSDK.CryptopaySimulatePaymentRequest} request
79
79
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
80
80
  *
81
- * @throws {@link SuwardApi.BadRequestError}
82
- * @throws {@link SuwardApi.UnauthorizedError}
83
- * @throws {@link SuwardApi.InternalServerError}
81
+ * @throws {@link SuwardSDK.BadRequestError}
82
+ * @throws {@link SuwardSDK.UnauthorizedError}
83
+ * @throws {@link SuwardSDK.InternalServerError}
84
84
  *
85
85
  * @example
86
86
  * await client.payments.simulatePayment({
87
87
  * paymentId: "paymentId"
88
88
  * })
89
89
  */
90
- simulatePayment(request: SuwardApi.CryptopaySimulatePaymentRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardApi.CryptopayPaymentResponse>;
90
+ simulatePayment(request: SuwardSDK.CryptopaySimulatePaymentRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<SuwardSDK.CryptopayPaymentResponse>;
91
91
  private __simulatePayment;
92
92
  }
@@ -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 PaymentsClient {
29
29
  constructor(options) {
30
30
  this._options = normalizeClientOptionsWithAuth(options);
@@ -32,12 +32,12 @@ export class PaymentsClient {
32
32
  /**
33
33
  * List payments for a project
34
34
  *
35
- * @param {SuwardApi.GetV1PaymentsRequest} request
35
+ * @param {SuwardSDK.GetV1PaymentsRequest} request
36
36
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
37
37
  *
38
- * @throws {@link SuwardApi.BadRequestError}
39
- * @throws {@link SuwardApi.UnauthorizedError}
40
- * @throws {@link SuwardApi.InternalServerError}
38
+ * @throws {@link SuwardSDK.BadRequestError}
39
+ * @throws {@link SuwardSDK.UnauthorizedError}
40
+ * @throws {@link SuwardSDK.InternalServerError}
41
41
  *
42
42
  * @example
43
43
  * await client.payments.listPayments()
@@ -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 { order, limit, lastId } = request;
51
+ const { ordeddddr, limit, lastId } = request;
52
52
  const _queryParams = {
53
- order,
53
+ ordeddddr,
54
54
  limit,
55
55
  lastId,
56
56
  };
@@ -80,13 +80,13 @@ export class PaymentsClient {
80
80
  if (_response.error.reason === "status-code") {
81
81
  switch (_response.error.statusCode) {
82
82
  case 400:
83
- throw new SuwardApi.BadRequestError(_response.error.body, _response.rawResponse);
83
+ throw new SuwardSDK.BadRequestError(_response.error.body, _response.rawResponse);
84
84
  case 401:
85
- throw new SuwardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
85
+ throw new SuwardSDK.UnauthorizedError(_response.error.body, _response.rawResponse);
86
86
  case 500:
87
- throw new SuwardApi.InternalServerError(_response.error.body, _response.rawResponse);
87
+ throw new SuwardSDK.InternalServerError(_response.error.body, _response.rawResponse);
88
88
  default:
89
- throw new errors.SuwardApiError({
89
+ throw new errors.SuwardSDKError({
90
90
  statusCode: _response.error.statusCode,
91
91
  body: _response.error.body,
92
92
  rawResponse: _response.rawResponse,
@@ -99,12 +99,12 @@ export class PaymentsClient {
99
99
  /**
100
100
  * Create a new payment
101
101
  *
102
- * @param {SuwardApi.CryptopayCreatePaymentRequest} request
102
+ * @param {SuwardSDK.CryptopayCreatePaymentRequest} request
103
103
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
104
104
  *
105
- * @throws {@link SuwardApi.BadRequestError}
106
- * @throws {@link SuwardApi.UnauthorizedError}
107
- * @throws {@link SuwardApi.InternalServerError}
105
+ * @throws {@link SuwardSDK.BadRequestError}
106
+ * @throws {@link SuwardSDK.UnauthorizedError}
107
+ * @throws {@link SuwardSDK.InternalServerError}
108
108
  *
109
109
  * @example
110
110
  * await client.payments.createPayment()
@@ -137,13 +137,13 @@ export class PaymentsClient {
137
137
  if (_response.error.reason === "status-code") {
138
138
  switch (_response.error.statusCode) {
139
139
  case 400:
140
- throw new SuwardApi.BadRequestError(_response.error.body, _response.rawResponse);
140
+ throw new SuwardSDK.BadRequestError(_response.error.body, _response.rawResponse);
141
141
  case 401:
142
- throw new SuwardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
142
+ throw new SuwardSDK.UnauthorizedError(_response.error.body, _response.rawResponse);
143
143
  case 500:
144
- throw new SuwardApi.InternalServerError(_response.error.body, _response.rawResponse);
144
+ throw new SuwardSDK.InternalServerError(_response.error.body, _response.rawResponse);
145
145
  default:
146
- throw new errors.SuwardApiError({
146
+ throw new errors.SuwardSDKError({
147
147
  statusCode: _response.error.statusCode,
148
148
  body: _response.error.body,
149
149
  rawResponse: _response.rawResponse,
@@ -157,10 +157,10 @@ export class PaymentsClient {
157
157
  * Returns full payment details when called with an API key (merchant view).
158
158
  * Returns limited payment details when called without an API key (customer view).
159
159
  *
160
- * @param {SuwardApi.GetV1PaymentsPaymentIdRequest} request
160
+ * @param {SuwardSDK.GetV1PaymentsPaymentIdRequest} request
161
161
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
162
162
  *
163
- * @throws {@link SuwardApi.InternalServerError}
163
+ * @throws {@link SuwardSDK.InternalServerError}
164
164
  *
165
165
  * @example
166
166
  * await client.payments.getPayment({
@@ -196,9 +196,9 @@ export class PaymentsClient {
196
196
  if (_response.error.reason === "status-code") {
197
197
  switch (_response.error.statusCode) {
198
198
  case 500:
199
- throw new SuwardApi.InternalServerError(_response.error.body, _response.rawResponse);
199
+ throw new SuwardSDK.InternalServerError(_response.error.body, _response.rawResponse);
200
200
  default:
201
- throw new errors.SuwardApiError({
201
+ throw new errors.SuwardSDKError({
202
202
  statusCode: _response.error.statusCode,
203
203
  body: _response.error.body,
204
204
  rawResponse: _response.rawResponse,
@@ -211,11 +211,11 @@ export class PaymentsClient {
211
211
  /**
212
212
  * Cancel a payment
213
213
  *
214
- * @param {SuwardApi.PostV1PaymentsPaymentIdCancelRequest} request
214
+ * @param {SuwardSDK.PostV1PaymentsPaymentIdCancelRequest} request
215
215
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
216
216
  *
217
- * @throws {@link SuwardApi.UnauthorizedError}
218
- * @throws {@link SuwardApi.InternalServerError}
217
+ * @throws {@link SuwardSDK.UnauthorizedError}
218
+ * @throws {@link SuwardSDK.InternalServerError}
219
219
  *
220
220
  * @example
221
221
  * await client.payments.cancelPayment({
@@ -248,11 +248,11 @@ export class PaymentsClient {
248
248
  if (_response.error.reason === "status-code") {
249
249
  switch (_response.error.statusCode) {
250
250
  case 401:
251
- throw new SuwardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
251
+ throw new SuwardSDK.UnauthorizedError(_response.error.body, _response.rawResponse);
252
252
  case 500:
253
- throw new SuwardApi.InternalServerError(_response.error.body, _response.rawResponse);
253
+ throw new SuwardSDK.InternalServerError(_response.error.body, _response.rawResponse);
254
254
  default:
255
- throw new errors.SuwardApiError({
255
+ throw new errors.SuwardSDKError({
256
256
  statusCode: _response.error.statusCode,
257
257
  body: _response.error.body,
258
258
  rawResponse: _response.rawResponse,
@@ -265,12 +265,12 @@ export class PaymentsClient {
265
265
  /**
266
266
  * Simulate payment status change (test mode only)
267
267
  *
268
- * @param {SuwardApi.CryptopaySimulatePaymentRequest} request
268
+ * @param {SuwardSDK.CryptopaySimulatePaymentRequest} request
269
269
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
270
270
  *
271
- * @throws {@link SuwardApi.BadRequestError}
272
- * @throws {@link SuwardApi.UnauthorizedError}
273
- * @throws {@link SuwardApi.InternalServerError}
271
+ * @throws {@link SuwardSDK.BadRequestError}
272
+ * @throws {@link SuwardSDK.UnauthorizedError}
273
+ * @throws {@link SuwardSDK.InternalServerError}
274
274
  *
275
275
  * @example
276
276
  * await client.payments.simulatePayment({
@@ -306,13 +306,13 @@ export class PaymentsClient {
306
306
  if (_response.error.reason === "status-code") {
307
307
  switch (_response.error.statusCode) {
308
308
  case 400:
309
- throw new SuwardApi.BadRequestError(_response.error.body, _response.rawResponse);
309
+ throw new SuwardSDK.BadRequestError(_response.error.body, _response.rawResponse);
310
310
  case 401:
311
- throw new SuwardApi.UnauthorizedError(_response.error.body, _response.rawResponse);
311
+ throw new SuwardSDK.UnauthorizedError(_response.error.body, _response.rawResponse);
312
312
  case 500:
313
- throw new SuwardApi.InternalServerError(_response.error.body, _response.rawResponse);
313
+ throw new SuwardSDK.InternalServerError(_response.error.body, _response.rawResponse);
314
314
  default:
315
- throw new errors.SuwardApiError({
315
+ throw new errors.SuwardSDKError({
316
316
  statusCode: _response.error.statusCode,
317
317
  body: _response.error.body,
318
318
  rawResponse: _response.rawResponse,
@@ -1,4 +1,4 @@
1
- import type * as SuwardApi from "../../../../index.mjs";
1
+ import type * as SuwardSDK from "../../../../index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {}
@@ -11,7 +11,7 @@ export interface CryptopayCreatePaymentRequest {
11
11
  isTest?: boolean;
12
12
  metadata?: Record<string, unknown>;
13
13
  paymentWindowSeconds?: number;
14
- redirect?: SuwardApi.CryptopayRedirectConfigDto;
14
+ redirect?: SuwardSDK.CryptopayRedirectConfigDto;
15
15
  underpaymentTolerance?: string;
16
16
  webhookUrl?: string;
17
17
  }
@@ -1,4 +1,4 @@
1
- import type * as SuwardApi from "../../../../index.mjs";
1
+ import type * as SuwardSDK from "../../../../index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
@@ -9,5 +9,5 @@ export interface CryptopaySimulatePaymentRequest {
9
9
  /** Payment ID */
10
10
  paymentId: string;
11
11
  amount?: string;
12
- subStatus?: SuwardApi.CryptopayPaymentSubStatusEnum;
12
+ subStatus?: SuwardSDK.CryptopayPaymentSubStatusEnum;
13
13
  }
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export interface GetV1PaymentsRequest {
6
6
  /** Sort order (asc/desc) */
7
- order?: string;
7
+ ordeddddr?: string;
8
8
  /** Limit (default 100) */
9
9
  limit?: number;
10
10
  /** Last ID for pagination */
@@ -1,2 +1,2 @@
1
- import type * as SuwardApi from "../../../index.mjs";
2
- export type GetV1PaymentsPaymentIdResponse = SuwardApi.CryptopayPaymentResponse | SuwardApi.CryptopayPublicPaymentResponse;
1
+ import type * as SuwardSDK from "../../../index.mjs";
2
+ export type GetV1PaymentsPaymentIdResponse = SuwardSDK.CryptopayPaymentResponse | SuwardSDK.CryptopayPublicPaymentResponse;