@payabli/sdk-node 0.0.116 → 0.0.117

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 (230) hide show
  1. package/README.md +24 -7
  2. package/dist/cjs/BaseClient.d.ts +10 -1
  3. package/dist/cjs/BaseClient.js +57 -0
  4. package/dist/cjs/Client.d.ts +87 -86
  5. package/dist/cjs/Client.js +31 -72
  6. package/dist/cjs/api/resources/bill/client/Client.d.ts +33 -33
  7. package/dist/cjs/api/resources/bill/client/Client.js +69 -216
  8. package/dist/cjs/api/resources/boarding/client/Client.d.ts +27 -27
  9. package/dist/cjs/api/resources/boarding/client/Client.js +51 -198
  10. package/dist/cjs/api/resources/chargeBacks/client/Client.d.ts +17 -15
  11. package/dist/cjs/api/resources/chargeBacks/client/Client.js +38 -79
  12. package/dist/cjs/api/resources/checkCapture/client/Client.d.ts +7 -7
  13. package/dist/cjs/api/resources/checkCapture/client/Client.js +11 -28
  14. package/dist/cjs/api/resources/cloud/client/Client.d.ts +17 -17
  15. package/dist/cjs/api/resources/cloud/client/Client.js +33 -89
  16. package/dist/cjs/api/resources/customer/client/Client.d.ts +17 -17
  17. package/dist/cjs/api/resources/customer/client/Client.js +31 -113
  18. package/dist/cjs/api/resources/export/client/Client.d.ts +93 -89
  19. package/dist/cjs/api/resources/export/client/Client.js +205 -582
  20. package/dist/cjs/api/resources/hostedPaymentPages/client/Client.d.ts +11 -11
  21. package/dist/cjs/api/resources/hostedPaymentPages/client/Client.js +19 -62
  22. package/dist/cjs/api/resources/import/client/Client.d.ts +11 -11
  23. package/dist/cjs/api/resources/import/client/Client.js +19 -62
  24. package/dist/cjs/api/resources/invoice/client/Client.d.ts +31 -31
  25. package/dist/cjs/api/resources/invoice/client/Client.js +62 -209
  26. package/dist/cjs/api/resources/lineItem/client/Client.d.ts +15 -15
  27. package/dist/cjs/api/resources/lineItem/client/Client.js +27 -96
  28. package/dist/cjs/api/resources/moneyIn/client/Client.d.ts +39 -39
  29. package/dist/cjs/api/resources/moneyIn/client/Client.js +79 -249
  30. package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +43 -26
  31. package/dist/cjs/api/resources/moneyOut/client/Client.js +105 -168
  32. package/dist/cjs/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.ts +2 -1
  33. package/dist/cjs/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.ts +3 -1
  34. package/dist/cjs/api/resources/notification/client/Client.d.ts +16 -16
  35. package/dist/cjs/api/resources/notification/client/Client.js +32 -101
  36. package/dist/cjs/api/resources/notificationlogs/client/Client.d.ts +13 -13
  37. package/dist/cjs/api/resources/notificationlogs/client/Client.js +23 -79
  38. package/dist/cjs/api/resources/ocr/client/Client.d.ts +13 -9
  39. package/dist/cjs/api/resources/ocr/client/Client.js +19 -45
  40. package/dist/cjs/api/resources/organization/client/Client.d.ts +19 -19
  41. package/dist/cjs/api/resources/organization/client/Client.js +35 -130
  42. package/dist/cjs/api/resources/paymentLink/client/Client.d.ts +23 -23
  43. package/dist/cjs/api/resources/paymentLink/client/Client.js +43 -164
  44. package/dist/cjs/api/resources/paymentMethodDomain/client/Client.d.ts +19 -19
  45. package/dist/cjs/api/resources/paymentMethodDomain/client/Client.js +35 -130
  46. package/dist/cjs/api/resources/paypoint/client/Client.d.ts +22 -22
  47. package/dist/cjs/api/resources/paypoint/client/Client.js +44 -152
  48. package/dist/cjs/api/resources/query/client/Client.d.ts +71 -71
  49. package/dist/cjs/api/resources/query/client/Client.js +137 -572
  50. package/dist/cjs/api/resources/query/client/requests/ListPayoutOrgRequest.d.ts +1 -0
  51. package/dist/cjs/api/resources/query/client/requests/ListPayoutRequest.d.ts +1 -0
  52. package/dist/cjs/api/resources/query/client/requests/ListTransactionsRequest.d.ts +1 -0
  53. package/dist/cjs/api/resources/statistic/client/Client.d.ts +50 -50
  54. package/dist/cjs/api/resources/statistic/client/Client.js +80 -133
  55. package/dist/cjs/api/resources/statistic/client/requests/BasicStatsRequest.d.ts +2 -2
  56. package/dist/cjs/api/resources/statistic/types/StatBasicExtendedQueryRecord.d.ts +76 -0
  57. package/dist/cjs/api/resources/statistic/types/StatBasicExtendedQueryRecord.js +3 -0
  58. package/dist/cjs/api/resources/statistic/types/index.d.ts +1 -0
  59. package/dist/cjs/api/resources/statistic/types/index.js +1 -0
  60. package/dist/cjs/api/resources/subscription/client/Client.d.ts +13 -13
  61. package/dist/cjs/api/resources/subscription/client/Client.js +23 -79
  62. package/dist/cjs/api/resources/templates/client/Client.d.ts +15 -15
  63. package/dist/cjs/api/resources/templates/client/Client.js +28 -84
  64. package/dist/cjs/api/resources/tokenStorage/client/Client.d.ts +13 -13
  65. package/dist/cjs/api/resources/tokenStorage/client/Client.js +23 -79
  66. package/dist/cjs/api/resources/user/client/Client.d.ts +54 -32
  67. package/dist/cjs/api/resources/user/client/Client.js +84 -222
  68. package/dist/cjs/api/resources/vendor/client/Client.d.ts +13 -13
  69. package/dist/cjs/api/resources/vendor/client/Client.js +23 -79
  70. package/dist/cjs/api/resources/wallet/client/Client.d.ts +13 -13
  71. package/dist/cjs/api/resources/wallet/client/Client.js +23 -79
  72. package/dist/cjs/api/types/ApplicationDetailsRecord.d.ts +2 -2
  73. package/dist/cjs/api/types/NotificationContent.d.ts +1 -0
  74. package/dist/cjs/api/types/NotificationContent.js +1 -0
  75. package/dist/cjs/api/types/NotificationStandardRequest.d.ts +1 -0
  76. package/dist/cjs/api/types/NotificationStandardRequest.js +1 -0
  77. package/dist/cjs/api/types/QueryResponseSettlements.d.ts +1 -1
  78. package/dist/cjs/auth/HeaderAuthProvider.d.ts +14 -0
  79. package/dist/cjs/auth/HeaderAuthProvider.js +71 -0
  80. package/dist/cjs/auth/index.d.ts +1 -0
  81. package/dist/cjs/auth/index.js +5 -0
  82. package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
  83. package/dist/cjs/{version.js → core/auth/AuthProvider.js} +0 -2
  84. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  85. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  86. package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
  87. package/dist/cjs/core/auth/BasicAuth.js +27 -0
  88. package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
  89. package/dist/cjs/core/auth/BearerToken.js +16 -0
  90. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
  91. package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
  92. package/dist/cjs/core/auth/index.d.ts +5 -0
  93. package/dist/cjs/core/auth/index.js +9 -0
  94. package/dist/cjs/core/base64.d.ts +2 -0
  95. package/dist/cjs/core/base64.js +26 -0
  96. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
  97. package/dist/cjs/core/fetcher/Fetcher.d.ts +5 -1
  98. package/dist/cjs/core/fetcher/Fetcher.js +42 -24
  99. package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
  100. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
  101. package/dist/cjs/core/fetcher/makeRequest.js +0 -2
  102. package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
  103. package/dist/cjs/core/fetcher/signals.d.ts +1 -7
  104. package/dist/cjs/core/fetcher/signals.js +0 -12
  105. package/dist/cjs/core/index.d.ts +2 -0
  106. package/dist/cjs/core/index.js +2 -0
  107. package/dist/cjs/core/logging/logger.js +1 -1
  108. package/dist/cjs/core/runtime/runtime.js +11 -10
  109. package/dist/cjs/core/url/join.js +0 -1
  110. package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
  111. package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
  112. package/dist/esm/BaseClient.d.mts +10 -1
  113. package/dist/esm/BaseClient.mjs +22 -1
  114. package/dist/esm/Client.d.mts +87 -86
  115. package/dist/esm/Client.mjs +59 -67
  116. package/dist/esm/api/resources/bill/client/Client.d.mts +33 -33
  117. package/dist/esm/api/resources/bill/client/Client.mjs +67 -214
  118. package/dist/esm/api/resources/boarding/client/Client.d.mts +27 -27
  119. package/dist/esm/api/resources/boarding/client/Client.mjs +50 -197
  120. package/dist/esm/api/resources/chargeBacks/client/Client.d.mts +17 -15
  121. package/dist/esm/api/resources/chargeBacks/client/Client.mjs +36 -77
  122. package/dist/esm/api/resources/checkCapture/client/Client.d.mts +7 -7
  123. package/dist/esm/api/resources/checkCapture/client/Client.mjs +10 -27
  124. package/dist/esm/api/resources/cloud/client/Client.d.mts +17 -17
  125. package/dist/esm/api/resources/cloud/client/Client.mjs +31 -87
  126. package/dist/esm/api/resources/customer/client/Client.d.mts +17 -17
  127. package/dist/esm/api/resources/customer/client/Client.mjs +29 -111
  128. package/dist/esm/api/resources/export/client/Client.d.mts +93 -89
  129. package/dist/esm/api/resources/export/client/Client.mjs +204 -581
  130. package/dist/esm/api/resources/hostedPaymentPages/client/Client.d.mts +11 -11
  131. package/dist/esm/api/resources/hostedPaymentPages/client/Client.mjs +17 -60
  132. package/dist/esm/api/resources/import/client/Client.d.mts +11 -11
  133. package/dist/esm/api/resources/import/client/Client.mjs +17 -60
  134. package/dist/esm/api/resources/invoice/client/Client.d.mts +31 -31
  135. package/dist/esm/api/resources/invoice/client/Client.mjs +60 -207
  136. package/dist/esm/api/resources/lineItem/client/Client.d.mts +15 -15
  137. package/dist/esm/api/resources/lineItem/client/Client.mjs +25 -94
  138. package/dist/esm/api/resources/moneyIn/client/Client.d.mts +39 -39
  139. package/dist/esm/api/resources/moneyIn/client/Client.mjs +77 -247
  140. package/dist/esm/api/resources/moneyOut/client/Client.d.mts +43 -26
  141. package/dist/esm/api/resources/moneyOut/client/Client.mjs +103 -166
  142. package/dist/esm/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.mts +2 -1
  143. package/dist/esm/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.mts +3 -1
  144. package/dist/esm/api/resources/notification/client/Client.d.mts +16 -16
  145. package/dist/esm/api/resources/notification/client/Client.mjs +31 -100
  146. package/dist/esm/api/resources/notificationlogs/client/Client.d.mts +13 -13
  147. package/dist/esm/api/resources/notificationlogs/client/Client.mjs +22 -78
  148. package/dist/esm/api/resources/ocr/client/Client.d.mts +13 -9
  149. package/dist/esm/api/resources/ocr/client/Client.mjs +18 -44
  150. package/dist/esm/api/resources/organization/client/Client.d.mts +19 -19
  151. package/dist/esm/api/resources/organization/client/Client.mjs +33 -128
  152. package/dist/esm/api/resources/paymentLink/client/Client.d.mts +23 -23
  153. package/dist/esm/api/resources/paymentLink/client/Client.mjs +41 -162
  154. package/dist/esm/api/resources/paymentMethodDomain/client/Client.d.mts +19 -19
  155. package/dist/esm/api/resources/paymentMethodDomain/client/Client.mjs +34 -129
  156. package/dist/esm/api/resources/paypoint/client/Client.d.mts +22 -22
  157. package/dist/esm/api/resources/paypoint/client/Client.mjs +43 -151
  158. package/dist/esm/api/resources/query/client/Client.d.mts +71 -71
  159. package/dist/esm/api/resources/query/client/Client.mjs +136 -571
  160. package/dist/esm/api/resources/query/client/requests/ListPayoutOrgRequest.d.mts +1 -0
  161. package/dist/esm/api/resources/query/client/requests/ListPayoutRequest.d.mts +1 -0
  162. package/dist/esm/api/resources/query/client/requests/ListTransactionsRequest.d.mts +1 -0
  163. package/dist/esm/api/resources/statistic/client/Client.d.mts +50 -50
  164. package/dist/esm/api/resources/statistic/client/Client.mjs +79 -132
  165. package/dist/esm/api/resources/statistic/client/requests/BasicStatsRequest.d.mts +2 -2
  166. package/dist/esm/api/resources/statistic/types/StatBasicExtendedQueryRecord.d.mts +76 -0
  167. package/dist/esm/api/resources/statistic/types/StatBasicExtendedQueryRecord.mjs +2 -0
  168. package/dist/esm/api/resources/statistic/types/index.d.mts +1 -0
  169. package/dist/esm/api/resources/statistic/types/index.mjs +1 -0
  170. package/dist/esm/api/resources/subscription/client/Client.d.mts +13 -13
  171. package/dist/esm/api/resources/subscription/client/Client.mjs +21 -77
  172. package/dist/esm/api/resources/templates/client/Client.d.mts +15 -15
  173. package/dist/esm/api/resources/templates/client/Client.mjs +27 -83
  174. package/dist/esm/api/resources/tokenStorage/client/Client.d.mts +13 -13
  175. package/dist/esm/api/resources/tokenStorage/client/Client.mjs +21 -77
  176. package/dist/esm/api/resources/user/client/Client.d.mts +54 -32
  177. package/dist/esm/api/resources/user/client/Client.mjs +83 -221
  178. package/dist/esm/api/resources/vendor/client/Client.d.mts +13 -13
  179. package/dist/esm/api/resources/vendor/client/Client.mjs +22 -78
  180. package/dist/esm/api/resources/wallet/client/Client.d.mts +13 -13
  181. package/dist/esm/api/resources/wallet/client/Client.mjs +22 -78
  182. package/dist/esm/api/types/ApplicationDetailsRecord.d.mts +2 -2
  183. package/dist/esm/api/types/NotificationContent.d.mts +1 -0
  184. package/dist/esm/api/types/NotificationContent.mjs +1 -0
  185. package/dist/esm/api/types/NotificationStandardRequest.d.mts +1 -0
  186. package/dist/esm/api/types/NotificationStandardRequest.mjs +1 -0
  187. package/dist/esm/api/types/QueryResponseSettlements.d.mts +1 -1
  188. package/dist/esm/auth/HeaderAuthProvider.d.mts +14 -0
  189. package/dist/esm/auth/HeaderAuthProvider.mjs +34 -0
  190. package/dist/esm/auth/index.d.mts +1 -0
  191. package/dist/esm/auth/index.mjs +1 -0
  192. package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
  193. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  194. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  195. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  196. package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
  197. package/dist/esm/core/auth/BasicAuth.mjs +24 -0
  198. package/dist/esm/core/auth/BearerToken.d.mts +7 -0
  199. package/dist/esm/core/auth/BearerToken.mjs +13 -0
  200. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
  201. package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
  202. package/dist/esm/core/auth/index.d.mts +5 -0
  203. package/dist/esm/core/auth/index.mjs +3 -0
  204. package/dist/esm/core/base64.d.mts +2 -0
  205. package/dist/esm/core/base64.mjs +22 -0
  206. package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
  207. package/dist/esm/core/fetcher/Fetcher.d.mts +5 -1
  208. package/dist/esm/core/fetcher/Fetcher.mjs +42 -24
  209. package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
  210. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
  211. package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
  212. package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
  213. package/dist/esm/core/fetcher/signals.d.mts +1 -7
  214. package/dist/esm/core/fetcher/signals.mjs +0 -12
  215. package/dist/esm/core/index.d.mts +2 -0
  216. package/dist/esm/core/index.mjs +2 -0
  217. package/dist/esm/core/logging/logger.mjs +1 -1
  218. package/dist/esm/core/runtime/runtime.mjs +11 -10
  219. package/dist/esm/core/url/join.mjs +0 -1
  220. package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
  221. package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
  222. package/package.json +4 -4
  223. package/reference.md +761 -473
  224. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
  225. package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
  226. package/dist/cjs/version.d.ts +0 -1
  227. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
  228. package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
  229. package/dist/esm/version.d.mts +0 -1
  230. package/dist/esm/version.mjs +0 -1
@@ -1,20 +1,21 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
2
3
  import * as core from "../../../../core/index.mjs";
3
4
  import * as Payabli from "../../../index.mjs";
4
- export declare namespace PaymentMethodDomain {
5
+ export declare namespace PaymentMethodDomainClient {
5
6
  interface Options extends BaseClientOptions {
6
7
  }
7
8
  interface RequestOptions extends BaseRequestOptions {
8
9
  }
9
10
  }
10
- export declare class PaymentMethodDomain {
11
- protected readonly _options: PaymentMethodDomain.Options;
12
- constructor(_options?: PaymentMethodDomain.Options);
11
+ export declare class PaymentMethodDomainClient {
12
+ protected readonly _options: NormalizedClientOptionsWithAuth<PaymentMethodDomainClient.Options>;
13
+ constructor(options?: PaymentMethodDomainClient.Options);
13
14
  /**
14
15
  * Add a payment method domain to an organization or paypoint.
15
16
  *
16
17
  * @param {Payabli.AddPaymentMethodDomainRequest} request
17
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
18
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
18
19
  *
19
20
  * @throws {@link Payabli.BadRequestError}
20
21
  * @throws {@link Payabli.UnauthorizedError}
@@ -34,13 +35,13 @@ export declare class PaymentMethodDomain {
34
35
  * }
35
36
  * })
36
37
  */
37
- addPaymentMethodDomain(request?: Payabli.AddPaymentMethodDomainRequest, requestOptions?: PaymentMethodDomain.RequestOptions): core.HttpResponsePromise<Payabli.AddPaymentMethodDomainApiResponse>;
38
+ addPaymentMethodDomain(request?: Payabli.AddPaymentMethodDomainRequest, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.AddPaymentMethodDomainApiResponse>;
38
39
  private __addPaymentMethodDomain;
39
40
  /**
40
41
  * Cascades a payment method domain to all child entities. All paypoints and suborganization under this parent will inherit this domain and its settings.
41
42
  *
42
43
  * @param {string} domainId - The payment method domain's ID in Payabli.
43
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
44
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
44
45
  *
45
46
  * @throws {@link Payabli.BadRequestError}
46
47
  * @throws {@link Payabli.UnauthorizedError}
@@ -50,13 +51,13 @@ export declare class PaymentMethodDomain {
50
51
  * @example
51
52
  * await client.paymentMethodDomain.cascadePaymentMethodDomain("pmd_b8237fa45c964d8a9ef27160cd42b8c5")
52
53
  */
53
- cascadePaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomain.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainGeneralResponse>;
54
+ cascadePaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainGeneralResponse>;
54
55
  private __cascadePaymentMethodDomain;
55
56
  /**
56
57
  * Delete a payment method domain. You can't delete an inherited domain, you must delete a domain at the organization level.
57
58
  *
58
59
  * @param {string} domainId - The payment method domain's ID in Payabli.
59
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
60
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
60
61
  *
61
62
  * @throws {@link Payabli.BadRequestError}
62
63
  * @throws {@link Payabli.UnauthorizedError}
@@ -66,13 +67,13 @@ export declare class PaymentMethodDomain {
66
67
  * @example
67
68
  * await client.paymentMethodDomain.deletePaymentMethodDomain("pmd_b8237fa45c964d8a9ef27160cd42b8c5")
68
69
  */
69
- deletePaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomain.RequestOptions): core.HttpResponsePromise<Payabli.DeletePaymentMethodDomainResponse>;
70
+ deletePaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.DeletePaymentMethodDomainResponse>;
70
71
  private __deletePaymentMethodDomain;
71
72
  /**
72
73
  * Get the details for a payment method domain.
73
74
  *
74
75
  * @param {string} domainId - The payment method domain's ID in Payabli.
75
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
76
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
76
77
  *
77
78
  * @throws {@link Payabli.BadRequestError}
78
79
  * @throws {@link Payabli.UnauthorizedError}
@@ -82,13 +83,13 @@ export declare class PaymentMethodDomain {
82
83
  * @example
83
84
  * await client.paymentMethodDomain.getPaymentMethodDomain("pmd_b8237fa45c964d8a9ef27160cd42b8c5")
84
85
  */
85
- getPaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomain.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainApiResponse>;
86
+ getPaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainApiResponse>;
86
87
  private __getPaymentMethodDomain;
87
88
  /**
88
89
  * Get a list of payment method domains that belong to a PSP, organization, or paypoint.
89
90
  *
90
91
  * @param {Payabli.ListPaymentMethodDomainsRequest} request
91
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
92
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
92
93
  *
93
94
  * @throws {@link Payabli.BadRequestError}
94
95
  * @throws {@link Payabli.UnauthorizedError}
@@ -107,14 +108,14 @@ export declare class PaymentMethodDomain {
107
108
  * entityType: "organization"
108
109
  * })
109
110
  */
110
- listPaymentMethodDomains(request?: Payabli.ListPaymentMethodDomainsRequest, requestOptions?: PaymentMethodDomain.RequestOptions): core.HttpResponsePromise<Payabli.ListPaymentMethodDomainsResponse>;
111
+ listPaymentMethodDomains(request?: Payabli.ListPaymentMethodDomainsRequest, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.ListPaymentMethodDomainsResponse>;
111
112
  private __listPaymentMethodDomains;
112
113
  /**
113
114
  * Update a payment method domain's configuration values.
114
115
  *
115
116
  * @param {string} domainId - The payment method domain's ID in Payabli.
116
117
  * @param {Payabli.UpdatePaymentMethodDomainRequest} request
117
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
118
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
118
119
  *
119
120
  * @throws {@link Payabli.BadRequestError}
120
121
  * @throws {@link Payabli.UnauthorizedError}
@@ -131,13 +132,13 @@ export declare class PaymentMethodDomain {
131
132
  * }
132
133
  * })
133
134
  */
134
- updatePaymentMethodDomain(domainId: string, request?: Payabli.UpdatePaymentMethodDomainRequest, requestOptions?: PaymentMethodDomain.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainGeneralResponse>;
135
+ updatePaymentMethodDomain(domainId: string, request?: Payabli.UpdatePaymentMethodDomainRequest, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainGeneralResponse>;
135
136
  private __updatePaymentMethodDomain;
136
137
  /**
137
138
  * Verify a new payment method domain. If verification is successful, Apple Pay is automatically activated for the domain.
138
139
  *
139
140
  * @param {string} domainId - The payment method domain's ID in Payabli.
140
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
141
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
141
142
  *
142
143
  * @throws {@link Payabli.BadRequestError}
143
144
  * @throws {@link Payabli.UnauthorizedError}
@@ -147,7 +148,6 @@ export declare class PaymentMethodDomain {
147
148
  * @example
148
149
  * await client.paymentMethodDomain.verifyPaymentMethodDomain("pmd_b8237fa45c964d8a9ef27160cd42b8c5")
149
150
  */
150
- verifyPaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomain.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainGeneralResponse>;
151
+ verifyPaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainGeneralResponse>;
151
152
  private __verifyPaymentMethodDomain;
152
- protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
153
153
  }
@@ -8,20 +8,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../core/headers.mjs";
12
13
  import * as core from "../../../../core/index.mjs";
13
14
  import * as environments from "../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
14
16
  import * as errors from "../../../../errors/index.mjs";
15
17
  import * as Payabli from "../../../index.mjs";
16
- export class PaymentMethodDomain {
17
- constructor(_options = {}) {
18
- this._options = _options;
18
+ export class PaymentMethodDomainClient {
19
+ constructor(options = {}) {
20
+ this._options = normalizeClientOptionsWithAuth(options);
19
21
  }
20
22
  /**
21
23
  * Add a payment method domain to an organization or paypoint.
22
24
  *
23
25
  * @param {Payabli.AddPaymentMethodDomainRequest} request
24
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
26
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
25
27
  *
26
28
  * @throws {@link Payabli.BadRequestError}
27
29
  * @throws {@link Payabli.UnauthorizedError}
@@ -47,7 +49,8 @@ export class PaymentMethodDomain {
47
49
  __addPaymentMethodDomain() {
48
50
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
49
51
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
50
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
52
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
53
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
51
54
  const _response = yield core.fetcher({
52
55
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, "PaymentMethodDomain"),
53
56
  method: "POST",
@@ -86,28 +89,14 @@ export class PaymentMethodDomain {
86
89
  });
87
90
  }
88
91
  }
89
- switch (_response.error.reason) {
90
- case "non-json":
91
- throw new errors.PayabliError({
92
- statusCode: _response.error.statusCode,
93
- body: _response.error.rawBody,
94
- rawResponse: _response.rawResponse,
95
- });
96
- case "timeout":
97
- throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /PaymentMethodDomain.");
98
- case "unknown":
99
- throw new errors.PayabliError({
100
- message: _response.error.errorMessage,
101
- rawResponse: _response.rawResponse,
102
- });
103
- }
92
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/PaymentMethodDomain");
104
93
  });
105
94
  }
106
95
  /**
107
96
  * Cascades a payment method domain to all child entities. All paypoints and suborganization under this parent will inherit this domain and its settings.
108
97
  *
109
98
  * @param {string} domainId - The payment method domain's ID in Payabli.
110
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
99
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
111
100
  *
112
101
  * @throws {@link Payabli.BadRequestError}
113
102
  * @throws {@link Payabli.UnauthorizedError}
@@ -123,7 +112,8 @@ export class PaymentMethodDomain {
123
112
  __cascadePaymentMethodDomain(domainId, requestOptions) {
124
113
  return __awaiter(this, void 0, void 0, function* () {
125
114
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
126
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
115
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
116
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
127
117
  const _response = yield core.fetcher({
128
118
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}/cascade`),
129
119
  method: "POST",
@@ -159,28 +149,14 @@ export class PaymentMethodDomain {
159
149
  });
160
150
  }
161
151
  }
162
- switch (_response.error.reason) {
163
- case "non-json":
164
- throw new errors.PayabliError({
165
- statusCode: _response.error.statusCode,
166
- body: _response.error.rawBody,
167
- rawResponse: _response.rawResponse,
168
- });
169
- case "timeout":
170
- throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /PaymentMethodDomain/{domainId}/cascade.");
171
- case "unknown":
172
- throw new errors.PayabliError({
173
- message: _response.error.errorMessage,
174
- rawResponse: _response.rawResponse,
175
- });
176
- }
152
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/PaymentMethodDomain/{domainId}/cascade");
177
153
  });
178
154
  }
179
155
  /**
180
156
  * Delete a payment method domain. You can't delete an inherited domain, you must delete a domain at the organization level.
181
157
  *
182
158
  * @param {string} domainId - The payment method domain's ID in Payabli.
183
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
159
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
184
160
  *
185
161
  * @throws {@link Payabli.BadRequestError}
186
162
  * @throws {@link Payabli.UnauthorizedError}
@@ -196,7 +172,8 @@ export class PaymentMethodDomain {
196
172
  __deletePaymentMethodDomain(domainId, requestOptions) {
197
173
  return __awaiter(this, void 0, void 0, function* () {
198
174
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
199
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
175
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
176
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
200
177
  const _response = yield core.fetcher({
201
178
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}`),
202
179
  method: "DELETE",
@@ -232,28 +209,14 @@ export class PaymentMethodDomain {
232
209
  });
233
210
  }
234
211
  }
235
- switch (_response.error.reason) {
236
- case "non-json":
237
- throw new errors.PayabliError({
238
- statusCode: _response.error.statusCode,
239
- body: _response.error.rawBody,
240
- rawResponse: _response.rawResponse,
241
- });
242
- case "timeout":
243
- throw new errors.PayabliTimeoutError("Timeout exceeded when calling DELETE /PaymentMethodDomain/{domainId}.");
244
- case "unknown":
245
- throw new errors.PayabliError({
246
- message: _response.error.errorMessage,
247
- rawResponse: _response.rawResponse,
248
- });
249
- }
212
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/PaymentMethodDomain/{domainId}");
250
213
  });
251
214
  }
252
215
  /**
253
216
  * Get the details for a payment method domain.
254
217
  *
255
218
  * @param {string} domainId - The payment method domain's ID in Payabli.
256
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
219
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
257
220
  *
258
221
  * @throws {@link Payabli.BadRequestError}
259
222
  * @throws {@link Payabli.UnauthorizedError}
@@ -269,7 +232,8 @@ export class PaymentMethodDomain {
269
232
  __getPaymentMethodDomain(domainId, requestOptions) {
270
233
  return __awaiter(this, void 0, void 0, function* () {
271
234
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
272
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
235
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
236
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
273
237
  const _response = yield core.fetcher({
274
238
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}`),
275
239
  method: "GET",
@@ -305,28 +269,14 @@ export class PaymentMethodDomain {
305
269
  });
306
270
  }
307
271
  }
308
- switch (_response.error.reason) {
309
- case "non-json":
310
- throw new errors.PayabliError({
311
- statusCode: _response.error.statusCode,
312
- body: _response.error.rawBody,
313
- rawResponse: _response.rawResponse,
314
- });
315
- case "timeout":
316
- throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /PaymentMethodDomain/{domainId}.");
317
- case "unknown":
318
- throw new errors.PayabliError({
319
- message: _response.error.errorMessage,
320
- rawResponse: _response.rawResponse,
321
- });
322
- }
272
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/PaymentMethodDomain/{domainId}");
323
273
  });
324
274
  }
325
275
  /**
326
276
  * Get a list of payment method domains that belong to a PSP, organization, or paypoint.
327
277
  *
328
278
  * @param {Payabli.ListPaymentMethodDomainsRequest} request
329
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
279
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
330
280
  *
331
281
  * @throws {@link Payabli.BadRequestError}
332
282
  * @throws {@link Payabli.UnauthorizedError}
@@ -365,7 +315,8 @@ export class PaymentMethodDomain {
365
315
  if (limitRecord != null) {
366
316
  _queryParams.limitRecord = limitRecord.toString();
367
317
  }
368
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
318
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
319
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
369
320
  const _response = yield core.fetcher({
370
321
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, "PaymentMethodDomain/list"),
371
322
  method: "GET",
@@ -401,21 +352,7 @@ export class PaymentMethodDomain {
401
352
  });
402
353
  }
403
354
  }
404
- switch (_response.error.reason) {
405
- case "non-json":
406
- throw new errors.PayabliError({
407
- statusCode: _response.error.statusCode,
408
- body: _response.error.rawBody,
409
- rawResponse: _response.rawResponse,
410
- });
411
- case "timeout":
412
- throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /PaymentMethodDomain/list.");
413
- case "unknown":
414
- throw new errors.PayabliError({
415
- message: _response.error.errorMessage,
416
- rawResponse: _response.rawResponse,
417
- });
418
- }
355
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/PaymentMethodDomain/list");
419
356
  });
420
357
  }
421
358
  /**
@@ -423,7 +360,7 @@ export class PaymentMethodDomain {
423
360
  *
424
361
  * @param {string} domainId - The payment method domain's ID in Payabli.
425
362
  * @param {Payabli.UpdatePaymentMethodDomainRequest} request
426
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
363
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
427
364
  *
428
365
  * @throws {@link Payabli.BadRequestError}
429
366
  * @throws {@link Payabli.UnauthorizedError}
@@ -446,7 +383,8 @@ export class PaymentMethodDomain {
446
383
  __updatePaymentMethodDomain(domainId_1) {
447
384
  return __awaiter(this, arguments, void 0, function* (domainId, request = {}, requestOptions) {
448
385
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
449
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
386
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
387
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
450
388
  const _response = yield core.fetcher({
451
389
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}`),
452
390
  method: "PATCH",
@@ -485,28 +423,14 @@ export class PaymentMethodDomain {
485
423
  });
486
424
  }
487
425
  }
488
- switch (_response.error.reason) {
489
- case "non-json":
490
- throw new errors.PayabliError({
491
- statusCode: _response.error.statusCode,
492
- body: _response.error.rawBody,
493
- rawResponse: _response.rawResponse,
494
- });
495
- case "timeout":
496
- throw new errors.PayabliTimeoutError("Timeout exceeded when calling PATCH /PaymentMethodDomain/{domainId}.");
497
- case "unknown":
498
- throw new errors.PayabliError({
499
- message: _response.error.errorMessage,
500
- rawResponse: _response.rawResponse,
501
- });
502
- }
426
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/PaymentMethodDomain/{domainId}");
503
427
  });
504
428
  }
505
429
  /**
506
430
  * Verify a new payment method domain. If verification is successful, Apple Pay is automatically activated for the domain.
507
431
  *
508
432
  * @param {string} domainId - The payment method domain's ID in Payabli.
509
- * @param {PaymentMethodDomain.RequestOptions} requestOptions - Request-specific configuration.
433
+ * @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
510
434
  *
511
435
  * @throws {@link Payabli.BadRequestError}
512
436
  * @throws {@link Payabli.UnauthorizedError}
@@ -522,7 +446,8 @@ export class PaymentMethodDomain {
522
446
  __verifyPaymentMethodDomain(domainId, requestOptions) {
523
447
  return __awaiter(this, void 0, void 0, function* () {
524
448
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
525
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
449
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
450
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
526
451
  const _response = yield core.fetcher({
527
452
  url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}/verify`),
528
453
  method: "POST",
@@ -558,27 +483,7 @@ export class PaymentMethodDomain {
558
483
  });
559
484
  }
560
485
  }
561
- switch (_response.error.reason) {
562
- case "non-json":
563
- throw new errors.PayabliError({
564
- statusCode: _response.error.statusCode,
565
- body: _response.error.rawBody,
566
- rawResponse: _response.rawResponse,
567
- });
568
- case "timeout":
569
- throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /PaymentMethodDomain/{domainId}/verify.");
570
- case "unknown":
571
- throw new errors.PayabliError({
572
- message: _response.error.errorMessage,
573
- rawResponse: _response.rawResponse,
574
- });
575
- }
576
- });
577
- }
578
- _getCustomAuthorizationHeaders() {
579
- return __awaiter(this, void 0, void 0, function* () {
580
- const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
581
- return { requestToken: apiKeyValue };
486
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/PaymentMethodDomain/{domainId}/verify");
582
487
  });
583
488
  }
584
489
  }
@@ -1,20 +1,21 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
2
3
  import * as core from "../../../../core/index.mjs";
3
4
  import * as Payabli from "../../../index.mjs";
4
- export declare namespace Paypoint {
5
+ export declare namespace PaypointClient {
5
6
  interface Options extends BaseClientOptions {
6
7
  }
7
8
  interface RequestOptions extends BaseRequestOptions {
8
9
  }
9
10
  }
10
- export declare class Paypoint {
11
- protected readonly _options: Paypoint.Options;
12
- constructor(_options?: Paypoint.Options);
11
+ export declare class PaypointClient {
12
+ protected readonly _options: NormalizedClientOptionsWithAuth<PaypointClient.Options>;
13
+ constructor(options?: PaypointClient.Options);
13
14
  /**
14
15
  * Gets the basic details for a paypoint.
15
16
  *
16
17
  * @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
17
- * @param {Paypoint.RequestOptions} requestOptions - Request-specific configuration.
18
+ * @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
18
19
  *
19
20
  * @throws {@link Payabli.BadRequestError}
20
21
  * @throws {@link Payabli.UnauthorizedError}
@@ -24,13 +25,13 @@ export declare class Paypoint {
24
25
  * @example
25
26
  * await client.paypoint.getBasicEntry("8cfec329267")
26
27
  */
27
- getBasicEntry(entry: string, requestOptions?: Paypoint.RequestOptions): core.HttpResponsePromise<Payabli.GetBasicEntryResponse>;
28
+ getBasicEntry(entry: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.GetBasicEntryResponse>;
28
29
  private __getBasicEntry;
29
30
  /**
30
31
  * Retrieves the basic details for a paypoint by ID.
31
32
  *
32
- * @param {string} idPaypoint - Paypoint ID. You can find this value by querying `/api/Query/paypoints/{orgId}`
33
- * @param {Paypoint.RequestOptions} requestOptions - Request-specific configuration.
33
+ * @param {string} IdPaypoint - Paypoint ID. You can find this value by querying `/api/Query/paypoints/{orgId}`
34
+ * @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
34
35
  *
35
36
  * @throws {@link Payabli.BadRequestError}
36
37
  * @throws {@link Payabli.UnauthorizedError}
@@ -40,14 +41,14 @@ export declare class Paypoint {
40
41
  * @example
41
42
  * await client.paypoint.getBasicEntryById("198")
42
43
  */
43
- getBasicEntryById(idPaypoint: string, requestOptions?: Paypoint.RequestOptions): core.HttpResponsePromise<Payabli.GetBasicEntryByIdResponse>;
44
+ getBasicEntryById(IdPaypoint: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.GetBasicEntryByIdResponse>;
44
45
  private __getBasicEntryById;
45
46
  /**
46
47
  * Gets the details for a single paypoint.
47
48
  *
48
49
  * @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
49
50
  * @param {Payabli.GetEntryConfigRequest} request
50
- * @param {Paypoint.RequestOptions} requestOptions - Request-specific configuration.
51
+ * @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
51
52
  *
52
53
  * @throws {@link Payabli.BadRequestError}
53
54
  * @throws {@link Payabli.UnauthorizedError}
@@ -57,14 +58,14 @@ export declare class Paypoint {
57
58
  * @example
58
59
  * await client.paypoint.getEntryConfig("8cfec329267")
59
60
  */
60
- getEntryConfig(entry: string, request?: Payabli.GetEntryConfigRequest, requestOptions?: Paypoint.RequestOptions): core.HttpResponsePromise<Payabli.GetEntryConfigResponse>;
61
+ getEntryConfig(entry: string, request?: Payabli.GetEntryConfigRequest, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.GetEntryConfigResponse>;
61
62
  private __getEntryConfig;
62
63
  /**
63
64
  * Gets the details for single payment page for a paypoint.
64
65
  *
65
66
  * @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
66
67
  * @param {string} subdomain - Payment page identifier. The subdomain value is the last portion of the payment page URL. For example, in`https://paypages-sandbox.payabli.com/513823dc10/pay-your-fees-1`, the subdomain is `pay-your-fees-1`.
67
- * @param {Paypoint.RequestOptions} requestOptions - Request-specific configuration.
68
+ * @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
68
69
  *
69
70
  * @throws {@link Payabli.BadRequestError}
70
71
  * @throws {@link Payabli.UnauthorizedError}
@@ -74,14 +75,14 @@ export declare class Paypoint {
74
75
  * @example
75
76
  * await client.paypoint.getPage("8cfec329267", "pay-your-fees-1")
76
77
  */
77
- getPage(entry: string, subdomain: string, requestOptions?: Paypoint.RequestOptions): core.HttpResponsePromise<Payabli.PayabliPages>;
78
+ getPage(entry: string, subdomain: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.PayabliPages>;
78
79
  private __getPage;
79
80
  /**
80
81
  * Deletes a payment page in a paypoint.
81
82
  *
82
83
  * @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
83
84
  * @param {string} subdomain - Payment page identifier. The subdomain value is the last portion of the payment page URL. For example, in`https://paypages-sandbox.payabli.com/513823dc10/pay-your-fees-1`, the subdomain is `pay-your-fees-1`.
84
- * @param {Paypoint.RequestOptions} requestOptions - Request-specific configuration.
85
+ * @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
85
86
  *
86
87
  * @throws {@link Payabli.BadRequestError}
87
88
  * @throws {@link Payabli.UnauthorizedError}
@@ -91,14 +92,14 @@ export declare class Paypoint {
91
92
  * @example
92
93
  * await client.paypoint.removePage("8cfec329267", "pay-your-fees-1")
93
94
  */
94
- removePage(entry: string, subdomain: string, requestOptions?: Paypoint.RequestOptions): core.HttpResponsePromise<Payabli.PayabliApiResponseGeneric2Part>;
95
+ removePage(entry: string, subdomain: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.PayabliApiResponseGeneric2Part>;
95
96
  private __removePage;
96
97
  /**
97
98
  * Updates a paypoint logo.
98
99
  *
99
100
  * @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
100
101
  * @param {Payabli.FileContent} request
101
- * @param {Paypoint.RequestOptions} requestOptions - Request-specific configuration.
102
+ * @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
102
103
  *
103
104
  * @throws {@link Payabli.BadRequestError}
104
105
  * @throws {@link Payabli.UnauthorizedError}
@@ -108,13 +109,13 @@ export declare class Paypoint {
108
109
  * @example
109
110
  * await client.paypoint.saveLogo("8cfec329267", {})
110
111
  */
111
- saveLogo(entry: string, request: Payabli.FileContent, requestOptions?: Paypoint.RequestOptions): core.HttpResponsePromise<Payabli.PayabliApiResponse00Responsedatanonobject>;
112
+ saveLogo(entry: string, request: Payabli.FileContent, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.PayabliApiResponse00Responsedatanonobject>;
112
113
  private __saveLogo;
113
114
  /**
114
115
  * Retrieves an paypoint's basic settings like custom fields, identifiers, and invoicing settings.
115
116
  *
116
117
  * @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
117
- * @param {Paypoint.RequestOptions} requestOptions - Request-specific configuration.
118
+ * @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
118
119
  *
119
120
  * @throws {@link Payabli.BadRequestError}
120
121
  * @throws {@link Payabli.UnauthorizedError}
@@ -124,13 +125,13 @@ export declare class Paypoint {
124
125
  * @example
125
126
  * await client.paypoint.settingsPage("8cfec329267")
126
127
  */
127
- settingsPage(entry: string, requestOptions?: Paypoint.RequestOptions): core.HttpResponsePromise<Payabli.SettingsQueryRecord>;
128
+ settingsPage(entry: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.SettingsQueryRecord>;
128
129
  private __settingsPage;
129
130
  /**
130
131
  * Migrates a paypoint to a new parent organization.
131
132
  *
132
133
  * @param {Payabli.PaypointMoveRequest} request
133
- * @param {Paypoint.RequestOptions} requestOptions - Request-specific configuration.
134
+ * @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
134
135
  *
135
136
  * @throws {@link Payabli.BadRequestError}
136
137
  * @throws {@link Payabli.UnauthorizedError}
@@ -150,7 +151,6 @@ export declare class Paypoint {
150
151
  * }
151
152
  * })
152
153
  */
153
- migrate(request: Payabli.PaypointMoveRequest, requestOptions?: Paypoint.RequestOptions): core.HttpResponsePromise<Payabli.MigratePaypointResponse>;
154
+ migrate(request: Payabli.PaypointMoveRequest, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.MigratePaypointResponse>;
154
155
  private __migrate;
155
- protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
156
156
  }