chargebee 3.34.0 → 3.35.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 (118) hide show
  1. package/CHANGELOG.md +172 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +174 -2
  4. package/cjs/resources/webhook/eventType.js +23 -1
  5. package/cjs/schema/business_entity.schema.js +28 -2
  6. package/cjs/schema/collections_payment_promise.schema.js +43 -0
  7. package/cjs/schema/comment.schema.js +2 -0
  8. package/cjs/schema/coupon.schema.js +1 -1
  9. package/cjs/schema/credit_note.schema.js +1 -0
  10. package/cjs/schema/credit_unit.schema.js +2 -2
  11. package/cjs/schema/einvoice.schema.js +2 -2
  12. package/cjs/schema/entitlement.schema.js +4 -4
  13. package/cjs/schema/estimate.schema.js +4 -4
  14. package/cjs/schema/event.schema.js +104 -4
  15. package/cjs/schema/export.schema.js +7 -7
  16. package/cjs/schema/hosted_page.schema.js +2 -2
  17. package/cjs/schema/index.js +3 -0
  18. package/cjs/schema/invoice.schema.js +24 -4
  19. package/cjs/schema/item.schema.js +1 -1
  20. package/cjs/schema/item_family.schema.js +1 -1
  21. package/cjs/schema/item_price.schema.js +1 -1
  22. package/cjs/schema/ledger_account_balance.schema.js +11 -2
  23. package/cjs/schema/ledger_operation.schema.js +2 -2
  24. package/cjs/schema/omnichannel_one_time_order.schema.js +12 -4
  25. package/cjs/schema/omnichannel_subscription.schema.js +18 -10
  26. package/cjs/schema/payment_source.schema.js +15 -0
  27. package/cjs/schema/price_ramp.schema.js +88 -0
  28. package/cjs/schema/price_variant.schema.js +1 -1
  29. package/cjs/schema/purchase.schema.js +6 -0
  30. package/cjs/schema/quote.schema.js +6 -6
  31. package/cjs/schema/ramp.schema.js +10 -6
  32. package/cjs/schema/retry_segment.schema.js +12 -0
  33. package/cjs/schema/subscription.schema.js +4 -4
  34. package/cjs/schema/usage.schema.js +5 -0
  35. package/cjs/schema/usage_summary.schema.js +1 -0
  36. package/cjs/schema/webhook_endpoint.schema.js +46 -2
  37. package/esm/environment.js +1 -1
  38. package/esm/resources/api_endpoints.js +174 -2
  39. package/esm/resources/webhook/eventType.js +23 -1
  40. package/esm/schema/business_entity.schema.js +27 -1
  41. package/esm/schema/collections_payment_promise.schema.js +40 -0
  42. package/esm/schema/comment.schema.js +2 -0
  43. package/esm/schema/coupon.schema.js +1 -1
  44. package/esm/schema/credit_note.schema.js +1 -0
  45. package/esm/schema/credit_unit.schema.js +2 -2
  46. package/esm/schema/einvoice.schema.js +2 -2
  47. package/esm/schema/entitlement.schema.js +4 -4
  48. package/esm/schema/estimate.schema.js +4 -4
  49. package/esm/schema/event.schema.js +104 -4
  50. package/esm/schema/export.schema.js +7 -7
  51. package/esm/schema/hosted_page.schema.js +2 -2
  52. package/esm/schema/index.js +3 -0
  53. package/esm/schema/invoice.schema.js +23 -3
  54. package/esm/schema/item.schema.js +1 -1
  55. package/esm/schema/item_family.schema.js +1 -1
  56. package/esm/schema/item_price.schema.js +1 -1
  57. package/esm/schema/ledger_account_balance.schema.js +10 -1
  58. package/esm/schema/ledger_operation.schema.js +2 -2
  59. package/esm/schema/omnichannel_one_time_order.schema.js +12 -4
  60. package/esm/schema/omnichannel_subscription.schema.js +18 -10
  61. package/esm/schema/payment_source.schema.js +15 -0
  62. package/esm/schema/price_ramp.schema.js +85 -0
  63. package/esm/schema/price_variant.schema.js +1 -1
  64. package/esm/schema/purchase.schema.js +6 -0
  65. package/esm/schema/quote.schema.js +6 -6
  66. package/esm/schema/ramp.schema.js +10 -6
  67. package/esm/schema/retry_segment.schema.js +9 -0
  68. package/esm/schema/subscription.schema.js +4 -4
  69. package/esm/schema/usage.schema.js +5 -0
  70. package/esm/schema/usage_summary.schema.js +1 -0
  71. package/esm/schema/webhook_endpoint.schema.js +46 -2
  72. package/package.json +1 -1
  73. package/types/core.d.ts +53 -68
  74. package/types/index.d.ts +22 -1
  75. package/types/resources/BusinessEntity.d.ts +52 -0
  76. package/types/resources/Citation.d.ts +13 -0
  77. package/types/resources/CollectionsDispute.d.ts +24 -0
  78. package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
  79. package/types/resources/CollectionsReminderSequence.d.ts +35 -0
  80. package/types/resources/Comment.d.ts +2 -1
  81. package/types/resources/Content.d.ts +18 -1
  82. package/types/resources/CreditNote.d.ts +1 -0
  83. package/types/resources/CustomData.d.ts +14 -0
  84. package/types/resources/DraftEstimate.d.ts +13 -0
  85. package/types/resources/DraftRequest.d.ts +45 -0
  86. package/types/resources/EmailAttachment.d.ts +16 -0
  87. package/types/resources/EmailConversation.d.ts +18 -0
  88. package/types/resources/EmailLog.d.ts +1 -0
  89. package/types/resources/EmailMessage.d.ts +40 -0
  90. package/types/resources/Event.d.ts +23 -1
  91. package/types/resources/Execution.d.ts +12 -0
  92. package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
  93. package/types/resources/GroupByAttribute.d.ts +15 -0
  94. package/types/resources/GroupByRecommendation.d.ts +10 -0
  95. package/types/resources/Invoice.d.ts +15 -0
  96. package/types/resources/ItemPrice.d.ts +1 -0
  97. package/types/resources/LedgerAccountBalance.d.ts +19 -0
  98. package/types/resources/Meter.d.ts +1 -0
  99. package/types/resources/MeteredFeature.d.ts +1 -0
  100. package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
  101. package/types/resources/OmnichannelSubscription.d.ts +6 -1
  102. package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
  103. package/types/resources/PaymentSchedule.d.ts +1 -1
  104. package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
  105. package/types/resources/PaymentSource.d.ts +19 -0
  106. package/types/resources/PreferenceVariant.d.ts +10 -0
  107. package/types/resources/PriceRamp.d.ts +113 -0
  108. package/types/resources/PrivateNote.d.ts +18 -0
  109. package/types/resources/Purchase.d.ts +6 -0
  110. package/types/resources/Ramp.d.ts +6 -0
  111. package/types/resources/RampInterval.d.ts +12 -0
  112. package/types/resources/RecordedPurchase.d.ts +5 -1
  113. package/types/resources/RetrySegment.d.ts +36 -0
  114. package/types/resources/Transaction.d.ts +4 -0
  115. package/types/resources/Usage.d.ts +6 -0
  116. package/types/resources/UsageSummary.d.ts +2 -0
  117. package/types/resources/WebhookEvent.d.ts +149 -5
  118. package/types/resources/AppliedBusinessRule.d.ts +0 -15
@@ -131,6 +131,7 @@ const ListEventEventTypeSchema = z.object({
131
131
  'payment_schedules_updated',
132
132
  'payment_schedule_scheme_created',
133
133
  'payment_schedule_scheme_deleted',
134
+ 'payment_schedules_cancelled',
134
135
  'subscription_renewal_reminder',
135
136
  'add_usages_reminder',
136
137
  'payment_due_reminder',
@@ -141,6 +142,7 @@ const ListEventEventTypeSchema = z.object({
141
142
  'payment_failed',
142
143
  'dunning_updated',
143
144
  'payment_refunded',
145
+ 'refund_failed',
144
146
  'payment_initiated',
145
147
  'refund_initiated',
146
148
  'netd_payment_due_reminder',
@@ -292,6 +294,9 @@ const ListEventEventTypeSchema = z.object({
292
294
  'alert_status_changed',
293
295
  'omnichannel_subscription_item_updated',
294
296
  'omnichannel_subscription_item_recovered',
297
+ 'price_ramp_created',
298
+ 'price_ramp_updated',
299
+ 'price_ramp_deleted',
295
300
  'omnichannel_subscription_item_mrr_updated',
296
301
  'ledger_account_balance_updated',
297
302
  'grant_blocks_created',
@@ -306,12 +311,29 @@ const ListEventEventTypeSchema = z.object({
306
311
  'vault_token_created',
307
312
  'vault_token_updated',
308
313
  'vault_token_deleted',
309
- 'business_rules_applied',
314
+ 'chargeback_initiated',
315
+ 'chargeback_won',
316
+ 'chargeback_lost',
310
317
  'business_ruleset_created',
311
318
  'business_ruleset_updated',
312
319
  'business_ruleset_activated',
313
320
  'business_ruleset_deactivated',
314
321
  'business_ruleset_deleted',
322
+ 'collections_reminder_sequence_created',
323
+ 'collections_reminder_sequence_paused',
324
+ 'collections_reminder_sequence_resumed',
325
+ 'collections_reminder_sequence_completed',
326
+ 'collections_payment_promise_created',
327
+ 'collections_payment_promise_updated',
328
+ 'collections_payment_promise_fulfilled',
329
+ 'collections_payment_promise_cancelled',
330
+ 'collections_payment_promise_broken',
331
+ 'collections_dispute_created',
332
+ 'collections_dispute_updated',
333
+ 'collections_dispute_resolved',
334
+ 'collections_dispute_withdrawn',
335
+ 'email_message_received',
336
+ 'private_note_added',
315
337
  ])
316
338
  .optional(),
317
339
  is_not: z
@@ -380,6 +402,7 @@ const ListEventEventTypeSchema = z.object({
380
402
  'payment_schedules_updated',
381
403
  'payment_schedule_scheme_created',
382
404
  'payment_schedule_scheme_deleted',
405
+ 'payment_schedules_cancelled',
383
406
  'subscription_renewal_reminder',
384
407
  'add_usages_reminder',
385
408
  'payment_due_reminder',
@@ -390,6 +413,7 @@ const ListEventEventTypeSchema = z.object({
390
413
  'payment_failed',
391
414
  'dunning_updated',
392
415
  'payment_refunded',
416
+ 'refund_failed',
393
417
  'payment_initiated',
394
418
  'refund_initiated',
395
419
  'netd_payment_due_reminder',
@@ -541,6 +565,9 @@ const ListEventEventTypeSchema = z.object({
541
565
  'alert_status_changed',
542
566
  'omnichannel_subscription_item_updated',
543
567
  'omnichannel_subscription_item_recovered',
568
+ 'price_ramp_created',
569
+ 'price_ramp_updated',
570
+ 'price_ramp_deleted',
544
571
  'omnichannel_subscription_item_mrr_updated',
545
572
  'ledger_account_balance_updated',
546
573
  'grant_blocks_created',
@@ -555,12 +582,29 @@ const ListEventEventTypeSchema = z.object({
555
582
  'vault_token_created',
556
583
  'vault_token_updated',
557
584
  'vault_token_deleted',
558
- 'business_rules_applied',
585
+ 'chargeback_initiated',
586
+ 'chargeback_won',
587
+ 'chargeback_lost',
559
588
  'business_ruleset_created',
560
589
  'business_ruleset_updated',
561
590
  'business_ruleset_activated',
562
591
  'business_ruleset_deactivated',
563
592
  'business_ruleset_deleted',
593
+ 'collections_reminder_sequence_created',
594
+ 'collections_reminder_sequence_paused',
595
+ 'collections_reminder_sequence_resumed',
596
+ 'collections_reminder_sequence_completed',
597
+ 'collections_payment_promise_created',
598
+ 'collections_payment_promise_updated',
599
+ 'collections_payment_promise_fulfilled',
600
+ 'collections_payment_promise_cancelled',
601
+ 'collections_payment_promise_broken',
602
+ 'collections_dispute_created',
603
+ 'collections_dispute_updated',
604
+ 'collections_dispute_resolved',
605
+ 'collections_dispute_withdrawn',
606
+ 'email_message_received',
607
+ 'private_note_added',
564
608
  ])
565
609
  .optional(),
566
610
  in: z
@@ -629,6 +673,7 @@ const ListEventEventTypeSchema = z.object({
629
673
  'payment_schedules_updated',
630
674
  'payment_schedule_scheme_created',
631
675
  'payment_schedule_scheme_deleted',
676
+ 'payment_schedules_cancelled',
632
677
  'subscription_renewal_reminder',
633
678
  'add_usages_reminder',
634
679
  'payment_due_reminder',
@@ -639,6 +684,7 @@ const ListEventEventTypeSchema = z.object({
639
684
  'payment_failed',
640
685
  'dunning_updated',
641
686
  'payment_refunded',
687
+ 'refund_failed',
642
688
  'payment_initiated',
643
689
  'refund_initiated',
644
690
  'netd_payment_due_reminder',
@@ -790,6 +836,9 @@ const ListEventEventTypeSchema = z.object({
790
836
  'alert_status_changed',
791
837
  'omnichannel_subscription_item_updated',
792
838
  'omnichannel_subscription_item_recovered',
839
+ 'price_ramp_created',
840
+ 'price_ramp_updated',
841
+ 'price_ramp_deleted',
793
842
  'omnichannel_subscription_item_mrr_updated',
794
843
  'ledger_account_balance_updated',
795
844
  'grant_blocks_created',
@@ -804,12 +853,29 @@ const ListEventEventTypeSchema = z.object({
804
853
  'vault_token_created',
805
854
  'vault_token_updated',
806
855
  'vault_token_deleted',
807
- 'business_rules_applied',
856
+ 'chargeback_initiated',
857
+ 'chargeback_won',
858
+ 'chargeback_lost',
808
859
  'business_ruleset_created',
809
860
  'business_ruleset_updated',
810
861
  'business_ruleset_activated',
811
862
  'business_ruleset_deactivated',
812
863
  'business_ruleset_deleted',
864
+ 'collections_reminder_sequence_created',
865
+ 'collections_reminder_sequence_paused',
866
+ 'collections_reminder_sequence_resumed',
867
+ 'collections_reminder_sequence_completed',
868
+ 'collections_payment_promise_created',
869
+ 'collections_payment_promise_updated',
870
+ 'collections_payment_promise_fulfilled',
871
+ 'collections_payment_promise_cancelled',
872
+ 'collections_payment_promise_broken',
873
+ 'collections_dispute_created',
874
+ 'collections_dispute_updated',
875
+ 'collections_dispute_resolved',
876
+ 'collections_dispute_withdrawn',
877
+ 'email_message_received',
878
+ 'private_note_added',
813
879
  ])
814
880
  .optional(),
815
881
  not_in: z
@@ -878,6 +944,7 @@ const ListEventEventTypeSchema = z.object({
878
944
  'payment_schedules_updated',
879
945
  'payment_schedule_scheme_created',
880
946
  'payment_schedule_scheme_deleted',
947
+ 'payment_schedules_cancelled',
881
948
  'subscription_renewal_reminder',
882
949
  'add_usages_reminder',
883
950
  'payment_due_reminder',
@@ -888,6 +955,7 @@ const ListEventEventTypeSchema = z.object({
888
955
  'payment_failed',
889
956
  'dunning_updated',
890
957
  'payment_refunded',
958
+ 'refund_failed',
891
959
  'payment_initiated',
892
960
  'refund_initiated',
893
961
  'netd_payment_due_reminder',
@@ -1039,6 +1107,9 @@ const ListEventEventTypeSchema = z.object({
1039
1107
  'alert_status_changed',
1040
1108
  'omnichannel_subscription_item_updated',
1041
1109
  'omnichannel_subscription_item_recovered',
1110
+ 'price_ramp_created',
1111
+ 'price_ramp_updated',
1112
+ 'price_ramp_deleted',
1042
1113
  'omnichannel_subscription_item_mrr_updated',
1043
1114
  'ledger_account_balance_updated',
1044
1115
  'grant_blocks_created',
@@ -1053,12 +1124,29 @@ const ListEventEventTypeSchema = z.object({
1053
1124
  'vault_token_created',
1054
1125
  'vault_token_updated',
1055
1126
  'vault_token_deleted',
1056
- 'business_rules_applied',
1127
+ 'chargeback_initiated',
1128
+ 'chargeback_won',
1129
+ 'chargeback_lost',
1057
1130
  'business_ruleset_created',
1058
1131
  'business_ruleset_updated',
1059
1132
  'business_ruleset_activated',
1060
1133
  'business_ruleset_deactivated',
1061
1134
  'business_ruleset_deleted',
1135
+ 'collections_reminder_sequence_created',
1136
+ 'collections_reminder_sequence_paused',
1137
+ 'collections_reminder_sequence_resumed',
1138
+ 'collections_reminder_sequence_completed',
1139
+ 'collections_payment_promise_created',
1140
+ 'collections_payment_promise_updated',
1141
+ 'collections_payment_promise_fulfilled',
1142
+ 'collections_payment_promise_cancelled',
1143
+ 'collections_payment_promise_broken',
1144
+ 'collections_dispute_created',
1145
+ 'collections_dispute_updated',
1146
+ 'collections_dispute_resolved',
1147
+ 'collections_dispute_withdrawn',
1148
+ 'email_message_received',
1149
+ 'private_note_added',
1062
1150
  ])
1063
1151
  .optional(),
1064
1152
  });
@@ -1076,6 +1164,9 @@ const ListEventSourceSchema = z.object({
1076
1164
  'migration',
1077
1165
  'bulk_operation',
1078
1166
  'external_service',
1167
+ 'mcp',
1168
+ 'copilot',
1169
+ 'agent',
1079
1170
  ])
1080
1171
  .optional(),
1081
1172
  is_not: z
@@ -1091,6 +1182,9 @@ const ListEventSourceSchema = z.object({
1091
1182
  'migration',
1092
1183
  'bulk_operation',
1093
1184
  'external_service',
1185
+ 'mcp',
1186
+ 'copilot',
1187
+ 'agent',
1094
1188
  ])
1095
1189
  .optional(),
1096
1190
  in: z
@@ -1106,6 +1200,9 @@ const ListEventSourceSchema = z.object({
1106
1200
  'migration',
1107
1201
  'bulk_operation',
1108
1202
  'external_service',
1203
+ 'mcp',
1204
+ 'copilot',
1205
+ 'agent',
1109
1206
  ])
1110
1207
  .optional(),
1111
1208
  not_in: z
@@ -1121,6 +1218,9 @@ const ListEventSourceSchema = z.object({
1121
1218
  'migration',
1122
1219
  'bulk_operation',
1123
1220
  'external_service',
1221
+ 'mcp',
1222
+ 'copilot',
1223
+ 'agent',
1124
1224
  ])
1125
1225
  .optional(),
1126
1226
  });
@@ -1099,8 +1099,8 @@ const CouponsExportCurrencyCodeSchema = z.object({
1099
1099
  not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1100
1100
  });
1101
1101
  const CouponsExportApplicableItemPriceIdsSchema = z.object({
1102
- is: z.string().min(1).optional(),
1103
1102
  in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1103
+ is: z.string().min(1).optional(),
1104
1104
  });
1105
1105
  const CouponsExportIdSchema = z.object({
1106
1106
  is: z.string().min(1).optional(),
@@ -2999,8 +2999,8 @@ const OrdersExportBodySchema = z.looseObject({
2999
2999
  export { OrdersExportBodySchema };
3000
3000
  //Export.itemFamilies
3001
3001
  const ItemFamiliesExportBusinessEntityIdSchema = z.object({
3002
- is: z.string().min(1).optional(),
3003
3002
  is_present: z.enum(['true', 'false']).optional(),
3003
+ is: z.string().min(1).optional(),
3004
3004
  });
3005
3005
  const ItemFamiliesExportIncludeSiteLevelResourcesSchema = z.object({
3006
3006
  is: z.enum(['true', 'false']).optional(),
@@ -3038,8 +3038,8 @@ const ItemFamiliesExportBodySchema = z.looseObject({
3038
3038
  export { ItemFamiliesExportBodySchema };
3039
3039
  //Export.items
3040
3040
  const ItemsExportBusinessEntityIdSchema = z.object({
3041
- is: z.string().min(1).optional(),
3042
3041
  is_present: z.enum(['true', 'false']).optional(),
3042
+ is: z.string().min(1).optional(),
3043
3043
  });
3044
3044
  const ItemsExportIncludeSiteLevelResourcesSchema = z.object({
3045
3045
  is: z.enum(['true', 'false']).optional(),
@@ -3154,8 +3154,8 @@ const ItemPricesExportCurrencyCodeSchema = z.object({
3154
3154
  not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
3155
3155
  });
3156
3156
  const ItemPricesExportBusinessEntityIdSchema = z.object({
3157
- is: z.string().min(1).optional(),
3158
3157
  is_present: z.enum(['true', 'false']).optional(),
3158
+ is: z.string().min(1).optional(),
3159
3159
  });
3160
3160
  const ItemPricesExportIncludeSiteLevelResourcesSchema = z.object({
3161
3161
  is: z.enum(['true', 'false']).optional(),
@@ -3415,8 +3415,8 @@ const DifferentialPricesExportBodySchema = z.looseObject({
3415
3415
  export { DifferentialPricesExportBodySchema };
3416
3416
  //Export.priceVariants
3417
3417
  const PriceVariantsExportBusinessEntityIdSchema = z.object({
3418
- is: z.string().min(1).optional(),
3419
3418
  is_present: z.enum(['true', 'false']).optional(),
3419
+ is: z.string().min(1).optional(),
3420
3420
  });
3421
3421
  const PriceVariantsExportIncludeSiteLevelResourcesSchema = z.object({
3422
3422
  is: z.enum(['true', 'false']).optional(),
@@ -3470,12 +3470,12 @@ const PriceVariantsExportBodySchema = z.looseObject({
3470
3470
  export { PriceVariantsExportBodySchema };
3471
3471
  //Export.ramps
3472
3472
  const RampsExportStatusSchema = z.object({
3473
- is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
3474
3473
  in: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
3474
+ is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
3475
3475
  });
3476
3476
  const RampsExportSubscriptionIdSchema = z.object({
3477
- is: z.string().min(1).optional(),
3478
3477
  in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
3478
+ is: z.string().min(1).optional(),
3479
3479
  });
3480
3480
  const RampsExportEffectiveFromSchema = z.object({
3481
3481
  after: z.string().regex(RegExp('^\\d{10}$')).optional(),
@@ -749,7 +749,7 @@ const CheckoutNewForItemsHostedPageSubscriptionItemsSchema = z.object({
749
749
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
750
750
  trial_end: z.array(z.number().int().optional()).optional(),
751
751
  service_period_days: z
752
- .array(z.number().int().min(1).max(730).optional())
752
+ .array(z.number().int().min(1).max(4000).optional())
753
753
  .optional(),
754
754
  charge_on_event: z
755
755
  .array(z
@@ -1122,7 +1122,7 @@ const CheckoutExistingForItemsHostedPageSubscriptionItemsSchema = z.object({
1122
1122
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
1123
1123
  trial_end: z.array(z.number().int().optional()).optional(),
1124
1124
  service_period_days: z
1125
- .array(z.number().int().min(1).max(730).optional())
1125
+ .array(z.number().int().min(1).max(4000).optional())
1126
1126
  .optional(),
1127
1127
  charge_on_event: z
1128
1128
  .array(z
@@ -8,6 +8,7 @@ export * from './business_entity.schema.js';
8
8
  export * from './business_rule.schema.js';
9
9
  export * from './business_ruleset.schema.js';
10
10
  export * from './card.schema.js';
11
+ export * from './collections_payment_promise.schema.js';
11
12
  export * from './comment.schema.js';
12
13
  export * from './coupon.schema.js';
13
14
  export * from './coupon_code.schema.js';
@@ -55,6 +56,7 @@ export * from './payment_voucher.schema.js';
55
56
  export * from './personalized_offer.schema.js';
56
57
  export * from './plan.schema.js';
57
58
  export * from './portal_session.schema.js';
59
+ export * from './price_ramp.schema.js';
58
60
  export * from './price_variant.schema.js';
59
61
  export * from './pricing_page_session.schema.js';
60
62
  export * from './promotional_credit.schema.js';
@@ -65,6 +67,7 @@ export * from './quote_entitlement.schema.js';
65
67
  export * from './ramp.schema.js';
66
68
  export * from './recorded_purchase.schema.js';
67
69
  export * from './resource_migration.schema.js';
70
+ export * from './retry_segment.schema.js';
68
71
  export * from './site_migration_detail.schema.js';
69
72
  export * from './subscription.schema.js';
70
73
  export * from './subscription_entitlement.schema.js';
@@ -1,5 +1,5 @@
1
1
  // Generated Zod schemas: Invoice
2
- // Actions: create, createForChargeItemsAndCharges, charge, chargeAddon, createForChargeItem, stopDunning, pauseDunning, resumeDunning, importInvoice, applyPayments, deleteLineItems, applyCredits, list, invoicesForCustomer, invoicesForSubscription, retrieve, pdf, listPaymentReferenceNumbers, addCharge, addAddonCharge, addChargeItem, close, collectPayment, recordPayment, recordTaxWithheld, removeTaxWithheld, refund, recordRefund, removePayment, removeCreditNote, voidInvoice, writeOff, voidBeforeCapture, delete, updateDetails, applyPaymentScheduleScheme
2
+ // Actions: create, createForChargeItemsAndCharges, charge, chargeAddon, createForChargeItem, stopDunning, pauseDunning, resumeDunning, importInvoice, applyPayments, deleteLineItems, applyCredits, list, invoicesForCustomer, invoicesForSubscription, retrieve, pdf, listPaymentReferenceNumbers, addCharge, addAddonCharge, addChargeItem, close, collectPayment, recordPayment, recordTaxWithheld, removeTaxWithheld, refund, recordRefund, removePayment, removeCreditNote, voidInvoice, writeOff, voidBeforeCapture, delete, updateDetails, applyPaymentScheduleScheme, removePaymentScheduleScheme
3
3
  // Do not edit manually – regenerate via sdk-generator
4
4
  import { z } from 'zod';
5
5
  //Invoice.create
@@ -1070,6 +1070,21 @@ const ImportInvoiceInvoiceLineItemsSchema = z.object({
1070
1070
  tax10_amount: z.array(z.number().int().min(0).optional()).optional(),
1071
1071
  is_partial_tax_applied: z.array(z.boolean().optional()).optional(),
1072
1072
  taxable_amount: z.array(z.number().int().min(0).optional()).optional(),
1073
+ tax_exempt_reason: z
1074
+ .array(z
1075
+ .enum([
1076
+ 'region_non_taxable',
1077
+ 'export',
1078
+ 'customer_exempt',
1079
+ 'product_exempt',
1080
+ 'zero_rated',
1081
+ 'reverse_charge',
1082
+ 'high_value_physical_goods',
1083
+ 'zero_value_item',
1084
+ 'tax_not_configured_external_provider',
1085
+ ])
1086
+ .optional())
1087
+ .optional(),
1073
1088
  proration_mode: z
1074
1089
  .array(z
1075
1090
  .enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
@@ -1481,12 +1496,12 @@ const PdfInvoiceBodySchema = z.looseObject({
1481
1496
  export { PdfInvoiceBodySchema };
1482
1497
  //Invoice.listPaymentReferenceNumbers
1483
1498
  const ListPaymentReferenceNumbersInvoiceIdSchema = z.object({
1484
- is: z.string().min(1).optional(),
1485
1499
  in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1500
+ is: z.string().min(1).optional(),
1486
1501
  });
1487
1502
  const ListPaymentReferenceNumbersInvoiceNumberSchema = z.object({
1488
- is: z.string().min(1).optional(),
1489
1503
  in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1504
+ is: z.string().min(1).optional(),
1490
1505
  });
1491
1506
  const ListPaymentReferenceNumbersInvoicePaymentReferenceNumberItemSchema = z.object({
1492
1507
  number: ListPaymentReferenceNumbersInvoiceNumberSchema.optional(),
@@ -1811,3 +1826,8 @@ const ApplyPaymentScheduleSchemeInvoiceBodySchema = z.looseObject({
1811
1826
  amount: z.number().int().min(0).optional(),
1812
1827
  });
1813
1828
  export { ApplyPaymentScheduleSchemeInvoiceBodySchema };
1829
+ //Invoice.removePaymentScheduleScheme
1830
+ const RemovePaymentScheduleSchemeInvoiceBodySchema = z.looseObject({
1831
+ comment: z.string().max(300).optional(),
1832
+ });
1833
+ export { RemovePaymentScheduleSchemeInvoiceBodySchema };
@@ -155,8 +155,8 @@ const ListItemChannelSchema = z.object({
155
155
  not_in: z.enum(['web', 'app_store', 'play_store']).optional(),
156
156
  });
157
157
  const ListItemBusinessEntityIdSchema = z.object({
158
- is: z.string().min(1).optional(),
159
158
  is_present: z.enum(['true', 'false']).optional(),
159
+ is: z.string().min(1).optional(),
160
160
  });
161
161
  const ListItemIncludeSiteLevelResourcesSchema = z.object({
162
162
  is: z.enum(['true', 'false']).optional(),
@@ -30,8 +30,8 @@ const ListItemFamilyUpdatedAtSchema = z.object({
30
30
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
31
31
  });
32
32
  const ListItemFamilyBusinessEntityIdSchema = z.object({
33
- is: z.string().min(1).optional(),
34
33
  is_present: z.enum(['true', 'false']).optional(),
34
+ is: z.string().min(1).optional(),
35
35
  });
36
36
  const ListItemFamilyIncludeSiteLevelResourcesSchema = z.object({
37
37
  is: z.enum(['true', 'false']).optional(),
@@ -253,8 +253,8 @@ const ListItemPriceUpdatedAtSchema = z.object({
253
253
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
254
254
  });
255
255
  const ListItemPriceBusinessEntityIdSchema = z.object({
256
- is: z.string().min(1).optional(),
257
256
  is_present: z.enum(['true', 'false']).optional(),
257
+ is: z.string().min(1).optional(),
258
258
  });
259
259
  const ListItemPriceIncludeSiteLevelResourcesSchema = z.object({
260
260
  is: z.enum(['true', 'false']).optional(),
@@ -1,5 +1,5 @@
1
1
  // Generated Zod schemas: LedgerAccountBalance
2
- // Actions: listLedgerAccountBalances
2
+ // Actions: listLedgerAccountBalances, updateOverdraftLimit
3
3
  // Do not edit manually – regenerate via sdk-generator
4
4
  import { z } from 'zod';
5
5
  //LedgerAccountBalance.listLedgerAccountBalances
@@ -16,3 +16,12 @@ const ListLedgerAccountBalancesLedgerAccountBalanceBodySchema = z.looseObject({
16
16
  unit_id: ListLedgerAccountBalancesLedgerAccountBalanceUnitIdSchema.optional(),
17
17
  });
18
18
  export { ListLedgerAccountBalancesLedgerAccountBalanceBodySchema };
19
+ //LedgerAccountBalance.updateOverdraftLimit
20
+ const UpdateOverdraftLimitLedgerAccountBalanceBodySchema = z.looseObject({
21
+ subscription_id: z.string().max(50),
22
+ unit_id: z.string().max(50),
23
+ is_unlimited: z.boolean(),
24
+ limit: z.string().max(36).optional(),
25
+ change_reason: z.string().max(255).optional(),
26
+ });
27
+ export { UpdateOverdraftLimitLedgerAccountBalanceBodySchema };
@@ -16,7 +16,7 @@ const ListLedgerOperationsLedgerOperationCreatedAtSchema = z.object({
16
16
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
17
17
  });
18
18
  const ListLedgerOperationsLedgerOperationTypeSchema = z.object({
19
- is: z
19
+ in: z
20
20
  .enum([
21
21
  'allocation',
22
22
  'capture',
@@ -30,7 +30,7 @@ const ListLedgerOperationsLedgerOperationTypeSchema = z.object({
30
30
  'overdraft_settlement',
31
31
  ])
32
32
  .optional(),
33
- in: z
33
+ is: z
34
34
  .enum([
35
35
  'allocation',
36
36
  'capture',
@@ -4,10 +4,18 @@
4
4
  import { z } from 'zod';
5
5
  //OmnichannelOneTimeOrder.list
6
6
  const ListOmnichannelOneTimeOrderSourceSchema = z.object({
7
- is: z.enum(['apple_app_store', 'google_play_store']).optional(),
8
- is_not: z.enum(['apple_app_store', 'google_play_store']).optional(),
9
- in: z.enum(['apple_app_store', 'google_play_store']).optional(),
10
- not_in: z.enum(['apple_app_store', 'google_play_store']).optional(),
7
+ is: z
8
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
9
+ .optional(),
10
+ is_not: z
11
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
12
+ .optional(),
13
+ in: z
14
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
15
+ .optional(),
16
+ not_in: z
17
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
18
+ .optional(),
11
19
  });
12
20
  const ListOmnichannelOneTimeOrderCustomerIdSchema = z.object({
13
21
  is: z.string().min(1).optional(),
@@ -4,10 +4,18 @@
4
4
  import { z } from 'zod';
5
5
  //OmnichannelSubscription.list
6
6
  const ListOmnichannelSubscriptionSourceSchema = z.object({
7
- is: z.enum(['apple_app_store', 'google_play_store']).optional(),
8
- is_not: z.enum(['apple_app_store', 'google_play_store']).optional(),
9
- in: z.enum(['apple_app_store', 'google_play_store']).optional(),
10
- not_in: z.enum(['apple_app_store', 'google_play_store']).optional(),
7
+ is: z
8
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
9
+ .optional(),
10
+ is_not: z
11
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
12
+ .optional(),
13
+ in: z
14
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
15
+ .optional(),
16
+ not_in: z
17
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
18
+ .optional(),
11
19
  });
12
20
  const ListOmnichannelSubscriptionCustomerIdSchema = z.object({
13
21
  is: z.string().min(1).optional(),
@@ -31,16 +39,16 @@ const ListOmnichannelSubscriptionIdAtSourceSchema = z.object({
31
39
  not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
32
40
  });
33
41
  const ListOmnichannelSubscriptionUpdatedAtSchema = z.object({
34
- after: z.string().regex(RegExp('^\\d{10}$')).optional(),
35
- on: z.string().regex(RegExp('^\\d{10}$')).optional(),
36
- before: z.string().regex(RegExp('^\\d{10}$')).optional(),
37
42
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
43
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
44
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
45
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
38
46
  });
39
47
  const ListOmnichannelSubscriptionPurchasedAtSchema = z.object({
40
- after: z.string().regex(RegExp('^\\d{10}$')).optional(),
41
- on: z.string().regex(RegExp('^\\d{10}$')).optional(),
42
- before: z.string().regex(RegExp('^\\d{10}$')).optional(),
43
48
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
49
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
50
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
51
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
44
52
  });
45
53
  const ListOmnichannelSubscriptionSortBySchema = z.looseObject({
46
54
  asc: z.enum(['created_at', 'updated_at']).optional(),
@@ -118,6 +118,20 @@ const CreateUsingPermanentTokenPaymentSourceCardSchema = z.object({
118
118
  .optional(),
119
119
  funding_type: z.enum(['credit', 'debit', 'prepaid', 'not_known']).optional(),
120
120
  });
121
+ const CreateUsingPermanentTokenPaymentSourceBankAccountSchema = z.object({
122
+ account_type: z
123
+ .enum(['checking', 'savings', 'business_checking', 'current'])
124
+ .optional(),
125
+ account_holder_type: z.enum(['individual', 'company']).optional(),
126
+ first_name: z.string().max(150).optional(),
127
+ last_name: z.string().max(150).optional(),
128
+ company: z.string().max(250).optional(),
129
+ scheme: z
130
+ .enum(['ach', 'bacs', 'sepa_core', 'autogiro', 'becs', 'becs_nz', 'pad'])
131
+ .optional(),
132
+ last4: z.string().max(4).min(4).optional(),
133
+ echeck_type: z.enum(['web', 'ppd', 'ccd']).optional(),
134
+ });
121
135
  const CreateUsingPermanentTokenPaymentSourceBillingAddressSchema = z.object({
122
136
  first_name: z.string().max(150).optional(),
123
137
  last_name: z.string().max(150).optional(),
@@ -214,6 +228,7 @@ const CreateUsingPermanentTokenPaymentSourceBodySchema = z.looseObject({
214
228
  skip_retrieval: z.boolean().default(false).optional(),
215
229
  additional_information: CreateUsingPermanentTokenPaymentSourceAdditionalInformationSchema.optional(),
216
230
  card: CreateUsingPermanentTokenPaymentSourceCardSchema.optional(),
231
+ bank_account: CreateUsingPermanentTokenPaymentSourceBankAccountSchema.optional(),
217
232
  billing_address: CreateUsingPermanentTokenPaymentSourceBillingAddressSchema.optional(),
218
233
  });
219
234
  export { CreateUsingPermanentTokenPaymentSourceBodySchema };