@polar-sh/sdk 0.40.3 → 0.41.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 (244) hide show
  1. package/README.md +1 -1
  2. package/dist/commonjs/funcs/eventsList.js +1 -0
  3. package/dist/commonjs/funcs/eventsList.js.map +1 -1
  4. package/dist/commonjs/lib/config.d.ts +3 -3
  5. package/dist/commonjs/lib/config.js +3 -3
  6. package/dist/commonjs/models/components/benefitcycledevent.d.ts +5 -0
  7. package/dist/commonjs/models/components/benefitcycledevent.d.ts.map +1 -1
  8. package/dist/commonjs/models/components/benefitcycledevent.js +4 -0
  9. package/dist/commonjs/models/components/benefitcycledevent.js.map +1 -1
  10. package/dist/commonjs/models/components/benefitgrantedevent.d.ts +5 -0
  11. package/dist/commonjs/models/components/benefitgrantedevent.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/benefitgrantedevent.js +4 -0
  13. package/dist/commonjs/models/components/benefitgrantedevent.js.map +1 -1
  14. package/dist/commonjs/models/components/benefitrevokedevent.d.ts +5 -0
  15. package/dist/commonjs/models/components/benefitrevokedevent.d.ts.map +1 -1
  16. package/dist/commonjs/models/components/benefitrevokedevent.js +4 -0
  17. package/dist/commonjs/models/components/benefitrevokedevent.js.map +1 -1
  18. package/dist/commonjs/models/components/benefitupdatedevent.d.ts +5 -0
  19. package/dist/commonjs/models/components/benefitupdatedevent.d.ts.map +1 -1
  20. package/dist/commonjs/models/components/benefitupdatedevent.js +4 -0
  21. package/dist/commonjs/models/components/benefitupdatedevent.js.map +1 -1
  22. package/dist/commonjs/models/components/customercreate.d.ts +0 -3
  23. package/dist/commonjs/models/components/customercreate.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/customercreate.js.map +1 -1
  25. package/dist/commonjs/models/components/customercreatedevent.d.ts +5 -0
  26. package/dist/commonjs/models/components/customercreatedevent.d.ts.map +1 -1
  27. package/dist/commonjs/models/components/customercreatedevent.js +4 -0
  28. package/dist/commonjs/models/components/customercreatedevent.js.map +1 -1
  29. package/dist/commonjs/models/components/customerdeletedevent.d.ts +5 -0
  30. package/dist/commonjs/models/components/customerdeletedevent.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/customerdeletedevent.js +4 -0
  32. package/dist/commonjs/models/components/customerdeletedevent.js.map +1 -1
  33. package/dist/commonjs/models/components/customerupdate.d.ts +0 -3
  34. package/dist/commonjs/models/components/customerupdate.d.ts.map +1 -1
  35. package/dist/commonjs/models/components/customerupdate.js.map +1 -1
  36. package/dist/commonjs/models/components/customerupdatedevent.d.ts +5 -0
  37. package/dist/commonjs/models/components/customerupdatedevent.d.ts.map +1 -1
  38. package/dist/commonjs/models/components/customerupdatedevent.js +4 -0
  39. package/dist/commonjs/models/components/customerupdatedevent.js.map +1 -1
  40. package/dist/commonjs/models/components/customerupdateexternalid.d.ts +0 -3
  41. package/dist/commonjs/models/components/customerupdateexternalid.d.ts.map +1 -1
  42. package/dist/commonjs/models/components/customerupdateexternalid.js.map +1 -1
  43. package/dist/commonjs/models/components/eventcreatecustomer.d.ts +10 -0
  44. package/dist/commonjs/models/components/eventcreatecustomer.d.ts.map +1 -1
  45. package/dist/commonjs/models/components/eventcreatecustomer.js +8 -0
  46. package/dist/commonjs/models/components/eventcreatecustomer.js.map +1 -1
  47. package/dist/commonjs/models/components/eventcreateexternalcustomer.d.ts +10 -0
  48. package/dist/commonjs/models/components/eventcreateexternalcustomer.d.ts.map +1 -1
  49. package/dist/commonjs/models/components/eventcreateexternalcustomer.js +8 -0
  50. package/dist/commonjs/models/components/eventcreateexternalcustomer.js.map +1 -1
  51. package/dist/commonjs/models/components/eventsingestresponse.d.ts +5 -0
  52. package/dist/commonjs/models/components/eventsingestresponse.d.ts.map +1 -1
  53. package/dist/commonjs/models/components/eventsingestresponse.js +2 -0
  54. package/dist/commonjs/models/components/eventsingestresponse.js.map +1 -1
  55. package/dist/commonjs/models/components/metercreditevent.d.ts +5 -0
  56. package/dist/commonjs/models/components/metercreditevent.d.ts.map +1 -1
  57. package/dist/commonjs/models/components/metercreditevent.js +4 -0
  58. package/dist/commonjs/models/components/metercreditevent.js.map +1 -1
  59. package/dist/commonjs/models/components/meterresetevent.d.ts +5 -0
  60. package/dist/commonjs/models/components/meterresetevent.d.ts.map +1 -1
  61. package/dist/commonjs/models/components/meterresetevent.js +4 -0
  62. package/dist/commonjs/models/components/meterresetevent.js.map +1 -1
  63. package/dist/commonjs/models/components/orderpaidevent.d.ts +5 -0
  64. package/dist/commonjs/models/components/orderpaidevent.d.ts.map +1 -1
  65. package/dist/commonjs/models/components/orderpaidevent.js +4 -0
  66. package/dist/commonjs/models/components/orderpaidevent.js.map +1 -1
  67. package/dist/commonjs/models/components/orderrefundedevent.d.ts +5 -0
  68. package/dist/commonjs/models/components/orderrefundedevent.d.ts.map +1 -1
  69. package/dist/commonjs/models/components/orderrefundedevent.js +4 -0
  70. package/dist/commonjs/models/components/orderrefundedevent.js.map +1 -1
  71. package/dist/commonjs/models/components/subscriptioncycledevent.d.ts +5 -0
  72. package/dist/commonjs/models/components/subscriptioncycledevent.d.ts.map +1 -1
  73. package/dist/commonjs/models/components/subscriptioncycledevent.js +4 -0
  74. package/dist/commonjs/models/components/subscriptioncycledevent.js.map +1 -1
  75. package/dist/commonjs/models/components/subscriptionproductupdatedevent.d.ts +5 -0
  76. package/dist/commonjs/models/components/subscriptionproductupdatedevent.d.ts.map +1 -1
  77. package/dist/commonjs/models/components/subscriptionproductupdatedevent.js +4 -0
  78. package/dist/commonjs/models/components/subscriptionproductupdatedevent.js.map +1 -1
  79. package/dist/commonjs/models/components/subscriptionrevokedevent.d.ts +5 -0
  80. package/dist/commonjs/models/components/subscriptionrevokedevent.d.ts.map +1 -1
  81. package/dist/commonjs/models/components/subscriptionrevokedevent.js +4 -0
  82. package/dist/commonjs/models/components/subscriptionrevokedevent.js.map +1 -1
  83. package/dist/commonjs/models/components/userevent.d.ts +5 -0
  84. package/dist/commonjs/models/components/userevent.d.ts.map +1 -1
  85. package/dist/commonjs/models/components/userevent.js +4 -0
  86. package/dist/commonjs/models/components/userevent.js.map +1 -1
  87. package/dist/commonjs/models/operations/eventslist.d.ts +5 -0
  88. package/dist/commonjs/models/operations/eventslist.d.ts.map +1 -1
  89. package/dist/commonjs/models/operations/eventslist.js +4 -0
  90. package/dist/commonjs/models/operations/eventslist.js.map +1 -1
  91. package/dist/esm/funcs/eventsList.js +1 -0
  92. package/dist/esm/funcs/eventsList.js.map +1 -1
  93. package/dist/esm/lib/config.d.ts +3 -3
  94. package/dist/esm/lib/config.js +3 -3
  95. package/dist/esm/models/components/benefitcycledevent.d.ts +5 -0
  96. package/dist/esm/models/components/benefitcycledevent.d.ts.map +1 -1
  97. package/dist/esm/models/components/benefitcycledevent.js +4 -0
  98. package/dist/esm/models/components/benefitcycledevent.js.map +1 -1
  99. package/dist/esm/models/components/benefitgrantedevent.d.ts +5 -0
  100. package/dist/esm/models/components/benefitgrantedevent.d.ts.map +1 -1
  101. package/dist/esm/models/components/benefitgrantedevent.js +4 -0
  102. package/dist/esm/models/components/benefitgrantedevent.js.map +1 -1
  103. package/dist/esm/models/components/benefitrevokedevent.d.ts +5 -0
  104. package/dist/esm/models/components/benefitrevokedevent.d.ts.map +1 -1
  105. package/dist/esm/models/components/benefitrevokedevent.js +4 -0
  106. package/dist/esm/models/components/benefitrevokedevent.js.map +1 -1
  107. package/dist/esm/models/components/benefitupdatedevent.d.ts +5 -0
  108. package/dist/esm/models/components/benefitupdatedevent.d.ts.map +1 -1
  109. package/dist/esm/models/components/benefitupdatedevent.js +4 -0
  110. package/dist/esm/models/components/benefitupdatedevent.js.map +1 -1
  111. package/dist/esm/models/components/customercreate.d.ts +0 -3
  112. package/dist/esm/models/components/customercreate.d.ts.map +1 -1
  113. package/dist/esm/models/components/customercreate.js.map +1 -1
  114. package/dist/esm/models/components/customercreatedevent.d.ts +5 -0
  115. package/dist/esm/models/components/customercreatedevent.d.ts.map +1 -1
  116. package/dist/esm/models/components/customercreatedevent.js +4 -0
  117. package/dist/esm/models/components/customercreatedevent.js.map +1 -1
  118. package/dist/esm/models/components/customerdeletedevent.d.ts +5 -0
  119. package/dist/esm/models/components/customerdeletedevent.d.ts.map +1 -1
  120. package/dist/esm/models/components/customerdeletedevent.js +4 -0
  121. package/dist/esm/models/components/customerdeletedevent.js.map +1 -1
  122. package/dist/esm/models/components/customerupdate.d.ts +0 -3
  123. package/dist/esm/models/components/customerupdate.d.ts.map +1 -1
  124. package/dist/esm/models/components/customerupdate.js.map +1 -1
  125. package/dist/esm/models/components/customerupdatedevent.d.ts +5 -0
  126. package/dist/esm/models/components/customerupdatedevent.d.ts.map +1 -1
  127. package/dist/esm/models/components/customerupdatedevent.js +4 -0
  128. package/dist/esm/models/components/customerupdatedevent.js.map +1 -1
  129. package/dist/esm/models/components/customerupdateexternalid.d.ts +0 -3
  130. package/dist/esm/models/components/customerupdateexternalid.d.ts.map +1 -1
  131. package/dist/esm/models/components/customerupdateexternalid.js.map +1 -1
  132. package/dist/esm/models/components/eventcreatecustomer.d.ts +10 -0
  133. package/dist/esm/models/components/eventcreatecustomer.d.ts.map +1 -1
  134. package/dist/esm/models/components/eventcreatecustomer.js +8 -0
  135. package/dist/esm/models/components/eventcreatecustomer.js.map +1 -1
  136. package/dist/esm/models/components/eventcreateexternalcustomer.d.ts +10 -0
  137. package/dist/esm/models/components/eventcreateexternalcustomer.d.ts.map +1 -1
  138. package/dist/esm/models/components/eventcreateexternalcustomer.js +8 -0
  139. package/dist/esm/models/components/eventcreateexternalcustomer.js.map +1 -1
  140. package/dist/esm/models/components/eventsingestresponse.d.ts +5 -0
  141. package/dist/esm/models/components/eventsingestresponse.d.ts.map +1 -1
  142. package/dist/esm/models/components/eventsingestresponse.js +2 -0
  143. package/dist/esm/models/components/eventsingestresponse.js.map +1 -1
  144. package/dist/esm/models/components/metercreditevent.d.ts +5 -0
  145. package/dist/esm/models/components/metercreditevent.d.ts.map +1 -1
  146. package/dist/esm/models/components/metercreditevent.js +4 -0
  147. package/dist/esm/models/components/metercreditevent.js.map +1 -1
  148. package/dist/esm/models/components/meterresetevent.d.ts +5 -0
  149. package/dist/esm/models/components/meterresetevent.d.ts.map +1 -1
  150. package/dist/esm/models/components/meterresetevent.js +4 -0
  151. package/dist/esm/models/components/meterresetevent.js.map +1 -1
  152. package/dist/esm/models/components/orderpaidevent.d.ts +5 -0
  153. package/dist/esm/models/components/orderpaidevent.d.ts.map +1 -1
  154. package/dist/esm/models/components/orderpaidevent.js +4 -0
  155. package/dist/esm/models/components/orderpaidevent.js.map +1 -1
  156. package/dist/esm/models/components/orderrefundedevent.d.ts +5 -0
  157. package/dist/esm/models/components/orderrefundedevent.d.ts.map +1 -1
  158. package/dist/esm/models/components/orderrefundedevent.js +4 -0
  159. package/dist/esm/models/components/orderrefundedevent.js.map +1 -1
  160. package/dist/esm/models/components/subscriptioncycledevent.d.ts +5 -0
  161. package/dist/esm/models/components/subscriptioncycledevent.d.ts.map +1 -1
  162. package/dist/esm/models/components/subscriptioncycledevent.js +4 -0
  163. package/dist/esm/models/components/subscriptioncycledevent.js.map +1 -1
  164. package/dist/esm/models/components/subscriptionproductupdatedevent.d.ts +5 -0
  165. package/dist/esm/models/components/subscriptionproductupdatedevent.d.ts.map +1 -1
  166. package/dist/esm/models/components/subscriptionproductupdatedevent.js +4 -0
  167. package/dist/esm/models/components/subscriptionproductupdatedevent.js.map +1 -1
  168. package/dist/esm/models/components/subscriptionrevokedevent.d.ts +5 -0
  169. package/dist/esm/models/components/subscriptionrevokedevent.d.ts.map +1 -1
  170. package/dist/esm/models/components/subscriptionrevokedevent.js +4 -0
  171. package/dist/esm/models/components/subscriptionrevokedevent.js.map +1 -1
  172. package/dist/esm/models/components/userevent.d.ts +5 -0
  173. package/dist/esm/models/components/userevent.d.ts.map +1 -1
  174. package/dist/esm/models/components/userevent.js +4 -0
  175. package/dist/esm/models/components/userevent.js.map +1 -1
  176. package/dist/esm/models/operations/eventslist.d.ts +5 -0
  177. package/dist/esm/models/operations/eventslist.d.ts.map +1 -1
  178. package/dist/esm/models/operations/eventslist.js +4 -0
  179. package/dist/esm/models/operations/eventslist.js.map +1 -1
  180. package/examples/package-lock.json +1 -1
  181. package/jsr.json +1 -1
  182. package/package.json +1 -1
  183. package/src/funcs/eventsList.ts +1 -0
  184. package/src/lib/config.ts +3 -3
  185. package/src/models/components/benefitcycledevent.ts +9 -0
  186. package/src/models/components/benefitgrantedevent.ts +9 -0
  187. package/src/models/components/benefitrevokedevent.ts +9 -0
  188. package/src/models/components/benefitupdatedevent.ts +9 -0
  189. package/src/models/components/customercreate.ts +0 -3
  190. package/src/models/components/customercreatedevent.ts +9 -0
  191. package/src/models/components/customerdeletedevent.ts +9 -0
  192. package/src/models/components/customerupdate.ts +0 -3
  193. package/src/models/components/customerupdatedevent.ts +9 -0
  194. package/src/models/components/customerupdateexternalid.ts +0 -3
  195. package/src/models/components/eventcreatecustomer.ts +18 -0
  196. package/src/models/components/eventcreateexternalcustomer.ts +18 -0
  197. package/src/models/components/eventsingestresponse.ts +7 -0
  198. package/src/models/components/metercreditevent.ts +9 -0
  199. package/src/models/components/meterresetevent.ts +9 -0
  200. package/src/models/components/orderpaidevent.ts +9 -0
  201. package/src/models/components/orderrefundedevent.ts +9 -0
  202. package/src/models/components/subscriptioncycledevent.ts +9 -0
  203. package/src/models/components/subscriptionproductupdatedevent.ts +9 -0
  204. package/src/models/components/subscriptionrevokedevent.ts +9 -0
  205. package/src/models/components/userevent.ts +9 -0
  206. package/src/models/operations/eventslist.ts +9 -0
  207. package/.devcontainer/README.md +0 -35
  208. package/docs/sdks/benefitgrants/README.md +0 -88
  209. package/docs/sdks/benefits/README.md +0 -500
  210. package/docs/sdks/checkoutlinks/README.md +0 -407
  211. package/docs/sdks/checkouts/README.md +0 -600
  212. package/docs/sdks/clients/README.md +0 -331
  213. package/docs/sdks/customermeters/README.md +0 -166
  214. package/docs/sdks/customers/README.md +0 -1036
  215. package/docs/sdks/customerseats/README.md +0 -441
  216. package/docs/sdks/customersession/README.md +0 -79
  217. package/docs/sdks/customersessions/README.md +0 -84
  218. package/docs/sdks/customfields/README.md +0 -417
  219. package/docs/sdks/discounts/README.md +0 -409
  220. package/docs/sdks/downloadables/README.md +0 -83
  221. package/docs/sdks/events/README.md +0 -324
  222. package/docs/sdks/files/README.md +0 -460
  223. package/docs/sdks/licensekeys/README.md +0 -576
  224. package/docs/sdks/meters/README.md +0 -437
  225. package/docs/sdks/metrics/README.md +0 -165
  226. package/docs/sdks/oauth2/README.md +0 -371
  227. package/docs/sdks/orders/README.md +0 -489
  228. package/docs/sdks/organizations/README.md +0 -322
  229. package/docs/sdks/payments/README.md +0 -166
  230. package/docs/sdks/polarbenefitgrants/README.md +0 -250
  231. package/docs/sdks/polarcustomermeters/README.md +0 -164
  232. package/docs/sdks/polarcustomers/README.md +0 -482
  233. package/docs/sdks/polarlicensekeys/README.md +0 -406
  234. package/docs/sdks/polarorders/README.md +0 -574
  235. package/docs/sdks/polarorganizations/README.md +0 -79
  236. package/docs/sdks/polarsubscriptions/README.md +0 -326
  237. package/docs/sdks/polarwallets/README.md +0 -164
  238. package/docs/sdks/products/README.md +0 -441
  239. package/docs/sdks/refunds/README.md +0 -171
  240. package/docs/sdks/seats/README.md +0 -379
  241. package/docs/sdks/subscriptions/README.md +0 -493
  242. package/docs/sdks/wallets/README.md +0 -256
  243. package/docs/sdks/webhooks/README.md +0 -650
  244. package/examples/README.md +0 -31
@@ -48,6 +48,10 @@ export type BenefitRevokedEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const BenefitRevokedEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("benefit.revoked"),
76
81
  metadata: BenefitGrantMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const BenefitRevokedEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type BenefitRevokedEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "benefit.revoked";
95
102
  metadata: BenefitGrantMetadata$Outbound;
@@ -107,6 +114,7 @@ export const BenefitRevokedEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("benefit.revoked"),
112
120
  metadata: BenefitGrantMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const BenefitRevokedEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129
 
@@ -48,6 +48,10 @@ export type BenefitUpdatedEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const BenefitUpdatedEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("benefit.updated"),
76
81
  metadata: BenefitGrantMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const BenefitUpdatedEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type BenefitUpdatedEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "benefit.updated";
95
102
  metadata: BenefitGrantMetadata$Outbound;
@@ -107,6 +114,7 @@ export const BenefitUpdatedEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("benefit.updated"),
112
120
  metadata: BenefitGrantMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const BenefitUpdatedEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129
 
@@ -48,9 +48,6 @@ export type CustomerCreate = {
48
48
  * The email address of the customer. This must be unique within the organization.
49
49
  */
50
50
  email: string;
51
- /**
52
- * The name of the customer.
53
- */
54
51
  name?: string | null | undefined;
55
52
  billingAddress?: AddressInput | null | undefined;
56
53
  taxId?: Array<string | TaxIDFormat | null> | null | undefined;
@@ -48,6 +48,10 @@ export type CustomerCreatedEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const CustomerCreatedEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("customer.created"),
76
81
  metadata: CustomerCreatedMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const CustomerCreatedEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type CustomerCreatedEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "customer.created";
95
102
  metadata: CustomerCreatedMetadata$Outbound;
@@ -107,6 +114,7 @@ export const CustomerCreatedEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("customer.created"),
112
120
  metadata: CustomerCreatedMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const CustomerCreatedEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129
 
@@ -48,6 +48,10 @@ export type CustomerDeletedEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const CustomerDeletedEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("customer.deleted"),
76
81
  metadata: CustomerDeletedMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const CustomerDeletedEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type CustomerDeletedEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "customer.deleted";
95
102
  metadata: CustomerDeletedMetadata$Outbound;
@@ -107,6 +114,7 @@ export const CustomerDeletedEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("customer.deleted"),
112
120
  metadata: CustomerDeletedMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const CustomerDeletedEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129
 
@@ -44,9 +44,6 @@ export type CustomerUpdate = {
44
44
  * The email address of the customer. This must be unique within the organization.
45
45
  */
46
46
  email?: string | null | undefined;
47
- /**
48
- * The name of the customer.
49
- */
50
47
  name?: string | null | undefined;
51
48
  billingAddress?: AddressInput | null | undefined;
52
49
  taxId?: Array<string | TaxIDFormat | null> | null | undefined;
@@ -48,6 +48,10 @@ export type CustomerUpdatedEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const CustomerUpdatedEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("customer.updated"),
76
81
  metadata: CustomerUpdatedMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const CustomerUpdatedEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type CustomerUpdatedEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "customer.updated";
95
102
  metadata: CustomerUpdatedMetadata$Outbound;
@@ -107,6 +114,7 @@ export const CustomerUpdatedEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("customer.updated"),
112
120
  metadata: CustomerUpdatedMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const CustomerUpdatedEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129
 
@@ -48,9 +48,6 @@ export type CustomerUpdateExternalID = {
48
48
  * The email address of the customer. This must be unique within the organization.
49
49
  */
50
50
  email?: string | null | undefined;
51
- /**
52
- * The name of the customer.
53
- */
54
51
  name?: string | null | undefined;
55
52
  billingAddress?: AddressInput | null | undefined;
56
53
  taxId?: Array<string | TaxIDFormat | null> | null | undefined;
@@ -27,6 +27,14 @@ export type EventCreateCustomer = {
27
27
  * The ID of the organization owning the event. **Required unless you use an organization token.**
28
28
  */
29
29
  organizationId?: string | null | undefined;
30
+ /**
31
+ * Your unique identifier for this event. Useful for deduplication and parent-child relationships.
32
+ */
33
+ externalId?: string | null | undefined;
34
+ /**
35
+ * The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID.
36
+ */
37
+ parentId?: string | null | undefined;
30
38
  metadata?: { [k: string]: EventMetadataInput } | undefined;
31
39
  /**
32
40
  * ID of the customer in your Polar organization associated with the event.
@@ -44,11 +52,15 @@ export const EventCreateCustomer$inboundSchema: z.ZodType<
44
52
  .optional(),
45
53
  name: z.string(),
46
54
  organization_id: z.nullable(z.string()).optional(),
55
+ external_id: z.nullable(z.string()).optional(),
56
+ parent_id: z.nullable(z.string()).optional(),
47
57
  metadata: z.record(EventMetadataInput$inboundSchema).optional(),
48
58
  customer_id: z.string(),
49
59
  }).transform((v) => {
50
60
  return remap$(v, {
51
61
  "organization_id": "organizationId",
62
+ "external_id": "externalId",
63
+ "parent_id": "parentId",
52
64
  "customer_id": "customerId",
53
65
  });
54
66
  });
@@ -58,6 +70,8 @@ export type EventCreateCustomer$Outbound = {
58
70
  timestamp?: string | undefined;
59
71
  name: string;
60
72
  organization_id?: string | null | undefined;
73
+ external_id?: string | null | undefined;
74
+ parent_id?: string | null | undefined;
61
75
  metadata?: { [k: string]: EventMetadataInput$Outbound } | undefined;
62
76
  customer_id: string;
63
77
  };
@@ -71,11 +85,15 @@ export const EventCreateCustomer$outboundSchema: z.ZodType<
71
85
  timestamp: z.date().transform(v => v.toISOString()).optional(),
72
86
  name: z.string(),
73
87
  organizationId: z.nullable(z.string()).optional(),
88
+ externalId: z.nullable(z.string()).optional(),
89
+ parentId: z.nullable(z.string()).optional(),
74
90
  metadata: z.record(EventMetadataInput$outboundSchema).optional(),
75
91
  customerId: z.string(),
76
92
  }).transform((v) => {
77
93
  return remap$(v, {
78
94
  organizationId: "organization_id",
95
+ externalId: "external_id",
96
+ parentId: "parent_id",
79
97
  customerId: "customer_id",
80
98
  });
81
99
  });
@@ -27,6 +27,14 @@ export type EventCreateExternalCustomer = {
27
27
  * The ID of the organization owning the event. **Required unless you use an organization token.**
28
28
  */
29
29
  organizationId?: string | null | undefined;
30
+ /**
31
+ * Your unique identifier for this event. Useful for deduplication and parent-child relationships.
32
+ */
33
+ externalId?: string | null | undefined;
34
+ /**
35
+ * The ID of the parent event. Can be either a Polar event ID (UUID) or an external event ID.
36
+ */
37
+ parentId?: string | null | undefined;
30
38
  metadata?: { [k: string]: EventMetadataInput } | undefined;
31
39
  /**
32
40
  * ID of the customer in your system associated with the event.
@@ -44,11 +52,15 @@ export const EventCreateExternalCustomer$inboundSchema: z.ZodType<
44
52
  .optional(),
45
53
  name: z.string(),
46
54
  organization_id: z.nullable(z.string()).optional(),
55
+ external_id: z.nullable(z.string()).optional(),
56
+ parent_id: z.nullable(z.string()).optional(),
47
57
  metadata: z.record(EventMetadataInput$inboundSchema).optional(),
48
58
  external_customer_id: z.string(),
49
59
  }).transform((v) => {
50
60
  return remap$(v, {
51
61
  "organization_id": "organizationId",
62
+ "external_id": "externalId",
63
+ "parent_id": "parentId",
52
64
  "external_customer_id": "externalCustomerId",
53
65
  });
54
66
  });
@@ -58,6 +70,8 @@ export type EventCreateExternalCustomer$Outbound = {
58
70
  timestamp?: string | undefined;
59
71
  name: string;
60
72
  organization_id?: string | null | undefined;
73
+ external_id?: string | null | undefined;
74
+ parent_id?: string | null | undefined;
61
75
  metadata?: { [k: string]: EventMetadataInput$Outbound } | undefined;
62
76
  external_customer_id: string;
63
77
  };
@@ -71,11 +85,15 @@ export const EventCreateExternalCustomer$outboundSchema: z.ZodType<
71
85
  timestamp: z.date().transform(v => v.toISOString()).optional(),
72
86
  name: z.string(),
73
87
  organizationId: z.nullable(z.string()).optional(),
88
+ externalId: z.nullable(z.string()).optional(),
89
+ parentId: z.nullable(z.string()).optional(),
74
90
  metadata: z.record(EventMetadataInput$outboundSchema).optional(),
75
91
  externalCustomerId: z.string(),
76
92
  }).transform((v) => {
77
93
  return remap$(v, {
78
94
  organizationId: "organization_id",
95
+ externalId: "external_id",
96
+ parentId: "parent_id",
79
97
  externalCustomerId: "external_customer_id",
80
98
  });
81
99
  });
@@ -12,6 +12,10 @@ export type EventsIngestResponse = {
12
12
  * Number of events inserted.
13
13
  */
14
14
  inserted: number;
15
+ /**
16
+ * Number of duplicate events skipped.
17
+ */
18
+ duplicates?: number | undefined;
15
19
  };
16
20
 
17
21
  /** @internal */
@@ -21,11 +25,13 @@ export const EventsIngestResponse$inboundSchema: z.ZodType<
21
25
  unknown
22
26
  > = z.object({
23
27
  inserted: z.number().int(),
28
+ duplicates: z.number().int().default(0),
24
29
  });
25
30
 
26
31
  /** @internal */
27
32
  export type EventsIngestResponse$Outbound = {
28
33
  inserted: number;
34
+ duplicates: number;
29
35
  };
30
36
 
31
37
  /** @internal */
@@ -35,6 +41,7 @@ export const EventsIngestResponse$outboundSchema: z.ZodType<
35
41
  EventsIngestResponse
36
42
  > = z.object({
37
43
  inserted: z.number().int(),
44
+ duplicates: z.number().int().default(0),
38
45
  });
39
46
 
40
47
  /**
@@ -48,6 +48,10 @@ export type MeterCreditEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const MeterCreditEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("meter.credited"),
76
81
  metadata: MeterCreditedMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const MeterCreditEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type MeterCreditEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "meter.credited";
95
102
  metadata: MeterCreditedMetadata$Outbound;
@@ -107,6 +114,7 @@ export const MeterCreditEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("meter.credited"),
112
120
  metadata: MeterCreditedMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const MeterCreditEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129
 
@@ -48,6 +48,10 @@ export type MeterResetEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const MeterResetEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("meter.reset"),
76
81
  metadata: MeterResetMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const MeterResetEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type MeterResetEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "meter.reset";
95
102
  metadata: MeterResetMetadata$Outbound;
@@ -107,6 +114,7 @@ export const MeterResetEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("meter.reset"),
112
120
  metadata: MeterResetMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const MeterResetEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129
 
@@ -48,6 +48,10 @@ export type OrderPaidEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const OrderPaidEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("order.paid"),
76
81
  metadata: OrderPaidMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const OrderPaidEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type OrderPaidEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "order.paid";
95
102
  metadata: OrderPaidMetadata$Outbound;
@@ -107,6 +114,7 @@ export const OrderPaidEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("order.paid"),
112
120
  metadata: OrderPaidMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const OrderPaidEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129
 
@@ -48,6 +48,10 @@ export type OrderRefundedEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const OrderRefundedEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("order.refunded"),
76
81
  metadata: OrderRefundedMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const OrderRefundedEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type OrderRefundedEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "order.refunded";
95
102
  metadata: OrderRefundedMetadata$Outbound;
@@ -107,6 +114,7 @@ export const OrderRefundedEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("order.refunded"),
112
120
  metadata: OrderRefundedMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const OrderRefundedEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129
 
@@ -48,6 +48,10 @@ export type SubscriptionCycledEvent = {
48
48
  * ID of the customer in your system associated with the event.
49
49
  */
50
50
  externalCustomerId: string | null;
51
+ /**
52
+ * Number of direct child events linked to this event.
53
+ */
54
+ childCount?: number | undefined;
51
55
  /**
52
56
  * The source of the event. `system` events are created by Polar. `user` events are the one you create through our ingestion API.
53
57
  */
@@ -71,6 +75,7 @@ export const SubscriptionCycledEvent$inboundSchema: z.ZodType<
71
75
  customer_id: z.nullable(z.string()),
72
76
  customer: z.nullable(Customer$inboundSchema),
73
77
  external_customer_id: z.nullable(z.string()),
78
+ child_count: z.number().int().default(0),
74
79
  source: z.literal("system"),
75
80
  name: z.literal("subscription.cycled"),
76
81
  metadata: SubscriptionCycledMetadata$inboundSchema,
@@ -79,6 +84,7 @@ export const SubscriptionCycledEvent$inboundSchema: z.ZodType<
79
84
  "organization_id": "organizationId",
80
85
  "customer_id": "customerId",
81
86
  "external_customer_id": "externalCustomerId",
87
+ "child_count": "childCount",
82
88
  });
83
89
  });
84
90
 
@@ -90,6 +96,7 @@ export type SubscriptionCycledEvent$Outbound = {
90
96
  customer_id: string | null;
91
97
  customer: Customer$Outbound | null;
92
98
  external_customer_id: string | null;
99
+ child_count: number;
93
100
  source: "system";
94
101
  name: "subscription.cycled";
95
102
  metadata: SubscriptionCycledMetadata$Outbound;
@@ -107,6 +114,7 @@ export const SubscriptionCycledEvent$outboundSchema: z.ZodType<
107
114
  customerId: z.nullable(z.string()),
108
115
  customer: z.nullable(Customer$outboundSchema),
109
116
  externalCustomerId: z.nullable(z.string()),
117
+ childCount: z.number().int().default(0),
110
118
  source: z.literal("system"),
111
119
  name: z.literal("subscription.cycled"),
112
120
  metadata: SubscriptionCycledMetadata$outboundSchema,
@@ -115,6 +123,7 @@ export const SubscriptionCycledEvent$outboundSchema: z.ZodType<
115
123
  organizationId: "organization_id",
116
124
  customerId: "customer_id",
117
125
  externalCustomerId: "external_customer_id",
126
+ childCount: "child_count",
118
127
  });
119
128
  });
120
129