chargebee 3.23.1 → 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 +97 -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/resources/api_endpoints.js +80 -2
- 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/resources/api_endpoints.js +80 -2
- 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 +5 -2
- package/types/core.d.ts +34 -8
- package/types/index.d.ts +20 -0
- package/types/resources/Alert.d.ts +110 -4
- package/types/resources/AlertStatus.d.ts +43 -2
- package/types/resources/Card.d.ts +1 -0
- package/types/resources/Content.d.ts +2 -0
- package/types/resources/Customer.d.ts +16 -2
- package/types/resources/Estimate.d.ts +16 -2
- package/types/resources/Event.d.ts +4 -2
- package/types/resources/FilterCondition.d.ts +10 -0
- package/types/resources/Gift.d.ts +16 -2
- package/types/resources/Invoice.d.ts +17 -2
- package/types/resources/PaymentIntent.d.ts +42 -6
- package/types/resources/PaymentSource.d.ts +11 -2
- package/types/resources/Purchase.d.ts +8 -1
- package/types/resources/Quote.d.ts +2 -0
- package/types/resources/QuoteEntitlement.d.ts +16 -0
- package/types/resources/Subscription.d.ts +56 -7
- package/types/resources/VirtualBankAccount.d.ts +2 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
// Generated Zod schemas: Order
|
|
2
|
+
// Actions: create, update, importOrder, cancel, createRefundableCreditNote, reopen, ordersForInvoice, resend
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//Order.create
|
|
6
|
+
const CreateOrderBodySchema = z.looseObject({
|
|
7
|
+
id: z.string().max(40).optional(),
|
|
8
|
+
invoice_id: z.string().max(50),
|
|
9
|
+
status: z
|
|
10
|
+
.enum(['new', 'processing', 'complete', 'cancelled', 'voided'])
|
|
11
|
+
.optional(),
|
|
12
|
+
reference_id: z.string().max(50).optional(),
|
|
13
|
+
fulfillment_status: z.string().max(50).optional(),
|
|
14
|
+
note: z.string().max(600).optional(),
|
|
15
|
+
tracking_id: z.string().max(50).optional(),
|
|
16
|
+
tracking_url: z.string().max(255).optional(),
|
|
17
|
+
batch_id: z.string().max(50).optional(),
|
|
18
|
+
});
|
|
19
|
+
export { CreateOrderBodySchema };
|
|
20
|
+
//Order.update
|
|
21
|
+
const UpdateOrderShippingAddressSchema = z.object({
|
|
22
|
+
first_name: z.string().max(150).optional(),
|
|
23
|
+
last_name: z.string().max(150).optional(),
|
|
24
|
+
email: z.string().email().max(70).optional(),
|
|
25
|
+
company: z.string().max(250).optional(),
|
|
26
|
+
phone: z.string().max(50).optional(),
|
|
27
|
+
line1: z.string().max(150).optional(),
|
|
28
|
+
line2: z.string().max(150).optional(),
|
|
29
|
+
line3: z.string().max(150).optional(),
|
|
30
|
+
city: z.string().max(50).optional(),
|
|
31
|
+
state_code: z.string().max(50).optional(),
|
|
32
|
+
state: z.string().max(50).optional(),
|
|
33
|
+
zip: z.string().max(20).optional(),
|
|
34
|
+
country: z.string().max(50).optional(),
|
|
35
|
+
validation_status: z
|
|
36
|
+
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
37
|
+
.optional(),
|
|
38
|
+
});
|
|
39
|
+
const UpdateOrderOrderLineItemsSchema = z.object({
|
|
40
|
+
id: z.array(z.string().max(40).optional()).optional(),
|
|
41
|
+
status: z
|
|
42
|
+
.array(z
|
|
43
|
+
.enum([
|
|
44
|
+
'queued',
|
|
45
|
+
'awaiting_shipment',
|
|
46
|
+
'on_hold',
|
|
47
|
+
'delivered',
|
|
48
|
+
'shipped',
|
|
49
|
+
'partially_delivered',
|
|
50
|
+
'returned',
|
|
51
|
+
'cancelled',
|
|
52
|
+
])
|
|
53
|
+
.optional())
|
|
54
|
+
.optional(),
|
|
55
|
+
sku: z.array(z.string().max(250).optional()).optional(),
|
|
56
|
+
});
|
|
57
|
+
const UpdateOrderBodySchema = z.looseObject({
|
|
58
|
+
reference_id: z.string().max(50).optional(),
|
|
59
|
+
batch_id: z.string().max(50).optional(),
|
|
60
|
+
note: z.string().max(600).optional(),
|
|
61
|
+
shipping_date: z.number().int().optional(),
|
|
62
|
+
order_date: z.number().int().optional(),
|
|
63
|
+
cancelled_at: z.number().int().optional(),
|
|
64
|
+
cancellation_reason: z
|
|
65
|
+
.enum([
|
|
66
|
+
'shipping_cut_off_passed',
|
|
67
|
+
'product_unsatisfactory',
|
|
68
|
+
'third_party_cancellation',
|
|
69
|
+
'product_not_required',
|
|
70
|
+
'delivery_date_missed',
|
|
71
|
+
'alternative_found',
|
|
72
|
+
'invoice_written_off',
|
|
73
|
+
'invoice_voided',
|
|
74
|
+
'fraudulent_transaction',
|
|
75
|
+
'payment_declined',
|
|
76
|
+
'subscription_cancelled',
|
|
77
|
+
'product_not_available',
|
|
78
|
+
'others',
|
|
79
|
+
'order_resent',
|
|
80
|
+
])
|
|
81
|
+
.optional(),
|
|
82
|
+
shipped_at: z.number().int().optional(),
|
|
83
|
+
delivered_at: z.number().int().optional(),
|
|
84
|
+
tracking_url: z.string().max(255).optional(),
|
|
85
|
+
tracking_id: z.string().max(50).optional(),
|
|
86
|
+
shipment_carrier: z.string().max(50).optional(),
|
|
87
|
+
fulfillment_status: z.string().max(50).optional(),
|
|
88
|
+
status: z
|
|
89
|
+
.enum([
|
|
90
|
+
'new',
|
|
91
|
+
'processing',
|
|
92
|
+
'complete',
|
|
93
|
+
'cancelled',
|
|
94
|
+
'voided',
|
|
95
|
+
'queued',
|
|
96
|
+
'awaiting_shipment',
|
|
97
|
+
'on_hold',
|
|
98
|
+
'delivered',
|
|
99
|
+
'shipped',
|
|
100
|
+
'partially_delivered',
|
|
101
|
+
'returned',
|
|
102
|
+
])
|
|
103
|
+
.optional(),
|
|
104
|
+
shipping_address: UpdateOrderShippingAddressSchema.optional(),
|
|
105
|
+
order_line_items: UpdateOrderOrderLineItemsSchema.optional(),
|
|
106
|
+
});
|
|
107
|
+
export { UpdateOrderBodySchema };
|
|
108
|
+
//Order.importOrder
|
|
109
|
+
const ImportOrderOrderShippingAddressSchema = z.object({
|
|
110
|
+
first_name: z.string().max(150).optional(),
|
|
111
|
+
last_name: z.string().max(150).optional(),
|
|
112
|
+
email: z.string().email().max(70).optional(),
|
|
113
|
+
company: z.string().max(250).optional(),
|
|
114
|
+
phone: z.string().max(50).optional(),
|
|
115
|
+
line1: z.string().max(150).optional(),
|
|
116
|
+
line2: z.string().max(150).optional(),
|
|
117
|
+
line3: z.string().max(150).optional(),
|
|
118
|
+
city: z.string().max(50).optional(),
|
|
119
|
+
state_code: z.string().max(50).optional(),
|
|
120
|
+
state: z.string().max(50).optional(),
|
|
121
|
+
zip: z.string().max(20).optional(),
|
|
122
|
+
country: z.string().max(50).optional(),
|
|
123
|
+
validation_status: z
|
|
124
|
+
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
125
|
+
.optional(),
|
|
126
|
+
});
|
|
127
|
+
const ImportOrderOrderBillingAddressSchema = z.object({
|
|
128
|
+
first_name: z.string().max(150).optional(),
|
|
129
|
+
last_name: z.string().max(150).optional(),
|
|
130
|
+
email: z.string().email().max(70).optional(),
|
|
131
|
+
company: z.string().max(250).optional(),
|
|
132
|
+
phone: z.string().max(50).optional(),
|
|
133
|
+
line1: z.string().max(150).optional(),
|
|
134
|
+
line2: z.string().max(150).optional(),
|
|
135
|
+
line3: z.string().max(150).optional(),
|
|
136
|
+
city: z.string().max(50).optional(),
|
|
137
|
+
state_code: z.string().max(50).optional(),
|
|
138
|
+
state: z.string().max(50).optional(),
|
|
139
|
+
zip: z.string().max(20).optional(),
|
|
140
|
+
country: z.string().max(50).optional(),
|
|
141
|
+
validation_status: z
|
|
142
|
+
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
143
|
+
.optional(),
|
|
144
|
+
});
|
|
145
|
+
const ImportOrderOrderBodySchema = z.looseObject({
|
|
146
|
+
id: z.string().max(40).optional(),
|
|
147
|
+
document_number: z.string().max(50).optional(),
|
|
148
|
+
invoice_id: z.string().max(50),
|
|
149
|
+
status: z.enum([
|
|
150
|
+
'cancelled',
|
|
151
|
+
'queued',
|
|
152
|
+
'awaiting_shipment',
|
|
153
|
+
'on_hold',
|
|
154
|
+
'delivered',
|
|
155
|
+
'shipped',
|
|
156
|
+
'partially_delivered',
|
|
157
|
+
'returned',
|
|
158
|
+
]),
|
|
159
|
+
subscription_id: z.string().max(50).optional(),
|
|
160
|
+
customer_id: z.string().max(50).optional(),
|
|
161
|
+
created_at: z.number().int(),
|
|
162
|
+
order_date: z.number().int(),
|
|
163
|
+
shipping_date: z.number().int(),
|
|
164
|
+
reference_id: z.string().max(50).optional(),
|
|
165
|
+
fulfillment_status: z.string().max(50).optional(),
|
|
166
|
+
note: z.string().max(600).optional(),
|
|
167
|
+
tracking_id: z.string().max(50).optional(),
|
|
168
|
+
tracking_url: z.string().max(255).optional(),
|
|
169
|
+
batch_id: z.string().max(50).optional(),
|
|
170
|
+
shipment_carrier: z.string().max(50).optional(),
|
|
171
|
+
shipping_cut_off_date: z.number().int().optional(),
|
|
172
|
+
delivered_at: z.number().int().optional(),
|
|
173
|
+
shipped_at: z.number().int().optional(),
|
|
174
|
+
cancelled_at: z.number().int().optional(),
|
|
175
|
+
cancellation_reason: z
|
|
176
|
+
.enum([
|
|
177
|
+
'shipping_cut_off_passed',
|
|
178
|
+
'product_unsatisfactory',
|
|
179
|
+
'third_party_cancellation',
|
|
180
|
+
'product_not_required',
|
|
181
|
+
'delivery_date_missed',
|
|
182
|
+
'alternative_found',
|
|
183
|
+
'invoice_written_off',
|
|
184
|
+
'invoice_voided',
|
|
185
|
+
'fraudulent_transaction',
|
|
186
|
+
'payment_declined',
|
|
187
|
+
'subscription_cancelled',
|
|
188
|
+
'product_not_available',
|
|
189
|
+
'others',
|
|
190
|
+
'order_resent',
|
|
191
|
+
])
|
|
192
|
+
.optional(),
|
|
193
|
+
refundable_credits_issued: z.number().int().min(0).optional(),
|
|
194
|
+
shipping_address: ImportOrderOrderShippingAddressSchema.optional(),
|
|
195
|
+
billing_address: ImportOrderOrderBillingAddressSchema.optional(),
|
|
196
|
+
});
|
|
197
|
+
export { ImportOrderOrderBodySchema };
|
|
198
|
+
//Order.cancel
|
|
199
|
+
const CancelOrderCreditNoteSchema = z.object({
|
|
200
|
+
total: z.number().int().min(0).optional(),
|
|
201
|
+
});
|
|
202
|
+
const CancelOrderBodySchema = z.looseObject({
|
|
203
|
+
cancellation_reason: z.enum([
|
|
204
|
+
'shipping_cut_off_passed',
|
|
205
|
+
'product_unsatisfactory',
|
|
206
|
+
'third_party_cancellation',
|
|
207
|
+
'product_not_required',
|
|
208
|
+
'delivery_date_missed',
|
|
209
|
+
'alternative_found',
|
|
210
|
+
'invoice_written_off',
|
|
211
|
+
'invoice_voided',
|
|
212
|
+
'fraudulent_transaction',
|
|
213
|
+
'payment_declined',
|
|
214
|
+
'subscription_cancelled',
|
|
215
|
+
'product_not_available',
|
|
216
|
+
'others',
|
|
217
|
+
'order_resent',
|
|
218
|
+
]),
|
|
219
|
+
customer_notes: z.string().max(2000).optional(),
|
|
220
|
+
comment: z.string().max(300).optional(),
|
|
221
|
+
cancelled_at: z.number().int().optional(),
|
|
222
|
+
credit_note: CancelOrderCreditNoteSchema.optional(),
|
|
223
|
+
});
|
|
224
|
+
export { CancelOrderBodySchema };
|
|
225
|
+
//Order.createRefundableCreditNote
|
|
226
|
+
const CreateRefundableCreditNoteOrderCreditNoteSchema = z.object({
|
|
227
|
+
reason_code: z.enum([
|
|
228
|
+
'write_off',
|
|
229
|
+
'subscription_change',
|
|
230
|
+
'subscription_cancellation',
|
|
231
|
+
'subscription_pause',
|
|
232
|
+
'chargeback',
|
|
233
|
+
'product_unsatisfactory',
|
|
234
|
+
'service_unsatisfactory',
|
|
235
|
+
'order_change',
|
|
236
|
+
'order_cancellation',
|
|
237
|
+
'waiver',
|
|
238
|
+
'other',
|
|
239
|
+
'fraudulent',
|
|
240
|
+
]),
|
|
241
|
+
total: z.number().int().min(0),
|
|
242
|
+
});
|
|
243
|
+
const CreateRefundableCreditNoteOrderBodySchema = z.looseObject({
|
|
244
|
+
customer_notes: z.string().max(2000).optional(),
|
|
245
|
+
comment: z.string().max(300).optional(),
|
|
246
|
+
credit_note: CreateRefundableCreditNoteOrderCreditNoteSchema.optional(),
|
|
247
|
+
});
|
|
248
|
+
export { CreateRefundableCreditNoteOrderBodySchema };
|
|
249
|
+
//Order.reopen
|
|
250
|
+
const ReopenOrderBodySchema = z.looseObject({
|
|
251
|
+
void_cancellation_credit_notes: z.boolean().optional(),
|
|
252
|
+
});
|
|
253
|
+
export { ReopenOrderBodySchema };
|
|
254
|
+
//Order.ordersForInvoice
|
|
255
|
+
const OrdersForInvoiceOrderBodySchema = z.looseObject({
|
|
256
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
257
|
+
offset: z.string().max(1000).optional(),
|
|
258
|
+
});
|
|
259
|
+
export { OrdersForInvoiceOrderBodySchema };
|
|
260
|
+
//Order.resend
|
|
261
|
+
const ResendOrderOrderLineItemsSchema = z.object({
|
|
262
|
+
id: z.array(z.string().max(40).optional()).optional(),
|
|
263
|
+
fulfillment_quantity: z.array(z.number().int().min(0).optional()).optional(),
|
|
264
|
+
});
|
|
265
|
+
const ResendOrderBodySchema = z.looseObject({
|
|
266
|
+
shipping_date: z.number().int().optional(),
|
|
267
|
+
resend_reason: z.string().max(100).optional(),
|
|
268
|
+
order_line_items: ResendOrderOrderLineItemsSchema.optional(),
|
|
269
|
+
});
|
|
270
|
+
export { ResendOrderBodySchema };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Generated Zod schemas: PaymentIntent
|
|
2
|
+
// Actions: create, update
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//PaymentIntent.create
|
|
6
|
+
const CreatePaymentIntentBodySchema = z.looseObject({
|
|
7
|
+
business_entity_id: z.string().max(50).optional(),
|
|
8
|
+
customer_id: z.string().max(50).optional(),
|
|
9
|
+
amount: z.number().int().min(0),
|
|
10
|
+
currency_code: z.string().max(3),
|
|
11
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
12
|
+
reference_id: z.string().max(200).optional(),
|
|
13
|
+
defer_payment_method_type: z.boolean().default(false).optional(),
|
|
14
|
+
payment_method_type: z
|
|
15
|
+
.enum([
|
|
16
|
+
'card',
|
|
17
|
+
'ideal',
|
|
18
|
+
'sofort',
|
|
19
|
+
'bancontact',
|
|
20
|
+
'google_pay',
|
|
21
|
+
'dotpay',
|
|
22
|
+
'giropay',
|
|
23
|
+
'apple_pay',
|
|
24
|
+
'upi',
|
|
25
|
+
'netbanking_emandates',
|
|
26
|
+
'paypal_express_checkout',
|
|
27
|
+
'direct_debit',
|
|
28
|
+
'boleto',
|
|
29
|
+
'venmo',
|
|
30
|
+
'amazon_payments',
|
|
31
|
+
'pay_to',
|
|
32
|
+
'faster_payments',
|
|
33
|
+
'sepa_instant_transfer',
|
|
34
|
+
'klarna_pay_now',
|
|
35
|
+
'online_banking_poland',
|
|
36
|
+
'payconiq_by_bancontact',
|
|
37
|
+
'electronic_payment_standard',
|
|
38
|
+
'kbc_payment_button',
|
|
39
|
+
'pay_by_bank',
|
|
40
|
+
'trustly',
|
|
41
|
+
'stablecoin',
|
|
42
|
+
'kakao_pay',
|
|
43
|
+
'naver_pay',
|
|
44
|
+
'revolut_pay',
|
|
45
|
+
'cash_app_pay',
|
|
46
|
+
'wechat_pay',
|
|
47
|
+
'alipay',
|
|
48
|
+
'pix',
|
|
49
|
+
'twint',
|
|
50
|
+
'go_pay',
|
|
51
|
+
'grab_pay',
|
|
52
|
+
'pay_co',
|
|
53
|
+
'after_pay',
|
|
54
|
+
'swish',
|
|
55
|
+
'payme',
|
|
56
|
+
])
|
|
57
|
+
.optional(),
|
|
58
|
+
success_url: z.string().max(250).optional(),
|
|
59
|
+
failure_url: z.string().max(250).optional(),
|
|
60
|
+
});
|
|
61
|
+
export { CreatePaymentIntentBodySchema };
|
|
62
|
+
//PaymentIntent.update
|
|
63
|
+
const UpdatePaymentIntentBodySchema = z.looseObject({
|
|
64
|
+
amount: z.number().int().min(0).optional(),
|
|
65
|
+
currency_code: z.string().max(3).optional(),
|
|
66
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
67
|
+
payment_method_type: z
|
|
68
|
+
.enum([
|
|
69
|
+
'card',
|
|
70
|
+
'ideal',
|
|
71
|
+
'sofort',
|
|
72
|
+
'bancontact',
|
|
73
|
+
'google_pay',
|
|
74
|
+
'dotpay',
|
|
75
|
+
'giropay',
|
|
76
|
+
'apple_pay',
|
|
77
|
+
'upi',
|
|
78
|
+
'netbanking_emandates',
|
|
79
|
+
'paypal_express_checkout',
|
|
80
|
+
'direct_debit',
|
|
81
|
+
'boleto',
|
|
82
|
+
'venmo',
|
|
83
|
+
'amazon_payments',
|
|
84
|
+
'pay_to',
|
|
85
|
+
'faster_payments',
|
|
86
|
+
'sepa_instant_transfer',
|
|
87
|
+
'klarna_pay_now',
|
|
88
|
+
'online_banking_poland',
|
|
89
|
+
'payconiq_by_bancontact',
|
|
90
|
+
'electronic_payment_standard',
|
|
91
|
+
'kbc_payment_button',
|
|
92
|
+
'pay_by_bank',
|
|
93
|
+
'trustly',
|
|
94
|
+
'stablecoin',
|
|
95
|
+
'kakao_pay',
|
|
96
|
+
'naver_pay',
|
|
97
|
+
'revolut_pay',
|
|
98
|
+
'cash_app_pay',
|
|
99
|
+
'wechat_pay',
|
|
100
|
+
'alipay',
|
|
101
|
+
'pix',
|
|
102
|
+
'twint',
|
|
103
|
+
'go_pay',
|
|
104
|
+
'grab_pay',
|
|
105
|
+
'pay_co',
|
|
106
|
+
'after_pay',
|
|
107
|
+
'swish',
|
|
108
|
+
'payme',
|
|
109
|
+
])
|
|
110
|
+
.optional(),
|
|
111
|
+
success_url: z.string().max(250).optional(),
|
|
112
|
+
failure_url: z.string().max(250).optional(),
|
|
113
|
+
});
|
|
114
|
+
export { UpdatePaymentIntentBodySchema };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Generated Zod schemas: PaymentScheduleScheme
|
|
2
|
+
// Actions: create
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//PaymentScheduleScheme.create
|
|
6
|
+
const CreatePaymentScheduleSchemeFlexibleSchedulesSchema = z.object({
|
|
7
|
+
period: z.array(z.number().int().min(0).max(52).optional()).optional(),
|
|
8
|
+
amount_percentage: z.array(z.number().min(1).max(100).optional()).optional(),
|
|
9
|
+
});
|
|
10
|
+
const CreatePaymentScheduleSchemeBodySchema = z.looseObject({
|
|
11
|
+
number_of_schedules: z.number().int().min(1).max(52),
|
|
12
|
+
period_unit: z.enum(['day', 'week', 'month']),
|
|
13
|
+
period: z.number().int().min(1).max(30).optional(),
|
|
14
|
+
name: z.string().max(100),
|
|
15
|
+
flexible_schedules: CreatePaymentScheduleSchemeFlexibleSchedulesSchema.optional(),
|
|
16
|
+
});
|
|
17
|
+
export { CreatePaymentScheduleSchemeBodySchema };
|