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
|
@@ -6,6 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.InvoiceNowEstimateUnbilledChargeBodySchema = exports.ListUnbilledChargeBodySchema = exports.InvoiceUnbilledChargesUnbilledChargeBodySchema = exports.CreateUnbilledChargeBodySchema = exports.CreateUnbilledChargeUnbilledChargeBodySchema = void 0;
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//UnbilledCharge.createUnbilledCharge
|
|
9
|
+
const CreateUnbilledChargeUnbilledChargeAddonsItemSchema = zod_1.z.object({
|
|
10
|
+
id: zod_1.z.string().max(100).optional(),
|
|
11
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
12
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
13
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
14
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
15
|
+
date_from: zod_1.z.number().int().optional(),
|
|
16
|
+
date_to: zod_1.z.number().int().optional(),
|
|
17
|
+
});
|
|
9
18
|
const CreateUnbilledChargeUnbilledChargeAddonsSchema = zod_1.z.object({
|
|
10
19
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
11
20
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -15,6 +24,23 @@ const CreateUnbilledChargeUnbilledChargeAddonsSchema = zod_1.z.object({
|
|
|
15
24
|
date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
16
25
|
date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
17
26
|
});
|
|
27
|
+
const CreateUnbilledChargeUnbilledChargeChargesItemSchema = zod_1.z.object({
|
|
28
|
+
amount: zod_1.z.number().int().min(1).optional(),
|
|
29
|
+
amount_in_decimal: zod_1.z.string().max(39).optional(),
|
|
30
|
+
description: zod_1.z.string().max(250).optional(),
|
|
31
|
+
taxable: zod_1.z.boolean().default(true).optional(),
|
|
32
|
+
tax_profile_id: zod_1.z.string().max(50).optional(),
|
|
33
|
+
avalara_tax_code: zod_1.z.string().max(50).optional(),
|
|
34
|
+
hsn_code: zod_1.z.string().max(50).optional(),
|
|
35
|
+
taxjar_product_code: zod_1.z.string().max(50).optional(),
|
|
36
|
+
avalara_sale_type: zod_1.z
|
|
37
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
38
|
+
.optional(),
|
|
39
|
+
avalara_transaction_type: zod_1.z.number().int().optional(),
|
|
40
|
+
avalara_service_type: zod_1.z.number().int().optional(),
|
|
41
|
+
date_from: zod_1.z.number().int().optional(),
|
|
42
|
+
date_to: zod_1.z.number().int().optional(),
|
|
43
|
+
});
|
|
18
44
|
const CreateUnbilledChargeUnbilledChargeChargesSchema = zod_1.z.object({
|
|
19
45
|
amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
20
46
|
amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
@@ -32,6 +58,11 @@ const CreateUnbilledChargeUnbilledChargeChargesSchema = zod_1.z.object({
|
|
|
32
58
|
date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
33
59
|
date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
34
60
|
});
|
|
61
|
+
const CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsItemSchema = zod_1.z.object({
|
|
62
|
+
provider_name: zod_1.z.string().max(50).optional(),
|
|
63
|
+
field_id: zod_1.z.string().max(50).optional(),
|
|
64
|
+
field_value: zod_1.z.string().max(50).optional(),
|
|
65
|
+
});
|
|
35
66
|
const CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsSchema = zod_1.z.object({
|
|
36
67
|
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
37
68
|
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
@@ -40,12 +71,36 @@ const CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsSchema = zod_1.z.objec
|
|
|
40
71
|
const CreateUnbilledChargeUnbilledChargeBodySchema = zod_1.z.looseObject({
|
|
41
72
|
subscription_id: zod_1.z.string().max(50),
|
|
42
73
|
currency_code: zod_1.z.string().max(3).optional(),
|
|
43
|
-
addons:
|
|
44
|
-
|
|
45
|
-
|
|
74
|
+
addons: zod_1.z
|
|
75
|
+
.union([
|
|
76
|
+
zod_1.z.array(CreateUnbilledChargeUnbilledChargeAddonsItemSchema.optional()),
|
|
77
|
+
CreateUnbilledChargeUnbilledChargeAddonsSchema,
|
|
78
|
+
])
|
|
79
|
+
.optional(),
|
|
80
|
+
charges: zod_1.z
|
|
81
|
+
.union([
|
|
82
|
+
zod_1.z.array(CreateUnbilledChargeUnbilledChargeChargesItemSchema.optional()),
|
|
83
|
+
CreateUnbilledChargeUnbilledChargeChargesSchema,
|
|
84
|
+
])
|
|
85
|
+
.optional(),
|
|
86
|
+
tax_providers_fields: zod_1.z
|
|
87
|
+
.union([
|
|
88
|
+
zod_1.z.array(CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsItemSchema.optional()),
|
|
89
|
+
CreateUnbilledChargeUnbilledChargeTaxProvidersFieldsSchema,
|
|
90
|
+
])
|
|
91
|
+
.optional(),
|
|
46
92
|
});
|
|
47
93
|
exports.CreateUnbilledChargeUnbilledChargeBodySchema = CreateUnbilledChargeUnbilledChargeBodySchema;
|
|
48
94
|
//UnbilledCharge.create
|
|
95
|
+
const CreateUnbilledChargeItemPricesItemSchema = zod_1.z.object({
|
|
96
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
97
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
98
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
99
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
100
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
101
|
+
date_from: zod_1.z.number().int().optional(),
|
|
102
|
+
date_to: zod_1.z.number().int().optional(),
|
|
103
|
+
});
|
|
49
104
|
const CreateUnbilledChargeItemPricesSchema = zod_1.z.object({
|
|
50
105
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
51
106
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -55,6 +110,17 @@ const CreateUnbilledChargeItemPricesSchema = zod_1.z.object({
|
|
|
55
110
|
date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
56
111
|
date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
57
112
|
});
|
|
113
|
+
const CreateUnbilledChargeItemTiersItemSchema = zod_1.z.object({
|
|
114
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
115
|
+
starting_unit: zod_1.z.number().int().min(1).optional(),
|
|
116
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
117
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
118
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
119
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
120
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
121
|
+
pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
122
|
+
package_size: zod_1.z.number().int().min(1).optional(),
|
|
123
|
+
});
|
|
58
124
|
const CreateUnbilledChargeItemTiersSchema = zod_1.z.object({
|
|
59
125
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
60
126
|
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -68,6 +134,23 @@ const CreateUnbilledChargeItemTiersSchema = zod_1.z.object({
|
|
|
68
134
|
.optional(),
|
|
69
135
|
package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
70
136
|
});
|
|
137
|
+
const CreateUnbilledChargeChargesItemSchema = zod_1.z.object({
|
|
138
|
+
amount: zod_1.z.number().int().min(1).optional(),
|
|
139
|
+
amount_in_decimal: zod_1.z.string().max(39).optional(),
|
|
140
|
+
description: zod_1.z.string().max(250).optional(),
|
|
141
|
+
taxable: zod_1.z.boolean().default(true).optional(),
|
|
142
|
+
tax_profile_id: zod_1.z.string().max(50).optional(),
|
|
143
|
+
avalara_tax_code: zod_1.z.string().max(50).optional(),
|
|
144
|
+
hsn_code: zod_1.z.string().max(50).optional(),
|
|
145
|
+
taxjar_product_code: zod_1.z.string().max(50).optional(),
|
|
146
|
+
avalara_sale_type: zod_1.z
|
|
147
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
148
|
+
.optional(),
|
|
149
|
+
avalara_transaction_type: zod_1.z.number().int().optional(),
|
|
150
|
+
avalara_service_type: zod_1.z.number().int().optional(),
|
|
151
|
+
date_from: zod_1.z.number().int().optional(),
|
|
152
|
+
date_to: zod_1.z.number().int().optional(),
|
|
153
|
+
});
|
|
71
154
|
const CreateUnbilledChargeChargesSchema = zod_1.z.object({
|
|
72
155
|
amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
73
156
|
amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
@@ -85,6 +168,11 @@ const CreateUnbilledChargeChargesSchema = zod_1.z.object({
|
|
|
85
168
|
date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
86
169
|
date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
87
170
|
});
|
|
171
|
+
const CreateUnbilledChargeTaxProvidersFieldsItemSchema = zod_1.z.object({
|
|
172
|
+
provider_name: zod_1.z.string().max(50).optional(),
|
|
173
|
+
field_id: zod_1.z.string().max(50).optional(),
|
|
174
|
+
field_value: zod_1.z.string().max(50).optional(),
|
|
175
|
+
});
|
|
88
176
|
const CreateUnbilledChargeTaxProvidersFieldsSchema = zod_1.z.object({
|
|
89
177
|
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
90
178
|
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
@@ -93,10 +181,30 @@ const CreateUnbilledChargeTaxProvidersFieldsSchema = zod_1.z.object({
|
|
|
93
181
|
const CreateUnbilledChargeBodySchema = zod_1.z.looseObject({
|
|
94
182
|
subscription_id: zod_1.z.string().max(50),
|
|
95
183
|
currency_code: zod_1.z.string().max(3).optional(),
|
|
96
|
-
item_prices:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
184
|
+
item_prices: zod_1.z
|
|
185
|
+
.union([
|
|
186
|
+
zod_1.z.array(CreateUnbilledChargeItemPricesItemSchema.optional()),
|
|
187
|
+
CreateUnbilledChargeItemPricesSchema,
|
|
188
|
+
])
|
|
189
|
+
.optional(),
|
|
190
|
+
item_tiers: zod_1.z
|
|
191
|
+
.union([
|
|
192
|
+
zod_1.z.array(CreateUnbilledChargeItemTiersItemSchema.optional()),
|
|
193
|
+
CreateUnbilledChargeItemTiersSchema,
|
|
194
|
+
])
|
|
195
|
+
.optional(),
|
|
196
|
+
charges: zod_1.z
|
|
197
|
+
.union([
|
|
198
|
+
zod_1.z.array(CreateUnbilledChargeChargesItemSchema.optional()),
|
|
199
|
+
CreateUnbilledChargeChargesSchema,
|
|
200
|
+
])
|
|
201
|
+
.optional(),
|
|
202
|
+
tax_providers_fields: zod_1.z
|
|
203
|
+
.union([
|
|
204
|
+
zod_1.z.array(CreateUnbilledChargeTaxProvidersFieldsItemSchema.optional()),
|
|
205
|
+
CreateUnbilledChargeTaxProvidersFieldsSchema,
|
|
206
|
+
])
|
|
207
|
+
.optional(),
|
|
100
208
|
});
|
|
101
209
|
exports.CreateUnbilledChargeBodySchema = CreateUnbilledChargeBodySchema;
|
|
102
210
|
//UnbilledCharge.invoiceUnbilledCharges
|
|
@@ -110,17 +218,37 @@ const ListUnbilledChargeSubscriptionIdSchema = zod_1.z.object({
|
|
|
110
218
|
is: zod_1.z.string().min(1).optional(),
|
|
111
219
|
is_not: zod_1.z.string().min(1).optional(),
|
|
112
220
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
113
|
-
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
114
|
-
in: zod_1.z
|
|
115
|
-
|
|
221
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
222
|
+
in: zod_1.z
|
|
223
|
+
.union([
|
|
224
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
225
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
226
|
+
])
|
|
227
|
+
.optional(),
|
|
228
|
+
not_in: zod_1.z
|
|
229
|
+
.union([
|
|
230
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
231
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
232
|
+
])
|
|
233
|
+
.optional(),
|
|
116
234
|
});
|
|
117
235
|
const ListUnbilledChargeCustomerIdSchema = zod_1.z.object({
|
|
118
236
|
is: zod_1.z.string().min(1).optional(),
|
|
119
237
|
is_not: zod_1.z.string().min(1).optional(),
|
|
120
238
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
121
|
-
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
122
|
-
in: zod_1.z
|
|
123
|
-
|
|
239
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
240
|
+
in: zod_1.z
|
|
241
|
+
.union([
|
|
242
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
243
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
244
|
+
])
|
|
245
|
+
.optional(),
|
|
246
|
+
not_in: zod_1.z
|
|
247
|
+
.union([
|
|
248
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
249
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
250
|
+
])
|
|
251
|
+
.optional(),
|
|
124
252
|
});
|
|
125
253
|
const ListUnbilledChargeBodySchema = zod_1.z.looseObject({
|
|
126
254
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
@@ -37,16 +37,38 @@ const ListUsageSubscriptionIdSchema = zod_1.z.object({
|
|
|
37
37
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
38
38
|
});
|
|
39
39
|
const ListUsageUsageDateSchema = zod_1.z.object({
|
|
40
|
-
after: zod_1.z
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
after: zod_1.z
|
|
41
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
42
|
+
.optional(),
|
|
43
|
+
before: zod_1.z
|
|
44
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
45
|
+
.optional(),
|
|
46
|
+
on: zod_1.z
|
|
47
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
48
|
+
.optional(),
|
|
49
|
+
between: zod_1.z
|
|
50
|
+
.union([
|
|
51
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
52
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
53
|
+
])
|
|
54
|
+
.optional(),
|
|
44
55
|
});
|
|
45
56
|
const ListUsageUpdatedAtSchema = zod_1.z.object({
|
|
46
|
-
after: zod_1.z
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
after: zod_1.z
|
|
58
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
59
|
+
.optional(),
|
|
60
|
+
before: zod_1.z
|
|
61
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
62
|
+
.optional(),
|
|
63
|
+
on: zod_1.z
|
|
64
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
65
|
+
.optional(),
|
|
66
|
+
between: zod_1.z
|
|
67
|
+
.union([
|
|
68
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
69
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
70
|
+
])
|
|
71
|
+
.optional(),
|
|
50
72
|
});
|
|
51
73
|
const ListUsageItemPriceIdSchema = zod_1.z.object({
|
|
52
74
|
is: zod_1.z.string().min(1).optional(),
|
|
@@ -57,13 +79,23 @@ const ListUsageInvoiceIdSchema = zod_1.z.object({
|
|
|
57
79
|
is: zod_1.z.string().min(1).optional(),
|
|
58
80
|
is_not: zod_1.z.string().min(1).optional(),
|
|
59
81
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
60
|
-
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
82
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
61
83
|
});
|
|
62
84
|
const ListUsageSourceSchema = zod_1.z.object({
|
|
63
85
|
is: zod_1.z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
|
|
64
86
|
is_not: zod_1.z.enum(['admin_console', 'api', 'bulk_operation']).optional(),
|
|
65
|
-
in: zod_1.z
|
|
66
|
-
|
|
87
|
+
in: zod_1.z
|
|
88
|
+
.union([
|
|
89
|
+
zod_1.z.array(zod_1.z.enum(['admin_console', 'api', 'bulk_operation']).optional()),
|
|
90
|
+
zod_1.z.enum(['admin_console', 'api', 'bulk_operation']),
|
|
91
|
+
])
|
|
92
|
+
.optional(),
|
|
93
|
+
not_in: zod_1.z
|
|
94
|
+
.union([
|
|
95
|
+
zod_1.z.array(zod_1.z.enum(['admin_console', 'api', 'bulk_operation']).optional()),
|
|
96
|
+
zod_1.z.enum(['admin_console', 'api', 'bulk_operation']),
|
|
97
|
+
])
|
|
98
|
+
.optional(),
|
|
67
99
|
});
|
|
68
100
|
const ListUsageSortBySchema = zod_1.z.looseObject({
|
|
69
101
|
asc: zod_1.z.enum(['usage_date', 'updated_at']).optional(),
|
|
@@ -86,13 +118,24 @@ exports.ListUsageBodySchema = ListUsageBodySchema;
|
|
|
86
118
|
const PdfUsageInvoiceSchema = zod_1.z.object({
|
|
87
119
|
id: zod_1.z.string().max(50),
|
|
88
120
|
});
|
|
121
|
+
const PdfUsageGroupByItemSchema = zod_1.z.object({
|
|
122
|
+
feature_id: zod_1.z.string().max(100).optional(),
|
|
123
|
+
attributes: zod_1.z.array(zod_1.z.string().optional()).optional(),
|
|
124
|
+
window_size: zod_1.z.enum(['day', 'none']).optional(),
|
|
125
|
+
});
|
|
89
126
|
const PdfUsageGroupBySchema = zod_1.z.object({
|
|
90
127
|
feature_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
91
128
|
attributes: zod_1.z.array(zod_1.z.array(zod_1.z.string().optional()).optional()).optional(),
|
|
129
|
+
window_size: zod_1.z.array(zod_1.z.enum(['day', 'none']).optional()).optional(),
|
|
92
130
|
});
|
|
93
131
|
const PdfUsageBodySchema = zod_1.z.looseObject({
|
|
94
132
|
disposition_type: zod_1.z.enum(['attachment', 'inline']).optional(),
|
|
95
133
|
invoice: PdfUsageInvoiceSchema.optional(),
|
|
96
|
-
group_by:
|
|
134
|
+
group_by: zod_1.z
|
|
135
|
+
.union([
|
|
136
|
+
zod_1.z.array(PdfUsageGroupByItemSchema.optional()),
|
|
137
|
+
PdfUsageGroupBySchema,
|
|
138
|
+
])
|
|
139
|
+
.optional(),
|
|
97
140
|
});
|
|
98
141
|
exports.PdfUsageBodySchema = PdfUsageBodySchema;
|
|
@@ -15,6 +15,13 @@ const CreateUsageEventBodySchema = zod_1.z.looseObject({
|
|
|
15
15
|
});
|
|
16
16
|
exports.CreateUsageEventBodySchema = CreateUsageEventBodySchema;
|
|
17
17
|
//UsageEvent.batchIngest
|
|
18
|
+
const BatchIngestUsageEventPropertiesSchema = zod_1.z.looseObject({});
|
|
19
|
+
const BatchIngestUsageEventEventsItemSchema = zod_1.z.object({
|
|
20
|
+
deduplication_id: zod_1.z.string().max(36),
|
|
21
|
+
subscription_id: zod_1.z.string().max(50),
|
|
22
|
+
usage_timestamp: zod_1.z.number().int(),
|
|
23
|
+
properties: BatchIngestUsageEventPropertiesSchema,
|
|
24
|
+
});
|
|
18
25
|
const BatchIngestUsageEventPropertiesItemSchema = zod_1.z.looseObject({});
|
|
19
26
|
const BatchIngestUsageEventEventsSchema = zod_1.z.object({
|
|
20
27
|
deduplication_id: zod_1.z.array(zod_1.z.string().max(36).optional()),
|
|
@@ -23,6 +30,11 @@ const BatchIngestUsageEventEventsSchema = zod_1.z.object({
|
|
|
23
30
|
properties: zod_1.z.array(BatchIngestUsageEventPropertiesItemSchema.optional()),
|
|
24
31
|
});
|
|
25
32
|
const BatchIngestUsageEventBodySchema = zod_1.z.looseObject({
|
|
26
|
-
events:
|
|
33
|
+
events: zod_1.z
|
|
34
|
+
.union([
|
|
35
|
+
zod_1.z.array(BatchIngestUsageEventEventsItemSchema.optional()),
|
|
36
|
+
BatchIngestUsageEventEventsSchema,
|
|
37
|
+
])
|
|
38
|
+
.optional(),
|
|
27
39
|
});
|
|
28
40
|
exports.BatchIngestUsageEventBodySchema = BatchIngestUsageEventBodySchema;
|
|
@@ -46,20 +46,52 @@ const ListVirtualBankAccountCustomerIdSchema = zod_1.z.object({
|
|
|
46
46
|
is: zod_1.z.string().min(1).optional(),
|
|
47
47
|
is_not: zod_1.z.string().min(1).optional(),
|
|
48
48
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
49
|
-
in: zod_1.z
|
|
50
|
-
|
|
49
|
+
in: zod_1.z
|
|
50
|
+
.union([
|
|
51
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
52
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
53
|
+
])
|
|
54
|
+
.optional(),
|
|
55
|
+
not_in: zod_1.z
|
|
56
|
+
.union([
|
|
57
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
58
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
59
|
+
])
|
|
60
|
+
.optional(),
|
|
51
61
|
});
|
|
52
62
|
const ListVirtualBankAccountUpdatedAtSchema = zod_1.z.object({
|
|
53
|
-
after: zod_1.z
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
63
|
+
after: zod_1.z
|
|
64
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
65
|
+
.optional(),
|
|
66
|
+
before: zod_1.z
|
|
67
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
68
|
+
.optional(),
|
|
69
|
+
on: zod_1.z
|
|
70
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
71
|
+
.optional(),
|
|
72
|
+
between: zod_1.z
|
|
73
|
+
.union([
|
|
74
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
75
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
76
|
+
])
|
|
77
|
+
.optional(),
|
|
57
78
|
});
|
|
58
79
|
const ListVirtualBankAccountCreatedAtSchema = zod_1.z.object({
|
|
59
|
-
after: zod_1.z
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
80
|
+
after: zod_1.z
|
|
81
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
82
|
+
.optional(),
|
|
83
|
+
before: zod_1.z
|
|
84
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
85
|
+
.optional(),
|
|
86
|
+
on: zod_1.z
|
|
87
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
88
|
+
.optional(),
|
|
89
|
+
between: zod_1.z
|
|
90
|
+
.union([
|
|
91
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
92
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
93
|
+
])
|
|
94
|
+
.optional(),
|
|
63
95
|
});
|
|
64
96
|
const ListVirtualBankAccountBodySchema = zod_1.z.looseObject({
|
|
65
97
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
@@ -187,6 +187,8 @@ const CreateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
187
187
|
'customer_business_entity_changed',
|
|
188
188
|
'subscription_business_entity_changed',
|
|
189
189
|
'payment_source_business_entity_changed',
|
|
190
|
+
'organization_details_created',
|
|
191
|
+
'organization_details_updated',
|
|
190
192
|
'purchase_created',
|
|
191
193
|
'voucher_created',
|
|
192
194
|
'voucher_expired',
|
|
@@ -478,6 +480,8 @@ const UpdateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
478
480
|
'customer_business_entity_changed',
|
|
479
481
|
'subscription_business_entity_changed',
|
|
480
482
|
'payment_source_business_entity_changed',
|
|
483
|
+
'organization_details_created',
|
|
484
|
+
'organization_details_updated',
|
|
481
485
|
'purchase_created',
|
|
482
486
|
'voucher_created',
|
|
483
487
|
'voucher_expired',
|
package/esm/environment.js
CHANGED
|
@@ -8,7 +8,7 @@ export const Environment = {
|
|
|
8
8
|
hostSuffix: '.chargebee.com',
|
|
9
9
|
apiPath: '/api/v2',
|
|
10
10
|
timeout: DEFAULT_TIME_OUT,
|
|
11
|
-
clientVersion: 'v3.
|
|
11
|
+
clientVersion: 'v3.36.0',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -1225,6 +1225,34 @@ export const Endpoints = {
|
|
|
1225
1225
|
{},
|
|
1226
1226
|
],
|
|
1227
1227
|
],
|
|
1228
|
+
gatewayRequestLog: [
|
|
1229
|
+
['list', 'GET', '/gateway_request_logs', null, false, null, false, {}, {}],
|
|
1230
|
+
[
|
|
1231
|
+
'retrieve',
|
|
1232
|
+
'GET',
|
|
1233
|
+
'/gateway_request_logs',
|
|
1234
|
+
null,
|
|
1235
|
+
true,
|
|
1236
|
+
null,
|
|
1237
|
+
false,
|
|
1238
|
+
{},
|
|
1239
|
+
{},
|
|
1240
|
+
],
|
|
1241
|
+
],
|
|
1242
|
+
gatewayWebhookLog: [
|
|
1243
|
+
['list', 'GET', '/gateway_webhook_logs', null, false, null, false, {}, {}],
|
|
1244
|
+
[
|
|
1245
|
+
'retrieve',
|
|
1246
|
+
'GET',
|
|
1247
|
+
'/gateway_webhook_logs',
|
|
1248
|
+
null,
|
|
1249
|
+
true,
|
|
1250
|
+
null,
|
|
1251
|
+
false,
|
|
1252
|
+
{},
|
|
1253
|
+
{},
|
|
1254
|
+
],
|
|
1255
|
+
],
|
|
1228
1256
|
invoice: [
|
|
1229
1257
|
[
|
|
1230
1258
|
'create',
|
|
@@ -4804,6 +4832,33 @@ export const Endpoints = {
|
|
|
4804
4832
|
{},
|
|
4805
4833
|
],
|
|
4806
4834
|
],
|
|
4835
|
+
organizationDetail: [
|
|
4836
|
+
[
|
|
4837
|
+
'create',
|
|
4838
|
+
'POST',
|
|
4839
|
+
'/organization_details',
|
|
4840
|
+
null,
|
|
4841
|
+
false,
|
|
4842
|
+
null,
|
|
4843
|
+
false,
|
|
4844
|
+
{},
|
|
4845
|
+
{
|
|
4846
|
+
isIdempotent: true,
|
|
4847
|
+
},
|
|
4848
|
+
],
|
|
4849
|
+
[
|
|
4850
|
+
'retrieve',
|
|
4851
|
+
'GET',
|
|
4852
|
+
'/organization_details',
|
|
4853
|
+
null,
|
|
4854
|
+
true,
|
|
4855
|
+
null,
|
|
4856
|
+
false,
|
|
4857
|
+
{},
|
|
4858
|
+
{},
|
|
4859
|
+
],
|
|
4860
|
+
['list', 'GET', '/organization_details', null, false, null, false, {}, {}],
|
|
4861
|
+
],
|
|
4807
4862
|
currency: [
|
|
4808
4863
|
['list', 'GET', '/currencies', '/list', false, null, false, {}, {}],
|
|
4809
4864
|
['retrieve', 'GET', '/currencies', null, true, null, false, {}, {}],
|
|
@@ -5840,6 +5895,7 @@ export const Endpoints = {
|
|
|
5840
5895
|
{},
|
|
5841
5896
|
],
|
|
5842
5897
|
],
|
|
5898
|
+
billingMetadata: [],
|
|
5843
5899
|
grantBlock: [
|
|
5844
5900
|
[
|
|
5845
5901
|
'listGrantBlocks',
|
|
@@ -160,6 +160,8 @@ export var WebhookEventType;
|
|
|
160
160
|
WebhookEventType["OrderResent"] = "order_resent";
|
|
161
161
|
WebhookEventType["OrderReturned"] = "order_returned";
|
|
162
162
|
WebhookEventType["OrderUpdated"] = "order_updated";
|
|
163
|
+
WebhookEventType["OrganizationDetailsCreated"] = "organization_details_created";
|
|
164
|
+
WebhookEventType["OrganizationDetailsUpdated"] = "organization_details_updated";
|
|
163
165
|
WebhookEventType["PaymentDueReminder"] = "payment_due_reminder";
|
|
164
166
|
WebhookEventType["PaymentFailed"] = "payment_failed";
|
|
165
167
|
WebhookEventType["PaymentInitiated"] = "payment_initiated";
|