chargebee 3.35.0 → 3.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +56 -0
- package/cjs/resources/webhook/eventType.js +2 -0
- package/cjs/schema/addon.schema.js +221 -40
- package/cjs/schema/alert.schema.js +17 -2
- package/cjs/schema/alert_status.schema.js +6 -1
- package/cjs/schema/attached_item.schema.js +101 -26
- package/cjs/schema/business_entity.schema.js +16 -5
- package/cjs/schema/business_rule.schema.js +2 -2
- package/cjs/schema/business_ruleset.schema.js +2 -2
- package/cjs/schema/comment.schema.js +15 -4
- package/cjs/schema/coupon.schema.js +218 -37
- package/cjs/schema/coupon_code.schema.js +36 -6
- package/cjs/schema/coupon_set.schema.js +108 -27
- package/cjs/schema/credit_note.schema.js +496 -105
- package/cjs/schema/credit_unit.schema.js +12 -2
- package/cjs/schema/customer.schema.js +212 -62
- package/cjs/schema/differential_price.schema.js +100 -12
- package/cjs/schema/dispute.schema.js +125 -33
- package/cjs/schema/einvoice.schema.js +27 -6
- package/cjs/schema/email_log.schema.js +15 -4
- package/cjs/schema/entitlement.schema.js +33 -4
- package/cjs/schema/entitlement_override.schema.js +17 -1
- package/cjs/schema/estimate.schema.js +581 -36
- package/cjs/schema/event.schema.js +1282 -633
- package/cjs/schema/export.schema.js +4459 -1412
- package/cjs/schema/feature.schema.js +73 -11
- package/cjs/schema/gateway_request_log.schema.js +309 -0
- package/cjs/schema/gateway_webhook_log.schema.js +257 -0
- package/cjs/schema/gift.schema.js +51 -5
- package/cjs/schema/grant_block.schema.js +45 -12
- package/cjs/schema/hosted_page.schema.js +562 -66
- package/cjs/schema/index.js +3 -0
- package/cjs/schema/invoice.schema.js +821 -121
- package/cjs/schema/item.schema.js +151 -28
- package/cjs/schema/item_entitlement.schema.js +23 -2
- package/cjs/schema/item_family.schema.js +29 -8
- package/cjs/schema/item_price.schema.js +263 -48
- package/cjs/schema/ledger_operation.schema.js +42 -15
- package/cjs/schema/metered_feature.schema.js +10 -1
- package/cjs/schema/omnichannel_one_time_order.schema.js +32 -2
- package/cjs/schema/omnichannel_subscription.schema.js +136 -30
- package/cjs/schema/order.schema.js +233 -61
- package/cjs/schema/organization_detail.schema.js +36 -0
- package/cjs/schema/payment_schedule.schema.js +39 -8
- package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
- package/cjs/schema/payment_source.schema.js +360 -148
- package/cjs/schema/payment_voucher.schema.js +33 -5
- package/cjs/schema/plan.schema.js +345 -57
- package/cjs/schema/price_ramp.schema.js +79 -14
- package/cjs/schema/price_variant.schema.js +88 -18
- package/cjs/schema/pricing_page_session.schema.js +36 -2
- package/cjs/schema/promotional_credit.schema.js +27 -6
- package/cjs/schema/purchase.schema.js +204 -12
- package/cjs/schema/quote.schema.js +901 -81
- package/cjs/schema/quote_entitlement.schema.js +6 -2
- package/cjs/schema/ramp.schema.js +238 -24
- package/cjs/schema/site_migration_detail.schema.js +50 -16
- package/cjs/schema/subscription.schema.js +998 -169
- package/cjs/schema/subscription_entitlement.schema.js +9 -1
- package/cjs/schema/transaction.schema.js +780 -342
- package/cjs/schema/unbilled_charge.schema.js +141 -13
- package/cjs/schema/usage.schema.js +55 -12
- package/cjs/schema/usage_event.schema.js +13 -1
- package/cjs/schema/virtual_bank_account.schema.js +42 -10
- package/cjs/schema/webhook_endpoint.schema.js +4 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +56 -0
- package/esm/resources/webhook/eventType.js +2 -0
- package/esm/schema/addon.schema.js +221 -40
- package/esm/schema/alert.schema.js +17 -2
- package/esm/schema/alert_status.schema.js +6 -1
- package/esm/schema/attached_item.schema.js +101 -26
- package/esm/schema/business_entity.schema.js +16 -5
- package/esm/schema/business_rule.schema.js +2 -2
- package/esm/schema/business_ruleset.schema.js +2 -2
- package/esm/schema/comment.schema.js +15 -4
- package/esm/schema/coupon.schema.js +218 -37
- package/esm/schema/coupon_code.schema.js +36 -6
- package/esm/schema/coupon_set.schema.js +108 -27
- package/esm/schema/credit_note.schema.js +496 -105
- package/esm/schema/credit_unit.schema.js +12 -2
- package/esm/schema/customer.schema.js +212 -62
- package/esm/schema/differential_price.schema.js +100 -12
- package/esm/schema/dispute.schema.js +125 -33
- package/esm/schema/einvoice.schema.js +27 -6
- package/esm/schema/email_log.schema.js +15 -4
- package/esm/schema/entitlement.schema.js +33 -4
- package/esm/schema/entitlement_override.schema.js +17 -1
- package/esm/schema/estimate.schema.js +581 -36
- package/esm/schema/event.schema.js +1282 -633
- package/esm/schema/export.schema.js +4459 -1412
- package/esm/schema/feature.schema.js +73 -11
- package/esm/schema/gateway_request_log.schema.js +306 -0
- package/esm/schema/gateway_webhook_log.schema.js +254 -0
- package/esm/schema/gift.schema.js +51 -5
- package/esm/schema/grant_block.schema.js +45 -12
- package/esm/schema/hosted_page.schema.js +562 -66
- package/esm/schema/index.js +3 -0
- package/esm/schema/invoice.schema.js +821 -121
- package/esm/schema/item.schema.js +151 -28
- package/esm/schema/item_entitlement.schema.js +23 -2
- package/esm/schema/item_family.schema.js +29 -8
- package/esm/schema/item_price.schema.js +263 -48
- package/esm/schema/ledger_operation.schema.js +42 -15
- package/esm/schema/metered_feature.schema.js +10 -1
- package/esm/schema/omnichannel_one_time_order.schema.js +32 -2
- package/esm/schema/omnichannel_subscription.schema.js +136 -30
- package/esm/schema/order.schema.js +233 -61
- package/esm/schema/organization_detail.schema.js +33 -0
- package/esm/schema/payment_schedule.schema.js +39 -8
- package/esm/schema/payment_schedule_scheme.schema.js +37 -7
- package/esm/schema/payment_source.schema.js +360 -148
- package/esm/schema/payment_voucher.schema.js +33 -5
- package/esm/schema/plan.schema.js +345 -57
- package/esm/schema/price_ramp.schema.js +79 -14
- package/esm/schema/price_variant.schema.js +88 -18
- package/esm/schema/pricing_page_session.schema.js +36 -2
- package/esm/schema/promotional_credit.schema.js +27 -6
- package/esm/schema/purchase.schema.js +204 -12
- package/esm/schema/quote.schema.js +901 -81
- package/esm/schema/quote_entitlement.schema.js +6 -2
- package/esm/schema/ramp.schema.js +238 -24
- package/esm/schema/site_migration_detail.schema.js +50 -16
- package/esm/schema/subscription.schema.js +998 -169
- package/esm/schema/subscription_entitlement.schema.js +9 -1
- package/esm/schema/transaction.schema.js +780 -342
- package/esm/schema/unbilled_charge.schema.js +141 -13
- package/esm/schema/usage.schema.js +55 -12
- package/esm/schema/usage_event.schema.js +13 -1
- package/esm/schema/virtual_bank_account.schema.js +42 -10
- package/esm/schema/webhook_endpoint.schema.js +4 -0
- package/package.json +1 -1
- package/types/core.d.ts +10 -6
- package/types/index.d.ts +8 -1
- package/types/resources/BillingLineItem.d.ts +10 -0
- package/types/resources/BillingMetadata.d.ts +9 -0
- package/types/resources/Content.d.ts +5 -0
- package/types/resources/Discount.d.ts +1 -0
- package/types/resources/DraftRequest.d.ts +1 -1
- package/types/resources/Estimate.d.ts +3 -0
- package/types/resources/Event.d.ts +2 -0
- package/types/resources/GatewayRequestLog.d.ts +82 -0
- package/types/resources/GatewayWebhookLog.d.ts +74 -0
- package/types/resources/GrantBlock.d.ts +5 -0
- package/types/resources/HostedPage.d.ts +18 -0
- package/types/resources/Invoice.d.ts +4 -0
- package/types/resources/OrganizationDetail.d.ts +84 -0
- package/types/resources/Subscription.d.ts +3 -0
- package/types/resources/Usage.d.ts +1 -0
- package/types/resources/WebhookEvent.d.ts +10 -0
|
@@ -11,44 +11,126 @@ const ListOmnichannelSubscriptionSourceSchema = z.object({
|
|
|
11
11
|
.enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
|
|
12
12
|
.optional(),
|
|
13
13
|
in: z
|
|
14
|
-
.
|
|
14
|
+
.union([
|
|
15
|
+
z.array(z
|
|
16
|
+
.enum([
|
|
17
|
+
'apple_app_store',
|
|
18
|
+
'google_play_store',
|
|
19
|
+
'roku',
|
|
20
|
+
'amazon_app_store',
|
|
21
|
+
])
|
|
22
|
+
.optional()),
|
|
23
|
+
z.enum([
|
|
24
|
+
'apple_app_store',
|
|
25
|
+
'google_play_store',
|
|
26
|
+
'roku',
|
|
27
|
+
'amazon_app_store',
|
|
28
|
+
]),
|
|
29
|
+
])
|
|
15
30
|
.optional(),
|
|
16
31
|
not_in: z
|
|
17
|
-
.
|
|
32
|
+
.union([
|
|
33
|
+
z.array(z
|
|
34
|
+
.enum([
|
|
35
|
+
'apple_app_store',
|
|
36
|
+
'google_play_store',
|
|
37
|
+
'roku',
|
|
38
|
+
'amazon_app_store',
|
|
39
|
+
])
|
|
40
|
+
.optional()),
|
|
41
|
+
z.enum([
|
|
42
|
+
'apple_app_store',
|
|
43
|
+
'google_play_store',
|
|
44
|
+
'roku',
|
|
45
|
+
'amazon_app_store',
|
|
46
|
+
]),
|
|
47
|
+
])
|
|
18
48
|
.optional(),
|
|
19
49
|
});
|
|
20
50
|
const ListOmnichannelSubscriptionCustomerIdSchema = z.object({
|
|
21
51
|
is: z.string().min(1).optional(),
|
|
22
52
|
is_not: z.string().min(1).optional(),
|
|
23
53
|
starts_with: z.string().min(1).optional(),
|
|
24
|
-
in: z
|
|
25
|
-
|
|
54
|
+
in: z
|
|
55
|
+
.union([
|
|
56
|
+
z.array(z.string().optional()),
|
|
57
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
58
|
+
])
|
|
59
|
+
.optional(),
|
|
60
|
+
not_in: z
|
|
61
|
+
.union([
|
|
62
|
+
z.array(z.string().optional()),
|
|
63
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
64
|
+
])
|
|
65
|
+
.optional(),
|
|
26
66
|
});
|
|
27
67
|
const ListOmnichannelSubscriptionIdSchema = z.object({
|
|
28
68
|
is: z.string().min(1).optional(),
|
|
29
69
|
is_not: z.string().min(1).optional(),
|
|
30
70
|
starts_with: z.string().min(1).optional(),
|
|
31
|
-
in: z
|
|
32
|
-
|
|
71
|
+
in: z
|
|
72
|
+
.union([
|
|
73
|
+
z.array(z.string().optional()),
|
|
74
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
75
|
+
])
|
|
76
|
+
.optional(),
|
|
77
|
+
not_in: z
|
|
78
|
+
.union([
|
|
79
|
+
z.array(z.string().optional()),
|
|
80
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
81
|
+
])
|
|
82
|
+
.optional(),
|
|
33
83
|
});
|
|
34
84
|
const ListOmnichannelSubscriptionIdAtSourceSchema = z.object({
|
|
35
85
|
is: z.string().min(1).optional(),
|
|
36
86
|
is_not: z.string().min(1).optional(),
|
|
37
87
|
starts_with: z.string().min(1).optional(),
|
|
38
|
-
in: z
|
|
39
|
-
|
|
88
|
+
in: z
|
|
89
|
+
.union([
|
|
90
|
+
z.array(z.string().optional()),
|
|
91
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
92
|
+
])
|
|
93
|
+
.optional(),
|
|
94
|
+
not_in: z
|
|
95
|
+
.union([
|
|
96
|
+
z.array(z.string().optional()),
|
|
97
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
98
|
+
])
|
|
99
|
+
.optional(),
|
|
40
100
|
});
|
|
41
101
|
const ListOmnichannelSubscriptionUpdatedAtSchema = z.object({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
102
|
+
after: z
|
|
103
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
104
|
+
.optional(),
|
|
105
|
+
between: z
|
|
106
|
+
.union([
|
|
107
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
108
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
109
|
+
])
|
|
110
|
+
.optional(),
|
|
111
|
+
on: z
|
|
112
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
113
|
+
.optional(),
|
|
114
|
+
before: z
|
|
115
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
116
|
+
.optional(),
|
|
46
117
|
});
|
|
47
118
|
const ListOmnichannelSubscriptionPurchasedAtSchema = z.object({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
119
|
+
after: z
|
|
120
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
121
|
+
.optional(),
|
|
122
|
+
between: z
|
|
123
|
+
.union([
|
|
124
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
125
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
126
|
+
])
|
|
127
|
+
.optional(),
|
|
128
|
+
on: z
|
|
129
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
130
|
+
.optional(),
|
|
131
|
+
before: z
|
|
132
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
133
|
+
.optional(),
|
|
52
134
|
});
|
|
53
135
|
const ListOmnichannelSubscriptionSortBySchema = z.looseObject({
|
|
54
136
|
asc: z.enum(['created_at', 'updated_at']).optional(),
|
|
@@ -76,23 +158,47 @@ const ListOmnichannelSubscriptionStatusSchema = z.object({
|
|
|
76
158
|
])
|
|
77
159
|
.optional(),
|
|
78
160
|
in: z
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
161
|
+
.union([
|
|
162
|
+
z.array(z
|
|
163
|
+
.enum([
|
|
164
|
+
'active',
|
|
165
|
+
'expired',
|
|
166
|
+
'cancelled',
|
|
167
|
+
'in_dunning',
|
|
168
|
+
'in_grace_period',
|
|
169
|
+
'paused',
|
|
170
|
+
])
|
|
171
|
+
.optional()),
|
|
172
|
+
z.enum([
|
|
173
|
+
'active',
|
|
174
|
+
'expired',
|
|
175
|
+
'cancelled',
|
|
176
|
+
'in_dunning',
|
|
177
|
+
'in_grace_period',
|
|
178
|
+
'paused',
|
|
179
|
+
]),
|
|
86
180
|
])
|
|
87
181
|
.optional(),
|
|
88
182
|
not_in: z
|
|
89
|
-
.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
183
|
+
.union([
|
|
184
|
+
z.array(z
|
|
185
|
+
.enum([
|
|
186
|
+
'active',
|
|
187
|
+
'expired',
|
|
188
|
+
'cancelled',
|
|
189
|
+
'in_dunning',
|
|
190
|
+
'in_grace_period',
|
|
191
|
+
'paused',
|
|
192
|
+
])
|
|
193
|
+
.optional()),
|
|
194
|
+
z.enum([
|
|
195
|
+
'active',
|
|
196
|
+
'expired',
|
|
197
|
+
'cancelled',
|
|
198
|
+
'in_dunning',
|
|
199
|
+
'in_grace_period',
|
|
200
|
+
'paused',
|
|
201
|
+
]),
|
|
96
202
|
])
|
|
97
203
|
.optional(),
|
|
98
204
|
});
|
|
@@ -36,6 +36,22 @@ const UpdateOrderShippingAddressSchema = z.object({
|
|
|
36
36
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
37
37
|
.optional(),
|
|
38
38
|
});
|
|
39
|
+
const UpdateOrderOrderLineItemsItemSchema = z.object({
|
|
40
|
+
id: z.string().max(40).optional(),
|
|
41
|
+
status: z
|
|
42
|
+
.enum([
|
|
43
|
+
'queued',
|
|
44
|
+
'awaiting_shipment',
|
|
45
|
+
'on_hold',
|
|
46
|
+
'delivered',
|
|
47
|
+
'shipped',
|
|
48
|
+
'partially_delivered',
|
|
49
|
+
'returned',
|
|
50
|
+
'cancelled',
|
|
51
|
+
])
|
|
52
|
+
.optional(),
|
|
53
|
+
sku: z.string().max(250).optional(),
|
|
54
|
+
});
|
|
39
55
|
const UpdateOrderOrderLineItemsSchema = z.object({
|
|
40
56
|
id: z.array(z.string().max(40).optional()).optional(),
|
|
41
57
|
status: z
|
|
@@ -102,7 +118,12 @@ const UpdateOrderBodySchema = z.looseObject({
|
|
|
102
118
|
])
|
|
103
119
|
.optional(),
|
|
104
120
|
shipping_address: UpdateOrderShippingAddressSchema.optional(),
|
|
105
|
-
order_line_items:
|
|
121
|
+
order_line_items: z
|
|
122
|
+
.union([
|
|
123
|
+
z.array(UpdateOrderOrderLineItemsItemSchema.optional()),
|
|
124
|
+
UpdateOrderOrderLineItemsSchema,
|
|
125
|
+
])
|
|
126
|
+
.optional(),
|
|
106
127
|
});
|
|
107
128
|
export { UpdateOrderBodySchema };
|
|
108
129
|
//Order.importOrder
|
|
@@ -256,15 +277,35 @@ const ListOrderIdSchema = z.object({
|
|
|
256
277
|
is: z.string().min(1).optional(),
|
|
257
278
|
is_not: z.string().min(1).optional(),
|
|
258
279
|
starts_with: z.string().min(1).optional(),
|
|
259
|
-
in: z
|
|
260
|
-
|
|
280
|
+
in: z
|
|
281
|
+
.union([
|
|
282
|
+
z.array(z.string().optional()),
|
|
283
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
284
|
+
])
|
|
285
|
+
.optional(),
|
|
286
|
+
not_in: z
|
|
287
|
+
.union([
|
|
288
|
+
z.array(z.string().optional()),
|
|
289
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
290
|
+
])
|
|
291
|
+
.optional(),
|
|
261
292
|
});
|
|
262
293
|
const ListOrderInvoiceIdSchema = z.object({
|
|
263
294
|
is: z.string().min(1).optional(),
|
|
264
295
|
is_not: z.string().min(1).optional(),
|
|
265
296
|
starts_with: z.string().min(1).optional(),
|
|
266
|
-
in: z
|
|
267
|
-
|
|
297
|
+
in: z
|
|
298
|
+
.union([
|
|
299
|
+
z.array(z.string().optional()),
|
|
300
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
301
|
+
])
|
|
302
|
+
.optional(),
|
|
303
|
+
not_in: z
|
|
304
|
+
.union([
|
|
305
|
+
z.array(z.string().optional()),
|
|
306
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
307
|
+
])
|
|
308
|
+
.optional(),
|
|
268
309
|
});
|
|
269
310
|
const ListOrderSubscriptionIdSchema = z.object({
|
|
270
311
|
is: z.string().min(1).optional(),
|
|
@@ -305,88 +346,210 @@ const ListOrderStatusSchema = z.object({
|
|
|
305
346
|
])
|
|
306
347
|
.optional(),
|
|
307
348
|
in: z
|
|
308
|
-
.
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
349
|
+
.union([
|
|
350
|
+
z.array(z
|
|
351
|
+
.enum([
|
|
352
|
+
'new',
|
|
353
|
+
'processing',
|
|
354
|
+
'complete',
|
|
355
|
+
'cancelled',
|
|
356
|
+
'voided',
|
|
357
|
+
'queued',
|
|
358
|
+
'awaiting_shipment',
|
|
359
|
+
'on_hold',
|
|
360
|
+
'delivered',
|
|
361
|
+
'shipped',
|
|
362
|
+
'partially_delivered',
|
|
363
|
+
'returned',
|
|
364
|
+
])
|
|
365
|
+
.optional()),
|
|
366
|
+
z.enum([
|
|
367
|
+
'new',
|
|
368
|
+
'processing',
|
|
369
|
+
'complete',
|
|
370
|
+
'cancelled',
|
|
371
|
+
'voided',
|
|
372
|
+
'queued',
|
|
373
|
+
'awaiting_shipment',
|
|
374
|
+
'on_hold',
|
|
375
|
+
'delivered',
|
|
376
|
+
'shipped',
|
|
377
|
+
'partially_delivered',
|
|
378
|
+
'returned',
|
|
379
|
+
]),
|
|
321
380
|
])
|
|
322
381
|
.optional(),
|
|
323
382
|
not_in: z
|
|
324
|
-
.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
383
|
+
.union([
|
|
384
|
+
z.array(z
|
|
385
|
+
.enum([
|
|
386
|
+
'new',
|
|
387
|
+
'processing',
|
|
388
|
+
'complete',
|
|
389
|
+
'cancelled',
|
|
390
|
+
'voided',
|
|
391
|
+
'queued',
|
|
392
|
+
'awaiting_shipment',
|
|
393
|
+
'on_hold',
|
|
394
|
+
'delivered',
|
|
395
|
+
'shipped',
|
|
396
|
+
'partially_delivered',
|
|
397
|
+
'returned',
|
|
398
|
+
])
|
|
399
|
+
.optional()),
|
|
400
|
+
z.enum([
|
|
401
|
+
'new',
|
|
402
|
+
'processing',
|
|
403
|
+
'complete',
|
|
404
|
+
'cancelled',
|
|
405
|
+
'voided',
|
|
406
|
+
'queued',
|
|
407
|
+
'awaiting_shipment',
|
|
408
|
+
'on_hold',
|
|
409
|
+
'delivered',
|
|
410
|
+
'shipped',
|
|
411
|
+
'partially_delivered',
|
|
412
|
+
'returned',
|
|
413
|
+
]),
|
|
337
414
|
])
|
|
338
415
|
.optional(),
|
|
339
416
|
});
|
|
340
417
|
const ListOrderShippingDateSchema = z.object({
|
|
341
|
-
after: z
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
418
|
+
after: z
|
|
419
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
420
|
+
.optional(),
|
|
421
|
+
before: z
|
|
422
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
423
|
+
.optional(),
|
|
424
|
+
on: z
|
|
425
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
426
|
+
.optional(),
|
|
427
|
+
between: z
|
|
428
|
+
.union([
|
|
429
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
430
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
431
|
+
])
|
|
432
|
+
.optional(),
|
|
345
433
|
});
|
|
346
434
|
const ListOrderShippedAtSchema = z.object({
|
|
347
|
-
after: z
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
435
|
+
after: z
|
|
436
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
437
|
+
.optional(),
|
|
438
|
+
before: z
|
|
439
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
440
|
+
.optional(),
|
|
441
|
+
on: z
|
|
442
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
443
|
+
.optional(),
|
|
444
|
+
between: z
|
|
445
|
+
.union([
|
|
446
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
447
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
448
|
+
])
|
|
449
|
+
.optional(),
|
|
351
450
|
});
|
|
352
451
|
const ListOrderOrderTypeSchema = z.object({
|
|
353
452
|
is: z.enum(['manual', 'system_generated']).optional(),
|
|
354
453
|
is_not: z.enum(['manual', 'system_generated']).optional(),
|
|
355
|
-
in: z
|
|
356
|
-
|
|
454
|
+
in: z
|
|
455
|
+
.union([
|
|
456
|
+
z.array(z.enum(['manual', 'system_generated']).optional()),
|
|
457
|
+
z.enum(['manual', 'system_generated']),
|
|
458
|
+
])
|
|
459
|
+
.optional(),
|
|
460
|
+
not_in: z
|
|
461
|
+
.union([
|
|
462
|
+
z.array(z.enum(['manual', 'system_generated']).optional()),
|
|
463
|
+
z.enum(['manual', 'system_generated']),
|
|
464
|
+
])
|
|
465
|
+
.optional(),
|
|
357
466
|
});
|
|
358
467
|
const ListOrderOrderDateSchema = z.object({
|
|
359
|
-
after: z
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
468
|
+
after: z
|
|
469
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
470
|
+
.optional(),
|
|
471
|
+
before: z
|
|
472
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
473
|
+
.optional(),
|
|
474
|
+
on: z
|
|
475
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
476
|
+
.optional(),
|
|
477
|
+
between: z
|
|
478
|
+
.union([
|
|
479
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
480
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
481
|
+
])
|
|
482
|
+
.optional(),
|
|
363
483
|
});
|
|
364
484
|
const ListOrderPaidOnSchema = z.object({
|
|
365
|
-
after: z
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
485
|
+
after: z
|
|
486
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
487
|
+
.optional(),
|
|
488
|
+
before: z
|
|
489
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
490
|
+
.optional(),
|
|
491
|
+
on: z
|
|
492
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
493
|
+
.optional(),
|
|
494
|
+
between: z
|
|
495
|
+
.union([
|
|
496
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
497
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
498
|
+
])
|
|
499
|
+
.optional(),
|
|
369
500
|
});
|
|
370
501
|
const ListOrderUpdatedAtSchema = z.object({
|
|
371
|
-
after: z
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
502
|
+
after: z
|
|
503
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
504
|
+
.optional(),
|
|
505
|
+
before: z
|
|
506
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
507
|
+
.optional(),
|
|
508
|
+
on: z
|
|
509
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
510
|
+
.optional(),
|
|
511
|
+
between: z
|
|
512
|
+
.union([
|
|
513
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
514
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
515
|
+
])
|
|
516
|
+
.optional(),
|
|
375
517
|
});
|
|
376
518
|
const ListOrderCreatedAtSchema = z.object({
|
|
377
|
-
after: z
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
519
|
+
after: z
|
|
520
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
521
|
+
.optional(),
|
|
522
|
+
before: z
|
|
523
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
524
|
+
.optional(),
|
|
525
|
+
on: z
|
|
526
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
527
|
+
.optional(),
|
|
528
|
+
between: z
|
|
529
|
+
.union([
|
|
530
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
531
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
532
|
+
])
|
|
533
|
+
.optional(),
|
|
381
534
|
});
|
|
382
535
|
const ListOrderResentStatusSchema = z.object({
|
|
383
536
|
is: z.enum(['fully_resent', 'partially_resent']).optional(),
|
|
384
537
|
is_not: z.enum(['fully_resent', 'partially_resent']).optional(),
|
|
385
|
-
in: z
|
|
386
|
-
|
|
538
|
+
in: z
|
|
539
|
+
.union([
|
|
540
|
+
z.array(z.enum(['fully_resent', 'partially_resent']).optional()),
|
|
541
|
+
z.enum(['fully_resent', 'partially_resent']),
|
|
542
|
+
])
|
|
543
|
+
.optional(),
|
|
544
|
+
not_in: z
|
|
545
|
+
.union([
|
|
546
|
+
z.array(z.enum(['fully_resent', 'partially_resent']).optional()),
|
|
547
|
+
z.enum(['fully_resent', 'partially_resent']),
|
|
548
|
+
])
|
|
549
|
+
.optional(),
|
|
387
550
|
});
|
|
388
551
|
const ListOrderIsResentSchema = z.object({
|
|
389
|
-
is: z.enum(['true', 'false']).optional(),
|
|
552
|
+
is: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
390
553
|
});
|
|
391
554
|
const ListOrderOriginalOrderIdSchema = z.object({
|
|
392
555
|
is: z.string().min(1).optional(),
|
|
@@ -426,6 +589,10 @@ const OrdersForInvoiceOrderBodySchema = z.looseObject({
|
|
|
426
589
|
});
|
|
427
590
|
export { OrdersForInvoiceOrderBodySchema };
|
|
428
591
|
//Order.resend
|
|
592
|
+
const ResendOrderOrderLineItemsItemSchema = z.object({
|
|
593
|
+
id: z.string().max(40).optional(),
|
|
594
|
+
fulfillment_quantity: z.number().int().min(0).optional(),
|
|
595
|
+
});
|
|
429
596
|
const ResendOrderOrderLineItemsSchema = z.object({
|
|
430
597
|
id: z.array(z.string().max(40).optional()).optional(),
|
|
431
598
|
fulfillment_quantity: z.array(z.number().int().min(0).optional()).optional(),
|
|
@@ -433,6 +600,11 @@ const ResendOrderOrderLineItemsSchema = z.object({
|
|
|
433
600
|
const ResendOrderBodySchema = z.looseObject({
|
|
434
601
|
shipping_date: z.number().int().optional(),
|
|
435
602
|
resend_reason: z.string().max(100).optional(),
|
|
436
|
-
order_line_items:
|
|
603
|
+
order_line_items: z
|
|
604
|
+
.union([
|
|
605
|
+
z.array(ResendOrderOrderLineItemsItemSchema.optional()),
|
|
606
|
+
ResendOrderOrderLineItemsSchema,
|
|
607
|
+
])
|
|
608
|
+
.optional(),
|
|
437
609
|
});
|
|
438
610
|
export { ResendOrderBodySchema };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Generated Zod schemas: OrganizationDetail
|
|
2
|
+
// Actions: create, list
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//OrganizationDetail.create
|
|
6
|
+
const CreateOrganizationDetailBodySchema = z.looseObject({
|
|
7
|
+
organization_name: z.string().max(100),
|
|
8
|
+
email: z.string().email().max(70).optional(),
|
|
9
|
+
address_line1: z.string().max(180),
|
|
10
|
+
address_line2: z.string().max(150).optional(),
|
|
11
|
+
address_line3: z.string().max(150).optional(),
|
|
12
|
+
city: z.string().max(50),
|
|
13
|
+
state_code: z.string().max(50).optional(),
|
|
14
|
+
state: z.string().max(50),
|
|
15
|
+
zip: z.string().max(20),
|
|
16
|
+
country_code: z.string().max(50).optional(),
|
|
17
|
+
phone: z.string().max(20),
|
|
18
|
+
fax: z.string().max(20).optional(),
|
|
19
|
+
website: z.string().max(200).optional(),
|
|
20
|
+
is_vat_number_present: z.boolean().optional(),
|
|
21
|
+
vat_number: z.string().max(20).optional(),
|
|
22
|
+
});
|
|
23
|
+
export { CreateOrganizationDetailBodySchema };
|
|
24
|
+
//OrganizationDetail.list
|
|
25
|
+
const ListOrganizationDetailBusinessEntityIdSchema = z.object({
|
|
26
|
+
is: z.string().min(1).optional(),
|
|
27
|
+
});
|
|
28
|
+
const ListOrganizationDetailBodySchema = z.looseObject({
|
|
29
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
30
|
+
offset: z.string().max(1000).optional(),
|
|
31
|
+
business_entity_id: ListOrganizationDetailBusinessEntityIdSchema.optional(),
|
|
32
|
+
});
|
|
33
|
+
export { ListOrganizationDetailBodySchema };
|
|
@@ -7,21 +7,52 @@ const ListPaymentScheduleInvoiceIdSchema = z.object({
|
|
|
7
7
|
is: z.string().min(1).optional(),
|
|
8
8
|
is_not: z.string().min(1).optional(),
|
|
9
9
|
starts_with: z.string().min(1).optional(),
|
|
10
|
-
in: z
|
|
11
|
-
|
|
10
|
+
in: z
|
|
11
|
+
.union([
|
|
12
|
+
z.array(z.string().optional()),
|
|
13
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
14
|
+
])
|
|
15
|
+
.optional(),
|
|
16
|
+
not_in: z
|
|
17
|
+
.union([
|
|
18
|
+
z.array(z.string().optional()),
|
|
19
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
20
|
+
])
|
|
21
|
+
.optional(),
|
|
12
22
|
});
|
|
13
23
|
const ListPaymentScheduleIdSchema = z.object({
|
|
14
24
|
is: z.string().min(1).optional(),
|
|
15
25
|
is_not: z.string().min(1).optional(),
|
|
16
26
|
starts_with: z.string().min(1).optional(),
|
|
17
|
-
in: z
|
|
18
|
-
|
|
27
|
+
in: z
|
|
28
|
+
.union([
|
|
29
|
+
z.array(z.string().optional()),
|
|
30
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
31
|
+
])
|
|
32
|
+
.optional(),
|
|
33
|
+
not_in: z
|
|
34
|
+
.union([
|
|
35
|
+
z.array(z.string().optional()),
|
|
36
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
37
|
+
])
|
|
38
|
+
.optional(),
|
|
19
39
|
});
|
|
20
40
|
const ListPaymentScheduleUpdatedAtSchema = z.object({
|
|
21
|
-
after: z
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
41
|
+
after: z
|
|
42
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
43
|
+
.optional(),
|
|
44
|
+
before: z
|
|
45
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
46
|
+
.optional(),
|
|
47
|
+
on: z
|
|
48
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
49
|
+
.optional(),
|
|
50
|
+
between: z
|
|
51
|
+
.union([
|
|
52
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
53
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
54
|
+
])
|
|
55
|
+
.optional(),
|
|
25
56
|
});
|
|
26
57
|
const ListPaymentScheduleBodySchema = z.looseObject({
|
|
27
58
|
limit: z.number().int().min(1).max(100).optional(),
|