@misiki/gocommerce-connector 0.6.0 → 0.7.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.
@@ -1 +1 @@
1
- export { a as AddressService, c as Approval, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, m as CartService, n as CatalogService, p as CategoryService, q as ChatService, t as CheckoutService, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, G as Credit, H as CurrencyService, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, P as FaqService, Q as FeedbackService, S as GalleryService, T as HomeLayout, U as HomeLayoutSection, V as HomeService, X as InitService, Y as Invitation, Z as LayoutService, _ as Lead, a0 as MeilisearchService, a1 as Member, a4 as MenuService, a7 as NewsletterService, ab as OrderService, ac as PageService, ae as PaymentMethodService, ag as PluginService, ag as PluginsService, ah as PopularSearchService, ai as PopularityService, al as ProductService, am as ProfileService, an as Quote, ao as REDIRECT_GATEWAYS, ap as ReelsService, aq as RegionService, ar as RejectedLine, au as ReviewService, ax as SearchService, ay as SettingService, ay as SettingsService, aA as StateService, aC as StoreService, aE as StorefrontMenu, aH as UploadService, aI as UserService, aL as VariantService, aM as VarniCustomDesignService, aN as VarniCustomProductService, aP as VendorService, aQ as WarrantyService, aT as WishlistService, aU as addressService, aV as authService, aW as autocompleteService, aX as b2bService, aY as bannerService, aZ as blogService, a_ as cartService, a$ as categoryService, b0 as chatService, b1 as checkoutService, b2 as collectionService, b3 as contactService, b4 as countryService, b5 as couponService, b7 as currencyService, b8 as dealService, b9 as demoRequestService, bb as emptyPage, bc as enquiryService, bd as faqService, be as feedbackService, bi as galleryService, bj as homeService, bk as initService, bl as layoutService, bm as mediaUrl, bn as meilisearchService, bo as menuService, bq as newsletterService, br as orderService, bs as ownDomain, bt as pageService, bu as paymentMethodService, bv as pluginService, bw as pluginsService, bx as popularSearchService, by as popularityService, bB as productService, bC as profileService, bD as qs, bE as reelsService, bF as regionService, bG as reviewService, bH as searchService, bI as setRequestHost, bJ as settingService, bK as settingsService, bL as stateService, bM as staticStore, bN as storeForHost, bO as storeService, bZ as toPage, c3 as uploadService, c4 as userService, c5 as variantService, c6 as varniCustomDesignService, c7 as varniCustomProductService, c8 as vendorService, c9 as warrantyService, ca as wishlistService } from '../index-1Tr-Urb_.cjs';
1
+ export { a as AddressService, c as Approval, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, m as CartService, n as CatalogService, p as CategoryService, q as ChatService, t as CheckoutService, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, G as Credit, H as CurrencyService, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, P as FaqService, Q as FeedbackService, S as GalleryService, T as HomeLayout, U as HomeLayoutSection, V as HomeService, X as InitService, Y as Invitation, Z as LayoutService, _ as Lead, a0 as MeilisearchService, a1 as Member, a4 as MenuService, a7 as NewsletterService, ab as OrderService, ac as PageService, ae as PaymentMethodService, ag as PluginService, ag as PluginsService, ah as PopularSearchService, ai as PopularityService, al as ProductService, am as ProfileService, an as Quote, ao as REDIRECT_GATEWAYS, ap as ReelsService, aq as RegionService, ar as RejectedLine, au as ReviewService, ax as SearchService, ay as SettingService, ay as SettingsService, aA as StateService, aC as StoreService, aE as StorefrontMenu, aH as UploadService, aI as UserService, aL as VariantService, aM as VarniCustomDesignService, aN as VarniCustomProductService, aP as VendorService, aQ as WarrantyService, aT as WishlistService, aU as addressService, aV as authService, aW as autocompleteService, aX as b2bService, aY as bannerService, aZ as blogService, a_ as cartService, a$ as categoryService, b0 as chatService, b1 as checkoutService, b2 as collectionService, b3 as contactService, b4 as countryService, b5 as couponService, b7 as currencyService, b8 as dealService, b9 as demoRequestService, bb as emptyPage, bc as enquiryService, bd as faqService, be as feedbackService, bi as galleryService, bj as homeService, bk as initService, bl as layoutService, bm as mediaUrl, bn as meilisearchService, bo as menuService, bq as newsletterService, br as orderService, bs as ownDomain, bt as pageService, bu as paymentMethodService, bv as pluginService, bw as pluginsService, bx as popularSearchService, by as popularityService, bB as productService, bC as profileService, bD as qs, bE as reelsService, bF as regionService, bG as reviewService, bH as searchService, bI as setRequestHost, bJ as settingService, bK as settingsService, bL as stateService, bM as staticStore, bN as storeForHost, bO as storeService, bZ as toPage, c3 as uploadService, c4 as userService, c5 as variantService, c6 as varniCustomDesignService, c7 as varniCustomProductService, c8 as vendorService, c9 as warrantyService, ca as wishlistService } from '../index-D-hnd6-D.cjs';
@@ -1 +1 @@
1
- export { a as AddressService, c as Approval, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, m as CartService, n as CatalogService, p as CategoryService, q as ChatService, t as CheckoutService, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, G as Credit, H as CurrencyService, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, P as FaqService, Q as FeedbackService, S as GalleryService, T as HomeLayout, U as HomeLayoutSection, V as HomeService, X as InitService, Y as Invitation, Z as LayoutService, _ as Lead, a0 as MeilisearchService, a1 as Member, a4 as MenuService, a7 as NewsletterService, ab as OrderService, ac as PageService, ae as PaymentMethodService, ag as PluginService, ag as PluginsService, ah as PopularSearchService, ai as PopularityService, al as ProductService, am as ProfileService, an as Quote, ao as REDIRECT_GATEWAYS, ap as ReelsService, aq as RegionService, ar as RejectedLine, au as ReviewService, ax as SearchService, ay as SettingService, ay as SettingsService, aA as StateService, aC as StoreService, aE as StorefrontMenu, aH as UploadService, aI as UserService, aL as VariantService, aM as VarniCustomDesignService, aN as VarniCustomProductService, aP as VendorService, aQ as WarrantyService, aT as WishlistService, aU as addressService, aV as authService, aW as autocompleteService, aX as b2bService, aY as bannerService, aZ as blogService, a_ as cartService, a$ as categoryService, b0 as chatService, b1 as checkoutService, b2 as collectionService, b3 as contactService, b4 as countryService, b5 as couponService, b7 as currencyService, b8 as dealService, b9 as demoRequestService, bb as emptyPage, bc as enquiryService, bd as faqService, be as feedbackService, bi as galleryService, bj as homeService, bk as initService, bl as layoutService, bm as mediaUrl, bn as meilisearchService, bo as menuService, bq as newsletterService, br as orderService, bs as ownDomain, bt as pageService, bu as paymentMethodService, bv as pluginService, bw as pluginsService, bx as popularSearchService, by as popularityService, bB as productService, bC as profileService, bD as qs, bE as reelsService, bF as regionService, bG as reviewService, bH as searchService, bI as setRequestHost, bJ as settingService, bK as settingsService, bL as stateService, bM as staticStore, bN as storeForHost, bO as storeService, bZ as toPage, c3 as uploadService, c4 as userService, c5 as variantService, c6 as varniCustomDesignService, c7 as varniCustomProductService, c8 as vendorService, c9 as warrantyService, ca as wishlistService } from '../index-1Tr-Urb_.js';
1
+ export { a as AddressService, c as Approval, e as AuthService, f as AutocompleteService, B as B2bPlaced, g as B2bRole, h as B2bService, i as BannerService, j as BaseService, k as BlogService, m as CartService, n as CatalogService, p as CategoryService, q as ChatService, t as CheckoutService, w as CollectionService, x as Company, y as CompanyOrder, z as ContactService, D as CountryService, E as CouponService, G as Credit, H as CurrencyService, J as DealService, K as DemoRequestService, L as EngineRequest, M as EnquiryService, P as FaqService, Q as FeedbackService, S as GalleryService, T as HomeLayout, U as HomeLayoutSection, V as HomeService, X as InitService, Y as Invitation, Z as LayoutService, _ as Lead, a0 as MeilisearchService, a1 as Member, a4 as MenuService, a7 as NewsletterService, ab as OrderService, ac as PageService, ae as PaymentMethodService, ag as PluginService, ag as PluginsService, ah as PopularSearchService, ai as PopularityService, al as ProductService, am as ProfileService, an as Quote, ao as REDIRECT_GATEWAYS, ap as ReelsService, aq as RegionService, ar as RejectedLine, au as ReviewService, ax as SearchService, ay as SettingService, ay as SettingsService, aA as StateService, aC as StoreService, aE as StorefrontMenu, aH as UploadService, aI as UserService, aL as VariantService, aM as VarniCustomDesignService, aN as VarniCustomProductService, aP as VendorService, aQ as WarrantyService, aT as WishlistService, aU as addressService, aV as authService, aW as autocompleteService, aX as b2bService, aY as bannerService, aZ as blogService, a_ as cartService, a$ as categoryService, b0 as chatService, b1 as checkoutService, b2 as collectionService, b3 as contactService, b4 as countryService, b5 as couponService, b7 as currencyService, b8 as dealService, b9 as demoRequestService, bb as emptyPage, bc as enquiryService, bd as faqService, be as feedbackService, bi as galleryService, bj as homeService, bk as initService, bl as layoutService, bm as mediaUrl, bn as meilisearchService, bo as menuService, bq as newsletterService, br as orderService, bs as ownDomain, bt as pageService, bu as paymentMethodService, bv as pluginService, bw as pluginsService, bx as popularSearchService, by as popularityService, bB as productService, bC as profileService, bD as qs, bE as reelsService, bF as regionService, bG as reviewService, bH as searchService, bI as setRequestHost, bJ as settingService, bK as settingsService, bL as stateService, bM as staticStore, bN as storeForHost, bO as storeService, bZ as toPage, c3 as uploadService, c4 as userService, c5 as variantService, c6 as varniCustomDesignService, c7 as varniCustomProductService, c8 as vendorService, c9 as warrantyService, ca as wishlistService } from '../index-D-hnd6-D.js';
@@ -2032,6 +2032,31 @@ var OrderService = class extends BaseService {
2032
2032
  async listPublic(_args = {}) {
2033
2033
  return emptyPage();
2034
2034
  }
2035
+ /**
2036
+ * Opens an order with its number and the email or phone on it, no code. The
2037
+ * engine answers one 404 for an unknown number and a wrong contact. The
2038
+ * token it answers is kept like an order placed in this browser, so the
2039
+ * order page and `getOrder` read it again.
2040
+ */
2041
+ async openOrder({ orderNo, contact }) {
2042
+ const res = await this.data(
2043
+ `/api/orders/${encodeURIComponent(orderNo.trim())}/open`,
2044
+ { method: "POST", body: { contact: contact.trim() } }
2045
+ );
2046
+ rememberOrder({ number: res.order.number, token: res.access_token, cartId: "" });
2047
+ return { data: [toOrder(res.order)] };
2048
+ }
2049
+ /**
2050
+ * Opens an order from the link in its emails, which carries the order's key
2051
+ * (`/order-tracking?order=…&key=…`). The key is kept like an order placed in
2052
+ * this browser, so the page can drop it from the address bar.
2053
+ */
2054
+ async openOrderWithKey({ orderNo, key }) {
2055
+ const number = orderNo.trim();
2056
+ const order = await this.data(`/api/orders/${encodeURIComponent(number)}`, { query: { token: key.trim() } });
2057
+ rememberOrder({ number: order.number, token: key.trim(), cartId: "" });
2058
+ return { data: [toOrder(order)] };
2059
+ }
2035
2060
  /**
2036
2061
  * Sends a 4-digit code to the email or phone on the order, when `contact`
2037
2062
  * is that email or phone. The engine answers the same either way, so this