chargebee 3.25.0-beta.1 → 3.26.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 (171) hide show
  1. package/CHANGELOG.md +103 -4
  2. package/README.md +0 -39
  3. package/cjs/RequestWrapper.js +1 -28
  4. package/cjs/chargebee.cjs.js +0 -3
  5. package/cjs/chargebee.cjs.worker.js +0 -2
  6. package/cjs/createChargebee.js +0 -5
  7. package/cjs/environment.js +1 -1
  8. package/cjs/resources/api_endpoints.js +121 -3
  9. package/cjs/resources/webhook/eventType.js +2 -0
  10. package/esm/RequestWrapper.js +1 -28
  11. package/esm/chargebee.esm.js +0 -2
  12. package/esm/chargebee.esm.worker.js +0 -1
  13. package/esm/createChargebee.js +0 -5
  14. package/esm/environment.js +1 -1
  15. package/esm/resources/api_endpoints.js +121 -3
  16. package/esm/resources/webhook/eventType.js +2 -0
  17. package/package.json +1 -4
  18. package/types/core.d.ts +24 -6
  19. package/types/index.d.ts +8 -17
  20. package/types/resources/Content.d.ts +4 -1
  21. package/types/resources/CreditNote.d.ts +1 -0
  22. package/types/resources/Customer.d.ts +14 -4
  23. package/types/resources/Estimate.d.ts +14 -4
  24. package/types/resources/Event.d.ts +2 -0
  25. package/types/resources/Gift.d.ts +23 -6
  26. package/types/resources/GrantBlock.d.ts +59 -0
  27. package/types/resources/HostedPage.d.ts +6 -1
  28. package/types/resources/Invoice.d.ts +14 -5
  29. package/types/resources/LedgerAccountBalance.d.ts +50 -0
  30. package/types/resources/LedgerOperation.d.ts +141 -0
  31. package/types/resources/OmnichannelSubscription.d.ts +8 -0
  32. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
  33. package/types/resources/PaymentIntent.d.ts +35 -10
  34. package/types/resources/PaymentSource.d.ts +7 -2
  35. package/types/resources/PromotionalGrant.d.ts +37 -0
  36. package/types/resources/Purchase.d.ts +7 -2
  37. package/types/resources/Subscription.d.ts +49 -14
  38. package/types/resources/WebhookEvent.d.ts +22 -4
  39. package/cjs/chargebeeZodValidationError.js +0 -18
  40. package/cjs/schema/addon.schema.js +0 -153
  41. package/cjs/schema/address.schema.js +0 -35
  42. package/cjs/schema/alert.schema.js +0 -38
  43. package/cjs/schema/attached_item.schema.js +0 -58
  44. package/cjs/schema/business_entity.schema.js +0 -46
  45. package/cjs/schema/card.schema.js +0 -165
  46. package/cjs/schema/comment.schema.js +0 -69
  47. package/cjs/schema/coupon.schema.js +0 -209
  48. package/cjs/schema/coupon_code.schema.js +0 -14
  49. package/cjs/schema/coupon_set.schema.js +0 -28
  50. package/cjs/schema/credit_note.schema.js +0 -288
  51. package/cjs/schema/currency.schema.js +0 -32
  52. package/cjs/schema/customer.schema.js +0 -986
  53. package/cjs/schema/customer_entitlement.schema.js +0 -14
  54. package/cjs/schema/differential_price.schema.js +0 -68
  55. package/cjs/schema/entitlement.schema.js +0 -27
  56. package/cjs/schema/entitlement_override.schema.js +0 -33
  57. package/cjs/schema/estimate.schema.js +0 -1525
  58. package/cjs/schema/export.schema.js +0 -1545
  59. package/cjs/schema/feature.schema.js +0 -37
  60. package/cjs/schema/gift.schema.js +0 -277
  61. package/cjs/schema/hosted_page.schema.js +0 -1649
  62. package/cjs/schema/in_app_subscription.schema.js +0 -68
  63. package/cjs/schema/index.js +0 -80
  64. package/cjs/schema/invoice.schema.js +0 -1467
  65. package/cjs/schema/item.schema.js +0 -91
  66. package/cjs/schema/item_entitlement.schema.js +0 -45
  67. package/cjs/schema/item_family.schema.js +0 -21
  68. package/cjs/schema/item_price.schema.js +0 -190
  69. package/cjs/schema/non_subscription.schema.js +0 -28
  70. package/cjs/schema/offer_event.schema.js +0 -13
  71. package/cjs/schema/offer_fulfillment.schema.js +0 -20
  72. package/cjs/schema/omnichannel_one_time_order.schema.js +0 -26
  73. package/cjs/schema/omnichannel_subscription.schema.js +0 -89
  74. package/cjs/schema/omnichannel_subscription_item.schema.js +0 -13
  75. package/cjs/schema/order.schema.js +0 -273
  76. package/cjs/schema/payment_intent.schema.js +0 -117
  77. package/cjs/schema/payment_schedule_scheme.schema.js +0 -20
  78. package/cjs/schema/payment_source.schema.js +0 -358
  79. package/cjs/schema/payment_voucher.schema.js +0 -57
  80. package/cjs/schema/personalized_offer.schema.js +0 -28
  81. package/cjs/schema/plan.schema.js +0 -225
  82. package/cjs/schema/portal_session.schema.js +0 -22
  83. package/cjs/schema/price_variant.schema.js +0 -36
  84. package/cjs/schema/pricing_page_session.schema.js +0 -135
  85. package/cjs/schema/promotional_credit.schema.js +0 -78
  86. package/cjs/schema/purchase.schema.js +0 -272
  87. package/cjs/schema/quote.schema.js +0 -1557
  88. package/cjs/schema/ramp.schema.js +0 -209
  89. package/cjs/schema/recorded_purchase.schema.js +0 -32
  90. package/cjs/schema/resource_migration.schema.js +0 -14
  91. package/cjs/schema/site_migration_detail.schema.js +0 -81
  92. package/cjs/schema/subscription.schema.js +0 -2993
  93. package/cjs/schema/subscription_entitlement.schema.js +0 -25
  94. package/cjs/schema/time_machine.schema.js +0 -17
  95. package/cjs/schema/transaction.schema.js +0 -70
  96. package/cjs/schema/unbilled_charge.schema.js +0 -113
  97. package/cjs/schema/usage.schema.js +0 -93
  98. package/cjs/schema/usage_charge.schema.js +0 -17
  99. package/cjs/schema/usage_event.schema.js +0 -28
  100. package/cjs/schema/usage_file.schema.js +0 -13
  101. package/cjs/schema/usage_summary.schema.js +0 -17
  102. package/cjs/schema/virtual_bank_account.schema.js +0 -43
  103. package/cjs/schema/webhook_endpoint.schema.js +0 -504
  104. package/cjs/validationLoader.js +0 -59
  105. package/esm/chargebeeZodValidationError.js +0 -14
  106. package/esm/schema/addon.schema.js +0 -150
  107. package/esm/schema/address.schema.js +0 -32
  108. package/esm/schema/alert.schema.js +0 -35
  109. package/esm/schema/attached_item.schema.js +0 -55
  110. package/esm/schema/business_entity.schema.js +0 -43
  111. package/esm/schema/card.schema.js +0 -162
  112. package/esm/schema/comment.schema.js +0 -66
  113. package/esm/schema/coupon.schema.js +0 -206
  114. package/esm/schema/coupon_code.schema.js +0 -11
  115. package/esm/schema/coupon_set.schema.js +0 -25
  116. package/esm/schema/credit_note.schema.js +0 -285
  117. package/esm/schema/currency.schema.js +0 -29
  118. package/esm/schema/customer.schema.js +0 -983
  119. package/esm/schema/customer_entitlement.schema.js +0 -11
  120. package/esm/schema/differential_price.schema.js +0 -65
  121. package/esm/schema/entitlement.schema.js +0 -24
  122. package/esm/schema/entitlement_override.schema.js +0 -30
  123. package/esm/schema/estimate.schema.js +0 -1522
  124. package/esm/schema/export.schema.js +0 -1542
  125. package/esm/schema/feature.schema.js +0 -34
  126. package/esm/schema/gift.schema.js +0 -274
  127. package/esm/schema/hosted_page.schema.js +0 -1646
  128. package/esm/schema/in_app_subscription.schema.js +0 -65
  129. package/esm/schema/index.js +0 -64
  130. package/esm/schema/invoice.schema.js +0 -1464
  131. package/esm/schema/item.schema.js +0 -88
  132. package/esm/schema/item_entitlement.schema.js +0 -42
  133. package/esm/schema/item_family.schema.js +0 -18
  134. package/esm/schema/item_price.schema.js +0 -187
  135. package/esm/schema/non_subscription.schema.js +0 -25
  136. package/esm/schema/offer_event.schema.js +0 -10
  137. package/esm/schema/offer_fulfillment.schema.js +0 -17
  138. package/esm/schema/omnichannel_one_time_order.schema.js +0 -23
  139. package/esm/schema/omnichannel_subscription.schema.js +0 -86
  140. package/esm/schema/omnichannel_subscription_item.schema.js +0 -10
  141. package/esm/schema/order.schema.js +0 -270
  142. package/esm/schema/payment_intent.schema.js +0 -114
  143. package/esm/schema/payment_schedule_scheme.schema.js +0 -17
  144. package/esm/schema/payment_source.schema.js +0 -355
  145. package/esm/schema/payment_voucher.schema.js +0 -54
  146. package/esm/schema/personalized_offer.schema.js +0 -25
  147. package/esm/schema/plan.schema.js +0 -222
  148. package/esm/schema/portal_session.schema.js +0 -19
  149. package/esm/schema/price_variant.schema.js +0 -33
  150. package/esm/schema/pricing_page_session.schema.js +0 -132
  151. package/esm/schema/promotional_credit.schema.js +0 -75
  152. package/esm/schema/purchase.schema.js +0 -269
  153. package/esm/schema/quote.schema.js +0 -1554
  154. package/esm/schema/ramp.schema.js +0 -206
  155. package/esm/schema/recorded_purchase.schema.js +0 -29
  156. package/esm/schema/resource_migration.schema.js +0 -11
  157. package/esm/schema/site_migration_detail.schema.js +0 -78
  158. package/esm/schema/subscription.schema.js +0 -2990
  159. package/esm/schema/subscription_entitlement.schema.js +0 -22
  160. package/esm/schema/time_machine.schema.js +0 -14
  161. package/esm/schema/transaction.schema.js +0 -67
  162. package/esm/schema/unbilled_charge.schema.js +0 -110
  163. package/esm/schema/usage.schema.js +0 -90
  164. package/esm/schema/usage_charge.schema.js +0 -14
  165. package/esm/schema/usage_event.schema.js +0 -25
  166. package/esm/schema/usage_file.schema.js +0 -10
  167. package/esm/schema/usage_summary.schema.js +0 -14
  168. package/esm/schema/virtual_bank_account.schema.js +0 -40
  169. package/esm/schema/webhook_endpoint.schema.js +0 -501
  170. package/esm/validationLoader.js +0 -56
  171. package/types/resources/QuoteEntitlement.d.ts +0 -16
@@ -1,22 +0,0 @@
1
- // Generated Zod schemas: SubscriptionEntitlement
2
- // Actions: subscriptionEntitlementsForSubscription, setSubscriptionEntitlementAvailability
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //SubscriptionEntitlement.subscriptionEntitlementsForSubscription
6
- const SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema = z.looseObject({
7
- limit: z.number().int().min(1).max(100).optional(),
8
- offset: z.string().max(1000).optional(),
9
- include_drafts: z.boolean().default(false).optional(),
10
- embed: z.string().max(1000).optional(),
11
- include_scheduled_overrides: z.boolean().default(false).optional(),
12
- });
13
- export { SubscriptionEntitlementsForSubscriptionSubscriptionEntitlementBodySchema };
14
- //SubscriptionEntitlement.setSubscriptionEntitlementAvailability
15
- const SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementSubscriptionEntitlementsSchema = z.object({
16
- feature_id: z.array(z.string().max(50).optional()),
17
- });
18
- const SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema = z.looseObject({
19
- is_enabled: z.boolean(),
20
- subscription_entitlements: SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementSubscriptionEntitlementsSchema.optional(),
21
- });
22
- export { SetSubscriptionEntitlementAvailabilitySubscriptionEntitlementBodySchema };
@@ -1,14 +0,0 @@
1
- // Generated Zod schemas: TimeMachine
2
- // Actions: startAfresh, travelForward
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //TimeMachine.startAfresh
6
- const StartAfreshTimeMachineBodySchema = z.looseObject({
7
- genesis_time: z.number().int().optional(),
8
- });
9
- export { StartAfreshTimeMachineBodySchema };
10
- //TimeMachine.travelForward
11
- const TravelForwardTimeMachineBodySchema = z.looseObject({
12
- destination_time: z.number().int().optional(),
13
- });
14
- export { TravelForwardTimeMachineBodySchema };
@@ -1,67 +0,0 @@
1
- // Generated Zod schemas: Transaction
2
- // Actions: createAuthorization, recordRefund, reconcile, refund, transactionsForCustomer, transactionsForSubscription, paymentsForInvoice, deleteOfflineTransaction
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //Transaction.createAuthorization
6
- const CreateAuthorizationTransactionBodySchema = z.looseObject({
7
- customer_id: z.string().max(50),
8
- payment_source_id: z.string().max(40).optional(),
9
- currency_code: z.string().max(3).optional(),
10
- amount: z.number().int().min(1),
11
- });
12
- export { CreateAuthorizationTransactionBodySchema };
13
- //Transaction.recordRefund
14
- const RecordRefundTransactionBodySchema = z.looseObject({
15
- amount: z.number().int().min(1).optional(),
16
- payment_method: z.enum([
17
- 'cash',
18
- 'check',
19
- 'chargeback',
20
- 'bank_transfer',
21
- 'other',
22
- 'app_store',
23
- 'play_store',
24
- 'custom',
25
- ]),
26
- date: z.number().int(),
27
- reference_number: z.string().max(100).optional(),
28
- custom_payment_method_id: z.string().max(50).optional(),
29
- comment: z.string().max(300).optional(),
30
- });
31
- export { RecordRefundTransactionBodySchema };
32
- //Transaction.reconcile
33
- const ReconcileTransactionBodySchema = z.looseObject({
34
- id_at_gateway: z.string().max(100).optional(),
35
- customer_id: z.string().max(50).optional(),
36
- status: z.enum(['success', 'failure']).optional(),
37
- });
38
- export { ReconcileTransactionBodySchema };
39
- //Transaction.refund
40
- const RefundTransactionBodySchema = z.looseObject({
41
- amount: z.number().int().min(1).optional(),
42
- comment: z.string().max(300).optional(),
43
- });
44
- export { RefundTransactionBodySchema };
45
- //Transaction.transactionsForCustomer
46
- const TransactionsForCustomerTransactionBodySchema = z.looseObject({
47
- limit: z.number().int().min(1).max(100).optional(),
48
- offset: z.string().max(1000).optional(),
49
- });
50
- export { TransactionsForCustomerTransactionBodySchema };
51
- //Transaction.transactionsForSubscription
52
- const TransactionsForSubscriptionTransactionBodySchema = z.looseObject({
53
- limit: z.number().int().min(1).max(100).optional(),
54
- offset: z.string().max(1000).optional(),
55
- });
56
- export { TransactionsForSubscriptionTransactionBodySchema };
57
- //Transaction.paymentsForInvoice
58
- const PaymentsForInvoiceTransactionBodySchema = z.looseObject({
59
- limit: z.number().int().min(1).max(100).optional(),
60
- offset: z.string().max(1000).optional(),
61
- });
62
- export { PaymentsForInvoiceTransactionBodySchema };
63
- //Transaction.deleteOfflineTransaction
64
- const DeleteOfflineTransactionTransactionBodySchema = z.looseObject({
65
- comment: z.string().max(300).optional(),
66
- });
67
- export { DeleteOfflineTransactionTransactionBodySchema };
@@ -1,110 +0,0 @@
1
- // Generated Zod schemas: UnbilledCharge
2
- // Actions: createUnbilledCharge, create, invoiceUnbilledCharges, 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.invoiceNowEstimate
106
- const InvoiceNowEstimateUnbilledChargeBodySchema = z.looseObject({
107
- subscription_id: z.string().max(50).optional(),
108
- customer_id: z.string().max(50).optional(),
109
- });
110
- export { InvoiceNowEstimateUnbilledChargeBodySchema };
@@ -1,90 +0,0 @@
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 };
@@ -1,14 +0,0 @@
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 };
@@ -1,25 +0,0 @@
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 };
@@ -1,10 +0,0 @@
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 };
@@ -1,14 +0,0 @@
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 };
@@ -1,40 +0,0 @@
1
- // Generated Zod schemas: VirtualBankAccount
2
- // Actions: createUsingPermanentToken, create
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 };