@kimdaegyu/babmukdang-shared 0.1.2 → 1.0.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/dist/index.cjs +336 -2
- package/dist/index.d.cts +410 -102
- package/dist/index.d.ts +410 -102
- package/dist/index.js +330 -1
- package/package.json +7 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
type RestaurantId = string;
|
|
2
|
-
interface RestaurantInfo {
|
|
3
|
-
placeId: RestaurantId;
|
|
4
|
-
placeName: string;
|
|
5
|
-
addressName: string;
|
|
6
|
-
roadAddressName: string;
|
|
7
|
-
phoneNumber: string;
|
|
8
|
-
placeUrl: string;
|
|
9
|
-
distance?: string;
|
|
10
|
-
categoryGroupCode: string;
|
|
11
|
-
categoryGroupName: string;
|
|
12
|
-
categoryName: string;
|
|
13
|
-
x: number;
|
|
14
|
-
y: number;
|
|
15
|
-
}
|
|
16
2
|
interface KakaoRestaurantResponseDto {
|
|
17
3
|
id: RestaurantId;
|
|
18
4
|
place_name: string;
|
|
@@ -33,12 +19,23 @@ interface TokenResponse {
|
|
|
33
19
|
accessTokenMaxAge: number;
|
|
34
20
|
}
|
|
35
21
|
|
|
22
|
+
/**
|
|
23
|
+
* 음식 카테고리 이미지 manifest 항목.
|
|
24
|
+
*
|
|
25
|
+
* `BabMukDang-Img/scripts/build-images.js`가 `public/categories.json`으로
|
|
26
|
+
* 출력하는 shape를 그대로 표현한다. 실제 산출물에는 `blurhash`가 없고
|
|
27
|
+
* `thumbhashDataURL`만 존재하므로 `blurhash`는 optional이다.
|
|
28
|
+
*
|
|
29
|
+
* - `id`: `assets/raw`의 `<8자리코드>_<이름>.jpg` 파일명에서 추출한 음식 코드.
|
|
30
|
+
* - `images.src`, `images.avifSrcset`: `/img/<id>.<hash>.<width>.avif` 상대 경로.
|
|
31
|
+
* CDN base URL은 소비측(Client)에서 prepend 한다.
|
|
32
|
+
*/
|
|
36
33
|
interface Category {
|
|
37
34
|
id: string;
|
|
38
35
|
name: string;
|
|
39
36
|
aspectRatio: number;
|
|
40
37
|
placeholder: {
|
|
41
|
-
blurhash
|
|
38
|
+
blurhash?: string;
|
|
42
39
|
thumbhashDataURL: string;
|
|
43
40
|
};
|
|
44
41
|
images: {
|
|
@@ -47,11 +44,12 @@ interface Category {
|
|
|
47
44
|
};
|
|
48
45
|
priority?: boolean;
|
|
49
46
|
}
|
|
47
|
+
/** `id` 없이 단일 이미지 렌더링에 쓰는 manifest 항목. */
|
|
50
48
|
interface Item {
|
|
51
49
|
name: string;
|
|
52
50
|
aspectRatio: number;
|
|
53
51
|
placeholder: {
|
|
54
|
-
blurhash
|
|
52
|
+
blurhash?: string;
|
|
55
53
|
thumbhashDataURL: string;
|
|
56
54
|
};
|
|
57
55
|
images: {
|
|
@@ -62,6 +60,22 @@ interface Item {
|
|
|
62
60
|
priority?: boolean;
|
|
63
61
|
}
|
|
64
62
|
|
|
63
|
+
type ISODateString = string;
|
|
64
|
+
type ISODateTimeString = string;
|
|
65
|
+
|
|
66
|
+
interface BaseResponse<T> {
|
|
67
|
+
code: number;
|
|
68
|
+
message: string;
|
|
69
|
+
data: T;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
interface ApiErrorResponse {
|
|
73
|
+
success: false;
|
|
74
|
+
status: number;
|
|
75
|
+
code: string;
|
|
76
|
+
message: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
65
79
|
type UserId = string;
|
|
66
80
|
interface User {
|
|
67
81
|
userId: UserId;
|
|
@@ -74,9 +88,6 @@ interface Menu {
|
|
|
74
88
|
code: MenuCode;
|
|
75
89
|
label: string;
|
|
76
90
|
}
|
|
77
|
-
interface LocationCandidateView extends LocationCandidate {
|
|
78
|
-
isSelected: boolean;
|
|
79
|
-
}
|
|
80
91
|
type LocationId = string;
|
|
81
92
|
interface LocationCandidate {
|
|
82
93
|
id: LocationId;
|
|
@@ -99,9 +110,9 @@ interface FinalState {
|
|
|
99
110
|
location: LocationCandidate | undefined;
|
|
100
111
|
excludeMenu: Menu[] | undefined;
|
|
101
112
|
menu: Menu | undefined;
|
|
102
|
-
restaurant:
|
|
103
|
-
time: string;
|
|
104
|
-
date: string;
|
|
113
|
+
restaurant: KakaoRestaurantResponseDto | undefined;
|
|
114
|
+
time: string | undefined;
|
|
115
|
+
date: string | undefined;
|
|
105
116
|
}
|
|
106
117
|
interface Participant extends User {
|
|
107
118
|
ready: boolean;
|
|
@@ -111,8 +122,12 @@ type InvitationStage = "waiting" | "date" | "time" | "location" | "location-vote
|
|
|
111
122
|
declare const AnnouncementStageMap: Record<AnnouncementStage, number>;
|
|
112
123
|
declare const InvitationStageMap: Record<InvitationStage, number>;
|
|
113
124
|
|
|
114
|
-
|
|
115
|
-
|
|
125
|
+
interface TimePicksRequestDto {
|
|
126
|
+
times: string[];
|
|
127
|
+
}
|
|
128
|
+
interface DatePicksRequestDto {
|
|
129
|
+
dates: string[];
|
|
130
|
+
}
|
|
116
131
|
interface LocationCandidateAddRequestDto {
|
|
117
132
|
id: LocationId;
|
|
118
133
|
placeName: string;
|
|
@@ -120,12 +135,24 @@ interface LocationCandidateAddRequestDto {
|
|
|
120
135
|
lng: number;
|
|
121
136
|
address?: string;
|
|
122
137
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
138
|
+
interface LocationCandidateVoteRequestDto {
|
|
139
|
+
locationId: LocationId;
|
|
140
|
+
}
|
|
141
|
+
interface ExcludeMenuRequestDto {
|
|
142
|
+
menu: Menu;
|
|
143
|
+
}
|
|
144
|
+
interface MenuPickRequestDto {
|
|
145
|
+
menuCode: MenuCode;
|
|
146
|
+
}
|
|
147
|
+
interface RestaurantPickRequestDto {
|
|
148
|
+
restaurantId: RestaurantId;
|
|
149
|
+
}
|
|
150
|
+
interface ChatMessageRequestDto {
|
|
151
|
+
text: string;
|
|
152
|
+
}
|
|
153
|
+
interface ReadyStateRequestDto {
|
|
154
|
+
isReady: boolean;
|
|
155
|
+
}
|
|
129
156
|
|
|
130
157
|
interface ChatMessageResponseItem extends ChatMessage {
|
|
131
158
|
}
|
|
@@ -146,7 +173,7 @@ interface LocationCandidateVoteUpdateResponseItem {
|
|
|
146
173
|
}
|
|
147
174
|
interface ExcludeMenuUpdateResponseItem {
|
|
148
175
|
userId: UserId;
|
|
149
|
-
exclusions:
|
|
176
|
+
exclusions: Menu[];
|
|
150
177
|
}
|
|
151
178
|
interface MenuPickUpdateResponseItem {
|
|
152
179
|
menuCode: MenuCode;
|
|
@@ -156,10 +183,10 @@ interface RestaurantPickUpdateResponseItem {
|
|
|
156
183
|
restaurantId: RestaurantId;
|
|
157
184
|
selectedUsers: UserId[];
|
|
158
185
|
}
|
|
159
|
-
|
|
186
|
+
interface ReadyStateChangedDto {
|
|
160
187
|
readyCount: number;
|
|
161
188
|
participantCount: number;
|
|
162
|
-
}
|
|
189
|
+
}
|
|
163
190
|
type TimePicksUpdateResponseDto = TimePicksUpdateResponseItem[];
|
|
164
191
|
type DatePicksUpdateResponseDto = DatePicksUpdateResponseItem[];
|
|
165
192
|
type LocationCandidateAddUpdateResponseDto = LocationCandidateAddUpdateResponseItem[];
|
|
@@ -168,13 +195,16 @@ type ExcludeMenuUpdateResponseDto = ExcludeMenuUpdateResponseItem[];
|
|
|
168
195
|
type MenuPickUpdateResponseDto = MenuPickUpdateResponseItem[];
|
|
169
196
|
type RestaurantPickUpdateResponseDto = RestaurantPickUpdateResponseItem[];
|
|
170
197
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
198
|
+
interface TimeInitialState extends TimePicksUpdateResponseDto {
|
|
199
|
+
}
|
|
200
|
+
interface DateInitialState extends DatePicksUpdateResponseDto {
|
|
201
|
+
}
|
|
202
|
+
interface LocationAddInitialState extends LocationCandidateAddUpdateResponseDto {
|
|
203
|
+
}
|
|
204
|
+
interface LocationVoteInitialState {
|
|
175
205
|
locations: LocationCandidateAddUpdateResponseDto;
|
|
176
206
|
votes?: LocationCandidateVoteUpdateResponseDto;
|
|
177
|
-
}
|
|
207
|
+
}
|
|
178
208
|
interface ExcludeMenuInitialState {
|
|
179
209
|
recentMenus: {
|
|
180
210
|
userId: UserId;
|
|
@@ -191,10 +221,14 @@ interface RestaurantInitialState {
|
|
|
191
221
|
restaurantUserList?: RestaurantPickUpdateResponseDto;
|
|
192
222
|
}
|
|
193
223
|
interface WaitingInitialState {
|
|
194
|
-
participants: Participant[];
|
|
195
224
|
locationInitial?: string;
|
|
196
225
|
meetingAt?: string;
|
|
197
226
|
}
|
|
227
|
+
interface RoomInitialState {
|
|
228
|
+
participants: Participant[];
|
|
229
|
+
chat: ChatMessage[];
|
|
230
|
+
final: FinalState;
|
|
231
|
+
}
|
|
198
232
|
interface PhaseDataBroadcastDto {
|
|
199
233
|
phase: AnnouncementStage | InvitationStage;
|
|
200
234
|
data: WaitingInitialState | TimeInitialState | DateInitialState | LocationAddInitialState | LocationVoteInitialState | ExcludeMenuInitialState | MenuInitialState | RestaurantInitialState;
|
|
@@ -248,7 +282,7 @@ interface SocketClientEventMap {
|
|
|
248
282
|
any: [event: string, ...args: any[]];
|
|
249
283
|
"ready-state-changed": ReadyStateChangedDto;
|
|
250
284
|
"stage-changed": PhaseDataBroadcastDto;
|
|
251
|
-
"join-room":
|
|
285
|
+
"join-room": RoomInitialState;
|
|
252
286
|
"room-assigned": {
|
|
253
287
|
roomId: string;
|
|
254
288
|
};
|
|
@@ -270,6 +304,16 @@ interface SocketClientEventMap {
|
|
|
270
304
|
"final-state-response": FinalState;
|
|
271
305
|
"chat-message": ChatMessageResponseItem;
|
|
272
306
|
}
|
|
307
|
+
interface InitialStateEventPayloadMap {
|
|
308
|
+
"waiting-initial-state": WaitingInitialState;
|
|
309
|
+
"time-initial-state": TimeInitialState;
|
|
310
|
+
"date-initial-state": DateInitialState;
|
|
311
|
+
"location-add-initial-state": LocationAddInitialState;
|
|
312
|
+
"location-vote-initial-state": LocationVoteInitialState;
|
|
313
|
+
"exclude-menu-initial-state": ExcludeMenuInitialState;
|
|
314
|
+
"menu-initial-state": MenuInitialState;
|
|
315
|
+
"restaurant-initial-state": RestaurantInitialState;
|
|
316
|
+
}
|
|
273
317
|
type SocketServerEventMap = {
|
|
274
318
|
"ready-state": ReadyStateRequestDto;
|
|
275
319
|
"chat-message": ChatMessageRequestDto;
|
|
@@ -278,6 +322,22 @@ type SocketServerEventMap = {
|
|
|
278
322
|
"exclude-menu": ExcludeMenuRequestDto;
|
|
279
323
|
"pick-menu": MenuPickRequestDto;
|
|
280
324
|
"pick-restaurant": RestaurantPickRequestDto;
|
|
325
|
+
"pick-times": TimePicksRequestDto;
|
|
326
|
+
"pick-date": DatePicksRequestDto;
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* socket.io `Socket<ListenEvents, EmitEvents>` 제네릭에 그대로 넣을 수 있는
|
|
330
|
+
* 함수 시그니처 이벤트 맵. 클라이언트는 서버가 보내는 이벤트를 수신(listen)하므로
|
|
331
|
+
* `SocketClientEventMap`을 ListenEvents로, 서버로 보내는 이벤트는
|
|
332
|
+
* `SocketServerEventMap`을 EmitEvents로 사용한다.
|
|
333
|
+
*
|
|
334
|
+
* `any`(onAny 디버그용 튜플)는 실제 이벤트가 아니므로 제외한다.
|
|
335
|
+
*/
|
|
336
|
+
type ServerToClientEvents = {
|
|
337
|
+
[K in keyof Omit<SocketClientEventMap, "any">]: (data: SocketClientEventMap[K]) => void;
|
|
338
|
+
};
|
|
339
|
+
type ClientToServerEvents = {
|
|
340
|
+
[K in keyof SocketServerEventMap]: (data: SocketServerEventMap[K]) => void;
|
|
281
341
|
};
|
|
282
342
|
type SocketRequestHandler<K extends keyof SocketServerEventMap> = (data: SocketServerEventMap[K]) => void;
|
|
283
343
|
type SocketRequestHandlers = {
|
|
@@ -303,8 +363,8 @@ interface PreferenceSummaryResponse {
|
|
|
303
363
|
allergies: Menu[];
|
|
304
364
|
}
|
|
305
365
|
interface PreferenceMetaResponse {
|
|
306
|
-
onboardedAt:
|
|
307
|
-
lastUpdatedAt:
|
|
366
|
+
onboardedAt: ISODateTimeString | null;
|
|
367
|
+
lastUpdatedAt: ISODateTimeString | null;
|
|
308
368
|
revision: number;
|
|
309
369
|
}
|
|
310
370
|
interface ProfileResponse {
|
|
@@ -343,42 +403,32 @@ interface UpdateProfileRequest {
|
|
|
343
403
|
profileImageUrl: string;
|
|
344
404
|
bio: string;
|
|
345
405
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
406
|
+
interface MemberSummaryResponse {
|
|
407
|
+
memberId: number;
|
|
408
|
+
username: string;
|
|
409
|
+
profileImageUrl: string;
|
|
410
|
+
friends: number;
|
|
411
|
+
completedMeetings: number;
|
|
412
|
+
uncompletedMeetings: number;
|
|
352
413
|
}
|
|
414
|
+
interface OnboardingRequest extends Onboarding, UpdateProfileRequest {
|
|
415
|
+
}
|
|
416
|
+
|
|
353
417
|
interface Article {
|
|
354
|
-
|
|
418
|
+
id: number;
|
|
355
419
|
author: User;
|
|
356
420
|
imageUrl: string;
|
|
357
|
-
mealDate:
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
taggedMemberIds: UserId[];
|
|
366
|
-
}
|
|
367
|
-
type ArticleGetResponseDto = Article[];
|
|
368
|
-
interface ArticleSummaryResponseDto {
|
|
369
|
-
articleId: number;
|
|
370
|
-
authorId: number;
|
|
371
|
-
authorUsername: string;
|
|
372
|
-
imageUrl: string;
|
|
373
|
-
mealDate: string;
|
|
374
|
-
mealTime: LocalTime;
|
|
375
|
-
restaurantName: string;
|
|
421
|
+
mealDate: Date;
|
|
422
|
+
restaurant: KakaoRestaurantResponseDto;
|
|
423
|
+
createdAt: Date;
|
|
424
|
+
updatedAt: Date;
|
|
425
|
+
expiresAt: Date;
|
|
426
|
+
taggedMembers: User[];
|
|
427
|
+
}
|
|
428
|
+
interface ArticleSummaryResponseDto extends Article {
|
|
376
429
|
likeCount: number;
|
|
377
430
|
commentCount: number;
|
|
378
431
|
likedByMe: boolean;
|
|
379
|
-
createdAt: string;
|
|
380
|
-
expiresAt: string;
|
|
381
|
-
taggedMemberIds: number[];
|
|
382
432
|
}
|
|
383
433
|
interface PageArticleSummaryResponse {
|
|
384
434
|
totalElements: number;
|
|
@@ -407,38 +457,38 @@ interface PageableObject {
|
|
|
407
457
|
unpaged: boolean;
|
|
408
458
|
}
|
|
409
459
|
interface ArticleDetailResponseDto {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
authorUsername: string;
|
|
460
|
+
id: number;
|
|
461
|
+
author: User;
|
|
413
462
|
imageUrl: string;
|
|
414
|
-
mealDate:
|
|
415
|
-
|
|
416
|
-
restaurant: RestaurantInfo;
|
|
463
|
+
mealDate: Date;
|
|
464
|
+
restaurant: KakaoRestaurantResponseDto;
|
|
417
465
|
likeCount: number;
|
|
418
466
|
commentCount: number;
|
|
419
467
|
likedByMe: boolean;
|
|
420
|
-
createdAt:
|
|
421
|
-
expiresAt:
|
|
468
|
+
createdAt: Date;
|
|
469
|
+
expiresAt: Date;
|
|
422
470
|
}
|
|
423
471
|
interface ArticlePostRequestDto {
|
|
424
472
|
imageUrl: string;
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
473
|
+
mealDate: ISODateString;
|
|
474
|
+
restaurant: KakaoRestaurantResponseDto;
|
|
475
|
+
taggedMembersId: number[];
|
|
476
|
+
foodAnalysis?: FoodAnalysisResultDto;
|
|
477
|
+
}
|
|
478
|
+
interface FoodAnalysisResultDto {
|
|
479
|
+
code: string;
|
|
480
|
+
label: string;
|
|
481
|
+
confidence: number;
|
|
482
|
+
tsUtc?: string;
|
|
432
483
|
}
|
|
433
484
|
|
|
434
485
|
interface CommentResponseDto {
|
|
435
486
|
commentId: number;
|
|
436
|
-
|
|
437
|
-
authorUsername: string;
|
|
487
|
+
author: User;
|
|
438
488
|
parentCommentId: number | null;
|
|
439
489
|
content: string;
|
|
440
|
-
createdAt:
|
|
441
|
-
|
|
490
|
+
createdAt: Date;
|
|
491
|
+
updatedAt: Date;
|
|
442
492
|
}
|
|
443
493
|
interface CommentPostRequestDto {
|
|
444
494
|
content: string;
|
|
@@ -469,26 +519,34 @@ type UploadAndRegisterVars = {
|
|
|
469
519
|
};
|
|
470
520
|
};
|
|
471
521
|
|
|
522
|
+
type RecruitStatus = "OPEN" | "CLOSED" | "EXPIRED";
|
|
472
523
|
interface Recruit {
|
|
473
524
|
targetCount: number;
|
|
474
|
-
meetingAt:
|
|
525
|
+
meetingAt: ISODateTimeString;
|
|
475
526
|
location: string;
|
|
476
527
|
message: string;
|
|
477
528
|
}
|
|
478
529
|
interface RecruitRequestDto extends Recruit {
|
|
479
530
|
}
|
|
531
|
+
interface RecruitParticipantDto extends User {
|
|
532
|
+
}
|
|
480
533
|
interface RecruitResponseDto extends Recruit {
|
|
481
534
|
id: number;
|
|
482
|
-
|
|
483
|
-
|
|
535
|
+
postId: number;
|
|
536
|
+
status: RecruitStatus;
|
|
537
|
+
createdAt: ISODateTimeString;
|
|
538
|
+
expiredAt: ISODateTimeString;
|
|
539
|
+
updatedAt: ISODateTimeString;
|
|
484
540
|
author: User;
|
|
485
|
-
participants:
|
|
541
|
+
participants: RecruitParticipantDto[];
|
|
542
|
+
}
|
|
543
|
+
interface CreateRecruitResponseDto {
|
|
544
|
+
recruitId: number;
|
|
545
|
+
postId: number;
|
|
486
546
|
}
|
|
487
547
|
|
|
488
548
|
interface InvitationPostRequest {
|
|
489
|
-
inviteeId:
|
|
490
|
-
id: number;
|
|
491
|
-
};
|
|
549
|
+
inviteeId: number;
|
|
492
550
|
message: string;
|
|
493
551
|
}
|
|
494
552
|
interface InvitationResponse {
|
|
@@ -506,7 +564,7 @@ declare enum PlanType {
|
|
|
506
564
|
INVITATION = "INVITATION"
|
|
507
565
|
}
|
|
508
566
|
interface MeetingParticipant {
|
|
509
|
-
userId:
|
|
567
|
+
userId: string;
|
|
510
568
|
username: string;
|
|
511
569
|
profileImageUrl: string;
|
|
512
570
|
}
|
|
@@ -515,15 +573,92 @@ interface MeetingResponse {
|
|
|
515
573
|
author: MeetingParticipant;
|
|
516
574
|
participants: MeetingParticipant[];
|
|
517
575
|
location: string;
|
|
518
|
-
|
|
576
|
+
meetingAt: ISODateTimeString;
|
|
519
577
|
restaurant: string;
|
|
520
578
|
isCompleted: boolean;
|
|
521
579
|
restaurantType: string;
|
|
522
580
|
status: PlanStatus;
|
|
523
581
|
type: PlanType;
|
|
524
|
-
createdAt:
|
|
525
|
-
updatedAt:
|
|
582
|
+
createdAt: ISODateTimeString;
|
|
583
|
+
updatedAt: ISODateTimeString;
|
|
584
|
+
}
|
|
585
|
+
interface CreatePlanRequest {
|
|
586
|
+
meetingDate: string;
|
|
587
|
+
meetingTime: string;
|
|
588
|
+
}
|
|
589
|
+
interface PlanResponseDto {
|
|
590
|
+
id: number;
|
|
591
|
+
meetingAt: ISODateTimeString;
|
|
592
|
+
location: LocationCandidate | null;
|
|
593
|
+
restaurant: KakaoRestaurantResponseDto | null;
|
|
594
|
+
author: User | null;
|
|
595
|
+
participants: User[];
|
|
596
|
+
status: PlanStatus;
|
|
597
|
+
type: PlanType;
|
|
598
|
+
createdAt: ISODateTimeString;
|
|
599
|
+
updatedAt: ISODateTimeString;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
interface LocalNewsNoti {
|
|
603
|
+
id: number;
|
|
604
|
+
type: "school" | "restaurant" | "area";
|
|
605
|
+
title: string;
|
|
606
|
+
time: string;
|
|
607
|
+
message: string;
|
|
608
|
+
period: string;
|
|
609
|
+
imageUrl?: string;
|
|
610
|
+
}
|
|
611
|
+
interface MatchingInviteNoti {
|
|
612
|
+
id: number;
|
|
613
|
+
type: "invitation" | "announcement";
|
|
614
|
+
title: string;
|
|
615
|
+
time: string;
|
|
616
|
+
message: string;
|
|
617
|
+
period: string;
|
|
618
|
+
imageUrl: string;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
interface PerUser {
|
|
622
|
+
user_id: string;
|
|
623
|
+
excluded_codes: string[];
|
|
624
|
+
overrides_applied: string[];
|
|
625
|
+
taste_top: TasteTop[];
|
|
526
626
|
}
|
|
627
|
+
interface TasteTop {
|
|
628
|
+
code: string;
|
|
629
|
+
label: string;
|
|
630
|
+
score: number;
|
|
631
|
+
}
|
|
632
|
+
interface GroupExcluded {
|
|
633
|
+
mode: string;
|
|
634
|
+
codes: string[];
|
|
635
|
+
}
|
|
636
|
+
interface Recommendation {
|
|
637
|
+
code: string;
|
|
638
|
+
label: string;
|
|
639
|
+
group_score: number;
|
|
640
|
+
member_scores: MemberScores;
|
|
641
|
+
reasons: string[];
|
|
642
|
+
}
|
|
643
|
+
interface MemberScores {
|
|
644
|
+
[key: string]: number;
|
|
645
|
+
}
|
|
646
|
+
interface Params {
|
|
647
|
+
taste_mode: string;
|
|
648
|
+
exclude_mode: string;
|
|
649
|
+
weights: object;
|
|
650
|
+
top_k: number;
|
|
651
|
+
}
|
|
652
|
+
interface MenuRecommendationAIResponseDto {
|
|
653
|
+
group_id: string | null;
|
|
654
|
+
user_ids: string[];
|
|
655
|
+
exclude_days: number;
|
|
656
|
+
per_user: PerUser[];
|
|
657
|
+
group_excluded: GroupExcluded;
|
|
658
|
+
recommendations: Recommendation[];
|
|
659
|
+
params: Params;
|
|
660
|
+
}
|
|
661
|
+
declare const MenuRecommendationAIResponseDto: MenuRecommendationAIResponseDto;
|
|
527
662
|
|
|
528
663
|
interface Friend {
|
|
529
664
|
userId: UserId;
|
|
@@ -531,5 +666,178 @@ interface Friend {
|
|
|
531
666
|
lastActive: string;
|
|
532
667
|
isHungry: boolean;
|
|
533
668
|
}
|
|
669
|
+
type FriendMealFilter = "ALL" | "HUNGRY" | "NOT_HUNGRY";
|
|
670
|
+
interface FriendMealItemResponse {
|
|
671
|
+
memberId: number;
|
|
672
|
+
userName: string;
|
|
673
|
+
profileImageUrl: string;
|
|
674
|
+
hungry: boolean;
|
|
675
|
+
label: string;
|
|
676
|
+
}
|
|
677
|
+
interface FriendListItemResponse {
|
|
678
|
+
memberId: number;
|
|
679
|
+
userName: string;
|
|
680
|
+
profileImageUrl: string;
|
|
681
|
+
friendSince: string;
|
|
682
|
+
}
|
|
683
|
+
interface FriendBlockItemResponse {
|
|
684
|
+
memberId: number;
|
|
685
|
+
userName: string;
|
|
686
|
+
profileImageUrl: string;
|
|
687
|
+
blockedAt: string;
|
|
688
|
+
}
|
|
689
|
+
type FriendRequestStatus = "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELED";
|
|
690
|
+
interface FriendRequestItemResponse {
|
|
691
|
+
requestId: number;
|
|
692
|
+
requester: {
|
|
693
|
+
memberId: number;
|
|
694
|
+
userName: string;
|
|
695
|
+
profileImageUrl: string;
|
|
696
|
+
};
|
|
697
|
+
recipient: {
|
|
698
|
+
memberId: number;
|
|
699
|
+
userName: string;
|
|
700
|
+
profileImageUrl: string;
|
|
701
|
+
};
|
|
702
|
+
status: FriendRequestStatus;
|
|
703
|
+
requestedAt: string;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
type FoodPreferenceType = "LIKE" | "DISLIKE" | "ALLERGY";
|
|
707
|
+
interface FoodPreferenceResponseDto {
|
|
708
|
+
id: number;
|
|
709
|
+
memberId: number;
|
|
710
|
+
foodCode: string;
|
|
711
|
+
type: FoodPreferenceType;
|
|
712
|
+
createdAt: ISODateTimeString;
|
|
713
|
+
updatedAt: ISODateTimeString;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
type MealStatus = "FED" | "FASTING";
|
|
717
|
+
type MealStatusAction = "ATE_NOW" | "SET_OFF";
|
|
718
|
+
interface UpdateMealStatusRequest {
|
|
719
|
+
action: MealStatusAction;
|
|
720
|
+
}
|
|
721
|
+
interface MealStatusResponse {
|
|
722
|
+
status: MealStatus;
|
|
723
|
+
lastMealAt: ISODateTimeString | null;
|
|
724
|
+
fastingMinutes: number;
|
|
725
|
+
fastingHours: number;
|
|
726
|
+
secondsToAutoOff: number;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
interface ReferralCreateResponse {
|
|
730
|
+
code: string;
|
|
731
|
+
link: string;
|
|
732
|
+
expiresAt: ISODateTimeString;
|
|
733
|
+
}
|
|
734
|
+
interface ReferralItemResponse {
|
|
735
|
+
code: string;
|
|
736
|
+
createdAt: ISODateTimeString;
|
|
737
|
+
expiresAt: ISODateTimeString;
|
|
738
|
+
used: boolean;
|
|
739
|
+
usedByMemberId: number | null;
|
|
740
|
+
usedByUserName: string | null;
|
|
741
|
+
}
|
|
742
|
+
interface RedeemReferralRequest {
|
|
743
|
+
code: string;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
type RewardType = "WEEK" | "MONTH";
|
|
747
|
+
interface WeekProgress {
|
|
748
|
+
days: boolean[];
|
|
749
|
+
completed: number;
|
|
750
|
+
goal: number;
|
|
751
|
+
}
|
|
752
|
+
interface MonthProgress {
|
|
753
|
+
count: number;
|
|
754
|
+
goal: number;
|
|
755
|
+
}
|
|
756
|
+
interface ChallengeStatusResponse {
|
|
757
|
+
week: WeekProgress;
|
|
758
|
+
month: MonthProgress;
|
|
759
|
+
weekRewardAvailable: boolean;
|
|
760
|
+
monthRewardAvailable: boolean;
|
|
761
|
+
}
|
|
762
|
+
interface ClaimChallengeRewardRequest {
|
|
763
|
+
type: RewardType;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
type CouponType = "DISCOUNT" | "SERVICE";
|
|
767
|
+
type CouponStatus = "UNUSED" | "USED";
|
|
768
|
+
interface CouponResponse {
|
|
769
|
+
couponId: number;
|
|
770
|
+
title: string;
|
|
771
|
+
shopName: string;
|
|
772
|
+
type: CouponType;
|
|
773
|
+
condition: string;
|
|
774
|
+
expiresAt: ISODateString;
|
|
775
|
+
used: boolean;
|
|
776
|
+
thumbnailUrl: string;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
declare class RestaurantPickRequestDtoServer implements RestaurantPickRequestDto {
|
|
780
|
+
restaurantId: RestaurantId;
|
|
781
|
+
}
|
|
782
|
+
declare class DatePicksRequestDtoServer implements DatePicksRequestDto {
|
|
783
|
+
dates: string[];
|
|
784
|
+
}
|
|
785
|
+
declare class TimePicksRequestDtoServer implements TimePicksRequestDto {
|
|
786
|
+
times: string[];
|
|
787
|
+
}
|
|
788
|
+
declare class LocationCandidateAddRequestDtoServer implements LocationCandidateAddRequestDto {
|
|
789
|
+
id: LocationId;
|
|
790
|
+
placeName: string;
|
|
791
|
+
lat: number;
|
|
792
|
+
lng: number;
|
|
793
|
+
address: string;
|
|
794
|
+
}
|
|
795
|
+
declare class LocationCandidateVoteRequestDtoServer implements LocationCandidateVoteRequestDto {
|
|
796
|
+
locationId: LocationId;
|
|
797
|
+
}
|
|
798
|
+
declare class ExcludeMenuRequestDtoServer implements ExcludeMenuRequestDto {
|
|
799
|
+
menu: Menu;
|
|
800
|
+
}
|
|
801
|
+
declare class MenuPickRequestDtoServer implements MenuPickRequestDto {
|
|
802
|
+
menuCode: MenuCode;
|
|
803
|
+
}
|
|
804
|
+
declare class ChatMessageRequestDtoServer implements ChatMessageRequestDto {
|
|
805
|
+
text: string;
|
|
806
|
+
}
|
|
807
|
+
declare class ReadyStateRequestDtoServer implements ReadyStateRequestDto {
|
|
808
|
+
isReady: boolean;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
declare class AnnouncementRequestDto {
|
|
812
|
+
announcementId: string;
|
|
813
|
+
location: string;
|
|
814
|
+
meetingAt: string;
|
|
815
|
+
participants: Participant[];
|
|
816
|
+
recentMenu: {
|
|
817
|
+
userId: string;
|
|
818
|
+
menu: Menu[];
|
|
819
|
+
}[];
|
|
820
|
+
}
|
|
821
|
+
declare class InvitationRequestDto {
|
|
822
|
+
invitationId: string;
|
|
823
|
+
participants: Participant[];
|
|
824
|
+
recentMenu: {
|
|
825
|
+
userId: string;
|
|
826
|
+
menu: Menu[];
|
|
827
|
+
}[];
|
|
828
|
+
}
|
|
829
|
+
declare class AnnouncementResultRequestDto {
|
|
830
|
+
announcementId: string;
|
|
831
|
+
location: LocationCandidate;
|
|
832
|
+
menu: Menu;
|
|
833
|
+
restaurant: KakaoRestaurantResponseDto;
|
|
834
|
+
}
|
|
835
|
+
declare class InvitationResultRequestDto {
|
|
836
|
+
invitationId: string;
|
|
837
|
+
location: LocationCandidate;
|
|
838
|
+
menu: Menu;
|
|
839
|
+
meetingAt: string;
|
|
840
|
+
restaurant: KakaoRestaurantResponseDto;
|
|
841
|
+
}
|
|
534
842
|
|
|
535
|
-
export { type AnnouncementStage, AnnouncementStageMap, type
|
|
843
|
+
export { AnnouncementRequestDto, AnnouncementResultRequestDto, type AnnouncementStage, AnnouncementStageMap, type ApiErrorResponse, type Article, type ArticleDetailResponseDto, type ArticlePostRequestDto, type ArticleSummaryResponseDto, type BaseResponse, type Category, type ChallengeStatusResponse, type ChatMessage, type ChatMessageRequestDto, ChatMessageRequestDtoServer, type ChatMessageResponseItem, type ClaimChallengeRewardRequest, type ClientToServerEvents, type Comment, type CommentPostRequestDto, type CommentResponseDto, type CouponResponse, type CouponStatus, type CouponType, type CreatePlanRequest, type CreateRecruitResponseDto, type DateInitialState, type DatePicksRequestDto, DatePicksRequestDtoServer, type DatePicksUpdateResponseDto, type DatePicksUpdateResponseItem, type DateStore, type ExcludeMenuInitialState, type ExcludeMenuRequestDto, ExcludeMenuRequestDtoServer, type ExcludeMenuStore, type ExcludeMenuUpdateResponseDto, type ExcludeMenuUpdateResponseItem, type FinalState, type FoodAnalysisResultDto, type FoodPreferenceResponseDto, type FoodPreferenceType, type Friend, type FriendBlockItemResponse, type FriendListItemResponse, type FriendMealFilter, type FriendMealItemResponse, type FriendRequestItemResponse, type FriendRequestStatus, type ISODateString, type ISODateTimeString, type InitialStateEventPayloadMap, type InvitationPostRequest, InvitationRequestDto, type InvitationResponse, InvitationResultRequestDto, type InvitationStage, InvitationStageMap, type Item, type KakaoRestaurantResponseDto, type LikePostResponseDto, type LocalNewsNoti, type LocationAddInitialState, type LocationCandidate, type LocationCandidateAddRequestDto, LocationCandidateAddRequestDtoServer, type LocationCandidateAddUpdateResponseDto, type LocationCandidateAddUpdateResponseItem, type LocationCandidateVoteRequestDto, LocationCandidateVoteRequestDtoServer, type LocationCandidateVoteUpdateResponseDto, type LocationCandidateVoteUpdateResponseItem, type LocationId, type LocationStore, type LocationVoteInitialState, type MatchingInviteNoti, type MealStatus, type MealStatusAction, type MealStatusResponse, type MeetingParticipant, type MeetingResponse, type MemberScores, type MemberSummaryResponse, type Menu, type MenuCode, type MenuInitialState, type MenuPickRequestDto, MenuPickRequestDtoServer, type MenuPickUpdateResponseDto, type MenuPickUpdateResponseItem, MenuRecommendationAIResponseDto, type MenuStore, type MonthProgress, type Onboarding, type OnboardingPreferenceRequest, type OnboardingPreferenceResponse, type OnboardingRequest, type PageArticleSummaryResponse, type PageableObject, type Participant, type PhaseDataBroadcastDto, type PlanResponseDto, PlanStatus, PlanType, type PreferenceItem, type PreferenceMetaResponse, type PreferenceSummaryResponse, type ProfileDetailResponse, type ProfileResponse, type ReadyStateChangedDto, type ReadyStateRequestDto, ReadyStateRequestDtoServer, type Recommendation, type Recruit, type RecruitParticipantDto, type RecruitRequestDto, type RecruitResponseDto, type RecruitStatus, type RedeemReferralRequest, type ReferralCreateResponse, type ReferralItemResponse, type RestaurantId, type RestaurantInitialState, type RestaurantPickRequestDto, RestaurantPickRequestDtoServer, type RestaurantPickUpdateResponseDto, type RestaurantPickUpdateResponseItem, type RestaurantStore, type RewardType, type RoomId, type RoomInitialState, type RoomStore, type ServerToClientEvents, type SocketClientEventMap, type SocketRequestHandlers, type SocketResponseHandlers, type SocketServerEventMap, type SortObject, type TimeInitialState, type TimePicksRequestDto, TimePicksRequestDtoServer, type TimePicksUpdateResponseDto, type TimePicksUpdateResponseItem, type TimeStore, type TokenResponse, type UpdateMealStatusRequest, type UpdateProfileRequest, type UploadAndPostVars, type UploadAndRegisterVars, type User, type UserId, type UserMenuCategory, type WaitingInitialState, type WeekProgress };
|