chargebee 3.24.0 → 3.25.0-beta.1
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 +8 -0
- package/README.md +39 -0
- package/cjs/RequestWrapper.js +27 -0
- package/cjs/chargebee.cjs.js +3 -0
- package/cjs/chargebee.cjs.worker.js +2 -0
- package/cjs/chargebeeZodValidationError.js +18 -0
- package/cjs/createChargebee.js +5 -0
- package/cjs/environment.js +1 -1
- package/cjs/schema/addon.schema.js +153 -0
- package/cjs/schema/address.schema.js +35 -0
- package/cjs/schema/alert.schema.js +38 -0
- package/cjs/schema/attached_item.schema.js +58 -0
- package/cjs/schema/business_entity.schema.js +46 -0
- package/cjs/schema/card.schema.js +165 -0
- package/cjs/schema/comment.schema.js +69 -0
- package/cjs/schema/coupon.schema.js +209 -0
- package/cjs/schema/coupon_code.schema.js +14 -0
- package/cjs/schema/coupon_set.schema.js +28 -0
- package/cjs/schema/credit_note.schema.js +288 -0
- package/cjs/schema/currency.schema.js +32 -0
- package/cjs/schema/customer.schema.js +986 -0
- package/cjs/schema/customer_entitlement.schema.js +14 -0
- package/cjs/schema/differential_price.schema.js +68 -0
- package/cjs/schema/entitlement.schema.js +27 -0
- package/cjs/schema/entitlement_override.schema.js +33 -0
- package/cjs/schema/estimate.schema.js +1525 -0
- package/cjs/schema/export.schema.js +1545 -0
- package/cjs/schema/feature.schema.js +37 -0
- package/cjs/schema/gift.schema.js +277 -0
- package/cjs/schema/hosted_page.schema.js +1649 -0
- package/cjs/schema/in_app_subscription.schema.js +68 -0
- package/cjs/schema/index.js +80 -0
- package/cjs/schema/invoice.schema.js +1467 -0
- package/cjs/schema/item.schema.js +91 -0
- package/cjs/schema/item_entitlement.schema.js +45 -0
- package/cjs/schema/item_family.schema.js +21 -0
- package/cjs/schema/item_price.schema.js +190 -0
- package/cjs/schema/non_subscription.schema.js +28 -0
- package/cjs/schema/offer_event.schema.js +13 -0
- package/cjs/schema/offer_fulfillment.schema.js +20 -0
- package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
- package/cjs/schema/omnichannel_subscription.schema.js +89 -0
- package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
- package/cjs/schema/order.schema.js +273 -0
- package/cjs/schema/payment_intent.schema.js +117 -0
- package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
- package/cjs/schema/payment_source.schema.js +358 -0
- package/cjs/schema/payment_voucher.schema.js +57 -0
- package/cjs/schema/personalized_offer.schema.js +28 -0
- package/cjs/schema/plan.schema.js +225 -0
- package/cjs/schema/portal_session.schema.js +22 -0
- package/cjs/schema/price_variant.schema.js +36 -0
- package/cjs/schema/pricing_page_session.schema.js +135 -0
- package/cjs/schema/promotional_credit.schema.js +78 -0
- package/cjs/schema/purchase.schema.js +272 -0
- package/cjs/schema/quote.schema.js +1557 -0
- package/cjs/schema/ramp.schema.js +209 -0
- package/cjs/schema/recorded_purchase.schema.js +32 -0
- package/cjs/schema/resource_migration.schema.js +14 -0
- package/cjs/schema/site_migration_detail.schema.js +81 -0
- package/cjs/schema/subscription.schema.js +2993 -0
- package/cjs/schema/subscription_entitlement.schema.js +25 -0
- package/cjs/schema/time_machine.schema.js +17 -0
- package/cjs/schema/transaction.schema.js +70 -0
- package/cjs/schema/unbilled_charge.schema.js +113 -0
- package/cjs/schema/usage.schema.js +93 -0
- package/cjs/schema/usage_charge.schema.js +17 -0
- package/cjs/schema/usage_event.schema.js +28 -0
- package/cjs/schema/usage_file.schema.js +13 -0
- package/cjs/schema/usage_summary.schema.js +17 -0
- package/cjs/schema/virtual_bank_account.schema.js +43 -0
- package/cjs/schema/webhook_endpoint.schema.js +504 -0
- package/cjs/validationLoader.js +59 -0
- package/esm/RequestWrapper.js +27 -0
- package/esm/chargebee.esm.js +2 -0
- package/esm/chargebee.esm.worker.js +1 -0
- package/esm/chargebeeZodValidationError.js +14 -0
- package/esm/createChargebee.js +5 -0
- package/esm/environment.js +1 -1
- package/esm/schema/addon.schema.js +150 -0
- package/esm/schema/address.schema.js +32 -0
- package/esm/schema/alert.schema.js +35 -0
- package/esm/schema/attached_item.schema.js +55 -0
- package/esm/schema/business_entity.schema.js +43 -0
- package/esm/schema/card.schema.js +162 -0
- package/esm/schema/comment.schema.js +66 -0
- package/esm/schema/coupon.schema.js +206 -0
- package/esm/schema/coupon_code.schema.js +11 -0
- package/esm/schema/coupon_set.schema.js +25 -0
- package/esm/schema/credit_note.schema.js +285 -0
- package/esm/schema/currency.schema.js +29 -0
- package/esm/schema/customer.schema.js +983 -0
- package/esm/schema/customer_entitlement.schema.js +11 -0
- package/esm/schema/differential_price.schema.js +65 -0
- package/esm/schema/entitlement.schema.js +24 -0
- package/esm/schema/entitlement_override.schema.js +30 -0
- package/esm/schema/estimate.schema.js +1522 -0
- package/esm/schema/export.schema.js +1542 -0
- package/esm/schema/feature.schema.js +34 -0
- package/esm/schema/gift.schema.js +274 -0
- package/esm/schema/hosted_page.schema.js +1646 -0
- package/esm/schema/in_app_subscription.schema.js +65 -0
- package/esm/schema/index.js +64 -0
- package/esm/schema/invoice.schema.js +1464 -0
- package/esm/schema/item.schema.js +88 -0
- package/esm/schema/item_entitlement.schema.js +42 -0
- package/esm/schema/item_family.schema.js +18 -0
- package/esm/schema/item_price.schema.js +187 -0
- package/esm/schema/non_subscription.schema.js +25 -0
- package/esm/schema/offer_event.schema.js +10 -0
- package/esm/schema/offer_fulfillment.schema.js +17 -0
- package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
- package/esm/schema/omnichannel_subscription.schema.js +86 -0
- package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
- package/esm/schema/order.schema.js +270 -0
- package/esm/schema/payment_intent.schema.js +114 -0
- package/esm/schema/payment_schedule_scheme.schema.js +17 -0
- package/esm/schema/payment_source.schema.js +355 -0
- package/esm/schema/payment_voucher.schema.js +54 -0
- package/esm/schema/personalized_offer.schema.js +25 -0
- package/esm/schema/plan.schema.js +222 -0
- package/esm/schema/portal_session.schema.js +19 -0
- package/esm/schema/price_variant.schema.js +33 -0
- package/esm/schema/pricing_page_session.schema.js +132 -0
- package/esm/schema/promotional_credit.schema.js +75 -0
- package/esm/schema/purchase.schema.js +269 -0
- package/esm/schema/quote.schema.js +1554 -0
- package/esm/schema/ramp.schema.js +206 -0
- package/esm/schema/recorded_purchase.schema.js +29 -0
- package/esm/schema/resource_migration.schema.js +11 -0
- package/esm/schema/site_migration_detail.schema.js +78 -0
- package/esm/schema/subscription.schema.js +2990 -0
- package/esm/schema/subscription_entitlement.schema.js +22 -0
- package/esm/schema/time_machine.schema.js +14 -0
- package/esm/schema/transaction.schema.js +67 -0
- package/esm/schema/unbilled_charge.schema.js +110 -0
- package/esm/schema/usage.schema.js +90 -0
- package/esm/schema/usage_charge.schema.js +14 -0
- package/esm/schema/usage_event.schema.js +25 -0
- package/esm/schema/usage_file.schema.js +10 -0
- package/esm/schema/usage_summary.schema.js +14 -0
- package/esm/schema/virtual_bank_account.schema.js +40 -0
- package/esm/schema/webhook_endpoint.schema.js +501 -0
- package/esm/validationLoader.js +56 -0
- package/package.json +4 -1
- package/types/core.d.ts +2 -0
- package/types/index.d.ts +16 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Feature
|
|
3
|
+
// Actions: create, update
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UpdateFeatureBodySchema = exports.CreateFeatureBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Feature.create
|
|
9
|
+
const CreateFeatureLevelsSchema = zod_1.z.object({
|
|
10
|
+
name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
11
|
+
value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
12
|
+
is_unlimited: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
|
|
13
|
+
level: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
14
|
+
});
|
|
15
|
+
const CreateFeatureBodySchema = zod_1.z.looseObject({
|
|
16
|
+
id: zod_1.z.string().max(50).optional(),
|
|
17
|
+
name: zod_1.z.string().max(50),
|
|
18
|
+
description: zod_1.z.string().max(500).optional(),
|
|
19
|
+
type: zod_1.z.enum(['switch', 'custom', 'quantity', 'range']).optional(),
|
|
20
|
+
unit: zod_1.z.string().max(50).optional(),
|
|
21
|
+
levels: CreateFeatureLevelsSchema.optional(),
|
|
22
|
+
});
|
|
23
|
+
exports.CreateFeatureBodySchema = CreateFeatureBodySchema;
|
|
24
|
+
//Feature.update
|
|
25
|
+
const UpdateFeatureLevelsSchema = zod_1.z.object({
|
|
26
|
+
name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
27
|
+
value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
28
|
+
is_unlimited: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
|
|
29
|
+
level: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
30
|
+
});
|
|
31
|
+
const UpdateFeatureBodySchema = zod_1.z.looseObject({
|
|
32
|
+
name: zod_1.z.string().max(50).optional(),
|
|
33
|
+
description: zod_1.z.string().max(500).optional(),
|
|
34
|
+
unit: zod_1.z.string().max(50).optional(),
|
|
35
|
+
levels: UpdateFeatureLevelsSchema.optional(),
|
|
36
|
+
});
|
|
37
|
+
exports.UpdateFeatureBodySchema = UpdateFeatureBodySchema;
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Gift
|
|
3
|
+
// Actions: create, createForItems, list, updateGift
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UpdateGiftGiftBodySchema = exports.ListGiftBodySchema = exports.CreateForItemsGiftBodySchema = exports.CreateGiftBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Gift.create
|
|
9
|
+
const CreateGiftGifterSchema = zod_1.z.object({
|
|
10
|
+
customer_id: zod_1.z.string().max(50),
|
|
11
|
+
signature: zod_1.z.string().max(50),
|
|
12
|
+
note: zod_1.z.string().max(500).optional(),
|
|
13
|
+
payment_src_id: zod_1.z.string().max(40).optional(),
|
|
14
|
+
});
|
|
15
|
+
const CreateGiftGiftReceiverSchema = zod_1.z.object({
|
|
16
|
+
customer_id: zod_1.z.string().max(50),
|
|
17
|
+
first_name: zod_1.z.string().max(150),
|
|
18
|
+
last_name: zod_1.z.string().max(150),
|
|
19
|
+
email: zod_1.z.string().email().max(70),
|
|
20
|
+
});
|
|
21
|
+
const CreateGiftAdditionalInformationSchema = zod_1.z.looseObject({});
|
|
22
|
+
const CreateGiftPaymentIntentSchema = zod_1.z.object({
|
|
23
|
+
id: zod_1.z.string().max(150).optional(),
|
|
24
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
25
|
+
gw_token: zod_1.z.string().max(65000).optional(),
|
|
26
|
+
payment_method_type: zod_1.z
|
|
27
|
+
.enum([
|
|
28
|
+
'card',
|
|
29
|
+
'ideal',
|
|
30
|
+
'sofort',
|
|
31
|
+
'bancontact',
|
|
32
|
+
'google_pay',
|
|
33
|
+
'dotpay',
|
|
34
|
+
'giropay',
|
|
35
|
+
'apple_pay',
|
|
36
|
+
'upi',
|
|
37
|
+
'netbanking_emandates',
|
|
38
|
+
'paypal_express_checkout',
|
|
39
|
+
'direct_debit',
|
|
40
|
+
'boleto',
|
|
41
|
+
'venmo',
|
|
42
|
+
'amazon_payments',
|
|
43
|
+
'pay_to',
|
|
44
|
+
'faster_payments',
|
|
45
|
+
'sepa_instant_transfer',
|
|
46
|
+
'klarna_pay_now',
|
|
47
|
+
'online_banking_poland',
|
|
48
|
+
'payconiq_by_bancontact',
|
|
49
|
+
'electronic_payment_standard',
|
|
50
|
+
'kbc_payment_button',
|
|
51
|
+
'pay_by_bank',
|
|
52
|
+
'trustly',
|
|
53
|
+
'stablecoin',
|
|
54
|
+
'kakao_pay',
|
|
55
|
+
'naver_pay',
|
|
56
|
+
'revolut_pay',
|
|
57
|
+
'cash_app_pay',
|
|
58
|
+
'wechat_pay',
|
|
59
|
+
'alipay',
|
|
60
|
+
'pix',
|
|
61
|
+
'twint',
|
|
62
|
+
'go_pay',
|
|
63
|
+
'grab_pay',
|
|
64
|
+
'pay_co',
|
|
65
|
+
'after_pay',
|
|
66
|
+
'swish',
|
|
67
|
+
'payme',
|
|
68
|
+
])
|
|
69
|
+
.optional(),
|
|
70
|
+
reference_id: zod_1.z.string().max(65000).optional(),
|
|
71
|
+
gw_payment_method_id: zod_1.z.string().max(65000).optional(),
|
|
72
|
+
additional_information: CreateGiftAdditionalInformationSchema.optional(),
|
|
73
|
+
});
|
|
74
|
+
const CreateGiftShippingAddressSchema = zod_1.z.object({
|
|
75
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
76
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
77
|
+
email: zod_1.z.string().email().max(70).optional(),
|
|
78
|
+
company: zod_1.z.string().max(250).optional(),
|
|
79
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
80
|
+
line1: zod_1.z.string().max(150).optional(),
|
|
81
|
+
line2: zod_1.z.string().max(150).optional(),
|
|
82
|
+
line3: zod_1.z.string().max(150).optional(),
|
|
83
|
+
city: zod_1.z.string().max(50).optional(),
|
|
84
|
+
state_code: zod_1.z.string().max(50).optional(),
|
|
85
|
+
state: zod_1.z.string().max(50).optional(),
|
|
86
|
+
zip: zod_1.z.string().max(20).optional(),
|
|
87
|
+
country: zod_1.z.string().max(50).optional(),
|
|
88
|
+
validation_status: zod_1.z
|
|
89
|
+
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
90
|
+
.optional(),
|
|
91
|
+
});
|
|
92
|
+
const CreateGiftSubscriptionSchema = zod_1.z.looseObject({
|
|
93
|
+
plan_id: zod_1.z.string().max(100),
|
|
94
|
+
plan_quantity: zod_1.z.number().int().min(1).optional(),
|
|
95
|
+
plan_quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
96
|
+
});
|
|
97
|
+
const CreateGiftAddonsSchema = zod_1.z.object({
|
|
98
|
+
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
99
|
+
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
100
|
+
quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
101
|
+
});
|
|
102
|
+
const CreateGiftBodySchema = zod_1.z.looseObject({
|
|
103
|
+
scheduled_at: zod_1.z.number().int().optional(),
|
|
104
|
+
auto_claim: zod_1.z.boolean().default(false).optional(),
|
|
105
|
+
no_expiry: zod_1.z.boolean().optional(),
|
|
106
|
+
claim_expiry_date: zod_1.z.number().int().optional(),
|
|
107
|
+
coupon_ids: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
108
|
+
gifter: CreateGiftGifterSchema.optional(),
|
|
109
|
+
gift_receiver: CreateGiftGiftReceiverSchema.optional(),
|
|
110
|
+
payment_intent: CreateGiftPaymentIntentSchema.optional(),
|
|
111
|
+
shipping_address: CreateGiftShippingAddressSchema.optional(),
|
|
112
|
+
subscription: CreateGiftSubscriptionSchema.optional(),
|
|
113
|
+
addons: CreateGiftAddonsSchema.optional(),
|
|
114
|
+
});
|
|
115
|
+
exports.CreateGiftBodySchema = CreateGiftBodySchema;
|
|
116
|
+
//Gift.createForItems
|
|
117
|
+
const CreateForItemsGiftMetaDataSchema = zod_1.z.looseObject({});
|
|
118
|
+
const CreateForItemsGiftGifterSchema = zod_1.z.object({
|
|
119
|
+
customer_id: zod_1.z.string().max(50),
|
|
120
|
+
signature: zod_1.z.string().max(50),
|
|
121
|
+
note: zod_1.z.string().max(500).optional(),
|
|
122
|
+
payment_src_id: zod_1.z.string().max(40).optional(),
|
|
123
|
+
});
|
|
124
|
+
const CreateForItemsGiftGiftReceiverSchema = zod_1.z.object({
|
|
125
|
+
customer_id: zod_1.z.string().max(50),
|
|
126
|
+
first_name: zod_1.z.string().max(150),
|
|
127
|
+
last_name: zod_1.z.string().max(150),
|
|
128
|
+
email: zod_1.z.string().email().max(70),
|
|
129
|
+
});
|
|
130
|
+
const CreateForItemsGiftAdditionalInformationSchema = zod_1.z.looseObject({});
|
|
131
|
+
const CreateForItemsGiftPaymentIntentSchema = zod_1.z.object({
|
|
132
|
+
id: zod_1.z.string().max(150).optional(),
|
|
133
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
134
|
+
gw_token: zod_1.z.string().max(65000).optional(),
|
|
135
|
+
payment_method_type: zod_1.z
|
|
136
|
+
.enum([
|
|
137
|
+
'card',
|
|
138
|
+
'ideal',
|
|
139
|
+
'sofort',
|
|
140
|
+
'bancontact',
|
|
141
|
+
'google_pay',
|
|
142
|
+
'dotpay',
|
|
143
|
+
'giropay',
|
|
144
|
+
'apple_pay',
|
|
145
|
+
'upi',
|
|
146
|
+
'netbanking_emandates',
|
|
147
|
+
'paypal_express_checkout',
|
|
148
|
+
'direct_debit',
|
|
149
|
+
'boleto',
|
|
150
|
+
'venmo',
|
|
151
|
+
'amazon_payments',
|
|
152
|
+
'pay_to',
|
|
153
|
+
'faster_payments',
|
|
154
|
+
'sepa_instant_transfer',
|
|
155
|
+
'klarna_pay_now',
|
|
156
|
+
'online_banking_poland',
|
|
157
|
+
'payconiq_by_bancontact',
|
|
158
|
+
'electronic_payment_standard',
|
|
159
|
+
'kbc_payment_button',
|
|
160
|
+
'pay_by_bank',
|
|
161
|
+
'trustly',
|
|
162
|
+
'stablecoin',
|
|
163
|
+
'kakao_pay',
|
|
164
|
+
'naver_pay',
|
|
165
|
+
'revolut_pay',
|
|
166
|
+
'cash_app_pay',
|
|
167
|
+
'wechat_pay',
|
|
168
|
+
'alipay',
|
|
169
|
+
'pix',
|
|
170
|
+
'twint',
|
|
171
|
+
'go_pay',
|
|
172
|
+
'grab_pay',
|
|
173
|
+
'pay_co',
|
|
174
|
+
'after_pay',
|
|
175
|
+
'swish',
|
|
176
|
+
'payme',
|
|
177
|
+
])
|
|
178
|
+
.optional(),
|
|
179
|
+
reference_id: zod_1.z.string().max(65000).optional(),
|
|
180
|
+
gw_payment_method_id: zod_1.z.string().max(65000).optional(),
|
|
181
|
+
additional_information: CreateForItemsGiftAdditionalInformationSchema.optional(),
|
|
182
|
+
});
|
|
183
|
+
const CreateForItemsGiftShippingAddressSchema = zod_1.z.object({
|
|
184
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
185
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
186
|
+
email: zod_1.z.string().email().max(70).optional(),
|
|
187
|
+
company: zod_1.z.string().max(250).optional(),
|
|
188
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
189
|
+
line1: zod_1.z.string().max(150).optional(),
|
|
190
|
+
line2: zod_1.z.string().max(150).optional(),
|
|
191
|
+
line3: zod_1.z.string().max(150).optional(),
|
|
192
|
+
city: zod_1.z.string().max(50).optional(),
|
|
193
|
+
state_code: zod_1.z.string().max(50).optional(),
|
|
194
|
+
state: zod_1.z.string().max(50).optional(),
|
|
195
|
+
zip: zod_1.z.string().max(20).optional(),
|
|
196
|
+
country: zod_1.z.string().max(50).optional(),
|
|
197
|
+
validation_status: zod_1.z
|
|
198
|
+
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
199
|
+
.optional(),
|
|
200
|
+
});
|
|
201
|
+
const CreateForItemsGiftSubscriptionItemsSchema = zod_1.z.object({
|
|
202
|
+
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
203
|
+
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
204
|
+
quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
205
|
+
unit_price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
206
|
+
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
207
|
+
});
|
|
208
|
+
const CreateForItemsGiftItemTiersSchema = zod_1.z.object({
|
|
209
|
+
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
210
|
+
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
211
|
+
ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
212
|
+
price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
213
|
+
starting_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
214
|
+
ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
215
|
+
price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
216
|
+
});
|
|
217
|
+
const CreateForItemsGiftBodySchema = zod_1.z.looseObject({
|
|
218
|
+
scheduled_at: zod_1.z.number().int().optional(),
|
|
219
|
+
auto_claim: zod_1.z.boolean().default(false).optional(),
|
|
220
|
+
no_expiry: zod_1.z.boolean().optional(),
|
|
221
|
+
claim_expiry_date: zod_1.z.number().int().optional(),
|
|
222
|
+
coupon_ids: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
223
|
+
meta_data: CreateForItemsGiftMetaDataSchema.optional(),
|
|
224
|
+
gifter: CreateForItemsGiftGifterSchema.optional(),
|
|
225
|
+
gift_receiver: CreateForItemsGiftGiftReceiverSchema.optional(),
|
|
226
|
+
payment_intent: CreateForItemsGiftPaymentIntentSchema.optional(),
|
|
227
|
+
shipping_address: CreateForItemsGiftShippingAddressSchema.optional(),
|
|
228
|
+
subscription_items: CreateForItemsGiftSubscriptionItemsSchema.optional(),
|
|
229
|
+
item_tiers: CreateForItemsGiftItemTiersSchema.optional(),
|
|
230
|
+
});
|
|
231
|
+
exports.CreateForItemsGiftBodySchema = CreateForItemsGiftBodySchema;
|
|
232
|
+
//Gift.list
|
|
233
|
+
const ListGiftStatusSchema = zod_1.z.object({
|
|
234
|
+
is: zod_1.z
|
|
235
|
+
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
236
|
+
.optional(),
|
|
237
|
+
is_not: zod_1.z
|
|
238
|
+
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
239
|
+
.optional(),
|
|
240
|
+
in: zod_1.z
|
|
241
|
+
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
242
|
+
.optional(),
|
|
243
|
+
not_in: zod_1.z
|
|
244
|
+
.enum(['scheduled', 'unclaimed', 'claimed', 'cancelled', 'expired'])
|
|
245
|
+
.optional(),
|
|
246
|
+
});
|
|
247
|
+
const ListGiftEmailSchema = zod_1.z.object({
|
|
248
|
+
is: zod_1.z.string().min(1).optional(),
|
|
249
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
250
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
251
|
+
});
|
|
252
|
+
const ListGiftCustomerIdSchema = zod_1.z.object({
|
|
253
|
+
is: zod_1.z.string().min(1).optional(),
|
|
254
|
+
is_not: zod_1.z.string().min(1).optional(),
|
|
255
|
+
starts_with: zod_1.z.string().min(1).optional(),
|
|
256
|
+
});
|
|
257
|
+
const ListGiftGiftReceiverSchema = zod_1.z.object({
|
|
258
|
+
email: ListGiftEmailSchema.optional(),
|
|
259
|
+
customer_id: ListGiftCustomerIdSchema.optional(),
|
|
260
|
+
});
|
|
261
|
+
const ListGiftGifterSchema = zod_1.z.object({
|
|
262
|
+
customer_id: ListGiftCustomerIdSchema.optional(),
|
|
263
|
+
});
|
|
264
|
+
const ListGiftBodySchema = zod_1.z.looseObject({
|
|
265
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
266
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
267
|
+
status: ListGiftStatusSchema.optional(),
|
|
268
|
+
gift_receiver: ListGiftGiftReceiverSchema.optional(),
|
|
269
|
+
gifter: ListGiftGifterSchema.optional(),
|
|
270
|
+
});
|
|
271
|
+
exports.ListGiftBodySchema = ListGiftBodySchema;
|
|
272
|
+
//Gift.updateGift
|
|
273
|
+
const UpdateGiftGiftBodySchema = zod_1.z.looseObject({
|
|
274
|
+
scheduled_at: zod_1.z.number().int(),
|
|
275
|
+
comment: zod_1.z.string().max(250).optional(),
|
|
276
|
+
});
|
|
277
|
+
exports.UpdateGiftGiftBodySchema = UpdateGiftGiftBodySchema;
|