@misiki/gocommerce-connector 0.14.0 → 0.16.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/README.md CHANGED
@@ -152,9 +152,10 @@ down stays best-effort: the storefront renders from its static record.
152
152
  | product specs table | the product's category attribute answers |
153
153
  | attribute filters (`?attributes.color=Red`) | `/api/products?attr=color:Red` |
154
154
  | newsletter box | `/x/newsletter/subscribe` |
155
- | contact form, product enquiries | `/x/contact/messages` |
155
+ | contact form, product enquiries | `/x/contact/messages`, with the form's hidden `website` honeypot passed on so the engine drops what a bot filled in |
156
156
  | search words, type-ahead (plugin on) | `/x/meilisearch/search`, falling back to the engine's own search when it is off or down |
157
- | store record | the storefront's own config, with the engine's currency, menus and module switches over it |
157
+ | store record | the storefront's own config, with the engine's currency, menus and module switches over it; the store's own logo, dark logo and icon (`logo_url`, `logo_dark_url`, `icon_url` from `/api/store`, D148) replace `logo`, `logoDark` and `favicon` when it has them; for the contact page (D156), the address once the store shows it (as `address: { street, city, state, pincode, country }`), `mapLocation` and `openingHours` when set, `businessCountry` (the store's ISO country, for the phone's country code), and the `whatsapp-chat` plugin's number as `plugins.whatsappChatButton` |
158
+ | resized product pictures | `/images/{store}/cdn-cgi/image/width=…/…` — the store record's `plugins.imageCdn` is turned on with provider `cloudflare` and the engine's `images_path` (from `/api/store`, D139) after `PUBLIC_GOCOMMERCE_API_URL`, so the storefront's srcset asks the engine for each width; an engine without it leaves the static record's setting |
158
159
 
159
160
  Blogs, banners, reels, chat, warranties, deals and uploads have no engine
160
161
  equivalent. Their lists answer empty and anything that would write or open one
@@ -425,6 +425,35 @@ type StoreProfile = {
425
425
  phone: string;
426
426
  support_url: string;
427
427
  language: string;
428
+ /** Where the engine serves this store's pictures resized (D139); absent on an engine before it. */
429
+ images_path?: string;
430
+ /** The store's logo, logo for dark backgrounds and square icon (D148); empty or absent when it has none. */
431
+ logo_url?: string;
432
+ logo_dark_url?: string;
433
+ icon_url?: string;
434
+ /**
435
+ * For a contact page (D156); absent on an engine before it. The address is
436
+ * null unless the store chose to show it; the map location is a Google Maps
437
+ * link or "lat,long"; the hours are one range per open day, Monday first.
438
+ * The country (ISO alpha-2) is public on its own, for the phone's country code.
439
+ */
440
+ country?: string;
441
+ address?: {
442
+ line1: string;
443
+ line2: string;
444
+ city: string;
445
+ state: string;
446
+ postal_code: string;
447
+ country: string;
448
+ } | null;
449
+ map_location?: string;
450
+ opening_hours?: OpeningHours[];
451
+ };
452
+ /** When the shop is open on one day: `day` is mon…sun, the times 24-hour HH:MM. */
453
+ type OpeningHours = {
454
+ day: string;
455
+ opens: string;
456
+ closes: string;
428
457
  };
429
458
  type Vendor = {
430
459
  id: number;
@@ -6158,12 +6187,12 @@ declare const menuService: MenuService;
6158
6187
  /**
6159
6188
  * The store record every page renders from.
6160
6189
  *
6161
- * Logo, theme and the rest are the storefront's own (its static store,
6162
- * registered through `setStaticStore`); the engine has no opinion on them.
6163
- * Where the engine does have one, it wins:
6164
- * - the store's name and contact, as its owner set them in the panel. One
6165
- * storefront serves every store under `baseDomain`, so a name in the static
6166
- * record would be every store's name;
6190
+ * Theme and the rest are the storefront's own (its static store, registered
6191
+ * through `setStaticStore`); the engine has no opinion on them. Where the
6192
+ * engine does have one, it wins:
6193
+ * - the store's name, contact, logo and icon, as its owner set them in the
6194
+ * panel. One storefront serves every store under `baseDomain`, so a name or
6195
+ * a logo in the static record would be every store's;
6167
6196
  * - the settlement currency. Every price on the site is formatted with it, and
6168
6197
  * a store record saying USD over an engine charging INR would print the
6169
6198
  * wrong symbol on every price;
@@ -6501,12 +6530,14 @@ declare const vendorService: VendorService;
6501
6530
 
6502
6531
  /** The storefront's contact form and product enquiries, through ext/contact's inbox. */
6503
6532
  declare class ContactService extends BaseService {
6504
- submitContactUsForm({ name, email, phone, message, subject, }: {
6533
+ submitContactUsForm({ name, email, phone, message, subject, website, }: {
6505
6534
  name: string;
6506
6535
  email: string;
6507
6536
  phone?: string;
6508
6537
  message: string;
6509
6538
  subject?: string;
6539
+ /** The form's hidden honeypot, passed on so the engine drops what a bot filled in. */
6540
+ website?: string;
6510
6541
  }): Promise<{
6511
6542
  status: string;
6512
6543
  }>;
@@ -7578,4 +7609,4 @@ declare class B2bService extends BaseService {
7578
7609
  }
7579
7610
  declare const b2bService: B2bService;
7580
7611
 
7581
- export { HomeService as $, type AddOn as A, type B2bPlaced as B, type Cart as C, type CompanyOrder as D, ContactService as E, CountryService as F, CouponService as G, type Credentials as H, type Credit as I, CurrencyService as J, type Customer as K, DealService as L, DemoRequestService as M, type EngineRequest as N, EnquiryService as O, type Envelope as P, type FacetValue as Q, type Faq as R, FaqService as S, FeedbackService as T, type FooterSettings as U, type FreeShipping as V, type Fulfillment as W, GalleryService as X, type HeaderSettings as Y, type HomeLayout as Z, type HomeLayoutSection as _, type Address as a, type VariantImage as a$, type IdentityAddress as a0, InitService as a1, type Invitation as a2, type LayoutCollection as a3, type LayoutPage as a4, LayoutService as a5, type Lead as a6, type ListMeta as a7, MeilisearchService as a8, type Member as a9, ReelsService as aA, RegionService as aB, type RejectedLine as aC, type Review as aD, type ReviewPage as aE, ReviewService as aF, type SearchDoc as aG, type SearchResult as aH, SearchService as aI, SettingService as aJ, type ShippingRate as aK, type SiteChrome as aL, type SiteFooter as aM, type SiteHeader as aN, type SocialLink as aO, StateService as aP, type StoreProfile as aQ, StoreService as aR, type StorefrontCategory as aS, type StorefrontMenu as aT, type StorefrontOrder as aU, type StorefrontProduct as aV, type ThemeSettings as aW, type ThemeSettingsResult as aX, UploadService as aY, UserService as aZ, type Variant as a_, type Menu as aa, type MenuItem as ab, MenuService as ac, type MenuSummary as ad, type Money as ae, NewsletterService as af, type Offer as ag, type Order as ah, type OrderLine as ai, OrderService as aj, type PageLayout as ak, PageService as al, type PaymentIntent as am, PaymentMethodService as an, type Plugin as ao, PluginService as ap, PopularSearchService as aq, PopularityService as ar, type Postcode as as, type Product as at, type ProductFacets as au, type ProductOption as av, ProductService as aw, ProfileService as ax, type Quote as ay, REDIRECT_GATEWAYS as az, AddressService as b, settingService as b$, VariantService as b0, VarniCustomDesignService as b1, VarniCustomProductService as b2, type Vendor as b3, VendorService as b4, WarrantyService as b5, type Wishlist as b6, type WishlistItem as b7, WishlistService as b8, addressService as b9, homeService as bA, initService as bB, layoutService as bC, mediaUrl as bD, meilisearchService as bE, menuService as bF, minorToMajor as bG, newsletterService as bH, orderService as bI, ownDomain as bJ, pageService as bK, paymentMethodService as bL, pluginService as bM, pluginsService as bN, popularSearchService as bO, popularityService as bP, priceOf as bQ, productImages as bR, productService as bS, productVideos as bT, profileService as bU, qs as bV, reelsService as bW, regionService as bX, reviewService as bY, searchService as bZ, setRequestHost as b_, authService as ba, autocompleteService as bb, b2bService as bc, bannerService as bd, blogService as be, cartService as bf, categoryService as bg, chatService as bh, checkoutService as bi, collectionService as bj, contactService as bk, countryService as bl, couponService as bm, currencyExponent as bn, currencyService as bo, dealService as bp, demoRequestService as bq, emptyCart as br, emptyPage as bs, enquiryService as bt, faqService as bu, feedbackService as bv, fromEngineAddress as bw, fromIdentityAddress as bx, fromSearchDoc as by, galleryService as bz, type AppliedDiscount as c, settingsService as c0, stateService as c1, staticStore as c2, storeForHost as c3, storeService as c4, toAddOn as c5, toCart as c6, toCartLine as c7, toCartOffer as c8, toCategory as c9, toCmsPage as ca, toCollection as cb, toEngineAddress as cc, toFreeShipping as cd, toIdentityAddress as ce, toMajor as cf, toMinor as cg, toOrder as ch, toPage as ci, toProduct as cj, toRating as ck, toStorefrontFacets as cl, toUser as cm, toVariant as cn, toVendor as co, uploadService as cp, userService as cq, variantService as cr, varniCustomDesignService as cs, varniCustomProductService as ct, vendorService as cu, warrantyService as cv, wishlistService as cw, type Approval as d, type AuthResponse as e, AuthService as f, AutocompleteService as g, type B2bRole as h, B2bService as i, BannerService as j, BaseService as k, BlogService as l, type CartLine as m, type CartOffer as n, CartService as o, CatalogService as p, type Category as q, CategoryService as r, ChatService as s, type CheckoutOptions as t, type CheckoutResult as u, CheckoutService as v, type CmsPage as w, type Collection as x, CollectionService as y, type Company as z };
7612
+ export { HomeService as $, type AddOn as A, type B2bPlaced as B, type Cart as C, type CompanyOrder as D, ContactService as E, CountryService as F, CouponService as G, type Credentials as H, type Credit as I, CurrencyService as J, type Customer as K, DealService as L, DemoRequestService as M, type EngineRequest as N, EnquiryService as O, type Envelope as P, type FacetValue as Q, type Faq as R, FaqService as S, FeedbackService as T, type FooterSettings as U, type FreeShipping as V, type Fulfillment as W, GalleryService as X, type HeaderSettings as Y, type HomeLayout as Z, type HomeLayoutSection as _, type Address as a, type Variant as a$, type IdentityAddress as a0, InitService as a1, type Invitation as a2, type LayoutCollection as a3, type LayoutPage as a4, LayoutService as a5, type Lead as a6, type ListMeta as a7, MeilisearchService as a8, type Member as a9, REDIRECT_GATEWAYS as aA, ReelsService as aB, RegionService as aC, type RejectedLine as aD, type Review as aE, type ReviewPage as aF, ReviewService as aG, type SearchDoc as aH, type SearchResult as aI, SearchService as aJ, SettingService as aK, type ShippingRate as aL, type SiteChrome as aM, type SiteFooter as aN, type SiteHeader as aO, type SocialLink as aP, StateService as aQ, type StoreProfile as aR, StoreService as aS, type StorefrontCategory as aT, type StorefrontMenu as aU, type StorefrontOrder as aV, type StorefrontProduct as aW, type ThemeSettings as aX, type ThemeSettingsResult as aY, UploadService as aZ, UserService as a_, type Menu as aa, type MenuItem as ab, MenuService as ac, type MenuSummary as ad, type Money as ae, NewsletterService as af, type Offer as ag, type OpeningHours as ah, type Order as ai, type OrderLine as aj, OrderService as ak, type PageLayout as al, PageService as am, type PaymentIntent as an, PaymentMethodService as ao, type Plugin as ap, PluginService as aq, PopularSearchService as ar, PopularityService as as, type Postcode as at, type Product as au, type ProductFacets as av, type ProductOption as aw, ProductService as ax, ProfileService as ay, type Quote as az, AddressService as b, setRequestHost as b$, type VariantImage as b0, VariantService as b1, VarniCustomDesignService as b2, VarniCustomProductService as b3, type Vendor as b4, VendorService as b5, WarrantyService as b6, type Wishlist as b7, type WishlistItem as b8, WishlistService as b9, galleryService as bA, homeService as bB, initService as bC, layoutService as bD, mediaUrl as bE, meilisearchService as bF, menuService as bG, minorToMajor as bH, newsletterService as bI, orderService as bJ, ownDomain as bK, pageService as bL, paymentMethodService as bM, pluginService as bN, pluginsService as bO, popularSearchService as bP, popularityService as bQ, priceOf as bR, productImages as bS, productService as bT, productVideos as bU, profileService as bV, qs as bW, reelsService as bX, regionService as bY, reviewService as bZ, searchService as b_, addressService as ba, authService as bb, autocompleteService as bc, b2bService as bd, bannerService as be, blogService as bf, cartService as bg, categoryService as bh, chatService as bi, checkoutService as bj, collectionService as bk, contactService as bl, countryService as bm, couponService as bn, currencyExponent as bo, currencyService as bp, dealService as bq, demoRequestService as br, emptyCart as bs, emptyPage as bt, enquiryService as bu, faqService as bv, feedbackService as bw, fromEngineAddress as bx, fromIdentityAddress as by, fromSearchDoc as bz, type AppliedDiscount as c, settingService as c0, settingsService as c1, stateService as c2, staticStore as c3, storeForHost as c4, storeService as c5, toAddOn as c6, toCart as c7, toCartLine as c8, toCartOffer as c9, toCategory as ca, toCmsPage as cb, toCollection as cc, toEngineAddress as cd, toFreeShipping as ce, toIdentityAddress as cf, toMajor as cg, toMinor as ch, toOrder as ci, toPage as cj, toProduct as ck, toRating as cl, toStorefrontFacets as cm, toUser as cn, toVariant as co, toVendor as cp, uploadService as cq, userService as cr, variantService as cs, varniCustomDesignService as ct, varniCustomProductService as cu, vendorService as cv, warrantyService as cw, wishlistService as cx, type Approval as d, type AuthResponse as e, AuthService as f, AutocompleteService as g, type B2bRole as h, B2bService as i, BannerService as j, BaseService as k, BlogService as l, type CartLine as m, type CartOffer as n, CartService as o, CatalogService as p, type Category as q, CategoryService as r, ChatService as s, type CheckoutOptions as t, type CheckoutResult as u, CheckoutService as v, type CmsPage as w, type Collection as x, CollectionService as y, type Company as z };
@@ -425,6 +425,35 @@ type StoreProfile = {
425
425
  phone: string;
426
426
  support_url: string;
427
427
  language: string;
428
+ /** Where the engine serves this store's pictures resized (D139); absent on an engine before it. */
429
+ images_path?: string;
430
+ /** The store's logo, logo for dark backgrounds and square icon (D148); empty or absent when it has none. */
431
+ logo_url?: string;
432
+ logo_dark_url?: string;
433
+ icon_url?: string;
434
+ /**
435
+ * For a contact page (D156); absent on an engine before it. The address is
436
+ * null unless the store chose to show it; the map location is a Google Maps
437
+ * link or "lat,long"; the hours are one range per open day, Monday first.
438
+ * The country (ISO alpha-2) is public on its own, for the phone's country code.
439
+ */
440
+ country?: string;
441
+ address?: {
442
+ line1: string;
443
+ line2: string;
444
+ city: string;
445
+ state: string;
446
+ postal_code: string;
447
+ country: string;
448
+ } | null;
449
+ map_location?: string;
450
+ opening_hours?: OpeningHours[];
451
+ };
452
+ /** When the shop is open on one day: `day` is mon…sun, the times 24-hour HH:MM. */
453
+ type OpeningHours = {
454
+ day: string;
455
+ opens: string;
456
+ closes: string;
428
457
  };
429
458
  type Vendor = {
430
459
  id: number;
@@ -6158,12 +6187,12 @@ declare const menuService: MenuService;
6158
6187
  /**
6159
6188
  * The store record every page renders from.
6160
6189
  *
6161
- * Logo, theme and the rest are the storefront's own (its static store,
6162
- * registered through `setStaticStore`); the engine has no opinion on them.
6163
- * Where the engine does have one, it wins:
6164
- * - the store's name and contact, as its owner set them in the panel. One
6165
- * storefront serves every store under `baseDomain`, so a name in the static
6166
- * record would be every store's name;
6190
+ * Theme and the rest are the storefront's own (its static store, registered
6191
+ * through `setStaticStore`); the engine has no opinion on them. Where the
6192
+ * engine does have one, it wins:
6193
+ * - the store's name, contact, logo and icon, as its owner set them in the
6194
+ * panel. One storefront serves every store under `baseDomain`, so a name or
6195
+ * a logo in the static record would be every store's;
6167
6196
  * - the settlement currency. Every price on the site is formatted with it, and
6168
6197
  * a store record saying USD over an engine charging INR would print the
6169
6198
  * wrong symbol on every price;
@@ -6501,12 +6530,14 @@ declare const vendorService: VendorService;
6501
6530
 
6502
6531
  /** The storefront's contact form and product enquiries, through ext/contact's inbox. */
6503
6532
  declare class ContactService extends BaseService {
6504
- submitContactUsForm({ name, email, phone, message, subject, }: {
6533
+ submitContactUsForm({ name, email, phone, message, subject, website, }: {
6505
6534
  name: string;
6506
6535
  email: string;
6507
6536
  phone?: string;
6508
6537
  message: string;
6509
6538
  subject?: string;
6539
+ /** The form's hidden honeypot, passed on so the engine drops what a bot filled in. */
6540
+ website?: string;
6510
6541
  }): Promise<{
6511
6542
  status: string;
6512
6543
  }>;
@@ -7578,4 +7609,4 @@ declare class B2bService extends BaseService {
7578
7609
  }
7579
7610
  declare const b2bService: B2bService;
7580
7611
 
7581
- export { HomeService as $, type AddOn as A, type B2bPlaced as B, type Cart as C, type CompanyOrder as D, ContactService as E, CountryService as F, CouponService as G, type Credentials as H, type Credit as I, CurrencyService as J, type Customer as K, DealService as L, DemoRequestService as M, type EngineRequest as N, EnquiryService as O, type Envelope as P, type FacetValue as Q, type Faq as R, FaqService as S, FeedbackService as T, type FooterSettings as U, type FreeShipping as V, type Fulfillment as W, GalleryService as X, type HeaderSettings as Y, type HomeLayout as Z, type HomeLayoutSection as _, type Address as a, type VariantImage as a$, type IdentityAddress as a0, InitService as a1, type Invitation as a2, type LayoutCollection as a3, type LayoutPage as a4, LayoutService as a5, type Lead as a6, type ListMeta as a7, MeilisearchService as a8, type Member as a9, ReelsService as aA, RegionService as aB, type RejectedLine as aC, type Review as aD, type ReviewPage as aE, ReviewService as aF, type SearchDoc as aG, type SearchResult as aH, SearchService as aI, SettingService as aJ, type ShippingRate as aK, type SiteChrome as aL, type SiteFooter as aM, type SiteHeader as aN, type SocialLink as aO, StateService as aP, type StoreProfile as aQ, StoreService as aR, type StorefrontCategory as aS, type StorefrontMenu as aT, type StorefrontOrder as aU, type StorefrontProduct as aV, type ThemeSettings as aW, type ThemeSettingsResult as aX, UploadService as aY, UserService as aZ, type Variant as a_, type Menu as aa, type MenuItem as ab, MenuService as ac, type MenuSummary as ad, type Money as ae, NewsletterService as af, type Offer as ag, type Order as ah, type OrderLine as ai, OrderService as aj, type PageLayout as ak, PageService as al, type PaymentIntent as am, PaymentMethodService as an, type Plugin as ao, PluginService as ap, PopularSearchService as aq, PopularityService as ar, type Postcode as as, type Product as at, type ProductFacets as au, type ProductOption as av, ProductService as aw, ProfileService as ax, type Quote as ay, REDIRECT_GATEWAYS as az, AddressService as b, settingService as b$, VariantService as b0, VarniCustomDesignService as b1, VarniCustomProductService as b2, type Vendor as b3, VendorService as b4, WarrantyService as b5, type Wishlist as b6, type WishlistItem as b7, WishlistService as b8, addressService as b9, homeService as bA, initService as bB, layoutService as bC, mediaUrl as bD, meilisearchService as bE, menuService as bF, minorToMajor as bG, newsletterService as bH, orderService as bI, ownDomain as bJ, pageService as bK, paymentMethodService as bL, pluginService as bM, pluginsService as bN, popularSearchService as bO, popularityService as bP, priceOf as bQ, productImages as bR, productService as bS, productVideos as bT, profileService as bU, qs as bV, reelsService as bW, regionService as bX, reviewService as bY, searchService as bZ, setRequestHost as b_, authService as ba, autocompleteService as bb, b2bService as bc, bannerService as bd, blogService as be, cartService as bf, categoryService as bg, chatService as bh, checkoutService as bi, collectionService as bj, contactService as bk, countryService as bl, couponService as bm, currencyExponent as bn, currencyService as bo, dealService as bp, demoRequestService as bq, emptyCart as br, emptyPage as bs, enquiryService as bt, faqService as bu, feedbackService as bv, fromEngineAddress as bw, fromIdentityAddress as bx, fromSearchDoc as by, galleryService as bz, type AppliedDiscount as c, settingsService as c0, stateService as c1, staticStore as c2, storeForHost as c3, storeService as c4, toAddOn as c5, toCart as c6, toCartLine as c7, toCartOffer as c8, toCategory as c9, toCmsPage as ca, toCollection as cb, toEngineAddress as cc, toFreeShipping as cd, toIdentityAddress as ce, toMajor as cf, toMinor as cg, toOrder as ch, toPage as ci, toProduct as cj, toRating as ck, toStorefrontFacets as cl, toUser as cm, toVariant as cn, toVendor as co, uploadService as cp, userService as cq, variantService as cr, varniCustomDesignService as cs, varniCustomProductService as ct, vendorService as cu, warrantyService as cv, wishlistService as cw, type Approval as d, type AuthResponse as e, AuthService as f, AutocompleteService as g, type B2bRole as h, B2bService as i, BannerService as j, BaseService as k, BlogService as l, type CartLine as m, type CartOffer as n, CartService as o, CatalogService as p, type Category as q, CategoryService as r, ChatService as s, type CheckoutOptions as t, type CheckoutResult as u, CheckoutService as v, type CmsPage as w, type Collection as x, CollectionService as y, type Company as z };
7612
+ export { HomeService as $, type AddOn as A, type B2bPlaced as B, type Cart as C, type CompanyOrder as D, ContactService as E, CountryService as F, CouponService as G, type Credentials as H, type Credit as I, CurrencyService as J, type Customer as K, DealService as L, DemoRequestService as M, type EngineRequest as N, EnquiryService as O, type Envelope as P, type FacetValue as Q, type Faq as R, FaqService as S, FeedbackService as T, type FooterSettings as U, type FreeShipping as V, type Fulfillment as W, GalleryService as X, type HeaderSettings as Y, type HomeLayout as Z, type HomeLayoutSection as _, type Address as a, type Variant as a$, type IdentityAddress as a0, InitService as a1, type Invitation as a2, type LayoutCollection as a3, type LayoutPage as a4, LayoutService as a5, type Lead as a6, type ListMeta as a7, MeilisearchService as a8, type Member as a9, REDIRECT_GATEWAYS as aA, ReelsService as aB, RegionService as aC, type RejectedLine as aD, type Review as aE, type ReviewPage as aF, ReviewService as aG, type SearchDoc as aH, type SearchResult as aI, SearchService as aJ, SettingService as aK, type ShippingRate as aL, type SiteChrome as aM, type SiteFooter as aN, type SiteHeader as aO, type SocialLink as aP, StateService as aQ, type StoreProfile as aR, StoreService as aS, type StorefrontCategory as aT, type StorefrontMenu as aU, type StorefrontOrder as aV, type StorefrontProduct as aW, type ThemeSettings as aX, type ThemeSettingsResult as aY, UploadService as aZ, UserService as a_, type Menu as aa, type MenuItem as ab, MenuService as ac, type MenuSummary as ad, type Money as ae, NewsletterService as af, type Offer as ag, type OpeningHours as ah, type Order as ai, type OrderLine as aj, OrderService as ak, type PageLayout as al, PageService as am, type PaymentIntent as an, PaymentMethodService as ao, type Plugin as ap, PluginService as aq, PopularSearchService as ar, PopularityService as as, type Postcode as at, type Product as au, type ProductFacets as av, type ProductOption as aw, ProductService as ax, ProfileService as ay, type Quote as az, AddressService as b, setRequestHost as b$, type VariantImage as b0, VariantService as b1, VarniCustomDesignService as b2, VarniCustomProductService as b3, type Vendor as b4, VendorService as b5, WarrantyService as b6, type Wishlist as b7, type WishlistItem as b8, WishlistService as b9, galleryService as bA, homeService as bB, initService as bC, layoutService as bD, mediaUrl as bE, meilisearchService as bF, menuService as bG, minorToMajor as bH, newsletterService as bI, orderService as bJ, ownDomain as bK, pageService as bL, paymentMethodService as bM, pluginService as bN, pluginsService as bO, popularSearchService as bP, popularityService as bQ, priceOf as bR, productImages as bS, productService as bT, productVideos as bU, profileService as bV, qs as bW, reelsService as bX, regionService as bY, reviewService as bZ, searchService as b_, addressService as ba, authService as bb, autocompleteService as bc, b2bService as bd, bannerService as be, blogService as bf, cartService as bg, categoryService as bh, chatService as bi, checkoutService as bj, collectionService as bk, contactService as bl, countryService as bm, couponService as bn, currencyExponent as bo, currencyService as bp, dealService as bq, demoRequestService as br, emptyCart as bs, emptyPage as bt, enquiryService as bu, faqService as bv, feedbackService as bw, fromEngineAddress as bx, fromIdentityAddress as by, fromSearchDoc as bz, type AppliedDiscount as c, settingService as c0, settingsService as c1, stateService as c2, staticStore as c3, storeForHost as c4, storeService as c5, toAddOn as c6, toCart as c7, toCartLine as c8, toCartOffer as c9, toCategory as ca, toCmsPage as cb, toCollection as cc, toEngineAddress as cd, toFreeShipping as ce, toIdentityAddress as cf, toMajor as cg, toMinor as ch, toOrder as ci, toPage as cj, toProduct as ck, toRating as cl, toStorefrontFacets as cm, toUser as cn, toVariant as co, toVendor as cp, uploadService as cq, userService as cr, variantService as cs, varniCustomDesignService as ct, varniCustomProductService as cu, vendorService as cv, warrantyService as cw, wishlistService as cx, type Approval as d, type AuthResponse as e, AuthService as f, AutocompleteService as g, type B2bRole as h, B2bService as i, BannerService as j, BaseService as k, BlogService as l, type CartLine as m, type CartOffer as n, CartService as o, CatalogService as p, type Category as q, CategoryService as r, ChatService as s, type CheckoutOptions as t, type CheckoutResult as u, CheckoutService as v, type CmsPage as w, type Collection as x, CollectionService as y, type Company as z };
package/dist/index.cjs CHANGED
@@ -3043,6 +3043,27 @@ var StoreService = class extends BaseService {
3043
3043
  ...profile?.name ? { name: profile.name } : {},
3044
3044
  ...profile?.email ? { businessEmail: profile.email } : {},
3045
3045
  ...profile?.phone ? { businessPhone: profile.phone } : {},
3046
+ // The store's pictures (D148), the same: one it has not chosen keeps the static one.
3047
+ // Its own logo also replaces the static dark logo, which would be the deployment's
3048
+ // mark beside this store's; without a dark one of its own, its logo is the fallback.
3049
+ ...profile?.logo_url ? { logo: mediaUrl(profile.logo_url), logoDark: void 0 } : {},
3050
+ ...profile?.logo_dark_url ? { logoDark: mediaUrl(profile.logo_dark_url) } : {},
3051
+ ...profile?.icon_url ? { favicon: mediaUrl(profile.icon_url) } : {},
3052
+ // What the contact page shows (D156), only what the store published. The address
3053
+ // in the shape the storefront's contact page and home-page JSON-LD already read. The
3054
+ // country beside it, not over `country`: that is the address form's default country.
3055
+ ...profile?.country ? { businessCountry: profile.country } : {},
3056
+ ...profile?.address ? {
3057
+ address: {
3058
+ street: [profile.address.line1, profile.address.line2].filter(Boolean).join(", "),
3059
+ city: profile.address.city,
3060
+ state: profile.address.state,
3061
+ pincode: profile.address.postal_code,
3062
+ country: profile.address.country
3063
+ }
3064
+ } : {},
3065
+ ...profile?.map_location ? { mapLocation: profile.map_location } : {},
3066
+ ...profile?.opening_hours?.length ? { openingHours: profile.opening_hours } : {},
3046
3067
  currencyCode: code,
3047
3068
  currencySymbol: sameCurrency ? base.currencySymbol ?? symbolFor(code) : symbolFor(code),
3048
3069
  currency: {
@@ -3056,6 +3077,16 @@ var StoreService = class extends BaseService {
3056
3077
  // Features this connector serves from a module: on exactly when the
3057
3078
  // module is installed and switched on, whatever the static record says.
3058
3079
  isWishlist: { ...basePlugins.isWishlist, ...flag(plugins.has("wishlist")) },
3080
+ // The corner button and the contact page's WhatsApp card read the number from
3081
+ // here; the engine's plugin holds it, in international digits.
3082
+ whatsappChatButton: {
3083
+ ...basePlugins.whatsappChatButton,
3084
+ ...flag(plugins.has("whatsapp-chat")),
3085
+ ...plugins.has("whatsapp-chat") ? {
3086
+ phone: String(plugins.get("whatsapp-chat")?.settings?.phone ?? ""),
3087
+ message: String(plugins.get("whatsapp-chat")?.settings?.message ?? "")
3088
+ } : {}
3089
+ },
3059
3090
  isProductReviewsAndRatings: {
3060
3091
  ...basePlugins.isProductReviewsAndRatings,
3061
3092
  ...flag(plugins.has("product-reviews"))
@@ -3065,7 +3096,18 @@ var StoreService = class extends BaseService {
3065
3096
  newsletter: { ...basePlugins.newsletter, ...flag(plugins.has("newsletter")) },
3066
3097
  // Discount codes are core: every GoCommerce store takes them, so
3067
3098
  // the code box is shown whatever the static record says.
3068
- isDiscountCoupons: { ...basePlugins.isDiscountCoupons, active: true }
3099
+ isDiscountCoupons: { ...basePlugins.isDiscountCoupons, active: true },
3100
+ // The engine resizes the store's own pictures in Cloudflare's URL shape
3101
+ // (D139), so the storefront's srcset asks it for each width. Its public
3102
+ // origin, not the proxy path: an <img> needs no CORS, and the proxy would
3103
+ // put every picture through the storefront's server.
3104
+ ...profile?.images_path && this.creds.apiUrl ? {
3105
+ imageCdn: {
3106
+ provider: "cloudflare",
3107
+ url: this.creds.apiUrl.trim().replace(/\/+$/, "") + profile.images_path,
3108
+ active: true
3109
+ }
3110
+ } : {}
3069
3111
  },
3070
3112
  ...menus?.length ? { menu: menus } : {},
3071
3113
  ...deliverable(base, ships),
@@ -3271,7 +3313,8 @@ var ContactService = class extends BaseService {
3271
3313
  email,
3272
3314
  phone,
3273
3315
  message,
3274
- subject
3316
+ subject,
3317
+ website
3275
3318
  }) {
3276
3319
  return this.data("/x/contact/messages", {
3277
3320
  method: "POST",
@@ -3280,7 +3323,8 @@ var ContactService = class extends BaseService {
3280
3323
  email: String(email ?? ""),
3281
3324
  ...phone ? { phone: String(phone) } : {},
3282
3325
  ...subject ? { subject: String(subject) } : {},
3283
- body: String(message ?? "")
3326
+ body: String(message ?? ""),
3327
+ ...website ? { website: String(website) } : {}
3284
3328
  }
3285
3329
  });
3286
3330
  }