@kimdaegyu/babmukdang-shared 0.1.1 → 0.1.2
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 +69 -0
- package/dist/index.d.cts +535 -0
- package/dist/index.d.ts +535 -0
- package/dist/index.js +39 -0
- package/package.json +1 -1
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
AnnouncementStageMap: () => AnnouncementStageMap,
|
|
24
|
+
InvitationStageMap: () => InvitationStageMap,
|
|
25
|
+
PlanStatus: () => PlanStatus,
|
|
26
|
+
PlanType: () => PlanType
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(index_exports);
|
|
29
|
+
|
|
30
|
+
// src/types/plan/plan.ts
|
|
31
|
+
var PlanStatus = /* @__PURE__ */ ((PlanStatus2) => {
|
|
32
|
+
PlanStatus2["PLANNING"] = "PLANNING";
|
|
33
|
+
PlanStatus2["COMPLETED"] = "COMPLETED";
|
|
34
|
+
return PlanStatus2;
|
|
35
|
+
})(PlanStatus || {});
|
|
36
|
+
var PlanType = /* @__PURE__ */ ((PlanType2) => {
|
|
37
|
+
PlanType2["ANNOUNCEMENT"] = "ANNOUNCEMENT";
|
|
38
|
+
PlanType2["INVITATION"] = "INVITATION";
|
|
39
|
+
return PlanType2;
|
|
40
|
+
})(PlanType || {});
|
|
41
|
+
|
|
42
|
+
// src/types/matching/types.ts
|
|
43
|
+
var AnnouncementStageMap = {
|
|
44
|
+
waiting: 1,
|
|
45
|
+
location: 2,
|
|
46
|
+
"location-vote": 3,
|
|
47
|
+
"exclude-menu": 4,
|
|
48
|
+
menu: 5,
|
|
49
|
+
restaurant: 6,
|
|
50
|
+
finish: 7
|
|
51
|
+
};
|
|
52
|
+
var InvitationStageMap = {
|
|
53
|
+
waiting: 1,
|
|
54
|
+
date: 2,
|
|
55
|
+
time: 3,
|
|
56
|
+
location: 4,
|
|
57
|
+
"location-vote": 5,
|
|
58
|
+
"exclude-menu": 6,
|
|
59
|
+
menu: 7,
|
|
60
|
+
restaurant: 8,
|
|
61
|
+
finish: 9
|
|
62
|
+
};
|
|
63
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
64
|
+
0 && (module.exports = {
|
|
65
|
+
AnnouncementStageMap,
|
|
66
|
+
InvitationStageMap,
|
|
67
|
+
PlanStatus,
|
|
68
|
+
PlanType
|
|
69
|
+
});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,535 @@
|
|
|
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
|
+
interface KakaoRestaurantResponseDto {
|
|
17
|
+
id: RestaurantId;
|
|
18
|
+
place_name: string;
|
|
19
|
+
category_name: string;
|
|
20
|
+
category_group_name: string;
|
|
21
|
+
distance: string;
|
|
22
|
+
road_address_name: string;
|
|
23
|
+
address_name: string;
|
|
24
|
+
phone: string;
|
|
25
|
+
place_url?: string;
|
|
26
|
+
lat: number;
|
|
27
|
+
lng: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface TokenResponse {
|
|
31
|
+
accessToken: string;
|
|
32
|
+
refreshToken: string;
|
|
33
|
+
accessTokenMaxAge: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface Category {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
aspectRatio: number;
|
|
40
|
+
placeholder: {
|
|
41
|
+
blurhash: string;
|
|
42
|
+
thumbhashDataURL: string;
|
|
43
|
+
};
|
|
44
|
+
images: {
|
|
45
|
+
src: string;
|
|
46
|
+
avifSrcset: string;
|
|
47
|
+
};
|
|
48
|
+
priority?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface Item {
|
|
51
|
+
name: string;
|
|
52
|
+
aspectRatio: number;
|
|
53
|
+
placeholder: {
|
|
54
|
+
blurhash: string;
|
|
55
|
+
thumbhashDataURL: string;
|
|
56
|
+
};
|
|
57
|
+
images: {
|
|
58
|
+
src: string;
|
|
59
|
+
avifSrcset: string;
|
|
60
|
+
sizes?: string;
|
|
61
|
+
};
|
|
62
|
+
priority?: boolean;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
type UserId = string;
|
|
66
|
+
interface User {
|
|
67
|
+
userId: UserId;
|
|
68
|
+
username: string;
|
|
69
|
+
profileImageUrl: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
type MenuCode = string;
|
|
73
|
+
interface Menu {
|
|
74
|
+
code: MenuCode;
|
|
75
|
+
label: string;
|
|
76
|
+
}
|
|
77
|
+
interface LocationCandidateView extends LocationCandidate {
|
|
78
|
+
isSelected: boolean;
|
|
79
|
+
}
|
|
80
|
+
type LocationId = string;
|
|
81
|
+
interface LocationCandidate {
|
|
82
|
+
id: LocationId;
|
|
83
|
+
placeName: string;
|
|
84
|
+
lat: number;
|
|
85
|
+
lng: number;
|
|
86
|
+
address: string;
|
|
87
|
+
}
|
|
88
|
+
interface UserMenuCategory {
|
|
89
|
+
userId: string;
|
|
90
|
+
menuList: Menu[];
|
|
91
|
+
}
|
|
92
|
+
interface ChatMessage {
|
|
93
|
+
messageId: string;
|
|
94
|
+
user: User;
|
|
95
|
+
text?: string;
|
|
96
|
+
createdAt: string;
|
|
97
|
+
}
|
|
98
|
+
interface FinalState {
|
|
99
|
+
location: LocationCandidate | undefined;
|
|
100
|
+
excludeMenu: Menu[] | undefined;
|
|
101
|
+
menu: Menu | undefined;
|
|
102
|
+
restaurant: RestaurantInfo | undefined;
|
|
103
|
+
time: string;
|
|
104
|
+
date: string;
|
|
105
|
+
}
|
|
106
|
+
interface Participant extends User {
|
|
107
|
+
ready: boolean;
|
|
108
|
+
}
|
|
109
|
+
type AnnouncementStage = "waiting" | "location" | "location-vote" | "exclude-menu" | "menu" | "restaurant" | "finish";
|
|
110
|
+
type InvitationStage = "waiting" | "date" | "time" | "location" | "location-vote" | "exclude-menu" | "menu" | "restaurant" | "finish";
|
|
111
|
+
declare const AnnouncementStageMap: Record<AnnouncementStage, number>;
|
|
112
|
+
declare const InvitationStageMap: Record<InvitationStage, number>;
|
|
113
|
+
|
|
114
|
+
type TimePicksRequestDto = string[];
|
|
115
|
+
type DatePicksRequestDto = string[];
|
|
116
|
+
interface LocationCandidateAddRequestDto {
|
|
117
|
+
id: LocationId;
|
|
118
|
+
placeName: string;
|
|
119
|
+
lat: number;
|
|
120
|
+
lng: number;
|
|
121
|
+
address?: string;
|
|
122
|
+
}
|
|
123
|
+
type LocationCandidateVoteRequestDto = LocationId[];
|
|
124
|
+
type ExcludeMenuRequestDto = MenuCode[];
|
|
125
|
+
type MenuPickRequestDto = MenuCode[];
|
|
126
|
+
type RestaurantPickRequestDto = RestaurantId;
|
|
127
|
+
type ChatMessageRequestDto = string;
|
|
128
|
+
type ReadyStateRequestDto = boolean;
|
|
129
|
+
|
|
130
|
+
interface ChatMessageResponseItem extends ChatMessage {
|
|
131
|
+
}
|
|
132
|
+
interface TimePicksUpdateResponseItem {
|
|
133
|
+
userId: UserId;
|
|
134
|
+
times: string[];
|
|
135
|
+
}
|
|
136
|
+
interface DatePicksUpdateResponseItem {
|
|
137
|
+
userId: UserId;
|
|
138
|
+
dates: string[];
|
|
139
|
+
}
|
|
140
|
+
interface LocationCandidateAddUpdateResponseItem extends LocationCandidate {
|
|
141
|
+
author: UserId;
|
|
142
|
+
}
|
|
143
|
+
interface LocationCandidateVoteUpdateResponseItem {
|
|
144
|
+
locationId: LocationId;
|
|
145
|
+
votes: UserId[];
|
|
146
|
+
}
|
|
147
|
+
interface ExcludeMenuUpdateResponseItem {
|
|
148
|
+
userId: UserId;
|
|
149
|
+
exclusions: MenuCode[];
|
|
150
|
+
}
|
|
151
|
+
interface MenuPickUpdateResponseItem {
|
|
152
|
+
menuCode: MenuCode;
|
|
153
|
+
selectedUsers: UserId[];
|
|
154
|
+
}
|
|
155
|
+
interface RestaurantPickUpdateResponseItem {
|
|
156
|
+
restaurantId: RestaurantId;
|
|
157
|
+
selectedUsers: UserId[];
|
|
158
|
+
}
|
|
159
|
+
type ReadyStateChangedDto = {
|
|
160
|
+
readyCount: number;
|
|
161
|
+
participantCount: number;
|
|
162
|
+
};
|
|
163
|
+
type TimePicksUpdateResponseDto = TimePicksUpdateResponseItem[];
|
|
164
|
+
type DatePicksUpdateResponseDto = DatePicksUpdateResponseItem[];
|
|
165
|
+
type LocationCandidateAddUpdateResponseDto = LocationCandidateAddUpdateResponseItem[];
|
|
166
|
+
type LocationCandidateVoteUpdateResponseDto = LocationCandidateVoteUpdateResponseItem[];
|
|
167
|
+
type ExcludeMenuUpdateResponseDto = ExcludeMenuUpdateResponseItem[];
|
|
168
|
+
type MenuPickUpdateResponseDto = MenuPickUpdateResponseItem[];
|
|
169
|
+
type RestaurantPickUpdateResponseDto = RestaurantPickUpdateResponseItem[];
|
|
170
|
+
|
|
171
|
+
type TimeInitialState = TimePicksUpdateResponseDto;
|
|
172
|
+
type DateInitialState = DatePicksUpdateResponseDto;
|
|
173
|
+
type LocationAddInitialState = LocationCandidateAddUpdateResponseDto;
|
|
174
|
+
type LocationVoteInitialState = {
|
|
175
|
+
locations: LocationCandidateAddUpdateResponseDto;
|
|
176
|
+
votes?: LocationCandidateVoteUpdateResponseDto;
|
|
177
|
+
};
|
|
178
|
+
interface ExcludeMenuInitialState {
|
|
179
|
+
recentMenus: {
|
|
180
|
+
userId: UserId;
|
|
181
|
+
menuList: Menu[];
|
|
182
|
+
}[];
|
|
183
|
+
excludedMenuList?: ExcludeMenuUpdateResponseDto;
|
|
184
|
+
}
|
|
185
|
+
interface MenuInitialState {
|
|
186
|
+
initialMenus: Menu[];
|
|
187
|
+
menuPick?: MenuPickUpdateResponseDto;
|
|
188
|
+
}
|
|
189
|
+
interface RestaurantInitialState {
|
|
190
|
+
initialRestaurants: KakaoRestaurantResponseDto[];
|
|
191
|
+
restaurantUserList?: RestaurantPickUpdateResponseDto;
|
|
192
|
+
}
|
|
193
|
+
interface WaitingInitialState {
|
|
194
|
+
participants: Participant[];
|
|
195
|
+
locationInitial?: string;
|
|
196
|
+
meetingAt?: string;
|
|
197
|
+
}
|
|
198
|
+
interface PhaseDataBroadcastDto {
|
|
199
|
+
phase: AnnouncementStage | InvitationStage;
|
|
200
|
+
data: WaitingInitialState | TimeInitialState | DateInitialState | LocationAddInitialState | LocationVoteInitialState | ExcludeMenuInitialState | MenuInitialState | RestaurantInitialState;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
interface TimeStore {
|
|
204
|
+
pickedByUser: Map<UserId, string[]>;
|
|
205
|
+
}
|
|
206
|
+
interface DateStore {
|
|
207
|
+
pickedByUser: Map<UserId, string[]>;
|
|
208
|
+
}
|
|
209
|
+
interface LocationStore {
|
|
210
|
+
candidates: Map<LocationId, LocationCandidate & {
|
|
211
|
+
author: UserId;
|
|
212
|
+
}>;
|
|
213
|
+
votes: Map<LocationId, Set<UserId>>;
|
|
214
|
+
}
|
|
215
|
+
interface ExcludeMenuStore {
|
|
216
|
+
userExclusions: Map<UserId, Map<MenuCode, Menu>>;
|
|
217
|
+
}
|
|
218
|
+
interface MenuStore {
|
|
219
|
+
availableMenus: Menu[];
|
|
220
|
+
menuPerUserSelections: Map<MenuCode, Set<UserId>>;
|
|
221
|
+
}
|
|
222
|
+
interface RestaurantStore {
|
|
223
|
+
initialRestaurants: KakaoRestaurantResponseDto[];
|
|
224
|
+
restaurantUserList: Map<UserId, RestaurantId>;
|
|
225
|
+
}
|
|
226
|
+
type RoomId = string;
|
|
227
|
+
interface RoomStore {
|
|
228
|
+
roomId: RoomId;
|
|
229
|
+
version: number;
|
|
230
|
+
updatedAt: number;
|
|
231
|
+
stage: AnnouncementStage | InvitationStage;
|
|
232
|
+
participants: Map<UserId, Participant>;
|
|
233
|
+
recentMenu: Map<UserId, Menu[]>;
|
|
234
|
+
timeout?: NodeJS.Timeout;
|
|
235
|
+
chat: ChatMessage[];
|
|
236
|
+
meetingAt?: string;
|
|
237
|
+
locationInitial?: string;
|
|
238
|
+
date?: DateStore;
|
|
239
|
+
time?: TimeStore;
|
|
240
|
+
location?: LocationStore;
|
|
241
|
+
restaurant?: RestaurantStore;
|
|
242
|
+
menu?: MenuStore;
|
|
243
|
+
excludeMenu?: ExcludeMenuStore;
|
|
244
|
+
final: FinalState;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
interface SocketClientEventMap {
|
|
248
|
+
any: [event: string, ...args: any[]];
|
|
249
|
+
"ready-state-changed": ReadyStateChangedDto;
|
|
250
|
+
"stage-changed": PhaseDataBroadcastDto;
|
|
251
|
+
"join-room": Participant[];
|
|
252
|
+
"room-assigned": {
|
|
253
|
+
roomId: string;
|
|
254
|
+
};
|
|
255
|
+
"waiting-initial-state": WaitingInitialState;
|
|
256
|
+
"time-initial-state": TimeInitialState;
|
|
257
|
+
"date-initial-state": DateInitialState;
|
|
258
|
+
"location-add-initial-state": LocationAddInitialState;
|
|
259
|
+
"location-vote-initial-state": LocationVoteInitialState;
|
|
260
|
+
"exclude-menu-initial-state": ExcludeMenuInitialState;
|
|
261
|
+
"menu-initial-state": MenuInitialState;
|
|
262
|
+
"restaurant-initial-state": RestaurantInitialState;
|
|
263
|
+
"time-updated": TimePicksUpdateResponseDto;
|
|
264
|
+
"date-updated": DatePicksUpdateResponseDto;
|
|
265
|
+
"location-add-updated": LocationCandidateAddUpdateResponseDto;
|
|
266
|
+
"location-vote-updated": LocationCandidateVoteUpdateResponseDto;
|
|
267
|
+
"exclude-menu-updated": ExcludeMenuUpdateResponseDto;
|
|
268
|
+
"menu-pick-updated": MenuPickUpdateResponseDto;
|
|
269
|
+
"restaurant-pick-updated": RestaurantPickUpdateResponseDto;
|
|
270
|
+
"final-state-response": FinalState;
|
|
271
|
+
"chat-message": ChatMessageResponseItem;
|
|
272
|
+
}
|
|
273
|
+
type SocketServerEventMap = {
|
|
274
|
+
"ready-state": ReadyStateRequestDto;
|
|
275
|
+
"chat-message": ChatMessageRequestDto;
|
|
276
|
+
"add-location-candidate": LocationCandidateAddRequestDto;
|
|
277
|
+
"vote-location": LocationCandidateVoteRequestDto;
|
|
278
|
+
"exclude-menu": ExcludeMenuRequestDto;
|
|
279
|
+
"pick-menu": MenuPickRequestDto;
|
|
280
|
+
"pick-restaurant": RestaurantPickRequestDto;
|
|
281
|
+
};
|
|
282
|
+
type SocketRequestHandler<K extends keyof SocketServerEventMap> = (data: SocketServerEventMap[K]) => void;
|
|
283
|
+
type SocketRequestHandlers = {
|
|
284
|
+
[K in keyof SocketServerEventMap]?: SocketRequestHandler<K>;
|
|
285
|
+
};
|
|
286
|
+
type SocketResponseHandler<K extends keyof SocketClientEventMap> = (data: SocketClientEventMap[K]) => void;
|
|
287
|
+
type SocketResponseHandlers = {
|
|
288
|
+
[K in keyof SocketClientEventMap]?: SocketResponseHandler<K>;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
interface Onboarding {
|
|
292
|
+
likedCodes: string[];
|
|
293
|
+
dislikedCodes: string[];
|
|
294
|
+
allergyCodes: string[];
|
|
295
|
+
}
|
|
296
|
+
interface OnboardingPreferenceRequest extends Onboarding {
|
|
297
|
+
}
|
|
298
|
+
interface OnboardingPreferenceResponse extends Onboarding {
|
|
299
|
+
}
|
|
300
|
+
interface PreferenceSummaryResponse {
|
|
301
|
+
likes: Menu[];
|
|
302
|
+
dislikes: Menu[];
|
|
303
|
+
allergies: Menu[];
|
|
304
|
+
}
|
|
305
|
+
interface PreferenceMetaResponse {
|
|
306
|
+
onboardedAt: string;
|
|
307
|
+
lastUpdatedAt: string;
|
|
308
|
+
revision: number;
|
|
309
|
+
}
|
|
310
|
+
interface ProfileResponse {
|
|
311
|
+
member: {
|
|
312
|
+
id: number;
|
|
313
|
+
username: string;
|
|
314
|
+
profileImageUrl: string;
|
|
315
|
+
bio: string;
|
|
316
|
+
meetingCount: number;
|
|
317
|
+
createdAt: string;
|
|
318
|
+
updatedAt: string;
|
|
319
|
+
email: string;
|
|
320
|
+
age: number;
|
|
321
|
+
role: string;
|
|
322
|
+
preferredMenus: string[];
|
|
323
|
+
dislikedMenus: string[];
|
|
324
|
+
};
|
|
325
|
+
mealStatus: boolean;
|
|
326
|
+
}
|
|
327
|
+
interface ProfileDetailResponse {
|
|
328
|
+
memberId: number;
|
|
329
|
+
userName: string;
|
|
330
|
+
profileImageUrl: string;
|
|
331
|
+
bio: string;
|
|
332
|
+
meetingCount: number;
|
|
333
|
+
likes: PreferenceItem[];
|
|
334
|
+
dislikes: PreferenceItem[];
|
|
335
|
+
allergies: PreferenceItem[];
|
|
336
|
+
}
|
|
337
|
+
interface PreferenceItem {
|
|
338
|
+
code: string;
|
|
339
|
+
label: string;
|
|
340
|
+
}
|
|
341
|
+
interface UpdateProfileRequest {
|
|
342
|
+
userName: string;
|
|
343
|
+
profileImageUrl: string;
|
|
344
|
+
bio: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
interface LocalTime {
|
|
348
|
+
hour: number;
|
|
349
|
+
minute: number;
|
|
350
|
+
second: number;
|
|
351
|
+
nano: number;
|
|
352
|
+
}
|
|
353
|
+
interface Article {
|
|
354
|
+
articleId: number;
|
|
355
|
+
author: User;
|
|
356
|
+
imageUrl: string;
|
|
357
|
+
mealDate: string;
|
|
358
|
+
mealTime: string;
|
|
359
|
+
restaurant: RestaurantInfo;
|
|
360
|
+
likeCount: number;
|
|
361
|
+
commentCount: number;
|
|
362
|
+
likedByMe: boolean;
|
|
363
|
+
createdAt: string;
|
|
364
|
+
expiresAt: string;
|
|
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;
|
|
376
|
+
likeCount: number;
|
|
377
|
+
commentCount: number;
|
|
378
|
+
likedByMe: boolean;
|
|
379
|
+
createdAt: string;
|
|
380
|
+
expiresAt: string;
|
|
381
|
+
taggedMemberIds: number[];
|
|
382
|
+
}
|
|
383
|
+
interface PageArticleSummaryResponse {
|
|
384
|
+
totalElements: number;
|
|
385
|
+
totalPages: number;
|
|
386
|
+
first: boolean;
|
|
387
|
+
size: number;
|
|
388
|
+
content: ArticleSummaryResponseDto[];
|
|
389
|
+
number: number;
|
|
390
|
+
sort: SortObject;
|
|
391
|
+
numberOfElements: number;
|
|
392
|
+
pageable: PageableObject;
|
|
393
|
+
last: boolean;
|
|
394
|
+
empty: boolean;
|
|
395
|
+
}
|
|
396
|
+
interface SortObject {
|
|
397
|
+
empty: boolean;
|
|
398
|
+
sorted: boolean;
|
|
399
|
+
unsorted: boolean;
|
|
400
|
+
}
|
|
401
|
+
interface PageableObject {
|
|
402
|
+
offset: number;
|
|
403
|
+
sort: SortObject;
|
|
404
|
+
paged: boolean;
|
|
405
|
+
pageNumber: number;
|
|
406
|
+
pageSize: number;
|
|
407
|
+
unpaged: boolean;
|
|
408
|
+
}
|
|
409
|
+
interface ArticleDetailResponseDto {
|
|
410
|
+
articleId: number;
|
|
411
|
+
authorId: number;
|
|
412
|
+
authorUsername: string;
|
|
413
|
+
imageUrl: string;
|
|
414
|
+
mealDate: string;
|
|
415
|
+
mealTime: LocalTime;
|
|
416
|
+
restaurant: RestaurantInfo;
|
|
417
|
+
likeCount: number;
|
|
418
|
+
commentCount: number;
|
|
419
|
+
likedByMe: boolean;
|
|
420
|
+
createdAt: string;
|
|
421
|
+
expiresAt: string;
|
|
422
|
+
}
|
|
423
|
+
interface ArticlePostRequestDto {
|
|
424
|
+
imageUrl: string;
|
|
425
|
+
method: "ALBUM" | "CAMERA";
|
|
426
|
+
mealDate: string;
|
|
427
|
+
mealTime: string;
|
|
428
|
+
restaurant: RestaurantInfo;
|
|
429
|
+
taggedMemberIds: number[];
|
|
430
|
+
camera: boolean;
|
|
431
|
+
album: boolean;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
interface CommentResponseDto {
|
|
435
|
+
commentId: number;
|
|
436
|
+
authorId: number;
|
|
437
|
+
authorUsername: string;
|
|
438
|
+
parentCommentId: number | null;
|
|
439
|
+
content: string;
|
|
440
|
+
createdAt: string;
|
|
441
|
+
profileImageUrl?: string;
|
|
442
|
+
}
|
|
443
|
+
interface CommentPostRequestDto {
|
|
444
|
+
content: string;
|
|
445
|
+
parentCommentId?: number;
|
|
446
|
+
}
|
|
447
|
+
interface Comment extends CommentResponseDto {
|
|
448
|
+
replies?: CommentResponseDto[];
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
interface LikePostResponseDto {
|
|
452
|
+
liked: boolean;
|
|
453
|
+
likeCount: number;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
type UploadAndPostVars = {
|
|
457
|
+
currentUserId: string;
|
|
458
|
+
file: File;
|
|
459
|
+
buildRequest: (cdnUrl: string) => ArticlePostRequestDto;
|
|
460
|
+
};
|
|
461
|
+
type UploadAndRegisterVars = {
|
|
462
|
+
currentUserId: string;
|
|
463
|
+
file: File;
|
|
464
|
+
buildRequest: (cdnUrl: string) => {
|
|
465
|
+
imageUrl: string;
|
|
466
|
+
username: string;
|
|
467
|
+
preferences: string[];
|
|
468
|
+
cantEat: string[];
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
interface Recruit {
|
|
473
|
+
targetCount: number;
|
|
474
|
+
meetingAt: string;
|
|
475
|
+
location: string;
|
|
476
|
+
message: string;
|
|
477
|
+
}
|
|
478
|
+
interface RecruitRequestDto extends Recruit {
|
|
479
|
+
}
|
|
480
|
+
interface RecruitResponseDto extends Recruit {
|
|
481
|
+
id: number;
|
|
482
|
+
createdAt: string;
|
|
483
|
+
updatedAt: string;
|
|
484
|
+
author: User;
|
|
485
|
+
participants: User[];
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
interface InvitationPostRequest {
|
|
489
|
+
inviteeId: {
|
|
490
|
+
id: number;
|
|
491
|
+
};
|
|
492
|
+
message: string;
|
|
493
|
+
}
|
|
494
|
+
interface InvitationResponse {
|
|
495
|
+
invitationId: number;
|
|
496
|
+
inviterName: string;
|
|
497
|
+
inviterProfileImageUrl?: string;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
declare enum PlanStatus {
|
|
501
|
+
PLANNING = "PLANNING",
|
|
502
|
+
COMPLETED = "COMPLETED"
|
|
503
|
+
}
|
|
504
|
+
declare enum PlanType {
|
|
505
|
+
ANNOUNCEMENT = "ANNOUNCEMENT",
|
|
506
|
+
INVITATION = "INVITATION"
|
|
507
|
+
}
|
|
508
|
+
interface MeetingParticipant {
|
|
509
|
+
userId: number;
|
|
510
|
+
username: string;
|
|
511
|
+
profileImageUrl: string;
|
|
512
|
+
}
|
|
513
|
+
interface MeetingResponse {
|
|
514
|
+
id: number;
|
|
515
|
+
author: MeetingParticipant;
|
|
516
|
+
participants: MeetingParticipant[];
|
|
517
|
+
location: string;
|
|
518
|
+
time: string;
|
|
519
|
+
restaurant: string;
|
|
520
|
+
isCompleted: boolean;
|
|
521
|
+
restaurantType: string;
|
|
522
|
+
status: PlanStatus;
|
|
523
|
+
type: PlanType;
|
|
524
|
+
createdAt: string;
|
|
525
|
+
updatedAt: string;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
interface Friend {
|
|
529
|
+
userId: UserId;
|
|
530
|
+
name: string;
|
|
531
|
+
lastActive: string;
|
|
532
|
+
isHungry: boolean;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export { type AnnouncementStage, AnnouncementStageMap, type Article, type ArticleDetailResponseDto, type ArticleGetResponseDto, type ArticlePostRequestDto, type ArticleSummaryResponseDto, type Category, type ChatMessage, type ChatMessageRequestDto, type ChatMessageResponseItem, type Comment, type CommentPostRequestDto, type CommentResponseDto, type DateInitialState, type DatePicksRequestDto, type DatePicksUpdateResponseDto, type DatePicksUpdateResponseItem, type DateStore, type ExcludeMenuInitialState, type ExcludeMenuRequestDto, type ExcludeMenuStore, type ExcludeMenuUpdateResponseDto, type ExcludeMenuUpdateResponseItem, type FinalState, type Friend, type InvitationPostRequest, type InvitationResponse, type InvitationStage, InvitationStageMap, type Item, type KakaoRestaurantResponseDto, type LikePostResponseDto, type LocalTime, type LocationAddInitialState, type LocationCandidate, type LocationCandidateAddRequestDto, type LocationCandidateAddUpdateResponseDto, type LocationCandidateAddUpdateResponseItem, type LocationCandidateView, type LocationCandidateVoteRequestDto, type LocationCandidateVoteUpdateResponseDto, type LocationCandidateVoteUpdateResponseItem, type LocationId, type LocationStore, type LocationVoteInitialState, type MeetingParticipant, type MeetingResponse, type Menu, type MenuCode, type MenuInitialState, type MenuPickRequestDto, type MenuPickUpdateResponseDto, type MenuPickUpdateResponseItem, type MenuStore, type Onboarding, type OnboardingPreferenceRequest, type OnboardingPreferenceResponse, type PageArticleSummaryResponse, type PageableObject, type Participant, type PhaseDataBroadcastDto, PlanStatus, PlanType, type PreferenceItem, type PreferenceMetaResponse, type PreferenceSummaryResponse, type ProfileDetailResponse, type ProfileResponse, type ReadyStateChangedDto, type ReadyStateRequestDto, type Recruit, type RecruitRequestDto, type RecruitResponseDto, type RestaurantId, type RestaurantInfo, type RestaurantInitialState, type RestaurantPickRequestDto, type RestaurantPickUpdateResponseDto, type RestaurantPickUpdateResponseItem, type RestaurantStore, type RoomStore, type SocketClientEventMap, type SocketRequestHandlers, type SocketResponseHandlers, type SocketServerEventMap, type SortObject, type TimeInitialState, type TimePicksRequestDto, type TimePicksUpdateResponseDto, type TimePicksUpdateResponseItem, type TimeStore, type TokenResponse, type UpdateProfileRequest, type UploadAndPostVars, type UploadAndRegisterVars, type User, type UserId, type UserMenuCategory, type WaitingInitialState };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,535 @@
|
|
|
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
|
+
interface KakaoRestaurantResponseDto {
|
|
17
|
+
id: RestaurantId;
|
|
18
|
+
place_name: string;
|
|
19
|
+
category_name: string;
|
|
20
|
+
category_group_name: string;
|
|
21
|
+
distance: string;
|
|
22
|
+
road_address_name: string;
|
|
23
|
+
address_name: string;
|
|
24
|
+
phone: string;
|
|
25
|
+
place_url?: string;
|
|
26
|
+
lat: number;
|
|
27
|
+
lng: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface TokenResponse {
|
|
31
|
+
accessToken: string;
|
|
32
|
+
refreshToken: string;
|
|
33
|
+
accessTokenMaxAge: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface Category {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
aspectRatio: number;
|
|
40
|
+
placeholder: {
|
|
41
|
+
blurhash: string;
|
|
42
|
+
thumbhashDataURL: string;
|
|
43
|
+
};
|
|
44
|
+
images: {
|
|
45
|
+
src: string;
|
|
46
|
+
avifSrcset: string;
|
|
47
|
+
};
|
|
48
|
+
priority?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface Item {
|
|
51
|
+
name: string;
|
|
52
|
+
aspectRatio: number;
|
|
53
|
+
placeholder: {
|
|
54
|
+
blurhash: string;
|
|
55
|
+
thumbhashDataURL: string;
|
|
56
|
+
};
|
|
57
|
+
images: {
|
|
58
|
+
src: string;
|
|
59
|
+
avifSrcset: string;
|
|
60
|
+
sizes?: string;
|
|
61
|
+
};
|
|
62
|
+
priority?: boolean;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
type UserId = string;
|
|
66
|
+
interface User {
|
|
67
|
+
userId: UserId;
|
|
68
|
+
username: string;
|
|
69
|
+
profileImageUrl: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
type MenuCode = string;
|
|
73
|
+
interface Menu {
|
|
74
|
+
code: MenuCode;
|
|
75
|
+
label: string;
|
|
76
|
+
}
|
|
77
|
+
interface LocationCandidateView extends LocationCandidate {
|
|
78
|
+
isSelected: boolean;
|
|
79
|
+
}
|
|
80
|
+
type LocationId = string;
|
|
81
|
+
interface LocationCandidate {
|
|
82
|
+
id: LocationId;
|
|
83
|
+
placeName: string;
|
|
84
|
+
lat: number;
|
|
85
|
+
lng: number;
|
|
86
|
+
address: string;
|
|
87
|
+
}
|
|
88
|
+
interface UserMenuCategory {
|
|
89
|
+
userId: string;
|
|
90
|
+
menuList: Menu[];
|
|
91
|
+
}
|
|
92
|
+
interface ChatMessage {
|
|
93
|
+
messageId: string;
|
|
94
|
+
user: User;
|
|
95
|
+
text?: string;
|
|
96
|
+
createdAt: string;
|
|
97
|
+
}
|
|
98
|
+
interface FinalState {
|
|
99
|
+
location: LocationCandidate | undefined;
|
|
100
|
+
excludeMenu: Menu[] | undefined;
|
|
101
|
+
menu: Menu | undefined;
|
|
102
|
+
restaurant: RestaurantInfo | undefined;
|
|
103
|
+
time: string;
|
|
104
|
+
date: string;
|
|
105
|
+
}
|
|
106
|
+
interface Participant extends User {
|
|
107
|
+
ready: boolean;
|
|
108
|
+
}
|
|
109
|
+
type AnnouncementStage = "waiting" | "location" | "location-vote" | "exclude-menu" | "menu" | "restaurant" | "finish";
|
|
110
|
+
type InvitationStage = "waiting" | "date" | "time" | "location" | "location-vote" | "exclude-menu" | "menu" | "restaurant" | "finish";
|
|
111
|
+
declare const AnnouncementStageMap: Record<AnnouncementStage, number>;
|
|
112
|
+
declare const InvitationStageMap: Record<InvitationStage, number>;
|
|
113
|
+
|
|
114
|
+
type TimePicksRequestDto = string[];
|
|
115
|
+
type DatePicksRequestDto = string[];
|
|
116
|
+
interface LocationCandidateAddRequestDto {
|
|
117
|
+
id: LocationId;
|
|
118
|
+
placeName: string;
|
|
119
|
+
lat: number;
|
|
120
|
+
lng: number;
|
|
121
|
+
address?: string;
|
|
122
|
+
}
|
|
123
|
+
type LocationCandidateVoteRequestDto = LocationId[];
|
|
124
|
+
type ExcludeMenuRequestDto = MenuCode[];
|
|
125
|
+
type MenuPickRequestDto = MenuCode[];
|
|
126
|
+
type RestaurantPickRequestDto = RestaurantId;
|
|
127
|
+
type ChatMessageRequestDto = string;
|
|
128
|
+
type ReadyStateRequestDto = boolean;
|
|
129
|
+
|
|
130
|
+
interface ChatMessageResponseItem extends ChatMessage {
|
|
131
|
+
}
|
|
132
|
+
interface TimePicksUpdateResponseItem {
|
|
133
|
+
userId: UserId;
|
|
134
|
+
times: string[];
|
|
135
|
+
}
|
|
136
|
+
interface DatePicksUpdateResponseItem {
|
|
137
|
+
userId: UserId;
|
|
138
|
+
dates: string[];
|
|
139
|
+
}
|
|
140
|
+
interface LocationCandidateAddUpdateResponseItem extends LocationCandidate {
|
|
141
|
+
author: UserId;
|
|
142
|
+
}
|
|
143
|
+
interface LocationCandidateVoteUpdateResponseItem {
|
|
144
|
+
locationId: LocationId;
|
|
145
|
+
votes: UserId[];
|
|
146
|
+
}
|
|
147
|
+
interface ExcludeMenuUpdateResponseItem {
|
|
148
|
+
userId: UserId;
|
|
149
|
+
exclusions: MenuCode[];
|
|
150
|
+
}
|
|
151
|
+
interface MenuPickUpdateResponseItem {
|
|
152
|
+
menuCode: MenuCode;
|
|
153
|
+
selectedUsers: UserId[];
|
|
154
|
+
}
|
|
155
|
+
interface RestaurantPickUpdateResponseItem {
|
|
156
|
+
restaurantId: RestaurantId;
|
|
157
|
+
selectedUsers: UserId[];
|
|
158
|
+
}
|
|
159
|
+
type ReadyStateChangedDto = {
|
|
160
|
+
readyCount: number;
|
|
161
|
+
participantCount: number;
|
|
162
|
+
};
|
|
163
|
+
type TimePicksUpdateResponseDto = TimePicksUpdateResponseItem[];
|
|
164
|
+
type DatePicksUpdateResponseDto = DatePicksUpdateResponseItem[];
|
|
165
|
+
type LocationCandidateAddUpdateResponseDto = LocationCandidateAddUpdateResponseItem[];
|
|
166
|
+
type LocationCandidateVoteUpdateResponseDto = LocationCandidateVoteUpdateResponseItem[];
|
|
167
|
+
type ExcludeMenuUpdateResponseDto = ExcludeMenuUpdateResponseItem[];
|
|
168
|
+
type MenuPickUpdateResponseDto = MenuPickUpdateResponseItem[];
|
|
169
|
+
type RestaurantPickUpdateResponseDto = RestaurantPickUpdateResponseItem[];
|
|
170
|
+
|
|
171
|
+
type TimeInitialState = TimePicksUpdateResponseDto;
|
|
172
|
+
type DateInitialState = DatePicksUpdateResponseDto;
|
|
173
|
+
type LocationAddInitialState = LocationCandidateAddUpdateResponseDto;
|
|
174
|
+
type LocationVoteInitialState = {
|
|
175
|
+
locations: LocationCandidateAddUpdateResponseDto;
|
|
176
|
+
votes?: LocationCandidateVoteUpdateResponseDto;
|
|
177
|
+
};
|
|
178
|
+
interface ExcludeMenuInitialState {
|
|
179
|
+
recentMenus: {
|
|
180
|
+
userId: UserId;
|
|
181
|
+
menuList: Menu[];
|
|
182
|
+
}[];
|
|
183
|
+
excludedMenuList?: ExcludeMenuUpdateResponseDto;
|
|
184
|
+
}
|
|
185
|
+
interface MenuInitialState {
|
|
186
|
+
initialMenus: Menu[];
|
|
187
|
+
menuPick?: MenuPickUpdateResponseDto;
|
|
188
|
+
}
|
|
189
|
+
interface RestaurantInitialState {
|
|
190
|
+
initialRestaurants: KakaoRestaurantResponseDto[];
|
|
191
|
+
restaurantUserList?: RestaurantPickUpdateResponseDto;
|
|
192
|
+
}
|
|
193
|
+
interface WaitingInitialState {
|
|
194
|
+
participants: Participant[];
|
|
195
|
+
locationInitial?: string;
|
|
196
|
+
meetingAt?: string;
|
|
197
|
+
}
|
|
198
|
+
interface PhaseDataBroadcastDto {
|
|
199
|
+
phase: AnnouncementStage | InvitationStage;
|
|
200
|
+
data: WaitingInitialState | TimeInitialState | DateInitialState | LocationAddInitialState | LocationVoteInitialState | ExcludeMenuInitialState | MenuInitialState | RestaurantInitialState;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
interface TimeStore {
|
|
204
|
+
pickedByUser: Map<UserId, string[]>;
|
|
205
|
+
}
|
|
206
|
+
interface DateStore {
|
|
207
|
+
pickedByUser: Map<UserId, string[]>;
|
|
208
|
+
}
|
|
209
|
+
interface LocationStore {
|
|
210
|
+
candidates: Map<LocationId, LocationCandidate & {
|
|
211
|
+
author: UserId;
|
|
212
|
+
}>;
|
|
213
|
+
votes: Map<LocationId, Set<UserId>>;
|
|
214
|
+
}
|
|
215
|
+
interface ExcludeMenuStore {
|
|
216
|
+
userExclusions: Map<UserId, Map<MenuCode, Menu>>;
|
|
217
|
+
}
|
|
218
|
+
interface MenuStore {
|
|
219
|
+
availableMenus: Menu[];
|
|
220
|
+
menuPerUserSelections: Map<MenuCode, Set<UserId>>;
|
|
221
|
+
}
|
|
222
|
+
interface RestaurantStore {
|
|
223
|
+
initialRestaurants: KakaoRestaurantResponseDto[];
|
|
224
|
+
restaurantUserList: Map<UserId, RestaurantId>;
|
|
225
|
+
}
|
|
226
|
+
type RoomId = string;
|
|
227
|
+
interface RoomStore {
|
|
228
|
+
roomId: RoomId;
|
|
229
|
+
version: number;
|
|
230
|
+
updatedAt: number;
|
|
231
|
+
stage: AnnouncementStage | InvitationStage;
|
|
232
|
+
participants: Map<UserId, Participant>;
|
|
233
|
+
recentMenu: Map<UserId, Menu[]>;
|
|
234
|
+
timeout?: NodeJS.Timeout;
|
|
235
|
+
chat: ChatMessage[];
|
|
236
|
+
meetingAt?: string;
|
|
237
|
+
locationInitial?: string;
|
|
238
|
+
date?: DateStore;
|
|
239
|
+
time?: TimeStore;
|
|
240
|
+
location?: LocationStore;
|
|
241
|
+
restaurant?: RestaurantStore;
|
|
242
|
+
menu?: MenuStore;
|
|
243
|
+
excludeMenu?: ExcludeMenuStore;
|
|
244
|
+
final: FinalState;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
interface SocketClientEventMap {
|
|
248
|
+
any: [event: string, ...args: any[]];
|
|
249
|
+
"ready-state-changed": ReadyStateChangedDto;
|
|
250
|
+
"stage-changed": PhaseDataBroadcastDto;
|
|
251
|
+
"join-room": Participant[];
|
|
252
|
+
"room-assigned": {
|
|
253
|
+
roomId: string;
|
|
254
|
+
};
|
|
255
|
+
"waiting-initial-state": WaitingInitialState;
|
|
256
|
+
"time-initial-state": TimeInitialState;
|
|
257
|
+
"date-initial-state": DateInitialState;
|
|
258
|
+
"location-add-initial-state": LocationAddInitialState;
|
|
259
|
+
"location-vote-initial-state": LocationVoteInitialState;
|
|
260
|
+
"exclude-menu-initial-state": ExcludeMenuInitialState;
|
|
261
|
+
"menu-initial-state": MenuInitialState;
|
|
262
|
+
"restaurant-initial-state": RestaurantInitialState;
|
|
263
|
+
"time-updated": TimePicksUpdateResponseDto;
|
|
264
|
+
"date-updated": DatePicksUpdateResponseDto;
|
|
265
|
+
"location-add-updated": LocationCandidateAddUpdateResponseDto;
|
|
266
|
+
"location-vote-updated": LocationCandidateVoteUpdateResponseDto;
|
|
267
|
+
"exclude-menu-updated": ExcludeMenuUpdateResponseDto;
|
|
268
|
+
"menu-pick-updated": MenuPickUpdateResponseDto;
|
|
269
|
+
"restaurant-pick-updated": RestaurantPickUpdateResponseDto;
|
|
270
|
+
"final-state-response": FinalState;
|
|
271
|
+
"chat-message": ChatMessageResponseItem;
|
|
272
|
+
}
|
|
273
|
+
type SocketServerEventMap = {
|
|
274
|
+
"ready-state": ReadyStateRequestDto;
|
|
275
|
+
"chat-message": ChatMessageRequestDto;
|
|
276
|
+
"add-location-candidate": LocationCandidateAddRequestDto;
|
|
277
|
+
"vote-location": LocationCandidateVoteRequestDto;
|
|
278
|
+
"exclude-menu": ExcludeMenuRequestDto;
|
|
279
|
+
"pick-menu": MenuPickRequestDto;
|
|
280
|
+
"pick-restaurant": RestaurantPickRequestDto;
|
|
281
|
+
};
|
|
282
|
+
type SocketRequestHandler<K extends keyof SocketServerEventMap> = (data: SocketServerEventMap[K]) => void;
|
|
283
|
+
type SocketRequestHandlers = {
|
|
284
|
+
[K in keyof SocketServerEventMap]?: SocketRequestHandler<K>;
|
|
285
|
+
};
|
|
286
|
+
type SocketResponseHandler<K extends keyof SocketClientEventMap> = (data: SocketClientEventMap[K]) => void;
|
|
287
|
+
type SocketResponseHandlers = {
|
|
288
|
+
[K in keyof SocketClientEventMap]?: SocketResponseHandler<K>;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
interface Onboarding {
|
|
292
|
+
likedCodes: string[];
|
|
293
|
+
dislikedCodes: string[];
|
|
294
|
+
allergyCodes: string[];
|
|
295
|
+
}
|
|
296
|
+
interface OnboardingPreferenceRequest extends Onboarding {
|
|
297
|
+
}
|
|
298
|
+
interface OnboardingPreferenceResponse extends Onboarding {
|
|
299
|
+
}
|
|
300
|
+
interface PreferenceSummaryResponse {
|
|
301
|
+
likes: Menu[];
|
|
302
|
+
dislikes: Menu[];
|
|
303
|
+
allergies: Menu[];
|
|
304
|
+
}
|
|
305
|
+
interface PreferenceMetaResponse {
|
|
306
|
+
onboardedAt: string;
|
|
307
|
+
lastUpdatedAt: string;
|
|
308
|
+
revision: number;
|
|
309
|
+
}
|
|
310
|
+
interface ProfileResponse {
|
|
311
|
+
member: {
|
|
312
|
+
id: number;
|
|
313
|
+
username: string;
|
|
314
|
+
profileImageUrl: string;
|
|
315
|
+
bio: string;
|
|
316
|
+
meetingCount: number;
|
|
317
|
+
createdAt: string;
|
|
318
|
+
updatedAt: string;
|
|
319
|
+
email: string;
|
|
320
|
+
age: number;
|
|
321
|
+
role: string;
|
|
322
|
+
preferredMenus: string[];
|
|
323
|
+
dislikedMenus: string[];
|
|
324
|
+
};
|
|
325
|
+
mealStatus: boolean;
|
|
326
|
+
}
|
|
327
|
+
interface ProfileDetailResponse {
|
|
328
|
+
memberId: number;
|
|
329
|
+
userName: string;
|
|
330
|
+
profileImageUrl: string;
|
|
331
|
+
bio: string;
|
|
332
|
+
meetingCount: number;
|
|
333
|
+
likes: PreferenceItem[];
|
|
334
|
+
dislikes: PreferenceItem[];
|
|
335
|
+
allergies: PreferenceItem[];
|
|
336
|
+
}
|
|
337
|
+
interface PreferenceItem {
|
|
338
|
+
code: string;
|
|
339
|
+
label: string;
|
|
340
|
+
}
|
|
341
|
+
interface UpdateProfileRequest {
|
|
342
|
+
userName: string;
|
|
343
|
+
profileImageUrl: string;
|
|
344
|
+
bio: string;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
interface LocalTime {
|
|
348
|
+
hour: number;
|
|
349
|
+
minute: number;
|
|
350
|
+
second: number;
|
|
351
|
+
nano: number;
|
|
352
|
+
}
|
|
353
|
+
interface Article {
|
|
354
|
+
articleId: number;
|
|
355
|
+
author: User;
|
|
356
|
+
imageUrl: string;
|
|
357
|
+
mealDate: string;
|
|
358
|
+
mealTime: string;
|
|
359
|
+
restaurant: RestaurantInfo;
|
|
360
|
+
likeCount: number;
|
|
361
|
+
commentCount: number;
|
|
362
|
+
likedByMe: boolean;
|
|
363
|
+
createdAt: string;
|
|
364
|
+
expiresAt: string;
|
|
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;
|
|
376
|
+
likeCount: number;
|
|
377
|
+
commentCount: number;
|
|
378
|
+
likedByMe: boolean;
|
|
379
|
+
createdAt: string;
|
|
380
|
+
expiresAt: string;
|
|
381
|
+
taggedMemberIds: number[];
|
|
382
|
+
}
|
|
383
|
+
interface PageArticleSummaryResponse {
|
|
384
|
+
totalElements: number;
|
|
385
|
+
totalPages: number;
|
|
386
|
+
first: boolean;
|
|
387
|
+
size: number;
|
|
388
|
+
content: ArticleSummaryResponseDto[];
|
|
389
|
+
number: number;
|
|
390
|
+
sort: SortObject;
|
|
391
|
+
numberOfElements: number;
|
|
392
|
+
pageable: PageableObject;
|
|
393
|
+
last: boolean;
|
|
394
|
+
empty: boolean;
|
|
395
|
+
}
|
|
396
|
+
interface SortObject {
|
|
397
|
+
empty: boolean;
|
|
398
|
+
sorted: boolean;
|
|
399
|
+
unsorted: boolean;
|
|
400
|
+
}
|
|
401
|
+
interface PageableObject {
|
|
402
|
+
offset: number;
|
|
403
|
+
sort: SortObject;
|
|
404
|
+
paged: boolean;
|
|
405
|
+
pageNumber: number;
|
|
406
|
+
pageSize: number;
|
|
407
|
+
unpaged: boolean;
|
|
408
|
+
}
|
|
409
|
+
interface ArticleDetailResponseDto {
|
|
410
|
+
articleId: number;
|
|
411
|
+
authorId: number;
|
|
412
|
+
authorUsername: string;
|
|
413
|
+
imageUrl: string;
|
|
414
|
+
mealDate: string;
|
|
415
|
+
mealTime: LocalTime;
|
|
416
|
+
restaurant: RestaurantInfo;
|
|
417
|
+
likeCount: number;
|
|
418
|
+
commentCount: number;
|
|
419
|
+
likedByMe: boolean;
|
|
420
|
+
createdAt: string;
|
|
421
|
+
expiresAt: string;
|
|
422
|
+
}
|
|
423
|
+
interface ArticlePostRequestDto {
|
|
424
|
+
imageUrl: string;
|
|
425
|
+
method: "ALBUM" | "CAMERA";
|
|
426
|
+
mealDate: string;
|
|
427
|
+
mealTime: string;
|
|
428
|
+
restaurant: RestaurantInfo;
|
|
429
|
+
taggedMemberIds: number[];
|
|
430
|
+
camera: boolean;
|
|
431
|
+
album: boolean;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
interface CommentResponseDto {
|
|
435
|
+
commentId: number;
|
|
436
|
+
authorId: number;
|
|
437
|
+
authorUsername: string;
|
|
438
|
+
parentCommentId: number | null;
|
|
439
|
+
content: string;
|
|
440
|
+
createdAt: string;
|
|
441
|
+
profileImageUrl?: string;
|
|
442
|
+
}
|
|
443
|
+
interface CommentPostRequestDto {
|
|
444
|
+
content: string;
|
|
445
|
+
parentCommentId?: number;
|
|
446
|
+
}
|
|
447
|
+
interface Comment extends CommentResponseDto {
|
|
448
|
+
replies?: CommentResponseDto[];
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
interface LikePostResponseDto {
|
|
452
|
+
liked: boolean;
|
|
453
|
+
likeCount: number;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
type UploadAndPostVars = {
|
|
457
|
+
currentUserId: string;
|
|
458
|
+
file: File;
|
|
459
|
+
buildRequest: (cdnUrl: string) => ArticlePostRequestDto;
|
|
460
|
+
};
|
|
461
|
+
type UploadAndRegisterVars = {
|
|
462
|
+
currentUserId: string;
|
|
463
|
+
file: File;
|
|
464
|
+
buildRequest: (cdnUrl: string) => {
|
|
465
|
+
imageUrl: string;
|
|
466
|
+
username: string;
|
|
467
|
+
preferences: string[];
|
|
468
|
+
cantEat: string[];
|
|
469
|
+
};
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
interface Recruit {
|
|
473
|
+
targetCount: number;
|
|
474
|
+
meetingAt: string;
|
|
475
|
+
location: string;
|
|
476
|
+
message: string;
|
|
477
|
+
}
|
|
478
|
+
interface RecruitRequestDto extends Recruit {
|
|
479
|
+
}
|
|
480
|
+
interface RecruitResponseDto extends Recruit {
|
|
481
|
+
id: number;
|
|
482
|
+
createdAt: string;
|
|
483
|
+
updatedAt: string;
|
|
484
|
+
author: User;
|
|
485
|
+
participants: User[];
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
interface InvitationPostRequest {
|
|
489
|
+
inviteeId: {
|
|
490
|
+
id: number;
|
|
491
|
+
};
|
|
492
|
+
message: string;
|
|
493
|
+
}
|
|
494
|
+
interface InvitationResponse {
|
|
495
|
+
invitationId: number;
|
|
496
|
+
inviterName: string;
|
|
497
|
+
inviterProfileImageUrl?: string;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
declare enum PlanStatus {
|
|
501
|
+
PLANNING = "PLANNING",
|
|
502
|
+
COMPLETED = "COMPLETED"
|
|
503
|
+
}
|
|
504
|
+
declare enum PlanType {
|
|
505
|
+
ANNOUNCEMENT = "ANNOUNCEMENT",
|
|
506
|
+
INVITATION = "INVITATION"
|
|
507
|
+
}
|
|
508
|
+
interface MeetingParticipant {
|
|
509
|
+
userId: number;
|
|
510
|
+
username: string;
|
|
511
|
+
profileImageUrl: string;
|
|
512
|
+
}
|
|
513
|
+
interface MeetingResponse {
|
|
514
|
+
id: number;
|
|
515
|
+
author: MeetingParticipant;
|
|
516
|
+
participants: MeetingParticipant[];
|
|
517
|
+
location: string;
|
|
518
|
+
time: string;
|
|
519
|
+
restaurant: string;
|
|
520
|
+
isCompleted: boolean;
|
|
521
|
+
restaurantType: string;
|
|
522
|
+
status: PlanStatus;
|
|
523
|
+
type: PlanType;
|
|
524
|
+
createdAt: string;
|
|
525
|
+
updatedAt: string;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
interface Friend {
|
|
529
|
+
userId: UserId;
|
|
530
|
+
name: string;
|
|
531
|
+
lastActive: string;
|
|
532
|
+
isHungry: boolean;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
export { type AnnouncementStage, AnnouncementStageMap, type Article, type ArticleDetailResponseDto, type ArticleGetResponseDto, type ArticlePostRequestDto, type ArticleSummaryResponseDto, type Category, type ChatMessage, type ChatMessageRequestDto, type ChatMessageResponseItem, type Comment, type CommentPostRequestDto, type CommentResponseDto, type DateInitialState, type DatePicksRequestDto, type DatePicksUpdateResponseDto, type DatePicksUpdateResponseItem, type DateStore, type ExcludeMenuInitialState, type ExcludeMenuRequestDto, type ExcludeMenuStore, type ExcludeMenuUpdateResponseDto, type ExcludeMenuUpdateResponseItem, type FinalState, type Friend, type InvitationPostRequest, type InvitationResponse, type InvitationStage, InvitationStageMap, type Item, type KakaoRestaurantResponseDto, type LikePostResponseDto, type LocalTime, type LocationAddInitialState, type LocationCandidate, type LocationCandidateAddRequestDto, type LocationCandidateAddUpdateResponseDto, type LocationCandidateAddUpdateResponseItem, type LocationCandidateView, type LocationCandidateVoteRequestDto, type LocationCandidateVoteUpdateResponseDto, type LocationCandidateVoteUpdateResponseItem, type LocationId, type LocationStore, type LocationVoteInitialState, type MeetingParticipant, type MeetingResponse, type Menu, type MenuCode, type MenuInitialState, type MenuPickRequestDto, type MenuPickUpdateResponseDto, type MenuPickUpdateResponseItem, type MenuStore, type Onboarding, type OnboardingPreferenceRequest, type OnboardingPreferenceResponse, type PageArticleSummaryResponse, type PageableObject, type Participant, type PhaseDataBroadcastDto, PlanStatus, PlanType, type PreferenceItem, type PreferenceMetaResponse, type PreferenceSummaryResponse, type ProfileDetailResponse, type ProfileResponse, type ReadyStateChangedDto, type ReadyStateRequestDto, type Recruit, type RecruitRequestDto, type RecruitResponseDto, type RestaurantId, type RestaurantInfo, type RestaurantInitialState, type RestaurantPickRequestDto, type RestaurantPickUpdateResponseDto, type RestaurantPickUpdateResponseItem, type RestaurantStore, type RoomStore, type SocketClientEventMap, type SocketRequestHandlers, type SocketResponseHandlers, type SocketServerEventMap, type SortObject, type TimeInitialState, type TimePicksRequestDto, type TimePicksUpdateResponseDto, type TimePicksUpdateResponseItem, type TimeStore, type TokenResponse, type UpdateProfileRequest, type UploadAndPostVars, type UploadAndRegisterVars, type User, type UserId, type UserMenuCategory, type WaitingInitialState };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/types/plan/plan.ts
|
|
2
|
+
var PlanStatus = /* @__PURE__ */ ((PlanStatus2) => {
|
|
3
|
+
PlanStatus2["PLANNING"] = "PLANNING";
|
|
4
|
+
PlanStatus2["COMPLETED"] = "COMPLETED";
|
|
5
|
+
return PlanStatus2;
|
|
6
|
+
})(PlanStatus || {});
|
|
7
|
+
var PlanType = /* @__PURE__ */ ((PlanType2) => {
|
|
8
|
+
PlanType2["ANNOUNCEMENT"] = "ANNOUNCEMENT";
|
|
9
|
+
PlanType2["INVITATION"] = "INVITATION";
|
|
10
|
+
return PlanType2;
|
|
11
|
+
})(PlanType || {});
|
|
12
|
+
|
|
13
|
+
// src/types/matching/types.ts
|
|
14
|
+
var AnnouncementStageMap = {
|
|
15
|
+
waiting: 1,
|
|
16
|
+
location: 2,
|
|
17
|
+
"location-vote": 3,
|
|
18
|
+
"exclude-menu": 4,
|
|
19
|
+
menu: 5,
|
|
20
|
+
restaurant: 6,
|
|
21
|
+
finish: 7
|
|
22
|
+
};
|
|
23
|
+
var InvitationStageMap = {
|
|
24
|
+
waiting: 1,
|
|
25
|
+
date: 2,
|
|
26
|
+
time: 3,
|
|
27
|
+
location: 4,
|
|
28
|
+
"location-vote": 5,
|
|
29
|
+
"exclude-menu": 6,
|
|
30
|
+
menu: 7,
|
|
31
|
+
restaurant: 8,
|
|
32
|
+
finish: 9
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
AnnouncementStageMap,
|
|
36
|
+
InvitationStageMap,
|
|
37
|
+
PlanStatus,
|
|
38
|
+
PlanType
|
|
39
|
+
};
|