eventhr-http-client 2.1.1 → 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 +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +25 -6
- package/lib/index.js +228 -197
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useMutation as i, useQuery as r, QueryClient as
|
|
3
|
-
const
|
|
1
|
+
import D from "axios";
|
|
2
|
+
import { useMutation as i, useQuery as r, QueryClient as S, useQueryClient as U } from "@tanstack/react-query";
|
|
3
|
+
const v = D.create({
|
|
4
4
|
baseURL: "",
|
|
5
5
|
headers: {
|
|
6
6
|
"Content-Type": "application/json"
|
|
7
7
|
}
|
|
8
|
-
}),
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
Object.assign(
|
|
12
|
-
},
|
|
13
|
-
delete
|
|
14
|
-
},
|
|
15
|
-
|
|
8
|
+
}), P = (e) => {
|
|
9
|
+
v.defaults.baseURL = e;
|
|
10
|
+
}, z = (e) => {
|
|
11
|
+
Object.assign(v.defaults.headers.common, e);
|
|
12
|
+
}, H = (e) => {
|
|
13
|
+
delete v.defaults.headers.common[e];
|
|
14
|
+
}, O = (e, t) => v.interceptors.request.use(e, t), _ = (e) => {
|
|
15
|
+
v.interceptors.request.eject(e);
|
|
16
16
|
};
|
|
17
17
|
class a {
|
|
18
18
|
constructor() {
|
|
19
|
-
this.client =
|
|
19
|
+
this.client = v;
|
|
20
20
|
}
|
|
21
21
|
list(...t) {
|
|
22
22
|
throw new Error(`list() not implemented on ${this.constructor.name}`);
|
|
@@ -34,7 +34,7 @@ class a {
|
|
|
34
34
|
throw new Error(`remove() not implemented on ${this.constructor.name}`);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
class
|
|
37
|
+
class L extends a {
|
|
38
38
|
constructor() {
|
|
39
39
|
super(...arguments), this.endpoint = "api/v1/events";
|
|
40
40
|
}
|
|
@@ -54,8 +54,8 @@ class _ extends a {
|
|
|
54
54
|
return this.client.delete(`${this.endpoint}/${t}`);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
class
|
|
57
|
+
const T = new L(), y = { v1: T };
|
|
58
|
+
class j extends a {
|
|
59
59
|
constructor() {
|
|
60
60
|
super(...arguments), this.endpoint = "api/v1/authentication/user";
|
|
61
61
|
}
|
|
@@ -69,7 +69,7 @@ class T extends a {
|
|
|
69
69
|
return this.client.post(`${this.endpoint}/refresh`, t);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const k = new j(), C = { v1: k };
|
|
73
73
|
class V extends a {
|
|
74
74
|
constructor() {
|
|
75
75
|
super(...arguments), this.endpoint = "api/v1/categories";
|
|
@@ -88,7 +88,7 @@ class V extends a {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
const Y = new V(), g = { v1: Y };
|
|
91
|
-
class
|
|
91
|
+
class N extends a {
|
|
92
92
|
constructor() {
|
|
93
93
|
super(...arguments), this.endpoint = "api/v1/collections";
|
|
94
94
|
}
|
|
@@ -107,9 +107,12 @@ class k extends a {
|
|
|
107
107
|
remove(t) {
|
|
108
108
|
return this.client.delete(`${this.endpoint}/${t}`);
|
|
109
109
|
}
|
|
110
|
+
removeEvent(t) {
|
|
111
|
+
return this.client.delete(`${this.endpoint}/events/${t}`);
|
|
112
|
+
}
|
|
110
113
|
}
|
|
111
|
-
const
|
|
112
|
-
class
|
|
114
|
+
const W = new N(), d = { v1: W };
|
|
115
|
+
class J extends a {
|
|
113
116
|
constructor() {
|
|
114
117
|
super(...arguments), this.endpoint = "api/v1/users";
|
|
115
118
|
}
|
|
@@ -135,8 +138,8 @@ class W extends a {
|
|
|
135
138
|
return this.client.put(`${this.endpoint}/${t}`, n);
|
|
136
139
|
}
|
|
137
140
|
}
|
|
138
|
-
const
|
|
139
|
-
class
|
|
141
|
+
const X = new J(), p = { v1: X };
|
|
142
|
+
class Z extends a {
|
|
140
143
|
constructor() {
|
|
141
144
|
super(...arguments), this.endpoint = "api/v1/files";
|
|
142
145
|
}
|
|
@@ -150,8 +153,8 @@ class X extends a {
|
|
|
150
153
|
return this.client.delete(`${this.endpoint}/${t}`);
|
|
151
154
|
}
|
|
152
155
|
}
|
|
153
|
-
const
|
|
154
|
-
class
|
|
156
|
+
const R = new Z(), E = { v1: R };
|
|
157
|
+
class tt extends a {
|
|
155
158
|
constructor() {
|
|
156
159
|
super(...arguments), this.endpoint = "api/v1/onboardings";
|
|
157
160
|
}
|
|
@@ -165,8 +168,8 @@ class R extends a {
|
|
|
165
168
|
return this.client.put(this.endpoint, t);
|
|
166
169
|
}
|
|
167
170
|
}
|
|
168
|
-
const
|
|
169
|
-
class
|
|
171
|
+
const et = new tt(), $ = { v1: et };
|
|
172
|
+
class nt extends a {
|
|
170
173
|
constructor() {
|
|
171
174
|
super(...arguments), this.endpoint = "api/v1/event-attendances";
|
|
172
175
|
}
|
|
@@ -180,8 +183,8 @@ class et extends a {
|
|
|
180
183
|
return this.client.delete(`${this.endpoint}/${t}`);
|
|
181
184
|
}
|
|
182
185
|
}
|
|
183
|
-
const
|
|
184
|
-
class
|
|
186
|
+
const st = new nt(), F = { v1: st };
|
|
187
|
+
class it extends a {
|
|
185
188
|
constructor() {
|
|
186
189
|
super(...arguments), this.endpoint = "api/v1/forgot-password";
|
|
187
190
|
}
|
|
@@ -192,7 +195,7 @@ class st extends a {
|
|
|
192
195
|
return this.client.patch(`${this.endpoint}/${t}/change`, n);
|
|
193
196
|
}
|
|
194
197
|
}
|
|
195
|
-
const
|
|
198
|
+
const ot = new it(), Q = { v1: ot };
|
|
196
199
|
class rt extends a {
|
|
197
200
|
constructor() {
|
|
198
201
|
super(...arguments), this.endpoint = "api/v1/countries";
|
|
@@ -204,8 +207,8 @@ class rt extends a {
|
|
|
204
207
|
return this.client.get(`${this.endpoint}/${t}`);
|
|
205
208
|
}
|
|
206
209
|
}
|
|
207
|
-
const
|
|
208
|
-
class
|
|
210
|
+
const at = new rt(), A = { v1: at };
|
|
211
|
+
class ct extends a {
|
|
209
212
|
constructor() {
|
|
210
213
|
super(...arguments), this.endpoint = "api/v1/counties";
|
|
211
214
|
}
|
|
@@ -216,8 +219,8 @@ class at extends a {
|
|
|
216
219
|
return this.client.get(`${this.endpoint}/${t}`);
|
|
217
220
|
}
|
|
218
221
|
}
|
|
219
|
-
const
|
|
220
|
-
class
|
|
222
|
+
const ut = new ct(), K = { v1: ut };
|
|
223
|
+
class lt extends a {
|
|
221
224
|
constructor() {
|
|
222
225
|
super(...arguments), this.endpoint = "api/v1/cities";
|
|
223
226
|
}
|
|
@@ -228,25 +231,25 @@ class ut extends a {
|
|
|
228
231
|
return this.client.get(`${this.endpoint}/${t}`);
|
|
229
232
|
}
|
|
230
233
|
}
|
|
231
|
-
const
|
|
232
|
-
class
|
|
234
|
+
const dt = new lt(), I = { v1: dt };
|
|
235
|
+
class pt {
|
|
233
236
|
constructor() {
|
|
234
|
-
this.Auth =
|
|
237
|
+
this.Auth = C, this.Events = y, this.Categories = g, this.Collections = d, this.Users = p, this.Files = E, this.Onboardings = $, this.EventAttendances = F, this.ForgotPassword = Q, this.Countries = A, this.Counties = K, this.Cities = I;
|
|
235
238
|
}
|
|
236
239
|
configure({ baseUrl: t, headers: n }) {
|
|
237
|
-
t !== void 0 &&
|
|
240
|
+
t !== void 0 && P(t), n !== void 0 && z(n);
|
|
238
241
|
}
|
|
239
242
|
removeHeader(t) {
|
|
240
|
-
|
|
243
|
+
H(t);
|
|
241
244
|
}
|
|
242
245
|
addInterceptor(t, n) {
|
|
243
|
-
return
|
|
246
|
+
return O(t, n);
|
|
244
247
|
}
|
|
245
248
|
removeInterceptor(t) {
|
|
246
|
-
|
|
249
|
+
_(t);
|
|
247
250
|
}
|
|
248
251
|
}
|
|
249
|
-
const
|
|
252
|
+
const ht = new pt(), s = {
|
|
250
253
|
events: {
|
|
251
254
|
all: ["events"],
|
|
252
255
|
list: (e) => [...s.events.all, "list", e],
|
|
@@ -292,30 +295,30 @@ const vt = new dt(), s = {
|
|
|
292
295
|
list: (e) => [...s.cities.all, "list", e],
|
|
293
296
|
detail: (e) => [...s.cities.all, "detail", e]
|
|
294
297
|
}
|
|
295
|
-
},
|
|
298
|
+
}, gt = (e, t) => r({
|
|
296
299
|
queryKey: s.events.list(e),
|
|
297
|
-
queryFn: async () => (await
|
|
300
|
+
queryFn: async () => (await y.v1.getAll(e)).data,
|
|
298
301
|
...t
|
|
299
|
-
}),
|
|
302
|
+
}), mt = (e, t) => r({
|
|
300
303
|
queryKey: s.events.detail(e),
|
|
301
|
-
queryFn: async () => (await
|
|
304
|
+
queryFn: async () => (await y.v1.getById(e)).data,
|
|
302
305
|
...t
|
|
303
306
|
}), wt = (e) => i({
|
|
304
307
|
mutationFn: async (t) => {
|
|
305
|
-
await
|
|
308
|
+
await y.v1.create(t);
|
|
306
309
|
},
|
|
307
310
|
...e
|
|
308
|
-
}),
|
|
311
|
+
}), Ct = (e) => i({
|
|
309
312
|
mutationFn: async ({ id: t, data: n }) => {
|
|
310
|
-
await
|
|
313
|
+
await y.v1.update(t, n);
|
|
311
314
|
},
|
|
312
315
|
...e
|
|
313
|
-
}),
|
|
316
|
+
}), $t = (e) => i({
|
|
314
317
|
mutationFn: async ({ id: t }) => {
|
|
315
|
-
await
|
|
318
|
+
await y.v1.remove(t);
|
|
316
319
|
},
|
|
317
320
|
...e
|
|
318
|
-
}),
|
|
321
|
+
}), m = new S({
|
|
319
322
|
defaultOptions: {
|
|
320
323
|
queries: {
|
|
321
324
|
retry: 1,
|
|
@@ -326,14 +329,43 @@ const vt = new dt(), s = {
|
|
|
326
329
|
retry: 0
|
|
327
330
|
}
|
|
328
331
|
}
|
|
329
|
-
}),
|
|
330
|
-
|
|
332
|
+
}), Ft = () => m.invalidateQueries({ queryKey: s.events.all });
|
|
333
|
+
function B(e, t) {
|
|
334
|
+
return { ...e, isSaved: t === "toggle" ? !e.isSaved : t };
|
|
335
|
+
}
|
|
336
|
+
function M(e, t, n) {
|
|
337
|
+
return async (c, o) => {
|
|
338
|
+
const { eventId: u } = c, l = [...s.events.all, "list"];
|
|
339
|
+
await e.cancelQueries({ queryKey: s.events.all });
|
|
340
|
+
const h = e.getQueriesData({ queryKey: l });
|
|
341
|
+
e.setQueriesData({ queryKey: l }, (w) => w && {
|
|
342
|
+
...w,
|
|
343
|
+
content: w.content.map(
|
|
344
|
+
(q) => q.id === u ? B(q, t) : q
|
|
345
|
+
)
|
|
346
|
+
});
|
|
347
|
+
const b = s.events.detail(u), f = e.getQueryData(b);
|
|
348
|
+
return f && e.setQueryData(b, B(f, t)), await (n == null ? void 0 : n(c, o)), { previousLists: h, previousDetail: f };
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
function G(e, t) {
|
|
352
|
+
return (n, c, o, u) => {
|
|
353
|
+
o == null || o.previousLists.forEach(([l, h]) => {
|
|
354
|
+
e.setQueryData(l, h);
|
|
355
|
+
}), o != null && o.previousDetail && e.setQueryData(
|
|
356
|
+
s.events.detail(c.eventId),
|
|
357
|
+
o.previousDetail
|
|
358
|
+
), t == null || t(n, c, o, u);
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
const ft = (e) => i({
|
|
362
|
+
mutationFn: async (t) => (await C.v1.login(t)).data,
|
|
331
363
|
...e
|
|
332
364
|
}), qt = (e) => i({
|
|
333
|
-
mutationFn: async (t) => (await
|
|
365
|
+
mutationFn: async (t) => (await C.v1.social(t)).data,
|
|
334
366
|
...e
|
|
335
|
-
}),
|
|
336
|
-
mutationFn: async (t) => (await
|
|
367
|
+
}), Et = (e) => i({
|
|
368
|
+
mutationFn: async (t) => (await C.v1.refresh(t)).data,
|
|
337
369
|
...e
|
|
338
370
|
}), Qt = (e, t) => r({
|
|
339
371
|
queryKey: s.categories.list(e),
|
|
@@ -344,240 +376,239 @@ const vt = new dt(), s = {
|
|
|
344
376
|
await g.v1.create(t);
|
|
345
377
|
},
|
|
346
378
|
...e
|
|
347
|
-
}),
|
|
379
|
+
}), Kt = (e) => i({
|
|
348
380
|
mutationFn: async ({ id: t, data: n }) => {
|
|
349
381
|
await g.v1.update(t, n);
|
|
350
382
|
},
|
|
351
383
|
...e
|
|
352
|
-
}),
|
|
384
|
+
}), It = (e) => i({
|
|
353
385
|
mutationFn: async ({ id: t }) => {
|
|
354
386
|
await g.v1.remove(t);
|
|
355
387
|
},
|
|
356
388
|
...e
|
|
357
|
-
}),
|
|
389
|
+
}), bt = () => m.invalidateQueries({ queryKey: s.categories.all }), Bt = (e, t) => r({
|
|
358
390
|
queryKey: s.collections.list(e),
|
|
359
391
|
queryFn: async () => (await d.v1.getAll(e)).data,
|
|
360
392
|
...t
|
|
361
|
-
}),
|
|
393
|
+
}), Ut = (e, t) => r({
|
|
362
394
|
queryKey: s.collections.detail(e),
|
|
363
395
|
queryFn: async () => (await d.v1.getById(e)).data,
|
|
364
396
|
...t
|
|
365
|
-
}),
|
|
397
|
+
}), Mt = (e) => i({
|
|
366
398
|
mutationFn: async (t) => {
|
|
367
399
|
await d.v1.create(t);
|
|
368
400
|
},
|
|
369
401
|
...e
|
|
370
|
-
}),
|
|
402
|
+
}), Gt = (e) => i({
|
|
371
403
|
mutationFn: async ({ id: t, data: n }) => {
|
|
372
404
|
await d.v1.update(t, n);
|
|
373
405
|
},
|
|
374
406
|
...e
|
|
375
|
-
}),
|
|
407
|
+
}), xt = (e) => i({
|
|
376
408
|
mutationFn: async ({ id: t }) => {
|
|
377
409
|
await d.v1.remove(t);
|
|
378
410
|
},
|
|
379
411
|
...e
|
|
380
|
-
})
|
|
381
|
-
|
|
412
|
+
});
|
|
413
|
+
function x(e, t) {
|
|
414
|
+
return (n, c, o, u, l) => {
|
|
415
|
+
e.invalidateQueries({ queryKey: s.collections.all }), t == null || t(n, c, o, u, l);
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
const Dt = (e) => {
|
|
419
|
+
const t = U(), { onMutate: n, onError: c, onSettled: o, ...u } = e ?? {};
|
|
382
420
|
return i({
|
|
383
|
-
mutationFn: async ({
|
|
384
|
-
await d.v1.
|
|
385
|
-
},
|
|
386
|
-
onMutate: async (c, u) => {
|
|
387
|
-
const { eventId: o } = c, p = [...s.events.all, "list"];
|
|
388
|
-
await t.cancelQueries({ queryKey: s.events.all });
|
|
389
|
-
const h = t.getQueriesData({ queryKey: p });
|
|
390
|
-
t.setQueriesData({ queryKey: p }, ($) => $ && {
|
|
391
|
-
...$,
|
|
392
|
-
content: $.content.map(
|
|
393
|
-
(F) => F.id === o ? { ...F, isSaved: !F.isSaved } : F
|
|
394
|
-
)
|
|
395
|
-
});
|
|
396
|
-
const m = s.events.detail(o), C = t.getQueryData(m);
|
|
397
|
-
return C && t.setQueryData(m, { ...C, isSaved: !C.isSaved }), await (n == null ? void 0 : n(c, u)), { previousLists: h, previousDetail: C };
|
|
398
|
-
},
|
|
399
|
-
onError: (c, u, o, p) => {
|
|
400
|
-
o == null || o.previousLists.forEach(([h, m]) => {
|
|
401
|
-
t.setQueryData(h, m);
|
|
402
|
-
}), o != null && o.previousDetail && t.setQueryData(
|
|
403
|
-
s.events.detail(u.eventId),
|
|
404
|
-
o.previousDetail
|
|
405
|
-
), A == null || A(c, u, o, p);
|
|
421
|
+
mutationFn: async ({ eventId: l }) => {
|
|
422
|
+
await d.v1.removeEvent(l);
|
|
406
423
|
},
|
|
407
|
-
|
|
408
|
-
|
|
424
|
+
onMutate: M(t, !1, n),
|
|
425
|
+
onError: G(t, c),
|
|
426
|
+
onSettled: x(t, o),
|
|
427
|
+
...u
|
|
428
|
+
});
|
|
429
|
+
}, St = (e) => {
|
|
430
|
+
const t = U(), { onMutate: n, onError: c, onSettled: o, ...u } = e ?? {};
|
|
431
|
+
return i({
|
|
432
|
+
mutationFn: async ({ id: l, data: h }) => {
|
|
433
|
+
await d.v1.update(l, h);
|
|
409
434
|
},
|
|
410
|
-
|
|
435
|
+
onMutate: M(t, "toggle", n),
|
|
436
|
+
onError: G(t, c),
|
|
437
|
+
onSettled: x(t, o),
|
|
438
|
+
...u
|
|
411
439
|
});
|
|
412
|
-
},
|
|
440
|
+
}, Pt = () => m.invalidateQueries({ queryKey: s.collections.all }), zt = (e, t) => r({
|
|
413
441
|
queryKey: s.users.list(e),
|
|
414
|
-
queryFn: async () => (await
|
|
442
|
+
queryFn: async () => (await p.v1.getAll(e)).data,
|
|
415
443
|
...t
|
|
416
|
-
}),
|
|
444
|
+
}), Ht = (e) => r({
|
|
417
445
|
queryKey: s.users.profile(),
|
|
418
|
-
queryFn: async () => (await
|
|
446
|
+
queryFn: async () => (await p.v1.getProfile()).data,
|
|
419
447
|
...e
|
|
420
|
-
}),
|
|
448
|
+
}), Ot = (e) => i({
|
|
421
449
|
mutationFn: async (t) => {
|
|
422
|
-
await
|
|
450
|
+
await p.v1.create(t);
|
|
423
451
|
},
|
|
424
452
|
...e
|
|
425
|
-
}),
|
|
453
|
+
}), _t = (e) => i({
|
|
426
454
|
mutationFn: async ({ id: t, data: n }) => {
|
|
427
|
-
await
|
|
455
|
+
await p.v1.edit(t, n);
|
|
428
456
|
},
|
|
429
457
|
...e
|
|
430
|
-
}),
|
|
458
|
+
}), Lt = (e) => i({
|
|
431
459
|
mutationFn: async (t) => {
|
|
432
|
-
await
|
|
460
|
+
await p.v1.createOrganizer(t);
|
|
433
461
|
},
|
|
434
462
|
...e
|
|
435
|
-
}),
|
|
463
|
+
}), Tt = (e) => i({
|
|
436
464
|
mutationFn: async (t) => {
|
|
437
|
-
await
|
|
465
|
+
await p.v1.createSubOrganizer(t);
|
|
438
466
|
},
|
|
439
467
|
...e
|
|
440
|
-
}),
|
|
468
|
+
}), jt = (e) => i({
|
|
441
469
|
mutationFn: async ({ userId: t }) => {
|
|
442
|
-
await
|
|
470
|
+
await p.v1.verify(t);
|
|
443
471
|
},
|
|
444
472
|
...e
|
|
445
|
-
}),
|
|
446
|
-
mutationFn: async (t) => (await
|
|
473
|
+
}), kt = (e) => i({
|
|
474
|
+
mutationFn: async (t) => (await E.v1.upload(t)).data,
|
|
447
475
|
...e
|
|
448
|
-
}),
|
|
476
|
+
}), Vt = (e) => i({
|
|
449
477
|
mutationFn: async ({ id: t }) => {
|
|
450
|
-
await
|
|
478
|
+
await E.v1.remove(t);
|
|
451
479
|
},
|
|
452
480
|
...e
|
|
453
|
-
}),
|
|
481
|
+
}), Yt = (e) => r({
|
|
454
482
|
queryKey: s.onboardings.detail(),
|
|
455
|
-
queryFn: async () => (await
|
|
483
|
+
queryFn: async () => (await $.v1.getByUser()).data,
|
|
456
484
|
...e
|
|
457
|
-
}),
|
|
458
|
-
mutationFn: async (t) => (await
|
|
485
|
+
}), Nt = (e) => i({
|
|
486
|
+
mutationFn: async (t) => (await $.v1.create(t)).data,
|
|
459
487
|
...e
|
|
460
|
-
}),
|
|
461
|
-
mutationFn: async (t) => (await
|
|
488
|
+
}), Wt = (e) => i({
|
|
489
|
+
mutationFn: async (t) => (await $.v1.update(t)).data,
|
|
462
490
|
...e
|
|
463
|
-
}),
|
|
491
|
+
}), Jt = () => m.invalidateQueries({ queryKey: s.onboardings.all }), Xt = (e, t) => r({
|
|
464
492
|
queryKey: s.eventAttendances.list(e),
|
|
465
|
-
queryFn: async () => (await
|
|
493
|
+
queryFn: async () => (await F.v1.getAll(e)).data,
|
|
466
494
|
...t
|
|
467
|
-
}),
|
|
495
|
+
}), Zt = (e) => i({
|
|
468
496
|
mutationFn: async (t) => {
|
|
469
|
-
await
|
|
497
|
+
await F.v1.create(t);
|
|
470
498
|
},
|
|
471
499
|
...e
|
|
472
|
-
}),
|
|
500
|
+
}), Rt = (e) => i({
|
|
473
501
|
mutationFn: async ({ id: t }) => {
|
|
474
|
-
await
|
|
502
|
+
await F.v1.remove(t);
|
|
475
503
|
},
|
|
476
504
|
...e
|
|
477
|
-
}),
|
|
505
|
+
}), te = () => m.invalidateQueries({ queryKey: s.eventAttendances.all }), ee = (e) => i({
|
|
478
506
|
mutationFn: async (t) => {
|
|
479
|
-
await
|
|
507
|
+
await Q.v1.create(t);
|
|
480
508
|
},
|
|
481
509
|
...e
|
|
482
|
-
}),
|
|
510
|
+
}), ne = (e) => i({
|
|
483
511
|
mutationFn: async ({ id: t, data: n }) => {
|
|
484
|
-
await
|
|
512
|
+
await Q.v1.changePassword(t, n);
|
|
485
513
|
},
|
|
486
514
|
...e
|
|
487
|
-
}),
|
|
515
|
+
}), se = (e, t) => r({
|
|
488
516
|
queryKey: s.countries.list(e),
|
|
489
|
-
queryFn: async () => (await
|
|
517
|
+
queryFn: async () => (await A.v1.getAll(e)).data,
|
|
490
518
|
...t
|
|
491
|
-
}),
|
|
519
|
+
}), ie = (e, t) => r({
|
|
492
520
|
queryKey: s.countries.detail(e),
|
|
493
|
-
queryFn: async () => (await
|
|
521
|
+
queryFn: async () => (await A.v1.getById(e)).data,
|
|
494
522
|
...t
|
|
495
|
-
}),
|
|
523
|
+
}), oe = (e, t) => r({
|
|
496
524
|
queryKey: s.counties.list(e),
|
|
497
|
-
queryFn: async () => (await
|
|
525
|
+
queryFn: async () => (await K.v1.getAll(e)).data,
|
|
498
526
|
...t
|
|
499
|
-
}),
|
|
527
|
+
}), re = (e, t) => r({
|
|
500
528
|
queryKey: s.counties.detail(e),
|
|
501
|
-
queryFn: async () => (await
|
|
529
|
+
queryFn: async () => (await K.v1.getById(e)).data,
|
|
502
530
|
...t
|
|
503
|
-
}),
|
|
531
|
+
}), ae = (e, t) => r({
|
|
504
532
|
queryKey: s.cities.list(e),
|
|
505
|
-
queryFn: async () => (await
|
|
533
|
+
queryFn: async () => (await I.v1.getAll(e)).data,
|
|
506
534
|
...t
|
|
507
|
-
}),
|
|
535
|
+
}), ce = (e, t) => r({
|
|
508
536
|
queryKey: s.cities.detail(e),
|
|
509
|
-
queryFn: async () => (await
|
|
537
|
+
queryFn: async () => (await I.v1.getById(e)).data,
|
|
510
538
|
...t
|
|
511
539
|
});
|
|
512
540
|
export {
|
|
513
|
-
|
|
541
|
+
C as Auth,
|
|
514
542
|
g as Categories,
|
|
515
|
-
|
|
543
|
+
I as Cities,
|
|
516
544
|
d as Collections,
|
|
517
|
-
|
|
518
|
-
|
|
545
|
+
K as Counties,
|
|
546
|
+
A as Countries,
|
|
519
547
|
s as EVENTHR_QUERY_KEYS,
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
548
|
+
F as EventAttendances,
|
|
549
|
+
pt as EventhrHttpClient,
|
|
550
|
+
y as Events,
|
|
551
|
+
E as Files,
|
|
552
|
+
Q as ForgotPassword,
|
|
525
553
|
a as HttpClient,
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
554
|
+
$ as Onboardings,
|
|
555
|
+
p as Users,
|
|
556
|
+
O as addRequestInterceptor,
|
|
557
|
+
G as createIsSavedRollback,
|
|
558
|
+
M as createOptimisticIsSavedUpdater,
|
|
559
|
+
ht as default,
|
|
560
|
+
v as instance,
|
|
561
|
+
bt as invalidateCategoriesCache,
|
|
562
|
+
Pt as invalidateCollectionsCache,
|
|
563
|
+
te as invalidateEventAttendancesCache,
|
|
564
|
+
Ft as invalidateEventsCache,
|
|
565
|
+
Jt as invalidateOnboardingsCache,
|
|
566
|
+
m as queryClient,
|
|
567
|
+
H as removeHeader,
|
|
568
|
+
_ as removeRequestInterceptor,
|
|
569
|
+
P as setBaseUrl,
|
|
570
|
+
z as setHeaders,
|
|
571
|
+
ne as useChangePasswordMutation,
|
|
542
572
|
At as useCreateCategoryMutation,
|
|
543
|
-
|
|
544
|
-
|
|
573
|
+
Mt as useCreateCollectionMutation,
|
|
574
|
+
Zt as useCreateEventAttendanceMutation,
|
|
545
575
|
wt as useCreateEventMutation,
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
576
|
+
ee as useCreateForgotPasswordMutation,
|
|
577
|
+
Nt as useCreateOnboardingMutation,
|
|
578
|
+
Lt as useCreateOrganizerMutation,
|
|
579
|
+
Tt as useCreateSubOrganizerMutation,
|
|
580
|
+
Ot as useCreateUserMutation,
|
|
581
|
+
It as useDeleteCategoryMutation,
|
|
582
|
+
xt as useDeleteCollectionMutation,
|
|
583
|
+
Rt as useDeleteEventAttendanceMutation,
|
|
584
|
+
$t as useDeleteEventMutation,
|
|
585
|
+
Vt as useDeleteFileMutation,
|
|
586
|
+
_t as useEditUserMutation,
|
|
557
587
|
Qt as useGetCategoriesQuery,
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
588
|
+
ae as useGetCitiesQuery,
|
|
589
|
+
ce as useGetCityByIdQuery,
|
|
590
|
+
Ut as useGetCollectionByIdQuery,
|
|
591
|
+
Bt as useGetCollectionsQuery,
|
|
592
|
+
oe as useGetCountiesQuery,
|
|
593
|
+
se as useGetCountriesQuery,
|
|
594
|
+
ie as useGetCountryByIdQuery,
|
|
595
|
+
re as useGetCountyByIdQuery,
|
|
596
|
+
Xt as useGetEventAttendancesQuery,
|
|
597
|
+
mt as useGetEventByIdQuery,
|
|
598
|
+
gt as useGetEventsQuery,
|
|
599
|
+
Yt as useGetOnboardingQuery,
|
|
600
|
+
Ht as useGetProfileQuery,
|
|
601
|
+
zt as useGetUsersQuery,
|
|
602
|
+
ft as useLoginMutation,
|
|
603
|
+
Et as useRefreshTokenMutation,
|
|
604
|
+
Dt as useRemoveEventFromCollectionsMutation,
|
|
605
|
+
St as useSaveEventMutation,
|
|
575
606
|
qt as useSocialAuthMutation,
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
607
|
+
Kt as useUpdateCategoryMutation,
|
|
608
|
+
Gt as useUpdateCollectionMutation,
|
|
609
|
+
Ct as useUpdateEventMutation,
|
|
610
|
+
Wt as useUpdateOnboardingMutation,
|
|
611
|
+
kt as useUploadFileMutation,
|
|
612
|
+
jt as useVerifyUserMutation
|
|
582
613
|
};
|
|
583
614
|
//# sourceMappingURL=index.js.map
|