@payabli/sdk-node 0.0.117 → 0.0.123

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 (117) hide show
  1. package/README.md +25 -13
  2. package/dist/cjs/BaseClient.d.ts +7 -7
  3. package/dist/cjs/BaseClient.js +3 -1
  4. package/dist/cjs/Client.d.ts +1 -2
  5. package/dist/cjs/api/errors/BadRequestError.js +5 -1
  6. package/dist/cjs/api/errors/ConflictError.js +5 -1
  7. package/dist/cjs/api/errors/ForbiddenError.js +5 -1
  8. package/dist/cjs/api/errors/InternalServerError.js +5 -1
  9. package/dist/cjs/api/errors/ServiceUnavailableError.js +5 -1
  10. package/dist/cjs/api/errors/UnauthorizedError.js +5 -1
  11. package/dist/cjs/api/resources/bill/client/Client.d.ts +1 -2
  12. package/dist/cjs/api/resources/boarding/client/Client.d.ts +1 -2
  13. package/dist/cjs/api/resources/chargeBacks/client/Client.d.ts +1 -2
  14. package/dist/cjs/api/resources/checkCapture/client/Client.d.ts +1 -2
  15. package/dist/cjs/api/resources/cloud/client/Client.d.ts +1 -2
  16. package/dist/cjs/api/resources/customer/client/Client.d.ts +1 -2
  17. package/dist/cjs/api/resources/export/client/Client.d.ts +1 -2
  18. package/dist/cjs/api/resources/hostedPaymentPages/client/Client.d.ts +1 -2
  19. package/dist/cjs/api/resources/import/client/Client.d.ts +1 -2
  20. package/dist/cjs/api/resources/invoice/client/Client.d.ts +6 -5
  21. package/dist/cjs/api/resources/invoice/client/Client.js +5 -3
  22. package/dist/cjs/api/resources/invoice/client/requests/AddInvoiceRequest.d.ts +5 -3
  23. package/dist/cjs/api/resources/lineItem/client/Client.d.ts +1 -2
  24. package/dist/cjs/api/resources/moneyIn/client/Client.d.ts +1 -2
  25. package/dist/cjs/api/resources/moneyIn/errors/CaptureError.js +5 -1
  26. package/dist/cjs/api/resources/moneyIn/errors/InvalidTransStatusError.js +5 -1
  27. package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +1 -2
  28. package/dist/cjs/api/resources/notification/client/Client.d.ts +14 -2
  29. package/dist/cjs/api/resources/notification/client/Client.js +13 -0
  30. package/dist/cjs/api/resources/notificationlogs/client/Client.d.ts +1 -2
  31. package/dist/cjs/api/resources/ocr/client/Client.d.ts +1 -2
  32. package/dist/cjs/api/resources/organization/client/Client.d.ts +1 -2
  33. package/dist/cjs/api/resources/paymentLink/client/Client.d.ts +4 -5
  34. package/dist/cjs/api/resources/paymentLink/client/Client.js +3 -3
  35. package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataBill.d.ts +1 -1
  36. package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataInvoice.d.ts +1 -1
  37. package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataOut.d.ts +1 -1
  38. package/dist/cjs/api/resources/paymentLink/types/PaymentPageRequestBody.d.ts +2 -2
  39. package/dist/cjs/api/resources/paymentMethodDomain/client/Client.d.ts +1 -2
  40. package/dist/cjs/api/resources/paypoint/client/Client.d.ts +1 -2
  41. package/dist/cjs/api/resources/query/client/Client.d.ts +1 -2
  42. package/dist/cjs/api/resources/statistic/client/Client.d.ts +1 -2
  43. package/dist/cjs/api/resources/subscription/client/Client.d.ts +1 -2
  44. package/dist/cjs/api/resources/templates/client/Client.d.ts +1 -2
  45. package/dist/cjs/api/resources/tokenStorage/client/Client.d.ts +1 -2
  46. package/dist/cjs/api/resources/tokenStorage/types/GetMethodResponse.d.ts +1 -1
  47. package/dist/cjs/api/resources/user/client/Client.d.ts +1 -2
  48. package/dist/cjs/api/resources/vendor/client/Client.d.ts +1 -2
  49. package/dist/cjs/api/resources/wallet/client/Client.d.ts +1 -2
  50. package/dist/cjs/api/types/Frequency.d.ts +1 -1
  51. package/dist/cjs/api/types/Frequency.js +1 -1
  52. package/dist/cjs/api/types/FrequencyList.d.ts +1 -1
  53. package/dist/cjs/api/types/PayorDataResponse.d.ts +1 -1
  54. package/dist/cjs/auth/HeaderAuthProvider.d.ts +4 -2
  55. package/dist/cjs/errors/PayabliError.js +5 -1
  56. package/dist/cjs/errors/PayabliTimeoutError.js +5 -1
  57. package/dist/cjs/version.d.ts +1 -0
  58. package/dist/cjs/version.js +4 -0
  59. package/dist/esm/BaseClient.d.mts +7 -7
  60. package/dist/esm/BaseClient.mjs +3 -1
  61. package/dist/esm/Client.d.mts +1 -2
  62. package/dist/esm/api/errors/BadRequestError.mjs +5 -1
  63. package/dist/esm/api/errors/ConflictError.mjs +5 -1
  64. package/dist/esm/api/errors/ForbiddenError.mjs +5 -1
  65. package/dist/esm/api/errors/InternalServerError.mjs +5 -1
  66. package/dist/esm/api/errors/ServiceUnavailableError.mjs +5 -1
  67. package/dist/esm/api/errors/UnauthorizedError.mjs +5 -1
  68. package/dist/esm/api/resources/bill/client/Client.d.mts +1 -2
  69. package/dist/esm/api/resources/boarding/client/Client.d.mts +1 -2
  70. package/dist/esm/api/resources/chargeBacks/client/Client.d.mts +1 -2
  71. package/dist/esm/api/resources/checkCapture/client/Client.d.mts +1 -2
  72. package/dist/esm/api/resources/cloud/client/Client.d.mts +1 -2
  73. package/dist/esm/api/resources/customer/client/Client.d.mts +1 -2
  74. package/dist/esm/api/resources/export/client/Client.d.mts +1 -2
  75. package/dist/esm/api/resources/hostedPaymentPages/client/Client.d.mts +1 -2
  76. package/dist/esm/api/resources/import/client/Client.d.mts +1 -2
  77. package/dist/esm/api/resources/invoice/client/Client.d.mts +6 -5
  78. package/dist/esm/api/resources/invoice/client/Client.mjs +5 -3
  79. package/dist/esm/api/resources/invoice/client/requests/AddInvoiceRequest.d.mts +5 -3
  80. package/dist/esm/api/resources/lineItem/client/Client.d.mts +1 -2
  81. package/dist/esm/api/resources/moneyIn/client/Client.d.mts +1 -2
  82. package/dist/esm/api/resources/moneyIn/errors/CaptureError.mjs +5 -1
  83. package/dist/esm/api/resources/moneyIn/errors/InvalidTransStatusError.mjs +5 -1
  84. package/dist/esm/api/resources/moneyOut/client/Client.d.mts +1 -2
  85. package/dist/esm/api/resources/notification/client/Client.d.mts +14 -2
  86. package/dist/esm/api/resources/notification/client/Client.mjs +13 -0
  87. package/dist/esm/api/resources/notificationlogs/client/Client.d.mts +1 -2
  88. package/dist/esm/api/resources/ocr/client/Client.d.mts +1 -2
  89. package/dist/esm/api/resources/organization/client/Client.d.mts +1 -2
  90. package/dist/esm/api/resources/paymentLink/client/Client.d.mts +4 -5
  91. package/dist/esm/api/resources/paymentLink/client/Client.mjs +3 -3
  92. package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataBill.d.mts +1 -1
  93. package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataInvoice.d.mts +1 -1
  94. package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataOut.d.mts +1 -1
  95. package/dist/esm/api/resources/paymentLink/types/PaymentPageRequestBody.d.mts +2 -2
  96. package/dist/esm/api/resources/paymentMethodDomain/client/Client.d.mts +1 -2
  97. package/dist/esm/api/resources/paypoint/client/Client.d.mts +1 -2
  98. package/dist/esm/api/resources/query/client/Client.d.mts +1 -2
  99. package/dist/esm/api/resources/statistic/client/Client.d.mts +1 -2
  100. package/dist/esm/api/resources/subscription/client/Client.d.mts +1 -2
  101. package/dist/esm/api/resources/templates/client/Client.d.mts +1 -2
  102. package/dist/esm/api/resources/tokenStorage/client/Client.d.mts +1 -2
  103. package/dist/esm/api/resources/tokenStorage/types/GetMethodResponse.d.mts +1 -1
  104. package/dist/esm/api/resources/user/client/Client.d.mts +1 -2
  105. package/dist/esm/api/resources/vendor/client/Client.d.mts +1 -2
  106. package/dist/esm/api/resources/wallet/client/Client.d.mts +1 -2
  107. package/dist/esm/api/types/Frequency.d.mts +1 -1
  108. package/dist/esm/api/types/Frequency.mjs +1 -1
  109. package/dist/esm/api/types/FrequencyList.d.mts +1 -1
  110. package/dist/esm/api/types/PayorDataResponse.d.mts +1 -1
  111. package/dist/esm/auth/HeaderAuthProvider.d.mts +4 -2
  112. package/dist/esm/errors/PayabliError.mjs +5 -1
  113. package/dist/esm/errors/PayabliTimeoutError.mjs +5 -1
  114. package/dist/esm/version.d.mts +1 -0
  115. package/dist/esm/version.mjs +1 -0
  116. package/package.json +7 -4
  117. package/reference.md +8 -6
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Payabli TypeScript Library
2
2
 
3
3
  [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fpayabli%2Fsdk-node)
4
+ [![npm shield](https://img.shields.io/npm/v/@payabli/sdk-node)](https://www.npmjs.com/package/@payabli/sdk-node)
4
5
 
5
6
  The Payabli TypeScript library provides convenient access to the Payabli APIs from TypeScript.
6
7
 
@@ -14,12 +15,14 @@ The Payabli TypeScript library provides convenient access to the Payabli APIs fr
14
15
  - [Exception Handling](#exception-handling)
15
16
  - [File Uploads](#file-uploads)
16
17
  - [Advanced](#advanced)
17
- - [Additional Headers](#additional-headers)
18
- - [Retries](#retries)
19
- - [Timeouts](#timeouts)
20
- - [Aborting Requests](#aborting-requests)
21
- - [Access Raw Response Data](#access-raw-response-data)
22
- - [Runtime Compatibility](#runtime-compatibility)
18
+ - [Additional Headers](#additional-headers)
19
+ - [Additional Query String Parameters](#additional-query-string-parameters)
20
+ - [Retries](#retries)
21
+ - [Timeouts](#timeouts)
22
+ - [Aborting Requests](#aborting-requests)
23
+ - [Access Raw Response Data](#access-raw-response-data)
24
+ - [Logging](#logging)
25
+ - [Runtime Compatibility](#runtime-compatibility)
23
26
  - [Contributing](#contributing)
24
27
 
25
28
  ## Documentation
@@ -41,7 +44,7 @@ A full reference for this library is available [here](https://github.com/payabli
41
44
  Instantiate and use the client with the following:
42
45
 
43
46
  ```typescript
44
- import { PayabliClient } from "./src/Client";
47
+ import { PayabliClient } from "@payabli/sdk-node";
45
48
 
46
49
  const client = new PayabliClient({ apiKey: "YOUR_API_KEY" });
47
50
  await client.moneyIn.getpaid({
@@ -68,13 +71,13 @@ await client.moneyIn.getpaid({
68
71
  });
69
72
  ```
70
73
 
71
- ## Request And Response Types
74
+ ## Request and Response Types
72
75
 
73
76
  The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
74
77
  following namespace:
75
78
 
76
79
  ```typescript
77
- import { Payabli } from "Payabli";
80
+ import { Payabli } from "@payabli/sdk-node";
78
81
 
79
82
  const request: Payabli.AddBillRequest = {
80
83
  ...
@@ -87,7 +90,7 @@ When the API returns a non-success status code (4xx or 5xx response), a subclass
87
90
  will be thrown.
88
91
 
89
92
  ```typescript
90
- import { PayabliError } from "Payabli";
93
+ import { PayabliError } from "@payabli/sdk-node";
91
94
 
92
95
  try {
93
96
  await client.moneyIn.getpaid(...);
@@ -107,8 +110,8 @@ You can upload files using the client:
107
110
 
108
111
  ```typescript
109
112
  import { createReadStream } from "fs";
110
- import { PayabliClient } from "./src/Client";
111
113
  import * as fs from "fs";
114
+ import { PayabliClient } from "@payabli/sdk-node";
112
115
 
113
116
  const client = new PayabliClient({ apiKey: "YOUR_API_KEY" });
114
117
  await client.import.importBills("8cfec329267", {
@@ -152,6 +155,15 @@ For example, `fs.ReadStream` has a `path` property which the SDK uses to retriev
152
155
  If you would like to send additional headers as part of the request, use the `headers` request option.
153
156
 
154
157
  ```typescript
158
+ import { PayabliClient } from "@payabli/sdk-node";
159
+
160
+ const client = new PayabliClient({
161
+ ...
162
+ headers: {
163
+ 'X-Custom-Header': 'custom value'
164
+ }
165
+ });
166
+
155
167
  const response = await client.moneyIn.getpaid(..., {
156
168
  headers: {
157
169
  'X-Custom-Header': 'custom value'
@@ -230,7 +242,7 @@ console.log(rawResponse.headers['X-My-Header']);
230
242
  The SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.
231
243
 
232
244
  ```typescript
233
- import { PayabliClient, logging } from "Payabli";
245
+ import { PayabliClient, logging } from "@payabli/sdk-node";
234
246
 
235
247
  const client = new PayabliClient({
236
248
  ...
@@ -308,7 +320,7 @@ The SDK provides a way for you to customize the underlying HTTP client / Fetch f
308
320
  unsupported environment, this provides a way for you to break glass and ensure the SDK works.
309
321
 
310
322
  ```typescript
311
- import { PayabliClient } from "Payabli";
323
+ import { PayabliClient } from "@payabli/sdk-node";
312
324
 
313
325
  const client = new PayabliClient({
314
326
  ...
@@ -1,10 +1,10 @@
1
+ import { HeaderAuthProvider } from "./auth/HeaderAuthProvider.js";
1
2
  import * as core from "./core/index.js";
2
3
  import type * as environments from "./environments.js";
3
- export interface BaseClientOptions {
4
+ export type BaseClientOptions = {
4
5
  environment?: core.Supplier<environments.PayabliEnvironment | string>;
5
6
  /** Specify a custom URL to connect the client to. */
6
7
  baseUrl?: core.Supplier<string>;
7
- apiKey?: core.Supplier<string | undefined>;
8
8
  /** Additional headers to include in requests. */
9
9
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
10
10
  /** The default maximum time to wait for a response in seconds. */
@@ -15,7 +15,7 @@ export interface BaseClientOptions {
15
15
  fetch?: typeof fetch;
16
16
  /** Configure logging for the client. */
17
17
  logging?: core.logging.LogConfig | core.logging.Logger;
18
- }
18
+ } & HeaderAuthProvider.AuthOptions;
19
19
  export interface BaseRequestOptions {
20
20
  /** The maximum time to wait for a response in seconds. */
21
21
  timeoutInSeconds?: number;
@@ -28,12 +28,12 @@ export interface BaseRequestOptions {
28
28
  /** Additional headers to include in the request. */
29
29
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
30
30
  }
31
- export type NormalizedClientOptions<T extends BaseClientOptions> = T & {
31
+ export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
32
32
  logging: core.logging.Logger;
33
33
  authProvider?: core.AuthProvider;
34
34
  };
35
- export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions> = NormalizedClientOptions<T> & {
35
+ export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> = NormalizedClientOptions<T> & {
36
36
  authProvider: core.AuthProvider;
37
37
  };
38
- export declare function normalizeClientOptions<T extends BaseClientOptions>(options: T): NormalizedClientOptions<T>;
39
- export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
38
+ export declare function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptions<T>;
39
+ export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
@@ -42,7 +42,9 @@ const core = __importStar(require("./core/index.js"));
42
42
  function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
- "User-Agent": "@payabli/sdk-node/0.0.120",
45
+ "X-Fern-SDK-Name": "@payabli/sdk-node",
46
+ "X-Fern-SDK-Version": "0.0.123",
47
+ "User-Agent": "@payabli/sdk-node/0.0.123",
46
48
  "X-Fern-Runtime": core.RUNTIME.type,
47
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
48
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -29,8 +29,7 @@ import { WalletClient } from "./api/resources/wallet/client/Client.js";
29
29
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
30
30
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
31
31
  export declare namespace PayabliClient {
32
- interface Options extends BaseClientOptions {
33
- }
32
+ type Options = BaseClientOptions;
34
33
  interface RequestOptions extends BaseRequestOptions {
35
34
  }
36
35
  }
@@ -44,7 +44,11 @@ class BadRequestError extends errors.PayabliError {
44
44
  body: body,
45
45
  rawResponse: rawResponse,
46
46
  });
47
- Object.setPrototypeOf(this, BadRequestError.prototype);
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
48
52
  }
49
53
  }
50
54
  exports.BadRequestError = BadRequestError;
@@ -44,7 +44,11 @@ class ConflictError extends errors.PayabliError {
44
44
  body: body,
45
45
  rawResponse: rawResponse,
46
46
  });
47
- Object.setPrototypeOf(this, ConflictError.prototype);
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
48
52
  }
49
53
  }
50
54
  exports.ConflictError = ConflictError;
@@ -44,7 +44,11 @@ class ForbiddenError extends errors.PayabliError {
44
44
  body: body,
45
45
  rawResponse: rawResponse,
46
46
  });
47
- Object.setPrototypeOf(this, ForbiddenError.prototype);
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
48
52
  }
49
53
  }
50
54
  exports.ForbiddenError = ForbiddenError;
@@ -44,7 +44,11 @@ class InternalServerError extends errors.PayabliError {
44
44
  body: body,
45
45
  rawResponse: rawResponse,
46
46
  });
47
- Object.setPrototypeOf(this, InternalServerError.prototype);
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
48
52
  }
49
53
  }
50
54
  exports.InternalServerError = InternalServerError;
@@ -44,7 +44,11 @@ class ServiceUnavailableError extends errors.PayabliError {
44
44
  body: body,
45
45
  rawResponse: rawResponse,
46
46
  });
47
- Object.setPrototypeOf(this, ServiceUnavailableError.prototype);
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
48
52
  }
49
53
  }
50
54
  exports.ServiceUnavailableError = ServiceUnavailableError;
@@ -44,7 +44,11 @@ class UnauthorizedError extends errors.PayabliError {
44
44
  body: body,
45
45
  rawResponse: rawResponse,
46
46
  });
47
- Object.setPrototypeOf(this, UnauthorizedError.prototype);
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
48
52
  }
49
53
  }
50
54
  exports.UnauthorizedError = UnauthorizedError;
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace BillClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace BoardingClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace ChargeBacksClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace CheckCaptureClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace CloudClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace CustomerClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace ExportClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace HostedPaymentPagesClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace ImportClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace InvoiceClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -37,17 +36,19 @@ export declare class InvoiceClient {
37
36
  * itemDescription: "Consultation for Georgian tours",
38
37
  * itemCost: 100,
39
38
  * itemQty: 1,
40
- * itemMode: 1
39
+ * itemMode: 1,
40
+ * itemTotalAmount: 1
41
41
  * }, {
42
42
  * itemProductName: "Deposit ",
43
43
  * itemDescription: "Deposit for trip planning",
44
44
  * itemCost: 882.37,
45
- * itemQty: 1
45
+ * itemQty: 1,
46
+ * itemTotalAmount: 1
46
47
  * }],
47
48
  * invoiceDate: "2025-10-19",
48
49
  * invoiceType: 0,
49
50
  * invoiceStatus: 1,
50
- * frequency: "one-time",
51
+ * frequency: "onetime",
51
52
  * invoiceAmount: 982.37,
52
53
  * discount: 10,
53
54
  * invoiceNumber: "INV-3"
@@ -82,17 +82,19 @@ class InvoiceClient {
82
82
  * itemDescription: "Consultation for Georgian tours",
83
83
  * itemCost: 100,
84
84
  * itemQty: 1,
85
- * itemMode: 1
85
+ * itemMode: 1,
86
+ * itemTotalAmount: 1
86
87
  * }, {
87
88
  * itemProductName: "Deposit ",
88
89
  * itemDescription: "Deposit for trip planning",
89
90
  * itemCost: 882.37,
90
- * itemQty: 1
91
+ * itemQty: 1,
92
+ * itemTotalAmount: 1
91
93
  * }],
92
94
  * invoiceDate: "2025-10-19",
93
95
  * invoiceType: 0,
94
96
  * invoiceStatus: 1,
95
- * frequency: "one-time",
97
+ * frequency: "onetime",
96
98
  * invoiceAmount: 982.37,
97
99
  * discount: 10,
98
100
  * invoiceNumber: "INV-3"
@@ -14,17 +14,19 @@ import type * as Payabli from "../../../../index.js";
14
14
  * itemDescription: "Consultation for Georgian tours",
15
15
  * itemCost: 100,
16
16
  * itemQty: 1,
17
- * itemMode: 1
17
+ * itemMode: 1,
18
+ * itemTotalAmount: 1
18
19
  * }, {
19
20
  * itemProductName: "Deposit ",
20
21
  * itemDescription: "Deposit for trip planning",
21
22
  * itemCost: 882.37,
22
- * itemQty: 1
23
+ * itemQty: 1,
24
+ * itemTotalAmount: 1
23
25
  * }],
24
26
  * invoiceDate: "2025-10-19",
25
27
  * invoiceType: 0,
26
28
  * invoiceStatus: 1,
27
- * frequency: "one-time",
29
+ * frequency: "onetime",
28
30
  * invoiceAmount: 982.37,
29
31
  * discount: 10,
30
32
  * invoiceNumber: "INV-3"
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace LineItemClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace MoneyInClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -44,7 +44,11 @@ class CaptureError extends errors.PayabliError {
44
44
  body: body,
45
45
  rawResponse: rawResponse,
46
46
  });
47
- Object.setPrototypeOf(this, CaptureError.prototype);
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
48
52
  }
49
53
  }
50
54
  exports.CaptureError = CaptureError;
@@ -44,7 +44,11 @@ class InvalidTransStatusError extends errors.PayabliError {
44
44
  body: body,
45
45
  rawResponse: rawResponse,
46
46
  });
47
- Object.setPrototypeOf(this, InvalidTransStatusError.prototype);
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
48
52
  }
49
53
  }
50
54
  exports.InvalidTransStatusError = InvalidTransStatusError;
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace MoneyOutClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace NotificationClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -38,6 +37,19 @@ export declare class NotificationClient {
38
37
  * @example
39
38
  * await client.notification.addNotification({
40
39
  * content: {
40
+ * eventType: "ApprovedPayment"
41
+ * },
42
+ * frequency: "untilcancelled",
43
+ * method: "web",
44
+ * ownerId: "236",
45
+ * ownerType: 0,
46
+ * status: 1,
47
+ * target: "https://cfe9dc390ce2.ngrok-free.app/webhook"
48
+ * })
49
+ *
50
+ * @example
51
+ * await client.notification.addNotification({
52
+ * content: {
41
53
  * eventType: "Report",
42
54
  * fileFormat: "json",
43
55
  * reportName: "Transaction",
@@ -82,6 +82,19 @@ class NotificationClient {
82
82
  * @example
83
83
  * await client.notification.addNotification({
84
84
  * content: {
85
+ * eventType: "ApprovedPayment"
86
+ * },
87
+ * frequency: "untilcancelled",
88
+ * method: "web",
89
+ * ownerId: "236",
90
+ * ownerType: 0,
91
+ * status: 1,
92
+ * target: "https://cfe9dc390ce2.ngrok-free.app/webhook"
93
+ * })
94
+ *
95
+ * @example
96
+ * await client.notification.addNotification({
97
+ * content: {
85
98
  * eventType: "Report",
86
99
  * fileFormat: "json",
87
100
  * reportName: "Transaction",
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace NotificationlogsClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace OcrClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace OrganizationClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace PaymentLinkClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -107,7 +106,7 @@ export declare class PaymentLinkClient {
107
106
  * name: "fullName",
108
107
  * order: 0,
109
108
  * required: true,
110
- * validation: "^[a-zA-Z ]+$",
109
+ * validation: "alpha",
111
110
  * value: "",
112
111
  * width: 0
113
112
  * }],
@@ -212,7 +211,7 @@ export declare class PaymentLinkClient {
212
211
  * name: "fullName",
213
212
  * order: 0,
214
213
  * required: true,
215
- * validation: "^[a-zA-Z ]+$",
214
+ * validation: "alpha",
216
215
  * value: "",
217
216
  * width: 0
218
217
  * }],
@@ -435,7 +434,7 @@ export declare class PaymentLinkClient {
435
434
  * name: "fullName",
436
435
  * order: 0,
437
436
  * required: true,
438
- * validation: "^[a-zA-Z ]+$",
437
+ * validation: "alpha",
439
438
  * value: "",
440
439
  * width: 0
441
440
  * }],
@@ -151,7 +151,7 @@ class PaymentLinkClient {
151
151
  * name: "fullName",
152
152
  * order: 0,
153
153
  * required: true,
154
- * validation: "^[a-zA-Z ]+$",
154
+ * validation: "alpha",
155
155
  * value: "",
156
156
  * width: 0
157
157
  * }],
@@ -311,7 +311,7 @@ class PaymentLinkClient {
311
311
  * name: "fullName",
312
312
  * order: 0,
313
313
  * required: true,
314
- * validation: "^[a-zA-Z ]+$",
314
+ * validation: "alpha",
315
315
  * value: "",
316
316
  * width: 0
317
317
  * }],
@@ -869,7 +869,7 @@ class PaymentLinkClient {
869
869
  * name: "fullName",
870
870
  * order: 0,
871
871
  * required: true,
872
- * validation: "^[a-zA-Z ]+$",
872
+ * validation: "alpha",
873
873
  * value: "",
874
874
  * width: 0
875
875
  * }],