@peable.to/contracts 0.3.0 → 1.0.0

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 (316) hide show
  1. package/dist/cjs/common/address.js +81 -0
  2. package/dist/cjs/common/envelopes.js +101 -0
  3. package/dist/cjs/common/objects.js +85 -0
  4. package/dist/cjs/common/params.js +211 -0
  5. package/dist/cjs/common/primitives.js +39 -0
  6. package/dist/cjs/contributions.js +22 -0
  7. package/dist/cjs/index.js +40 -97
  8. package/dist/cjs/openapi/document.js +297 -0
  9. package/dist/cjs/openapi/index.js +7 -0
  10. package/dist/cjs/openapi/webhooks.js +17 -0
  11. package/dist/cjs/resources/billingEngine/billingPortal.js +237 -0
  12. package/dist/cjs/resources/billingEngine/creditNotes.js +189 -0
  13. package/dist/cjs/resources/billingEngine/customerBalanceTransactions.js +90 -0
  14. package/dist/cjs/resources/billingEngine/index.js +43 -0
  15. package/dist/cjs/resources/billingEngine/invoiceItems.js +155 -0
  16. package/dist/cjs/resources/billingEngine/invoices.js +509 -0
  17. package/dist/cjs/resources/billingEngine/params.js +43 -0
  18. package/dist/cjs/resources/billingEngine/public.js +326 -0
  19. package/dist/cjs/resources/billingEngine/subscriptions.js +476 -0
  20. package/dist/cjs/resources/catalog/billing.js +755 -0
  21. package/dist/cjs/resources/catalog/billingSettings.js +131 -0
  22. package/dist/cjs/resources/catalog/coupons.js +222 -0
  23. package/dist/cjs/resources/catalog/entitlements.js +257 -0
  24. package/dist/cjs/resources/catalog/index.js +58 -0
  25. package/dist/cjs/resources/catalog/meters.js +279 -0
  26. package/dist/cjs/resources/catalog/prices.js +423 -0
  27. package/dist/cjs/resources/catalog/products.js +228 -0
  28. package/dist/cjs/resources/catalog/promotionCodes.js +174 -0
  29. package/dist/cjs/resources/catalog/shared.js +75 -0
  30. package/dist/cjs/resources/catalog/testClocks.js +127 -0
  31. package/dist/cjs/resources/checkout/checkoutSessions.js +582 -0
  32. package/dist/cjs/resources/checkout/contributions.js +172 -0
  33. package/dist/cjs/resources/checkout/files.js +133 -0
  34. package/dist/cjs/resources/checkout/index.js +57 -0
  35. package/dist/cjs/resources/checkout/merchants.js +290 -0
  36. package/dist/cjs/resources/checkout/paymentLinks.js +330 -0
  37. package/dist/cjs/resources/checkout/paymentMethodConfigurations.js +262 -0
  38. package/dist/cjs/resources/checkout/shared.js +368 -0
  39. package/dist/cjs/resources/connect/account.js +332 -0
  40. package/dist/cjs/resources/connect/applicationFees.js +113 -0
  41. package/dist/cjs/resources/connect/balance.js +212 -0
  42. package/dist/cjs/resources/connect/connectedAccounts.js +260 -0
  43. package/dist/cjs/resources/connect/index.js +51 -0
  44. package/dist/cjs/resources/connect/onboarding.js +82 -0
  45. package/dist/cjs/resources/connect/payouts.js +196 -0
  46. package/dist/cjs/resources/connect/reporting.js +235 -0
  47. package/dist/cjs/resources/connect/requestLogs.js +110 -0
  48. package/dist/cjs/resources/connect/transfers.js +227 -0
  49. package/dist/cjs/resources/core/customers.js +194 -0
  50. package/dist/cjs/resources/core/index.js +23 -0
  51. package/dist/cjs/resources/core/paymentMethods.js +134 -0
  52. package/dist/cjs/resources/events/events.js +357 -0
  53. package/dist/cjs/resources/events/index.js +29 -0
  54. package/dist/cjs/resources/events/webhookDeliveries.js +93 -0
  55. package/dist/cjs/resources/events/webhookEndpoints.js +215 -0
  56. package/dist/cjs/resources/payments/charges.js +157 -0
  57. package/dist/cjs/resources/payments/disputes.js +204 -0
  58. package/dist/cjs/resources/payments/index.js +41 -0
  59. package/dist/cjs/resources/payments/paymentIntents.js +529 -0
  60. package/dist/cjs/resources/payments/refunds.js +245 -0
  61. package/dist/cjs/resources/payments/setupIntents.js +158 -0
  62. package/dist/cjs/resources/payments/social.js +182 -0
  63. package/dist/cjs/resources/payments/testHelpers.js +39 -0
  64. package/dist/cjs/resources/tax/assessments.js +217 -0
  65. package/dist/cjs/resources/tax/businessProfile.js +99 -0
  66. package/dist/cjs/resources/tax/calculations.js +176 -0
  67. package/dist/cjs/resources/tax/capabilities.js +42 -0
  68. package/dist/cjs/resources/tax/codes.js +37 -0
  69. package/dist/cjs/resources/tax/complianceActions.js +56 -0
  70. package/dist/cjs/resources/tax/deadlines.js +59 -0
  71. package/dist/cjs/resources/tax/documents.js +128 -0
  72. package/dist/cjs/resources/tax/index.js +80 -0
  73. package/dist/cjs/resources/tax/locationEvidence.js +131 -0
  74. package/dist/cjs/resources/tax/operatingLocations.js +98 -0
  75. package/dist/cjs/resources/tax/products.js +67 -0
  76. package/dist/cjs/resources/tax/registrationDeclarations.js +124 -0
  77. package/dist/cjs/resources/tax/registrations.js +82 -0
  78. package/dist/cjs/resources/tax/reports.js +92 -0
  79. package/dist/cjs/resources/tax/reviewItems.js +116 -0
  80. package/dist/cjs/resources/tax/ruleSet.js +68 -0
  81. package/dist/cjs/resources/tax/salesDestinations.js +94 -0
  82. package/dist/cjs/resources/tax/settings.js +104 -0
  83. package/dist/cjs/resources/tax/shared.js +62 -0
  84. package/dist/cjs/resources/tax/transactions.js +102 -0
  85. package/dist/cjs/route.js +22 -0
  86. package/dist/cjs/routes.js +31 -0
  87. package/dist/cjs/vocabulary/billingPortal.js +15 -0
  88. package/dist/cjs/vocabulary/catalog.js +110 -0
  89. package/dist/cjs/vocabulary/checkout.js +53 -0
  90. package/dist/cjs/vocabulary/connect.js +95 -0
  91. package/dist/cjs/vocabulary/errors.js +174 -0
  92. package/dist/cjs/vocabulary/events.js +176 -0
  93. package/dist/cjs/vocabulary/files.js +44 -0
  94. package/dist/cjs/vocabulary/index.js +37 -0
  95. package/dist/cjs/vocabulary/invoices.js +52 -0
  96. package/dist/cjs/vocabulary/lists.js +22 -0
  97. package/dist/cjs/vocabulary/merchants.js +23 -0
  98. package/dist/cjs/vocabulary/money.js +104 -0
  99. package/dist/cjs/vocabulary/paymentMethodConfigurations.js +36 -0
  100. package/dist/cjs/vocabulary/payments.js +195 -0
  101. package/dist/cjs/vocabulary/reporting.js +27 -0
  102. package/dist/cjs/vocabulary/subscriptions.js +60 -0
  103. package/dist/cjs/vocabulary/tax.js +237 -0
  104. package/dist/cjs/vocabulary/version.js +12 -0
  105. package/dist/esm/common/address.js +76 -0
  106. package/dist/esm/common/envelopes.js +95 -0
  107. package/dist/esm/common/objects.js +74 -0
  108. package/dist/esm/common/params.js +203 -0
  109. package/dist/esm/common/primitives.js +35 -0
  110. package/dist/esm/contributions.js +5 -0
  111. package/dist/esm/index.js +26 -94
  112. package/dist/esm/openapi/document.js +294 -0
  113. package/dist/esm/openapi/index.js +2 -0
  114. package/dist/esm/openapi/webhooks.js +14 -0
  115. package/dist/esm/resources/billingEngine/billingPortal.js +234 -0
  116. package/dist/esm/resources/billingEngine/creditNotes.js +186 -0
  117. package/dist/esm/resources/billingEngine/customerBalanceTransactions.js +87 -0
  118. package/dist/esm/resources/billingEngine/index.js +26 -0
  119. package/dist/esm/resources/billingEngine/invoiceItems.js +152 -0
  120. package/dist/esm/resources/billingEngine/invoices.js +506 -0
  121. package/dist/esm/resources/billingEngine/params.js +39 -0
  122. package/dist/esm/resources/billingEngine/public.js +323 -0
  123. package/dist/esm/resources/billingEngine/subscriptions.js +473 -0
  124. package/dist/esm/resources/catalog/billing.js +752 -0
  125. package/dist/esm/resources/catalog/billingSettings.js +128 -0
  126. package/dist/esm/resources/catalog/coupons.js +219 -0
  127. package/dist/esm/resources/catalog/entitlements.js +254 -0
  128. package/dist/esm/resources/catalog/index.js +38 -0
  129. package/dist/esm/resources/catalog/meters.js +276 -0
  130. package/dist/esm/resources/catalog/prices.js +419 -0
  131. package/dist/esm/resources/catalog/products.js +225 -0
  132. package/dist/esm/resources/catalog/promotionCodes.js +171 -0
  133. package/dist/esm/resources/catalog/shared.js +67 -0
  134. package/dist/esm/resources/catalog/testClocks.js +124 -0
  135. package/dist/esm/resources/checkout/checkoutSessions.js +579 -0
  136. package/dist/esm/resources/checkout/contributions.js +167 -0
  137. package/dist/esm/resources/checkout/files.js +130 -0
  138. package/dist/esm/resources/checkout/index.js +25 -0
  139. package/dist/esm/resources/checkout/merchants.js +287 -0
  140. package/dist/esm/resources/checkout/paymentLinks.js +327 -0
  141. package/dist/esm/resources/checkout/paymentMethodConfigurations.js +259 -0
  142. package/dist/esm/resources/checkout/shared.js +363 -0
  143. package/dist/esm/resources/connect/account.js +329 -0
  144. package/dist/esm/resources/connect/applicationFees.js +110 -0
  145. package/dist/esm/resources/connect/balance.js +209 -0
  146. package/dist/esm/resources/connect/connectedAccounts.js +257 -0
  147. package/dist/esm/resources/connect/index.js +34 -0
  148. package/dist/esm/resources/connect/onboarding.js +79 -0
  149. package/dist/esm/resources/connect/payouts.js +193 -0
  150. package/dist/esm/resources/connect/reporting.js +232 -0
  151. package/dist/esm/resources/connect/requestLogs.js +107 -0
  152. package/dist/esm/resources/connect/transfers.js +224 -0
  153. package/dist/esm/resources/core/customers.js +191 -0
  154. package/dist/esm/resources/core/index.js +6 -0
  155. package/dist/esm/resources/core/paymentMethods.js +131 -0
  156. package/dist/esm/resources/events/events.js +353 -0
  157. package/dist/esm/resources/events/index.js +12 -0
  158. package/dist/esm/resources/events/webhookDeliveries.js +90 -0
  159. package/dist/esm/resources/events/webhookEndpoints.js +212 -0
  160. package/dist/esm/resources/payments/charges.js +154 -0
  161. package/dist/esm/resources/payments/disputes.js +201 -0
  162. package/dist/esm/resources/payments/index.js +24 -0
  163. package/dist/esm/resources/payments/paymentIntents.js +526 -0
  164. package/dist/esm/resources/payments/refunds.js +242 -0
  165. package/dist/esm/resources/payments/setupIntents.js +155 -0
  166. package/dist/esm/resources/payments/social.js +179 -0
  167. package/dist/esm/resources/payments/testHelpers.js +36 -0
  168. package/dist/esm/resources/tax/assessments.js +214 -0
  169. package/dist/esm/resources/tax/businessProfile.js +96 -0
  170. package/dist/esm/resources/tax/calculations.js +173 -0
  171. package/dist/esm/resources/tax/capabilities.js +39 -0
  172. package/dist/esm/resources/tax/codes.js +34 -0
  173. package/dist/esm/resources/tax/complianceActions.js +53 -0
  174. package/dist/esm/resources/tax/deadlines.js +56 -0
  175. package/dist/esm/resources/tax/documents.js +125 -0
  176. package/dist/esm/resources/tax/index.js +63 -0
  177. package/dist/esm/resources/tax/locationEvidence.js +128 -0
  178. package/dist/esm/resources/tax/operatingLocations.js +95 -0
  179. package/dist/esm/resources/tax/products.js +64 -0
  180. package/dist/esm/resources/tax/registrationDeclarations.js +121 -0
  181. package/dist/esm/resources/tax/registrations.js +79 -0
  182. package/dist/esm/resources/tax/reports.js +89 -0
  183. package/dist/esm/resources/tax/reviewItems.js +113 -0
  184. package/dist/esm/resources/tax/ruleSet.js +65 -0
  185. package/dist/esm/resources/tax/salesDestinations.js +91 -0
  186. package/dist/esm/resources/tax/settings.js +101 -0
  187. package/dist/esm/resources/tax/shared.js +58 -0
  188. package/dist/esm/resources/tax/transactions.js +99 -0
  189. package/dist/esm/route.js +16 -0
  190. package/dist/esm/routes.js +27 -0
  191. package/dist/esm/vocabulary/billingPortal.js +12 -0
  192. package/dist/esm/vocabulary/catalog.js +106 -0
  193. package/dist/esm/vocabulary/checkout.js +50 -0
  194. package/dist/esm/vocabulary/connect.js +92 -0
  195. package/dist/esm/vocabulary/errors.js +169 -0
  196. package/dist/esm/vocabulary/events.js +173 -0
  197. package/dist/esm/vocabulary/files.js +41 -0
  198. package/dist/esm/vocabulary/index.js +21 -0
  199. package/dist/esm/vocabulary/invoices.js +49 -0
  200. package/dist/esm/vocabulary/lists.js +19 -0
  201. package/dist/esm/vocabulary/merchants.js +20 -0
  202. package/dist/esm/vocabulary/money.js +98 -0
  203. package/dist/esm/vocabulary/paymentMethodConfigurations.js +33 -0
  204. package/dist/esm/vocabulary/payments.js +192 -0
  205. package/dist/esm/vocabulary/reporting.js +24 -0
  206. package/dist/esm/vocabulary/subscriptions.js +57 -0
  207. package/dist/esm/vocabulary/tax.js +233 -0
  208. package/dist/esm/vocabulary/version.js +9 -0
  209. package/dist/types/common/address.d.ts +62 -0
  210. package/dist/types/common/envelopes.d.ts +88 -0
  211. package/dist/types/common/objects.d.ts +107 -0
  212. package/dist/types/common/params.d.ts +156 -0
  213. package/dist/types/common/primitives.d.ts +56 -0
  214. package/dist/types/contributions.d.ts +1 -0
  215. package/dist/types/index.d.ts +16 -134
  216. package/dist/types/openapi/document.d.ts +16 -0
  217. package/dist/types/openapi/index.d.ts +2 -0
  218. package/dist/types/openapi/webhooks.d.ts +15 -0
  219. package/dist/types/resources/billingEngine/billingPortal.d.ts +742 -0
  220. package/dist/types/resources/billingEngine/creditNotes.d.ts +655 -0
  221. package/dist/types/resources/billingEngine/customerBalanceTransactions.d.ts +282 -0
  222. package/dist/types/resources/billingEngine/index.d.ts +6071 -0
  223. package/dist/types/resources/billingEngine/invoiceItems.d.ts +502 -0
  224. package/dist/types/resources/billingEngine/invoices.d.ts +2547 -0
  225. package/dist/types/resources/billingEngine/params.d.ts +51 -0
  226. package/dist/types/resources/billingEngine/public.d.ts +1860 -0
  227. package/dist/types/resources/billingEngine/subscriptions.d.ts +1519 -0
  228. package/dist/types/resources/catalog/billing.d.ts +1723 -0
  229. package/dist/types/resources/catalog/billingSettings.d.ts +160 -0
  230. package/dist/types/resources/catalog/coupons.d.ts +403 -0
  231. package/dist/types/resources/catalog/entitlements.d.ts +422 -0
  232. package/dist/types/resources/catalog/index.d.ts +3155 -0
  233. package/dist/types/resources/catalog/meters.d.ts +474 -0
  234. package/dist/types/resources/catalog/prices.d.ts +1091 -0
  235. package/dist/types/resources/catalog/products.d.ts +430 -0
  236. package/dist/types/resources/catalog/promotionCodes.d.ts +369 -0
  237. package/dist/types/resources/catalog/shared.d.ts +34 -0
  238. package/dist/types/resources/catalog/testClocks.d.ts +220 -0
  239. package/dist/types/resources/checkout/checkoutSessions.d.ts +3207 -0
  240. package/dist/types/resources/checkout/contributions.d.ts +375 -0
  241. package/dist/types/resources/checkout/files.d.ts +280 -0
  242. package/dist/types/resources/checkout/index.d.ts +5678 -0
  243. package/dist/types/resources/checkout/merchants.d.ts +395 -0
  244. package/dist/types/resources/checkout/paymentLinks.d.ts +1728 -0
  245. package/dist/types/resources/checkout/paymentMethodConfigurations.d.ts +2104 -0
  246. package/dist/types/resources/checkout/shared.d.ts +419 -0
  247. package/dist/types/resources/connect/account.d.ts +483 -0
  248. package/dist/types/resources/connect/applicationFees.d.ts +198 -0
  249. package/dist/types/resources/connect/balance.d.ts +399 -0
  250. package/dist/types/resources/connect/connectedAccounts.d.ts +494 -0
  251. package/dist/types/resources/connect/index.d.ts +2094 -0
  252. package/dist/types/resources/connect/onboarding.d.ts +95 -0
  253. package/dist/types/resources/connect/payouts.d.ts +527 -0
  254. package/dist/types/resources/connect/reporting.d.ts +506 -0
  255. package/dist/types/resources/connect/requestLogs.d.ts +236 -0
  256. package/dist/types/resources/connect/transfers.d.ts +436 -0
  257. package/dist/types/resources/core/customers.d.ts +619 -0
  258. package/dist/types/resources/core/index.d.ts +679 -0
  259. package/dist/types/resources/core/paymentMethods.d.ts +336 -0
  260. package/dist/types/resources/events/events.d.ts +731 -0
  261. package/dist/types/resources/events/index.d.ts +1727 -0
  262. package/dist/types/resources/events/webhookDeliveries.d.ts +436 -0
  263. package/dist/types/resources/events/webhookEndpoints.d.ts +1502 -0
  264. package/dist/types/resources/payments/charges.d.ts +390 -0
  265. package/dist/types/resources/payments/disputes.d.ts +822 -0
  266. package/dist/types/resources/payments/index.d.ts +3517 -0
  267. package/dist/types/resources/payments/paymentIntents.d.ts +2080 -0
  268. package/dist/types/resources/payments/refunds.d.ts +684 -0
  269. package/dist/types/resources/payments/setupIntents.d.ts +391 -0
  270. package/dist/types/resources/payments/social.d.ts +266 -0
  271. package/dist/types/resources/payments/testHelpers.d.ts +178 -0
  272. package/dist/types/resources/tax/assessments.d.ts +787 -0
  273. package/dist/types/resources/tax/businessProfile.d.ts +134 -0
  274. package/dist/types/resources/tax/calculations.d.ts +261 -0
  275. package/dist/types/resources/tax/capabilities.d.ts +81 -0
  276. package/dist/types/resources/tax/codes.d.ts +29 -0
  277. package/dist/types/resources/tax/complianceActions.d.ts +97 -0
  278. package/dist/types/resources/tax/deadlines.d.ts +133 -0
  279. package/dist/types/resources/tax/documents.d.ts +257 -0
  280. package/dist/types/resources/tax/index.d.ts +1946 -0
  281. package/dist/types/resources/tax/locationEvidence.d.ts +246 -0
  282. package/dist/types/resources/tax/operatingLocations.d.ts +170 -0
  283. package/dist/types/resources/tax/products.d.ts +68 -0
  284. package/dist/types/resources/tax/registrationDeclarations.d.ts +270 -0
  285. package/dist/types/resources/tax/registrations.d.ts +103 -0
  286. package/dist/types/resources/tax/reports.d.ts +129 -0
  287. package/dist/types/resources/tax/reviewItems.d.ts +226 -0
  288. package/dist/types/resources/tax/ruleSet.d.ts +219 -0
  289. package/dist/types/resources/tax/salesDestinations.d.ts +158 -0
  290. package/dist/types/resources/tax/settings.d.ts +122 -0
  291. package/dist/types/resources/tax/shared.d.ts +43 -0
  292. package/dist/types/resources/tax/transactions.d.ts +404 -0
  293. package/dist/types/route.d.ts +86 -0
  294. package/dist/types/routes.d.ts +23 -0
  295. package/dist/types/vocabulary/billingPortal.d.ts +15 -0
  296. package/dist/types/vocabulary/catalog.d.ts +97 -0
  297. package/dist/types/vocabulary/checkout.d.ts +49 -0
  298. package/dist/types/vocabulary/connect.d.ts +62 -0
  299. package/dist/types/vocabulary/errors.d.ts +145 -0
  300. package/dist/types/vocabulary/events.d.ts +171 -0
  301. package/dist/types/vocabulary/files.d.ts +30 -0
  302. package/dist/types/vocabulary/index.d.ts +17 -0
  303. package/dist/types/vocabulary/invoices.d.ts +39 -0
  304. package/dist/types/vocabulary/lists.d.ts +9 -0
  305. package/dist/types/vocabulary/merchants.d.ts +9 -0
  306. package/dist/types/vocabulary/money.d.ts +59 -0
  307. package/dist/types/vocabulary/paymentMethodConfigurations.d.ts +22 -0
  308. package/dist/types/vocabulary/payments.d.ts +117 -0
  309. package/dist/types/vocabulary/reporting.d.ts +18 -0
  310. package/dist/types/vocabulary/subscriptions.d.ts +45 -0
  311. package/dist/types/vocabulary/tax.d.ts +163 -0
  312. package/dist/types/vocabulary/version.d.ts +10 -0
  313. package/package.json +51 -11
  314. package/dist/cjs/openapi.js +0 -138
  315. package/dist/esm/openapi.js +0 -134
  316. package/dist/types/openapi.d.ts +0 -145
@@ -0,0 +1,731 @@
1
+ import { z } from 'zod';
2
+ import { type ObjectMap } from '../../common/objects';
3
+ import { type WebhookEventObjectType, type WebhookEventType } from '../../vocabulary/events';
4
+ /**
5
+ * Events (`evt_…`, ADR 0014 D4) — Stripe's event names (ADR 0019) with the
6
+ * resource nested under `data.object`. Stored once, in the transaction of the
7
+ * change it records, kept 30 days (`/v1/events`), and delivered HMAC-signed to
8
+ * every matching webhook endpoint: a delivery's body and `GET /v1/events/:id`
9
+ * are byte for byte the same object.
10
+ */
11
+ /**
12
+ * The payload of `billing.observation.updated`: a wake-up, never paid or grant
13
+ * authority. Re-read the owner-bound resource it names.
14
+ */
15
+ export declare const billingObservationSchema: z.ZodObject<{
16
+ object: z.ZodLiteral<"billing_observation">;
17
+ livemode: z.ZodBoolean;
18
+ resource_kind: z.ZodEnum<{
19
+ subscription: "subscription";
20
+ invoice: "invoice";
21
+ }>;
22
+ resource_id: z.ZodString;
23
+ subscription_id: z.ZodOptional<z.ZodString>;
24
+ revision: z.ZodNumber;
25
+ observed_at: z.ZodNumber;
26
+ }, z.core.$strict>;
27
+ export type BillingObservation = z.output<typeof billingObservationSchema>;
28
+ /**
29
+ * What caused an event, when an API request did (Stripe's `event.request`).
30
+ * Both `null` for an event caused by something else — the chain watcher, the
31
+ * expiry sweeper, a provider's own notification.
32
+ */
33
+ export declare const eventRequestSchema: z.ZodObject<{
34
+ id: z.ZodNullable<z.ZodString>;
35
+ idempotency_key: z.ZodNullable<z.ZodString>;
36
+ }, z.core.$strict>;
37
+ export type WebhookEventRequest = z.output<typeof eventRequestSchema>;
38
+ /** The envelope around `type` and `data.object`. */
39
+ declare function envelope<T extends z.ZodType, O extends z.ZodType>(type: T, object: O): z.ZodObject<{
40
+ data: z.ZodObject<{
41
+ object: O;
42
+ previous_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
43
+ }, z.core.$strict>;
44
+ request: z.ZodObject<{
45
+ id: z.ZodNullable<z.ZodString>;
46
+ idempotency_key: z.ZodNullable<z.ZodString>;
47
+ }, z.core.$strict>;
48
+ created: z.ZodNumber;
49
+ livemode: z.ZodBoolean;
50
+ api_version: z.ZodString;
51
+ account: z.ZodOptional<z.ZodString>;
52
+ type: T;
53
+ id: z.ZodString;
54
+ object: z.ZodLiteral<"event">;
55
+ }, z.core.$strict>;
56
+ /**
57
+ * An event of any type. `data.object` is the resource `type` names
58
+ * (`WEBHOOK_EVENT_OBJECTS`), checked against THAT object's schema — a
59
+ * `payment_intent.succeeded` carrying a Customer is refused even though a
60
+ * Customer is a valid event object.
61
+ */
62
+ export declare const eventSchema: z.ZodObject<{
63
+ data: z.ZodObject<{
64
+ object: z.ZodUnion<z.ZodLazy<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>[]>;
65
+ previous_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
66
+ }, z.core.$strict>;
67
+ request: z.ZodObject<{
68
+ id: z.ZodNullable<z.ZodString>;
69
+ idempotency_key: z.ZodNullable<z.ZodString>;
70
+ }, z.core.$strict>;
71
+ created: z.ZodNumber;
72
+ livemode: z.ZodBoolean;
73
+ api_version: z.ZodString;
74
+ account: z.ZodOptional<z.ZodString>;
75
+ type: z.ZodEnum<{
76
+ "payment_intent.created": "payment_intent.created";
77
+ "payment_intent.requires_action": "payment_intent.requires_action";
78
+ "payment_intent.processing": "payment_intent.processing";
79
+ "payment_intent.amount_capturable_updated": "payment_intent.amount_capturable_updated";
80
+ "payment_intent.succeeded": "payment_intent.succeeded";
81
+ "payment_intent.payment_failed": "payment_intent.payment_failed";
82
+ "payment_intent.canceled": "payment_intent.canceled";
83
+ "charge.refunded": "charge.refunded";
84
+ "charge.dispute.created": "charge.dispute.created";
85
+ "charge.dispute.updated": "charge.dispute.updated";
86
+ "charge.dispute.closed": "charge.dispute.closed";
87
+ "charge.dispute.funds_withdrawn": "charge.dispute.funds_withdrawn";
88
+ "charge.dispute.funds_reinstated": "charge.dispute.funds_reinstated";
89
+ "refund.created": "refund.created";
90
+ "refund.updated": "refund.updated";
91
+ "refund.failed": "refund.failed";
92
+ "customer.created": "customer.created";
93
+ "customer.updated": "customer.updated";
94
+ "customer.deleted": "customer.deleted";
95
+ "payment_method.attached": "payment_method.attached";
96
+ "payment_method.detached": "payment_method.detached";
97
+ "payment_method.updated": "payment_method.updated";
98
+ "setup_intent.created": "setup_intent.created";
99
+ "setup_intent.requires_action": "setup_intent.requires_action";
100
+ "setup_intent.succeeded": "setup_intent.succeeded";
101
+ "setup_intent.setup_failed": "setup_intent.setup_failed";
102
+ "setup_intent.canceled": "setup_intent.canceled";
103
+ "billing.observation.updated": "billing.observation.updated";
104
+ "connected_account.updated": "connected_account.updated";
105
+ "product.created": "product.created";
106
+ "product.updated": "product.updated";
107
+ "product.deleted": "product.deleted";
108
+ "price.created": "price.created";
109
+ "price.updated": "price.updated";
110
+ "coupon.created": "coupon.created";
111
+ "coupon.updated": "coupon.updated";
112
+ "coupon.deleted": "coupon.deleted";
113
+ "promotion_code.created": "promotion_code.created";
114
+ "promotion_code.updated": "promotion_code.updated";
115
+ "account.updated": "account.updated";
116
+ "application_fee.created": "application_fee.created";
117
+ "application_fee.refunded": "application_fee.refunded";
118
+ "payout.created": "payout.created";
119
+ "payout.updated": "payout.updated";
120
+ "payout.paid": "payout.paid";
121
+ "payout.failed": "payout.failed";
122
+ "payout.canceled": "payout.canceled";
123
+ "balance.available": "balance.available";
124
+ "checkout.session.completed": "checkout.session.completed";
125
+ "checkout.session.expired": "checkout.session.expired";
126
+ "checkout.session.async_payment_succeeded": "checkout.session.async_payment_succeeded";
127
+ "checkout.session.async_payment_failed": "checkout.session.async_payment_failed";
128
+ "payment_link.created": "payment_link.created";
129
+ "payment_link.updated": "payment_link.updated";
130
+ "reporting.report_run.succeeded": "reporting.report_run.succeeded";
131
+ "reporting.report_run.failed": "reporting.report_run.failed";
132
+ "customer.subscription.created": "customer.subscription.created";
133
+ "customer.subscription.updated": "customer.subscription.updated";
134
+ "customer.subscription.deleted": "customer.subscription.deleted";
135
+ "customer.subscription.trial_will_end": "customer.subscription.trial_will_end";
136
+ "customer.subscription.paused": "customer.subscription.paused";
137
+ "customer.subscription.resumed": "customer.subscription.resumed";
138
+ "invoice.created": "invoice.created";
139
+ "invoice.updated": "invoice.updated";
140
+ "invoice.deleted": "invoice.deleted";
141
+ "invoice.finalized": "invoice.finalized";
142
+ "invoice.paid": "invoice.paid";
143
+ "invoice.payment_failed": "invoice.payment_failed";
144
+ "invoice.payment_action_required": "invoice.payment_action_required";
145
+ "invoice.voided": "invoice.voided";
146
+ "invoice.marked_uncollectible": "invoice.marked_uncollectible";
147
+ "invoice.upcoming": "invoice.upcoming";
148
+ "invoice.sent": "invoice.sent";
149
+ "invoiceitem.created": "invoiceitem.created";
150
+ "invoiceitem.deleted": "invoiceitem.deleted";
151
+ "credit_note.created": "credit_note.created";
152
+ "credit_note.updated": "credit_note.updated";
153
+ "credit_note.voided": "credit_note.voided";
154
+ "test_helpers.test_clock.created": "test_helpers.test_clock.created";
155
+ "test_helpers.test_clock.advancing": "test_helpers.test_clock.advancing";
156
+ "test_helpers.test_clock.ready": "test_helpers.test_clock.ready";
157
+ "test_helpers.test_clock.deleted": "test_helpers.test_clock.deleted";
158
+ "billing.meter.created": "billing.meter.created";
159
+ "billing.meter.updated": "billing.meter.updated";
160
+ "billing.meter.deactivated": "billing.meter.deactivated";
161
+ "billing.meter.reactivated": "billing.meter.reactivated";
162
+ "entitlements.active_entitlement_summary.updated": "entitlements.active_entitlement_summary.updated";
163
+ "billing_portal.configuration.created": "billing_portal.configuration.created";
164
+ "billing_portal.configuration.updated": "billing_portal.configuration.updated";
165
+ "billing_portal.session.created": "billing_portal.session.created";
166
+ "tax.assessment.created": "tax.assessment.created";
167
+ "tax.review_item.created": "tax.review_item.created";
168
+ "tax.review_item.updated": "tax.review_item.updated";
169
+ "webhook_endpoint.test": "webhook_endpoint.test";
170
+ }>;
171
+ id: z.ZodString;
172
+ object: z.ZodLiteral<"event">;
173
+ }, z.core.$strict>;
174
+ /**
175
+ * The envelope of one event type, `data.object` narrowed to its object: the
176
+ * request body of that type's webhook in the OpenAPI document.
177
+ */
178
+ export declare function eventSchemaOf<T extends WebhookEventType>(type: T): z.ZodObject<{
179
+ data: z.ZodObject<{
180
+ object: z.ZodLazy<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
181
+ previous_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
182
+ }, z.core.$strict>;
183
+ request: z.ZodObject<{
184
+ id: z.ZodNullable<z.ZodString>;
185
+ idempotency_key: z.ZodNullable<z.ZodString>;
186
+ }, z.core.$strict>;
187
+ created: z.ZodNumber;
188
+ livemode: z.ZodBoolean;
189
+ api_version: z.ZodString;
190
+ account: z.ZodOptional<z.ZodString>;
191
+ type: z.ZodLiteral<T>;
192
+ id: z.ZodString;
193
+ object: z.ZodLiteral<"event">;
194
+ }, z.core.$strict>;
195
+ /** The object an event of an object type carries, as its module registered it. */
196
+ type EventObject<K extends string> = K extends keyof ObjectMap ? ObjectMap[K] : never;
197
+ /**
198
+ * Which resource each event type carries under `data.object` — TOTAL over
199
+ * {@link WebhookEventType}, derived from `WEBHOOK_EVENT_OBJECTS`, so a new
200
+ * event type cannot exist without saying what it delivers.
201
+ */
202
+ export type WebhookEventPayload = {
203
+ [T in WebhookEventType]: EventObject<WebhookEventObjectType<T>>;
204
+ };
205
+ type EventEnvelope = z.output<ReturnType<typeof envelope<z.ZodString, z.ZodUnknown>>>;
206
+ /**
207
+ * One delivered event.
208
+ *
209
+ * A DISCRIMINATED union over every event type, so `data.object` is narrowed by
210
+ * a switch on `type` with no cast:
211
+ *
212
+ * ```ts
213
+ * if (event.type === 'charge.dispute.created') {
214
+ * event.data.object.evidence_details; // Dispute, not PaymentIntent
215
+ * }
216
+ * ```
217
+ *
218
+ * The parameter narrows to a subset of event types —
219
+ * `WebhookEvent<'payment_intent.succeeded'>` is that event alone.
220
+ */
221
+ export type WebhookEvent<K extends WebhookEventType = WebhookEventType> = {
222
+ [T in K]: {
223
+ [P in keyof EventEnvelope]: P extends 'type' ? T : P extends 'data' ? {
224
+ object: WebhookEventPayload[T];
225
+ previous_attributes?: Record<string, unknown>;
226
+ } : EventEnvelope[P];
227
+ };
228
+ }[K];
229
+ declare module '../../common/objects' {
230
+ interface ObjectMap {
231
+ billing_observation: BillingObservation;
232
+ event: WebhookEvent;
233
+ }
234
+ }
235
+ /** An event type filter as the repository reads it; `undefined` is every type. */
236
+ export type EventTypeFilter = {
237
+ readonly kind: 'exact';
238
+ readonly type: string;
239
+ } | {
240
+ readonly kind: 'prefix';
241
+ readonly prefix: string;
242
+ };
243
+ /** The filters `GET /v1/events` adds to the list parameters. */
244
+ export declare const listEventsFilters: {
245
+ type: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<{
246
+ readonly kind: "exact";
247
+ readonly type: string;
248
+ } | {
249
+ readonly kind: "prefix";
250
+ readonly prefix: string;
251
+ } | undefined, string>>>;
252
+ delivery_success: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
253
+ true: "true";
254
+ false: "false";
255
+ }>]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
256
+ payment_intent: z.ZodOptional<z.ZodString>;
257
+ };
258
+ export declare const listEventsQuery: z.ZodObject<{
259
+ limit: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>, z.ZodTransform<number, number | undefined>>;
260
+ starting_after: z.ZodOptional<z.ZodString>;
261
+ ending_before: z.ZodOptional<z.ZodString>;
262
+ created: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>, z.ZodTransform<import("../..").RangeFilter, number>>, z.ZodPipe<z.ZodObject<{
263
+ gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
264
+ gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
265
+ lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
266
+ lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
267
+ }, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
268
+ gt?: number | undefined;
269
+ gte?: number | undefined;
270
+ lt?: number | undefined;
271
+ lte?: number | undefined;
272
+ }>>]>>;
273
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
274
+ type: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<{
275
+ readonly kind: "exact";
276
+ readonly type: string;
277
+ } | {
278
+ readonly kind: "prefix";
279
+ readonly prefix: string;
280
+ } | undefined, string>>>;
281
+ delivery_success: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
282
+ true: "true";
283
+ false: "false";
284
+ }>]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
285
+ payment_intent: z.ZodOptional<z.ZodString>;
286
+ }, z.core.$strict>;
287
+ export type ListEventsParams = z.input<typeof listEventsQuery>;
288
+ export declare const retrieveEventQuery: z.ZodObject<{
289
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
290
+ }, z.core.$strict>;
291
+ export type RetrieveEventParams = z.input<typeof retrieveEventQuery>;
292
+ /**
293
+ * The stream's `types`: a comma-separated list of the same filters
294
+ * (`payment_intent.settled,connected_account.*`). Absent, or any `*`, is every
295
+ * event.
296
+ */
297
+ export declare const streamEventsQuery: z.ZodObject<{
298
+ types: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<{
299
+ readonly kind: "exact";
300
+ readonly type: string;
301
+ } | {
302
+ readonly kind: "prefix";
303
+ readonly prefix: string;
304
+ } | undefined, string>>>>>;
305
+ }, z.core.$strict>;
306
+ export type StreamEventsParams = z.input<typeof streamEventsQuery>;
307
+ /** One line per event type: what happened when it is sent. Total, like the vocabulary. */
308
+ export declare const WEBHOOK_EVENT_DESCRIPTIONS: Readonly<Record<WebhookEventType, string>>;
309
+ export declare const eventRoutes: readonly [{
310
+ readonly operationId: "listEvents";
311
+ readonly method: "get";
312
+ readonly path: "/v1/events";
313
+ readonly tag: "Events";
314
+ readonly summary: "List events";
315
+ readonly description: "Every event of the last 30 days, newest first, rendered exactly as its webhook deliveries carried it.";
316
+ readonly auth: "service";
317
+ readonly scope: "payments:read";
318
+ readonly query: z.ZodObject<{
319
+ limit: z.ZodPipe<z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>, z.ZodTransform<number, number | undefined>>;
320
+ starting_after: z.ZodOptional<z.ZodString>;
321
+ ending_before: z.ZodOptional<z.ZodString>;
322
+ created: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>, z.ZodTransform<import("../..").RangeFilter, number>>, z.ZodPipe<z.ZodObject<{
323
+ gt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
324
+ gte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
325
+ lt: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
326
+ lte: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
327
+ }, z.core.$strict>, z.ZodTransform<import("../..").RangeFilter, {
328
+ gt?: number | undefined;
329
+ gte?: number | undefined;
330
+ lt?: number | undefined;
331
+ lte?: number | undefined;
332
+ }>>]>>;
333
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
334
+ type: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<{
335
+ readonly kind: "exact";
336
+ readonly type: string;
337
+ } | {
338
+ readonly kind: "prefix";
339
+ readonly prefix: string;
340
+ } | undefined, string>>>;
341
+ delivery_success: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
342
+ true: "true";
343
+ false: "false";
344
+ }>]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
345
+ payment_intent: z.ZodOptional<z.ZodString>;
346
+ }, z.core.$strict>;
347
+ readonly response: z.ZodObject<{
348
+ object: z.ZodLiteral<"list">;
349
+ data: z.ZodArray<z.ZodObject<{
350
+ data: z.ZodObject<{
351
+ object: z.ZodUnion<z.ZodLazy<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>[]>;
352
+ previous_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
353
+ }, z.core.$strict>;
354
+ request: z.ZodObject<{
355
+ id: z.ZodNullable<z.ZodString>;
356
+ idempotency_key: z.ZodNullable<z.ZodString>;
357
+ }, z.core.$strict>;
358
+ created: z.ZodNumber;
359
+ livemode: z.ZodBoolean;
360
+ api_version: z.ZodString;
361
+ account: z.ZodOptional<z.ZodString>;
362
+ type: z.ZodEnum<{
363
+ "payment_intent.created": "payment_intent.created";
364
+ "payment_intent.requires_action": "payment_intent.requires_action";
365
+ "payment_intent.processing": "payment_intent.processing";
366
+ "payment_intent.amount_capturable_updated": "payment_intent.amount_capturable_updated";
367
+ "payment_intent.succeeded": "payment_intent.succeeded";
368
+ "payment_intent.payment_failed": "payment_intent.payment_failed";
369
+ "payment_intent.canceled": "payment_intent.canceled";
370
+ "charge.refunded": "charge.refunded";
371
+ "charge.dispute.created": "charge.dispute.created";
372
+ "charge.dispute.updated": "charge.dispute.updated";
373
+ "charge.dispute.closed": "charge.dispute.closed";
374
+ "charge.dispute.funds_withdrawn": "charge.dispute.funds_withdrawn";
375
+ "charge.dispute.funds_reinstated": "charge.dispute.funds_reinstated";
376
+ "refund.created": "refund.created";
377
+ "refund.updated": "refund.updated";
378
+ "refund.failed": "refund.failed";
379
+ "customer.created": "customer.created";
380
+ "customer.updated": "customer.updated";
381
+ "customer.deleted": "customer.deleted";
382
+ "payment_method.attached": "payment_method.attached";
383
+ "payment_method.detached": "payment_method.detached";
384
+ "payment_method.updated": "payment_method.updated";
385
+ "setup_intent.created": "setup_intent.created";
386
+ "setup_intent.requires_action": "setup_intent.requires_action";
387
+ "setup_intent.succeeded": "setup_intent.succeeded";
388
+ "setup_intent.setup_failed": "setup_intent.setup_failed";
389
+ "setup_intent.canceled": "setup_intent.canceled";
390
+ "billing.observation.updated": "billing.observation.updated";
391
+ "connected_account.updated": "connected_account.updated";
392
+ "product.created": "product.created";
393
+ "product.updated": "product.updated";
394
+ "product.deleted": "product.deleted";
395
+ "price.created": "price.created";
396
+ "price.updated": "price.updated";
397
+ "coupon.created": "coupon.created";
398
+ "coupon.updated": "coupon.updated";
399
+ "coupon.deleted": "coupon.deleted";
400
+ "promotion_code.created": "promotion_code.created";
401
+ "promotion_code.updated": "promotion_code.updated";
402
+ "account.updated": "account.updated";
403
+ "application_fee.created": "application_fee.created";
404
+ "application_fee.refunded": "application_fee.refunded";
405
+ "payout.created": "payout.created";
406
+ "payout.updated": "payout.updated";
407
+ "payout.paid": "payout.paid";
408
+ "payout.failed": "payout.failed";
409
+ "payout.canceled": "payout.canceled";
410
+ "balance.available": "balance.available";
411
+ "checkout.session.completed": "checkout.session.completed";
412
+ "checkout.session.expired": "checkout.session.expired";
413
+ "checkout.session.async_payment_succeeded": "checkout.session.async_payment_succeeded";
414
+ "checkout.session.async_payment_failed": "checkout.session.async_payment_failed";
415
+ "payment_link.created": "payment_link.created";
416
+ "payment_link.updated": "payment_link.updated";
417
+ "reporting.report_run.succeeded": "reporting.report_run.succeeded";
418
+ "reporting.report_run.failed": "reporting.report_run.failed";
419
+ "customer.subscription.created": "customer.subscription.created";
420
+ "customer.subscription.updated": "customer.subscription.updated";
421
+ "customer.subscription.deleted": "customer.subscription.deleted";
422
+ "customer.subscription.trial_will_end": "customer.subscription.trial_will_end";
423
+ "customer.subscription.paused": "customer.subscription.paused";
424
+ "customer.subscription.resumed": "customer.subscription.resumed";
425
+ "invoice.created": "invoice.created";
426
+ "invoice.updated": "invoice.updated";
427
+ "invoice.deleted": "invoice.deleted";
428
+ "invoice.finalized": "invoice.finalized";
429
+ "invoice.paid": "invoice.paid";
430
+ "invoice.payment_failed": "invoice.payment_failed";
431
+ "invoice.payment_action_required": "invoice.payment_action_required";
432
+ "invoice.voided": "invoice.voided";
433
+ "invoice.marked_uncollectible": "invoice.marked_uncollectible";
434
+ "invoice.upcoming": "invoice.upcoming";
435
+ "invoice.sent": "invoice.sent";
436
+ "invoiceitem.created": "invoiceitem.created";
437
+ "invoiceitem.deleted": "invoiceitem.deleted";
438
+ "credit_note.created": "credit_note.created";
439
+ "credit_note.updated": "credit_note.updated";
440
+ "credit_note.voided": "credit_note.voided";
441
+ "test_helpers.test_clock.created": "test_helpers.test_clock.created";
442
+ "test_helpers.test_clock.advancing": "test_helpers.test_clock.advancing";
443
+ "test_helpers.test_clock.ready": "test_helpers.test_clock.ready";
444
+ "test_helpers.test_clock.deleted": "test_helpers.test_clock.deleted";
445
+ "billing.meter.created": "billing.meter.created";
446
+ "billing.meter.updated": "billing.meter.updated";
447
+ "billing.meter.deactivated": "billing.meter.deactivated";
448
+ "billing.meter.reactivated": "billing.meter.reactivated";
449
+ "entitlements.active_entitlement_summary.updated": "entitlements.active_entitlement_summary.updated";
450
+ "billing_portal.configuration.created": "billing_portal.configuration.created";
451
+ "billing_portal.configuration.updated": "billing_portal.configuration.updated";
452
+ "billing_portal.session.created": "billing_portal.session.created";
453
+ "tax.assessment.created": "tax.assessment.created";
454
+ "tax.review_item.created": "tax.review_item.created";
455
+ "tax.review_item.updated": "tax.review_item.updated";
456
+ "webhook_endpoint.test": "webhook_endpoint.test";
457
+ }>;
458
+ id: z.ZodString;
459
+ object: z.ZodLiteral<"event">;
460
+ }, z.core.$strict>>;
461
+ has_more: z.ZodBoolean;
462
+ url: z.ZodString;
463
+ }, z.core.$strict>;
464
+ readonly sdk: "events.list";
465
+ readonly expandable: "event";
466
+ }, {
467
+ readonly operationId: "streamEvents";
468
+ readonly method: "get";
469
+ readonly path: "/v1/events/stream";
470
+ readonly tag: "Events";
471
+ readonly summary: "Stream events";
472
+ readonly description: "Server-Sent Events: every event of this merchant as it commits, rendered exactly as a webhook delivery carries it (`event: event`, `id:` the `evt_…`). Resumes after `Last-Event-ID`. Test mode only — what `peable listen` forwards to a local server.";
473
+ readonly auth: "service";
474
+ readonly scope: "payments:read";
475
+ readonly testModeOnly: true;
476
+ readonly query: z.ZodObject<{
477
+ types: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string[], string>>, z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<{
478
+ readonly kind: "exact";
479
+ readonly type: string;
480
+ } | {
481
+ readonly kind: "prefix";
482
+ readonly prefix: string;
483
+ } | undefined, string>>>>>;
484
+ }, z.core.$strict>;
485
+ readonly response: {
486
+ readonly kind: "stream";
487
+ readonly event: z.ZodObject<{
488
+ data: z.ZodObject<{
489
+ object: z.ZodUnion<z.ZodLazy<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>[]>;
490
+ previous_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
491
+ }, z.core.$strict>;
492
+ request: z.ZodObject<{
493
+ id: z.ZodNullable<z.ZodString>;
494
+ idempotency_key: z.ZodNullable<z.ZodString>;
495
+ }, z.core.$strict>;
496
+ created: z.ZodNumber;
497
+ livemode: z.ZodBoolean;
498
+ api_version: z.ZodString;
499
+ account: z.ZodOptional<z.ZodString>;
500
+ type: z.ZodEnum<{
501
+ "payment_intent.created": "payment_intent.created";
502
+ "payment_intent.requires_action": "payment_intent.requires_action";
503
+ "payment_intent.processing": "payment_intent.processing";
504
+ "payment_intent.amount_capturable_updated": "payment_intent.amount_capturable_updated";
505
+ "payment_intent.succeeded": "payment_intent.succeeded";
506
+ "payment_intent.payment_failed": "payment_intent.payment_failed";
507
+ "payment_intent.canceled": "payment_intent.canceled";
508
+ "charge.refunded": "charge.refunded";
509
+ "charge.dispute.created": "charge.dispute.created";
510
+ "charge.dispute.updated": "charge.dispute.updated";
511
+ "charge.dispute.closed": "charge.dispute.closed";
512
+ "charge.dispute.funds_withdrawn": "charge.dispute.funds_withdrawn";
513
+ "charge.dispute.funds_reinstated": "charge.dispute.funds_reinstated";
514
+ "refund.created": "refund.created";
515
+ "refund.updated": "refund.updated";
516
+ "refund.failed": "refund.failed";
517
+ "customer.created": "customer.created";
518
+ "customer.updated": "customer.updated";
519
+ "customer.deleted": "customer.deleted";
520
+ "payment_method.attached": "payment_method.attached";
521
+ "payment_method.detached": "payment_method.detached";
522
+ "payment_method.updated": "payment_method.updated";
523
+ "setup_intent.created": "setup_intent.created";
524
+ "setup_intent.requires_action": "setup_intent.requires_action";
525
+ "setup_intent.succeeded": "setup_intent.succeeded";
526
+ "setup_intent.setup_failed": "setup_intent.setup_failed";
527
+ "setup_intent.canceled": "setup_intent.canceled";
528
+ "billing.observation.updated": "billing.observation.updated";
529
+ "connected_account.updated": "connected_account.updated";
530
+ "product.created": "product.created";
531
+ "product.updated": "product.updated";
532
+ "product.deleted": "product.deleted";
533
+ "price.created": "price.created";
534
+ "price.updated": "price.updated";
535
+ "coupon.created": "coupon.created";
536
+ "coupon.updated": "coupon.updated";
537
+ "coupon.deleted": "coupon.deleted";
538
+ "promotion_code.created": "promotion_code.created";
539
+ "promotion_code.updated": "promotion_code.updated";
540
+ "account.updated": "account.updated";
541
+ "application_fee.created": "application_fee.created";
542
+ "application_fee.refunded": "application_fee.refunded";
543
+ "payout.created": "payout.created";
544
+ "payout.updated": "payout.updated";
545
+ "payout.paid": "payout.paid";
546
+ "payout.failed": "payout.failed";
547
+ "payout.canceled": "payout.canceled";
548
+ "balance.available": "balance.available";
549
+ "checkout.session.completed": "checkout.session.completed";
550
+ "checkout.session.expired": "checkout.session.expired";
551
+ "checkout.session.async_payment_succeeded": "checkout.session.async_payment_succeeded";
552
+ "checkout.session.async_payment_failed": "checkout.session.async_payment_failed";
553
+ "payment_link.created": "payment_link.created";
554
+ "payment_link.updated": "payment_link.updated";
555
+ "reporting.report_run.succeeded": "reporting.report_run.succeeded";
556
+ "reporting.report_run.failed": "reporting.report_run.failed";
557
+ "customer.subscription.created": "customer.subscription.created";
558
+ "customer.subscription.updated": "customer.subscription.updated";
559
+ "customer.subscription.deleted": "customer.subscription.deleted";
560
+ "customer.subscription.trial_will_end": "customer.subscription.trial_will_end";
561
+ "customer.subscription.paused": "customer.subscription.paused";
562
+ "customer.subscription.resumed": "customer.subscription.resumed";
563
+ "invoice.created": "invoice.created";
564
+ "invoice.updated": "invoice.updated";
565
+ "invoice.deleted": "invoice.deleted";
566
+ "invoice.finalized": "invoice.finalized";
567
+ "invoice.paid": "invoice.paid";
568
+ "invoice.payment_failed": "invoice.payment_failed";
569
+ "invoice.payment_action_required": "invoice.payment_action_required";
570
+ "invoice.voided": "invoice.voided";
571
+ "invoice.marked_uncollectible": "invoice.marked_uncollectible";
572
+ "invoice.upcoming": "invoice.upcoming";
573
+ "invoice.sent": "invoice.sent";
574
+ "invoiceitem.created": "invoiceitem.created";
575
+ "invoiceitem.deleted": "invoiceitem.deleted";
576
+ "credit_note.created": "credit_note.created";
577
+ "credit_note.updated": "credit_note.updated";
578
+ "credit_note.voided": "credit_note.voided";
579
+ "test_helpers.test_clock.created": "test_helpers.test_clock.created";
580
+ "test_helpers.test_clock.advancing": "test_helpers.test_clock.advancing";
581
+ "test_helpers.test_clock.ready": "test_helpers.test_clock.ready";
582
+ "test_helpers.test_clock.deleted": "test_helpers.test_clock.deleted";
583
+ "billing.meter.created": "billing.meter.created";
584
+ "billing.meter.updated": "billing.meter.updated";
585
+ "billing.meter.deactivated": "billing.meter.deactivated";
586
+ "billing.meter.reactivated": "billing.meter.reactivated";
587
+ "entitlements.active_entitlement_summary.updated": "entitlements.active_entitlement_summary.updated";
588
+ "billing_portal.configuration.created": "billing_portal.configuration.created";
589
+ "billing_portal.configuration.updated": "billing_portal.configuration.updated";
590
+ "billing_portal.session.created": "billing_portal.session.created";
591
+ "tax.assessment.created": "tax.assessment.created";
592
+ "tax.review_item.created": "tax.review_item.created";
593
+ "tax.review_item.updated": "tax.review_item.updated";
594
+ "webhook_endpoint.test": "webhook_endpoint.test";
595
+ }>;
596
+ id: z.ZodString;
597
+ object: z.ZodLiteral<"event">;
598
+ }, z.core.$strict>;
599
+ };
600
+ readonly sdk: "events.stream";
601
+ }, {
602
+ readonly operationId: "retrieveEvent";
603
+ readonly method: "get";
604
+ readonly path: "/v1/events/{id}";
605
+ readonly tag: "Events";
606
+ readonly summary: "Retrieve an event";
607
+ readonly description: "A `404` once the event is older than 30 days.";
608
+ readonly auth: "service";
609
+ readonly scope: "payments:read";
610
+ readonly params: {
611
+ readonly id: "The event (`evt_…`).";
612
+ };
613
+ readonly query: z.ZodObject<{
614
+ expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
615
+ }, z.core.$strict>;
616
+ readonly response: z.ZodObject<{
617
+ data: z.ZodObject<{
618
+ object: z.ZodUnion<z.ZodLazy<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>[]>;
619
+ previous_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
620
+ }, z.core.$strict>;
621
+ request: z.ZodObject<{
622
+ id: z.ZodNullable<z.ZodString>;
623
+ idempotency_key: z.ZodNullable<z.ZodString>;
624
+ }, z.core.$strict>;
625
+ created: z.ZodNumber;
626
+ livemode: z.ZodBoolean;
627
+ api_version: z.ZodString;
628
+ account: z.ZodOptional<z.ZodString>;
629
+ type: z.ZodEnum<{
630
+ "payment_intent.created": "payment_intent.created";
631
+ "payment_intent.requires_action": "payment_intent.requires_action";
632
+ "payment_intent.processing": "payment_intent.processing";
633
+ "payment_intent.amount_capturable_updated": "payment_intent.amount_capturable_updated";
634
+ "payment_intent.succeeded": "payment_intent.succeeded";
635
+ "payment_intent.payment_failed": "payment_intent.payment_failed";
636
+ "payment_intent.canceled": "payment_intent.canceled";
637
+ "charge.refunded": "charge.refunded";
638
+ "charge.dispute.created": "charge.dispute.created";
639
+ "charge.dispute.updated": "charge.dispute.updated";
640
+ "charge.dispute.closed": "charge.dispute.closed";
641
+ "charge.dispute.funds_withdrawn": "charge.dispute.funds_withdrawn";
642
+ "charge.dispute.funds_reinstated": "charge.dispute.funds_reinstated";
643
+ "refund.created": "refund.created";
644
+ "refund.updated": "refund.updated";
645
+ "refund.failed": "refund.failed";
646
+ "customer.created": "customer.created";
647
+ "customer.updated": "customer.updated";
648
+ "customer.deleted": "customer.deleted";
649
+ "payment_method.attached": "payment_method.attached";
650
+ "payment_method.detached": "payment_method.detached";
651
+ "payment_method.updated": "payment_method.updated";
652
+ "setup_intent.created": "setup_intent.created";
653
+ "setup_intent.requires_action": "setup_intent.requires_action";
654
+ "setup_intent.succeeded": "setup_intent.succeeded";
655
+ "setup_intent.setup_failed": "setup_intent.setup_failed";
656
+ "setup_intent.canceled": "setup_intent.canceled";
657
+ "billing.observation.updated": "billing.observation.updated";
658
+ "connected_account.updated": "connected_account.updated";
659
+ "product.created": "product.created";
660
+ "product.updated": "product.updated";
661
+ "product.deleted": "product.deleted";
662
+ "price.created": "price.created";
663
+ "price.updated": "price.updated";
664
+ "coupon.created": "coupon.created";
665
+ "coupon.updated": "coupon.updated";
666
+ "coupon.deleted": "coupon.deleted";
667
+ "promotion_code.created": "promotion_code.created";
668
+ "promotion_code.updated": "promotion_code.updated";
669
+ "account.updated": "account.updated";
670
+ "application_fee.created": "application_fee.created";
671
+ "application_fee.refunded": "application_fee.refunded";
672
+ "payout.created": "payout.created";
673
+ "payout.updated": "payout.updated";
674
+ "payout.paid": "payout.paid";
675
+ "payout.failed": "payout.failed";
676
+ "payout.canceled": "payout.canceled";
677
+ "balance.available": "balance.available";
678
+ "checkout.session.completed": "checkout.session.completed";
679
+ "checkout.session.expired": "checkout.session.expired";
680
+ "checkout.session.async_payment_succeeded": "checkout.session.async_payment_succeeded";
681
+ "checkout.session.async_payment_failed": "checkout.session.async_payment_failed";
682
+ "payment_link.created": "payment_link.created";
683
+ "payment_link.updated": "payment_link.updated";
684
+ "reporting.report_run.succeeded": "reporting.report_run.succeeded";
685
+ "reporting.report_run.failed": "reporting.report_run.failed";
686
+ "customer.subscription.created": "customer.subscription.created";
687
+ "customer.subscription.updated": "customer.subscription.updated";
688
+ "customer.subscription.deleted": "customer.subscription.deleted";
689
+ "customer.subscription.trial_will_end": "customer.subscription.trial_will_end";
690
+ "customer.subscription.paused": "customer.subscription.paused";
691
+ "customer.subscription.resumed": "customer.subscription.resumed";
692
+ "invoice.created": "invoice.created";
693
+ "invoice.updated": "invoice.updated";
694
+ "invoice.deleted": "invoice.deleted";
695
+ "invoice.finalized": "invoice.finalized";
696
+ "invoice.paid": "invoice.paid";
697
+ "invoice.payment_failed": "invoice.payment_failed";
698
+ "invoice.payment_action_required": "invoice.payment_action_required";
699
+ "invoice.voided": "invoice.voided";
700
+ "invoice.marked_uncollectible": "invoice.marked_uncollectible";
701
+ "invoice.upcoming": "invoice.upcoming";
702
+ "invoice.sent": "invoice.sent";
703
+ "invoiceitem.created": "invoiceitem.created";
704
+ "invoiceitem.deleted": "invoiceitem.deleted";
705
+ "credit_note.created": "credit_note.created";
706
+ "credit_note.updated": "credit_note.updated";
707
+ "credit_note.voided": "credit_note.voided";
708
+ "test_helpers.test_clock.created": "test_helpers.test_clock.created";
709
+ "test_helpers.test_clock.advancing": "test_helpers.test_clock.advancing";
710
+ "test_helpers.test_clock.ready": "test_helpers.test_clock.ready";
711
+ "test_helpers.test_clock.deleted": "test_helpers.test_clock.deleted";
712
+ "billing.meter.created": "billing.meter.created";
713
+ "billing.meter.updated": "billing.meter.updated";
714
+ "billing.meter.deactivated": "billing.meter.deactivated";
715
+ "billing.meter.reactivated": "billing.meter.reactivated";
716
+ "entitlements.active_entitlement_summary.updated": "entitlements.active_entitlement_summary.updated";
717
+ "billing_portal.configuration.created": "billing_portal.configuration.created";
718
+ "billing_portal.configuration.updated": "billing_portal.configuration.updated";
719
+ "billing_portal.session.created": "billing_portal.session.created";
720
+ "tax.assessment.created": "tax.assessment.created";
721
+ "tax.review_item.created": "tax.review_item.created";
722
+ "tax.review_item.updated": "tax.review_item.updated";
723
+ "webhook_endpoint.test": "webhook_endpoint.test";
724
+ }>;
725
+ id: z.ZodString;
726
+ object: z.ZodLiteral<"event">;
727
+ }, z.core.$strict>;
728
+ readonly sdk: "events.retrieve";
729
+ readonly expandable: "event";
730
+ }];
731
+ export {};