@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.
@@ -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("/x/layouts/home", {
2766
+ layout = await this.data(`/x/layouts/${encodeURIComponent(page)}`, {
2751
2767
  query: { preview: preview?.trim() || void 0 }
2752
2768
  });
2753
2769
  } catch (err) {