chargebee 3.25.0-beta.1 → 3.25.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 (166) hide show
  1. package/CHANGELOG.md +66 -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 +1 -2
  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 +1 -2
  16. package/esm/resources/webhook/eventType.js +2 -0
  17. package/package.json +1 -4
  18. package/types/core.d.ts +23 -6
  19. package/types/index.d.ts +0 -17
  20. package/types/resources/Content.d.ts +0 -1
  21. package/types/resources/Customer.d.ts +14 -4
  22. package/types/resources/Estimate.d.ts +14 -4
  23. package/types/resources/Event.d.ts +2 -0
  24. package/types/resources/Gift.d.ts +23 -6
  25. package/types/resources/HostedPage.d.ts +1 -0
  26. package/types/resources/Invoice.d.ts +14 -5
  27. package/types/resources/OmnichannelSubscription.d.ts +6 -0
  28. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
  29. package/types/resources/PaymentIntent.d.ts +35 -10
  30. package/types/resources/PaymentSource.d.ts +7 -2
  31. package/types/resources/Purchase.d.ts +7 -2
  32. package/types/resources/Subscription.d.ts +49 -14
  33. package/types/resources/WebhookEvent.d.ts +22 -4
  34. package/cjs/chargebeeZodValidationError.js +0 -18
  35. package/cjs/schema/addon.schema.js +0 -153
  36. package/cjs/schema/address.schema.js +0 -35
  37. package/cjs/schema/alert.schema.js +0 -38
  38. package/cjs/schema/attached_item.schema.js +0 -58
  39. package/cjs/schema/business_entity.schema.js +0 -46
  40. package/cjs/schema/card.schema.js +0 -165
  41. package/cjs/schema/comment.schema.js +0 -69
  42. package/cjs/schema/coupon.schema.js +0 -209
  43. package/cjs/schema/coupon_code.schema.js +0 -14
  44. package/cjs/schema/coupon_set.schema.js +0 -28
  45. package/cjs/schema/credit_note.schema.js +0 -288
  46. package/cjs/schema/currency.schema.js +0 -32
  47. package/cjs/schema/customer.schema.js +0 -986
  48. package/cjs/schema/customer_entitlement.schema.js +0 -14
  49. package/cjs/schema/differential_price.schema.js +0 -68
  50. package/cjs/schema/entitlement.schema.js +0 -27
  51. package/cjs/schema/entitlement_override.schema.js +0 -33
  52. package/cjs/schema/estimate.schema.js +0 -1525
  53. package/cjs/schema/export.schema.js +0 -1545
  54. package/cjs/schema/feature.schema.js +0 -37
  55. package/cjs/schema/gift.schema.js +0 -277
  56. package/cjs/schema/hosted_page.schema.js +0 -1649
  57. package/cjs/schema/in_app_subscription.schema.js +0 -68
  58. package/cjs/schema/index.js +0 -80
  59. package/cjs/schema/invoice.schema.js +0 -1467
  60. package/cjs/schema/item.schema.js +0 -91
  61. package/cjs/schema/item_entitlement.schema.js +0 -45
  62. package/cjs/schema/item_family.schema.js +0 -21
  63. package/cjs/schema/item_price.schema.js +0 -190
  64. package/cjs/schema/non_subscription.schema.js +0 -28
  65. package/cjs/schema/offer_event.schema.js +0 -13
  66. package/cjs/schema/offer_fulfillment.schema.js +0 -20
  67. package/cjs/schema/omnichannel_one_time_order.schema.js +0 -26
  68. package/cjs/schema/omnichannel_subscription.schema.js +0 -89
  69. package/cjs/schema/omnichannel_subscription_item.schema.js +0 -13
  70. package/cjs/schema/order.schema.js +0 -273
  71. package/cjs/schema/payment_intent.schema.js +0 -117
  72. package/cjs/schema/payment_schedule_scheme.schema.js +0 -20
  73. package/cjs/schema/payment_source.schema.js +0 -358
  74. package/cjs/schema/payment_voucher.schema.js +0 -57
  75. package/cjs/schema/personalized_offer.schema.js +0 -28
  76. package/cjs/schema/plan.schema.js +0 -225
  77. package/cjs/schema/portal_session.schema.js +0 -22
  78. package/cjs/schema/price_variant.schema.js +0 -36
  79. package/cjs/schema/pricing_page_session.schema.js +0 -135
  80. package/cjs/schema/promotional_credit.schema.js +0 -78
  81. package/cjs/schema/purchase.schema.js +0 -272
  82. package/cjs/schema/quote.schema.js +0 -1557
  83. package/cjs/schema/ramp.schema.js +0 -209
  84. package/cjs/schema/recorded_purchase.schema.js +0 -32
  85. package/cjs/schema/resource_migration.schema.js +0 -14
  86. package/cjs/schema/site_migration_detail.schema.js +0 -81
  87. package/cjs/schema/subscription.schema.js +0 -2993
  88. package/cjs/schema/subscription_entitlement.schema.js +0 -25
  89. package/cjs/schema/time_machine.schema.js +0 -17
  90. package/cjs/schema/transaction.schema.js +0 -70
  91. package/cjs/schema/unbilled_charge.schema.js +0 -113
  92. package/cjs/schema/usage.schema.js +0 -93
  93. package/cjs/schema/usage_charge.schema.js +0 -17
  94. package/cjs/schema/usage_event.schema.js +0 -28
  95. package/cjs/schema/usage_file.schema.js +0 -13
  96. package/cjs/schema/usage_summary.schema.js +0 -17
  97. package/cjs/schema/virtual_bank_account.schema.js +0 -43
  98. package/cjs/schema/webhook_endpoint.schema.js +0 -504
  99. package/cjs/validationLoader.js +0 -59
  100. package/esm/chargebeeZodValidationError.js +0 -14
  101. package/esm/schema/addon.schema.js +0 -150
  102. package/esm/schema/address.schema.js +0 -32
  103. package/esm/schema/alert.schema.js +0 -35
  104. package/esm/schema/attached_item.schema.js +0 -55
  105. package/esm/schema/business_entity.schema.js +0 -43
  106. package/esm/schema/card.schema.js +0 -162
  107. package/esm/schema/comment.schema.js +0 -66
  108. package/esm/schema/coupon.schema.js +0 -206
  109. package/esm/schema/coupon_code.schema.js +0 -11
  110. package/esm/schema/coupon_set.schema.js +0 -25
  111. package/esm/schema/credit_note.schema.js +0 -285
  112. package/esm/schema/currency.schema.js +0 -29
  113. package/esm/schema/customer.schema.js +0 -983
  114. package/esm/schema/customer_entitlement.schema.js +0 -11
  115. package/esm/schema/differential_price.schema.js +0 -65
  116. package/esm/schema/entitlement.schema.js +0 -24
  117. package/esm/schema/entitlement_override.schema.js +0 -30
  118. package/esm/schema/estimate.schema.js +0 -1522
  119. package/esm/schema/export.schema.js +0 -1542
  120. package/esm/schema/feature.schema.js +0 -34
  121. package/esm/schema/gift.schema.js +0 -274
  122. package/esm/schema/hosted_page.schema.js +0 -1646
  123. package/esm/schema/in_app_subscription.schema.js +0 -65
  124. package/esm/schema/index.js +0 -64
  125. package/esm/schema/invoice.schema.js +0 -1464
  126. package/esm/schema/item.schema.js +0 -88
  127. package/esm/schema/item_entitlement.schema.js +0 -42
  128. package/esm/schema/item_family.schema.js +0 -18
  129. package/esm/schema/item_price.schema.js +0 -187
  130. package/esm/schema/non_subscription.schema.js +0 -25
  131. package/esm/schema/offer_event.schema.js +0 -10
  132. package/esm/schema/offer_fulfillment.schema.js +0 -17
  133. package/esm/schema/omnichannel_one_time_order.schema.js +0 -23
  134. package/esm/schema/omnichannel_subscription.schema.js +0 -86
  135. package/esm/schema/omnichannel_subscription_item.schema.js +0 -10
  136. package/esm/schema/order.schema.js +0 -270
  137. package/esm/schema/payment_intent.schema.js +0 -114
  138. package/esm/schema/payment_schedule_scheme.schema.js +0 -17
  139. package/esm/schema/payment_source.schema.js +0 -355
  140. package/esm/schema/payment_voucher.schema.js +0 -54
  141. package/esm/schema/personalized_offer.schema.js +0 -25
  142. package/esm/schema/plan.schema.js +0 -222
  143. package/esm/schema/portal_session.schema.js +0 -19
  144. package/esm/schema/price_variant.schema.js +0 -33
  145. package/esm/schema/pricing_page_session.schema.js +0 -132
  146. package/esm/schema/promotional_credit.schema.js +0 -75
  147. package/esm/schema/purchase.schema.js +0 -269
  148. package/esm/schema/quote.schema.js +0 -1554
  149. package/esm/schema/ramp.schema.js +0 -206
  150. package/esm/schema/recorded_purchase.schema.js +0 -29
  151. package/esm/schema/resource_migration.schema.js +0 -11
  152. package/esm/schema/site_migration_detail.schema.js +0 -78
  153. package/esm/schema/subscription.schema.js +0 -2990
  154. package/esm/schema/subscription_entitlement.schema.js +0 -22
  155. package/esm/schema/time_machine.schema.js +0 -14
  156. package/esm/schema/transaction.schema.js +0 -67
  157. package/esm/schema/unbilled_charge.schema.js +0 -110
  158. package/esm/schema/usage.schema.js +0 -90
  159. package/esm/schema/usage_charge.schema.js +0 -14
  160. package/esm/schema/usage_event.schema.js +0 -25
  161. package/esm/schema/usage_file.schema.js +0 -10
  162. package/esm/schema/usage_summary.schema.js +0 -14
  163. package/esm/schema/virtual_bank_account.schema.js +0 -40
  164. package/esm/schema/webhook_endpoint.schema.js +0 -501
  165. package/esm/validationLoader.js +0 -56
  166. package/types/resources/QuoteEntitlement.d.ts +0 -16
@@ -1,153 +0,0 @@
1
- "use strict";
2
- // Generated Zod schemas: Addon
3
- // Actions: create, update, copy
4
- // Do not edit manually – regenerate via sdk-generator
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CopyAddonBodySchema = exports.UpdateAddonBodySchema = exports.CreateAddonBodySchema = void 0;
7
- const zod_1 = require("zod");
8
- //Addon.create
9
- const CreateAddonMetaDataSchema = zod_1.z.looseObject({});
10
- const CreateAddonTiersSchema = zod_1.z.object({
11
- starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
12
- ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
13
- price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
14
- starting_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
15
- ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
16
- price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
17
- });
18
- const CreateAddonTaxProvidersFieldsSchema = zod_1.z.object({
19
- provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
20
- field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
21
- field_value: zod_1.z.array(zod_1.z.string().max(50).optional()),
22
- });
23
- const CreateAddonBodySchema = zod_1.z.looseObject({
24
- id: zod_1.z.string().max(100),
25
- name: zod_1.z.string().max(100),
26
- invoice_name: zod_1.z.string().max(100).optional(),
27
- description: zod_1.z.string().max(2000).optional(),
28
- charge_type: zod_1.z.enum(['recurring', 'non_recurring']),
29
- price: zod_1.z.number().int().min(0).optional(),
30
- currency_code: zod_1.z.string().max(3).optional(),
31
- period: zod_1.z.number().int().min(1).optional(),
32
- period_unit: zod_1.z
33
- .enum(['day', 'week', 'month', 'year', 'not_applicable'])
34
- .optional(),
35
- pricing_model: zod_1.z
36
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
37
- .optional(),
38
- type: zod_1.z
39
- .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
40
- .optional(),
41
- unit: zod_1.z.string().max(30).optional(),
42
- enabled_in_portal: zod_1.z.boolean().default(true).optional(),
43
- taxable: zod_1.z.boolean().default(true).optional(),
44
- tax_profile_id: zod_1.z.string().max(50).optional(),
45
- avalara_sale_type: zod_1.z
46
- .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
47
- .optional(),
48
- avalara_transaction_type: zod_1.z.number().int().optional(),
49
- avalara_service_type: zod_1.z.number().int().optional(),
50
- tax_code: zod_1.z.string().max(50).optional(),
51
- hsn_code: zod_1.z.string().max(50).optional(),
52
- taxjar_product_code: zod_1.z.string().max(50).optional(),
53
- invoice_notes: zod_1.z.string().max(2000).optional(),
54
- meta_data: CreateAddonMetaDataSchema.optional(),
55
- sku: zod_1.z.string().max(100).optional(),
56
- accounting_code: zod_1.z.string().max(100).optional(),
57
- accounting_category1: zod_1.z.string().max(100).optional(),
58
- accounting_category2: zod_1.z.string().max(100).optional(),
59
- accounting_category3: zod_1.z.string().max(100).optional(),
60
- accounting_category4: zod_1.z.string().max(100).optional(),
61
- is_shippable: zod_1.z.boolean().default(false).optional(),
62
- shipping_frequency_period: zod_1.z.number().int().min(1).optional(),
63
- shipping_frequency_period_unit: zod_1.z
64
- .enum(['year', 'month', 'week', 'day'])
65
- .optional(),
66
- included_in_mrr: zod_1.z.boolean().optional(),
67
- show_description_in_invoices: zod_1.z.boolean().default(false).optional(),
68
- show_description_in_quotes: zod_1.z.boolean().default(false).optional(),
69
- price_in_decimal: zod_1.z.string().max(39).optional(),
70
- proration_type: zod_1.z
71
- .enum(['site_default', 'partial_term', 'full_term'])
72
- .optional(),
73
- status: zod_1.z.enum(['active', 'archived']).optional(),
74
- tiers: CreateAddonTiersSchema.optional(),
75
- tax_providers_fields: CreateAddonTaxProvidersFieldsSchema.optional(),
76
- });
77
- exports.CreateAddonBodySchema = CreateAddonBodySchema;
78
- //Addon.update
79
- const UpdateAddonMetaDataSchema = zod_1.z.looseObject({});
80
- const UpdateAddonTiersSchema = zod_1.z.object({
81
- starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
82
- ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
83
- price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
84
- starting_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
85
- ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
86
- price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
87
- });
88
- const UpdateAddonTaxProvidersFieldsSchema = zod_1.z.object({
89
- provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
90
- field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
91
- field_value: zod_1.z.array(zod_1.z.string().max(50).optional()),
92
- });
93
- const UpdateAddonBodySchema = zod_1.z.looseObject({
94
- name: zod_1.z.string().max(100).optional(),
95
- invoice_name: zod_1.z.string().max(100).optional(),
96
- description: zod_1.z.string().max(2000).optional(),
97
- charge_type: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
98
- price: zod_1.z.number().int().min(0).optional(),
99
- currency_code: zod_1.z.string().max(3).optional(),
100
- period: zod_1.z.number().int().min(1).optional(),
101
- period_unit: zod_1.z
102
- .enum(['day', 'week', 'month', 'year', 'not_applicable'])
103
- .optional(),
104
- pricing_model: zod_1.z
105
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
106
- .optional(),
107
- type: zod_1.z
108
- .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
109
- .optional(),
110
- unit: zod_1.z.string().max(30).optional(),
111
- enabled_in_portal: zod_1.z.boolean().default(true).optional(),
112
- taxable: zod_1.z.boolean().default(true).optional(),
113
- tax_profile_id: zod_1.z.string().max(50).optional(),
114
- avalara_sale_type: zod_1.z
115
- .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
116
- .optional(),
117
- avalara_transaction_type: zod_1.z.number().int().optional(),
118
- avalara_service_type: zod_1.z.number().int().optional(),
119
- tax_code: zod_1.z.string().max(50).optional(),
120
- hsn_code: zod_1.z.string().max(50).optional(),
121
- taxjar_product_code: zod_1.z.string().max(50).optional(),
122
- invoice_notes: zod_1.z.string().max(2000).optional(),
123
- meta_data: UpdateAddonMetaDataSchema.optional(),
124
- sku: zod_1.z.string().max(100).optional(),
125
- accounting_code: zod_1.z.string().max(100).optional(),
126
- accounting_category1: zod_1.z.string().max(100).optional(),
127
- accounting_category2: zod_1.z.string().max(100).optional(),
128
- accounting_category3: zod_1.z.string().max(100).optional(),
129
- accounting_category4: zod_1.z.string().max(100).optional(),
130
- is_shippable: zod_1.z.boolean().default(false).optional(),
131
- shipping_frequency_period: zod_1.z.number().int().min(1).optional(),
132
- shipping_frequency_period_unit: zod_1.z
133
- .enum(['year', 'month', 'week', 'day'])
134
- .optional(),
135
- included_in_mrr: zod_1.z.boolean().optional(),
136
- show_description_in_invoices: zod_1.z.boolean().default(false).optional(),
137
- show_description_in_quotes: zod_1.z.boolean().default(false).optional(),
138
- price_in_decimal: zod_1.z.string().max(39).optional(),
139
- proration_type: zod_1.z
140
- .enum(['site_default', 'partial_term', 'full_term'])
141
- .optional(),
142
- tiers: UpdateAddonTiersSchema.optional(),
143
- tax_providers_fields: UpdateAddonTaxProvidersFieldsSchema.optional(),
144
- });
145
- exports.UpdateAddonBodySchema = UpdateAddonBodySchema;
146
- //Addon.copy
147
- const CopyAddonBodySchema = zod_1.z.looseObject({
148
- from_site: zod_1.z.string().max(50),
149
- id_at_from_site: zod_1.z.string().max(100),
150
- id: zod_1.z.string().max(100).optional(),
151
- for_site_merging: zod_1.z.boolean().default(false).optional(),
152
- });
153
- exports.CopyAddonBodySchema = CopyAddonBodySchema;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- // Generated Zod schemas: Address
3
- // Actions: retrieve, update
4
- // Do not edit manually – regenerate via sdk-generator
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UpdateAddressBodySchema = exports.RetrieveAddressBodySchema = void 0;
7
- const zod_1 = require("zod");
8
- //Address.retrieve
9
- const RetrieveAddressBodySchema = zod_1.z.looseObject({
10
- subscription_id: zod_1.z.string().max(50),
11
- label: zod_1.z.string().max(50),
12
- });
13
- exports.RetrieveAddressBodySchema = RetrieveAddressBodySchema;
14
- //Address.update
15
- const UpdateAddressBodySchema = zod_1.z.looseObject({
16
- subscription_id: zod_1.z.string().max(50),
17
- label: zod_1.z.string().max(50),
18
- first_name: zod_1.z.string().max(150).optional(),
19
- last_name: zod_1.z.string().max(150).optional(),
20
- email: zod_1.z.string().email().max(70).optional(),
21
- company: zod_1.z.string().max(250).optional(),
22
- phone: zod_1.z.string().max(50).optional(),
23
- addr: zod_1.z.string().max(150).optional(),
24
- extended_addr: zod_1.z.string().max(150).optional(),
25
- extended_addr2: zod_1.z.string().max(150).optional(),
26
- city: zod_1.z.string().max(50).optional(),
27
- state_code: zod_1.z.string().max(50).optional(),
28
- state: zod_1.z.string().max(50).optional(),
29
- zip: zod_1.z.string().max(20).optional(),
30
- country: zod_1.z.string().max(50).optional(),
31
- validation_status: zod_1.z
32
- .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
33
- .optional(),
34
- });
35
- exports.UpdateAddressBodySchema = UpdateAddressBodySchema;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- // Generated Zod schemas: Alert
3
- // Actions: create, update
4
- // Do not edit manually – regenerate via sdk-generator
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UpdateAlertBodySchema = exports.CreateAlertBodySchema = void 0;
7
- const zod_1 = require("zod");
8
- //Alert.create
9
- const CreateAlertThresholdSchema = zod_1.z.object({
10
- mode: zod_1.z.enum(['absolute', 'percentage']),
11
- value: zod_1.z.number(),
12
- });
13
- const CreateAlertFilterConditionsSchema = zod_1.z.object({
14
- field: zod_1.z.array(zod_1.z.enum(['plan_price_id']).optional()).optional(),
15
- operator: zod_1.z.array(zod_1.z.enum(['equals', 'not_equals']).optional()).optional(),
16
- value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
17
- });
18
- const CreateAlertBodySchema = zod_1.z.looseObject({
19
- type: zod_1.z.enum(['usage_exceeded']),
20
- name: zod_1.z.string().max(50),
21
- description: zod_1.z.string().max(65000).optional(),
22
- metered_feature_id: zod_1.z.string().max(50),
23
- subscription_id: zod_1.z.string().max(50).optional(),
24
- meta: zod_1.z.string().max(65000).optional(),
25
- threshold: CreateAlertThresholdSchema.optional(),
26
- filter_conditions: CreateAlertFilterConditionsSchema.optional(),
27
- });
28
- exports.CreateAlertBodySchema = CreateAlertBodySchema;
29
- //Alert.update
30
- const UpdateAlertThresholdSchema = zod_1.z.object({
31
- mode: zod_1.z.enum(['absolute', 'percentage']).optional(),
32
- value: zod_1.z.number().optional(),
33
- });
34
- const UpdateAlertBodySchema = zod_1.z.looseObject({
35
- status: zod_1.z.enum(['enabled', 'disabled']).optional(),
36
- threshold: UpdateAlertThresholdSchema.optional(),
37
- });
38
- exports.UpdateAlertBodySchema = UpdateAlertBodySchema;
@@ -1,58 +0,0 @@
1
- "use strict";
2
- // Generated Zod schemas: AttachedItem
3
- // Actions: create, update, retrieve, delete
4
- // Do not edit manually – regenerate via sdk-generator
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DeleteAttachedItemBodySchema = exports.RetrieveAttachedItemBodySchema = exports.UpdateAttachedItemBodySchema = exports.CreateAttachedItemBodySchema = void 0;
7
- const zod_1 = require("zod");
8
- //AttachedItem.create
9
- const CreateAttachedItemBodySchema = zod_1.z.looseObject({
10
- item_id: zod_1.z.string().max(100),
11
- type: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
12
- billing_cycles: zod_1.z.number().int().min(1).optional(),
13
- quantity: zod_1.z.number().int().min(1).optional(),
14
- quantity_in_decimal: zod_1.z.string().max(33).optional(),
15
- charge_on_event: zod_1.z
16
- .enum([
17
- 'subscription_creation',
18
- 'subscription_trial_start',
19
- 'plan_activation',
20
- 'subscription_activation',
21
- 'contract_termination',
22
- 'on_demand',
23
- ])
24
- .optional(),
25
- charge_once: zod_1.z.boolean().optional(),
26
- business_entity_id: zod_1.z.string().max(50).optional(),
27
- });
28
- exports.CreateAttachedItemBodySchema = CreateAttachedItemBodySchema;
29
- //AttachedItem.update
30
- const UpdateAttachedItemBodySchema = zod_1.z.looseObject({
31
- parent_item_id: zod_1.z.string().max(100),
32
- type: zod_1.z.enum(['recommended', 'mandatory', 'optional']).optional(),
33
- billing_cycles: zod_1.z.number().int().min(1).optional(),
34
- quantity: zod_1.z.number().int().min(1).optional(),
35
- quantity_in_decimal: zod_1.z.string().max(33).optional(),
36
- charge_on_event: zod_1.z
37
- .enum([
38
- 'subscription_creation',
39
- 'subscription_trial_start',
40
- 'plan_activation',
41
- 'subscription_activation',
42
- 'contract_termination',
43
- 'on_demand',
44
- ])
45
- .optional(),
46
- charge_once: zod_1.z.boolean().optional(),
47
- });
48
- exports.UpdateAttachedItemBodySchema = UpdateAttachedItemBodySchema;
49
- //AttachedItem.retrieve
50
- const RetrieveAttachedItemBodySchema = zod_1.z.looseObject({
51
- parent_item_id: zod_1.z.string().max(100),
52
- });
53
- exports.RetrieveAttachedItemBodySchema = RetrieveAttachedItemBodySchema;
54
- //AttachedItem.delete
55
- const DeleteAttachedItemBodySchema = zod_1.z.looseObject({
56
- parent_item_id: zod_1.z.string().max(100),
57
- });
58
- exports.DeleteAttachedItemBodySchema = DeleteAttachedItemBodySchema;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- // Generated Zod schemas: BusinessEntity
3
- // Actions: createTransfers, getTransfers
4
- // Do not edit manually – regenerate via sdk-generator
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.GetTransfersBusinessEntityBodySchema = exports.CreateTransfersBusinessEntityBodySchema = void 0;
7
- const zod_1 = require("zod");
8
- //BusinessEntity.createTransfers
9
- const CreateTransfersBusinessEntityBodySchema = zod_1.z.looseObject({
10
- active_resource_ids: zod_1.z.array(zod_1.z.string().max(50).optional()),
11
- destination_business_entity_ids: zod_1.z.array(zod_1.z.string().max(50).optional()),
12
- source_business_entity_ids: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
13
- resource_types: zod_1.z.array(zod_1.z.string().max(50).optional()),
14
- reason_codes: zod_1.z.array(zod_1.z.string().max(50).optional()),
15
- });
16
- exports.CreateTransfersBusinessEntityBodySchema = CreateTransfersBusinessEntityBodySchema;
17
- //BusinessEntity.getTransfers
18
- const GetTransfersBusinessEntityResourceTypeSchema = zod_1.z.object({
19
- is: zod_1.z.string().min(1).optional(),
20
- });
21
- const GetTransfersBusinessEntityResourceIdSchema = zod_1.z.object({
22
- is: zod_1.z.string().min(1).optional(),
23
- });
24
- const GetTransfersBusinessEntityActiveResourceIdSchema = zod_1.z.object({
25
- is: zod_1.z.string().min(1).optional(),
26
- });
27
- const GetTransfersBusinessEntityCreatedAtSchema = zod_1.z.object({
28
- after: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
29
- before: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
30
- on: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
31
- between: zod_1.z.string().regex(RegExp('^[d{10},d{10}]$')).optional(),
32
- });
33
- const GetTransfersBusinessEntitySortBySchema = zod_1.z.looseObject({
34
- asc: zod_1.z.enum(['created_at']).optional(),
35
- desc: zod_1.z.enum(['created_at']).optional(),
36
- });
37
- const GetTransfersBusinessEntityBodySchema = zod_1.z.looseObject({
38
- limit: zod_1.z.number().int().min(1).max(100).optional(),
39
- offset: zod_1.z.string().max(1000).optional(),
40
- resource_type: GetTransfersBusinessEntityResourceTypeSchema.optional(),
41
- resource_id: GetTransfersBusinessEntityResourceIdSchema.optional(),
42
- active_resource_id: GetTransfersBusinessEntityActiveResourceIdSchema.optional(),
43
- created_at: GetTransfersBusinessEntityCreatedAtSchema.optional(),
44
- sort_by: GetTransfersBusinessEntitySortBySchema.optional(),
45
- });
46
- exports.GetTransfersBusinessEntityBodySchema = GetTransfersBusinessEntityBodySchema;
@@ -1,165 +0,0 @@
1
- "use strict";
2
- // Generated Zod schemas: Card
3
- // Actions: updateCardForCustomer, switchGatewayForCustomer, copyCardForCustomer
4
- // Do not edit manually – regenerate via sdk-generator
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CopyCardForCustomerCardBodySchema = exports.SwitchGatewayForCustomerCardBodySchema = exports.UpdateCardForCustomerCardBodySchema = void 0;
7
- const zod_1 = require("zod");
8
- //Card.updateCardForCustomer
9
- const UpdateCardForCustomerCardCustomerSchema = zod_1.z.object({
10
- vat_number: zod_1.z.string().max(20).optional(),
11
- });
12
- const UpdateCardForCustomerCardBodySchema = zod_1.z.looseObject({
13
- gateway: zod_1.z
14
- .enum([
15
- 'chargebee',
16
- 'chargebee_payments',
17
- 'adyen',
18
- 'stripe',
19
- 'wepay',
20
- 'braintree',
21
- 'authorize_net',
22
- 'paypal_pro',
23
- 'pin',
24
- 'eway',
25
- 'eway_rapid',
26
- 'worldpay',
27
- 'balanced_payments',
28
- 'beanstream',
29
- 'bluepay',
30
- 'elavon',
31
- 'first_data_global',
32
- 'hdfc',
33
- 'migs',
34
- 'nmi',
35
- 'ogone',
36
- 'paymill',
37
- 'paypal_payflow_pro',
38
- 'sage_pay',
39
- 'tco',
40
- 'wirecard',
41
- 'amazon_payments',
42
- 'paypal_express_checkout',
43
- 'orbital',
44
- 'moneris_us',
45
- 'moneris',
46
- 'bluesnap',
47
- 'cybersource',
48
- 'vantiv',
49
- 'checkout_com',
50
- 'paypal',
51
- 'ingenico_direct',
52
- 'exact',
53
- 'mollie',
54
- 'quickbooks',
55
- 'razorpay',
56
- 'global_payments',
57
- 'bank_of_america',
58
- 'ecentric',
59
- 'metrics_global',
60
- 'windcave',
61
- 'pay_com',
62
- 'ebanx',
63
- 'dlocal',
64
- 'nuvei',
65
- 'solidgate',
66
- 'paystack',
67
- 'jp_morgan',
68
- 'deutsche_bank',
69
- 'ezidebit',
70
- 'twikey',
71
- 'tempus',
72
- 'moyasar',
73
- 'payway',
74
- ])
75
- .optional(),
76
- gateway_account_id: zod_1.z.string().max(50).optional(),
77
- tmp_token: zod_1.z.string().max(300).optional(),
78
- first_name: zod_1.z.string().max(50).optional(),
79
- last_name: zod_1.z.string().max(50).optional(),
80
- number: zod_1.z.string().max(1500),
81
- expiry_month: zod_1.z.number().int().min(1).max(12),
82
- expiry_year: zod_1.z.number().int(),
83
- cvv: zod_1.z.string().max(520).optional(),
84
- preferred_scheme: zod_1.z
85
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
86
- .optional(),
87
- billing_addr1: zod_1.z.string().max(150).optional(),
88
- billing_addr2: zod_1.z.string().max(150).optional(),
89
- billing_city: zod_1.z.string().max(50).optional(),
90
- billing_state_code: zod_1.z.string().max(50).optional(),
91
- billing_state: zod_1.z.string().max(50).optional(),
92
- billing_zip: zod_1.z.string().max(20).optional(),
93
- billing_country: zod_1.z.string().max(50).optional(),
94
- ip_address: zod_1.z.string().max(50).optional(),
95
- customer: UpdateCardForCustomerCardCustomerSchema.optional(),
96
- });
97
- exports.UpdateCardForCustomerCardBodySchema = UpdateCardForCustomerCardBodySchema;
98
- //Card.switchGatewayForCustomer
99
- const SwitchGatewayForCustomerCardBodySchema = zod_1.z.looseObject({
100
- gateway: zod_1.z
101
- .enum([
102
- 'chargebee_payments',
103
- 'adyen',
104
- 'stripe',
105
- 'wepay',
106
- 'braintree',
107
- 'authorize_net',
108
- 'paypal_pro',
109
- 'pin',
110
- 'eway',
111
- 'eway_rapid',
112
- 'worldpay',
113
- 'balanced_payments',
114
- 'beanstream',
115
- 'bluepay',
116
- 'elavon',
117
- 'first_data_global',
118
- 'hdfc',
119
- 'migs',
120
- 'nmi',
121
- 'ogone',
122
- 'paymill',
123
- 'paypal_payflow_pro',
124
- 'sage_pay',
125
- 'wirecard',
126
- 'orbital',
127
- 'moneris_us',
128
- 'moneris',
129
- 'bluesnap',
130
- 'cybersource',
131
- 'vantiv',
132
- 'checkout_com',
133
- 'ingenico_direct',
134
- 'exact',
135
- 'mollie',
136
- 'quickbooks',
137
- 'razorpay',
138
- 'global_payments',
139
- 'bank_of_america',
140
- 'ecentric',
141
- 'metrics_global',
142
- 'windcave',
143
- 'pay_com',
144
- 'ebanx',
145
- 'dlocal',
146
- 'nuvei',
147
- 'solidgate',
148
- 'paystack',
149
- 'jp_morgan',
150
- 'deutsche_bank',
151
- 'ezidebit',
152
- 'twikey',
153
- 'tempus',
154
- 'moyasar',
155
- 'payway',
156
- ])
157
- .optional(),
158
- gateway_account_id: zod_1.z.string().max(50),
159
- });
160
- exports.SwitchGatewayForCustomerCardBodySchema = SwitchGatewayForCustomerCardBodySchema;
161
- //Card.copyCardForCustomer
162
- const CopyCardForCustomerCardBodySchema = zod_1.z.looseObject({
163
- gateway_account_id: zod_1.z.string().max(50),
164
- });
165
- exports.CopyCardForCustomerCardBodySchema = CopyCardForCustomerCardBodySchema;
@@ -1,69 +0,0 @@
1
- "use strict";
2
- // Generated Zod schemas: Comment
3
- // Actions: create, list
4
- // Do not edit manually – regenerate via sdk-generator
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ListCommentBodySchema = exports.CreateCommentBodySchema = void 0;
7
- const zod_1 = require("zod");
8
- //Comment.create
9
- const CreateCommentBodySchema = zod_1.z.looseObject({
10
- entity_type: zod_1.z.enum([
11
- 'customer',
12
- 'subscription',
13
- 'invoice',
14
- 'quote',
15
- 'credit_note',
16
- 'transaction',
17
- 'plan',
18
- 'addon',
19
- 'coupon',
20
- 'order',
21
- 'business_entity',
22
- 'item_family',
23
- 'item',
24
- 'item_price',
25
- 'price_variant',
26
- ]),
27
- entity_id: zod_1.z.string().max(100),
28
- notes: zod_1.z.string().max(1000),
29
- added_by: zod_1.z.string().max(100).optional(),
30
- });
31
- exports.CreateCommentBodySchema = CreateCommentBodySchema;
32
- //Comment.list
33
- const ListCommentCreatedAtSchema = zod_1.z.object({
34
- after: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
35
- before: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
36
- on: zod_1.z.string().regex(RegExp('^d{10}$')).optional(),
37
- between: zod_1.z.string().regex(RegExp('^[d{10},d{10}]$')).optional(),
38
- });
39
- const ListCommentSortBySchema = zod_1.z.looseObject({
40
- asc: zod_1.z.enum(['created_at']).optional(),
41
- desc: zod_1.z.enum(['created_at']).optional(),
42
- });
43
- const ListCommentBodySchema = zod_1.z.looseObject({
44
- limit: zod_1.z.number().int().min(1).max(100).optional(),
45
- offset: zod_1.z.string().max(1000).optional(),
46
- entity_type: zod_1.z
47
- .enum([
48
- 'customer',
49
- 'subscription',
50
- 'invoice',
51
- 'quote',
52
- 'credit_note',
53
- 'transaction',
54
- 'plan',
55
- 'addon',
56
- 'coupon',
57
- 'order',
58
- 'business_entity',
59
- 'item_family',
60
- 'item',
61
- 'item_price',
62
- 'price_variant',
63
- ])
64
- .optional(),
65
- entity_id: zod_1.z.string().max(100).optional(),
66
- created_at: ListCommentCreatedAtSchema.optional(),
67
- sort_by: ListCommentSortBySchema.optional(),
68
- });
69
- exports.ListCommentBodySchema = ListCommentBodySchema;