eventhr-http-client 0.1.1 → 0.2.0
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 +31 -0
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +418 -22
- package/lib/index.js +340 -116
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const Auth: {
|
|
|
13
13
|
v1: {
|
|
14
14
|
endpoint: string;
|
|
15
15
|
login(data: LoginDto): Promise<AxiosResponse<AuthTokenResponse, any, {}>>;
|
|
16
|
+
social(data: SocialAuthDto): Promise<AxiosResponse<SocialAuthResponse, any, {}>>;
|
|
16
17
|
refresh(data: RefreshTokenDto): Promise<AxiosResponse<AuthTokenResponse, any, {}>>;
|
|
17
18
|
readonly client: AxiosInstance;
|
|
18
19
|
list(..._args: unknown[]): Promise<unknown>;
|
|
@@ -28,6 +29,11 @@ export declare interface AuthTokenResponse {
|
|
|
28
29
|
refreshToken: string;
|
|
29
30
|
}
|
|
30
31
|
|
|
32
|
+
export declare interface BaseValueObject {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
export declare const Categories: {
|
|
32
38
|
v1: {
|
|
33
39
|
endpoint: string;
|
|
@@ -49,13 +55,36 @@ export declare interface Category {
|
|
|
49
55
|
updatedAt: string;
|
|
50
56
|
}
|
|
51
57
|
|
|
58
|
+
export declare interface ChangeForgotPasswordDto {
|
|
59
|
+
password: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export declare const Cities: {
|
|
63
|
+
v1: {
|
|
64
|
+
endpoint: string;
|
|
65
|
+
getAll(params?: GetCitiesParams): Promise<AxiosResponse<Page<City>, any, {}>>;
|
|
66
|
+
getById(id: string): Promise<AxiosResponse<City, any, {}>>;
|
|
67
|
+
readonly client: AxiosInstance;
|
|
68
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
69
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
70
|
+
create(..._args: unknown[]): Promise<unknown>;
|
|
71
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
72
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export declare interface City {
|
|
77
|
+
id: string;
|
|
78
|
+
name: string;
|
|
79
|
+
country: BaseValueObject;
|
|
80
|
+
county: BaseValueObject;
|
|
81
|
+
}
|
|
82
|
+
|
|
52
83
|
export declare interface Collection {
|
|
53
84
|
id: string;
|
|
54
85
|
name: string;
|
|
55
|
-
customer:
|
|
56
|
-
|
|
57
|
-
};
|
|
58
|
-
events: EventVo[];
|
|
86
|
+
customer: BaseValueObject;
|
|
87
|
+
events: BaseValueObject[];
|
|
59
88
|
createdAt: string;
|
|
60
89
|
updatedAt: string;
|
|
61
90
|
}
|
|
@@ -74,6 +103,56 @@ export declare const Collections: {
|
|
|
74
103
|
};
|
|
75
104
|
};
|
|
76
105
|
|
|
106
|
+
export declare interface Coordinates {
|
|
107
|
+
latitude: number;
|
|
108
|
+
longitude: number;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export declare const Counties: {
|
|
112
|
+
v1: {
|
|
113
|
+
endpoint: string;
|
|
114
|
+
getAll(params?: GetCountiesParams): Promise<AxiosResponse<Page<County>, any, {}>>;
|
|
115
|
+
getById(id: string): Promise<AxiosResponse<County, any, {}>>;
|
|
116
|
+
readonly client: AxiosInstance;
|
|
117
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
118
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
119
|
+
create(..._args: unknown[]): Promise<unknown>;
|
|
120
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
121
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export declare const Countries: {
|
|
126
|
+
v1: {
|
|
127
|
+
endpoint: string;
|
|
128
|
+
getAll(params?: GetCountriesParams): Promise<AxiosResponse<Page<Country>, any, {}>>;
|
|
129
|
+
getById(id: string): Promise<AxiosResponse<Country, any, {}>>;
|
|
130
|
+
readonly client: AxiosInstance;
|
|
131
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
132
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
133
|
+
create(..._args: unknown[]): Promise<unknown>;
|
|
134
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
135
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export declare interface Country {
|
|
140
|
+
id: string;
|
|
141
|
+
name: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export declare interface CountryVo {
|
|
145
|
+
country: BaseValueObject;
|
|
146
|
+
county: BaseValueObject;
|
|
147
|
+
city: BaseValueObject;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export declare interface County {
|
|
151
|
+
id: string;
|
|
152
|
+
name: string;
|
|
153
|
+
country: BaseValueObject;
|
|
154
|
+
}
|
|
155
|
+
|
|
77
156
|
export declare interface CreateCategoryDto {
|
|
78
157
|
name: string;
|
|
79
158
|
}
|
|
@@ -83,15 +162,36 @@ export declare interface CreateCollectionDto {
|
|
|
83
162
|
eventIds: string[];
|
|
84
163
|
}
|
|
85
164
|
|
|
165
|
+
export declare interface CreateEventAttendanceDto {
|
|
166
|
+
eventId: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
86
169
|
export declare interface CreateEventDto {
|
|
87
170
|
name: string;
|
|
88
171
|
description?: string;
|
|
89
172
|
startAt: string;
|
|
90
173
|
endAt: string;
|
|
91
|
-
address:
|
|
92
|
-
coordinates:
|
|
93
|
-
price
|
|
174
|
+
address: EventAddressDto;
|
|
175
|
+
coordinates: Coordinates;
|
|
176
|
+
price: number;
|
|
94
177
|
capacity?: number;
|
|
178
|
+
imageIds?: string[];
|
|
179
|
+
subEvents?: SubEventDto[];
|
|
180
|
+
features?: EventFeature[];
|
|
181
|
+
categoryId: string;
|
|
182
|
+
subOrganizerId?: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export declare interface CreateOnboardingDto {
|
|
186
|
+
categoryIds: string[];
|
|
187
|
+
cityIds: string[];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export declare interface CreateOrganizerUserDto {
|
|
191
|
+
name: string;
|
|
192
|
+
username: string;
|
|
193
|
+
password: string;
|
|
194
|
+
userRole: UserRole;
|
|
95
195
|
}
|
|
96
196
|
|
|
97
197
|
export declare interface CreateUserDto {
|
|
@@ -114,10 +214,15 @@ declare interface Event_2 {
|
|
|
114
214
|
startAt: string;
|
|
115
215
|
endAt: string;
|
|
116
216
|
address: EventAddress;
|
|
117
|
-
coordinates:
|
|
217
|
+
coordinates: Coordinates;
|
|
118
218
|
price?: number;
|
|
119
219
|
capacity?: number;
|
|
120
|
-
organizer:
|
|
220
|
+
organizer: BaseValueObject;
|
|
221
|
+
category: BaseValueObject;
|
|
222
|
+
features?: EventFeature[];
|
|
223
|
+
attendeeCount?: number;
|
|
224
|
+
images?: FileVo[];
|
|
225
|
+
subEvents?: SubEvent[];
|
|
121
226
|
isDeleted: boolean;
|
|
122
227
|
createdAt: string;
|
|
123
228
|
updatedAt: string;
|
|
@@ -125,21 +230,47 @@ declare interface Event_2 {
|
|
|
125
230
|
export { Event_2 as Event }
|
|
126
231
|
|
|
127
232
|
export declare interface EventAddress {
|
|
128
|
-
|
|
233
|
+
countryVo?: CountryVo;
|
|
129
234
|
address: string;
|
|
130
235
|
postalCode?: string;
|
|
131
236
|
locationName?: string;
|
|
132
237
|
}
|
|
133
238
|
|
|
134
|
-
export declare interface
|
|
135
|
-
|
|
136
|
-
|
|
239
|
+
export declare interface EventAddressDto {
|
|
240
|
+
cityId: string;
|
|
241
|
+
address: string;
|
|
242
|
+
postalCode?: string;
|
|
243
|
+
locationName?: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export declare interface EventAttendance {
|
|
247
|
+
id: string;
|
|
248
|
+
user: BaseValueObject;
|
|
249
|
+
event: BaseValueObject;
|
|
250
|
+
createdAt: string;
|
|
251
|
+
updatedAt: string;
|
|
137
252
|
}
|
|
138
253
|
|
|
254
|
+
export declare const EventAttendances: {
|
|
255
|
+
v1: {
|
|
256
|
+
endpoint: string;
|
|
257
|
+
getAll(params?: GetEventAttendancesParams): Promise<AxiosResponse<Page<EventAttendance>, any, {}>>;
|
|
258
|
+
create(data: CreateEventAttendanceDto): Promise<AxiosResponse<void, any, {}>>;
|
|
259
|
+
remove(id: string): Promise<AxiosResponse<void, any, {}>>;
|
|
260
|
+
readonly client: AxiosInstance;
|
|
261
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
262
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
263
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
export declare type EventFeature = 'FREE_ENTRY' | 'PAID_ENTRY' | 'RESERVATION_REQUIRED' | 'INDOOR' | 'OUTDOOR' | 'FREE_PARKING_NEARBY' | 'PAID_PARKING_NEARBY' | 'NO_PARKING_AVAILABLE' | 'PUBLIC_TRANSPORT_NEARBY' | 'WHEELCHAIR_ACCESSIBLE' | 'ACCESSIBLE_RESTROOM' | 'FAMILY_FRIENDLY' | 'PET_FRIENDLY' | 'FOOD_AVAILABLE' | 'DRINKS_AVAILABLE' | 'VEGAN_VEGETARIAN_OPTIONS' | 'CARD_PAYMENT_AVAILABLE' | 'CASH_ONLY' | 'NON_SMOKING' | 'SMOKING_ALLOWED' | 'ADULTS_ONLY_18_PLUS' | 'CLOAKROOM_AVAILABLE' | 'BABY_CHANGING_FACILITY';
|
|
268
|
+
|
|
139
269
|
export declare const EVENTHR_QUERY_KEYS: {
|
|
140
270
|
readonly events: {
|
|
141
271
|
readonly all: readonly ["events"];
|
|
142
272
|
readonly list: (params?: GetEventsParams) => readonly ["events", "list", GetEventsParams | undefined];
|
|
273
|
+
readonly detail: (id: string) => readonly ["events", "detail", string];
|
|
143
274
|
};
|
|
144
275
|
readonly categories: {
|
|
145
276
|
readonly all: readonly ["categories"];
|
|
@@ -158,6 +289,29 @@ export declare const EVENTHR_QUERY_KEYS: {
|
|
|
158
289
|
readonly files: {
|
|
159
290
|
readonly all: readonly ["files"];
|
|
160
291
|
};
|
|
292
|
+
readonly onboardings: {
|
|
293
|
+
readonly all: readonly ["onboardings"];
|
|
294
|
+
readonly detail: () => readonly ["onboardings", "detail"];
|
|
295
|
+
};
|
|
296
|
+
readonly eventAttendances: {
|
|
297
|
+
readonly all: readonly ["event-attendances"];
|
|
298
|
+
readonly list: (params?: GetEventAttendancesParams) => readonly ["event-attendances", "list", GetEventAttendancesParams | undefined];
|
|
299
|
+
};
|
|
300
|
+
readonly countries: {
|
|
301
|
+
readonly all: readonly ["countries"];
|
|
302
|
+
readonly list: (params?: GetCountriesParams) => readonly ["countries", "list", GetCountriesParams | undefined];
|
|
303
|
+
readonly detail: (id: string) => readonly ["countries", "detail", string];
|
|
304
|
+
};
|
|
305
|
+
readonly counties: {
|
|
306
|
+
readonly all: readonly ["counties"];
|
|
307
|
+
readonly list: (params?: GetCountiesParams) => readonly ["counties", "list", GetCountiesParams | undefined];
|
|
308
|
+
readonly detail: (id: string) => readonly ["counties", "detail", string];
|
|
309
|
+
};
|
|
310
|
+
readonly cities: {
|
|
311
|
+
readonly all: readonly ["cities"];
|
|
312
|
+
readonly list: (params?: GetCitiesParams) => readonly ["cities", "list", GetCitiesParams | undefined];
|
|
313
|
+
readonly detail: (id: string) => readonly ["cities", "detail", string];
|
|
314
|
+
};
|
|
161
315
|
};
|
|
162
316
|
|
|
163
317
|
declare const EventhrHttp: EventhrHttpClient;
|
|
@@ -168,6 +322,7 @@ export declare class EventhrHttpClient {
|
|
|
168
322
|
v1: {
|
|
169
323
|
endpoint: string;
|
|
170
324
|
login(data: LoginDto): Promise<AxiosResponse<AuthTokenResponse, any, {}>>;
|
|
325
|
+
social(data: SocialAuthDto): Promise<AxiosResponse<SocialAuthResponse, any, {}>>;
|
|
171
326
|
refresh(data: RefreshTokenDto): Promise<AxiosResponse<AuthTokenResponse, any, {}>>;
|
|
172
327
|
readonly client: AxiosInstance;
|
|
173
328
|
list(..._args: unknown[]): Promise<unknown>;
|
|
@@ -181,6 +336,7 @@ export declare class EventhrHttpClient {
|
|
|
181
336
|
v1: {
|
|
182
337
|
endpoint: string;
|
|
183
338
|
getAll(params?: GetEventsParams): Promise<AxiosResponse<Page<Event_2>, any, {}>>;
|
|
339
|
+
getById(id: string): Promise<AxiosResponse<Event_2, any, {}>>;
|
|
184
340
|
create(data: CreateEventDto): Promise<AxiosResponse<void, any, {}>>;
|
|
185
341
|
update(id: string, data: UpdateEventDto): Promise<AxiosResponse<void, any, {}>>;
|
|
186
342
|
remove(id: string): Promise<AxiosResponse<void, any, {}>>;
|
|
@@ -220,6 +376,9 @@ export declare class EventhrHttpClient {
|
|
|
220
376
|
getAll(params?: PageRequest): Promise<AxiosResponse<Page<User>, any, {}>>;
|
|
221
377
|
getProfile(): Promise<AxiosResponse<User, any, {}>>;
|
|
222
378
|
create(data: CreateUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
379
|
+
createOrganizer(data: CreateOrganizerUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
380
|
+
createSubOrganizer(data: CreateUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
381
|
+
verify(userId: string): Promise<AxiosResponse<void, any, {}>>;
|
|
223
382
|
edit(id: string, data: EditUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
224
383
|
readonly client: AxiosInstance;
|
|
225
384
|
list(..._args: unknown[]): Promise<unknown>;
|
|
@@ -240,6 +399,81 @@ export declare class EventhrHttpClient {
|
|
|
240
399
|
update(..._args: unknown[]): Promise<unknown>;
|
|
241
400
|
};
|
|
242
401
|
};
|
|
402
|
+
readonly Onboardings: {
|
|
403
|
+
v1: {
|
|
404
|
+
endpoint: string;
|
|
405
|
+
getByUser(): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
406
|
+
create(data: CreateOnboardingDto): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
407
|
+
update(data: UpdateOnboardingDto): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
408
|
+
readonly client: AxiosInstance;
|
|
409
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
410
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
411
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
readonly EventAttendances: {
|
|
415
|
+
v1: {
|
|
416
|
+
endpoint: string;
|
|
417
|
+
getAll(params?: GetEventAttendancesParams): Promise<AxiosResponse<Page<EventAttendance>, any, {}>>;
|
|
418
|
+
create(data: CreateEventAttendanceDto): Promise<AxiosResponse<void, any, {}>>;
|
|
419
|
+
remove(id: string): Promise<AxiosResponse<void, any, {}>>;
|
|
420
|
+
readonly client: AxiosInstance;
|
|
421
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
422
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
423
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
readonly ForgotPassword: {
|
|
427
|
+
v1: {
|
|
428
|
+
endpoint: string;
|
|
429
|
+
create(data: ForgotPasswordCreateDto): Promise<AxiosResponse<void, any, {}>>;
|
|
430
|
+
changePassword(id: string, data: ChangeForgotPasswordDto): Promise<AxiosResponse<void, any, {}>>;
|
|
431
|
+
readonly client: AxiosInstance;
|
|
432
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
433
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
434
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
435
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
readonly Countries: {
|
|
439
|
+
v1: {
|
|
440
|
+
endpoint: string;
|
|
441
|
+
getAll(params?: GetCountriesParams): Promise<AxiosResponse<Page<Country>, any, {}>>;
|
|
442
|
+
getById(id: string): Promise<AxiosResponse<Country, any, {}>>;
|
|
443
|
+
readonly client: AxiosInstance;
|
|
444
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
445
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
446
|
+
create(..._args: unknown[]): Promise<unknown>;
|
|
447
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
448
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
readonly Counties: {
|
|
452
|
+
v1: {
|
|
453
|
+
endpoint: string;
|
|
454
|
+
getAll(params?: GetCountiesParams): Promise<AxiosResponse<Page<County>, any, {}>>;
|
|
455
|
+
getById(id: string): Promise<AxiosResponse<County, any, {}>>;
|
|
456
|
+
readonly client: AxiosInstance;
|
|
457
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
458
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
459
|
+
create(..._args: unknown[]): Promise<unknown>;
|
|
460
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
461
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
readonly Cities: {
|
|
465
|
+
v1: {
|
|
466
|
+
endpoint: string;
|
|
467
|
+
getAll(params?: GetCitiesParams): Promise<AxiosResponse<Page<City>, any, {}>>;
|
|
468
|
+
getById(id: string): Promise<AxiosResponse<City, any, {}>>;
|
|
469
|
+
readonly client: AxiosInstance;
|
|
470
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
471
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
472
|
+
create(..._args: unknown[]): Promise<unknown>;
|
|
473
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
474
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
475
|
+
};
|
|
476
|
+
};
|
|
243
477
|
configure({ baseUrl, headers }: EventhrHttpConfig): void;
|
|
244
478
|
removeHeader(key: string): void;
|
|
245
479
|
addInterceptor(onFulfilled: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>, onRejected?: (error: unknown) => unknown): number;
|
|
@@ -251,14 +485,11 @@ export declare interface EventhrHttpConfig {
|
|
|
251
485
|
headers?: Record<string, string>;
|
|
252
486
|
}
|
|
253
487
|
|
|
254
|
-
export declare interface EventOrganizer {
|
|
255
|
-
id: string;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
488
|
export declare const Events: {
|
|
259
489
|
v1: {
|
|
260
490
|
endpoint: string;
|
|
261
491
|
getAll(params?: GetEventsParams): Promise<AxiosResponse<Page<Event_2>, any, {}>>;
|
|
492
|
+
getById(id: string): Promise<AxiosResponse<Event_2, any, {}>>;
|
|
262
493
|
create(data: CreateEventDto): Promise<AxiosResponse<void, any, {}>>;
|
|
263
494
|
update(id: string, data: UpdateEventDto): Promise<AxiosResponse<void, any, {}>>;
|
|
264
495
|
remove(id: string): Promise<AxiosResponse<void, any, {}>>;
|
|
@@ -268,11 +499,6 @@ export declare const Events: {
|
|
|
268
499
|
};
|
|
269
500
|
};
|
|
270
501
|
|
|
271
|
-
export declare interface EventVo {
|
|
272
|
-
id: string;
|
|
273
|
-
name: string;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
502
|
export declare const Files: {
|
|
277
503
|
v1: {
|
|
278
504
|
endpoint: string;
|
|
@@ -288,14 +514,55 @@ export declare const Files: {
|
|
|
288
514
|
|
|
289
515
|
export declare type FileType = 'IMAGE' | 'VIDEO' | 'DOCUMENT';
|
|
290
516
|
|
|
517
|
+
export declare interface FileVo {
|
|
518
|
+
id: string;
|
|
519
|
+
url: string;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export declare const ForgotPassword: {
|
|
523
|
+
v1: {
|
|
524
|
+
endpoint: string;
|
|
525
|
+
create(data: ForgotPasswordCreateDto): Promise<AxiosResponse<void, any, {}>>;
|
|
526
|
+
changePassword(id: string, data: ChangeForgotPasswordDto): Promise<AxiosResponse<void, any, {}>>;
|
|
527
|
+
readonly client: AxiosInstance;
|
|
528
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
529
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
530
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
531
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
export declare interface ForgotPasswordCreateDto {
|
|
536
|
+
email: string;
|
|
537
|
+
}
|
|
538
|
+
|
|
291
539
|
export declare interface GetCategoriesParams extends PageRequest {
|
|
292
540
|
name?: string;
|
|
293
541
|
}
|
|
294
542
|
|
|
543
|
+
export declare interface GetCitiesParams extends PageRequest {
|
|
544
|
+
name?: string;
|
|
545
|
+
'country-id'?: string;
|
|
546
|
+
'county-id'?: string;
|
|
547
|
+
}
|
|
548
|
+
|
|
295
549
|
export declare interface GetCollectionsParams extends PageRequest {
|
|
296
550
|
name?: string;
|
|
297
551
|
}
|
|
298
552
|
|
|
553
|
+
export declare interface GetCountiesParams extends PageRequest {
|
|
554
|
+
name?: string;
|
|
555
|
+
'country-id'?: string;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export declare interface GetCountriesParams extends PageRequest {
|
|
559
|
+
name?: string;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export declare interface GetEventAttendancesParams extends PageRequest {
|
|
563
|
+
'event-id'?: string;
|
|
564
|
+
}
|
|
565
|
+
|
|
299
566
|
export declare interface GetEventsParams extends PageRequest {
|
|
300
567
|
name?: string;
|
|
301
568
|
latitude?: number;
|
|
@@ -319,8 +586,12 @@ export declare const invalidateCategoriesCache: () => Promise<void>;
|
|
|
319
586
|
|
|
320
587
|
export declare const invalidateCollectionsCache: () => Promise<void>;
|
|
321
588
|
|
|
589
|
+
export declare const invalidateEventAttendancesCache: () => Promise<void>;
|
|
590
|
+
|
|
322
591
|
export declare const invalidateEventsCache: () => Promise<void>;
|
|
323
592
|
|
|
593
|
+
export declare const invalidateOnboardingsCache: () => Promise<void>;
|
|
594
|
+
|
|
324
595
|
export declare interface LoginDto {
|
|
325
596
|
username: string;
|
|
326
597
|
password: string;
|
|
@@ -329,6 +600,28 @@ export declare interface LoginDto {
|
|
|
329
600
|
|
|
330
601
|
export declare type MutationOptions<TData, TVariables, TError = Error> = Omit<UseMutationOptions<TData, TError, TVariables>, 'mutationFn'>;
|
|
331
602
|
|
|
603
|
+
export declare interface Onboarding {
|
|
604
|
+
id: string;
|
|
605
|
+
user: BaseValueObject;
|
|
606
|
+
categories: BaseValueObject[];
|
|
607
|
+
countries: CountryVo[];
|
|
608
|
+
createdAt: string;
|
|
609
|
+
updatedAt: string;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export declare const Onboardings: {
|
|
613
|
+
v1: {
|
|
614
|
+
endpoint: string;
|
|
615
|
+
getByUser(): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
616
|
+
create(data: CreateOnboardingDto): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
617
|
+
update(data: UpdateOnboardingDto): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
618
|
+
readonly client: AxiosInstance;
|
|
619
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
620
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
621
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
624
|
+
|
|
332
625
|
export declare interface Page<T> {
|
|
333
626
|
content: T[];
|
|
334
627
|
totalElements: number;
|
|
@@ -363,6 +656,48 @@ export declare const setBaseUrl: (url: string) => void;
|
|
|
363
656
|
|
|
364
657
|
export declare const setHeaders: (headers: Record<string, string>) => void;
|
|
365
658
|
|
|
659
|
+
export declare interface SocialAuthDto {
|
|
660
|
+
provider: SocialProvider;
|
|
661
|
+
token: string;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
export declare interface SocialAuthResponse {
|
|
665
|
+
email: string;
|
|
666
|
+
name: string;
|
|
667
|
+
provider: string;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export declare type SocialProvider = 'GOOGLE' | 'FACEBOOK';
|
|
671
|
+
|
|
672
|
+
export declare interface SubEvent {
|
|
673
|
+
id: string;
|
|
674
|
+
name: string;
|
|
675
|
+
description?: string;
|
|
676
|
+
startAt: string;
|
|
677
|
+
endAt: string;
|
|
678
|
+
address: EventAddress;
|
|
679
|
+
coordinates: Coordinates;
|
|
680
|
+
price?: number;
|
|
681
|
+
capacity?: number;
|
|
682
|
+
images: FileVo[];
|
|
683
|
+
isDeleted: boolean;
|
|
684
|
+
createdAt: string;
|
|
685
|
+
updatedAt: string;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export declare interface SubEventDto {
|
|
689
|
+
id?: string;
|
|
690
|
+
name: string;
|
|
691
|
+
description?: string;
|
|
692
|
+
startAt: string;
|
|
693
|
+
endAt: string;
|
|
694
|
+
address: EventAddressDto;
|
|
695
|
+
coordinates: Coordinates;
|
|
696
|
+
price?: number;
|
|
697
|
+
capacity?: number;
|
|
698
|
+
imageIds?: string[];
|
|
699
|
+
}
|
|
700
|
+
|
|
366
701
|
export declare interface UpdateCategoryDto {
|
|
367
702
|
name: string;
|
|
368
703
|
}
|
|
@@ -374,6 +709,8 @@ export declare interface UpdateCollectionDto {
|
|
|
374
709
|
|
|
375
710
|
export declare type UpdateEventDto = CreateEventDto;
|
|
376
711
|
|
|
712
|
+
export declare type UpdateOnboardingDto = CreateOnboardingDto;
|
|
713
|
+
|
|
377
714
|
export declare interface UploadedFile {
|
|
378
715
|
id: string;
|
|
379
716
|
fileName: string;
|
|
@@ -384,12 +721,30 @@ export declare interface UploadedFile {
|
|
|
384
721
|
updatedAt: string;
|
|
385
722
|
}
|
|
386
723
|
|
|
724
|
+
export declare const useChangePasswordMutation: (options?: MutationOptions<void, {
|
|
725
|
+
id: string;
|
|
726
|
+
data: ChangeForgotPasswordDto;
|
|
727
|
+
}>) => UseMutationResult<void, Error, {
|
|
728
|
+
id: string;
|
|
729
|
+
data: ChangeForgotPasswordDto;
|
|
730
|
+
}, unknown>;
|
|
731
|
+
|
|
387
732
|
export declare const useCreateCategoryMutation: (options?: MutationOptions<void, CreateCategoryDto>) => UseMutationResult<void, Error, CreateCategoryDto, unknown>;
|
|
388
733
|
|
|
389
734
|
export declare const useCreateCollectionMutation: (options?: MutationOptions<void, CreateCollectionDto>) => UseMutationResult<void, Error, CreateCollectionDto, unknown>;
|
|
390
735
|
|
|
736
|
+
export declare const useCreateEventAttendanceMutation: (options?: MutationOptions<void, CreateEventAttendanceDto>) => UseMutationResult<void, Error, CreateEventAttendanceDto, unknown>;
|
|
737
|
+
|
|
391
738
|
export declare const useCreateEventMutation: (options?: MutationOptions<void, CreateEventDto>) => UseMutationResult<void, Error, CreateEventDto, unknown>;
|
|
392
739
|
|
|
740
|
+
export declare const useCreateForgotPasswordMutation: (options?: MutationOptions<void, ForgotPasswordCreateDto>) => UseMutationResult<void, Error, ForgotPasswordCreateDto, unknown>;
|
|
741
|
+
|
|
742
|
+
export declare const useCreateOnboardingMutation: (options?: MutationOptions<Onboarding, CreateOnboardingDto>) => UseMutationResult<Onboarding, Error, CreateOnboardingDto, unknown>;
|
|
743
|
+
|
|
744
|
+
export declare const useCreateOrganizerMutation: (options?: MutationOptions<void, CreateOrganizerUserDto>) => UseMutationResult<void, Error, CreateOrganizerUserDto, unknown>;
|
|
745
|
+
|
|
746
|
+
export declare const useCreateSubOrganizerMutation: (options?: MutationOptions<void, CreateUserDto>) => UseMutationResult<void, Error, CreateUserDto, unknown>;
|
|
747
|
+
|
|
393
748
|
export declare const useCreateUserMutation: (options?: MutationOptions<void, CreateUserDto>) => UseMutationResult<void, Error, CreateUserDto, unknown>;
|
|
394
749
|
|
|
395
750
|
export declare const useDeleteCategoryMutation: (options?: MutationOptions<void, {
|
|
@@ -404,6 +759,12 @@ export declare const useDeleteCollectionMutation: (options?: MutationOptions<voi
|
|
|
404
759
|
id: string;
|
|
405
760
|
}, unknown>;
|
|
406
761
|
|
|
762
|
+
export declare const useDeleteEventAttendanceMutation: (options?: MutationOptions<void, {
|
|
763
|
+
id: string;
|
|
764
|
+
}>) => UseMutationResult<void, Error, {
|
|
765
|
+
id: string;
|
|
766
|
+
}, unknown>;
|
|
767
|
+
|
|
407
768
|
export declare const useDeleteEventMutation: (options?: MutationOptions<void, {
|
|
408
769
|
id: string;
|
|
409
770
|
}>) => UseMutationResult<void, Error, {
|
|
@@ -426,12 +787,30 @@ data: EditUserDto;
|
|
|
426
787
|
|
|
427
788
|
export declare const useGetCategoriesQuery: (params?: GetCategoriesParams, options?: QueryOptions<Page<Category>>) => UseQueryResult<NoInfer<Page<Category>>, Error>;
|
|
428
789
|
|
|
790
|
+
export declare const useGetCitiesQuery: (params?: GetCitiesParams, options?: QueryOptions<Page<City>>) => UseQueryResult<NoInfer<Page<City>>, Error>;
|
|
791
|
+
|
|
792
|
+
export declare const useGetCityByIdQuery: (id: string, options?: QueryOptions<City>) => UseQueryResult<NoInfer<City>, Error>;
|
|
793
|
+
|
|
429
794
|
export declare const useGetCollectionByIdQuery: (id: string, options?: QueryOptions<Collection>) => UseQueryResult<NoInfer<Collection>, Error>;
|
|
430
795
|
|
|
431
796
|
export declare const useGetCollectionsQuery: (params?: GetCollectionsParams, options?: QueryOptions<Page<Collection>>) => UseQueryResult<NoInfer<Page<Collection>>, Error>;
|
|
432
797
|
|
|
798
|
+
export declare const useGetCountiesQuery: (params?: GetCountiesParams, options?: QueryOptions<Page<County>>) => UseQueryResult<NoInfer<Page<County>>, Error>;
|
|
799
|
+
|
|
800
|
+
export declare const useGetCountriesQuery: (params?: GetCountriesParams, options?: QueryOptions<Page<Country>>) => UseQueryResult<NoInfer<Page<Country>>, Error>;
|
|
801
|
+
|
|
802
|
+
export declare const useGetCountryByIdQuery: (id: string, options?: QueryOptions<Country>) => UseQueryResult<NoInfer<Country>, Error>;
|
|
803
|
+
|
|
804
|
+
export declare const useGetCountyByIdQuery: (id: string, options?: QueryOptions<County>) => UseQueryResult<NoInfer<County>, Error>;
|
|
805
|
+
|
|
806
|
+
export declare const useGetEventAttendancesQuery: (params?: GetEventAttendancesParams, options?: QueryOptions<Page<EventAttendance>>) => UseQueryResult<NoInfer<Page<EventAttendance>>, Error>;
|
|
807
|
+
|
|
808
|
+
export declare const useGetEventByIdQuery: (id: string, options?: QueryOptions<Event_2>) => UseQueryResult<NoInfer<Event_2>, Error>;
|
|
809
|
+
|
|
433
810
|
export declare const useGetEventsQuery: (params?: GetEventsParams, options?: QueryOptions<Page<Event_2>>) => UseQueryResult<NoInfer<Page<Event_2>>, Error>;
|
|
434
811
|
|
|
812
|
+
export declare const useGetOnboardingQuery: (options?: QueryOptions<Onboarding>) => UseQueryResult<NoInfer<Onboarding>, Error>;
|
|
813
|
+
|
|
435
814
|
export declare const useGetProfileQuery: (options?: QueryOptions<User>) => UseQueryResult<NoInfer<User>, Error>;
|
|
436
815
|
|
|
437
816
|
export declare const useGetUsersQuery: (params?: PageRequest, options?: QueryOptions<Page<User>>) => UseQueryResult<NoInfer<Page<User>>, Error>;
|
|
@@ -445,16 +824,23 @@ export declare interface User {
|
|
|
445
824
|
imageId?: string;
|
|
446
825
|
createdAt: string;
|
|
447
826
|
updatedAt: string;
|
|
827
|
+
emailVerified: boolean;
|
|
828
|
+
onboarded: boolean;
|
|
448
829
|
}
|
|
449
830
|
|
|
450
831
|
export declare const useRefreshTokenMutation: (options?: MutationOptions<AuthTokenResponse, RefreshTokenDto>) => UseMutationResult<AuthTokenResponse, Error, RefreshTokenDto, unknown>;
|
|
451
832
|
|
|
833
|
+
export declare type UserRole = 'ADMIN' | 'CUSTOMER' | 'PRIVATE_ORGANIZER' | 'PUBLIC_ORGANIZER' | 'SUB_ORGANIZER';
|
|
834
|
+
|
|
452
835
|
export declare const Users: {
|
|
453
836
|
v1: {
|
|
454
837
|
endpoint: string;
|
|
455
838
|
getAll(params?: PageRequest): Promise<AxiosResponse<Page<User>, any, {}>>;
|
|
456
839
|
getProfile(): Promise<AxiosResponse<User, any, {}>>;
|
|
457
840
|
create(data: CreateUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
841
|
+
createOrganizer(data: CreateOrganizerUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
842
|
+
createSubOrganizer(data: CreateUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
843
|
+
verify(userId: string): Promise<AxiosResponse<void, any, {}>>;
|
|
458
844
|
edit(id: string, data: EditUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
459
845
|
readonly client: AxiosInstance;
|
|
460
846
|
list(..._args: unknown[]): Promise<unknown>;
|
|
@@ -464,6 +850,8 @@ export declare const Users: {
|
|
|
464
850
|
};
|
|
465
851
|
};
|
|
466
852
|
|
|
853
|
+
export declare const useSocialAuthMutation: (options?: MutationOptions<SocialAuthResponse, SocialAuthDto>) => UseMutationResult<SocialAuthResponse, Error, SocialAuthDto, unknown>;
|
|
854
|
+
|
|
467
855
|
export declare const useUpdateCategoryMutation: (options?: MutationOptions<void, {
|
|
468
856
|
id: string;
|
|
469
857
|
data: UpdateCategoryDto;
|
|
@@ -488,6 +876,14 @@ id: string;
|
|
|
488
876
|
data: UpdateEventDto;
|
|
489
877
|
}, unknown>;
|
|
490
878
|
|
|
879
|
+
export declare const useUpdateOnboardingMutation: (options?: MutationOptions<Onboarding, UpdateOnboardingDto>) => UseMutationResult<Onboarding, Error, CreateOnboardingDto, unknown>;
|
|
880
|
+
|
|
491
881
|
export declare const useUploadFileMutation: (options?: MutationOptions<UploadedFile, File>) => UseMutationResult<UploadedFile, Error, File, unknown>;
|
|
492
882
|
|
|
883
|
+
export declare const useVerifyUserMutation: (options?: MutationOptions<void, {
|
|
884
|
+
userId: string;
|
|
885
|
+
}>) => UseMutationResult<void, Error, {
|
|
886
|
+
userId: string;
|
|
887
|
+
}, unknown>;
|
|
888
|
+
|
|
493
889
|
export { }
|