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.
- package/CHANGELOG.md +8 -0
- package/README.md +39 -0
- package/cjs/RequestWrapper.js +27 -0
- package/cjs/chargebee.cjs.js +3 -0
- package/cjs/chargebee.cjs.worker.js +2 -0
- package/cjs/chargebeeZodValidationError.js +18 -0
- package/cjs/createChargebee.js +5 -0
- package/cjs/environment.js +1 -1
- package/cjs/schema/addon.schema.js +153 -0
- package/cjs/schema/address.schema.js +35 -0
- package/cjs/schema/alert.schema.js +38 -0
- package/cjs/schema/attached_item.schema.js +58 -0
- package/cjs/schema/business_entity.schema.js +46 -0
- package/cjs/schema/card.schema.js +165 -0
- package/cjs/schema/comment.schema.js +69 -0
- package/cjs/schema/coupon.schema.js +209 -0
- package/cjs/schema/coupon_code.schema.js +14 -0
- package/cjs/schema/coupon_set.schema.js +28 -0
- package/cjs/schema/credit_note.schema.js +288 -0
- package/cjs/schema/currency.schema.js +32 -0
- package/cjs/schema/customer.schema.js +986 -0
- package/cjs/schema/customer_entitlement.schema.js +14 -0
- package/cjs/schema/differential_price.schema.js +68 -0
- package/cjs/schema/entitlement.schema.js +27 -0
- package/cjs/schema/entitlement_override.schema.js +33 -0
- package/cjs/schema/estimate.schema.js +1525 -0
- package/cjs/schema/export.schema.js +1545 -0
- package/cjs/schema/feature.schema.js +37 -0
- package/cjs/schema/gift.schema.js +277 -0
- package/cjs/schema/hosted_page.schema.js +1649 -0
- package/cjs/schema/in_app_subscription.schema.js +68 -0
- package/cjs/schema/index.js +80 -0
- package/cjs/schema/invoice.schema.js +1467 -0
- package/cjs/schema/item.schema.js +91 -0
- package/cjs/schema/item_entitlement.schema.js +45 -0
- package/cjs/schema/item_family.schema.js +21 -0
- package/cjs/schema/item_price.schema.js +190 -0
- package/cjs/schema/non_subscription.schema.js +28 -0
- package/cjs/schema/offer_event.schema.js +13 -0
- package/cjs/schema/offer_fulfillment.schema.js +20 -0
- package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
- package/cjs/schema/omnichannel_subscription.schema.js +89 -0
- package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
- package/cjs/schema/order.schema.js +273 -0
- package/cjs/schema/payment_intent.schema.js +117 -0
- package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
- package/cjs/schema/payment_source.schema.js +358 -0
- package/cjs/schema/payment_voucher.schema.js +57 -0
- package/cjs/schema/personalized_offer.schema.js +28 -0
- package/cjs/schema/plan.schema.js +225 -0
- package/cjs/schema/portal_session.schema.js +22 -0
- package/cjs/schema/price_variant.schema.js +36 -0
- package/cjs/schema/pricing_page_session.schema.js +135 -0
- package/cjs/schema/promotional_credit.schema.js +78 -0
- package/cjs/schema/purchase.schema.js +272 -0
- package/cjs/schema/quote.schema.js +1557 -0
- package/cjs/schema/ramp.schema.js +209 -0
- package/cjs/schema/recorded_purchase.schema.js +32 -0
- package/cjs/schema/resource_migration.schema.js +14 -0
- package/cjs/schema/site_migration_detail.schema.js +81 -0
- package/cjs/schema/subscription.schema.js +2993 -0
- package/cjs/schema/subscription_entitlement.schema.js +25 -0
- package/cjs/schema/time_machine.schema.js +17 -0
- package/cjs/schema/transaction.schema.js +70 -0
- package/cjs/schema/unbilled_charge.schema.js +113 -0
- package/cjs/schema/usage.schema.js +93 -0
- package/cjs/schema/usage_charge.schema.js +17 -0
- package/cjs/schema/usage_event.schema.js +28 -0
- package/cjs/schema/usage_file.schema.js +13 -0
- package/cjs/schema/usage_summary.schema.js +17 -0
- package/cjs/schema/virtual_bank_account.schema.js +43 -0
- package/cjs/schema/webhook_endpoint.schema.js +504 -0
- package/cjs/validationLoader.js +59 -0
- package/esm/RequestWrapper.js +27 -0
- package/esm/chargebee.esm.js +2 -0
- package/esm/chargebee.esm.worker.js +1 -0
- package/esm/chargebeeZodValidationError.js +14 -0
- package/esm/createChargebee.js +5 -0
- package/esm/environment.js +1 -1
- package/esm/schema/addon.schema.js +150 -0
- package/esm/schema/address.schema.js +32 -0
- package/esm/schema/alert.schema.js +35 -0
- package/esm/schema/attached_item.schema.js +55 -0
- package/esm/schema/business_entity.schema.js +43 -0
- package/esm/schema/card.schema.js +162 -0
- package/esm/schema/comment.schema.js +66 -0
- package/esm/schema/coupon.schema.js +206 -0
- package/esm/schema/coupon_code.schema.js +11 -0
- package/esm/schema/coupon_set.schema.js +25 -0
- package/esm/schema/credit_note.schema.js +285 -0
- package/esm/schema/currency.schema.js +29 -0
- package/esm/schema/customer.schema.js +983 -0
- package/esm/schema/customer_entitlement.schema.js +11 -0
- package/esm/schema/differential_price.schema.js +65 -0
- package/esm/schema/entitlement.schema.js +24 -0
- package/esm/schema/entitlement_override.schema.js +30 -0
- package/esm/schema/estimate.schema.js +1522 -0
- package/esm/schema/export.schema.js +1542 -0
- package/esm/schema/feature.schema.js +34 -0
- package/esm/schema/gift.schema.js +274 -0
- package/esm/schema/hosted_page.schema.js +1646 -0
- package/esm/schema/in_app_subscription.schema.js +65 -0
- package/esm/schema/index.js +64 -0
- package/esm/schema/invoice.schema.js +1464 -0
- package/esm/schema/item.schema.js +88 -0
- package/esm/schema/item_entitlement.schema.js +42 -0
- package/esm/schema/item_family.schema.js +18 -0
- package/esm/schema/item_price.schema.js +187 -0
- package/esm/schema/non_subscription.schema.js +25 -0
- package/esm/schema/offer_event.schema.js +10 -0
- package/esm/schema/offer_fulfillment.schema.js +17 -0
- package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
- package/esm/schema/omnichannel_subscription.schema.js +86 -0
- package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
- package/esm/schema/order.schema.js +270 -0
- package/esm/schema/payment_intent.schema.js +114 -0
- package/esm/schema/payment_schedule_scheme.schema.js +17 -0
- package/esm/schema/payment_source.schema.js +355 -0
- package/esm/schema/payment_voucher.schema.js +54 -0
- package/esm/schema/personalized_offer.schema.js +25 -0
- package/esm/schema/plan.schema.js +222 -0
- package/esm/schema/portal_session.schema.js +19 -0
- package/esm/schema/price_variant.schema.js +33 -0
- package/esm/schema/pricing_page_session.schema.js +132 -0
- package/esm/schema/promotional_credit.schema.js +75 -0
- package/esm/schema/purchase.schema.js +269 -0
- package/esm/schema/quote.schema.js +1554 -0
- package/esm/schema/ramp.schema.js +206 -0
- package/esm/schema/recorded_purchase.schema.js +29 -0
- package/esm/schema/resource_migration.schema.js +11 -0
- package/esm/schema/site_migration_detail.schema.js +78 -0
- package/esm/schema/subscription.schema.js +2990 -0
- package/esm/schema/subscription_entitlement.schema.js +22 -0
- package/esm/schema/time_machine.schema.js +14 -0
- package/esm/schema/transaction.schema.js +67 -0
- package/esm/schema/unbilled_charge.schema.js +110 -0
- package/esm/schema/usage.schema.js +90 -0
- package/esm/schema/usage_charge.schema.js +14 -0
- package/esm/schema/usage_event.schema.js +25 -0
- package/esm/schema/usage_file.schema.js +10 -0
- package/esm/schema/usage_summary.schema.js +14 -0
- package/esm/schema/virtual_bank_account.schema.js +40 -0
- package/esm/schema/webhook_endpoint.schema.js +501 -0
- package/esm/validationLoader.js +56 -0
- package/package.json +4 -1
- package/types/core.d.ts +2 -0
- package/types/index.d.ts +16 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Generated Zod schemas: InAppSubscription
|
|
2
|
+
// Actions: processReceipt, importReceipt, importSubscription, retrieveStoreSubs
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//InAppSubscription.processReceipt
|
|
6
|
+
const ProcessReceiptInAppSubscriptionProductSchema = z.object({
|
|
7
|
+
id: z.string().max(96),
|
|
8
|
+
currency_code: z.string().max(3),
|
|
9
|
+
price: z.number().int().min(0),
|
|
10
|
+
name: z.string().max(46).optional(),
|
|
11
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
12
|
+
period: z.string().max(3).optional(),
|
|
13
|
+
period_unit: z.string().max(3).optional(),
|
|
14
|
+
});
|
|
15
|
+
const ProcessReceiptInAppSubscriptionCustomerSchema = z.object({
|
|
16
|
+
id: z.string().max(50).optional(),
|
|
17
|
+
email: z.string().email().max(70).optional(),
|
|
18
|
+
first_name: z.string().max(150).optional(),
|
|
19
|
+
last_name: z.string().max(150).optional(),
|
|
20
|
+
});
|
|
21
|
+
const ProcessReceiptInAppSubscriptionBodySchema = z.looseObject({
|
|
22
|
+
receipt: z.string().max(65000),
|
|
23
|
+
product: ProcessReceiptInAppSubscriptionProductSchema.optional(),
|
|
24
|
+
customer: ProcessReceiptInAppSubscriptionCustomerSchema.optional(),
|
|
25
|
+
});
|
|
26
|
+
export { ProcessReceiptInAppSubscriptionBodySchema };
|
|
27
|
+
//InAppSubscription.importReceipt
|
|
28
|
+
const ImportReceiptInAppSubscriptionProductSchema = z.object({
|
|
29
|
+
currency_code: z.string().max(3),
|
|
30
|
+
});
|
|
31
|
+
const ImportReceiptInAppSubscriptionCustomerSchema = z.object({
|
|
32
|
+
id: z.string().max(50).optional(),
|
|
33
|
+
email: z.string().email().max(70).optional(),
|
|
34
|
+
});
|
|
35
|
+
const ImportReceiptInAppSubscriptionBodySchema = z.looseObject({
|
|
36
|
+
receipt: z.string().max(65000),
|
|
37
|
+
product: ImportReceiptInAppSubscriptionProductSchema.optional(),
|
|
38
|
+
customer: ImportReceiptInAppSubscriptionCustomerSchema.optional(),
|
|
39
|
+
});
|
|
40
|
+
export { ImportReceiptInAppSubscriptionBodySchema };
|
|
41
|
+
//InAppSubscription.importSubscription
|
|
42
|
+
const ImportSubscriptionInAppSubscriptionSubscriptionSchema = z.object({
|
|
43
|
+
id: z.string().max(50),
|
|
44
|
+
started_at: z.number().int(),
|
|
45
|
+
term_start: z.number().int(),
|
|
46
|
+
term_end: z.number().int(),
|
|
47
|
+
product_id: z.string().max(96),
|
|
48
|
+
currency_code: z.string().max(3),
|
|
49
|
+
transaction_id: z.string().max(43),
|
|
50
|
+
is_trial: z.boolean().default(false).optional(),
|
|
51
|
+
});
|
|
52
|
+
const ImportSubscriptionInAppSubscriptionCustomerSchema = z.object({
|
|
53
|
+
id: z.string().max(50).optional(),
|
|
54
|
+
email: z.string().email().max(70).optional(),
|
|
55
|
+
});
|
|
56
|
+
const ImportSubscriptionInAppSubscriptionBodySchema = z.looseObject({
|
|
57
|
+
subscription: ImportSubscriptionInAppSubscriptionSubscriptionSchema.optional(),
|
|
58
|
+
customer: ImportSubscriptionInAppSubscriptionCustomerSchema.optional(),
|
|
59
|
+
});
|
|
60
|
+
export { ImportSubscriptionInAppSubscriptionBodySchema };
|
|
61
|
+
//InAppSubscription.retrieveStoreSubs
|
|
62
|
+
const RetrieveStoreSubsInAppSubscriptionBodySchema = z.looseObject({
|
|
63
|
+
receipt: z.string().max(65000),
|
|
64
|
+
});
|
|
65
|
+
export { RetrieveStoreSubsInAppSubscriptionBodySchema };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Auto-generated barrel export for Zod validators
|
|
2
|
+
export * from './addon.schema.js';
|
|
3
|
+
export * from './address.schema.js';
|
|
4
|
+
export * from './alert.schema.js';
|
|
5
|
+
export * from './attached_item.schema.js';
|
|
6
|
+
export * from './business_entity.schema.js';
|
|
7
|
+
export * from './card.schema.js';
|
|
8
|
+
export * from './comment.schema.js';
|
|
9
|
+
export * from './coupon.schema.js';
|
|
10
|
+
export * from './coupon_code.schema.js';
|
|
11
|
+
export * from './coupon_set.schema.js';
|
|
12
|
+
export * from './credit_note.schema.js';
|
|
13
|
+
export * from './currency.schema.js';
|
|
14
|
+
export * from './customer.schema.js';
|
|
15
|
+
export * from './customer_entitlement.schema.js';
|
|
16
|
+
export * from './differential_price.schema.js';
|
|
17
|
+
export * from './entitlement.schema.js';
|
|
18
|
+
export * from './entitlement_override.schema.js';
|
|
19
|
+
export * from './estimate.schema.js';
|
|
20
|
+
export * from './export.schema.js';
|
|
21
|
+
export * from './feature.schema.js';
|
|
22
|
+
export * from './gift.schema.js';
|
|
23
|
+
export * from './hosted_page.schema.js';
|
|
24
|
+
export * from './in_app_subscription.schema.js';
|
|
25
|
+
export * from './invoice.schema.js';
|
|
26
|
+
export * from './item.schema.js';
|
|
27
|
+
export * from './item_entitlement.schema.js';
|
|
28
|
+
export * from './item_family.schema.js';
|
|
29
|
+
export * from './item_price.schema.js';
|
|
30
|
+
export * from './non_subscription.schema.js';
|
|
31
|
+
export * from './offer_event.schema.js';
|
|
32
|
+
export * from './offer_fulfillment.schema.js';
|
|
33
|
+
export * from './omnichannel_one_time_order.schema.js';
|
|
34
|
+
export * from './omnichannel_subscription.schema.js';
|
|
35
|
+
export * from './omnichannel_subscription_item.schema.js';
|
|
36
|
+
export * from './order.schema.js';
|
|
37
|
+
export * from './payment_intent.schema.js';
|
|
38
|
+
export * from './payment_schedule_scheme.schema.js';
|
|
39
|
+
export * from './payment_source.schema.js';
|
|
40
|
+
export * from './payment_voucher.schema.js';
|
|
41
|
+
export * from './personalized_offer.schema.js';
|
|
42
|
+
export * from './plan.schema.js';
|
|
43
|
+
export * from './portal_session.schema.js';
|
|
44
|
+
export * from './price_variant.schema.js';
|
|
45
|
+
export * from './pricing_page_session.schema.js';
|
|
46
|
+
export * from './promotional_credit.schema.js';
|
|
47
|
+
export * from './purchase.schema.js';
|
|
48
|
+
export * from './quote.schema.js';
|
|
49
|
+
export * from './ramp.schema.js';
|
|
50
|
+
export * from './recorded_purchase.schema.js';
|
|
51
|
+
export * from './resource_migration.schema.js';
|
|
52
|
+
export * from './site_migration_detail.schema.js';
|
|
53
|
+
export * from './subscription.schema.js';
|
|
54
|
+
export * from './subscription_entitlement.schema.js';
|
|
55
|
+
export * from './time_machine.schema.js';
|
|
56
|
+
export * from './transaction.schema.js';
|
|
57
|
+
export * from './unbilled_charge.schema.js';
|
|
58
|
+
export * from './usage.schema.js';
|
|
59
|
+
export * from './usage_charge.schema.js';
|
|
60
|
+
export * from './usage_event.schema.js';
|
|
61
|
+
export * from './usage_file.schema.js';
|
|
62
|
+
export * from './usage_summary.schema.js';
|
|
63
|
+
export * from './virtual_bank_account.schema.js';
|
|
64
|
+
export * from './webhook_endpoint.schema.js';
|