{"version":3,"sources":["../src/lib/api/index.ts"],"sourcesContent":["import { cache } from \"react\";\nimport {\n  getSite as _getSite,\n  getEvents as _getEvents,\n  getEvent as _getEvent,\n  getPages as _getPages,\n  getPage as _getPage,\n  getNews as _getNews,\n  getNewsArticle as _getNewsArticle,\n  getProfiles as _getProfiles,\n  getProfile as _getProfile,\n  getProfileEvents as _getProfileEvents,\n  getProfileProducts as _getProfileProducts,\n  getProducts as _getProducts,\n  getProduct as _getProduct,\n  searchSite as _searchSite,\n  type GetEventsData,\n  type GetEventData,\n  type GetPagesData,\n  type GetPageData,\n  type GetNewsData,\n  type GetNewsArticleData,\n  type GetProfilesData,\n  type GetProfileData,\n  type GetProfileEventsData,\n  type GetProfileProductsData,\n  type GetProductsData,\n  type GetProductData,\n  type SearchSiteData,\n} from \"@venuecms/sdk\";\n\n/**\n * Get the site configured via the siteKey (cached)\n * @category Sites\n */\nexport const getSite = cache(_getSite);\n\n/**\n * Get a list of events (cached)\n * @category Events\n */\nexport const getEvents = cache(\n  (params: GetEventsData[\"query\"] = {}) => _getEvents(params)\n);\n\n/**\n * Retrieve data for a single event (cached)\n * @category Events\n */\nexport const getEvent = cache(\n  (params: Omit<GetEventData[\"path\"], \"siteKey\">) => _getEvent(params)\n);\n\n/**\n * Get a list of all pages (cached)\n * @category Pages\n */\nexport const getPages = cache(\n  (params: GetPagesData[\"query\"] = {}) => _getPages(params)\n);\n\n/**\n * Get a single page using the slug (cached)\n * @category Pages\n */\nexport const getPage = cache(\n  (params: Omit<GetPageData[\"path\"], \"siteKey\">) => _getPage(params)\n);\n\n/**\n * Get a list of all news items (cached)\n * @category News\n */\nexport const getNews = cache(\n  (params: GetNewsData[\"query\"] = {}) => _getNews(params)\n);\n\n/**\n * Get a single news item using the slug (cached)\n * @category News\n */\nexport const getNewsArticle = cache(\n  (params: Omit<GetNewsArticleData[\"path\"], \"siteKey\">) =>\n    _getNewsArticle(params)\n);\n\n/**\n * Get a list of profiles (cached)\n * @category Profiles\n */\nexport const getProfiles = cache(\n  (params: GetProfilesData[\"query\"] = {}) => _getProfiles(params)\n);\n\n/**\n * Get a profile (cached)\n * @category Profiles\n */\nexport const getProfile = cache(\n  (params: Omit<GetProfileData[\"path\"], \"siteKey\">) => _getProfile(params)\n);\n\n/**\n * Get a listing of events for a profile (cached)\n * @category Profiles\n */\nexport const getProfileEvents = cache(\n  (\n    params: Omit<GetProfileEventsData[\"path\"], \"siteKey\"> &\n      GetProfileEventsData[\"query\"]\n  ) => _getProfileEvents(params)\n);\n\n/**\n * Get a listing of products for a profile (cached)\n * @category Profiles\n */\nexport const getProfileProducts = cache(\n  (\n    params: Omit<GetProfileProductsData[\"path\"], \"siteKey\"> &\n      GetProfileProductsData[\"query\"]\n  ) => _getProfileProducts(params)\n);\n\n/**\n * Get a listing of products (cached)\n * @category Products\n */\nexport const getProducts = cache(\n  (params: GetProductsData[\"query\"]) => _getProducts(params)\n);\n\n/**\n * Get a product (cached)\n * @category Products\n */\nexport const getProduct = cache(\n  (params: Omit<GetProductData[\"path\"], \"siteKey\">) => _getProduct(params)\n);\n\n/**\n * Search a site for all content types (cached)\n * @category Sites\n */\nexport const searchSite = cache(\n  (params: SearchSiteData[\"query\"]) => _searchSite(params)\n);\n"],"mappings":"AAAA,OAAS,SAAAA,MAAa,QACtB,OACE,WAAWC,EACX,aAAaC,EACb,YAAYC,EACZ,YAAYC,EACZ,WAAWC,EACX,WAAWC,EACX,kBAAkBC,EAClB,eAAeC,EACf,cAAcC,EACd,oBAAoBC,EACpB,sBAAsBC,EACtB,eAAeC,EACf,cAAcC,EACd,cAAcC,MAcT,gBAMA,IAAMC,EAAUf,EAAMC,CAAQ,EAMxBe,EAAYhB,EACvB,CAACiB,EAAiC,CAAC,IAAMf,EAAWe,CAAM,CAC5D,EAMaC,EAAWlB,EACrBiB,GAAkDd,EAAUc,CAAM,CACrE,EAMaE,EAAWnB,EACtB,CAACiB,EAAgC,CAAC,IAAMb,EAAUa,CAAM,CAC1D,EAMaG,EAAUpB,EACpBiB,GAAiDZ,EAASY,CAAM,CACnE,EAMaI,EAAUrB,EACrB,CAACiB,EAA+B,CAAC,IAAMX,EAASW,CAAM,CACxD,EAMaK,EAAiBtB,EAC3BiB,GACCV,EAAgBU,CAAM,CAC1B,EAMaM,EAAcvB,EACzB,CAACiB,EAAmC,CAAC,IAAMT,EAAaS,CAAM,CAChE,EAMaO,EAAaxB,EACvBiB,GAAoDR,EAAYQ,CAAM,CACzE,EAMaQ,EAAmBzB,EAE5BiB,GAEGP,EAAkBO,CAAM,CAC/B,EAMaS,EAAqB1B,EAE9BiB,GAEGN,EAAoBM,CAAM,CACjC,EAMaU,EAAc3B,EACxBiB,GAAqCL,EAAaK,CAAM,CAC3D,EAMaW,EAAa5B,EACvBiB,GAAoDJ,EAAYI,CAAM,CACzE,EAMaY,EAAa7B,EACvBiB,GAAoCH,EAAYG,CAAM,CACzD","names":["cache","_getSite","_getEvents","_getEvent","_getPages","_getPage","_getNews","_getNewsArticle","_getProfiles","_getProfile","_getProfileEvents","_getProfileProducts","_getProducts","_getProduct","_searchSite","getSite","getEvents","params","getEvent","getPages","getPage","getNews","getNewsArticle","getProfiles","getProfile","getProfileEvents","getProfileProducts","getProducts","getProduct","searchSite"]}