@heseya/advanced-ui-modules-sdk
Advanced tools
Comparing version 1.0.0-dev.39 to 1.0.0-dev.40
@@ -1,2 +0,2 @@ | ||
// Advanced UI Modules SDK v1.0.0-dev.39 Copyright (c) 2023 Heseya and contributors | ||
// Advanced UI Modules SDK v1.0.0-dev.40 Copyright (c) 2023 Heseya and contributors | ||
import { stringifyQueryParams } from '@heseya/store-core'; | ||
@@ -168,2 +168,13 @@ import { __awaiter } from 'tslib'; | ||
/** | ||
* Direct proxy from the Heseya API | ||
*/ | ||
const createConfigApiService = (axios) => { | ||
return { | ||
get: () => { | ||
return axios.get(`/config`); | ||
}, | ||
}; | ||
}; | ||
/** | ||
* Factory to create Advanced UI Modules API service | ||
@@ -190,2 +201,3 @@ * | ||
Pages: createPagesApiService(axios), | ||
Config: createConfigApiService(axios), | ||
}; | ||
@@ -192,0 +204,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@heseya/store-core"),require("tslib")):"function"==typeof define&&define.amd?define(["exports","@heseya/store-core","tslib"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["advanced-ui-modules-sdk"]={},e.storeCore,e.tslib)}(this,(function(e,t,a){"use strict";var r,i,o,n,d,s;e.ModuleType=void 0,(r=e.ModuleType||(e.ModuleType={})).Banner="banner",r.TextAndPhoto="textAndPhoto",r.OneToOne="oneToOne",r.Images="images",r.TextAndIcons="textAndIcons",r.Links="links",r.ProductSlider="productSlider",r.Blog="blog",r.ProductsShowcase="productsShowcase",r.BrandsSlider="brandsSlider",r.NotificationBar="notificationBar",r.Specification="specification",r.ProductHeader="productHeader",r.ProductTextWithIcons="productTextWithIcons",r.ProductVariantSelection="productVariantSelection",r.ProductTextWithImage="productTextWithImage",r.ProductTopImageBanner="productTopImageBanner",r.ProductDetails="productDetails",r.ProductGrid="productGrid",r.PackageContents="packageContents",r.Tabs="tabs",r.CategorySlider="categorySlider",r.IframeLink="iframeLink",r.Contact="contact",r.Timeline="timeline",r.BranchFinder="branchFinder",r.ReviewsSlider="reviewsSlider",r.SmallBanner="smallBanner",r.JobOffers="jobOffers",r.Text="text",r.Faq="faq",r.CategoriesGroups="categoriesGroups",r.Search="search",e.BlogTypes=void 0,(i=e.BlogTypes||(e.BlogTypes={})).Slider="slider",i.Grid="grid",e.ArticleVariant=void 0,(o=e.ArticleVariant||(e.ArticleVariant={})).INSIDE="inside",o.OUTSIDE="outside",e.SectionDirection=void 0,(n=e.SectionDirection||(e.SectionDirection={})).ROW="row",n.COLUMN="column",e.ImagesMasonryTypes=void 0,(d=e.ImagesMasonryTypes||(e.ImagesMasonryTypes={})).equal="equal",d.oneToTwo="oneToTwo",d.oneToThree="oneToThree",d.simpleMasonry="simpleMasonry",d.masonry="masonry",e.CategorySlideVariant=void 0,(s=e.CategorySlideVariant||(e.CategorySlideVariant={})).WIDE="wide",s.NARROW="narrow";const c=e=>({get:a=>{const r=t.stringifyQueryParams(a||{});return e.get(`/languages?${r}`)}}),u=e=>({create:t=>a.__awaiter(void 0,void 0,void 0,(function*(){const r=yield a.__awaiter(void 0,void 0,void 0,(function*(){return"undefined"==typeof window?new(yield require("form-data")):new FormData}));r.append("file",t.file,"media"),t.alt&&r.append("alt",t.alt),t.slug&&r.append("slug",t.slug),t.metadata&&Object.entries(t.metadata).forEach((([e,t])=>r.append(`metadata.${e}`,t))),t.metadata_private&&Object.entries(t.metadata_private).forEach((([e,t])=>r.append(`metadata_private.${e}`,t)));const{data:i}=yield e.post("/media",r);return i.data})),update:(t,r)=>a.__awaiter(void 0,void 0,void 0,(function*(){return(yield e.post(`/media/id:${t}`,r)).data}))}),l=e=>({get:a=>{const r=t.stringifyQueryParams(a||{});return e.get(`/pages?${r}`)},getOneBySlug:(a,r)=>{const i=t.stringifyQueryParams(r||{});return e.get(`/pages/${a}?${i}`)}}),p=e=>({get:(t,r)=>a.__awaiter(void 0,void 0,void 0,(function*(){const{data:a}=yield e.get(`/modules/${t}/${r}`);return a})),update:(t,r,i)=>a.__awaiter(void 0,void 0,void 0,(function*(){const{data:a}=yield e.patch(`/modules/${t}/${r}`,i);return a}))}),g=e=>({get:a=>{const r=t.stringifyQueryParams(a||{});return e.get(`/products?${r}`)},getOneBySlug:(a,r)=>{const i=t.stringifyQueryParams(r||{});return e.get(`/products/${a}?${i}`)}});e.createAdvancedUiModulesApiService=e=>{if(!e)throw new Error("Axios instance is required, but it was not provided");return{Modules:p(e),Media:u(e),Languages:c(e),Products:g(e),Pages:l(e)}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@heseya/store-core"),require("tslib")):"function"==typeof define&&define.amd?define(["exports","@heseya/store-core","tslib"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["advanced-ui-modules-sdk"]={},e.storeCore,e.tslib)}(this,(function(e,t,a){"use strict";var r,i,o,n,d,s;e.ModuleType=void 0,(r=e.ModuleType||(e.ModuleType={})).Banner="banner",r.TextAndPhoto="textAndPhoto",r.OneToOne="oneToOne",r.Images="images",r.TextAndIcons="textAndIcons",r.Links="links",r.ProductSlider="productSlider",r.Blog="blog",r.ProductsShowcase="productsShowcase",r.BrandsSlider="brandsSlider",r.NotificationBar="notificationBar",r.Specification="specification",r.ProductHeader="productHeader",r.ProductTextWithIcons="productTextWithIcons",r.ProductVariantSelection="productVariantSelection",r.ProductTextWithImage="productTextWithImage",r.ProductTopImageBanner="productTopImageBanner",r.ProductDetails="productDetails",r.ProductGrid="productGrid",r.PackageContents="packageContents",r.Tabs="tabs",r.CategorySlider="categorySlider",r.IframeLink="iframeLink",r.Contact="contact",r.Timeline="timeline",r.BranchFinder="branchFinder",r.ReviewsSlider="reviewsSlider",r.SmallBanner="smallBanner",r.JobOffers="jobOffers",r.Text="text",r.Faq="faq",r.CategoriesGroups="categoriesGroups",r.Search="search",e.BlogTypes=void 0,(i=e.BlogTypes||(e.BlogTypes={})).Slider="slider",i.Grid="grid",e.ArticleVariant=void 0,(o=e.ArticleVariant||(e.ArticleVariant={})).INSIDE="inside",o.OUTSIDE="outside",e.SectionDirection=void 0,(n=e.SectionDirection||(e.SectionDirection={})).ROW="row",n.COLUMN="column",e.ImagesMasonryTypes=void 0,(d=e.ImagesMasonryTypes||(e.ImagesMasonryTypes={})).equal="equal",d.oneToTwo="oneToTwo",d.oneToThree="oneToThree",d.simpleMasonry="simpleMasonry",d.masonry="masonry",e.CategorySlideVariant=void 0,(s=e.CategorySlideVariant||(e.CategorySlideVariant={})).WIDE="wide",s.NARROW="narrow";const c=e=>({get:a=>{const r=t.stringifyQueryParams(a||{});return e.get(`/languages?${r}`)}}),u=e=>({create:t=>a.__awaiter(void 0,void 0,void 0,(function*(){const r=yield a.__awaiter(void 0,void 0,void 0,(function*(){return"undefined"==typeof window?new(yield require("form-data")):new FormData}));r.append("file",t.file,"media"),t.alt&&r.append("alt",t.alt),t.slug&&r.append("slug",t.slug),t.metadata&&Object.entries(t.metadata).forEach((([e,t])=>r.append(`metadata.${e}`,t))),t.metadata_private&&Object.entries(t.metadata_private).forEach((([e,t])=>r.append(`metadata_private.${e}`,t)));const{data:i}=yield e.post("/media",r);return i.data})),update:(t,r)=>a.__awaiter(void 0,void 0,void 0,(function*(){return(yield e.post(`/media/id:${t}`,r)).data}))}),l=e=>({get:a=>{const r=t.stringifyQueryParams(a||{});return e.get(`/pages?${r}`)},getOneBySlug:(a,r)=>{const i=t.stringifyQueryParams(r||{});return e.get(`/pages/${a}?${i}`)}}),p=e=>({get:(t,r)=>a.__awaiter(void 0,void 0,void 0,(function*(){const{data:a}=yield e.get(`/modules/${t}/${r}`);return a})),update:(t,r,i)=>a.__awaiter(void 0,void 0,void 0,(function*(){const{data:a}=yield e.patch(`/modules/${t}/${r}`,i);return a}))}),g=e=>({get:a=>{const r=t.stringifyQueryParams(a||{});return e.get(`/products?${r}`)},getOneBySlug:(a,r)=>{const i=t.stringifyQueryParams(r||{});return e.get(`/products/${a}?${i}`)}}),y=e=>({get:()=>e.get("/config")});e.createAdvancedUiModulesApiService=e=>{if(!e)throw new Error("Axios instance is required, but it was not provided");return{Modules:p(e),Media:u(e),Languages:c(e),Products:g(e),Pages:l(e),Config:y(e)}},Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -1,2 +0,2 @@ | ||
// Advanced UI Modules SDK v1.0.0-dev.39 Copyright (c) 2023 Heseya and contributors | ||
// Advanced UI Modules SDK v1.0.0-dev.40 Copyright (c) 2023 Heseya and contributors | ||
(function (global, factory) { | ||
@@ -171,2 +171,13 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@heseya/store-core'), require('tslib')) : | ||
/** | ||
* Direct proxy from the Heseya API | ||
*/ | ||
const createConfigApiService = (axios) => { | ||
return { | ||
get: () => { | ||
return axios.get(`/config`); | ||
}, | ||
}; | ||
}; | ||
/** | ||
* Factory to create Advanced UI Modules API service | ||
@@ -193,2 +204,3 @@ * | ||
Pages: createPagesApiService(axios), | ||
Config: createConfigApiService(axios), | ||
}; | ||
@@ -195,0 +207,0 @@ }; |
@@ -42,3 +42,6 @@ import { AxiosInstance } from 'axios'; | ||
}; | ||
Config: { | ||
get: () => Promise<import("axios").AxiosResponse<import("@heseya/store-core").AppConfigField[], any>>; | ||
}; | ||
}; | ||
export type AdvancedUiModulesApiService = ReturnType<typeof createAdvancedUiModulesApiService>; |
{ | ||
"name": "@heseya/advanced-ui-modules-sdk", | ||
"version": "1.0.0-dev.39", | ||
"version": "1.0.0-dev.40", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Heseya" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
105019
60
1401