chargebee 3.26.0 → 3.27.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 (163) hide show
  1. package/CHANGELOG.md +7 -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 +269 -0
  10. package/cjs/schema/address.schema.js +35 -0
  11. package/cjs/schema/alert.schema.js +74 -0
  12. package/cjs/schema/alert_status.schema.js +31 -0
  13. package/cjs/schema/attached_item.schema.js +144 -0
  14. package/cjs/schema/business_entity.schema.js +46 -0
  15. package/cjs/schema/card.schema.js +165 -0
  16. package/cjs/schema/comment.schema.js +69 -0
  17. package/cjs/schema/coupon.schema.js +323 -0
  18. package/cjs/schema/coupon_code.schema.js +49 -0
  19. package/cjs/schema/coupon_set.schema.js +88 -0
  20. package/cjs/schema/credit_note.schema.js +502 -0
  21. package/cjs/schema/currency.schema.js +32 -0
  22. package/cjs/schema/customer.schema.js +1201 -0
  23. package/cjs/schema/customer_entitlement.schema.js +14 -0
  24. package/cjs/schema/differential_price.schema.js +106 -0
  25. package/cjs/schema/entitlement.schema.js +54 -0
  26. package/cjs/schema/entitlement_override.schema.js +35 -0
  27. package/cjs/schema/estimate.schema.js +1535 -0
  28. package/cjs/schema/event.schema.js +1060 -0
  29. package/cjs/schema/export.schema.js +3385 -0
  30. package/cjs/schema/feature.schema.js +78 -0
  31. package/cjs/schema/gift.schema.js +293 -0
  32. package/cjs/schema/grant_block.schema.js +47 -0
  33. package/cjs/schema/hosted_page.schema.js +1777 -0
  34. package/cjs/schema/in_app_subscription.schema.js +68 -0
  35. package/cjs/schema/index.js +88 -0
  36. package/cjs/schema/invoice.schema.js +1685 -0
  37. package/cjs/schema/item.schema.js +195 -0
  38. package/cjs/schema/item_entitlement.schema.js +45 -0
  39. package/cjs/schema/item_family.schema.js +57 -0
  40. package/cjs/schema/item_price.schema.js +335 -0
  41. package/cjs/schema/ledger_account_balance.schema.js +21 -0
  42. package/cjs/schema/ledger_operation.schema.js +104 -0
  43. package/cjs/schema/meter.schema.js +13 -0
  44. package/cjs/schema/metered_feature.schema.js +20 -0
  45. package/cjs/schema/non_subscription.schema.js +28 -0
  46. package/cjs/schema/offer_event.schema.js +13 -0
  47. package/cjs/schema/offer_fulfillment.schema.js +20 -0
  48. package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
  49. package/cjs/schema/omnichannel_subscription.schema.js +122 -0
  50. package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
  51. package/cjs/schema/order.schema.js +441 -0
  52. package/cjs/schema/payment_intent.schema.js +127 -0
  53. package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
  54. package/cjs/schema/payment_source.schema.js +630 -0
  55. package/cjs/schema/payment_voucher.schema.js +57 -0
  56. package/cjs/schema/personalized_offer.schema.js +28 -0
  57. package/cjs/schema/plan.schema.js +363 -0
  58. package/cjs/schema/portal_session.schema.js +22 -0
  59. package/cjs/schema/price_variant.schema.js +93 -0
  60. package/cjs/schema/pricing_page_session.schema.js +135 -0
  61. package/cjs/schema/promotional_credit.schema.js +78 -0
  62. package/cjs/schema/promotional_grant.schema.js +17 -0
  63. package/cjs/schema/purchase.schema.js +277 -0
  64. package/cjs/schema/quote.schema.js +1667 -0
  65. package/cjs/schema/ramp.schema.js +245 -0
  66. package/cjs/schema/recorded_purchase.schema.js +32 -0
  67. package/cjs/schema/resource_migration.schema.js +14 -0
  68. package/cjs/schema/site_migration_detail.schema.js +81 -0
  69. package/cjs/schema/subscription.schema.js +3344 -0
  70. package/cjs/schema/subscription_entitlement.schema.js +25 -0
  71. package/cjs/schema/time_machine.schema.js +17 -0
  72. package/cjs/schema/transaction.schema.js +744 -0
  73. package/cjs/schema/unbilled_charge.schema.js +139 -0
  74. package/cjs/schema/usage.schema.js +93 -0
  75. package/cjs/schema/usage_charge.schema.js +17 -0
  76. package/cjs/schema/usage_event.schema.js +28 -0
  77. package/cjs/schema/usage_file.schema.js +13 -0
  78. package/cjs/schema/usage_summary.schema.js +17 -0
  79. package/cjs/schema/virtual_bank_account.schema.js +71 -0
  80. package/cjs/schema/webhook_endpoint.schema.js +508 -0
  81. package/cjs/validationLoader.js +59 -0
  82. package/esm/RequestWrapper.js +27 -0
  83. package/esm/chargebee.esm.js +2 -0
  84. package/esm/chargebee.esm.worker.js +1 -0
  85. package/esm/chargebeeZodValidationError.js +14 -0
  86. package/esm/createChargebee.js +5 -0
  87. package/esm/environment.js +1 -1
  88. package/esm/schema/addon.schema.js +266 -0
  89. package/esm/schema/address.schema.js +32 -0
  90. package/esm/schema/alert.schema.js +71 -0
  91. package/esm/schema/alert_status.schema.js +28 -0
  92. package/esm/schema/attached_item.schema.js +141 -0
  93. package/esm/schema/business_entity.schema.js +43 -0
  94. package/esm/schema/card.schema.js +162 -0
  95. package/esm/schema/comment.schema.js +66 -0
  96. package/esm/schema/coupon.schema.js +320 -0
  97. package/esm/schema/coupon_code.schema.js +46 -0
  98. package/esm/schema/coupon_set.schema.js +85 -0
  99. package/esm/schema/credit_note.schema.js +499 -0
  100. package/esm/schema/currency.schema.js +29 -0
  101. package/esm/schema/customer.schema.js +1198 -0
  102. package/esm/schema/customer_entitlement.schema.js +11 -0
  103. package/esm/schema/differential_price.schema.js +103 -0
  104. package/esm/schema/entitlement.schema.js +51 -0
  105. package/esm/schema/entitlement_override.schema.js +32 -0
  106. package/esm/schema/estimate.schema.js +1532 -0
  107. package/esm/schema/event.schema.js +1057 -0
  108. package/esm/schema/export.schema.js +3382 -0
  109. package/esm/schema/feature.schema.js +75 -0
  110. package/esm/schema/gift.schema.js +290 -0
  111. package/esm/schema/grant_block.schema.js +44 -0
  112. package/esm/schema/hosted_page.schema.js +1774 -0
  113. package/esm/schema/in_app_subscription.schema.js +65 -0
  114. package/esm/schema/index.js +72 -0
  115. package/esm/schema/invoice.schema.js +1682 -0
  116. package/esm/schema/item.schema.js +192 -0
  117. package/esm/schema/item_entitlement.schema.js +42 -0
  118. package/esm/schema/item_family.schema.js +54 -0
  119. package/esm/schema/item_price.schema.js +332 -0
  120. package/esm/schema/ledger_account_balance.schema.js +18 -0
  121. package/esm/schema/ledger_operation.schema.js +101 -0
  122. package/esm/schema/meter.schema.js +10 -0
  123. package/esm/schema/metered_feature.schema.js +17 -0
  124. package/esm/schema/non_subscription.schema.js +25 -0
  125. package/esm/schema/offer_event.schema.js +10 -0
  126. package/esm/schema/offer_fulfillment.schema.js +17 -0
  127. package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
  128. package/esm/schema/omnichannel_subscription.schema.js +119 -0
  129. package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
  130. package/esm/schema/order.schema.js +438 -0
  131. package/esm/schema/payment_intent.schema.js +124 -0
  132. package/esm/schema/payment_schedule_scheme.schema.js +17 -0
  133. package/esm/schema/payment_source.schema.js +627 -0
  134. package/esm/schema/payment_voucher.schema.js +54 -0
  135. package/esm/schema/personalized_offer.schema.js +25 -0
  136. package/esm/schema/plan.schema.js +360 -0
  137. package/esm/schema/portal_session.schema.js +19 -0
  138. package/esm/schema/price_variant.schema.js +90 -0
  139. package/esm/schema/pricing_page_session.schema.js +132 -0
  140. package/esm/schema/promotional_credit.schema.js +75 -0
  141. package/esm/schema/promotional_grant.schema.js +14 -0
  142. package/esm/schema/purchase.schema.js +274 -0
  143. package/esm/schema/quote.schema.js +1664 -0
  144. package/esm/schema/ramp.schema.js +242 -0
  145. package/esm/schema/recorded_purchase.schema.js +29 -0
  146. package/esm/schema/resource_migration.schema.js +11 -0
  147. package/esm/schema/site_migration_detail.schema.js +78 -0
  148. package/esm/schema/subscription.schema.js +3341 -0
  149. package/esm/schema/subscription_entitlement.schema.js +22 -0
  150. package/esm/schema/time_machine.schema.js +14 -0
  151. package/esm/schema/transaction.schema.js +741 -0
  152. package/esm/schema/unbilled_charge.schema.js +136 -0
  153. package/esm/schema/usage.schema.js +90 -0
  154. package/esm/schema/usage_charge.schema.js +14 -0
  155. package/esm/schema/usage_event.schema.js +25 -0
  156. package/esm/schema/usage_file.schema.js +10 -0
  157. package/esm/schema/usage_summary.schema.js +14 -0
  158. package/esm/schema/virtual_bank_account.schema.js +68 -0
  159. package/esm/schema/webhook_endpoint.schema.js +505 -0
  160. package/esm/validationLoader.js +56 -0
  161. package/package.json +4 -1
  162. package/types/core.d.ts +2 -0
  163. package/types/index.d.ts +16 -0
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ // Generated Zod schemas: UnbilledCharge
3
+ // Actions: createUnbilledCharge, create, invoiceUnbilledCharges, list, invoiceNowEstimate
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InvoiceNowEstimateUnbilledChargeBodySchema = exports.ListUnbilledChargeBodySchema = 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.list
109
+ const ListUnbilledChargeSubscriptionIdSchema = zod_1.z.object({
110
+ is: zod_1.z.string().min(1).optional(),
111
+ is_not: zod_1.z.string().min(1).optional(),
112
+ starts_with: zod_1.z.string().min(1).optional(),
113
+ is_present: zod_1.z.enum(['true', 'false']).optional(),
114
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
115
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
116
+ });
117
+ const ListUnbilledChargeCustomerIdSchema = zod_1.z.object({
118
+ is: zod_1.z.string().min(1).optional(),
119
+ is_not: zod_1.z.string().min(1).optional(),
120
+ starts_with: zod_1.z.string().min(1).optional(),
121
+ is_present: zod_1.z.enum(['true', 'false']).optional(),
122
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
123
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
124
+ });
125
+ const ListUnbilledChargeBodySchema = zod_1.z.looseObject({
126
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
127
+ offset: zod_1.z.string().max(1000).optional(),
128
+ include_deleted: zod_1.z.boolean().default(false).optional(),
129
+ is_voided: zod_1.z.boolean().default(false).optional(),
130
+ subscription_id: ListUnbilledChargeSubscriptionIdSchema.optional(),
131
+ customer_id: ListUnbilledChargeCustomerIdSchema.optional(),
132
+ });
133
+ exports.ListUnbilledChargeBodySchema = ListUnbilledChargeBodySchema;
134
+ //UnbilledCharge.invoiceNowEstimate
135
+ const InvoiceNowEstimateUnbilledChargeBodySchema = zod_1.z.looseObject({
136
+ subscription_id: zod_1.z.string().max(50).optional(),
137
+ customer_id: zod_1.z.string().max(50).optional(),
138
+ });
139
+ 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,71 @@
1
+ "use strict";
2
+ // Generated Zod schemas: VirtualBankAccount
3
+ // Actions: createUsingPermanentToken, create, list
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListVirtualBankAccountBodySchema = 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;
44
+ //VirtualBankAccount.list
45
+ const ListVirtualBankAccountCustomerIdSchema = zod_1.z.object({
46
+ is: zod_1.z.string().min(1).optional(),
47
+ is_not: zod_1.z.string().min(1).optional(),
48
+ starts_with: zod_1.z.string().min(1).optional(),
49
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
50
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
51
+ });
52
+ const ListVirtualBankAccountUpdatedAtSchema = zod_1.z.object({
53
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
54
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
55
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
56
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
57
+ });
58
+ const ListVirtualBankAccountCreatedAtSchema = zod_1.z.object({
59
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
60
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
61
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
62
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
63
+ });
64
+ const ListVirtualBankAccountBodySchema = zod_1.z.looseObject({
65
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
66
+ offset: zod_1.z.string().max(1000).optional(),
67
+ customer_id: ListVirtualBankAccountCustomerIdSchema.optional(),
68
+ updated_at: ListVirtualBankAccountUpdatedAtSchema.optional(),
69
+ created_at: ListVirtualBankAccountCreatedAtSchema.optional(),
70
+ });
71
+ exports.ListVirtualBankAccountBodySchema = ListVirtualBankAccountBodySchema;