chargebee 3.26.0 → 3.28.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 (172) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/README.md +131 -0
  3. package/cjs/RequestWrapper.js +130 -12
  4. package/cjs/chargebee.cjs.js +5 -0
  5. package/cjs/chargebee.cjs.worker.js +2 -0
  6. package/cjs/chargebeeZodValidationError.js +18 -0
  7. package/cjs/createChargebee.js +23 -2
  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/telemetry/TelemetryAdapter.js +145 -0
  82. package/cjs/telemetry/index.js +28 -0
  83. package/cjs/telemetry/otel.js +66 -0
  84. package/cjs/telemetry/types.js +47 -0
  85. package/cjs/validationLoader.js +59 -0
  86. package/esm/RequestWrapper.js +130 -12
  87. package/esm/chargebee.esm.js +3 -0
  88. package/esm/chargebee.esm.worker.js +1 -0
  89. package/esm/chargebeeZodValidationError.js +14 -0
  90. package/esm/createChargebee.js +23 -2
  91. package/esm/environment.js +1 -1
  92. package/esm/schema/addon.schema.js +266 -0
  93. package/esm/schema/address.schema.js +32 -0
  94. package/esm/schema/alert.schema.js +71 -0
  95. package/esm/schema/alert_status.schema.js +28 -0
  96. package/esm/schema/attached_item.schema.js +141 -0
  97. package/esm/schema/business_entity.schema.js +43 -0
  98. package/esm/schema/card.schema.js +162 -0
  99. package/esm/schema/comment.schema.js +66 -0
  100. package/esm/schema/coupon.schema.js +320 -0
  101. package/esm/schema/coupon_code.schema.js +46 -0
  102. package/esm/schema/coupon_set.schema.js +85 -0
  103. package/esm/schema/credit_note.schema.js +499 -0
  104. package/esm/schema/currency.schema.js +29 -0
  105. package/esm/schema/customer.schema.js +1198 -0
  106. package/esm/schema/customer_entitlement.schema.js +11 -0
  107. package/esm/schema/differential_price.schema.js +103 -0
  108. package/esm/schema/entitlement.schema.js +51 -0
  109. package/esm/schema/entitlement_override.schema.js +32 -0
  110. package/esm/schema/estimate.schema.js +1532 -0
  111. package/esm/schema/event.schema.js +1057 -0
  112. package/esm/schema/export.schema.js +3382 -0
  113. package/esm/schema/feature.schema.js +75 -0
  114. package/esm/schema/gift.schema.js +290 -0
  115. package/esm/schema/grant_block.schema.js +44 -0
  116. package/esm/schema/hosted_page.schema.js +1774 -0
  117. package/esm/schema/in_app_subscription.schema.js +65 -0
  118. package/esm/schema/index.js +72 -0
  119. package/esm/schema/invoice.schema.js +1682 -0
  120. package/esm/schema/item.schema.js +192 -0
  121. package/esm/schema/item_entitlement.schema.js +42 -0
  122. package/esm/schema/item_family.schema.js +54 -0
  123. package/esm/schema/item_price.schema.js +332 -0
  124. package/esm/schema/ledger_account_balance.schema.js +18 -0
  125. package/esm/schema/ledger_operation.schema.js +101 -0
  126. package/esm/schema/meter.schema.js +10 -0
  127. package/esm/schema/metered_feature.schema.js +17 -0
  128. package/esm/schema/non_subscription.schema.js +25 -0
  129. package/esm/schema/offer_event.schema.js +10 -0
  130. package/esm/schema/offer_fulfillment.schema.js +17 -0
  131. package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
  132. package/esm/schema/omnichannel_subscription.schema.js +119 -0
  133. package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
  134. package/esm/schema/order.schema.js +438 -0
  135. package/esm/schema/payment_intent.schema.js +124 -0
  136. package/esm/schema/payment_schedule_scheme.schema.js +17 -0
  137. package/esm/schema/payment_source.schema.js +627 -0
  138. package/esm/schema/payment_voucher.schema.js +54 -0
  139. package/esm/schema/personalized_offer.schema.js +25 -0
  140. package/esm/schema/plan.schema.js +360 -0
  141. package/esm/schema/portal_session.schema.js +19 -0
  142. package/esm/schema/price_variant.schema.js +90 -0
  143. package/esm/schema/pricing_page_session.schema.js +132 -0
  144. package/esm/schema/promotional_credit.schema.js +75 -0
  145. package/esm/schema/promotional_grant.schema.js +14 -0
  146. package/esm/schema/purchase.schema.js +274 -0
  147. package/esm/schema/quote.schema.js +1664 -0
  148. package/esm/schema/ramp.schema.js +242 -0
  149. package/esm/schema/recorded_purchase.schema.js +29 -0
  150. package/esm/schema/resource_migration.schema.js +11 -0
  151. package/esm/schema/site_migration_detail.schema.js +78 -0
  152. package/esm/schema/subscription.schema.js +3341 -0
  153. package/esm/schema/subscription_entitlement.schema.js +22 -0
  154. package/esm/schema/time_machine.schema.js +14 -0
  155. package/esm/schema/transaction.schema.js +741 -0
  156. package/esm/schema/unbilled_charge.schema.js +136 -0
  157. package/esm/schema/usage.schema.js +90 -0
  158. package/esm/schema/usage_charge.schema.js +14 -0
  159. package/esm/schema/usage_event.schema.js +25 -0
  160. package/esm/schema/usage_file.schema.js +10 -0
  161. package/esm/schema/usage_summary.schema.js +14 -0
  162. package/esm/schema/virtual_bank_account.schema.js +68 -0
  163. package/esm/schema/webhook_endpoint.schema.js +505 -0
  164. package/esm/telemetry/TelemetryAdapter.js +132 -0
  165. package/esm/telemetry/index.js +8 -0
  166. package/esm/telemetry/otel.js +62 -0
  167. package/esm/telemetry/types.js +44 -0
  168. package/esm/validationLoader.js +56 -0
  169. package/package.json +43 -24
  170. package/types/core.d.ts +2 -0
  171. package/types/index.d.ts +85 -0
  172. package/types/telemetry/otel.d.ts +22 -0
@@ -0,0 +1,136 @@
1
+ // Generated Zod schemas: UnbilledCharge
2
+ // Actions: createUnbilledCharge, create, invoiceUnbilledCharges, list, invoiceNowEstimate
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //UnbilledCharge.createUnbilledCharge
6
+ const CreateUnbilledChargeUnbilledChargeAddonsSchema = z.object({
7
+ id: z.array(z.string().max(100).optional()).optional(),
8
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
9
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
10
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
11
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
12
+ date_from: z.array(z.number().int().optional()).optional(),
13
+ date_to: z.array(z.number().int().optional()).optional(),
14
+ });
15
+ const CreateUnbilledChargeUnbilledChargeChargesSchema = z.object({
16
+ amount: z.array(z.number().int().min(1).optional()).optional(),
17
+ amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
18
+ description: z.array(z.string().max(250).optional()).optional(),
19
+ taxable: z.array(z.boolean().default(true).optional()).optional(),
20
+ tax_profile_id: z.array(z.string().max(50).optional()).optional(),
21
+ avalara_tax_code: z.array(z.string().max(50).optional()).optional(),
22
+ hsn_code: z.array(z.string().max(50).optional()).optional(),
23
+ taxjar_product_code: z.array(z.string().max(50).optional()).optional(),
24
+ avalara_sale_type: z
25
+ .array(z.enum(['wholesale', 'retail', 'consumed', 'vendor_use']).optional())
26
+ .optional(),
27
+ avalara_transaction_type: z.array(z.number().int().optional()).optional(),
28
+ avalara_service_type: z.array(z.number().int().optional()).optional(),
29
+ date_from: z.array(z.number().int().optional()).optional(),
30
+ date_to: z.array(z.number().int().optional()).optional(),
31
+ });
32
+ const CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsSchema = z.object({
33
+ provider_name: z.array(z.string().max(50).optional()).optional(),
34
+ field_id: z.array(z.string().max(50).optional()).optional(),
35
+ field_value: z.array(z.string().max(50).optional()).optional(),
36
+ });
37
+ const CreateUnbilledChargeUnbilledChargeBodySchema = z.looseObject({
38
+ subscription_id: z.string().max(50),
39
+ currency_code: z.string().max(3).optional(),
40
+ addons: CreateUnbilledChargeUnbilledChargeAddonsSchema.optional(),
41
+ charges: CreateUnbilledChargeUnbilledChargeChargesSchema.optional(),
42
+ tax_providers_fields: CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsSchema.optional(),
43
+ });
44
+ export { CreateUnbilledChargeUnbilledChargeBodySchema };
45
+ //UnbilledCharge.create
46
+ const CreateUnbilledChargeItemPricesSchema = z.object({
47
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
48
+ quantity: z.array(z.number().int().min(1).optional()).optional(),
49
+ quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
50
+ unit_price: z.array(z.number().int().min(0).optional()).optional(),
51
+ unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
52
+ date_from: z.array(z.number().int().optional()).optional(),
53
+ date_to: z.array(z.number().int().optional()).optional(),
54
+ });
55
+ const CreateUnbilledChargeItemTiersSchema = z.object({
56
+ item_price_id: z.array(z.string().max(100).optional()).optional(),
57
+ starting_unit: z.array(z.number().int().min(1).optional()).optional(),
58
+ ending_unit: z.array(z.number().int().optional()).optional(),
59
+ price: z.array(z.number().int().min(0).optional()).optional(),
60
+ starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
61
+ ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
62
+ price_in_decimal: z.array(z.string().max(39).optional()).optional(),
63
+ pricing_type: z
64
+ .array(z.enum(['per_unit', 'flat_fee', 'package']).optional())
65
+ .optional(),
66
+ package_size: z.array(z.number().int().min(1).optional()).optional(),
67
+ });
68
+ const CreateUnbilledChargeChargesSchema = z.object({
69
+ amount: z.array(z.number().int().min(1).optional()).optional(),
70
+ amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
71
+ description: z.array(z.string().max(250).optional()).optional(),
72
+ taxable: z.array(z.boolean().default(true).optional()).optional(),
73
+ tax_profile_id: z.array(z.string().max(50).optional()).optional(),
74
+ avalara_tax_code: z.array(z.string().max(50).optional()).optional(),
75
+ hsn_code: z.array(z.string().max(50).optional()).optional(),
76
+ taxjar_product_code: z.array(z.string().max(50).optional()).optional(),
77
+ avalara_sale_type: z
78
+ .array(z.enum(['wholesale', 'retail', 'consumed', 'vendor_use']).optional())
79
+ .optional(),
80
+ avalara_transaction_type: z.array(z.number().int().optional()).optional(),
81
+ avalara_service_type: z.array(z.number().int().optional()).optional(),
82
+ date_from: z.array(z.number().int().optional()).optional(),
83
+ date_to: z.array(z.number().int().optional()).optional(),
84
+ });
85
+ const CreateUnbilledChargeTaxProvidersFieldsSchema = z.object({
86
+ provider_name: z.array(z.string().max(50).optional()).optional(),
87
+ field_id: z.array(z.string().max(50).optional()).optional(),
88
+ field_value: z.array(z.string().max(50).optional()).optional(),
89
+ });
90
+ const CreateUnbilledChargeBodySchema = z.looseObject({
91
+ subscription_id: z.string().max(50),
92
+ currency_code: z.string().max(3).optional(),
93
+ item_prices: CreateUnbilledChargeItemPricesSchema.optional(),
94
+ item_tiers: CreateUnbilledChargeItemTiersSchema.optional(),
95
+ charges: CreateUnbilledChargeChargesSchema.optional(),
96
+ tax_providers_fields: CreateUnbilledChargeTaxProvidersFieldsSchema.optional(),
97
+ });
98
+ export { CreateUnbilledChargeBodySchema };
99
+ //UnbilledCharge.invoiceUnbilledCharges
100
+ const InvoiceUnbilledChargesUnbilledChargeBodySchema = z.looseObject({
101
+ subscription_id: z.string().max(50).optional(),
102
+ customer_id: z.string().max(50).optional(),
103
+ });
104
+ export { InvoiceUnbilledChargesUnbilledChargeBodySchema };
105
+ //UnbilledCharge.list
106
+ const ListUnbilledChargeSubscriptionIdSchema = z.object({
107
+ is: z.string().min(1).optional(),
108
+ is_not: z.string().min(1).optional(),
109
+ starts_with: z.string().min(1).optional(),
110
+ is_present: z.enum(['true', 'false']).optional(),
111
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
112
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
113
+ });
114
+ const ListUnbilledChargeCustomerIdSchema = z.object({
115
+ is: z.string().min(1).optional(),
116
+ is_not: z.string().min(1).optional(),
117
+ starts_with: z.string().min(1).optional(),
118
+ is_present: z.enum(['true', 'false']).optional(),
119
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
120
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
121
+ });
122
+ const ListUnbilledChargeBodySchema = z.looseObject({
123
+ limit: z.number().int().min(1).max(100).optional(),
124
+ offset: z.string().max(1000).optional(),
125
+ include_deleted: z.boolean().default(false).optional(),
126
+ is_voided: z.boolean().default(false).optional(),
127
+ subscription_id: ListUnbilledChargeSubscriptionIdSchema.optional(),
128
+ customer_id: ListUnbilledChargeCustomerIdSchema.optional(),
129
+ });
130
+ export { ListUnbilledChargeBodySchema };
131
+ //UnbilledCharge.invoiceNowEstimate
132
+ const InvoiceNowEstimateUnbilledChargeBodySchema = z.looseObject({
133
+ subscription_id: z.string().max(50).optional(),
134
+ customer_id: z.string().max(50).optional(),
135
+ });
136
+ export { InvoiceNowEstimateUnbilledChargeBodySchema };
@@ -0,0 +1,90 @@
1
+ // Generated Zod schemas: Usage
2
+ // Actions: create, retrieve, delete, list, pdf
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //Usage.create
6
+ const CreateUsageBodySchema = z.looseObject({
7
+ id: z.string().max(100).optional(),
8
+ item_price_id: z.string().max(100),
9
+ quantity: z.string().max(40),
10
+ usage_date: z.number().int(),
11
+ dedupe_option: z.enum(['skip', 'update_existing']).optional(),
12
+ note: z.string().max(500).optional(),
13
+ });
14
+ export { CreateUsageBodySchema };
15
+ //Usage.retrieve
16
+ const RetrieveUsageBodySchema = z.looseObject({
17
+ id: z.string().max(100),
18
+ });
19
+ export { RetrieveUsageBodySchema };
20
+ //Usage.delete
21
+ const DeleteUsageBodySchema = z.looseObject({
22
+ id: z.string().max(100),
23
+ });
24
+ export { DeleteUsageBodySchema };
25
+ //Usage.list
26
+ const ListUsageIdSchema = z.object({
27
+ is: z.string().min(1).optional(),
28
+ is_not: z.string().min(1).optional(),
29
+ starts_with: z.string().min(1).optional(),
30
+ });
31
+ const ListUsageSubscriptionIdSchema = z.object({
32
+ is: z.string().min(1).optional(),
33
+ is_not: z.string().min(1).optional(),
34
+ starts_with: z.string().min(1).optional(),
35
+ });
36
+ const ListUsageUsageDateSchema = z.object({
37
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
38
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
39
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
40
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
41
+ });
42
+ const ListUsageUpdatedAtSchema = z.object({
43
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
44
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
45
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
46
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
47
+ });
48
+ const ListUsageItemPriceIdSchema = z.object({
49
+ is: z.string().min(1).optional(),
50
+ is_not: z.string().min(1).optional(),
51
+ starts_with: z.string().min(1).optional(),
52
+ });
53
+ const ListUsageInvoiceIdSchema = z.object({
54
+ is: z.string().min(1).optional(),
55
+ is_not: z.string().min(1).optional(),
56
+ starts_with: z.string().min(1).optional(),
57
+ is_present: z.enum(['true', 'false']).optional(),
58
+ });
59
+ const ListUsageSourceSchema = z.object({
60
+ is: z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
61
+ is_not: z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
62
+ in: z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
63
+ not_in: z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
64
+ });
65
+ const ListUsageSortBySchema = z.looseObject({
66
+ asc: z.enum(['usage_date', 'updated_at']).optional(),
67
+ desc: z.enum(['usage_date', 'updated_at']).optional(),
68
+ });
69
+ const ListUsageBodySchema = z.looseObject({
70
+ limit: z.number().int().min(1).max(100).optional(),
71
+ offset: z.string().max(1000).optional(),
72
+ id: ListUsageIdSchema.optional(),
73
+ subscription_id: ListUsageSubscriptionIdSchema.optional(),
74
+ usage_date: ListUsageUsageDateSchema.optional(),
75
+ updated_at: ListUsageUpdatedAtSchema.optional(),
76
+ item_price_id: ListUsageItemPriceIdSchema.optional(),
77
+ invoice_id: ListUsageInvoiceIdSchema.optional(),
78
+ source: ListUsageSourceSchema.optional(),
79
+ sort_by: ListUsageSortBySchema.optional(),
80
+ });
81
+ export { ListUsageBodySchema };
82
+ //Usage.pdf
83
+ const PdfUsageInvoiceSchema = z.object({
84
+ id: z.string().max(50),
85
+ });
86
+ const PdfUsageBodySchema = z.looseObject({
87
+ disposition_type: z.enum(['attachment', 'inline']).optional(),
88
+ invoice: PdfUsageInvoiceSchema.optional(),
89
+ });
90
+ export { PdfUsageBodySchema };
@@ -0,0 +1,14 @@
1
+ // Generated Zod schemas: UsageCharge
2
+ // Actions: retrieveUsageChargesForSubscription
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //UsageCharge.retrieveUsageChargesForSubscription
6
+ const RetrieveUsageChargesForSubscriptionUsageChargeFeatureIdSchema = z.object({
7
+ is: z.string().min(1).optional(),
8
+ });
9
+ const RetrieveUsageChargesForSubscriptionUsageChargeBodySchema = z.looseObject({
10
+ limit: z.number().int().min(1).max(100).optional(),
11
+ offset: z.string().max(1000).optional(),
12
+ feature_id: RetrieveUsageChargesForSubscriptionUsageChargeFeatureIdSchema.optional(),
13
+ });
14
+ export { RetrieveUsageChargesForSubscriptionUsageChargeBodySchema };
@@ -0,0 +1,25 @@
1
+ // Generated Zod schemas: UsageEvent
2
+ // Actions: create, batchIngest
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //UsageEvent.create
6
+ const CreateUsageEventPropertiesSchema = z.looseObject({});
7
+ const CreateUsageEventBodySchema = z.looseObject({
8
+ deduplication_id: z.string().max(36),
9
+ subscription_id: z.string().max(50),
10
+ usage_timestamp: z.number().int(),
11
+ properties: CreateUsageEventPropertiesSchema,
12
+ });
13
+ export { CreateUsageEventBodySchema };
14
+ //UsageEvent.batchIngest
15
+ const BatchIngestUsageEventPropertiesItemSchema = z.looseObject({});
16
+ const BatchIngestUsageEventEventsSchema = z.object({
17
+ deduplication_id: z.array(z.string().max(36).optional()),
18
+ subscription_id: z.array(z.string().max(50).optional()),
19
+ usage_timestamp: z.array(z.number().int().optional()),
20
+ properties: z.array(BatchIngestUsageEventPropertiesItemSchema.optional()),
21
+ });
22
+ const BatchIngestUsageEventBodySchema = z.looseObject({
23
+ events: BatchIngestUsageEventEventsSchema.optional(),
24
+ });
25
+ export { BatchIngestUsageEventBodySchema };
@@ -0,0 +1,10 @@
1
+ // Generated Zod schemas: UsageFile
2
+ // Actions: uploadUrl
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //UsageFile.uploadUrl
6
+ const UploadUrlUsageFileBodySchema = z.looseObject({
7
+ file_name: z.string().max(150),
8
+ mime_type: z.string().max(100),
9
+ });
10
+ export { UploadUrlUsageFileBodySchema };
@@ -0,0 +1,14 @@
1
+ // Generated Zod schemas: UsageSummary
2
+ // Actions: retrieveUsageSummaryForSubscription
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //UsageSummary.retrieveUsageSummaryForSubscription
6
+ const RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema = z.looseObject({
7
+ limit: z.number().int().min(1).max(100).optional(),
8
+ offset: z.string().max(1000).optional(),
9
+ feature_id: z.string().max(100),
10
+ window_size: z.enum(['month', 'week', 'day', 'hour', 'minute']).optional(),
11
+ timeframe_start: z.number().int().optional(),
12
+ timeframe_end: z.number().int().optional(),
13
+ });
14
+ export { RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema };
@@ -0,0 +1,68 @@
1
+ // Generated Zod schemas: VirtualBankAccount
2
+ // Actions: createUsingPermanentToken, create, list
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //VirtualBankAccount.createUsingPermanentToken
6
+ const CreateUsingPermanentTokenVirtualBankAccountBodySchema = z.looseObject({
7
+ customer_id: z.string().max(50),
8
+ reference_id: z.string().max(150),
9
+ gateway_account_id: z.string().max(50).optional(),
10
+ scheme: z
11
+ .enum([
12
+ 'ach_credit',
13
+ 'sepa_credit',
14
+ 'us_automated_bank_transfer',
15
+ 'gb_automated_bank_transfer',
16
+ 'eu_automated_bank_transfer',
17
+ 'jp_automated_bank_transfer',
18
+ 'mx_automated_bank_transfer',
19
+ ])
20
+ .optional(),
21
+ });
22
+ export { CreateUsingPermanentTokenVirtualBankAccountBodySchema };
23
+ //VirtualBankAccount.create
24
+ const CreateVirtualBankAccountBodySchema = z.looseObject({
25
+ customer_id: z.string().max(50),
26
+ email: z.string().email().max(70).optional(),
27
+ gateway_account_id: z.string().max(50).optional(),
28
+ scheme: z
29
+ .enum([
30
+ 'ach_credit',
31
+ 'sepa_credit',
32
+ 'us_automated_bank_transfer',
33
+ 'gb_automated_bank_transfer',
34
+ 'eu_automated_bank_transfer',
35
+ 'jp_automated_bank_transfer',
36
+ 'mx_automated_bank_transfer',
37
+ ])
38
+ .optional(),
39
+ });
40
+ export { CreateVirtualBankAccountBodySchema };
41
+ //VirtualBankAccount.list
42
+ const ListVirtualBankAccountCustomerIdSchema = z.object({
43
+ is: z.string().min(1).optional(),
44
+ is_not: z.string().min(1).optional(),
45
+ starts_with: z.string().min(1).optional(),
46
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
47
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
48
+ });
49
+ const ListVirtualBankAccountUpdatedAtSchema = z.object({
50
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
51
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
52
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
53
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
54
+ });
55
+ const ListVirtualBankAccountCreatedAtSchema = z.object({
56
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
57
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
58
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
59
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
60
+ });
61
+ const ListVirtualBankAccountBodySchema = z.looseObject({
62
+ limit: z.number().int().min(1).max(100).optional(),
63
+ offset: z.string().max(1000).optional(),
64
+ customer_id: ListVirtualBankAccountCustomerIdSchema.optional(),
65
+ updated_at: ListVirtualBankAccountUpdatedAtSchema.optional(),
66
+ created_at: ListVirtualBankAccountCreatedAtSchema.optional(),
67
+ });
68
+ export { ListVirtualBankAccountBodySchema };