@ecomiq/core 0.1.9 → 1.0.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/LICENSE +21 -0
- package/README.md +39 -2
- package/dist/_virtual/_rolldown/runtime-C6LprzCP.cjs +22 -0
- package/dist/api.cjs +117 -102
- package/dist/api.d.cts +33 -37
- package/dist/api.d.ts +33 -37
- package/dist/api.js +116 -100
- package/dist/client.cjs +499 -1676
- package/dist/client.d.cts +156 -15
- package/dist/client.d.ts +156 -15
- package/dist/client.js +500 -1675
- package/dist/index.cjs +333 -2092
- package/dist/index.d.cts +53 -1127
- package/dist/index.d.ts +53 -1127
- package/dist/index.js +52 -1895
- package/dist/libs/bounded-read-cache-Abmb5VnJ.js +41 -0
- package/dist/libs/bounded-read-cache-D4644LJo.cjs +41 -0
- package/dist/libs/catalog-link-key-B7l5KZsF.js +9 -0
- package/dist/libs/catalog-link-key-CZTHJBGD.cjs +9 -0
- package/dist/libs/catalog-link-key.d.cts +2 -0
- package/dist/libs/catalog-link-key.d.ts +2 -0
- package/dist/libs/graphql-_6Y8lR_Q.js +49 -0
- package/dist/libs/graphql-selection-Cj51WkJn.cjs +21 -0
- package/dist/libs/graphql-selection-H1RMh6VD.js +21 -0
- package/dist/libs/graphql-selection.d.cts +3 -0
- package/dist/libs/graphql-selection.d.ts +3 -0
- package/dist/libs/graphql-wJH7HaQU.cjs +50 -0
- package/dist/libs/graphql.d.cts +24 -0
- package/dist/libs/graphql.d.ts +24 -0
- package/dist/models/amounts-cKBCecl7.js +5 -0
- package/dist/models/amounts-lmg89eJQ.cjs +4 -0
- package/dist/models/articles-C-4JvT2Z.js +27 -0
- package/dist/models/articles-xHCXLKDK.cjs +30 -0
- package/dist/models/articles.d.cts +46 -0
- package/dist/models/articles.d.ts +46 -0
- package/dist/models/catalog-links-BzJeyBy4.js +80 -0
- package/dist/models/catalog-links-c4LADGf_.cjs +88 -0
- package/dist/models/catalog-links.d.cts +39 -0
- package/dist/models/catalog-links.d.ts +39 -0
- package/dist/models/categories-CKkJY8_P.js +42 -0
- package/dist/models/categories-DZ5i5kwi.cjs +45 -0
- package/dist/models/categories.d.cts +54 -0
- package/dist/models/categories.d.ts +54 -0
- package/dist/models/collections.cjs +13 -22
- package/dist/models/collections.d.cts +23 -56
- package/dist/models/collections.d.ts +23 -56
- package/dist/models/collections.js +12 -20
- package/dist/models/complaint-book-D5INpuI2.cjs +64 -0
- package/dist/models/complaint-book-QpQZe7Xl.js +58 -0
- package/dist/models/complaint-book.d.cts +71 -0
- package/dist/models/complaint-book.d.ts +71 -0
- package/dist/models/customer-address.cjs +39 -38
- package/dist/models/customer-address.d.cts +59 -158
- package/dist/models/customer-address.d.ts +59 -158
- package/dist/models/customer-address.js +38 -36
- package/dist/models/customer-order.cjs +181 -142
- package/dist/models/customer-order.d.cts +430 -858
- package/dist/models/customer-order.d.ts +430 -858
- package/dist/models/customer-order.js +178 -141
- package/dist/models/customer-profile.cjs +121 -118
- package/dist/models/customer-profile.d.cts +89 -174
- package/dist/models/customer-profile.d.ts +89 -174
- package/dist/models/customer-profile.js +121 -116
- package/dist/models/customer-registration-C13knqyv.js +28 -0
- package/dist/models/customer-registration-EZ0yZgGr.cjs +31 -0
- package/dist/models/customer-registration.d.cts +66 -0
- package/dist/models/customer-registration.d.ts +66 -0
- package/dist/models/customer-session-BiX0TXhO.js +41 -0
- package/dist/models/customer-session-JeQiC8Yx.cjs +45 -0
- package/dist/models/customer-session.d.cts +61 -0
- package/dist/models/customer-session.d.ts +61 -0
- package/dist/models/geo.cjs +52 -49
- package/dist/models/geo.d.cts +141 -270
- package/dist/models/geo.d.ts +141 -270
- package/dist/models/geo.js +51 -47
- package/dist/models/ids.cjs +8 -11
- package/dist/models/ids.d.cts +7 -10
- package/dist/models/ids.d.ts +7 -10
- package/dist/models/ids.js +7 -9
- package/dist/models/order-draft-CnHJ0btL.js +37 -0
- package/dist/models/order-draft-PFBZfRRR.cjs +39 -0
- package/dist/models/order-draft.d.cts +51 -0
- package/dist/models/order-draft.d.ts +51 -0
- package/dist/models/order-review--xGlZKtS.cjs +18 -0
- package/dist/models/order-review-egGeCaqB.js +17 -0
- package/dist/models/order-review.d.cts +22 -0
- package/dist/models/order-review.d.ts +22 -0
- package/dist/models/order-status-CS_OeSPY.cjs +66 -0
- package/dist/models/order-status-CgaLkU0M.js +60 -0
- package/dist/models/order-status.d.cts +298 -0
- package/dist/models/order-status.d.ts +298 -0
- package/dist/models/payment-methods--VUUZpMz.js +17 -0
- package/dist/models/payment-methods-CmK08zBM.cjs +19 -0
- package/dist/models/payment-methods.d.cts +28 -0
- package/dist/models/payment-methods.d.ts +28 -0
- package/dist/models/products.cjs +215 -194
- package/dist/models/products.d.cts +612 -1354
- package/dist/models/products.d.ts +612 -1354
- package/dist/models/products.js +211 -187
- package/dist/models/search.cjs +13 -23
- package/dist/models/search.d.cts +21 -51
- package/dist/models/search.d.ts +21 -51
- package/dist/models/search.js +12 -21
- package/dist/models/sellers.cjs +44 -0
- package/dist/models/sellers.d.cts +82 -0
- package/dist/models/sellers.d.ts +82 -0
- package/dist/models/sellers.js +38 -0
- package/dist/models/settings.cjs +205 -236
- package/dist/models/settings.d.cts +853 -6940
- package/dist/models/settings.d.ts +853 -6940
- package/dist/models/settings.js +213 -239
- package/dist/models/storefront-cart.cjs +144 -118
- package/dist/models/storefront-cart.d.cts +246 -706
- package/dist/models/storefront-cart.d.ts +246 -706
- package/dist/models/storefront-cart.js +141 -117
- package/dist/models/storefront-checkout.cjs +212 -297
- package/dist/models/storefront-checkout.d.cts +654 -2449
- package/dist/models/storefront-checkout.d.ts +654 -2449
- package/dist/models/storefront-checkout.js +208 -297
- package/dist/models/storefront-reviews.cjs +58 -43
- package/dist/models/storefront-reviews.d.cts +71 -139
- package/dist/models/storefront-reviews.d.ts +71 -139
- package/dist/models/storefront-reviews.js +55 -42
- package/dist/models/tracking-CiIAhQW0.js +33 -0
- package/dist/models/tracking-wNyzQ6Bp.cjs +36 -0
- package/dist/models/tracking.d.cts +26 -0
- package/dist/models/tracking.d.ts +26 -0
- package/dist/models/urls-B0ZODOwH.cjs +35 -0
- package/dist/models/urls-Dt_dTt4Q.js +33 -0
- package/dist/models/urls.d.cts +201 -0
- package/dist/models/urls.d.ts +201 -0
- package/dist/redirects.cjs +113 -0
- package/dist/redirects.d.cts +11 -0
- package/dist/redirects.d.ts +11 -0
- package/dist/redirects.js +108 -0
- package/dist/services/article.service-DBsOvflH.js +10 -0
- package/dist/services/article.service-zmTkbbPV.cjs +11 -0
- package/dist/services/article.service.d.cts +4 -0
- package/dist/services/article.service.d.ts +4 -0
- package/dist/services/cart.service-B0D8s6jI.cjs +37 -0
- package/dist/services/cart.service-yMCz9oQP.js +33 -0
- package/dist/services/cart.service.d.cts +527 -0
- package/dist/services/cart.service.d.ts +527 -0
- package/dist/services/catalog-link.service-BQ2d-EPX.js +8 -0
- package/dist/services/catalog-link.service-DiB-OVjn.cjs +8 -0
- package/dist/services/category.service-8tieYX2r.js +6 -0
- package/dist/services/category.service-BsSJZV2B.cjs +6 -0
- package/dist/services/checkout.service-CC-3tm2y.js +60 -0
- package/dist/services/checkout.service-CG8KrDNY.cjs +69 -0
- package/dist/services/checkout.service.d.cts +439 -0
- package/dist/services/checkout.service.d.ts +439 -0
- package/dist/services/collection.service-C4QETpuI.js +11 -0
- package/dist/services/collection.service-DHGN3rhs.cjs +12 -0
- package/dist/services/complaint-book.service-C7TxltQe.cjs +13 -0
- package/dist/services/complaint-book.service-DXiVyKdD.js +12 -0
- package/dist/services/complaint-book.service.d.cts +4 -0
- package/dist/services/complaint-book.service.d.ts +4 -0
- package/dist/services/customer-address.service-Ca4qla_R.cjs +51 -0
- package/dist/services/customer-address.service-xEThx7cQ.js +47 -0
- package/dist/services/customer-address.service.d.cts +19 -0
- package/dist/services/customer-address.service.d.ts +19 -0
- package/dist/services/customer-order.service-DLGgT0xa.cjs +54 -0
- package/dist/services/customer-order.service-qHoRBuyX.js +51 -0
- package/dist/services/customer-order.service.d.cts +34 -0
- package/dist/services/customer-order.service.d.ts +34 -0
- package/dist/services/customer-registration.service-C3BNyCHP.cjs +10 -0
- package/dist/services/customer-registration.service-CxcWD2hf.js +9 -0
- package/dist/services/customer-registration.service.d.cts +5 -0
- package/dist/services/customer-registration.service.d.ts +5 -0
- package/dist/services/customer-session.service-4YgfbWRB.js +16 -0
- package/dist/services/customer-session.service-Bd8pLC2v.cjs +19 -0
- package/dist/services/customer.service-BM0NrOxP.cjs +26 -0
- package/dist/services/customer.service-BoU6l2-R.js +25 -0
- package/dist/services/customer.service.d.cts +10 -0
- package/dist/services/customer.service.d.ts +10 -0
- package/dist/services/geo.service-C32R7N8W.js +39 -0
- package/dist/services/geo.service-JeTT3Wun.cjs +42 -0
- package/dist/services/geo.service.d.cts +10 -0
- package/dist/services/geo.service.d.ts +10 -0
- package/dist/services/layout.service-BkvLzl1g.cjs +50 -0
- package/dist/services/layout.service-DmbeMOkK.js +50 -0
- package/dist/services/layout.service.d.cts +9 -0
- package/dist/services/layout.service.d.ts +9 -0
- package/dist/services/order-draft.service-D9gy-OPr.cjs +14 -0
- package/dist/services/order-draft.service-DYPR_pcV.js +13 -0
- package/dist/services/order-draft.service.d.cts +4 -0
- package/dist/services/order-draft.service.d.ts +4 -0
- package/dist/services/order-review.service-BEr-FB6_.cjs +11 -0
- package/dist/services/order-review.service-PdBPUsxE.js +11 -0
- package/dist/services/order-review.service.d.cts +7 -0
- package/dist/services/order-review.service.d.ts +7 -0
- package/dist/services/order-status.service-Cn7dsaJo.cjs +26 -0
- package/dist/services/order-status.service-MC9hVpP-.js +23 -0
- package/dist/services/order-status.service.d.cts +16 -0
- package/dist/services/order-status.service.d.ts +16 -0
- package/dist/services/page.service-CWhWCjMQ.js +7 -0
- package/dist/services/page.service-DmCSeMiR.cjs +7 -0
- package/dist/services/page.service.d.cts +4 -0
- package/dist/services/page.service.d.ts +4 -0
- package/dist/services/payment-method.service-CEt_nB4R.cjs +7 -0
- package/dist/services/payment-method.service-CjKbAsOh.js +7 -0
- package/dist/services/payment-method.service.d.cts +4 -0
- package/dist/services/payment-method.service.d.ts +4 -0
- package/dist/services/product.service-B05Qmbuh.js +35 -0
- package/dist/services/product.service-B7OFZWB1.cjs +37 -0
- package/dist/services/product.service.d.cts +231 -0
- package/dist/services/product.service.d.ts +231 -0
- package/dist/services/review.service-CO2icjpu.cjs +46 -0
- package/dist/services/review.service-De1YkhFp.js +43 -0
- package/dist/services/review.service.d.cts +28 -0
- package/dist/services/review.service.d.ts +28 -0
- package/dist/services/search.service-Bx1zbTHJ.cjs +10 -0
- package/dist/services/search.service-DSBMhaSY.js +10 -0
- package/dist/services/search.service.d.cts +9 -0
- package/dist/services/search.service.d.ts +9 -0
- package/dist/services/seller.service-D11WHhbC.cjs +10 -0
- package/dist/services/seller.service-DUptDTv4.js +9 -0
- package/dist/services/seller.service.d.cts +42 -0
- package/dist/services/seller.service.d.ts +42 -0
- package/dist/services/tracking.service-CPK1B69N.js +11 -0
- package/dist/services/tracking.service-DqOoi8qr.cjs +11 -0
- package/dist/services/tracking.service.d.cts +7 -0
- package/dist/services/tracking.service.d.ts +7 -0
- package/dist/services/url.service-B-nC14Ue.cjs +19 -0
- package/dist/services/url.service-CLW0Tc7S.js +18 -0
- package/dist/storefront-cache-revision.cjs +23 -0
- package/dist/storefront-cache-revision.d.cts +16 -0
- package/dist/storefront-cache-revision.d.ts +16 -0
- package/dist/storefront-cache-revision.js +17 -0
- package/dist/storefront-routes.cjs +14 -0
- package/dist/storefront-routes.d.cts +11 -0
- package/dist/storefront-routes.d.ts +11 -0
- package/dist/storefront-routes.js +12 -0
- package/dist/utils-CDEC5xcY.cjs +139 -0
- package/dist/utils-DK7qa54o.js +136 -0
- package/dist/utils.d.cts +3 -0
- package/dist/utils.d.ts +3 -0
- package/dist/video-links-CbRO0m8V.js +47 -0
- package/dist/video-links-ClryQjPH.cjs +47 -0
- package/dist/video-links.d.cts +7 -0
- package/dist/video-links.d.ts +7 -0
- package/package.json +28 -11
- package/dist/api.cjs.map +0 -1
- package/dist/api.js.map +0 -1
- package/dist/client-Ba1r_uiO.d.ts +0 -195
- package/dist/client-Cqcnv2tC.d.cts +0 -195
- package/dist/client.cjs.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/models/collections.cjs.map +0 -1
- package/dist/models/collections.js.map +0 -1
- package/dist/models/customer-address.cjs.map +0 -1
- package/dist/models/customer-address.js.map +0 -1
- package/dist/models/customer-order.cjs.map +0 -1
- package/dist/models/customer-order.js.map +0 -1
- package/dist/models/customer-profile.cjs.map +0 -1
- package/dist/models/customer-profile.js.map +0 -1
- package/dist/models/geo.cjs.map +0 -1
- package/dist/models/geo.js.map +0 -1
- package/dist/models/ids.cjs.map +0 -1
- package/dist/models/ids.js.map +0 -1
- package/dist/models/products.cjs.map +0 -1
- package/dist/models/products.js.map +0 -1
- package/dist/models/search.cjs.map +0 -1
- package/dist/models/search.js.map +0 -1
- package/dist/models/settings.cjs.map +0 -1
- package/dist/models/settings.js.map +0 -1
- package/dist/models/storefront-cart.cjs.map +0 -1
- package/dist/models/storefront-cart.js.map +0 -1
- package/dist/models/storefront-checkout.cjs.map +0 -1
- package/dist/models/storefront-checkout.js.map +0 -1
- package/dist/models/storefront-reviews.cjs.map +0 -1
- package/dist/models/storefront-reviews.js.map +0 -1
|
@@ -1,130 +1,154 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { DiscountAmountSchema } from "./amounts-cKBCecl7.js";
|
|
2
|
+
import { CartTokenSchema, EntityIdSchema, NullableEntityIdSchema } from "./ids.js";
|
|
3
|
+
import { z } from "zod";
|
|
3
4
|
// src/models/storefront-cart.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
5
|
+
const CartShippingMethodTypeSchema = z.enum([
|
|
6
|
+
"regular",
|
|
7
|
+
"express",
|
|
8
|
+
"sameDay",
|
|
9
|
+
"pickup",
|
|
10
|
+
"localDelivery"
|
|
11
|
+
]);
|
|
12
|
+
const ShippingMethodTargetSelectionSchema = z.enum([
|
|
13
|
+
"automatic",
|
|
14
|
+
"location",
|
|
15
|
+
"pickupPoint"
|
|
16
|
+
]);
|
|
17
|
+
const StorefrontAddressSchema = z.object({
|
|
18
|
+
name: z.string().nullable(),
|
|
19
|
+
address1: z.string(),
|
|
20
|
+
city: z.string(),
|
|
21
|
+
countryCode: z.string(),
|
|
22
|
+
company: z.string().nullable(),
|
|
23
|
+
address2: z.string().nullable(),
|
|
24
|
+
department: z.string().nullable().optional(),
|
|
25
|
+
province: z.string().nullable(),
|
|
26
|
+
postalCode: z.string().nullable(),
|
|
27
|
+
district: z.string().nullable(),
|
|
28
|
+
phone: z.string().nullable(),
|
|
29
|
+
latitude: z.number().nullable(),
|
|
30
|
+
longitude: z.number().nullable()
|
|
23
31
|
});
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
const StorefrontCartBundleItemSchema = z.object({
|
|
33
|
+
productId: EntityIdSchema,
|
|
34
|
+
variantId: EntityIdSchema,
|
|
35
|
+
productName: z.string(),
|
|
36
|
+
variantName: z.string().nullable(),
|
|
37
|
+
sku: z.string().nullable(),
|
|
38
|
+
brand: z.string().nullable(),
|
|
39
|
+
imageUrl: z.string().nullable(),
|
|
40
|
+
quantity: z.number().int().positive()
|
|
33
41
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
const StorefrontCartItemSchema = z.object({
|
|
43
|
+
id: EntityIdSchema,
|
|
44
|
+
productId: NullableEntityIdSchema,
|
|
45
|
+
title: z.string(),
|
|
46
|
+
variantLabel: z.string().nullable(),
|
|
47
|
+
productHandle: z.string().nullable(),
|
|
48
|
+
productUrl: z.string().nullable(),
|
|
49
|
+
thumbnail: z.string().nullable(),
|
|
50
|
+
quantity: z.number().int().positive(),
|
|
51
|
+
variantId: NullableEntityIdSchema,
|
|
52
|
+
variantSku: z.string().nullable(),
|
|
53
|
+
unitPrice: z.number(),
|
|
54
|
+
compareAtUnitPrice: z.number().nullable(),
|
|
55
|
+
bundleItems: z.array(StorefrontCartBundleItemSchema),
|
|
56
|
+
requiresShipping: z.boolean(),
|
|
57
|
+
sellerId: NullableEntityIdSchema,
|
|
58
|
+
sellerName: z.string().nullable(),
|
|
59
|
+
orderBumpId: NullableEntityIdSchema
|
|
47
60
|
});
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
const StorefrontCartShippingMethodSchema = z.object({
|
|
62
|
+
id: EntityIdSchema,
|
|
63
|
+
shippingMethodId: NullableEntityIdSchema,
|
|
64
|
+
rateId: NullableEntityIdSchema,
|
|
65
|
+
name: z.string(),
|
|
66
|
+
description: z.string().nullable(),
|
|
67
|
+
type: CartShippingMethodTypeSchema,
|
|
68
|
+
target: ShippingMethodTargetSelectionSchema,
|
|
69
|
+
targetId: NullableEntityIdSchema,
|
|
70
|
+
fulfillmentLocationId: NullableEntityIdSchema,
|
|
71
|
+
total: z.number(),
|
|
72
|
+
estimatedDays: z.number().int().nullable(),
|
|
73
|
+
scheduledDate: z.string().nullable(),
|
|
74
|
+
scheduledTime: z.string().nullable(),
|
|
75
|
+
serviceCode: z.string().nullable(),
|
|
76
|
+
sellerId: NullableEntityIdSchema,
|
|
77
|
+
shippingProfileId: NullableEntityIdSchema
|
|
63
78
|
});
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
const StorefrontCartTotalsSchema = z.object({
|
|
80
|
+
subtotal: z.number(),
|
|
81
|
+
discountTotal: DiscountAmountSchema,
|
|
82
|
+
shippingOriginalTotal: z.number(),
|
|
83
|
+
shippingTotal: z.number(),
|
|
84
|
+
taxTotal: z.number(),
|
|
85
|
+
warrantyTotal: z.number(),
|
|
86
|
+
total: z.number()
|
|
72
87
|
});
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
const StorefrontCartStatusSchema = z.enum([
|
|
89
|
+
"inProgress",
|
|
90
|
+
"pending",
|
|
91
|
+
"completed",
|
|
92
|
+
"abandoned",
|
|
93
|
+
"cancelled",
|
|
94
|
+
"expired",
|
|
95
|
+
"failed"
|
|
81
96
|
]);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
const StorefrontInvoiceTypeSchema = z.enum([
|
|
98
|
+
"ticket",
|
|
99
|
+
"receipt",
|
|
100
|
+
"invoice"
|
|
101
|
+
]);
|
|
102
|
+
const StorefrontCartSchema = z.object({
|
|
103
|
+
id: EntityIdSchema,
|
|
104
|
+
token: CartTokenSchema,
|
|
105
|
+
cartNumber: z.string(),
|
|
106
|
+
email: z.string().nullable(),
|
|
107
|
+
phone: z.string().nullable(),
|
|
108
|
+
firstName: z.string().nullable(),
|
|
109
|
+
lastName: z.string().nullable(),
|
|
110
|
+
currencyCode: z.string(),
|
|
111
|
+
status: StorefrontCartStatusSchema,
|
|
112
|
+
completedAt: z.string().datetime({ offset: true }).nullable(),
|
|
113
|
+
shippingAddress: StorefrontAddressSchema.nullable(),
|
|
114
|
+
billingAddress: StorefrontAddressSchema.nullable(),
|
|
115
|
+
promotionCodes: z.array(z.string()),
|
|
116
|
+
items: z.array(StorefrontCartItemSchema),
|
|
117
|
+
shippingMethods: z.array(StorefrontCartShippingMethodSchema),
|
|
118
|
+
paymentMethodCode: z.string().nullable(),
|
|
119
|
+
totals: StorefrontCartTotalsSchema,
|
|
120
|
+
invoiceType: StorefrontInvoiceTypeSchema,
|
|
121
|
+
identificationType: z.string().nullable(),
|
|
122
|
+
identificationCountryCode: z.string().length(2).nullish(),
|
|
123
|
+
identificationNumber: z.string().nullable(),
|
|
124
|
+
entityTaxId: z.string().nullable(),
|
|
125
|
+
entityName: z.string().nullable()
|
|
104
126
|
});
|
|
105
|
-
|
|
106
|
-
|
|
127
|
+
const CreateCartParamsSchema = z.object({
|
|
128
|
+
currencyCode: z.string().length(3),
|
|
129
|
+
salesChannelId: z.string().optional(),
|
|
130
|
+
email: z.string().email().optional()
|
|
107
131
|
});
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
132
|
+
const GetCartParamsSchema = z.object({ cartToken: CartTokenSchema });
|
|
133
|
+
const CartItemModifierSchema = z.object({
|
|
134
|
+
modifierGroupId: EntityIdSchema,
|
|
135
|
+
optionIds: z.array(EntityIdSchema).min(1)
|
|
111
136
|
});
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
137
|
+
const AddCartItemParamsSchema = z.object({
|
|
138
|
+
cartToken: CartTokenSchema,
|
|
139
|
+
variantId: EntityIdSchema,
|
|
140
|
+
quantity: z.number().int().positive(),
|
|
141
|
+
campaignId: EntityIdSchema.optional(),
|
|
142
|
+
orderBumpId: EntityIdSchema.optional(),
|
|
143
|
+
modifiers: z.array(CartItemModifierSchema).optional()
|
|
117
144
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
145
|
+
const UpdateCartItemQuantityParamsSchema = z.object({
|
|
146
|
+
cartToken: CartTokenSchema,
|
|
147
|
+
cartItemId: EntityIdSchema,
|
|
148
|
+
quantity: z.number().int().nonnegative()
|
|
122
149
|
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
150
|
+
const RemoveCartItemParamsSchema = z.object({
|
|
151
|
+
cartToken: CartTokenSchema,
|
|
152
|
+
cartItemId: EntityIdSchema
|
|
126
153
|
});
|
|
127
|
-
|
|
128
|
-
export { AddCartItemParamsSchema, CartItemModifierSchema, CreateCartParamsSchema, GetCartParamsSchema, RemoveCartItemParamsSchema, StorefrontAddressSchema, StorefrontCartBundleItemSchema, StorefrontCartItemSchema, StorefrontCartSchema, StorefrontCartShippingMethodSchema, StorefrontCartStatusSchema, StorefrontCartTotalsSchema, UpdateCartItemQuantityParamsSchema };
|
|
129
|
-
//# sourceMappingURL=storefront-cart.js.map
|
|
130
|
-
//# sourceMappingURL=storefront-cart.js.map
|
|
154
|
+
export { AddCartItemParamsSchema, CartItemModifierSchema, CartShippingMethodTypeSchema, CreateCartParamsSchema, GetCartParamsSchema, RemoveCartItemParamsSchema, ShippingMethodTargetSelectionSchema, StorefrontAddressSchema, StorefrontCartBundleItemSchema, StorefrontCartItemSchema, StorefrontCartSchema, StorefrontCartShippingMethodSchema, StorefrontCartStatusSchema, StorefrontCartTotalsSchema, StorefrontInvoiceTypeSchema, UpdateCartItemQuantityParamsSchema };
|