chargebee 3.24.0 → 3.25.0-beta.1

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 (147) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +39 -0
  3. package/cjs/RequestWrapper.js +27 -0
  4. package/cjs/chargebee.cjs.js +3 -0
  5. package/cjs/chargebee.cjs.worker.js +2 -0
  6. package/cjs/chargebeeZodValidationError.js +18 -0
  7. package/cjs/createChargebee.js +5 -0
  8. package/cjs/environment.js +1 -1
  9. package/cjs/schema/addon.schema.js +153 -0
  10. package/cjs/schema/address.schema.js +35 -0
  11. package/cjs/schema/alert.schema.js +38 -0
  12. package/cjs/schema/attached_item.schema.js +58 -0
  13. package/cjs/schema/business_entity.schema.js +46 -0
  14. package/cjs/schema/card.schema.js +165 -0
  15. package/cjs/schema/comment.schema.js +69 -0
  16. package/cjs/schema/coupon.schema.js +209 -0
  17. package/cjs/schema/coupon_code.schema.js +14 -0
  18. package/cjs/schema/coupon_set.schema.js +28 -0
  19. package/cjs/schema/credit_note.schema.js +288 -0
  20. package/cjs/schema/currency.schema.js +32 -0
  21. package/cjs/schema/customer.schema.js +986 -0
  22. package/cjs/schema/customer_entitlement.schema.js +14 -0
  23. package/cjs/schema/differential_price.schema.js +68 -0
  24. package/cjs/schema/entitlement.schema.js +27 -0
  25. package/cjs/schema/entitlement_override.schema.js +33 -0
  26. package/cjs/schema/estimate.schema.js +1525 -0
  27. package/cjs/schema/export.schema.js +1545 -0
  28. package/cjs/schema/feature.schema.js +37 -0
  29. package/cjs/schema/gift.schema.js +277 -0
  30. package/cjs/schema/hosted_page.schema.js +1649 -0
  31. package/cjs/schema/in_app_subscription.schema.js +68 -0
  32. package/cjs/schema/index.js +80 -0
  33. package/cjs/schema/invoice.schema.js +1467 -0
  34. package/cjs/schema/item.schema.js +91 -0
  35. package/cjs/schema/item_entitlement.schema.js +45 -0
  36. package/cjs/schema/item_family.schema.js +21 -0
  37. package/cjs/schema/item_price.schema.js +190 -0
  38. package/cjs/schema/non_subscription.schema.js +28 -0
  39. package/cjs/schema/offer_event.schema.js +13 -0
  40. package/cjs/schema/offer_fulfillment.schema.js +20 -0
  41. package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
  42. package/cjs/schema/omnichannel_subscription.schema.js +89 -0
  43. package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
  44. package/cjs/schema/order.schema.js +273 -0
  45. package/cjs/schema/payment_intent.schema.js +117 -0
  46. package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
  47. package/cjs/schema/payment_source.schema.js +358 -0
  48. package/cjs/schema/payment_voucher.schema.js +57 -0
  49. package/cjs/schema/personalized_offer.schema.js +28 -0
  50. package/cjs/schema/plan.schema.js +225 -0
  51. package/cjs/schema/portal_session.schema.js +22 -0
  52. package/cjs/schema/price_variant.schema.js +36 -0
  53. package/cjs/schema/pricing_page_session.schema.js +135 -0
  54. package/cjs/schema/promotional_credit.schema.js +78 -0
  55. package/cjs/schema/purchase.schema.js +272 -0
  56. package/cjs/schema/quote.schema.js +1557 -0
  57. package/cjs/schema/ramp.schema.js +209 -0
  58. package/cjs/schema/recorded_purchase.schema.js +32 -0
  59. package/cjs/schema/resource_migration.schema.js +14 -0
  60. package/cjs/schema/site_migration_detail.schema.js +81 -0
  61. package/cjs/schema/subscription.schema.js +2993 -0
  62. package/cjs/schema/subscription_entitlement.schema.js +25 -0
  63. package/cjs/schema/time_machine.schema.js +17 -0
  64. package/cjs/schema/transaction.schema.js +70 -0
  65. package/cjs/schema/unbilled_charge.schema.js +113 -0
  66. package/cjs/schema/usage.schema.js +93 -0
  67. package/cjs/schema/usage_charge.schema.js +17 -0
  68. package/cjs/schema/usage_event.schema.js +28 -0
  69. package/cjs/schema/usage_file.schema.js +13 -0
  70. package/cjs/schema/usage_summary.schema.js +17 -0
  71. package/cjs/schema/virtual_bank_account.schema.js +43 -0
  72. package/cjs/schema/webhook_endpoint.schema.js +504 -0
  73. package/cjs/validationLoader.js +59 -0
  74. package/esm/RequestWrapper.js +27 -0
  75. package/esm/chargebee.esm.js +2 -0
  76. package/esm/chargebee.esm.worker.js +1 -0
  77. package/esm/chargebeeZodValidationError.js +14 -0
  78. package/esm/createChargebee.js +5 -0
  79. package/esm/environment.js +1 -1
  80. package/esm/schema/addon.schema.js +150 -0
  81. package/esm/schema/address.schema.js +32 -0
  82. package/esm/schema/alert.schema.js +35 -0
  83. package/esm/schema/attached_item.schema.js +55 -0
  84. package/esm/schema/business_entity.schema.js +43 -0
  85. package/esm/schema/card.schema.js +162 -0
  86. package/esm/schema/comment.schema.js +66 -0
  87. package/esm/schema/coupon.schema.js +206 -0
  88. package/esm/schema/coupon_code.schema.js +11 -0
  89. package/esm/schema/coupon_set.schema.js +25 -0
  90. package/esm/schema/credit_note.schema.js +285 -0
  91. package/esm/schema/currency.schema.js +29 -0
  92. package/esm/schema/customer.schema.js +983 -0
  93. package/esm/schema/customer_entitlement.schema.js +11 -0
  94. package/esm/schema/differential_price.schema.js +65 -0
  95. package/esm/schema/entitlement.schema.js +24 -0
  96. package/esm/schema/entitlement_override.schema.js +30 -0
  97. package/esm/schema/estimate.schema.js +1522 -0
  98. package/esm/schema/export.schema.js +1542 -0
  99. package/esm/schema/feature.schema.js +34 -0
  100. package/esm/schema/gift.schema.js +274 -0
  101. package/esm/schema/hosted_page.schema.js +1646 -0
  102. package/esm/schema/in_app_subscription.schema.js +65 -0
  103. package/esm/schema/index.js +64 -0
  104. package/esm/schema/invoice.schema.js +1464 -0
  105. package/esm/schema/item.schema.js +88 -0
  106. package/esm/schema/item_entitlement.schema.js +42 -0
  107. package/esm/schema/item_family.schema.js +18 -0
  108. package/esm/schema/item_price.schema.js +187 -0
  109. package/esm/schema/non_subscription.schema.js +25 -0
  110. package/esm/schema/offer_event.schema.js +10 -0
  111. package/esm/schema/offer_fulfillment.schema.js +17 -0
  112. package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
  113. package/esm/schema/omnichannel_subscription.schema.js +86 -0
  114. package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
  115. package/esm/schema/order.schema.js +270 -0
  116. package/esm/schema/payment_intent.schema.js +114 -0
  117. package/esm/schema/payment_schedule_scheme.schema.js +17 -0
  118. package/esm/schema/payment_source.schema.js +355 -0
  119. package/esm/schema/payment_voucher.schema.js +54 -0
  120. package/esm/schema/personalized_offer.schema.js +25 -0
  121. package/esm/schema/plan.schema.js +222 -0
  122. package/esm/schema/portal_session.schema.js +19 -0
  123. package/esm/schema/price_variant.schema.js +33 -0
  124. package/esm/schema/pricing_page_session.schema.js +132 -0
  125. package/esm/schema/promotional_credit.schema.js +75 -0
  126. package/esm/schema/purchase.schema.js +269 -0
  127. package/esm/schema/quote.schema.js +1554 -0
  128. package/esm/schema/ramp.schema.js +206 -0
  129. package/esm/schema/recorded_purchase.schema.js +29 -0
  130. package/esm/schema/resource_migration.schema.js +11 -0
  131. package/esm/schema/site_migration_detail.schema.js +78 -0
  132. package/esm/schema/subscription.schema.js +2990 -0
  133. package/esm/schema/subscription_entitlement.schema.js +22 -0
  134. package/esm/schema/time_machine.schema.js +14 -0
  135. package/esm/schema/transaction.schema.js +67 -0
  136. package/esm/schema/unbilled_charge.schema.js +110 -0
  137. package/esm/schema/usage.schema.js +90 -0
  138. package/esm/schema/usage_charge.schema.js +14 -0
  139. package/esm/schema/usage_event.schema.js +25 -0
  140. package/esm/schema/usage_file.schema.js +10 -0
  141. package/esm/schema/usage_summary.schema.js +14 -0
  142. package/esm/schema/virtual_bank_account.schema.js +40 -0
  143. package/esm/schema/webhook_endpoint.schema.js +501 -0
  144. package/esm/validationLoader.js +56 -0
  145. package/package.json +4 -1
  146. package/types/core.d.ts +2 -0
  147. package/types/index.d.ts +16 -0
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // Generated Zod schemas: SubscriptionEntitlement
3
+ // Actions: subscriptionEntitlementsForSubscription, setSubscriptionEntitlementAvailability
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema = exports.SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //SubscriptionEntitlement.subscriptionEntitlementsForSubscription
9
+ const SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema = zod_1.z.looseObject({
10
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
11
+ offset: zod_1.z.string().max(1000).optional(),
12
+ include_drafts: zod_1.z.boolean().default(false).optional(),
13
+ embed: zod_1.z.string().max(1000).optional(),
14
+ include_scheduled_overrides: zod_1.z.boolean().default(false).optional(),
15
+ });
16
+ exports.SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema = SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema;
17
+ //SubscriptionEntitlement.setSubscriptionEntitlementAvailability
18
+ const SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementSubscriptionEntitlementsSchema = zod_1.z.object({
19
+ feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
20
+ });
21
+ const SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema = zod_1.z.looseObject({
22
+ is_enabled: zod_1.z.boolean(),
23
+ subscription_entitlements: SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementSubscriptionEntitlementsSchema.optional(),
24
+ });
25
+ exports.SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema = SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // Generated Zod schemas: TimeMachine
3
+ // Actions: startAfresh, travelForward
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TravelForwardTimeMachineBodySchema = exports.StartAfreshTimeMachineBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //TimeMachine.startAfresh
9
+ const StartAfreshTimeMachineBodySchema = zod_1.z.looseObject({
10
+ genesis_time: zod_1.z.number().int().optional(),
11
+ });
12
+ exports.StartAfreshTimeMachineBodySchema = StartAfreshTimeMachineBodySchema;
13
+ //TimeMachine.travelForward
14
+ const TravelForwardTimeMachineBodySchema = zod_1.z.looseObject({
15
+ destination_time: zod_1.z.number().int().optional(),
16
+ });
17
+ exports.TravelForwardTimeMachineBodySchema = TravelForwardTimeMachineBodySchema;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ // Generated Zod schemas: Transaction
3
+ // Actions: createAuthorization, recordRefund, reconcile, refund, transactionsForCustomer, transactionsForSubscription, paymentsForInvoice, deleteOfflineTransaction
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DeleteOfflineTransactionTransactionBodySchema = exports.PaymentsForInvoiceTransactionBodySchema = exports.TransactionsForSubscriptionTransactionBodySchema = exports.TransactionsForCustomerTransactionBodySchema = exports.RefundTransactionBodySchema = exports.ReconcileTransactionBodySchema = exports.RecordRefundTransactionBodySchema = exports.CreateAuthorizationTransactionBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //Transaction.createAuthorization
9
+ const CreateAuthorizationTransactionBodySchema = zod_1.z.looseObject({
10
+ customer_id: zod_1.z.string().max(50),
11
+ payment_source_id: zod_1.z.string().max(40).optional(),
12
+ currency_code: zod_1.z.string().max(3).optional(),
13
+ amount: zod_1.z.number().int().min(1),
14
+ });
15
+ exports.CreateAuthorizationTransactionBodySchema = CreateAuthorizationTransactionBodySchema;
16
+ //Transaction.recordRefund
17
+ const RecordRefundTransactionBodySchema = zod_1.z.looseObject({
18
+ amount: zod_1.z.number().int().min(1).optional(),
19
+ payment_method: zod_1.z.enum([
20
+ 'cash',
21
+ 'check',
22
+ 'chargeback',
23
+ 'bank_transfer',
24
+ 'other',
25
+ 'app_store',
26
+ 'play_store',
27
+ 'custom',
28
+ ]),
29
+ date: zod_1.z.number().int(),
30
+ reference_number: zod_1.z.string().max(100).optional(),
31
+ custom_payment_method_id: zod_1.z.string().max(50).optional(),
32
+ comment: zod_1.z.string().max(300).optional(),
33
+ });
34
+ exports.RecordRefundTransactionBodySchema = RecordRefundTransactionBodySchema;
35
+ //Transaction.reconcile
36
+ const ReconcileTransactionBodySchema = zod_1.z.looseObject({
37
+ id_at_gateway: zod_1.z.string().max(100).optional(),
38
+ customer_id: zod_1.z.string().max(50).optional(),
39
+ status: zod_1.z.enum(['success', 'failure']).optional(),
40
+ });
41
+ exports.ReconcileTransactionBodySchema = ReconcileTransactionBodySchema;
42
+ //Transaction.refund
43
+ const RefundTransactionBodySchema = zod_1.z.looseObject({
44
+ amount: zod_1.z.number().int().min(1).optional(),
45
+ comment: zod_1.z.string().max(300).optional(),
46
+ });
47
+ exports.RefundTransactionBodySchema = RefundTransactionBodySchema;
48
+ //Transaction.transactionsForCustomer
49
+ const TransactionsForCustomerTransactionBodySchema = zod_1.z.looseObject({
50
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
51
+ offset: zod_1.z.string().max(1000).optional(),
52
+ });
53
+ exports.TransactionsForCustomerTransactionBodySchema = TransactionsForCustomerTransactionBodySchema;
54
+ //Transaction.transactionsForSubscription
55
+ const TransactionsForSubscriptionTransactionBodySchema = zod_1.z.looseObject({
56
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
57
+ offset: zod_1.z.string().max(1000).optional(),
58
+ });
59
+ exports.TransactionsForSubscriptionTransactionBodySchema = TransactionsForSubscriptionTransactionBodySchema;
60
+ //Transaction.paymentsForInvoice
61
+ const PaymentsForInvoiceTransactionBodySchema = zod_1.z.looseObject({
62
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
63
+ offset: zod_1.z.string().max(1000).optional(),
64
+ });
65
+ exports.PaymentsForInvoiceTransactionBodySchema = PaymentsForInvoiceTransactionBodySchema;
66
+ //Transaction.deleteOfflineTransaction
67
+ const DeleteOfflineTransactionTransactionBodySchema = zod_1.z.looseObject({
68
+ comment: zod_1.z.string().max(300).optional(),
69
+ });
70
+ exports.DeleteOfflineTransactionTransactionBodySchema = DeleteOfflineTransactionTransactionBodySchema;
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ // Generated Zod schemas: UnbilledCharge
3
+ // Actions: createUnbilledCharge, create, invoiceUnbilledCharges, invoiceNowEstimate
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InvoiceNowEstimateUnbilledChargeBodySchema = exports.InvoiceUnbilledChargesUnbilledChargeBodySchema = exports.CreateUnbilledChargeBodySchema = exports.CreateUnbilledChargeUnbilledChargeBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //UnbilledCharge.createUnbilledCharge
9
+ const CreateUnbilledChargeUnbilledChargeAddonsSchema = zod_1.z.object({
10
+ id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
11
+ quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
12
+ unit_price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
13
+ quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
14
+ unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
15
+ date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
16
+ date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
17
+ });
18
+ const CreateUnbilledChargeUnbilledChargeChargesSchema = zod_1.z.object({
19
+ amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
20
+ amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
21
+ description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
22
+ taxable: zod_1.z.array(zod_1.z.boolean().default(true).optional()).optional(),
23
+ tax_profile_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
24
+ avalara_tax_code: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
25
+ hsn_code: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
26
+ taxjar_product_code: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
27
+ avalara_sale_type: zod_1.z
28
+ .array(zod_1.z.enum(['wholesale', 'retail', 'consumed', 'vendor_use']).optional())
29
+ .optional(),
30
+ avalara_transaction_type: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
31
+ avalara_service_type: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
32
+ date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
33
+ date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
34
+ });
35
+ const CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsSchema = zod_1.z.object({
36
+ provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
37
+ field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
38
+ field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
39
+ });
40
+ const CreateUnbilledChargeUnbilledChargeBodySchema = zod_1.z.looseObject({
41
+ subscription_id: zod_1.z.string().max(50),
42
+ currency_code: zod_1.z.string().max(3).optional(),
43
+ addons: CreateUnbilledChargeUnbilledChargeAddonsSchema.optional(),
44
+ charges: CreateUnbilledChargeUnbilledChargeChargesSchema.optional(),
45
+ tax_providers_fields: CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsSchema.optional(),
46
+ });
47
+ exports.CreateUnbilledChargeUnbilledChargeBodySchema = CreateUnbilledChargeUnbilledChargeBodySchema;
48
+ //UnbilledCharge.create
49
+ const CreateUnbilledChargeItemPricesSchema = zod_1.z.object({
50
+ item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
51
+ quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
52
+ quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
53
+ unit_price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
54
+ unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
55
+ date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
56
+ date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
57
+ });
58
+ const CreateUnbilledChargeItemTiersSchema = zod_1.z.object({
59
+ item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
60
+ starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
61
+ ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
62
+ price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
63
+ starting_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
64
+ ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
65
+ price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
66
+ pricing_type: zod_1.z
67
+ .array(zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional())
68
+ .optional(),
69
+ package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
70
+ });
71
+ const CreateUnbilledChargeChargesSchema = zod_1.z.object({
72
+ amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
73
+ amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
74
+ description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
75
+ taxable: zod_1.z.array(zod_1.z.boolean().default(true).optional()).optional(),
76
+ tax_profile_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
77
+ avalara_tax_code: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
78
+ hsn_code: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
79
+ taxjar_product_code: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
80
+ avalara_sale_type: zod_1.z
81
+ .array(zod_1.z.enum(['wholesale', 'retail', 'consumed', 'vendor_use']).optional())
82
+ .optional(),
83
+ avalara_transaction_type: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
84
+ avalara_service_type: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
85
+ date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
86
+ date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
87
+ });
88
+ const CreateUnbilledChargeTaxProvidersFieldsSchema = zod_1.z.object({
89
+ provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
90
+ field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
91
+ field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
92
+ });
93
+ const CreateUnbilledChargeBodySchema = zod_1.z.looseObject({
94
+ subscription_id: zod_1.z.string().max(50),
95
+ currency_code: zod_1.z.string().max(3).optional(),
96
+ item_prices: CreateUnbilledChargeItemPricesSchema.optional(),
97
+ item_tiers: CreateUnbilledChargeItemTiersSchema.optional(),
98
+ charges: CreateUnbilledChargeChargesSchema.optional(),
99
+ tax_providers_fields: CreateUnbilledChargeTaxProvidersFieldsSchema.optional(),
100
+ });
101
+ exports.CreateUnbilledChargeBodySchema = CreateUnbilledChargeBodySchema;
102
+ //UnbilledCharge.invoiceUnbilledCharges
103
+ const InvoiceUnbilledChargesUnbilledChargeBodySchema = zod_1.z.looseObject({
104
+ subscription_id: zod_1.z.string().max(50).optional(),
105
+ customer_id: zod_1.z.string().max(50).optional(),
106
+ });
107
+ exports.InvoiceUnbilledChargesUnbilledChargeBodySchema = InvoiceUnbilledChargesUnbilledChargeBodySchema;
108
+ //UnbilledCharge.invoiceNowEstimate
109
+ const InvoiceNowEstimateUnbilledChargeBodySchema = zod_1.z.looseObject({
110
+ subscription_id: zod_1.z.string().max(50).optional(),
111
+ customer_id: zod_1.z.string().max(50).optional(),
112
+ });
113
+ exports.InvoiceNowEstimateUnbilledChargeBodySchema = InvoiceNowEstimateUnbilledChargeBodySchema;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // Generated Zod schemas: Usage
3
+ // Actions: create, retrieve, delete, list, pdf
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PdfUsageBodySchema = exports.ListUsageBodySchema = exports.DeleteUsageBodySchema = exports.RetrieveUsageBodySchema = exports.CreateUsageBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //Usage.create
9
+ const CreateUsageBodySchema = zod_1.z.looseObject({
10
+ id: zod_1.z.string().max(100).optional(),
11
+ item_price_id: zod_1.z.string().max(100),
12
+ quantity: zod_1.z.string().max(40),
13
+ usage_date: zod_1.z.number().int(),
14
+ dedupe_option: zod_1.z.enum(['skip', 'update_existing']).optional(),
15
+ note: zod_1.z.string().max(500).optional(),
16
+ });
17
+ exports.CreateUsageBodySchema = CreateUsageBodySchema;
18
+ //Usage.retrieve
19
+ const RetrieveUsageBodySchema = zod_1.z.looseObject({
20
+ id: zod_1.z.string().max(100),
21
+ });
22
+ exports.RetrieveUsageBodySchema = RetrieveUsageBodySchema;
23
+ //Usage.delete
24
+ const DeleteUsageBodySchema = zod_1.z.looseObject({
25
+ id: zod_1.z.string().max(100),
26
+ });
27
+ exports.DeleteUsageBodySchema = DeleteUsageBodySchema;
28
+ //Usage.list
29
+ const ListUsageIdSchema = zod_1.z.object({
30
+ is: zod_1.z.string().min(1).optional(),
31
+ is_not: zod_1.z.string().min(1).optional(),
32
+ starts_with: zod_1.z.string().min(1).optional(),
33
+ });
34
+ const ListUsageSubscriptionIdSchema = zod_1.z.object({
35
+ is: zod_1.z.string().min(1).optional(),
36
+ is_not: zod_1.z.string().min(1).optional(),
37
+ starts_with: zod_1.z.string().min(1).optional(),
38
+ });
39
+ const ListUsageUsageDateSchema = zod_1.z.object({
40
+ after: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
41
+ before: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
42
+ on: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
43
+ between: zod_1.z.string().regex(RegExp('^[d{10},d{10}]$')).optional(),
44
+ });
45
+ const ListUsageUpdatedAtSchema = zod_1.z.object({
46
+ after: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
47
+ before: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
48
+ on: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
49
+ between: zod_1.z.string().regex(RegExp('^[d{10},d{10}]$')).optional(),
50
+ });
51
+ const ListUsageItemPriceIdSchema = zod_1.z.object({
52
+ is: zod_1.z.string().min(1).optional(),
53
+ is_not: zod_1.z.string().min(1).optional(),
54
+ starts_with: zod_1.z.string().min(1).optional(),
55
+ });
56
+ const ListUsageInvoiceIdSchema = zod_1.z.object({
57
+ is: zod_1.z.string().min(1).optional(),
58
+ is_not: zod_1.z.string().min(1).optional(),
59
+ starts_with: zod_1.z.string().min(1).optional(),
60
+ is_present: zod_1.z.enum(['true', 'false']).optional(),
61
+ });
62
+ const ListUsageSourceSchema = zod_1.z.object({
63
+ is: zod_1.z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
64
+ is_not: zod_1.z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
65
+ in: zod_1.z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
66
+ not_in: zod_1.z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
67
+ });
68
+ const ListUsageSortBySchema = zod_1.z.looseObject({
69
+ asc: zod_1.z.enum(['usage_date', 'updated_at']).optional(),
70
+ desc: zod_1.z.enum(['usage_date', 'updated_at']).optional(),
71
+ });
72
+ const ListUsageBodySchema = zod_1.z.looseObject({
73
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
74
+ offset: zod_1.z.string().max(1000).optional(),
75
+ id: ListUsageIdSchema.optional(),
76
+ subscription_id: ListUsageSubscriptionIdSchema.optional(),
77
+ usage_date: ListUsageUsageDateSchema.optional(),
78
+ updated_at: ListUsageUpdatedAtSchema.optional(),
79
+ item_price_id: ListUsageItemPriceIdSchema.optional(),
80
+ invoice_id: ListUsageInvoiceIdSchema.optional(),
81
+ source: ListUsageSourceSchema.optional(),
82
+ sort_by: ListUsageSortBySchema.optional(),
83
+ });
84
+ exports.ListUsageBodySchema = ListUsageBodySchema;
85
+ //Usage.pdf
86
+ const PdfUsageInvoiceSchema = zod_1.z.object({
87
+ id: zod_1.z.string().max(50),
88
+ });
89
+ const PdfUsageBodySchema = zod_1.z.looseObject({
90
+ disposition_type: zod_1.z.enum(['attachment', 'inline']).optional(),
91
+ invoice: PdfUsageInvoiceSchema.optional(),
92
+ });
93
+ exports.PdfUsageBodySchema = PdfUsageBodySchema;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // Generated Zod schemas: UsageCharge
3
+ // Actions: retrieveUsageChargesForSubscription
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RetrieveUsageChargesForSubscriptionUsageChargeBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //UsageCharge.retrieveUsageChargesForSubscription
9
+ const RetrieveUsageChargesForSubscriptionUsageChargeFeatureIdSchema = zod_1.z.object({
10
+ is: zod_1.z.string().min(1).optional(),
11
+ });
12
+ const RetrieveUsageChargesForSubscriptionUsageChargeBodySchema = zod_1.z.looseObject({
13
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
14
+ offset: zod_1.z.string().max(1000).optional(),
15
+ feature_id: RetrieveUsageChargesForSubscriptionUsageChargeFeatureIdSchema.optional(),
16
+ });
17
+ exports.RetrieveUsageChargesForSubscriptionUsageChargeBodySchema = RetrieveUsageChargesForSubscriptionUsageChargeBodySchema;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // Generated Zod schemas: UsageEvent
3
+ // Actions: create, batchIngest
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BatchIngestUsageEventBodySchema = exports.CreateUsageEventBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //UsageEvent.create
9
+ const CreateUsageEventPropertiesSchema = zod_1.z.looseObject({});
10
+ const CreateUsageEventBodySchema = zod_1.z.looseObject({
11
+ deduplication_id: zod_1.z.string().max(36),
12
+ subscription_id: zod_1.z.string().max(50),
13
+ usage_timestamp: zod_1.z.number().int(),
14
+ properties: CreateUsageEventPropertiesSchema,
15
+ });
16
+ exports.CreateUsageEventBodySchema = CreateUsageEventBodySchema;
17
+ //UsageEvent.batchIngest
18
+ const BatchIngestUsageEventPropertiesItemSchema = zod_1.z.looseObject({});
19
+ const BatchIngestUsageEventEventsSchema = zod_1.z.object({
20
+ deduplication_id: zod_1.z.array(zod_1.z.string().max(36).optional()),
21
+ subscription_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
22
+ usage_timestamp: zod_1.z.array(zod_1.z.number().int().optional()),
23
+ properties: zod_1.z.array(BatchIngestUsageEventPropertiesItemSchema.optional()),
24
+ });
25
+ const BatchIngestUsageEventBodySchema = zod_1.z.looseObject({
26
+ events: BatchIngestUsageEventEventsSchema.optional(),
27
+ });
28
+ exports.BatchIngestUsageEventBodySchema = BatchIngestUsageEventBodySchema;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // Generated Zod schemas: UsageFile
3
+ // Actions: uploadUrl
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.UploadUrlUsageFileBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //UsageFile.uploadUrl
9
+ const UploadUrlUsageFileBodySchema = zod_1.z.looseObject({
10
+ file_name: zod_1.z.string().max(150),
11
+ mime_type: zod_1.z.string().max(100),
12
+ });
13
+ exports.UploadUrlUsageFileBodySchema = UploadUrlUsageFileBodySchema;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // Generated Zod schemas: UsageSummary
3
+ // Actions: retrieveUsageSummaryForSubscription
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //UsageSummary.retrieveUsageSummaryForSubscription
9
+ const RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema = zod_1.z.looseObject({
10
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
11
+ offset: zod_1.z.string().max(1000).optional(),
12
+ feature_id: zod_1.z.string().max(100),
13
+ window_size: zod_1.z.enum(['month', 'week', 'day', 'hour', 'minute']).optional(),
14
+ timeframe_start: zod_1.z.number().int().optional(),
15
+ timeframe_end: zod_1.z.number().int().optional(),
16
+ });
17
+ exports.RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema = RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ // Generated Zod schemas: VirtualBankAccount
3
+ // Actions: createUsingPermanentToken, create
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CreateVirtualBankAccountBodySchema = exports.CreateUsingPermanentTokenVirtualBankAccountBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //VirtualBankAccount.createUsingPermanentToken
9
+ const CreateUsingPermanentTokenVirtualBankAccountBodySchema = zod_1.z.looseObject({
10
+ customer_id: zod_1.z.string().max(50),
11
+ reference_id: zod_1.z.string().max(150),
12
+ gateway_account_id: zod_1.z.string().max(50).optional(),
13
+ scheme: zod_1.z
14
+ .enum([
15
+ 'ach_credit',
16
+ 'sepa_credit',
17
+ 'us_automated_bank_transfer',
18
+ 'gb_automated_bank_transfer',
19
+ 'eu_automated_bank_transfer',
20
+ 'jp_automated_bank_transfer',
21
+ 'mx_automated_bank_transfer',
22
+ ])
23
+ .optional(),
24
+ });
25
+ exports.CreateUsingPermanentTokenVirtualBankAccountBodySchema = CreateUsingPermanentTokenVirtualBankAccountBodySchema;
26
+ //VirtualBankAccount.create
27
+ const CreateVirtualBankAccountBodySchema = zod_1.z.looseObject({
28
+ customer_id: zod_1.z.string().max(50),
29
+ email: zod_1.z.string().email().max(70).optional(),
30
+ gateway_account_id: zod_1.z.string().max(50).optional(),
31
+ scheme: zod_1.z
32
+ .enum([
33
+ 'ach_credit',
34
+ 'sepa_credit',
35
+ 'us_automated_bank_transfer',
36
+ 'gb_automated_bank_transfer',
37
+ 'eu_automated_bank_transfer',
38
+ 'jp_automated_bank_transfer',
39
+ 'mx_automated_bank_transfer',
40
+ ])
41
+ .optional(),
42
+ });
43
+ exports.CreateVirtualBankAccountBodySchema = CreateVirtualBankAccountBodySchema;