@ecomiq/core 0.1.1 → 0.1.2

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/dist/index.cjs CHANGED
@@ -858,6 +858,11 @@ async function getCollections(api) {
858
858
  async function getCollectionBySlug(api, collectionSlug) {
859
859
  return api.get(`collections/${encodeURIComponent(collectionSlug)}`, CollectionSchema);
860
860
  }
861
+
862
+ // src/services/page.service.ts
863
+ async function getPageBySlug(api, pageSlug) {
864
+ return api.get(`pages/${encodeURIComponent(pageSlug)}`, CmsPageDetailsDtoSchema);
865
+ }
861
866
  var CartBuyerParamsSchema = zod.z.object({
862
867
  cartId: zod.z.string().uuid(),
863
868
  email: zod.z.string().email(),
@@ -1250,6 +1255,10 @@ function createClient(options) {
1250
1255
  const client = await apiClient();
1251
1256
  return getCollectionBySlug(client, collectionSlug);
1252
1257
  }
1258
+ async function getPageBySlug2(pageSlug) {
1259
+ const client = await apiClient();
1260
+ return getPageBySlug(client, pageSlug);
1261
+ }
1253
1262
  async function getProducts2(params = {}) {
1254
1263
  const client = await apiClient();
1255
1264
  return getProducts(client, params);
@@ -1348,6 +1357,7 @@ function createClient(options) {
1348
1357
  getStoreId,
1349
1358
  getCollections: getCollections2,
1350
1359
  getCollectionBySlug: getCollectionBySlug2,
1360
+ getPageBySlug: getPageBySlug2,
1351
1361
  clearCache,
1352
1362
  getProducts: getProducts2,
1353
1363
  getProductBySlug: getProductBySlug2,
@@ -1591,6 +1601,7 @@ exports.getCountries = getCountries;
1591
1601
  exports.getDepartments = getDepartments;
1592
1602
  exports.getDistricts = getDistricts;
1593
1603
  exports.getMenuItems = getMenuItems;
1604
+ exports.getPageBySlug = getPageBySlug;
1594
1605
  exports.getProductBySlug = getProductBySlug;
1595
1606
  exports.getProducts = getProducts;
1596
1607
  exports.getProvinces = getProvinces;