@sixtyninecommerce/client 0.9.0 → 0.11.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/commerce/index.d.ts.map +1 -1
- package/dist/commerce/index.js +3 -0
- package/dist/commerce/index.js.map +1 -1
- package/dist/commerce/queries.d.ts +6 -6
- package/dist/commerce/queries.d.ts.map +1 -1
- package/dist/commerce/queries.js +27 -2
- package/dist/commerce/queries.js.map +1 -1
- package/dist/commerce/saved-lists.d.ts +13 -0
- package/dist/commerce/saved-lists.d.ts.map +1 -0
- package/dist/commerce/saved-lists.js +113 -0
- package/dist/commerce/saved-lists.js.map +1 -0
- package/dist/content/resolve.d.ts.map +1 -1
- package/dist/content/resolve.js +2 -1
- package/dist/content/resolve.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pricing/validation.d.ts +4 -1
- package/dist/pricing/validation.d.ts.map +1 -1
- package/dist/pricing/validation.js +20 -9
- package/dist/pricing/validation.js.map +1 -1
- package/dist/seo/ai.d.ts +21 -6
- package/dist/seo/ai.d.ts.map +1 -1
- package/dist/seo/ai.js +12 -2
- package/dist/seo/ai.js.map +1 -1
- package/dist/seo/index.d.ts +4 -2
- package/dist/seo/index.d.ts.map +1 -1
- package/dist/seo/index.js +21 -8
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/json-ld.d.ts +9 -0
- package/dist/seo/json-ld.d.ts.map +1 -1
- package/dist/seo/json-ld.js +33 -0
- package/dist/seo/json-ld.js.map +1 -1
- package/dist/seo/meta-tags.d.ts +25 -3
- package/dist/seo/meta-tags.d.ts.map +1 -1
- package/dist/seo/meta-tags.js +137 -58
- package/dist/seo/meta-tags.js.map +1 -1
- package/dist/seo/metadata-parser.d.ts +30 -1
- package/dist/seo/metadata-parser.d.ts.map +1 -1
- package/dist/seo/metadata-parser.js +70 -0
- package/dist/seo/metadata-parser.js.map +1 -1
- package/dist/seo/metadata-types.d.ts +8 -2
- package/dist/seo/metadata-types.d.ts.map +1 -1
- package/dist/types.d.ts +70 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commerce/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commerce/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAoBhE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,YAAY,GAAG,cAAc,CAwCxF"}
|
package/dist/commerce/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { createQuotesMethods } from './quotes.js';
|
|
|
10
10
|
import { createRecommendationsMethods } from './recommendations.js';
|
|
11
11
|
import { createReturnsMethods } from './returns.js';
|
|
12
12
|
import { createReviewMethods } from './reviews.js';
|
|
13
|
+
import { createSavedListsMethods } from './saved-lists.js';
|
|
13
14
|
import { createSearchMethods } from './search.js';
|
|
14
15
|
import { createShippingMethods } from './shipping.js';
|
|
15
16
|
import { createStockNotificationsMethods } from './stock-notifications.js';
|
|
@@ -23,6 +24,7 @@ export function createCommerceModule(http, ctx) {
|
|
|
23
24
|
const payments = createPaymentMethods(http);
|
|
24
25
|
const customer = createCustomerMethods(http);
|
|
25
26
|
const favorites = createFavoritesMethods(http);
|
|
27
|
+
const savedLists = createSavedListsMethods(http);
|
|
26
28
|
const recommendations = createRecommendationsMethods(http);
|
|
27
29
|
const reviews = createReviewMethods(http);
|
|
28
30
|
const ageVerification = createAgeVerificationMethods(http);
|
|
@@ -41,6 +43,7 @@ export function createCommerceModule(http, ctx) {
|
|
|
41
43
|
...payments,
|
|
42
44
|
...customer,
|
|
43
45
|
...favorites,
|
|
46
|
+
...savedLists,
|
|
44
47
|
...recommendations,
|
|
45
48
|
...reviews,
|
|
46
49
|
...ageVerification,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commerce/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,UAAU,oBAAoB,CA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ChB,GAAG,MAAM;QACT,GAAG,OAAO;QACV,GAAG,aAAa;QAChB,GAAG,QAAQ;QACX,GAAG,kBAAkB;QACrB,GAAG,QAAQ;KACZ,CAAC;AACJ,CAAC"}
|
|
@@ -3,7 +3,7 @@ export declare const GET_PRODUCT_BY_ID = "\n query GetProductById($id: ID!) {\n
|
|
|
3
3
|
export declare const LIST_PRODUCTS = "\n query ListProducts($options: ProductListOptions) {\n products(options: $options) {\n items {\n id name slug description\n featuredAsset {\n source name\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n }\n totalItems\n }\n }\n";
|
|
4
4
|
export declare const LIST_FACETS = "\n query ListFacets {\n facets {\n items {\n id name code\n values { id name code }\n }\n totalItems\n }\n }\n";
|
|
5
5
|
export declare const LIST_COLLECTIONS = "\n query ListCollections($options: CollectionListOptions) {\n collections(options: $options) {\n items {\n id name slug description\n breadcrumbs { id name slug }\n featuredAsset {\n source\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n parent { id name slug }\n children { id name slug }\n }\n totalItems\n }\n }\n";
|
|
6
|
-
export declare const GET_COLLECTION = "\n query GetCollection($slug: String!) {\n collection(slug: $slug) {\n id name slug description\n featuredAsset {\n source\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n children { id name slug }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
|
|
6
|
+
export declare const GET_COLLECTION = "\n query GetCollection($slug: String!) {\n collection(slug: $slug) {\n id name slug description position\n featuredAsset {\n source\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n parent { id }\n children { id name slug }\n customFields {\n isRoutable\n isCanonical\n noindex\n nofollow\n metaRobotsMaxImagePreview\n socialImageId\n socialOgType\n twitterCardType\n }\n translations {\n languageCode\n name\n slug\n customFields {\n seoTitle\n seoDescription\n canonicalUrl\n socialTitle\n socialDescription\n socialImageAlt\n }\n }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n priceListName retailPrice retailPriceWithTax\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
|
|
7
7
|
export declare const SEARCH_PRODUCTS = "\n query SearchProducts($input: SearchInput!) {\n search(input: $input) {\n items {\n productId productVariantId productName slug description\n price { ... on SinglePrice { value } ... on PriceRange { min max } }\n priceWithTax { ... on SinglePrice { value } ... on PriceRange { min max } }\n currencyCode\n productAsset { preview focalPoint { x y } }\n collectionIds\n inStock\n }\n totalItems\n facetValues { facetValue { id name code facet { id name code } } count }\n }\n }\n";
|
|
8
8
|
export declare const ACTIVE_ORDER = "\n query ActiveOrder {\n activeOrder { \n id code state active\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName streetLine1 streetLine2 city province postalCode countryCode }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
|
|
9
9
|
export declare const ADD_TO_CART = "\n mutation AddToCart($variantId: ID!, $quantity: Int!) {\n addItemToOrder(productVariantId: $variantId, quantity: $quantity) {\n ... on Order { \n id code state active\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName streetLine1 streetLine2 city province postalCode countryCode }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { errorCode message quantityAvailable order { id } }\n }\n }\n";
|
|
@@ -65,13 +65,13 @@ export declare const GET_EXCHANGE_RATE = "\n query ExchangeRate($targetCurrency
|
|
|
65
65
|
export declare const CONVERT_FROM_BASE = "\n query ConvertFromBase($amount: String!, $targetCurrency: String!) {\n convertFromBase(amount: $amount, targetCurrency: $targetCurrency) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
|
|
66
66
|
export declare const CONVERT_TO_BASE = "\n query ConvertToBase($amount: String!, $sourceCurrency: String!) {\n convertToBase(amount: $amount, sourceCurrency: $sourceCurrency) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
|
|
67
67
|
export declare const CONVERT_TO_MULTIPLE = "\n query ConvertToMultiple($amount: String!, $from: String!, $to: [String!]!) {\n convertToMultiple(amount: $amount, fromCurrency: $from, toCurrencies: $to) {\n currency amount rate\n }\n }\n";
|
|
68
|
-
export declare const MY_QUOTES = "\n query MyQuotes($options: QuoteListOptions) {\n myQuotes(options: $options) {\n items { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountLabel position\n createdAt updatedAt\n }\n }\n totalItems\n }\n }\n";
|
|
69
|
-
export declare const MY_QUOTE = "\n query MyQuote($id: ID!) {\n myQuote(id: $id) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
|
|
70
|
-
export declare const CREATE_QUOTE_REQUEST = "\n mutation CreateQuoteRequest($input: CreateQuoteRequestInput!) {\n createQuoteRequest(input: $input) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
|
|
68
|
+
export declare const MY_QUOTES = "\n query MyQuotes($options: QuoteListOptions) {\n myQuotes(options: $options) {\n items { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountType discountValue discountLabel position\n createdAt updatedAt\n }\n }\n totalItems\n }\n }\n";
|
|
69
|
+
export declare const MY_QUOTE = "\n query MyQuote($id: ID!) {\n myQuote(id: $id) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountType discountValue discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
|
|
70
|
+
export declare const CREATE_QUOTE_REQUEST = "\n mutation CreateQuoteRequest($input: CreateQuoteRequestInput!) {\n createQuoteRequest(input: $input) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountType discountValue discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
|
|
71
71
|
export declare const ACCEPT_QUOTE = "\n mutation AcceptQuote($id: ID!) {\n acceptQuote(id: $id) { \n id code state active\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName streetLine1 streetLine2 city province postalCode countryCode }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
|
|
72
|
-
export declare const CANCEL_MY_QUOTE = "\n mutation CancelMyQuote($id: ID!, $reason: String) {\n cancelMyQuote(id: $id, reason: $reason) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
|
|
72
|
+
export declare const CANCEL_MY_QUOTE = "\n mutation CancelMyQuote($id: ID!, $reason: String) {\n cancelMyQuote(id: $id, reason: $reason) { \n id code channelId customerId currencyCode status\n expiresAt salesRepUserId customerNotes convertedOrderId\n createdAt updatedAt\n lines {\n id productVariantId quantity unitPrice discountType discountValue discountLabel position\n createdAt updatedAt\n }\n }\n }\n";
|
|
73
73
|
export declare const GET_BRANDING = "\n query GetBranding($ids: [ID!]!) {\n activeChannel {\n id\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n }\n fontResources {\n id\n identifier\n kind\n family\n weights\n files {\n id\n source\n preview\n mimeType\n }\n }\n brandingAssets(ids: $ids) {\n id\n source\n preview\n mimeType\n }\n }\n";
|
|
74
|
-
export declare const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = "\n query ActiveChannelOrderConstraints {\n activeChannelOrderConstraints {\n minOrderAmountGross\n fulfillmentMinOrderNet\n currencyCode\n customerIsExempt\n }\n }\n";
|
|
74
|
+
export declare const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = "\n query ActiveChannelOrderConstraints {\n activeChannelOrderConstraints {\n minOrderAmountGross\n minOrderQuantity\n fulfillmentMinOrderNet\n currencyCode\n customerIsExempt\n }\n }\n";
|
|
75
75
|
export declare const MY_ORDER_INVOICES = "\n query MyOrderInvoices($orderCode: String!) {\n myOrderInvoices(orderCode: $orderCode) {\n id invoiceNumber invoicedOn totalWithTax currencyCode languageCode createdAt\n }\n }\n";
|
|
76
76
|
export declare const MY_INVOICE_PDF = "\n query MyInvoicePdf($invoiceId: ID!) {\n myInvoicePdf(invoiceId: $invoiceId) {\n base64 filename invoiceNumber\n }\n }\n";
|
|
77
77
|
export declare const MY_RETURNS = "\n query MyReturns($take: Int, $skip: Int) {\n myReturns(options: { take: $take, skip: $skip }) {\n items { \n id code state\n orderId orderCode currencyCode\n preferredSettlementMethod settlementMethod\n shippingRefundAmount settledAmount\n customerNote requestedAt resolvedAt createdAt\n lines {\n id orderLineId\n productVariantId productVariantName productVariantSku\n requestedQty approvedQty receivedQty restockQty writeOffQty\n reasonCode reasonNote\n unitPriceWithTax refundAmount\n }\n }\n totalItems\n }\n }\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../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
|
export const GET_COLLECTION = `
|
|
203
203
|
query GetCollection($slug: String!) {
|
|
204
204
|
collection(slug: $slug) {
|
|
205
|
-
id name slug description
|
|
205
|
+
id name slug description position
|
|
206
206
|
featuredAsset {
|
|
207
207
|
source
|
|
208
208
|
presets { l { url webpUrl } xl { url webpUrl } }
|
|
209
209
|
}
|
|
210
210
|
breadcrumbs { id name slug }
|
|
211
|
+
parent { id }
|
|
211
212
|
children { id name slug }
|
|
213
|
+
customFields {
|
|
214
|
+
isRoutable
|
|
215
|
+
isCanonical
|
|
216
|
+
noindex
|
|
217
|
+
nofollow
|
|
218
|
+
metaRobotsMaxImagePreview
|
|
219
|
+
socialImageId
|
|
220
|
+
socialOgType
|
|
221
|
+
twitterCardType
|
|
222
|
+
}
|
|
223
|
+
translations {
|
|
224
|
+
languageCode
|
|
225
|
+
name
|
|
226
|
+
slug
|
|
227
|
+
customFields {
|
|
228
|
+
seoTitle
|
|
229
|
+
seoDescription
|
|
230
|
+
canonicalUrl
|
|
231
|
+
socialTitle
|
|
232
|
+
socialDescription
|
|
233
|
+
socialImageAlt
|
|
234
|
+
}
|
|
235
|
+
}
|
|
212
236
|
productVariants(options: { take: 20 }) {
|
|
213
237
|
items {
|
|
214
238
|
id
|
|
@@ -930,7 +954,7 @@ const QUOTE_FIELDS = `
|
|
|
930
954
|
expiresAt salesRepUserId customerNotes convertedOrderId
|
|
931
955
|
createdAt updatedAt
|
|
932
956
|
lines {
|
|
933
|
-
id productVariantId quantity unitPrice discountLabel position
|
|
957
|
+
id productVariantId quantity unitPrice discountType discountValue discountLabel position
|
|
934
958
|
createdAt updatedAt
|
|
935
959
|
}
|
|
936
960
|
`;
|
|
@@ -995,6 +1019,7 @@ export const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = `
|
|
|
995
1019
|
query ActiveChannelOrderConstraints {
|
|
996
1020
|
activeChannelOrderConstraints {
|
|
997
1021
|
minOrderAmountGross
|
|
1022
|
+
minOrderQuantity
|
|
998
1023
|
fulfillmentMinOrderNet
|
|
999
1024
|
currencyCode
|
|
1000
1025
|
customerIsExempt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAQA,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqDnB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqDzB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B5B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;CAU1B,CAAC;AAIF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgB/B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG
|
|
1
|
+
{"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAQA,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqDnB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAqDzB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+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GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B3B,CAAC;AAIF,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;CAU/C,CAAC;AAIF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;CAMhC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;CAM7B,CAAC;AASF,MAAM,aAAa,GAAG;;;;;;;;;;;;;CAarB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;;;gBAGV,aAAa;;;;CAI5B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;;0BAEC,aAAa;;CAEtC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;UAcpB,aAAa;;CAEtB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;gCAEA,aAAa;;CAE5C,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;CAWzC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HttpClient } from '../core/http.js';
|
|
2
|
+
import type { SavedList } from '../types.js';
|
|
3
|
+
export declare function createSavedListsMethods(http: HttpClient): {
|
|
4
|
+
getMySavedLists(): Promise<SavedList[]>;
|
|
5
|
+
getMySavedList(id: string): Promise<SavedList | null>;
|
|
6
|
+
createSavedList(name: string): Promise<SavedList>;
|
|
7
|
+
renameSavedList(id: string, name: string): Promise<SavedList>;
|
|
8
|
+
deleteSavedList(id: string): Promise<boolean>;
|
|
9
|
+
addItemToSavedList(listId: string, variantId: string, quantity: number): Promise<SavedList>;
|
|
10
|
+
updateSavedListItem(listId: string, variantId: string, quantity: number): Promise<SavedList>;
|
|
11
|
+
removeItemFromSavedList(listId: string, variantId: string): Promise<SavedList>;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=saved-lists.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saved-lists.d.ts","sourceRoot":"","sources":["../../src/commerce/saved-lists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA4E7C,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU;uBAE3B,OAAO,CAAC,SAAS,EAAE,CAAC;uBAKpB,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;0BAK/B,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;wBAK7B,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;wBAQzC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;+BAMzC,MAAM,aACH,MAAM,YACP,MAAM,GACf,OAAO,CAAC,SAAS,CAAC;gCAUX,MAAM,aACH,MAAM,YACP,MAAM,GACf,OAAO,CAAC,SAAS,CAAC;oCASiB,MAAM,aAAa,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;EAQvF"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const LIST_FIELDS = `
|
|
2
|
+
id name createdAt updatedAt
|
|
3
|
+
items {
|
|
4
|
+
id productVariantId quantity position createdAt
|
|
5
|
+
productVariant {
|
|
6
|
+
id name sku
|
|
7
|
+
price priceWithTax currencyCode stockLevel saleable
|
|
8
|
+
priceListName retailPrice retailPriceWithTax
|
|
9
|
+
priceTiers { minQuantity price priceWithTax discountLabel }
|
|
10
|
+
featuredAsset {
|
|
11
|
+
source
|
|
12
|
+
presets { xs { url webpUrl } }
|
|
13
|
+
}
|
|
14
|
+
product {
|
|
15
|
+
id name slug
|
|
16
|
+
featuredAsset {
|
|
17
|
+
source
|
|
18
|
+
presets { xs { url webpUrl } }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
options { id name group { name } }
|
|
22
|
+
customFields { minOrderQuantity salesUnit position }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
const MY_SAVED_LISTS = `
|
|
27
|
+
query MySavedLists {
|
|
28
|
+
mySavedLists { ${LIST_FIELDS} }
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
const MY_SAVED_LIST = `
|
|
32
|
+
query MySavedList($id: ID!) {
|
|
33
|
+
mySavedList(id: $id) { ${LIST_FIELDS} }
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
const CREATE_SAVED_LIST = `
|
|
37
|
+
mutation CreateSavedList($name: String!) {
|
|
38
|
+
createSavedList(name: $name) { ${LIST_FIELDS} }
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
41
|
+
const RENAME_SAVED_LIST = `
|
|
42
|
+
mutation RenameSavedList($id: ID!, $name: String!) {
|
|
43
|
+
renameSavedList(id: $id, name: $name) { ${LIST_FIELDS} }
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
const DELETE_SAVED_LIST = `
|
|
47
|
+
mutation DeleteSavedList($id: ID!) {
|
|
48
|
+
deleteSavedList(id: $id)
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
const ADD_ITEM_TO_SAVED_LIST = `
|
|
52
|
+
mutation AddItemToSavedList($listId: ID!, $variantId: ID!, $quantity: Int!) {
|
|
53
|
+
addItemToSavedList(listId: $listId, variantId: $variantId, quantity: $quantity) { ${LIST_FIELDS} }
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
const UPDATE_SAVED_LIST_ITEM = `
|
|
57
|
+
mutation UpdateSavedListItem($listId: ID!, $variantId: ID!, $quantity: Int!) {
|
|
58
|
+
updateSavedListItem(listId: $listId, variantId: $variantId, quantity: $quantity) { ${LIST_FIELDS} }
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
const REMOVE_ITEM_FROM_SAVED_LIST = `
|
|
62
|
+
mutation RemoveItemFromSavedList($listId: ID!, $variantId: ID!) {
|
|
63
|
+
removeItemFromSavedList(listId: $listId, variantId: $variantId) { ${LIST_FIELDS} }
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
export function createSavedListsMethods(http) {
|
|
67
|
+
return {
|
|
68
|
+
async getMySavedLists() {
|
|
69
|
+
const data = await http.graphql(MY_SAVED_LISTS);
|
|
70
|
+
return data.mySavedLists;
|
|
71
|
+
},
|
|
72
|
+
async getMySavedList(id) {
|
|
73
|
+
const data = await http.graphql(MY_SAVED_LIST, { id });
|
|
74
|
+
return data.mySavedList;
|
|
75
|
+
},
|
|
76
|
+
async createSavedList(name) {
|
|
77
|
+
const data = await http.graphql(CREATE_SAVED_LIST, { name });
|
|
78
|
+
return data.createSavedList;
|
|
79
|
+
},
|
|
80
|
+
async renameSavedList(id, name) {
|
|
81
|
+
const data = await http.graphql(RENAME_SAVED_LIST, {
|
|
82
|
+
id,
|
|
83
|
+
name,
|
|
84
|
+
});
|
|
85
|
+
return data.renameSavedList;
|
|
86
|
+
},
|
|
87
|
+
async deleteSavedList(id) {
|
|
88
|
+
const data = await http.graphql(DELETE_SAVED_LIST, { id });
|
|
89
|
+
return data.deleteSavedList;
|
|
90
|
+
},
|
|
91
|
+
async addItemToSavedList(listId, variantId, quantity) {
|
|
92
|
+
const data = await http.graphql(ADD_ITEM_TO_SAVED_LIST, {
|
|
93
|
+
listId,
|
|
94
|
+
variantId,
|
|
95
|
+
quantity,
|
|
96
|
+
});
|
|
97
|
+
return data.addItemToSavedList;
|
|
98
|
+
},
|
|
99
|
+
async updateSavedListItem(listId, variantId, quantity) {
|
|
100
|
+
const data = await http.graphql(UPDATE_SAVED_LIST_ITEM, {
|
|
101
|
+
listId,
|
|
102
|
+
variantId,
|
|
103
|
+
quantity,
|
|
104
|
+
});
|
|
105
|
+
return data.updateSavedListItem;
|
|
106
|
+
},
|
|
107
|
+
async removeItemFromSavedList(listId, variantId) {
|
|
108
|
+
const data = await http.graphql(REMOVE_ITEM_FROM_SAVED_LIST, { listId, variantId });
|
|
109
|
+
return data.removeItemFromSavedList;
|
|
110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AAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU;sBAGzC,MAAM,WACH,MAAM,YACL,cAAc,GACvB,OAAO,CAAC,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/content/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU;sBAGzC,MAAM,WACH,MAAM,YACL,cAAc,GACvB,OAAO,CAAC,eAAe,CAAC;EAS9B"}
|
package/dist/content/resolve.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/content/resolve.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,oBAAoB,CAAC,IAAgB;IACnD,OAAO;QACL,KAAK,CAAC,WAAW,CACf,IAAY,EACZ,MAAe,EACf,OAAwB;YAExB,MAAM,MAAM,GAA2B,EAAE,IAAI,EAAE,CAAC;YAChD,IAAI,MAAM;gBAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/content/resolve.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,oBAAoB,CAAC,IAAgB;IACnD,OAAO;QACL,KAAK,CAAC,WAAW,CACf,IAAY,EACZ,MAAe,EACf,OAAwB;YAExB,MAAM,MAAM,GAA2B,EAAE,IAAI,EAAE,CAAC;YAChD,IAAI,MAAM;gBAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;YAGnC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAA4B,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;YACtF,OAAO,GAAG,CAAC,IAAI,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { createStorefrontClient } from './client.js';
|
|
|
2
2
|
export { DEFAULT_CMS_URL, DEFAULT_PLUGINS_URL, DEFAULT_VENDURE_URL, RESERVED_STOREFRONT_PATHS, type ReservedStorefrontPath, SHOP_API_PATH, } from './constants.js';
|
|
3
3
|
export { buildFilteredProductsSearch, type FilteredProductsConfig, type FilteredProductsValue, } from './content/filtered-products.js';
|
|
4
4
|
export { MutationError, StorefrontError } from './errors.js';
|
|
5
|
-
export type { AiSummaryInput, BotDirective, BreadcrumbOverrideEntry, CollectionForSeo, HreflangLink, HreflangLinkTag, HreflangOverrideEntry, LlmsTxtEntryInput, MetaRobots, MetaRobotsFollowDirective, MetaRobotsIndexDirective, MetaRobotsMaxImagePreview, MetaTagsEntityInput, MetaTagsResult, OpenGraphTag, PerBotDirectives, ProductForSeo, ProductMetadata, ProductMetadataAi, ProductMetadataSocial, ProductMetadataTwitter, ProductMetaTagsInput, ProductSeoExtras, QAPair, RobotsMetaTag, RobotsXRobotsHeader, SeoEntityInput, SeoMeta, SeoModule, SocialOgType, TwitterCardType, TwitterTag, UrlLocaleStrategy, } from './seo/index.js';
|
|
6
|
-
export
|
|
5
|
+
export type { AiSummaryInput, BotDirective, BreadcrumbOverrideEntry, CmsItemMetadata, CmsMetaTagsInput, CmsSeoExtras, CollectionForSeo, CollectionMetadata, CollectionMetaTagsInput, CollectionSeoExtras, CommonSeoMetadata, HreflangLink, HreflangLinkTag, HreflangOverrideEntry, LlmsTxtEntryInput, MetaRobots, MetaRobotsFollowDirective, MetaRobotsIndexDirective, MetaRobotsMaxImagePreview, MetaTagsEntityInput, MetaTagsResult, OpenGraphTag, PerBotDirectives, ProductForSeo, ProductMetadata, ProductMetadataAi, ProductMetadataSocial, ProductMetadataTwitter, ProductMetaTagsInput, ProductSeoExtras, QAPair, RawCmsSeo, RawCollectionSeo, RawProductMetadata, RobotsMetaTag, RobotsXRobotsHeader, SeoEntityInput, SeoMeta, SeoModule, SocialOgType, TwitterCardType, TwitterTag, UrlLocaleStrategy, } from './seo/index.js';
|
|
6
|
+
export { parseCmsItemMetadata, parseCollectionMetadata, parseProductMetadata, robotsFromFlags, } from './seo/index.js';
|
|
7
|
+
export type { ActiveChannel, AddressInput, AgeVerificationStatus, Asset, AssetPresetSize, AssetPresets, B2bCreditStatus, BrandingAssetRef, BrandingContact, BrandingFontResource, BrandingIdentity, BrandingInfo, BrandingLegal, BrandingLegalAddress, BrandingSocialLinks, BrandingStorefrontConfig, BrandingTheme, Breadcrumb, ChannelInfo, CmsAsset, CmsAssetTranslation, Collection, CollectionDetail, CollectionFieldDefinition, CollectionListOptions, CollectionPageValues, CommerceModule, ContentItemSummary, ContentItemWithFields, ContentModule, ContentQueryOptions, ContentSearchHit, ContentSearchQuery, ContentSearchResult, ContentStrings, ConvertedAmount, Country, CreateMolliePaymentIntentInput, CreateQuoteRequestInput, CreateReviewInput, CreateReviewResult, CreditBalanceSource, CreditModule, CurrencyModule, Customer, CustomerAddress, CustomerGroup, CustomerInput, CustomerPriceList, CustomerReturn, CustomerReturnEligibility, CustomerReturnLine, CustomerReturnList, CustomerReturnListOptions, CustomerReturnReasonCode, CustomerReturnSettlementMethod, CustomerReturnState, CustomerSubscription, CustomerSubscriptionStatus, DeliveryOption, DeliveryOptionsInput, DeliveryTimeFrame, DisplayPrice, DropOffPoint, DropOffPointInput, ExchangeRate, Facet, FacetValue, FacetValueFilterInput, FavoriteItem, FavoriteVariant, FormDefinition, FormField, FormSubmissionResult, LoginResult, MediaModule, Menu, MenuItem, MollieOrderStatusResult, MolliePaymentIntentResult, MolliePaymentMethod, MolliePaymentMethodAmount, MolliePaymentMethodsInput, MyPaymentMandate, NavigationModule, OptionGroup, Order, OrderAddress, OrderedMollieMethod, OrderLine, OrderListOptions, OrderPayment, OrderSummary, OrderValidationError, OrderValidationResult, PaginatedList, PaymentInput, PaymentMethod, PresetName, PriceDisplay, PriceTier, PricingModule, Product, ProductListOptions, ProductOption, ProductPropertyGroupValues, ProductPropertyRecord, ProductReview, ProductSummary, ProductVariant, Property, PropertyConfig, PropertyFieldFacet, PropertyGroup, PropertyGroupTranslation, PropertyTranslation, PropertyValue, PublicProductDocument, Quote, QuoteLine, QuoteList, QuoteListOptions, QuoteStatus, RecommendedProductGroup, RegisterInput, RequestOptions, RequestReturnInput, RequestReturnLineInput, ResolvedContent, ResponsiveImageData, RetryConfig, ReturnableOrderLine, ReviewAttribute, ReviewAttributeAggregation, ReviewChannelConfig, ReviewListOptions, ReviewMediaUploadResult, ReviewRatingDistribution, ReviewRatingSummary, RouteEntry, RoutesResponse, SavedList, SavedListItem, SearchFacetValue, SearchInput, SearchResult, SearchResultItem, SetupPaymentMandateResult, ShipmentTrackingHistoryEntry, ShipmentTrackingInfo, ShippingLine, ShippingMethod, SitemapEntry, StoreContext, StorefrontClient, StorefrontClientConfig, StripePaymentIntentResult, SubscriptionPlanPublic, TaxDisplayMode, TierTableEntry, UpdateAddressInput, UpdateCustomerInput, UpdateReviewInput, VariantPriceData, VatValidationResult, VendureAssetDescriptionTranslation, } from './types.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM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pB,YAAY,EACZ,cAAc,EAEd,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAEhB,mBAAmB,EACnB,kCAAkC,GACnC,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7D,YAAY,EACV,cAAc,EACd,YAAY,EACZ,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,UAAU,EACV,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,OAAO,EACP,SAAS,EACT,YAAY,EACZ,eAAe,EACf,UAAU,EACV,iBAAiB,GAClB,MAAM,gBAAgB,CA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W,EAEX,KAAK,EACL,YAAY,EACZ,mBAAmB,EACnB,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EAErB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACZ,SAAS,EACT,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,aAAa,EAEb,0BAA0B,EAC1B,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,cAAc,EACd,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EACb,qBAAqB,EACrB,KAAK,EACL,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,WAAW,EAEX,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EAEnB,eAAe,EACf,0BAA0B,EAC1B,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,WAAW,EAEX,YAAY,EACZ,gBAAgB,EAChB,yBAAyB,EACzB,4BAA4B,EAC5B,oBAAoB,EACpB,YAAY,EACZ,cAAc,EAEd,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAEhB,mBAAmB,EACnB,kCAAkC,GACnC,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { createStorefrontClient } from './client.js';
|
|
|
2
2
|
export { DEFAULT_CMS_URL, DEFAULT_PLUGINS_URL, DEFAULT_VENDURE_URL, RESERVED_STOREFRONT_PATHS, SHOP_API_PATH, } from './constants.js';
|
|
3
3
|
export { buildFilteredProductsSearch, } from './content/filtered-products.js';
|
|
4
4
|
export { MutationError, StorefrontError } from './errors.js';
|
|
5
|
+
export { parseCmsItemMetadata, parseCollectionMetadata, parseProductMetadata, robotsFromFlags, } from './seo/index.js';
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EAEzB,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,GAG5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EAEzB,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,2BAA2B,GAG5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA8C7D,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,GAChB,MAAM,gBAAgB,CAAC"}
|
|
@@ -2,7 +2,10 @@ import type { OrderValidationResult } from '../types.js';
|
|
|
2
2
|
export declare function validateOrderMinimums(order: {
|
|
3
3
|
totalWithTax: number;
|
|
4
4
|
currencyCode: string;
|
|
5
|
+
totalQuantity?: number;
|
|
5
6
|
}, constraints: {
|
|
6
|
-
|
|
7
|
+
minOrderAmountGross?: number | null;
|
|
8
|
+
minOrderQuantity?: number | null;
|
|
9
|
+
minOrderAmount?: number | null;
|
|
7
10
|
}): OrderValidationResult;
|
|
8
11
|
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/pricing/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,qBAAqB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/pricing/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAoB/E,wBAAgB,qBAAqB,CACnC,KAAK,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,EAC7E,WAAW,EAAE;IAEX,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,GACA,qBAAqB,CAgCvB"}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
import { formatPrice } from './format.js';
|
|
2
2
|
export function validateOrderMinimums(order, constraints) {
|
|
3
3
|
const errors = [];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
const minAmount = constraints.minOrderAmountGross ?? constraints.minOrderAmount;
|
|
5
|
+
if (minAmount != null && minAmount > 0 && order.totalWithTax < minAmount) {
|
|
6
|
+
errors.push({
|
|
7
|
+
type: 'min_amount',
|
|
8
|
+
message: `Minimum order amount is ${formatPrice(minAmount, order.currencyCode)}`,
|
|
9
|
+
required: minAmount,
|
|
10
|
+
actual: order.totalWithTax,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
const minQuantity = constraints.minOrderQuantity;
|
|
14
|
+
if (minQuantity != null &&
|
|
15
|
+
minQuantity > 0 &&
|
|
16
|
+
order.totalQuantity != null &&
|
|
17
|
+
order.totalQuantity < minQuantity) {
|
|
18
|
+
errors.push({
|
|
19
|
+
type: 'min_quantity',
|
|
20
|
+
message: `Minimum order quantity is ${minQuantity} items`,
|
|
21
|
+
required: minQuantity,
|
|
22
|
+
actual: order.totalQuantity,
|
|
23
|
+
});
|
|
13
24
|
}
|
|
14
25
|
return { valid: errors.length === 0, errors };
|
|
15
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/pricing/validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/pricing/validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAmB1C,MAAM,UAAU,qBAAqB,CACnC,KAA6E,EAC7E,WAOC;IAED,MAAM,MAAM,GAA2B,EAAE,CAAC;IAE1C,MAAM,SAAS,GAAG,WAAW,CAAC,mBAAmB,IAAI,WAAW,CAAC,cAAc,CAAC;IAChF,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,GAAG,CAAC,IAAI,KAAK,CAAC,YAAY,GAAG,SAAS,EAAE,CAAC;QACzE,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,2BAA2B,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,YAAY,CAAC,EAAE;YAChF,QAAQ,EAAE,SAAS;YACnB,MAAM,EAAE,KAAK,CAAC,YAAY;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,MAAM,WAAW,GAAG,WAAW,CAAC,gBAAgB,CAAC;IAIjD,IACE,WAAW,IAAI,IAAI;QACnB,WAAW,GAAG,CAAC;QACf,KAAK,CAAC,aAAa,IAAI,IAAI;QAC3B,KAAK,CAAC,aAAa,GAAG,WAAW,EACjC,CAAC;QACD,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,6BAA6B,WAAW,QAAQ;YACzD,QAAQ,EAAE,WAAW;YACrB,MAAM,EAAE,KAAK,CAAC,aAAa;SAC5B,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;AAChD,CAAC"}
|
package/dist/seo/ai.d.ts
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
|
-
import type { ProductMetadata } from './metadata-types.js';
|
|
2
|
-
import type { ProductForSeo } from './types.js';
|
|
3
|
-
export
|
|
1
|
+
import type { CmsItemMetadata, CollectionMetadata, ProductMetadata } from './metadata-types.js';
|
|
2
|
+
import type { CmsItemForSeo, CollectionForSeo, ProductForSeo } from './types.js';
|
|
3
|
+
export type AiSummaryInput = {
|
|
4
4
|
kind: 'product';
|
|
5
5
|
metadata: ProductMetadata | null;
|
|
6
|
-
}
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'collection';
|
|
8
|
+
metadata: CollectionMetadata | null;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'cms';
|
|
11
|
+
metadata: CmsItemMetadata | null;
|
|
12
|
+
};
|
|
7
13
|
export declare function aiSummaryFor(input: AiSummaryInput): string | null;
|
|
8
|
-
export
|
|
14
|
+
export type LlmsTxtEntryInput = ({
|
|
9
15
|
kind: 'product';
|
|
10
16
|
product: ProductForSeo;
|
|
11
17
|
metadata: ProductMetadata | null;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'collection';
|
|
20
|
+
collection: CollectionForSeo;
|
|
21
|
+
metadata: CollectionMetadata | null;
|
|
22
|
+
} | {
|
|
23
|
+
kind: 'cms';
|
|
24
|
+
cms: CmsItemForSeo;
|
|
25
|
+
metadata: CmsItemMetadata | null;
|
|
26
|
+
}) & {
|
|
12
27
|
url: string;
|
|
13
28
|
name: string;
|
|
14
29
|
description?: string;
|
|
15
|
-
}
|
|
30
|
+
};
|
|
16
31
|
export declare function llmsTxtEntryFor(input: LlmsTxtEntryInput): string;
|
|
17
32
|
//# sourceMappingURL=ai.d.ts.map
|
package/dist/seo/ai.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/seo/ai.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/seo/ai.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAChG,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAcjF,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAA;CAAE,CAAC;AAmBtD,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,GAAG,IAAI,CAGjE;AAED,MAAM,MAAM,iBAAiB,GAAG,CAC5B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAA;CAAE,GAC7E;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAAE,GACzF;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAA;CAAE,CACxE,GAAG;IAEF,GAAG,EAAE,MAAM,CAAC;IAEZ,IAAI,EAAE,MAAM,CAAC;IAEb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAOF,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAShE"}
|
package/dist/seo/ai.js
CHANGED
|
@@ -8,12 +8,22 @@ function truncate(input, max) {
|
|
|
8
8
|
return input;
|
|
9
9
|
return `${input.slice(0, max - 1).trimEnd()}…`;
|
|
10
10
|
}
|
|
11
|
+
function summaryOf(input) {
|
|
12
|
+
switch (input.kind) {
|
|
13
|
+
case 'product':
|
|
14
|
+
return input.metadata?.ai.summary ?? null;
|
|
15
|
+
case 'cms':
|
|
16
|
+
return input.metadata?.aiSummary ?? null;
|
|
17
|
+
case 'collection':
|
|
18
|
+
return input.metadata?.seoDescription ?? null;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
11
21
|
export function aiSummaryFor(input) {
|
|
12
|
-
const value = input
|
|
22
|
+
const value = summaryOf(input)?.trim();
|
|
13
23
|
return value && value.length > 0 ? value : null;
|
|
14
24
|
}
|
|
15
25
|
export function llmsTxtEntryFor(input) {
|
|
16
|
-
const summary = input
|
|
26
|
+
const summary = aiSummaryFor(input)?.trim() ??
|
|
17
27
|
input.metadata?.seoDescription?.trim() ??
|
|
18
28
|
(input.description ? truncate(stripHtml(input.description), 160) : '');
|
|
19
29
|
const urlWithSuffix = appendMdSuffix(input.url);
|
package/dist/seo/ai.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/seo/ai.ts"],"names":[],"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AAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACtF,IAAI,OAAO,KAAK,CAAC,CAAC;QAAE,OAAO,GAAG,GAAG,KAAK,CAAC;IACvC,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;AAC5D,CAAC"}
|
package/dist/seo/index.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ import type { StoreContext } from '../types.js';
|
|
|
2
2
|
import type { SeoModule } from './types.js';
|
|
3
3
|
export declare function createSeoModule(ctx: StoreContext): SeoModule;
|
|
4
4
|
export type { AiSummaryInput, LlmsTxtEntryInput, } from './ai.js';
|
|
5
|
-
export type { HreflangLinkTag, MetaTagsEntityInput, MetaTagsResult, OpenGraphTag, ProductMetaTagsInput, ProductSeoExtras, TwitterTag, } from './meta-tags.js';
|
|
6
|
-
export type {
|
|
5
|
+
export type { CmsMetaTagsInput, CmsSeoExtras, CollectionMetaTagsInput, CollectionSeoExtras, HreflangLinkTag, MetaTagsEntityInput, MetaTagsResult, OpenGraphTag, ProductMetaTagsInput, ProductSeoExtras, TwitterTag, } from './meta-tags.js';
|
|
6
|
+
export type { RawCmsSeo, RawCollectionSeo, RawProductMetadata } from './metadata-parser.js';
|
|
7
|
+
export { parseCmsItemMetadata, parseCollectionMetadata, parseProductMetadata, robotsFromFlags, } from './metadata-parser.js';
|
|
8
|
+
export type { BotDirective, BreadcrumbOverrideEntry, CmsItemMetadata, CollectionMetadata, CommonSeoMetadata, HreflangOverrideEntry, MetaRobots, MetaRobotsFollowDirective, MetaRobotsIndexDirective, MetaRobotsMaxImagePreview, ProductMetadata, ProductMetadataAi, ProductMetadataSocial, ProductMetadataTwitter, QAPair, SocialOgType, TwitterCardType, } from './metadata-types.js';
|
|
7
9
|
export type { PerBotDirectives, RobotsMetaTag, RobotsXRobotsHeader, } from './robots.js';
|
|
8
10
|
export type { CollectionForSeo, HreflangLink, ProductForSeo, SeoEntityInput, SeoMeta, SeoModule, UrlLocaleStrategy, } from './types.js';
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/seo/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seo/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAMhD,OAAO,KAAK,EAAkB,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5D,wBAAgB,eAAe,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/seo/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAMhD,OAAO,KAAK,EAAkB,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5D,wBAAgB,eAAe,CAAC,GAAG,EAAE,YAAY,GAAG,SAAS,CA8D5D;AAED,YAAY,EACV,cAAc,EACd,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,uBAAuB,EACvB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,YAAY,EACZ,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,MAAM,EACN,YAAY,EACZ,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,OAAO,EACP,SAAS,EACT,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|