import{t as e}from"./api-DqXJkjY6.js";var{useListVonageProvidersQuery:t,useUpdateVonageProviderMutation:n,useTestVonageConnectionMutation:r,useListCallSessionsQuery:i,useGetCallSessionQuery:a,useGetVoiceTokenQuery:o,useLazyGetVoiceTokenQuery:s,useStartCallSessionMutation:c,useFinaliseCallSessionMutation:l}=e.injectEndpoints({endpoints:e=>({listVonageProviders:e.query({query:()=>`/telephony/vonage-provider/`,providesTags:[{type:`VonageProvider`,id:`SINGLETON`}]}),updateVonageProvider:e.mutation({query:({id:e,body:t})=>({url:`/telephony/vonage-provider/${e}/`,method:`PATCH`,body:t}),invalidatesTags:[{type:`VonageProvider`,id:`SINGLETON`}]}),testVonageConnection:e.mutation({query:()=>({url:`/telephony/test-connection/`,method:`POST`,body:{}}),invalidatesTags:[{type:`VonageProvider`,id:`SINGLETON`}]}),listCallSessions:e.query({query:e=>({url:`/telephony/calls/`,params:e||void 0}),providesTags:e=>e?[...e.results.map(({id:e})=>({type:`CallSession`,id:e})),{type:`CallSession`,id:`LIST`}]:[{type:`CallSession`,id:`LIST`}]}),getCallSession:e.query({query:e=>`/telephony/calls/${e}/`,providesTags:(e,t,n)=>[{type:`CallSession`,id:n}]}),getVoiceToken:e.query({query:()=>`/telephony/voice/token/`}),startCallSession:e.mutation({query:e=>({url:`/telephony/sessions/start/`,method:`POST`,body:e}),invalidatesTags:[{type:`CallSession`,id:`LIST`}]}),finaliseCallSession:e.mutation({query:({id:e,body:t})=>({url:`/telephony/sessions/${e}/finalise/`,method:`POST`,body:t}),invalidatesTags:(e,t,{id:n})=>[{type:`CallSession`,id:n},{type:`CallSession`,id:`LIST`},{type:`CollectionCase`,id:`LIST`},{type:`CollectionAttempt`,id:`LIST`}]})})});export{c as a,t as i,s as n,r as o,i as r,n as s,l as t};