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,150 +0,0 @@
1
- // Generated Zod schemas: Addon
2
- // Actions: create, update, copy
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //Addon.create
6
- const CreateAddonMetaDataSchema = z.looseObject({});
7
- const CreateAddonTiersSchema = z.object({
8
- starting_unit: z.array(z.number().int().min(1).optional()).optional(),
9
- ending_unit: z.array(z.number().int().optional()).optional(),
10
- price: z.array(z.number().int().min(0).optional()).optional(),
11
- starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
12
- ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
13
- price_in_decimal: z.array(z.string().max(39).optional()).optional(),
14
- });
15
- const CreateAddonTaxProvidersFieldsSchema = z.object({
16
- provider_name: z.array(z.string().max(50).optional()),
17
- field_id: z.array(z.string().max(50).optional()),
18
- field_value: z.array(z.string().max(50).optional()),
19
- });
20
- const CreateAddonBodySchema = z.looseObject({
21
- id: z.string().max(100),
22
- name: z.string().max(100),
23
- invoice_name: z.string().max(100).optional(),
24
- description: z.string().max(2000).optional(),
25
- charge_type: z.enum(['recurring', 'non_recurring']),
26
- price: z.number().int().min(0).optional(),
27
- currency_code: z.string().max(3).optional(),
28
- period: z.number().int().min(1).optional(),
29
- period_unit: z
30
- .enum(['day', 'week', 'month', 'year', 'not_applicable'])
31
- .optional(),
32
- pricing_model: z
33
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
34
- .optional(),
35
- type: z
36
- .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
37
- .optional(),
38
- unit: z.string().max(30).optional(),
39
- enabled_in_portal: z.boolean().default(true).optional(),
40
- taxable: z.boolean().default(true).optional(),
41
- tax_profile_id: z.string().max(50).optional(),
42
- avalara_sale_type: z
43
- .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
44
- .optional(),
45
- avalara_transaction_type: z.number().int().optional(),
46
- avalara_service_type: z.number().int().optional(),
47
- tax_code: z.string().max(50).optional(),
48
- hsn_code: z.string().max(50).optional(),
49
- taxjar_product_code: z.string().max(50).optional(),
50
- invoice_notes: z.string().max(2000).optional(),
51
- meta_data: CreateAddonMetaDataSchema.optional(),
52
- sku: z.string().max(100).optional(),
53
- accounting_code: z.string().max(100).optional(),
54
- accounting_category1: z.string().max(100).optional(),
55
- accounting_category2: z.string().max(100).optional(),
56
- accounting_category3: z.string().max(100).optional(),
57
- accounting_category4: z.string().max(100).optional(),
58
- is_shippable: z.boolean().default(false).optional(),
59
- shipping_frequency_period: z.number().int().min(1).optional(),
60
- shipping_frequency_period_unit: z
61
- .enum(['year', 'month', 'week', 'day'])
62
- .optional(),
63
- included_in_mrr: z.boolean().optional(),
64
- show_description_in_invoices: z.boolean().default(false).optional(),
65
- show_description_in_quotes: z.boolean().default(false).optional(),
66
- price_in_decimal: z.string().max(39).optional(),
67
- proration_type: z
68
- .enum(['site_default', 'partial_term', 'full_term'])
69
- .optional(),
70
- status: z.enum(['active', 'archived']).optional(),
71
- tiers: CreateAddonTiersSchema.optional(),
72
- tax_providers_fields: CreateAddonTaxProvidersFieldsSchema.optional(),
73
- });
74
- export { CreateAddonBodySchema };
75
- //Addon.update
76
- const UpdateAddonMetaDataSchema = z.looseObject({});
77
- const UpdateAddonTiersSchema = z.object({
78
- starting_unit: z.array(z.number().int().min(1).optional()).optional(),
79
- ending_unit: z.array(z.number().int().optional()).optional(),
80
- price: z.array(z.number().int().min(0).optional()).optional(),
81
- starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
82
- ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
83
- price_in_decimal: z.array(z.string().max(39).optional()).optional(),
84
- });
85
- const UpdateAddonTaxProvidersFieldsSchema = z.object({
86
- provider_name: z.array(z.string().max(50).optional()),
87
- field_id: z.array(z.string().max(50).optional()),
88
- field_value: z.array(z.string().max(50).optional()),
89
- });
90
- const UpdateAddonBodySchema = z.looseObject({
91
- name: z.string().max(100).optional(),
92
- invoice_name: z.string().max(100).optional(),
93
- description: z.string().max(2000).optional(),
94
- charge_type: z.enum(['recurring', 'non_recurring']).optional(),
95
- price: z.number().int().min(0).optional(),
96
- currency_code: z.string().max(3).optional(),
97
- period: z.number().int().min(1).optional(),
98
- period_unit: z
99
- .enum(['day', 'week', 'month', 'year', 'not_applicable'])
100
- .optional(),
101
- pricing_model: z
102
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
103
- .optional(),
104
- type: z
105
- .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
106
- .optional(),
107
- unit: z.string().max(30).optional(),
108
- enabled_in_portal: z.boolean().default(true).optional(),
109
- taxable: z.boolean().default(true).optional(),
110
- tax_profile_id: z.string().max(50).optional(),
111
- avalara_sale_type: z
112
- .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
113
- .optional(),
114
- avalara_transaction_type: z.number().int().optional(),
115
- avalara_service_type: z.number().int().optional(),
116
- tax_code: z.string().max(50).optional(),
117
- hsn_code: z.string().max(50).optional(),
118
- taxjar_product_code: z.string().max(50).optional(),
119
- invoice_notes: z.string().max(2000).optional(),
120
- meta_data: UpdateAddonMetaDataSchema.optional(),
121
- sku: z.string().max(100).optional(),
122
- accounting_code: z.string().max(100).optional(),
123
- accounting_category1: z.string().max(100).optional(),
124
- accounting_category2: z.string().max(100).optional(),
125
- accounting_category3: z.string().max(100).optional(),
126
- accounting_category4: z.string().max(100).optional(),
127
- is_shippable: z.boolean().default(false).optional(),
128
- shipping_frequency_period: z.number().int().min(1).optional(),
129
- shipping_frequency_period_unit: z
130
- .enum(['year', 'month', 'week', 'day'])
131
- .optional(),
132
- included_in_mrr: z.boolean().optional(),
133
- show_description_in_invoices: z.boolean().default(false).optional(),
134
- show_description_in_quotes: z.boolean().default(false).optional(),
135
- price_in_decimal: z.string().max(39).optional(),
136
- proration_type: z
137
- .enum(['site_default', 'partial_term', 'full_term'])
138
- .optional(),
139
- tiers: UpdateAddonTiersSchema.optional(),
140
- tax_providers_fields: UpdateAddonTaxProvidersFieldsSchema.optional(),
141
- });
142
- export { UpdateAddonBodySchema };
143
- //Addon.copy
144
- const CopyAddonBodySchema = z.looseObject({
145
- from_site: z.string().max(50),
146
- id_at_from_site: z.string().max(100),
147
- id: z.string().max(100).optional(),
148
- for_site_merging: z.boolean().default(false).optional(),
149
- });
150
- export { CopyAddonBodySchema };
@@ -1,32 +0,0 @@
1
- // Generated Zod schemas: Address
2
- // Actions: retrieve, update
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //Address.retrieve
6
- const RetrieveAddressBodySchema = z.looseObject({
7
- subscription_id: z.string().max(50),
8
- label: z.string().max(50),
9
- });
10
- export { RetrieveAddressBodySchema };
11
- //Address.update
12
- const UpdateAddressBodySchema = z.looseObject({
13
- subscription_id: z.string().max(50),
14
- label: z.string().max(50),
15
- first_name: z.string().max(150).optional(),
16
- last_name: z.string().max(150).optional(),
17
- email: z.string().email().max(70).optional(),
18
- company: z.string().max(250).optional(),
19
- phone: z.string().max(50).optional(),
20
- addr: z.string().max(150).optional(),
21
- extended_addr: z.string().max(150).optional(),
22
- extended_addr2: z.string().max(150).optional(),
23
- city: z.string().max(50).optional(),
24
- state_code: z.string().max(50).optional(),
25
- state: z.string().max(50).optional(),
26
- zip: z.string().max(20).optional(),
27
- country: z.string().max(50).optional(),
28
- validation_status: z
29
- .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
30
- .optional(),
31
- });
32
- export { UpdateAddressBodySchema };
@@ -1,35 +0,0 @@
1
- // Generated Zod schemas: Alert
2
- // Actions: create, update
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //Alert.create
6
- const CreateAlertThresholdSchema = z.object({
7
- mode: z.enum(['absolute', 'percentage']),
8
- value: z.number(),
9
- });
10
- const CreateAlertFilterConditionsSchema = z.object({
11
- field: z.array(z.enum(['plan_price_id']).optional()).optional(),
12
- operator: z.array(z.enum(['equals', 'not_equals']).optional()).optional(),
13
- value: z.array(z.string().max(50).optional()).optional(),
14
- });
15
- const CreateAlertBodySchema = z.looseObject({
16
- type: z.enum(['usage_exceeded']),
17
- name: z.string().max(50),
18
- description: z.string().max(65000).optional(),
19
- metered_feature_id: z.string().max(50),
20
- subscription_id: z.string().max(50).optional(),
21
- meta: z.string().max(65000).optional(),
22
- threshold: CreateAlertThresholdSchema.optional(),
23
- filter_conditions: CreateAlertFilterConditionsSchema.optional(),
24
- });
25
- export { CreateAlertBodySchema };
26
- //Alert.update
27
- const UpdateAlertThresholdSchema = z.object({
28
- mode: z.enum(['absolute', 'percentage']).optional(),
29
- value: z.number().optional(),
30
- });
31
- const UpdateAlertBodySchema = z.looseObject({
32
- status: z.enum(['enabled', 'disabled']).optional(),
33
- threshold: UpdateAlertThresholdSchema.optional(),
34
- });
35
- export { UpdateAlertBodySchema };
@@ -1,55 +0,0 @@
1
- // Generated Zod schemas: AttachedItem
2
- // Actions: create, update, retrieve, delete
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //AttachedItem.create
6
- const CreateAttachedItemBodySchema = z.looseObject({
7
- item_id: z.string().max(100),
8
- type: z.enum(['recommended', 'mandatory', 'optional']).optional(),
9
- billing_cycles: z.number().int().min(1).optional(),
10
- quantity: z.number().int().min(1).optional(),
11
- quantity_in_decimal: z.string().max(33).optional(),
12
- charge_on_event: z
13
- .enum([
14
- 'subscription_creation',
15
- 'subscription_trial_start',
16
- 'plan_activation',
17
- 'subscription_activation',
18
- 'contract_termination',
19
- 'on_demand',
20
- ])
21
- .optional(),
22
- charge_once: z.boolean().optional(),
23
- business_entity_id: z.string().max(50).optional(),
24
- });
25
- export { CreateAttachedItemBodySchema };
26
- //AttachedItem.update
27
- const UpdateAttachedItemBodySchema = z.looseObject({
28
- parent_item_id: z.string().max(100),
29
- type: z.enum(['recommended', 'mandatory', 'optional']).optional(),
30
- billing_cycles: z.number().int().min(1).optional(),
31
- quantity: z.number().int().min(1).optional(),
32
- quantity_in_decimal: z.string().max(33).optional(),
33
- charge_on_event: z
34
- .enum([
35
- 'subscription_creation',
36
- 'subscription_trial_start',
37
- 'plan_activation',
38
- 'subscription_activation',
39
- 'contract_termination',
40
- 'on_demand',
41
- ])
42
- .optional(),
43
- charge_once: z.boolean().optional(),
44
- });
45
- export { UpdateAttachedItemBodySchema };
46
- //AttachedItem.retrieve
47
- const RetrieveAttachedItemBodySchema = z.looseObject({
48
- parent_item_id: z.string().max(100),
49
- });
50
- export { RetrieveAttachedItemBodySchema };
51
- //AttachedItem.delete
52
- const DeleteAttachedItemBodySchema = z.looseObject({
53
- parent_item_id: z.string().max(100),
54
- });
55
- export { DeleteAttachedItemBodySchema };
@@ -1,43 +0,0 @@
1
- // Generated Zod schemas: BusinessEntity
2
- // Actions: createTransfers, getTransfers
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //BusinessEntity.createTransfers
6
- const CreateTransfersBusinessEntityBodySchema = z.looseObject({
7
- active_resource_ids: z.array(z.string().max(50).optional()),
8
- destination_business_entity_ids: z.array(z.string().max(50).optional()),
9
- source_business_entity_ids: z.array(z.string().max(50).optional()).optional(),
10
- resource_types: z.array(z.string().max(50).optional()),
11
- reason_codes: z.array(z.string().max(50).optional()),
12
- });
13
- export { CreateTransfersBusinessEntityBodySchema };
14
- //BusinessEntity.getTransfers
15
- const GetTransfersBusinessEntityResourceTypeSchema = z.object({
16
- is: z.string().min(1).optional(),
17
- });
18
- const GetTransfersBusinessEntityResourceIdSchema = z.object({
19
- is: z.string().min(1).optional(),
20
- });
21
- const GetTransfersBusinessEntityActiveResourceIdSchema = z.object({
22
- is: z.string().min(1).optional(),
23
- });
24
- const GetTransfersBusinessEntityCreatedAtSchema = z.object({
25
- after: z.string().regex(RegExp('^d{10}$')).optional(),
26
- before: z.string().regex(RegExp('^d{10}$')).optional(),
27
- on: z.string().regex(RegExp('^d{10}$')).optional(),
28
- between: z.string().regex(RegExp('^[d{10},d{10}]$')).optional(),
29
- });
30
- const GetTransfersBusinessEntitySortBySchema = z.looseObject({
31
- asc: z.enum(['created_at']).optional(),
32
- desc: z.enum(['created_at']).optional(),
33
- });
34
- const GetTransfersBusinessEntityBodySchema = z.looseObject({
35
- limit: z.number().int().min(1).max(100).optional(),
36
- offset: z.string().max(1000).optional(),
37
- resource_type: GetTransfersBusinessEntityResourceTypeSchema.optional(),
38
- resource_id: GetTransfersBusinessEntityResourceIdSchema.optional(),
39
- active_resource_id: GetTransfersBusinessEntityActiveResourceIdSchema.optional(),
40
- created_at: GetTransfersBusinessEntityCreatedAtSchema.optional(),
41
- sort_by: GetTransfersBusinessEntitySortBySchema.optional(),
42
- });
43
- export { GetTransfersBusinessEntityBodySchema };
@@ -1,162 +0,0 @@
1
- // Generated Zod schemas: Card
2
- // Actions: updateCardForCustomer, switchGatewayForCustomer, copyCardForCustomer
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //Card.updateCardForCustomer
6
- const UpdateCardForCustomerCardCustomerSchema = z.object({
7
- vat_number: z.string().max(20).optional(),
8
- });
9
- const UpdateCardForCustomerCardBodySchema = z.looseObject({
10
- gateway: z
11
- .enum([
12
- 'chargebee',
13
- 'chargebee_payments',
14
- 'adyen',
15
- 'stripe',
16
- 'wepay',
17
- 'braintree',
18
- 'authorize_net',
19
- 'paypal_pro',
20
- 'pin',
21
- 'eway',
22
- 'eway_rapid',
23
- 'worldpay',
24
- 'balanced_payments',
25
- 'beanstream',
26
- 'bluepay',
27
- 'elavon',
28
- 'first_data_global',
29
- 'hdfc',
30
- 'migs',
31
- 'nmi',
32
- 'ogone',
33
- 'paymill',
34
- 'paypal_payflow_pro',
35
- 'sage_pay',
36
- 'tco',
37
- 'wirecard',
38
- 'amazon_payments',
39
- 'paypal_express_checkout',
40
- 'orbital',
41
- 'moneris_us',
42
- 'moneris',
43
- 'bluesnap',
44
- 'cybersource',
45
- 'vantiv',
46
- 'checkout_com',
47
- 'paypal',
48
- 'ingenico_direct',
49
- 'exact',
50
- 'mollie',
51
- 'quickbooks',
52
- 'razorpay',
53
- 'global_payments',
54
- 'bank_of_america',
55
- 'ecentric',
56
- 'metrics_global',
57
- 'windcave',
58
- 'pay_com',
59
- 'ebanx',
60
- 'dlocal',
61
- 'nuvei',
62
- 'solidgate',
63
- 'paystack',
64
- 'jp_morgan',
65
- 'deutsche_bank',
66
- 'ezidebit',
67
- 'twikey',
68
- 'tempus',
69
- 'moyasar',
70
- 'payway',
71
- ])
72
- .optional(),
73
- gateway_account_id: z.string().max(50).optional(),
74
- tmp_token: z.string().max(300).optional(),
75
- first_name: z.string().max(50).optional(),
76
- last_name: z.string().max(50).optional(),
77
- number: z.string().max(1500),
78
- expiry_month: z.number().int().min(1).max(12),
79
- expiry_year: z.number().int(),
80
- cvv: z.string().max(520).optional(),
81
- preferred_scheme: z
82
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
83
- .optional(),
84
- billing_addr1: z.string().max(150).optional(),
85
- billing_addr2: z.string().max(150).optional(),
86
- billing_city: z.string().max(50).optional(),
87
- billing_state_code: z.string().max(50).optional(),
88
- billing_state: z.string().max(50).optional(),
89
- billing_zip: z.string().max(20).optional(),
90
- billing_country: z.string().max(50).optional(),
91
- ip_address: z.string().max(50).optional(),
92
- customer: UpdateCardForCustomerCardCustomerSchema.optional(),
93
- });
94
- export { UpdateCardForCustomerCardBodySchema };
95
- //Card.switchGatewayForCustomer
96
- const SwitchGatewayForCustomerCardBodySchema = z.looseObject({
97
- gateway: z
98
- .enum([
99
- 'chargebee_payments',
100
- 'adyen',
101
- 'stripe',
102
- 'wepay',
103
- 'braintree',
104
- 'authorize_net',
105
- 'paypal_pro',
106
- 'pin',
107
- 'eway',
108
- 'eway_rapid',
109
- 'worldpay',
110
- 'balanced_payments',
111
- 'beanstream',
112
- 'bluepay',
113
- 'elavon',
114
- 'first_data_global',
115
- 'hdfc',
116
- 'migs',
117
- 'nmi',
118
- 'ogone',
119
- 'paymill',
120
- 'paypal_payflow_pro',
121
- 'sage_pay',
122
- 'wirecard',
123
- 'orbital',
124
- 'moneris_us',
125
- 'moneris',
126
- 'bluesnap',
127
- 'cybersource',
128
- 'vantiv',
129
- 'checkout_com',
130
- 'ingenico_direct',
131
- 'exact',
132
- 'mollie',
133
- 'quickbooks',
134
- 'razorpay',
135
- 'global_payments',
136
- 'bank_of_america',
137
- 'ecentric',
138
- 'metrics_global',
139
- 'windcave',
140
- 'pay_com',
141
- 'ebanx',
142
- 'dlocal',
143
- 'nuvei',
144
- 'solidgate',
145
- 'paystack',
146
- 'jp_morgan',
147
- 'deutsche_bank',
148
- 'ezidebit',
149
- 'twikey',
150
- 'tempus',
151
- 'moyasar',
152
- 'payway',
153
- ])
154
- .optional(),
155
- gateway_account_id: z.string().max(50),
156
- });
157
- export { SwitchGatewayForCustomerCardBodySchema };
158
- //Card.copyCardForCustomer
159
- const CopyCardForCustomerCardBodySchema = z.looseObject({
160
- gateway_account_id: z.string().max(50),
161
- });
162
- export { CopyCardForCustomerCardBodySchema };
@@ -1,66 +0,0 @@
1
- // Generated Zod schemas: Comment
2
- // Actions: create, list
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //Comment.create
6
- const CreateCommentBodySchema = z.looseObject({
7
- entity_type: z.enum([
8
- 'customer',
9
- 'subscription',
10
- 'invoice',
11
- 'quote',
12
- 'credit_note',
13
- 'transaction',
14
- 'plan',
15
- 'addon',
16
- 'coupon',
17
- 'order',
18
- 'business_entity',
19
- 'item_family',
20
- 'item',
21
- 'item_price',
22
- 'price_variant',
23
- ]),
24
- entity_id: z.string().max(100),
25
- notes: z.string().max(1000),
26
- added_by: z.string().max(100).optional(),
27
- });
28
- export { CreateCommentBodySchema };
29
- //Comment.list
30
- const ListCommentCreatedAtSchema = z.object({
31
- after: z.string().regex(RegExp('^d{10}$')).optional(),
32
- before: z.string().regex(RegExp('^d{10}$')).optional(),
33
- on: z.string().regex(RegExp('^d{10}$')).optional(),
34
- between: z.string().regex(RegExp('^[d{10},d{10}]$')).optional(),
35
- });
36
- const ListCommentSortBySchema = z.looseObject({
37
- asc: z.enum(['created_at']).optional(),
38
- desc: z.enum(['created_at']).optional(),
39
- });
40
- const ListCommentBodySchema = z.looseObject({
41
- limit: z.number().int().min(1).max(100).optional(),
42
- offset: z.string().max(1000).optional(),
43
- entity_type: z
44
- .enum([
45
- 'customer',
46
- 'subscription',
47
- 'invoice',
48
- 'quote',
49
- 'credit_note',
50
- 'transaction',
51
- 'plan',
52
- 'addon',
53
- 'coupon',
54
- 'order',
55
- 'business_entity',
56
- 'item_family',
57
- 'item',
58
- 'item_price',
59
- 'price_variant',
60
- ])
61
- .optional(),
62
- entity_id: z.string().max(100).optional(),
63
- created_at: ListCommentCreatedAtSchema.optional(),
64
- sort_by: ListCommentSortBySchema.optional(),
65
- });
66
- export { ListCommentBodySchema };