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
|
@@ -10,8 +10,18 @@ const ListDisputeIdSchema = zod_1.z.object({
|
|
|
10
10
|
is: zod_1.z.string().min(1).optional(),
|
|
11
11
|
is_not: zod_1.z.string().min(1).optional(),
|
|
12
12
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
13
|
-
in: zod_1.z
|
|
14
|
-
|
|
13
|
+
in: zod_1.z
|
|
14
|
+
.union([
|
|
15
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
16
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
17
|
+
])
|
|
18
|
+
.optional(),
|
|
19
|
+
not_in: zod_1.z
|
|
20
|
+
.union([
|
|
21
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
22
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
23
|
+
])
|
|
24
|
+
.optional(),
|
|
15
25
|
});
|
|
16
26
|
const ListDisputeStatusSchema = zod_1.z.object({
|
|
17
27
|
is: zod_1.z
|
|
@@ -35,60 +45,142 @@ const ListDisputeStatusSchema = zod_1.z.object({
|
|
|
35
45
|
])
|
|
36
46
|
.optional(),
|
|
37
47
|
in: zod_1.z
|
|
38
|
-
.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
.union([
|
|
49
|
+
zod_1.z.array(zod_1.z
|
|
50
|
+
.enum([
|
|
51
|
+
'initiated',
|
|
52
|
+
'funds_withdrawn',
|
|
53
|
+
'in_review',
|
|
54
|
+
'cancelled',
|
|
55
|
+
'lost',
|
|
56
|
+
'won',
|
|
57
|
+
])
|
|
58
|
+
.optional()),
|
|
59
|
+
zod_1.z.enum([
|
|
60
|
+
'initiated',
|
|
61
|
+
'funds_withdrawn',
|
|
62
|
+
'in_review',
|
|
63
|
+
'cancelled',
|
|
64
|
+
'lost',
|
|
65
|
+
'won',
|
|
66
|
+
]),
|
|
45
67
|
])
|
|
46
68
|
.optional(),
|
|
47
69
|
not_in: zod_1.z
|
|
48
|
-
.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
.union([
|
|
71
|
+
zod_1.z.array(zod_1.z
|
|
72
|
+
.enum([
|
|
73
|
+
'initiated',
|
|
74
|
+
'funds_withdrawn',
|
|
75
|
+
'in_review',
|
|
76
|
+
'cancelled',
|
|
77
|
+
'lost',
|
|
78
|
+
'won',
|
|
79
|
+
])
|
|
80
|
+
.optional()),
|
|
81
|
+
zod_1.z.enum([
|
|
82
|
+
'initiated',
|
|
83
|
+
'funds_withdrawn',
|
|
84
|
+
'in_review',
|
|
85
|
+
'cancelled',
|
|
86
|
+
'lost',
|
|
87
|
+
'won',
|
|
88
|
+
]),
|
|
55
89
|
])
|
|
56
90
|
.optional(),
|
|
57
91
|
});
|
|
58
92
|
const ListDisputeTypeSchema = zod_1.z.object({
|
|
59
93
|
is: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
|
|
60
94
|
is_not: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
|
|
61
|
-
in: zod_1.z
|
|
62
|
-
|
|
95
|
+
in: zod_1.z
|
|
96
|
+
.union([
|
|
97
|
+
zod_1.z.array(zod_1.z.enum(['chargeback', 'inquiry']).optional()),
|
|
98
|
+
zod_1.z.enum(['chargeback', 'inquiry']),
|
|
99
|
+
])
|
|
100
|
+
.optional(),
|
|
101
|
+
not_in: zod_1.z
|
|
102
|
+
.union([
|
|
103
|
+
zod_1.z.array(zod_1.z.enum(['chargeback', 'inquiry']).optional()),
|
|
104
|
+
zod_1.z.enum(['chargeback', 'inquiry']),
|
|
105
|
+
])
|
|
106
|
+
.optional(),
|
|
63
107
|
});
|
|
64
108
|
const ListDisputeCustomerIdSchema = zod_1.z.object({
|
|
65
109
|
is: zod_1.z.string().min(1).optional(),
|
|
66
110
|
is_not: zod_1.z.string().min(1).optional(),
|
|
67
111
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
68
|
-
in: zod_1.z
|
|
69
|
-
|
|
112
|
+
in: zod_1.z
|
|
113
|
+
.union([
|
|
114
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
115
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
116
|
+
])
|
|
117
|
+
.optional(),
|
|
118
|
+
not_in: zod_1.z
|
|
119
|
+
.union([
|
|
120
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
121
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
122
|
+
])
|
|
123
|
+
.optional(),
|
|
70
124
|
});
|
|
71
125
|
const ListDisputeTransactionIdSchema = zod_1.z.object({
|
|
72
126
|
is: zod_1.z.string().min(1).optional(),
|
|
73
127
|
is_not: zod_1.z.string().min(1).optional(),
|
|
74
128
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
75
|
-
in: zod_1.z
|
|
76
|
-
|
|
129
|
+
in: zod_1.z
|
|
130
|
+
.union([
|
|
131
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
132
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
133
|
+
])
|
|
134
|
+
.optional(),
|
|
135
|
+
not_in: zod_1.z
|
|
136
|
+
.union([
|
|
137
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
138
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
139
|
+
])
|
|
140
|
+
.optional(),
|
|
77
141
|
});
|
|
78
142
|
const ListDisputeAmountSchema = zod_1.z.object({
|
|
79
|
-
is: zod_1.z
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
143
|
+
is: zod_1.z
|
|
144
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
145
|
+
.optional(),
|
|
146
|
+
is_not: zod_1.z
|
|
147
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
148
|
+
.optional(),
|
|
149
|
+
lt: zod_1.z
|
|
150
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
151
|
+
.optional(),
|
|
152
|
+
lte: zod_1.z
|
|
153
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
154
|
+
.optional(),
|
|
155
|
+
gt: zod_1.z
|
|
156
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
157
|
+
.optional(),
|
|
158
|
+
gte: zod_1.z
|
|
159
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
160
|
+
.optional(),
|
|
161
|
+
between: zod_1.z
|
|
162
|
+
.union([
|
|
163
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
164
|
+
zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
|
|
165
|
+
])
|
|
166
|
+
.optional(),
|
|
86
167
|
});
|
|
87
168
|
const ListDisputeCreatedAtSchema = zod_1.z.object({
|
|
88
|
-
after: zod_1.z
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
169
|
+
after: zod_1.z
|
|
170
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
171
|
+
.optional(),
|
|
172
|
+
before: zod_1.z
|
|
173
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
174
|
+
.optional(),
|
|
175
|
+
on: zod_1.z
|
|
176
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
177
|
+
.optional(),
|
|
178
|
+
between: zod_1.z
|
|
179
|
+
.union([
|
|
180
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
181
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
182
|
+
])
|
|
183
|
+
.optional(),
|
|
92
184
|
});
|
|
93
185
|
const ListDisputeBodySchema = zod_1.z.looseObject({
|
|
94
186
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
@@ -7,18 +7,39 @@ exports.ListEinvoicesEinvoiceBodySchema = void 0;
|
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//Einvoice.listEinvoices
|
|
9
9
|
const ListEinvoicesEinvoiceIdSchema = zod_1.z.object({
|
|
10
|
+
in: zod_1.z
|
|
11
|
+
.union([
|
|
12
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
13
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
14
|
+
])
|
|
15
|
+
.optional(),
|
|
10
16
|
is: zod_1.z.string().min(1).optional(),
|
|
11
|
-
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
12
17
|
});
|
|
13
18
|
const ListEinvoicesEinvoiceReferenceIdSchema = zod_1.z.object({
|
|
19
|
+
in: zod_1.z
|
|
20
|
+
.union([
|
|
21
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
22
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
23
|
+
])
|
|
24
|
+
.optional(),
|
|
14
25
|
is: zod_1.z.string().min(1).optional(),
|
|
15
|
-
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
16
26
|
});
|
|
17
27
|
const ListEinvoicesEinvoiceUpdatedAtSchema = zod_1.z.object({
|
|
18
|
-
after: zod_1.z
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
after: zod_1.z
|
|
29
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
30
|
+
.optional(),
|
|
31
|
+
before: zod_1.z
|
|
32
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
33
|
+
.optional(),
|
|
34
|
+
on: zod_1.z
|
|
35
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
36
|
+
.optional(),
|
|
37
|
+
between: zod_1.z
|
|
38
|
+
.union([
|
|
39
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
40
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
41
|
+
])
|
|
42
|
+
.optional(),
|
|
22
43
|
});
|
|
23
44
|
const ListEinvoicesEinvoiceSortBySchema = zod_1.z.looseObject({
|
|
24
45
|
asc: zod_1.z.enum(['updated_at']).optional(),
|
|
@@ -7,10 +7,21 @@ exports.EmailLogsForCustomerEmailLogBodySchema = void 0;
|
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//EmailLog.emailLogsForCustomer
|
|
9
9
|
const EmailLogsForCustomerEmailLogSentOnSchema = zod_1.z.object({
|
|
10
|
-
after: zod_1.z
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
after: zod_1.z
|
|
11
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
12
|
+
.optional(),
|
|
13
|
+
before: zod_1.z
|
|
14
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
15
|
+
.optional(),
|
|
16
|
+
on: zod_1.z
|
|
17
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
18
|
+
.optional(),
|
|
19
|
+
between: zod_1.z
|
|
20
|
+
.union([
|
|
21
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
22
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
23
|
+
])
|
|
24
|
+
.optional(),
|
|
14
25
|
});
|
|
15
26
|
const EmailLogsForCustomerEmailLogBusinessEntityIdSchema = zod_1.z.object({
|
|
16
27
|
is: zod_1.z.string().min(1).optional(),
|
|
@@ -7,20 +7,35 @@ exports.CreateEntitlementBodySchema = exports.ListEntitlementBodySchema = void 0
|
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//Entitlement.list
|
|
9
9
|
const ListEntitlementFeatureIdSchema = zod_1.z.object({
|
|
10
|
+
in: zod_1.z
|
|
11
|
+
.union([
|
|
12
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
13
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
14
|
+
])
|
|
15
|
+
.optional(),
|
|
10
16
|
is: zod_1.z.string().min(1).optional(),
|
|
11
|
-
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
12
17
|
});
|
|
13
18
|
const ListEntitlementEntityTypeSchema = zod_1.z.object({
|
|
14
|
-
is: zod_1.z
|
|
15
|
-
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
16
|
-
.optional(),
|
|
17
19
|
in: zod_1.z
|
|
20
|
+
.union([
|
|
21
|
+
zod_1.z.array(zod_1.z
|
|
22
|
+
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
23
|
+
.optional()),
|
|
24
|
+
zod_1.z.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price']),
|
|
25
|
+
])
|
|
26
|
+
.optional(),
|
|
27
|
+
is: zod_1.z
|
|
18
28
|
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
19
29
|
.optional(),
|
|
20
30
|
});
|
|
21
31
|
const ListEntitlementEntityIdSchema = zod_1.z.object({
|
|
32
|
+
in: zod_1.z
|
|
33
|
+
.union([
|
|
34
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
35
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
36
|
+
])
|
|
37
|
+
.optional(),
|
|
22
38
|
is: zod_1.z.string().min(1).optional(),
|
|
23
|
-
in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
24
39
|
});
|
|
25
40
|
const ListEntitlementBodySchema = zod_1.z.looseObject({
|
|
26
41
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
@@ -33,6 +48,15 @@ const ListEntitlementBodySchema = zod_1.z.looseObject({
|
|
|
33
48
|
});
|
|
34
49
|
exports.ListEntitlementBodySchema = ListEntitlementBodySchema;
|
|
35
50
|
//Entitlement.create
|
|
51
|
+
const CreateEntitlementEntitlementsItemSchema = zod_1.z.object({
|
|
52
|
+
entity_id: zod_1.z.string().max(100),
|
|
53
|
+
feature_id: zod_1.z.string().max(50),
|
|
54
|
+
entity_type: zod_1.z
|
|
55
|
+
.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
|
|
56
|
+
.optional(),
|
|
57
|
+
value: zod_1.z.string().max(50).optional(),
|
|
58
|
+
apply_grandfathering: zod_1.z.boolean().default(false).optional(),
|
|
59
|
+
});
|
|
36
60
|
const CreateEntitlementEntitlementsSchema = zod_1.z.object({
|
|
37
61
|
entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
|
|
38
62
|
feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
@@ -49,6 +73,11 @@ const CreateEntitlementEntitlementsSchema = zod_1.z.object({
|
|
|
49
73
|
const CreateEntitlementBodySchema = zod_1.z.looseObject({
|
|
50
74
|
action: zod_1.z.enum(['upsert', 'remove']),
|
|
51
75
|
change_reason: zod_1.z.string().max(100).optional(),
|
|
52
|
-
entitlements:
|
|
76
|
+
entitlements: zod_1.z
|
|
77
|
+
.union([
|
|
78
|
+
zod_1.z.array(CreateEntitlementEntitlementsItemSchema.optional()),
|
|
79
|
+
CreateEntitlementEntitlementsSchema,
|
|
80
|
+
])
|
|
81
|
+
.optional(),
|
|
53
82
|
});
|
|
54
83
|
exports.CreateEntitlementBodySchema = CreateEntitlementBodySchema;
|
|
@@ -6,6 +6,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ListEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = exports.AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = void 0;
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//EntitlementOverride.addEntitlementOverrideForSubscription
|
|
9
|
+
const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesItemSchema = zod_1.z.object({
|
|
10
|
+
feature_id: zod_1.z.string().max(50),
|
|
11
|
+
entity_id: zod_1.z.string().max(100).optional(),
|
|
12
|
+
entity_type: zod_1.z
|
|
13
|
+
.enum(['plan_price', 'addon_price', 'charge', 'charge_price'])
|
|
14
|
+
.optional(),
|
|
15
|
+
value: zod_1.z.string().max(50).optional(),
|
|
16
|
+
expires_at: zod_1.z.number().int().optional(),
|
|
17
|
+
effective_from: zod_1.z.number().int().optional(),
|
|
18
|
+
is_enabled: zod_1.z.boolean().optional(),
|
|
19
|
+
});
|
|
9
20
|
const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema = zod_1.z.object({
|
|
10
21
|
feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
11
22
|
entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
@@ -21,7 +32,12 @@ const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverrid
|
|
|
21
32
|
});
|
|
22
33
|
const AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = zod_1.z.looseObject({
|
|
23
34
|
action: zod_1.z.enum(['upsert', 'remove']).optional(),
|
|
24
|
-
entitlement_overrides:
|
|
35
|
+
entitlement_overrides: zod_1.z
|
|
36
|
+
.union([
|
|
37
|
+
zod_1.z.array(AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesItemSchema.optional()),
|
|
38
|
+
AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema,
|
|
39
|
+
])
|
|
40
|
+
.optional(),
|
|
25
41
|
});
|
|
26
42
|
exports.AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema;
|
|
27
43
|
//EntitlementOverride.listEntitlementOverrideForSubscription
|