@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
|
@@ -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, Z as GoogleReview, _ as GoogleReviewService, $ as GoogleReviews, a1 as HeaderSettings, a2 as HomeLayout, a3 as HomeLayoutSection, a4 as HomeService, a6 as InitService, a7 as Invitation, a8 as LayoutCollection, a9 as LayoutPage, aa as LayoutService, ab as Lead, ad as MeilisearchService, ae as Member, ah as MenuService, ak as NewsletterService, ap as OrderService, aq as PageLayout, ar as PageService, at as PaymentMethodService, av as PluginService, av as PluginsService, aw as PopularSearchService, ax as PopularityService, aC as ProductService, aD as ProfileService, aE as Quote, aF as REDIRECT_GATEWAYS, aG as ReelsService, aH as RegionService, aI as RejectedLine, aL as ReviewService, aO as SearchService, aP as SettingService, aP as SettingsService, aR as SiteChrome, aS as SiteFooter, aT as SiteHeader, aU as SocialLink, aV as StateService, aX as StoreService, aZ as StorefrontMenu, b0 as ThemeSettings, b1 as ThemeSettingsResult, b2 as UploadService, b3 as UserService, b6 as VariantService, b7 as VarniCustomDesignService, b8 as VarniCustomProductService, ba as VendorService, bb as WarrantyService, be as WishlistService,
|
|
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, Z as GoogleReview, _ as GoogleReviewService, $ as GoogleReviews, a1 as HeaderSettings, a2 as HomeLayout, a3 as HomeLayoutSection, a4 as HomeService, a6 as InitService, a7 as Invitation, a8 as LayoutCollection, a9 as LayoutPage, aa as LayoutService, ab as Lead, ad as MeilisearchService, ae as Member, ah as MenuService, ak as NewsletterService, ap as OrderService, aq as PageLayout, ar as PageService, at as PaymentMethodService, av as PluginService, av as PluginsService, aw as PopularSearchService, ax as PopularityService, aC as ProductService, aD as ProfileService, aE as Quote, aF as REDIRECT_GATEWAYS, aG as ReelsService, aH as RegionService, aI as RejectedLine, aL as ReviewService, aO as SearchService, aP as SettingService, aP as SettingsService, aR as SiteChrome, aS as SiteFooter, aT as SiteHeader, aU as SocialLink, aV as StateService, aX as StoreService, aZ as StorefrontMenu, b0 as ThemeSettings, b1 as ThemeSettingsResult, b2 as UploadService, b3 as UserService, b6 as VariantService, b7 as VarniCustomDesignService, b8 as VarniCustomProductService, ba as VendorService, bb as WarrantyService, bc as WhatsappConsent, bd as WhatsappConsentOffer, be as WhatsappService, 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, bx as currencyService, by as dealService, bz as demoRequestService, bB as emptyPage, bC as enquiryService, bD as faqService, bE as feedbackService, bI as galleryService, bJ as googleReviewService, bK as homeService, bL as initService, bM as layoutService, bN as mediaUrl, bO as meilisearchService, bP as menuService, 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, c0 as productService, 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, cs as toPage, cv as toStorefrontFacets, 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';
|
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, Z as GoogleReview, _ as GoogleReviewService, $ as GoogleReviews, a1 as HeaderSettings, a2 as HomeLayout, a3 as HomeLayoutSection, a4 as HomeService, a6 as InitService, a7 as Invitation, a8 as LayoutCollection, a9 as LayoutPage, aa as LayoutService, ab as Lead, ad as MeilisearchService, ae as Member, ah as MenuService, ak as NewsletterService, ap as OrderService, aq as PageLayout, ar as PageService, at as PaymentMethodService, av as PluginService, av as PluginsService, aw as PopularSearchService, ax as PopularityService, aC as ProductService, aD as ProfileService, aE as Quote, aF as REDIRECT_GATEWAYS, aG as ReelsService, aH as RegionService, aI as RejectedLine, aL as ReviewService, aO as SearchService, aP as SettingService, aP as SettingsService, aR as SiteChrome, aS as SiteFooter, aT as SiteHeader, aU as SocialLink, aV as StateService, aX as StoreService, aZ as StorefrontMenu, b0 as ThemeSettings, b1 as ThemeSettingsResult, b2 as UploadService, b3 as UserService, b6 as VariantService, b7 as VarniCustomDesignService, b8 as VarniCustomProductService, ba as VendorService, bb as WarrantyService, be as WishlistService,
|
|
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, Z as GoogleReview, _ as GoogleReviewService, $ as GoogleReviews, a1 as HeaderSettings, a2 as HomeLayout, a3 as HomeLayoutSection, a4 as HomeService, a6 as InitService, a7 as Invitation, a8 as LayoutCollection, a9 as LayoutPage, aa as LayoutService, ab as Lead, ad as MeilisearchService, ae as Member, ah as MenuService, ak as NewsletterService, ap as OrderService, aq as PageLayout, ar as PageService, at as PaymentMethodService, av as PluginService, av as PluginsService, aw as PopularSearchService, ax as PopularityService, aC as ProductService, aD as ProfileService, aE as Quote, aF as REDIRECT_GATEWAYS, aG as ReelsService, aH as RegionService, aI as RejectedLine, aL as ReviewService, aO as SearchService, aP as SettingService, aP as SettingsService, aR as SiteChrome, aS as SiteFooter, aT as SiteHeader, aU as SocialLink, aV as StateService, aX as StoreService, aZ as StorefrontMenu, b0 as ThemeSettings, b1 as ThemeSettingsResult, b2 as UploadService, b3 as UserService, b6 as VariantService, b7 as VarniCustomDesignService, b8 as VarniCustomProductService, ba as VendorService, bb as WarrantyService, bc as WhatsappConsent, bd as WhatsappConsentOffer, be as WhatsappService, 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, bx as currencyService, by as dealService, bz as demoRequestService, bB as emptyPage, bC as enquiryService, bD as faqService, bE as feedbackService, bI as galleryService, bJ as googleReviewService, bK as homeService, bL as initService, bM as layoutService, bN as mediaUrl, bO as meilisearchService, bP as menuService, 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, c0 as productService, 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, cs as toPage, cv as toStorefrontFacets, 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';
|
package/dist/services/index.js
CHANGED
|
@@ -3698,6 +3698,50 @@ function withAmounts(v) {
|
|
|
3698
3698
|
}
|
|
3699
3699
|
var variantService = new VariantService();
|
|
3700
3700
|
|
|
3701
|
+
// src/services/whatsapp-service.ts
|
|
3702
|
+
var WhatsappService = class extends BaseService {
|
|
3703
|
+
/**
|
|
3704
|
+
* Whether to show the boxes. Never throws: an engine without the module, or
|
|
3705
|
+
* one that fails, answers both off, because checkout must not depend on it.
|
|
3706
|
+
*/
|
|
3707
|
+
async consentOffer() {
|
|
3708
|
+
try {
|
|
3709
|
+
const d = await this.data("/x/notify-whatsapp/consent");
|
|
3710
|
+
const enabled = d?.enabled === true;
|
|
3711
|
+
return { enabled, marketing: enabled && d?.marketing === true };
|
|
3712
|
+
} catch {
|
|
3713
|
+
return { enabled: false, marketing: false };
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
/**
|
|
3717
|
+
* Records both answers for the phone as typed, against the bag (with
|
|
3718
|
+
* `marketing`, the engine keeps the phone on it for basket reminders). Throws
|
|
3719
|
+
* the engine's 400 (`validation_failed`) when the phone is not a WhatsApp
|
|
3720
|
+
* number for the store's country.
|
|
3721
|
+
*/
|
|
3722
|
+
async setConsent({
|
|
3723
|
+
cartId,
|
|
3724
|
+
phone,
|
|
3725
|
+
orderUpdates,
|
|
3726
|
+
marketing
|
|
3727
|
+
}) {
|
|
3728
|
+
const d = await this.data(
|
|
3729
|
+
"/x/notify-whatsapp/consent",
|
|
3730
|
+
{
|
|
3731
|
+
method: "PUT",
|
|
3732
|
+
body: {
|
|
3733
|
+
cart_id: cartId || storedCartId() || "",
|
|
3734
|
+
phone: String(phone ?? "").trim(),
|
|
3735
|
+
order_updates: orderUpdates === true,
|
|
3736
|
+
marketing: marketing === true
|
|
3737
|
+
}
|
|
3738
|
+
}
|
|
3739
|
+
);
|
|
3740
|
+
return { phone: d.phone, orderUpdates: d.order_updates, marketing: d.marketing };
|
|
3741
|
+
}
|
|
3742
|
+
};
|
|
3743
|
+
var whatsappService = new WhatsappService();
|
|
3744
|
+
|
|
3701
3745
|
// src/services/b2b-service.ts
|
|
3702
3746
|
var B2bService = class extends BaseService {
|
|
3703
3747
|
// ------------------------------------------------------------ company
|
|
@@ -3963,6 +4007,6 @@ function attemptKey(request) {
|
|
|
3963
4007
|
}
|
|
3964
4008
|
var b2bService = new B2bService();
|
|
3965
4009
|
|
|
3966
|
-
export { AddressService, AuthService, AutocompleteService, B2bService, BannerService, BaseService, BlogService, CartService, CatalogService, CategoryService, ChatService, CheckoutService, CollectionService, ContactService, CountryService, CouponService, CurrencyService, DealService, DemoRequestService, EnquiryService, FaqService, FeedbackService, GalleryService, GoogleReviewService, HomeService, InitService, LayoutService, MeilisearchService, MenuService, NewsletterService, 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, collectionService, contactService, countryService, couponService, currencyService, dealService, demoRequestService, emptyPage, enquiryService, faqService, feedbackService, galleryService, googleReviewService, homeService, initService, layoutService, mediaUrl, meilisearchService, menuService, newsletterService, orderService, ownDomain, pageService, paymentMethodService, pluginService, pluginsService, popularSearchService, popularityService, productService, profileService, qs, reelsService, regionService, reviewService, searchService, setRequestHost, settingService, settingsService, stateService, staticStore, storeForHost, storeService, toPage, toStorefrontFacets, uploadService, userService, variantService, varniCustomDesignService, varniCustomProductService, vendorService, warrantyService, wishlistService };
|
|
4010
|
+
export { AddressService, AuthService, AutocompleteService, B2bService, BannerService, BaseService, BlogService, CartService, CatalogService, CategoryService, ChatService, CheckoutService, CollectionService, ContactService, CountryService, CouponService, CurrencyService, DealService, DemoRequestService, EnquiryService, FaqService, FeedbackService, GalleryService, GoogleReviewService, HomeService, InitService, LayoutService, MeilisearchService, MenuService, NewsletterService, 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, collectionService, contactService, countryService, couponService, currencyService, dealService, demoRequestService, emptyPage, enquiryService, faqService, feedbackService, galleryService, googleReviewService, homeService, initService, layoutService, mediaUrl, meilisearchService, menuService, newsletterService, orderService, ownDomain, pageService, paymentMethodService, pluginService, pluginsService, popularSearchService, popularityService, productService, profileService, qs, reelsService, regionService, reviewService, searchService, setRequestHost, settingService, settingsService, stateService, staticStore, storeForHost, storeService, toPage, toStorefrontFacets, uploadService, userService, variantService, varniCustomDesignService, varniCustomProductService, vendorService, warrantyService, whatsappService, wishlistService };
|
|
3967
4011
|
//# sourceMappingURL=index.js.map
|
|
3968
4012
|
//# sourceMappingURL=index.js.map
|