@ecomiq/core 1.1.0 → 1.1.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/dist/client.cjs +1 -1
- package/dist/client.js +1 -1
- package/dist/index.cjs +8 -7
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -3
- package/dist/models/customer-order.cjs +1 -1
- package/dist/models/customer-order.js +1 -1
- package/dist/models/{order-draft-C-2WRbjl.cjs → order-draft-DWKoM7Lu.cjs} +1 -1
- package/dist/models/{order-draft-CSIWRIV0.js → order-draft-DhEKDqI8.js} +1 -1
- package/dist/models/{personalization-BPFmkdJ0.js → personalization-CdwIzzSn.js} +1 -22
- package/dist/models/{personalization-CQosKg8O.cjs → personalization-Uh_MWts-.cjs} +0 -25
- package/dist/models/personalization-lines-BurVHB4o.cjs +26 -0
- package/dist/models/personalization-lines-DigNu6OK.js +23 -0
- package/dist/models/personalization-lines.d.cts +15 -0
- package/dist/models/personalization-lines.d.ts +15 -0
- package/dist/models/personalization.d.cts +1 -15
- package/dist/models/personalization.d.ts +1 -15
- package/dist/models/products.cjs +1 -1
- package/dist/models/products.js +1 -1
- package/dist/models/storefront-cart.cjs +1 -1
- package/dist/models/storefront-cart.js +1 -1
- package/dist/services/{order-draft.service-Dlu6eEkV.cjs → order-draft.service-CdJbIUT6.cjs} +1 -1
- package/dist/services/{order-draft.service-B0VcmWhn.js → order-draft.service-DHhae1Ct.js} +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -10,7 +10,7 @@ const require_bounded_read_cache = require("./libs/bounded-read-cache-D4644LJo.c
|
|
|
10
10
|
const require_customer_registration_service = require("./services/customer-registration.service-C3BNyCHP.cjs");
|
|
11
11
|
const require_customer_session_service = require("./services/customer-session.service-Bd8pLC2v.cjs");
|
|
12
12
|
const require_order_status_service = require("./services/order-status.service-Cn7dsaJo.cjs");
|
|
13
|
-
const require_order_draft_service = require("./services/order-draft.service-
|
|
13
|
+
const require_order_draft_service = require("./services/order-draft.service-CdJbIUT6.cjs");
|
|
14
14
|
const require_complaint_book_service = require("./services/complaint-book.service-C7TxltQe.cjs");
|
|
15
15
|
const require_models_settings = require("./models/settings.cjs");
|
|
16
16
|
const require_product_service = require("./services/product.service-B7OFZWB1.cjs");
|
package/dist/client.js
CHANGED
|
@@ -9,7 +9,7 @@ import { BoundedReadCache } from "./libs/bounded-read-cache-Abmb5VnJ.js";
|
|
|
9
9
|
import { completeCustomerRegistration, getCustomerRegistration } from "./services/customer-registration.service-CxcWD2hf.js";
|
|
10
10
|
import { createCustomerSession, deleteCustomerSession, getCustomerSession, upsertCustomerAuthConfiguration } from "./services/customer-session.service-4YgfbWRB.js";
|
|
11
11
|
import { authenticateOrderPayment, getOrderStatus, startOrderPayment, uploadOrderPaymentReceipt } from "./services/order-status.service-MC9hVpP-.js";
|
|
12
|
-
import { checkoutOrderDraft, getOrderDraft } from "./services/order-draft.service-
|
|
12
|
+
import { checkoutOrderDraft, getOrderDraft } from "./services/order-draft.service-DHhae1Ct.js";
|
|
13
13
|
import { createComplaintBookEntry, getComplaintBook } from "./services/complaint-book.service-DXiVyKdD.js";
|
|
14
14
|
import { StorefrontSettingsSchema } from "./models/settings.js";
|
|
15
15
|
import { getProductBySlug, getProducts, getRelatedProducts } from "./services/product.service-B05Qmbuh.js";
|
package/dist/index.cjs
CHANGED
|
@@ -13,7 +13,8 @@ const require_catalog_links = require("./models/catalog-links-c4LADGf_.cjs");
|
|
|
13
13
|
const require_payment_methods = require("./models/payment-methods-CmK08zBM.cjs");
|
|
14
14
|
const require_articles = require("./models/articles-xHCXLKDK.cjs");
|
|
15
15
|
const require_models_products = require("./models/products.cjs");
|
|
16
|
-
const require_personalization = require("./models/personalization-
|
|
16
|
+
const require_personalization = require("./models/personalization-Uh_MWts-.cjs");
|
|
17
|
+
const require_personalization_lines = require("./models/personalization-lines-BurVHB4o.cjs");
|
|
17
18
|
const require_models_search = require("./models/search.cjs");
|
|
18
19
|
const require_models_storefront_cart = require("./models/storefront-cart.cjs");
|
|
19
20
|
const require_models_storefront_checkout = require("./models/storefront-checkout.cjs");
|
|
@@ -43,8 +44,8 @@ const require_order_review = require("./models/order-review--xGlZKtS.cjs");
|
|
|
43
44
|
const require_order_review_service = require("./services/order-review.service-BEr-FB6_.cjs");
|
|
44
45
|
const require_order_status = require("./models/order-status-CS_OeSPY.cjs");
|
|
45
46
|
const require_order_status_service = require("./services/order-status.service-Cn7dsaJo.cjs");
|
|
46
|
-
const require_order_draft = require("./models/order-draft-
|
|
47
|
-
const require_order_draft_service = require("./services/order-draft.service-
|
|
47
|
+
const require_order_draft = require("./models/order-draft-DWKoM7Lu.cjs");
|
|
48
|
+
const require_order_draft_service = require("./services/order-draft.service-CdJbIUT6.cjs");
|
|
48
49
|
const require_complaint_book = require("./models/complaint-book-D5INpuI2.cjs");
|
|
49
50
|
const require_complaint_book_service = require("./services/complaint-book.service-C7TxltQe.cjs");
|
|
50
51
|
const require_page_service = require("./services/page.service-DmCSeMiR.cjs");
|
|
@@ -317,12 +318,12 @@ exports.getSellers = require_seller_service.getSellers;
|
|
|
317
318
|
exports.getShippingOptions = require_checkout_service.getShippingOptions;
|
|
318
319
|
exports.graphQLSelection = require_graphql_selection.graphQLSelection;
|
|
319
320
|
exports.isCatalogLinkCandidate = require_catalog_links.isCatalogLinkCandidate;
|
|
320
|
-
exports.lineTotal =
|
|
321
|
-
exports.lineUnitPrice =
|
|
321
|
+
exports.lineTotal = require_personalization_lines.lineTotal;
|
|
322
|
+
exports.lineUnitPrice = require_personalization_lines.lineUnitPrice;
|
|
322
323
|
exports.listArticles = require_article_service.listArticles;
|
|
323
324
|
exports.listProductReviews = require_review_service.listProductReviews;
|
|
324
|
-
exports.modifierLabel =
|
|
325
|
-
exports.modifiersUnitPrice =
|
|
325
|
+
exports.modifierLabel = require_personalization_lines.modifierLabel;
|
|
326
|
+
exports.modifiersUnitPrice = require_personalization_lines.modifiersUnitPrice;
|
|
326
327
|
exports.patchCartAddresses = require_checkout_service.patchCartAddresses;
|
|
327
328
|
exports.patchCartBuyer = require_checkout_service.patchCartBuyer;
|
|
328
329
|
exports.patchCustomer = require_customer_service.patchCustomer;
|
package/dist/index.d.cts
CHANGED
|
@@ -13,7 +13,8 @@ import { CATALOG_LINK_ID, CATALOG_LINK_MAX_LENGTH, CatalogLink, CatalogLinkRefer
|
|
|
13
13
|
import { StorefrontPaymentCodeSchema, StorefrontPaymentMethod, StorefrontPaymentMethodSchema, StorefrontPaymentMethods, StorefrontPaymentMethodsSchema } from "./models/payment-methods.cjs";
|
|
14
14
|
import { Article, ArticleSchema, ArticleSummary, ArticleSummarySchema, ArticlesSchema, ListArticlesParams, ListArticlesParamsSchema } from "./models/articles.cjs";
|
|
15
15
|
import { BundleItem, BundleItemSchema, FacetItem, FacetItemSchema, ProductBySlugOptions, ProductDetail, ProductDetailSchema, ProductImage, ProductImageSchema, ProductMediaType, ProductMediaTypeSchema, ProductOptionGroup, ProductOptionGroupSchema, ProductPriceTier, ProductPriceTierSchema, ProductSeller, ProductSellerSchema, ProductSort, ProductSortSchema, ProductSummariesSchema, ProductSummary, ProductSummarySchema, ProductsParams, ProductsParamsInput, ProductsParamsSchema, ProductsResponse, ProductsResponseSchema, RelatedProductsParams, RelatedProductsParamsSchema, SearchFilter, SearchFilterSchema, SizeGuide, SizeGuideMeasurement, SizeGuideMeasurementSchema, SizeGuideRow, SizeGuideRowSchema, SizeGuideSchema, SpecItem, SpecItemSchema, SpecificationTypeSchema, VariantItem, VariantItemSchema } from "./models/products.cjs";
|
|
16
|
-
import { ItemModifier, ItemModifierSchema, ModifierDisplay, ModifierDisplaySchema, ModifierGroupItem, ModifierGroupItemSchema, ModifierOptionItem, ModifierOptionItemSchema, ModifierSelectionType, ModifierSelectionTypeSchema
|
|
16
|
+
import { ItemModifier, ItemModifierSchema, ModifierDisplay, ModifierDisplaySchema, ModifierGroupItem, ModifierGroupItemSchema, ModifierOptionItem, ModifierOptionItemSchema, ModifierSelectionType, ModifierSelectionTypeSchema } from "./models/personalization.cjs";
|
|
17
|
+
import { lineTotal, lineUnitPrice, modifierLabel, modifiersUnitPrice } from "./models/personalization-lines.cjs";
|
|
17
18
|
import { ProductAutocompleteParams, ProductAutocompleteParamsSchema, ProductSuggestion, ProductSuggestionSchema, ProductSuggestionsSchema } from "./models/search.cjs";
|
|
18
19
|
import { AddCartItemParams, AddCartItemParamsSchema, CartItemModifierInput, CartItemModifierOptionSchema, CartItemModifierSchema, CartShippingMethodTypeSchema, CreateCartParams, CreateCartParamsSchema, GetCartParams, GetCartParamsSchema, RemoveCartItemParams, RemoveCartItemParamsSchema, ShippingMethodTargetSelection, ShippingMethodTargetSelectionSchema, StorefrontAddress, StorefrontAddressSchema, StorefrontCart, StorefrontCartBundleItem, StorefrontCartBundleItemSchema, StorefrontCartItem, StorefrontCartItemSchema, StorefrontCartSchema, StorefrontCartShippingMethod, StorefrontCartShippingMethodSchema, StorefrontCartStatusSchema, StorefrontCartTotals, StorefrontCartTotalsSchema, StorefrontInvoiceType, StorefrontInvoiceTypeSchema, UpdateCartItemQuantityParams, UpdateCartItemQuantityParamsSchema } from "./models/storefront-cart.cjs";
|
|
19
20
|
import { CartAddressWrite, CartAddressWriteSchema, CartAddressesParams, CartAddressesParamsSchema, CartBuyerParams, CartBuyerParamsSchema, CartCheckoutParams, CartCheckoutParamsSchema, CartCheckoutPayment, CartCheckoutPaymentActionSchema, CartCheckoutPaymentMethod, CartCheckoutPaymentMethodSchema, CartCheckoutPaymentSchema, CartCheckoutReadParams, CartCheckoutReadParamsSchema, CartCheckoutReadResponse, CartCheckoutReadResponseSchema, CartCheckoutResponse, CartCheckoutResponseSchema, CartPaymentMethod, CartPaymentMethodSchema, CartPaymentReceiptResponse, CartPaymentReceiptResponseSchema, CartPromotionCodeParams, CartPromotionCodeParamsSchema, CheckoutMetadataValue, CheckoutMetadataValueSchema, CheckoutMode, CheckoutModeSchema, CheckoutPaymentCharge, CheckoutPaymentChargeSchema, GetShippingOptionsParams, GetShippingOptionsParamsSchema, PaymentBankAccount, PaymentBankAccountSchema, PutCartPaymentMethodParams, PutCartPaymentMethodParamsSchema, PutShippingMethodParams, PutShippingMethodParamsSchema, ShippingOptionGroup, ShippingOptionGroupSchema, ShippingOptionsResponse, ShippingOptionsResponseSchema, ShippingRate, ShippingRateSchema, StorefrontOrderBump, StorefrontOrderBumpSchema, UploadPaymentReceiptParams } from "./models/storefront-checkout.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -13,7 +13,8 @@ import { CATALOG_LINK_ID, CATALOG_LINK_MAX_LENGTH, CatalogLink, CatalogLinkRefer
|
|
|
13
13
|
import { StorefrontPaymentCodeSchema, StorefrontPaymentMethod, StorefrontPaymentMethodSchema, StorefrontPaymentMethods, StorefrontPaymentMethodsSchema } from "./models/payment-methods.js";
|
|
14
14
|
import { Article, ArticleSchema, ArticleSummary, ArticleSummarySchema, ArticlesSchema, ListArticlesParams, ListArticlesParamsSchema } from "./models/articles.js";
|
|
15
15
|
import { BundleItem, BundleItemSchema, FacetItem, FacetItemSchema, ProductBySlugOptions, ProductDetail, ProductDetailSchema, ProductImage, ProductImageSchema, ProductMediaType, ProductMediaTypeSchema, ProductOptionGroup, ProductOptionGroupSchema, ProductPriceTier, ProductPriceTierSchema, ProductSeller, ProductSellerSchema, ProductSort, ProductSortSchema, ProductSummariesSchema, ProductSummary, ProductSummarySchema, ProductsParams, ProductsParamsInput, ProductsParamsSchema, ProductsResponse, ProductsResponseSchema, RelatedProductsParams, RelatedProductsParamsSchema, SearchFilter, SearchFilterSchema, SizeGuide, SizeGuideMeasurement, SizeGuideMeasurementSchema, SizeGuideRow, SizeGuideRowSchema, SizeGuideSchema, SpecItem, SpecItemSchema, SpecificationTypeSchema, VariantItem, VariantItemSchema } from "./models/products.js";
|
|
16
|
-
import { ItemModifier, ItemModifierSchema, ModifierDisplay, ModifierDisplaySchema, ModifierGroupItem, ModifierGroupItemSchema, ModifierOptionItem, ModifierOptionItemSchema, ModifierSelectionType, ModifierSelectionTypeSchema
|
|
16
|
+
import { ItemModifier, ItemModifierSchema, ModifierDisplay, ModifierDisplaySchema, ModifierGroupItem, ModifierGroupItemSchema, ModifierOptionItem, ModifierOptionItemSchema, ModifierSelectionType, ModifierSelectionTypeSchema } from "./models/personalization.js";
|
|
17
|
+
import { lineTotal, lineUnitPrice, modifierLabel, modifiersUnitPrice } from "./models/personalization-lines.js";
|
|
17
18
|
import { ProductAutocompleteParams, ProductAutocompleteParamsSchema, ProductSuggestion, ProductSuggestionSchema, ProductSuggestionsSchema } from "./models/search.js";
|
|
18
19
|
import { AddCartItemParams, AddCartItemParamsSchema, CartItemModifierInput, CartItemModifierOptionSchema, CartItemModifierSchema, CartShippingMethodTypeSchema, CreateCartParams, CreateCartParamsSchema, GetCartParams, GetCartParamsSchema, RemoveCartItemParams, RemoveCartItemParamsSchema, ShippingMethodTargetSelection, ShippingMethodTargetSelectionSchema, StorefrontAddress, StorefrontAddressSchema, StorefrontCart, StorefrontCartBundleItem, StorefrontCartBundleItemSchema, StorefrontCartItem, StorefrontCartItemSchema, StorefrontCartSchema, StorefrontCartShippingMethod, StorefrontCartShippingMethodSchema, StorefrontCartStatusSchema, StorefrontCartTotals, StorefrontCartTotalsSchema, StorefrontInvoiceType, StorefrontInvoiceTypeSchema, UpdateCartItemQuantityParams, UpdateCartItemQuantityParamsSchema } from "./models/storefront-cart.js";
|
|
19
20
|
import { CartAddressWrite, CartAddressWriteSchema, CartAddressesParams, CartAddressesParamsSchema, CartBuyerParams, CartBuyerParamsSchema, CartCheckoutParams, CartCheckoutParamsSchema, CartCheckoutPayment, CartCheckoutPaymentActionSchema, CartCheckoutPaymentMethod, CartCheckoutPaymentMethodSchema, CartCheckoutPaymentSchema, CartCheckoutReadParams, CartCheckoutReadParamsSchema, CartCheckoutReadResponse, CartCheckoutReadResponseSchema, CartCheckoutResponse, CartCheckoutResponseSchema, CartPaymentMethod, CartPaymentMethodSchema, CartPaymentReceiptResponse, CartPaymentReceiptResponseSchema, CartPromotionCodeParams, CartPromotionCodeParamsSchema, CheckoutMetadataValue, CheckoutMetadataValueSchema, CheckoutMode, CheckoutModeSchema, CheckoutPaymentCharge, CheckoutPaymentChargeSchema, GetShippingOptionsParams, GetShippingOptionsParamsSchema, PaymentBankAccount, PaymentBankAccountSchema, PutCartPaymentMethodParams, PutCartPaymentMethodParamsSchema, PutShippingMethodParams, PutShippingMethodParamsSchema, ShippingOptionGroup, ShippingOptionGroupSchema, ShippingOptionsResponse, ShippingOptionsResponseSchema, ShippingRate, ShippingRateSchema, StorefrontOrderBump, StorefrontOrderBumpSchema, UploadPaymentReceiptParams } from "./models/storefront-checkout.js";
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,8 @@ import { CATALOG_LINK_ID, CATALOG_LINK_MAX_LENGTH, CatalogLinkReferenceSchema, C
|
|
|
12
12
|
import { StorefrontPaymentCodeSchema, StorefrontPaymentMethodSchema, StorefrontPaymentMethodsSchema } from "./models/payment-methods--VUUZpMz.js";
|
|
13
13
|
import { ArticleSchema, ArticleSummarySchema, ArticlesSchema, ListArticlesParamsSchema } from "./models/articles-C-4JvT2Z.js";
|
|
14
14
|
import { BundleItemSchema, FacetItemSchema, ProductDetailSchema, ProductImageSchema, ProductMediaTypeSchema, ProductOptionGroupSchema, ProductPriceTierSchema, ProductSellerSchema, ProductSortSchema, ProductSummariesSchema, ProductSummarySchema, ProductsParamsSchema, ProductsResponseSchema, RelatedProductsParamsSchema, SearchFilterSchema, SizeGuideMeasurementSchema, SizeGuideRowSchema, SizeGuideSchema, SpecItemSchema, SpecificationTypeSchema, VariantItemSchema } from "./models/products.js";
|
|
15
|
-
import { ItemModifierSchema, ModifierDisplaySchema, ModifierGroupItemSchema, ModifierOptionItemSchema, ModifierSelectionTypeSchema
|
|
15
|
+
import { ItemModifierSchema, ModifierDisplaySchema, ModifierGroupItemSchema, ModifierOptionItemSchema, ModifierSelectionTypeSchema } from "./models/personalization-CdwIzzSn.js";
|
|
16
|
+
import { lineTotal, lineUnitPrice, modifierLabel, modifiersUnitPrice } from "./models/personalization-lines-DigNu6OK.js";
|
|
16
17
|
import { ProductAutocompleteParamsSchema, ProductSuggestionSchema, ProductSuggestionsSchema } from "./models/search.js";
|
|
17
18
|
import { AddCartItemParamsSchema, CartItemModifierOptionSchema, CartItemModifierSchema, CartShippingMethodTypeSchema, CreateCartParamsSchema, GetCartParamsSchema, RemoveCartItemParamsSchema, ShippingMethodTargetSelectionSchema, StorefrontAddressSchema, StorefrontCartBundleItemSchema, StorefrontCartItemSchema, StorefrontCartSchema, StorefrontCartShippingMethodSchema, StorefrontCartStatusSchema, StorefrontCartTotalsSchema, StorefrontInvoiceTypeSchema, UpdateCartItemQuantityParamsSchema } from "./models/storefront-cart.js";
|
|
18
19
|
import { CartAddressWriteSchema, CartAddressesParamsSchema, CartBuyerParamsSchema, CartCheckoutParamsSchema, CartCheckoutPaymentActionSchema, CartCheckoutPaymentMethodSchema, CartCheckoutPaymentSchema, CartCheckoutReadParamsSchema, CartCheckoutReadResponseSchema, CartCheckoutResponseSchema, CartPaymentMethodSchema, CartPaymentReceiptResponseSchema, CartPromotionCodeParamsSchema, CheckoutMetadataValueSchema, CheckoutModeSchema, CheckoutPaymentChargeSchema, GetShippingOptionsParamsSchema, PaymentBankAccountSchema, PutCartPaymentMethodParamsSchema, PutShippingMethodParamsSchema, ShippingOptionGroupSchema, ShippingOptionsResponseSchema, ShippingRateSchema, StorefrontOrderBumpSchema } from "./models/storefront-checkout.js";
|
|
@@ -42,8 +43,8 @@ import { OrderReviewContextItemSchema, OrderReviewContextSchema } from "./models
|
|
|
42
43
|
import { getOrderReviewContext } from "./services/order-review.service-PdBPUsxE.js";
|
|
43
44
|
import { AuthenticateOrderPaymentInputSchema, OrderPaymentInReviewSchema, OrderPaymentMethodSchema, OrderPaymentStartSchema, OrderStatusViewSchema, PaymentAuthentication3DSSchema, PaymentPublicConfigurationSchema } from "./models/order-status-CgaLkU0M.js";
|
|
44
45
|
import { authenticateOrderPayment, getOrderStatus, startOrderPayment, uploadOrderPaymentReceipt } from "./services/order-status.service-MC9hVpP-.js";
|
|
45
|
-
import { OrderDraftCheckoutSchema, OrderDraftItemSchema, OrderDraftSchema } from "./models/order-draft-
|
|
46
|
-
import { checkoutOrderDraft, getOrderDraft } from "./services/order-draft.service-
|
|
46
|
+
import { OrderDraftCheckoutSchema, OrderDraftItemSchema, OrderDraftSchema } from "./models/order-draft-DhEKDqI8.js";
|
|
47
|
+
import { checkoutOrderDraft, getOrderDraft } from "./services/order-draft.service-DHhae1Ct.js";
|
|
47
48
|
import { COMPLAINT_BOOK_ATTACHMENT_TYPES, COMPLAINT_BOOK_MAX_ATTACHMENTS, COMPLAINT_BOOK_MAX_ATTACHMENT_BYTES, ComplaintBookDocumentTypeSchema, ComplaintBookEntryInputSchema, ComplaintBookEntrySchema, ComplaintBookSchema } from "./models/complaint-book-QpQZe7Xl.js";
|
|
48
49
|
import { createComplaintBookEntry, getComplaintBook } from "./services/complaint-book.service-DXiVyKdD.js";
|
|
49
50
|
import { getPageBySlug } from "./services/page.service-CWhWCjMQ.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_amounts = require("./amounts-lmg89eJQ.cjs");
|
|
3
3
|
const require_models_ids = require("./ids.cjs");
|
|
4
|
-
const require_personalization = require("./personalization-
|
|
4
|
+
const require_personalization = require("./personalization-Uh_MWts-.cjs");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
// src/models/customer-order.ts
|
|
7
7
|
const CustomerOrderShippingAddressSchema = zod.z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiscountAmountSchema } from "./amounts-cKBCecl7.js";
|
|
2
2
|
import { EntityIdSchema } from "./ids.js";
|
|
3
|
-
import { ItemModifierSchema } from "./personalization-
|
|
3
|
+
import { ItemModifierSchema } from "./personalization-CdwIzzSn.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/models/customer-order.ts
|
|
6
6
|
const CustomerOrderShippingAddressSchema = z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_amounts = require("./amounts-lmg89eJQ.cjs");
|
|
2
2
|
const require_models_ids = require("./ids.cjs");
|
|
3
|
-
const require_personalization = require("./personalization-
|
|
3
|
+
const require_personalization = require("./personalization-Uh_MWts-.cjs");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
// src/models/order-draft.ts
|
|
6
6
|
const OrderDraftItemSchema = zod.z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiscountAmountSchema } from "./amounts-cKBCecl7.js";
|
|
2
2
|
import { EntityIdSchema, NullableEntityIdSchema } from "./ids.js";
|
|
3
|
-
import { ItemModifierSchema } from "./personalization-
|
|
3
|
+
import { ItemModifierSchema } from "./personalization-CdwIzzSn.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/models/order-draft.ts
|
|
6
6
|
const OrderDraftItemSchema = z.object({
|
|
@@ -45,25 +45,4 @@ const ItemModifierSchema = z.object({
|
|
|
45
45
|
quantity: z.number().int().positive(),
|
|
46
46
|
priceDelta: z.number()
|
|
47
47
|
});
|
|
48
|
-
|
|
49
|
-
return Math.round(value * 100) / 100;
|
|
50
|
-
}
|
|
51
|
-
/** Extra charged per unit for the line's customizations. */
|
|
52
|
-
function modifiersUnitPrice(modifiers) {
|
|
53
|
-
return roundMoney(modifiers.reduce((sum, modifier) => sum + modifier.priceDelta * modifier.quantity, 0));
|
|
54
|
-
}
|
|
55
|
-
/** Unit price of the line with its customizations. */
|
|
56
|
-
function lineUnitPrice(line) {
|
|
57
|
-
return roundMoney(line.unitPrice + modifiersUnitPrice(line.modifiers));
|
|
58
|
-
}
|
|
59
|
-
/** Line total with its customizations, before discounts. */
|
|
60
|
-
function lineTotal(line) {
|
|
61
|
-
return roundMoney(lineUnitPrice(line) * line.quantity);
|
|
62
|
-
}
|
|
63
|
-
/** What the buyer chose or typed, with the option quantity when it is more than one. */
|
|
64
|
-
function modifierLabel(modifier) {
|
|
65
|
-
const label = modifier.value ?? modifier.modifierOptionName ?? "";
|
|
66
|
-
if (modifier.quantity > 1) return `${label} × ${modifier.quantity}`;
|
|
67
|
-
return label;
|
|
68
|
-
}
|
|
69
|
-
export { ItemModifierSchema, ModifierDisplaySchema, ModifierGroupItemSchema, ModifierOptionItemSchema, ModifierSelectionTypeSchema, lineTotal, lineUnitPrice, modifierLabel, modifiersUnitPrice };
|
|
48
|
+
export { ItemModifierSchema, ModifierDisplaySchema, ModifierGroupItemSchema, ModifierOptionItemSchema, ModifierSelectionTypeSchema };
|
|
@@ -45,33 +45,8 @@ const ItemModifierSchema = zod.z.object({
|
|
|
45
45
|
quantity: zod.z.number().int().positive(),
|
|
46
46
|
priceDelta: zod.z.number()
|
|
47
47
|
});
|
|
48
|
-
function roundMoney(value) {
|
|
49
|
-
return Math.round(value * 100) / 100;
|
|
50
|
-
}
|
|
51
|
-
/** Extra charged per unit for the line's customizations. */
|
|
52
|
-
function modifiersUnitPrice(modifiers) {
|
|
53
|
-
return roundMoney(modifiers.reduce((sum, modifier) => sum + modifier.priceDelta * modifier.quantity, 0));
|
|
54
|
-
}
|
|
55
|
-
/** Unit price of the line with its customizations. */
|
|
56
|
-
function lineUnitPrice(line) {
|
|
57
|
-
return roundMoney(line.unitPrice + modifiersUnitPrice(line.modifiers));
|
|
58
|
-
}
|
|
59
|
-
/** Line total with its customizations, before discounts. */
|
|
60
|
-
function lineTotal(line) {
|
|
61
|
-
return roundMoney(lineUnitPrice(line) * line.quantity);
|
|
62
|
-
}
|
|
63
|
-
/** What the buyer chose or typed, with the option quantity when it is more than one. */
|
|
64
|
-
function modifierLabel(modifier) {
|
|
65
|
-
const label = modifier.value ?? modifier.modifierOptionName ?? "";
|
|
66
|
-
if (modifier.quantity > 1) return `${label} × ${modifier.quantity}`;
|
|
67
|
-
return label;
|
|
68
|
-
}
|
|
69
48
|
exports.ItemModifierSchema = ItemModifierSchema;
|
|
70
49
|
exports.ModifierDisplaySchema = ModifierDisplaySchema;
|
|
71
50
|
exports.ModifierGroupItemSchema = ModifierGroupItemSchema;
|
|
72
51
|
exports.ModifierOptionItemSchema = ModifierOptionItemSchema;
|
|
73
52
|
exports.ModifierSelectionTypeSchema = ModifierSelectionTypeSchema;
|
|
74
|
-
exports.lineTotal = lineTotal;
|
|
75
|
-
exports.lineUnitPrice = lineUnitPrice;
|
|
76
|
-
exports.modifierLabel = modifierLabel;
|
|
77
|
-
exports.modifiersUnitPrice = modifiersUnitPrice;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/models/personalization-lines.ts
|
|
2
|
+
function roundMoney(value) {
|
|
3
|
+
return Math.round(value * 100) / 100;
|
|
4
|
+
}
|
|
5
|
+
/** Extra charged per unit for the line's customizations. */
|
|
6
|
+
function modifiersUnitPrice(modifiers) {
|
|
7
|
+
return roundMoney(modifiers.reduce((sum, modifier) => sum + modifier.priceDelta * modifier.quantity, 0));
|
|
8
|
+
}
|
|
9
|
+
/** Unit price of the line with its customizations. */
|
|
10
|
+
function lineUnitPrice(line) {
|
|
11
|
+
return roundMoney(line.unitPrice + modifiersUnitPrice(line.modifiers));
|
|
12
|
+
}
|
|
13
|
+
/** Line total with its customizations, before discounts. */
|
|
14
|
+
function lineTotal(line) {
|
|
15
|
+
return roundMoney(lineUnitPrice(line) * line.quantity);
|
|
16
|
+
}
|
|
17
|
+
/** What the buyer chose or typed, with the option quantity when it is more than one. */
|
|
18
|
+
function modifierLabel(modifier) {
|
|
19
|
+
const label = modifier.value ?? modifier.modifierOptionName ?? "";
|
|
20
|
+
if (modifier.quantity > 1) return `${label} × ${modifier.quantity}`;
|
|
21
|
+
return label;
|
|
22
|
+
}
|
|
23
|
+
exports.lineTotal = lineTotal;
|
|
24
|
+
exports.lineUnitPrice = lineUnitPrice;
|
|
25
|
+
exports.modifierLabel = modifierLabel;
|
|
26
|
+
exports.modifiersUnitPrice = modifiersUnitPrice;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/models/personalization-lines.ts
|
|
2
|
+
function roundMoney(value) {
|
|
3
|
+
return Math.round(value * 100) / 100;
|
|
4
|
+
}
|
|
5
|
+
/** Extra charged per unit for the line's customizations. */
|
|
6
|
+
function modifiersUnitPrice(modifiers) {
|
|
7
|
+
return roundMoney(modifiers.reduce((sum, modifier) => sum + modifier.priceDelta * modifier.quantity, 0));
|
|
8
|
+
}
|
|
9
|
+
/** Unit price of the line with its customizations. */
|
|
10
|
+
function lineUnitPrice(line) {
|
|
11
|
+
return roundMoney(line.unitPrice + modifiersUnitPrice(line.modifiers));
|
|
12
|
+
}
|
|
13
|
+
/** Line total with its customizations, before discounts. */
|
|
14
|
+
function lineTotal(line) {
|
|
15
|
+
return roundMoney(lineUnitPrice(line) * line.quantity);
|
|
16
|
+
}
|
|
17
|
+
/** What the buyer chose or typed, with the option quantity when it is more than one. */
|
|
18
|
+
function modifierLabel(modifier) {
|
|
19
|
+
const label = modifier.value ?? modifier.modifierOptionName ?? "";
|
|
20
|
+
if (modifier.quantity > 1) return `${label} × ${modifier.quantity}`;
|
|
21
|
+
return label;
|
|
22
|
+
}
|
|
23
|
+
export { lineTotal, lineUnitPrice, modifierLabel, modifiersUnitPrice };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ItemModifier } from "./personalization.cjs";
|
|
2
|
+
type PricedLine = {
|
|
3
|
+
unitPrice: number;
|
|
4
|
+
quantity: number;
|
|
5
|
+
modifiers: readonly Pick<ItemModifier, 'priceDelta' | 'quantity'>[];
|
|
6
|
+
};
|
|
7
|
+
/** Extra charged per unit for the line's customizations. */
|
|
8
|
+
export declare function modifiersUnitPrice(modifiers: PricedLine['modifiers']): number;
|
|
9
|
+
/** Unit price of the line with its customizations. */
|
|
10
|
+
export declare function lineUnitPrice(line: Omit<PricedLine, 'quantity'>): number;
|
|
11
|
+
/** Line total with its customizations, before discounts. */
|
|
12
|
+
export declare function lineTotal(line: PricedLine): number;
|
|
13
|
+
/** What the buyer chose or typed, with the option quantity when it is more than one. */
|
|
14
|
+
export declare function modifierLabel(modifier: Pick<ItemModifier, 'value' | 'modifierOptionName' | 'quantity'>): string;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ItemModifier } from "./personalization.js";
|
|
2
|
+
type PricedLine = {
|
|
3
|
+
unitPrice: number;
|
|
4
|
+
quantity: number;
|
|
5
|
+
modifiers: readonly Pick<ItemModifier, 'priceDelta' | 'quantity'>[];
|
|
6
|
+
};
|
|
7
|
+
/** Extra charged per unit for the line's customizations. */
|
|
8
|
+
export declare function modifiersUnitPrice(modifiers: PricedLine['modifiers']): number;
|
|
9
|
+
/** Unit price of the line with its customizations. */
|
|
10
|
+
export declare function lineUnitPrice(line: Omit<PricedLine, 'quantity'>): number;
|
|
11
|
+
/** Line total with its customizations, before discounts. */
|
|
12
|
+
export declare function lineTotal(line: PricedLine): number;
|
|
13
|
+
/** What the buyer chose or typed, with the option quantity when it is more than one. */
|
|
14
|
+
export declare function modifierLabel(modifier: Pick<ItemModifier, 'value' | 'modifierOptionName' | 'quantity'>): string;
|
|
15
|
+
export {};
|
|
@@ -66,18 +66,4 @@ export type ModifierSelectionType = z.infer<typeof ModifierSelectionTypeSchema>;
|
|
|
66
66
|
export type ModifierDisplay = z.infer<typeof ModifierDisplaySchema>;
|
|
67
67
|
export type ModifierOptionItem = z.infer<typeof ModifierOptionItemSchema>;
|
|
68
68
|
export type ModifierGroupItem = z.infer<typeof ModifierGroupItemSchema>;
|
|
69
|
-
export type ItemModifier = z.infer<typeof ItemModifierSchema>;
|
|
70
|
-
type PricedLine = {
|
|
71
|
-
unitPrice: number;
|
|
72
|
-
quantity: number;
|
|
73
|
-
modifiers: readonly Pick<ItemModifier, 'priceDelta' | 'quantity'>[];
|
|
74
|
-
};
|
|
75
|
-
/** Extra charged per unit for the line's customizations. */
|
|
76
|
-
export declare function modifiersUnitPrice(modifiers: PricedLine['modifiers']): number;
|
|
77
|
-
/** Unit price of the line with its customizations. */
|
|
78
|
-
export declare function lineUnitPrice(line: Omit<PricedLine, 'quantity'>): number;
|
|
79
|
-
/** Line total with its customizations, before discounts. */
|
|
80
|
-
export declare function lineTotal(line: PricedLine): number;
|
|
81
|
-
/** What the buyer chose or typed, with the option quantity when it is more than one. */
|
|
82
|
-
export declare function modifierLabel(modifier: Pick<ItemModifier, 'value' | 'modifierOptionName' | 'quantity'>): string;
|
|
83
|
-
export {};
|
|
69
|
+
export type ItemModifier = z.infer<typeof ItemModifierSchema>;
|
|
@@ -66,18 +66,4 @@ export type ModifierSelectionType = z.infer<typeof ModifierSelectionTypeSchema>;
|
|
|
66
66
|
export type ModifierDisplay = z.infer<typeof ModifierDisplaySchema>;
|
|
67
67
|
export type ModifierOptionItem = z.infer<typeof ModifierOptionItemSchema>;
|
|
68
68
|
export type ModifierGroupItem = z.infer<typeof ModifierGroupItemSchema>;
|
|
69
|
-
export type ItemModifier = z.infer<typeof ItemModifierSchema>;
|
|
70
|
-
type PricedLine = {
|
|
71
|
-
unitPrice: number;
|
|
72
|
-
quantity: number;
|
|
73
|
-
modifiers: readonly Pick<ItemModifier, 'priceDelta' | 'quantity'>[];
|
|
74
|
-
};
|
|
75
|
-
/** Extra charged per unit for the line's customizations. */
|
|
76
|
-
export declare function modifiersUnitPrice(modifiers: PricedLine['modifiers']): number;
|
|
77
|
-
/** Unit price of the line with its customizations. */
|
|
78
|
-
export declare function lineUnitPrice(line: Omit<PricedLine, 'quantity'>): number;
|
|
79
|
-
/** Line total with its customizations, before discounts. */
|
|
80
|
-
export declare function lineTotal(line: PricedLine): number;
|
|
81
|
-
/** What the buyer chose or typed, with the option quantity when it is more than one. */
|
|
82
|
-
export declare function modifierLabel(modifier: Pick<ItemModifier, 'value' | 'modifierOptionName' | 'quantity'>): string;
|
|
83
|
-
export {};
|
|
69
|
+
export type ItemModifier = z.infer<typeof ItemModifierSchema>;
|
package/dist/models/products.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_models_ids = require("./ids.cjs");
|
|
3
|
-
const require_personalization = require("./personalization-
|
|
3
|
+
const require_personalization = require("./personalization-Uh_MWts-.cjs");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
// src/models/products.ts
|
|
6
6
|
const ProductSellerSchema = zod.z.object({
|
package/dist/models/products.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EntityIdSchema } from "./ids.js";
|
|
2
|
-
import { ModifierGroupItemSchema } from "./personalization-
|
|
2
|
+
import { ModifierGroupItemSchema } from "./personalization-CdwIzzSn.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
// src/models/products.ts
|
|
5
5
|
const ProductSellerSchema = z.object({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_amounts = require("./amounts-lmg89eJQ.cjs");
|
|
3
3
|
const require_models_ids = require("./ids.cjs");
|
|
4
|
-
const require_personalization = require("./personalization-
|
|
4
|
+
const require_personalization = require("./personalization-Uh_MWts-.cjs");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
// src/models/storefront-cart.ts
|
|
7
7
|
const CartShippingMethodTypeSchema = zod.z.enum([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiscountAmountSchema } from "./amounts-cKBCecl7.js";
|
|
2
2
|
import { CartTokenSchema, EntityIdSchema, NullableEntityIdSchema } from "./ids.js";
|
|
3
|
-
import { ItemModifierSchema } from "./personalization-
|
|
3
|
+
import { ItemModifierSchema } from "./personalization-CdwIzzSn.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
// src/models/storefront-cart.ts
|
|
6
6
|
const CartShippingMethodTypeSchema = z.enum([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OrderDraftCheckoutSchema, OrderDraftSchema } from "../models/order-draft-
|
|
1
|
+
import { OrderDraftCheckoutSchema, OrderDraftSchema } from "../models/order-draft-DhEKDqI8.js";
|
|
2
2
|
// src/services/order-draft.service.ts
|
|
3
3
|
async function getOrderDraft(api, token) {
|
|
4
4
|
const value = token.trim();
|