chargebee 3.24.0 → 3.25.0-beta.1

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 (147) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +39 -0
  3. package/cjs/RequestWrapper.js +27 -0
  4. package/cjs/chargebee.cjs.js +3 -0
  5. package/cjs/chargebee.cjs.worker.js +2 -0
  6. package/cjs/chargebeeZodValidationError.js +18 -0
  7. package/cjs/createChargebee.js +5 -0
  8. package/cjs/environment.js +1 -1
  9. package/cjs/schema/addon.schema.js +153 -0
  10. package/cjs/schema/address.schema.js +35 -0
  11. package/cjs/schema/alert.schema.js +38 -0
  12. package/cjs/schema/attached_item.schema.js +58 -0
  13. package/cjs/schema/business_entity.schema.js +46 -0
  14. package/cjs/schema/card.schema.js +165 -0
  15. package/cjs/schema/comment.schema.js +69 -0
  16. package/cjs/schema/coupon.schema.js +209 -0
  17. package/cjs/schema/coupon_code.schema.js +14 -0
  18. package/cjs/schema/coupon_set.schema.js +28 -0
  19. package/cjs/schema/credit_note.schema.js +288 -0
  20. package/cjs/schema/currency.schema.js +32 -0
  21. package/cjs/schema/customer.schema.js +986 -0
  22. package/cjs/schema/customer_entitlement.schema.js +14 -0
  23. package/cjs/schema/differential_price.schema.js +68 -0
  24. package/cjs/schema/entitlement.schema.js +27 -0
  25. package/cjs/schema/entitlement_override.schema.js +33 -0
  26. package/cjs/schema/estimate.schema.js +1525 -0
  27. package/cjs/schema/export.schema.js +1545 -0
  28. package/cjs/schema/feature.schema.js +37 -0
  29. package/cjs/schema/gift.schema.js +277 -0
  30. package/cjs/schema/hosted_page.schema.js +1649 -0
  31. package/cjs/schema/in_app_subscription.schema.js +68 -0
  32. package/cjs/schema/index.js +80 -0
  33. package/cjs/schema/invoice.schema.js +1467 -0
  34. package/cjs/schema/item.schema.js +91 -0
  35. package/cjs/schema/item_entitlement.schema.js +45 -0
  36. package/cjs/schema/item_family.schema.js +21 -0
  37. package/cjs/schema/item_price.schema.js +190 -0
  38. package/cjs/schema/non_subscription.schema.js +28 -0
  39. package/cjs/schema/offer_event.schema.js +13 -0
  40. package/cjs/schema/offer_fulfillment.schema.js +20 -0
  41. package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
  42. package/cjs/schema/omnichannel_subscription.schema.js +89 -0
  43. package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
  44. package/cjs/schema/order.schema.js +273 -0
  45. package/cjs/schema/payment_intent.schema.js +117 -0
  46. package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
  47. package/cjs/schema/payment_source.schema.js +358 -0
  48. package/cjs/schema/payment_voucher.schema.js +57 -0
  49. package/cjs/schema/personalized_offer.schema.js +28 -0
  50. package/cjs/schema/plan.schema.js +225 -0
  51. package/cjs/schema/portal_session.schema.js +22 -0
  52. package/cjs/schema/price_variant.schema.js +36 -0
  53. package/cjs/schema/pricing_page_session.schema.js +135 -0
  54. package/cjs/schema/promotional_credit.schema.js +78 -0
  55. package/cjs/schema/purchase.schema.js +272 -0
  56. package/cjs/schema/quote.schema.js +1557 -0
  57. package/cjs/schema/ramp.schema.js +209 -0
  58. package/cjs/schema/recorded_purchase.schema.js +32 -0
  59. package/cjs/schema/resource_migration.schema.js +14 -0
  60. package/cjs/schema/site_migration_detail.schema.js +81 -0
  61. package/cjs/schema/subscription.schema.js +2993 -0
  62. package/cjs/schema/subscription_entitlement.schema.js +25 -0
  63. package/cjs/schema/time_machine.schema.js +17 -0
  64. package/cjs/schema/transaction.schema.js +70 -0
  65. package/cjs/schema/unbilled_charge.schema.js +113 -0
  66. package/cjs/schema/usage.schema.js +93 -0
  67. package/cjs/schema/usage_charge.schema.js +17 -0
  68. package/cjs/schema/usage_event.schema.js +28 -0
  69. package/cjs/schema/usage_file.schema.js +13 -0
  70. package/cjs/schema/usage_summary.schema.js +17 -0
  71. package/cjs/schema/virtual_bank_account.schema.js +43 -0
  72. package/cjs/schema/webhook_endpoint.schema.js +504 -0
  73. package/cjs/validationLoader.js +59 -0
  74. package/esm/RequestWrapper.js +27 -0
  75. package/esm/chargebee.esm.js +2 -0
  76. package/esm/chargebee.esm.worker.js +1 -0
  77. package/esm/chargebeeZodValidationError.js +14 -0
  78. package/esm/createChargebee.js +5 -0
  79. package/esm/environment.js +1 -1
  80. package/esm/schema/addon.schema.js +150 -0
  81. package/esm/schema/address.schema.js +32 -0
  82. package/esm/schema/alert.schema.js +35 -0
  83. package/esm/schema/attached_item.schema.js +55 -0
  84. package/esm/schema/business_entity.schema.js +43 -0
  85. package/esm/schema/card.schema.js +162 -0
  86. package/esm/schema/comment.schema.js +66 -0
  87. package/esm/schema/coupon.schema.js +206 -0
  88. package/esm/schema/coupon_code.schema.js +11 -0
  89. package/esm/schema/coupon_set.schema.js +25 -0
  90. package/esm/schema/credit_note.schema.js +285 -0
  91. package/esm/schema/currency.schema.js +29 -0
  92. package/esm/schema/customer.schema.js +983 -0
  93. package/esm/schema/customer_entitlement.schema.js +11 -0
  94. package/esm/schema/differential_price.schema.js +65 -0
  95. package/esm/schema/entitlement.schema.js +24 -0
  96. package/esm/schema/entitlement_override.schema.js +30 -0
  97. package/esm/schema/estimate.schema.js +1522 -0
  98. package/esm/schema/export.schema.js +1542 -0
  99. package/esm/schema/feature.schema.js +34 -0
  100. package/esm/schema/gift.schema.js +274 -0
  101. package/esm/schema/hosted_page.schema.js +1646 -0
  102. package/esm/schema/in_app_subscription.schema.js +65 -0
  103. package/esm/schema/index.js +64 -0
  104. package/esm/schema/invoice.schema.js +1464 -0
  105. package/esm/schema/item.schema.js +88 -0
  106. package/esm/schema/item_entitlement.schema.js +42 -0
  107. package/esm/schema/item_family.schema.js +18 -0
  108. package/esm/schema/item_price.schema.js +187 -0
  109. package/esm/schema/non_subscription.schema.js +25 -0
  110. package/esm/schema/offer_event.schema.js +10 -0
  111. package/esm/schema/offer_fulfillment.schema.js +17 -0
  112. package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
  113. package/esm/schema/omnichannel_subscription.schema.js +86 -0
  114. package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
  115. package/esm/schema/order.schema.js +270 -0
  116. package/esm/schema/payment_intent.schema.js +114 -0
  117. package/esm/schema/payment_schedule_scheme.schema.js +17 -0
  118. package/esm/schema/payment_source.schema.js +355 -0
  119. package/esm/schema/payment_voucher.schema.js +54 -0
  120. package/esm/schema/personalized_offer.schema.js +25 -0
  121. package/esm/schema/plan.schema.js +222 -0
  122. package/esm/schema/portal_session.schema.js +19 -0
  123. package/esm/schema/price_variant.schema.js +33 -0
  124. package/esm/schema/pricing_page_session.schema.js +132 -0
  125. package/esm/schema/promotional_credit.schema.js +75 -0
  126. package/esm/schema/purchase.schema.js +269 -0
  127. package/esm/schema/quote.schema.js +1554 -0
  128. package/esm/schema/ramp.schema.js +206 -0
  129. package/esm/schema/recorded_purchase.schema.js +29 -0
  130. package/esm/schema/resource_migration.schema.js +11 -0
  131. package/esm/schema/site_migration_detail.schema.js +78 -0
  132. package/esm/schema/subscription.schema.js +2990 -0
  133. package/esm/schema/subscription_entitlement.schema.js +22 -0
  134. package/esm/schema/time_machine.schema.js +14 -0
  135. package/esm/schema/transaction.schema.js +67 -0
  136. package/esm/schema/unbilled_charge.schema.js +110 -0
  137. package/esm/schema/usage.schema.js +90 -0
  138. package/esm/schema/usage_charge.schema.js +14 -0
  139. package/esm/schema/usage_event.schema.js +25 -0
  140. package/esm/schema/usage_file.schema.js +10 -0
  141. package/esm/schema/usage_summary.schema.js +14 -0
  142. package/esm/schema/virtual_bank_account.schema.js +40 -0
  143. package/esm/schema/webhook_endpoint.schema.js +501 -0
  144. package/esm/validationLoader.js +56 -0
  145. package/package.json +4 -1
  146. package/types/core.d.ts +2 -0
  147. package/types/index.d.ts +16 -0
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ // Generated Zod schemas: CustomerEntitlement
3
+ // Actions: entitlementsForCustomer
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EntitlementsForCustomerCustomerEntitlementBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //CustomerEntitlement.entitlementsForCustomer
9
+ const EntitlementsForCustomerCustomerEntitlementBodySchema = zod_1.z.looseObject({
10
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
11
+ offset: zod_1.z.string().max(1000).optional(),
12
+ consolidate_entitlements: zod_1.z.boolean().default(false).optional(),
13
+ });
14
+ exports.EntitlementsForCustomerCustomerEntitlementBodySchema = EntitlementsForCustomerCustomerEntitlementBodySchema;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ // Generated Zod schemas: DifferentialPrice
3
+ // Actions: create, retrieve, update, delete
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DeleteDifferentialPriceBodySchema = exports.UpdateDifferentialPriceBodySchema = exports.RetrieveDifferentialPriceBodySchema = exports.CreateDifferentialPriceBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //DifferentialPrice.create
9
+ const CreateDifferentialPriceParentPeriodsSchema = zod_1.z.object({
10
+ period_unit: zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
11
+ period: zod_1.z.array(zod_1.z.array(zod_1.z.string().optional()).optional()).optional(),
12
+ });
13
+ const CreateDifferentialPriceTiersSchema = zod_1.z.object({
14
+ starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
15
+ ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
16
+ price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
17
+ starting_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
18
+ ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
19
+ price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
20
+ pricing_type: zod_1.z
21
+ .array(zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional())
22
+ .optional(),
23
+ package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
24
+ });
25
+ const CreateDifferentialPriceBodySchema = zod_1.z.looseObject({
26
+ parent_item_id: zod_1.z.string().max(100),
27
+ price: zod_1.z.number().int().min(0).optional(),
28
+ price_in_decimal: zod_1.z.string().max(39).optional(),
29
+ business_entity_id: zod_1.z.string().max(50).optional(),
30
+ parent_periods: CreateDifferentialPriceParentPeriodsSchema.optional(),
31
+ tiers: CreateDifferentialPriceTiersSchema.optional(),
32
+ });
33
+ exports.CreateDifferentialPriceBodySchema = CreateDifferentialPriceBodySchema;
34
+ //DifferentialPrice.retrieve
35
+ const RetrieveDifferentialPriceBodySchema = zod_1.z.looseObject({
36
+ item_price_id: zod_1.z.string().max(100),
37
+ });
38
+ exports.RetrieveDifferentialPriceBodySchema = RetrieveDifferentialPriceBodySchema;
39
+ //DifferentialPrice.update
40
+ const UpdateDifferentialPriceParentPeriodsSchema = zod_1.z.object({
41
+ period_unit: zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
42
+ period: zod_1.z.array(zod_1.z.array(zod_1.z.string().optional()).optional()).optional(),
43
+ });
44
+ const UpdateDifferentialPriceTiersSchema = zod_1.z.object({
45
+ starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
46
+ ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
47
+ price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
48
+ starting_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
49
+ ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
50
+ price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
51
+ pricing_type: zod_1.z
52
+ .array(zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional())
53
+ .optional(),
54
+ package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
55
+ });
56
+ const UpdateDifferentialPriceBodySchema = zod_1.z.looseObject({
57
+ item_price_id: zod_1.z.string().max(100),
58
+ price: zod_1.z.number().int().min(0).optional(),
59
+ price_in_decimal: zod_1.z.string().max(39).optional(),
60
+ parent_periods: UpdateDifferentialPriceParentPeriodsSchema.optional(),
61
+ tiers: UpdateDifferentialPriceTiersSchema.optional(),
62
+ });
63
+ exports.UpdateDifferentialPriceBodySchema = UpdateDifferentialPriceBodySchema;
64
+ //DifferentialPrice.delete
65
+ const DeleteDifferentialPriceBodySchema = zod_1.z.looseObject({
66
+ item_price_id: zod_1.z.string().max(100),
67
+ });
68
+ exports.DeleteDifferentialPriceBodySchema = DeleteDifferentialPriceBodySchema;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // Generated Zod schemas: Entitlement
3
+ // Actions: create
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CreateEntitlementBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //Entitlement.create
9
+ const CreateEntitlementEntitlementsSchema = zod_1.z.object({
10
+ entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
11
+ feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
12
+ entity_type: zod_1.z
13
+ .array(zod_1.z
14
+ .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
15
+ .optional())
16
+ .optional(),
17
+ value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
18
+ apply_grandfathering: zod_1.z
19
+ .array(zod_1.z.boolean().default(false).optional())
20
+ .optional(),
21
+ });
22
+ const CreateEntitlementBodySchema = zod_1.z.looseObject({
23
+ action: zod_1.z.enum(['upsert', 'remove']),
24
+ change_reason: zod_1.z.string().max(100).optional(),
25
+ entitlements: CreateEntitlementEntitlementsSchema.optional(),
26
+ });
27
+ exports.CreateEntitlementBodySchema = CreateEntitlementBodySchema;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // Generated Zod schemas: EntitlementOverride
3
+ // Actions: addEntitlementOverrideForSubscription, listEntitlementOverrideForSubscription
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = exports.AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //EntitlementOverride.addEntitlementOverrideForSubscription
9
+ const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema = zod_1.z.object({
10
+ feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
11
+ entity_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
12
+ entity_type: zod_1.z
13
+ .array(zod_1.z.enum(['plan_price', 'addon_price', 'charge']).optional())
14
+ .optional(),
15
+ value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
16
+ expires_at: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
17
+ effective_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
18
+ is_enabled: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
19
+ });
20
+ const AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = zod_1.z.looseObject({
21
+ action: zod_1.z.enum(['upsert', 'remove']).optional(),
22
+ entitlement_overrides: AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema.optional(),
23
+ });
24
+ exports.AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema;
25
+ //EntitlementOverride.listEntitlementOverrideForSubscription
26
+ const ListEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = zod_1.z.looseObject({
27
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
28
+ offset: zod_1.z.string().max(1000).optional(),
29
+ embed: zod_1.z.string().max(1000).optional(),
30
+ include_drafts: zod_1.z.boolean().default(false).optional(),
31
+ include_scheduled_overrides: zod_1.z.boolean().default(false).optional(),
32
+ });
33
+ exports.ListEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = ListEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema;