chargebee 3.34.0 → 3.36.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.
- package/CHANGELOG.md +237 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +230 -2
- package/cjs/resources/webhook/eventType.js +25 -1
- package/cjs/schema/addon.schema.js +221 -40
- package/cjs/schema/alert.schema.js +17 -2
- package/cjs/schema/alert_status.schema.js +6 -1
- package/cjs/schema/attached_item.schema.js +101 -26
- package/cjs/schema/business_entity.schema.js +43 -6
- package/cjs/schema/business_rule.schema.js +2 -2
- package/cjs/schema/business_ruleset.schema.js +2 -2
- package/cjs/schema/collections_payment_promise.schema.js +43 -0
- package/cjs/schema/comment.schema.js +17 -4
- package/cjs/schema/coupon.schema.js +218 -37
- package/cjs/schema/coupon_code.schema.js +36 -6
- package/cjs/schema/coupon_set.schema.js +108 -27
- package/cjs/schema/credit_note.schema.js +497 -105
- package/cjs/schema/credit_unit.schema.js +12 -2
- package/cjs/schema/customer.schema.js +212 -62
- package/cjs/schema/differential_price.schema.js +100 -12
- package/cjs/schema/dispute.schema.js +125 -33
- package/cjs/schema/einvoice.schema.js +27 -6
- package/cjs/schema/email_log.schema.js +15 -4
- package/cjs/schema/entitlement.schema.js +35 -6
- package/cjs/schema/entitlement_override.schema.js +17 -1
- package/cjs/schema/estimate.schema.js +585 -40
- package/cjs/schema/event.schema.js +1334 -585
- package/cjs/schema/export.schema.js +4459 -1412
- package/cjs/schema/feature.schema.js +73 -11
- package/cjs/schema/gateway_request_log.schema.js +309 -0
- package/cjs/schema/gateway_webhook_log.schema.js +257 -0
- package/cjs/schema/gift.schema.js +51 -5
- package/cjs/schema/grant_block.schema.js +45 -12
- package/cjs/schema/hosted_page.schema.js +564 -68
- package/cjs/schema/index.js +6 -0
- package/cjs/schema/invoice.schema.js +843 -123
- package/cjs/schema/item.schema.js +151 -28
- package/cjs/schema/item_entitlement.schema.js +23 -2
- package/cjs/schema/item_family.schema.js +29 -8
- package/cjs/schema/item_price.schema.js +263 -48
- package/cjs/schema/ledger_account_balance.schema.js +11 -2
- package/cjs/schema/ledger_operation.schema.js +44 -17
- package/cjs/schema/metered_feature.schema.js +10 -1
- package/cjs/schema/omnichannel_one_time_order.schema.js +42 -4
- package/cjs/schema/omnichannel_subscription.schema.js +146 -32
- package/cjs/schema/order.schema.js +233 -61
- package/cjs/schema/organization_detail.schema.js +36 -0
- package/cjs/schema/payment_schedule.schema.js +39 -8
- package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
- package/cjs/schema/payment_source.schema.js +375 -148
- package/cjs/schema/payment_voucher.schema.js +33 -5
- package/cjs/schema/plan.schema.js +345 -57
- package/cjs/schema/price_ramp.schema.js +153 -0
- package/cjs/schema/price_variant.schema.js +88 -18
- package/cjs/schema/pricing_page_session.schema.js +36 -2
- package/cjs/schema/promotional_credit.schema.js +27 -6
- package/cjs/schema/purchase.schema.js +210 -12
- package/cjs/schema/quote.schema.js +907 -87
- package/cjs/schema/quote_entitlement.schema.js +6 -2
- package/cjs/schema/ramp.schema.js +242 -24
- package/cjs/schema/retry_segment.schema.js +12 -0
- package/cjs/schema/site_migration_detail.schema.js +50 -16
- package/cjs/schema/subscription.schema.js +1002 -173
- package/cjs/schema/subscription_entitlement.schema.js +9 -1
- package/cjs/schema/transaction.schema.js +780 -342
- package/cjs/schema/unbilled_charge.schema.js +141 -13
- package/cjs/schema/usage.schema.js +59 -11
- package/cjs/schema/usage_event.schema.js +13 -1
- package/cjs/schema/usage_summary.schema.js +1 -0
- package/cjs/schema/virtual_bank_account.schema.js +42 -10
- package/cjs/schema/webhook_endpoint.schema.js +50 -2
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +230 -2
- package/esm/resources/webhook/eventType.js +25 -1
- package/esm/schema/addon.schema.js +221 -40
- package/esm/schema/alert.schema.js +17 -2
- package/esm/schema/alert_status.schema.js +6 -1
- package/esm/schema/attached_item.schema.js +101 -26
- package/esm/schema/business_entity.schema.js +42 -5
- package/esm/schema/business_rule.schema.js +2 -2
- package/esm/schema/business_ruleset.schema.js +2 -2
- package/esm/schema/collections_payment_promise.schema.js +40 -0
- package/esm/schema/comment.schema.js +17 -4
- package/esm/schema/coupon.schema.js +218 -37
- package/esm/schema/coupon_code.schema.js +36 -6
- package/esm/schema/coupon_set.schema.js +108 -27
- package/esm/schema/credit_note.schema.js +497 -105
- package/esm/schema/credit_unit.schema.js +12 -2
- package/esm/schema/customer.schema.js +212 -62
- package/esm/schema/differential_price.schema.js +100 -12
- package/esm/schema/dispute.schema.js +125 -33
- package/esm/schema/einvoice.schema.js +27 -6
- package/esm/schema/email_log.schema.js +15 -4
- package/esm/schema/entitlement.schema.js +35 -6
- package/esm/schema/entitlement_override.schema.js +17 -1
- package/esm/schema/estimate.schema.js +585 -40
- package/esm/schema/event.schema.js +1334 -585
- package/esm/schema/export.schema.js +4459 -1412
- package/esm/schema/feature.schema.js +73 -11
- package/esm/schema/gateway_request_log.schema.js +306 -0
- package/esm/schema/gateway_webhook_log.schema.js +254 -0
- package/esm/schema/gift.schema.js +51 -5
- package/esm/schema/grant_block.schema.js +45 -12
- package/esm/schema/hosted_page.schema.js +564 -68
- package/esm/schema/index.js +6 -0
- package/esm/schema/invoice.schema.js +842 -122
- package/esm/schema/item.schema.js +151 -28
- package/esm/schema/item_entitlement.schema.js +23 -2
- package/esm/schema/item_family.schema.js +29 -8
- package/esm/schema/item_price.schema.js +263 -48
- package/esm/schema/ledger_account_balance.schema.js +10 -1
- package/esm/schema/ledger_operation.schema.js +44 -17
- package/esm/schema/metered_feature.schema.js +10 -1
- package/esm/schema/omnichannel_one_time_order.schema.js +42 -4
- package/esm/schema/omnichannel_subscription.schema.js +146 -32
- package/esm/schema/order.schema.js +233 -61
- package/esm/schema/organization_detail.schema.js +33 -0
- package/esm/schema/payment_schedule.schema.js +39 -8
- package/esm/schema/payment_schedule_scheme.schema.js +37 -7
- package/esm/schema/payment_source.schema.js +375 -148
- package/esm/schema/payment_voucher.schema.js +33 -5
- package/esm/schema/plan.schema.js +345 -57
- package/esm/schema/price_ramp.schema.js +150 -0
- package/esm/schema/price_variant.schema.js +88 -18
- package/esm/schema/pricing_page_session.schema.js +36 -2
- package/esm/schema/promotional_credit.schema.js +27 -6
- package/esm/schema/purchase.schema.js +210 -12
- package/esm/schema/quote.schema.js +907 -87
- package/esm/schema/quote_entitlement.schema.js +6 -2
- package/esm/schema/ramp.schema.js +242 -24
- package/esm/schema/retry_segment.schema.js +9 -0
- package/esm/schema/site_migration_detail.schema.js +50 -16
- package/esm/schema/subscription.schema.js +1002 -173
- package/esm/schema/subscription_entitlement.schema.js +9 -1
- package/esm/schema/transaction.schema.js +780 -342
- package/esm/schema/unbilled_charge.schema.js +141 -13
- package/esm/schema/usage.schema.js +59 -11
- package/esm/schema/usage_event.schema.js +13 -1
- package/esm/schema/usage_summary.schema.js +1 -0
- package/esm/schema/virtual_bank_account.schema.js +42 -10
- package/esm/schema/webhook_endpoint.schema.js +50 -2
- package/package.json +1 -1
- package/types/core.d.ts +63 -74
- package/types/index.d.ts +29 -1
- package/types/resources/BillingLineItem.d.ts +10 -0
- package/types/resources/BillingMetadata.d.ts +9 -0
- package/types/resources/BusinessEntity.d.ts +52 -0
- package/types/resources/Citation.d.ts +13 -0
- package/types/resources/CollectionsDispute.d.ts +24 -0
- package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
- package/types/resources/CollectionsReminderSequence.d.ts +35 -0
- package/types/resources/Comment.d.ts +2 -1
- package/types/resources/Content.d.ts +23 -1
- package/types/resources/CreditNote.d.ts +1 -0
- package/types/resources/CustomData.d.ts +14 -0
- package/types/resources/Discount.d.ts +1 -0
- package/types/resources/DraftEstimate.d.ts +13 -0
- package/types/resources/DraftRequest.d.ts +45 -0
- package/types/resources/EmailAttachment.d.ts +16 -0
- package/types/resources/EmailConversation.d.ts +18 -0
- package/types/resources/EmailLog.d.ts +1 -0
- package/types/resources/EmailMessage.d.ts +40 -0
- package/types/resources/Estimate.d.ts +3 -0
- package/types/resources/Event.d.ts +25 -1
- package/types/resources/Execution.d.ts +12 -0
- package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
- package/types/resources/GatewayRequestLog.d.ts +82 -0
- package/types/resources/GatewayWebhookLog.d.ts +74 -0
- package/types/resources/GrantBlock.d.ts +5 -0
- package/types/resources/GroupByAttribute.d.ts +15 -0
- package/types/resources/GroupByRecommendation.d.ts +10 -0
- package/types/resources/HostedPage.d.ts +18 -0
- package/types/resources/Invoice.d.ts +19 -0
- package/types/resources/ItemPrice.d.ts +1 -0
- package/types/resources/LedgerAccountBalance.d.ts +19 -0
- package/types/resources/Meter.d.ts +1 -0
- package/types/resources/MeteredFeature.d.ts +1 -0
- package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
- package/types/resources/OmnichannelSubscription.d.ts +6 -1
- package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
- package/types/resources/OrganizationDetail.d.ts +84 -0
- package/types/resources/PaymentSchedule.d.ts +1 -1
- package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
- package/types/resources/PaymentSource.d.ts +19 -0
- package/types/resources/PreferenceVariant.d.ts +10 -0
- package/types/resources/PriceRamp.d.ts +113 -0
- package/types/resources/PrivateNote.d.ts +18 -0
- package/types/resources/Purchase.d.ts +6 -0
- package/types/resources/Ramp.d.ts +6 -0
- package/types/resources/RampInterval.d.ts +12 -0
- package/types/resources/RecordedPurchase.d.ts +5 -1
- package/types/resources/RetrySegment.d.ts +36 -0
- package/types/resources/Subscription.d.ts +3 -0
- package/types/resources/Transaction.d.ts +4 -0
- package/types/resources/Usage.d.ts +7 -0
- package/types/resources/UsageSummary.d.ts +2 -0
- package/types/resources/WebhookEvent.d.ts +159 -5
- package/types/resources/AppliedBusinessRule.d.ts +0 -15
|
@@ -119,6 +119,11 @@ const CreateGiftSubscriptionSchema = zod_1.z.looseObject({
|
|
|
119
119
|
plan_quantity: zod_1.z.number().int().min(1).optional(),
|
|
120
120
|
plan_quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
121
121
|
});
|
|
122
|
+
const CreateGiftAddonsItemSchema = zod_1.z.object({
|
|
123
|
+
id: zod_1.z.string().max(100).optional(),
|
|
124
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
125
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
126
|
+
});
|
|
122
127
|
const CreateGiftAddonsSchema = zod_1.z.object({
|
|
123
128
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
124
129
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -135,7 +140,12 @@ const CreateGiftBodySchema = zod_1.z.looseObject({
|
|
|
135
140
|
payment_intent: CreateGiftPaymentIntentSchema.optional(),
|
|
136
141
|
shipping_address: CreateGiftShippingAddressSchema.optional(),
|
|
137
142
|
subscription: CreateGiftSubscriptionSchema.optional(),
|
|
138
|
-
addons:
|
|
143
|
+
addons: zod_1.z
|
|
144
|
+
.union([
|
|
145
|
+
zod_1.z.array(CreateGiftAddonsItemSchema.optional()),
|
|
146
|
+
CreateGiftAddonsSchema,
|
|
147
|
+
])
|
|
148
|
+
.optional(),
|
|
139
149
|
});
|
|
140
150
|
exports.CreateGiftBodySchema = CreateGiftBodySchema;
|
|
141
151
|
//Gift.createForItems
|
|
@@ -248,6 +258,13 @@ const CreateForItemsGiftShippingAddressSchema = zod_1.z.object({
|
|
|
248
258
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
249
259
|
.optional(),
|
|
250
260
|
});
|
|
261
|
+
const CreateForItemsGiftSubscriptionItemsItemSchema = zod_1.z.object({
|
|
262
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
263
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
264
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
265
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
266
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
267
|
+
});
|
|
251
268
|
const CreateForItemsGiftSubscriptionItemsSchema = zod_1.z.object({
|
|
252
269
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
253
270
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -255,6 +272,15 @@ const CreateForItemsGiftSubscriptionItemsSchema = zod_1.z.object({
|
|
|
255
272
|
unit_price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
256
273
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
257
274
|
});
|
|
275
|
+
const CreateForItemsGiftItemTiersItemSchema = zod_1.z.object({
|
|
276
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
277
|
+
starting_unit: zod_1.z.number().int().min(1).optional(),
|
|
278
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
279
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
280
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
281
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
282
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
283
|
+
});
|
|
258
284
|
const CreateForItemsGiftItemTiersSchema = zod_1.z.object({
|
|
259
285
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
260
286
|
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -275,8 +301,18 @@ const CreateForItemsGiftBodySchema = zod_1.z.looseObject({
|
|
|
275
301
|
gift_receiver: CreateForItemsGiftGiftReceiverSchema.optional(),
|
|
276
302
|
payment_intent: CreateForItemsGiftPaymentIntentSchema.optional(),
|
|
277
303
|
shipping_address: CreateForItemsGiftShippingAddressSchema.optional(),
|
|
278
|
-
subscription_items:
|
|
279
|
-
|
|
304
|
+
subscription_items: zod_1.z
|
|
305
|
+
.union([
|
|
306
|
+
zod_1.z.array(CreateForItemsGiftSubscriptionItemsItemSchema.optional()),
|
|
307
|
+
CreateForItemsGiftSubscriptionItemsSchema,
|
|
308
|
+
])
|
|
309
|
+
.optional(),
|
|
310
|
+
item_tiers: zod_1.z
|
|
311
|
+
.union([
|
|
312
|
+
zod_1.z.array(CreateForItemsGiftItemTiersItemSchema.optional()),
|
|
313
|
+
CreateForItemsGiftItemTiersSchema,
|
|
314
|
+
])
|
|
315
|
+
.optional(),
|
|
280
316
|
});
|
|
281
317
|
exports.CreateForItemsGiftBodySchema = CreateForItemsGiftBodySchema;
|
|
282
318
|
//Gift.list
|
|
@@ -288,10 +324,20 @@ const ListGiftStatusSchema = zod_1.z.object({
|
|
|
288
324
|
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
289
325
|
.optional(),
|
|
290
326
|
in: zod_1.z
|
|
291
|
-
.
|
|
327
|
+
.union([
|
|
328
|
+
zod_1.z.array(zod_1.z
|
|
329
|
+
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
330
|
+
.optional()),
|
|
331
|
+
zod_1.z.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired']),
|
|
332
|
+
])
|
|
292
333
|
.optional(),
|
|
293
334
|
not_in: zod_1.z
|
|
294
|
-
.
|
|
335
|
+
.union([
|
|
336
|
+
zod_1.z.array(zod_1.z
|
|
337
|
+
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
338
|
+
.optional()),
|
|
339
|
+
zod_1.z.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired']),
|
|
340
|
+
])
|
|
295
341
|
.optional(),
|
|
296
342
|
});
|
|
297
343
|
const ListGiftEmailSchema = zod_1.z.object({
|
|
@@ -16,22 +16,55 @@ const ListGrantBlocksGrantBlockAccountTypeSchema = zod_1.z.object({
|
|
|
16
16
|
is: zod_1.z.enum(['provisioned', 'overdraft']).optional(),
|
|
17
17
|
});
|
|
18
18
|
const ListGrantBlocksGrantBlockEffectiveFromSchema = zod_1.z.object({
|
|
19
|
-
after: zod_1.z
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
after: zod_1.z
|
|
20
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
21
|
+
.optional(),
|
|
22
|
+
before: zod_1.z
|
|
23
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
24
|
+
.optional(),
|
|
25
|
+
on: zod_1.z
|
|
26
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
27
|
+
.optional(),
|
|
28
|
+
between: zod_1.z
|
|
29
|
+
.union([
|
|
30
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
31
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
32
|
+
])
|
|
33
|
+
.optional(),
|
|
23
34
|
});
|
|
24
35
|
const ListGrantBlocksGrantBlockExpiresAtSchema = zod_1.z.object({
|
|
25
|
-
after: zod_1.z
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
after: zod_1.z
|
|
37
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
38
|
+
.optional(),
|
|
39
|
+
before: zod_1.z
|
|
40
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
41
|
+
.optional(),
|
|
42
|
+
on: zod_1.z
|
|
43
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
44
|
+
.optional(),
|
|
45
|
+
between: zod_1.z
|
|
46
|
+
.union([
|
|
47
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
48
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
49
|
+
])
|
|
50
|
+
.optional(),
|
|
29
51
|
});
|
|
30
52
|
const ListGrantBlocksGrantBlockCreatedAtSchema = zod_1.z.object({
|
|
31
|
-
after: zod_1.z
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
53
|
+
after: zod_1.z
|
|
54
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
55
|
+
.optional(),
|
|
56
|
+
before: zod_1.z
|
|
57
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
58
|
+
.optional(),
|
|
59
|
+
on: zod_1.z
|
|
60
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
61
|
+
.optional(),
|
|
62
|
+
between: zod_1.z
|
|
63
|
+
.union([
|
|
64
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
65
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
66
|
+
])
|
|
67
|
+
.optional(),
|
|
35
68
|
});
|
|
36
69
|
const ListGrantBlocksGrantBlockSortBySchema = zod_1.z.looseObject({
|
|
37
70
|
asc: zod_1.z.enum(['effective_from', 'expires_at', 'created_at']).optional(),
|