@ecomiq/core 1.0.0 → 1.1.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/dist/client.cjs +1 -1
- package/dist/client.js +1 -1
- package/dist/index.cjs +13 -2
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -4
- package/dist/models/customer-order.cjs +3 -1
- package/dist/models/customer-order.d.cts +45 -0
- package/dist/models/customer-order.d.ts +45 -0
- package/dist/models/customer-order.js +3 -1
- package/dist/models/{order-draft-PFBZfRRR.cjs → order-draft-C-2WRbjl.cjs} +3 -1
- package/dist/models/{order-draft-CnHJ0btL.js → order-draft-CSIWRIV0.js} +3 -1
- package/dist/models/order-draft.d.cts +18 -0
- package/dist/models/order-draft.d.ts +18 -0
- package/dist/models/order-status.d.cts +9 -0
- package/dist/models/order-status.d.ts +9 -0
- package/dist/models/personalization-BPFmkdJ0.js +69 -0
- package/dist/models/personalization-CQosKg8O.cjs +77 -0
- package/dist/models/personalization.d.cts +83 -0
- package/dist/models/personalization.d.ts +83 -0
- package/dist/models/products.cjs +4 -1
- package/dist/models/products.d.cts +35 -0
- package/dist/models/products.d.ts +35 -0
- package/dist/models/products.js +4 -1
- package/dist/models/storefront-cart.cjs +11 -3
- package/dist/models/storefront-cart.d.cts +33 -2
- package/dist/models/storefront-cart.d.ts +33 -2
- package/dist/models/storefront-cart.js +11 -4
- package/dist/models/storefront-checkout.d.cts +18 -0
- package/dist/models/storefront-checkout.d.ts +18 -0
- package/dist/models/urls.d.cts +32 -0
- package/dist/models/urls.d.ts +32 -0
- package/dist/services/cart.service.d.cts +45 -0
- package/dist/services/cart.service.d.ts +45 -0
- package/dist/services/checkout.service.d.cts +36 -0
- package/dist/services/checkout.service.d.ts +36 -0
- package/dist/services/{order-draft.service-DYPR_pcV.js → order-draft.service-B0VcmWhn.js} +1 -1
- package/dist/services/{order-draft.service-D9gy-OPr.cjs → order-draft.service-Dlu6eEkV.cjs} +1 -1
- package/dist/services/product.service.d.cts +25 -0
- package/dist/services/product.service.d.ts +25 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DiscountAmountSchema } from "./amounts-cKBCecl7.js";
|
|
2
2
|
import { CartTokenSchema, EntityIdSchema, NullableEntityIdSchema } from "./ids.js";
|
|
3
|
+
import { ItemModifierSchema } from "./personalization-BPFmkdJ0.js";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
// src/models/storefront-cart.ts
|
|
5
6
|
const CartShippingMethodTypeSchema = z.enum([
|
|
@@ -56,7 +57,8 @@ const StorefrontCartItemSchema = z.object({
|
|
|
56
57
|
requiresShipping: z.boolean(),
|
|
57
58
|
sellerId: NullableEntityIdSchema,
|
|
58
59
|
sellerName: z.string().nullable(),
|
|
59
|
-
orderBumpId: NullableEntityIdSchema
|
|
60
|
+
orderBumpId: NullableEntityIdSchema,
|
|
61
|
+
modifiers: z.array(ItemModifierSchema)
|
|
60
62
|
});
|
|
61
63
|
const StorefrontCartShippingMethodSchema = z.object({
|
|
62
64
|
id: EntityIdSchema,
|
|
@@ -130,10 +132,15 @@ const CreateCartParamsSchema = z.object({
|
|
|
130
132
|
email: z.string().email().optional()
|
|
131
133
|
});
|
|
132
134
|
const GetCartParamsSchema = z.object({ cartToken: CartTokenSchema });
|
|
135
|
+
const CartItemModifierOptionSchema = z.object({
|
|
136
|
+
optionId: EntityIdSchema,
|
|
137
|
+
quantity: z.number().int().min(1).max(99).optional()
|
|
138
|
+
});
|
|
133
139
|
const CartItemModifierSchema = z.object({
|
|
134
140
|
modifierGroupId: EntityIdSchema,
|
|
135
|
-
|
|
136
|
-
|
|
141
|
+
options: z.array(CartItemModifierOptionSchema).min(1).optional(),
|
|
142
|
+
value: z.string().trim().min(1).max(500).optional()
|
|
143
|
+
}).refine((modifier) => modifier.options === void 0 !== (modifier.value === void 0), { message: "Send the chosen options or the typed value, not both." });
|
|
137
144
|
const AddCartItemParamsSchema = z.object({
|
|
138
145
|
cartToken: CartTokenSchema,
|
|
139
146
|
variantId: EntityIdSchema,
|
|
@@ -151,4 +158,4 @@ const RemoveCartItemParamsSchema = z.object({
|
|
|
151
158
|
cartToken: CartTokenSchema,
|
|
152
159
|
cartItemId: EntityIdSchema
|
|
153
160
|
});
|
|
154
|
-
export { AddCartItemParamsSchema, CartItemModifierSchema, CartShippingMethodTypeSchema, CreateCartParamsSchema, GetCartParamsSchema, RemoveCartItemParamsSchema, ShippingMethodTargetSelectionSchema, StorefrontAddressSchema, StorefrontCartBundleItemSchema, StorefrontCartItemSchema, StorefrontCartSchema, StorefrontCartShippingMethodSchema, StorefrontCartStatusSchema, StorefrontCartTotalsSchema, StorefrontInvoiceTypeSchema, UpdateCartItemQuantityParamsSchema };
|
|
161
|
+
export { AddCartItemParamsSchema, CartItemModifierOptionSchema, CartItemModifierSchema, CartShippingMethodTypeSchema, CreateCartParamsSchema, GetCartParamsSchema, RemoveCartItemParamsSchema, ShippingMethodTargetSelectionSchema, StorefrontAddressSchema, StorefrontCartBundleItemSchema, StorefrontCartItemSchema, StorefrontCartSchema, StorefrontCartShippingMethodSchema, StorefrontCartStatusSchema, StorefrontCartTotalsSchema, StorefrontInvoiceTypeSchema, UpdateCartItemQuantityParamsSchema };
|
|
@@ -264,6 +264,15 @@ export declare const CartCheckoutReadResponseSchema: z.ZodObject<{
|
|
|
264
264
|
sellerId: z.ZodNullable<z.ZodString>;
|
|
265
265
|
sellerName: z.ZodNullable<z.ZodString>;
|
|
266
266
|
orderBumpId: z.ZodNullable<z.ZodString>;
|
|
267
|
+
modifiers: z.ZodArray<z.ZodObject<{
|
|
268
|
+
modifierGroupId: z.ZodString;
|
|
269
|
+
modifierGroupName: z.ZodString;
|
|
270
|
+
modifierOptionId: z.ZodNullable<z.ZodString>;
|
|
271
|
+
modifierOptionName: z.ZodNullable<z.ZodString>;
|
|
272
|
+
value: z.ZodNullable<z.ZodString>;
|
|
273
|
+
quantity: z.ZodNumber;
|
|
274
|
+
priceDelta: z.ZodNumber;
|
|
275
|
+
}, z.core.$strip>>;
|
|
267
276
|
}, z.core.$strip>>;
|
|
268
277
|
shippingMethods: z.ZodArray<z.ZodObject<{
|
|
269
278
|
id: z.ZodString;
|
|
@@ -518,6 +527,15 @@ export declare const CartCheckoutResponseSchema: z.ZodObject<{
|
|
|
518
527
|
sellerId: z.ZodNullable<z.ZodString>;
|
|
519
528
|
sellerName: z.ZodNullable<z.ZodString>;
|
|
520
529
|
orderBumpId: z.ZodNullable<z.ZodString>;
|
|
530
|
+
modifiers: z.ZodArray<z.ZodObject<{
|
|
531
|
+
modifierGroupId: z.ZodString;
|
|
532
|
+
modifierGroupName: z.ZodString;
|
|
533
|
+
modifierOptionId: z.ZodNullable<z.ZodString>;
|
|
534
|
+
modifierOptionName: z.ZodNullable<z.ZodString>;
|
|
535
|
+
value: z.ZodNullable<z.ZodString>;
|
|
536
|
+
quantity: z.ZodNumber;
|
|
537
|
+
priceDelta: z.ZodNumber;
|
|
538
|
+
}, z.core.$strip>>;
|
|
521
539
|
}, z.core.$strip>>;
|
|
522
540
|
shippingMethods: z.ZodArray<z.ZodObject<{
|
|
523
541
|
id: z.ZodString;
|
|
@@ -264,6 +264,15 @@ export declare const CartCheckoutReadResponseSchema: z.ZodObject<{
|
|
|
264
264
|
sellerId: z.ZodNullable<z.ZodString>;
|
|
265
265
|
sellerName: z.ZodNullable<z.ZodString>;
|
|
266
266
|
orderBumpId: z.ZodNullable<z.ZodString>;
|
|
267
|
+
modifiers: z.ZodArray<z.ZodObject<{
|
|
268
|
+
modifierGroupId: z.ZodString;
|
|
269
|
+
modifierGroupName: z.ZodString;
|
|
270
|
+
modifierOptionId: z.ZodNullable<z.ZodString>;
|
|
271
|
+
modifierOptionName: z.ZodNullable<z.ZodString>;
|
|
272
|
+
value: z.ZodNullable<z.ZodString>;
|
|
273
|
+
quantity: z.ZodNumber;
|
|
274
|
+
priceDelta: z.ZodNumber;
|
|
275
|
+
}, z.core.$strip>>;
|
|
267
276
|
}, z.core.$strip>>;
|
|
268
277
|
shippingMethods: z.ZodArray<z.ZodObject<{
|
|
269
278
|
id: z.ZodString;
|
|
@@ -518,6 +527,15 @@ export declare const CartCheckoutResponseSchema: z.ZodObject<{
|
|
|
518
527
|
sellerId: z.ZodNullable<z.ZodString>;
|
|
519
528
|
sellerName: z.ZodNullable<z.ZodString>;
|
|
520
529
|
orderBumpId: z.ZodNullable<z.ZodString>;
|
|
530
|
+
modifiers: z.ZodArray<z.ZodObject<{
|
|
531
|
+
modifierGroupId: z.ZodString;
|
|
532
|
+
modifierGroupName: z.ZodString;
|
|
533
|
+
modifierOptionId: z.ZodNullable<z.ZodString>;
|
|
534
|
+
modifierOptionName: z.ZodNullable<z.ZodString>;
|
|
535
|
+
value: z.ZodNullable<z.ZodString>;
|
|
536
|
+
quantity: z.ZodNumber;
|
|
537
|
+
priceDelta: z.ZodNumber;
|
|
538
|
+
}, z.core.$strip>>;
|
|
521
539
|
}, z.core.$strip>>;
|
|
522
540
|
shippingMethods: z.ZodArray<z.ZodObject<{
|
|
523
541
|
id: z.ZodString;
|
package/dist/models/urls.d.cts
CHANGED
|
@@ -137,6 +137,38 @@ export declare const UrlResolutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
137
137
|
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
138
138
|
unitPrice: z.ZodNumber;
|
|
139
139
|
}, z.core.$strip>>;
|
|
140
|
+
modifierGroups: z.ZodArray<z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
name: z.ZodString;
|
|
143
|
+
description: z.ZodNullable<z.ZodString>;
|
|
144
|
+
selectionType: z.ZodEnum<{
|
|
145
|
+
multiple: "multiple";
|
|
146
|
+
single: "single";
|
|
147
|
+
text: "text";
|
|
148
|
+
}>;
|
|
149
|
+
display: z.ZodEnum<{
|
|
150
|
+
color: "color";
|
|
151
|
+
font: "font";
|
|
152
|
+
image: "image";
|
|
153
|
+
list: "list";
|
|
154
|
+
}>;
|
|
155
|
+
isRequired: z.ZodBoolean;
|
|
156
|
+
minSelections: z.ZodNumber;
|
|
157
|
+
maxSelections: z.ZodNullable<z.ZodNumber>;
|
|
158
|
+
maxLength: z.ZodNullable<z.ZodNumber>;
|
|
159
|
+
priceDelta: z.ZodNumber;
|
|
160
|
+
options: z.ZodArray<z.ZodObject<{
|
|
161
|
+
id: z.ZodString;
|
|
162
|
+
name: z.ZodString;
|
|
163
|
+
priceDelta: z.ZodNumber;
|
|
164
|
+
isDefault: z.ZodBoolean;
|
|
165
|
+
color: z.ZodNullable<z.ZodString>;
|
|
166
|
+
fileUrl: z.ZodNullable<z.ZodString>;
|
|
167
|
+
fileName: z.ZodNullable<z.ZodString>;
|
|
168
|
+
tag: z.ZodNullable<z.ZodString>;
|
|
169
|
+
maxQuantity: z.ZodNumber;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
}, z.core.$strip>>;
|
|
140
172
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
141
173
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
142
174
|
seller: z.ZodNullable<z.ZodObject<{
|
package/dist/models/urls.d.ts
CHANGED
|
@@ -137,6 +137,38 @@ export declare const UrlResolutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
137
137
|
maxQuantity: z.ZodNullable<z.ZodNumber>;
|
|
138
138
|
unitPrice: z.ZodNumber;
|
|
139
139
|
}, z.core.$strip>>;
|
|
140
|
+
modifierGroups: z.ZodArray<z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
name: z.ZodString;
|
|
143
|
+
description: z.ZodNullable<z.ZodString>;
|
|
144
|
+
selectionType: z.ZodEnum<{
|
|
145
|
+
multiple: "multiple";
|
|
146
|
+
single: "single";
|
|
147
|
+
text: "text";
|
|
148
|
+
}>;
|
|
149
|
+
display: z.ZodEnum<{
|
|
150
|
+
color: "color";
|
|
151
|
+
font: "font";
|
|
152
|
+
image: "image";
|
|
153
|
+
list: "list";
|
|
154
|
+
}>;
|
|
155
|
+
isRequired: z.ZodBoolean;
|
|
156
|
+
minSelections: z.ZodNumber;
|
|
157
|
+
maxSelections: z.ZodNullable<z.ZodNumber>;
|
|
158
|
+
maxLength: z.ZodNullable<z.ZodNumber>;
|
|
159
|
+
priceDelta: z.ZodNumber;
|
|
160
|
+
options: z.ZodArray<z.ZodObject<{
|
|
161
|
+
id: z.ZodString;
|
|
162
|
+
name: z.ZodString;
|
|
163
|
+
priceDelta: z.ZodNumber;
|
|
164
|
+
isDefault: z.ZodBoolean;
|
|
165
|
+
color: z.ZodNullable<z.ZodString>;
|
|
166
|
+
fileUrl: z.ZodNullable<z.ZodString>;
|
|
167
|
+
fileName: z.ZodNullable<z.ZodString>;
|
|
168
|
+
tag: z.ZodNullable<z.ZodString>;
|
|
169
|
+
maxQuantity: z.ZodNumber;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
}, z.core.$strip>>;
|
|
140
172
|
createdAt: z.ZodNullable<z.ZodString>;
|
|
141
173
|
updatedAt: z.ZodNullable<z.ZodString>;
|
|
142
174
|
seller: z.ZodNullable<z.ZodObject<{
|
|
@@ -69,6 +69,15 @@ export declare function createCart(api: Api, params: CreateCartParams): Promise<
|
|
|
69
69
|
sellerId: string | null;
|
|
70
70
|
sellerName: string | null;
|
|
71
71
|
orderBumpId: string | null;
|
|
72
|
+
modifiers: {
|
|
73
|
+
modifierGroupId: string;
|
|
74
|
+
modifierGroupName: string;
|
|
75
|
+
modifierOptionId: string | null;
|
|
76
|
+
modifierOptionName: string | null;
|
|
77
|
+
value: string | null;
|
|
78
|
+
quantity: number;
|
|
79
|
+
priceDelta: number;
|
|
80
|
+
}[];
|
|
72
81
|
}[];
|
|
73
82
|
shippingMethods: {
|
|
74
83
|
id: string;
|
|
@@ -174,6 +183,15 @@ export declare function getCart(api: Api, params: GetCartParams): Promise<{
|
|
|
174
183
|
sellerId: string | null;
|
|
175
184
|
sellerName: string | null;
|
|
176
185
|
orderBumpId: string | null;
|
|
186
|
+
modifiers: {
|
|
187
|
+
modifierGroupId: string;
|
|
188
|
+
modifierGroupName: string;
|
|
189
|
+
modifierOptionId: string | null;
|
|
190
|
+
modifierOptionName: string | null;
|
|
191
|
+
value: string | null;
|
|
192
|
+
quantity: number;
|
|
193
|
+
priceDelta: number;
|
|
194
|
+
}[];
|
|
177
195
|
}[];
|
|
178
196
|
shippingMethods: {
|
|
179
197
|
id: string;
|
|
@@ -279,6 +297,15 @@ export declare function addCartItem(api: Api, params: AddCartItemParams): Promis
|
|
|
279
297
|
sellerId: string | null;
|
|
280
298
|
sellerName: string | null;
|
|
281
299
|
orderBumpId: string | null;
|
|
300
|
+
modifiers: {
|
|
301
|
+
modifierGroupId: string;
|
|
302
|
+
modifierGroupName: string;
|
|
303
|
+
modifierOptionId: string | null;
|
|
304
|
+
modifierOptionName: string | null;
|
|
305
|
+
value: string | null;
|
|
306
|
+
quantity: number;
|
|
307
|
+
priceDelta: number;
|
|
308
|
+
}[];
|
|
282
309
|
}[];
|
|
283
310
|
shippingMethods: {
|
|
284
311
|
id: string;
|
|
@@ -384,6 +411,15 @@ export declare function updateCartItemQuantity(api: Api, params: UpdateCartItemQ
|
|
|
384
411
|
sellerId: string | null;
|
|
385
412
|
sellerName: string | null;
|
|
386
413
|
orderBumpId: string | null;
|
|
414
|
+
modifiers: {
|
|
415
|
+
modifierGroupId: string;
|
|
416
|
+
modifierGroupName: string;
|
|
417
|
+
modifierOptionId: string | null;
|
|
418
|
+
modifierOptionName: string | null;
|
|
419
|
+
value: string | null;
|
|
420
|
+
quantity: number;
|
|
421
|
+
priceDelta: number;
|
|
422
|
+
}[];
|
|
387
423
|
}[];
|
|
388
424
|
shippingMethods: {
|
|
389
425
|
id: string;
|
|
@@ -489,6 +525,15 @@ export declare function removeCartItem(api: Api, params: RemoveCartItemParams):
|
|
|
489
525
|
sellerId: string | null;
|
|
490
526
|
sellerName: string | null;
|
|
491
527
|
orderBumpId: string | null;
|
|
528
|
+
modifiers: {
|
|
529
|
+
modifierGroupId: string;
|
|
530
|
+
modifierGroupName: string;
|
|
531
|
+
modifierOptionId: string | null;
|
|
532
|
+
modifierOptionName: string | null;
|
|
533
|
+
value: string | null;
|
|
534
|
+
quantity: number;
|
|
535
|
+
priceDelta: number;
|
|
536
|
+
}[];
|
|
492
537
|
}[];
|
|
493
538
|
shippingMethods: {
|
|
494
539
|
id: string;
|
|
@@ -69,6 +69,15 @@ export declare function createCart(api: Api, params: CreateCartParams): Promise<
|
|
|
69
69
|
sellerId: string | null;
|
|
70
70
|
sellerName: string | null;
|
|
71
71
|
orderBumpId: string | null;
|
|
72
|
+
modifiers: {
|
|
73
|
+
modifierGroupId: string;
|
|
74
|
+
modifierGroupName: string;
|
|
75
|
+
modifierOptionId: string | null;
|
|
76
|
+
modifierOptionName: string | null;
|
|
77
|
+
value: string | null;
|
|
78
|
+
quantity: number;
|
|
79
|
+
priceDelta: number;
|
|
80
|
+
}[];
|
|
72
81
|
}[];
|
|
73
82
|
shippingMethods: {
|
|
74
83
|
id: string;
|
|
@@ -174,6 +183,15 @@ export declare function getCart(api: Api, params: GetCartParams): Promise<{
|
|
|
174
183
|
sellerId: string | null;
|
|
175
184
|
sellerName: string | null;
|
|
176
185
|
orderBumpId: string | null;
|
|
186
|
+
modifiers: {
|
|
187
|
+
modifierGroupId: string;
|
|
188
|
+
modifierGroupName: string;
|
|
189
|
+
modifierOptionId: string | null;
|
|
190
|
+
modifierOptionName: string | null;
|
|
191
|
+
value: string | null;
|
|
192
|
+
quantity: number;
|
|
193
|
+
priceDelta: number;
|
|
194
|
+
}[];
|
|
177
195
|
}[];
|
|
178
196
|
shippingMethods: {
|
|
179
197
|
id: string;
|
|
@@ -279,6 +297,15 @@ export declare function addCartItem(api: Api, params: AddCartItemParams): Promis
|
|
|
279
297
|
sellerId: string | null;
|
|
280
298
|
sellerName: string | null;
|
|
281
299
|
orderBumpId: string | null;
|
|
300
|
+
modifiers: {
|
|
301
|
+
modifierGroupId: string;
|
|
302
|
+
modifierGroupName: string;
|
|
303
|
+
modifierOptionId: string | null;
|
|
304
|
+
modifierOptionName: string | null;
|
|
305
|
+
value: string | null;
|
|
306
|
+
quantity: number;
|
|
307
|
+
priceDelta: number;
|
|
308
|
+
}[];
|
|
282
309
|
}[];
|
|
283
310
|
shippingMethods: {
|
|
284
311
|
id: string;
|
|
@@ -384,6 +411,15 @@ export declare function updateCartItemQuantity(api: Api, params: UpdateCartItemQ
|
|
|
384
411
|
sellerId: string | null;
|
|
385
412
|
sellerName: string | null;
|
|
386
413
|
orderBumpId: string | null;
|
|
414
|
+
modifiers: {
|
|
415
|
+
modifierGroupId: string;
|
|
416
|
+
modifierGroupName: string;
|
|
417
|
+
modifierOptionId: string | null;
|
|
418
|
+
modifierOptionName: string | null;
|
|
419
|
+
value: string | null;
|
|
420
|
+
quantity: number;
|
|
421
|
+
priceDelta: number;
|
|
422
|
+
}[];
|
|
387
423
|
}[];
|
|
388
424
|
shippingMethods: {
|
|
389
425
|
id: string;
|
|
@@ -489,6 +525,15 @@ export declare function removeCartItem(api: Api, params: RemoveCartItemParams):
|
|
|
489
525
|
sellerId: string | null;
|
|
490
526
|
sellerName: string | null;
|
|
491
527
|
orderBumpId: string | null;
|
|
528
|
+
modifiers: {
|
|
529
|
+
modifierGroupId: string;
|
|
530
|
+
modifierGroupName: string;
|
|
531
|
+
modifierOptionId: string | null;
|
|
532
|
+
modifierOptionName: string | null;
|
|
533
|
+
value: string | null;
|
|
534
|
+
quantity: number;
|
|
535
|
+
priceDelta: number;
|
|
536
|
+
}[];
|
|
492
537
|
}[];
|
|
493
538
|
shippingMethods: {
|
|
494
539
|
id: string;
|
|
@@ -76,6 +76,15 @@ export declare function putCartShippingMethod(api: Api, params: PutShippingMetho
|
|
|
76
76
|
sellerId: string | null;
|
|
77
77
|
sellerName: string | null;
|
|
78
78
|
orderBumpId: string | null;
|
|
79
|
+
modifiers: {
|
|
80
|
+
modifierGroupId: string;
|
|
81
|
+
modifierGroupName: string;
|
|
82
|
+
modifierOptionId: string | null;
|
|
83
|
+
modifierOptionName: string | null;
|
|
84
|
+
value: string | null;
|
|
85
|
+
quantity: number;
|
|
86
|
+
priceDelta: number;
|
|
87
|
+
}[];
|
|
79
88
|
}[];
|
|
80
89
|
shippingMethods: {
|
|
81
90
|
id: string;
|
|
@@ -183,6 +192,15 @@ export declare function patchCartBuyer(api: Api, params: CartBuyerParams): Promi
|
|
|
183
192
|
sellerId: string | null;
|
|
184
193
|
sellerName: string | null;
|
|
185
194
|
orderBumpId: string | null;
|
|
195
|
+
modifiers: {
|
|
196
|
+
modifierGroupId: string;
|
|
197
|
+
modifierGroupName: string;
|
|
198
|
+
modifierOptionId: string | null;
|
|
199
|
+
modifierOptionName: string | null;
|
|
200
|
+
value: string | null;
|
|
201
|
+
quantity: number;
|
|
202
|
+
priceDelta: number;
|
|
203
|
+
}[];
|
|
186
204
|
}[];
|
|
187
205
|
shippingMethods: {
|
|
188
206
|
id: string;
|
|
@@ -295,6 +313,15 @@ export declare function addCartPromotionCode(api: Api, params: CartPromotionCode
|
|
|
295
313
|
sellerId: string | null;
|
|
296
314
|
sellerName: string | null;
|
|
297
315
|
orderBumpId: string | null;
|
|
316
|
+
modifiers: {
|
|
317
|
+
modifierGroupId: string;
|
|
318
|
+
modifierGroupName: string;
|
|
319
|
+
modifierOptionId: string | null;
|
|
320
|
+
modifierOptionName: string | null;
|
|
321
|
+
value: string | null;
|
|
322
|
+
quantity: number;
|
|
323
|
+
priceDelta: number;
|
|
324
|
+
}[];
|
|
298
325
|
}[];
|
|
299
326
|
shippingMethods: {
|
|
300
327
|
id: string;
|
|
@@ -401,6 +428,15 @@ export declare function removeCartPromotionCode(api: Api, params: CartPromotionC
|
|
|
401
428
|
sellerId: string | null;
|
|
402
429
|
sellerName: string | null;
|
|
403
430
|
orderBumpId: string | null;
|
|
431
|
+
modifiers: {
|
|
432
|
+
modifierGroupId: string;
|
|
433
|
+
modifierGroupName: string;
|
|
434
|
+
modifierOptionId: string | null;
|
|
435
|
+
modifierOptionName: string | null;
|
|
436
|
+
value: string | null;
|
|
437
|
+
quantity: number;
|
|
438
|
+
priceDelta: number;
|
|
439
|
+
}[];
|
|
404
440
|
}[];
|
|
405
441
|
shippingMethods: {
|
|
406
442
|
id: string;
|
|
@@ -76,6 +76,15 @@ export declare function putCartShippingMethod(api: Api, params: PutShippingMetho
|
|
|
76
76
|
sellerId: string | null;
|
|
77
77
|
sellerName: string | null;
|
|
78
78
|
orderBumpId: string | null;
|
|
79
|
+
modifiers: {
|
|
80
|
+
modifierGroupId: string;
|
|
81
|
+
modifierGroupName: string;
|
|
82
|
+
modifierOptionId: string | null;
|
|
83
|
+
modifierOptionName: string | null;
|
|
84
|
+
value: string | null;
|
|
85
|
+
quantity: number;
|
|
86
|
+
priceDelta: number;
|
|
87
|
+
}[];
|
|
79
88
|
}[];
|
|
80
89
|
shippingMethods: {
|
|
81
90
|
id: string;
|
|
@@ -183,6 +192,15 @@ export declare function patchCartBuyer(api: Api, params: CartBuyerParams): Promi
|
|
|
183
192
|
sellerId: string | null;
|
|
184
193
|
sellerName: string | null;
|
|
185
194
|
orderBumpId: string | null;
|
|
195
|
+
modifiers: {
|
|
196
|
+
modifierGroupId: string;
|
|
197
|
+
modifierGroupName: string;
|
|
198
|
+
modifierOptionId: string | null;
|
|
199
|
+
modifierOptionName: string | null;
|
|
200
|
+
value: string | null;
|
|
201
|
+
quantity: number;
|
|
202
|
+
priceDelta: number;
|
|
203
|
+
}[];
|
|
186
204
|
}[];
|
|
187
205
|
shippingMethods: {
|
|
188
206
|
id: string;
|
|
@@ -295,6 +313,15 @@ export declare function addCartPromotionCode(api: Api, params: CartPromotionCode
|
|
|
295
313
|
sellerId: string | null;
|
|
296
314
|
sellerName: string | null;
|
|
297
315
|
orderBumpId: string | null;
|
|
316
|
+
modifiers: {
|
|
317
|
+
modifierGroupId: string;
|
|
318
|
+
modifierGroupName: string;
|
|
319
|
+
modifierOptionId: string | null;
|
|
320
|
+
modifierOptionName: string | null;
|
|
321
|
+
value: string | null;
|
|
322
|
+
quantity: number;
|
|
323
|
+
priceDelta: number;
|
|
324
|
+
}[];
|
|
298
325
|
}[];
|
|
299
326
|
shippingMethods: {
|
|
300
327
|
id: string;
|
|
@@ -401,6 +428,15 @@ export declare function removeCartPromotionCode(api: Api, params: CartPromotionC
|
|
|
401
428
|
sellerId: string | null;
|
|
402
429
|
sellerName: string | null;
|
|
403
430
|
orderBumpId: string | null;
|
|
431
|
+
modifiers: {
|
|
432
|
+
modifierGroupId: string;
|
|
433
|
+
modifierGroupName: string;
|
|
434
|
+
modifierOptionId: string | null;
|
|
435
|
+
modifierOptionName: string | null;
|
|
436
|
+
value: string | null;
|
|
437
|
+
quantity: number;
|
|
438
|
+
priceDelta: number;
|
|
439
|
+
}[];
|
|
404
440
|
}[];
|
|
405
441
|
shippingMethods: {
|
|
406
442
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OrderDraftCheckoutSchema, OrderDraftSchema } from "../models/order-draft-
|
|
1
|
+
import { OrderDraftCheckoutSchema, OrderDraftSchema } from "../models/order-draft-CSIWRIV0.js";
|
|
2
2
|
// src/services/order-draft.service.ts
|
|
3
3
|
async function getOrderDraft(api, token) {
|
|
4
4
|
const value = token.trim();
|
|
@@ -51,6 +51,7 @@ export declare function getProducts(api: Api, params?: ProductsParamsInput): Pro
|
|
|
51
51
|
type: "image" | "video";
|
|
52
52
|
}[];
|
|
53
53
|
availableVariantId: string | null;
|
|
54
|
+
hasModifierGroups: boolean;
|
|
54
55
|
}[];
|
|
55
56
|
filters: {
|
|
56
57
|
id: string;
|
|
@@ -172,6 +173,29 @@ export declare function getProductBySlug(api: Api, slug: string, options?: Produ
|
|
|
172
173
|
maxQuantity: number | null;
|
|
173
174
|
unitPrice: number;
|
|
174
175
|
}[];
|
|
176
|
+
modifierGroups: {
|
|
177
|
+
id: string;
|
|
178
|
+
name: string;
|
|
179
|
+
description: string | null;
|
|
180
|
+
selectionType: "multiple" | "single" | "text";
|
|
181
|
+
display: "color" | "font" | "image" | "list";
|
|
182
|
+
isRequired: boolean;
|
|
183
|
+
minSelections: number;
|
|
184
|
+
maxSelections: number | null;
|
|
185
|
+
maxLength: number | null;
|
|
186
|
+
priceDelta: number;
|
|
187
|
+
options: {
|
|
188
|
+
id: string;
|
|
189
|
+
name: string;
|
|
190
|
+
priceDelta: number;
|
|
191
|
+
isDefault: boolean;
|
|
192
|
+
color: string | null;
|
|
193
|
+
fileUrl: string | null;
|
|
194
|
+
fileName: string | null;
|
|
195
|
+
tag: string | null;
|
|
196
|
+
maxQuantity: number;
|
|
197
|
+
}[];
|
|
198
|
+
}[];
|
|
175
199
|
createdAt: string | null;
|
|
176
200
|
updatedAt: string | null;
|
|
177
201
|
seller: {
|
|
@@ -228,4 +252,5 @@ export declare function getRelatedProducts(api: Api, params: RelatedProductsPara
|
|
|
228
252
|
type: "image" | "video";
|
|
229
253
|
}[];
|
|
230
254
|
availableVariantId: string | null;
|
|
255
|
+
hasModifierGroups: boolean;
|
|
231
256
|
}[]>;
|
|
@@ -51,6 +51,7 @@ export declare function getProducts(api: Api, params?: ProductsParamsInput): Pro
|
|
|
51
51
|
type: "image" | "video";
|
|
52
52
|
}[];
|
|
53
53
|
availableVariantId: string | null;
|
|
54
|
+
hasModifierGroups: boolean;
|
|
54
55
|
}[];
|
|
55
56
|
filters: {
|
|
56
57
|
id: string;
|
|
@@ -172,6 +173,29 @@ export declare function getProductBySlug(api: Api, slug: string, options?: Produ
|
|
|
172
173
|
maxQuantity: number | null;
|
|
173
174
|
unitPrice: number;
|
|
174
175
|
}[];
|
|
176
|
+
modifierGroups: {
|
|
177
|
+
id: string;
|
|
178
|
+
name: string;
|
|
179
|
+
description: string | null;
|
|
180
|
+
selectionType: "multiple" | "single" | "text";
|
|
181
|
+
display: "color" | "font" | "image" | "list";
|
|
182
|
+
isRequired: boolean;
|
|
183
|
+
minSelections: number;
|
|
184
|
+
maxSelections: number | null;
|
|
185
|
+
maxLength: number | null;
|
|
186
|
+
priceDelta: number;
|
|
187
|
+
options: {
|
|
188
|
+
id: string;
|
|
189
|
+
name: string;
|
|
190
|
+
priceDelta: number;
|
|
191
|
+
isDefault: boolean;
|
|
192
|
+
color: string | null;
|
|
193
|
+
fileUrl: string | null;
|
|
194
|
+
fileName: string | null;
|
|
195
|
+
tag: string | null;
|
|
196
|
+
maxQuantity: number;
|
|
197
|
+
}[];
|
|
198
|
+
}[];
|
|
175
199
|
createdAt: string | null;
|
|
176
200
|
updatedAt: string | null;
|
|
177
201
|
seller: {
|
|
@@ -228,4 +252,5 @@ export declare function getRelatedProducts(api: Api, params: RelatedProductsPara
|
|
|
228
252
|
type: "image" | "video";
|
|
229
253
|
}[];
|
|
230
254
|
availableVariantId: string | null;
|
|
255
|
+
hasModifierGroups: boolean;
|
|
231
256
|
}[]>;
|