eventhr-http-client 0.1.1
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/README.md +328 -0
- package/lib/index.cjs +2 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.ts +493 -0
- package/lib/index.js +326 -0
- package/lib/index.js.map +1 -0
- package/package.json +67 -0
package/lib/index.js
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import y from "axios";
|
|
2
|
+
import { useMutation as o, useQuery as i, QueryClient as m } from "@tanstack/react-query";
|
|
3
|
+
const r = y.create({
|
|
4
|
+
baseURL: "",
|
|
5
|
+
headers: {
|
|
6
|
+
"Content-Type": "application/json"
|
|
7
|
+
}
|
|
8
|
+
}), g = (e) => {
|
|
9
|
+
r.defaults.baseURL = e;
|
|
10
|
+
}, w = (e) => {
|
|
11
|
+
Object.assign(r.defaults.headers.common, e);
|
|
12
|
+
}, C = (e) => {
|
|
13
|
+
delete r.defaults.headers.common[e];
|
|
14
|
+
}, $ = (e, t) => r.interceptors.request.use(e, t), f = (e) => {
|
|
15
|
+
r.interceptors.request.eject(e);
|
|
16
|
+
};
|
|
17
|
+
class a {
|
|
18
|
+
constructor() {
|
|
19
|
+
this.client = r;
|
|
20
|
+
}
|
|
21
|
+
list(...t) {
|
|
22
|
+
throw new Error(`list() not implemented on ${this.constructor.name}`);
|
|
23
|
+
}
|
|
24
|
+
get(...t) {
|
|
25
|
+
throw new Error(`get() not implemented on ${this.constructor.name}`);
|
|
26
|
+
}
|
|
27
|
+
create(...t) {
|
|
28
|
+
throw new Error(`create() not implemented on ${this.constructor.name}`);
|
|
29
|
+
}
|
|
30
|
+
update(...t) {
|
|
31
|
+
throw new Error(`update() not implemented on ${this.constructor.name}`);
|
|
32
|
+
}
|
|
33
|
+
remove(...t) {
|
|
34
|
+
throw new Error(`remove() not implemented on ${this.constructor.name}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
class F extends a {
|
|
38
|
+
constructor() {
|
|
39
|
+
super(...arguments), this.endpoint = "api/v1/events";
|
|
40
|
+
}
|
|
41
|
+
getAll(t) {
|
|
42
|
+
return this.client.get(this.endpoint, { params: t });
|
|
43
|
+
}
|
|
44
|
+
create(t) {
|
|
45
|
+
return this.client.post(this.endpoint, t);
|
|
46
|
+
}
|
|
47
|
+
update(t, n) {
|
|
48
|
+
return this.client.put(`${this.endpoint}/${t}`, n);
|
|
49
|
+
}
|
|
50
|
+
remove(t) {
|
|
51
|
+
return this.client.delete(`${this.endpoint}/${t}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const q = new F(), l = { v1: q };
|
|
55
|
+
class E extends a {
|
|
56
|
+
constructor() {
|
|
57
|
+
super(...arguments), this.endpoint = "api/v1/authentication/user";
|
|
58
|
+
}
|
|
59
|
+
login(t) {
|
|
60
|
+
return this.client.post(this.endpoint, t);
|
|
61
|
+
}
|
|
62
|
+
refresh(t) {
|
|
63
|
+
return this.client.post(`${this.endpoint}/refresh`, t);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const M = new E(), d = { v1: M };
|
|
67
|
+
class U extends a {
|
|
68
|
+
constructor() {
|
|
69
|
+
super(...arguments), this.endpoint = "api/v1/categories";
|
|
70
|
+
}
|
|
71
|
+
getAll(t) {
|
|
72
|
+
return this.client.get(this.endpoint, { params: t });
|
|
73
|
+
}
|
|
74
|
+
create(t) {
|
|
75
|
+
return this.client.post(this.endpoint, t);
|
|
76
|
+
}
|
|
77
|
+
update(t, n) {
|
|
78
|
+
return this.client.put(`${this.endpoint}/${t}`, n);
|
|
79
|
+
}
|
|
80
|
+
remove(t) {
|
|
81
|
+
return this.client.delete(`${this.endpoint}/${t}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
const Q = new U(), u = { v1: Q };
|
|
85
|
+
class A extends a {
|
|
86
|
+
constructor() {
|
|
87
|
+
super(...arguments), this.endpoint = "api/v1/collections";
|
|
88
|
+
}
|
|
89
|
+
getAll(t) {
|
|
90
|
+
return this.client.get(this.endpoint, { params: t });
|
|
91
|
+
}
|
|
92
|
+
getById(t) {
|
|
93
|
+
return this.client.get(`${this.endpoint}/${t}`);
|
|
94
|
+
}
|
|
95
|
+
create(t) {
|
|
96
|
+
return this.client.post(this.endpoint, t);
|
|
97
|
+
}
|
|
98
|
+
update(t, n) {
|
|
99
|
+
return this.client.put(`${this.endpoint}/${t}`, n);
|
|
100
|
+
}
|
|
101
|
+
remove(t) {
|
|
102
|
+
return this.client.delete(`${this.endpoint}/${t}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const K = new A(), c = { v1: K };
|
|
106
|
+
class x extends a {
|
|
107
|
+
constructor() {
|
|
108
|
+
super(...arguments), this.endpoint = "api/v1/users";
|
|
109
|
+
}
|
|
110
|
+
getAll(t) {
|
|
111
|
+
return this.client.get(this.endpoint, { params: t });
|
|
112
|
+
}
|
|
113
|
+
getProfile() {
|
|
114
|
+
return this.client.get(`${this.endpoint}/profile`);
|
|
115
|
+
}
|
|
116
|
+
create(t) {
|
|
117
|
+
return this.client.post(this.endpoint, t);
|
|
118
|
+
}
|
|
119
|
+
edit(t, n) {
|
|
120
|
+
return this.client.put(`${this.endpoint}/${t}`, n);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const H = new x(), p = { v1: H };
|
|
124
|
+
class I extends a {
|
|
125
|
+
constructor() {
|
|
126
|
+
super(...arguments), this.endpoint = "api/v1/files";
|
|
127
|
+
}
|
|
128
|
+
upload(t) {
|
|
129
|
+
const n = new FormData();
|
|
130
|
+
return n.append("file", t), this.client.post(this.endpoint, n, {
|
|
131
|
+
headers: { "Content-Type": "multipart/form-data" }
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
remove(t) {
|
|
135
|
+
return this.client.delete(`${this.endpoint}/${t}`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const R = new I(), h = { v1: R };
|
|
139
|
+
class _ {
|
|
140
|
+
constructor() {
|
|
141
|
+
this.Auth = d, this.Events = l, this.Categories = u, this.Collections = c, this.Users = p, this.Files = h;
|
|
142
|
+
}
|
|
143
|
+
configure({ baseUrl: t, headers: n }) {
|
|
144
|
+
t !== void 0 && g(t), n !== void 0 && w(n);
|
|
145
|
+
}
|
|
146
|
+
removeHeader(t) {
|
|
147
|
+
C(t);
|
|
148
|
+
}
|
|
149
|
+
addInterceptor(t, n) {
|
|
150
|
+
return $(t, n);
|
|
151
|
+
}
|
|
152
|
+
removeInterceptor(t) {
|
|
153
|
+
f(t);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const T = new _(), s = {
|
|
157
|
+
events: {
|
|
158
|
+
all: ["events"],
|
|
159
|
+
list: (e) => [...s.events.all, "list", e]
|
|
160
|
+
},
|
|
161
|
+
categories: {
|
|
162
|
+
all: ["categories"],
|
|
163
|
+
list: (e) => [...s.categories.all, "list", e]
|
|
164
|
+
},
|
|
165
|
+
collections: {
|
|
166
|
+
all: ["collections"],
|
|
167
|
+
list: (e) => [...s.collections.all, "list", e],
|
|
168
|
+
detail: (e) => [...s.collections.all, "detail", e]
|
|
169
|
+
},
|
|
170
|
+
users: {
|
|
171
|
+
all: ["users"],
|
|
172
|
+
list: (e) => [...s.users.all, "list", e],
|
|
173
|
+
profile: () => [...s.users.all, "profile"]
|
|
174
|
+
},
|
|
175
|
+
files: {
|
|
176
|
+
all: ["files"]
|
|
177
|
+
}
|
|
178
|
+
}, B = (e, t) => i({
|
|
179
|
+
queryKey: s.events.list(e),
|
|
180
|
+
queryFn: async () => (await l.v1.getAll(e)).data,
|
|
181
|
+
...t
|
|
182
|
+
}), j = (e) => o({
|
|
183
|
+
mutationFn: async (t) => {
|
|
184
|
+
await l.v1.create(t);
|
|
185
|
+
},
|
|
186
|
+
...e
|
|
187
|
+
}), L = (e) => o({
|
|
188
|
+
mutationFn: async ({ id: t, data: n }) => {
|
|
189
|
+
await l.v1.update(t, n);
|
|
190
|
+
},
|
|
191
|
+
...e
|
|
192
|
+
}), O = (e) => o({
|
|
193
|
+
mutationFn: async ({ id: t }) => {
|
|
194
|
+
await l.v1.remove(t);
|
|
195
|
+
},
|
|
196
|
+
...e
|
|
197
|
+
}), v = new m({
|
|
198
|
+
defaultOptions: {
|
|
199
|
+
queries: {
|
|
200
|
+
retry: 1,
|
|
201
|
+
refetchOnWindowFocus: !1,
|
|
202
|
+
staleTime: 0
|
|
203
|
+
},
|
|
204
|
+
mutations: {
|
|
205
|
+
retry: 0
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}), P = () => v.invalidateQueries({ queryKey: s.events.all }), b = (e) => o({
|
|
209
|
+
mutationFn: async (t) => (await d.v1.login(t)).data,
|
|
210
|
+
...e
|
|
211
|
+
}), Y = (e) => o({
|
|
212
|
+
mutationFn: async (t) => (await d.v1.refresh(t)).data,
|
|
213
|
+
...e
|
|
214
|
+
}), k = (e, t) => i({
|
|
215
|
+
queryKey: s.categories.list(e),
|
|
216
|
+
queryFn: async () => (await u.v1.getAll(e)).data,
|
|
217
|
+
...t
|
|
218
|
+
}), N = (e) => o({
|
|
219
|
+
mutationFn: async (t) => {
|
|
220
|
+
await u.v1.create(t);
|
|
221
|
+
},
|
|
222
|
+
...e
|
|
223
|
+
}), S = (e) => o({
|
|
224
|
+
mutationFn: async ({ id: t, data: n }) => {
|
|
225
|
+
await u.v1.update(t, n);
|
|
226
|
+
},
|
|
227
|
+
...e
|
|
228
|
+
}), V = (e) => o({
|
|
229
|
+
mutationFn: async ({ id: t }) => {
|
|
230
|
+
await u.v1.remove(t);
|
|
231
|
+
},
|
|
232
|
+
...e
|
|
233
|
+
}), W = () => v.invalidateQueries({ queryKey: s.categories.all }), z = (e, t) => i({
|
|
234
|
+
queryKey: s.collections.list(e),
|
|
235
|
+
queryFn: async () => (await c.v1.getAll(e)).data,
|
|
236
|
+
...t
|
|
237
|
+
}), J = (e, t) => i({
|
|
238
|
+
queryKey: s.collections.detail(e),
|
|
239
|
+
queryFn: async () => (await c.v1.getById(e)).data,
|
|
240
|
+
...t
|
|
241
|
+
}), X = (e) => o({
|
|
242
|
+
mutationFn: async (t) => {
|
|
243
|
+
await c.v1.create(t);
|
|
244
|
+
},
|
|
245
|
+
...e
|
|
246
|
+
}), Z = (e) => o({
|
|
247
|
+
mutationFn: async ({ id: t, data: n }) => {
|
|
248
|
+
await c.v1.update(t, n);
|
|
249
|
+
},
|
|
250
|
+
...e
|
|
251
|
+
}), tt = (e) => o({
|
|
252
|
+
mutationFn: async ({ id: t }) => {
|
|
253
|
+
await c.v1.remove(t);
|
|
254
|
+
},
|
|
255
|
+
...e
|
|
256
|
+
}), et = () => v.invalidateQueries({ queryKey: s.collections.all }), nt = (e, t) => i({
|
|
257
|
+
queryKey: s.users.list(e),
|
|
258
|
+
queryFn: async () => (await p.v1.getAll(e)).data,
|
|
259
|
+
...t
|
|
260
|
+
}), st = (e) => i({
|
|
261
|
+
queryKey: s.users.profile(),
|
|
262
|
+
queryFn: async () => (await p.v1.getProfile()).data,
|
|
263
|
+
...e
|
|
264
|
+
}), ot = (e) => o({
|
|
265
|
+
mutationFn: async (t) => {
|
|
266
|
+
await p.v1.create(t);
|
|
267
|
+
},
|
|
268
|
+
...e
|
|
269
|
+
}), it = (e) => o({
|
|
270
|
+
mutationFn: async ({ id: t, data: n }) => {
|
|
271
|
+
await p.v1.edit(t, n);
|
|
272
|
+
},
|
|
273
|
+
...e
|
|
274
|
+
}), rt = (e) => o({
|
|
275
|
+
mutationFn: async (t) => (await h.v1.upload(t)).data,
|
|
276
|
+
...e
|
|
277
|
+
}), at = (e) => o({
|
|
278
|
+
mutationFn: async ({ id: t }) => {
|
|
279
|
+
await h.v1.remove(t);
|
|
280
|
+
},
|
|
281
|
+
...e
|
|
282
|
+
});
|
|
283
|
+
export {
|
|
284
|
+
d as Auth,
|
|
285
|
+
u as Categories,
|
|
286
|
+
c as Collections,
|
|
287
|
+
s as EVENTHR_QUERY_KEYS,
|
|
288
|
+
_ as EventhrHttpClient,
|
|
289
|
+
l as Events,
|
|
290
|
+
h as Files,
|
|
291
|
+
a as HttpClient,
|
|
292
|
+
p as Users,
|
|
293
|
+
$ as addRequestInterceptor,
|
|
294
|
+
T as default,
|
|
295
|
+
r as instance,
|
|
296
|
+
W as invalidateCategoriesCache,
|
|
297
|
+
et as invalidateCollectionsCache,
|
|
298
|
+
P as invalidateEventsCache,
|
|
299
|
+
v as queryClient,
|
|
300
|
+
C as removeHeader,
|
|
301
|
+
f as removeRequestInterceptor,
|
|
302
|
+
g as setBaseUrl,
|
|
303
|
+
w as setHeaders,
|
|
304
|
+
N as useCreateCategoryMutation,
|
|
305
|
+
X as useCreateCollectionMutation,
|
|
306
|
+
j as useCreateEventMutation,
|
|
307
|
+
ot as useCreateUserMutation,
|
|
308
|
+
V as useDeleteCategoryMutation,
|
|
309
|
+
tt as useDeleteCollectionMutation,
|
|
310
|
+
O as useDeleteEventMutation,
|
|
311
|
+
at as useDeleteFileMutation,
|
|
312
|
+
it as useEditUserMutation,
|
|
313
|
+
k as useGetCategoriesQuery,
|
|
314
|
+
J as useGetCollectionByIdQuery,
|
|
315
|
+
z as useGetCollectionsQuery,
|
|
316
|
+
B as useGetEventsQuery,
|
|
317
|
+
st as useGetProfileQuery,
|
|
318
|
+
nt as useGetUsersQuery,
|
|
319
|
+
b as useLoginMutation,
|
|
320
|
+
Y as useRefreshTokenMutation,
|
|
321
|
+
S as useUpdateCategoryMutation,
|
|
322
|
+
Z as useUpdateCollectionMutation,
|
|
323
|
+
L as useUpdateEventMutation,
|
|
324
|
+
rt as useUploadFileMutation
|
|
325
|
+
};
|
|
326
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","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/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"],"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 { PageRequest, Page } from '@/api/common/types';\n\n\nexport interface EventAddress {\n city: string;\n address: string;\n postalCode?: string;\n locationName?: string;\n}\n\nexport interface EventCoordinates {\n latitude: number;\n longitude: number;\n}\n\nexport interface EventOrganizer {\n id: string;\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: EventCoordinates;\n price?: number;\n capacity?: number;\n organizer: EventOrganizer;\n isDeleted: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateEventDto {\n name: string;\n description?: string;\n startAt: string;\n endAt: string;\n address: EventAddress;\n coordinates: EventCoordinates;\n price?: number;\n capacity?: number;\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 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 EventCoordinates,\n EventOrganizer,\n CreateEventDto,\n UpdateEventDto,\n GetEventsParams,\n} from './v1';\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\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 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 } 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 { PageRequest, Page } from '@/api/common/types';\n\nexport interface EventVo {\n id: string;\n name: string;\n}\n\nexport interface Collection {\n id: string;\n name: string;\n customer: {\n id: string;\n };\n events: EventVo[];\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\nconst v1 = new CollectionsClient();\nexport default v1;\n","import v1 from './v1';\n\nexport type {\n Collection,\n EventVo,\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 interface User {\n id: string;\n name: string;\n username: string;\n imageId?: string;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateUserDto {\n name: string;\n username: string;\n password: string;\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 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, CreateUserDto, 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 { 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';\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\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 { 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 },\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} 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\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 } 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 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 } from '@tanstack/react-query';\n\nimport { EVENTHR_QUERY_KEYS } from '@/api/eventhrKeys';\nimport type { MutationOptions, Page, QueryOptions } from '@/api/common/types';\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","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, 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","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"],"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","Collections","UsersClient","Users","FilesClient","file","formData","Files","EventhrHttpClient","baseUrl","EventhrHttp","EVENTHR_QUERY_KEYS","useGetEventsQuery","options","useQuery","useCreateEventMutation","useMutation","useUpdateEventMutation","useDeleteEventMutation","queryClient","QueryClient","invalidateEventsCache","useLoginMutation","useRefreshTokenMutation","useGetCategoriesQuery","useCreateCategoryMutation","useUpdateCategoryMutation","useDeleteCategoryMutation","invalidateCategoriesCache","useGetCollectionsQuery","useGetCollectionByIdQuery","useCreateCollectionMutation","useUpdateCollectionMutation","useDeleteCollectionMutation","invalidateCollectionsCache","useGetUsersQuery","useGetProfileQuery","useCreateUserMutation","useEditUserMutation","useUploadFileMutation","useDeleteFileMutation"],"mappings":";;AAEA,MAAMA,IAA0BC,EAAM,OAAO;AAAA,EAC3C,SAAS;AAAA,EACT,SAAS;AAAA,IACP,gBAAgB;AAAA,EAAA;AAEpB,CAAC,GAEYC,IAAa,CAACC,MAAsB;AAC/C,EAAAH,EAAS,SAAS,UAAUG;AAC9B,GAEaC,IAAa,CAACC,MAA0C;AACnE,SAAO,OAAOL,EAAS,SAAS,QAAQ,QAAQK,CAAO;AACzD,GAEaC,IAAe,CAACC,MAAsB;AACjD,SAAQP,EAAS,SAAS,QAAQ,OAAkCO,CAAG;AACzE,GAEaC,IAAwB,CACnCC,GACAC,MACWV,EAAS,aAAa,QAAQ,IAAIS,GAAaC,CAAU,GAEzDC,IAA2B,CAACC,MAAqB;AAC5D,EAAAZ,EAAS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,CAAI;AAAA,EAC5B;AAAA,EACA,GAAGoB;AACL,CAAC,GAEUyB,KAAsB,CACjCzB,MAEAG,EAAY;AAAA,EACV,YAAY,OAAO,EAAE,IAAA5B,GAAI,MAAAK,QAA8C;AACrE,UAAMU,EAAM,GAAG,KAAKf,GAAIK,CAAI;AAAA,EAC9B;AAAA,EACA,GAAGoB;AACL,CAAC,GC9CU0B,KAAwB,CACnC1B,MAEAG,EAAY;AAAA,EACV,YAAY,OAAOX,OACA,MAAME,EAAM,GAAG,OAAOF,CAAI,GAC3B;AAAA,EAElB,GAAGQ;AACL,CAAC,GAEU2B,KAAwB,CACnC3B,MAEAG,EAAY;AAAA,EACV,YAAY,OAAO,EAAE,IAAA5B,QAAyB;AAC5C,UAAMmB,EAAM,GAAG,OAAOnB,CAAE;AAAA,EAC1B;AAAA,EACA,GAAGyB;AACL,CAAC;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eventhr-http-client",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Configurable HTTP client for the EventHR API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./lib/index.d.ts",
|
|
9
|
+
"import": "./lib/index.js",
|
|
10
|
+
"require": "./lib/index.cjs"
|
|
11
|
+
},
|
|
12
|
+
"./package.json": "./package.json"
|
|
13
|
+
},
|
|
14
|
+
"main": "./lib/index.cjs",
|
|
15
|
+
"module": "./lib/index.js",
|
|
16
|
+
"types": "./lib/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"lib"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "vite build",
|
|
22
|
+
"dev": "vite build --watch",
|
|
23
|
+
"lint": "tsc --noEmit",
|
|
24
|
+
"prepublishOnly": "npm run build",
|
|
25
|
+
"changeset": "changeset",
|
|
26
|
+
"changeset:version": "changeset version",
|
|
27
|
+
"changeset:publish": "changeset publish"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"axios": "^1.7.9"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@tanstack/react-query": "^5.0.0",
|
|
34
|
+
"react": ">=18.0.0"
|
|
35
|
+
},
|
|
36
|
+
"peerDependenciesMeta": {
|
|
37
|
+
"react": {
|
|
38
|
+
"optional": true
|
|
39
|
+
},
|
|
40
|
+
"@tanstack/react-query": {
|
|
41
|
+
"optional": true
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@changesets/cli": "^2.27.11",
|
|
46
|
+
"@tanstack/react-query": "^5.64.2",
|
|
47
|
+
"@types/node": "^22.10.7",
|
|
48
|
+
"@types/react": "^18.3.18",
|
|
49
|
+
"typescript": "^5.7.3",
|
|
50
|
+
"vite": "^6.0.11",
|
|
51
|
+
"vite-plugin-dts": "^4.4.0"
|
|
52
|
+
},
|
|
53
|
+
"keywords": [
|
|
54
|
+
"eventhr",
|
|
55
|
+
"http",
|
|
56
|
+
"api",
|
|
57
|
+
"axios",
|
|
58
|
+
"react-query",
|
|
59
|
+
"sdk",
|
|
60
|
+
"client"
|
|
61
|
+
],
|
|
62
|
+
"license": "MIT",
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "git+https://github.com/Antunsvetic/eventhr-https.git"
|
|
66
|
+
}
|
|
67
|
+
}
|