@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/dist/services/index.cjs
CHANGED
|
@@ -2745,9 +2745,25 @@ var faqService = new FaqService();
|
|
|
2745
2745
|
var MEDIA_KEYS = /* @__PURE__ */ new Set(["image", "mobile_image", "poster", "video_file"]);
|
|
2746
2746
|
var LayoutService = class extends BaseService {
|
|
2747
2747
|
async getHomeLayout({ preview } = {}) {
|
|
2748
|
+
return this.getPageLayout("home", { preview });
|
|
2749
|
+
}
|
|
2750
|
+
/**
|
|
2751
|
+
* The template every product page is drawn in: the sections around the
|
|
2752
|
+
* product's core (`main-product`). Null when none is published, so the
|
|
2753
|
+
* product page draws exactly as it did before templates existed.
|
|
2754
|
+
*/
|
|
2755
|
+
async getProductLayout({ preview } = {}) {
|
|
2756
|
+
return this.getPageLayout("product", { preview });
|
|
2757
|
+
}
|
|
2758
|
+
/** The template every collection page is drawn in, around its grid (`main-collection`). */
|
|
2759
|
+
async getCollectionLayout({ preview } = {}) {
|
|
2760
|
+
return this.getPageLayout("collection", { preview });
|
|
2761
|
+
}
|
|
2762
|
+
/** Any arranged page by its key; null for none, as the three above. */
|
|
2763
|
+
async getPageLayout(page, { preview } = {}) {
|
|
2748
2764
|
let layout;
|
|
2749
2765
|
try {
|
|
2750
|
-
layout = await this.data(
|
|
2766
|
+
layout = await this.data(`/x/layouts/${encodeURIComponent(page)}`, {
|
|
2751
2767
|
query: { preview: preview?.trim() || void 0 }
|
|
2752
2768
|
});
|
|
2753
2769
|
} catch (err) {
|