@misiki/gocommerce-connector 0.22.0 → 0.23.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 -1
- package/dist/{index-CIhSE2qR.d.cts → index-BM6hYdQs.d.cts} +42 -1
- package/dist/{index-CIhSE2qR.d.ts → index-BM6hYdQs.d.ts} +42 -1
- package/dist/index.cjs +46 -0
- 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 +45 -1
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +46 -0
- 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 +45 -1
- 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 GooglePlace, Z as GoogleReview, _ as GoogleReviewService, $ as GoogleReviews, a0 as GoogleSurvey, a1 as HeaderSettings, a2 as HomeLayout, a3 as HomeLayoutSection, a4 as HomeService, a5 as IdentityAddress, a6 as InitService, a7 as Invitation, a8 as LayoutCollection, a9 as LayoutPage, aa as LayoutService, ab as Lead, ac as ListMeta, ad as MeilisearchService, ae as Member, af as Menu, ag as MenuItem, ah as MenuService, ai as MenuSummary, aj as Money, ak as NewsletterService, al as Offer, am as OpeningHours, an as Order, ao as OrderLine, ap as OrderService, aq as PageLayout, ar as PageService, as as PaymentIntent, at as PaymentMethodService, au as Plugin, av as PluginService, av as PluginsService, aw as PopularSearchService, ax as PopularityService, ay as Postcode, az as Product, aA as ProductFacets, aB as ProductOption, aC as ProductService, aD as ProfileService, aE as Quote, aF as REDIRECT_GATEWAYS, aG as ReelsService, aH as RegionService, aI as RejectedLine, aJ as Review, aK as ReviewPage, aL as ReviewService, aM as SearchDoc, aN as SearchResult, aO as SearchService, aP as SettingService, aP as SettingsService, aQ as ShippingRate, aR as SiteChrome, aS as SiteFooter, aT as SiteHeader, aU as SocialLink, aV as StateService, aW as StoreProfile, aX as StoreService, aY as StorefrontCategory, aZ as StorefrontMenu, a_ as StorefrontOrder, a$ as StorefrontProduct, b0 as ThemeSettings, b1 as ThemeSettingsResult, b2 as UploadService, b3 as UserService, b4 as Variant, b5 as VariantImage, b6 as VariantService, b7 as VarniCustomDesignService, b8 as VarniCustomProductService, b9 as Vendor, ba as VendorService, bb as WarrantyService, bc 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 GooglePlace, Z as GoogleReview, _ as GoogleReviewService, $ as GoogleReviews, a0 as GoogleSurvey, a1 as HeaderSettings, a2 as HomeLayout, a3 as HomeLayoutSection, a4 as HomeService, a5 as IdentityAddress, a6 as InitService, a7 as Invitation, a8 as LayoutCollection, a9 as LayoutPage, aa as LayoutService, ab as Lead, ac as ListMeta, ad as MeilisearchService, ae as Member, af as Menu, ag as MenuItem, ah as MenuService, ai as MenuSummary, aj as Money, ak as NewsletterService, al as Offer, am as OpeningHours, an as Order, ao as OrderLine, ap as OrderService, aq as PageLayout, ar as PageService, as as PaymentIntent, at as PaymentMethodService, au as Plugin, av as PluginService, av as PluginsService, aw as PopularSearchService, ax as PopularityService, ay as Postcode, az as Product, aA as ProductFacets, aB as ProductOption, aC as ProductService, aD as ProfileService, aE as Quote, aF as REDIRECT_GATEWAYS, aG as ReelsService, aH as RegionService, aI as RejectedLine, aJ as Review, aK as ReviewPage, aL as ReviewService, aM as SearchDoc, aN as SearchResult, aO as SearchService, aP as SettingService, aP as SettingsService, aQ as ShippingRate, aR as SiteChrome, aS as SiteFooter, aT as SiteHeader, aU as SocialLink, aV as StateService, aW as StoreProfile, aX as StoreService, aY as StorefrontCategory, aZ as StorefrontMenu, a_ as StorefrontOrder, a$ as StorefrontProduct, b0 as ThemeSettings, b1 as ThemeSettingsResult, b2 as UploadService, b3 as UserService, b4 as Variant, b5 as VariantImage, b6 as VariantService, b7 as VarniCustomDesignService, b8 as VarniCustomProductService, b9 as Vendor, ba as VendorService, bb as WarrantyService, bc as WhatsappConsent, bd as WhatsappConsentOffer, be as WhatsappService, bf as Wishlist, bg as WishlistItem, bh as WishlistService, bi as addressService, bj as authService, bk as autocompleteService, bl as b2bService, bm as bannerService, bn as blogService, bo as cartService, bp as categoryService, bq as chatService, br as checkoutService, bs as collectionService, bt as contactService, bu as countryService, bv as couponService, bw as currencyExponent, bx as currencyService, by as dealService, bz as demoRequestService, bA as emptyCart, bB as emptyPage, bC as enquiryService, bD as faqService, bE as feedbackService, bF as fromEngineAddress, bG as fromIdentityAddress, bH as fromSearchDoc, bI as galleryService, bJ as googleReviewService, bK as homeService, bL as initService, bM as layoutService, bN as mediaUrl, bO as meilisearchService, bP as menuService, bQ as minorToMajor, bR as newsletterService, bS as orderService, bT as ownDomain, bU as pageService, bV as paymentMethodService, bW as pluginService, bX as pluginsService, bY as popularSearchService, bZ as popularityService, b_ as priceOf, b$ as productImages, c0 as productService, c1 as productVideos, c2 as profileService, c3 as qs, c4 as reelsService, c5 as regionService, c6 as reviewService, c7 as searchService, c8 as setRequestHost, c9 as settingService, ca as settingsService, cb as stateService, cc as staticStore, cd as storeForHost, ce as storeService, cf as toAddOn, cg as toCart, ch as toCartLine, ci as toCartOffer, cj as toCategory, ck as toCmsPage, cl as toCollection, cm as toEngineAddress, cn as toFreeShipping, co as toIdentityAddress, cp as toMajor, cq as toMinor, cr as toOrder, cs as toPage, ct as toProduct, cu as toRating, cv as toStorefrontFacets, cw as toUser, cx as toVariant, cy as toVendor, cz as uploadService, cA as userService, cB as variantService, cC as varniCustomDesignService, cD as varniCustomProductService, cE as vendorService, cF as warrantyService, cG as whatsappService, cH as wishlistService } from './index-BM6hYdQs.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 GooglePlace, Z as GoogleReview, _ as GoogleReviewService, $ as GoogleReviews, a0 as GoogleSurvey, a1 as HeaderSettings, a2 as HomeLayout, a3 as HomeLayoutSection, a4 as HomeService, a5 as IdentityAddress, a6 as InitService, a7 as Invitation, a8 as LayoutCollection, a9 as LayoutPage, aa as LayoutService, ab as Lead, ac as ListMeta, ad as MeilisearchService, ae as Member, af as Menu, ag as MenuItem, ah as MenuService, ai as MenuSummary, aj as Money, ak as NewsletterService, al as Offer, am as OpeningHours, an as Order, ao as OrderLine, ap as OrderService, aq as PageLayout, ar as PageService, as as PaymentIntent, at as PaymentMethodService, au as Plugin, av as PluginService, av as PluginsService, aw as PopularSearchService, ax as PopularityService, ay as Postcode, az as Product, aA as ProductFacets, aB as ProductOption, aC as ProductService, aD as ProfileService, aE as Quote, aF as REDIRECT_GATEWAYS, aG as ReelsService, aH as RegionService, aI as RejectedLine, aJ as Review, aK as ReviewPage, aL as ReviewService, aM as SearchDoc, aN as SearchResult, aO as SearchService, aP as SettingService, aP as SettingsService, aQ as ShippingRate, aR as SiteChrome, aS as SiteFooter, aT as SiteHeader, aU as SocialLink, aV as StateService, aW as StoreProfile, aX as StoreService, aY as StorefrontCategory, aZ as StorefrontMenu, a_ as StorefrontOrder, a$ as StorefrontProduct, b0 as ThemeSettings, b1 as ThemeSettingsResult, b2 as UploadService, b3 as UserService, b4 as Variant, b5 as VariantImage, b6 as VariantService, b7 as VarniCustomDesignService, b8 as VarniCustomProductService, b9 as Vendor, ba as VendorService, bb as WarrantyService, bc 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 GooglePlace, Z as GoogleReview, _ as GoogleReviewService, $ as GoogleReviews, a0 as GoogleSurvey, a1 as HeaderSettings, a2 as HomeLayout, a3 as HomeLayoutSection, a4 as HomeService, a5 as IdentityAddress, a6 as InitService, a7 as Invitation, a8 as LayoutCollection, a9 as LayoutPage, aa as LayoutService, ab as Lead, ac as ListMeta, ad as MeilisearchService, ae as Member, af as Menu, ag as MenuItem, ah as MenuService, ai as MenuSummary, aj as Money, ak as NewsletterService, al as Offer, am as OpeningHours, an as Order, ao as OrderLine, ap as OrderService, aq as PageLayout, ar as PageService, as as PaymentIntent, at as PaymentMethodService, au as Plugin, av as PluginService, av as PluginsService, aw as PopularSearchService, ax as PopularityService, ay as Postcode, az as Product, aA as ProductFacets, aB as ProductOption, aC as ProductService, aD as ProfileService, aE as Quote, aF as REDIRECT_GATEWAYS, aG as ReelsService, aH as RegionService, aI as RejectedLine, aJ as Review, aK as ReviewPage, aL as ReviewService, aM as SearchDoc, aN as SearchResult, aO as SearchService, aP as SettingService, aP as SettingsService, aQ as ShippingRate, aR as SiteChrome, aS as SiteFooter, aT as SiteHeader, aU as SocialLink, aV as StateService, aW as StoreProfile, aX as StoreService, aY as StorefrontCategory, aZ as StorefrontMenu, a_ as StorefrontOrder, a$ as StorefrontProduct, b0 as ThemeSettings, b1 as ThemeSettingsResult, b2 as UploadService, b3 as UserService, b4 as Variant, b5 as VariantImage, b6 as VariantService, b7 as VarniCustomDesignService, b8 as VarniCustomProductService, b9 as Vendor, ba as VendorService, bb as WarrantyService, bc as WhatsappConsent, bd as WhatsappConsentOffer, be as WhatsappService, bf as Wishlist, bg as WishlistItem, bh as WishlistService, bi as addressService, bj as authService, bk as autocompleteService, bl as b2bService, bm as bannerService, bn as blogService, bo as cartService, bp as categoryService, bq as chatService, br as checkoutService, bs as collectionService, bt as contactService, bu as countryService, bv as couponService, bw as currencyExponent, bx as currencyService, by as dealService, bz as demoRequestService, bA as emptyCart, bB as emptyPage, bC as enquiryService, bD as faqService, bE as feedbackService, bF as fromEngineAddress, bG as fromIdentityAddress, bH as fromSearchDoc, bI as galleryService, bJ as googleReviewService, bK as homeService, bL as initService, bM as layoutService, bN as mediaUrl, bO as meilisearchService, bP as menuService, bQ as minorToMajor, bR as newsletterService, bS as orderService, bT as ownDomain, bU as pageService, bV as paymentMethodService, bW as pluginService, bX as pluginsService, bY as popularSearchService, bZ as popularityService, b_ as priceOf, b$ as productImages, c0 as productService, c1 as productVideos, c2 as profileService, c3 as qs, c4 as reelsService, c5 as regionService, c6 as reviewService, c7 as searchService, c8 as setRequestHost, c9 as settingService, ca as settingsService, cb as stateService, cc as staticStore, cd as storeForHost, ce as storeService, cf as toAddOn, cg as toCart, ch as toCartLine, ci as toCartOffer, cj as toCategory, ck as toCmsPage, cl as toCollection, cm as toEngineAddress, cn as toFreeShipping, co as toIdentityAddress, cp as toMajor, cq as toMinor, cr as toOrder, cs as toPage, ct as toProduct, cu as toRating, cv as toStorefrontFacets, cw as toUser, cx as toVariant, cy as toVendor, cz as uploadService, cA as userService, cB as variantService, cC as varniCustomDesignService, cD as varniCustomProductService, cE as vendorService, cF as warrantyService, cG as whatsappService, cH as wishlistService } from './index-BM6hYdQs.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The two ways a call through this connector fails.
|
package/dist/index.js
CHANGED
|
@@ -3714,6 +3714,50 @@ function withAmounts(v) {
|
|
|
3714
3714
|
}
|
|
3715
3715
|
var variantService = new VariantService();
|
|
3716
3716
|
|
|
3717
|
+
// src/services/whatsapp-service.ts
|
|
3718
|
+
var WhatsappService = class extends BaseService {
|
|
3719
|
+
/**
|
|
3720
|
+
* Whether to show the boxes. Never throws: an engine without the module, or
|
|
3721
|
+
* one that fails, answers both off, because checkout must not depend on it.
|
|
3722
|
+
*/
|
|
3723
|
+
async consentOffer() {
|
|
3724
|
+
try {
|
|
3725
|
+
const d = await this.data("/x/notify-whatsapp/consent");
|
|
3726
|
+
const enabled = d?.enabled === true;
|
|
3727
|
+
return { enabled, marketing: enabled && d?.marketing === true };
|
|
3728
|
+
} catch {
|
|
3729
|
+
return { enabled: false, marketing: false };
|
|
3730
|
+
}
|
|
3731
|
+
}
|
|
3732
|
+
/**
|
|
3733
|
+
* Records both answers for the phone as typed, against the bag (with
|
|
3734
|
+
* `marketing`, the engine keeps the phone on it for basket reminders). Throws
|
|
3735
|
+
* the engine's 400 (`validation_failed`) when the phone is not a WhatsApp
|
|
3736
|
+
* number for the store's country.
|
|
3737
|
+
*/
|
|
3738
|
+
async setConsent({
|
|
3739
|
+
cartId,
|
|
3740
|
+
phone,
|
|
3741
|
+
orderUpdates,
|
|
3742
|
+
marketing
|
|
3743
|
+
}) {
|
|
3744
|
+
const d = await this.data(
|
|
3745
|
+
"/x/notify-whatsapp/consent",
|
|
3746
|
+
{
|
|
3747
|
+
method: "PUT",
|
|
3748
|
+
body: {
|
|
3749
|
+
cart_id: cartId || storedCartId() || "",
|
|
3750
|
+
phone: String(phone ?? "").trim(),
|
|
3751
|
+
order_updates: orderUpdates === true,
|
|
3752
|
+
marketing: marketing === true
|
|
3753
|
+
}
|
|
3754
|
+
}
|
|
3755
|
+
);
|
|
3756
|
+
return { phone: d.phone, orderUpdates: d.order_updates, marketing: d.marketing };
|
|
3757
|
+
}
|
|
3758
|
+
};
|
|
3759
|
+
var whatsappService = new WhatsappService();
|
|
3760
|
+
|
|
3717
3761
|
// src/services/b2b-service.ts
|
|
3718
3762
|
var B2bService = class extends BaseService {
|
|
3719
3763
|
// ------------------------------------------------------------ company
|
|
@@ -3979,6 +4023,6 @@ function attemptKey(request) {
|
|
|
3979
4023
|
}
|
|
3980
4024
|
var b2bService = new B2bService();
|
|
3981
4025
|
|
|
3982
|
-
export { AddressService, AuthService, AutocompleteService, B2bService, BannerService, BaseService, BlogService, CartService, CatalogService, CategoryService, ChatService, CheckoutService, CollectionService, ContactService, CountryService, CouponService, CurrencyService, DealService, DemoRequestService, EnquiryService, FaqService, FeedbackService, GalleryService, GoCommerceError, GoogleReviewService, HomeService, InitService, LayoutService, MeilisearchService, MenuService, NewsletterService, NotSupportedError, OrderService, PageService, PaymentMethodService, PluginService, PluginService as PluginsService, PopularSearchService, PopularityService, ProductService, ProfileService, REDIRECT_GATEWAYS, ReelsService, RegionService, ReviewService, SearchService, SettingService, SettingService as SettingsService, StateService, StoreService, UploadService, UserService, VariantService, VarniCustomDesignService, VarniCustomProductService, VendorService, WarrantyService, WishlistService, addressService, authService, autocompleteService, b2bService, bannerService, blogService, cartService, categoryService, chatService, checkoutService, forgetAll as clearStoreCache, collectionService, connectorName, contactService, countryService, couponService, currencyExponent, currencyService, dealService, demoRequestService, emptyCart, emptyPage, enquiryService, faqService, feedbackService, fromEngineAddress, fromIdentityAddress, fromSearchDoc, galleryService, googleReviewService, hasStaticStore, homeService, initService, layoutService, mediaUrl, meilisearchService, menuService, minorToMajor, newsletterService, orderService, ownDomain, pageService, paymentMethodService, pluginService, pluginsService, popularSearchService, popularityService, priceOf, productImages, productService, productVideos, profileService, qs, readStaticStore, reelsService, regionService, reviewService, searchService, serveRestLocally, setRequestHost, setStaticStore, settingService, settingsService, stateService, staticStore, storeForHost, storeService, toAddOn, toCart, toCartLine, toCartOffer, toCategory, toCmsPage, toCollection, toEngineAddress, toFreeShipping, toIdentityAddress, toMajor, toMinor, toOrder, toPage, toProduct, toRating, toStorefrontFacets, toUser, toVariant, toVendor, uploadService, userService, variantService, varniCustomDesignService, varniCustomProductService, vendorService, warrantyService, wishlistService };
|
|
4026
|
+
export { AddressService, AuthService, AutocompleteService, B2bService, BannerService, BaseService, BlogService, CartService, CatalogService, CategoryService, ChatService, CheckoutService, CollectionService, ContactService, CountryService, CouponService, CurrencyService, DealService, DemoRequestService, EnquiryService, FaqService, FeedbackService, GalleryService, GoCommerceError, GoogleReviewService, HomeService, InitService, LayoutService, MeilisearchService, MenuService, NewsletterService, NotSupportedError, OrderService, PageService, PaymentMethodService, PluginService, PluginService as PluginsService, PopularSearchService, PopularityService, ProductService, ProfileService, REDIRECT_GATEWAYS, ReelsService, RegionService, ReviewService, SearchService, SettingService, SettingService as SettingsService, StateService, StoreService, UploadService, UserService, VariantService, VarniCustomDesignService, VarniCustomProductService, VendorService, WarrantyService, WhatsappService, WishlistService, addressService, authService, autocompleteService, b2bService, bannerService, blogService, cartService, categoryService, chatService, checkoutService, forgetAll as clearStoreCache, collectionService, connectorName, contactService, countryService, couponService, currencyExponent, currencyService, dealService, demoRequestService, emptyCart, emptyPage, enquiryService, faqService, feedbackService, fromEngineAddress, fromIdentityAddress, fromSearchDoc, galleryService, googleReviewService, hasStaticStore, homeService, initService, layoutService, mediaUrl, meilisearchService, menuService, minorToMajor, newsletterService, orderService, ownDomain, pageService, paymentMethodService, pluginService, pluginsService, popularSearchService, popularityService, priceOf, productImages, productService, productVideos, profileService, qs, readStaticStore, reelsService, regionService, reviewService, searchService, serveRestLocally, setRequestHost, setStaticStore, settingService, settingsService, stateService, staticStore, storeForHost, storeService, toAddOn, toCart, toCartLine, toCartOffer, toCategory, toCmsPage, toCollection, toEngineAddress, toFreeShipping, toIdentityAddress, toMajor, toMinor, toOrder, toPage, toProduct, toRating, toStorefrontFacets, toUser, toVariant, toVendor, uploadService, userService, variantService, varniCustomDesignService, varniCustomProductService, vendorService, warrantyService, whatsappService, wishlistService };
|
|
3983
4027
|
//# sourceMappingURL=index.js.map
|
|
3984
4028
|
//# sourceMappingURL=index.js.map
|