@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,73 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../resource';
4
+ import * as Core from '../core';
5
+
6
+ export class Subaccounts extends APIResource {
7
+ /**
8
+ * Create a Subaccount which can be used to reconcile orders, refunds and payouts
9
+ * more easily.
10
+ */
11
+ create(body: SubaccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<Subaccount> {
12
+ return this._client.post('/api/service/subaccount/create', { body, ...options });
13
+ }
14
+
15
+ /**
16
+ * Retrieve a Subaccount by id.
17
+ */
18
+ retrieve(body: SubaccountRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Subaccount> {
19
+ return this._client.post('/api/service/subaccount/retrieve', { body, ...options });
20
+ }
21
+ }
22
+
23
+ export interface Subaccount {
24
+ id: string;
25
+
26
+ legalName: string;
27
+
28
+ mcc: string;
29
+
30
+ ownerId: string;
31
+
32
+ status: 'active' | 'inactive';
33
+
34
+ createdAt?: string;
35
+
36
+ updatedAt?: string;
37
+
38
+ websiteUrl?: string;
39
+ }
40
+
41
+ export interface SubaccountCreateParams {
42
+ /**
43
+ * The legal name of the Subaccount
44
+ */
45
+ legalName: string;
46
+
47
+ /**
48
+ * The merchant category code of the Subaccount. See
49
+ * [here](https://www.citibank.com/tts/solutions/commercial-cards/assets/docs/govt/Merchant-Category-Codes.pdf)
50
+ * for more information.
51
+ */
52
+ mcc: string;
53
+
54
+ /**
55
+ * The website url of the Subaccount
56
+ */
57
+ websiteUrl?: string;
58
+ }
59
+
60
+ export interface SubaccountRetrieveParams {
61
+ /**
62
+ * The unique identifier of the Subaccount
63
+ */
64
+ id: string;
65
+ }
66
+
67
+ export declare namespace Subaccounts {
68
+ export {
69
+ type Subaccount as Subaccount,
70
+ type SubaccountCreateParams as SubaccountCreateParams,
71
+ type SubaccountRetrieveParams as SubaccountRetrieveParams,
72
+ };
73
+ }
@@ -0,0 +1,353 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../resource';
4
+ import * as Core from '../core';
5
+
6
+ export class Webhooksubscription extends 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(
12
+ body: WebhooksubscriptionCreateParams,
13
+ options?: Core.RequestOptions,
14
+ ): Core.APIPromise<WebhooksubscriptionCreateResponse> {
15
+ return this._client.post('/api/service/webhook-subscription/create', { body, ...options });
16
+ }
17
+
18
+ /**
19
+ * Updates the url or subcribed to events for a webhook subscription. This can be
20
+ * used via the app or via the API by providing an API key.
21
+ */
22
+ update(
23
+ body: WebhooksubscriptionUpdateParams,
24
+ options?: Core.RequestOptions,
25
+ ): Core.APIPromise<WebhooksubscriptionUpdateResponse> {
26
+ return this._client.post('/api/service/webhook-subscription/update', { body, ...options });
27
+ }
28
+
29
+ /**
30
+ * Lists all webhook subscriptions that are registered for the merchant. The
31
+ * results are paginated and provided in chronological order.
32
+ */
33
+ list(
34
+ body: WebhooksubscriptionListParams,
35
+ options?: Core.RequestOptions,
36
+ ): Core.APIPromise<WebhooksubscriptionListResponse> {
37
+ return this._client.post('/api/service/webhook-subscription/list', { body, ...options });
38
+ }
39
+
40
+ /**
41
+ * Deletes a webhook subscription.
42
+ */
43
+ delete(
44
+ body: WebhooksubscriptionDeleteParams,
45
+ options?: Core.RequestOptions,
46
+ ): Core.APIPromise<WebhooksubscriptionDeleteResponse> {
47
+ return this._client.post('/api/service/webhook-subscription/delete', { body, ...options });
48
+ }
49
+
50
+ /**
51
+ * Trigger the webhook event "test" for the specified webhook subscription.
52
+ */
53
+ ping(
54
+ body: WebhooksubscriptionPingParams,
55
+ options?: Core.RequestOptions,
56
+ ): Core.APIPromise<WebhooksubscriptionPingResponse> {
57
+ return this._client.post('/api/service/webhook-subscription/ping', { body, ...options });
58
+ }
59
+ }
60
+
61
+ export interface WebhooksubscriptionCreateResponse {
62
+ /**
63
+ * The unique id for the webhook subscription.
64
+ */
65
+ id: string;
66
+
67
+ createdAt: string;
68
+
69
+ events: Array<
70
+ | 'test'
71
+ | 'merchant_updated'
72
+ | 'merchant_app_updated'
73
+ | 'order_created'
74
+ | 'order_updated'
75
+ | 'refund_succeeded'
76
+ | 'refund_failed'
77
+ | 'payout_report_requested'
78
+ | 'data_session_completed'
79
+ | 'checkout_session_created'
80
+ | 'checkout_session_updated'
81
+ | 'checkout_session_expired'
82
+ | 'checkout_session_completed'
83
+ | 'payout_created'
84
+ | 'payout_updated'
85
+ | 'mandate_setup_started'
86
+ | 'mandate_setup_succeeded'
87
+ | 'mandate_setup_failed'
88
+ | 'mandate_revoked'
89
+ | 'user_payout.failed'
90
+ | 'user_payout.paid'
91
+ | 'user_payout.initiated'
92
+ >;
93
+
94
+ /**
95
+ * The unique id for the webhook subscription.
96
+ */
97
+ merchant: string;
98
+
99
+ /**
100
+ * @deprecated The unique id for the webhook subscription.
101
+ */
102
+ merchantApp: string;
103
+
104
+ updatedAt: string;
105
+
106
+ /**
107
+ * The url that will listen to the webhook events coming from Ivy. Must be unique
108
+ * for the merchant app.
109
+ */
110
+ url: string;
111
+ }
112
+
113
+ export interface WebhooksubscriptionUpdateResponse {
114
+ /**
115
+ * The unique id for the webhook subscription.
116
+ */
117
+ id: string;
118
+
119
+ createdAt: string;
120
+
121
+ events: Array<
122
+ | 'test'
123
+ | 'merchant_updated'
124
+ | 'merchant_app_updated'
125
+ | 'order_created'
126
+ | 'order_updated'
127
+ | 'refund_succeeded'
128
+ | 'refund_failed'
129
+ | 'payout_report_requested'
130
+ | 'data_session_completed'
131
+ | 'checkout_session_created'
132
+ | 'checkout_session_updated'
133
+ | 'checkout_session_expired'
134
+ | 'checkout_session_completed'
135
+ | 'payout_created'
136
+ | 'payout_updated'
137
+ | 'mandate_setup_started'
138
+ | 'mandate_setup_succeeded'
139
+ | 'mandate_setup_failed'
140
+ | 'mandate_revoked'
141
+ | 'user_payout.failed'
142
+ | 'user_payout.paid'
143
+ | 'user_payout.initiated'
144
+ >;
145
+
146
+ /**
147
+ * The unique id for the webhook subscription.
148
+ */
149
+ merchant: string;
150
+
151
+ /**
152
+ * @deprecated The unique id for the webhook subscription.
153
+ */
154
+ merchantApp: string;
155
+
156
+ updatedAt: string;
157
+
158
+ /**
159
+ * The url that will listen to the webhook events coming from Ivy. Must be unique
160
+ * for the merchant app.
161
+ */
162
+ url: string;
163
+ }
164
+
165
+ export interface WebhooksubscriptionListResponse {
166
+ count: number;
167
+
168
+ hasNext: boolean;
169
+
170
+ items: Array<WebhooksubscriptionListResponse.Item>;
171
+
172
+ skip: number;
173
+ }
174
+
175
+ export namespace WebhooksubscriptionListResponse {
176
+ export interface Item {
177
+ /**
178
+ * The unique id for the webhook subscription.
179
+ */
180
+ id: string;
181
+
182
+ createdAt: string;
183
+
184
+ events: Array<
185
+ | 'test'
186
+ | 'merchant_updated'
187
+ | 'merchant_app_updated'
188
+ | 'order_created'
189
+ | 'order_updated'
190
+ | 'refund_succeeded'
191
+ | 'refund_failed'
192
+ | 'payout_report_requested'
193
+ | 'data_session_completed'
194
+ | 'checkout_session_created'
195
+ | 'checkout_session_updated'
196
+ | 'checkout_session_expired'
197
+ | 'checkout_session_completed'
198
+ | 'payout_created'
199
+ | 'payout_updated'
200
+ | 'mandate_setup_started'
201
+ | 'mandate_setup_succeeded'
202
+ | 'mandate_setup_failed'
203
+ | 'mandate_revoked'
204
+ | 'user_payout.failed'
205
+ | 'user_payout.paid'
206
+ | 'user_payout.initiated'
207
+ >;
208
+
209
+ /**
210
+ * The unique id for the webhook subscription.
211
+ */
212
+ merchant: string;
213
+
214
+ /**
215
+ * @deprecated The unique id for the webhook subscription.
216
+ */
217
+ merchantApp: string;
218
+
219
+ updatedAt: string;
220
+
221
+ /**
222
+ * The url that will listen to the webhook events coming from Ivy. Must be unique
223
+ * for the merchant app.
224
+ */
225
+ url: string;
226
+ }
227
+ }
228
+
229
+ export interface WebhooksubscriptionDeleteResponse {
230
+ success: boolean;
231
+ }
232
+
233
+ export interface WebhooksubscriptionPingResponse {
234
+ /**
235
+ * The unique identifier of the webhook that was sent.
236
+ */
237
+ id: string;
238
+
239
+ date: string;
240
+
241
+ /**
242
+ * The response body returned by the targeted webhook endpoint.
243
+ */
244
+ response: string | number | boolean | Array<unknown> | Record<string, unknown> | null;
245
+
246
+ /**
247
+ * The status code returned by the targeted webhook endpoint.
248
+ */
249
+ statusCode: number;
250
+
251
+ /**
252
+ * True if the targeted webhook endpoint returned status code 200. False otherwise.
253
+ */
254
+ success: boolean;
255
+ }
256
+
257
+ export interface WebhooksubscriptionCreateParams {
258
+ /**
259
+ * The events to subscribe the url to.
260
+ */
261
+ events: Array<
262
+ | 'test'
263
+ | 'merchant_updated'
264
+ | 'merchant_app_updated'
265
+ | 'order_created'
266
+ | 'order_updated'
267
+ | 'refund_succeeded'
268
+ | 'refund_failed'
269
+ | 'payout_report_requested'
270
+ | 'data_session_completed'
271
+ | 'checkout_session_created'
272
+ | 'checkout_session_updated'
273
+ | 'checkout_session_expired'
274
+ | 'checkout_session_completed'
275
+ | 'payout_created'
276
+ | 'payout_updated'
277
+ | 'mandate_setup_started'
278
+ | 'mandate_setup_succeeded'
279
+ | 'mandate_setup_failed'
280
+ | 'mandate_revoked'
281
+ | 'user_payout.failed'
282
+ | 'user_payout.paid'
283
+ | 'user_payout.initiated'
284
+ >;
285
+
286
+ /**
287
+ * The endpoint where webhook events are sent.
288
+ */
289
+ url: string;
290
+ }
291
+
292
+ export interface WebhooksubscriptionUpdateParams {
293
+ id: string;
294
+
295
+ events?: Array<
296
+ | 'test'
297
+ | 'merchant_updated'
298
+ | 'merchant_app_updated'
299
+ | 'order_created'
300
+ | 'order_updated'
301
+ | 'refund_succeeded'
302
+ | 'refund_failed'
303
+ | 'payout_report_requested'
304
+ | 'data_session_completed'
305
+ | 'checkout_session_created'
306
+ | 'checkout_session_updated'
307
+ | 'checkout_session_expired'
308
+ | 'checkout_session_completed'
309
+ | 'payout_created'
310
+ | 'payout_updated'
311
+ | 'mandate_setup_started'
312
+ | 'mandate_setup_succeeded'
313
+ | 'mandate_setup_failed'
314
+ | 'mandate_revoked'
315
+ | 'user_payout.failed'
316
+ | 'user_payout.paid'
317
+ | 'user_payout.initiated'
318
+ >;
319
+
320
+ url?: string;
321
+ }
322
+
323
+ export interface WebhooksubscriptionListParams {
324
+ limit?: number;
325
+
326
+ skip?: number;
327
+ }
328
+
329
+ export interface WebhooksubscriptionDeleteParams {
330
+ id: string;
331
+ }
332
+
333
+ export interface WebhooksubscriptionPingParams {
334
+ /**
335
+ * The unique identifier for the webhook subscription to trigger.
336
+ */
337
+ id: string;
338
+ }
339
+
340
+ export declare namespace Webhooksubscription {
341
+ export {
342
+ type WebhooksubscriptionCreateResponse as WebhooksubscriptionCreateResponse,
343
+ type WebhooksubscriptionUpdateResponse as WebhooksubscriptionUpdateResponse,
344
+ type WebhooksubscriptionListResponse as WebhooksubscriptionListResponse,
345
+ type WebhooksubscriptionDeleteResponse as WebhooksubscriptionDeleteResponse,
346
+ type WebhooksubscriptionPingResponse as WebhooksubscriptionPingResponse,
347
+ type WebhooksubscriptionCreateParams as WebhooksubscriptionCreateParams,
348
+ type WebhooksubscriptionUpdateParams as WebhooksubscriptionUpdateParams,
349
+ type WebhooksubscriptionListParams as WebhooksubscriptionListParams,
350
+ type WebhooksubscriptionDeleteParams as WebhooksubscriptionDeleteParams,
351
+ type WebhooksubscriptionPingParams as WebhooksubscriptionPingParams,
352
+ };
353
+ }
@@ -0,0 +1,50 @@
1
+ // @ts-ignore
2
+ import * as types from '../_shims/node-types';
3
+ import { setShims } from '../_shims/registry';
4
+ import { getRuntime } from '../_shims/node-runtime';
5
+ setShims(getRuntime());
6
+
7
+ declare module '../_shims/manual-types' {
8
+ export namespace manual {
9
+ // @ts-ignore
10
+ export type Agent = types.Agent;
11
+ // @ts-ignore
12
+ export import fetch = types.fetch;
13
+ // @ts-ignore
14
+ export type Request = types.Request;
15
+ // @ts-ignore
16
+ export type RequestInfo = types.RequestInfo;
17
+ // @ts-ignore
18
+ export type RequestInit = types.RequestInit;
19
+ // @ts-ignore
20
+ export type Response = types.Response;
21
+ // @ts-ignore
22
+ export type ResponseInit = types.ResponseInit;
23
+ // @ts-ignore
24
+ export type ResponseType = types.ResponseType;
25
+ // @ts-ignore
26
+ export type BodyInit = types.BodyInit;
27
+ // @ts-ignore
28
+ export type Headers = types.Headers;
29
+ // @ts-ignore
30
+ export type HeadersInit = types.HeadersInit;
31
+ // @ts-ignore
32
+ export type BlobPropertyBag = types.BlobPropertyBag;
33
+ // @ts-ignore
34
+ export type FilePropertyBag = types.FilePropertyBag;
35
+ // @ts-ignore
36
+ export type FileFromPathOptions = types.FileFromPathOptions;
37
+ // @ts-ignore
38
+ export import FormData = types.FormData;
39
+ // @ts-ignore
40
+ export import File = types.File;
41
+ // @ts-ignore
42
+ export import Blob = types.Blob;
43
+ // @ts-ignore
44
+ export type Readable = types.Readable;
45
+ // @ts-ignore
46
+ export type FsReadStream = types.FsReadStream;
47
+ // @ts-ignore
48
+ export import ReadableStream = types.ReadableStream;
49
+ }
50
+ }
@@ -0,0 +1,50 @@
1
+ // @ts-ignore
2
+ import * as types from '../_shims/web-types';
3
+ import { setShims } from '../_shims/registry';
4
+ import { getRuntime } from '../_shims/web-runtime';
5
+ setShims(getRuntime({ manuallyImported: true }));
6
+
7
+ declare module '../_shims/manual-types' {
8
+ export namespace manual {
9
+ // @ts-ignore
10
+ export type Agent = types.Agent;
11
+ // @ts-ignore
12
+ export import fetch = types.fetch;
13
+ // @ts-ignore
14
+ export type Request = types.Request;
15
+ // @ts-ignore
16
+ export type RequestInfo = types.RequestInfo;
17
+ // @ts-ignore
18
+ export type RequestInit = types.RequestInit;
19
+ // @ts-ignore
20
+ export type Response = types.Response;
21
+ // @ts-ignore
22
+ export type ResponseInit = types.ResponseInit;
23
+ // @ts-ignore
24
+ export type ResponseType = types.ResponseType;
25
+ // @ts-ignore
26
+ export type BodyInit = types.BodyInit;
27
+ // @ts-ignore
28
+ export type Headers = types.Headers;
29
+ // @ts-ignore
30
+ export type HeadersInit = types.HeadersInit;
31
+ // @ts-ignore
32
+ export type BlobPropertyBag = types.BlobPropertyBag;
33
+ // @ts-ignore
34
+ export type FilePropertyBag = types.FilePropertyBag;
35
+ // @ts-ignore
36
+ export type FileFromPathOptions = types.FileFromPathOptions;
37
+ // @ts-ignore
38
+ export import FormData = types.FormData;
39
+ // @ts-ignore
40
+ export import File = types.File;
41
+ // @ts-ignore
42
+ export import Blob = types.Blob;
43
+ // @ts-ignore
44
+ export type Readable = types.Readable;
45
+ // @ts-ignore
46
+ export type FsReadStream = types.FsReadStream;
47
+ // @ts-ignore
48
+ export import ReadableStream = types.ReadableStream;
49
+ }
50
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ // this config is included in the published src directory to prevent TS errors
3
+ // from appearing when users go to source, and VSCode opens the source .ts file
4
+ // via declaration maps
5
+ "include": ["index.ts"],
6
+ "compilerOptions": {
7
+ "target": "es2015",
8
+ "lib": ["DOM"],
9
+ "moduleResolution": "node"
10
+ }
11
+ }