mollie-api-typescript 0.0.5 → 0.0.6

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 (222) hide show
  1. package/README.md +3 -2
  2. package/bin/mcp-server.js +676 -1258
  3. package/bin/mcp-server.js.map +28 -28
  4. package/dist/commonjs/funcs/delayedRoutingList.js +4 -0
  5. package/dist/commonjs/funcs/delayedRoutingList.js.map +1 -1
  6. package/dist/commonjs/funcs/subscriptionsAll.d.ts +1 -1
  7. package/dist/commonjs/funcs/subscriptionsAll.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/subscriptionsAll.js +2 -5
  9. package/dist/commonjs/funcs/subscriptionsAll.js.map +1 -1
  10. package/dist/commonjs/lib/config.d.ts +2 -2
  11. package/dist/commonjs/lib/config.js +2 -2
  12. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  13. package/dist/commonjs/mcp-server/server.js +1 -1
  14. package/dist/commonjs/models/errors/listallsubscriptions.d.ts +95 -14
  15. package/dist/commonjs/models/errors/listallsubscriptions.d.ts.map +1 -1
  16. package/dist/commonjs/models/errors/listallsubscriptions.js +80 -14
  17. package/dist/commonjs/models/errors/listallsubscriptions.js.map +1 -1
  18. package/dist/commonjs/models/operations/cancelsubscription.d.ts +40 -40
  19. package/dist/commonjs/models/operations/cancelsubscription.d.ts.map +1 -1
  20. package/dist/commonjs/models/operations/cancelsubscription.js +40 -48
  21. package/dist/commonjs/models/operations/cancelsubscription.js.map +1 -1
  22. package/dist/commonjs/models/operations/createcustomer.d.ts +22 -22
  23. package/dist/commonjs/models/operations/createcustomer.d.ts.map +1 -1
  24. package/dist/commonjs/models/operations/createcustomer.js +22 -24
  25. package/dist/commonjs/models/operations/createcustomer.js.map +1 -1
  26. package/dist/commonjs/models/operations/createmandate.d.ts +26 -26
  27. package/dist/commonjs/models/operations/createmandate.d.ts.map +1 -1
  28. package/dist/commonjs/models/operations/createmandate.js +26 -28
  29. package/dist/commonjs/models/operations/createmandate.js.map +1 -1
  30. package/dist/commonjs/models/operations/createrefund.d.ts +7 -7
  31. package/dist/commonjs/models/operations/createrefund.d.ts.map +1 -1
  32. package/dist/commonjs/models/operations/createrefund.js +8 -10
  33. package/dist/commonjs/models/operations/createrefund.js.map +1 -1
  34. package/dist/commonjs/models/operations/createsubscription.d.ts +44 -44
  35. package/dist/commonjs/models/operations/createsubscription.d.ts.map +1 -1
  36. package/dist/commonjs/models/operations/createsubscription.js +44 -53
  37. package/dist/commonjs/models/operations/createsubscription.js.map +1 -1
  38. package/dist/commonjs/models/operations/getcustomer.d.ts +28 -28
  39. package/dist/commonjs/models/operations/getcustomer.d.ts.map +1 -1
  40. package/dist/commonjs/models/operations/getcustomer.js +28 -30
  41. package/dist/commonjs/models/operations/getcustomer.js.map +1 -1
  42. package/dist/commonjs/models/operations/getmandate.d.ts +26 -26
  43. package/dist/commonjs/models/operations/getmandate.d.ts.map +1 -1
  44. package/dist/commonjs/models/operations/getmandate.js +26 -27
  45. package/dist/commonjs/models/operations/getmandate.js.map +1 -1
  46. package/dist/commonjs/models/operations/getrefund.d.ts +7 -7
  47. package/dist/commonjs/models/operations/getrefund.d.ts.map +1 -1
  48. package/dist/commonjs/models/operations/getrefund.js +8 -8
  49. package/dist/commonjs/models/operations/getrefund.js.map +1 -1
  50. package/dist/commonjs/models/operations/getsubscription.d.ts +40 -40
  51. package/dist/commonjs/models/operations/getsubscription.d.ts.map +1 -1
  52. package/dist/commonjs/models/operations/getsubscription.js +40 -48
  53. package/dist/commonjs/models/operations/getsubscription.js.map +1 -1
  54. package/dist/commonjs/models/operations/listallrefunds.d.ts +9 -15
  55. package/dist/commonjs/models/operations/listallrefunds.d.ts.map +1 -1
  56. package/dist/commonjs/models/operations/listallrefunds.js +8 -10
  57. package/dist/commonjs/models/operations/listallrefunds.js.map +1 -1
  58. package/dist/commonjs/models/operations/listallsubscriptions.d.ts +532 -2849
  59. package/dist/commonjs/models/operations/listallsubscriptions.d.ts.map +1 -1
  60. package/dist/commonjs/models/operations/listallsubscriptions.js +345 -1612
  61. package/dist/commonjs/models/operations/listallsubscriptions.js.map +1 -1
  62. package/dist/commonjs/models/operations/listcustomers.d.ts +22 -22
  63. package/dist/commonjs/models/operations/listcustomers.d.ts.map +1 -1
  64. package/dist/commonjs/models/operations/listcustomers.js +22 -22
  65. package/dist/commonjs/models/operations/listcustomers.js.map +1 -1
  66. package/dist/commonjs/models/operations/listmandates.d.ts +26 -26
  67. package/dist/commonjs/models/operations/listmandates.d.ts.map +1 -1
  68. package/dist/commonjs/models/operations/listmandates.js +26 -26
  69. package/dist/commonjs/models/operations/listmandates.js.map +1 -1
  70. package/dist/commonjs/models/operations/listrefunds.d.ts +7 -7
  71. package/dist/commonjs/models/operations/listrefunds.d.ts.map +1 -1
  72. package/dist/commonjs/models/operations/listrefunds.js +8 -10
  73. package/dist/commonjs/models/operations/listrefunds.js.map +1 -1
  74. package/dist/commonjs/models/operations/listsettlementrefunds.d.ts +7 -7
  75. package/dist/commonjs/models/operations/listsettlementrefunds.d.ts.map +1 -1
  76. package/dist/commonjs/models/operations/listsettlementrefunds.js +8 -8
  77. package/dist/commonjs/models/operations/listsettlementrefunds.js.map +1 -1
  78. package/dist/commonjs/models/operations/listsubscriptions.d.ts +81 -81
  79. package/dist/commonjs/models/operations/listsubscriptions.d.ts.map +1 -1
  80. package/dist/commonjs/models/operations/listsubscriptions.js +90 -96
  81. package/dist/commonjs/models/operations/listsubscriptions.js.map +1 -1
  82. package/dist/commonjs/models/operations/paymentcreateroute.d.ts +11 -0
  83. package/dist/commonjs/models/operations/paymentcreateroute.d.ts.map +1 -1
  84. package/dist/commonjs/models/operations/paymentcreateroute.js +2 -0
  85. package/dist/commonjs/models/operations/paymentcreateroute.js.map +1 -1
  86. package/dist/commonjs/models/operations/paymentlistroutes.d.ts +11 -0
  87. package/dist/commonjs/models/operations/paymentlistroutes.d.ts.map +1 -1
  88. package/dist/commonjs/models/operations/paymentlistroutes.js +2 -0
  89. package/dist/commonjs/models/operations/paymentlistroutes.js.map +1 -1
  90. package/dist/commonjs/models/operations/updatecustomer.d.ts +22 -22
  91. package/dist/commonjs/models/operations/updatecustomer.d.ts.map +1 -1
  92. package/dist/commonjs/models/operations/updatecustomer.js +22 -24
  93. package/dist/commonjs/models/operations/updatecustomer.js.map +1 -1
  94. package/dist/commonjs/models/operations/updatesubscription.d.ts +40 -40
  95. package/dist/commonjs/models/operations/updatesubscription.d.ts.map +1 -1
  96. package/dist/commonjs/models/operations/updatesubscription.js +40 -50
  97. package/dist/commonjs/models/operations/updatesubscription.js.map +1 -1
  98. package/dist/esm/funcs/delayedRoutingList.js +5 -1
  99. package/dist/esm/funcs/delayedRoutingList.js.map +1 -1
  100. package/dist/esm/funcs/subscriptionsAll.d.ts +1 -1
  101. package/dist/esm/funcs/subscriptionsAll.d.ts.map +1 -1
  102. package/dist/esm/funcs/subscriptionsAll.js +2 -5
  103. package/dist/esm/funcs/subscriptionsAll.js.map +1 -1
  104. package/dist/esm/lib/config.d.ts +2 -2
  105. package/dist/esm/lib/config.js +2 -2
  106. package/dist/esm/mcp-server/mcp-server.js +1 -1
  107. package/dist/esm/mcp-server/server.js +1 -1
  108. package/dist/esm/models/errors/listallsubscriptions.d.ts +95 -14
  109. package/dist/esm/models/errors/listallsubscriptions.d.ts.map +1 -1
  110. package/dist/esm/models/errors/listallsubscriptions.js +77 -12
  111. package/dist/esm/models/errors/listallsubscriptions.js.map +1 -1
  112. package/dist/esm/models/operations/cancelsubscription.d.ts +40 -40
  113. package/dist/esm/models/operations/cancelsubscription.d.ts.map +1 -1
  114. package/dist/esm/models/operations/cancelsubscription.js +40 -48
  115. package/dist/esm/models/operations/cancelsubscription.js.map +1 -1
  116. package/dist/esm/models/operations/createcustomer.d.ts +22 -22
  117. package/dist/esm/models/operations/createcustomer.d.ts.map +1 -1
  118. package/dist/esm/models/operations/createcustomer.js +22 -24
  119. package/dist/esm/models/operations/createcustomer.js.map +1 -1
  120. package/dist/esm/models/operations/createmandate.d.ts +26 -26
  121. package/dist/esm/models/operations/createmandate.d.ts.map +1 -1
  122. package/dist/esm/models/operations/createmandate.js +26 -28
  123. package/dist/esm/models/operations/createmandate.js.map +1 -1
  124. package/dist/esm/models/operations/createrefund.d.ts +7 -7
  125. package/dist/esm/models/operations/createrefund.d.ts.map +1 -1
  126. package/dist/esm/models/operations/createrefund.js +8 -10
  127. package/dist/esm/models/operations/createrefund.js.map +1 -1
  128. package/dist/esm/models/operations/createsubscription.d.ts +44 -44
  129. package/dist/esm/models/operations/createsubscription.d.ts.map +1 -1
  130. package/dist/esm/models/operations/createsubscription.js +44 -53
  131. package/dist/esm/models/operations/createsubscription.js.map +1 -1
  132. package/dist/esm/models/operations/getcustomer.d.ts +28 -28
  133. package/dist/esm/models/operations/getcustomer.d.ts.map +1 -1
  134. package/dist/esm/models/operations/getcustomer.js +28 -30
  135. package/dist/esm/models/operations/getcustomer.js.map +1 -1
  136. package/dist/esm/models/operations/getmandate.d.ts +26 -26
  137. package/dist/esm/models/operations/getmandate.d.ts.map +1 -1
  138. package/dist/esm/models/operations/getmandate.js +26 -27
  139. package/dist/esm/models/operations/getmandate.js.map +1 -1
  140. package/dist/esm/models/operations/getrefund.d.ts +7 -7
  141. package/dist/esm/models/operations/getrefund.d.ts.map +1 -1
  142. package/dist/esm/models/operations/getrefund.js +8 -8
  143. package/dist/esm/models/operations/getrefund.js.map +1 -1
  144. package/dist/esm/models/operations/getsubscription.d.ts +40 -40
  145. package/dist/esm/models/operations/getsubscription.d.ts.map +1 -1
  146. package/dist/esm/models/operations/getsubscription.js +40 -48
  147. package/dist/esm/models/operations/getsubscription.js.map +1 -1
  148. package/dist/esm/models/operations/listallrefunds.d.ts +9 -15
  149. package/dist/esm/models/operations/listallrefunds.d.ts.map +1 -1
  150. package/dist/esm/models/operations/listallrefunds.js +8 -10
  151. package/dist/esm/models/operations/listallrefunds.js.map +1 -1
  152. package/dist/esm/models/operations/listallsubscriptions.d.ts +532 -2849
  153. package/dist/esm/models/operations/listallsubscriptions.d.ts.map +1 -1
  154. package/dist/esm/models/operations/listallsubscriptions.js +325 -1533
  155. package/dist/esm/models/operations/listallsubscriptions.js.map +1 -1
  156. package/dist/esm/models/operations/listcustomers.d.ts +22 -22
  157. package/dist/esm/models/operations/listcustomers.d.ts.map +1 -1
  158. package/dist/esm/models/operations/listcustomers.js +22 -22
  159. package/dist/esm/models/operations/listcustomers.js.map +1 -1
  160. package/dist/esm/models/operations/listmandates.d.ts +26 -26
  161. package/dist/esm/models/operations/listmandates.d.ts.map +1 -1
  162. package/dist/esm/models/operations/listmandates.js +26 -26
  163. package/dist/esm/models/operations/listmandates.js.map +1 -1
  164. package/dist/esm/models/operations/listrefunds.d.ts +7 -7
  165. package/dist/esm/models/operations/listrefunds.d.ts.map +1 -1
  166. package/dist/esm/models/operations/listrefunds.js +8 -10
  167. package/dist/esm/models/operations/listrefunds.js.map +1 -1
  168. package/dist/esm/models/operations/listsettlementrefunds.d.ts +7 -7
  169. package/dist/esm/models/operations/listsettlementrefunds.d.ts.map +1 -1
  170. package/dist/esm/models/operations/listsettlementrefunds.js +8 -8
  171. package/dist/esm/models/operations/listsettlementrefunds.js.map +1 -1
  172. package/dist/esm/models/operations/listsubscriptions.d.ts +81 -81
  173. package/dist/esm/models/operations/listsubscriptions.d.ts.map +1 -1
  174. package/dist/esm/models/operations/listsubscriptions.js +83 -89
  175. package/dist/esm/models/operations/listsubscriptions.js.map +1 -1
  176. package/dist/esm/models/operations/paymentcreateroute.d.ts +11 -0
  177. package/dist/esm/models/operations/paymentcreateroute.d.ts.map +1 -1
  178. package/dist/esm/models/operations/paymentcreateroute.js +2 -0
  179. package/dist/esm/models/operations/paymentcreateroute.js.map +1 -1
  180. package/dist/esm/models/operations/paymentlistroutes.d.ts +11 -0
  181. package/dist/esm/models/operations/paymentlistroutes.d.ts.map +1 -1
  182. package/dist/esm/models/operations/paymentlistroutes.js +2 -0
  183. package/dist/esm/models/operations/paymentlistroutes.js.map +1 -1
  184. package/dist/esm/models/operations/updatecustomer.d.ts +22 -22
  185. package/dist/esm/models/operations/updatecustomer.d.ts.map +1 -1
  186. package/dist/esm/models/operations/updatecustomer.js +22 -24
  187. package/dist/esm/models/operations/updatecustomer.js.map +1 -1
  188. package/dist/esm/models/operations/updatesubscription.d.ts +40 -40
  189. package/dist/esm/models/operations/updatesubscription.d.ts.map +1 -1
  190. package/dist/esm/models/operations/updatesubscription.js +40 -50
  191. package/dist/esm/models/operations/updatesubscription.js.map +1 -1
  192. package/docs/sdks/delayedrouting/README.md +4 -0
  193. package/docs/sdks/subscriptions/README.md +5 -4
  194. package/examples/package-lock.json +1 -1
  195. package/jsr.json +1 -1
  196. package/package.json +1 -1
  197. package/src/funcs/delayedRoutingList.ts +6 -1
  198. package/src/funcs/subscriptionsAll.ts +17 -8
  199. package/src/lib/config.ts +2 -2
  200. package/src/mcp-server/mcp-server.ts +1 -1
  201. package/src/mcp-server/server.ts +1 -1
  202. package/src/models/errors/listallsubscriptions.ts +173 -23
  203. package/src/models/operations/cancelsubscription.ts +80 -98
  204. package/src/models/operations/createcustomer.ts +45 -53
  205. package/src/models/operations/createmandate.ts +52 -54
  206. package/src/models/operations/createrefund.ts +15 -17
  207. package/src/models/operations/createsubscription.ts +89 -104
  208. package/src/models/operations/getcustomer.ts +56 -63
  209. package/src/models/operations/getmandate.ts +52 -53
  210. package/src/models/operations/getrefund.ts +15 -15
  211. package/src/models/operations/getsubscription.ts +80 -98
  212. package/src/models/operations/listallrefunds.ts +17 -25
  213. package/src/models/operations/listallsubscriptions.ts +894 -4395
  214. package/src/models/operations/listcustomers.ts +44 -49
  215. package/src/models/operations/listmandates.ts +52 -52
  216. package/src/models/operations/listrefunds.ts +15 -17
  217. package/src/models/operations/listsettlementrefunds.ts +15 -15
  218. package/src/models/operations/listsubscriptions.ts +181 -176
  219. package/src/models/operations/paymentcreateroute.ts +13 -0
  220. package/src/models/operations/paymentlistroutes.ts +13 -0
  221. package/src/models/operations/updatecustomer.ts +45 -53
  222. package/src/models/operations/updatesubscription.ts +81 -97
@@ -167,8 +167,8 @@ export type CancelSubscriptionApplicationFee = {
167
167
  /**
168
168
  * In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
169
169
  */
170
- amount?: CancelSubscriptionApplicationFeeAmount | undefined;
171
- description?: string | undefined;
170
+ amount: CancelSubscriptionApplicationFeeAmount;
171
+ description: string;
172
172
  };
173
173
 
174
174
  export type CancelSubscriptionMetadata = {};
@@ -281,11 +281,11 @@ export type CancelSubscriptionLinks = {
281
281
  /**
282
282
  * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
283
283
  */
284
- self?: CancelSubscriptionSelf | undefined;
284
+ self: CancelSubscriptionSelf;
285
285
  /**
286
286
  * The API resource URL of the [customer](get-customer) this subscription was created for.
287
287
  */
288
- customer?: CancelSubscriptionCustomer | null | undefined;
288
+ customer: CancelSubscriptionCustomer | null;
289
289
  /**
290
290
  * The API resource URL of the [mandate](get-mandate) this subscription was created for.
291
291
  */
@@ -293,7 +293,7 @@ export type CancelSubscriptionLinks = {
293
293
  /**
294
294
  * The API resource URL of the [profile](get-profile) this subscription was created for.
295
295
  */
296
- profile?: CancelSubscriptionProfile | null | undefined;
296
+ profile: CancelSubscriptionProfile | null;
297
297
  /**
298
298
  * The API resource URL of the [payments](list-payments) created for this subscription. Omitted if no such
299
299
  *
@@ -304,7 +304,7 @@ export type CancelSubscriptionLinks = {
304
304
  /**
305
305
  * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
306
306
  */
307
- documentation?: CancelSubscriptionDocumentation | undefined;
307
+ documentation: CancelSubscriptionDocumentation;
308
308
  };
309
309
 
310
310
  /**
@@ -324,25 +324,25 @@ export type CancelSubscriptionResponse = {
324
324
  /**
325
325
  * The identifier uniquely referring to this subscription. Example: `sub_rVKGtNd6s3`.
326
326
  */
327
- id?: string | undefined;
327
+ id: string;
328
328
  /**
329
329
  * Whether this entity was created in live mode or in test mode.
330
330
  */
331
- mode?: CancelSubscriptionMode | undefined;
331
+ mode: CancelSubscriptionMode;
332
332
  /**
333
333
  * The subscription's current status is directly related to the status of the underlying customer or mandate that is
334
334
  *
335
335
  * @remarks
336
336
  * enabling the subscription.
337
337
  */
338
- status?: CancelSubscriptionStatus | undefined;
338
+ status: CancelSubscriptionStatus;
339
339
  /**
340
340
  * The amount for each individual payment that is charged with this subscription. For example, for a monthly
341
341
  *
342
342
  * @remarks
343
343
  * subscription of €10, the subscription amount should be set to €10.
344
344
  */
345
- amount?: CancelSubscriptionAmount | undefined;
345
+ amount: CancelSubscriptionAmount;
346
346
  /**
347
347
  * Total number of payments for the subscription. Once this number of payments is reached, the subscription is
348
348
  *
@@ -351,11 +351,11 @@ export type CancelSubscriptionResponse = {
351
351
  *
352
352
  * Test mode subscriptions will get canceled automatically after 10 payments.
353
353
  */
354
- times?: number | null | undefined;
354
+ times: number | null;
355
355
  /**
356
356
  * Number of payments left for the subscription.
357
357
  */
358
- timesRemaining?: number | undefined;
358
+ timesRemaining: number;
359
359
  /**
360
360
  * Interval to wait between payments, for example `1 month` or `14 days`.
361
361
  *
@@ -363,11 +363,11 @@ export type CancelSubscriptionResponse = {
363
363
  *
364
364
  * The maximum interval is one year (`12 months`, `52 weeks`, or `365 days`).
365
365
  */
366
- interval?: CancelSubscriptionInterval | undefined;
366
+ interval: CancelSubscriptionInterval;
367
367
  /**
368
368
  * The start date of the subscription in `YYYY-MM-DD` format.
369
369
  */
370
- startDate?: string | undefined;
370
+ startDate: string;
371
371
  /**
372
372
  * The date of the next scheduled payment in `YYYY-MM-DD` format. If the subscription has been completed or canceled,
373
373
  *
@@ -383,11 +383,11 @@ export type CancelSubscriptionResponse = {
383
383
  *
384
384
  * **Please note:** the description needs to be unique for the Customer in case it has multiple active subscriptions.
385
385
  */
386
- description?: string | undefined;
386
+ description: string;
387
387
  /**
388
388
  * The payment method used for this subscription. If omitted, any of the customer's valid mandates may be used.
389
389
  */
390
- method?: CancelSubscriptionMethod | null | undefined;
390
+ method: CancelSubscriptionMethod | null;
391
391
  /**
392
392
  * With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie
393
393
  *
@@ -409,12 +409,7 @@ export type CancelSubscriptionResponse = {
409
409
  *
410
410
  * Any metadata added to the subscription will be automatically forwarded to the payments generated for it.
411
411
  */
412
- metadata?:
413
- | CancelSubscriptionMetadata
414
- | string
415
- | Array<string>
416
- | null
417
- | undefined;
412
+ metadata: CancelSubscriptionMetadata | string | Array<string> | null;
418
413
  /**
419
414
  * We will call this URL for any payment status changes of payments resulting from this subscription.
420
415
  *
@@ -423,11 +418,11 @@ export type CancelSubscriptionResponse = {
423
418
  * This webhook will receive **all** events for the subscription's payments. This may include payment failures as
424
419
  * well. Be sure to verify the payment's subscription ID and its status.
425
420
  */
426
- webhookUrl?: string | undefined;
421
+ webhookUrl: string;
427
422
  /**
428
423
  * The customer this subscription belongs to.
429
424
  */
430
- customerId?: string | undefined;
425
+ customerId: string;
431
426
  /**
432
427
  * The mandate used for this subscription, if any.
433
428
  */
@@ -435,7 +430,7 @@ export type CancelSubscriptionResponse = {
435
430
  /**
436
431
  * The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
437
432
  */
438
- createdAt?: string | undefined;
433
+ createdAt: string;
439
434
  /**
440
435
  * The subscription's date and time of cancellation, in ISO 8601 format. This parameter is omitted if the
441
436
  *
@@ -913,15 +908,14 @@ export const CancelSubscriptionApplicationFee$inboundSchema: z.ZodType<
913
908
  z.ZodTypeDef,
914
909
  unknown
915
910
  > = z.object({
916
- amount: z.lazy(() => CancelSubscriptionApplicationFeeAmount$inboundSchema)
917
- .optional(),
918
- description: z.string().optional(),
911
+ amount: z.lazy(() => CancelSubscriptionApplicationFeeAmount$inboundSchema),
912
+ description: z.string(),
919
913
  });
920
914
 
921
915
  /** @internal */
922
916
  export type CancelSubscriptionApplicationFee$Outbound = {
923
- amount?: CancelSubscriptionApplicationFeeAmount$Outbound | undefined;
924
- description?: string | undefined;
917
+ amount: CancelSubscriptionApplicationFeeAmount$Outbound;
918
+ description: string;
925
919
  };
926
920
 
927
921
  /** @internal */
@@ -930,9 +924,8 @@ export const CancelSubscriptionApplicationFee$outboundSchema: z.ZodType<
930
924
  z.ZodTypeDef,
931
925
  CancelSubscriptionApplicationFee
932
926
  > = z.object({
933
- amount: z.lazy(() => CancelSubscriptionApplicationFeeAmount$outboundSchema)
934
- .optional(),
935
- description: z.string().optional(),
927
+ amount: z.lazy(() => CancelSubscriptionApplicationFeeAmount$outboundSchema),
928
+ description: z.string(),
936
929
  });
937
930
 
938
931
  /**
@@ -1427,27 +1420,24 @@ export const CancelSubscriptionLinks$inboundSchema: z.ZodType<
1427
1420
  z.ZodTypeDef,
1428
1421
  unknown
1429
1422
  > = z.object({
1430
- self: z.lazy(() => CancelSubscriptionSelf$inboundSchema).optional(),
1431
- customer: z.nullable(z.lazy(() => CancelSubscriptionCustomer$inboundSchema))
1432
- .optional(),
1423
+ self: z.lazy(() => CancelSubscriptionSelf$inboundSchema),
1424
+ customer: z.nullable(z.lazy(() => CancelSubscriptionCustomer$inboundSchema)),
1433
1425
  mandate: z.nullable(z.lazy(() => CancelSubscriptionMandate$inboundSchema))
1434
1426
  .optional(),
1435
- profile: z.nullable(z.lazy(() => CancelSubscriptionProfile$inboundSchema))
1436
- .optional(),
1427
+ profile: z.nullable(z.lazy(() => CancelSubscriptionProfile$inboundSchema)),
1437
1428
  payments: z.nullable(z.lazy(() => CancelSubscriptionPayments$inboundSchema))
1438
1429
  .optional(),
1439
- documentation: z.lazy(() => CancelSubscriptionDocumentation$inboundSchema)
1440
- .optional(),
1430
+ documentation: z.lazy(() => CancelSubscriptionDocumentation$inboundSchema),
1441
1431
  });
1442
1432
 
1443
1433
  /** @internal */
1444
1434
  export type CancelSubscriptionLinks$Outbound = {
1445
- self?: CancelSubscriptionSelf$Outbound | undefined;
1446
- customer?: CancelSubscriptionCustomer$Outbound | null | undefined;
1435
+ self: CancelSubscriptionSelf$Outbound;
1436
+ customer: CancelSubscriptionCustomer$Outbound | null;
1447
1437
  mandate?: CancelSubscriptionMandate$Outbound | null | undefined;
1448
- profile?: CancelSubscriptionProfile$Outbound | null | undefined;
1438
+ profile: CancelSubscriptionProfile$Outbound | null;
1449
1439
  payments?: CancelSubscriptionPayments$Outbound | null | undefined;
1450
- documentation?: CancelSubscriptionDocumentation$Outbound | undefined;
1440
+ documentation: CancelSubscriptionDocumentation$Outbound;
1451
1441
  };
1452
1442
 
1453
1443
  /** @internal */
@@ -1456,17 +1446,14 @@ export const CancelSubscriptionLinks$outboundSchema: z.ZodType<
1456
1446
  z.ZodTypeDef,
1457
1447
  CancelSubscriptionLinks
1458
1448
  > = z.object({
1459
- self: z.lazy(() => CancelSubscriptionSelf$outboundSchema).optional(),
1460
- customer: z.nullable(z.lazy(() => CancelSubscriptionCustomer$outboundSchema))
1461
- .optional(),
1449
+ self: z.lazy(() => CancelSubscriptionSelf$outboundSchema),
1450
+ customer: z.nullable(z.lazy(() => CancelSubscriptionCustomer$outboundSchema)),
1462
1451
  mandate: z.nullable(z.lazy(() => CancelSubscriptionMandate$outboundSchema))
1463
1452
  .optional(),
1464
- profile: z.nullable(z.lazy(() => CancelSubscriptionProfile$outboundSchema))
1465
- .optional(),
1453
+ profile: z.nullable(z.lazy(() => CancelSubscriptionProfile$outboundSchema)),
1466
1454
  payments: z.nullable(z.lazy(() => CancelSubscriptionPayments$outboundSchema))
1467
1455
  .optional(),
1468
- documentation: z.lazy(() => CancelSubscriptionDocumentation$outboundSchema)
1469
- .optional(),
1456
+ documentation: z.lazy(() => CancelSubscriptionDocumentation$outboundSchema),
1470
1457
  });
1471
1458
 
1472
1459
  /**
@@ -1507,17 +1494,17 @@ export const CancelSubscriptionResponse$inboundSchema: z.ZodType<
1507
1494
  unknown
1508
1495
  > = z.object({
1509
1496
  resource: z.string().default("subscription"),
1510
- id: z.string().optional(),
1511
- mode: CancelSubscriptionMode$inboundSchema.optional(),
1512
- status: CancelSubscriptionStatus$inboundSchema.optional(),
1513
- amount: z.lazy(() => CancelSubscriptionAmount$inboundSchema).optional(),
1514
- times: z.nullable(z.number().int()).optional(),
1515
- timesRemaining: z.number().int().optional(),
1516
- interval: CancelSubscriptionInterval$inboundSchema.optional(),
1517
- startDate: z.string().optional(),
1497
+ id: z.string(),
1498
+ mode: CancelSubscriptionMode$inboundSchema,
1499
+ status: CancelSubscriptionStatus$inboundSchema,
1500
+ amount: z.lazy(() => CancelSubscriptionAmount$inboundSchema),
1501
+ times: z.nullable(z.number().int()),
1502
+ timesRemaining: z.number().int(),
1503
+ interval: CancelSubscriptionInterval$inboundSchema,
1504
+ startDate: z.string(),
1518
1505
  nextPaymentDate: z.nullable(z.string()).optional(),
1519
- description: z.string().optional(),
1520
- method: z.nullable(CancelSubscriptionMethod$inboundSchema).optional(),
1506
+ description: z.string(),
1507
+ method: z.nullable(CancelSubscriptionMethod$inboundSchema),
1521
1508
  applicationFee: z.lazy(() => CancelSubscriptionApplicationFee$inboundSchema)
1522
1509
  .optional(),
1523
1510
  metadata: z.nullable(
@@ -1526,11 +1513,11 @@ export const CancelSubscriptionResponse$inboundSchema: z.ZodType<
1526
1513
  z.string(),
1527
1514
  z.array(z.string()),
1528
1515
  ]),
1529
- ).optional(),
1530
- webhookUrl: z.string().optional(),
1531
- customerId: z.string().optional(),
1516
+ ),
1517
+ webhookUrl: z.string(),
1518
+ customerId: z.string(),
1532
1519
  mandateId: z.nullable(z.string()).optional(),
1533
- createdAt: z.string().optional(),
1520
+ createdAt: z.string(),
1534
1521
  canceledAt: z.nullable(z.string()).optional(),
1535
1522
  _links: z.lazy(() => CancelSubscriptionLinks$inboundSchema).optional(),
1536
1523
  }).transform((v) => {
@@ -1542,28 +1529,23 @@ export const CancelSubscriptionResponse$inboundSchema: z.ZodType<
1542
1529
  /** @internal */
1543
1530
  export type CancelSubscriptionResponse$Outbound = {
1544
1531
  resource: string;
1545
- id?: string | undefined;
1546
- mode?: string | undefined;
1547
- status?: string | undefined;
1548
- amount?: CancelSubscriptionAmount$Outbound | undefined;
1549
- times?: number | null | undefined;
1550
- timesRemaining?: number | undefined;
1551
- interval?: string | undefined;
1552
- startDate?: string | undefined;
1532
+ id: string;
1533
+ mode: string;
1534
+ status: string;
1535
+ amount: CancelSubscriptionAmount$Outbound;
1536
+ times: number | null;
1537
+ timesRemaining: number;
1538
+ interval: string;
1539
+ startDate: string;
1553
1540
  nextPaymentDate?: string | null | undefined;
1554
- description?: string | undefined;
1555
- method?: string | null | undefined;
1541
+ description: string;
1542
+ method: string | null;
1556
1543
  applicationFee?: CancelSubscriptionApplicationFee$Outbound | undefined;
1557
- metadata?:
1558
- | CancelSubscriptionMetadata$Outbound
1559
- | string
1560
- | Array<string>
1561
- | null
1562
- | undefined;
1563
- webhookUrl?: string | undefined;
1564
- customerId?: string | undefined;
1544
+ metadata: CancelSubscriptionMetadata$Outbound | string | Array<string> | null;
1545
+ webhookUrl: string;
1546
+ customerId: string;
1565
1547
  mandateId?: string | null | undefined;
1566
- createdAt?: string | undefined;
1548
+ createdAt: string;
1567
1549
  canceledAt?: string | null | undefined;
1568
1550
  _links?: CancelSubscriptionLinks$Outbound | undefined;
1569
1551
  };
@@ -1575,17 +1557,17 @@ export const CancelSubscriptionResponse$outboundSchema: z.ZodType<
1575
1557
  CancelSubscriptionResponse
1576
1558
  > = z.object({
1577
1559
  resource: z.string().default("subscription"),
1578
- id: z.string().optional(),
1579
- mode: CancelSubscriptionMode$outboundSchema.optional(),
1580
- status: CancelSubscriptionStatus$outboundSchema.optional(),
1581
- amount: z.lazy(() => CancelSubscriptionAmount$outboundSchema).optional(),
1582
- times: z.nullable(z.number().int()).optional(),
1583
- timesRemaining: z.number().int().optional(),
1584
- interval: CancelSubscriptionInterval$outboundSchema.optional(),
1585
- startDate: z.string().optional(),
1560
+ id: z.string(),
1561
+ mode: CancelSubscriptionMode$outboundSchema,
1562
+ status: CancelSubscriptionStatus$outboundSchema,
1563
+ amount: z.lazy(() => CancelSubscriptionAmount$outboundSchema),
1564
+ times: z.nullable(z.number().int()),
1565
+ timesRemaining: z.number().int(),
1566
+ interval: CancelSubscriptionInterval$outboundSchema,
1567
+ startDate: z.string(),
1586
1568
  nextPaymentDate: z.nullable(z.string()).optional(),
1587
- description: z.string().optional(),
1588
- method: z.nullable(CancelSubscriptionMethod$outboundSchema).optional(),
1569
+ description: z.string(),
1570
+ method: z.nullable(CancelSubscriptionMethod$outboundSchema),
1589
1571
  applicationFee: z.lazy(() => CancelSubscriptionApplicationFee$outboundSchema)
1590
1572
  .optional(),
1591
1573
  metadata: z.nullable(
@@ -1594,11 +1576,11 @@ export const CancelSubscriptionResponse$outboundSchema: z.ZodType<
1594
1576
  z.string(),
1595
1577
  z.array(z.string()),
1596
1578
  ]),
1597
- ).optional(),
1598
- webhookUrl: z.string().optional(),
1599
- customerId: z.string().optional(),
1579
+ ),
1580
+ webhookUrl: z.string(),
1581
+ customerId: z.string(),
1600
1582
  mandateId: z.nullable(z.string()).optional(),
1601
- createdAt: z.string().optional(),
1583
+ createdAt: z.string(),
1602
1584
  canceledAt: z.nullable(z.string()).optional(),
1603
1585
  links: z.lazy(() => CancelSubscriptionLinks$outboundSchema).optional(),
1604
1586
  }).transform((v) => {
@@ -282,11 +282,11 @@ export type CreateCustomerLinks = {
282
282
  /**
283
283
  * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
284
284
  */
285
- self?: CreateCustomerSelf | undefined;
285
+ self: CreateCustomerSelf;
286
286
  /**
287
287
  * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
288
288
  */
289
- dashboard?: CreateCustomerDashboard | undefined;
289
+ dashboard: CreateCustomerDashboard;
290
290
  /**
291
291
  * The API resource URL of the [payments](list-payments) linked to this customer. Omitted if no such payments
292
292
  *
@@ -311,7 +311,7 @@ export type CreateCustomerLinks = {
311
311
  /**
312
312
  * In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
313
313
  */
314
- documentation?: CreateCustomerDocumentation | undefined;
314
+ documentation: CreateCustomerDocumentation;
315
315
  };
316
316
 
317
317
  /**
@@ -325,46 +325,41 @@ export type CreateCustomerResponse = {
325
325
  /**
326
326
  * The identifier uniquely referring to this customer. Example: `cst_vsKJpSsabw`.
327
327
  */
328
- id?: string | undefined;
328
+ id: string;
329
329
  /**
330
330
  * Whether this entity was created in live mode or in test mode.
331
331
  */
332
- mode?: CreateCustomerMode | undefined;
332
+ mode: CreateCustomerMode;
333
333
  /**
334
334
  * The full name of the customer.
335
335
  */
336
- name?: string | null | undefined;
336
+ name: string | null;
337
337
  /**
338
338
  * The email address of the customer.
339
339
  */
340
- email?: string | null | undefined;
340
+ email: string | null;
341
341
  /**
342
342
  * Preconfigure the language to be used in the hosted payment pages shown to the customer. Should only be provided if
343
343
  *
344
344
  * @remarks
345
345
  * absolutely necessary. If not provided, the browser language will be used which is typically highly accurate.
346
346
  */
347
- locale?: CreateCustomerLocaleResponse | null | undefined;
347
+ locale: CreateCustomerLocaleResponse | null;
348
348
  /**
349
349
  * Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever
350
350
  *
351
351
  * @remarks
352
352
  * you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
353
353
  */
354
- metadata?:
355
- | CreateCustomerMetadataResponse
356
- | string
357
- | Array<string>
358
- | null
359
- | undefined;
354
+ metadata: CreateCustomerMetadataResponse | string | Array<string> | null;
360
355
  /**
361
356
  * The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
362
357
  */
363
- createdAt?: string | undefined;
358
+ createdAt: string;
364
359
  /**
365
360
  * An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
366
361
  */
367
- links?: CreateCustomerLinks | undefined;
362
+ links: CreateCustomerLinks;
368
363
  };
369
364
 
370
365
  /** @internal */
@@ -1214,8 +1209,8 @@ export const CreateCustomerLinks$inboundSchema: z.ZodType<
1214
1209
  z.ZodTypeDef,
1215
1210
  unknown
1216
1211
  > = z.object({
1217
- self: z.lazy(() => CreateCustomerSelf$inboundSchema).optional(),
1218
- dashboard: z.lazy(() => CreateCustomerDashboard$inboundSchema).optional(),
1212
+ self: z.lazy(() => CreateCustomerSelf$inboundSchema),
1213
+ dashboard: z.lazy(() => CreateCustomerDashboard$inboundSchema),
1219
1214
  payments: z.nullable(z.lazy(() => CreateCustomerPayments$inboundSchema))
1220
1215
  .optional(),
1221
1216
  mandates: z.nullable(z.lazy(() => CreateCustomerMandates$inboundSchema))
@@ -1223,18 +1218,17 @@ export const CreateCustomerLinks$inboundSchema: z.ZodType<
1223
1218
  subscriptions: z.nullable(
1224
1219
  z.lazy(() => CreateCustomerSubscriptions$inboundSchema),
1225
1220
  ).optional(),
1226
- documentation: z.lazy(() => CreateCustomerDocumentation$inboundSchema)
1227
- .optional(),
1221
+ documentation: z.lazy(() => CreateCustomerDocumentation$inboundSchema),
1228
1222
  });
1229
1223
 
1230
1224
  /** @internal */
1231
1225
  export type CreateCustomerLinks$Outbound = {
1232
- self?: CreateCustomerSelf$Outbound | undefined;
1233
- dashboard?: CreateCustomerDashboard$Outbound | undefined;
1226
+ self: CreateCustomerSelf$Outbound;
1227
+ dashboard: CreateCustomerDashboard$Outbound;
1234
1228
  payments?: CreateCustomerPayments$Outbound | null | undefined;
1235
1229
  mandates?: CreateCustomerMandates$Outbound | null | undefined;
1236
1230
  subscriptions?: CreateCustomerSubscriptions$Outbound | null | undefined;
1237
- documentation?: CreateCustomerDocumentation$Outbound | undefined;
1231
+ documentation: CreateCustomerDocumentation$Outbound;
1238
1232
  };
1239
1233
 
1240
1234
  /** @internal */
@@ -1243,8 +1237,8 @@ export const CreateCustomerLinks$outboundSchema: z.ZodType<
1243
1237
  z.ZodTypeDef,
1244
1238
  CreateCustomerLinks
1245
1239
  > = z.object({
1246
- self: z.lazy(() => CreateCustomerSelf$outboundSchema).optional(),
1247
- dashboard: z.lazy(() => CreateCustomerDashboard$outboundSchema).optional(),
1240
+ self: z.lazy(() => CreateCustomerSelf$outboundSchema),
1241
+ dashboard: z.lazy(() => CreateCustomerDashboard$outboundSchema),
1248
1242
  payments: z.nullable(z.lazy(() => CreateCustomerPayments$outboundSchema))
1249
1243
  .optional(),
1250
1244
  mandates: z.nullable(z.lazy(() => CreateCustomerMandates$outboundSchema))
@@ -1252,8 +1246,7 @@ export const CreateCustomerLinks$outboundSchema: z.ZodType<
1252
1246
  subscriptions: z.nullable(
1253
1247
  z.lazy(() => CreateCustomerSubscriptions$outboundSchema),
1254
1248
  ).optional(),
1255
- documentation: z.lazy(() => CreateCustomerDocumentation$outboundSchema)
1256
- .optional(),
1249
+ documentation: z.lazy(() => CreateCustomerDocumentation$outboundSchema),
1257
1250
  });
1258
1251
 
1259
1252
  /**
@@ -1294,20 +1287,20 @@ export const CreateCustomerResponse$inboundSchema: z.ZodType<
1294
1287
  unknown
1295
1288
  > = z.object({
1296
1289
  resource: z.string().default("customer"),
1297
- id: z.string().optional(),
1298
- mode: CreateCustomerMode$inboundSchema.optional(),
1299
- name: z.nullable(z.string()).optional(),
1300
- email: z.nullable(z.string()).optional(),
1301
- locale: z.nullable(CreateCustomerLocaleResponse$inboundSchema).optional(),
1290
+ id: z.string(),
1291
+ mode: CreateCustomerMode$inboundSchema,
1292
+ name: z.nullable(z.string()),
1293
+ email: z.nullable(z.string()),
1294
+ locale: z.nullable(CreateCustomerLocaleResponse$inboundSchema),
1302
1295
  metadata: z.nullable(
1303
1296
  z.union([
1304
1297
  z.lazy(() => CreateCustomerMetadataResponse$inboundSchema),
1305
1298
  z.string(),
1306
1299
  z.array(z.string()),
1307
1300
  ]),
1308
- ).optional(),
1309
- createdAt: z.string().optional(),
1310
- _links: z.lazy(() => CreateCustomerLinks$inboundSchema).optional(),
1301
+ ),
1302
+ createdAt: z.string(),
1303
+ _links: z.lazy(() => CreateCustomerLinks$inboundSchema),
1311
1304
  }).transform((v) => {
1312
1305
  return remap$(v, {
1313
1306
  "_links": "links",
@@ -1317,19 +1310,18 @@ export const CreateCustomerResponse$inboundSchema: z.ZodType<
1317
1310
  /** @internal */
1318
1311
  export type CreateCustomerResponse$Outbound = {
1319
1312
  resource: string;
1320
- id?: string | undefined;
1321
- mode?: string | undefined;
1322
- name?: string | null | undefined;
1323
- email?: string | null | undefined;
1324
- locale?: string | null | undefined;
1325
- metadata?:
1313
+ id: string;
1314
+ mode: string;
1315
+ name: string | null;
1316
+ email: string | null;
1317
+ locale: string | null;
1318
+ metadata:
1326
1319
  | CreateCustomerMetadataResponse$Outbound
1327
1320
  | string
1328
1321
  | Array<string>
1329
- | null
1330
- | undefined;
1331
- createdAt?: string | undefined;
1332
- _links?: CreateCustomerLinks$Outbound | undefined;
1322
+ | null;
1323
+ createdAt: string;
1324
+ _links: CreateCustomerLinks$Outbound;
1333
1325
  };
1334
1326
 
1335
1327
  /** @internal */
@@ -1339,20 +1331,20 @@ export const CreateCustomerResponse$outboundSchema: z.ZodType<
1339
1331
  CreateCustomerResponse
1340
1332
  > = z.object({
1341
1333
  resource: z.string().default("customer"),
1342
- id: z.string().optional(),
1343
- mode: CreateCustomerMode$outboundSchema.optional(),
1344
- name: z.nullable(z.string()).optional(),
1345
- email: z.nullable(z.string()).optional(),
1346
- locale: z.nullable(CreateCustomerLocaleResponse$outboundSchema).optional(),
1334
+ id: z.string(),
1335
+ mode: CreateCustomerMode$outboundSchema,
1336
+ name: z.nullable(z.string()),
1337
+ email: z.nullable(z.string()),
1338
+ locale: z.nullable(CreateCustomerLocaleResponse$outboundSchema),
1347
1339
  metadata: z.nullable(
1348
1340
  z.union([
1349
1341
  z.lazy(() => CreateCustomerMetadataResponse$outboundSchema),
1350
1342
  z.string(),
1351
1343
  z.array(z.string()),
1352
1344
  ]),
1353
- ).optional(),
1354
- createdAt: z.string().optional(),
1355
- links: z.lazy(() => CreateCustomerLinks$outboundSchema).optional(),
1345
+ ),
1346
+ createdAt: z.string(),
1347
+ links: z.lazy(() => CreateCustomerLinks$outboundSchema),
1356
1348
  }).transform((v) => {
1357
1349
  return remap$(v, {
1358
1350
  links: "_links",