{"version":3,"file":"homepage.mjs","sources":["../../../admin/src/services/homepage.ts"],"sourcesContent":["import * as Homepage from '../../../shared/contracts/homepage';\n\nimport { contentManagerApi } from './api';\n\nconst homepageService = contentManagerApi\n .enhanceEndpoints({\n addTagTypes: ['RecentDocumentList'],\n })\n .injectEndpoints({\n /**\n * TODO: Remove overrideExisting when we remove the future flag\n * and delete the old homepage service in the admin\n */\n overrideExisting: true,\n endpoints: (builder) => ({\n getRecentDocuments: builder.query<\n Homepage.GetRecentDocuments.Response['data'],\n Homepage.GetRecentDocuments.Request['query']\n >({\n query: (params) => `/content-manager/homepage/recent-documents?action=${params.action}`,\n transformResponse: (response: Homepage.GetRecentDocuments.Response) => response.data,\n providesTags: (res, _err, { action }) => [\n { type: 'RecentDocumentList' as const, id: action },\n ],\n }),\n }),\n });\n\nconst { useGetRecentDocumentsQuery } = homepageService;\n\nexport { useGetRecentDocumentsQuery };\n"],"names":["homepageService","contentManagerApi","enhanceEndpoints","addTagTypes","injectEndpoints","overrideExisting","endpoints","builder","getRecentDocuments","query","params","action","transformResponse","response","data","providesTags","res","_err","type","id","useGetRecentDocumentsQuery"],"mappings":";;AAIA,MAAMA,eAAAA,GAAkBC,iBACrBC,CAAAA,gBAAgB,CAAC;IAChBC,WAAa,EAAA;AAAC,QAAA;AAAqB;AACrC,CAAA,CAAA,CACCC,eAAe,CAAC;AACf;;;AAGC,QACDC,gBAAkB,EAAA,IAAA;IAClBC,SAAW,EAAA,CAACC,WAAa;YACvBC,kBAAoBD,EAAAA,OAAAA,CAAQE,KAAK,CAG/B;gBACAA,KAAO,EAAA,CAACC,SAAW,CAAC,kDAAkD,EAAEA,MAAOC,CAAAA,MAAM,CAAC,CAAC;gBACvFC,iBAAmB,EAAA,CAACC,QAAmDA,GAAAA,QAAAA,CAASC,IAAI;AACpFC,gBAAAA,YAAAA,EAAc,CAACC,GAAKC,EAAAA,IAAAA,EAAM,EAAEN,MAAM,EAAE,GAAK;AACvC,wBAAA;4BAAEO,IAAM,EAAA,oBAAA;4BAA+BC,EAAIR,EAAAA;AAAO;AACnD;AACH,aAAA;SACF;AACF,CAAA,CAAA;AAEI,MAAA,EAAES,0BAA0B,EAAE,GAAGpB;;;;"}