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,11 +0,0 @@
1
- // Generated Zod schemas: CustomerEntitlement
2
- // Actions: entitlementsForCustomer
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //CustomerEntitlement.entitlementsForCustomer
6
- const EntitlementsForCustomerCustomerEntitlementBodySchema = z.looseObject({
7
- limit: z.number().int().min(1).max(100).optional(),
8
- offset: z.string().max(1000).optional(),
9
- consolidate_entitlements: z.boolean().default(false).optional(),
10
- });
11
- export { EntitlementsForCustomerCustomerEntitlementBodySchema };
@@ -1,65 +0,0 @@
1
- // Generated Zod schemas: DifferentialPrice
2
- // Actions: create, retrieve, update, delete
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //DifferentialPrice.create
6
- const CreateDifferentialPriceParentPeriodsSchema = z.object({
7
- period_unit: z.array(z.enum(['day', 'week', 'month', 'year']).optional()),
8
- period: z.array(z.array(z.string().optional()).optional()).optional(),
9
- });
10
- const CreateDifferentialPriceTiersSchema = z.object({
11
- starting_unit: z.array(z.number().int().min(1).optional()).optional(),
12
- ending_unit: z.array(z.number().int().optional()).optional(),
13
- price: z.array(z.number().int().min(0).optional()).optional(),
14
- starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
15
- ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
16
- price_in_decimal: z.array(z.string().max(39).optional()).optional(),
17
- pricing_type: z
18
- .array(z.enum(['per_unit', 'flat_fee', 'package']).optional())
19
- .optional(),
20
- package_size: z.array(z.number().int().min(1).optional()).optional(),
21
- });
22
- const CreateDifferentialPriceBodySchema = z.looseObject({
23
- parent_item_id: z.string().max(100),
24
- price: z.number().int().min(0).optional(),
25
- price_in_decimal: z.string().max(39).optional(),
26
- business_entity_id: z.string().max(50).optional(),
27
- parent_periods: CreateDifferentialPriceParentPeriodsSchema.optional(),
28
- tiers: CreateDifferentialPriceTiersSchema.optional(),
29
- });
30
- export { CreateDifferentialPriceBodySchema };
31
- //DifferentialPrice.retrieve
32
- const RetrieveDifferentialPriceBodySchema = z.looseObject({
33
- item_price_id: z.string().max(100),
34
- });
35
- export { RetrieveDifferentialPriceBodySchema };
36
- //DifferentialPrice.update
37
- const UpdateDifferentialPriceParentPeriodsSchema = z.object({
38
- period_unit: z.array(z.enum(['day', 'week', 'month', 'year']).optional()),
39
- period: z.array(z.array(z.string().optional()).optional()).optional(),
40
- });
41
- const UpdateDifferentialPriceTiersSchema = z.object({
42
- starting_unit: z.array(z.number().int().min(1).optional()).optional(),
43
- ending_unit: z.array(z.number().int().optional()).optional(),
44
- price: z.array(z.number().int().min(0).optional()).optional(),
45
- starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
46
- ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
47
- price_in_decimal: z.array(z.string().max(39).optional()).optional(),
48
- pricing_type: z
49
- .array(z.enum(['per_unit', 'flat_fee', 'package']).optional())
50
- .optional(),
51
- package_size: z.array(z.number().int().min(1).optional()).optional(),
52
- });
53
- const UpdateDifferentialPriceBodySchema = z.looseObject({
54
- item_price_id: z.string().max(100),
55
- price: z.number().int().min(0).optional(),
56
- price_in_decimal: z.string().max(39).optional(),
57
- parent_periods: UpdateDifferentialPriceParentPeriodsSchema.optional(),
58
- tiers: UpdateDifferentialPriceTiersSchema.optional(),
59
- });
60
- export { UpdateDifferentialPriceBodySchema };
61
- //DifferentialPrice.delete
62
- const DeleteDifferentialPriceBodySchema = z.looseObject({
63
- item_price_id: z.string().max(100),
64
- });
65
- export { DeleteDifferentialPriceBodySchema };
@@ -1,24 +0,0 @@
1
- // Generated Zod schemas: Entitlement
2
- // Actions: create
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //Entitlement.create
6
- const CreateEntitlementEntitlementsSchema = z.object({
7
- entity_id: z.array(z.string().max(100).optional()),
8
- feature_id: z.array(z.string().max(50).optional()),
9
- entity_type: z
10
- .array(z
11
- .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
12
- .optional())
13
- .optional(),
14
- value: z.array(z.string().max(50).optional()).optional(),
15
- apply_grandfathering: z
16
- .array(z.boolean().default(false).optional())
17
- .optional(),
18
- });
19
- const CreateEntitlementBodySchema = z.looseObject({
20
- action: z.enum(['upsert', 'remove']),
21
- change_reason: z.string().max(100).optional(),
22
- entitlements: CreateEntitlementEntitlementsSchema.optional(),
23
- });
24
- export { CreateEntitlementBodySchema };
@@ -1,30 +0,0 @@
1
- // Generated Zod schemas: EntitlementOverride
2
- // Actions: addEntitlementOverrideForSubscription, listEntitlementOverrideForSubscription
3
- // Do not edit manually – regenerate via sdk-generator
4
- import { z } from 'zod';
5
- //EntitlementOverride.addEntitlementOverrideForSubscription
6
- const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema = z.object({
7
- feature_id: z.array(z.string().max(50).optional()),
8
- entity_id: z.array(z.string().max(50).optional()).optional(),
9
- entity_type: z
10
- .array(z.enum(['plan_price', 'addon_price', 'charge']).optional())
11
- .optional(),
12
- value: z.array(z.string().max(50).optional()).optional(),
13
- expires_at: z.array(z.number().int().optional()).optional(),
14
- effective_from: z.array(z.number().int().optional()).optional(),
15
- is_enabled: z.array(z.boolean().optional()).optional(),
16
- });
17
- const AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = z.looseObject({
18
- action: z.enum(['upsert', 'remove']).optional(),
19
- entitlement_overrides: AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema.optional(),
20
- });
21
- export { AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema };
22
- //EntitlementOverride.listEntitlementOverrideForSubscription
23
- const ListEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = z.looseObject({
24
- limit: z.number().int().min(1).max(100).optional(),
25
- offset: z.string().max(1000).optional(),
26
- embed: z.string().max(1000).optional(),
27
- include_drafts: z.boolean().default(false).optional(),
28
- include_scheduled_overrides: z.boolean().default(false).optional(),
29
- });
30
- export { ListEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema };