@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
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AddOn, a as Address, b as AddressService, c as AppliedDiscount, d as Approval, e as AuthResponse, f as AuthService, g as AutocompleteService, B as B2bPlaced, h as B2bRole, i as B2bService, j as BannerService, k as BaseService, l as BlogService, C as Cart, m as CartLine, n as CartOffer, o as CartService, p as CatalogService, q as Category, r as CategoryService, s as ChatService, t as CheckoutOptions, u as CheckoutResult, v as CheckoutService, w as CmsPage, x as Collection, y as CollectionService, z as Company, D as CompanyOrder, E as ContactService, F as CountryService, G as CouponService, H as Credentials, I as Credit, J as CurrencyService, K as Customer, L as DealService, M as DemoRequestService, N as EngineRequest, O as EnquiryService, P as Envelope, Q as FacetValue, R as Faq, S as FaqService, T as FeedbackService, U as FooterSettings, V as FreeShipping, W as Fulfillment, X as GalleryService, Y as HeaderSettings, Z as HomeLayout, _ as HomeLayoutSection, $ as HomeService, a0 as IdentityAddress, a1 as InitService, a2 as Invitation, a3 as LayoutCollection, a4 as LayoutPage, a5 as LayoutService, a6 as Lead, a7 as ListMeta, a8 as MeilisearchService, a9 as Member, aa as Menu, ab as MenuItem, ac as MenuService, ad as MenuSummary, ae as Money, af as NewsletterService, ag as Offer, ah as
|
|
1
|
+
export { A as AddOn, a as Address, b as AddressService, c as AppliedDiscount, d as Approval, e as AuthResponse, f as AuthService, g as AutocompleteService, B as B2bPlaced, h as B2bRole, i as B2bService, j as BannerService, k as BaseService, l as BlogService, C as Cart, m as CartLine, n as CartOffer, o as CartService, p as CatalogService, q as Category, r as CategoryService, s as ChatService, t as CheckoutOptions, u as CheckoutResult, v as CheckoutService, w as CmsPage, x as Collection, y as CollectionService, z as Company, D as CompanyOrder, E as ContactService, F as CountryService, G as CouponService, H as Credentials, I as Credit, J as CurrencyService, K as Customer, L as DealService, M as DemoRequestService, N as EngineRequest, O as EnquiryService, P as Envelope, Q as FacetValue, R as Faq, S as FaqService, T as FeedbackService, U as FooterSettings, V as FreeShipping, W as Fulfillment, X as GalleryService, Y as HeaderSettings, Z as HomeLayout, _ as HomeLayoutSection, $ as HomeService, a0 as IdentityAddress, a1 as InitService, a2 as Invitation, a3 as LayoutCollection, a4 as LayoutPage, a5 as LayoutService, a6 as Lead, a7 as ListMeta, a8 as MeilisearchService, a9 as Member, aa as Menu, ab as MenuItem, ac as MenuService, ad as MenuSummary, ae as Money, af as NewsletterService, ag as Offer, ah as OpeningHours, ai as Order, aj as OrderLine, ak as OrderService, al as PageLayout, am as PageService, an as PaymentIntent, ao as PaymentMethodService, ap as Plugin, aq as PluginService, aq as PluginsService, ar as PopularSearchService, as as PopularityService, at as Postcode, au as Product, av as ProductFacets, aw as ProductOption, ax as ProductService, ay as ProfileService, az as Quote, aA as REDIRECT_GATEWAYS, aB as ReelsService, aC as RegionService, aD as RejectedLine, aE as Review, aF as ReviewPage, aG as ReviewService, aH as SearchDoc, aI as SearchResult, aJ as SearchService, aK as SettingService, aK as SettingsService, aL as ShippingRate, aM as SiteChrome, aN as SiteFooter, aO as SiteHeader, aP as SocialLink, aQ as StateService, aR as StoreProfile, aS as StoreService, aT as StorefrontCategory, aU as StorefrontMenu, aV as StorefrontOrder, aW as StorefrontProduct, aX as ThemeSettings, aY as ThemeSettingsResult, aZ as UploadService, a_ as UserService, a$ as Variant, b0 as VariantImage, b1 as VariantService, b2 as VarniCustomDesignService, b3 as VarniCustomProductService, b4 as Vendor, b5 as VendorService, b6 as WarrantyService, b7 as Wishlist, b8 as WishlistItem, 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, bo as currencyExponent, bp as currencyService, bq as dealService, br as demoRequestService, bs as emptyCart, bt as emptyPage, bu as enquiryService, bv as faqService, bw as feedbackService, bx as fromEngineAddress, by as fromIdentityAddress, bz as fromSearchDoc, bA as galleryService, bB as homeService, bC as initService, bD as layoutService, bE as mediaUrl, bF as meilisearchService, bG as menuService, bH as minorToMajor, 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, bR as priceOf, bS as productImages, bT as productService, bU as productVideos, 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, c6 as toAddOn, c7 as toCart, c8 as toCartLine, c9 as toCartOffer, ca as toCategory, cb as toCmsPage, cc as toCollection, cd as toEngineAddress, ce as toFreeShipping, cf as toIdentityAddress, cg as toMajor, ch as toMinor, ci as toOrder, cj as toPage, ck as toProduct, cl as toRating, cm as toStorefrontFacets, cn as toUser, co as toVariant, cp as toVendor, 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';
|
|
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 AddOn, a as Address, b as AddressService, c as AppliedDiscount, d as Approval, e as AuthResponse, f as AuthService, g as AutocompleteService, B as B2bPlaced, h as B2bRole, i as B2bService, j as BannerService, k as BaseService, l as BlogService, C as Cart, m as CartLine, n as CartOffer, o as CartService, p as CatalogService, q as Category, r as CategoryService, s as ChatService, t as CheckoutOptions, u as CheckoutResult, v as CheckoutService, w as CmsPage, x as Collection, y as CollectionService, z as Company, D as CompanyOrder, E as ContactService, F as CountryService, G as CouponService, H as Credentials, I as Credit, J as CurrencyService, K as Customer, L as DealService, M as DemoRequestService, N as EngineRequest, O as EnquiryService, P as Envelope, Q as FacetValue, R as Faq, S as FaqService, T as FeedbackService, U as FooterSettings, V as FreeShipping, W as Fulfillment, X as GalleryService, Y as HeaderSettings, Z as HomeLayout, _ as HomeLayoutSection, $ as HomeService, a0 as IdentityAddress, a1 as InitService, a2 as Invitation, a3 as LayoutCollection, a4 as LayoutPage, a5 as LayoutService, a6 as Lead, a7 as ListMeta, a8 as MeilisearchService, a9 as Member, aa as Menu, ab as MenuItem, ac as MenuService, ad as MenuSummary, ae as Money, af as NewsletterService, ag as Offer, ah as
|
|
1
|
+
export { A as AddOn, a as Address, b as AddressService, c as AppliedDiscount, d as Approval, e as AuthResponse, f as AuthService, g as AutocompleteService, B as B2bPlaced, h as B2bRole, i as B2bService, j as BannerService, k as BaseService, l as BlogService, C as Cart, m as CartLine, n as CartOffer, o as CartService, p as CatalogService, q as Category, r as CategoryService, s as ChatService, t as CheckoutOptions, u as CheckoutResult, v as CheckoutService, w as CmsPage, x as Collection, y as CollectionService, z as Company, D as CompanyOrder, E as ContactService, F as CountryService, G as CouponService, H as Credentials, I as Credit, J as CurrencyService, K as Customer, L as DealService, M as DemoRequestService, N as EngineRequest, O as EnquiryService, P as Envelope, Q as FacetValue, R as Faq, S as FaqService, T as FeedbackService, U as FooterSettings, V as FreeShipping, W as Fulfillment, X as GalleryService, Y as HeaderSettings, Z as HomeLayout, _ as HomeLayoutSection, $ as HomeService, a0 as IdentityAddress, a1 as InitService, a2 as Invitation, a3 as LayoutCollection, a4 as LayoutPage, a5 as LayoutService, a6 as Lead, a7 as ListMeta, a8 as MeilisearchService, a9 as Member, aa as Menu, ab as MenuItem, ac as MenuService, ad as MenuSummary, ae as Money, af as NewsletterService, ag as Offer, ah as OpeningHours, ai as Order, aj as OrderLine, ak as OrderService, al as PageLayout, am as PageService, an as PaymentIntent, ao as PaymentMethodService, ap as Plugin, aq as PluginService, aq as PluginsService, ar as PopularSearchService, as as PopularityService, at as Postcode, au as Product, av as ProductFacets, aw as ProductOption, ax as ProductService, ay as ProfileService, az as Quote, aA as REDIRECT_GATEWAYS, aB as ReelsService, aC as RegionService, aD as RejectedLine, aE as Review, aF as ReviewPage, aG as ReviewService, aH as SearchDoc, aI as SearchResult, aJ as SearchService, aK as SettingService, aK as SettingsService, aL as ShippingRate, aM as SiteChrome, aN as SiteFooter, aO as SiteHeader, aP as SocialLink, aQ as StateService, aR as StoreProfile, aS as StoreService, aT as StorefrontCategory, aU as StorefrontMenu, aV as StorefrontOrder, aW as StorefrontProduct, aX as ThemeSettings, aY as ThemeSettingsResult, aZ as UploadService, a_ as UserService, a$ as Variant, b0 as VariantImage, b1 as VariantService, b2 as VarniCustomDesignService, b3 as VarniCustomProductService, b4 as Vendor, b5 as VendorService, b6 as WarrantyService, b7 as Wishlist, b8 as WishlistItem, 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, bo as currencyExponent, bp as currencyService, bq as dealService, br as demoRequestService, bs as emptyCart, bt as emptyPage, bu as enquiryService, bv as faqService, bw as feedbackService, bx as fromEngineAddress, by as fromIdentityAddress, bz as fromSearchDoc, bA as galleryService, bB as homeService, bC as initService, bD as layoutService, bE as mediaUrl, bF as meilisearchService, bG as menuService, bH as minorToMajor, 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, bR as priceOf, bS as productImages, bT as productService, bU as productVideos, 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, c6 as toAddOn, c7 as toCart, c8 as toCartLine, c9 as toCartOffer, ca as toCategory, cb as toCmsPage, cc as toCollection, cd as toEngineAddress, ce as toFreeShipping, cf as toIdentityAddress, cg as toMajor, ch as toMinor, ci as toOrder, cj as toPage, ck as toProduct, cl as toRating, cm as toStorefrontFacets, cn as toUser, co as toVariant, cp as toVendor, 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';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The two ways a call through this connector fails.
|
package/dist/index.js
CHANGED
|
@@ -3041,6 +3041,27 @@ var StoreService = class extends BaseService {
|
|
|
3041
3041
|
...profile?.name ? { name: profile.name } : {},
|
|
3042
3042
|
...profile?.email ? { businessEmail: profile.email } : {},
|
|
3043
3043
|
...profile?.phone ? { businessPhone: profile.phone } : {},
|
|
3044
|
+
// The store's pictures (D148), the same: one it has not chosen keeps the static one.
|
|
3045
|
+
// Its own logo also replaces the static dark logo, which would be the deployment's
|
|
3046
|
+
// mark beside this store's; without a dark one of its own, its logo is the fallback.
|
|
3047
|
+
...profile?.logo_url ? { logo: mediaUrl(profile.logo_url), logoDark: void 0 } : {},
|
|
3048
|
+
...profile?.logo_dark_url ? { logoDark: mediaUrl(profile.logo_dark_url) } : {},
|
|
3049
|
+
...profile?.icon_url ? { favicon: mediaUrl(profile.icon_url) } : {},
|
|
3050
|
+
// What the contact page shows (D156), only what the store published. The address
|
|
3051
|
+
// in the shape the storefront's contact page and home-page JSON-LD already read. The
|
|
3052
|
+
// country beside it, not over `country`: that is the address form's default country.
|
|
3053
|
+
...profile?.country ? { businessCountry: profile.country } : {},
|
|
3054
|
+
...profile?.address ? {
|
|
3055
|
+
address: {
|
|
3056
|
+
street: [profile.address.line1, profile.address.line2].filter(Boolean).join(", "),
|
|
3057
|
+
city: profile.address.city,
|
|
3058
|
+
state: profile.address.state,
|
|
3059
|
+
pincode: profile.address.postal_code,
|
|
3060
|
+
country: profile.address.country
|
|
3061
|
+
}
|
|
3062
|
+
} : {},
|
|
3063
|
+
...profile?.map_location ? { mapLocation: profile.map_location } : {},
|
|
3064
|
+
...profile?.opening_hours?.length ? { openingHours: profile.opening_hours } : {},
|
|
3044
3065
|
currencyCode: code,
|
|
3045
3066
|
currencySymbol: sameCurrency ? base.currencySymbol ?? symbolFor(code) : symbolFor(code),
|
|
3046
3067
|
currency: {
|
|
@@ -3054,6 +3075,16 @@ var StoreService = class extends BaseService {
|
|
|
3054
3075
|
// Features this connector serves from a module: on exactly when the
|
|
3055
3076
|
// module is installed and switched on, whatever the static record says.
|
|
3056
3077
|
isWishlist: { ...basePlugins.isWishlist, ...flag(plugins.has("wishlist")) },
|
|
3078
|
+
// The corner button and the contact page's WhatsApp card read the number from
|
|
3079
|
+
// here; the engine's plugin holds it, in international digits.
|
|
3080
|
+
whatsappChatButton: {
|
|
3081
|
+
...basePlugins.whatsappChatButton,
|
|
3082
|
+
...flag(plugins.has("whatsapp-chat")),
|
|
3083
|
+
...plugins.has("whatsapp-chat") ? {
|
|
3084
|
+
phone: String(plugins.get("whatsapp-chat")?.settings?.phone ?? ""),
|
|
3085
|
+
message: String(plugins.get("whatsapp-chat")?.settings?.message ?? "")
|
|
3086
|
+
} : {}
|
|
3087
|
+
},
|
|
3057
3088
|
isProductReviewsAndRatings: {
|
|
3058
3089
|
...basePlugins.isProductReviewsAndRatings,
|
|
3059
3090
|
...flag(plugins.has("product-reviews"))
|
|
@@ -3063,7 +3094,18 @@ var StoreService = class extends BaseService {
|
|
|
3063
3094
|
newsletter: { ...basePlugins.newsletter, ...flag(plugins.has("newsletter")) },
|
|
3064
3095
|
// Discount codes are core: every GoCommerce store takes them, so
|
|
3065
3096
|
// the code box is shown whatever the static record says.
|
|
3066
|
-
isDiscountCoupons: { ...basePlugins.isDiscountCoupons, active: true }
|
|
3097
|
+
isDiscountCoupons: { ...basePlugins.isDiscountCoupons, active: true },
|
|
3098
|
+
// The engine resizes the store's own pictures in Cloudflare's URL shape
|
|
3099
|
+
// (D139), so the storefront's srcset asks it for each width. Its public
|
|
3100
|
+
// origin, not the proxy path: an <img> needs no CORS, and the proxy would
|
|
3101
|
+
// put every picture through the storefront's server.
|
|
3102
|
+
...profile?.images_path && this.creds.apiUrl ? {
|
|
3103
|
+
imageCdn: {
|
|
3104
|
+
provider: "cloudflare",
|
|
3105
|
+
url: this.creds.apiUrl.trim().replace(/\/+$/, "") + profile.images_path,
|
|
3106
|
+
active: true
|
|
3107
|
+
}
|
|
3108
|
+
} : {}
|
|
3067
3109
|
},
|
|
3068
3110
|
...menus?.length ? { menu: menus } : {},
|
|
3069
3111
|
...deliverable(base, ships),
|
|
@@ -3269,7 +3311,8 @@ var ContactService = class extends BaseService {
|
|
|
3269
3311
|
email,
|
|
3270
3312
|
phone,
|
|
3271
3313
|
message,
|
|
3272
|
-
subject
|
|
3314
|
+
subject,
|
|
3315
|
+
website
|
|
3273
3316
|
}) {
|
|
3274
3317
|
return this.data("/x/contact/messages", {
|
|
3275
3318
|
method: "POST",
|
|
@@ -3278,7 +3321,8 @@ var ContactService = class extends BaseService {
|
|
|
3278
3321
|
email: String(email ?? ""),
|
|
3279
3322
|
...phone ? { phone: String(phone) } : {},
|
|
3280
3323
|
...subject ? { subject: String(subject) } : {},
|
|
3281
|
-
body: String(message ?? "")
|
|
3324
|
+
body: String(message ?? ""),
|
|
3325
|
+
...website ? { website: String(website) } : {}
|
|
3282
3326
|
}
|
|
3283
3327
|
});
|
|
3284
3328
|
}
|