eventhr-http-client 2.1.2 → 2.1.3

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/lib/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("axios"),s=require("@tanstack/react-query"),d=x.create({baseURL:"",headers:{"Content-Type":"application/json"}}),K=t=>{d.defaults.baseURL=t},b=t=>{Object.assign(d.defaults.headers.common,t)},O=t=>{delete d.defaults.headers.common[t]},B=(t,e)=>d.interceptors.request.use(t,e),D=t=>{d.interceptors.request.eject(t)};class r{constructor(){this.client=d}list(...e){throw new Error(`list() not implemented on ${this.constructor.name}`)}get(...e){throw new Error(`get() not implemented on ${this.constructor.name}`)}create(...e){throw new Error(`create() not implemented on ${this.constructor.name}`)}update(...e){throw new Error(`update() not implemented on ${this.constructor.name}`)}remove(...e){throw new Error(`remove() not implemented on ${this.constructor.name}`)}}class H extends r{constructor(){super(...arguments),this.endpoint="api/v1/events"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}create(e){return this.client.post(this.endpoint,e)}update(e,n){return this.client.put(`${this.endpoint}/${e}`,n)}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}}const _=new H,y={v1:_};class z extends r{constructor(){super(...arguments),this.endpoint="api/v1/authentication/user"}login(e){return this.client.post(this.endpoint,e)}social(e){return this.client.post(`${this.endpoint}/social`,e)}refresh(e){return this.client.post(`${this.endpoint}/refresh`,e)}}const T=new z,C={v1:T};class L extends r{constructor(){super(...arguments),this.endpoint="api/v1/categories"}getAll(e){return this.client.get(this.endpoint,{params:e})}create(e){return this.client.post(this.endpoint,e)}update(e,n){return this.client.put(`${this.endpoint}/${e}`,n)}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}}const j=new L,v={v1:j};class V extends r{constructor(){super(...arguments),this.endpoint="api/v1/collections"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}create(e){return this.client.post(this.endpoint,e)}update(e,n){return this.client.put(`${this.endpoint}/${e}`,n)}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}removeEvent(e){return this.client.delete(`${this.endpoint}/events/${e}`)}}const Y=new V,a={v1:Y};class R extends r{constructor(){super(...arguments),this.endpoint="api/v1/users"}getAll(e){return this.client.get(this.endpoint,{params:e})}getProfile(){return this.client.get(`${this.endpoint}/profile`)}create(e){return this.client.post(this.endpoint,e)}createOrganizer(e){return this.client.post(`${this.endpoint}/organizer`,e)}createSubOrganizer(e){return this.client.post(`${this.endpoint}/sub-organizer`,e)}verify(e){return this.client.patch(`${this.endpoint}/${e}/verify`)}edit(e,n){return this.client.put(`${this.endpoint}/${e}`,n)}}const k=new R,u={v1:k};class N extends r{constructor(){super(...arguments),this.endpoint="api/v1/files"}upload(e){const n=new FormData;return n.append("file",e),this.client.post(this.endpoint,n,{headers:{"Content-Type":"multipart/form-data"}})}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}}const W=new N,E={v1:W};class J extends r{constructor(){super(...arguments),this.endpoint="api/v1/onboardings"}getByUser(){return this.client.get(this.endpoint)}create(e){return this.client.post(this.endpoint,e)}update(e){return this.client.put(this.endpoint,e)}}const X=new J,m={v1:X};class Z extends r{constructor(){super(...arguments),this.endpoint="api/v1/event-attendances"}getAll(e){return this.client.get(this.endpoint,{params:e})}create(e){return this.client.post(this.endpoint,e)}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}}const ee=new Z,w={v1:ee};class te extends r{constructor(){super(...arguments),this.endpoint="api/v1/forgot-password"}create(e){return this.client.post(this.endpoint,e)}changePassword(e,n){return this.client.patch(`${this.endpoint}/${e}/change`,n)}}const ne=new te,q={v1:ne};class se extends r{constructor(){super(...arguments),this.endpoint="api/v1/countries"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}}const ie=new se,f={v1:ie};class oe extends r{constructor(){super(...arguments),this.endpoint="api/v1/counties"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}}const re=new oe,A={v1:re};class ae extends r{constructor(){super(...arguments),this.endpoint="api/v1/cities"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}}const ue=new ae,G={v1:ue};class S{constructor(){this.Auth=C,this.Events=y,this.Categories=v,this.Collections=a,this.Users=u,this.Files=E,this.Onboardings=m,this.EventAttendances=w,this.ForgotPassword=q,this.Countries=f,this.Counties=A,this.Cities=G}configure({baseUrl:e,headers:n}){e!==void 0&&K(e),n!==void 0&&b(n)}removeHeader(e){O(e)}addInterceptor(e,n){return B(e,n)}removeInterceptor(e){D(e)}}const ce=new S,i={events:{all:["events"],list:t=>[...i.events.all,"list",t],detail:t=>[...i.events.all,"detail",t]},categories:{all:["categories"],list:t=>[...i.categories.all,"list",t]},collections:{all:["collections"],list:t=>[...i.collections.all,"list",t],detail:t=>[...i.collections.all,"detail",t]},users:{all:["users"],list:t=>[...i.users.all,"list",t],profile:()=>[...i.users.all,"profile"]},files:{all:["files"]},onboardings:{all:["onboardings"],detail:()=>[...i.onboardings.all,"detail"]},eventAttendances:{all:["event-attendances"],list:t=>[...i.eventAttendances.all,"list",t]},countries:{all:["countries"],list:t=>[...i.countries.all,"list",t],detail:t=>[...i.countries.all,"detail",t]},counties:{all:["counties"],list:t=>[...i.counties.all,"list",t],detail:t=>[...i.counties.all,"detail",t]},cities:{all:["cities"],list:t=>[...i.cities.all,"list",t],detail:t=>[...i.cities.all,"detail",t]}},le=(t,e)=>s.useQuery({queryKey:i.events.list(t),queryFn:async()=>(await y.v1.getAll(t)).data,...e}),de=(t,e)=>s.useQuery({queryKey:i.events.detail(t),queryFn:async()=>(await y.v1.getById(t)).data,...e}),ye=t=>s.useMutation({mutationFn:async e=>{await y.v1.create(e)},...t}),pe=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await y.v1.update(e,n)},...t}),ve=t=>s.useMutation({mutationFn:async({id:e})=>{await y.v1.remove(e)},...t}),h=new s.QueryClient({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:0},mutations:{retry:0}}}),he=()=>h.invalidateQueries({queryKey:i.events.all}),ge=t=>s.useMutation({mutationFn:async e=>(await C.v1.login(e)).data,...t}),Ce=t=>s.useMutation({mutationFn:async e=>(await C.v1.social(e)).data,...t}),me=t=>s.useMutation({mutationFn:async e=>(await C.v1.refresh(e)).data,...t}),we=(t,e)=>s.useQuery({queryKey:i.categories.list(t),queryFn:async()=>(await v.v1.getAll(t)).data,...e}),Me=t=>s.useMutation({mutationFn:async e=>{await v.v1.create(e)},...t}),Qe=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await v.v1.update(e,n)},...t}),Fe=t=>s.useMutation({mutationFn:async({id:e})=>{await v.v1.remove(e)},...t}),$e=()=>h.invalidateQueries({queryKey:i.categories.all}),Ee=(t,e)=>s.useQuery({queryKey:i.collections.list(t),queryFn:async()=>(await a.v1.getAll(t)).data,...e}),qe=(t,e)=>s.useQuery({queryKey:i.collections.detail(t),queryFn:async()=>(await a.v1.getById(t)).data,...e}),fe=t=>s.useMutation({mutationFn:async e=>{await a.v1.create(e)},...t}),Ae=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await a.v1.update(e,n)},...t}),Ge=t=>s.useMutation({mutationFn:async({id:e})=>{await a.v1.remove(e)},...t}),Ue=t=>s.useMutation({mutationFn:async({eventId:e})=>{await a.v1.removeEvent(e)},...t}),Ie=t=>{const e=s.useQueryClient(),{onMutate:n,onError:U,onSettled:I,...P}=t??{};return s.useMutation({mutationFn:async({id:c,data:l})=>{await a.v1.update(c,l)},onMutate:async(c,l)=>{const{eventId:o}=c,p=[...i.events.all,"list"];await e.cancelQueries({queryKey:i.events.all});const g=e.getQueriesData({queryKey:p});e.setQueriesData({queryKey:p},F=>F&&{...F,content:F.content.map($=>$.id===o?{...$,isSaved:!$.isSaved}:$)});const M=i.events.detail(o),Q=e.getQueryData(M);return Q&&e.setQueryData(M,{...Q,isSaved:!Q.isSaved}),await(n==null?void 0:n(c,l)),{previousLists:g,previousDetail:Q}},onError:(c,l,o,p)=>{o==null||o.previousLists.forEach(([g,M])=>{e.setQueryData(g,M)}),o!=null&&o.previousDetail&&e.setQueryData(i.events.detail(l.eventId),o.previousDetail),U==null||U(c,l,o,p)},onSettled:(c,l,o,p,g)=>{e.invalidateQueries({queryKey:i.collections.all}),I==null||I(c,l,o,p,g)},...P})},Ke=()=>h.invalidateQueries({queryKey:i.collections.all}),be=(t,e)=>s.useQuery({queryKey:i.users.list(t),queryFn:async()=>(await u.v1.getAll(t)).data,...e}),Oe=t=>s.useQuery({queryKey:i.users.profile(),queryFn:async()=>(await u.v1.getProfile()).data,...t}),Be=t=>s.useMutation({mutationFn:async e=>{await u.v1.create(e)},...t}),De=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await u.v1.edit(e,n)},...t}),Se=t=>s.useMutation({mutationFn:async e=>{await u.v1.createOrganizer(e)},...t}),Pe=t=>s.useMutation({mutationFn:async e=>{await u.v1.createSubOrganizer(e)},...t}),xe=t=>s.useMutation({mutationFn:async({userId:e})=>{await u.v1.verify(e)},...t}),He=t=>s.useMutation({mutationFn:async e=>(await E.v1.upload(e)).data,...t}),_e=t=>s.useMutation({mutationFn:async({id:e})=>{await E.v1.remove(e)},...t}),ze=t=>s.useQuery({queryKey:i.onboardings.detail(),queryFn:async()=>(await m.v1.getByUser()).data,...t}),Te=t=>s.useMutation({mutationFn:async e=>(await m.v1.create(e)).data,...t}),Le=t=>s.useMutation({mutationFn:async e=>(await m.v1.update(e)).data,...t}),je=()=>h.invalidateQueries({queryKey:i.onboardings.all}),Ve=(t,e)=>s.useQuery({queryKey:i.eventAttendances.list(t),queryFn:async()=>(await w.v1.getAll(t)).data,...e}),Ye=t=>s.useMutation({mutationFn:async e=>{await w.v1.create(e)},...t}),Re=t=>s.useMutation({mutationFn:async({id:e})=>{await w.v1.remove(e)},...t}),ke=()=>h.invalidateQueries({queryKey:i.eventAttendances.all}),Ne=t=>s.useMutation({mutationFn:async e=>{await q.v1.create(e)},...t}),We=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await q.v1.changePassword(e,n)},...t}),Je=(t,e)=>s.useQuery({queryKey:i.countries.list(t),queryFn:async()=>(await f.v1.getAll(t)).data,...e}),Xe=(t,e)=>s.useQuery({queryKey:i.countries.detail(t),queryFn:async()=>(await f.v1.getById(t)).data,...e}),Ze=(t,e)=>s.useQuery({queryKey:i.counties.list(t),queryFn:async()=>(await A.v1.getAll(t)).data,...e}),et=(t,e)=>s.useQuery({queryKey:i.counties.detail(t),queryFn:async()=>(await A.v1.getById(t)).data,...e}),tt=(t,e)=>s.useQuery({queryKey:i.cities.list(t),queryFn:async()=>(await G.v1.getAll(t)).data,...e}),nt=(t,e)=>s.useQuery({queryKey:i.cities.detail(t),queryFn:async()=>(await G.v1.getById(t)).data,...e});exports.Auth=C;exports.Categories=v;exports.Cities=G;exports.Collections=a;exports.Counties=A;exports.Countries=f;exports.EVENTHR_QUERY_KEYS=i;exports.EventAttendances=w;exports.EventhrHttpClient=S;exports.Events=y;exports.Files=E;exports.ForgotPassword=q;exports.HttpClient=r;exports.Onboardings=m;exports.Users=u;exports.addRequestInterceptor=B;exports.default=ce;exports.instance=d;exports.invalidateCategoriesCache=$e;exports.invalidateCollectionsCache=Ke;exports.invalidateEventAttendancesCache=ke;exports.invalidateEventsCache=he;exports.invalidateOnboardingsCache=je;exports.queryClient=h;exports.removeHeader=O;exports.removeRequestInterceptor=D;exports.setBaseUrl=K;exports.setHeaders=b;exports.useChangePasswordMutation=We;exports.useCreateCategoryMutation=Me;exports.useCreateCollectionMutation=fe;exports.useCreateEventAttendanceMutation=Ye;exports.useCreateEventMutation=ye;exports.useCreateForgotPasswordMutation=Ne;exports.useCreateOnboardingMutation=Te;exports.useCreateOrganizerMutation=Se;exports.useCreateSubOrganizerMutation=Pe;exports.useCreateUserMutation=Be;exports.useDeleteCategoryMutation=Fe;exports.useDeleteCollectionMutation=Ge;exports.useDeleteEventAttendanceMutation=Re;exports.useDeleteEventMutation=ve;exports.useDeleteFileMutation=_e;exports.useEditUserMutation=De;exports.useGetCategoriesQuery=we;exports.useGetCitiesQuery=tt;exports.useGetCityByIdQuery=nt;exports.useGetCollectionByIdQuery=qe;exports.useGetCollectionsQuery=Ee;exports.useGetCountiesQuery=Ze;exports.useGetCountriesQuery=Je;exports.useGetCountryByIdQuery=Xe;exports.useGetCountyByIdQuery=et;exports.useGetEventAttendancesQuery=Ve;exports.useGetEventByIdQuery=de;exports.useGetEventsQuery=le;exports.useGetOnboardingQuery=ze;exports.useGetProfileQuery=Oe;exports.useGetUsersQuery=be;exports.useLoginMutation=ge;exports.useRefreshTokenMutation=me;exports.useRemoveEventFromCollectionsMutation=Ue;exports.useSaveEventMutation=Ie;exports.useSocialAuthMutation=Ce;exports.useUpdateCategoryMutation=Qe;exports.useUpdateCollectionMutation=Ae;exports.useUpdateEventMutation=pe;exports.useUpdateOnboardingMutation=Le;exports.useUploadFileMutation=He;exports.useVerifyUserMutation=xe;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const H=require("axios"),s=require("@tanstack/react-query"),y=H.create({baseURL:"",headers:{"Content-Type":"application/json"}}),K=t=>{y.defaults.baseURL=t},B=t=>{Object.assign(y.defaults.headers.common,t)},S=t=>{delete y.defaults.headers.common[t]},D=(t,e)=>y.interceptors.request.use(t,e),O=t=>{y.interceptors.request.eject(t)};class a{constructor(){this.client=y}list(...e){throw new Error(`list() not implemented on ${this.constructor.name}`)}get(...e){throw new Error(`get() not implemented on ${this.constructor.name}`)}create(...e){throw new Error(`create() not implemented on ${this.constructor.name}`)}update(...e){throw new Error(`update() not implemented on ${this.constructor.name}`)}remove(...e){throw new Error(`remove() not implemented on ${this.constructor.name}`)}}class _ extends a{constructor(){super(...arguments),this.endpoint="api/v1/events"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}create(e){return this.client.post(this.endpoint,e)}update(e,n){return this.client.put(`${this.endpoint}/${e}`,n)}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}}const z=new _,p={v1:z};class T extends a{constructor(){super(...arguments),this.endpoint="api/v1/authentication/user"}login(e){return this.client.post(this.endpoint,e)}social(e){return this.client.post(`${this.endpoint}/social`,e)}refresh(e){return this.client.post(`${this.endpoint}/refresh`,e)}}const L=new T,C={v1:L};class R extends a{constructor(){super(...arguments),this.endpoint="api/v1/categories"}getAll(e){return this.client.get(this.endpoint,{params:e})}create(e){return this.client.post(this.endpoint,e)}update(e,n){return this.client.put(`${this.endpoint}/${e}`,n)}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}}const j=new R,v={v1:j};class k extends a{constructor(){super(...arguments),this.endpoint="api/v1/collections"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}create(e){return this.client.post(this.endpoint,e)}update(e,n){return this.client.put(`${this.endpoint}/${e}`,n)}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}removeEvent(e){return this.client.delete(`${this.endpoint}/events/${e}`)}}const V=new k,l={v1:V};class Y extends a{constructor(){super(...arguments),this.endpoint="api/v1/users"}getAll(e){return this.client.get(this.endpoint,{params:e})}getProfile(){return this.client.get(`${this.endpoint}/profile`)}create(e){return this.client.post(this.endpoint,e)}createOrganizer(e){return this.client.post(`${this.endpoint}/organizer`,e)}createSubOrganizer(e){return this.client.post(`${this.endpoint}/sub-organizer`,e)}verify(e){return this.client.patch(`${this.endpoint}/${e}/verify`)}edit(e,n){return this.client.put(`${this.endpoint}/${e}`,n)}}const N=new Y,d={v1:N};class W extends a{constructor(){super(...arguments),this.endpoint="api/v1/files"}upload(e){const n=new FormData;return n.append("file",e),this.client.post(this.endpoint,n,{headers:{"Content-Type":"multipart/form-data"}})}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}}const J=new W,Q={v1:J};class X extends a{constructor(){super(...arguments),this.endpoint="api/v1/onboardings"}getByUser(){return this.client.get(this.endpoint)}create(e){return this.client.post(this.endpoint,e)}update(e){return this.client.put(this.endpoint,e)}}const Z=new X,m={v1:Z};class ee extends a{constructor(){super(...arguments),this.endpoint="api/v1/event-attendances"}getAll(e){return this.client.get(this.endpoint,{params:e})}create(e){return this.client.post(this.endpoint,e)}remove(e){return this.client.delete(`${this.endpoint}/${e}`)}}const te=new ee,w={v1:te};class ne extends a{constructor(){super(...arguments),this.endpoint="api/v1/forgot-password"}create(e){return this.client.post(this.endpoint,e)}changePassword(e,n){return this.client.patch(`${this.endpoint}/${e}/change`,n)}}const se=new ne,F={v1:se};class ie extends a{constructor(){super(...arguments),this.endpoint="api/v1/countries"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}}const oe=new ie,$={v1:oe};class ae extends a{constructor(){super(...arguments),this.endpoint="api/v1/counties"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}}const re=new ae,E={v1:re};class ue extends a{constructor(){super(...arguments),this.endpoint="api/v1/cities"}getAll(e){return this.client.get(this.endpoint,{params:e})}getById(e){return this.client.get(`${this.endpoint}/${e}`)}}const ce=new ue,q={v1:ce};class P{constructor(){this.Auth=C,this.Events=p,this.Categories=v,this.Collections=l,this.Users=d,this.Files=Q,this.Onboardings=m,this.EventAttendances=w,this.ForgotPassword=F,this.Countries=$,this.Counties=E,this.Cities=q}configure({baseUrl:e,headers:n}){e!==void 0&&K(e),n!==void 0&&B(n)}removeHeader(e){S(e)}addInterceptor(e,n){return D(e,n)}removeInterceptor(e){O(e)}}const le=new P,i={events:{all:["events"],list:t=>[...i.events.all,"list",t],detail:t=>[...i.events.all,"detail",t]},categories:{all:["categories"],list:t=>[...i.categories.all,"list",t]},collections:{all:["collections"],list:t=>[...i.collections.all,"list",t],detail:t=>[...i.collections.all,"detail",t]},users:{all:["users"],list:t=>[...i.users.all,"list",t],profile:()=>[...i.users.all,"profile"]},files:{all:["files"]},onboardings:{all:["onboardings"],detail:()=>[...i.onboardings.all,"detail"]},eventAttendances:{all:["event-attendances"],list:t=>[...i.eventAttendances.all,"list",t]},countries:{all:["countries"],list:t=>[...i.countries.all,"list",t],detail:t=>[...i.countries.all,"detail",t]},counties:{all:["counties"],list:t=>[...i.counties.all,"list",t],detail:t=>[...i.counties.all,"detail",t]},cities:{all:["cities"],list:t=>[...i.cities.all,"list",t],detail:t=>[...i.cities.all,"detail",t]}},de=(t,e)=>s.useQuery({queryKey:i.events.list(t),queryFn:async()=>(await p.v1.getAll(t)).data,...e}),ye=(t,e)=>s.useQuery({queryKey:i.events.detail(t),queryFn:async()=>(await p.v1.getById(t)).data,...e}),pe=t=>s.useMutation({mutationFn:async e=>{await p.v1.create(e)},...t}),ve=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await p.v1.update(e,n)},...t}),he=t=>s.useMutation({mutationFn:async({id:e})=>{await p.v1.remove(e)},...t}),h=new s.QueryClient({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:0},mutations:{retry:0}}}),ge=()=>h.invalidateQueries({queryKey:i.events.all});function b(t,e){return{...t,isSaved:e==="toggle"?!t.isSaved:e}}function I(t,e,n){return async(r,o)=>{const{eventId:u}=r,c=[...i.events.all,"list"];await t.cancelQueries({queryKey:i.events.all});const g=t.getQueriesData({queryKey:c});t.setQueriesData({queryKey:c},M=>M&&{...M,content:M.content.map(A=>A.id===u?b(A,e):A)});const G=i.events.detail(u),f=t.getQueryData(G);return f&&t.setQueryData(G,b(f,e)),await(n==null?void 0:n(r,o)),{previousLists:g,previousDetail:f}}}function U(t,e){return(n,r,o,u)=>{o==null||o.previousLists.forEach(([c,g])=>{t.setQueryData(c,g)}),o!=null&&o.previousDetail&&t.setQueryData(i.events.detail(r.eventId),o.previousDetail),e==null||e(n,r,o,u)}}const Ce=t=>s.useMutation({mutationFn:async e=>(await C.v1.login(e)).data,...t}),me=t=>s.useMutation({mutationFn:async e=>(await C.v1.social(e)).data,...t}),we=t=>s.useMutation({mutationFn:async e=>(await C.v1.refresh(e)).data,...t}),Me=(t,e)=>s.useQuery({queryKey:i.categories.list(t),queryFn:async()=>(await v.v1.getAll(t)).data,...e}),Qe=t=>s.useMutation({mutationFn:async e=>{await v.v1.create(e)},...t}),Fe=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await v.v1.update(e,n)},...t}),$e=t=>s.useMutation({mutationFn:async({id:e})=>{await v.v1.remove(e)},...t}),Ee=()=>h.invalidateQueries({queryKey:i.categories.all}),qe=(t,e)=>s.useQuery({queryKey:i.collections.list(t),queryFn:async()=>(await l.v1.getAll(t)).data,...e}),fe=(t,e)=>s.useQuery({queryKey:i.collections.detail(t),queryFn:async()=>(await l.v1.getById(t)).data,...e}),Ae=t=>s.useMutation({mutationFn:async e=>{await l.v1.create(e)},...t}),Ie=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await l.v1.update(e,n)},...t}),Ue=t=>s.useMutation({mutationFn:async({id:e})=>{await l.v1.remove(e)},...t});function x(t,e){return(n,r,o,u,c)=>{t.invalidateQueries({queryKey:i.collections.all}),e==null||e(n,r,o,u,c)}}const Ge=t=>{const e=s.useQueryClient(),{onMutate:n,onError:r,onSettled:o,...u}=t??{};return s.useMutation({mutationFn:async({eventId:c})=>{await l.v1.removeEvent(c)},onMutate:I(e,!1,n),onError:U(e,r),onSettled:x(e,o),...u})},be=t=>{const e=s.useQueryClient(),{onMutate:n,onError:r,onSettled:o,...u}=t??{};return s.useMutation({mutationFn:async({id:c,data:g})=>{await l.v1.update(c,g)},onMutate:I(e,"toggle",n),onError:U(e,r),onSettled:x(e,o),...u})},Ke=()=>h.invalidateQueries({queryKey:i.collections.all}),Be=(t,e)=>s.useQuery({queryKey:i.users.list(t),queryFn:async()=>(await d.v1.getAll(t)).data,...e}),Se=t=>s.useQuery({queryKey:i.users.profile(),queryFn:async()=>(await d.v1.getProfile()).data,...t}),De=t=>s.useMutation({mutationFn:async e=>{await d.v1.create(e)},...t}),Oe=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await d.v1.edit(e,n)},...t}),Pe=t=>s.useMutation({mutationFn:async e=>{await d.v1.createOrganizer(e)},...t}),xe=t=>s.useMutation({mutationFn:async e=>{await d.v1.createSubOrganizer(e)},...t}),He=t=>s.useMutation({mutationFn:async({userId:e})=>{await d.v1.verify(e)},...t}),_e=t=>s.useMutation({mutationFn:async e=>(await Q.v1.upload(e)).data,...t}),ze=t=>s.useMutation({mutationFn:async({id:e})=>{await Q.v1.remove(e)},...t}),Te=t=>s.useQuery({queryKey:i.onboardings.detail(),queryFn:async()=>(await m.v1.getByUser()).data,...t}),Le=t=>s.useMutation({mutationFn:async e=>(await m.v1.create(e)).data,...t}),Re=t=>s.useMutation({mutationFn:async e=>(await m.v1.update(e)).data,...t}),je=()=>h.invalidateQueries({queryKey:i.onboardings.all}),ke=(t,e)=>s.useQuery({queryKey:i.eventAttendances.list(t),queryFn:async()=>(await w.v1.getAll(t)).data,...e}),Ve=t=>s.useMutation({mutationFn:async e=>{await w.v1.create(e)},...t}),Ye=t=>s.useMutation({mutationFn:async({id:e})=>{await w.v1.remove(e)},...t}),Ne=()=>h.invalidateQueries({queryKey:i.eventAttendances.all}),We=t=>s.useMutation({mutationFn:async e=>{await F.v1.create(e)},...t}),Je=t=>s.useMutation({mutationFn:async({id:e,data:n})=>{await F.v1.changePassword(e,n)},...t}),Xe=(t,e)=>s.useQuery({queryKey:i.countries.list(t),queryFn:async()=>(await $.v1.getAll(t)).data,...e}),Ze=(t,e)=>s.useQuery({queryKey:i.countries.detail(t),queryFn:async()=>(await $.v1.getById(t)).data,...e}),et=(t,e)=>s.useQuery({queryKey:i.counties.list(t),queryFn:async()=>(await E.v1.getAll(t)).data,...e}),tt=(t,e)=>s.useQuery({queryKey:i.counties.detail(t),queryFn:async()=>(await E.v1.getById(t)).data,...e}),nt=(t,e)=>s.useQuery({queryKey:i.cities.list(t),queryFn:async()=>(await q.v1.getAll(t)).data,...e}),st=(t,e)=>s.useQuery({queryKey:i.cities.detail(t),queryFn:async()=>(await q.v1.getById(t)).data,...e});exports.Auth=C;exports.Categories=v;exports.Cities=q;exports.Collections=l;exports.Counties=E;exports.Countries=$;exports.EVENTHR_QUERY_KEYS=i;exports.EventAttendances=w;exports.EventhrHttpClient=P;exports.Events=p;exports.Files=Q;exports.ForgotPassword=F;exports.HttpClient=a;exports.Onboardings=m;exports.Users=d;exports.addRequestInterceptor=D;exports.createIsSavedRollback=U;exports.createOptimisticIsSavedUpdater=I;exports.default=le;exports.instance=y;exports.invalidateCategoriesCache=Ee;exports.invalidateCollectionsCache=Ke;exports.invalidateEventAttendancesCache=Ne;exports.invalidateEventsCache=ge;exports.invalidateOnboardingsCache=je;exports.queryClient=h;exports.removeHeader=S;exports.removeRequestInterceptor=O;exports.setBaseUrl=K;exports.setHeaders=B;exports.useChangePasswordMutation=Je;exports.useCreateCategoryMutation=Qe;exports.useCreateCollectionMutation=Ae;exports.useCreateEventAttendanceMutation=Ve;exports.useCreateEventMutation=pe;exports.useCreateForgotPasswordMutation=We;exports.useCreateOnboardingMutation=Le;exports.useCreateOrganizerMutation=Pe;exports.useCreateSubOrganizerMutation=xe;exports.useCreateUserMutation=De;exports.useDeleteCategoryMutation=$e;exports.useDeleteCollectionMutation=Ue;exports.useDeleteEventAttendanceMutation=Ye;exports.useDeleteEventMutation=he;exports.useDeleteFileMutation=ze;exports.useEditUserMutation=Oe;exports.useGetCategoriesQuery=Me;exports.useGetCitiesQuery=nt;exports.useGetCityByIdQuery=st;exports.useGetCollectionByIdQuery=fe;exports.useGetCollectionsQuery=qe;exports.useGetCountiesQuery=et;exports.useGetCountriesQuery=Xe;exports.useGetCountryByIdQuery=Ze;exports.useGetCountyByIdQuery=tt;exports.useGetEventAttendancesQuery=ke;exports.useGetEventByIdQuery=ye;exports.useGetEventsQuery=de;exports.useGetOnboardingQuery=Te;exports.useGetProfileQuery=Se;exports.useGetUsersQuery=Be;exports.useLoginMutation=Ce;exports.useRefreshTokenMutation=we;exports.useRemoveEventFromCollectionsMutation=Ge;exports.useSaveEventMutation=be;exports.useSocialAuthMutation=me;exports.useUpdateCategoryMutation=Fe;exports.useUpdateCollectionMutation=Ie;exports.useUpdateEventMutation=ve;exports.useUpdateOnboardingMutation=Re;exports.useUploadFileMutation=_e;exports.useVerifyUserMutation=He;
2
2
  //# sourceMappingURL=index.cjs.map
package/lib/index.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/instance.ts","../src/api/common/HttpClient.ts","../src/api/events/v1/index.ts","../src/api/events/index.ts","../src/api/auth/v1/index.ts","../src/api/auth/index.ts","../src/api/categories/v1/index.ts","../src/api/categories/index.ts","../src/api/collections/v1/index.ts","../src/api/collections/index.ts","../src/api/users/v1/index.ts","../src/api/users/index.ts","../src/api/files/v1/index.ts","../src/api/files/index.ts","../src/api/onboardings/v1/index.ts","../src/api/onboardings/index.ts","../src/api/event-attendances/v1/index.ts","../src/api/event-attendances/index.ts","../src/api/forgot-password/v1/index.ts","../src/api/forgot-password/index.ts","../src/api/countries/v1/index.ts","../src/api/countries/index.ts","../src/api/counties/v1/index.ts","../src/api/counties/index.ts","../src/api/cities/v1/index.ts","../src/api/cities/index.ts","../src/api/EventhrHttp.ts","../src/api/eventhrKeys.ts","../src/api/events/events.hooks.ts","../src/query-client.ts","../src/api/events/events.cache.ts","../src/api/auth/auth.hooks.ts","../src/api/categories/categories.hooks.ts","../src/api/categories/categories.cache.ts","../src/api/collections/collections.hooks.ts","../src/api/collections/collections.cache.ts","../src/api/users/users.hooks.ts","../src/api/files/files.hooks.ts","../src/api/onboardings/onboardings.hooks.ts","../src/api/onboardings/onboardings.cache.ts","../src/api/event-attendances/event-attendances.hooks.ts","../src/api/event-attendances/event-attendances.cache.ts","../src/api/forgot-password/forgot-password.hooks.ts","../src/api/countries/countries.hooks.ts","../src/api/counties/counties.hooks.ts","../src/api/cities/cities.hooks.ts"],"sourcesContent":["import axios, { type AxiosInstance, type InternalAxiosRequestConfig } from 'axios';\n\nconst instance: AxiosInstance = axios.create({\n baseURL: '',\n headers: {\n 'Content-Type': 'application/json',\n },\n});\n\nexport const setBaseUrl = (url: string): void => {\n instance.defaults.baseURL = url;\n};\n\nexport const setHeaders = (headers: Record<string, string>): void => {\n Object.assign(instance.defaults.headers.common, headers);\n};\n\nexport const removeHeader = (key: string): void => {\n delete (instance.defaults.headers.common as Record<string, string>)[key];\n};\n\nexport const addRequestInterceptor = (\n onFulfilled: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>,\n onRejected?: (error: unknown) => unknown,\n): number => instance.interceptors.request.use(onFulfilled, onRejected);\n\nexport const removeRequestInterceptor = (id: number): void => {\n instance.interceptors.request.eject(id);\n};\n\nexport { instance };\nexport default instance;\n","import instance from '../../instance';\n\nexport abstract class HttpClient {\n abstract endpoint: string;\n\n readonly client = instance;\n\n list(..._args: unknown[]): Promise<unknown> {\n throw new Error(`list() not implemented on ${this.constructor.name}`);\n }\n\n get(..._args: unknown[]): Promise<unknown> {\n throw new Error(`get() not implemented on ${this.constructor.name}`);\n }\n\n create(..._args: unknown[]): Promise<unknown> {\n throw new Error(`create() not implemented on ${this.constructor.name}`);\n }\n\n update(..._args: unknown[]): Promise<unknown> {\n throw new Error(`update() not implemented on ${this.constructor.name}`);\n }\n\n remove(..._args: unknown[]): Promise<unknown> {\n throw new Error(`remove() not implemented on ${this.constructor.name}`);\n }\n}\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { BaseValueObject, Coordinates, CountryVo, FileVo, PageRequest, Page } from '@/api/common/types';\n\n\nexport interface EventAddress {\n countryVo?: CountryVo;\n address: string;\n postalCode?: string;\n locationName?: string;\n}\n\nexport interface EventAddressDto {\n cityId: string;\n address: string;\n postalCode?: string;\n locationName?: string;\n}\n\nexport type EventFeature =\n | 'FREE_ENTRY'\n | 'PAID_ENTRY'\n | 'RESERVATION_REQUIRED'\n | 'INDOOR'\n | 'OUTDOOR'\n | 'FREE_PARKING_NEARBY'\n | 'PAID_PARKING_NEARBY'\n | 'NO_PARKING_AVAILABLE'\n | 'PUBLIC_TRANSPORT_NEARBY'\n | 'WHEELCHAIR_ACCESSIBLE'\n | 'ACCESSIBLE_RESTROOM'\n | 'FAMILY_FRIENDLY'\n | 'PET_FRIENDLY'\n | 'FOOD_AVAILABLE'\n | 'DRINKS_AVAILABLE'\n | 'VEGAN_VEGETARIAN_OPTIONS'\n | 'CARD_PAYMENT_AVAILABLE'\n | 'CASH_ONLY'\n | 'NON_SMOKING'\n | 'SMOKING_ALLOWED'\n | 'ADULTS_ONLY_18_PLUS'\n | 'CLOAKROOM_AVAILABLE'\n | 'BABY_CHANGING_FACILITY';\n\nexport interface SubEvent {\n id: string;\n name: string;\n description?: string;\n startAt: string;\n endAt: string;\n address: EventAddress;\n coordinates: Coordinates;\n price?: number;\n capacity?: number;\n images: FileVo[];\n features?: EventFeature[];\n attendeeCount?: number;\n isDeleted: boolean;\n createdAt: string;\n updatedAt: string;\n isSaved: boolean;\n}\n\nexport interface Event {\n id: string;\n name: string;\n description?: string;\n startAt: string;\n endAt: string;\n address: EventAddress;\n coordinates: Coordinates;\n price?: number;\n capacity?: number;\n organizer: BaseValueObject;\n category: BaseValueObject;\n features?: EventFeature[];\n attendeeCount?: number;\n images?: FileVo[];\n parentEvent?: BaseValueObject;\n subEvents?: SubEvent[];\n isDeleted: boolean;\n createdAt: string;\n updatedAt: string;\n isSaved: boolean;\n}\n\nexport interface CreateEventDto {\n name: string;\n description?: string;\n startAt: string;\n endAt: string;\n address: EventAddressDto;\n coordinates: Coordinates;\n price: number;\n capacity?: number;\n imageIds?: string[];\n features?: EventFeature[];\n categoryId: string;\n subOrganizerId?: string;\n parentEventId?: string;\n}\n\nexport type UpdateEventDto = CreateEventDto;\n\nexport interface GetEventsParams extends PageRequest {\n name?: string;\n latitude?: number;\n longitude?: number;\n radiusKm?: number;\n}\n\n\n\nclass EventsClient extends HttpClient {\n endpoint = 'api/v1/events';\n\n getAll(params?: GetEventsParams) {\n return this.client.get<Page<Event>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<Event>(`${this.endpoint}/${id}`);\n }\n\n create(data: CreateEventDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n update(id: string, data: UpdateEventDto) {\n return this.client.put<void>(`${this.endpoint}/${id}`, data);\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new EventsClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type {\n Event,\n EventAddress,\n EventAddressDto,\n EventFeature,\n SubEvent,\n CreateEventDto,\n UpdateEventDto,\n GetEventsParams,\n} from './v1';\nexport type { BaseValueObject, Coordinates, CountryVo, FileVo } from '@/api/common/types';\n\nexport const Events = { v1 };\nexport default Events;\n","import { HttpClient } from '@/api/common/HttpClient';\n\n\nexport interface AuthTokenResponse {\n authenticationToken: string;\n refreshToken: string;\n}\n\nexport interface LoginDto {\n username: string;\n password: string;\n notificationToken?: string;\n}\n\nexport interface RefreshTokenDto {\n refreshToken: string;\n}\n\nexport type SocialProvider = 'GOOGLE' | 'FACEBOOK';\n\nexport interface SocialAuthDto {\n provider: SocialProvider;\n token: string;\n}\n\nexport interface SocialAuthResponse {\n email: string;\n name: string;\n provider: string;\n}\n\n\n\nclass AuthClient extends HttpClient {\n endpoint = 'api/v1/authentication/user';\n\n login(data: LoginDto) {\n return this.client.post<AuthTokenResponse>(this.endpoint, data);\n }\n\n social(data: SocialAuthDto) {\n return this.client.post<SocialAuthResponse>(`${this.endpoint}/social`, data);\n }\n\n refresh(data: RefreshTokenDto) {\n return this.client.post<AuthTokenResponse>(`${this.endpoint}/refresh`, data);\n }\n}\n\nconst v1 = new AuthClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { AuthTokenResponse, LoginDto, RefreshTokenDto, SocialProvider, SocialAuthDto, SocialAuthResponse } from './v1';\n\nexport const Auth = { v1 };\nexport default Auth;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page } from '@/api/common/types';\n\n\nexport interface Category {\n id: string;\n name: string;\n isDeleted: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateCategoryDto {\n name: string;\n}\n\nexport interface UpdateCategoryDto {\n name: string;\n}\n\nexport interface GetCategoriesParams extends PageRequest {\n name?: string;\n}\n\n\n\nclass CategoriesClient extends HttpClient {\n endpoint = 'api/v1/categories';\n\n getAll(params?: GetCategoriesParams) {\n return this.client.get<Page<Category>>(this.endpoint, { params });\n }\n\n create(data: CreateCategoryDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n update(id: string, data: UpdateCategoryDto) {\n return this.client.put<void>(`${this.endpoint}/${id}`, data);\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new CategoriesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type {\n Category,\n CreateCategoryDto,\n UpdateCategoryDto,\n GetCategoriesParams,\n} from './v1';\n\nexport const Categories = { v1 };\nexport default Categories;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { BaseValueObject, PageRequest, Page } from '@/api/common/types';\n\nexport interface Collection {\n id: string;\n name: string;\n customer: BaseValueObject;\n events: BaseValueObject[];\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateCollectionDto {\n name: string;\n eventIds?: string[];\n}\n\nexport interface UpdateCollectionDto {\n name: string;\n eventIds: string[];\n}\n\nexport interface GetCollectionsParams extends PageRequest {\n name?: string;\n}\n\nclass CollectionsClient extends HttpClient {\n endpoint = 'api/v1/collections';\n\n getAll(params?: GetCollectionsParams) {\n return this.client.get<Page<Collection>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<Collection>(`${this.endpoint}/${id}`);\n }\n\n create(data: CreateCollectionDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n update(id: string, data: UpdateCollectionDto) {\n return this.client.put<void>(`${this.endpoint}/${id}`, data);\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n\n removeEvent(eventId: string) {\n return this.client.delete<void>(`${this.endpoint}/events/${eventId}`);\n }\n}\n\nconst v1 = new CollectionsClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type {\n Collection,\n CreateCollectionDto,\n UpdateCollectionDto,\n GetCollectionsParams,\n} from './v1';\n\nexport const Collections = { v1 };\nexport default Collections;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page } from '@/api/common/types';\n\n\nexport type UserRole = 'ADMIN' | 'CUSTOMER' | 'PRIVATE_ORGANIZER' | 'PUBLIC_ORGANIZER' | 'SUB_ORGANIZER';\n\nexport interface User {\n id: string;\n name: string;\n username: string;\n imageId?: string;\n createdAt: string;\n updatedAt: string;\n emailVerified: boolean;\n onboarded: boolean;\n}\n\nexport interface CreateUserDto {\n name: string;\n username: string;\n password: string;\n}\n\nexport interface CreateOrganizerUserDto {\n name: string;\n username: string;\n password: string;\n userRole: UserRole;\n}\n\nexport interface EditUserDto {\n name: string;\n username: string;\n password?: string;\n imageId?: string;\n}\n\n\n\nclass UsersClient extends HttpClient {\n endpoint = 'api/v1/users';\n\n getAll(params?: PageRequest) {\n return this.client.get<Page<User>>(this.endpoint, { params });\n }\n\n getProfile() {\n return this.client.get<User>(`${this.endpoint}/profile`);\n }\n\n create(data: CreateUserDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n createOrganizer(data: CreateOrganizerUserDto) {\n return this.client.post<void>(`${this.endpoint}/organizer`, data);\n }\n\n createSubOrganizer(data: CreateUserDto) {\n return this.client.post<void>(`${this.endpoint}/sub-organizer`, data);\n }\n\n verify(userId: string) {\n return this.client.patch<void>(`${this.endpoint}/${userId}/verify`);\n }\n\n edit(id: string, data: EditUserDto) {\n return this.client.put<void>(`${this.endpoint}/${id}`, data);\n }\n}\n\nconst v1 = new UsersClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { User, UserRole, CreateUserDto, CreateOrganizerUserDto, EditUserDto } from './v1';\n\nexport const Users = { v1 };\nexport default Users;\n","import { HttpClient } from '@/api/common/HttpClient';\n\n\nexport type FileType = 'IMAGE' | 'VIDEO' | 'DOCUMENT';\n\nexport interface UploadedFile {\n id: string;\n fileName: string;\n url: string;\n fileSize: number;\n fileType: FileType;\n createdAt: string;\n updatedAt: string;\n}\n\n\n\nclass FilesClient extends HttpClient {\n endpoint = 'api/v1/files';\n\n upload(file: File) {\n const formData = new FormData();\n formData.append('file', file);\n return this.client.post<UploadedFile>(this.endpoint, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new FilesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { UploadedFile, FileType } from './v1';\n\nexport const Files = { v1 };\nexport default Files;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { BaseValueObject, CountryVo } from '@/api/common/types';\n\n\nexport interface Onboarding {\n id: string;\n user: BaseValueObject;\n categories: BaseValueObject[];\n countries: CountryVo[];\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateOnboardingDto {\n categoryIds: string[];\n cityIds: string[];\n}\n\nexport type UpdateOnboardingDto = CreateOnboardingDto;\n\n\n\nclass OnboardingsClient extends HttpClient {\n endpoint = 'api/v1/onboardings';\n\n getByUser() {\n return this.client.get<Onboarding>(this.endpoint);\n }\n\n create(data: CreateOnboardingDto) {\n return this.client.post<Onboarding>(this.endpoint, data);\n }\n\n update(data: UpdateOnboardingDto) {\n return this.client.put<Onboarding>(this.endpoint, data);\n }\n}\n\nconst v1 = new OnboardingsClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { Onboarding, CreateOnboardingDto, UpdateOnboardingDto } from './v1';\n\nexport const Onboardings = { v1 };\nexport default Onboardings;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page, BaseValueObject } from '@/api/common/types';\n\n\nexport interface EventAttendance {\n id: string;\n user: BaseValueObject;\n event: BaseValueObject;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateEventAttendanceDto {\n eventId: string;\n}\n\nexport interface GetEventAttendancesParams extends PageRequest {\n 'event-id'?: string;\n}\n\n\n\nclass EventAttendancesClient extends HttpClient {\n endpoint = 'api/v1/event-attendances';\n\n getAll(params?: GetEventAttendancesParams) {\n return this.client.get<Page<EventAttendance>>(this.endpoint, { params });\n }\n\n create(data: CreateEventAttendanceDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new EventAttendancesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { EventAttendance, CreateEventAttendanceDto, GetEventAttendancesParams } from './v1';\n\nexport const EventAttendances = { v1 };\nexport default EventAttendances;\n","import { HttpClient } from '@/api/common/HttpClient';\n\n\nexport interface ForgotPasswordCreateDto {\n email: string;\n}\n\nexport interface ChangeForgotPasswordDto {\n password: string;\n}\n\n\n\nclass ForgotPasswordClient extends HttpClient {\n endpoint = 'api/v1/forgot-password';\n\n create(data: ForgotPasswordCreateDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n changePassword(id: string, data: ChangeForgotPasswordDto) {\n return this.client.patch<void>(`${this.endpoint}/${id}/change`, data);\n }\n}\n\nconst v1 = new ForgotPasswordClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { ForgotPasswordCreateDto, ChangeForgotPasswordDto } from './v1';\n\nexport const ForgotPassword = { v1 };\nexport default ForgotPassword;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page } from '@/api/common/types';\n\n\nexport interface Country {\n id: string;\n name: string;\n}\n\nexport interface GetCountriesParams extends PageRequest {\n name?: string;\n}\n\n\n\nclass CountriesClient extends HttpClient {\n endpoint = 'api/v1/countries';\n\n getAll(params?: GetCountriesParams) {\n return this.client.get<Page<Country>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<Country>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new CountriesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { Country, GetCountriesParams } from './v1';\n\nexport const Countries = { v1 };\nexport default Countries;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page, BaseValueObject } from '@/api/common/types';\n\n\nexport interface County {\n id: string;\n name: string;\n country: BaseValueObject;\n}\n\nexport interface GetCountiesParams extends PageRequest {\n name?: string;\n 'country-id'?: string;\n}\n\n\n\nclass CountiesClient extends HttpClient {\n endpoint = 'api/v1/counties';\n\n getAll(params?: GetCountiesParams) {\n return this.client.get<Page<County>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<County>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new CountiesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { County, GetCountiesParams } from './v1';\n\nexport const Counties = { v1 };\nexport default Counties;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page, BaseValueObject } from '@/api/common/types';\n\n\nexport interface City {\n id: string;\n name: string;\n country: BaseValueObject;\n county: BaseValueObject;\n}\n\nexport interface GetCitiesParams extends PageRequest {\n name?: string;\n 'country-id'?: string;\n 'county-id'?: string;\n}\n\n\n\nclass CitiesClient extends HttpClient {\n endpoint = 'api/v1/cities';\n\n getAll(params?: GetCitiesParams) {\n return this.client.get<Page<City>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<City>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new CitiesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { City, GetCitiesParams } from './v1';\n\nexport const Cities = { v1 };\nexport default Cities;\n","import { setBaseUrl, setHeaders, removeHeader, addRequestInterceptor, removeRequestInterceptor } from '../instance';\nimport type { InternalAxiosRequestConfig } from 'axios';\nimport Events from './events';\nimport Auth from './auth';\nimport Categories from './categories';\nimport Collections from './collections';\nimport Users from './users';\nimport Files from './files';\nimport Onboardings from './onboardings';\nimport EventAttendances from './event-attendances';\nimport ForgotPassword from './forgot-password';\nimport Countries from './countries';\nimport Counties from './counties';\nimport Cities from './cities';\n\nexport interface EventhrHttpConfig {\n baseUrl?: string;\n headers?: Record<string, string>;\n}\n\nexport class EventhrHttpClient {\n readonly Auth = Auth;\n readonly Events = Events;\n readonly Categories = Categories;\n readonly Collections = Collections;\n readonly Users = Users;\n readonly Files = Files;\n readonly Onboardings = Onboardings;\n readonly EventAttendances = EventAttendances;\n readonly ForgotPassword = ForgotPassword;\n readonly Countries = Countries;\n readonly Counties = Counties;\n readonly Cities = Cities;\n\n configure({ baseUrl, headers }: EventhrHttpConfig): void {\n if (baseUrl !== undefined) {\n setBaseUrl(baseUrl);\n }\n if (headers !== undefined) {\n setHeaders(headers);\n }\n }\n\n removeHeader(key: string): void {\n removeHeader(key);\n }\n\n addInterceptor(\n onFulfilled: (\n config: InternalAxiosRequestConfig,\n ) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>,\n onRejected?: (error: unknown) => unknown,\n ): number {\n return addRequestInterceptor(onFulfilled, onRejected);\n }\n\n removeInterceptor(id: number): void {\n removeRequestInterceptor(id);\n }\n}\n\nconst EventhrHttp = new EventhrHttpClient();\nexport default EventhrHttp;\n","import type { GetEventsParams } from './events';\nimport type { GetCategoriesParams } from './categories';\nimport type { GetCollectionsParams } from './collections';\nimport type { GetCountriesParams } from './countries';\nimport type { GetCountiesParams } from './counties';\nimport type { GetCitiesParams } from './cities';\nimport type { GetEventAttendancesParams } from './event-attendances';\nimport type { PageRequest } from './common/types';\n\nexport const EVENTHR_QUERY_KEYS = {\n events: {\n all: ['events'] as const,\n list: (params?: GetEventsParams) => [...EVENTHR_QUERY_KEYS.events.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.events.all, 'detail', id] as const,\n },\n categories: {\n all: ['categories'] as const,\n list: (params?: GetCategoriesParams) =>\n [...EVENTHR_QUERY_KEYS.categories.all, 'list', params] as const,\n },\n collections: {\n all: ['collections'] as const,\n list: (params?: GetCollectionsParams) =>\n [...EVENTHR_QUERY_KEYS.collections.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.collections.all, 'detail', id] as const,\n },\n users: {\n all: ['users'] as const,\n list: (params?: PageRequest) => [...EVENTHR_QUERY_KEYS.users.all, 'list', params] as const,\n profile: () => [...EVENTHR_QUERY_KEYS.users.all, 'profile'] as const,\n },\n files: {\n all: ['files'] as const,\n },\n onboardings: {\n all: ['onboardings'] as const,\n detail: () => [...EVENTHR_QUERY_KEYS.onboardings.all, 'detail'] as const,\n },\n eventAttendances: {\n all: ['event-attendances'] as const,\n list: (params?: GetEventAttendancesParams) =>\n [...EVENTHR_QUERY_KEYS.eventAttendances.all, 'list', params] as const,\n },\n countries: {\n all: ['countries'] as const,\n list: (params?: GetCountriesParams) =>\n [...EVENTHR_QUERY_KEYS.countries.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.countries.all, 'detail', id] as const,\n },\n counties: {\n all: ['counties'] as const,\n list: (params?: GetCountiesParams) =>\n [...EVENTHR_QUERY_KEYS.counties.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.counties.all, 'detail', id] as const,\n },\n cities: {\n all: ['cities'] as const,\n list: (params?: GetCitiesParams) =>\n [...EVENTHR_QUERY_KEYS.cities.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.cities.all, 'detail', id] as const,\n },\n} as const;\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, QueryOptions } from '@/api/common/types';\nimport type { CreateEventDto, Event, GetEventsParams, UpdateEventDto } from './v1';\nimport Events from './index';\n\n\n\nexport const useGetEventsQuery = (\n params?: GetEventsParams,\n options?: QueryOptions<Page<Event>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.events.list(params),\n queryFn: async () => {\n const response = await Events.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetEventByIdQuery = (\n id: string,\n options?: QueryOptions<Event>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.events.detail(id),\n queryFn: async () => {\n const response = await Events.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n\n\n\nexport const useCreateEventMutation = (\n options?: MutationOptions<void, CreateEventDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateEventDto) => {\n await Events.v1.create(data);\n },\n ...options,\n });\n\nexport const useUpdateEventMutation = (\n options?: MutationOptions<void, { id: string; data: UpdateEventDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: UpdateEventDto }) => {\n await Events.v1.update(id, data);\n },\n ...options,\n });\n\nexport const useDeleteEventMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await Events.v1.remove(id);\n },\n ...options,\n });\n","import { QueryClient } from '@tanstack/react-query';\n\nexport const queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n retry: 1,\n refetchOnWindowFocus: false,\n staleTime: 0,\n },\n mutations: {\n retry: 0,\n },\n },\n});\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\n\nexport const invalidateEventsCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.events.all });\n","import { useMutation } from '@tanstack/react-query';\n\nimport type { MutationOptions } from '@/api/common/types';\nimport type { AuthTokenResponse, LoginDto, RefreshTokenDto, SocialAuthDto, SocialAuthResponse } from './v1';\nimport Auth from './index';\n\nexport const useLoginMutation = (\n options?: MutationOptions<AuthTokenResponse, LoginDto>,\n) =>\n useMutation({\n mutationFn: async (data: LoginDto) => {\n const response = await Auth.v1.login(data);\n return response.data;\n },\n ...options,\n });\n\nexport const useSocialAuthMutation = (\n options?: MutationOptions<SocialAuthResponse, SocialAuthDto>,\n) =>\n useMutation({\n mutationFn: async (data: SocialAuthDto) => {\n const response = await Auth.v1.social(data);\n return response.data;\n },\n ...options,\n });\n\nexport const useRefreshTokenMutation = (\n options?: MutationOptions<AuthTokenResponse, RefreshTokenDto>,\n) =>\n useMutation({\n mutationFn: async (data: RefreshTokenDto) => {\n const response = await Auth.v1.refresh(data);\n return response.data;\n },\n ...options,\n });\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, QueryOptions } from '@/api/common/types';\nimport type { Category, CreateCategoryDto, GetCategoriesParams, UpdateCategoryDto } from './v1';\nimport Categories from './index';\n\n\n\nexport const useGetCategoriesQuery = (\n params?: GetCategoriesParams,\n options?: QueryOptions<Page<Category>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.categories.list(params),\n queryFn: async () => {\n const response = await Categories.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\n\n\nexport const useCreateCategoryMutation = (\n options?: MutationOptions<void, CreateCategoryDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateCategoryDto) => {\n await Categories.v1.create(data);\n },\n ...options,\n });\n\nexport const useUpdateCategoryMutation = (\n options?: MutationOptions<void, { id: string; data: UpdateCategoryDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: UpdateCategoryDto }) => {\n await Categories.v1.update(id, data);\n },\n ...options,\n });\n\nexport const useDeleteCategoryMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await Categories.v1.remove(id);\n },\n ...options,\n });\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\n\nexport const invalidateCategoriesCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.categories.all });\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, QueryOptions } from '@/api/common/types';\nimport type { Event } from '@/api/events';\nimport type { Collection, CreateCollectionDto, GetCollectionsParams, UpdateCollectionDto } from './v1';\nimport Collections from './index';\n\n\n\nexport const useGetCollectionsQuery = (\n params?: GetCollectionsParams,\n options?: QueryOptions<Page<Collection>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.collections.list(params),\n queryFn: async () => {\n const response = await Collections.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetCollectionByIdQuery = (\n id: string,\n options?: QueryOptions<Collection>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.collections.detail(id),\n queryFn: async () => {\n const response = await Collections.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n\nexport const useCreateCollectionMutation = (\n options?: MutationOptions<void, CreateCollectionDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateCollectionDto) => {\n await Collections.v1.create(data);\n },\n ...options,\n });\n\nexport const useUpdateCollectionMutation = (\n options?: MutationOptions<void, { id: string; data: UpdateCollectionDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: UpdateCollectionDto }) => {\n await Collections.v1.update(id, data);\n },\n ...options,\n });\n\nexport const useDeleteCollectionMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await Collections.v1.remove(id);\n },\n ...options,\n });\n\nexport const useRemoveEventFromCollectionsMutation = (\n options?: MutationOptions<void, { eventId: string }>,\n) =>\n useMutation({\n mutationFn: async ({ eventId }: { eventId: string }) => {\n await Collections.v1.removeEvent(eventId);\n },\n ...options,\n });\n\ntype SaveEventVariables = { id: string; eventId: string; data: UpdateCollectionDto };\ntype SaveEventContext = {\n previousLists: Array<[readonly unknown[], Page<Event> | undefined]>;\n previousDetail: Event | undefined;\n};\n\nexport const useSaveEventMutation = (\n options?: MutationOptions<void, SaveEventVariables>,\n) => {\n const queryClient = useQueryClient();\n const { onMutate, onError, onSettled, ...restOptions } = options ?? {};\n\n return useMutation<void, Error, SaveEventVariables, SaveEventContext>({\n mutationFn: async ({ id, data }) => {\n await Collections.v1.update(id, data);\n },\n onMutate: async (variables, mutationContext) => {\n const { eventId } = variables;\n const listKey = [...EVENTHR_QUERY_KEYS.events.all, 'list'];\n\n await queryClient.cancelQueries({ queryKey: EVENTHR_QUERY_KEYS.events.all });\n\n const previousLists = queryClient.getQueriesData<Page<Event>>({ queryKey: listKey });\n\n queryClient.setQueriesData<Page<Event>>({ queryKey: listKey }, (oldData) => {\n if (!oldData) return oldData;\n return {\n ...oldData,\n content: oldData.content.map((event) =>\n event.id === eventId ? { ...event, isSaved: !event.isSaved } : event,\n ),\n };\n });\n\n const detailKey = EVENTHR_QUERY_KEYS.events.detail(eventId);\n const previousDetail = queryClient.getQueryData<Event>(detailKey);\n if (previousDetail) {\n queryClient.setQueryData<Event>(detailKey, { ...previousDetail, isSaved: !previousDetail.isSaved });\n }\n\n await onMutate?.(variables, mutationContext);\n\n return { previousLists, previousDetail };\n },\n onError: (error, variables, onMutateResult, mutationContext) => {\n onMutateResult?.previousLists.forEach(([queryKey, data]) => {\n queryClient.setQueryData(queryKey, data);\n });\n if (onMutateResult?.previousDetail) {\n queryClient.setQueryData(\n EVENTHR_QUERY_KEYS.events.detail(variables.eventId),\n onMutateResult.previousDetail,\n );\n }\n onError?.(error, variables, onMutateResult, mutationContext);\n },\n onSettled: (data, error, variables, onMutateResult, mutationContext) => {\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.collections.all });\n onSettled?.(data, error, variables, onMutateResult, mutationContext);\n },\n ...restOptions,\n });\n};\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\n\nexport const invalidateCollectionsCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.collections.all });\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, PageRequest, QueryOptions } from '@/api/common/types';\nimport type { CreateUserDto, CreateOrganizerUserDto, EditUserDto, User } from './v1';\nimport Users from './index';\n\n\n\nexport const useGetUsersQuery = (\n params?: PageRequest,\n options?: QueryOptions<Page<User>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.users.list(params),\n queryFn: async () => {\n const response = await Users.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetProfileQuery = (\n options?: QueryOptions<User>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.users.profile(),\n queryFn: async () => {\n const response = await Users.v1.getProfile();\n return response.data;\n },\n ...options,\n });\n\nexport const useCreateUserMutation = (\n options?: MutationOptions<void, CreateUserDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateUserDto) => {\n await Users.v1.create(data);\n },\n ...options,\n });\n\nexport const useEditUserMutation = (\n options?: MutationOptions<void, { id: string; data: EditUserDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: EditUserDto }) => {\n await Users.v1.edit(id, data);\n },\n ...options,\n });\n\nexport const useCreateOrganizerMutation = (\n options?: MutationOptions<void, CreateOrganizerUserDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateOrganizerUserDto) => {\n await Users.v1.createOrganizer(data);\n },\n ...options,\n });\n\nexport const useCreateSubOrganizerMutation = (\n options?: MutationOptions<void, CreateUserDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateUserDto) => {\n await Users.v1.createSubOrganizer(data);\n },\n ...options,\n });\n\nexport const useVerifyUserMutation = (\n options?: MutationOptions<void, { userId: string }>,\n) =>\n useMutation({\n mutationFn: async ({ userId }: { userId: string }) => {\n await Users.v1.verify(userId);\n },\n ...options,\n });\n","import { useMutation } from '@tanstack/react-query';\n\nimport type { MutationOptions } from '@/api/common/types';\nimport type { UploadedFile } from './v1';\nimport Files from './index';\n\nexport const useUploadFileMutation = (\n options?: MutationOptions<UploadedFile, File>,\n) =>\n useMutation({\n mutationFn: async (file: File) => {\n const response = await Files.v1.upload(file);\n return response.data;\n },\n ...options,\n });\n\nexport const useDeleteFileMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await Files.v1.remove(id);\n },\n ...options,\n });\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, QueryOptions } from '@/api/common/types';\nimport type { CreateOnboardingDto, Onboarding, UpdateOnboardingDto } from './v1';\nimport Onboardings from './index';\n\n\n\nexport const useGetOnboardingQuery = (\n options?: QueryOptions<Onboarding>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.onboardings.detail(),\n queryFn: async () => {\n const response = await Onboardings.v1.getByUser();\n return response.data;\n },\n ...options,\n });\n\nexport const useCreateOnboardingMutation = (\n options?: MutationOptions<Onboarding, CreateOnboardingDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateOnboardingDto) => {\n const response = await Onboardings.v1.create(data);\n return response.data;\n },\n ...options,\n });\n\nexport const useUpdateOnboardingMutation = (\n options?: MutationOptions<Onboarding, UpdateOnboardingDto>,\n) =>\n useMutation({\n mutationFn: async (data: UpdateOnboardingDto) => {\n const response = await Onboardings.v1.update(data);\n return response.data;\n },\n ...options,\n });\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\n\nexport const invalidateOnboardingsCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.onboardings.all });\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, QueryOptions } from '@/api/common/types';\nimport type { CreateEventAttendanceDto, EventAttendance, GetEventAttendancesParams } from './v1';\nimport EventAttendances from './index';\n\n\n\nexport const useGetEventAttendancesQuery = (\n params?: GetEventAttendancesParams,\n options?: QueryOptions<Page<EventAttendance>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.eventAttendances.list(params),\n queryFn: async () => {\n const response = await EventAttendances.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useCreateEventAttendanceMutation = (\n options?: MutationOptions<void, CreateEventAttendanceDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateEventAttendanceDto) => {\n await EventAttendances.v1.create(data);\n },\n ...options,\n });\n\nexport const useDeleteEventAttendanceMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await EventAttendances.v1.remove(id);\n },\n ...options,\n });\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\n\nexport const invalidateEventAttendancesCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.eventAttendances.all });\n","import { useMutation } from '@tanstack/react-query';\n\nimport type { MutationOptions } from '@/api/common/types';\nimport type { ChangeForgotPasswordDto, ForgotPasswordCreateDto } from './v1';\nimport ForgotPassword from './index';\n\n\n\nexport const useCreateForgotPasswordMutation = (\n options?: MutationOptions<void, ForgotPasswordCreateDto>,\n) =>\n useMutation({\n mutationFn: async (data: ForgotPasswordCreateDto) => {\n await ForgotPassword.v1.create(data);\n },\n ...options,\n });\n\nexport const useChangePasswordMutation = (\n options?: MutationOptions<void, { id: string; data: ChangeForgotPasswordDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: ChangeForgotPasswordDto }) => {\n await ForgotPassword.v1.changePassword(id, data);\n },\n ...options,\n });\n","import { useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { Page, QueryOptions } from '@/api/common/types';\nimport type { Country, GetCountriesParams } from './v1';\nimport Countries from './index';\n\n\n\nexport const useGetCountriesQuery = (\n params?: GetCountriesParams,\n options?: QueryOptions<Page<Country>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.countries.list(params),\n queryFn: async () => {\n const response = await Countries.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetCountryByIdQuery = (\n id: string,\n options?: QueryOptions<Country>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.countries.detail(id),\n queryFn: async () => {\n const response = await Countries.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n","import { useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { Page, QueryOptions } from '@/api/common/types';\nimport type { County, GetCountiesParams } from './v1';\nimport Counties from './index';\n\n\n\nexport const useGetCountiesQuery = (\n params?: GetCountiesParams,\n options?: QueryOptions<Page<County>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.counties.list(params),\n queryFn: async () => {\n const response = await Counties.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetCountyByIdQuery = (\n id: string,\n options?: QueryOptions<County>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.counties.detail(id),\n queryFn: async () => {\n const response = await Counties.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n","import { useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { Page, QueryOptions } from '@/api/common/types';\nimport type { City, GetCitiesParams } from './v1';\nimport Cities from './index';\n\n\n\nexport const useGetCitiesQuery = (\n params?: GetCitiesParams,\n options?: QueryOptions<Page<City>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.cities.list(params),\n queryFn: async () => {\n const response = await Cities.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetCityByIdQuery = (\n id: string,\n options?: QueryOptions<City>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.cities.detail(id),\n queryFn: async () => {\n const response = await Cities.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n"],"names":["instance","axios","setBaseUrl","url","setHeaders","headers","removeHeader","key","addRequestInterceptor","onFulfilled","onRejected","removeRequestInterceptor","id","HttpClient","_args","EventsClient","params","data","v1","Events","AuthClient","Auth","CategoriesClient","Categories","CollectionsClient","eventId","Collections","UsersClient","userId","Users","FilesClient","file","formData","Files","OnboardingsClient","Onboardings","EventAttendancesClient","EventAttendances","ForgotPasswordClient","ForgotPassword","CountriesClient","Countries","CountiesClient","Counties","CitiesClient","Cities","EventhrHttpClient","baseUrl","EventhrHttp","EVENTHR_QUERY_KEYS","useGetEventsQuery","options","useQuery","useGetEventByIdQuery","useCreateEventMutation","useMutation","useUpdateEventMutation","useDeleteEventMutation","queryClient","QueryClient","invalidateEventsCache","useLoginMutation","useSocialAuthMutation","useRefreshTokenMutation","useGetCategoriesQuery","useCreateCategoryMutation","useUpdateCategoryMutation","useDeleteCategoryMutation","invalidateCategoriesCache","useGetCollectionsQuery","useGetCollectionByIdQuery","useCreateCollectionMutation","useUpdateCollectionMutation","useDeleteCollectionMutation","useRemoveEventFromCollectionsMutation","useSaveEventMutation","useQueryClient","onMutate","onError","onSettled","restOptions","variables","mutationContext","listKey","previousLists","oldData","event","detailKey","previousDetail","error","onMutateResult","queryKey","invalidateCollectionsCache","useGetUsersQuery","useGetProfileQuery","useCreateUserMutation","useEditUserMutation","useCreateOrganizerMutation","useCreateSubOrganizerMutation","useVerifyUserMutation","useUploadFileMutation","useDeleteFileMutation","useGetOnboardingQuery","useCreateOnboardingMutation","useUpdateOnboardingMutation","invalidateOnboardingsCache","useGetEventAttendancesQuery","useCreateEventAttendanceMutation","useDeleteEventAttendanceMutation","invalidateEventAttendancesCache","useCreateForgotPasswordMutation","useChangePasswordMutation","useGetCountriesQuery","useGetCountryByIdQuery","useGetCountiesQuery","useGetCountyByIdQuery","useGetCitiesQuery","useGetCityByIdQuery"],"mappings":"wKAEMA,EAA0BC,EAAM,OAAO,CAC3C,QAAS,GACT,QAAS,CACP,eAAgB,kBAAA,CAEpB,CAAC,EAEYC,EAAcC,GAAsB,CAC/CH,EAAS,SAAS,QAAUG,CAC9B,EAEaC,EAAcC,GAA0C,CACnE,OAAO,OAAOL,EAAS,SAAS,QAAQ,OAAQK,CAAO,CACzD,EAEaC,EAAgBC,GAAsB,CACjD,OAAQP,EAAS,SAAS,QAAQ,OAAkCO,CAAG,CACzE,EAEaC,EAAwB,CACnCC,EACAC,IACWV,EAAS,aAAa,QAAQ,IAAIS,EAAaC,CAAU,EAEzDC,EAA4BC,GAAqB,CAC5DZ,EAAS,aAAa,QAAQ,MAAMY,CAAE,CACxC,EC1BO,MAAeC,CAAW,CAA1B,aAAA,CAGL,KAAS,OAASb,CAAA,CAElB,QAAQc,EAAoC,CAC1C,MAAM,IAAI,MAAM,6BAA6B,KAAK,YAAY,IAAI,EAAE,CACtE,CAEA,OAAOA,EAAoC,CACzC,MAAM,IAAI,MAAM,4BAA4B,KAAK,YAAY,IAAI,EAAE,CACrE,CAEA,UAAUA,EAAoC,CAC5C,MAAM,IAAI,MAAM,+BAA+B,KAAK,YAAY,IAAI,EAAE,CACxE,CAEA,UAAUA,EAAoC,CAC5C,MAAM,IAAI,MAAM,+BAA+B,KAAK,YAAY,IAAI,EAAE,CACxE,CAEA,UAAUA,EAAoC,CAC5C,MAAM,IAAI,MAAM,+BAA+B,KAAK,YAAY,IAAI,EAAE,CACxE,CACF,CCsFA,MAAMC,UAAqBF,CAAW,CAAtC,aAAA,CAAA,MAAA,GAAA,SAAA,EACE,KAAA,SAAW,eAAA,CAEX,OAAOG,EAA0B,CAC/B,OAAO,KAAK,OAAO,IAAiB,KAAK,SAAU,CAAE,OAAAA,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,EAAU,GAAG,QAAQ7B,CAAE,GAC9B,KAElB,GAAGuC,CACL,CAAC,ECxBU+D,GAAsB,CACjClG,EACAmC,IAEAC,WAAS,CACP,SAAUH,EAAmB,SAAS,KAAKjC,CAAM,EACjD,QAAS,UACU,MAAM2B,EAAS,GAAG,OAAO3B,CAAM,GAChC,KAElB,GAAGmC,CACL,CAAC,EAEUgE,GAAwB,CACnCvG,EACAuC,IAEAC,WAAS,CACP,SAAUH,EAAmB,SAAS,OAAOrC,CAAE,EAC/C,QAAS,UACU,MAAM+B,EAAS,GAAG,QAAQ/B,CAAE,GAC7B,KAElB,GAAGuC,CACL,CAAC,ECxBUiE,GAAoB,CAC/BpG,EACAmC,IAEAC,WAAS,CACP,SAAUH,EAAmB,OAAO,KAAKjC,CAAM,EAC/C,QAAS,UACU,MAAM6B,EAAO,GAAG,OAAO7B,CAAM,GAC9B,KAElB,GAAGmC,CACL,CAAC,EAEUkE,GAAsB,CACjCzG,EACAuC,IAEAC,WAAS,CACP,SAAUH,EAAmB,OAAO,OAAOrC,CAAE,EAC7C,QAAS,UACU,MAAMiC,EAAO,GAAG,QAAQjC,CAAE,GAC3B,KAElB,GAAGuC,CACL,CAAC"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/instance.ts","../src/api/common/HttpClient.ts","../src/api/events/v1/index.ts","../src/api/events/index.ts","../src/api/auth/v1/index.ts","../src/api/auth/index.ts","../src/api/categories/v1/index.ts","../src/api/categories/index.ts","../src/api/collections/v1/index.ts","../src/api/collections/index.ts","../src/api/users/v1/index.ts","../src/api/users/index.ts","../src/api/files/v1/index.ts","../src/api/files/index.ts","../src/api/onboardings/v1/index.ts","../src/api/onboardings/index.ts","../src/api/event-attendances/v1/index.ts","../src/api/event-attendances/index.ts","../src/api/forgot-password/v1/index.ts","../src/api/forgot-password/index.ts","../src/api/countries/v1/index.ts","../src/api/countries/index.ts","../src/api/counties/v1/index.ts","../src/api/counties/index.ts","../src/api/cities/v1/index.ts","../src/api/cities/index.ts","../src/api/EventhrHttp.ts","../src/api/eventhrKeys.ts","../src/api/events/events.hooks.ts","../src/query-client.ts","../src/api/events/events.cache.ts","../src/api/auth/auth.hooks.ts","../src/api/categories/categories.hooks.ts","../src/api/categories/categories.cache.ts","../src/api/collections/collections.hooks.ts","../src/api/collections/collections.cache.ts","../src/api/users/users.hooks.ts","../src/api/files/files.hooks.ts","../src/api/onboardings/onboardings.hooks.ts","../src/api/onboardings/onboardings.cache.ts","../src/api/event-attendances/event-attendances.hooks.ts","../src/api/event-attendances/event-attendances.cache.ts","../src/api/forgot-password/forgot-password.hooks.ts","../src/api/countries/countries.hooks.ts","../src/api/counties/counties.hooks.ts","../src/api/cities/cities.hooks.ts"],"sourcesContent":["import axios, { type AxiosInstance, type InternalAxiosRequestConfig } from 'axios';\n\nconst instance: AxiosInstance = axios.create({\n baseURL: '',\n headers: {\n 'Content-Type': 'application/json',\n },\n});\n\nexport const setBaseUrl = (url: string): void => {\n instance.defaults.baseURL = url;\n};\n\nexport const setHeaders = (headers: Record<string, string>): void => {\n Object.assign(instance.defaults.headers.common, headers);\n};\n\nexport const removeHeader = (key: string): void => {\n delete (instance.defaults.headers.common as Record<string, string>)[key];\n};\n\nexport const addRequestInterceptor = (\n onFulfilled: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>,\n onRejected?: (error: unknown) => unknown,\n): number => instance.interceptors.request.use(onFulfilled, onRejected);\n\nexport const removeRequestInterceptor = (id: number): void => {\n instance.interceptors.request.eject(id);\n};\n\nexport { instance };\nexport default instance;\n","import instance from '../../instance';\n\nexport abstract class HttpClient {\n abstract endpoint: string;\n\n readonly client = instance;\n\n list(..._args: unknown[]): Promise<unknown> {\n throw new Error(`list() not implemented on ${this.constructor.name}`);\n }\n\n get(..._args: unknown[]): Promise<unknown> {\n throw new Error(`get() not implemented on ${this.constructor.name}`);\n }\n\n create(..._args: unknown[]): Promise<unknown> {\n throw new Error(`create() not implemented on ${this.constructor.name}`);\n }\n\n update(..._args: unknown[]): Promise<unknown> {\n throw new Error(`update() not implemented on ${this.constructor.name}`);\n }\n\n remove(..._args: unknown[]): Promise<unknown> {\n throw new Error(`remove() not implemented on ${this.constructor.name}`);\n }\n}\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { BaseValueObject, Coordinates, CountryVo, FileVo, PageRequest, Page } from '@/api/common/types';\n\n\nexport interface EventAddress {\n countryVo?: CountryVo;\n address: string;\n postalCode?: string;\n locationName?: string;\n}\n\nexport interface EventAddressDto {\n cityId: string;\n address: string;\n postalCode?: string;\n locationName?: string;\n}\n\nexport type EventFeature =\n | 'FREE_ENTRY'\n | 'PAID_ENTRY'\n | 'RESERVATION_REQUIRED'\n | 'INDOOR'\n | 'OUTDOOR'\n | 'FREE_PARKING_NEARBY'\n | 'PAID_PARKING_NEARBY'\n | 'NO_PARKING_AVAILABLE'\n | 'PUBLIC_TRANSPORT_NEARBY'\n | 'WHEELCHAIR_ACCESSIBLE'\n | 'ACCESSIBLE_RESTROOM'\n | 'FAMILY_FRIENDLY'\n | 'PET_FRIENDLY'\n | 'FOOD_AVAILABLE'\n | 'DRINKS_AVAILABLE'\n | 'VEGAN_VEGETARIAN_OPTIONS'\n | 'CARD_PAYMENT_AVAILABLE'\n | 'CASH_ONLY'\n | 'NON_SMOKING'\n | 'SMOKING_ALLOWED'\n | 'ADULTS_ONLY_18_PLUS'\n | 'CLOAKROOM_AVAILABLE'\n | 'BABY_CHANGING_FACILITY';\n\nexport interface SubEvent {\n id: string;\n name: string;\n description?: string;\n startAt: string;\n endAt: string;\n address: EventAddress;\n coordinates: Coordinates;\n price?: number;\n capacity?: number;\n images: FileVo[];\n features?: EventFeature[];\n attendeeCount?: number;\n isDeleted: boolean;\n createdAt: string;\n updatedAt: string;\n isSaved: boolean;\n}\n\nexport interface Event {\n id: string;\n name: string;\n description?: string;\n startAt: string;\n endAt: string;\n address: EventAddress;\n coordinates: Coordinates;\n price?: number;\n capacity?: number;\n organizer: BaseValueObject;\n category: BaseValueObject;\n features?: EventFeature[];\n attendeeCount?: number;\n images?: FileVo[];\n parentEvent?: BaseValueObject;\n subEvents?: SubEvent[];\n isDeleted: boolean;\n createdAt: string;\n updatedAt: string;\n isSaved: boolean;\n}\n\nexport interface CreateEventDto {\n name: string;\n description?: string;\n startAt: string;\n endAt: string;\n address: EventAddressDto;\n coordinates: Coordinates;\n price: number;\n capacity?: number;\n imageIds?: string[];\n features?: EventFeature[];\n categoryId: string;\n subOrganizerId?: string;\n parentEventId?: string;\n}\n\nexport type UpdateEventDto = CreateEventDto;\n\nexport interface GetEventsParams extends PageRequest {\n name?: string;\n latitude?: number;\n longitude?: number;\n radiusKm?: number;\n}\n\n\n\nclass EventsClient extends HttpClient {\n endpoint = 'api/v1/events';\n\n getAll(params?: GetEventsParams) {\n return this.client.get<Page<Event>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<Event>(`${this.endpoint}/${id}`);\n }\n\n create(data: CreateEventDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n update(id: string, data: UpdateEventDto) {\n return this.client.put<void>(`${this.endpoint}/${id}`, data);\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new EventsClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type {\n Event,\n EventAddress,\n EventAddressDto,\n EventFeature,\n SubEvent,\n CreateEventDto,\n UpdateEventDto,\n GetEventsParams,\n} from './v1';\nexport type { BaseValueObject, Coordinates, CountryVo, FileVo } from '@/api/common/types';\n\nexport const Events = { v1 };\nexport default Events;\n","import { HttpClient } from '@/api/common/HttpClient';\n\n\nexport interface AuthTokenResponse {\n authenticationToken: string;\n refreshToken: string;\n}\n\nexport interface LoginDto {\n username: string;\n password: string;\n notificationToken?: string;\n}\n\nexport interface RefreshTokenDto {\n refreshToken: string;\n}\n\nexport type SocialProvider = 'GOOGLE' | 'FACEBOOK';\n\nexport interface SocialAuthDto {\n provider: SocialProvider;\n token: string;\n}\n\nexport interface SocialAuthResponse {\n email: string;\n name: string;\n provider: string;\n}\n\n\n\nclass AuthClient extends HttpClient {\n endpoint = 'api/v1/authentication/user';\n\n login(data: LoginDto) {\n return this.client.post<AuthTokenResponse>(this.endpoint, data);\n }\n\n social(data: SocialAuthDto) {\n return this.client.post<SocialAuthResponse>(`${this.endpoint}/social`, data);\n }\n\n refresh(data: RefreshTokenDto) {\n return this.client.post<AuthTokenResponse>(`${this.endpoint}/refresh`, data);\n }\n}\n\nconst v1 = new AuthClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { AuthTokenResponse, LoginDto, RefreshTokenDto, SocialProvider, SocialAuthDto, SocialAuthResponse } from './v1';\n\nexport const Auth = { v1 };\nexport default Auth;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page } from '@/api/common/types';\n\n\nexport interface Category {\n id: string;\n name: string;\n isDeleted: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateCategoryDto {\n name: string;\n}\n\nexport interface UpdateCategoryDto {\n name: string;\n}\n\nexport interface GetCategoriesParams extends PageRequest {\n name?: string;\n}\n\n\n\nclass CategoriesClient extends HttpClient {\n endpoint = 'api/v1/categories';\n\n getAll(params?: GetCategoriesParams) {\n return this.client.get<Page<Category>>(this.endpoint, { params });\n }\n\n create(data: CreateCategoryDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n update(id: string, data: UpdateCategoryDto) {\n return this.client.put<void>(`${this.endpoint}/${id}`, data);\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new CategoriesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type {\n Category,\n CreateCategoryDto,\n UpdateCategoryDto,\n GetCategoriesParams,\n} from './v1';\n\nexport const Categories = { v1 };\nexport default Categories;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { BaseValueObject, PageRequest, Page } from '@/api/common/types';\n\nexport interface Collection {\n id: string;\n name: string;\n customer: BaseValueObject;\n events: BaseValueObject[];\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateCollectionDto {\n name: string;\n eventIds?: string[];\n}\n\nexport interface UpdateCollectionDto {\n name: string;\n eventIds: string[];\n}\n\nexport interface GetCollectionsParams extends PageRequest {\n name?: string;\n}\n\nclass CollectionsClient extends HttpClient {\n endpoint = 'api/v1/collections';\n\n getAll(params?: GetCollectionsParams) {\n return this.client.get<Page<Collection>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<Collection>(`${this.endpoint}/${id}`);\n }\n\n create(data: CreateCollectionDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n update(id: string, data: UpdateCollectionDto) {\n return this.client.put<void>(`${this.endpoint}/${id}`, data);\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n\n removeEvent(eventId: string) {\n return this.client.delete<void>(`${this.endpoint}/events/${eventId}`);\n }\n}\n\nconst v1 = new CollectionsClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type {\n Collection,\n CreateCollectionDto,\n UpdateCollectionDto,\n GetCollectionsParams,\n} from './v1';\n\nexport const Collections = { v1 };\nexport default Collections;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page } from '@/api/common/types';\n\n\nexport type UserRole = 'ADMIN' | 'CUSTOMER' | 'PRIVATE_ORGANIZER' | 'PUBLIC_ORGANIZER' | 'SUB_ORGANIZER';\n\nexport interface User {\n id: string;\n name: string;\n username: string;\n imageId?: string;\n createdAt: string;\n updatedAt: string;\n emailVerified: boolean;\n onboarded: boolean;\n}\n\nexport interface CreateUserDto {\n name: string;\n username: string;\n password: string;\n}\n\nexport interface CreateOrganizerUserDto {\n name: string;\n username: string;\n password: string;\n userRole: UserRole;\n}\n\nexport interface EditUserDto {\n name: string;\n username: string;\n password?: string;\n imageId?: string;\n}\n\n\n\nclass UsersClient extends HttpClient {\n endpoint = 'api/v1/users';\n\n getAll(params?: PageRequest) {\n return this.client.get<Page<User>>(this.endpoint, { params });\n }\n\n getProfile() {\n return this.client.get<User>(`${this.endpoint}/profile`);\n }\n\n create(data: CreateUserDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n createOrganizer(data: CreateOrganizerUserDto) {\n return this.client.post<void>(`${this.endpoint}/organizer`, data);\n }\n\n createSubOrganizer(data: CreateUserDto) {\n return this.client.post<void>(`${this.endpoint}/sub-organizer`, data);\n }\n\n verify(userId: string) {\n return this.client.patch<void>(`${this.endpoint}/${userId}/verify`);\n }\n\n edit(id: string, data: EditUserDto) {\n return this.client.put<void>(`${this.endpoint}/${id}`, data);\n }\n}\n\nconst v1 = new UsersClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { User, UserRole, CreateUserDto, CreateOrganizerUserDto, EditUserDto } from './v1';\n\nexport const Users = { v1 };\nexport default Users;\n","import { HttpClient } from '@/api/common/HttpClient';\n\n\nexport type FileType = 'IMAGE' | 'VIDEO' | 'DOCUMENT';\n\nexport interface UploadedFile {\n id: string;\n fileName: string;\n url: string;\n fileSize: number;\n fileType: FileType;\n createdAt: string;\n updatedAt: string;\n}\n\n\n\nclass FilesClient extends HttpClient {\n endpoint = 'api/v1/files';\n\n upload(file: File) {\n const formData = new FormData();\n formData.append('file', file);\n return this.client.post<UploadedFile>(this.endpoint, formData, {\n headers: { 'Content-Type': 'multipart/form-data' },\n });\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new FilesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { UploadedFile, FileType } from './v1';\n\nexport const Files = { v1 };\nexport default Files;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { BaseValueObject, CountryVo } from '@/api/common/types';\n\n\nexport interface Onboarding {\n id: string;\n user: BaseValueObject;\n categories: BaseValueObject[];\n countries: CountryVo[];\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateOnboardingDto {\n categoryIds: string[];\n cityIds: string[];\n}\n\nexport type UpdateOnboardingDto = CreateOnboardingDto;\n\n\n\nclass OnboardingsClient extends HttpClient {\n endpoint = 'api/v1/onboardings';\n\n getByUser() {\n return this.client.get<Onboarding>(this.endpoint);\n }\n\n create(data: CreateOnboardingDto) {\n return this.client.post<Onboarding>(this.endpoint, data);\n }\n\n update(data: UpdateOnboardingDto) {\n return this.client.put<Onboarding>(this.endpoint, data);\n }\n}\n\nconst v1 = new OnboardingsClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { Onboarding, CreateOnboardingDto, UpdateOnboardingDto } from './v1';\n\nexport const Onboardings = { v1 };\nexport default Onboardings;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page, BaseValueObject } from '@/api/common/types';\n\n\nexport interface EventAttendance {\n id: string;\n user: BaseValueObject;\n event: BaseValueObject;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateEventAttendanceDto {\n eventId: string;\n}\n\nexport interface GetEventAttendancesParams extends PageRequest {\n 'event-id'?: string;\n}\n\n\n\nclass EventAttendancesClient extends HttpClient {\n endpoint = 'api/v1/event-attendances';\n\n getAll(params?: GetEventAttendancesParams) {\n return this.client.get<Page<EventAttendance>>(this.endpoint, { params });\n }\n\n create(data: CreateEventAttendanceDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n remove(id: string) {\n return this.client.delete<void>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new EventAttendancesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { EventAttendance, CreateEventAttendanceDto, GetEventAttendancesParams } from './v1';\n\nexport const EventAttendances = { v1 };\nexport default EventAttendances;\n","import { HttpClient } from '@/api/common/HttpClient';\n\n\nexport interface ForgotPasswordCreateDto {\n email: string;\n}\n\nexport interface ChangeForgotPasswordDto {\n password: string;\n}\n\n\n\nclass ForgotPasswordClient extends HttpClient {\n endpoint = 'api/v1/forgot-password';\n\n create(data: ForgotPasswordCreateDto) {\n return this.client.post<void>(this.endpoint, data);\n }\n\n changePassword(id: string, data: ChangeForgotPasswordDto) {\n return this.client.patch<void>(`${this.endpoint}/${id}/change`, data);\n }\n}\n\nconst v1 = new ForgotPasswordClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { ForgotPasswordCreateDto, ChangeForgotPasswordDto } from './v1';\n\nexport const ForgotPassword = { v1 };\nexport default ForgotPassword;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page } from '@/api/common/types';\n\n\nexport interface Country {\n id: string;\n name: string;\n}\n\nexport interface GetCountriesParams extends PageRequest {\n name?: string;\n}\n\n\n\nclass CountriesClient extends HttpClient {\n endpoint = 'api/v1/countries';\n\n getAll(params?: GetCountriesParams) {\n return this.client.get<Page<Country>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<Country>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new CountriesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { Country, GetCountriesParams } from './v1';\n\nexport const Countries = { v1 };\nexport default Countries;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page, BaseValueObject } from '@/api/common/types';\n\n\nexport interface County {\n id: string;\n name: string;\n country: BaseValueObject;\n}\n\nexport interface GetCountiesParams extends PageRequest {\n name?: string;\n 'country-id'?: string;\n}\n\n\n\nclass CountiesClient extends HttpClient {\n endpoint = 'api/v1/counties';\n\n getAll(params?: GetCountiesParams) {\n return this.client.get<Page<County>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<County>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new CountiesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { County, GetCountiesParams } from './v1';\n\nexport const Counties = { v1 };\nexport default Counties;\n","import { HttpClient } from '@/api/common/HttpClient';\nimport type { PageRequest, Page, BaseValueObject } from '@/api/common/types';\n\n\nexport interface City {\n id: string;\n name: string;\n country: BaseValueObject;\n county: BaseValueObject;\n}\n\nexport interface GetCitiesParams extends PageRequest {\n name?: string;\n 'country-id'?: string;\n 'county-id'?: string;\n}\n\n\n\nclass CitiesClient extends HttpClient {\n endpoint = 'api/v1/cities';\n\n getAll(params?: GetCitiesParams) {\n return this.client.get<Page<City>>(this.endpoint, { params });\n }\n\n getById(id: string) {\n return this.client.get<City>(`${this.endpoint}/${id}`);\n }\n}\n\nconst v1 = new CitiesClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type { City, GetCitiesParams } from './v1';\n\nexport const Cities = { v1 };\nexport default Cities;\n","import { setBaseUrl, setHeaders, removeHeader, addRequestInterceptor, removeRequestInterceptor } from '../instance';\nimport type { InternalAxiosRequestConfig } from 'axios';\nimport Events from './events';\nimport Auth from './auth';\nimport Categories from './categories';\nimport Collections from './collections';\nimport Users from './users';\nimport Files from './files';\nimport Onboardings from './onboardings';\nimport EventAttendances from './event-attendances';\nimport ForgotPassword from './forgot-password';\nimport Countries from './countries';\nimport Counties from './counties';\nimport Cities from './cities';\n\nexport interface EventhrHttpConfig {\n baseUrl?: string;\n headers?: Record<string, string>;\n}\n\nexport class EventhrHttpClient {\n readonly Auth = Auth;\n readonly Events = Events;\n readonly Categories = Categories;\n readonly Collections = Collections;\n readonly Users = Users;\n readonly Files = Files;\n readonly Onboardings = Onboardings;\n readonly EventAttendances = EventAttendances;\n readonly ForgotPassword = ForgotPassword;\n readonly Countries = Countries;\n readonly Counties = Counties;\n readonly Cities = Cities;\n\n configure({ baseUrl, headers }: EventhrHttpConfig): void {\n if (baseUrl !== undefined) {\n setBaseUrl(baseUrl);\n }\n if (headers !== undefined) {\n setHeaders(headers);\n }\n }\n\n removeHeader(key: string): void {\n removeHeader(key);\n }\n\n addInterceptor(\n onFulfilled: (\n config: InternalAxiosRequestConfig,\n ) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>,\n onRejected?: (error: unknown) => unknown,\n ): number {\n return addRequestInterceptor(onFulfilled, onRejected);\n }\n\n removeInterceptor(id: number): void {\n removeRequestInterceptor(id);\n }\n}\n\nconst EventhrHttp = new EventhrHttpClient();\nexport default EventhrHttp;\n","import type { GetEventsParams } from './events';\nimport type { GetCategoriesParams } from './categories';\nimport type { GetCollectionsParams } from './collections';\nimport type { GetCountriesParams } from './countries';\nimport type { GetCountiesParams } from './counties';\nimport type { GetCitiesParams } from './cities';\nimport type { GetEventAttendancesParams } from './event-attendances';\nimport type { PageRequest } from './common/types';\n\nexport const EVENTHR_QUERY_KEYS = {\n events: {\n all: ['events'] as const,\n list: (params?: GetEventsParams) => [...EVENTHR_QUERY_KEYS.events.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.events.all, 'detail', id] as const,\n },\n categories: {\n all: ['categories'] as const,\n list: (params?: GetCategoriesParams) =>\n [...EVENTHR_QUERY_KEYS.categories.all, 'list', params] as const,\n },\n collections: {\n all: ['collections'] as const,\n list: (params?: GetCollectionsParams) =>\n [...EVENTHR_QUERY_KEYS.collections.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.collections.all, 'detail', id] as const,\n },\n users: {\n all: ['users'] as const,\n list: (params?: PageRequest) => [...EVENTHR_QUERY_KEYS.users.all, 'list', params] as const,\n profile: () => [...EVENTHR_QUERY_KEYS.users.all, 'profile'] as const,\n },\n files: {\n all: ['files'] as const,\n },\n onboardings: {\n all: ['onboardings'] as const,\n detail: () => [...EVENTHR_QUERY_KEYS.onboardings.all, 'detail'] as const,\n },\n eventAttendances: {\n all: ['event-attendances'] as const,\n list: (params?: GetEventAttendancesParams) =>\n [...EVENTHR_QUERY_KEYS.eventAttendances.all, 'list', params] as const,\n },\n countries: {\n all: ['countries'] as const,\n list: (params?: GetCountriesParams) =>\n [...EVENTHR_QUERY_KEYS.countries.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.countries.all, 'detail', id] as const,\n },\n counties: {\n all: ['counties'] as const,\n list: (params?: GetCountiesParams) =>\n [...EVENTHR_QUERY_KEYS.counties.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.counties.all, 'detail', id] as const,\n },\n cities: {\n all: ['cities'] as const,\n list: (params?: GetCitiesParams) =>\n [...EVENTHR_QUERY_KEYS.cities.all, 'list', params] as const,\n detail: (id: string) => [...EVENTHR_QUERY_KEYS.cities.all, 'detail', id] as const,\n },\n} as const;\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, QueryOptions } from '@/api/common/types';\nimport type { CreateEventDto, Event, GetEventsParams, UpdateEventDto } from './v1';\nimport Events from './index';\n\n\n\nexport const useGetEventsQuery = (\n params?: GetEventsParams,\n options?: QueryOptions<Page<Event>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.events.list(params),\n queryFn: async () => {\n const response = await Events.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetEventByIdQuery = (\n id: string,\n options?: QueryOptions<Event>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.events.detail(id),\n queryFn: async () => {\n const response = await Events.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n\n\n\nexport const useCreateEventMutation = (\n options?: MutationOptions<void, CreateEventDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateEventDto) => {\n await Events.v1.create(data);\n },\n ...options,\n });\n\nexport const useUpdateEventMutation = (\n options?: MutationOptions<void, { id: string; data: UpdateEventDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: UpdateEventDto }) => {\n await Events.v1.update(id, data);\n },\n ...options,\n });\n\nexport const useDeleteEventMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await Events.v1.remove(id);\n },\n ...options,\n });\n","import { QueryClient } from '@tanstack/react-query';\n\nexport const queryClient = new QueryClient({\n defaultOptions: {\n queries: {\n retry: 1,\n refetchOnWindowFocus: false,\n staleTime: 0,\n },\n mutations: {\n retry: 0,\n },\n },\n});\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page } from '@/api/common/types';\nimport type { Event } from './v1';\n\nexport const invalidateEventsCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.events.all });\n\nexport type EventSavedContext = {\n previousLists: Array<[readonly unknown[], Page<Event> | undefined]>;\n previousDetail: Event | undefined;\n};\n\ntype IsSavedValue = boolean | 'toggle';\n\nfunction applyIsSaved(event: Event, value: IsSavedValue): Event {\n return { ...event, isSaved: value === 'toggle' ? !event.isSaved : value };\n}\n\nexport function createOptimisticIsSavedUpdater<TVariables extends { eventId: string }>(\n queryClient: ReturnType<typeof import('@tanstack/react-query').useQueryClient>,\n value: IsSavedValue,\n userOnMutate?: MutationOptions<void, TVariables>['onMutate'],\n) {\n return async (variables: TVariables, mutationContext: unknown): Promise<EventSavedContext> => {\n const { eventId } = variables;\n const listKey = [...EVENTHR_QUERY_KEYS.events.all, 'list'];\n\n await queryClient.cancelQueries({ queryKey: EVENTHR_QUERY_KEYS.events.all });\n\n const previousLists = queryClient.getQueriesData<Page<Event>>({ queryKey: listKey });\n\n queryClient.setQueriesData<Page<Event>>({ queryKey: listKey }, (oldData) => {\n if (!oldData) return oldData;\n return {\n ...oldData,\n content: oldData.content.map((event) =>\n event.id === eventId ? applyIsSaved(event, value) : event,\n ),\n };\n });\n\n const detailKey = EVENTHR_QUERY_KEYS.events.detail(eventId);\n const previousDetail = queryClient.getQueryData<Event>(detailKey);\n if (previousDetail) {\n queryClient.setQueryData<Event>(detailKey, applyIsSaved(previousDetail, value));\n }\n\n await userOnMutate?.(variables, mutationContext as never);\n\n return { previousLists, previousDetail };\n };\n}\n\nexport function createIsSavedRollback<TVariables extends { eventId: string }>(\n queryClient: ReturnType<typeof import('@tanstack/react-query').useQueryClient>,\n userOnError?: MutationOptions<void, TVariables>['onError'],\n) {\n return (error: Error, variables: TVariables, onMutateResult: EventSavedContext | undefined, mutationContext: unknown) => {\n onMutateResult?.previousLists.forEach(([queryKey, data]) => {\n queryClient.setQueryData(queryKey, data);\n });\n if (onMutateResult?.previousDetail) {\n queryClient.setQueryData(\n EVENTHR_QUERY_KEYS.events.detail(variables.eventId),\n onMutateResult.previousDetail,\n );\n }\n userOnError?.(error, variables, onMutateResult, mutationContext as never);\n };\n}\n","import { useMutation } from '@tanstack/react-query';\n\nimport type { MutationOptions } from '@/api/common/types';\nimport type { AuthTokenResponse, LoginDto, RefreshTokenDto, SocialAuthDto, SocialAuthResponse } from './v1';\nimport Auth from './index';\n\nexport const useLoginMutation = (\n options?: MutationOptions<AuthTokenResponse, LoginDto>,\n) =>\n useMutation({\n mutationFn: async (data: LoginDto) => {\n const response = await Auth.v1.login(data);\n return response.data;\n },\n ...options,\n });\n\nexport const useSocialAuthMutation = (\n options?: MutationOptions<SocialAuthResponse, SocialAuthDto>,\n) =>\n useMutation({\n mutationFn: async (data: SocialAuthDto) => {\n const response = await Auth.v1.social(data);\n return response.data;\n },\n ...options,\n });\n\nexport const useRefreshTokenMutation = (\n options?: MutationOptions<AuthTokenResponse, RefreshTokenDto>,\n) =>\n useMutation({\n mutationFn: async (data: RefreshTokenDto) => {\n const response = await Auth.v1.refresh(data);\n return response.data;\n },\n ...options,\n });\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, QueryOptions } from '@/api/common/types';\nimport type { Category, CreateCategoryDto, GetCategoriesParams, UpdateCategoryDto } from './v1';\nimport Categories from './index';\n\n\n\nexport const useGetCategoriesQuery = (\n params?: GetCategoriesParams,\n options?: QueryOptions<Page<Category>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.categories.list(params),\n queryFn: async () => {\n const response = await Categories.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\n\n\nexport const useCreateCategoryMutation = (\n options?: MutationOptions<void, CreateCategoryDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateCategoryDto) => {\n await Categories.v1.create(data);\n },\n ...options,\n });\n\nexport const useUpdateCategoryMutation = (\n options?: MutationOptions<void, { id: string; data: UpdateCategoryDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: UpdateCategoryDto }) => {\n await Categories.v1.update(id, data);\n },\n ...options,\n });\n\nexport const useDeleteCategoryMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await Categories.v1.remove(id);\n },\n ...options,\n });\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\n\nexport const invalidateCategoriesCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.categories.all });\n","import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, QueryOptions } from '@/api/common/types';\nimport { createOptimisticIsSavedUpdater, createIsSavedRollback, type EventSavedContext } from '@/api/events/events.cache';\nimport type { Collection, CreateCollectionDto, GetCollectionsParams, UpdateCollectionDto } from './v1';\nimport Collections from './index';\n\n\n\nexport const useGetCollectionsQuery = (\n params?: GetCollectionsParams,\n options?: QueryOptions<Page<Collection>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.collections.list(params),\n queryFn: async () => {\n const response = await Collections.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetCollectionByIdQuery = (\n id: string,\n options?: QueryOptions<Collection>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.collections.detail(id),\n queryFn: async () => {\n const response = await Collections.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n\nexport const useCreateCollectionMutation = (\n options?: MutationOptions<void, CreateCollectionDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateCollectionDto) => {\n await Collections.v1.create(data);\n },\n ...options,\n });\n\nexport const useUpdateCollectionMutation = (\n options?: MutationOptions<void, { id: string; data: UpdateCollectionDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: UpdateCollectionDto }) => {\n await Collections.v1.update(id, data);\n },\n ...options,\n });\n\nexport const useDeleteCollectionMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await Collections.v1.remove(id);\n },\n ...options,\n });\n\nfunction createCollectionsInvalidator<TVariables>(\n queryClient: ReturnType<typeof useQueryClient>,\n userOnSettled?: MutationOptions<void, TVariables>['onSettled'],\n) {\n return (data: void | undefined, error: Error | null, variables: TVariables, onMutateResult: EventSavedContext | undefined, mutationContext: unknown) => {\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.collections.all });\n userOnSettled?.(data, error, variables, onMutateResult, mutationContext as never);\n };\n}\n\nexport const useRemoveEventFromCollectionsMutation = (\n options?: MutationOptions<void, { eventId: string }>,\n) => {\n const queryClient = useQueryClient();\n const { onMutate, onError, onSettled, ...restOptions } = options ?? {};\n\n return useMutation<void, Error, { eventId: string }, EventSavedContext>({\n mutationFn: async ({ eventId }) => {\n await Collections.v1.removeEvent(eventId);\n },\n onMutate: createOptimisticIsSavedUpdater(queryClient, false, onMutate),\n onError: createIsSavedRollback(queryClient, onError),\n onSettled: createCollectionsInvalidator(queryClient, onSettled),\n ...restOptions,\n });\n};\n\ntype SaveEventVariables = { id: string; eventId: string; data: UpdateCollectionDto };\n\nexport const useSaveEventMutation = (\n options?: MutationOptions<void, SaveEventVariables>,\n) => {\n const queryClient = useQueryClient();\n const { onMutate, onError, onSettled, ...restOptions } = options ?? {};\n\n return useMutation<void, Error, SaveEventVariables, EventSavedContext>({\n mutationFn: async ({ id, data }) => {\n await Collections.v1.update(id, data);\n },\n onMutate: createOptimisticIsSavedUpdater(queryClient, 'toggle', onMutate),\n onError: createIsSavedRollback(queryClient, onError),\n onSettled: createCollectionsInvalidator(queryClient, onSettled),\n ...restOptions,\n });\n};\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\n\nexport const invalidateCollectionsCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.collections.all });\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, PageRequest, QueryOptions } from '@/api/common/types';\nimport type { CreateUserDto, CreateOrganizerUserDto, EditUserDto, User } from './v1';\nimport Users from './index';\n\n\n\nexport const useGetUsersQuery = (\n params?: PageRequest,\n options?: QueryOptions<Page<User>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.users.list(params),\n queryFn: async () => {\n const response = await Users.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetProfileQuery = (\n options?: QueryOptions<User>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.users.profile(),\n queryFn: async () => {\n const response = await Users.v1.getProfile();\n return response.data;\n },\n ...options,\n });\n\nexport const useCreateUserMutation = (\n options?: MutationOptions<void, CreateUserDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateUserDto) => {\n await Users.v1.create(data);\n },\n ...options,\n });\n\nexport const useEditUserMutation = (\n options?: MutationOptions<void, { id: string; data: EditUserDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: EditUserDto }) => {\n await Users.v1.edit(id, data);\n },\n ...options,\n });\n\nexport const useCreateOrganizerMutation = (\n options?: MutationOptions<void, CreateOrganizerUserDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateOrganizerUserDto) => {\n await Users.v1.createOrganizer(data);\n },\n ...options,\n });\n\nexport const useCreateSubOrganizerMutation = (\n options?: MutationOptions<void, CreateUserDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateUserDto) => {\n await Users.v1.createSubOrganizer(data);\n },\n ...options,\n });\n\nexport const useVerifyUserMutation = (\n options?: MutationOptions<void, { userId: string }>,\n) =>\n useMutation({\n mutationFn: async ({ userId }: { userId: string }) => {\n await Users.v1.verify(userId);\n },\n ...options,\n });\n","import { useMutation } from '@tanstack/react-query';\n\nimport type { MutationOptions } from '@/api/common/types';\nimport type { UploadedFile } from './v1';\nimport Files from './index';\n\nexport const useUploadFileMutation = (\n options?: MutationOptions<UploadedFile, File>,\n) =>\n useMutation({\n mutationFn: async (file: File) => {\n const response = await Files.v1.upload(file);\n return response.data;\n },\n ...options,\n });\n\nexport const useDeleteFileMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await Files.v1.remove(id);\n },\n ...options,\n });\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, QueryOptions } from '@/api/common/types';\nimport type { CreateOnboardingDto, Onboarding, UpdateOnboardingDto } from './v1';\nimport Onboardings from './index';\n\n\n\nexport const useGetOnboardingQuery = (\n options?: QueryOptions<Onboarding>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.onboardings.detail(),\n queryFn: async () => {\n const response = await Onboardings.v1.getByUser();\n return response.data;\n },\n ...options,\n });\n\nexport const useCreateOnboardingMutation = (\n options?: MutationOptions<Onboarding, CreateOnboardingDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateOnboardingDto) => {\n const response = await Onboardings.v1.create(data);\n return response.data;\n },\n ...options,\n });\n\nexport const useUpdateOnboardingMutation = (\n options?: MutationOptions<Onboarding, UpdateOnboardingDto>,\n) =>\n useMutation({\n mutationFn: async (data: UpdateOnboardingDto) => {\n const response = await Onboardings.v1.update(data);\n return response.data;\n },\n ...options,\n });\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\n\nexport const invalidateOnboardingsCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.onboardings.all });\n","import { useMutation, useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, QueryOptions } from '@/api/common/types';\nimport type { CreateEventAttendanceDto, EventAttendance, GetEventAttendancesParams } from './v1';\nimport EventAttendances from './index';\n\n\n\nexport const useGetEventAttendancesQuery = (\n params?: GetEventAttendancesParams,\n options?: QueryOptions<Page<EventAttendance>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.eventAttendances.list(params),\n queryFn: async () => {\n const response = await EventAttendances.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useCreateEventAttendanceMutation = (\n options?: MutationOptions<void, CreateEventAttendanceDto>,\n) =>\n useMutation({\n mutationFn: async (data: CreateEventAttendanceDto) => {\n await EventAttendances.v1.create(data);\n },\n ...options,\n });\n\nexport const useDeleteEventAttendanceMutation = (\n options?: MutationOptions<void, { id: string }>,\n) =>\n useMutation({\n mutationFn: async ({ id }: { id: string }) => {\n await EventAttendances.v1.remove(id);\n },\n ...options,\n });\n","import { queryClient } from '@/query-client';\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\n\nexport const invalidateEventAttendancesCache = (): Promise<void> =>\n queryClient.invalidateQueries({ queryKey: EVENTHR_QUERY_KEYS.eventAttendances.all });\n","import { useMutation } from '@tanstack/react-query';\n\nimport type { MutationOptions } from '@/api/common/types';\nimport type { ChangeForgotPasswordDto, ForgotPasswordCreateDto } from './v1';\nimport ForgotPassword from './index';\n\n\n\nexport const useCreateForgotPasswordMutation = (\n options?: MutationOptions<void, ForgotPasswordCreateDto>,\n) =>\n useMutation({\n mutationFn: async (data: ForgotPasswordCreateDto) => {\n await ForgotPassword.v1.create(data);\n },\n ...options,\n });\n\nexport const useChangePasswordMutation = (\n options?: MutationOptions<void, { id: string; data: ChangeForgotPasswordDto }>,\n) =>\n useMutation({\n mutationFn: async ({ id, data }: { id: string; data: ChangeForgotPasswordDto }) => {\n await ForgotPassword.v1.changePassword(id, data);\n },\n ...options,\n });\n","import { useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { Page, QueryOptions } from '@/api/common/types';\nimport type { Country, GetCountriesParams } from './v1';\nimport Countries from './index';\n\n\n\nexport const useGetCountriesQuery = (\n params?: GetCountriesParams,\n options?: QueryOptions<Page<Country>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.countries.list(params),\n queryFn: async () => {\n const response = await Countries.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetCountryByIdQuery = (\n id: string,\n options?: QueryOptions<Country>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.countries.detail(id),\n queryFn: async () => {\n const response = await Countries.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n","import { useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { Page, QueryOptions } from '@/api/common/types';\nimport type { County, GetCountiesParams } from './v1';\nimport Counties from './index';\n\n\n\nexport const useGetCountiesQuery = (\n params?: GetCountiesParams,\n options?: QueryOptions<Page<County>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.counties.list(params),\n queryFn: async () => {\n const response = await Counties.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetCountyByIdQuery = (\n id: string,\n options?: QueryOptions<County>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.counties.detail(id),\n queryFn: async () => {\n const response = await Counties.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n","import { useQuery } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { Page, QueryOptions } from '@/api/common/types';\nimport type { City, GetCitiesParams } from './v1';\nimport Cities from './index';\n\n\n\nexport const useGetCitiesQuery = (\n params?: GetCitiesParams,\n options?: QueryOptions<Page<City>>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.cities.list(params),\n queryFn: async () => {\n const response = await Cities.v1.getAll(params);\n return response.data;\n },\n ...options,\n });\n\nexport const useGetCityByIdQuery = (\n id: string,\n options?: QueryOptions<City>,\n) =>\n useQuery({\n queryKey: EVENTHR_QUERY_KEYS.cities.detail(id),\n queryFn: async () => {\n const response = await Cities.v1.getById(id);\n return response.data;\n },\n ...options,\n });\n"],"names":["instance","axios","setBaseUrl","url","setHeaders","headers","removeHeader","key","addRequestInterceptor","onFulfilled","onRejected","removeRequestInterceptor","id","HttpClient","_args","EventsClient","params","data","v1","Events","AuthClient","Auth","CategoriesClient","Categories","CollectionsClient","eventId","Collections","UsersClient","userId","Users","FilesClient","file","formData","Files","OnboardingsClient","Onboardings","EventAttendancesClient","EventAttendances","ForgotPasswordClient","ForgotPassword","CountriesClient","Countries","CountiesClient","Counties","CitiesClient","Cities","EventhrHttpClient","baseUrl","EventhrHttp","EVENTHR_QUERY_KEYS","useGetEventsQuery","options","useQuery","useGetEventByIdQuery","useCreateEventMutation","useMutation","useUpdateEventMutation","useDeleteEventMutation","queryClient","QueryClient","invalidateEventsCache","applyIsSaved","event","value","createOptimisticIsSavedUpdater","userOnMutate","variables","mutationContext","listKey","previousLists","oldData","detailKey","previousDetail","createIsSavedRollback","userOnError","error","onMutateResult","queryKey","useLoginMutation","useSocialAuthMutation","useRefreshTokenMutation","useGetCategoriesQuery","useCreateCategoryMutation","useUpdateCategoryMutation","useDeleteCategoryMutation","invalidateCategoriesCache","useGetCollectionsQuery","useGetCollectionByIdQuery","useCreateCollectionMutation","useUpdateCollectionMutation","useDeleteCollectionMutation","createCollectionsInvalidator","userOnSettled","useRemoveEventFromCollectionsMutation","useQueryClient","onMutate","onError","onSettled","restOptions","useSaveEventMutation","invalidateCollectionsCache","useGetUsersQuery","useGetProfileQuery","useCreateUserMutation","useEditUserMutation","useCreateOrganizerMutation","useCreateSubOrganizerMutation","useVerifyUserMutation","useUploadFileMutation","useDeleteFileMutation","useGetOnboardingQuery","useCreateOnboardingMutation","useUpdateOnboardingMutation","invalidateOnboardingsCache","useGetEventAttendancesQuery","useCreateEventAttendanceMutation","useDeleteEventAttendanceMutation","invalidateEventAttendancesCache","useCreateForgotPasswordMutation","useChangePasswordMutation","useGetCountriesQuery","useGetCountryByIdQuery","useGetCountiesQuery","useGetCountyByIdQuery","useGetCitiesQuery","useGetCityByIdQuery"],"mappings":"wKAEMA,EAA0BC,EAAM,OAAO,CAC3C,QAAS,GACT,QAAS,CACP,eAAgB,kBAAA,CAEpB,CAAC,EAEYC,EAAcC,GAAsB,CAC/CH,EAAS,SAAS,QAAUG,CAC9B,EAEaC,EAAcC,GAA0C,CACnE,OAAO,OAAOL,EAAS,SAAS,QAAQ,OAAQK,CAAO,CACzD,EAEaC,EAAgBC,GAAsB,CACjD,OAAQP,EAAS,SAAS,QAAQ,OAAkCO,CAAG,CACzE,EAEaC,EAAwB,CACnCC,EACAC,IACWV,EAAS,aAAa,QAAQ,IAAIS,EAAaC,CAAU,EAEzDC,EAA4BC,GAAqB,CAC5DZ,EAAS,aAAa,QAAQ,MAAMY,CAAE,CACxC,EC1BO,MAAeC,CAAW,CAA1B,aAAA,CAGL,KAAS,OAASb,CAAA,CAElB,QAAQc,EAAoC,CAC1C,MAAM,IAAI,MAAM,6BAA6B,KAAK,YAAY,IAAI,EAAE,CACtE,CAEA,OAAOA,EAAoC,CACzC,MAAM,IAAI,MAAM,4BAA4B,KAAK,YAAY,IAAI,EAAE,CACrE,CAEA,UAAUA,EAAoC,CAC5C,MAAM,IAAI,MAAM,+BAA+B,KAAK,YAAY,IAAI,EAAE,CACxE,CAEA,UAAUA,EAAoC,CAC5C,MAAM,IAAI,MAAM,+BAA+B,KAAK,YAAY,IAAI,EAAE,CACxE,CAEA,UAAUA,EAAoC,CAC5C,MAAM,IAAI,MAAM,+BAA+B,KAAK,YAAY,IAAI,EAAE,CACxE,CACF,CCsFA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,EAC/C,QAAS,UACU,MAAM6B,EAAO,GAAG,OAAO7B,CAAM,GAC9B,KAElB,GAAGmC,CACL,CAAC,EAEU0E,GAAsB,CACjCjH,EACAuC,IAEAC,WAAS,CACP,SAAUH,EAAmB,OAAO,OAAOrC,CAAE,EAC7C,QAAS,UACU,MAAMiC,EAAO,GAAG,QAAQjC,CAAE,GAC3B,KAElB,GAAGuC,CACL,CAAC"}
package/lib/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { InternalAxiosRequestConfig } from 'axios';
4
4
  import { QueryClient } from '@tanstack/react-query';
5
5
  import { UseMutationOptions } from '@tanstack/react-query';
6
6
  import { UseMutationResult } from '@tanstack/react-query';
7
+ import { useQueryClient } from '@tanstack/react-query';
7
8
  import { UseQueryOptions } from '@tanstack/react-query';
8
9
  import { UseQueryResult } from '@tanstack/react-query';
9
10
 
@@ -183,11 +184,19 @@ export declare interface CreateEventDto {
183
184
  parentEventId?: string;
184
185
  }
185
186
 
187
+ export declare function createIsSavedRollback<TVariables extends {
188
+ eventId: string;
189
+ }>(queryClient: ReturnType<useQueryClient>, userOnError?: MutationOptions<void, TVariables>['onError']): (error: Error, variables: TVariables, onMutateResult: EventSavedContext | undefined, mutationContext: unknown) => void;
190
+
186
191
  export declare interface CreateOnboardingDto {
187
192
  categoryIds: string[];
188
193
  cityIds: string[];
189
194
  }
190
195
 
196
+ export declare function createOptimisticIsSavedUpdater<TVariables extends {
197
+ eventId: string;
198
+ }>(queryClient: ReturnType<useQueryClient>, value: IsSavedValue, userOnMutate?: MutationOptions<void, TVariables>['onMutate']): (variables: TVariables, mutationContext: unknown) => Promise<EventSavedContext>;
199
+
191
200
  export declare interface CreateOrganizerUserDto {
192
201
  name: string;
193
202
  username: string;
@@ -503,6 +512,11 @@ export declare const Events: {
503
512
  };
504
513
  };
505
514
 
515
+ export declare type EventSavedContext = {
516
+ previousLists: Array<[readonly unknown[], Page<Event_2> | undefined]>;
517
+ previousDetail: Event_2 | undefined;
518
+ };
519
+
506
520
  export declare const Files: {
507
521
  v1: {
508
522
  endpoint: string;
@@ -596,6 +610,8 @@ export declare const invalidateEventsCache: () => Promise<void>;
596
610
 
597
611
  export declare const invalidateOnboardingsCache: () => Promise<void>;
598
612
 
613
+ declare type IsSavedValue = boolean | 'toggle';
614
+
599
615
  export declare interface LoginDto {
600
616
  username: string;
601
617
  password: string;
@@ -656,11 +672,6 @@ export declare const removeHeader: (key: string) => void;
656
672
 
657
673
  export declare const removeRequestInterceptor: (id: number) => void;
658
674
 
659
- declare type SaveEventContext = {
660
- previousLists: Array<[readonly unknown[], Page<Event_2> | undefined]>;
661
- previousDetail: Event_2 | undefined;
662
- };
663
-
664
675
  declare type SaveEventVariables = {
665
676
  id: string;
666
677
  eventId: string;
@@ -839,7 +850,7 @@ export declare const useRemoveEventFromCollectionsMutation: (options?: MutationO
839
850
  eventId: string;
840
851
  }>) => UseMutationResult<void, Error, {
841
852
  eventId: string;
842
- }, unknown>;
853
+ }, EventSavedContext>;
843
854
 
844
855
  export declare type UserRole = 'ADMIN' | 'CUSTOMER' | 'PRIVATE_ORGANIZER' | 'PUBLIC_ORGANIZER' | 'SUB_ORGANIZER';
845
856
 
@@ -861,7 +872,7 @@ export declare const Users: {
861
872
  };
862
873
  };
863
874
 
864
- export declare const useSaveEventMutation: (options?: MutationOptions<void, SaveEventVariables>) => UseMutationResult<void, Error, SaveEventVariables, SaveEventContext>;
875
+ export declare const useSaveEventMutation: (options?: MutationOptions<void, SaveEventVariables>) => UseMutationResult<void, Error, SaveEventVariables, EventSavedContext>;
865
876
 
866
877
  export declare const useSocialAuthMutation: (options?: MutationOptions<SocialAuthResponse, SocialAuthDto>) => UseMutationResult<SocialAuthResponse, Error, SocialAuthDto, unknown>;
867
878