@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 +3 -2
- package/dist/{index-C0CR05Q4.d.cts → index-Dm_1E1ai.d.cts} +39 -8
- package/dist/{index-C0CR05Q4.d.ts → index-Dm_1E1ai.d.ts} +39 -8
- package/dist/index.cjs +47 -3
- 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 +47 -3
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +47 -3
- 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 +47 -3
- package/dist/services/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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,
|
|
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';
|
package/dist/services/index.d.ts
CHANGED
|
@@ -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,
|
|
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';
|
package/dist/services/index.js
CHANGED
|
@@ -3025,6 +3025,27 @@ var StoreService = class extends BaseService {
|
|
|
3025
3025
|
...profile?.name ? { name: profile.name } : {},
|
|
3026
3026
|
...profile?.email ? { businessEmail: profile.email } : {},
|
|
3027
3027
|
...profile?.phone ? { businessPhone: profile.phone } : {},
|
|
3028
|
+
// The store's pictures (D148), the same: one it has not chosen keeps the static one.
|
|
3029
|
+
// Its own logo also replaces the static dark logo, which would be the deployment's
|
|
3030
|
+
// mark beside this store's; without a dark one of its own, its logo is the fallback.
|
|
3031
|
+
...profile?.logo_url ? { logo: mediaUrl(profile.logo_url), logoDark: void 0 } : {},
|
|
3032
|
+
...profile?.logo_dark_url ? { logoDark: mediaUrl(profile.logo_dark_url) } : {},
|
|
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 } : {},
|
|
3028
3049
|
currencyCode: code,
|
|
3029
3050
|
currencySymbol: sameCurrency ? base.currencySymbol ?? symbolFor(code) : symbolFor(code),
|
|
3030
3051
|
currency: {
|
|
@@ -3038,6 +3059,16 @@ var StoreService = class extends BaseService {
|
|
|
3038
3059
|
// Features this connector serves from a module: on exactly when the
|
|
3039
3060
|
// module is installed and switched on, whatever the static record says.
|
|
3040
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
|
+
},
|
|
3041
3072
|
isProductReviewsAndRatings: {
|
|
3042
3073
|
...basePlugins.isProductReviewsAndRatings,
|
|
3043
3074
|
...flag(plugins.has("product-reviews"))
|
|
@@ -3047,7 +3078,18 @@ var StoreService = class extends BaseService {
|
|
|
3047
3078
|
newsletter: { ...basePlugins.newsletter, ...flag(plugins.has("newsletter")) },
|
|
3048
3079
|
// Discount codes are core: every GoCommerce store takes them, so
|
|
3049
3080
|
// the code box is shown whatever the static record says.
|
|
3050
|
-
isDiscountCoupons: { ...basePlugins.isDiscountCoupons, active: true }
|
|
3081
|
+
isDiscountCoupons: { ...basePlugins.isDiscountCoupons, active: true },
|
|
3082
|
+
// The engine resizes the store's own pictures in Cloudflare's URL shape
|
|
3083
|
+
// (D139), so the storefront's srcset asks it for each width. Its public
|
|
3084
|
+
// origin, not the proxy path: an <img> needs no CORS, and the proxy would
|
|
3085
|
+
// put every picture through the storefront's server.
|
|
3086
|
+
...profile?.images_path && this.creds.apiUrl ? {
|
|
3087
|
+
imageCdn: {
|
|
3088
|
+
provider: "cloudflare",
|
|
3089
|
+
url: this.creds.apiUrl.trim().replace(/\/+$/, "") + profile.images_path,
|
|
3090
|
+
active: true
|
|
3091
|
+
}
|
|
3092
|
+
} : {}
|
|
3051
3093
|
},
|
|
3052
3094
|
...menus?.length ? { menu: menus } : {},
|
|
3053
3095
|
...deliverable(base, ships),
|
|
@@ -3253,7 +3295,8 @@ var ContactService = class extends BaseService {
|
|
|
3253
3295
|
email,
|
|
3254
3296
|
phone,
|
|
3255
3297
|
message,
|
|
3256
|
-
subject
|
|
3298
|
+
subject,
|
|
3299
|
+
website
|
|
3257
3300
|
}) {
|
|
3258
3301
|
return this.data("/x/contact/messages", {
|
|
3259
3302
|
method: "POST",
|
|
@@ -3262,7 +3305,8 @@ var ContactService = class extends BaseService {
|
|
|
3262
3305
|
email: String(email ?? ""),
|
|
3263
3306
|
...phone ? { phone: String(phone) } : {},
|
|
3264
3307
|
...subject ? { subject: String(subject) } : {},
|
|
3265
|
-
body: String(message ?? "")
|
|
3308
|
+
body: String(message ?? ""),
|
|
3309
|
+
...website ? { website: String(website) } : {}
|
|
3266
3310
|
}
|
|
3267
3311
|
});
|
|
3268
3312
|
}
|