chargebee 3.35.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 +65 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +56 -0
- package/cjs/resources/webhook/eventType.js +2 -0
- 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 +16 -5
- package/cjs/schema/business_rule.schema.js +2 -2
- package/cjs/schema/business_ruleset.schema.js +2 -2
- package/cjs/schema/comment.schema.js +15 -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 +496 -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 +33 -4
- package/cjs/schema/entitlement_override.schema.js +17 -1
- package/cjs/schema/estimate.schema.js +581 -36
- package/cjs/schema/event.schema.js +1282 -633
- 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 +562 -66
- package/cjs/schema/index.js +3 -0
- package/cjs/schema/invoice.schema.js +821 -121
- 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_operation.schema.js +42 -15
- package/cjs/schema/metered_feature.schema.js +10 -1
- package/cjs/schema/omnichannel_one_time_order.schema.js +32 -2
- package/cjs/schema/omnichannel_subscription.schema.js +136 -30
- 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 +360 -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 +79 -14
- 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 +204 -12
- package/cjs/schema/quote.schema.js +901 -81
- package/cjs/schema/quote_entitlement.schema.js +6 -2
- package/cjs/schema/ramp.schema.js +238 -24
- package/cjs/schema/site_migration_detail.schema.js +50 -16
- package/cjs/schema/subscription.schema.js +998 -169
- 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 +55 -12
- package/cjs/schema/usage_event.schema.js +13 -1
- package/cjs/schema/virtual_bank_account.schema.js +42 -10
- package/cjs/schema/webhook_endpoint.schema.js +4 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +56 -0
- package/esm/resources/webhook/eventType.js +2 -0
- 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 +16 -5
- package/esm/schema/business_rule.schema.js +2 -2
- package/esm/schema/business_ruleset.schema.js +2 -2
- package/esm/schema/comment.schema.js +15 -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 +496 -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 +33 -4
- package/esm/schema/entitlement_override.schema.js +17 -1
- package/esm/schema/estimate.schema.js +581 -36
- package/esm/schema/event.schema.js +1282 -633
- 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 +562 -66
- package/esm/schema/index.js +3 -0
- package/esm/schema/invoice.schema.js +821 -121
- 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_operation.schema.js +42 -15
- package/esm/schema/metered_feature.schema.js +10 -1
- package/esm/schema/omnichannel_one_time_order.schema.js +32 -2
- package/esm/schema/omnichannel_subscription.schema.js +136 -30
- 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 +360 -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 +79 -14
- 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 +204 -12
- package/esm/schema/quote.schema.js +901 -81
- package/esm/schema/quote_entitlement.schema.js +6 -2
- package/esm/schema/ramp.schema.js +238 -24
- package/esm/schema/site_migration_detail.schema.js +50 -16
- package/esm/schema/subscription.schema.js +998 -169
- 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 +55 -12
- package/esm/schema/usage_event.schema.js +13 -1
- package/esm/schema/virtual_bank_account.schema.js +42 -10
- package/esm/schema/webhook_endpoint.schema.js +4 -0
- package/package.json +1 -1
- package/types/core.d.ts +10 -6
- package/types/index.d.ts +8 -1
- package/types/resources/BillingLineItem.d.ts +10 -0
- package/types/resources/BillingMetadata.d.ts +9 -0
- package/types/resources/Content.d.ts +5 -0
- package/types/resources/Discount.d.ts +1 -0
- package/types/resources/DraftRequest.d.ts +1 -1
- package/types/resources/Estimate.d.ts +3 -0
- package/types/resources/Event.d.ts +2 -0
- 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/HostedPage.d.ts +18 -0
- package/types/resources/Invoice.d.ts +4 -0
- package/types/resources/OrganizationDetail.d.ts +84 -0
- package/types/resources/Subscription.d.ts +3 -0
- package/types/resources/Usage.d.ts +1 -0
- package/types/resources/WebhookEvent.d.ts +10 -0
|
@@ -116,6 +116,11 @@ const CreateGiftSubscriptionSchema = z.looseObject({
|
|
|
116
116
|
plan_quantity: z.number().int().min(1).optional(),
|
|
117
117
|
plan_quantity_in_decimal: z.string().max(33).optional(),
|
|
118
118
|
});
|
|
119
|
+
const CreateGiftAddonsItemSchema = z.object({
|
|
120
|
+
id: z.string().max(100).optional(),
|
|
121
|
+
quantity: z.number().int().min(1).optional(),
|
|
122
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
123
|
+
});
|
|
119
124
|
const CreateGiftAddonsSchema = z.object({
|
|
120
125
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
121
126
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -132,7 +137,12 @@ const CreateGiftBodySchema = z.looseObject({
|
|
|
132
137
|
payment_intent: CreateGiftPaymentIntentSchema.optional(),
|
|
133
138
|
shipping_address: CreateGiftShippingAddressSchema.optional(),
|
|
134
139
|
subscription: CreateGiftSubscriptionSchema.optional(),
|
|
135
|
-
addons:
|
|
140
|
+
addons: z
|
|
141
|
+
.union([
|
|
142
|
+
z.array(CreateGiftAddonsItemSchema.optional()),
|
|
143
|
+
CreateGiftAddonsSchema,
|
|
144
|
+
])
|
|
145
|
+
.optional(),
|
|
136
146
|
});
|
|
137
147
|
export { CreateGiftBodySchema };
|
|
138
148
|
//Gift.createForItems
|
|
@@ -245,6 +255,13 @@ const CreateForItemsGiftShippingAddressSchema = z.object({
|
|
|
245
255
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
246
256
|
.optional(),
|
|
247
257
|
});
|
|
258
|
+
const CreateForItemsGiftSubscriptionItemsItemSchema = z.object({
|
|
259
|
+
item_price_id: z.string().max(100).optional(),
|
|
260
|
+
quantity: z.number().int().min(1).optional(),
|
|
261
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
262
|
+
unit_price: z.number().int().min(0).optional(),
|
|
263
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
264
|
+
});
|
|
248
265
|
const CreateForItemsGiftSubscriptionItemsSchema = z.object({
|
|
249
266
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
250
267
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -252,6 +269,15 @@ const CreateForItemsGiftSubscriptionItemsSchema = z.object({
|
|
|
252
269
|
unit_price: z.array(z.number().int().min(0).optional()).optional(),
|
|
253
270
|
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
254
271
|
});
|
|
272
|
+
const CreateForItemsGiftItemTiersItemSchema = z.object({
|
|
273
|
+
item_price_id: z.string().max(100).optional(),
|
|
274
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
275
|
+
ending_unit: z.number().int().optional(),
|
|
276
|
+
price: z.number().int().min(0).optional(),
|
|
277
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
278
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
279
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
280
|
+
});
|
|
255
281
|
const CreateForItemsGiftItemTiersSchema = z.object({
|
|
256
282
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
257
283
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -272,8 +298,18 @@ const CreateForItemsGiftBodySchema = z.looseObject({
|
|
|
272
298
|
gift_receiver: CreateForItemsGiftGiftReceiverSchema.optional(),
|
|
273
299
|
payment_intent: CreateForItemsGiftPaymentIntentSchema.optional(),
|
|
274
300
|
shipping_address: CreateForItemsGiftShippingAddressSchema.optional(),
|
|
275
|
-
subscription_items:
|
|
276
|
-
|
|
301
|
+
subscription_items: z
|
|
302
|
+
.union([
|
|
303
|
+
z.array(CreateForItemsGiftSubscriptionItemsItemSchema.optional()),
|
|
304
|
+
CreateForItemsGiftSubscriptionItemsSchema,
|
|
305
|
+
])
|
|
306
|
+
.optional(),
|
|
307
|
+
item_tiers: z
|
|
308
|
+
.union([
|
|
309
|
+
z.array(CreateForItemsGiftItemTiersItemSchema.optional()),
|
|
310
|
+
CreateForItemsGiftItemTiersSchema,
|
|
311
|
+
])
|
|
312
|
+
.optional(),
|
|
277
313
|
});
|
|
278
314
|
export { CreateForItemsGiftBodySchema };
|
|
279
315
|
//Gift.list
|
|
@@ -285,10 +321,20 @@ const ListGiftStatusSchema = z.object({
|
|
|
285
321
|
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
286
322
|
.optional(),
|
|
287
323
|
in: z
|
|
288
|
-
.
|
|
324
|
+
.union([
|
|
325
|
+
z.array(z
|
|
326
|
+
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
327
|
+
.optional()),
|
|
328
|
+
z.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired']),
|
|
329
|
+
])
|
|
289
330
|
.optional(),
|
|
290
331
|
not_in: z
|
|
291
|
-
.
|
|
332
|
+
.union([
|
|
333
|
+
z.array(z
|
|
334
|
+
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
335
|
+
.optional()),
|
|
336
|
+
z.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired']),
|
|
337
|
+
])
|
|
292
338
|
.optional(),
|
|
293
339
|
});
|
|
294
340
|
const ListGiftEmailSchema = z.object({
|
|
@@ -13,22 +13,55 @@ const ListGrantBlocksGrantBlockAccountTypeSchema = z.object({
|
|
|
13
13
|
is: z.enum(['provisioned', 'overdraft']).optional(),
|
|
14
14
|
});
|
|
15
15
|
const ListGrantBlocksGrantBlockEffectiveFromSchema = z.object({
|
|
16
|
-
after: z
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
after: z
|
|
17
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
18
|
+
.optional(),
|
|
19
|
+
before: z
|
|
20
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
21
|
+
.optional(),
|
|
22
|
+
on: z
|
|
23
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
24
|
+
.optional(),
|
|
25
|
+
between: z
|
|
26
|
+
.union([
|
|
27
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
28
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
29
|
+
])
|
|
30
|
+
.optional(),
|
|
20
31
|
});
|
|
21
32
|
const ListGrantBlocksGrantBlockExpiresAtSchema = z.object({
|
|
22
|
-
after: z
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
after: z
|
|
34
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
35
|
+
.optional(),
|
|
36
|
+
before: z
|
|
37
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
38
|
+
.optional(),
|
|
39
|
+
on: z
|
|
40
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
41
|
+
.optional(),
|
|
42
|
+
between: z
|
|
43
|
+
.union([
|
|
44
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
45
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
46
|
+
])
|
|
47
|
+
.optional(),
|
|
26
48
|
});
|
|
27
49
|
const ListGrantBlocksGrantBlockCreatedAtSchema = z.object({
|
|
28
|
-
after: z
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
50
|
+
after: z
|
|
51
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
52
|
+
.optional(),
|
|
53
|
+
before: z
|
|
54
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
55
|
+
.optional(),
|
|
56
|
+
on: z
|
|
57
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
58
|
+
.optional(),
|
|
59
|
+
between: z
|
|
60
|
+
.union([
|
|
61
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
62
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
63
|
+
])
|
|
64
|
+
.optional(),
|
|
32
65
|
});
|
|
33
66
|
const ListGrantBlocksGrantBlockSortBySchema = z.looseObject({
|
|
34
67
|
asc: z.enum(['effective_from', 'expires_at', 'created_at']).optional(),
|