chargebee 3.34.0 → 3.35.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 +172 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +174 -2
- package/cjs/resources/webhook/eventType.js +23 -1
- package/cjs/schema/business_entity.schema.js +28 -2
- package/cjs/schema/collections_payment_promise.schema.js +43 -0
- package/cjs/schema/comment.schema.js +2 -0
- package/cjs/schema/coupon.schema.js +1 -1
- package/cjs/schema/credit_note.schema.js +1 -0
- package/cjs/schema/credit_unit.schema.js +2 -2
- package/cjs/schema/einvoice.schema.js +2 -2
- package/cjs/schema/entitlement.schema.js +4 -4
- package/cjs/schema/estimate.schema.js +4 -4
- package/cjs/schema/event.schema.js +104 -4
- package/cjs/schema/export.schema.js +7 -7
- package/cjs/schema/hosted_page.schema.js +2 -2
- package/cjs/schema/index.js +3 -0
- package/cjs/schema/invoice.schema.js +24 -4
- package/cjs/schema/item.schema.js +1 -1
- package/cjs/schema/item_family.schema.js +1 -1
- package/cjs/schema/item_price.schema.js +1 -1
- package/cjs/schema/ledger_account_balance.schema.js +11 -2
- package/cjs/schema/ledger_operation.schema.js +2 -2
- package/cjs/schema/omnichannel_one_time_order.schema.js +12 -4
- package/cjs/schema/omnichannel_subscription.schema.js +18 -10
- package/cjs/schema/payment_source.schema.js +15 -0
- package/cjs/schema/price_ramp.schema.js +88 -0
- package/cjs/schema/price_variant.schema.js +1 -1
- package/cjs/schema/purchase.schema.js +6 -0
- package/cjs/schema/quote.schema.js +6 -6
- package/cjs/schema/ramp.schema.js +10 -6
- package/cjs/schema/retry_segment.schema.js +12 -0
- package/cjs/schema/subscription.schema.js +4 -4
- package/cjs/schema/usage.schema.js +5 -0
- package/cjs/schema/usage_summary.schema.js +1 -0
- package/cjs/schema/webhook_endpoint.schema.js +46 -2
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +174 -2
- package/esm/resources/webhook/eventType.js +23 -1
- package/esm/schema/business_entity.schema.js +27 -1
- package/esm/schema/collections_payment_promise.schema.js +40 -0
- package/esm/schema/comment.schema.js +2 -0
- package/esm/schema/coupon.schema.js +1 -1
- package/esm/schema/credit_note.schema.js +1 -0
- package/esm/schema/credit_unit.schema.js +2 -2
- package/esm/schema/einvoice.schema.js +2 -2
- package/esm/schema/entitlement.schema.js +4 -4
- package/esm/schema/estimate.schema.js +4 -4
- package/esm/schema/event.schema.js +104 -4
- package/esm/schema/export.schema.js +7 -7
- package/esm/schema/hosted_page.schema.js +2 -2
- package/esm/schema/index.js +3 -0
- package/esm/schema/invoice.schema.js +23 -3
- package/esm/schema/item.schema.js +1 -1
- package/esm/schema/item_family.schema.js +1 -1
- package/esm/schema/item_price.schema.js +1 -1
- package/esm/schema/ledger_account_balance.schema.js +10 -1
- package/esm/schema/ledger_operation.schema.js +2 -2
- package/esm/schema/omnichannel_one_time_order.schema.js +12 -4
- package/esm/schema/omnichannel_subscription.schema.js +18 -10
- package/esm/schema/payment_source.schema.js +15 -0
- package/esm/schema/price_ramp.schema.js +85 -0
- package/esm/schema/price_variant.schema.js +1 -1
- package/esm/schema/purchase.schema.js +6 -0
- package/esm/schema/quote.schema.js +6 -6
- package/esm/schema/ramp.schema.js +10 -6
- package/esm/schema/retry_segment.schema.js +9 -0
- package/esm/schema/subscription.schema.js +4 -4
- package/esm/schema/usage.schema.js +5 -0
- package/esm/schema/usage_summary.schema.js +1 -0
- package/esm/schema/webhook_endpoint.schema.js +46 -2
- package/package.json +1 -1
- package/types/core.d.ts +53 -68
- package/types/index.d.ts +22 -1
- 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 +18 -1
- package/types/resources/CreditNote.d.ts +1 -0
- package/types/resources/CustomData.d.ts +14 -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/Event.d.ts +23 -1
- package/types/resources/Execution.d.ts +12 -0
- package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
- package/types/resources/GroupByAttribute.d.ts +15 -0
- package/types/resources/GroupByRecommendation.d.ts +10 -0
- package/types/resources/Invoice.d.ts +15 -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/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/Transaction.d.ts +4 -0
- package/types/resources/Usage.d.ts +6 -0
- package/types/resources/UsageSummary.d.ts +2 -0
- package/types/resources/WebhookEvent.d.ts +149 -5
- package/types/resources/AppliedBusinessRule.d.ts +0 -15
|
@@ -121,6 +121,20 @@ const CreateUsingPermanentTokenPaymentSourceCardSchema = zod_1.z.object({
|
|
|
121
121
|
.optional(),
|
|
122
122
|
funding_type: zod_1.z.enum(['credit', 'debit', 'prepaid', 'not_known']).optional(),
|
|
123
123
|
});
|
|
124
|
+
const CreateUsingPermanentTokenPaymentSourceBankAccountSchema = zod_1.z.object({
|
|
125
|
+
account_type: zod_1.z
|
|
126
|
+
.enum(['checking', 'savings', 'business_checking', 'current'])
|
|
127
|
+
.optional(),
|
|
128
|
+
account_holder_type: zod_1.z.enum(['individual', 'company']).optional(),
|
|
129
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
130
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
131
|
+
company: zod_1.z.string().max(250).optional(),
|
|
132
|
+
scheme: zod_1.z
|
|
133
|
+
.enum(['ach', 'bacs', 'sepa_core', 'autogiro', 'becs', 'becs_nz', 'pad'])
|
|
134
|
+
.optional(),
|
|
135
|
+
last4: zod_1.z.string().max(4).min(4).optional(),
|
|
136
|
+
echeck_type: zod_1.z.enum(['web', 'ppd', 'ccd']).optional(),
|
|
137
|
+
});
|
|
124
138
|
const CreateUsingPermanentTokenPaymentSourceBillingAddressSchema = zod_1.z.object({
|
|
125
139
|
first_name: zod_1.z.string().max(150).optional(),
|
|
126
140
|
last_name: zod_1.z.string().max(150).optional(),
|
|
@@ -217,6 +231,7 @@ const CreateUsingPermanentTokenPaymentSourceBodySchema = zod_1.z.looseObject({
|
|
|
217
231
|
skip_retrieval: zod_1.z.boolean().default(false).optional(),
|
|
218
232
|
additional_information: CreateUsingPermanentTokenPaymentSourceAdditionalInformationSchema.optional(),
|
|
219
233
|
card: CreateUsingPermanentTokenPaymentSourceCardSchema.optional(),
|
|
234
|
+
bank_account: CreateUsingPermanentTokenPaymentSourceBankAccountSchema.optional(),
|
|
220
235
|
billing_address: CreateUsingPermanentTokenPaymentSourceBillingAddressSchema.optional(),
|
|
221
236
|
});
|
|
222
237
|
exports.CreateUsingPermanentTokenPaymentSourceBodySchema = CreateUsingPermanentTokenPaymentSourceBodySchema;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: PriceRamp
|
|
3
|
+
// Actions: create, update, list
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ListPriceRampBodySchema = exports.UpdatePriceRampBodySchema = exports.CreatePriceRampBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//PriceRamp.create
|
|
9
|
+
const CreatePriceRampRampIntervalsSchema = zod_1.z.object({
|
|
10
|
+
starting_billing_cycle: zod_1.z.array(zod_1.z.number().int().min(1).optional()),
|
|
11
|
+
ending_billing_cycle: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
12
|
+
apply_catalog_price: zod_1.z
|
|
13
|
+
.array(zod_1.z.boolean().default(false).optional())
|
|
14
|
+
.optional(),
|
|
15
|
+
price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
16
|
+
price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
17
|
+
});
|
|
18
|
+
const CreatePriceRampBodySchema = zod_1.z.looseObject({
|
|
19
|
+
item_price_id: zod_1.z.string().max(100),
|
|
20
|
+
business_entity_id: zod_1.z.string().max(50).optional(),
|
|
21
|
+
ramp_intervals: CreatePriceRampRampIntervalsSchema.optional(),
|
|
22
|
+
});
|
|
23
|
+
exports.CreatePriceRampBodySchema = CreatePriceRampBodySchema;
|
|
24
|
+
//PriceRamp.update
|
|
25
|
+
const UpdatePriceRampRampIntervalsSchema = zod_1.z.object({
|
|
26
|
+
starting_billing_cycle: zod_1.z.array(zod_1.z.number().int().min(1).optional()),
|
|
27
|
+
ending_billing_cycle: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
28
|
+
apply_catalog_price: zod_1.z
|
|
29
|
+
.array(zod_1.z.boolean().default(false).optional())
|
|
30
|
+
.optional(),
|
|
31
|
+
price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
32
|
+
price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
33
|
+
});
|
|
34
|
+
const UpdatePriceRampBodySchema = zod_1.z.looseObject({
|
|
35
|
+
status: zod_1.z.enum(['active', 'archived']).optional(),
|
|
36
|
+
ramp_intervals: UpdatePriceRampRampIntervalsSchema.optional(),
|
|
37
|
+
});
|
|
38
|
+
exports.UpdatePriceRampBodySchema = UpdatePriceRampBodySchema;
|
|
39
|
+
//PriceRamp.list
|
|
40
|
+
const ListPriceRampIdSchema = zod_1.z.object({
|
|
41
|
+
is: zod_1.z.string().min(1).optional(),
|
|
42
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
43
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
44
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
45
|
+
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
46
|
+
});
|
|
47
|
+
const ListPriceRampItemPriceIdSchema = zod_1.z.object({
|
|
48
|
+
is: zod_1.z.string().min(1).optional(),
|
|
49
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
50
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
51
|
+
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
52
|
+
not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
53
|
+
});
|
|
54
|
+
const ListPriceRampStatusSchema = zod_1.z.object({
|
|
55
|
+
is: zod_1.z.enum(['active', 'archived']).optional(),
|
|
56
|
+
is_not: zod_1.z.enum(['active', 'archived']).optional(),
|
|
57
|
+
in: zod_1.z.enum(['active', 'archived']).optional(),
|
|
58
|
+
not_in: zod_1.z.enum(['active', 'archived']).optional(),
|
|
59
|
+
});
|
|
60
|
+
const ListPriceRampUpdatedAtSchema = zod_1.z.object({
|
|
61
|
+
after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
62
|
+
before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
63
|
+
on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
64
|
+
between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
65
|
+
});
|
|
66
|
+
const ListPriceRampBusinessEntityIdSchema = zod_1.z.object({
|
|
67
|
+
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
68
|
+
is: zod_1.z.string().min(1).optional(),
|
|
69
|
+
});
|
|
70
|
+
const ListPriceRampIncludeSiteLevelResourcesSchema = zod_1.z.object({
|
|
71
|
+
is: zod_1.z.enum(['true', 'false']).optional(),
|
|
72
|
+
});
|
|
73
|
+
const ListPriceRampSortBySchema = zod_1.z.looseObject({
|
|
74
|
+
asc: zod_1.z.enum(['id', 'status', 'updated_at']).optional(),
|
|
75
|
+
desc: zod_1.z.enum(['id', 'status', 'updated_at']).optional(),
|
|
76
|
+
});
|
|
77
|
+
const ListPriceRampBodySchema = zod_1.z.looseObject({
|
|
78
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
79
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
80
|
+
id: ListPriceRampIdSchema.optional(),
|
|
81
|
+
item_price_id: ListPriceRampItemPriceIdSchema.optional(),
|
|
82
|
+
status: ListPriceRampStatusSchema.optional(),
|
|
83
|
+
updated_at: ListPriceRampUpdatedAtSchema.optional(),
|
|
84
|
+
business_entity_id: ListPriceRampBusinessEntityIdSchema.optional(),
|
|
85
|
+
include_site_level_resources: ListPriceRampIncludeSiteLevelResourcesSchema.optional(),
|
|
86
|
+
sort_by: ListPriceRampSortBySchema.optional(),
|
|
87
|
+
});
|
|
88
|
+
exports.ListPriceRampBodySchema = ListPriceRampBodySchema;
|
|
@@ -68,8 +68,8 @@ const ListPriceVariantCreatedAtSchema = zod_1.z.object({
|
|
|
68
68
|
between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
69
69
|
});
|
|
70
70
|
const ListPriceVariantBusinessEntityIdSchema = zod_1.z.object({
|
|
71
|
-
is: zod_1.z.string().min(1).optional(),
|
|
72
71
|
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
72
|
+
is: zod_1.z.string().min(1).optional(),
|
|
73
73
|
});
|
|
74
74
|
const ListPriceVariantIncludeSiteLevelResourcesSchema = zod_1.z.object({
|
|
75
75
|
is: zod_1.z.enum(['true', 'false']).optional(),
|
|
@@ -102,6 +102,7 @@ const CreatePurchasePurchaseItemsSchema = zod_1.z.object({
|
|
|
102
102
|
unit_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
103
103
|
unit_amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
104
104
|
quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
105
|
+
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
105
106
|
});
|
|
106
107
|
const CreatePurchaseItemTiersSchema = zod_1.z.object({
|
|
107
108
|
index: zod_1.z.array(zod_1.z.number().int().min(0).optional()),
|
|
@@ -149,6 +150,8 @@ const CreatePurchaseSubscriptionInfoSchema = zod_1.z.object({
|
|
|
149
150
|
contract_term_billing_cycle_on_renewal: zod_1.z
|
|
150
151
|
.array(zod_1.z.number().int().min(1).max(100).optional())
|
|
151
152
|
.optional(),
|
|
153
|
+
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
154
|
+
start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
152
155
|
meta_data: zod_1.z.array(CreatePurchaseMetaDataItemSchema.optional()).optional(),
|
|
153
156
|
});
|
|
154
157
|
const CreatePurchaseContractTermsSchema = zod_1.z.object({
|
|
@@ -228,6 +231,7 @@ const EstimatePurchasePurchaseItemsSchema = zod_1.z.object({
|
|
|
228
231
|
unit_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
229
232
|
unit_amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
230
233
|
quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
234
|
+
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
231
235
|
});
|
|
232
236
|
const EstimatePurchaseItemTiersSchema = zod_1.z.object({
|
|
233
237
|
index: zod_1.z.array(zod_1.z.number().int().min(0).optional()),
|
|
@@ -274,6 +278,8 @@ const EstimatePurchaseSubscriptionInfoSchema = zod_1.z.object({
|
|
|
274
278
|
contract_term_billing_cycle_on_renewal: zod_1.z
|
|
275
279
|
.array(zod_1.z.number().int().min(1).max(100).optional())
|
|
276
280
|
.optional(),
|
|
281
|
+
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
282
|
+
start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
277
283
|
});
|
|
278
284
|
const EstimatePurchaseContractTermsSchema = zod_1.z.object({
|
|
279
285
|
index: zod_1.z.array(zod_1.z.number().int().min(0).optional()),
|
|
@@ -700,7 +700,7 @@ const CreateSubItemsForCustomerQuoteQuoteSubscriptionItemsSchema = zod_1.z.objec
|
|
|
700
700
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
701
701
|
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
702
702
|
service_period_days: zod_1.z
|
|
703
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
703
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
704
704
|
.optional(),
|
|
705
705
|
charge_on_event: zod_1.z
|
|
706
706
|
.array(zod_1.z
|
|
@@ -876,7 +876,7 @@ const EditCreateSubCustomerQuoteForItemsQuoteSubscriptionItemsSchema = zod_1.z.o
|
|
|
876
876
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
877
877
|
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
878
878
|
service_period_days: zod_1.z
|
|
879
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
879
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
880
880
|
.optional(),
|
|
881
881
|
charge_on_event: zod_1.z
|
|
882
882
|
.array(zod_1.z
|
|
@@ -1059,7 +1059,7 @@ const UpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = zod_1.z.obje
|
|
|
1059
1059
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
1060
1060
|
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
1061
1061
|
service_period_days: zod_1.z
|
|
1062
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
1062
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
1063
1063
|
.optional(),
|
|
1064
1064
|
charge_on_event: zod_1.z
|
|
1065
1065
|
.array(zod_1.z
|
|
@@ -1249,7 +1249,7 @@ const EditUpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = zod_1.z.
|
|
|
1249
1249
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
1250
1250
|
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
1251
1251
|
service_period_days: zod_1.z
|
|
1252
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
1252
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
1253
1253
|
.optional(),
|
|
1254
1254
|
charge_on_event: zod_1.z
|
|
1255
1255
|
.array(zod_1.z
|
|
@@ -1397,7 +1397,7 @@ const CreateForChargeItemsAndChargesQuoteItemPricesSchema = zod_1.z.object({
|
|
|
1397
1397
|
unit_price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
1398
1398
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
1399
1399
|
service_period_days: zod_1.z
|
|
1400
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
1400
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
1401
1401
|
.optional(),
|
|
1402
1402
|
});
|
|
1403
1403
|
const CreateForChargeItemsAndChargesQuoteItemTiersSchema = zod_1.z.object({
|
|
@@ -1499,7 +1499,7 @@ const EditForChargeItemsAndChargesQuoteItemPricesSchema = zod_1.z.object({
|
|
|
1499
1499
|
unit_price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
1500
1500
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
1501
1501
|
service_period_days: zod_1.z
|
|
1502
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
1502
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
1503
1503
|
.optional(),
|
|
1504
1504
|
});
|
|
1505
1505
|
const EditForChargeItemsAndChargesQuoteItemTiersSchema = zod_1.z.object({
|
|
@@ -24,7 +24,7 @@ const CreateForSubscriptionRampItemsToAddSchema = zod_1.z.object({
|
|
|
24
24
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
25
25
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
26
26
|
service_period_days: zod_1.z
|
|
27
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
27
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
28
28
|
.optional(),
|
|
29
29
|
charge_on_event: zod_1.z
|
|
30
30
|
.array(zod_1.z
|
|
@@ -40,6 +40,7 @@ const CreateForSubscriptionRampItemsToAddSchema = zod_1.z.object({
|
|
|
40
40
|
charge_on_option: zod_1.z
|
|
41
41
|
.array(zod_1.z.enum(['immediately', 'on_event']).optional())
|
|
42
42
|
.optional(),
|
|
43
|
+
description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
|
|
43
44
|
});
|
|
44
45
|
const CreateForSubscriptionRampItemsToUpdateSchema = zod_1.z.object({
|
|
45
46
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
|
|
@@ -49,7 +50,7 @@ const CreateForSubscriptionRampItemsToUpdateSchema = zod_1.z.object({
|
|
|
49
50
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
50
51
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
51
52
|
service_period_days: zod_1.z
|
|
52
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
53
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
53
54
|
.optional(),
|
|
54
55
|
charge_on_event: zod_1.z
|
|
55
56
|
.array(zod_1.z
|
|
@@ -65,6 +66,7 @@ const CreateForSubscriptionRampItemsToUpdateSchema = zod_1.z.object({
|
|
|
65
66
|
charge_on_option: zod_1.z
|
|
66
67
|
.array(zod_1.z.enum(['immediately', 'on_event']).optional())
|
|
67
68
|
.optional(),
|
|
69
|
+
description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
|
|
68
70
|
});
|
|
69
71
|
const CreateForSubscriptionRampItemTiersSchema = zod_1.z.object({
|
|
70
72
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
@@ -130,7 +132,7 @@ const UpdateRampItemsToAddSchema = zod_1.z.object({
|
|
|
130
132
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
131
133
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
132
134
|
service_period_days: zod_1.z
|
|
133
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
135
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
134
136
|
.optional(),
|
|
135
137
|
charge_on_event: zod_1.z
|
|
136
138
|
.array(zod_1.z
|
|
@@ -146,6 +148,7 @@ const UpdateRampItemsToAddSchema = zod_1.z.object({
|
|
|
146
148
|
charge_on_option: zod_1.z
|
|
147
149
|
.array(zod_1.z.enum(['immediately', 'on_event']).optional())
|
|
148
150
|
.optional(),
|
|
151
|
+
description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
|
|
149
152
|
});
|
|
150
153
|
const UpdateRampItemsToUpdateSchema = zod_1.z.object({
|
|
151
154
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
|
|
@@ -155,7 +158,7 @@ const UpdateRampItemsToUpdateSchema = zod_1.z.object({
|
|
|
155
158
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
156
159
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
157
160
|
service_period_days: zod_1.z
|
|
158
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
161
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
159
162
|
.optional(),
|
|
160
163
|
charge_on_event: zod_1.z
|
|
161
164
|
.array(zod_1.z
|
|
@@ -171,6 +174,7 @@ const UpdateRampItemsToUpdateSchema = zod_1.z.object({
|
|
|
171
174
|
charge_on_option: zod_1.z
|
|
172
175
|
.array(zod_1.z.enum(['immediately', 'on_event']).optional())
|
|
173
176
|
.optional(),
|
|
177
|
+
description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
|
|
174
178
|
});
|
|
175
179
|
const UpdateRampItemTiersSchema = zod_1.z.object({
|
|
176
180
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
@@ -219,12 +223,12 @@ const UpdateRampBodySchema = zod_1.z.looseObject({
|
|
|
219
223
|
exports.UpdateRampBodySchema = UpdateRampBodySchema;
|
|
220
224
|
//Ramp.list
|
|
221
225
|
const ListRampStatusSchema = zod_1.z.object({
|
|
222
|
-
is: zod_1.z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
|
|
223
226
|
in: zod_1.z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
|
|
227
|
+
is: zod_1.z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
|
|
224
228
|
});
|
|
225
229
|
const ListRampSubscriptionIdSchema = zod_1.z.object({
|
|
226
|
-
is: zod_1.z.string().min(1).optional(),
|
|
227
230
|
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
231
|
+
is: zod_1.z.string().min(1).optional(),
|
|
228
232
|
});
|
|
229
233
|
const ListRampEffectiveFromSchema = zod_1.z.object({
|
|
230
234
|
after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: RetrySegment
|
|
3
|
+
// Actions: retrieve
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RetrieveRetrySegmentBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//RetrySegment.retrieve
|
|
9
|
+
const RetrieveRetrySegmentBodySchema = zod_1.z.looseObject({
|
|
10
|
+
invoice_id: zod_1.z.string().max(50).optional(),
|
|
11
|
+
});
|
|
12
|
+
exports.RetrieveRetrySegmentBodySchema = RetrieveRetrySegmentBodySchema;
|
|
@@ -887,7 +887,7 @@ const CreateWithItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
|
887
887
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
888
888
|
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
889
889
|
service_period_days: zod_1.z
|
|
890
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
890
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
891
891
|
.optional(),
|
|
892
892
|
charge_on_event: zod_1.z
|
|
893
893
|
.array(zod_1.z
|
|
@@ -2218,7 +2218,7 @@ const UpdateForItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
|
2218
2218
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
2219
2219
|
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
2220
2220
|
service_period_days: zod_1.z
|
|
2221
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
2221
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
2222
2222
|
.optional(),
|
|
2223
2223
|
charge_on_event: zod_1.z
|
|
2224
2224
|
.array(zod_1.z
|
|
@@ -3289,7 +3289,7 @@ const ImportForItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
|
3289
3289
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
3290
3290
|
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
3291
3291
|
service_period_days: zod_1.z
|
|
3292
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
3292
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
3293
3293
|
.optional(),
|
|
3294
3294
|
charge_on_event: zod_1.z
|
|
3295
3295
|
.array(zod_1.z
|
|
@@ -3462,7 +3462,7 @@ const CancelForItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
|
3462
3462
|
unit_price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
3463
3463
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
3464
3464
|
service_period_days: zod_1.z
|
|
3465
|
-
.array(zod_1.z.number().int().min(1).max(
|
|
3465
|
+
.array(zod_1.z.number().int().min(1).max(4000).optional())
|
|
3466
3466
|
.optional(),
|
|
3467
3467
|
});
|
|
3468
3468
|
const CancelForItemsSubscriptionBodySchema = zod_1.z.looseObject({
|
|
@@ -86,8 +86,13 @@ exports.ListUsageBodySchema = ListUsageBodySchema;
|
|
|
86
86
|
const PdfUsageInvoiceSchema = zod_1.z.object({
|
|
87
87
|
id: zod_1.z.string().max(50),
|
|
88
88
|
});
|
|
89
|
+
const PdfUsageGroupBySchema = zod_1.z.object({
|
|
90
|
+
feature_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
91
|
+
attributes: zod_1.z.array(zod_1.z.array(zod_1.z.string().optional()).optional()).optional(),
|
|
92
|
+
});
|
|
89
93
|
const PdfUsageBodySchema = zod_1.z.looseObject({
|
|
90
94
|
disposition_type: zod_1.z.enum(['attachment', 'inline']).optional(),
|
|
91
95
|
invoice: PdfUsageInvoiceSchema.optional(),
|
|
96
|
+
group_by: PdfUsageGroupBySchema.optional(),
|
|
92
97
|
});
|
|
93
98
|
exports.PdfUsageBodySchema = PdfUsageBodySchema;
|
|
@@ -13,5 +13,6 @@ const RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema = zod_1.z.looseO
|
|
|
13
13
|
window_size: zod_1.z.enum(['month', 'week', 'day', 'hour', 'minute']).optional(),
|
|
14
14
|
timeframe_start: zod_1.z.number().int().optional(),
|
|
15
15
|
timeframe_end: zod_1.z.number().int().optional(),
|
|
16
|
+
group_by: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
16
17
|
});
|
|
17
18
|
exports.RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema = RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema;
|
|
@@ -85,6 +85,7 @@ const CreateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
85
85
|
'payment_schedules_updated',
|
|
86
86
|
'payment_schedule_scheme_created',
|
|
87
87
|
'payment_schedule_scheme_deleted',
|
|
88
|
+
'payment_schedules_cancelled',
|
|
88
89
|
'subscription_renewal_reminder',
|
|
89
90
|
'add_usages_reminder',
|
|
90
91
|
'payment_due_reminder',
|
|
@@ -95,6 +96,7 @@ const CreateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
95
96
|
'payment_failed',
|
|
96
97
|
'dunning_updated',
|
|
97
98
|
'payment_refunded',
|
|
99
|
+
'refund_failed',
|
|
98
100
|
'payment_initiated',
|
|
99
101
|
'refund_initiated',
|
|
100
102
|
'netd_payment_due_reminder',
|
|
@@ -246,6 +248,9 @@ const CreateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
246
248
|
'alert_status_changed',
|
|
247
249
|
'omnichannel_subscription_item_updated',
|
|
248
250
|
'omnichannel_subscription_item_recovered',
|
|
251
|
+
'price_ramp_created',
|
|
252
|
+
'price_ramp_updated',
|
|
253
|
+
'price_ramp_deleted',
|
|
249
254
|
'omnichannel_subscription_item_mrr_updated',
|
|
250
255
|
'ledger_account_balance_updated',
|
|
251
256
|
'grant_blocks_created',
|
|
@@ -260,12 +265,29 @@ const CreateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
260
265
|
'vault_token_created',
|
|
261
266
|
'vault_token_updated',
|
|
262
267
|
'vault_token_deleted',
|
|
263
|
-
'
|
|
268
|
+
'chargeback_initiated',
|
|
269
|
+
'chargeback_won',
|
|
270
|
+
'chargeback_lost',
|
|
264
271
|
'business_ruleset_created',
|
|
265
272
|
'business_ruleset_updated',
|
|
266
273
|
'business_ruleset_activated',
|
|
267
274
|
'business_ruleset_deactivated',
|
|
268
275
|
'business_ruleset_deleted',
|
|
276
|
+
'collections_reminder_sequence_created',
|
|
277
|
+
'collections_reminder_sequence_paused',
|
|
278
|
+
'collections_reminder_sequence_resumed',
|
|
279
|
+
'collections_reminder_sequence_completed',
|
|
280
|
+
'collections_payment_promise_created',
|
|
281
|
+
'collections_payment_promise_updated',
|
|
282
|
+
'collections_payment_promise_fulfilled',
|
|
283
|
+
'collections_payment_promise_cancelled',
|
|
284
|
+
'collections_payment_promise_broken',
|
|
285
|
+
'collections_dispute_created',
|
|
286
|
+
'collections_dispute_updated',
|
|
287
|
+
'collections_dispute_resolved',
|
|
288
|
+
'collections_dispute_withdrawn',
|
|
289
|
+
'email_message_received',
|
|
290
|
+
'private_note_added',
|
|
269
291
|
'plan_created',
|
|
270
292
|
'plan_updated',
|
|
271
293
|
'plan_deleted',
|
|
@@ -354,6 +376,7 @@ const UpdateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
354
376
|
'payment_schedules_updated',
|
|
355
377
|
'payment_schedule_scheme_created',
|
|
356
378
|
'payment_schedule_scheme_deleted',
|
|
379
|
+
'payment_schedules_cancelled',
|
|
357
380
|
'subscription_renewal_reminder',
|
|
358
381
|
'add_usages_reminder',
|
|
359
382
|
'payment_due_reminder',
|
|
@@ -364,6 +387,7 @@ const UpdateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
364
387
|
'payment_failed',
|
|
365
388
|
'dunning_updated',
|
|
366
389
|
'payment_refunded',
|
|
390
|
+
'refund_failed',
|
|
367
391
|
'payment_initiated',
|
|
368
392
|
'refund_initiated',
|
|
369
393
|
'netd_payment_due_reminder',
|
|
@@ -515,6 +539,9 @@ const UpdateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
515
539
|
'alert_status_changed',
|
|
516
540
|
'omnichannel_subscription_item_updated',
|
|
517
541
|
'omnichannel_subscription_item_recovered',
|
|
542
|
+
'price_ramp_created',
|
|
543
|
+
'price_ramp_updated',
|
|
544
|
+
'price_ramp_deleted',
|
|
518
545
|
'omnichannel_subscription_item_mrr_updated',
|
|
519
546
|
'ledger_account_balance_updated',
|
|
520
547
|
'grant_blocks_created',
|
|
@@ -529,12 +556,29 @@ const UpdateWebhookEndpointBodySchema = zod_1.z.looseObject({
|
|
|
529
556
|
'vault_token_created',
|
|
530
557
|
'vault_token_updated',
|
|
531
558
|
'vault_token_deleted',
|
|
532
|
-
'
|
|
559
|
+
'chargeback_initiated',
|
|
560
|
+
'chargeback_won',
|
|
561
|
+
'chargeback_lost',
|
|
533
562
|
'business_ruleset_created',
|
|
534
563
|
'business_ruleset_updated',
|
|
535
564
|
'business_ruleset_activated',
|
|
536
565
|
'business_ruleset_deactivated',
|
|
537
566
|
'business_ruleset_deleted',
|
|
567
|
+
'collections_reminder_sequence_created',
|
|
568
|
+
'collections_reminder_sequence_paused',
|
|
569
|
+
'collections_reminder_sequence_resumed',
|
|
570
|
+
'collections_reminder_sequence_completed',
|
|
571
|
+
'collections_payment_promise_created',
|
|
572
|
+
'collections_payment_promise_updated',
|
|
573
|
+
'collections_payment_promise_fulfilled',
|
|
574
|
+
'collections_payment_promise_cancelled',
|
|
575
|
+
'collections_payment_promise_broken',
|
|
576
|
+
'collections_dispute_created',
|
|
577
|
+
'collections_dispute_updated',
|
|
578
|
+
'collections_dispute_resolved',
|
|
579
|
+
'collections_dispute_withdrawn',
|
|
580
|
+
'email_message_received',
|
|
581
|
+
'private_note_added',
|
|
538
582
|
'plan_created',
|
|
539
583
|
'plan_updated',
|
|
540
584
|
'plan_deleted',
|
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.35.0',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|