@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/client.cjs +10 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +4 -2
- package/dist/client.d.ts +4 -2
- package/dist/client.js +10 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +328 -324
- package/dist/index.d.ts +328 -324
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/models/collections.d.cts +4 -4
- package/dist/models/collections.d.ts +4 -4
- package/dist/models/geo.d.cts +14 -14
- package/dist/models/geo.d.ts +14 -14
- package/dist/models/products.d.cts +130 -130
- package/dist/models/products.d.ts +130 -130
- package/dist/models/search.d.cts +4 -4
- package/dist/models/search.d.ts +4 -4
- package/dist/models/settings.d.cts +514 -514
- package/dist/models/settings.d.ts +514 -514
- package/dist/models/storefront-cart.d.cts +80 -80
- package/dist/models/storefront-cart.d.ts +80 -80
- package/dist/models/storefront-checkout.d.cts +400 -400
- package/dist/models/storefront-checkout.d.ts +400 -400
- package/dist/models/storefront-reviews.d.cts +8 -8
- package/dist/models/storefront-reviews.d.ts +8 -8
- package/package.json +7 -8
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;
|