chargebee 3.28.1 → 3.30.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 (97) hide show
  1. package/CHANGELOG.md +140 -0
  2. package/cjs/chargebee.cjs.js +1 -1
  3. package/cjs/environment.js +1 -1
  4. package/cjs/resources/api_endpoints.js +126 -0
  5. package/cjs/resources/webhook/eventType.js +5 -0
  6. package/cjs/schema/alert.schema.js +11 -5
  7. package/cjs/schema/coupon.schema.js +1 -1
  8. package/cjs/schema/credit_note.schema.js +13 -0
  9. package/cjs/schema/credit_unit.schema.js +38 -0
  10. package/cjs/schema/customer.schema.js +39 -0
  11. package/cjs/schema/entitlement.schema.js +4 -4
  12. package/cjs/schema/estimate.schema.js +18 -0
  13. package/cjs/schema/event.schema.js +20 -0
  14. package/cjs/schema/export.schema.js +33 -1
  15. package/cjs/schema/feature.schema.js +0 -1
  16. package/cjs/schema/gift.schema.js +14 -0
  17. package/cjs/schema/grant_block.schema.js +4 -0
  18. package/cjs/schema/index.js +1 -0
  19. package/cjs/schema/invoice.schema.js +63 -3
  20. package/cjs/schema/ledger_operation.schema.js +14 -4
  21. package/cjs/schema/meter.schema.js +10 -0
  22. package/cjs/schema/omnichannel_subscription.schema.js +2 -2
  23. package/cjs/schema/payment_intent.schema.js +14 -0
  24. package/cjs/schema/payment_source.schema.js +49 -0
  25. package/cjs/schema/purchase.schema.js +7 -0
  26. package/cjs/schema/ramp.schema.js +4 -2
  27. package/cjs/schema/recorded_purchase.schema.js +3 -0
  28. package/cjs/schema/subscription.schema.js +94 -0
  29. package/cjs/schema/transaction.schema.js +32 -0
  30. package/cjs/schema/webhook_endpoint.schema.js +10 -0
  31. package/cjs/telemetry/TelemetryAdapter.js +12 -7
  32. package/esm/environment.js +1 -1
  33. package/esm/resources/api_endpoints.js +126 -0
  34. package/esm/resources/webhook/eventType.js +5 -0
  35. package/esm/schema/alert.schema.js +11 -5
  36. package/esm/schema/coupon.schema.js +1 -1
  37. package/esm/schema/credit_note.schema.js +13 -0
  38. package/esm/schema/credit_unit.schema.js +35 -0
  39. package/esm/schema/customer.schema.js +39 -0
  40. package/esm/schema/entitlement.schema.js +4 -4
  41. package/esm/schema/estimate.schema.js +18 -0
  42. package/esm/schema/event.schema.js +20 -0
  43. package/esm/schema/export.schema.js +33 -1
  44. package/esm/schema/feature.schema.js +0 -1
  45. package/esm/schema/gift.schema.js +14 -0
  46. package/esm/schema/grant_block.schema.js +4 -0
  47. package/esm/schema/index.js +1 -0
  48. package/esm/schema/invoice.schema.js +63 -3
  49. package/esm/schema/ledger_operation.schema.js +13 -3
  50. package/esm/schema/meter.schema.js +10 -0
  51. package/esm/schema/omnichannel_subscription.schema.js +2 -2
  52. package/esm/schema/payment_intent.schema.js +14 -0
  53. package/esm/schema/payment_source.schema.js +49 -0
  54. package/esm/schema/purchase.schema.js +7 -0
  55. package/esm/schema/ramp.schema.js +4 -2
  56. package/esm/schema/recorded_purchase.schema.js +3 -0
  57. package/esm/schema/subscription.schema.js +94 -0
  58. package/esm/schema/transaction.schema.js +32 -0
  59. package/esm/schema/webhook_endpoint.schema.js +10 -0
  60. package/esm/telemetry/TelemetryAdapter.js +12 -7
  61. package/package.json +1 -1
  62. package/types/core.d.ts +65 -6
  63. package/types/index.d.ts +15 -8
  64. package/types/resources/Alert.d.ts +18 -3
  65. package/types/resources/AsyncResponse.d.ts +35 -0
  66. package/types/resources/AsyncResponseList.d.ts +8 -0
  67. package/types/resources/AttachedItem.d.ts +2 -2
  68. package/types/resources/ColumnDefinition.d.ts +9 -0
  69. package/types/resources/Content.d.ts +7 -0
  70. package/types/resources/CreditNote.d.ts +15 -0
  71. package/types/resources/CreditNoteEstimate.d.ts +5 -0
  72. package/types/resources/CreditUnit.d.ts +90 -0
  73. package/types/resources/Customer.d.ts +16 -2
  74. package/types/resources/Estimate.d.ts +20 -2
  75. package/types/resources/Event.d.ts +5 -0
  76. package/types/resources/Export.d.ts +1 -0
  77. package/types/resources/Feature.d.ts +2 -0
  78. package/types/resources/Gift.d.ts +16 -2
  79. package/types/resources/GrantBlock.d.ts +12 -6
  80. package/types/resources/Invoice.d.ts +41 -3
  81. package/types/resources/InvoiceEstimate.d.ts +5 -0
  82. package/types/resources/LedgerAccountBalance.d.ts +3 -1
  83. package/types/resources/LedgerEntry.d.ts +22 -0
  84. package/types/resources/LedgerOperation.d.ts +34 -9
  85. package/types/resources/Meter.d.ts +42 -0
  86. package/types/resources/MeteredFeature.d.ts +70 -0
  87. package/types/resources/PaymentIntent.d.ts +57 -5
  88. package/types/resources/PaymentSource.d.ts +8 -1
  89. package/types/resources/PromotionalGrant.d.ts +1 -1
  90. package/types/resources/Purchase.d.ts +8 -1
  91. package/types/resources/Quote.d.ts +5 -0
  92. package/types/resources/QuoteLineGroup.d.ts +5 -0
  93. package/types/resources/QuotedCharge.d.ts +3 -0
  94. package/types/resources/Ramp.d.ts +4 -1
  95. package/types/resources/RecordedPurchase.d.ts +3 -0
  96. package/types/resources/Subscription.d.ts +58 -7
  97. package/types/resources/WebhookEvent.d.ts +33 -0
@@ -1053,6 +1053,7 @@ const CancelSubscriptionForItemsEstimateBodySchema = zod_1.z.looseObject({
1053
1053
  ])
1054
1054
  .optional(),
1055
1055
  invoice_date: zod_1.z.number().int().optional(),
1056
+ include_cancellation_day_in_billing: zod_1.z.boolean().optional(),
1056
1057
  cancel_reason_code: zod_1.z.string().max(100).optional(),
1057
1058
  subscription_items: CancelSubscriptionForItemsEstimateSubscriptionItemsSchema.optional(),
1058
1059
  });
@@ -1154,6 +1155,13 @@ const GiftSubscriptionEstimatePaymentIntentSchema = zod_1.z.object({
1154
1155
  'paypay',
1155
1156
  'gcash',
1156
1157
  'south_korean_cards',
1158
+ 'paynow',
1159
+ 'bizum',
1160
+ 'promptpay',
1161
+ 'dana',
1162
+ 'touch_n_go',
1163
+ 'tamara',
1164
+ 'qpay',
1157
1165
  ])
1158
1166
  .optional(),
1159
1167
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -1270,6 +1278,13 @@ const GiftSubscriptionForItemsEstimatePaymentIntentSchema = zod_1.z.object({
1270
1278
  'paypay',
1271
1279
  'gcash',
1272
1280
  'south_korean_cards',
1281
+ 'paynow',
1282
+ 'bizum',
1283
+ 'promptpay',
1284
+ 'dana',
1285
+ 'touch_n_go',
1286
+ 'tamara',
1287
+ 'qpay',
1273
1288
  ])
1274
1289
  .optional(),
1275
1290
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -1446,6 +1461,8 @@ const CreateInvoiceForItemsEstimateItemPricesSchema = zod_1.z.object({
1446
1461
  unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
1447
1462
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1448
1463
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1464
+ description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
1465
+ entity_description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
1449
1466
  });
1450
1467
  const CreateInvoiceForItemsEstimateItemTiersSchema = zod_1.z.object({
1451
1468
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
@@ -1476,6 +1493,7 @@ const CreateInvoiceForItemsEstimateChargesSchema = zod_1.z.object({
1476
1493
  avalara_service_type: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1477
1494
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1478
1495
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1496
+ entity_description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
1479
1497
  });
1480
1498
  const CreateInvoiceForItemsEstimateNotesToRemoveSchema = zod_1.z.object({
1481
1499
  entity_type: zod_1.z
@@ -231,6 +231,7 @@ const ListEventEventTypeSchema = zod_1.z.object({
231
231
  'business_entity_deleted',
232
232
  'customer_business_entity_changed',
233
233
  'subscription_business_entity_changed',
234
+ 'payment_source_business_entity_changed',
234
235
  'purchase_created',
235
236
  'voucher_created',
236
237
  'voucher_expired',
@@ -292,6 +293,10 @@ const ListEventEventTypeSchema = zod_1.z.object({
292
293
  'alert_status_changed',
293
294
  'omnichannel_subscription_item_updated',
294
295
  'omnichannel_subscription_item_recovered',
296
+ 'ledger_account_balance_updated',
297
+ 'grant_blocks_created',
298
+ 'grant_blocks_updated',
299
+ 'ledger_updated',
295
300
  ])
296
301
  .optional(),
297
302
  is_not: zod_1.z
@@ -457,6 +462,7 @@ const ListEventEventTypeSchema = zod_1.z.object({
457
462
  'business_entity_deleted',
458
463
  'customer_business_entity_changed',
459
464
  'subscription_business_entity_changed',
465
+ 'payment_source_business_entity_changed',
460
466
  'purchase_created',
461
467
  'voucher_created',
462
468
  'voucher_expired',
@@ -518,6 +524,10 @@ const ListEventEventTypeSchema = zod_1.z.object({
518
524
  'alert_status_changed',
519
525
  'omnichannel_subscription_item_updated',
520
526
  'omnichannel_subscription_item_recovered',
527
+ 'ledger_account_balance_updated',
528
+ 'grant_blocks_created',
529
+ 'grant_blocks_updated',
530
+ 'ledger_updated',
521
531
  ])
522
532
  .optional(),
523
533
  in: zod_1.z
@@ -683,6 +693,7 @@ const ListEventEventTypeSchema = zod_1.z.object({
683
693
  'business_entity_deleted',
684
694
  'customer_business_entity_changed',
685
695
  'subscription_business_entity_changed',
696
+ 'payment_source_business_entity_changed',
686
697
  'purchase_created',
687
698
  'voucher_created',
688
699
  'voucher_expired',
@@ -744,6 +755,10 @@ const ListEventEventTypeSchema = zod_1.z.object({
744
755
  'alert_status_changed',
745
756
  'omnichannel_subscription_item_updated',
746
757
  'omnichannel_subscription_item_recovered',
758
+ 'ledger_account_balance_updated',
759
+ 'grant_blocks_created',
760
+ 'grant_blocks_updated',
761
+ 'ledger_updated',
747
762
  ])
748
763
  .optional(),
749
764
  not_in: zod_1.z
@@ -909,6 +924,7 @@ const ListEventEventTypeSchema = zod_1.z.object({
909
924
  'business_entity_deleted',
910
925
  'customer_business_entity_changed',
911
926
  'subscription_business_entity_changed',
927
+ 'payment_source_business_entity_changed',
912
928
  'purchase_created',
913
929
  'voucher_created',
914
930
  'voucher_expired',
@@ -970,6 +986,10 @@ const ListEventEventTypeSchema = zod_1.z.object({
970
986
  'alert_status_changed',
971
987
  'omnichannel_subscription_item_updated',
972
988
  'omnichannel_subscription_item_recovered',
989
+ 'ledger_account_balance_updated',
990
+ 'grant_blocks_created',
991
+ 'grant_blocks_updated',
992
+ 'ledger_updated',
973
993
  ])
974
994
  .optional(),
975
995
  });
@@ -1102,8 +1102,8 @@ const CouponsExportCurrencyCodeSchema = zod_1.z.object({
1102
1102
  not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1103
1103
  });
1104
1104
  const CouponsExportApplicableItemPriceIdsSchema = zod_1.z.object({
1105
- is: zod_1.z.string().min(1).optional(),
1106
1105
  in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1106
+ is: zod_1.z.string().min(1).optional(),
1107
1107
  });
1108
1108
  const CouponsExportIdSchema = zod_1.z.object({
1109
1109
  is: zod_1.z.string().min(1).optional(),
@@ -1643,6 +1643,9 @@ const SubscriptionsExportChannelSchema = zod_1.z.object({
1643
1643
  in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
1644
1644
  not_in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
1645
1645
  });
1646
+ const SubscriptionsExportDecommissionedSchema = zod_1.z.object({
1647
+ is: zod_1.z.enum(['true', 'false']).optional(),
1648
+ });
1646
1649
  const SubscriptionsExportPlanIdSchema = zod_1.z.object({
1647
1650
  is: zod_1.z.string().min(1).optional(),
1648
1651
  is_not: zod_1.z.string().min(1).optional(),
@@ -1665,6 +1668,7 @@ const SubscriptionsExportSubscriptionItemSchema = zod_1.z.object({
1665
1668
  offline_payment_method: SubscriptionsExportOfflinePaymentMethodSchema.optional(),
1666
1669
  auto_close_invoices: SubscriptionsExportAutoCloseInvoicesSchema.optional(),
1667
1670
  channel: SubscriptionsExportChannelSchema.optional(),
1671
+ decommissioned: SubscriptionsExportDecommissionedSchema.optional(),
1668
1672
  plan_id: SubscriptionsExportPlanIdSchema.optional(),
1669
1673
  });
1670
1674
  const SubscriptionsExportBodySchema = zod_1.z.looseObject({
@@ -2128,6 +2132,13 @@ const TransactionsExportPaymentMethodSchema = zod_1.z.object({
2128
2132
  'paypay',
2129
2133
  'gcash',
2130
2134
  'south_korean_cards',
2135
+ 'paynow',
2136
+ 'bizum',
2137
+ 'promptpay',
2138
+ 'dana',
2139
+ 'touch_n_go',
2140
+ 'tamara',
2141
+ 'qpay',
2131
2142
  ])
2132
2143
  .optional(),
2133
2144
  is_not: zod_1.z
@@ -2189,6 +2200,13 @@ const TransactionsExportPaymentMethodSchema = zod_1.z.object({
2189
2200
  'paypay',
2190
2201
  'gcash',
2191
2202
  'south_korean_cards',
2203
+ 'paynow',
2204
+ 'bizum',
2205
+ 'promptpay',
2206
+ 'dana',
2207
+ 'touch_n_go',
2208
+ 'tamara',
2209
+ 'qpay',
2192
2210
  ])
2193
2211
  .optional(),
2194
2212
  in: zod_1.z
@@ -2250,6 +2268,13 @@ const TransactionsExportPaymentMethodSchema = zod_1.z.object({
2250
2268
  'paypay',
2251
2269
  'gcash',
2252
2270
  'south_korean_cards',
2271
+ 'paynow',
2272
+ 'bizum',
2273
+ 'promptpay',
2274
+ 'dana',
2275
+ 'touch_n_go',
2276
+ 'tamara',
2277
+ 'qpay',
2253
2278
  ])
2254
2279
  .optional(),
2255
2280
  not_in: zod_1.z
@@ -2311,6 +2336,13 @@ const TransactionsExportPaymentMethodSchema = zod_1.z.object({
2311
2336
  'paypay',
2312
2337
  'gcash',
2313
2338
  'south_korean_cards',
2339
+ 'paynow',
2340
+ 'bizum',
2341
+ 'promptpay',
2342
+ 'dana',
2343
+ 'touch_n_go',
2344
+ 'tamara',
2345
+ 'qpay',
2314
2346
  ])
2315
2347
  .optional(),
2316
2348
  });
@@ -58,7 +58,6 @@ const CreateFeatureBodySchema = zod_1.z.looseObject({
58
58
  description: zod_1.z.string().max(500).optional(),
59
59
  type: zod_1.z.enum(['switch', 'custom', 'quantity', 'range']).optional(),
60
60
  unit: zod_1.z.string().max(50).optional(),
61
- metered: zod_1.z.boolean().optional(),
62
61
  levels: CreateFeatureLevelsSchema.optional(),
63
62
  });
64
63
  exports.CreateFeatureBodySchema = CreateFeatureBodySchema;
@@ -70,6 +70,13 @@ const CreateGiftPaymentIntentSchema = zod_1.z.object({
70
70
  'paypay',
71
71
  'gcash',
72
72
  'south_korean_cards',
73
+ 'paynow',
74
+ 'bizum',
75
+ 'promptpay',
76
+ 'dana',
77
+ 'touch_n_go',
78
+ 'tamara',
79
+ 'qpay',
73
80
  ])
74
81
  .optional(),
75
82
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -184,6 +191,13 @@ const CreateForItemsGiftPaymentIntentSchema = zod_1.z.object({
184
191
  'paypay',
185
192
  'gcash',
186
193
  'south_korean_cards',
194
+ 'paynow',
195
+ 'bizum',
196
+ 'promptpay',
197
+ 'dana',
198
+ 'touch_n_go',
199
+ 'tamara',
200
+ 'qpay',
187
201
  ])
188
202
  .optional(),
189
203
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -12,6 +12,9 @@ const ListGrantBlocksGrantBlockSubscriptionIdSchema = zod_1.z.object({
12
12
  const ListGrantBlocksGrantBlockUnitIdSchema = zod_1.z.object({
13
13
  is: zod_1.z.string().min(1).optional(),
14
14
  });
15
+ const ListGrantBlocksGrantBlockAccountTypeSchema = zod_1.z.object({
16
+ is: zod_1.z.enum(['provisioned', 'overdraft']).optional(),
17
+ });
15
18
  const ListGrantBlocksGrantBlockEffectiveFromSchema = zod_1.z.object({
16
19
  after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
17
20
  before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
@@ -39,6 +42,7 @@ const ListGrantBlocksGrantBlockBodySchema = zod_1.z.looseObject({
39
42
  offset: zod_1.z.string().max(1000).optional(),
40
43
  subscription_id: ListGrantBlocksGrantBlockSubscriptionIdSchema,
41
44
  unit_id: ListGrantBlocksGrantBlockUnitIdSchema.optional(),
45
+ account_type: ListGrantBlocksGrantBlockAccountTypeSchema.optional(),
42
46
  effective_from: ListGrantBlocksGrantBlockEffectiveFromSchema.optional(),
43
47
  expires_at: ListGrantBlocksGrantBlockExpiresAtSchema.optional(),
44
48
  created_at: ListGrantBlocksGrantBlockCreatedAtSchema.optional(),
@@ -27,6 +27,7 @@ __exportStar(require("./coupon.schema.js"), exports);
27
27
  __exportStar(require("./coupon_code.schema.js"), exports);
28
28
  __exportStar(require("./coupon_set.schema.js"), exports);
29
29
  __exportStar(require("./credit_note.schema.js"), exports);
30
+ __exportStar(require("./credit_unit.schema.js"), exports);
30
31
  __exportStar(require("./currency.schema.js"), exports);
31
32
  __exportStar(require("./customer.schema.js"), exports);
32
33
  __exportStar(require("./customer_entitlement.schema.js"), exports);
@@ -185,6 +185,13 @@ const CreateInvoicePaymentMethodSchema = zod_1.z.object({
185
185
  'paypay',
186
186
  'gcash',
187
187
  'south_korean_cards',
188
+ 'paynow',
189
+ 'bizum',
190
+ 'promptpay',
191
+ 'dana',
192
+ 'touch_n_go',
193
+ 'tamara',
194
+ 'qpay',
188
195
  ])
189
196
  .optional(),
190
197
  gateway: zod_1.z
@@ -307,6 +314,13 @@ const CreateInvoicePaymentIntentSchema = zod_1.z.object({
307
314
  'paypay',
308
315
  'gcash',
309
316
  'south_korean_cards',
317
+ 'paynow',
318
+ 'bizum',
319
+ 'promptpay',
320
+ 'dana',
321
+ 'touch_n_go',
322
+ 'tamara',
323
+ 'qpay',
310
324
  ])
311
325
  .optional(),
312
326
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -561,6 +575,13 @@ const CreateForChargeItemsAndChargesInvoicePaymentMethodSchema = zod_1.z.object(
561
575
  'paypay',
562
576
  'gcash',
563
577
  'south_korean_cards',
578
+ 'paynow',
579
+ 'bizum',
580
+ 'promptpay',
581
+ 'dana',
582
+ 'touch_n_go',
583
+ 'tamara',
584
+ 'qpay',
564
585
  ])
565
586
  .optional(),
566
587
  gateway: zod_1.z
@@ -683,6 +704,13 @@ const CreateForChargeItemsAndChargesInvoicePaymentIntentSchema = zod_1.z.object(
683
704
  'paypay',
684
705
  'gcash',
685
706
  'south_korean_cards',
707
+ 'paynow',
708
+ 'bizum',
709
+ 'promptpay',
710
+ 'dana',
711
+ 'touch_n_go',
712
+ 'tamara',
713
+ 'qpay',
686
714
  ])
687
715
  .optional(),
688
716
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -697,6 +725,8 @@ const CreateForChargeItemsAndChargesInvoiceItemPricesSchema = zod_1.z.object({
697
725
  unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
698
726
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
699
727
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
728
+ description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
729
+ entity_description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
700
730
  });
701
731
  const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = zod_1.z.object({
702
732
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
@@ -712,6 +742,7 @@ const CreateForChargeItemsAndChargesInvoiceItemTiersSchema = zod_1.z.object({
712
742
  package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
713
743
  });
714
744
  const CreateForChargeItemsAndChargesInvoiceChargesSchema = zod_1.z.object({
745
+ entity_description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
715
746
  amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
716
747
  amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
717
748
  description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
@@ -769,6 +800,7 @@ const CreateForChargeItemsAndChargesInvoiceBodySchema = zod_1.z.looseObject({
769
800
  auto_collection: zod_1.z.enum(['on', 'off']).optional(),
770
801
  net_term_days: zod_1.z.number().int().optional(),
771
802
  invoice_date: zod_1.z.number().int().optional(),
803
+ create_pending_invoice: zod_1.z.boolean().optional(),
772
804
  token_id: zod_1.z.string().max(40).optional(),
773
805
  replace_primary_payment_source: zod_1.z.boolean().default(false).optional(),
774
806
  retain_payment_source: zod_1.z.boolean().default(true).optional(),
@@ -983,6 +1015,11 @@ const ImportInvoiceInvoiceLineItemsSchema = zod_1.z.object({
983
1015
  tax9_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
984
1016
  tax10_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
985
1017
  tax10_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
1018
+ proration_mode: zod_1.z
1019
+ .array(zod_1.z
1020
+ .enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
1021
+ .optional())
1022
+ .optional(),
986
1023
  created_at: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
987
1024
  });
988
1025
  const ImportInvoiceInvoicePaymentReferenceNumbersSchema = zod_1.z.object({
@@ -1050,6 +1087,10 @@ const ImportInvoiceInvoicePaymentsSchema = zod_1.z.object({
1050
1087
  'app_store',
1051
1088
  'play_store',
1052
1089
  'custom',
1090
+ 'dana',
1091
+ 'touch_n_go',
1092
+ 'tamara',
1093
+ 'qpay',
1053
1094
  ])
1054
1095
  .optional()),
1055
1096
  date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -1100,7 +1141,17 @@ const ImportInvoiceInvoiceBodySchema = zod_1.z.looseObject({
1100
1141
  po_number: zod_1.z.string().max(100).optional(),
1101
1142
  price_type: zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
1102
1143
  tax_override_reason: zod_1.z
1103
- .enum(['id_exempt', 'customer_exempt', 'export'])
1144
+ .enum([
1145
+ 'zero_rated',
1146
+ 'id_exempt',
1147
+ 'customer_exempt',
1148
+ 'region_non_taxable',
1149
+ 'product_exempt',
1150
+ 'export',
1151
+ 'high_value_physical_goods',
1152
+ 'zero_value_item',
1153
+ 'tax_not_configured_external_provider',
1154
+ ])
1104
1155
  .optional(),
1105
1156
  vat_number: zod_1.z.string().max(20).optional(),
1106
1157
  vat_number_prefix: zod_1.z.string().max(10).optional(),
@@ -1119,6 +1170,7 @@ const ImportInvoiceInvoiceBodySchema = zod_1.z.looseObject({
1119
1170
  net_term_days: zod_1.z.number().int().optional(),
1120
1171
  has_advance_charges: zod_1.z.boolean().default(false).optional(),
1121
1172
  use_for_proration: zod_1.z.boolean().default(false).optional(),
1173
+ paid_at: zod_1.z.number().int().optional(),
1122
1174
  credit_note: ImportInvoiceInvoiceCreditNoteSchema.optional(),
1123
1175
  billing_address: ImportInvoiceInvoiceBillingAddressSchema.optional(),
1124
1176
  shipping_address: ImportInvoiceInvoiceShippingAddressSchema.optional(),
@@ -1372,12 +1424,12 @@ const PdfInvoiceBodySchema = zod_1.z.looseObject({
1372
1424
  exports.PdfInvoiceBodySchema = PdfInvoiceBodySchema;
1373
1425
  //Invoice.listPaymentReferenceNumbers
1374
1426
  const ListPaymentReferenceNumbersInvoiceIdSchema = zod_1.z.object({
1375
- is: zod_1.z.string().min(1).optional(),
1376
1427
  in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1428
+ is: zod_1.z.string().min(1).optional(),
1377
1429
  });
1378
1430
  const ListPaymentReferenceNumbersInvoiceNumberSchema = zod_1.z.object({
1379
- is: zod_1.z.string().min(1).optional(),
1380
1431
  in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1432
+ is: zod_1.z.string().min(1).optional(),
1381
1433
  });
1382
1434
  const ListPaymentReferenceNumbersInvoicePaymentReferenceNumberItemSchema = zod_1.z.object({
1383
1435
  number: ListPaymentReferenceNumbersInvoiceNumberSchema.optional(),
@@ -1503,6 +1555,10 @@ const RecordPaymentInvoiceTransactionSchema = zod_1.z.object({
1503
1555
  'app_store',
1504
1556
  'play_store',
1505
1557
  'custom',
1558
+ 'dana',
1559
+ 'touch_n_go',
1560
+ 'tamara',
1561
+ 'qpay',
1506
1562
  ]),
1507
1563
  reference_number: zod_1.z.string().max(100).optional(),
1508
1564
  custom_payment_method_id: zod_1.z.string().max(50).optional(),
@@ -1569,6 +1625,10 @@ const RecordRefundInvoiceTransactionSchema = zod_1.z.object({
1569
1625
  'app_store',
1570
1626
  'play_store',
1571
1627
  'custom',
1628
+ 'dana',
1629
+ 'touch_n_go',
1630
+ 'tamara',
1631
+ 'qpay',
1572
1632
  ]),
1573
1633
  reference_number: zod_1.z.string().max(100).optional(),
1574
1634
  custom_payment_method_id: zod_1.z.string().max(50).optional(),
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  // Generated Zod schemas: LedgerOperation
3
- // Actions: listLedgerOperations, capture, authorize, captureAuthorization, releaseAuthorization
3
+ // Actions: listLedgerOperations, capture, authorize, captureAuthorization, releaseAuthorization, allocate
4
4
  // Do not edit manually – regenerate via sdk-generator
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ReleaseAuthorizationLedgerOperationBodySchema = exports.CaptureAuthorizationLedgerOperationBodySchema = exports.AuthorizeLedgerOperationBodySchema = exports.CaptureLedgerOperationBodySchema = exports.ListLedgerOperationsLedgerOperationBodySchema = void 0;
6
+ exports.AllocateLedgerOperationBodySchema = exports.ReleaseAuthorizationLedgerOperationBodySchema = exports.CaptureAuthorizationLedgerOperationBodySchema = exports.AuthorizeLedgerOperationBodySchema = exports.CaptureLedgerOperationBodySchema = exports.ListLedgerOperationsLedgerOperationBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //LedgerOperation.listLedgerOperations
9
9
  const ListLedgerOperationsLedgerOperationSubscriptionIdSchema = zod_1.z.object({
@@ -19,7 +19,7 @@ const ListLedgerOperationsLedgerOperationCreatedAtSchema = zod_1.z.object({
19
19
  between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
20
20
  });
21
21
  const ListLedgerOperationsLedgerOperationTypeSchema = zod_1.z.object({
22
- is: zod_1.z
22
+ in: zod_1.z
23
23
  .enum([
24
24
  'allocation',
25
25
  'capture',
@@ -32,7 +32,7 @@ const ListLedgerOperationsLedgerOperationTypeSchema = zod_1.z.object({
32
32
  'adjustment',
33
33
  ])
34
34
  .optional(),
35
- in: zod_1.z
35
+ is: zod_1.z
36
36
  .enum([
37
37
  'allocation',
38
38
  'capture',
@@ -102,3 +102,13 @@ const ReleaseAuthorizationLedgerOperationBodySchema = zod_1.z.looseObject({
102
102
  metadata: ReleaseAuthorizationLedgerOperationMetadataSchema.optional(),
103
103
  });
104
104
  exports.ReleaseAuthorizationLedgerOperationBodySchema = ReleaseAuthorizationLedgerOperationBodySchema;
105
+ //LedgerOperation.allocate
106
+ const AllocateLedgerOperationMetadataSchema = zod_1.z.looseObject({});
107
+ const AllocateLedgerOperationBodySchema = zod_1.z.looseObject({
108
+ subscription_id: zod_1.z.string().max(50),
109
+ unit_id: zod_1.z.string().max(50),
110
+ amount: zod_1.z.string().max(36),
111
+ expires_at: zod_1.z.number().int(),
112
+ metadata: AllocateLedgerOperationMetadataSchema.optional(),
113
+ });
114
+ exports.AllocateLedgerOperationBodySchema = AllocateLedgerOperationBodySchema;
@@ -6,8 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ListMeterBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //Meter.list
9
+ const ListMeterNameSchema = zod_1.z.object({
10
+ starts_with: zod_1.z.string().min(1).optional(),
11
+ is: zod_1.z.string().min(1).optional(),
12
+ });
13
+ const ListMeterSortBySchema = zod_1.z.looseObject({
14
+ asc: zod_1.z.enum(['id', 'name', 'created_at', 'updated_at']).optional(),
15
+ desc: zod_1.z.enum(['id', 'name', 'created_at', 'updated_at']).optional(),
16
+ });
9
17
  const ListMeterBodySchema = zod_1.z.looseObject({
10
18
  limit: zod_1.z.number().int().min(1).max(100).optional(),
11
19
  offset: zod_1.z.string().max(1000).optional(),
20
+ name: ListMeterNameSchema.optional(),
21
+ sort_by: ListMeterSortBySchema.optional(),
12
22
  });
13
23
  exports.ListMeterBodySchema = ListMeterBodySchema;
@@ -34,12 +34,12 @@ const ListOmnichannelSubscriptionIdAtSourceSchema = zod_1.z.object({
34
34
  not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
35
35
  });
36
36
  const ListOmnichannelSubscriptionUpdatedAtSchema = zod_1.z.object({
37
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
38
37
  before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
38
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
39
39
  });
40
40
  const ListOmnichannelSubscriptionPurchasedAtSchema = zod_1.z.object({
41
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
42
41
  before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
42
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
43
43
  });
44
44
  const ListOmnichannelSubscriptionSortBySchema = zod_1.z.looseObject({
45
45
  asc: zod_1.z.enum(['created_at', 'updated_at']).optional(),
@@ -61,6 +61,13 @@ const CreatePaymentIntentBodySchema = zod_1.z.looseObject({
61
61
  'paypay',
62
62
  'gcash',
63
63
  'south_korean_cards',
64
+ 'paynow',
65
+ 'bizum',
66
+ 'promptpay',
67
+ 'dana',
68
+ 'touch_n_go',
69
+ 'tamara',
70
+ 'qpay',
64
71
  ])
65
72
  .optional(),
66
73
  success_url: zod_1.z.string().max(250).optional(),
@@ -119,6 +126,13 @@ const UpdatePaymentIntentBodySchema = zod_1.z.looseObject({
119
126
  'paypay',
120
127
  'gcash',
121
128
  'south_korean_cards',
129
+ 'paynow',
130
+ 'bizum',
131
+ 'promptpay',
132
+ 'dana',
133
+ 'touch_n_go',
134
+ 'tamara',
135
+ 'qpay',
122
136
  ])
123
137
  .optional(),
124
138
  success_url: zod_1.z.string().max(250).optional(),
@@ -58,6 +58,13 @@ const CreateUsingTempTokenPaymentSourceBodySchema = zod_1.z.looseObject({
58
58
  'paypay',
59
59
  'gcash',
60
60
  'south_korean_cards',
61
+ 'paynow',
62
+ 'bizum',
63
+ 'promptpay',
64
+ 'dana',
65
+ 'touch_n_go',
66
+ 'tamara',
67
+ 'qpay',
61
68
  ]),
62
69
  tmp_token: zod_1.z.string().max(65000),
63
70
  issuing_country: zod_1.z.string().max(50).optional(),
@@ -163,6 +170,13 @@ const CreateUsingPermanentTokenPaymentSourceBodySchema = zod_1.z.looseObject({
163
170
  'paypay',
164
171
  'gcash',
165
172
  'south_korean_cards',
173
+ 'paynow',
174
+ 'bizum',
175
+ 'promptpay',
176
+ 'dana',
177
+ 'touch_n_go',
178
+ 'tamara',
179
+ 'qpay',
166
180
  ]),
167
181
  gateway_account_id: zod_1.z.string().max(50).optional(),
168
182
  reference_id: zod_1.z.string().max(200).optional(),
@@ -239,6 +253,13 @@ const CreateUsingPaymentIntentPaymentSourcePaymentIntentSchema = zod_1.z.object(
239
253
  'paypay',
240
254
  'gcash',
241
255
  'south_korean_cards',
256
+ 'paynow',
257
+ 'bizum',
258
+ 'promptpay',
259
+ 'dana',
260
+ 'touch_n_go',
261
+ 'tamara',
262
+ 'qpay',
242
263
  ])
243
264
  .optional(),
244
265
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -419,6 +440,13 @@ const ListPaymentSourceTypeSchema = zod_1.z.object({
419
440
  'paypay',
420
441
  'gcash',
421
442
  'south_korean_cards',
443
+ 'paynow',
444
+ 'bizum',
445
+ 'promptpay',
446
+ 'dana',
447
+ 'touch_n_go',
448
+ 'tamara',
449
+ 'qpay',
422
450
  ])
423
451
  .optional(),
424
452
  is_not: zod_1.z
@@ -470,6 +498,13 @@ const ListPaymentSourceTypeSchema = zod_1.z.object({
470
498
  'paypay',
471
499
  'gcash',
472
500
  'south_korean_cards',
501
+ 'paynow',
502
+ 'bizum',
503
+ 'promptpay',
504
+ 'dana',
505
+ 'touch_n_go',
506
+ 'tamara',
507
+ 'qpay',
473
508
  ])
474
509
  .optional(),
475
510
  in: zod_1.z
@@ -521,6 +556,13 @@ const ListPaymentSourceTypeSchema = zod_1.z.object({
521
556
  'paypay',
522
557
  'gcash',
523
558
  'south_korean_cards',
559
+ 'paynow',
560
+ 'bizum',
561
+ 'promptpay',
562
+ 'dana',
563
+ 'touch_n_go',
564
+ 'tamara',
565
+ 'qpay',
524
566
  ])
525
567
  .optional(),
526
568
  not_in: zod_1.z
@@ -572,6 +614,13 @@ const ListPaymentSourceTypeSchema = zod_1.z.object({
572
614
  'paypay',
573
615
  'gcash',
574
616
  'south_korean_cards',
617
+ 'paynow',
618
+ 'bizum',
619
+ 'promptpay',
620
+ 'dana',
621
+ 'touch_n_go',
622
+ 'tamara',
623
+ 'qpay',
575
624
  ])
576
625
  .optional(),
577
626
  });
@@ -69,6 +69,13 @@ const CreatePurchasePaymentIntentSchema = zod_1.z.object({
69
69
  'paypay',
70
70
  'gcash',
71
71
  'south_korean_cards',
72
+ 'paynow',
73
+ 'bizum',
74
+ 'promptpay',
75
+ 'dana',
76
+ 'touch_n_go',
77
+ 'tamara',
78
+ 'qpay',
72
79
  ])
73
80
  .optional(),
74
81
  reference_id: zod_1.z.string().max(65000).optional(),