@misiki/gocommerce-connector 0.8.0 → 0.9.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 +1 -0
- package/dist/{index-inrM-B0Z.d.cts → index-72kQMxjZ.d.cts} +27 -1
- package/dist/{index-inrM-B0Z.d.ts → index-72kQMxjZ.d.ts} +27 -1
- package/dist/index.cjs +17 -1
- 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 +17 -1
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +17 -1
- 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 +17 -1
- package/dist/services/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -139,6 +139,7 @@ down stays best-effort: the storefront renders from its static record.
|
|
|
139
139
|
| content pages (`/p/…`, legal pages) | `/x/cms/pages` |
|
|
140
140
|
| FAQ | `/x/faq` |
|
|
141
141
|
| composed home page | `/x/layouts/home` (`?preview=` for a draft) — `layoutService.getHomeLayout()`, null when the store has none; carries `themeSettings` and each collection list's `collections` |
|
|
142
|
+
| product and collection templates | `/x/layouts/product`, `/x/layouts/collection` (`?preview=` for a draft) — `layoutService.getProductLayout()` and `getCollectionLayout()`, the sections the shop arranged around the page's core (`main-product`, `main-collection`); null when none is published, and the page draws as before |
|
|
142
143
|
| theme settings | `/x/layouts/theme` (`?preview=` for a draft) — `layoutService.getThemeSettings()`, the store's colours, fonts and rounding for every page; null when there are none |
|
|
143
144
|
| menus | `/x/navigation/menus/{header,footer}`, laid over `store.menu`; any menu by handle |
|
|
144
145
|
| product specs table | the product's category attribute answers |
|
|
@@ -5861,6 +5861,14 @@ type HomeLayoutSection = {
|
|
|
5861
5861
|
products?: StorefrontProduct[];
|
|
5862
5862
|
collections?: LayoutCollection[];
|
|
5863
5863
|
};
|
|
5864
|
+
/**
|
|
5865
|
+
* A page the shop arranges: the home page, or the template every product or
|
|
5866
|
+
* every collection is drawn in (ext/layouts, D128). A template holds its
|
|
5867
|
+
* core once — `main-product` (the catalogue's pictures, price and buy box)
|
|
5868
|
+
* or `main-collection` (the collection's grid) — at the place the shop put
|
|
5869
|
+
* it, and the storefront draws its own core there.
|
|
5870
|
+
*/
|
|
5871
|
+
type LayoutPage = 'home' | 'product' | 'collection';
|
|
5864
5872
|
type HomeLayout = {
|
|
5865
5873
|
page: string;
|
|
5866
5874
|
theme: string;
|
|
@@ -5872,6 +5880,8 @@ type HomeLayout = {
|
|
|
5872
5880
|
themeSettings: ThemeSettings | null;
|
|
5873
5881
|
sections: HomeLayoutSection[];
|
|
5874
5882
|
};
|
|
5883
|
+
/** A composed page of any kind; a template's `themeSettings` is always null. */
|
|
5884
|
+
type PageLayout = HomeLayout;
|
|
5875
5885
|
/** The design tokens alone, for every page the storefront draws. */
|
|
5876
5886
|
type ThemeSettingsResult = {
|
|
5877
5887
|
revision?: number;
|
|
@@ -5888,6 +5898,22 @@ declare class LayoutService extends BaseService {
|
|
|
5888
5898
|
getHomeLayout({ preview }?: {
|
|
5889
5899
|
preview?: string | null;
|
|
5890
5900
|
}): Promise<HomeLayout | null>;
|
|
5901
|
+
/**
|
|
5902
|
+
* The template every product page is drawn in: the sections around the
|
|
5903
|
+
* product's core (`main-product`). Null when none is published, so the
|
|
5904
|
+
* product page draws exactly as it did before templates existed.
|
|
5905
|
+
*/
|
|
5906
|
+
getProductLayout({ preview }?: {
|
|
5907
|
+
preview?: string | null;
|
|
5908
|
+
}): Promise<PageLayout | null>;
|
|
5909
|
+
/** The template every collection page is drawn in, around its grid (`main-collection`). */
|
|
5910
|
+
getCollectionLayout({ preview }?: {
|
|
5911
|
+
preview?: string | null;
|
|
5912
|
+
}): Promise<PageLayout | null>;
|
|
5913
|
+
/** Any arranged page by its key; null for none, as the three above. */
|
|
5914
|
+
getPageLayout(page: LayoutPage, { preview }?: {
|
|
5915
|
+
preview?: string | null;
|
|
5916
|
+
}): Promise<PageLayout | null>;
|
|
5891
5917
|
/**
|
|
5892
5918
|
* The store's design tokens, for a page other than the home page: the
|
|
5893
5919
|
* published ones, or a preview key's draft. Null when there are none to
|
|
@@ -7041,4 +7067,4 @@ declare class B2bService extends BaseService {
|
|
|
7041
7067
|
}
|
|
7042
7068
|
declare const b2bService: B2bService;
|
|
7043
7069
|
|
|
7044
|
-
export {
|
|
7070
|
+
export { LayoutService as $, type Address as A, type B2bPlaced as B, type Cart as C, CountryService as D, CouponService as E, type Credentials as F, type Credit as G, CurrencyService as H, type Customer as I, DealService as J, DemoRequestService as K, type EngineRequest as L, EnquiryService as M, type Envelope as N, type Faq as O, FaqService as P, FeedbackService as Q, type Fulfillment as R, GalleryService as S, type HomeLayout as T, type HomeLayoutSection as U, HomeService as V, type IdentityAddress as W, InitService as X, type Invitation as Y, type LayoutCollection as Z, type LayoutPage as _, AddressService as a, autocompleteService as a$, type Lead as a0, type ListMeta as a1, MeilisearchService as a2, type Member as a3, type Menu as a4, type MenuItem as a5, MenuService as a6, type MenuSummary as a7, type Money as a8, NewsletterService as a9, SearchService as aA, SettingService as aB, type ShippingRate as aC, StateService as aD, type StoreProfile as aE, StoreService as aF, type StorefrontCategory as aG, type StorefrontMenu as aH, type StorefrontOrder as aI, type StorefrontProduct as aJ, type ThemeSettings as aK, type ThemeSettingsResult as aL, UploadService as aM, UserService as aN, type Variant as aO, type VariantImage as aP, VariantService as aQ, VarniCustomDesignService as aR, VarniCustomProductService as aS, type Vendor as aT, VendorService as aU, WarrantyService as aV, type Wishlist as aW, type WishlistItem as aX, WishlistService as aY, addressService as aZ, authService as a_, type Offer as aa, type Order as ab, type OrderLine as ac, OrderService as ad, type PageLayout as ae, PageService as af, type PaymentIntent as ag, PaymentMethodService as ah, type Plugin as ai, PluginService as aj, PopularSearchService as ak, PopularityService as al, type Product as am, type ProductOption as an, ProductService as ao, ProfileService as ap, type Quote as aq, REDIRECT_GATEWAYS as ar, ReelsService as as, RegionService as at, type RejectedLine as au, type Review as av, type ReviewPage as aw, ReviewService as ax, type SearchDoc as ay, type SearchResult as az, type AppliedDiscount as b, toMajor as b$, b2bService as b0, bannerService as b1, blogService as b2, cartService as b3, categoryService as b4, chatService as b5, checkoutService as b6, collectionService as b7, contactService as b8, countryService as b9, pluginService as bA, pluginsService as bB, popularSearchService as bC, popularityService as bD, priceOf as bE, productImages as bF, productService as bG, profileService as bH, qs as bI, reelsService as bJ, regionService as bK, reviewService as bL, searchService as bM, setRequestHost as bN, settingService as bO, settingsService as bP, stateService as bQ, staticStore as bR, storeForHost as bS, storeService as bT, toCart as bU, toCartLine as bV, toCategory as bW, toCmsPage as bX, toCollection as bY, toEngineAddress as bZ, toIdentityAddress as b_, couponService as ba, currencyExponent as bb, currencyService as bc, dealService as bd, demoRequestService as be, emptyCart as bf, emptyPage as bg, enquiryService as bh, faqService as bi, feedbackService as bj, fromEngineAddress as bk, fromIdentityAddress as bl, fromSearchDoc as bm, galleryService as bn, homeService as bo, initService as bp, layoutService as bq, mediaUrl as br, meilisearchService as bs, menuService as bt, minorToMajor as bu, newsletterService as bv, orderService as bw, ownDomain as bx, pageService as by, paymentMethodService as bz, type Approval as c, toMinor as c0, toOrder as c1, toPage as c2, toProduct as c3, toRating as c4, toUser as c5, toVariant as c6, toVendor as c7, uploadService as c8, userService as c9, variantService as ca, varniCustomDesignService as cb, varniCustomProductService as cc, vendorService as cd, warrantyService as ce, wishlistService as cf, type AuthResponse as d, AuthService as e, AutocompleteService as f, type B2bRole as g, B2bService as h, BannerService as i, BaseService as j, BlogService as k, type CartLine as l, CartService as m, CatalogService as n, type Category as o, CategoryService as p, ChatService as q, type CheckoutOptions as r, type CheckoutResult as s, CheckoutService as t, type CmsPage as u, type Collection as v, CollectionService as w, type Company as x, type CompanyOrder as y, ContactService as z };
|
|
@@ -5861,6 +5861,14 @@ type HomeLayoutSection = {
|
|
|
5861
5861
|
products?: StorefrontProduct[];
|
|
5862
5862
|
collections?: LayoutCollection[];
|
|
5863
5863
|
};
|
|
5864
|
+
/**
|
|
5865
|
+
* A page the shop arranges: the home page, or the template every product or
|
|
5866
|
+
* every collection is drawn in (ext/layouts, D128). A template holds its
|
|
5867
|
+
* core once — `main-product` (the catalogue's pictures, price and buy box)
|
|
5868
|
+
* or `main-collection` (the collection's grid) — at the place the shop put
|
|
5869
|
+
* it, and the storefront draws its own core there.
|
|
5870
|
+
*/
|
|
5871
|
+
type LayoutPage = 'home' | 'product' | 'collection';
|
|
5864
5872
|
type HomeLayout = {
|
|
5865
5873
|
page: string;
|
|
5866
5874
|
theme: string;
|
|
@@ -5872,6 +5880,8 @@ type HomeLayout = {
|
|
|
5872
5880
|
themeSettings: ThemeSettings | null;
|
|
5873
5881
|
sections: HomeLayoutSection[];
|
|
5874
5882
|
};
|
|
5883
|
+
/** A composed page of any kind; a template's `themeSettings` is always null. */
|
|
5884
|
+
type PageLayout = HomeLayout;
|
|
5875
5885
|
/** The design tokens alone, for every page the storefront draws. */
|
|
5876
5886
|
type ThemeSettingsResult = {
|
|
5877
5887
|
revision?: number;
|
|
@@ -5888,6 +5898,22 @@ declare class LayoutService extends BaseService {
|
|
|
5888
5898
|
getHomeLayout({ preview }?: {
|
|
5889
5899
|
preview?: string | null;
|
|
5890
5900
|
}): Promise<HomeLayout | null>;
|
|
5901
|
+
/**
|
|
5902
|
+
* The template every product page is drawn in: the sections around the
|
|
5903
|
+
* product's core (`main-product`). Null when none is published, so the
|
|
5904
|
+
* product page draws exactly as it did before templates existed.
|
|
5905
|
+
*/
|
|
5906
|
+
getProductLayout({ preview }?: {
|
|
5907
|
+
preview?: string | null;
|
|
5908
|
+
}): Promise<PageLayout | null>;
|
|
5909
|
+
/** The template every collection page is drawn in, around its grid (`main-collection`). */
|
|
5910
|
+
getCollectionLayout({ preview }?: {
|
|
5911
|
+
preview?: string | null;
|
|
5912
|
+
}): Promise<PageLayout | null>;
|
|
5913
|
+
/** Any arranged page by its key; null for none, as the three above. */
|
|
5914
|
+
getPageLayout(page: LayoutPage, { preview }?: {
|
|
5915
|
+
preview?: string | null;
|
|
5916
|
+
}): Promise<PageLayout | null>;
|
|
5891
5917
|
/**
|
|
5892
5918
|
* The store's design tokens, for a page other than the home page: the
|
|
5893
5919
|
* published ones, or a preview key's draft. Null when there are none to
|
|
@@ -7041,4 +7067,4 @@ declare class B2bService extends BaseService {
|
|
|
7041
7067
|
}
|
|
7042
7068
|
declare const b2bService: B2bService;
|
|
7043
7069
|
|
|
7044
|
-
export {
|
|
7070
|
+
export { LayoutService as $, type Address as A, type B2bPlaced as B, type Cart as C, CountryService as D, CouponService as E, type Credentials as F, type Credit as G, CurrencyService as H, type Customer as I, DealService as J, DemoRequestService as K, type EngineRequest as L, EnquiryService as M, type Envelope as N, type Faq as O, FaqService as P, FeedbackService as Q, type Fulfillment as R, GalleryService as S, type HomeLayout as T, type HomeLayoutSection as U, HomeService as V, type IdentityAddress as W, InitService as X, type Invitation as Y, type LayoutCollection as Z, type LayoutPage as _, AddressService as a, autocompleteService as a$, type Lead as a0, type ListMeta as a1, MeilisearchService as a2, type Member as a3, type Menu as a4, type MenuItem as a5, MenuService as a6, type MenuSummary as a7, type Money as a8, NewsletterService as a9, SearchService as aA, SettingService as aB, type ShippingRate as aC, StateService as aD, type StoreProfile as aE, StoreService as aF, type StorefrontCategory as aG, type StorefrontMenu as aH, type StorefrontOrder as aI, type StorefrontProduct as aJ, type ThemeSettings as aK, type ThemeSettingsResult as aL, UploadService as aM, UserService as aN, type Variant as aO, type VariantImage as aP, VariantService as aQ, VarniCustomDesignService as aR, VarniCustomProductService as aS, type Vendor as aT, VendorService as aU, WarrantyService as aV, type Wishlist as aW, type WishlistItem as aX, WishlistService as aY, addressService as aZ, authService as a_, type Offer as aa, type Order as ab, type OrderLine as ac, OrderService as ad, type PageLayout as ae, PageService as af, type PaymentIntent as ag, PaymentMethodService as ah, type Plugin as ai, PluginService as aj, PopularSearchService as ak, PopularityService as al, type Product as am, type ProductOption as an, ProductService as ao, ProfileService as ap, type Quote as aq, REDIRECT_GATEWAYS as ar, ReelsService as as, RegionService as at, type RejectedLine as au, type Review as av, type ReviewPage as aw, ReviewService as ax, type SearchDoc as ay, type SearchResult as az, type AppliedDiscount as b, toMajor as b$, b2bService as b0, bannerService as b1, blogService as b2, cartService as b3, categoryService as b4, chatService as b5, checkoutService as b6, collectionService as b7, contactService as b8, countryService as b9, pluginService as bA, pluginsService as bB, popularSearchService as bC, popularityService as bD, priceOf as bE, productImages as bF, productService as bG, profileService as bH, qs as bI, reelsService as bJ, regionService as bK, reviewService as bL, searchService as bM, setRequestHost as bN, settingService as bO, settingsService as bP, stateService as bQ, staticStore as bR, storeForHost as bS, storeService as bT, toCart as bU, toCartLine as bV, toCategory as bW, toCmsPage as bX, toCollection as bY, toEngineAddress as bZ, toIdentityAddress as b_, couponService as ba, currencyExponent as bb, currencyService as bc, dealService as bd, demoRequestService as be, emptyCart as bf, emptyPage as bg, enquiryService as bh, faqService as bi, feedbackService as bj, fromEngineAddress as bk, fromIdentityAddress as bl, fromSearchDoc as bm, galleryService as bn, homeService as bo, initService as bp, layoutService as bq, mediaUrl as br, meilisearchService as bs, menuService as bt, minorToMajor as bu, newsletterService as bv, orderService as bw, ownDomain as bx, pageService as by, paymentMethodService as bz, type Approval as c, toMinor as c0, toOrder as c1, toPage as c2, toProduct as c3, toRating as c4, toUser as c5, toVariant as c6, toVendor as c7, uploadService as c8, userService as c9, variantService as ca, varniCustomDesignService as cb, varniCustomProductService as cc, vendorService as cd, warrantyService as ce, wishlistService as cf, type AuthResponse as d, AuthService as e, AutocompleteService as f, type B2bRole as g, B2bService as h, BannerService as i, BaseService as j, BlogService as k, type CartLine as l, CartService as m, CatalogService as n, type Category as o, CategoryService as p, ChatService as q, type CheckoutOptions as r, type CheckoutResult as s, CheckoutService as t, type CmsPage as u, type Collection as v, CollectionService as w, type Company as x, type CompanyOrder as y, ContactService as z };
|
package/dist/index.cjs
CHANGED
|
@@ -2761,9 +2761,25 @@ var faqService = new FaqService();
|
|
|
2761
2761
|
var MEDIA_KEYS = /* @__PURE__ */ new Set(["image", "mobile_image", "poster", "video_file"]);
|
|
2762
2762
|
var LayoutService = class extends BaseService {
|
|
2763
2763
|
async getHomeLayout({ preview } = {}) {
|
|
2764
|
+
return this.getPageLayout("home", { preview });
|
|
2765
|
+
}
|
|
2766
|
+
/**
|
|
2767
|
+
* The template every product page is drawn in: the sections around the
|
|
2768
|
+
* product's core (`main-product`). Null when none is published, so the
|
|
2769
|
+
* product page draws exactly as it did before templates existed.
|
|
2770
|
+
*/
|
|
2771
|
+
async getProductLayout({ preview } = {}) {
|
|
2772
|
+
return this.getPageLayout("product", { preview });
|
|
2773
|
+
}
|
|
2774
|
+
/** The template every collection page is drawn in, around its grid (`main-collection`). */
|
|
2775
|
+
async getCollectionLayout({ preview } = {}) {
|
|
2776
|
+
return this.getPageLayout("collection", { preview });
|
|
2777
|
+
}
|
|
2778
|
+
/** Any arranged page by its key; null for none, as the three above. */
|
|
2779
|
+
async getPageLayout(page, { preview } = {}) {
|
|
2764
2780
|
let layout;
|
|
2765
2781
|
try {
|
|
2766
|
-
layout = await this.data(
|
|
2782
|
+
layout = await this.data(`/x/layouts/${encodeURIComponent(page)}`, {
|
|
2767
2783
|
query: { preview: preview?.trim() || void 0 }
|
|
2768
2784
|
});
|
|
2769
2785
|
} catch (err) {
|