@misiki/gocommerce-connector 0.15.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.
@@ -1 +1 @@
1
- export { b as AddressService, d as Approval, f as AuthService, g as AutocompleteService, B as B2bPlaced, h as B2bRole, i as B2bService, j as BannerService, k as BaseService, l as BlogService, o as CartService, p as CatalogService, r as CategoryService, s as ChatService, v as CheckoutService, y as CollectionService, z as Company, D as CompanyOrder, E as ContactService, F as CountryService, G as CouponService, I as Credit, J as CurrencyService, L as DealService, M as DemoRequestService, N as EngineRequest, O as EnquiryService, S as FaqService, T as FeedbackService, U as FooterSettings, X as GalleryService, Y as HeaderSettings, Z as HomeLayout, _ as HomeLayoutSection, $ as HomeService, a1 as InitService, a2 as Invitation, a3 as LayoutCollection, a4 as LayoutPage, a5 as LayoutService, a6 as Lead, a8 as MeilisearchService, a9 as Member, ac as MenuService, af as NewsletterService, aj as OrderService, ak as PageLayout, al as PageService, an as PaymentMethodService, ap as PluginService, ap as PluginsService, aq as PopularSearchService, ar as PopularityService, aw as ProductService, ax as ProfileService, ay as Quote, az as REDIRECT_GATEWAYS, aA as ReelsService, aB as RegionService, aC as RejectedLine, aF as ReviewService, aI as SearchService, aJ as SettingService, aJ as SettingsService, aL as SiteChrome, aM as SiteFooter, aN as SiteHeader, aO as SocialLink, aP as StateService, aR as StoreService, aT as StorefrontMenu, aW as ThemeSettings, aX as ThemeSettingsResult, aY as UploadService, aZ as UserService, b0 as VariantService, b1 as VarniCustomDesignService, b2 as VarniCustomProductService, b4 as VendorService, b5 as WarrantyService, b8 as WishlistService, b9 as addressService, ba as authService, bb as autocompleteService, bc as b2bService, bd as bannerService, be as blogService, bf as cartService, bg as categoryService, bh as chatService, bi as checkoutService, bj as collectionService, bk as contactService, bl as countryService, bm as couponService, bo as currencyService, bp as dealService, bq as demoRequestService, bs as emptyPage, bt as enquiryService, bu as faqService, bv as feedbackService, bz as galleryService, bA as homeService, bB as initService, bC as layoutService, bD as mediaUrl, bE as meilisearchService, bF as menuService, bH as newsletterService, bI as orderService, bJ as ownDomain, bK as pageService, bL as paymentMethodService, bM as pluginService, bN as pluginsService, bO as popularSearchService, bP as popularityService, bS as productService, bU as profileService, bV as qs, bW as reelsService, bX as regionService, bY as reviewService, bZ as searchService, b_ as setRequestHost, b$ as settingService, c0 as settingsService, c1 as stateService, c2 as staticStore, c3 as storeForHost, c4 as storeService, ci as toPage, cl as toStorefrontFacets, cp as uploadService, cq as userService, cr as variantService, cs as varniCustomDesignService, ct as varniCustomProductService, cu as vendorService, cv as warrantyService, cw as wishlistService } from '../index-GdjWgh5b.cjs';
1
+ export { b as AddressService, d as Approval, f as AuthService, g as AutocompleteService, B as B2bPlaced, h as B2bRole, i as B2bService, j as BannerService, k as BaseService, l as BlogService, o as CartService, p as CatalogService, r as CategoryService, s as ChatService, v as CheckoutService, y as CollectionService, z as Company, D as CompanyOrder, E as ContactService, F as CountryService, G as CouponService, I as Credit, J as CurrencyService, L as DealService, M as DemoRequestService, N as EngineRequest, O as EnquiryService, S as FaqService, T as FeedbackService, U as FooterSettings, X as GalleryService, Y as HeaderSettings, Z as HomeLayout, _ as HomeLayoutSection, $ as HomeService, a1 as InitService, a2 as Invitation, a3 as LayoutCollection, a4 as LayoutPage, a5 as LayoutService, a6 as Lead, a8 as MeilisearchService, a9 as Member, ac as MenuService, af as NewsletterService, ak as OrderService, al as PageLayout, am as PageService, ao as PaymentMethodService, aq as PluginService, aq as PluginsService, ar as PopularSearchService, as as PopularityService, ax as ProductService, ay as ProfileService, az as Quote, aA as REDIRECT_GATEWAYS, aB as ReelsService, aC as RegionService, aD as RejectedLine, aG as ReviewService, aJ as SearchService, aK as SettingService, aK as SettingsService, aM as SiteChrome, aN as SiteFooter, aO as SiteHeader, aP as SocialLink, aQ as StateService, aS as StoreService, aU as StorefrontMenu, aX as ThemeSettings, aY as ThemeSettingsResult, aZ as UploadService, a_ as UserService, b1 as VariantService, b2 as VarniCustomDesignService, b3 as VarniCustomProductService, b5 as VendorService, b6 as WarrantyService, b9 as WishlistService, ba as addressService, bb as authService, bc as autocompleteService, bd as b2bService, be as bannerService, bf as blogService, bg as cartService, bh as categoryService, bi as chatService, bj as checkoutService, bk as collectionService, bl as contactService, bm as countryService, bn as couponService, bp as currencyService, bq as dealService, br as demoRequestService, bt as emptyPage, bu as enquiryService, bv as faqService, bw as feedbackService, bA as galleryService, bB as homeService, bC as initService, bD as layoutService, bE as mediaUrl, bF as meilisearchService, bG as menuService, bI as newsletterService, bJ as orderService, bK as ownDomain, bL as pageService, bM as paymentMethodService, bN as pluginService, bO as pluginsService, bP as popularSearchService, bQ as popularityService, bT as productService, bV as profileService, bW as qs, bX as reelsService, bY as regionService, bZ as reviewService, b_ as searchService, b$ as setRequestHost, c0 as settingService, c1 as settingsService, c2 as stateService, c3 as staticStore, c4 as storeForHost, c5 as storeService, cj as toPage, cm as toStorefrontFacets, cq as uploadService, cr as userService, cs as variantService, ct as varniCustomDesignService, cu as varniCustomProductService, cv as vendorService, cw as warrantyService, cx as wishlistService } from '../index-Dm_1E1ai.cjs';
@@ -1 +1 @@
1
- export { b as AddressService, d as Approval, f as AuthService, g as AutocompleteService, B as B2bPlaced, h as B2bRole, i as B2bService, j as BannerService, k as BaseService, l as BlogService, o as CartService, p as CatalogService, r as CategoryService, s as ChatService, v as CheckoutService, y as CollectionService, z as Company, D as CompanyOrder, E as ContactService, F as CountryService, G as CouponService, I as Credit, J as CurrencyService, L as DealService, M as DemoRequestService, N as EngineRequest, O as EnquiryService, S as FaqService, T as FeedbackService, U as FooterSettings, X as GalleryService, Y as HeaderSettings, Z as HomeLayout, _ as HomeLayoutSection, $ as HomeService, a1 as InitService, a2 as Invitation, a3 as LayoutCollection, a4 as LayoutPage, a5 as LayoutService, a6 as Lead, a8 as MeilisearchService, a9 as Member, ac as MenuService, af as NewsletterService, aj as OrderService, ak as PageLayout, al as PageService, an as PaymentMethodService, ap as PluginService, ap as PluginsService, aq as PopularSearchService, ar as PopularityService, aw as ProductService, ax as ProfileService, ay as Quote, az as REDIRECT_GATEWAYS, aA as ReelsService, aB as RegionService, aC as RejectedLine, aF as ReviewService, aI as SearchService, aJ as SettingService, aJ as SettingsService, aL as SiteChrome, aM as SiteFooter, aN as SiteHeader, aO as SocialLink, aP as StateService, aR as StoreService, aT as StorefrontMenu, aW as ThemeSettings, aX as ThemeSettingsResult, aY as UploadService, aZ as UserService, b0 as VariantService, b1 as VarniCustomDesignService, b2 as VarniCustomProductService, b4 as VendorService, b5 as WarrantyService, b8 as WishlistService, b9 as addressService, ba as authService, bb as autocompleteService, bc as b2bService, bd as bannerService, be as blogService, bf as cartService, bg as categoryService, bh as chatService, bi as checkoutService, bj as collectionService, bk as contactService, bl as countryService, bm as couponService, bo as currencyService, bp as dealService, bq as demoRequestService, bs as emptyPage, bt as enquiryService, bu as faqService, bv as feedbackService, bz as galleryService, bA as homeService, bB as initService, bC as layoutService, bD as mediaUrl, bE as meilisearchService, bF as menuService, bH as newsletterService, bI as orderService, bJ as ownDomain, bK as pageService, bL as paymentMethodService, bM as pluginService, bN as pluginsService, bO as popularSearchService, bP as popularityService, bS as productService, bU as profileService, bV as qs, bW as reelsService, bX as regionService, bY as reviewService, bZ as searchService, b_ as setRequestHost, b$ as settingService, c0 as settingsService, c1 as stateService, c2 as staticStore, c3 as storeForHost, c4 as storeService, ci as toPage, cl as toStorefrontFacets, cp as uploadService, cq as userService, cr as variantService, cs as varniCustomDesignService, ct as varniCustomProductService, cu as vendorService, cv as warrantyService, cw as wishlistService } from '../index-GdjWgh5b.js';
1
+ export { b as AddressService, d as Approval, f as AuthService, g as AutocompleteService, B as B2bPlaced, h as B2bRole, i as B2bService, j as BannerService, k as BaseService, l as BlogService, o as CartService, p as CatalogService, r as CategoryService, s as ChatService, v as CheckoutService, y as CollectionService, z as Company, D as CompanyOrder, E as ContactService, F as CountryService, G as CouponService, I as Credit, J as CurrencyService, L as DealService, M as DemoRequestService, N as EngineRequest, O as EnquiryService, S as FaqService, T as FeedbackService, U as FooterSettings, X as GalleryService, Y as HeaderSettings, Z as HomeLayout, _ as HomeLayoutSection, $ as HomeService, a1 as InitService, a2 as Invitation, a3 as LayoutCollection, a4 as LayoutPage, a5 as LayoutService, a6 as Lead, a8 as MeilisearchService, a9 as Member, ac as MenuService, af as NewsletterService, ak as OrderService, al as PageLayout, am as PageService, ao as PaymentMethodService, aq as PluginService, aq as PluginsService, ar as PopularSearchService, as as PopularityService, ax as ProductService, ay as ProfileService, az as Quote, aA as REDIRECT_GATEWAYS, aB as ReelsService, aC as RegionService, aD as RejectedLine, aG as ReviewService, aJ as SearchService, aK as SettingService, aK as SettingsService, aM as SiteChrome, aN as SiteFooter, aO as SiteHeader, aP as SocialLink, aQ as StateService, aS as StoreService, aU as StorefrontMenu, aX as ThemeSettings, aY as ThemeSettingsResult, aZ as UploadService, a_ as UserService, b1 as VariantService, b2 as VarniCustomDesignService, b3 as VarniCustomProductService, b5 as VendorService, b6 as WarrantyService, b9 as WishlistService, ba as addressService, bb as authService, bc as autocompleteService, bd as b2bService, be as bannerService, bf as blogService, bg as cartService, bh as categoryService, bi as chatService, bj as checkoutService, bk as collectionService, bl as contactService, bm as countryService, bn as couponService, bp as currencyService, bq as dealService, br as demoRequestService, bt as emptyPage, bu as enquiryService, bv as faqService, bw as feedbackService, bA as galleryService, bB as homeService, bC as initService, bD as layoutService, bE as mediaUrl, bF as meilisearchService, bG as menuService, bI as newsletterService, bJ as orderService, bK as ownDomain, bL as pageService, bM as paymentMethodService, bN as pluginService, bO as pluginsService, bP as popularSearchService, bQ as popularityService, bT as productService, bV as profileService, bW as qs, bX as reelsService, bY as regionService, bZ as reviewService, b_ as searchService, b$ as setRequestHost, c0 as settingService, c1 as settingsService, c2 as stateService, c3 as staticStore, c4 as storeForHost, c5 as storeService, cj as toPage, cm as toStorefrontFacets, cq as uploadService, cr as userService, cs as variantService, ct as varniCustomDesignService, cu as varniCustomProductService, cv as vendorService, cw as warrantyService, cx as wishlistService } from '../index-Dm_1E1ai.js';
@@ -3031,6 +3031,21 @@ var StoreService = class extends BaseService {
3031
3031
  ...profile?.logo_url ? { logo: mediaUrl(profile.logo_url), logoDark: void 0 } : {},
3032
3032
  ...profile?.logo_dark_url ? { logoDark: mediaUrl(profile.logo_dark_url) } : {},
3033
3033
  ...profile?.icon_url ? { favicon: mediaUrl(profile.icon_url) } : {},
3034
+ // What the contact page shows (D156), only what the store published. The address
3035
+ // in the shape the storefront's contact page and home-page JSON-LD already read. The
3036
+ // country beside it, not over `country`: that is the address form's default country.
3037
+ ...profile?.country ? { businessCountry: profile.country } : {},
3038
+ ...profile?.address ? {
3039
+ address: {
3040
+ street: [profile.address.line1, profile.address.line2].filter(Boolean).join(", "),
3041
+ city: profile.address.city,
3042
+ state: profile.address.state,
3043
+ pincode: profile.address.postal_code,
3044
+ country: profile.address.country
3045
+ }
3046
+ } : {},
3047
+ ...profile?.map_location ? { mapLocation: profile.map_location } : {},
3048
+ ...profile?.opening_hours?.length ? { openingHours: profile.opening_hours } : {},
3034
3049
  currencyCode: code,
3035
3050
  currencySymbol: sameCurrency ? base.currencySymbol ?? symbolFor(code) : symbolFor(code),
3036
3051
  currency: {
@@ -3044,6 +3059,16 @@ var StoreService = class extends BaseService {
3044
3059
  // Features this connector serves from a module: on exactly when the
3045
3060
  // module is installed and switched on, whatever the static record says.
3046
3061
  isWishlist: { ...basePlugins.isWishlist, ...flag(plugins.has("wishlist")) },
3062
+ // The corner button and the contact page's WhatsApp card read the number from
3063
+ // here; the engine's plugin holds it, in international digits.
3064
+ whatsappChatButton: {
3065
+ ...basePlugins.whatsappChatButton,
3066
+ ...flag(plugins.has("whatsapp-chat")),
3067
+ ...plugins.has("whatsapp-chat") ? {
3068
+ phone: String(plugins.get("whatsapp-chat")?.settings?.phone ?? ""),
3069
+ message: String(plugins.get("whatsapp-chat")?.settings?.message ?? "")
3070
+ } : {}
3071
+ },
3047
3072
  isProductReviewsAndRatings: {
3048
3073
  ...basePlugins.isProductReviewsAndRatings,
3049
3074
  ...flag(plugins.has("product-reviews"))
@@ -3270,7 +3295,8 @@ var ContactService = class extends BaseService {
3270
3295
  email,
3271
3296
  phone,
3272
3297
  message,
3273
- subject
3298
+ subject,
3299
+ website
3274
3300
  }) {
3275
3301
  return this.data("/x/contact/messages", {
3276
3302
  method: "POST",
@@ -3279,7 +3305,8 @@ var ContactService = class extends BaseService {
3279
3305
  email: String(email ?? ""),
3280
3306
  ...phone ? { phone: String(phone) } : {},
3281
3307
  ...subject ? { subject: String(subject) } : {},
3282
- body: String(message ?? "")
3308
+ body: String(message ?? ""),
3309
+ ...website ? { website: String(website) } : {}
3283
3310
  }
3284
3311
  });
3285
3312
  }