@getivy/node-sdk 0.1.0-alpha.10

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 (256) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/LICENSE +201 -0
  3. package/README.md +303 -0
  4. package/_shims/MultipartBody.d.ts +9 -0
  5. package/_shims/MultipartBody.d.ts.map +1 -0
  6. package/_shims/MultipartBody.js +16 -0
  7. package/_shims/MultipartBody.js.map +1 -0
  8. package/_shims/MultipartBody.mjs +12 -0
  9. package/_shims/MultipartBody.mjs.map +1 -0
  10. package/_shims/README.md +46 -0
  11. package/_shims/auto/runtime-bun.d.ts +5 -0
  12. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  13. package/_shims/auto/runtime-bun.js +21 -0
  14. package/_shims/auto/runtime-bun.js.map +1 -0
  15. package/_shims/auto/runtime-bun.mjs +2 -0
  16. package/_shims/auto/runtime-bun.mjs.map +1 -0
  17. package/_shims/auto/runtime-node.d.ts +5 -0
  18. package/_shims/auto/runtime-node.d.ts.map +1 -0
  19. package/_shims/auto/runtime-node.js +21 -0
  20. package/_shims/auto/runtime-node.js.map +1 -0
  21. package/_shims/auto/runtime-node.mjs +2 -0
  22. package/_shims/auto/runtime-node.mjs.map +1 -0
  23. package/_shims/auto/runtime.d.ts +5 -0
  24. package/_shims/auto/runtime.d.ts.map +1 -0
  25. package/_shims/auto/runtime.js +21 -0
  26. package/_shims/auto/runtime.js.map +1 -0
  27. package/_shims/auto/runtime.mjs +2 -0
  28. package/_shims/auto/runtime.mjs.map +1 -0
  29. package/_shims/auto/types-node.d.ts +5 -0
  30. package/_shims/auto/types-node.d.ts.map +1 -0
  31. package/_shims/auto/types-node.js +21 -0
  32. package/_shims/auto/types-node.js.map +1 -0
  33. package/_shims/auto/types-node.mjs +2 -0
  34. package/_shims/auto/types-node.mjs.map +1 -0
  35. package/_shims/auto/types.d.ts +101 -0
  36. package/_shims/auto/types.js +3 -0
  37. package/_shims/auto/types.mjs +3 -0
  38. package/_shims/bun-runtime.d.ts +6 -0
  39. package/_shims/bun-runtime.d.ts.map +1 -0
  40. package/_shims/bun-runtime.js +14 -0
  41. package/_shims/bun-runtime.js.map +1 -0
  42. package/_shims/bun-runtime.mjs +10 -0
  43. package/_shims/bun-runtime.mjs.map +1 -0
  44. package/_shims/index.d.ts +81 -0
  45. package/_shims/index.js +13 -0
  46. package/_shims/index.mjs +7 -0
  47. package/_shims/manual-types.d.ts +12 -0
  48. package/_shims/manual-types.js +3 -0
  49. package/_shims/manual-types.mjs +3 -0
  50. package/_shims/node-runtime.d.ts +3 -0
  51. package/_shims/node-runtime.d.ts.map +1 -0
  52. package/_shims/node-runtime.js +89 -0
  53. package/_shims/node-runtime.js.map +1 -0
  54. package/_shims/node-runtime.mjs +56 -0
  55. package/_shims/node-runtime.mjs.map +1 -0
  56. package/_shims/node-types.d.ts +42 -0
  57. package/_shims/node-types.js +3 -0
  58. package/_shims/node-types.mjs +3 -0
  59. package/_shims/registry.d.ts +37 -0
  60. package/_shims/registry.d.ts.map +1 -0
  61. package/_shims/registry.js +41 -0
  62. package/_shims/registry.js.map +1 -0
  63. package/_shims/registry.mjs +37 -0
  64. package/_shims/registry.mjs.map +1 -0
  65. package/_shims/web-runtime.d.ts +5 -0
  66. package/_shims/web-runtime.d.ts.map +1 -0
  67. package/_shims/web-runtime.js +78 -0
  68. package/_shims/web-runtime.js.map +1 -0
  69. package/_shims/web-runtime.mjs +71 -0
  70. package/_shims/web-runtime.mjs.map +1 -0
  71. package/_shims/web-types.d.ts +83 -0
  72. package/_shims/web-types.js +3 -0
  73. package/_shims/web-types.mjs +3 -0
  74. package/core.d.ts +241 -0
  75. package/core.d.ts.map +1 -0
  76. package/core.js +915 -0
  77. package/core.js.map +1 -0
  78. package/core.mjs +883 -0
  79. package/core.mjs.map +1 -0
  80. package/error.d.ts +47 -0
  81. package/error.d.ts.map +1 -0
  82. package/error.js +113 -0
  83. package/error.js.map +1 -0
  84. package/error.mjs +97 -0
  85. package/error.mjs.map +1 -0
  86. package/index.d.mts +160 -0
  87. package/index.d.ts +160 -0
  88. package/index.d.ts.map +1 -0
  89. package/index.js +167 -0
  90. package/index.js.map +1 -0
  91. package/index.mjs +124 -0
  92. package/index.mjs.map +1 -0
  93. package/package.json +124 -0
  94. package/resource.d.ts +6 -0
  95. package/resource.d.ts.map +1 -0
  96. package/resource.js +11 -0
  97. package/resource.js.map +1 -0
  98. package/resource.mjs +7 -0
  99. package/resource.mjs.map +1 -0
  100. package/resources/balance.d.ts +34 -0
  101. package/resources/balance.d.ts.map +1 -0
  102. package/resources/balance.js +16 -0
  103. package/resources/balance.js.map +1 -0
  104. package/resources/balance.mjs +12 -0
  105. package/resources/balance.mjs.map +1 -0
  106. package/resources/banks.d.ts +235 -0
  107. package/resources/banks.d.ts.map +1 -0
  108. package/resources/banks.js +30 -0
  109. package/resources/banks.js.map +1 -0
  110. package/resources/banks.mjs +26 -0
  111. package/resources/banks.mjs.map +1 -0
  112. package/resources/capabilities.d.ts +28 -0
  113. package/resources/capabilities.d.ts.map +1 -0
  114. package/resources/capabilities.js +16 -0
  115. package/resources/capabilities.js.map +1 -0
  116. package/resources/capabilities.mjs +12 -0
  117. package/resources/capabilities.mjs.map +1 -0
  118. package/resources/charges.d.ts +73 -0
  119. package/resources/charges.d.ts.map +1 -0
  120. package/resources/charges.js +15 -0
  121. package/resources/charges.js.map +1 -0
  122. package/resources/charges.mjs +11 -0
  123. package/resources/charges.mjs.map +1 -0
  124. package/resources/checkoutsession.d.ts +1504 -0
  125. package/resources/checkoutsession.d.ts.map +1 -0
  126. package/resources/checkoutsession.js +30 -0
  127. package/resources/checkoutsession.js.map +1 -0
  128. package/resources/checkoutsession.mjs +26 -0
  129. package/resources/checkoutsession.mjs.map +1 -0
  130. package/resources/customers.d.ts +82 -0
  131. package/resources/customers.d.ts.map +1 -0
  132. package/resources/customers.js +21 -0
  133. package/resources/customers.js.map +1 -0
  134. package/resources/customers.mjs +17 -0
  135. package/resources/customers.mjs.map +1 -0
  136. package/resources/index.d.ts +14 -0
  137. package/resources/index.d.ts.map +1 -0
  138. package/resources/index.js +31 -0
  139. package/resources/index.js.map +1 -0
  140. package/resources/index.mjs +15 -0
  141. package/resources/index.mjs.map +1 -0
  142. package/resources/mandates.d.ts +91 -0
  143. package/resources/mandates.d.ts.map +1 -0
  144. package/resources/mandates.js +27 -0
  145. package/resources/mandates.js.map +1 -0
  146. package/resources/mandates.mjs +23 -0
  147. package/resources/mandates.mjs.map +1 -0
  148. package/resources/orders.d.ts +1239 -0
  149. package/resources/orders.d.ts.map +1 -0
  150. package/resources/orders.js +23 -0
  151. package/resources/orders.js.map +1 -0
  152. package/resources/orders.mjs +19 -0
  153. package/resources/orders.mjs.map +1 -0
  154. package/resources/payouts.d.ts +224 -0
  155. package/resources/payouts.d.ts.map +1 -0
  156. package/resources/payouts.js +28 -0
  157. package/resources/payouts.js.map +1 -0
  158. package/resources/payouts.mjs +24 -0
  159. package/resources/payouts.mjs.map +1 -0
  160. package/resources/refunds.d.ts +138 -0
  161. package/resources/refunds.d.ts.map +1 -0
  162. package/resources/refunds.js +28 -0
  163. package/resources/refunds.js.map +1 -0
  164. package/resources/refunds.mjs +24 -0
  165. package/resources/refunds.mjs.map +1 -0
  166. package/resources/reports.d.ts +120 -0
  167. package/resources/reports.d.ts.map +1 -0
  168. package/resources/reports.js +31 -0
  169. package/resources/reports.js.map +1 -0
  170. package/resources/reports.mjs +27 -0
  171. package/resources/reports.mjs.map +1 -0
  172. package/resources/subaccounts.d.ts +49 -0
  173. package/resources/subaccounts.d.ts.map +1 -0
  174. package/resources/subaccounts.js +22 -0
  175. package/resources/subaccounts.js.map +1 -0
  176. package/resources/subaccounts.mjs +18 -0
  177. package/resources/subaccounts.mjs.map +1 -0
  178. package/resources/webhooksubscription.d.ts +155 -0
  179. package/resources/webhooksubscription.d.ts.map +1 -0
  180. package/resources/webhooksubscription.js +42 -0
  181. package/resources/webhooksubscription.js.map +1 -0
  182. package/resources/webhooksubscription.mjs +38 -0
  183. package/resources/webhooksubscription.mjs.map +1 -0
  184. package/shims/node.d.ts +30 -0
  185. package/shims/node.d.ts.map +1 -0
  186. package/shims/node.js +31 -0
  187. package/shims/node.js.map +1 -0
  188. package/shims/node.mjs +5 -0
  189. package/shims/node.mjs.map +1 -0
  190. package/shims/web.d.ts +26 -0
  191. package/shims/web.d.ts.map +1 -0
  192. package/shims/web.js +31 -0
  193. package/shims/web.js.map +1 -0
  194. package/shims/web.mjs +5 -0
  195. package/shims/web.mjs.map +1 -0
  196. package/src/_shims/MultipartBody.ts +9 -0
  197. package/src/_shims/README.md +46 -0
  198. package/src/_shims/auto/runtime-bun.ts +4 -0
  199. package/src/_shims/auto/runtime-node.ts +4 -0
  200. package/src/_shims/auto/runtime.ts +4 -0
  201. package/src/_shims/auto/types-node.ts +4 -0
  202. package/src/_shims/auto/types.d.ts +101 -0
  203. package/src/_shims/auto/types.js +3 -0
  204. package/src/_shims/auto/types.mjs +3 -0
  205. package/src/_shims/bun-runtime.ts +14 -0
  206. package/src/_shims/index.d.ts +81 -0
  207. package/src/_shims/index.js +13 -0
  208. package/src/_shims/index.mjs +7 -0
  209. package/src/_shims/manual-types.d.ts +12 -0
  210. package/src/_shims/manual-types.js +3 -0
  211. package/src/_shims/manual-types.mjs +3 -0
  212. package/src/_shims/node-runtime.ts +81 -0
  213. package/src/_shims/node-types.d.ts +42 -0
  214. package/src/_shims/node-types.js +3 -0
  215. package/src/_shims/node-types.mjs +3 -0
  216. package/src/_shims/registry.ts +67 -0
  217. package/src/_shims/web-runtime.ts +103 -0
  218. package/src/_shims/web-types.d.ts +83 -0
  219. package/src/_shims/web-types.js +3 -0
  220. package/src/_shims/web-types.mjs +3 -0
  221. package/src/core.ts +1208 -0
  222. package/src/error.ts +130 -0
  223. package/src/index.ts +422 -0
  224. package/src/lib/.keep +4 -0
  225. package/src/resource.ts +11 -0
  226. package/src/resources/balance.ts +49 -0
  227. package/src/resources/banks.ts +1551 -0
  228. package/src/resources/capabilities.ts +291 -0
  229. package/src/resources/charges.ts +95 -0
  230. package/src/resources/checkoutsession.ts +6935 -0
  231. package/src/resources/customers.ts +111 -0
  232. package/src/resources/index.ts +88 -0
  233. package/src/resources/mandates.ts +135 -0
  234. package/src/resources/orders.ts +3174 -0
  235. package/src/resources/payouts.ts +297 -0
  236. package/src/resources/refunds.ts +183 -0
  237. package/src/resources/reports.ts +172 -0
  238. package/src/resources/subaccounts.ts +73 -0
  239. package/src/resources/webhooksubscription.ts +353 -0
  240. package/src/shims/node.ts +50 -0
  241. package/src/shims/web.ts +50 -0
  242. package/src/tsconfig.json +11 -0
  243. package/src/uploads.ts +255 -0
  244. package/src/version.ts +1 -0
  245. package/uploads.d.ts +75 -0
  246. package/uploads.d.ts.map +1 -0
  247. package/uploads.js +171 -0
  248. package/uploads.js.map +1 -0
  249. package/uploads.mjs +158 -0
  250. package/uploads.mjs.map +1 -0
  251. package/version.d.ts +2 -0
  252. package/version.d.ts.map +1 -0
  253. package/version.js +5 -0
  254. package/version.js.map +1 -0
  255. package/version.mjs +2 -0
  256. package/version.mjs.map +1 -0
@@ -0,0 +1,120 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ export declare class Reports extends APIResource {
4
+ /**
5
+ * Create a Payout Report for a given timerange. A Payout Report is generated
6
+ * async. Please follow [this guide](https://docs.getivy.de/docs/payout-report-1)
7
+ * to learn more in detail.
8
+ */
9
+ create(body: ReportCreateParams, options?: Core.RequestOptions): Core.APIPromise<ReportCreateResponse>;
10
+ /**
11
+ * Retrieve the status of an existing Payout Report. Use this endpoint to poll for
12
+ * the status before downloading a Payout Report.
13
+ */
14
+ retrieve(body: ReportRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<ReportRetrieveResponse>;
15
+ /**
16
+ * Download the actual Payout Report once the creation succeeded with this
17
+ * endpoint.
18
+ */
19
+ download(body: ReportDownloadParams, options?: Core.RequestOptions): Core.APIPromise<PayoutReport>;
20
+ }
21
+ export interface PayoutReport {
22
+ payouts: Array<PayoutReport.Payout>;
23
+ }
24
+ export declare namespace PayoutReport {
25
+ interface Payout {
26
+ id: string;
27
+ amount: number;
28
+ availableAt: string;
29
+ merchantAppId: string;
30
+ transactions: Array<Payout.Transaction>;
31
+ }
32
+ namespace Payout {
33
+ interface Transaction {
34
+ currency: 'EUR' | 'GBP' | 'PLN';
35
+ fee: number;
36
+ gross: number;
37
+ net: number;
38
+ reportingCategory: string;
39
+ billingFullName?: string;
40
+ createdAt?: string;
41
+ description?: string;
42
+ displayId?: string;
43
+ orderId?: string;
44
+ referenceId?: string;
45
+ subaccountId?: string;
46
+ userMail?: string;
47
+ }
48
+ }
49
+ }
50
+ export interface ReportCreateResponse {
51
+ /**
52
+ * The unique identifier of the new Payout Report Object that was created.
53
+ */
54
+ id: string;
55
+ /**
56
+ * Status of the Payout Report creation. This will be `pending` when the run is
57
+ * initially created. As soon as the report is created, this will be set to
58
+ * `succeeded`. Rarely, we may encounter an error, at which point this will be set
59
+ * to `failed`. See [the guide](https://docs.getivy.de/docs/payout-report-1) to
60
+ * learn more.
61
+ */
62
+ status: string;
63
+ /**
64
+ * @deprecated
65
+ */
66
+ fileUrl?: string;
67
+ }
68
+ export interface ReportRetrieveResponse {
69
+ /**
70
+ * Status of this Payout Report creation. This will be `pending` when the run is
71
+ * initially created. When the run finishes, this will be set to `succeeded`.
72
+ * Rarely, we may encounter an error, at which point this will be set to `failed`.
73
+ */
74
+ status: string;
75
+ /**
76
+ * @deprecated
77
+ */
78
+ fileUrl?: string;
79
+ }
80
+ export interface ReportCreateParams {
81
+ /**
82
+ * Unix timestamp. The end of the timerange to create a Payout Report for.
83
+ */
84
+ intervalEnd: number;
85
+ /**
86
+ * Unix timestamp. The start of the timerange to create a Payout Report for.
87
+ */
88
+ intervalStart: number;
89
+ /**
90
+ * If provided, the report will be generated for this currency only. If not
91
+ * provided, the report will be generated for all currencies.
92
+ */
93
+ currency?: 'EUR' | 'GBP' | 'PLN';
94
+ /**
95
+ * Optional URL of a webhook. If provided, the report, once generated, will be sent
96
+ * there in JSON format.
97
+ */
98
+ webhookUrl?: string;
99
+ }
100
+ export interface ReportRetrieveParams {
101
+ /**
102
+ * The unique identifier of the Payout Report to retrieve.
103
+ */
104
+ reportId: string;
105
+ }
106
+ export interface ReportDownloadParams {
107
+ /**
108
+ * The unique identifier of the report you want to download. This was returned when
109
+ * creating a new Payout Report.
110
+ */
111
+ reportId: string;
112
+ /**
113
+ * The format in which you want to download the report. Default is csv.
114
+ */
115
+ format?: 'csv' | 'json' | 'datev';
116
+ }
117
+ export declare namespace Reports {
118
+ export { type PayoutReport as PayoutReport, type ReportCreateResponse as ReportCreateResponse, type ReportRetrieveResponse as ReportRetrieveResponse, type ReportCreateParams as ReportCreateParams, type ReportRetrieveParams as ReportRetrieveParams, type ReportDownloadParams as ReportDownloadParams, };
119
+ }
120
+ //# sourceMappingURL=reports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAItG;;;OAGG;IACH,QAAQ,CACN,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAI1C;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC;CAGnG;AAED,MAAM,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aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAEjC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Reports = void 0;
5
+ const resource_1 = require("../resource.js");
6
+ class Reports extends resource_1.APIResource {
7
+ /**
8
+ * Create a Payout Report for a given timerange. A Payout Report is generated
9
+ * async. Please follow [this guide](https://docs.getivy.de/docs/payout-report-1)
10
+ * to learn more in detail.
11
+ */
12
+ create(body, options) {
13
+ return this._client.post('/api/service/merchant/payout/export/create', { body, ...options });
14
+ }
15
+ /**
16
+ * Retrieve the status of an existing Payout Report. Use this endpoint to poll for
17
+ * the status before downloading a Payout Report.
18
+ */
19
+ retrieve(body, options) {
20
+ return this._client.post('/api/service/merchant/payout/export/retrieve', { body, ...options });
21
+ }
22
+ /**
23
+ * Download the actual Payout Report once the creation succeeded with this
24
+ * endpoint.
25
+ */
26
+ download(body, options) {
27
+ return this._client.post('/api/service/merchant/payout/export/download', { body, ...options });
28
+ }
29
+ }
30
+ exports.Reports = Reports;
31
+ //# sourceMappingURL=reports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reports.js","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4CAA4C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACF;AA5BD,0BA4BC"}
@@ -0,0 +1,27 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../resource.mjs";
3
+ export class Reports extends APIResource {
4
+ /**
5
+ * Create a Payout Report for a given timerange. A Payout Report is generated
6
+ * async. Please follow [this guide](https://docs.getivy.de/docs/payout-report-1)
7
+ * to learn more in detail.
8
+ */
9
+ create(body, options) {
10
+ return this._client.post('/api/service/merchant/payout/export/create', { body, ...options });
11
+ }
12
+ /**
13
+ * Retrieve the status of an existing Payout Report. Use this endpoint to poll for
14
+ * the status before downloading a Payout Report.
15
+ */
16
+ retrieve(body, options) {
17
+ return this._client.post('/api/service/merchant/payout/export/retrieve', { body, ...options });
18
+ }
19
+ /**
20
+ * Download the actual Payout Report once the creation succeeded with this
21
+ * endpoint.
22
+ */
23
+ download(body, options) {
24
+ return this._client.post('/api/service/merchant/payout/export/download', { body, ...options });
25
+ }
26
+ }
27
+ //# sourceMappingURL=reports.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reports.mjs","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4CAA4C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACF"}
@@ -0,0 +1,49 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ export declare class Subaccounts extends APIResource {
4
+ /**
5
+ * Create a Subaccount which can be used to reconcile orders, refunds and payouts
6
+ * more easily.
7
+ */
8
+ create(body: SubaccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<Subaccount>;
9
+ /**
10
+ * Retrieve a Subaccount by id.
11
+ */
12
+ retrieve(body: SubaccountRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Subaccount>;
13
+ }
14
+ export interface Subaccount {
15
+ id: string;
16
+ legalName: string;
17
+ mcc: string;
18
+ ownerId: string;
19
+ status: 'active' | 'inactive';
20
+ createdAt?: string;
21
+ updatedAt?: string;
22
+ websiteUrl?: string;
23
+ }
24
+ export interface SubaccountCreateParams {
25
+ /**
26
+ * The legal name of the Subaccount
27
+ */
28
+ legalName: string;
29
+ /**
30
+ * The merchant category code of the Subaccount. See
31
+ * [here](https://www.citibank.com/tts/solutions/commercial-cards/assets/docs/govt/Merchant-Category-Codes.pdf)
32
+ * for more information.
33
+ */
34
+ mcc: string;
35
+ /**
36
+ * The website url of the Subaccount
37
+ */
38
+ websiteUrl?: string;
39
+ }
40
+ export interface SubaccountRetrieveParams {
41
+ /**
42
+ * The unique identifier of the Subaccount
43
+ */
44
+ id: string;
45
+ }
46
+ export declare namespace Subaccounts {
47
+ export { type Subaccount as Subaccount, type SubaccountCreateParams as SubaccountCreateParams, type SubaccountRetrieveParams as SubaccountRetrieveParams, };
48
+ }
49
+ //# sourceMappingURL=subaccounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subaccounts.d.ts","sourceRoot":"","sources":["../src/resources/subaccounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;IAIhG;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;CAGrG;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,GAAG,EAAE,MAAM,CAAC;IAEZ,OAAO,EAAE,MAAM,CAAC;IAEhB,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE9B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Subaccounts = void 0;
5
+ const resource_1 = require("../resource.js");
6
+ class Subaccounts extends resource_1.APIResource {
7
+ /**
8
+ * Create a Subaccount which can be used to reconcile orders, refunds and payouts
9
+ * more easily.
10
+ */
11
+ create(body, options) {
12
+ return this._client.post('/api/service/subaccount/create', { body, ...options });
13
+ }
14
+ /**
15
+ * Retrieve a Subaccount by id.
16
+ */
17
+ retrieve(body, options) {
18
+ return this._client.post('/api/service/subaccount/retrieve', { body, ...options });
19
+ }
20
+ }
21
+ exports.Subaccounts = Subaccounts;
22
+ //# sourceMappingURL=subaccounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subaccounts.js","sourceRoot":"","sources":["../src/resources/subaccounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;OAGG;IACH,MAAM,CAAC,IAA4B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,IAA8B,EAAE,OAA6B;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAfD,kCAeC"}
@@ -0,0 +1,18 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../resource.mjs";
3
+ export class Subaccounts extends APIResource {
4
+ /**
5
+ * Create a Subaccount which can be used to reconcile orders, refunds and payouts
6
+ * more easily.
7
+ */
8
+ create(body, options) {
9
+ return this._client.post('/api/service/subaccount/create', { body, ...options });
10
+ }
11
+ /**
12
+ * Retrieve a Subaccount by id.
13
+ */
14
+ retrieve(body, options) {
15
+ return this._client.post('/api/service/subaccount/retrieve', { body, ...options });
16
+ }
17
+ }
18
+ //# sourceMappingURL=subaccounts.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subaccounts.mjs","sourceRoot":"","sources":["../src/resources/subaccounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;OAGG;IACH,MAAM,CAAC,IAA4B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,IAA8B,EAAE,OAA6B;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
@@ -0,0 +1,155 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ export declare class Webhooksubscription extends APIResource {
4
+ /**
5
+ * Creates a webhook subscription that sends various events from Ivy to a specified
6
+ * url. There can be multiple subscriptions per app.
7
+ */
8
+ create(body: WebhooksubscriptionCreateParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionCreateResponse>;
9
+ /**
10
+ * Updates the url or subcribed to events for a webhook subscription. This can be
11
+ * used via the app or via the API by providing an API key.
12
+ */
13
+ update(body: WebhooksubscriptionUpdateParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionUpdateResponse>;
14
+ /**
15
+ * Lists all webhook subscriptions that are registered for the merchant. The
16
+ * results are paginated and provided in chronological order.
17
+ */
18
+ list(body: WebhooksubscriptionListParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionListResponse>;
19
+ /**
20
+ * Deletes a webhook subscription.
21
+ */
22
+ delete(body: WebhooksubscriptionDeleteParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionDeleteResponse>;
23
+ /**
24
+ * Trigger the webhook event "test" for the specified webhook subscription.
25
+ */
26
+ ping(body: WebhooksubscriptionPingParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionPingResponse>;
27
+ }
28
+ export interface WebhooksubscriptionCreateResponse {
29
+ /**
30
+ * The unique id for the webhook subscription.
31
+ */
32
+ id: string;
33
+ createdAt: string;
34
+ events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
35
+ /**
36
+ * The unique id for the webhook subscription.
37
+ */
38
+ merchant: string;
39
+ /**
40
+ * @deprecated The unique id for the webhook subscription.
41
+ */
42
+ merchantApp: string;
43
+ updatedAt: string;
44
+ /**
45
+ * The url that will listen to the webhook events coming from Ivy. Must be unique
46
+ * for the merchant app.
47
+ */
48
+ url: string;
49
+ }
50
+ export interface WebhooksubscriptionUpdateResponse {
51
+ /**
52
+ * The unique id for the webhook subscription.
53
+ */
54
+ id: string;
55
+ createdAt: string;
56
+ events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
57
+ /**
58
+ * The unique id for the webhook subscription.
59
+ */
60
+ merchant: string;
61
+ /**
62
+ * @deprecated The unique id for the webhook subscription.
63
+ */
64
+ merchantApp: string;
65
+ updatedAt: string;
66
+ /**
67
+ * The url that will listen to the webhook events coming from Ivy. Must be unique
68
+ * for the merchant app.
69
+ */
70
+ url: string;
71
+ }
72
+ export interface WebhooksubscriptionListResponse {
73
+ count: number;
74
+ hasNext: boolean;
75
+ items: Array<WebhooksubscriptionListResponse.Item>;
76
+ skip: number;
77
+ }
78
+ export declare namespace WebhooksubscriptionListResponse {
79
+ interface Item {
80
+ /**
81
+ * The unique id for the webhook subscription.
82
+ */
83
+ id: string;
84
+ createdAt: string;
85
+ events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
86
+ /**
87
+ * The unique id for the webhook subscription.
88
+ */
89
+ merchant: string;
90
+ /**
91
+ * @deprecated The unique id for the webhook subscription.
92
+ */
93
+ merchantApp: string;
94
+ updatedAt: string;
95
+ /**
96
+ * The url that will listen to the webhook events coming from Ivy. Must be unique
97
+ * for the merchant app.
98
+ */
99
+ url: string;
100
+ }
101
+ }
102
+ export interface WebhooksubscriptionDeleteResponse {
103
+ success: boolean;
104
+ }
105
+ export interface WebhooksubscriptionPingResponse {
106
+ /**
107
+ * The unique identifier of the webhook that was sent.
108
+ */
109
+ id: string;
110
+ date: string;
111
+ /**
112
+ * The response body returned by the targeted webhook endpoint.
113
+ */
114
+ response: string | number | boolean | Array<unknown> | Record<string, unknown> | null;
115
+ /**
116
+ * The status code returned by the targeted webhook endpoint.
117
+ */
118
+ statusCode: number;
119
+ /**
120
+ * True if the targeted webhook endpoint returned status code 200. False otherwise.
121
+ */
122
+ success: boolean;
123
+ }
124
+ export interface WebhooksubscriptionCreateParams {
125
+ /**
126
+ * The events to subscribe the url to.
127
+ */
128
+ events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
129
+ /**
130
+ * The endpoint where webhook events are sent.
131
+ */
132
+ url: string;
133
+ }
134
+ export interface WebhooksubscriptionUpdateParams {
135
+ id: string;
136
+ events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
137
+ url?: string;
138
+ }
139
+ export interface WebhooksubscriptionListParams {
140
+ limit?: number;
141
+ skip?: number;
142
+ }
143
+ export interface WebhooksubscriptionDeleteParams {
144
+ id: string;
145
+ }
146
+ export interface WebhooksubscriptionPingParams {
147
+ /**
148
+ * The unique identifier for the webhook subscription to trigger.
149
+ */
150
+ id: string;
151
+ }
152
+ export declare namespace Webhooksubscription {
153
+ export { type WebhooksubscriptionCreateResponse as WebhooksubscriptionCreateResponse, type WebhooksubscriptionUpdateResponse as WebhooksubscriptionUpdateResponse, type WebhooksubscriptionListResponse as WebhooksubscriptionListResponse, type WebhooksubscriptionDeleteResponse as WebhooksubscriptionDeleteResponse, type WebhooksubscriptionPingResponse as WebhooksubscriptionPingResponse, type WebhooksubscriptionCreateParams as WebhooksubscriptionCreateParams, type WebhooksubscriptionUpdateParams as WebhooksubscriptionUpdateParams, type WebhooksubscriptionListParams as WebhooksubscriptionListParams, type WebhooksubscriptionDeleteParams as WebhooksubscriptionDeleteParams, type WebhooksubscriptionPingParams as WebhooksubscriptionPingParams, };
154
+ }
155
+ //# sourceMappingURL=webhooksubscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooksubscription.d.ts","sourceRoot":"","sources":["../src/resources/webhooksubscription.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;;OAGG;IACH,MAAM,CACJ,IAAI,EAAE,+BAA+B,EACrC,OAAO,C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GACzB,wBAAwB,GACxB,0BAA0B,GAC1B,0BAA0B,GAC1B,0BAA0B,GAC1B,4BAA4B,GAC5B,gBAAgB,GAChB,gBAAgB,GAChB,uBAAuB,GACvB,yBAAyB,GACzB,sBAAsB,GACtB,iBAAiB,GACjB,oBAAoB,GACpB,kBAAkB,GAClB,uBAAuB,CAC1B,CAAC;IAEF,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,+BAA+B;IAC9C,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,mBAAmB,CAAC;IAC3C,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Webhooksubscription = void 0;
5
+ const resource_1 = require("../resource.js");
6
+ class Webhooksubscription extends resource_1.APIResource {
7
+ /**
8
+ * Creates a webhook subscription that sends various events from Ivy to a specified
9
+ * url. There can be multiple subscriptions per app.
10
+ */
11
+ create(body, options) {
12
+ return this._client.post('/api/service/webhook-subscription/create', { body, ...options });
13
+ }
14
+ /**
15
+ * Updates the url or subcribed to events for a webhook subscription. This can be
16
+ * used via the app or via the API by providing an API key.
17
+ */
18
+ update(body, options) {
19
+ return this._client.post('/api/service/webhook-subscription/update', { body, ...options });
20
+ }
21
+ /**
22
+ * Lists all webhook subscriptions that are registered for the merchant. The
23
+ * results are paginated and provided in chronological order.
24
+ */
25
+ list(body, options) {
26
+ return this._client.post('/api/service/webhook-subscription/list', { body, ...options });
27
+ }
28
+ /**
29
+ * Deletes a webhook subscription.
30
+ */
31
+ delete(body, options) {
32
+ return this._client.post('/api/service/webhook-subscription/delete', { body, ...options });
33
+ }
34
+ /**
35
+ * Trigger the webhook event "test" for the specified webhook subscription.
36
+ */
37
+ ping(body, options) {
38
+ return this._client.post('/api/service/webhook-subscription/ping', { body, ...options });
39
+ }
40
+ }
41
+ exports.Webhooksubscription = Webhooksubscription;
42
+ //# sourceMappingURL=webhooksubscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooksubscription.js","sourceRoot":"","sources":["../src/resources/webhooksubscription.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,mBAAoB,SAAQ,sBAAW;IAClD;;;OAGG;IACH,MAAM,CACJ,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,IAAmC,EACnC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,IAAmC,EACnC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AArDD,kDAqDC"}
@@ -0,0 +1,38 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../resource.mjs";
3
+ export class Webhooksubscription extends APIResource {
4
+ /**
5
+ * Creates a webhook subscription that sends various events from Ivy to a specified
6
+ * url. There can be multiple subscriptions per app.
7
+ */
8
+ create(body, options) {
9
+ return this._client.post('/api/service/webhook-subscription/create', { body, ...options });
10
+ }
11
+ /**
12
+ * Updates the url or subcribed to events for a webhook subscription. This can be
13
+ * used via the app or via the API by providing an API key.
14
+ */
15
+ update(body, options) {
16
+ return this._client.post('/api/service/webhook-subscription/update', { body, ...options });
17
+ }
18
+ /**
19
+ * Lists all webhook subscriptions that are registered for the merchant. The
20
+ * results are paginated and provided in chronological order.
21
+ */
22
+ list(body, options) {
23
+ return this._client.post('/api/service/webhook-subscription/list', { body, ...options });
24
+ }
25
+ /**
26
+ * Deletes a webhook subscription.
27
+ */
28
+ delete(body, options) {
29
+ return this._client.post('/api/service/webhook-subscription/delete', { body, ...options });
30
+ }
31
+ /**
32
+ * Trigger the webhook event "test" for the specified webhook subscription.
33
+ */
34
+ ping(body, options) {
35
+ return this._client.post('/api/service/webhook-subscription/ping', { body, ...options });
36
+ }
37
+ }
38
+ //# sourceMappingURL=webhooksubscription.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooksubscription.mjs","sourceRoot":"","sources":["../src/resources/webhooksubscription.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAClD;;;OAGG;IACH,MAAM,CACJ,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,IAAmC,EACnC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,IAAqC,EACrC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,IAAmC,EACnC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
@@ -0,0 +1,30 @@
1
+
2
+
3
+
4
+
5
+ import * as types from "../_shims/node-types.js";
6
+ declare module '../_shims/manual-types' {
7
+ namespace manual {
8
+ type Agent = types.Agent;
9
+ export import fetch = types.fetch;
10
+ type Request = types.Request;
11
+ type RequestInfo = types.RequestInfo;
12
+ type RequestInit = types.RequestInit;
13
+ type Response = types.Response;
14
+ type ResponseInit = types.ResponseInit;
15
+ type ResponseType = types.ResponseType;
16
+ type BodyInit = types.BodyInit;
17
+ type Headers = types.Headers;
18
+ type HeadersInit = types.HeadersInit;
19
+ type BlobPropertyBag = types.BlobPropertyBag;
20
+ type FilePropertyBag = types.FilePropertyBag;
21
+ type FileFromPathOptions = types.FileFromPathOptions;
22
+ export import FormData = types.FormData;
23
+ export import File = types.File;
24
+ export import Blob = types.Blob;
25
+ type Readable = types.Readable;
26
+ type FsReadStream = types.FsReadStream;
27
+ export import ReadableStream = types.ReadableStream;
28
+ }
29
+ }
30
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":";;;;AACA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAK9C,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,MAAM,CAAC;QAEtB,KAAY,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAEhC,MAAM,QAAQ,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAElC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QAE5D,MAAM,QAAQ,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAExC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,MAAM,QAAQ,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;KACrD;CACF"}
package/shims/node.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ // @ts-ignore
27
+ const types = __importStar(require("../_shims/node-types.js"));
28
+ const registry_1 = require("../_shims/registry.js");
29
+ const node_runtime_1 = require("../_shims/node-runtime.js");
30
+ (0, registry_1.setShims)((0, node_runtime_1.getRuntime)());
31
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,+DAA8C;AAC9C,oDAA8C;AAC9C,4DAAoD;AACpD,IAAA,mBAAQ,EAAC,IAAA,yBAAU,GAAE,CAAC,CAAC"}
package/shims/node.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import * as types from "../_shims/node-types.mjs";
2
+ import { setShims } from "../_shims/registry.mjs";
3
+ import { getRuntime } from "../_shims/node-runtime.mjs";
4
+ setShims(getRuntime());
5
+ //# sourceMappingURL=node.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.mjs","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":"OACO,KAAK,KAAK;OACV,EAAE,QAAQ,EAAE;OACZ,EAAE,UAAU,EAAE;AACrB,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC"}