@misiki/gocommerce-connector 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- export { a as AddressService, c as Approval, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, m as CartService, n as CatalogService, p as CategoryService, q as ChatService, t as CheckoutService, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, G as Credit, H as CurrencyService, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, P as FaqService, Q as FeedbackService, S as GalleryService, T as HomeService, V as InitService, W as Invitation, X as Lead, Z as MeilisearchService, _ as Member, a1 as MenuService, a4 as NewsletterService, a8 as OrderService, a9 as PageService, ab as PaymentMethodService, ad as PluginService, ad as PluginsService, ae as PopularSearchService, af as PopularityService, ai as ProductService, aj as ProfileService, ak as Quote, al as REDIRECT_GATEWAYS, am as ReelsService, an as RegionService, ao as RejectedLine, ar as ReviewService, au as SearchService, av as SettingService, av as SettingsService, ax as StateService, ay as StoreService, aA as StorefrontMenu, aD as UploadService, aE as UserService, aH as VariantService, aI as VarniCustomDesignService, aJ as VarniCustomProductService, aL as VendorService, aM as WarrantyService, aP as WishlistService, aQ as addressService, aR as authService, aS as autocompleteService, aT as b2bService, aU as bannerService, aV as blogService, aW as cartService, aX as categoryService, aY as chatService, aZ as checkoutService, a_ as collectionService, a$ as contactService, b0 as countryService, b1 as couponService, b3 as currencyService, b4 as dealService, b5 as demoRequestService, b7 as emptyPage, b8 as enquiryService, b9 as faqService, ba as feedbackService, be as galleryService, bf as homeService, bg as initService, bh as mediaUrl, bi as meilisearchService, bj as menuService, bl as newsletterService, bm as orderService, bn as pageService, bo as paymentMethodService, bp as pluginService, bq as pluginsService, br as popularSearchService, bs as popularityService, bv as productService, bw as profileService, bx as qs, by as reelsService, bz as regionService, bA as reviewService, bB as searchService, bC as setRequestHost, bD as settingService, bE as settingsService, bF as stateService, bG as staticStore, bH as storeForHost, bI as storeService, bT as toPage, bZ as uploadService, b_ as userService, b$ as variantService, c0 as varniCustomDesignService, c1 as varniCustomProductService, c2 as vendorService, c3 as warrantyService, c4 as wishlistService } from '../index-iPG0fxzc.cjs';
1
+ export { a as AddressService, c as Approval, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, m as CartService, n as CatalogService, p as CategoryService, q as ChatService, t as CheckoutService, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, G as Credit, H as CurrencyService, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, P as FaqService, Q as FeedbackService, S as GalleryService, T as HomeService, V as InitService, W as Invitation, X as Lead, Z as MeilisearchService, _ as Member, a1 as MenuService, a4 as NewsletterService, a8 as OrderService, a9 as PageService, ab as PaymentMethodService, ad as PluginService, ad as PluginsService, ae as PopularSearchService, af as PopularityService, ai as ProductService, aj as ProfileService, ak as Quote, al as REDIRECT_GATEWAYS, am as ReelsService, an as RegionService, ao as RejectedLine, ar as ReviewService, au as SearchService, av as SettingService, av as SettingsService, ax as StateService, az as StoreService, aB as StorefrontMenu, aE as UploadService, aF as UserService, aI as VariantService, aJ as VarniCustomDesignService, aK as VarniCustomProductService, aM as VendorService, aN as WarrantyService, aQ as WishlistService, aR as addressService, aS as authService, aT as autocompleteService, aU as b2bService, aV as bannerService, aW as blogService, aX as cartService, aY as categoryService, aZ as chatService, a_ as checkoutService, a$ as collectionService, b0 as contactService, b1 as countryService, b2 as couponService, b4 as currencyService, b5 as dealService, b6 as demoRequestService, b8 as emptyPage, b9 as enquiryService, ba as faqService, bb as feedbackService, bf as galleryService, bg as homeService, bh as initService, bi as mediaUrl, bj as meilisearchService, bk as menuService, bm as newsletterService, bn as orderService, bo as pageService, bp as paymentMethodService, bq as pluginService, br as pluginsService, bs as popularSearchService, bt as popularityService, bw as productService, bx as profileService, by as qs, bz as reelsService, bA as regionService, bB as reviewService, bC as searchService, bD as setRequestHost, bE as settingService, bF as settingsService, bG as stateService, bH as staticStore, bI as storeForHost, bJ as storeService, bU as toPage, b_ as uploadService, b$ as userService, c0 as variantService, c1 as varniCustomDesignService, c2 as varniCustomProductService, c3 as vendorService, c4 as warrantyService, c5 as wishlistService } from '../index-DIj1rK1d.cjs';
@@ -1 +1 @@
1
- export { a as AddressService, c as Approval, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, m as CartService, n as CatalogService, p as CategoryService, q as ChatService, t as CheckoutService, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, G as Credit, H as CurrencyService, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, P as FaqService, Q as FeedbackService, S as GalleryService, T as HomeService, V as InitService, W as Invitation, X as Lead, Z as MeilisearchService, _ as Member, a1 as MenuService, a4 as NewsletterService, a8 as OrderService, a9 as PageService, ab as PaymentMethodService, ad as PluginService, ad as PluginsService, ae as PopularSearchService, af as PopularityService, ai as ProductService, aj as ProfileService, ak as Quote, al as REDIRECT_GATEWAYS, am as ReelsService, an as RegionService, ao as RejectedLine, ar as ReviewService, au as SearchService, av as SettingService, av as SettingsService, ax as StateService, ay as StoreService, aA as StorefrontMenu, aD as UploadService, aE as UserService, aH as VariantService, aI as VarniCustomDesignService, aJ as VarniCustomProductService, aL as VendorService, aM as WarrantyService, aP as WishlistService, aQ as addressService, aR as authService, aS as autocompleteService, aT as b2bService, aU as bannerService, aV as blogService, aW as cartService, aX as categoryService, aY as chatService, aZ as checkoutService, a_ as collectionService, a$ as contactService, b0 as countryService, b1 as couponService, b3 as currencyService, b4 as dealService, b5 as demoRequestService, b7 as emptyPage, b8 as enquiryService, b9 as faqService, ba as feedbackService, be as galleryService, bf as homeService, bg as initService, bh as mediaUrl, bi as meilisearchService, bj as menuService, bl as newsletterService, bm as orderService, bn as pageService, bo as paymentMethodService, bp as pluginService, bq as pluginsService, br as popularSearchService, bs as popularityService, bv as productService, bw as profileService, bx as qs, by as reelsService, bz as regionService, bA as reviewService, bB as searchService, bC as setRequestHost, bD as settingService, bE as settingsService, bF as stateService, bG as staticStore, bH as storeForHost, bI as storeService, bT as toPage, bZ as uploadService, b_ as userService, b$ as variantService, c0 as varniCustomDesignService, c1 as varniCustomProductService, c2 as vendorService, c3 as warrantyService, c4 as wishlistService } from '../index-iPG0fxzc.js';
1
+ export { a as AddressService, c as Approval, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, m as CartService, n as CatalogService, p as CategoryService, q as ChatService, t as CheckoutService, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, G as Credit, H as CurrencyService, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, P as FaqService, Q as FeedbackService, S as GalleryService, T as HomeService, V as InitService, W as Invitation, X as Lead, Z as MeilisearchService, _ as Member, a1 as MenuService, a4 as NewsletterService, a8 as OrderService, a9 as PageService, ab as PaymentMethodService, ad as PluginService, ad as PluginsService, ae as PopularSearchService, af as PopularityService, ai as ProductService, aj as ProfileService, ak as Quote, al as REDIRECT_GATEWAYS, am as ReelsService, an as RegionService, ao as RejectedLine, ar as ReviewService, au as SearchService, av as SettingService, av as SettingsService, ax as StateService, az as StoreService, aB as StorefrontMenu, aE as UploadService, aF as UserService, aI as VariantService, aJ as VarniCustomDesignService, aK as VarniCustomProductService, aM as VendorService, aN as WarrantyService, aQ as WishlistService, aR as addressService, aS as authService, aT as autocompleteService, aU as b2bService, aV as bannerService, aW as blogService, aX as cartService, aY as categoryService, aZ as chatService, a_ as checkoutService, a$ as collectionService, b0 as contactService, b1 as countryService, b2 as couponService, b4 as currencyService, b5 as dealService, b6 as demoRequestService, b8 as emptyPage, b9 as enquiryService, ba as faqService, bb as feedbackService, bf as galleryService, bg as homeService, bh as initService, bi as mediaUrl, bj as meilisearchService, bk as menuService, bm as newsletterService, bn as orderService, bo as pageService, bp as paymentMethodService, bq as pluginService, br as pluginsService, bs as popularSearchService, bt as popularityService, bw as productService, bx as profileService, by as qs, bz as reelsService, bA as regionService, bB as reviewService, bC as searchService, bD as setRequestHost, bE as settingService, bF as settingsService, bG as stateService, bH as staticStore, bI as storeForHost, bJ as storeService, bU as toPage, b_ as uploadService, b$ as userService, c0 as variantService, c1 as varniCustomDesignService, c2 as varniCustomProductService, c3 as vendorService, c4 as warrantyService, c5 as wishlistService } from '../index-DIj1rK1d.js';
@@ -990,6 +990,10 @@ var StoreFacts = class extends BaseService {
990
990
  ready() {
991
991
  return remember(this.key("ready"), () => this.data("/health/ready"));
992
992
  }
993
+ /** The store's own name and how a buyer reaches it, as set in its panel. */
994
+ profile() {
995
+ return remember(this.key("profile"), () => this.data("/api/store"));
996
+ }
993
997
  checkoutOptions() {
994
998
  return remember(this.key("checkout"), () => this.data("/api/checkout"));
995
999
  }
@@ -2495,17 +2499,22 @@ var StoreService = class extends BaseService {
2495
2499
  return super.post(path, data);
2496
2500
  }
2497
2501
  async live() {
2498
- const [ready, plugins, menus, base] = await Promise.all([
2502
+ const [ready, plugins, menus, base, profile] = await Promise.all([
2499
2503
  this.facts.ready(),
2500
2504
  this.facts.plugins().catch(() => /* @__PURE__ */ new Map()),
2501
2505
  new MenuService(this._fetch).engineMenus(),
2502
- readStaticStore()
2506
+ readStaticStore(),
2507
+ this.facts.profile().catch(() => null)
2503
2508
  ]);
2504
2509
  const code = ready.currency;
2505
2510
  const sameCurrency = (base.currency?.code ?? base.currencyCode) === code;
2506
2511
  const flag = (on) => ({ ...on ? { active: true } : { active: false } });
2507
2512
  const basePlugins = base.plugins ?? {};
2508
2513
  return {
2514
+ // Only what the owner filled in: an empty name keeps the static one.
2515
+ ...profile?.name ? { name: profile.name } : {},
2516
+ ...profile?.email ? { businessEmail: profile.email } : {},
2517
+ ...profile?.phone ? { businessPhone: profile.phone } : {},
2509
2518
  currencyCode: code,
2510
2519
  currencySymbol: sameCurrency ? base.currencySymbol ?? symbolFor(code) : symbolFor(code),
2511
2520
  currency: {