@kimdaegyu/babmukdang-shared 2.0.3 → 2.0.4

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.
@@ -1,3 +1,8 @@
1
+ import {
2
+ AI_CLASS_TO_FOOD_CODE_MAP_PATH,
3
+ FOOD_CODE_MANIFEST_PATH,
4
+ FOOD_IMAGE_INDEX_PATH
5
+ } from "./chunk-BSJC7OVV.js";
1
6
  import {
2
7
  ApiFailureSchema,
3
8
  ApiResponseSchema,
@@ -34,15 +39,7 @@ import {
34
39
  toReferralCode,
35
40
  toRestaurantId,
36
41
  toSubscriptionId
37
- } from "./chunk-7UZD4LBQ.js";
38
- import {
39
- FriendMealItemResponseSchema,
40
- FriendMealQuerySchema,
41
- MealStatusActionSchema,
42
- MealStatusResponseSchema,
43
- MealStatusSchema,
44
- UpdateMealStatusRequestSchema
45
- } from "./chunk-6O2YTBVC.js";
42
+ } from "./chunk-IW342TDD.js";
46
43
  import {
47
44
  ChallengeStatusResponseSchema,
48
45
  ClaimChallengeRewardRequestSchema,
@@ -54,6 +51,39 @@ import {
54
51
  ReferralCreateResponseSchema,
55
52
  ReferralItemResponseSchema
56
53
  } from "./chunk-RZPNVRRS.js";
54
+ import {
55
+ EndMealPlanLiveActivitySessionRequestSchema,
56
+ MealPlanLiveActivityPlatformSchema,
57
+ MealPlanLiveActivitySessionListResponseSchema,
58
+ MealPlanLiveActivitySessionResponseSchema,
59
+ MealPlanLiveActivitySessionStatusSchema,
60
+ MealPlanLiveActivityStateSchema,
61
+ MealPlanLiveActivityUpdateStatusSchema,
62
+ RegisterMealPlanLiveActivitySessionRequestSchema
63
+ } from "./chunk-CUOJE3ER.js";
64
+ import {
65
+ MealPlanPushPayloadDataSchema,
66
+ PushDeliveryAttemptResultSchema,
67
+ PushDeliveryAttemptSummarySchema,
68
+ PushDeliveryOutboxSummarySchema,
69
+ PushDeliveryStatusSchema,
70
+ PushPayloadSchemaVersionSchema,
71
+ PushPermissionStatusSchema,
72
+ PushPlatformSchema,
73
+ PushProviderSchema,
74
+ PushTokenResponseSchema,
75
+ PushTokenStatusSchema,
76
+ RegisterPushTokenRequestSchema,
77
+ RevokePushTokenRequestSchema
78
+ } from "./chunk-HHU5TRDP.js";
79
+ import {
80
+ FriendMealItemResponseSchema,
81
+ FriendMealQuerySchema,
82
+ MealStatusActionSchema,
83
+ MealStatusResponseSchema,
84
+ MealStatusSchema,
85
+ UpdateMealStatusRequestSchema
86
+ } from "./chunk-EQLAVUHF.js";
57
87
  import {
58
88
  ArticleCommentSchema,
59
89
  ArticleCoreSchema,
@@ -72,18 +102,13 @@ import {
72
102
  SortDirectionSchema,
73
103
  UploadArticleImageRequestSchema,
74
104
  UploadArticleImageResponseSchema
75
- } from "./chunk-NENVUHL5.js";
105
+ } from "./chunk-IRAFNZDL.js";
76
106
  import {
77
107
  LoginRequestSchema,
78
108
  SignupRequestSchema,
79
109
  SignupResponseSchema,
80
110
  TokenResponseSchema
81
111
  } from "./chunk-QFPVAJ2U.js";
82
- import {
83
- AI_CLASS_TO_FOOD_CODE_MAP_PATH,
84
- FOOD_CODE_MANIFEST_PATH,
85
- FOOD_IMAGE_INDEX_PATH
86
- } from "./chunk-BSJC7OVV.js";
87
112
  import {
88
113
  FriendBlockItemResponseSchema,
89
114
  FriendListItemResponseSchema,
@@ -93,17 +118,7 @@ import {
93
118
  FriendRequestStatusSchema,
94
119
  FriendSearchQuerySchema,
95
120
  FriendSearchResponseSchema
96
- } from "./chunk-VD3VGLBQ.js";
97
- import {
98
- EndMealPlanLiveActivitySessionRequestSchema,
99
- MealPlanLiveActivityPlatformSchema,
100
- MealPlanLiveActivitySessionListResponseSchema,
101
- MealPlanLiveActivitySessionResponseSchema,
102
- MealPlanLiveActivitySessionStatusSchema,
103
- MealPlanLiveActivityStateSchema,
104
- MealPlanLiveActivityUpdateStatusSchema,
105
- RegisterMealPlanLiveActivitySessionRequestSchema
106
- } from "./chunk-3TY6OPD3.js";
121
+ } from "./chunk-Q6Y2NBB6.js";
107
122
  import {
108
123
  AddMealGroupMemberRequestSchema,
109
124
  CreateMealGroupRequestSchema,
@@ -128,6 +143,12 @@ import {
128
143
  MealMapResponseSchema,
129
144
  MealMapRestaurantCandidateCompletionBlockedReasonSchema,
130
145
  MealMapRestaurantCandidateMetadataSchema,
146
+ MealPlanDecisionVoteSocketAckSchema,
147
+ MealPlanDecisionVoteSocketErrorSchema,
148
+ MealPlanDecisionVoteSocketEvent,
149
+ MealPlanDecisionVoteSocketFailureAckSchema,
150
+ MealPlanDecisionVoteSocketPayloadSchema,
151
+ MealPlanDecisionVoteSocketSuccessAckSchema,
131
152
  MealPlanGuestSessionQuerySchema,
132
153
  MealPlanGuestSessionResponseSchema,
133
154
  MealPlanShareLinkSummarySchema,
@@ -139,22 +160,7 @@ import {
139
160
  getMealPlanNotificationPriority,
140
161
  getMealPlanNotificationPriorityPolicy,
141
162
  shouldShowForegroundToast
142
- } from "./chunk-LEH6UFL7.js";
143
- import {
144
- MealPlanPushPayloadDataSchema,
145
- PushDeliveryAttemptResultSchema,
146
- PushDeliveryAttemptSummarySchema,
147
- PushDeliveryOutboxSummarySchema,
148
- PushDeliveryStatusSchema,
149
- PushPayloadSchemaVersionSchema,
150
- PushPermissionStatusSchema,
151
- PushPlatformSchema,
152
- PushProviderSchema,
153
- PushTokenResponseSchema,
154
- PushTokenStatusSchema,
155
- RegisterPushTokenRequestSchema,
156
- RevokePushTokenRequestSchema
157
- } from "./chunk-WYBFBLQC.js";
163
+ } from "./chunk-FODWQLEY.js";
158
164
  import {
159
165
  CompleteMealPlanDecisionStageRequestSchema,
160
166
  ConfirmMealPlanDecisionSnapshotRequestSchema,
@@ -244,11 +250,7 @@ import {
244
250
  SendMealPlanChatMessageRequestSchema,
245
251
  SendMealPlanInviteResponseSchema,
246
252
  UpdateMealPlanContextRequestSchema
247
- } from "./chunk-GOOH2LGN.js";
248
- import {
249
- KakaoPlaceRawSchema,
250
- RestaurantSchema
251
- } from "./chunk-7JYVBXKQ.js";
253
+ } from "./chunk-QPTK7F7Y.js";
252
254
  import {
253
255
  AiClassFoodCodeMappingSchema,
254
256
  AiClassToFoodCodeMapManifestSchema,
@@ -267,6 +269,15 @@ import {
267
269
  FoodSearchResponseSchema,
268
270
  ResolvedFoodCodeSchema
269
271
  } from "./chunk-CGFW5LYV.js";
272
+ import {
273
+ KakaoPlaceRawSchema,
274
+ RestaurantSchema
275
+ } from "./chunk-7JYVBXKQ.js";
276
+ import {
277
+ ISODateStringSchema,
278
+ ISODateTimeStringSchema,
279
+ TimeHHmmStringSchema
280
+ } from "./chunk-HRM3FQPL.js";
270
281
  import {
271
282
  CompleteOnboardingRequestSchema,
272
283
  CreateProfileRequestSchema,
@@ -294,11 +305,6 @@ import {
294
305
  UploadProfileImageRequestSchema,
295
306
  UploadProfileImageResponseSchema
296
307
  } from "./chunk-C63TN7L3.js";
297
- import {
298
- ISODateStringSchema,
299
- ISODateTimeStringSchema,
300
- TimeHHmmStringSchema
301
- } from "./chunk-HRM3FQPL.js";
302
308
  import {
303
309
  ArticleIdSchema,
304
310
  CommentIdSchema,
@@ -461,6 +467,12 @@ __export(domain_exports, {
461
467
  MealPlanDecisionTaskKeySchema: () => MealPlanDecisionTaskKeySchema,
462
468
  MealPlanDecisionTaskProgressSchema: () => MealPlanDecisionTaskProgressSchema,
463
469
  MealPlanDecisionTaskStatusSchema: () => MealPlanDecisionTaskStatusSchema,
470
+ MealPlanDecisionVoteSocketAckSchema: () => MealPlanDecisionVoteSocketAckSchema,
471
+ MealPlanDecisionVoteSocketErrorSchema: () => MealPlanDecisionVoteSocketErrorSchema,
472
+ MealPlanDecisionVoteSocketEvent: () => MealPlanDecisionVoteSocketEvent,
473
+ MealPlanDecisionVoteSocketFailureAckSchema: () => MealPlanDecisionVoteSocketFailureAckSchema,
474
+ MealPlanDecisionVoteSocketPayloadSchema: () => MealPlanDecisionVoteSocketPayloadSchema,
475
+ MealPlanDecisionVoteSocketSuccessAckSchema: () => MealPlanDecisionVoteSocketSuccessAckSchema,
464
476
  MealPlanGuestParticipantSchema: () => MealPlanGuestParticipantSchema,
465
477
  MealPlanGuestSessionQuerySchema: () => MealPlanGuestSessionQuerySchema,
466
478
  MealPlanGuestSessionResponseSchema: () => MealPlanGuestSessionResponseSchema,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  PushPlatformSchema
3
- } from "./chunk-WYBFBLQC.js";
3
+ } from "./chunk-HHU5TRDP.js";
4
4
  import {
5
5
  MealPlanLiveActivityBehaviorSchema,
6
6
  MealPlanNotificationKindSchema
7
- } from "./chunk-GOOH2LGN.js";
7
+ } from "./chunk-QPTK7F7Y.js";
8
8
  import {
9
9
  ISODateTimeStringSchema
10
10
  } from "./chunk-HRM3FQPL.js";
@@ -0,0 +1,346 @@
1
+ import {
2
+ CreateMealPlanVoteRequestSchema,
3
+ MEAL_PLAN_NOTIFICATION_PRIORITY_POLICIES,
4
+ MealPlanDecisionStageIdSchema,
5
+ MealPlanJoinRequestSummarySchema,
6
+ MealPlanNotificationSchema,
7
+ MealPlanResponseSchema,
8
+ MyMealPlanListItemSchema
9
+ } from "./chunk-QPTK7F7Y.js";
10
+ import {
11
+ RestaurantSchema
12
+ } from "./chunk-7JYVBXKQ.js";
13
+ import {
14
+ ISODateTimeStringSchema
15
+ } from "./chunk-HRM3FQPL.js";
16
+ import {
17
+ MemberCoreSchema
18
+ } from "./chunk-C63TN7L3.js";
19
+ import {
20
+ ArticleIdSchema,
21
+ MealGroupIdSchema,
22
+ MealPlanIdSchema,
23
+ MealPlanShareLinkIdSchema,
24
+ MealPlanShareLinkTokenSchema,
25
+ MemberIdSchema
26
+ } from "./chunk-XMRYAG3V.js";
27
+
28
+ // src/domain/meal-plan/meal-plan.socket.ts
29
+ import { z } from "zod";
30
+ var MealPlanDecisionVoteSocketEvent = "mealPlan:decision:vote";
31
+ var MealPlanDecisionVoteSocketPayloadSchema = CreateMealPlanVoteRequestSchema.extend({
32
+ mealPlanId: MealPlanIdSchema,
33
+ stageId: MealPlanDecisionStageIdSchema,
34
+ guestSessionToken: z.string().min(1).optional()
35
+ });
36
+ var MealPlanDecisionVoteSocketErrorSchema = z.object({
37
+ code: z.string().min(1),
38
+ message: z.string().min(1)
39
+ });
40
+ var MealPlanDecisionVoteSocketSuccessAckSchema = z.object({
41
+ ok: z.literal(true),
42
+ mealPlan: MealPlanResponseSchema
43
+ });
44
+ var MealPlanDecisionVoteSocketFailureAckSchema = z.object({
45
+ ok: z.literal(false),
46
+ error: MealPlanDecisionVoteSocketErrorSchema
47
+ });
48
+ var MealPlanDecisionVoteSocketAckSchema = z.discriminatedUnion("ok", [
49
+ MealPlanDecisionVoteSocketSuccessAckSchema,
50
+ MealPlanDecisionVoteSocketFailureAckSchema
51
+ ]);
52
+
53
+ // src/domain/meal-plan/meal-plan-share-link.schema.ts
54
+ import { z as z2 } from "zod";
55
+ var CreateMealPlanShareLinkRequestSchema = z2.object({
56
+ expiresAt: ISODateTimeStringSchema.optional(),
57
+ guestJoinEnabled: z2.boolean().default(true)
58
+ });
59
+ var MealPlanShareLinkSummarySchema = z2.object({
60
+ shareLinkId: MealPlanShareLinkIdSchema,
61
+ mealPlanId: MealPlanIdSchema,
62
+ token: MealPlanShareLinkTokenSchema,
63
+ url: z2.string().url(),
64
+ expiresAt: ISODateTimeStringSchema,
65
+ guestJoinEnabled: z2.boolean(),
66
+ createdAt: ISODateTimeStringSchema
67
+ });
68
+ var MealPlanSharePreviewResponseSchema = z2.object({
69
+ mealPlanId: MealPlanIdSchema,
70
+ token: MealPlanShareLinkTokenSchema,
71
+ title: z2.string(),
72
+ ownerName: z2.string(),
73
+ participantCount: z2.number().int().min(1),
74
+ expiresAt: ISODateTimeStringSchema,
75
+ guestJoinEnabled: z2.boolean()
76
+ });
77
+ var JoinMealPlanGuestRequestSchema = z2.object({
78
+ nickname: z2.string().min(1).max(50),
79
+ password: z2.string().min(1).max(100).optional()
80
+ });
81
+ var JoinMealPlanGuestResponseSchema = z2.object({
82
+ mealPlanId: MealPlanIdSchema,
83
+ guestId: z2.string().min(1),
84
+ sessionToken: z2.string().min(1)
85
+ });
86
+ var MealPlanGuestSessionQuerySchema = z2.object({
87
+ sessionToken: z2.string().min(1)
88
+ });
89
+ var MealPlanGuestSessionResponseSchema = z2.object({
90
+ mealPlan: MealPlanResponseSchema,
91
+ token: MealPlanShareLinkTokenSchema,
92
+ guestId: z2.string().min(1),
93
+ nickname: z2.string().min(1).max(50),
94
+ sessionToken: z2.string().min(1)
95
+ });
96
+
97
+ // src/domain/meal-plan/meal-group.schema.ts
98
+ import { z as z3 } from "zod";
99
+ var MealGroupMemberRoleSchema = z3.enum([
100
+ "OWNER",
101
+ "MEMBER"
102
+ ]);
103
+ var MealGroupMemberSchema = z3.object({
104
+ member: MemberCoreSchema,
105
+ role: MealGroupMemberRoleSchema,
106
+ joinedAt: ISODateTimeStringSchema
107
+ });
108
+ var MealGroupResponseSchema = z3.object({
109
+ mealGroupId: MealGroupIdSchema,
110
+ name: z3.string().min(1).max(50),
111
+ owner: MemberCoreSchema,
112
+ profileImageUrl: z3.string().url().nullable(),
113
+ members: z3.array(MealGroupMemberSchema),
114
+ recentMealPlanIds: z3.array(MealPlanIdSchema),
115
+ createdAt: ISODateTimeStringSchema,
116
+ updatedAt: ISODateTimeStringSchema
117
+ });
118
+ var CreateMealGroupRequestSchema = z3.object({
119
+ name: z3.string().min(1).max(50),
120
+ memberIds: z3.array(z3.number().int().positive()).min(1),
121
+ profileImageUrl: z3.string().url().nullable().optional(),
122
+ sourceMealPlanId: MealPlanIdSchema.optional()
123
+ });
124
+ var StartMealPlanFromGroupRequestSchema = z3.object({
125
+ title: z3.string().min(1).max(100).optional()
126
+ });
127
+ var AddMealGroupMemberRequestSchema = z3.object({
128
+ memberId: z3.number().int().positive(),
129
+ role: MealGroupMemberRoleSchema.default("MEMBER")
130
+ });
131
+ var UpdateMealGroupMemberRoleRequestSchema = z3.object({
132
+ role: MealGroupMemberRoleSchema
133
+ });
134
+ var MealGroupHistoryItemSchema = MyMealPlanListItemSchema.extend({});
135
+ var MealGroupPreferenceSummarySchema = z3.object({
136
+ mealGroupId: MealGroupIdSchema,
137
+ frequentMenuCategories: z3.array(z3.object({ label: z3.string(), count: z3.number().int().min(0) })),
138
+ frequentRestaurants: z3.array(z3.object({ restaurantName: z3.string(), count: z3.number().int().min(0) })),
139
+ recentMenuCategories: z3.array(z3.string()),
140
+ recommendationContext: z3.object({
141
+ preferredMenuCategories: z3.array(z3.string()),
142
+ excludedMenuCategories: z3.array(z3.string()),
143
+ candidateMenuCategories: z3.array(z3.string())
144
+ })
145
+ });
146
+ var MealGroupHistoryResponseSchema = z3.array(MealGroupHistoryItemSchema);
147
+
148
+ // src/domain/meal-plan/meal-plan-home-map.schema.ts
149
+ import { z as z4 } from "zod";
150
+ var HomeMealPlanActionKindSchema = z4.enum([
151
+ "CONTINUE_DECISION",
152
+ "TODAY_UPCOMING",
153
+ "RECORD_NEEDED",
154
+ "RESPOND_JOIN_REQUEST",
155
+ "NOTIFICATION_FOLLOW_UP"
156
+ ]);
157
+ var HomeMealPlanActionCardSchema = z4.object({
158
+ actionId: z4.string().min(1),
159
+ kind: HomeMealPlanActionKindSchema,
160
+ priority: z4.number().int().min(0),
161
+ title: z4.string().min(1),
162
+ description: z4.string().min(1),
163
+ primaryAction: z4.object({
164
+ label: z4.string().min(1),
165
+ href: z4.string().min(1)
166
+ }),
167
+ mealPlan: MyMealPlanListItemSchema.nullable(),
168
+ joinRequest: MealPlanJoinRequestSummarySchema.nullable(),
169
+ notification: MealPlanNotificationSchema.nullable().default(null)
170
+ });
171
+ var HomeMealPlanDashboardResponseSchema = z4.object({
172
+ generatedAt: ISODateTimeStringSchema,
173
+ inProgress: z4.array(MyMealPlanListItemSchema),
174
+ today: z4.array(MyMealPlanListItemSchema),
175
+ recordNeeded: z4.array(MyMealPlanListItemSchema),
176
+ pendingJoinRequests: z4.array(MealPlanJoinRequestSummarySchema),
177
+ unreadNotifications: z4.array(MealPlanNotificationSchema).default([]),
178
+ nextActions: z4.array(HomeMealPlanActionCardSchema)
179
+ });
180
+ var MealMapLayerSchema = z4.enum([
181
+ "MY_MEAL_PLAN_PLACE",
182
+ "NEARBY_FRIEND_MEAL_PLAN",
183
+ "FRIEND_RECORD_LOCATION",
184
+ "RESTAURANT_CANDIDATE"
185
+ ]);
186
+ var MealMapMarkerBaseSchema = z4.object({
187
+ markerId: z4.string().min(1),
188
+ lat: z4.number().min(-90).max(90),
189
+ lng: z4.number().min(-180).max(180),
190
+ title: z4.string().min(1),
191
+ subtitle: z4.string().nullable(),
192
+ href: z4.string().min(1).nullable(),
193
+ mealPlanId: MealPlanIdSchema.nullable(),
194
+ articleId: ArticleIdSchema.nullable(),
195
+ restaurant: RestaurantSchema.nullable(),
196
+ distanceMeters: z4.number().int().min(0).nullable(),
197
+ updatedAt: ISODateTimeStringSchema
198
+ });
199
+ var MealMapMyMealPlanPlaceMetadataSchema = z4.object({
200
+ ownerId: MemberIdSchema.nullable().default(null),
201
+ status: z4.string().min(1),
202
+ participantCount: z4.number().int().min(1),
203
+ source: z4.string().min(1)
204
+ });
205
+ var MealMapNearbyFriendMealPlanMetadataSchema = z4.object({
206
+ ownerId: MemberIdSchema.nullable().default(null),
207
+ ownerName: z4.string().min(1),
208
+ participantCount: z4.number().int().min(1),
209
+ expiresAt: ISODateTimeStringSchema.nullable(),
210
+ source: z4.string().min(1)
211
+ });
212
+ var MealMapFriendRecordLocationMetadataSchema = z4.object({
213
+ authorId: MemberIdSchema.nullable().default(null),
214
+ authorName: z4.string().min(1),
215
+ imageUrl: z4.string().nullable().default(null),
216
+ mealDate: z4.string().min(1)
217
+ });
218
+ var MealMapRestaurantCandidateCompletionBlockedReasonSchema = z4.enum([
219
+ "OWNER_ONLY",
220
+ "STAGE_ALREADY_COMPLETED",
221
+ "MEAL_PLAN_NOT_MUTABLE"
222
+ ]);
223
+ var MealMapRestaurantCandidateMetadataSchema = z4.object({
224
+ stageId: MealPlanDecisionStageIdSchema,
225
+ ownerId: MemberIdSchema.nullable().default(null),
226
+ status: z4.string().min(1),
227
+ source: z4.enum(["search", "fallback", "manual"]).default("search"),
228
+ stageStatus: z4.enum(["OPEN", "COMPLETED", "REOPENED"]).default("OPEN"),
229
+ canVote: z4.boolean().default(false),
230
+ canCompleteStage: z4.boolean().default(false),
231
+ completionBlockedReason: MealMapRestaurantCandidateCompletionBlockedReasonSchema.nullable().default(null)
232
+ });
233
+ var MealMapMarkerSchema = z4.discriminatedUnion("layer", [
234
+ MealMapMarkerBaseSchema.extend({
235
+ layer: z4.literal("MY_MEAL_PLAN_PLACE"),
236
+ metadata: MealMapMyMealPlanPlaceMetadataSchema
237
+ }),
238
+ MealMapMarkerBaseSchema.extend({
239
+ layer: z4.literal("NEARBY_FRIEND_MEAL_PLAN"),
240
+ metadata: MealMapNearbyFriendMealPlanMetadataSchema
241
+ }),
242
+ MealMapMarkerBaseSchema.extend({
243
+ layer: z4.literal("FRIEND_RECORD_LOCATION"),
244
+ metadata: MealMapFriendRecordLocationMetadataSchema
245
+ }),
246
+ MealMapMarkerBaseSchema.extend({
247
+ layer: z4.literal("RESTAURANT_CANDIDATE"),
248
+ metadata: MealMapRestaurantCandidateMetadataSchema
249
+ })
250
+ ]);
251
+ var MealMapQuerySchema = z4.object({
252
+ friendRecordDays: z4.coerce.number().int().min(1).max(90).optional().default(7)
253
+ });
254
+ var MealMapResponseSchema = z4.object({
255
+ generatedAt: ISODateTimeStringSchema,
256
+ center: z4.object({
257
+ lat: z4.number().min(-90).max(90),
258
+ lng: z4.number().min(-180).max(180),
259
+ source: z4.enum(["LAST_KNOWN_LOCATION", "MY_MEAL_PLAN", "DEFAULT"])
260
+ }),
261
+ layers: z4.object({
262
+ myMealPlanPlaces: z4.array(MealMapMarkerSchema),
263
+ nearbyFriendMealPlans: z4.array(MealMapMarkerSchema),
264
+ friendRecordLocations: z4.array(MealMapMarkerSchema),
265
+ restaurantCandidates: z4.array(MealMapMarkerSchema)
266
+ })
267
+ });
268
+
269
+ // src/domain/meal-plan/meal-plan-notification-priority.ts
270
+ var DEFAULT_POLICY = MEAL_PLAN_NOTIFICATION_PRIORITY_POLICIES.MEAL_PLAN_PARTICIPANT_JOINED;
271
+ function getMealPlanNotificationPriorityPolicy(kind) {
272
+ return MEAL_PLAN_NOTIFICATION_PRIORITY_POLICIES[kind] ?? DEFAULT_POLICY;
273
+ }
274
+ function getMealPlanNotificationPriority(kind, channel = "HOME") {
275
+ const policy = getMealPlanNotificationPriorityPolicy(kind);
276
+ switch (channel) {
277
+ case "HOME":
278
+ return policy.homePriority;
279
+ case "NOTIFICATION_INBOX":
280
+ return policy.inboxPriority;
281
+ case "FCM_PUSH":
282
+ return policy.fcmPriority;
283
+ case "LIVE_ACTIVITY":
284
+ return policy.liveActivityPriority;
285
+ default:
286
+ return policy.priority;
287
+ }
288
+ }
289
+ function getMealPlanLiveActivityBehavior(kind) {
290
+ return getMealPlanNotificationPriorityPolicy(kind).liveActivityBehavior;
291
+ }
292
+ function shouldShowForegroundToast(kind) {
293
+ return getMealPlanNotificationPriorityPolicy(kind).foregroundToast;
294
+ }
295
+ function compareMealPlanNotificationsByPriority(channel) {
296
+ return (a, b) => {
297
+ const unreadDelta = Number(Boolean(a.readAt)) - Number(Boolean(b.readAt));
298
+ if (unreadDelta !== 0) return unreadDelta;
299
+ const priorityDelta = getMealPlanNotificationPriority(a.kind, channel) - getMealPlanNotificationPriority(b.kind, channel);
300
+ if (priorityDelta !== 0) return priorityDelta;
301
+ return new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime();
302
+ };
303
+ }
304
+
305
+ export {
306
+ MealPlanDecisionVoteSocketEvent,
307
+ MealPlanDecisionVoteSocketPayloadSchema,
308
+ MealPlanDecisionVoteSocketErrorSchema,
309
+ MealPlanDecisionVoteSocketSuccessAckSchema,
310
+ MealPlanDecisionVoteSocketFailureAckSchema,
311
+ MealPlanDecisionVoteSocketAckSchema,
312
+ CreateMealPlanShareLinkRequestSchema,
313
+ MealPlanShareLinkSummarySchema,
314
+ MealPlanSharePreviewResponseSchema,
315
+ JoinMealPlanGuestRequestSchema,
316
+ JoinMealPlanGuestResponseSchema,
317
+ MealPlanGuestSessionQuerySchema,
318
+ MealPlanGuestSessionResponseSchema,
319
+ MealGroupMemberRoleSchema,
320
+ MealGroupMemberSchema,
321
+ MealGroupResponseSchema,
322
+ CreateMealGroupRequestSchema,
323
+ StartMealPlanFromGroupRequestSchema,
324
+ AddMealGroupMemberRequestSchema,
325
+ UpdateMealGroupMemberRoleRequestSchema,
326
+ MealGroupHistoryItemSchema,
327
+ MealGroupPreferenceSummarySchema,
328
+ MealGroupHistoryResponseSchema,
329
+ HomeMealPlanActionKindSchema,
330
+ HomeMealPlanActionCardSchema,
331
+ HomeMealPlanDashboardResponseSchema,
332
+ MealMapLayerSchema,
333
+ MealMapMyMealPlanPlaceMetadataSchema,
334
+ MealMapNearbyFriendMealPlanMetadataSchema,
335
+ MealMapFriendRecordLocationMetadataSchema,
336
+ MealMapRestaurantCandidateCompletionBlockedReasonSchema,
337
+ MealMapRestaurantCandidateMetadataSchema,
338
+ MealMapMarkerSchema,
339
+ MealMapQuerySchema,
340
+ MealMapResponseSchema,
341
+ getMealPlanNotificationPriorityPolicy,
342
+ getMealPlanNotificationPriority,
343
+ getMealPlanLiveActivityBehavior,
344
+ shouldShowForegroundToast,
345
+ compareMealPlanNotificationsByPriority
346
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MealPlanLiveActivityBehaviorSchema,
3
3
  MealPlanNotificationKindSchema
4
- } from "./chunk-GOOH2LGN.js";
4
+ } from "./chunk-QPTK7F7Y.js";
5
5
  import {
6
6
  ISODateTimeStringSchema
7
7
  } from "./chunk-HRM3FQPL.js";
@@ -1,9 +1,3 @@
1
- import {
2
- FriendMealItemResponseSchema,
3
- FriendMealQuerySchema,
4
- MealStatusResponseSchema,
5
- UpdateMealStatusRequestSchema
6
- } from "./chunk-6O2YTBVC.js";
7
1
  import {
8
2
  ChallengeStatusResponseSchema,
9
3
  ClaimChallengeRewardRequestSchema,
@@ -12,6 +6,23 @@ import {
12
6
  ReferralCreateResponseSchema,
13
7
  ReferralItemResponseSchema
14
8
  } from "./chunk-RZPNVRRS.js";
9
+ import {
10
+ EndMealPlanLiveActivitySessionRequestSchema,
11
+ MealPlanLiveActivitySessionListResponseSchema,
12
+ MealPlanLiveActivitySessionResponseSchema,
13
+ RegisterMealPlanLiveActivitySessionRequestSchema
14
+ } from "./chunk-CUOJE3ER.js";
15
+ import {
16
+ PushTokenResponseSchema,
17
+ RegisterPushTokenRequestSchema,
18
+ RevokePushTokenRequestSchema
19
+ } from "./chunk-HHU5TRDP.js";
20
+ import {
21
+ FriendMealItemResponseSchema,
22
+ FriendMealQuerySchema,
23
+ MealStatusResponseSchema,
24
+ UpdateMealStatusRequestSchema
25
+ } from "./chunk-EQLAVUHF.js";
15
26
  import {
16
27
  ArticleDetailResponseSchema,
17
28
  ArticleLikeResponseSchema,
@@ -21,7 +32,7 @@ import {
21
32
  PageArticleSummaryResponseSchema,
22
33
  UploadArticleImageRequestSchema,
23
34
  UploadArticleImageResponseSchema
24
- } from "./chunk-NENVUHL5.js";
35
+ } from "./chunk-IRAFNZDL.js";
25
36
  import {
26
37
  LoginRequestSchema,
27
38
  SignupRequestSchema,
@@ -32,13 +43,7 @@ import {
32
43
  FriendBlockItemResponseSchema,
33
44
  FriendListItemResponseSchema,
34
45
  FriendRequestItemResponseSchema
35
- } from "./chunk-VD3VGLBQ.js";
36
- import {
37
- EndMealPlanLiveActivitySessionRequestSchema,
38
- MealPlanLiveActivitySessionListResponseSchema,
39
- MealPlanLiveActivitySessionResponseSchema,
40
- RegisterMealPlanLiveActivitySessionRequestSchema
41
- } from "./chunk-3TY6OPD3.js";
46
+ } from "./chunk-Q6Y2NBB6.js";
42
47
  import {
43
48
  AddMealGroupMemberRequestSchema,
44
49
  CreateMealGroupRequestSchema,
@@ -57,12 +62,7 @@ import {
57
62
  MealPlanSharePreviewResponseSchema,
58
63
  StartMealPlanFromGroupRequestSchema,
59
64
  UpdateMealGroupMemberRoleRequestSchema
60
- } from "./chunk-LEH6UFL7.js";
61
- import {
62
- PushTokenResponseSchema,
63
- RegisterPushTokenRequestSchema,
64
- RevokePushTokenRequestSchema
65
- } from "./chunk-WYBFBLQC.js";
65
+ } from "./chunk-FODWQLEY.js";
66
66
  import {
67
67
  CompleteMealPlanDecisionStageRequestSchema,
68
68
  ConfirmMealPlanDecisionSnapshotRequestSchema,
@@ -71,7 +71,6 @@ import {
71
71
  CreateMealPlanJoinRequestSchema,
72
72
  CreateMealPlanRequestSchema,
73
73
  CreateMealPlanResponseSchema,
74
- CreateMealPlanVoteRequestSchema,
75
74
  ExposeMealPlanToNearbyFriendsRequestSchema,
76
75
  ExposeMealPlanToNearbyFriendsResponseSchema,
77
76
  MealPlanChatMessageListResponseSchema,
@@ -87,7 +86,7 @@ import {
87
86
  ReopenMealPlanDecisionTaskRequestSchema,
88
87
  SendMealPlanInviteResponseSchema,
89
88
  UpdateMealPlanContextRequestSchema
90
- } from "./chunk-GOOH2LGN.js";
89
+ } from "./chunk-QPTK7F7Y.js";
91
90
  import {
92
91
  CreateProfileRequestSchema,
93
92
  MemberFoodPreferenceSchema,
@@ -321,7 +320,6 @@ var apiContract = {
321
320
  requestJoin: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/join-requests", pathParams: mealPlanIdParam, body: CreateMealPlanJoinRequestSchema, response: CreatedEntityIdResponseSchema }),
322
321
  acceptJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/accept", pathParams: mealPlanJoinRequestIdParam, response: MealPlanResponseSchema }),
323
322
  rejectJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/reject", pathParams: mealPlanJoinRequestIdParam, response: NoContentSchema }),
324
- vote: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/stages/:stageId/votes", pathParams: mealPlanDecisionStageIdParam, body: CreateMealPlanVoteRequestSchema, response: MealPlanResponseSchema }),
325
323
  completeStage: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/stages/:stageId/complete", pathParams: mealPlanDecisionStageIdParam, body: CompleteMealPlanDecisionStageRequestSchema, response: MealPlanResponseSchema }),
326
324
  decisionProgress: endpoint({ method: "GET", path: "/meal-plans/:mealPlanId/decision-progress", pathParams: mealPlanIdParam, response: MealPlanDecisionProgressSchema }),
327
325
  reopenDecisionTask: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/decision-tasks/:taskKey/reopen", pathParams: mealPlanDecisionTaskKeyParam, body: ReopenMealPlanDecisionTaskRequestSchema, response: MealPlanResponseSchema }),
@@ -12,10 +12,10 @@ import {
12
12
  PageArticleSummaryResponseSchema,
13
13
  UploadArticleImageRequestSchema,
14
14
  UploadArticleImageResponseSchema
15
- } from "../../chunk-NENVUHL5.js";
15
+ } from "../../chunk-IRAFNZDL.js";
16
16
  import "../../chunk-7JYVBXKQ.js";
17
- import "../../chunk-C63TN7L3.js";
18
17
  import "../../chunk-HRM3FQPL.js";
18
+ import "../../chunk-C63TN7L3.js";
19
19
  import "../../chunk-XMRYAG3V.js";
20
20
  export {
21
21
  ArticleCommentSchema,
@@ -1782,7 +1782,6 @@ var apiContract = {
1782
1782
  requestJoin: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/join-requests", pathParams: mealPlanIdParam, body: CreateMealPlanJoinRequestSchema, response: CreatedEntityIdResponseSchema }),
1783
1783
  acceptJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/accept", pathParams: mealPlanJoinRequestIdParam, response: MealPlanResponseSchema }),
1784
1784
  rejectJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/reject", pathParams: mealPlanJoinRequestIdParam, response: NoContentSchema }),
1785
- vote: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/stages/:stageId/votes", pathParams: mealPlanDecisionStageIdParam, body: CreateMealPlanVoteRequestSchema, response: MealPlanResponseSchema }),
1786
1785
  completeStage: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/stages/:stageId/complete", pathParams: mealPlanDecisionStageIdParam, body: CompleteMealPlanDecisionStageRequestSchema, response: MealPlanResponseSchema }),
1787
1786
  decisionProgress: endpoint({ method: "GET", path: "/meal-plans/:mealPlanId/decision-progress", pathParams: mealPlanIdParam, response: MealPlanDecisionProgressSchema }),
1788
1787
  reopenDecisionTask: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/decision-tasks/:taskKey/reopen", pathParams: mealPlanDecisionTaskKeyParam, body: ReopenMealPlanDecisionTaskRequestSchema, response: MealPlanResponseSchema }),