@kimdaegyu/babmukdang-shared 2.0.5 → 2.0.6
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/{chunk-3TY6OPD3.js → chunk-5FPYU6NF.js} +2 -2
- package/dist/{chunk-ITXM3XFJ.js → chunk-C7JONACW.js} +4 -4
- package/dist/{chunk-WYBFBLQC.js → chunk-KWJE3RYS.js} +1 -1
- package/dist/{chunk-GOOH2LGN.js → chunk-LXRTJPS5.js} +19 -5
- package/dist/{chunk-S2Q64AFI.js → chunk-OLQ2HIKV.js} +11 -17
- package/dist/{chunk-7FNZBMB2.js → chunk-TWX7TUMW.js} +118 -145
- package/dist/domain/common/index.cjs +17 -5
- package/dist/domain/common/index.js +5 -5
- package/dist/domain/index.cjs +275 -290
- package/dist/domain/index.d.cts +7 -9
- package/dist/domain/index.d.ts +7 -9
- package/dist/domain/index.js +12 -18
- package/dist/domain/live-activity/index.cjs +17 -5
- package/dist/domain/live-activity/index.js +4 -4
- package/dist/domain/meal-plan/index.cjs +140 -155
- package/dist/domain/meal-plan/index.d.cts +132 -112
- package/dist/domain/meal-plan/index.d.ts +132 -112
- package/dist/domain/meal-plan/index.js +8 -14
- package/dist/domain/push/index.cjs +17 -5
- package/dist/domain/push/index.js +2 -2
- package/dist/index.cjs +272 -284
- package/dist/index.js +6 -6
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PushPlatformSchema
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KWJE3RYS.js";
|
|
4
4
|
import {
|
|
5
5
|
MealPlanLiveActivityBehaviorSchema,
|
|
6
6
|
MealPlanNotificationKindSchema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LXRTJPS5.js";
|
|
8
8
|
import {
|
|
9
9
|
ISODateTimeStringSchema
|
|
10
10
|
} from "./chunk-HRM3FQPL.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
MealPlanLiveActivitySessionListResponseSchema,
|
|
39
39
|
MealPlanLiveActivitySessionResponseSchema,
|
|
40
40
|
RegisterMealPlanLiveActivitySessionRequestSchema
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-5FPYU6NF.js";
|
|
42
42
|
import {
|
|
43
43
|
AddMealGroupMemberRequestSchema,
|
|
44
44
|
CreateMealGroupRequestSchema,
|
|
@@ -57,12 +57,12 @@ import {
|
|
|
57
57
|
MealPlanSharePreviewResponseSchema,
|
|
58
58
|
StartMealPlanFromGroupRequestSchema,
|
|
59
59
|
UpdateMealGroupMemberRoleRequestSchema
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-TWX7TUMW.js";
|
|
61
61
|
import {
|
|
62
62
|
PushTokenResponseSchema,
|
|
63
63
|
RegisterPushTokenRequestSchema,
|
|
64
64
|
RevokePushTokenRequestSchema
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-KWJE3RYS.js";
|
|
66
66
|
import {
|
|
67
67
|
CompleteMealPlanDecisionStageRequestSchema,
|
|
68
68
|
ConfirmMealPlanDecisionSnapshotRequestSchema,
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
ReopenMealPlanDecisionTaskRequestSchema,
|
|
87
87
|
SendMealPlanInviteResponseSchema,
|
|
88
88
|
UpdateMealPlanContextRequestSchema
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-LXRTJPS5.js";
|
|
90
90
|
import {
|
|
91
91
|
CreateProfileRequestSchema,
|
|
92
92
|
MemberFoodPreferenceSchema,
|
|
@@ -36,9 +36,7 @@ var MealPlanDecisionStageIdSchema = z.string().uuid().brand();
|
|
|
36
36
|
var MealPlanVoteIdSchema = z.string().uuid().brand();
|
|
37
37
|
var MealPlanLocationCandidateSourceSchema = z.enum([
|
|
38
38
|
"manual",
|
|
39
|
-
"map-marker",
|
|
40
39
|
"midpoint",
|
|
41
|
-
"user-location",
|
|
42
40
|
"search",
|
|
43
41
|
"recent-place",
|
|
44
42
|
"fallback"
|
|
@@ -65,8 +63,8 @@ var MealPlanMenuCandidateSchema = z.object({
|
|
|
65
63
|
menu: FoodSchema,
|
|
66
64
|
source: MealPlanMenuCandidateSourceSchema,
|
|
67
65
|
score: z.number().default(0),
|
|
68
|
-
imageUrl: z.string().min(1).nullable().
|
|
69
|
-
image: FoodCodeManifestImageSchema.nullable().
|
|
66
|
+
imageUrl: z.string().min(1).nullable().optional(),
|
|
67
|
+
image: FoodCodeManifestImageSchema.nullable().optional(),
|
|
70
68
|
createdAt: ISODateTimeStringSchema
|
|
71
69
|
});
|
|
72
70
|
var MealPlanRestaurantCandidateSchema = RestaurantSchema.extend({
|
|
@@ -103,8 +101,15 @@ var MealPlanRestaurantSearchStateSchema = z.object({
|
|
|
103
101
|
candidateCount: z.number().int().min(0),
|
|
104
102
|
errorMessage: z.string().nullable().default(null)
|
|
105
103
|
});
|
|
104
|
+
var MealPlanMenuRecommendationStateSchema = z.object({
|
|
105
|
+
preferenceKey: z.string().min(1),
|
|
106
|
+
generatedFromHash: z.string().min(1),
|
|
107
|
+
generatedAt: ISODateTimeStringSchema,
|
|
108
|
+
candidateCount: z.number().int().min(0)
|
|
109
|
+
});
|
|
106
110
|
var MealPlanDecisionStageMetadataSchema = z.object({
|
|
107
|
-
restaurantSearch: MealPlanRestaurantSearchStateSchema.optional()
|
|
111
|
+
restaurantSearch: MealPlanRestaurantSearchStateSchema.optional(),
|
|
112
|
+
menuRecommendation: MealPlanMenuRecommendationStateSchema.optional()
|
|
108
113
|
}).catchall(z.unknown());
|
|
109
114
|
var MealPlanVoteTypeSchema = z.enum([
|
|
110
115
|
"PICK",
|
|
@@ -180,6 +185,7 @@ var MealPlanDecisionTaskKeySchema = z.enum([
|
|
|
180
185
|
var MealPlanDecisionTaskStatusSchema = z.enum([
|
|
181
186
|
"LOCKED",
|
|
182
187
|
"OPEN",
|
|
188
|
+
"READY",
|
|
183
189
|
"RESOLVED",
|
|
184
190
|
"STALE"
|
|
185
191
|
]);
|
|
@@ -203,6 +209,7 @@ var MealPlanDecisionReasonSchema = z.enum([
|
|
|
203
209
|
"TOP_PICKED_MENU",
|
|
204
210
|
"TOP_PICKED_RESTAURANT",
|
|
205
211
|
"OWNER_CONFIRMED",
|
|
212
|
+
"TASK_ALL_READY",
|
|
206
213
|
"MANUAL_SELECTION"
|
|
207
214
|
]);
|
|
208
215
|
var MealPlanDecisionActorTypeSchema = z.enum(["MEMBER", "GUEST", "SYSTEM"]);
|
|
@@ -228,6 +235,8 @@ var MealPlanDecisionSnapshotSchema = z.object({
|
|
|
228
235
|
var MealPlanDecisionTaskProgressSchema = z.object({
|
|
229
236
|
taskKey: MealPlanDecisionTaskKeySchema,
|
|
230
237
|
status: MealPlanDecisionTaskStatusSchema,
|
|
238
|
+
readyCount: z.number().int().min(0),
|
|
239
|
+
participantCount: z.number().int().min(0),
|
|
231
240
|
blockers: z.array(z.string()).default([]),
|
|
232
241
|
updatedAt: ISODateTimeStringSchema
|
|
233
242
|
});
|
|
@@ -241,6 +250,9 @@ var MealPlanDecisionProgressSchema = z.object({
|
|
|
241
250
|
version: z.number().int().min(0),
|
|
242
251
|
updatedAt: ISODateTimeStringSchema
|
|
243
252
|
});
|
|
253
|
+
var MealPlanDecisionTaskReadyRequestSchema = z.object({
|
|
254
|
+
isReady: z.boolean()
|
|
255
|
+
});
|
|
244
256
|
var ReopenMealPlanDecisionTaskRequestSchema = z.object({
|
|
245
257
|
reason: z.string().max(500).optional()
|
|
246
258
|
});
|
|
@@ -753,6 +765,7 @@ export {
|
|
|
753
765
|
MealPlanDecisionStageStatusSchema,
|
|
754
766
|
MealPlanRestaurantSearchStatusSchema,
|
|
755
767
|
MealPlanRestaurantSearchStateSchema,
|
|
768
|
+
MealPlanMenuRecommendationStateSchema,
|
|
756
769
|
MealPlanDecisionStageMetadataSchema,
|
|
757
770
|
MealPlanVoteTypeSchema,
|
|
758
771
|
MealPlanDecisionCandidateSchema,
|
|
@@ -772,6 +785,7 @@ export {
|
|
|
772
785
|
MealPlanDecisionSnapshotSchema,
|
|
773
786
|
MealPlanDecisionTaskProgressSchema,
|
|
774
787
|
MealPlanDecisionProgressSchema,
|
|
788
|
+
MealPlanDecisionTaskReadyRequestSchema,
|
|
775
789
|
ReopenMealPlanDecisionTaskRequestSchema,
|
|
776
790
|
ConfirmMealPlanDecisionSnapshotRequestSchema,
|
|
777
791
|
MealPlanParticipantIdSchema,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
toReferralCode,
|
|
35
35
|
toRestaurantId,
|
|
36
36
|
toSubscriptionId
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-C7JONACW.js";
|
|
38
38
|
import {
|
|
39
39
|
FriendMealItemResponseSchema,
|
|
40
40
|
FriendMealQuerySchema,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
MealPlanLiveActivityStateSchema,
|
|
104
104
|
MealPlanLiveActivityUpdateStatusSchema,
|
|
105
105
|
RegisterMealPlanLiveActivitySessionRequestSchema
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-5FPYU6NF.js";
|
|
107
107
|
import {
|
|
108
108
|
AddMealGroupMemberRequestSchema,
|
|
109
109
|
CreateMealGroupRequestSchema,
|
|
@@ -128,12 +128,6 @@ import {
|
|
|
128
128
|
MealMapResponseSchema,
|
|
129
129
|
MealMapRestaurantCandidateCompletionBlockedReasonSchema,
|
|
130
130
|
MealMapRestaurantCandidateMetadataSchema,
|
|
131
|
-
MealPlanDecisionVoteSocketAckSchema,
|
|
132
|
-
MealPlanDecisionVoteSocketErrorSchema,
|
|
133
|
-
MealPlanDecisionVoteSocketEvent,
|
|
134
|
-
MealPlanDecisionVoteSocketFailureAckSchema,
|
|
135
|
-
MealPlanDecisionVoteSocketPayloadSchema,
|
|
136
|
-
MealPlanDecisionVoteSocketSuccessAckSchema,
|
|
137
131
|
MealPlanGuestSessionQuerySchema,
|
|
138
132
|
MealPlanGuestSessionResponseSchema,
|
|
139
133
|
MealPlanShareLinkSummarySchema,
|
|
@@ -145,8 +139,9 @@ import {
|
|
|
145
139
|
getMealPlanLiveActivityBehavior,
|
|
146
140
|
getMealPlanNotificationPriority,
|
|
147
141
|
getMealPlanNotificationPriorityPolicy,
|
|
142
|
+
getMealPlanRestaurantProvisionCacheKey,
|
|
148
143
|
shouldShowForegroundToast
|
|
149
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-TWX7TUMW.js";
|
|
150
145
|
import {
|
|
151
146
|
MealPlanPushPayloadDataSchema,
|
|
152
147
|
PushDeliveryAttemptResultSchema,
|
|
@@ -161,7 +156,7 @@ import {
|
|
|
161
156
|
PushTokenStatusSchema,
|
|
162
157
|
RegisterPushTokenRequestSchema,
|
|
163
158
|
RevokePushTokenRequestSchema
|
|
164
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-KWJE3RYS.js";
|
|
165
160
|
import {
|
|
166
161
|
CompleteMealPlanDecisionStageRequestSchema,
|
|
167
162
|
ConfirmMealPlanDecisionSnapshotRequestSchema,
|
|
@@ -197,6 +192,7 @@ import {
|
|
|
197
192
|
MealPlanDecisionStageTypeSchema,
|
|
198
193
|
MealPlanDecisionTaskKeySchema,
|
|
199
194
|
MealPlanDecisionTaskProgressSchema,
|
|
195
|
+
MealPlanDecisionTaskReadyRequestSchema,
|
|
200
196
|
MealPlanDecisionTaskStatusSchema,
|
|
201
197
|
MealPlanGuestParticipantSchema,
|
|
202
198
|
MealPlanInviteListResponseSchema,
|
|
@@ -214,6 +210,7 @@ import {
|
|
|
214
210
|
MealPlanMenuCandidateIdSchema,
|
|
215
211
|
MealPlanMenuCandidateSchema,
|
|
216
212
|
MealPlanMenuCandidateSourceSchema,
|
|
213
|
+
MealPlanMenuRecommendationStateSchema,
|
|
217
214
|
MealPlanNearbyFriendExposureBatchSummarySchema,
|
|
218
215
|
MealPlanNearbyFriendExposureIdSchema,
|
|
219
216
|
MealPlanNearbyFriendExposureNotificationStatusSchema,
|
|
@@ -251,7 +248,7 @@ import {
|
|
|
251
248
|
SendMealPlanChatMessageRequestSchema,
|
|
252
249
|
SendMealPlanInviteResponseSchema,
|
|
253
250
|
UpdateMealPlanContextRequestSchema
|
|
254
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-LXRTJPS5.js";
|
|
255
252
|
import {
|
|
256
253
|
KakaoPlaceRawSchema,
|
|
257
254
|
RestaurantSchema
|
|
@@ -467,13 +464,8 @@ __export(domain_exports, {
|
|
|
467
464
|
MealPlanDecisionStageTypeSchema: () => MealPlanDecisionStageTypeSchema,
|
|
468
465
|
MealPlanDecisionTaskKeySchema: () => MealPlanDecisionTaskKeySchema,
|
|
469
466
|
MealPlanDecisionTaskProgressSchema: () => MealPlanDecisionTaskProgressSchema,
|
|
467
|
+
MealPlanDecisionTaskReadyRequestSchema: () => MealPlanDecisionTaskReadyRequestSchema,
|
|
470
468
|
MealPlanDecisionTaskStatusSchema: () => MealPlanDecisionTaskStatusSchema,
|
|
471
|
-
MealPlanDecisionVoteSocketAckSchema: () => MealPlanDecisionVoteSocketAckSchema,
|
|
472
|
-
MealPlanDecisionVoteSocketErrorSchema: () => MealPlanDecisionVoteSocketErrorSchema,
|
|
473
|
-
MealPlanDecisionVoteSocketEvent: () => MealPlanDecisionVoteSocketEvent,
|
|
474
|
-
MealPlanDecisionVoteSocketFailureAckSchema: () => MealPlanDecisionVoteSocketFailureAckSchema,
|
|
475
|
-
MealPlanDecisionVoteSocketPayloadSchema: () => MealPlanDecisionVoteSocketPayloadSchema,
|
|
476
|
-
MealPlanDecisionVoteSocketSuccessAckSchema: () => MealPlanDecisionVoteSocketSuccessAckSchema,
|
|
477
469
|
MealPlanGuestParticipantSchema: () => MealPlanGuestParticipantSchema,
|
|
478
470
|
MealPlanGuestSessionQuerySchema: () => MealPlanGuestSessionQuerySchema,
|
|
479
471
|
MealPlanGuestSessionResponseSchema: () => MealPlanGuestSessionResponseSchema,
|
|
@@ -501,6 +493,7 @@ __export(domain_exports, {
|
|
|
501
493
|
MealPlanMenuCandidateIdSchema: () => MealPlanMenuCandidateIdSchema,
|
|
502
494
|
MealPlanMenuCandidateSchema: () => MealPlanMenuCandidateSchema,
|
|
503
495
|
MealPlanMenuCandidateSourceSchema: () => MealPlanMenuCandidateSourceSchema,
|
|
496
|
+
MealPlanMenuRecommendationStateSchema: () => MealPlanMenuRecommendationStateSchema,
|
|
504
497
|
MealPlanNearbyFriendExposureBatchIdSchema: () => MealPlanNearbyFriendExposureBatchIdSchema,
|
|
505
498
|
MealPlanNearbyFriendExposureBatchSummarySchema: () => MealPlanNearbyFriendExposureBatchSummarySchema,
|
|
506
499
|
MealPlanNearbyFriendExposureIdSchema: () => MealPlanNearbyFriendExposureIdSchema,
|
|
@@ -618,6 +611,7 @@ __export(domain_exports, {
|
|
|
618
611
|
getMealPlanLiveActivityBehavior: () => getMealPlanLiveActivityBehavior,
|
|
619
612
|
getMealPlanNotificationPriority: () => getMealPlanNotificationPriority,
|
|
620
613
|
getMealPlanNotificationPriorityPolicy: () => getMealPlanNotificationPriorityPolicy,
|
|
614
|
+
getMealPlanRestaurantProvisionCacheKey: () => getMealPlanRestaurantProvisionCacheKey,
|
|
621
615
|
makeApiResponseSchema: () => makeApiResponseSchema,
|
|
622
616
|
makeApiSuccessSchema: () => makeApiSuccessSchema,
|
|
623
617
|
shouldShowForegroundToast: () => shouldShowForegroundToast,
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
CreateMealPlanVoteRequestSchema,
|
|
3
2
|
MEAL_PLAN_NOTIFICATION_PRIORITY_POLICIES,
|
|
4
3
|
MealPlanDecisionStageIdSchema,
|
|
5
4
|
MealPlanJoinRequestSummarySchema,
|
|
6
5
|
MealPlanNotificationSchema,
|
|
7
6
|
MealPlanResponseSchema,
|
|
8
7
|
MyMealPlanListItemSchema
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LXRTJPS5.js";
|
|
10
9
|
import {
|
|
11
10
|
RestaurantSchema
|
|
12
11
|
} from "./chunk-7JYVBXKQ.js";
|
|
@@ -34,252 +33,231 @@ function getMealPlanDecisionCandidateKey(candidate) {
|
|
|
34
33
|
case "AREA":
|
|
35
34
|
return `AREA:${candidate.value.locationId}`;
|
|
36
35
|
case "MENU":
|
|
37
|
-
return `MENU:${candidate.value.
|
|
36
|
+
return `MENU:${candidate.value.menu.code}`;
|
|
38
37
|
case "RESTAURANT":
|
|
39
38
|
return `RESTAURANT:${candidate.value.candidateId ?? candidate.value.restaurantId}`;
|
|
40
39
|
case "FINAL_CONFIRMATION":
|
|
41
40
|
return "FINAL_CONFIRMATION:READY";
|
|
42
41
|
}
|
|
42
|
+
return `UNKNOWN:${JSON.stringify(candidate)}`;
|
|
43
|
+
}
|
|
44
|
+
function getMealPlanRestaurantProvisionCacheKey(area, menu) {
|
|
45
|
+
return `restaurant-search:${getMealPlanDecisionCandidateKey(area)}:${getMealPlanDecisionCandidateKey(menu)}`;
|
|
43
46
|
}
|
|
44
|
-
|
|
45
|
-
// src/domain/meal-plan/meal-plan.socket.ts
|
|
46
|
-
import { z } from "zod";
|
|
47
|
-
var MealPlanDecisionVoteSocketEvent = "mealPlan:decision:vote";
|
|
48
|
-
var MealPlanDecisionVoteSocketPayloadSchema = CreateMealPlanVoteRequestSchema.extend({
|
|
49
|
-
mealPlanId: MealPlanIdSchema,
|
|
50
|
-
stageId: MealPlanDecisionStageIdSchema,
|
|
51
|
-
guestSessionToken: z.string().min(1).optional()
|
|
52
|
-
});
|
|
53
|
-
var MealPlanDecisionVoteSocketErrorSchema = z.object({
|
|
54
|
-
code: z.string().min(1),
|
|
55
|
-
message: z.string().min(1)
|
|
56
|
-
});
|
|
57
|
-
var MealPlanDecisionVoteSocketSuccessAckSchema = z.object({
|
|
58
|
-
ok: z.literal(true),
|
|
59
|
-
mealPlan: MealPlanResponseSchema
|
|
60
|
-
});
|
|
61
|
-
var MealPlanDecisionVoteSocketFailureAckSchema = z.object({
|
|
62
|
-
ok: z.literal(false),
|
|
63
|
-
error: MealPlanDecisionVoteSocketErrorSchema
|
|
64
|
-
});
|
|
65
|
-
var MealPlanDecisionVoteSocketAckSchema = z.discriminatedUnion("ok", [
|
|
66
|
-
MealPlanDecisionVoteSocketSuccessAckSchema,
|
|
67
|
-
MealPlanDecisionVoteSocketFailureAckSchema
|
|
68
|
-
]);
|
|
69
47
|
|
|
70
48
|
// src/domain/meal-plan/meal-plan-share-link.schema.ts
|
|
71
|
-
import { z
|
|
72
|
-
var CreateMealPlanShareLinkRequestSchema =
|
|
49
|
+
import { z } from "zod";
|
|
50
|
+
var CreateMealPlanShareLinkRequestSchema = z.object({
|
|
73
51
|
expiresAt: ISODateTimeStringSchema.optional(),
|
|
74
|
-
guestJoinEnabled:
|
|
52
|
+
guestJoinEnabled: z.boolean().default(true)
|
|
75
53
|
});
|
|
76
|
-
var MealPlanShareLinkSummarySchema =
|
|
54
|
+
var MealPlanShareLinkSummarySchema = z.object({
|
|
77
55
|
shareLinkId: MealPlanShareLinkIdSchema,
|
|
78
56
|
mealPlanId: MealPlanIdSchema,
|
|
79
57
|
token: MealPlanShareLinkTokenSchema,
|
|
80
|
-
url:
|
|
58
|
+
url: z.string().url(),
|
|
81
59
|
expiresAt: ISODateTimeStringSchema,
|
|
82
|
-
guestJoinEnabled:
|
|
60
|
+
guestJoinEnabled: z.boolean(),
|
|
83
61
|
createdAt: ISODateTimeStringSchema
|
|
84
62
|
});
|
|
85
|
-
var MealPlanSharePreviewResponseSchema =
|
|
63
|
+
var MealPlanSharePreviewResponseSchema = z.object({
|
|
86
64
|
mealPlanId: MealPlanIdSchema,
|
|
87
65
|
token: MealPlanShareLinkTokenSchema,
|
|
88
|
-
title:
|
|
89
|
-
ownerName:
|
|
90
|
-
participantCount:
|
|
66
|
+
title: z.string(),
|
|
67
|
+
ownerName: z.string(),
|
|
68
|
+
participantCount: z.number().int().min(1),
|
|
91
69
|
expiresAt: ISODateTimeStringSchema,
|
|
92
|
-
guestJoinEnabled:
|
|
70
|
+
guestJoinEnabled: z.boolean()
|
|
93
71
|
});
|
|
94
|
-
var JoinMealPlanGuestRequestSchema =
|
|
95
|
-
nickname:
|
|
96
|
-
password:
|
|
72
|
+
var JoinMealPlanGuestRequestSchema = z.object({
|
|
73
|
+
nickname: z.string().min(1).max(50),
|
|
74
|
+
password: z.string().min(1).max(100).optional()
|
|
97
75
|
});
|
|
98
|
-
var JoinMealPlanGuestResponseSchema =
|
|
76
|
+
var JoinMealPlanGuestResponseSchema = z.object({
|
|
99
77
|
mealPlanId: MealPlanIdSchema,
|
|
100
|
-
guestId:
|
|
101
|
-
sessionToken:
|
|
78
|
+
guestId: z.string().min(1),
|
|
79
|
+
sessionToken: z.string().min(1)
|
|
102
80
|
});
|
|
103
|
-
var MealPlanGuestSessionQuerySchema =
|
|
104
|
-
sessionToken:
|
|
81
|
+
var MealPlanGuestSessionQuerySchema = z.object({
|
|
82
|
+
sessionToken: z.string().min(1)
|
|
105
83
|
});
|
|
106
|
-
var MealPlanGuestSessionResponseSchema =
|
|
84
|
+
var MealPlanGuestSessionResponseSchema = z.object({
|
|
107
85
|
mealPlan: MealPlanResponseSchema,
|
|
108
86
|
token: MealPlanShareLinkTokenSchema,
|
|
109
|
-
guestId:
|
|
110
|
-
nickname:
|
|
111
|
-
sessionToken:
|
|
87
|
+
guestId: z.string().min(1),
|
|
88
|
+
nickname: z.string().min(1).max(50),
|
|
89
|
+
sessionToken: z.string().min(1)
|
|
112
90
|
});
|
|
113
91
|
|
|
114
92
|
// src/domain/meal-plan/meal-group.schema.ts
|
|
115
|
-
import { z as
|
|
116
|
-
var MealGroupMemberRoleSchema =
|
|
93
|
+
import { z as z2 } from "zod";
|
|
94
|
+
var MealGroupMemberRoleSchema = z2.enum([
|
|
117
95
|
"OWNER",
|
|
118
96
|
"MEMBER"
|
|
119
97
|
]);
|
|
120
|
-
var MealGroupMemberSchema =
|
|
98
|
+
var MealGroupMemberSchema = z2.object({
|
|
121
99
|
member: MemberCoreSchema,
|
|
122
100
|
role: MealGroupMemberRoleSchema,
|
|
123
101
|
joinedAt: ISODateTimeStringSchema
|
|
124
102
|
});
|
|
125
|
-
var MealGroupResponseSchema =
|
|
103
|
+
var MealGroupResponseSchema = z2.object({
|
|
126
104
|
mealGroupId: MealGroupIdSchema,
|
|
127
|
-
name:
|
|
105
|
+
name: z2.string().min(1).max(50),
|
|
128
106
|
owner: MemberCoreSchema,
|
|
129
|
-
profileImageUrl:
|
|
130
|
-
members:
|
|
131
|
-
recentMealPlanIds:
|
|
107
|
+
profileImageUrl: z2.string().url().nullable(),
|
|
108
|
+
members: z2.array(MealGroupMemberSchema),
|
|
109
|
+
recentMealPlanIds: z2.array(MealPlanIdSchema),
|
|
132
110
|
createdAt: ISODateTimeStringSchema,
|
|
133
111
|
updatedAt: ISODateTimeStringSchema
|
|
134
112
|
});
|
|
135
|
-
var CreateMealGroupRequestSchema =
|
|
136
|
-
name:
|
|
137
|
-
memberIds:
|
|
138
|
-
profileImageUrl:
|
|
113
|
+
var CreateMealGroupRequestSchema = z2.object({
|
|
114
|
+
name: z2.string().min(1).max(50),
|
|
115
|
+
memberIds: z2.array(z2.number().int().positive()).min(1),
|
|
116
|
+
profileImageUrl: z2.string().url().nullable().optional(),
|
|
139
117
|
sourceMealPlanId: MealPlanIdSchema.optional()
|
|
140
118
|
});
|
|
141
|
-
var StartMealPlanFromGroupRequestSchema =
|
|
142
|
-
title:
|
|
119
|
+
var StartMealPlanFromGroupRequestSchema = z2.object({
|
|
120
|
+
title: z2.string().min(1).max(100).optional()
|
|
143
121
|
});
|
|
144
|
-
var AddMealGroupMemberRequestSchema =
|
|
145
|
-
memberId:
|
|
122
|
+
var AddMealGroupMemberRequestSchema = z2.object({
|
|
123
|
+
memberId: z2.number().int().positive(),
|
|
146
124
|
role: MealGroupMemberRoleSchema.default("MEMBER")
|
|
147
125
|
});
|
|
148
|
-
var UpdateMealGroupMemberRoleRequestSchema =
|
|
126
|
+
var UpdateMealGroupMemberRoleRequestSchema = z2.object({
|
|
149
127
|
role: MealGroupMemberRoleSchema
|
|
150
128
|
});
|
|
151
129
|
var MealGroupHistoryItemSchema = MyMealPlanListItemSchema.extend({});
|
|
152
|
-
var MealGroupPreferenceSummarySchema =
|
|
130
|
+
var MealGroupPreferenceSummarySchema = z2.object({
|
|
153
131
|
mealGroupId: MealGroupIdSchema,
|
|
154
|
-
frequentMenuCategories:
|
|
155
|
-
frequentRestaurants:
|
|
156
|
-
recentMenuCategories:
|
|
157
|
-
recommendationContext:
|
|
158
|
-
preferredMenuCategories:
|
|
159
|
-
excludedMenuCategories:
|
|
160
|
-
candidateMenuCategories:
|
|
132
|
+
frequentMenuCategories: z2.array(z2.object({ label: z2.string(), count: z2.number().int().min(0) })),
|
|
133
|
+
frequentRestaurants: z2.array(z2.object({ restaurantName: z2.string(), count: z2.number().int().min(0) })),
|
|
134
|
+
recentMenuCategories: z2.array(z2.string()),
|
|
135
|
+
recommendationContext: z2.object({
|
|
136
|
+
preferredMenuCategories: z2.array(z2.string()),
|
|
137
|
+
excludedMenuCategories: z2.array(z2.string()),
|
|
138
|
+
candidateMenuCategories: z2.array(z2.string())
|
|
161
139
|
})
|
|
162
140
|
});
|
|
163
|
-
var MealGroupHistoryResponseSchema =
|
|
141
|
+
var MealGroupHistoryResponseSchema = z2.array(MealGroupHistoryItemSchema);
|
|
164
142
|
|
|
165
143
|
// src/domain/meal-plan/meal-plan-home-map.schema.ts
|
|
166
|
-
import { z as
|
|
167
|
-
var HomeMealPlanActionKindSchema =
|
|
144
|
+
import { z as z3 } from "zod";
|
|
145
|
+
var HomeMealPlanActionKindSchema = z3.enum([
|
|
168
146
|
"CONTINUE_DECISION",
|
|
169
147
|
"TODAY_UPCOMING",
|
|
170
148
|
"RECORD_NEEDED",
|
|
171
149
|
"RESPOND_JOIN_REQUEST",
|
|
172
150
|
"NOTIFICATION_FOLLOW_UP"
|
|
173
151
|
]);
|
|
174
|
-
var HomeMealPlanActionCardSchema =
|
|
175
|
-
actionId:
|
|
152
|
+
var HomeMealPlanActionCardSchema = z3.object({
|
|
153
|
+
actionId: z3.string().min(1),
|
|
176
154
|
kind: HomeMealPlanActionKindSchema,
|
|
177
|
-
priority:
|
|
178
|
-
title:
|
|
179
|
-
description:
|
|
180
|
-
primaryAction:
|
|
181
|
-
label:
|
|
182
|
-
href:
|
|
155
|
+
priority: z3.number().int().min(0),
|
|
156
|
+
title: z3.string().min(1),
|
|
157
|
+
description: z3.string().min(1),
|
|
158
|
+
primaryAction: z3.object({
|
|
159
|
+
label: z3.string().min(1),
|
|
160
|
+
href: z3.string().min(1)
|
|
183
161
|
}),
|
|
184
162
|
mealPlan: MyMealPlanListItemSchema.nullable(),
|
|
185
163
|
joinRequest: MealPlanJoinRequestSummarySchema.nullable(),
|
|
186
164
|
notification: MealPlanNotificationSchema.nullable().default(null)
|
|
187
165
|
});
|
|
188
|
-
var HomeMealPlanDashboardResponseSchema =
|
|
166
|
+
var HomeMealPlanDashboardResponseSchema = z3.object({
|
|
189
167
|
generatedAt: ISODateTimeStringSchema,
|
|
190
|
-
inProgress:
|
|
191
|
-
today:
|
|
192
|
-
recordNeeded:
|
|
193
|
-
pendingJoinRequests:
|
|
194
|
-
unreadNotifications:
|
|
195
|
-
nextActions:
|
|
168
|
+
inProgress: z3.array(MyMealPlanListItemSchema),
|
|
169
|
+
today: z3.array(MyMealPlanListItemSchema),
|
|
170
|
+
recordNeeded: z3.array(MyMealPlanListItemSchema),
|
|
171
|
+
pendingJoinRequests: z3.array(MealPlanJoinRequestSummarySchema),
|
|
172
|
+
unreadNotifications: z3.array(MealPlanNotificationSchema).default([]),
|
|
173
|
+
nextActions: z3.array(HomeMealPlanActionCardSchema)
|
|
196
174
|
});
|
|
197
|
-
var MealMapLayerSchema =
|
|
175
|
+
var MealMapLayerSchema = z3.enum([
|
|
198
176
|
"MY_MEAL_PLAN_PLACE",
|
|
199
177
|
"NEARBY_FRIEND_MEAL_PLAN",
|
|
200
178
|
"FRIEND_RECORD_LOCATION",
|
|
201
179
|
"RESTAURANT_CANDIDATE"
|
|
202
180
|
]);
|
|
203
|
-
var MealMapMarkerBaseSchema =
|
|
204
|
-
markerId:
|
|
205
|
-
lat:
|
|
206
|
-
lng:
|
|
207
|
-
title:
|
|
208
|
-
subtitle:
|
|
209
|
-
href:
|
|
181
|
+
var MealMapMarkerBaseSchema = z3.object({
|
|
182
|
+
markerId: z3.string().min(1),
|
|
183
|
+
lat: z3.number().min(-90).max(90),
|
|
184
|
+
lng: z3.number().min(-180).max(180),
|
|
185
|
+
title: z3.string().min(1),
|
|
186
|
+
subtitle: z3.string().nullable(),
|
|
187
|
+
href: z3.string().min(1).nullable(),
|
|
210
188
|
mealPlanId: MealPlanIdSchema.nullable(),
|
|
211
189
|
articleId: ArticleIdSchema.nullable(),
|
|
212
190
|
restaurant: RestaurantSchema.nullable(),
|
|
213
|
-
distanceMeters:
|
|
191
|
+
distanceMeters: z3.number().int().min(0).nullable(),
|
|
214
192
|
updatedAt: ISODateTimeStringSchema
|
|
215
193
|
});
|
|
216
|
-
var MealMapMyMealPlanPlaceMetadataSchema =
|
|
194
|
+
var MealMapMyMealPlanPlaceMetadataSchema = z3.object({
|
|
217
195
|
ownerId: MemberIdSchema.nullable().default(null),
|
|
218
|
-
status:
|
|
219
|
-
participantCount:
|
|
220
|
-
source:
|
|
196
|
+
status: z3.string().min(1),
|
|
197
|
+
participantCount: z3.number().int().min(1),
|
|
198
|
+
source: z3.string().min(1)
|
|
221
199
|
});
|
|
222
|
-
var MealMapNearbyFriendMealPlanMetadataSchema =
|
|
200
|
+
var MealMapNearbyFriendMealPlanMetadataSchema = z3.object({
|
|
223
201
|
ownerId: MemberIdSchema.nullable().default(null),
|
|
224
|
-
ownerName:
|
|
225
|
-
participantCount:
|
|
202
|
+
ownerName: z3.string().min(1),
|
|
203
|
+
participantCount: z3.number().int().min(1),
|
|
226
204
|
expiresAt: ISODateTimeStringSchema.nullable(),
|
|
227
|
-
source:
|
|
205
|
+
source: z3.string().min(1)
|
|
228
206
|
});
|
|
229
|
-
var MealMapFriendRecordLocationMetadataSchema =
|
|
207
|
+
var MealMapFriendRecordLocationMetadataSchema = z3.object({
|
|
230
208
|
authorId: MemberIdSchema.nullable().default(null),
|
|
231
|
-
authorName:
|
|
232
|
-
imageUrl:
|
|
233
|
-
mealDate:
|
|
209
|
+
authorName: z3.string().min(1),
|
|
210
|
+
imageUrl: z3.string().nullable().default(null),
|
|
211
|
+
mealDate: z3.string().min(1)
|
|
234
212
|
});
|
|
235
|
-
var MealMapRestaurantCandidateCompletionBlockedReasonSchema =
|
|
213
|
+
var MealMapRestaurantCandidateCompletionBlockedReasonSchema = z3.enum([
|
|
236
214
|
"OWNER_ONLY",
|
|
237
215
|
"STAGE_ALREADY_COMPLETED",
|
|
238
216
|
"MEAL_PLAN_NOT_MUTABLE"
|
|
239
217
|
]);
|
|
240
|
-
var MealMapRestaurantCandidateMetadataSchema =
|
|
218
|
+
var MealMapRestaurantCandidateMetadataSchema = z3.object({
|
|
241
219
|
stageId: MealPlanDecisionStageIdSchema,
|
|
242
220
|
ownerId: MemberIdSchema.nullable().default(null),
|
|
243
|
-
status:
|
|
244
|
-
source:
|
|
245
|
-
stageStatus:
|
|
246
|
-
canVote:
|
|
247
|
-
canCompleteStage:
|
|
221
|
+
status: z3.string().min(1),
|
|
222
|
+
source: z3.enum(["search", "fallback", "manual"]).default("search"),
|
|
223
|
+
stageStatus: z3.enum(["OPEN", "COMPLETED", "REOPENED"]).default("OPEN"),
|
|
224
|
+
canVote: z3.boolean().default(false),
|
|
225
|
+
canCompleteStage: z3.boolean().default(false),
|
|
248
226
|
completionBlockedReason: MealMapRestaurantCandidateCompletionBlockedReasonSchema.nullable().default(null)
|
|
249
227
|
});
|
|
250
|
-
var MealMapMarkerSchema =
|
|
228
|
+
var MealMapMarkerSchema = z3.discriminatedUnion("layer", [
|
|
251
229
|
MealMapMarkerBaseSchema.extend({
|
|
252
|
-
layer:
|
|
230
|
+
layer: z3.literal("MY_MEAL_PLAN_PLACE"),
|
|
253
231
|
metadata: MealMapMyMealPlanPlaceMetadataSchema
|
|
254
232
|
}),
|
|
255
233
|
MealMapMarkerBaseSchema.extend({
|
|
256
|
-
layer:
|
|
234
|
+
layer: z3.literal("NEARBY_FRIEND_MEAL_PLAN"),
|
|
257
235
|
metadata: MealMapNearbyFriendMealPlanMetadataSchema
|
|
258
236
|
}),
|
|
259
237
|
MealMapMarkerBaseSchema.extend({
|
|
260
|
-
layer:
|
|
238
|
+
layer: z3.literal("FRIEND_RECORD_LOCATION"),
|
|
261
239
|
metadata: MealMapFriendRecordLocationMetadataSchema
|
|
262
240
|
}),
|
|
263
241
|
MealMapMarkerBaseSchema.extend({
|
|
264
|
-
layer:
|
|
242
|
+
layer: z3.literal("RESTAURANT_CANDIDATE"),
|
|
265
243
|
metadata: MealMapRestaurantCandidateMetadataSchema
|
|
266
244
|
})
|
|
267
245
|
]);
|
|
268
|
-
var MealMapQuerySchema =
|
|
269
|
-
friendRecordDays:
|
|
246
|
+
var MealMapQuerySchema = z3.object({
|
|
247
|
+
friendRecordDays: z3.coerce.number().int().min(1).max(90).optional().default(7)
|
|
270
248
|
});
|
|
271
|
-
var MealMapResponseSchema =
|
|
249
|
+
var MealMapResponseSchema = z3.object({
|
|
272
250
|
generatedAt: ISODateTimeStringSchema,
|
|
273
|
-
center:
|
|
274
|
-
lat:
|
|
275
|
-
lng:
|
|
276
|
-
source:
|
|
251
|
+
center: z3.object({
|
|
252
|
+
lat: z3.number().min(-90).max(90),
|
|
253
|
+
lng: z3.number().min(-180).max(180),
|
|
254
|
+
source: z3.enum(["LAST_KNOWN_LOCATION", "MY_MEAL_PLAN", "DEFAULT"])
|
|
277
255
|
}),
|
|
278
|
-
layers:
|
|
279
|
-
myMealPlanPlaces:
|
|
280
|
-
nearbyFriendMealPlans:
|
|
281
|
-
friendRecordLocations:
|
|
282
|
-
restaurantCandidates:
|
|
256
|
+
layers: z3.object({
|
|
257
|
+
myMealPlanPlaces: z3.array(MealMapMarkerSchema),
|
|
258
|
+
nearbyFriendMealPlans: z3.array(MealMapMarkerSchema),
|
|
259
|
+
friendRecordLocations: z3.array(MealMapMarkerSchema),
|
|
260
|
+
restaurantCandidates: z3.array(MealMapMarkerSchema)
|
|
283
261
|
})
|
|
284
262
|
});
|
|
285
263
|
|
|
@@ -321,12 +299,7 @@ function compareMealPlanNotificationsByPriority(channel) {
|
|
|
321
299
|
|
|
322
300
|
export {
|
|
323
301
|
getMealPlanDecisionCandidateKey,
|
|
324
|
-
|
|
325
|
-
MealPlanDecisionVoteSocketPayloadSchema,
|
|
326
|
-
MealPlanDecisionVoteSocketErrorSchema,
|
|
327
|
-
MealPlanDecisionVoteSocketSuccessAckSchema,
|
|
328
|
-
MealPlanDecisionVoteSocketFailureAckSchema,
|
|
329
|
-
MealPlanDecisionVoteSocketAckSchema,
|
|
302
|
+
getMealPlanRestaurantProvisionCacheKey,
|
|
330
303
|
CreateMealPlanShareLinkRequestSchema,
|
|
331
304
|
MealPlanShareLinkSummarySchema,
|
|
332
305
|
MealPlanSharePreviewResponseSchema,
|