@kimdaegyu/babmukdang-shared 2.0.5 → 2.0.7

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.
@@ -39,8 +39,9 @@ import {
39
39
  getMealPlanLiveActivityBehavior,
40
40
  getMealPlanNotificationPriority,
41
41
  getMealPlanNotificationPriorityPolicy,
42
+ getMealPlanRestaurantProvisionCacheKey,
42
43
  shouldShowForegroundToast
43
- } from "../../chunk-7FNZBMB2.js";
44
+ } from "../../chunk-ENXVY4SR.js";
44
45
  import {
45
46
  CompleteMealPlanDecisionStageRequestSchema,
46
47
  ConfirmMealPlanDecisionSnapshotRequestSchema,
@@ -76,6 +77,7 @@ import {
76
77
  MealPlanDecisionStageTypeSchema,
77
78
  MealPlanDecisionTaskKeySchema,
78
79
  MealPlanDecisionTaskProgressSchema,
80
+ MealPlanDecisionTaskReadyRequestSchema,
79
81
  MealPlanDecisionTaskStatusSchema,
80
82
  MealPlanGuestParticipantSchema,
81
83
  MealPlanInviteListResponseSchema,
@@ -93,6 +95,7 @@ import {
93
95
  MealPlanMenuCandidateIdSchema,
94
96
  MealPlanMenuCandidateSchema,
95
97
  MealPlanMenuCandidateSourceSchema,
98
+ MealPlanMenuRecommendationStateSchema,
96
99
  MealPlanNearbyFriendExposureBatchSummarySchema,
97
100
  MealPlanNearbyFriendExposureIdSchema,
98
101
  MealPlanNearbyFriendExposureNotificationStatusSchema,
@@ -130,7 +133,7 @@ import {
130
133
  SendMealPlanChatMessageRequestSchema,
131
134
  SendMealPlanInviteResponseSchema,
132
135
  UpdateMealPlanContextRequestSchema
133
- } from "../../chunk-GOOH2LGN.js";
136
+ } from "../../chunk-LXRTJPS5.js";
134
137
  import "../../chunk-7JYVBXKQ.js";
135
138
  import "../../chunk-CGFW5LYV.js";
136
139
  import "../../chunk-C63TN7L3.js";
@@ -194,6 +197,7 @@ export {
194
197
  MealPlanDecisionStageTypeSchema,
195
198
  MealPlanDecisionTaskKeySchema,
196
199
  MealPlanDecisionTaskProgressSchema,
200
+ MealPlanDecisionTaskReadyRequestSchema,
197
201
  MealPlanDecisionTaskStatusSchema,
198
202
  MealPlanDecisionVoteSocketAckSchema,
199
203
  MealPlanDecisionVoteSocketErrorSchema,
@@ -219,6 +223,7 @@ export {
219
223
  MealPlanMenuCandidateIdSchema,
220
224
  MealPlanMenuCandidateSchema,
221
225
  MealPlanMenuCandidateSourceSchema,
226
+ MealPlanMenuRecommendationStateSchema,
222
227
  MealPlanNearbyFriendExposureBatchSummarySchema,
223
228
  MealPlanNearbyFriendExposureIdSchema,
224
229
  MealPlanNearbyFriendExposureNotificationStatusSchema,
@@ -265,5 +270,6 @@ export {
265
270
  getMealPlanLiveActivityBehavior,
266
271
  getMealPlanNotificationPriority,
267
272
  getMealPlanNotificationPriorityPolicy,
273
+ getMealPlanRestaurantProvisionCacheKey,
268
274
  shouldShowForegroundToast
269
275
  };
@@ -356,9 +356,7 @@ var MealPlanDecisionStageIdSchema = import_zod7.z.string().uuid().brand();
356
356
  var MealPlanVoteIdSchema = import_zod7.z.string().uuid().brand();
357
357
  var MealPlanLocationCandidateSourceSchema = import_zod7.z.enum([
358
358
  "manual",
359
- "map-marker",
360
359
  "midpoint",
361
- "user-location",
362
360
  "search",
363
361
  "recent-place",
364
362
  "fallback"
@@ -385,8 +383,8 @@ var MealPlanMenuCandidateSchema = import_zod7.z.object({
385
383
  menu: FoodSchema,
386
384
  source: MealPlanMenuCandidateSourceSchema,
387
385
  score: import_zod7.z.number().default(0),
388
- imageUrl: import_zod7.z.string().min(1).nullable().default(null),
389
- image: FoodCodeManifestImageSchema.nullable().default(null),
386
+ imageUrl: import_zod7.z.string().min(1).nullable().optional(),
387
+ image: FoodCodeManifestImageSchema.nullable().optional(),
390
388
  createdAt: ISODateTimeStringSchema
391
389
  });
392
390
  var MealPlanRestaurantCandidateSchema = RestaurantSchema.extend({
@@ -423,8 +421,15 @@ var MealPlanRestaurantSearchStateSchema = import_zod7.z.object({
423
421
  candidateCount: import_zod7.z.number().int().min(0),
424
422
  errorMessage: import_zod7.z.string().nullable().default(null)
425
423
  });
424
+ var MealPlanMenuRecommendationStateSchema = import_zod7.z.object({
425
+ preferenceKey: import_zod7.z.string().min(1),
426
+ generatedFromHash: import_zod7.z.string().min(1),
427
+ generatedAt: ISODateTimeStringSchema,
428
+ candidateCount: import_zod7.z.number().int().min(0)
429
+ });
426
430
  var MealPlanDecisionStageMetadataSchema = import_zod7.z.object({
427
- restaurantSearch: MealPlanRestaurantSearchStateSchema.optional()
431
+ restaurantSearch: MealPlanRestaurantSearchStateSchema.optional(),
432
+ menuRecommendation: MealPlanMenuRecommendationStateSchema.optional()
428
433
  }).catchall(import_zod7.z.unknown());
429
434
  var MealPlanVoteTypeSchema = import_zod7.z.enum([
430
435
  "PICK",
@@ -500,6 +505,7 @@ var MealPlanDecisionTaskKeySchema = import_zod7.z.enum([
500
505
  var MealPlanDecisionTaskStatusSchema = import_zod7.z.enum([
501
506
  "LOCKED",
502
507
  "OPEN",
508
+ "READY",
503
509
  "RESOLVED",
504
510
  "STALE"
505
511
  ]);
@@ -523,6 +529,7 @@ var MealPlanDecisionReasonSchema = import_zod7.z.enum([
523
529
  "TOP_PICKED_MENU",
524
530
  "TOP_PICKED_RESTAURANT",
525
531
  "OWNER_CONFIRMED",
532
+ "TASK_ALL_READY",
526
533
  "MANUAL_SELECTION"
527
534
  ]);
528
535
  var MealPlanDecisionActorTypeSchema = import_zod7.z.enum(["MEMBER", "GUEST", "SYSTEM"]);
@@ -548,6 +555,8 @@ var MealPlanDecisionSnapshotSchema = import_zod7.z.object({
548
555
  var MealPlanDecisionTaskProgressSchema = import_zod7.z.object({
549
556
  taskKey: MealPlanDecisionTaskKeySchema,
550
557
  status: MealPlanDecisionTaskStatusSchema,
558
+ readyCount: import_zod7.z.number().int().min(0),
559
+ participantCount: import_zod7.z.number().int().min(0),
551
560
  blockers: import_zod7.z.array(import_zod7.z.string()).default([]),
552
561
  updatedAt: ISODateTimeStringSchema
553
562
  });
@@ -561,6 +570,9 @@ var MealPlanDecisionProgressSchema = import_zod7.z.object({
561
570
  version: import_zod7.z.number().int().min(0),
562
571
  updatedAt: ISODateTimeStringSchema
563
572
  });
573
+ var MealPlanDecisionTaskReadyRequestSchema = import_zod7.z.object({
574
+ isReady: import_zod7.z.boolean()
575
+ });
564
576
  var ReopenMealPlanDecisionTaskRequestSchema = import_zod7.z.object({
565
577
  reason: import_zod7.z.string().max(500).optional()
566
578
  });
@@ -12,8 +12,8 @@ import {
12
12
  PushTokenStatusSchema,
13
13
  RegisterPushTokenRequestSchema,
14
14
  RevokePushTokenRequestSchema
15
- } from "../../chunk-WYBFBLQC.js";
16
- import "../../chunk-GOOH2LGN.js";
15
+ } from "../../chunk-KWJE3RYS.js";
16
+ import "../../chunk-LXRTJPS5.js";
17
17
  import "../../chunk-7JYVBXKQ.js";
18
18
  import "../../chunk-CGFW5LYV.js";
19
19
  import "../../chunk-C63TN7L3.js";
package/dist/index.cjs CHANGED
@@ -167,6 +167,7 @@ __export(domain_exports, {
167
167
  MealPlanDecisionStageTypeSchema: () => MealPlanDecisionStageTypeSchema,
168
168
  MealPlanDecisionTaskKeySchema: () => MealPlanDecisionTaskKeySchema,
169
169
  MealPlanDecisionTaskProgressSchema: () => MealPlanDecisionTaskProgressSchema,
170
+ MealPlanDecisionTaskReadyRequestSchema: () => MealPlanDecisionTaskReadyRequestSchema,
170
171
  MealPlanDecisionTaskStatusSchema: () => MealPlanDecisionTaskStatusSchema,
171
172
  MealPlanDecisionVoteSocketAckSchema: () => MealPlanDecisionVoteSocketAckSchema,
172
173
  MealPlanDecisionVoteSocketErrorSchema: () => MealPlanDecisionVoteSocketErrorSchema,
@@ -201,6 +202,7 @@ __export(domain_exports, {
201
202
  MealPlanMenuCandidateIdSchema: () => MealPlanMenuCandidateIdSchema,
202
203
  MealPlanMenuCandidateSchema: () => MealPlanMenuCandidateSchema,
203
204
  MealPlanMenuCandidateSourceSchema: () => MealPlanMenuCandidateSourceSchema,
205
+ MealPlanMenuRecommendationStateSchema: () => MealPlanMenuRecommendationStateSchema,
204
206
  MealPlanNearbyFriendExposureBatchIdSchema: () => MealPlanNearbyFriendExposureBatchIdSchema,
205
207
  MealPlanNearbyFriendExposureBatchSummarySchema: () => MealPlanNearbyFriendExposureBatchSummarySchema,
206
208
  MealPlanNearbyFriendExposureIdSchema: () => MealPlanNearbyFriendExposureIdSchema,
@@ -318,6 +320,7 @@ __export(domain_exports, {
318
320
  getMealPlanLiveActivityBehavior: () => getMealPlanLiveActivityBehavior,
319
321
  getMealPlanNotificationPriority: () => getMealPlanNotificationPriority,
320
322
  getMealPlanNotificationPriorityPolicy: () => getMealPlanNotificationPriorityPolicy,
323
+ getMealPlanRestaurantProvisionCacheKey: () => getMealPlanRestaurantProvisionCacheKey,
321
324
  makeApiResponseSchema: () => makeApiResponseSchema,
322
325
  makeApiSuccessSchema: () => makeApiSuccessSchema,
323
326
  shouldShowForegroundToast: () => shouldShowForegroundToast,
@@ -886,9 +889,7 @@ var MealPlanDecisionStageIdSchema = import_zod14.z.string().uuid().brand();
886
889
  var MealPlanVoteIdSchema = import_zod14.z.string().uuid().brand();
887
890
  var MealPlanLocationCandidateSourceSchema = import_zod14.z.enum([
888
891
  "manual",
889
- "map-marker",
890
892
  "midpoint",
891
- "user-location",
892
893
  "search",
893
894
  "recent-place",
894
895
  "fallback"
@@ -915,8 +916,8 @@ var MealPlanMenuCandidateSchema = import_zod14.z.object({
915
916
  menu: FoodSchema,
916
917
  source: MealPlanMenuCandidateSourceSchema,
917
918
  score: import_zod14.z.number().default(0),
918
- imageUrl: import_zod14.z.string().min(1).nullable().default(null),
919
- image: FoodCodeManifestImageSchema.nullable().default(null),
919
+ imageUrl: import_zod14.z.string().min(1).nullable().optional(),
920
+ image: FoodCodeManifestImageSchema.nullable().optional(),
920
921
  createdAt: ISODateTimeStringSchema
921
922
  });
922
923
  var MealPlanRestaurantCandidateSchema = RestaurantSchema.extend({
@@ -953,8 +954,15 @@ var MealPlanRestaurantSearchStateSchema = import_zod14.z.object({
953
954
  candidateCount: import_zod14.z.number().int().min(0),
954
955
  errorMessage: import_zod14.z.string().nullable().default(null)
955
956
  });
957
+ var MealPlanMenuRecommendationStateSchema = import_zod14.z.object({
958
+ preferenceKey: import_zod14.z.string().min(1),
959
+ generatedFromHash: import_zod14.z.string().min(1),
960
+ generatedAt: ISODateTimeStringSchema,
961
+ candidateCount: import_zod14.z.number().int().min(0)
962
+ });
956
963
  var MealPlanDecisionStageMetadataSchema = import_zod14.z.object({
957
- restaurantSearch: MealPlanRestaurantSearchStateSchema.optional()
964
+ restaurantSearch: MealPlanRestaurantSearchStateSchema.optional(),
965
+ menuRecommendation: MealPlanMenuRecommendationStateSchema.optional()
958
966
  }).catchall(import_zod14.z.unknown());
959
967
  var MealPlanVoteTypeSchema = import_zod14.z.enum([
960
968
  "PICK",
@@ -1030,6 +1038,7 @@ var MealPlanDecisionTaskKeySchema = import_zod14.z.enum([
1030
1038
  var MealPlanDecisionTaskStatusSchema = import_zod14.z.enum([
1031
1039
  "LOCKED",
1032
1040
  "OPEN",
1041
+ "READY",
1033
1042
  "RESOLVED",
1034
1043
  "STALE"
1035
1044
  ]);
@@ -1053,6 +1062,7 @@ var MealPlanDecisionReasonSchema = import_zod14.z.enum([
1053
1062
  "TOP_PICKED_MENU",
1054
1063
  "TOP_PICKED_RESTAURANT",
1055
1064
  "OWNER_CONFIRMED",
1065
+ "TASK_ALL_READY",
1056
1066
  "MANUAL_SELECTION"
1057
1067
  ]);
1058
1068
  var MealPlanDecisionActorTypeSchema = import_zod14.z.enum(["MEMBER", "GUEST", "SYSTEM"]);
@@ -1078,6 +1088,8 @@ var MealPlanDecisionSnapshotSchema = import_zod14.z.object({
1078
1088
  var MealPlanDecisionTaskProgressSchema = import_zod14.z.object({
1079
1089
  taskKey: MealPlanDecisionTaskKeySchema,
1080
1090
  status: MealPlanDecisionTaskStatusSchema,
1091
+ readyCount: import_zod14.z.number().int().min(0),
1092
+ participantCount: import_zod14.z.number().int().min(0),
1081
1093
  blockers: import_zod14.z.array(import_zod14.z.string()).default([]),
1082
1094
  updatedAt: ISODateTimeStringSchema
1083
1095
  });
@@ -1091,6 +1103,9 @@ var MealPlanDecisionProgressSchema = import_zod14.z.object({
1091
1103
  version: import_zod14.z.number().int().min(0),
1092
1104
  updatedAt: ISODateTimeStringSchema
1093
1105
  });
1106
+ var MealPlanDecisionTaskReadyRequestSchema = import_zod14.z.object({
1107
+ isReady: import_zod14.z.boolean()
1108
+ });
1094
1109
  var ReopenMealPlanDecisionTaskRequestSchema = import_zod14.z.object({
1095
1110
  reason: import_zod14.z.string().max(500).optional()
1096
1111
  });
@@ -1595,12 +1610,16 @@ function getMealPlanDecisionCandidateKey(candidate) {
1595
1610
  case "AREA":
1596
1611
  return `AREA:${candidate.value.locationId}`;
1597
1612
  case "MENU":
1598
- return `MENU:${candidate.value.menuCandidateId}`;
1613
+ return `MENU:${candidate.value.menu.code}`;
1599
1614
  case "RESTAURANT":
1600
1615
  return `RESTAURANT:${candidate.value.candidateId ?? candidate.value.restaurantId}`;
1601
1616
  case "FINAL_CONFIRMATION":
1602
1617
  return "FINAL_CONFIRMATION:READY";
1603
1618
  }
1619
+ return `UNKNOWN:${JSON.stringify(candidate)}`;
1620
+ }
1621
+ function getMealPlanRestaurantProvisionCacheKey(area, menu) {
1622
+ return `restaurant-search:${getMealPlanDecisionCandidateKey(area)}:${getMealPlanDecisionCandidateKey(menu)}`;
1604
1623
  }
1605
1624
 
1606
1625
  // src/domain/meal-plan/meal-plan.socket.ts
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  domain_exports
3
- } from "./chunk-S2Q64AFI.js";
3
+ } from "./chunk-FWGPEHI4.js";
4
4
  import "./chunk-NCVWB52E.js";
5
- import "./chunk-ITXM3XFJ.js";
5
+ import "./chunk-D4J2TV26.js";
6
6
  import "./chunk-6O2YTBVC.js";
7
7
  import "./chunk-NJTV6DRT.js";
8
8
  import "./chunk-RZPNVRRS.js";
@@ -10,10 +10,10 @@ import "./chunk-NENVUHL5.js";
10
10
  import "./chunk-QFPVAJ2U.js";
11
11
  import "./chunk-BSJC7OVV.js";
12
12
  import "./chunk-VD3VGLBQ.js";
13
- import "./chunk-3TY6OPD3.js";
14
- import "./chunk-7FNZBMB2.js";
15
- import "./chunk-WYBFBLQC.js";
16
- import "./chunk-GOOH2LGN.js";
13
+ import "./chunk-5FPYU6NF.js";
14
+ import "./chunk-ENXVY4SR.js";
15
+ import "./chunk-KWJE3RYS.js";
16
+ import "./chunk-LXRTJPS5.js";
17
17
  import "./chunk-7JYVBXKQ.js";
18
18
  import "./chunk-CGFW5LYV.js";
19
19
  import "./chunk-C63TN7L3.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kimdaegyu/babmukdang-shared",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",