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
@@ -48,6 +48,7 @@ declare module 'chargebee' {
48
48
  GiftUnclaimed = 'gift_unclaimed',
49
49
  VirtualBankAccountAdded = 'virtual_bank_account_added',
50
50
  PaymentIntentCreated = 'payment_intent_created',
51
+ OmnichannelSubscriptionItemUpdated = 'omnichannel_subscription_item_updated',
51
52
  CreditNoteCreatedWithBackdating = 'credit_note_created_with_backdating',
52
53
  ContractTermTerminated = 'contract_term_terminated',
53
54
  ItemFamilyUpdated = 'item_family_updated',
@@ -60,6 +61,7 @@ declare module 'chargebee' {
60
61
  ItemDeleted = 'item_deleted',
61
62
  SubscriptionRampDrafted = 'subscription_ramp_drafted',
62
63
  DunningUpdated = 'dunning_updated',
64
+ OmnichannelSubscriptionItemRecovered = 'omnichannel_subscription_item_recovered',
63
65
  ItemEntitlementsUpdated = 'item_entitlements_updated',
64
66
  TokenConsumed = 'token_consumed',
65
67
  HierarchyDeleted = 'hierarchy_deleted',
@@ -273,6 +275,7 @@ declare module 'chargebee' {
273
275
  [WebhookEventType.GiftUnclaimed]: GiftUnclaimedContent;
274
276
  [WebhookEventType.VirtualBankAccountAdded]: VirtualBankAccountAddedContent;
275
277
  [WebhookEventType.PaymentIntentCreated]: PaymentIntentCreatedContent;
278
+ [WebhookEventType.OmnichannelSubscriptionItemUpdated]: OmnichannelSubscriptionItemUpdatedContent;
276
279
  [WebhookEventType.CreditNoteCreatedWithBackdating]: CreditNoteCreatedWithBackdatingContent;
277
280
  [WebhookEventType.ContractTermTerminated]: ContractTermTerminatedContent;
278
281
  [WebhookEventType.ItemFamilyUpdated]: ItemFamilyUpdatedContent;
@@ -285,6 +288,7 @@ declare module 'chargebee' {
285
288
  [WebhookEventType.ItemDeleted]: ItemDeletedContent;
286
289
  [WebhookEventType.SubscriptionRampDrafted]: SubscriptionRampDraftedContent;
287
290
  [WebhookEventType.DunningUpdated]: DunningUpdatedContent;
291
+ [WebhookEventType.OmnichannelSubscriptionItemRecovered]: OmnichannelSubscriptionItemRecoveredContent;
288
292
  [WebhookEventType.ItemEntitlementsUpdated]: ItemEntitlementsUpdatedContent;
289
293
  [WebhookEventType.TokenConsumed]: TokenConsumedContent;
290
294
  [WebhookEventType.HierarchyDeleted]: HierarchyDeletedContent;
@@ -522,8 +526,6 @@ declare module 'chargebee' {
522
526
 
523
527
  omnichannel_transaction: OmnichannelTransaction;
524
528
 
525
- omnichannel_subscription_item_scheduled_change: OmnichannelSubscriptionItemScheduledChange;
526
-
527
529
  customer: Customer;
528
530
  };
529
531
  export type UnbilledChargesCreatedContent = {
@@ -739,6 +741,15 @@ declare module 'chargebee' {
739
741
  export type PaymentIntentCreatedContent = {
740
742
  payment_intent: PaymentIntent;
741
743
  };
744
+ export type OmnichannelSubscriptionItemUpdatedContent = {
745
+ omnichannel_subscription_item: OmnichannelSubscriptionItem;
746
+
747
+ omnichannel_subscription: OmnichannelSubscription;
748
+
749
+ omnichannel_transaction: OmnichannelTransaction;
750
+
751
+ customer: Customer;
752
+ };
742
753
  export type CreditNoteCreatedWithBackdatingContent = {
743
754
  credit_note: CreditNote;
744
755
  };
@@ -785,6 +796,15 @@ declare module 'chargebee' {
785
796
  export type DunningUpdatedContent = {
786
797
  invoice: Invoice;
787
798
  };
799
+ export type OmnichannelSubscriptionItemRecoveredContent = {
800
+ omnichannel_subscription_item: OmnichannelSubscriptionItem;
801
+
802
+ omnichannel_subscription: OmnichannelSubscription;
803
+
804
+ omnichannel_transaction: OmnichannelTransaction;
805
+
806
+ customer: Customer;
807
+ };
788
808
  export type ItemEntitlementsUpdatedContent = {
789
809
  feature: Feature;
790
810
 
@@ -1549,8 +1569,6 @@ declare module 'chargebee' {
1549
1569
 
1550
1570
  omnichannel_transaction: OmnichannelTransaction;
1551
1571
 
1552
- omnichannel_subscription_item_scheduled_change: OmnichannelSubscriptionItemScheduledChange;
1553
-
1554
1572
  customer: Customer;
1555
1573
  };
1556
1574
  export type TaxWithheldRecordedContent = {
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChargebeeZodValidationError = void 0;
4
- class ChargebeeZodValidationError extends Error {
5
- constructor(actionName, zodError) {
6
- var _a;
7
- const messages = zodError.issues
8
- .map((e) => `${e.path.join('.')}: ${e.message}`)
9
- .join('; ');
10
- super(`[Chargebee] Validation failed for '${actionName}': ${messages}`);
11
- Object.setPrototypeOf(this, new.target.prototype);
12
- this.name = 'ChargebeeZodValidationError';
13
- this.actionName = actionName;
14
- this.zodError = zodError;
15
- (_a = Error.captureStackTrace) === null || _a === void 0 ? void 0 : _a.call(Error, this, this.constructor);
16
- }
17
- }
18
- exports.ChargebeeZodValidationError = ChargebeeZodValidationError;
@@ -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;