@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.
- package/README.md +4 -2
- package/dist/{index-iPG0fxzc.d.cts → index-DIj1rK1d.d.cts} +19 -6
- package/dist/{index-iPG0fxzc.d.ts → index-DIj1rK1d.d.ts} +19 -6
- package/dist/index.cjs +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +11 -2
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +11 -2
- package/dist/services/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Address, a as AddressService, b as AppliedDiscount, c as Approval, d as AuthResponse, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, C as Cart, l as CartLine, m as CartService, n as CatalogService, o as Category, p as CategoryService, q as ChatService, r as CheckoutOptions, s as CheckoutResult, t as CheckoutService, u as CmsPage, v as Collection, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, F as Credentials, G as Credit, H as CurrencyService, I as Customer, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, N as Envelope, O as Faq, P as FaqService, Q as FeedbackService, R as Fulfillment, S as GalleryService, T as HomeService, U as IdentityAddress, V as InitService, W as Invitation, X as Lead, Y as ListMeta, Z as MeilisearchService, _ as Member, $ as Menu, a0 as MenuItem, a1 as MenuService, a2 as MenuSummary, a3 as Money, a4 as NewsletterService, a5 as Offer, a6 as Order, a7 as OrderLine, a8 as OrderService, a9 as PageService, aa as PaymentIntent, ab as PaymentMethodService, ac as Plugin, ad as PluginService, ad as PluginsService, ae as PopularSearchService, af as PopularityService, ag as Product, ah as ProductOption, ai as ProductService, aj as ProfileService, ak as Quote, al as REDIRECT_GATEWAYS, am as ReelsService, an as RegionService, ao as RejectedLine, ap as Review, aq as ReviewPage, ar as ReviewService, as as SearchDoc, at as SearchResult, au as SearchService, av as SettingService, av as SettingsService, aw as ShippingRate, ax as StateService, ay as
|
|
1
|
+
export { A as Address, a as AddressService, b as AppliedDiscount, c as Approval, d as AuthResponse, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, C as Cart, l as CartLine, m as CartService, n as CatalogService, o as Category, p as CategoryService, q as ChatService, r as CheckoutOptions, s as CheckoutResult, t as CheckoutService, u as CmsPage, v as Collection, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, F as Credentials, G as Credit, H as CurrencyService, I as Customer, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, N as Envelope, O as Faq, P as FaqService, Q as FeedbackService, R as Fulfillment, S as GalleryService, T as HomeService, U as IdentityAddress, V as InitService, W as Invitation, X as Lead, Y as ListMeta, Z as MeilisearchService, _ as Member, $ as Menu, a0 as MenuItem, a1 as MenuService, a2 as MenuSummary, a3 as Money, a4 as NewsletterService, a5 as Offer, a6 as Order, a7 as OrderLine, a8 as OrderService, a9 as PageService, aa as PaymentIntent, ab as PaymentMethodService, ac as Plugin, ad as PluginService, ad as PluginsService, ae as PopularSearchService, af as PopularityService, ag as Product, ah as ProductOption, ai as ProductService, aj as ProfileService, ak as Quote, al as REDIRECT_GATEWAYS, am as ReelsService, an as RegionService, ao as RejectedLine, ap as Review, aq as ReviewPage, ar as ReviewService, as as SearchDoc, at as SearchResult, au as SearchService, av as SettingService, av as SettingsService, aw as ShippingRate, ax as StateService, ay as StoreProfile, az as StoreService, aA as StorefrontCategory, aB as StorefrontMenu, aC as StorefrontOrder, aD as StorefrontProduct, aE as UploadService, aF as UserService, aG as Variant, aH as VariantImage, aI as VariantService, aJ as VarniCustomDesignService, aK as VarniCustomProductService, aL as Vendor, aM as VendorService, aN as WarrantyService, aO as Wishlist, aP as WishlistItem, 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, b3 as currencyExponent, b4 as currencyService, b5 as dealService, b6 as demoRequestService, b7 as emptyCart, b8 as emptyPage, b9 as enquiryService, ba as faqService, bb as feedbackService, bc as fromEngineAddress, bd as fromIdentityAddress, be as fromSearchDoc, bf as galleryService, bg as homeService, bh as initService, bi as mediaUrl, bj as meilisearchService, bk as menuService, bl as minorToMajor, bm as newsletterService, bn as orderService, bo as pageService, bp as paymentMethodService, bq as pluginService, br as pluginsService, bs as popularSearchService, bt as popularityService, bu as priceOf, bv as productImages, 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, bK as toCart, bL as toCartLine, bM as toCategory, bN as toCmsPage, bO as toCollection, bP as toEngineAddress, bQ as toIdentityAddress, bR as toMajor, bS as toMinor, bT as toOrder, bU as toPage, bV as toProduct, bW as toRating, bX as toUser, bY as toVariant, bZ as toVendor, 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';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The two ways a call through this connector fails.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Address, a as AddressService, b as AppliedDiscount, c as Approval, d as AuthResponse, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, C as Cart, l as CartLine, m as CartService, n as CatalogService, o as Category, p as CategoryService, q as ChatService, r as CheckoutOptions, s as CheckoutResult, t as CheckoutService, u as CmsPage, v as Collection, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, F as Credentials, G as Credit, H as CurrencyService, I as Customer, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, N as Envelope, O as Faq, P as FaqService, Q as FeedbackService, R as Fulfillment, S as GalleryService, T as HomeService, U as IdentityAddress, V as InitService, W as Invitation, X as Lead, Y as ListMeta, Z as MeilisearchService, _ as Member, $ as Menu, a0 as MenuItem, a1 as MenuService, a2 as MenuSummary, a3 as Money, a4 as NewsletterService, a5 as Offer, a6 as Order, a7 as OrderLine, a8 as OrderService, a9 as PageService, aa as PaymentIntent, ab as PaymentMethodService, ac as Plugin, ad as PluginService, ad as PluginsService, ae as PopularSearchService, af as PopularityService, ag as Product, ah as ProductOption, ai as ProductService, aj as ProfileService, ak as Quote, al as REDIRECT_GATEWAYS, am as ReelsService, an as RegionService, ao as RejectedLine, ap as Review, aq as ReviewPage, ar as ReviewService, as as SearchDoc, at as SearchResult, au as SearchService, av as SettingService, av as SettingsService, aw as ShippingRate, ax as StateService, ay as
|
|
1
|
+
export { A as Address, a as AddressService, b as AppliedDiscount, c as Approval, d as AuthResponse, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, C as Cart, l as CartLine, m as CartService, n as CatalogService, o as Category, p as CategoryService, q as ChatService, r as CheckoutOptions, s as CheckoutResult, t as CheckoutService, u as CmsPage, v as Collection, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, F as Credentials, G as Credit, H as CurrencyService, I as Customer, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, N as Envelope, O as Faq, P as FaqService, Q as FeedbackService, R as Fulfillment, S as GalleryService, T as HomeService, U as IdentityAddress, V as InitService, W as Invitation, X as Lead, Y as ListMeta, Z as MeilisearchService, _ as Member, $ as Menu, a0 as MenuItem, a1 as MenuService, a2 as MenuSummary, a3 as Money, a4 as NewsletterService, a5 as Offer, a6 as Order, a7 as OrderLine, a8 as OrderService, a9 as PageService, aa as PaymentIntent, ab as PaymentMethodService, ac as Plugin, ad as PluginService, ad as PluginsService, ae as PopularSearchService, af as PopularityService, ag as Product, ah as ProductOption, ai as ProductService, aj as ProfileService, ak as Quote, al as REDIRECT_GATEWAYS, am as ReelsService, an as RegionService, ao as RejectedLine, ap as Review, aq as ReviewPage, ar as ReviewService, as as SearchDoc, at as SearchResult, au as SearchService, av as SettingService, av as SettingsService, aw as ShippingRate, ax as StateService, ay as StoreProfile, az as StoreService, aA as StorefrontCategory, aB as StorefrontMenu, aC as StorefrontOrder, aD as StorefrontProduct, aE as UploadService, aF as UserService, aG as Variant, aH as VariantImage, aI as VariantService, aJ as VarniCustomDesignService, aK as VarniCustomProductService, aL as Vendor, aM as VendorService, aN as WarrantyService, aO as Wishlist, aP as WishlistItem, 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, b3 as currencyExponent, b4 as currencyService, b5 as dealService, b6 as demoRequestService, b7 as emptyCart, b8 as emptyPage, b9 as enquiryService, ba as faqService, bb as feedbackService, bc as fromEngineAddress, bd as fromIdentityAddress, be as fromSearchDoc, bf as galleryService, bg as homeService, bh as initService, bi as mediaUrl, bj as meilisearchService, bk as menuService, bl as minorToMajor, bm as newsletterService, bn as orderService, bo as pageService, bp as paymentMethodService, bq as pluginService, br as pluginsService, bs as popularSearchService, bt as popularityService, bu as priceOf, bv as productImages, 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, bK as toCart, bL as toCartLine, bM as toCategory, bN as toCmsPage, bO as toCollection, bP as toEngineAddress, bQ as toIdentityAddress, bR as toMajor, bS as toMinor, bT as toOrder, bU as toPage, bV as toProduct, bW as toRating, bX as toUser, bY as toVariant, bZ as toVendor, 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';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The two ways a call through this connector fails.
|
package/dist/index.js
CHANGED
|
@@ -1009,6 +1009,10 @@ var StoreFacts = class extends BaseService {
|
|
|
1009
1009
|
ready() {
|
|
1010
1010
|
return remember(this.key("ready"), () => this.data("/health/ready"));
|
|
1011
1011
|
}
|
|
1012
|
+
/** The store's own name and how a buyer reaches it, as set in its panel. */
|
|
1013
|
+
profile() {
|
|
1014
|
+
return remember(this.key("profile"), () => this.data("/api/store"));
|
|
1015
|
+
}
|
|
1012
1016
|
checkoutOptions() {
|
|
1013
1017
|
return remember(this.key("checkout"), () => this.data("/api/checkout"));
|
|
1014
1018
|
}
|
|
@@ -2511,17 +2515,22 @@ var StoreService = class extends BaseService {
|
|
|
2511
2515
|
return super.post(path, data);
|
|
2512
2516
|
}
|
|
2513
2517
|
async live() {
|
|
2514
|
-
const [ready, plugins, menus, base] = await Promise.all([
|
|
2518
|
+
const [ready, plugins, menus, base, profile] = await Promise.all([
|
|
2515
2519
|
this.facts.ready(),
|
|
2516
2520
|
this.facts.plugins().catch(() => /* @__PURE__ */ new Map()),
|
|
2517
2521
|
new MenuService(this._fetch).engineMenus(),
|
|
2518
|
-
readStaticStore()
|
|
2522
|
+
readStaticStore(),
|
|
2523
|
+
this.facts.profile().catch(() => null)
|
|
2519
2524
|
]);
|
|
2520
2525
|
const code = ready.currency;
|
|
2521
2526
|
const sameCurrency = (base.currency?.code ?? base.currencyCode) === code;
|
|
2522
2527
|
const flag = (on) => ({ ...on ? { active: true } : { active: false } });
|
|
2523
2528
|
const basePlugins = base.plugins ?? {};
|
|
2524
2529
|
return {
|
|
2530
|
+
// Only what the owner filled in: an empty name keeps the static one.
|
|
2531
|
+
...profile?.name ? { name: profile.name } : {},
|
|
2532
|
+
...profile?.email ? { businessEmail: profile.email } : {},
|
|
2533
|
+
...profile?.phone ? { businessPhone: profile.phone } : {},
|
|
2525
2534
|
currencyCode: code,
|
|
2526
2535
|
currencySymbol: sameCurrency ? base.currencySymbol ?? symbolFor(code) : symbolFor(code),
|
|
2527
2536
|
currency: {
|