eventhr-http-client 0.1.1 → 2.0.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 +408 -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
|
+
features?: EventFeature[];
|
|
180
|
+
categoryId: string;
|
|
181
|
+
subOrganizerId?: string;
|
|
182
|
+
parentEventId?: 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,16 @@ 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
|
+
parentEvent?: BaseValueObject;
|
|
226
|
+
subEvents?: SubEvent[];
|
|
121
227
|
isDeleted: boolean;
|
|
122
228
|
createdAt: string;
|
|
123
229
|
updatedAt: string;
|
|
@@ -125,21 +231,47 @@ declare interface Event_2 {
|
|
|
125
231
|
export { Event_2 as Event }
|
|
126
232
|
|
|
127
233
|
export declare interface EventAddress {
|
|
128
|
-
|
|
234
|
+
countryVo?: CountryVo;
|
|
129
235
|
address: string;
|
|
130
236
|
postalCode?: string;
|
|
131
237
|
locationName?: string;
|
|
132
238
|
}
|
|
133
239
|
|
|
134
|
-
export declare interface
|
|
135
|
-
|
|
136
|
-
|
|
240
|
+
export declare interface EventAddressDto {
|
|
241
|
+
cityId: string;
|
|
242
|
+
address: string;
|
|
243
|
+
postalCode?: string;
|
|
244
|
+
locationName?: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export declare interface EventAttendance {
|
|
248
|
+
id: string;
|
|
249
|
+
user: BaseValueObject;
|
|
250
|
+
event: BaseValueObject;
|
|
251
|
+
createdAt: string;
|
|
252
|
+
updatedAt: string;
|
|
137
253
|
}
|
|
138
254
|
|
|
255
|
+
export declare const EventAttendances: {
|
|
256
|
+
v1: {
|
|
257
|
+
endpoint: string;
|
|
258
|
+
getAll(params?: GetEventAttendancesParams): Promise<AxiosResponse<Page<EventAttendance>, any, {}>>;
|
|
259
|
+
create(data: CreateEventAttendanceDto): Promise<AxiosResponse<void, any, {}>>;
|
|
260
|
+
remove(id: string): Promise<AxiosResponse<void, any, {}>>;
|
|
261
|
+
readonly client: AxiosInstance;
|
|
262
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
263
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
264
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
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';
|
|
269
|
+
|
|
139
270
|
export declare const EVENTHR_QUERY_KEYS: {
|
|
140
271
|
readonly events: {
|
|
141
272
|
readonly all: readonly ["events"];
|
|
142
273
|
readonly list: (params?: GetEventsParams) => readonly ["events", "list", GetEventsParams | undefined];
|
|
274
|
+
readonly detail: (id: string) => readonly ["events", "detail", string];
|
|
143
275
|
};
|
|
144
276
|
readonly categories: {
|
|
145
277
|
readonly all: readonly ["categories"];
|
|
@@ -158,6 +290,29 @@ export declare const EVENTHR_QUERY_KEYS: {
|
|
|
158
290
|
readonly files: {
|
|
159
291
|
readonly all: readonly ["files"];
|
|
160
292
|
};
|
|
293
|
+
readonly onboardings: {
|
|
294
|
+
readonly all: readonly ["onboardings"];
|
|
295
|
+
readonly detail: () => readonly ["onboardings", "detail"];
|
|
296
|
+
};
|
|
297
|
+
readonly eventAttendances: {
|
|
298
|
+
readonly all: readonly ["event-attendances"];
|
|
299
|
+
readonly list: (params?: GetEventAttendancesParams) => readonly ["event-attendances", "list", GetEventAttendancesParams | undefined];
|
|
300
|
+
};
|
|
301
|
+
readonly countries: {
|
|
302
|
+
readonly all: readonly ["countries"];
|
|
303
|
+
readonly list: (params?: GetCountriesParams) => readonly ["countries", "list", GetCountriesParams | undefined];
|
|
304
|
+
readonly detail: (id: string) => readonly ["countries", "detail", string];
|
|
305
|
+
};
|
|
306
|
+
readonly counties: {
|
|
307
|
+
readonly all: readonly ["counties"];
|
|
308
|
+
readonly list: (params?: GetCountiesParams) => readonly ["counties", "list", GetCountiesParams | undefined];
|
|
309
|
+
readonly detail: (id: string) => readonly ["counties", "detail", string];
|
|
310
|
+
};
|
|
311
|
+
readonly cities: {
|
|
312
|
+
readonly all: readonly ["cities"];
|
|
313
|
+
readonly list: (params?: GetCitiesParams) => readonly ["cities", "list", GetCitiesParams | undefined];
|
|
314
|
+
readonly detail: (id: string) => readonly ["cities", "detail", string];
|
|
315
|
+
};
|
|
161
316
|
};
|
|
162
317
|
|
|
163
318
|
declare const EventhrHttp: EventhrHttpClient;
|
|
@@ -168,6 +323,7 @@ export declare class EventhrHttpClient {
|
|
|
168
323
|
v1: {
|
|
169
324
|
endpoint: string;
|
|
170
325
|
login(data: LoginDto): Promise<AxiosResponse<AuthTokenResponse, any, {}>>;
|
|
326
|
+
social(data: SocialAuthDto): Promise<AxiosResponse<SocialAuthResponse, any, {}>>;
|
|
171
327
|
refresh(data: RefreshTokenDto): Promise<AxiosResponse<AuthTokenResponse, any, {}>>;
|
|
172
328
|
readonly client: AxiosInstance;
|
|
173
329
|
list(..._args: unknown[]): Promise<unknown>;
|
|
@@ -181,6 +337,7 @@ export declare class EventhrHttpClient {
|
|
|
181
337
|
v1: {
|
|
182
338
|
endpoint: string;
|
|
183
339
|
getAll(params?: GetEventsParams): Promise<AxiosResponse<Page<Event_2>, any, {}>>;
|
|
340
|
+
getById(id: string): Promise<AxiosResponse<Event_2, any, {}>>;
|
|
184
341
|
create(data: CreateEventDto): Promise<AxiosResponse<void, any, {}>>;
|
|
185
342
|
update(id: string, data: UpdateEventDto): Promise<AxiosResponse<void, any, {}>>;
|
|
186
343
|
remove(id: string): Promise<AxiosResponse<void, any, {}>>;
|
|
@@ -220,6 +377,9 @@ export declare class EventhrHttpClient {
|
|
|
220
377
|
getAll(params?: PageRequest): Promise<AxiosResponse<Page<User>, any, {}>>;
|
|
221
378
|
getProfile(): Promise<AxiosResponse<User, any, {}>>;
|
|
222
379
|
create(data: CreateUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
380
|
+
createOrganizer(data: CreateOrganizerUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
381
|
+
createSubOrganizer(data: CreateUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
382
|
+
verify(userId: string): Promise<AxiosResponse<void, any, {}>>;
|
|
223
383
|
edit(id: string, data: EditUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
224
384
|
readonly client: AxiosInstance;
|
|
225
385
|
list(..._args: unknown[]): Promise<unknown>;
|
|
@@ -240,6 +400,81 @@ export declare class EventhrHttpClient {
|
|
|
240
400
|
update(..._args: unknown[]): Promise<unknown>;
|
|
241
401
|
};
|
|
242
402
|
};
|
|
403
|
+
readonly Onboardings: {
|
|
404
|
+
v1: {
|
|
405
|
+
endpoint: string;
|
|
406
|
+
getByUser(): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
407
|
+
create(data: CreateOnboardingDto): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
408
|
+
update(data: UpdateOnboardingDto): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
409
|
+
readonly client: AxiosInstance;
|
|
410
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
411
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
412
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
readonly EventAttendances: {
|
|
416
|
+
v1: {
|
|
417
|
+
endpoint: string;
|
|
418
|
+
getAll(params?: GetEventAttendancesParams): Promise<AxiosResponse<Page<EventAttendance>, any, {}>>;
|
|
419
|
+
create(data: CreateEventAttendanceDto): Promise<AxiosResponse<void, any, {}>>;
|
|
420
|
+
remove(id: string): Promise<AxiosResponse<void, any, {}>>;
|
|
421
|
+
readonly client: AxiosInstance;
|
|
422
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
423
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
424
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
readonly ForgotPassword: {
|
|
428
|
+
v1: {
|
|
429
|
+
endpoint: string;
|
|
430
|
+
create(data: ForgotPasswordCreateDto): Promise<AxiosResponse<void, any, {}>>;
|
|
431
|
+
changePassword(id: string, data: ChangeForgotPasswordDto): Promise<AxiosResponse<void, any, {}>>;
|
|
432
|
+
readonly client: AxiosInstance;
|
|
433
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
434
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
435
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
436
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
readonly Countries: {
|
|
440
|
+
v1: {
|
|
441
|
+
endpoint: string;
|
|
442
|
+
getAll(params?: GetCountriesParams): Promise<AxiosResponse<Page<Country>, any, {}>>;
|
|
443
|
+
getById(id: string): Promise<AxiosResponse<Country, any, {}>>;
|
|
444
|
+
readonly client: AxiosInstance;
|
|
445
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
446
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
447
|
+
create(..._args: unknown[]): Promise<unknown>;
|
|
448
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
449
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
readonly Counties: {
|
|
453
|
+
v1: {
|
|
454
|
+
endpoint: string;
|
|
455
|
+
getAll(params?: GetCountiesParams): Promise<AxiosResponse<Page<County>, any, {}>>;
|
|
456
|
+
getById(id: string): Promise<AxiosResponse<County, any, {}>>;
|
|
457
|
+
readonly client: AxiosInstance;
|
|
458
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
459
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
460
|
+
create(..._args: unknown[]): Promise<unknown>;
|
|
461
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
462
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
readonly Cities: {
|
|
466
|
+
v1: {
|
|
467
|
+
endpoint: string;
|
|
468
|
+
getAll(params?: GetCitiesParams): Promise<AxiosResponse<Page<City>, any, {}>>;
|
|
469
|
+
getById(id: string): Promise<AxiosResponse<City, any, {}>>;
|
|
470
|
+
readonly client: AxiosInstance;
|
|
471
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
472
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
473
|
+
create(..._args: unknown[]): Promise<unknown>;
|
|
474
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
475
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
476
|
+
};
|
|
477
|
+
};
|
|
243
478
|
configure({ baseUrl, headers }: EventhrHttpConfig): void;
|
|
244
479
|
removeHeader(key: string): void;
|
|
245
480
|
addInterceptor(onFulfilled: (config: InternalAxiosRequestConfig) => InternalAxiosRequestConfig | Promise<InternalAxiosRequestConfig>, onRejected?: (error: unknown) => unknown): number;
|
|
@@ -251,14 +486,11 @@ export declare interface EventhrHttpConfig {
|
|
|
251
486
|
headers?: Record<string, string>;
|
|
252
487
|
}
|
|
253
488
|
|
|
254
|
-
export declare interface EventOrganizer {
|
|
255
|
-
id: string;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
489
|
export declare const Events: {
|
|
259
490
|
v1: {
|
|
260
491
|
endpoint: string;
|
|
261
492
|
getAll(params?: GetEventsParams): Promise<AxiosResponse<Page<Event_2>, any, {}>>;
|
|
493
|
+
getById(id: string): Promise<AxiosResponse<Event_2, any, {}>>;
|
|
262
494
|
create(data: CreateEventDto): Promise<AxiosResponse<void, any, {}>>;
|
|
263
495
|
update(id: string, data: UpdateEventDto): Promise<AxiosResponse<void, any, {}>>;
|
|
264
496
|
remove(id: string): Promise<AxiosResponse<void, any, {}>>;
|
|
@@ -268,11 +500,6 @@ export declare const Events: {
|
|
|
268
500
|
};
|
|
269
501
|
};
|
|
270
502
|
|
|
271
|
-
export declare interface EventVo {
|
|
272
|
-
id: string;
|
|
273
|
-
name: string;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
503
|
export declare const Files: {
|
|
277
504
|
v1: {
|
|
278
505
|
endpoint: string;
|
|
@@ -288,14 +515,55 @@ export declare const Files: {
|
|
|
288
515
|
|
|
289
516
|
export declare type FileType = 'IMAGE' | 'VIDEO' | 'DOCUMENT';
|
|
290
517
|
|
|
518
|
+
export declare interface FileVo {
|
|
519
|
+
id: string;
|
|
520
|
+
url: string;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export declare const ForgotPassword: {
|
|
524
|
+
v1: {
|
|
525
|
+
endpoint: string;
|
|
526
|
+
create(data: ForgotPasswordCreateDto): Promise<AxiosResponse<void, any, {}>>;
|
|
527
|
+
changePassword(id: string, data: ChangeForgotPasswordDto): Promise<AxiosResponse<void, any, {}>>;
|
|
528
|
+
readonly client: AxiosInstance;
|
|
529
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
530
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
531
|
+
update(..._args: unknown[]): Promise<unknown>;
|
|
532
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
|
|
536
|
+
export declare interface ForgotPasswordCreateDto {
|
|
537
|
+
email: string;
|
|
538
|
+
}
|
|
539
|
+
|
|
291
540
|
export declare interface GetCategoriesParams extends PageRequest {
|
|
292
541
|
name?: string;
|
|
293
542
|
}
|
|
294
543
|
|
|
544
|
+
export declare interface GetCitiesParams extends PageRequest {
|
|
545
|
+
name?: string;
|
|
546
|
+
'country-id'?: string;
|
|
547
|
+
'county-id'?: string;
|
|
548
|
+
}
|
|
549
|
+
|
|
295
550
|
export declare interface GetCollectionsParams extends PageRequest {
|
|
296
551
|
name?: string;
|
|
297
552
|
}
|
|
298
553
|
|
|
554
|
+
export declare interface GetCountiesParams extends PageRequest {
|
|
555
|
+
name?: string;
|
|
556
|
+
'country-id'?: string;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
export declare interface GetCountriesParams extends PageRequest {
|
|
560
|
+
name?: string;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export declare interface GetEventAttendancesParams extends PageRequest {
|
|
564
|
+
'event-id'?: string;
|
|
565
|
+
}
|
|
566
|
+
|
|
299
567
|
export declare interface GetEventsParams extends PageRequest {
|
|
300
568
|
name?: string;
|
|
301
569
|
latitude?: number;
|
|
@@ -319,8 +587,12 @@ export declare const invalidateCategoriesCache: () => Promise<void>;
|
|
|
319
587
|
|
|
320
588
|
export declare const invalidateCollectionsCache: () => Promise<void>;
|
|
321
589
|
|
|
590
|
+
export declare const invalidateEventAttendancesCache: () => Promise<void>;
|
|
591
|
+
|
|
322
592
|
export declare const invalidateEventsCache: () => Promise<void>;
|
|
323
593
|
|
|
594
|
+
export declare const invalidateOnboardingsCache: () => Promise<void>;
|
|
595
|
+
|
|
324
596
|
export declare interface LoginDto {
|
|
325
597
|
username: string;
|
|
326
598
|
password: string;
|
|
@@ -329,6 +601,28 @@ export declare interface LoginDto {
|
|
|
329
601
|
|
|
330
602
|
export declare type MutationOptions<TData, TVariables, TError = Error> = Omit<UseMutationOptions<TData, TError, TVariables>, 'mutationFn'>;
|
|
331
603
|
|
|
604
|
+
export declare interface Onboarding {
|
|
605
|
+
id: string;
|
|
606
|
+
user: BaseValueObject;
|
|
607
|
+
categories: BaseValueObject[];
|
|
608
|
+
countries: CountryVo[];
|
|
609
|
+
createdAt: string;
|
|
610
|
+
updatedAt: string;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export declare const Onboardings: {
|
|
614
|
+
v1: {
|
|
615
|
+
endpoint: string;
|
|
616
|
+
getByUser(): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
617
|
+
create(data: CreateOnboardingDto): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
618
|
+
update(data: UpdateOnboardingDto): Promise<AxiosResponse<Onboarding, any, {}>>;
|
|
619
|
+
readonly client: AxiosInstance;
|
|
620
|
+
list(..._args: unknown[]): Promise<unknown>;
|
|
621
|
+
get(..._args: unknown[]): Promise<unknown>;
|
|
622
|
+
remove(..._args: unknown[]): Promise<unknown>;
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
|
|
332
626
|
export declare interface Page<T> {
|
|
333
627
|
content: T[];
|
|
334
628
|
totalElements: number;
|
|
@@ -363,6 +657,37 @@ export declare const setBaseUrl: (url: string) => void;
|
|
|
363
657
|
|
|
364
658
|
export declare const setHeaders: (headers: Record<string, string>) => void;
|
|
365
659
|
|
|
660
|
+
export declare interface SocialAuthDto {
|
|
661
|
+
provider: SocialProvider;
|
|
662
|
+
token: string;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export declare interface SocialAuthResponse {
|
|
666
|
+
email: string;
|
|
667
|
+
name: string;
|
|
668
|
+
provider: string;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
export declare type SocialProvider = 'GOOGLE' | 'FACEBOOK';
|
|
672
|
+
|
|
673
|
+
export declare interface SubEvent {
|
|
674
|
+
id: string;
|
|
675
|
+
name: string;
|
|
676
|
+
description?: string;
|
|
677
|
+
startAt: string;
|
|
678
|
+
endAt: string;
|
|
679
|
+
address: EventAddress;
|
|
680
|
+
coordinates: Coordinates;
|
|
681
|
+
price?: number;
|
|
682
|
+
capacity?: number;
|
|
683
|
+
images: FileVo[];
|
|
684
|
+
features?: EventFeature[];
|
|
685
|
+
attendeeCount?: number;
|
|
686
|
+
isDeleted: boolean;
|
|
687
|
+
createdAt: string;
|
|
688
|
+
updatedAt: string;
|
|
689
|
+
}
|
|
690
|
+
|
|
366
691
|
export declare interface UpdateCategoryDto {
|
|
367
692
|
name: string;
|
|
368
693
|
}
|
|
@@ -374,6 +699,8 @@ export declare interface UpdateCollectionDto {
|
|
|
374
699
|
|
|
375
700
|
export declare type UpdateEventDto = CreateEventDto;
|
|
376
701
|
|
|
702
|
+
export declare type UpdateOnboardingDto = CreateOnboardingDto;
|
|
703
|
+
|
|
377
704
|
export declare interface UploadedFile {
|
|
378
705
|
id: string;
|
|
379
706
|
fileName: string;
|
|
@@ -384,12 +711,30 @@ export declare interface UploadedFile {
|
|
|
384
711
|
updatedAt: string;
|
|
385
712
|
}
|
|
386
713
|
|
|
714
|
+
export declare const useChangePasswordMutation: (options?: MutationOptions<void, {
|
|
715
|
+
id: string;
|
|
716
|
+
data: ChangeForgotPasswordDto;
|
|
717
|
+
}>) => UseMutationResult<void, Error, {
|
|
718
|
+
id: string;
|
|
719
|
+
data: ChangeForgotPasswordDto;
|
|
720
|
+
}, unknown>;
|
|
721
|
+
|
|
387
722
|
export declare const useCreateCategoryMutation: (options?: MutationOptions<void, CreateCategoryDto>) => UseMutationResult<void, Error, CreateCategoryDto, unknown>;
|
|
388
723
|
|
|
389
724
|
export declare const useCreateCollectionMutation: (options?: MutationOptions<void, CreateCollectionDto>) => UseMutationResult<void, Error, CreateCollectionDto, unknown>;
|
|
390
725
|
|
|
726
|
+
export declare const useCreateEventAttendanceMutation: (options?: MutationOptions<void, CreateEventAttendanceDto>) => UseMutationResult<void, Error, CreateEventAttendanceDto, unknown>;
|
|
727
|
+
|
|
391
728
|
export declare const useCreateEventMutation: (options?: MutationOptions<void, CreateEventDto>) => UseMutationResult<void, Error, CreateEventDto, unknown>;
|
|
392
729
|
|
|
730
|
+
export declare const useCreateForgotPasswordMutation: (options?: MutationOptions<void, ForgotPasswordCreateDto>) => UseMutationResult<void, Error, ForgotPasswordCreateDto, unknown>;
|
|
731
|
+
|
|
732
|
+
export declare const useCreateOnboardingMutation: (options?: MutationOptions<Onboarding, CreateOnboardingDto>) => UseMutationResult<Onboarding, Error, CreateOnboardingDto, unknown>;
|
|
733
|
+
|
|
734
|
+
export declare const useCreateOrganizerMutation: (options?: MutationOptions<void, CreateOrganizerUserDto>) => UseMutationResult<void, Error, CreateOrganizerUserDto, unknown>;
|
|
735
|
+
|
|
736
|
+
export declare const useCreateSubOrganizerMutation: (options?: MutationOptions<void, CreateUserDto>) => UseMutationResult<void, Error, CreateUserDto, unknown>;
|
|
737
|
+
|
|
393
738
|
export declare const useCreateUserMutation: (options?: MutationOptions<void, CreateUserDto>) => UseMutationResult<void, Error, CreateUserDto, unknown>;
|
|
394
739
|
|
|
395
740
|
export declare const useDeleteCategoryMutation: (options?: MutationOptions<void, {
|
|
@@ -404,6 +749,12 @@ export declare const useDeleteCollectionMutation: (options?: MutationOptions<voi
|
|
|
404
749
|
id: string;
|
|
405
750
|
}, unknown>;
|
|
406
751
|
|
|
752
|
+
export declare const useDeleteEventAttendanceMutation: (options?: MutationOptions<void, {
|
|
753
|
+
id: string;
|
|
754
|
+
}>) => UseMutationResult<void, Error, {
|
|
755
|
+
id: string;
|
|
756
|
+
}, unknown>;
|
|
757
|
+
|
|
407
758
|
export declare const useDeleteEventMutation: (options?: MutationOptions<void, {
|
|
408
759
|
id: string;
|
|
409
760
|
}>) => UseMutationResult<void, Error, {
|
|
@@ -426,12 +777,30 @@ data: EditUserDto;
|
|
|
426
777
|
|
|
427
778
|
export declare const useGetCategoriesQuery: (params?: GetCategoriesParams, options?: QueryOptions<Page<Category>>) => UseQueryResult<NoInfer<Page<Category>>, Error>;
|
|
428
779
|
|
|
780
|
+
export declare const useGetCitiesQuery: (params?: GetCitiesParams, options?: QueryOptions<Page<City>>) => UseQueryResult<NoInfer<Page<City>>, Error>;
|
|
781
|
+
|
|
782
|
+
export declare const useGetCityByIdQuery: (id: string, options?: QueryOptions<City>) => UseQueryResult<NoInfer<City>, Error>;
|
|
783
|
+
|
|
429
784
|
export declare const useGetCollectionByIdQuery: (id: string, options?: QueryOptions<Collection>) => UseQueryResult<NoInfer<Collection>, Error>;
|
|
430
785
|
|
|
431
786
|
export declare const useGetCollectionsQuery: (params?: GetCollectionsParams, options?: QueryOptions<Page<Collection>>) => UseQueryResult<NoInfer<Page<Collection>>, Error>;
|
|
432
787
|
|
|
788
|
+
export declare const useGetCountiesQuery: (params?: GetCountiesParams, options?: QueryOptions<Page<County>>) => UseQueryResult<NoInfer<Page<County>>, Error>;
|
|
789
|
+
|
|
790
|
+
export declare const useGetCountriesQuery: (params?: GetCountriesParams, options?: QueryOptions<Page<Country>>) => UseQueryResult<NoInfer<Page<Country>>, Error>;
|
|
791
|
+
|
|
792
|
+
export declare const useGetCountryByIdQuery: (id: string, options?: QueryOptions<Country>) => UseQueryResult<NoInfer<Country>, Error>;
|
|
793
|
+
|
|
794
|
+
export declare const useGetCountyByIdQuery: (id: string, options?: QueryOptions<County>) => UseQueryResult<NoInfer<County>, Error>;
|
|
795
|
+
|
|
796
|
+
export declare const useGetEventAttendancesQuery: (params?: GetEventAttendancesParams, options?: QueryOptions<Page<EventAttendance>>) => UseQueryResult<NoInfer<Page<EventAttendance>>, Error>;
|
|
797
|
+
|
|
798
|
+
export declare const useGetEventByIdQuery: (id: string, options?: QueryOptions<Event_2>) => UseQueryResult<NoInfer<Event_2>, Error>;
|
|
799
|
+
|
|
433
800
|
export declare const useGetEventsQuery: (params?: GetEventsParams, options?: QueryOptions<Page<Event_2>>) => UseQueryResult<NoInfer<Page<Event_2>>, Error>;
|
|
434
801
|
|
|
802
|
+
export declare const useGetOnboardingQuery: (options?: QueryOptions<Onboarding>) => UseQueryResult<NoInfer<Onboarding>, Error>;
|
|
803
|
+
|
|
435
804
|
export declare const useGetProfileQuery: (options?: QueryOptions<User>) => UseQueryResult<NoInfer<User>, Error>;
|
|
436
805
|
|
|
437
806
|
export declare const useGetUsersQuery: (params?: PageRequest, options?: QueryOptions<Page<User>>) => UseQueryResult<NoInfer<Page<User>>, Error>;
|
|
@@ -445,16 +814,23 @@ export declare interface User {
|
|
|
445
814
|
imageId?: string;
|
|
446
815
|
createdAt: string;
|
|
447
816
|
updatedAt: string;
|
|
817
|
+
emailVerified: boolean;
|
|
818
|
+
onboarded: boolean;
|
|
448
819
|
}
|
|
449
820
|
|
|
450
821
|
export declare const useRefreshTokenMutation: (options?: MutationOptions<AuthTokenResponse, RefreshTokenDto>) => UseMutationResult<AuthTokenResponse, Error, RefreshTokenDto, unknown>;
|
|
451
822
|
|
|
823
|
+
export declare type UserRole = 'ADMIN' | 'CUSTOMER' | 'PRIVATE_ORGANIZER' | 'PUBLIC_ORGANIZER' | 'SUB_ORGANIZER';
|
|
824
|
+
|
|
452
825
|
export declare const Users: {
|
|
453
826
|
v1: {
|
|
454
827
|
endpoint: string;
|
|
455
828
|
getAll(params?: PageRequest): Promise<AxiosResponse<Page<User>, any, {}>>;
|
|
456
829
|
getProfile(): Promise<AxiosResponse<User, any, {}>>;
|
|
457
830
|
create(data: CreateUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
831
|
+
createOrganizer(data: CreateOrganizerUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
832
|
+
createSubOrganizer(data: CreateUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
833
|
+
verify(userId: string): Promise<AxiosResponse<void, any, {}>>;
|
|
458
834
|
edit(id: string, data: EditUserDto): Promise<AxiosResponse<void, any, {}>>;
|
|
459
835
|
readonly client: AxiosInstance;
|
|
460
836
|
list(..._args: unknown[]): Promise<unknown>;
|
|
@@ -464,6 +840,8 @@ export declare const Users: {
|
|
|
464
840
|
};
|
|
465
841
|
};
|
|
466
842
|
|
|
843
|
+
export declare const useSocialAuthMutation: (options?: MutationOptions<SocialAuthResponse, SocialAuthDto>) => UseMutationResult<SocialAuthResponse, Error, SocialAuthDto, unknown>;
|
|
844
|
+
|
|
467
845
|
export declare const useUpdateCategoryMutation: (options?: MutationOptions<void, {
|
|
468
846
|
id: string;
|
|
469
847
|
data: UpdateCategoryDto;
|
|
@@ -488,6 +866,14 @@ id: string;
|
|
|
488
866
|
data: UpdateEventDto;
|
|
489
867
|
}, unknown>;
|
|
490
868
|
|
|
869
|
+
export declare const useUpdateOnboardingMutation: (options?: MutationOptions<Onboarding, UpdateOnboardingDto>) => UseMutationResult<Onboarding, Error, CreateOnboardingDto, unknown>;
|
|
870
|
+
|
|
491
871
|
export declare const useUploadFileMutation: (options?: MutationOptions<UploadedFile, File>) => UseMutationResult<UploadedFile, Error, File, unknown>;
|
|
492
872
|
|
|
873
|
+
export declare const useVerifyUserMutation: (options?: MutationOptions<void, {
|
|
874
|
+
userId: string;
|
|
875
|
+
}>) => UseMutationResult<void, Error, {
|
|
876
|
+
userId: string;
|
|
877
|
+
}, unknown>;
|
|
878
|
+
|
|
493
879
|
export { }
|