@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
package/dist/index.cjs
CHANGED
|
@@ -167,13 +167,8 @@ __export(domain_exports, {
|
|
|
167
167
|
MealPlanDecisionStageTypeSchema: () => MealPlanDecisionStageTypeSchema,
|
|
168
168
|
MealPlanDecisionTaskKeySchema: () => MealPlanDecisionTaskKeySchema,
|
|
169
169
|
MealPlanDecisionTaskProgressSchema: () => MealPlanDecisionTaskProgressSchema,
|
|
170
|
+
MealPlanDecisionTaskReadyRequestSchema: () => MealPlanDecisionTaskReadyRequestSchema,
|
|
170
171
|
MealPlanDecisionTaskStatusSchema: () => MealPlanDecisionTaskStatusSchema,
|
|
171
|
-
MealPlanDecisionVoteSocketAckSchema: () => MealPlanDecisionVoteSocketAckSchema,
|
|
172
|
-
MealPlanDecisionVoteSocketErrorSchema: () => MealPlanDecisionVoteSocketErrorSchema,
|
|
173
|
-
MealPlanDecisionVoteSocketEvent: () => MealPlanDecisionVoteSocketEvent,
|
|
174
|
-
MealPlanDecisionVoteSocketFailureAckSchema: () => MealPlanDecisionVoteSocketFailureAckSchema,
|
|
175
|
-
MealPlanDecisionVoteSocketPayloadSchema: () => MealPlanDecisionVoteSocketPayloadSchema,
|
|
176
|
-
MealPlanDecisionVoteSocketSuccessAckSchema: () => MealPlanDecisionVoteSocketSuccessAckSchema,
|
|
177
172
|
MealPlanGuestParticipantSchema: () => MealPlanGuestParticipantSchema,
|
|
178
173
|
MealPlanGuestSessionQuerySchema: () => MealPlanGuestSessionQuerySchema,
|
|
179
174
|
MealPlanGuestSessionResponseSchema: () => MealPlanGuestSessionResponseSchema,
|
|
@@ -201,6 +196,7 @@ __export(domain_exports, {
|
|
|
201
196
|
MealPlanMenuCandidateIdSchema: () => MealPlanMenuCandidateIdSchema,
|
|
202
197
|
MealPlanMenuCandidateSchema: () => MealPlanMenuCandidateSchema,
|
|
203
198
|
MealPlanMenuCandidateSourceSchema: () => MealPlanMenuCandidateSourceSchema,
|
|
199
|
+
MealPlanMenuRecommendationStateSchema: () => MealPlanMenuRecommendationStateSchema,
|
|
204
200
|
MealPlanNearbyFriendExposureBatchIdSchema: () => MealPlanNearbyFriendExposureBatchIdSchema,
|
|
205
201
|
MealPlanNearbyFriendExposureBatchSummarySchema: () => MealPlanNearbyFriendExposureBatchSummarySchema,
|
|
206
202
|
MealPlanNearbyFriendExposureIdSchema: () => MealPlanNearbyFriendExposureIdSchema,
|
|
@@ -318,6 +314,7 @@ __export(domain_exports, {
|
|
|
318
314
|
getMealPlanLiveActivityBehavior: () => getMealPlanLiveActivityBehavior,
|
|
319
315
|
getMealPlanNotificationPriority: () => getMealPlanNotificationPriority,
|
|
320
316
|
getMealPlanNotificationPriorityPolicy: () => getMealPlanNotificationPriorityPolicy,
|
|
317
|
+
getMealPlanRestaurantProvisionCacheKey: () => getMealPlanRestaurantProvisionCacheKey,
|
|
321
318
|
makeApiResponseSchema: () => makeApiResponseSchema,
|
|
322
319
|
makeApiSuccessSchema: () => makeApiSuccessSchema,
|
|
323
320
|
shouldShowForegroundToast: () => shouldShowForegroundToast,
|
|
@@ -622,7 +619,7 @@ var SignupResponseSchema = import_zod8.z.object({
|
|
|
622
619
|
});
|
|
623
620
|
|
|
624
621
|
// src/domain/common/contracts/api.ts
|
|
625
|
-
var
|
|
622
|
+
var import_zod29 = require("zod");
|
|
626
623
|
|
|
627
624
|
// src/domain/common/schema/cache-invalidation.schema.ts
|
|
628
625
|
var import_zod9 = require("zod");
|
|
@@ -886,9 +883,7 @@ var MealPlanDecisionStageIdSchema = import_zod14.z.string().uuid().brand();
|
|
|
886
883
|
var MealPlanVoteIdSchema = import_zod14.z.string().uuid().brand();
|
|
887
884
|
var MealPlanLocationCandidateSourceSchema = import_zod14.z.enum([
|
|
888
885
|
"manual",
|
|
889
|
-
"map-marker",
|
|
890
886
|
"midpoint",
|
|
891
|
-
"user-location",
|
|
892
887
|
"search",
|
|
893
888
|
"recent-place",
|
|
894
889
|
"fallback"
|
|
@@ -915,8 +910,8 @@ var MealPlanMenuCandidateSchema = import_zod14.z.object({
|
|
|
915
910
|
menu: FoodSchema,
|
|
916
911
|
source: MealPlanMenuCandidateSourceSchema,
|
|
917
912
|
score: import_zod14.z.number().default(0),
|
|
918
|
-
imageUrl: import_zod14.z.string().min(1).nullable().
|
|
919
|
-
image: FoodCodeManifestImageSchema.nullable().
|
|
913
|
+
imageUrl: import_zod14.z.string().min(1).nullable().optional(),
|
|
914
|
+
image: FoodCodeManifestImageSchema.nullable().optional(),
|
|
920
915
|
createdAt: ISODateTimeStringSchema
|
|
921
916
|
});
|
|
922
917
|
var MealPlanRestaurantCandidateSchema = RestaurantSchema.extend({
|
|
@@ -953,8 +948,15 @@ var MealPlanRestaurantSearchStateSchema = import_zod14.z.object({
|
|
|
953
948
|
candidateCount: import_zod14.z.number().int().min(0),
|
|
954
949
|
errorMessage: import_zod14.z.string().nullable().default(null)
|
|
955
950
|
});
|
|
951
|
+
var MealPlanMenuRecommendationStateSchema = import_zod14.z.object({
|
|
952
|
+
preferenceKey: import_zod14.z.string().min(1),
|
|
953
|
+
generatedFromHash: import_zod14.z.string().min(1),
|
|
954
|
+
generatedAt: ISODateTimeStringSchema,
|
|
955
|
+
candidateCount: import_zod14.z.number().int().min(0)
|
|
956
|
+
});
|
|
956
957
|
var MealPlanDecisionStageMetadataSchema = import_zod14.z.object({
|
|
957
|
-
restaurantSearch: MealPlanRestaurantSearchStateSchema.optional()
|
|
958
|
+
restaurantSearch: MealPlanRestaurantSearchStateSchema.optional(),
|
|
959
|
+
menuRecommendation: MealPlanMenuRecommendationStateSchema.optional()
|
|
958
960
|
}).catchall(import_zod14.z.unknown());
|
|
959
961
|
var MealPlanVoteTypeSchema = import_zod14.z.enum([
|
|
960
962
|
"PICK",
|
|
@@ -1030,6 +1032,7 @@ var MealPlanDecisionTaskKeySchema = import_zod14.z.enum([
|
|
|
1030
1032
|
var MealPlanDecisionTaskStatusSchema = import_zod14.z.enum([
|
|
1031
1033
|
"LOCKED",
|
|
1032
1034
|
"OPEN",
|
|
1035
|
+
"READY",
|
|
1033
1036
|
"RESOLVED",
|
|
1034
1037
|
"STALE"
|
|
1035
1038
|
]);
|
|
@@ -1053,6 +1056,7 @@ var MealPlanDecisionReasonSchema = import_zod14.z.enum([
|
|
|
1053
1056
|
"TOP_PICKED_MENU",
|
|
1054
1057
|
"TOP_PICKED_RESTAURANT",
|
|
1055
1058
|
"OWNER_CONFIRMED",
|
|
1059
|
+
"TASK_ALL_READY",
|
|
1056
1060
|
"MANUAL_SELECTION"
|
|
1057
1061
|
]);
|
|
1058
1062
|
var MealPlanDecisionActorTypeSchema = import_zod14.z.enum(["MEMBER", "GUEST", "SYSTEM"]);
|
|
@@ -1078,6 +1082,8 @@ var MealPlanDecisionSnapshotSchema = import_zod14.z.object({
|
|
|
1078
1082
|
var MealPlanDecisionTaskProgressSchema = import_zod14.z.object({
|
|
1079
1083
|
taskKey: MealPlanDecisionTaskKeySchema,
|
|
1080
1084
|
status: MealPlanDecisionTaskStatusSchema,
|
|
1085
|
+
readyCount: import_zod14.z.number().int().min(0),
|
|
1086
|
+
participantCount: import_zod14.z.number().int().min(0),
|
|
1081
1087
|
blockers: import_zod14.z.array(import_zod14.z.string()).default([]),
|
|
1082
1088
|
updatedAt: ISODateTimeStringSchema
|
|
1083
1089
|
});
|
|
@@ -1091,6 +1097,9 @@ var MealPlanDecisionProgressSchema = import_zod14.z.object({
|
|
|
1091
1097
|
version: import_zod14.z.number().int().min(0),
|
|
1092
1098
|
updatedAt: ISODateTimeStringSchema
|
|
1093
1099
|
});
|
|
1100
|
+
var MealPlanDecisionTaskReadyRequestSchema = import_zod14.z.object({
|
|
1101
|
+
isReady: import_zod14.z.boolean()
|
|
1102
|
+
});
|
|
1094
1103
|
var ReopenMealPlanDecisionTaskRequestSchema = import_zod14.z.object({
|
|
1095
1104
|
reason: import_zod14.z.string().max(500).optional()
|
|
1096
1105
|
});
|
|
@@ -1595,252 +1604,231 @@ function getMealPlanDecisionCandidateKey(candidate) {
|
|
|
1595
1604
|
case "AREA":
|
|
1596
1605
|
return `AREA:${candidate.value.locationId}`;
|
|
1597
1606
|
case "MENU":
|
|
1598
|
-
return `MENU:${candidate.value.
|
|
1607
|
+
return `MENU:${candidate.value.menu.code}`;
|
|
1599
1608
|
case "RESTAURANT":
|
|
1600
1609
|
return `RESTAURANT:${candidate.value.candidateId ?? candidate.value.restaurantId}`;
|
|
1601
1610
|
case "FINAL_CONFIRMATION":
|
|
1602
1611
|
return "FINAL_CONFIRMATION:READY";
|
|
1603
1612
|
}
|
|
1613
|
+
return `UNKNOWN:${JSON.stringify(candidate)}`;
|
|
1614
|
+
}
|
|
1615
|
+
function getMealPlanRestaurantProvisionCacheKey(area, menu) {
|
|
1616
|
+
return `restaurant-search:${getMealPlanDecisionCandidateKey(area)}:${getMealPlanDecisionCandidateKey(menu)}`;
|
|
1604
1617
|
}
|
|
1605
|
-
|
|
1606
|
-
// src/domain/meal-plan/meal-plan.socket.ts
|
|
1607
|
-
var import_zod20 = require("zod");
|
|
1608
|
-
var MealPlanDecisionVoteSocketEvent = "mealPlan:decision:vote";
|
|
1609
|
-
var MealPlanDecisionVoteSocketPayloadSchema = CreateMealPlanVoteRequestSchema.extend({
|
|
1610
|
-
mealPlanId: MealPlanIdSchema,
|
|
1611
|
-
stageId: MealPlanDecisionStageIdSchema,
|
|
1612
|
-
guestSessionToken: import_zod20.z.string().min(1).optional()
|
|
1613
|
-
});
|
|
1614
|
-
var MealPlanDecisionVoteSocketErrorSchema = import_zod20.z.object({
|
|
1615
|
-
code: import_zod20.z.string().min(1),
|
|
1616
|
-
message: import_zod20.z.string().min(1)
|
|
1617
|
-
});
|
|
1618
|
-
var MealPlanDecisionVoteSocketSuccessAckSchema = import_zod20.z.object({
|
|
1619
|
-
ok: import_zod20.z.literal(true),
|
|
1620
|
-
mealPlan: MealPlanResponseSchema
|
|
1621
|
-
});
|
|
1622
|
-
var MealPlanDecisionVoteSocketFailureAckSchema = import_zod20.z.object({
|
|
1623
|
-
ok: import_zod20.z.literal(false),
|
|
1624
|
-
error: MealPlanDecisionVoteSocketErrorSchema
|
|
1625
|
-
});
|
|
1626
|
-
var MealPlanDecisionVoteSocketAckSchema = import_zod20.z.discriminatedUnion("ok", [
|
|
1627
|
-
MealPlanDecisionVoteSocketSuccessAckSchema,
|
|
1628
|
-
MealPlanDecisionVoteSocketFailureAckSchema
|
|
1629
|
-
]);
|
|
1630
1618
|
|
|
1631
1619
|
// src/domain/meal-plan/meal-plan-share-link.schema.ts
|
|
1632
|
-
var
|
|
1633
|
-
var CreateMealPlanShareLinkRequestSchema =
|
|
1620
|
+
var import_zod20 = require("zod");
|
|
1621
|
+
var CreateMealPlanShareLinkRequestSchema = import_zod20.z.object({
|
|
1634
1622
|
expiresAt: ISODateTimeStringSchema.optional(),
|
|
1635
|
-
guestJoinEnabled:
|
|
1623
|
+
guestJoinEnabled: import_zod20.z.boolean().default(true)
|
|
1636
1624
|
});
|
|
1637
|
-
var MealPlanShareLinkSummarySchema =
|
|
1625
|
+
var MealPlanShareLinkSummarySchema = import_zod20.z.object({
|
|
1638
1626
|
shareLinkId: MealPlanShareLinkIdSchema,
|
|
1639
1627
|
mealPlanId: MealPlanIdSchema,
|
|
1640
1628
|
token: MealPlanShareLinkTokenSchema,
|
|
1641
|
-
url:
|
|
1629
|
+
url: import_zod20.z.string().url(),
|
|
1642
1630
|
expiresAt: ISODateTimeStringSchema,
|
|
1643
|
-
guestJoinEnabled:
|
|
1631
|
+
guestJoinEnabled: import_zod20.z.boolean(),
|
|
1644
1632
|
createdAt: ISODateTimeStringSchema
|
|
1645
1633
|
});
|
|
1646
|
-
var MealPlanSharePreviewResponseSchema =
|
|
1634
|
+
var MealPlanSharePreviewResponseSchema = import_zod20.z.object({
|
|
1647
1635
|
mealPlanId: MealPlanIdSchema,
|
|
1648
1636
|
token: MealPlanShareLinkTokenSchema,
|
|
1649
|
-
title:
|
|
1650
|
-
ownerName:
|
|
1651
|
-
participantCount:
|
|
1637
|
+
title: import_zod20.z.string(),
|
|
1638
|
+
ownerName: import_zod20.z.string(),
|
|
1639
|
+
participantCount: import_zod20.z.number().int().min(1),
|
|
1652
1640
|
expiresAt: ISODateTimeStringSchema,
|
|
1653
|
-
guestJoinEnabled:
|
|
1641
|
+
guestJoinEnabled: import_zod20.z.boolean()
|
|
1654
1642
|
});
|
|
1655
|
-
var JoinMealPlanGuestRequestSchema =
|
|
1656
|
-
nickname:
|
|
1657
|
-
password:
|
|
1643
|
+
var JoinMealPlanGuestRequestSchema = import_zod20.z.object({
|
|
1644
|
+
nickname: import_zod20.z.string().min(1).max(50),
|
|
1645
|
+
password: import_zod20.z.string().min(1).max(100).optional()
|
|
1658
1646
|
});
|
|
1659
|
-
var JoinMealPlanGuestResponseSchema =
|
|
1647
|
+
var JoinMealPlanGuestResponseSchema = import_zod20.z.object({
|
|
1660
1648
|
mealPlanId: MealPlanIdSchema,
|
|
1661
|
-
guestId:
|
|
1662
|
-
sessionToken:
|
|
1649
|
+
guestId: import_zod20.z.string().min(1),
|
|
1650
|
+
sessionToken: import_zod20.z.string().min(1)
|
|
1663
1651
|
});
|
|
1664
|
-
var MealPlanGuestSessionQuerySchema =
|
|
1665
|
-
sessionToken:
|
|
1652
|
+
var MealPlanGuestSessionQuerySchema = import_zod20.z.object({
|
|
1653
|
+
sessionToken: import_zod20.z.string().min(1)
|
|
1666
1654
|
});
|
|
1667
|
-
var MealPlanGuestSessionResponseSchema =
|
|
1655
|
+
var MealPlanGuestSessionResponseSchema = import_zod20.z.object({
|
|
1668
1656
|
mealPlan: MealPlanResponseSchema,
|
|
1669
1657
|
token: MealPlanShareLinkTokenSchema,
|
|
1670
|
-
guestId:
|
|
1671
|
-
nickname:
|
|
1672
|
-
sessionToken:
|
|
1658
|
+
guestId: import_zod20.z.string().min(1),
|
|
1659
|
+
nickname: import_zod20.z.string().min(1).max(50),
|
|
1660
|
+
sessionToken: import_zod20.z.string().min(1)
|
|
1673
1661
|
});
|
|
1674
1662
|
|
|
1675
1663
|
// src/domain/meal-plan/meal-group.schema.ts
|
|
1676
|
-
var
|
|
1677
|
-
var MealGroupMemberRoleSchema =
|
|
1664
|
+
var import_zod21 = require("zod");
|
|
1665
|
+
var MealGroupMemberRoleSchema = import_zod21.z.enum([
|
|
1678
1666
|
"OWNER",
|
|
1679
1667
|
"MEMBER"
|
|
1680
1668
|
]);
|
|
1681
|
-
var MealGroupMemberSchema =
|
|
1669
|
+
var MealGroupMemberSchema = import_zod21.z.object({
|
|
1682
1670
|
member: MemberCoreSchema,
|
|
1683
1671
|
role: MealGroupMemberRoleSchema,
|
|
1684
1672
|
joinedAt: ISODateTimeStringSchema
|
|
1685
1673
|
});
|
|
1686
|
-
var MealGroupResponseSchema =
|
|
1674
|
+
var MealGroupResponseSchema = import_zod21.z.object({
|
|
1687
1675
|
mealGroupId: MealGroupIdSchema,
|
|
1688
|
-
name:
|
|
1676
|
+
name: import_zod21.z.string().min(1).max(50),
|
|
1689
1677
|
owner: MemberCoreSchema,
|
|
1690
|
-
profileImageUrl:
|
|
1691
|
-
members:
|
|
1692
|
-
recentMealPlanIds:
|
|
1678
|
+
profileImageUrl: import_zod21.z.string().url().nullable(),
|
|
1679
|
+
members: import_zod21.z.array(MealGroupMemberSchema),
|
|
1680
|
+
recentMealPlanIds: import_zod21.z.array(MealPlanIdSchema),
|
|
1693
1681
|
createdAt: ISODateTimeStringSchema,
|
|
1694
1682
|
updatedAt: ISODateTimeStringSchema
|
|
1695
1683
|
});
|
|
1696
|
-
var CreateMealGroupRequestSchema =
|
|
1697
|
-
name:
|
|
1698
|
-
memberIds:
|
|
1699
|
-
profileImageUrl:
|
|
1684
|
+
var CreateMealGroupRequestSchema = import_zod21.z.object({
|
|
1685
|
+
name: import_zod21.z.string().min(1).max(50),
|
|
1686
|
+
memberIds: import_zod21.z.array(import_zod21.z.number().int().positive()).min(1),
|
|
1687
|
+
profileImageUrl: import_zod21.z.string().url().nullable().optional(),
|
|
1700
1688
|
sourceMealPlanId: MealPlanIdSchema.optional()
|
|
1701
1689
|
});
|
|
1702
|
-
var StartMealPlanFromGroupRequestSchema =
|
|
1703
|
-
title:
|
|
1690
|
+
var StartMealPlanFromGroupRequestSchema = import_zod21.z.object({
|
|
1691
|
+
title: import_zod21.z.string().min(1).max(100).optional()
|
|
1704
1692
|
});
|
|
1705
|
-
var AddMealGroupMemberRequestSchema =
|
|
1706
|
-
memberId:
|
|
1693
|
+
var AddMealGroupMemberRequestSchema = import_zod21.z.object({
|
|
1694
|
+
memberId: import_zod21.z.number().int().positive(),
|
|
1707
1695
|
role: MealGroupMemberRoleSchema.default("MEMBER")
|
|
1708
1696
|
});
|
|
1709
|
-
var UpdateMealGroupMemberRoleRequestSchema =
|
|
1697
|
+
var UpdateMealGroupMemberRoleRequestSchema = import_zod21.z.object({
|
|
1710
1698
|
role: MealGroupMemberRoleSchema
|
|
1711
1699
|
});
|
|
1712
1700
|
var MealGroupHistoryItemSchema = MyMealPlanListItemSchema.extend({});
|
|
1713
|
-
var MealGroupPreferenceSummarySchema =
|
|
1701
|
+
var MealGroupPreferenceSummarySchema = import_zod21.z.object({
|
|
1714
1702
|
mealGroupId: MealGroupIdSchema,
|
|
1715
|
-
frequentMenuCategories:
|
|
1716
|
-
frequentRestaurants:
|
|
1717
|
-
recentMenuCategories:
|
|
1718
|
-
recommendationContext:
|
|
1719
|
-
preferredMenuCategories:
|
|
1720
|
-
excludedMenuCategories:
|
|
1721
|
-
candidateMenuCategories:
|
|
1703
|
+
frequentMenuCategories: import_zod21.z.array(import_zod21.z.object({ label: import_zod21.z.string(), count: import_zod21.z.number().int().min(0) })),
|
|
1704
|
+
frequentRestaurants: import_zod21.z.array(import_zod21.z.object({ restaurantName: import_zod21.z.string(), count: import_zod21.z.number().int().min(0) })),
|
|
1705
|
+
recentMenuCategories: import_zod21.z.array(import_zod21.z.string()),
|
|
1706
|
+
recommendationContext: import_zod21.z.object({
|
|
1707
|
+
preferredMenuCategories: import_zod21.z.array(import_zod21.z.string()),
|
|
1708
|
+
excludedMenuCategories: import_zod21.z.array(import_zod21.z.string()),
|
|
1709
|
+
candidateMenuCategories: import_zod21.z.array(import_zod21.z.string())
|
|
1722
1710
|
})
|
|
1723
1711
|
});
|
|
1724
|
-
var MealGroupHistoryResponseSchema =
|
|
1712
|
+
var MealGroupHistoryResponseSchema = import_zod21.z.array(MealGroupHistoryItemSchema);
|
|
1725
1713
|
|
|
1726
1714
|
// src/domain/meal-plan/meal-plan-home-map.schema.ts
|
|
1727
|
-
var
|
|
1728
|
-
var HomeMealPlanActionKindSchema =
|
|
1715
|
+
var import_zod22 = require("zod");
|
|
1716
|
+
var HomeMealPlanActionKindSchema = import_zod22.z.enum([
|
|
1729
1717
|
"CONTINUE_DECISION",
|
|
1730
1718
|
"TODAY_UPCOMING",
|
|
1731
1719
|
"RECORD_NEEDED",
|
|
1732
1720
|
"RESPOND_JOIN_REQUEST",
|
|
1733
1721
|
"NOTIFICATION_FOLLOW_UP"
|
|
1734
1722
|
]);
|
|
1735
|
-
var HomeMealPlanActionCardSchema =
|
|
1736
|
-
actionId:
|
|
1723
|
+
var HomeMealPlanActionCardSchema = import_zod22.z.object({
|
|
1724
|
+
actionId: import_zod22.z.string().min(1),
|
|
1737
1725
|
kind: HomeMealPlanActionKindSchema,
|
|
1738
|
-
priority:
|
|
1739
|
-
title:
|
|
1740
|
-
description:
|
|
1741
|
-
primaryAction:
|
|
1742
|
-
label:
|
|
1743
|
-
href:
|
|
1726
|
+
priority: import_zod22.z.number().int().min(0),
|
|
1727
|
+
title: import_zod22.z.string().min(1),
|
|
1728
|
+
description: import_zod22.z.string().min(1),
|
|
1729
|
+
primaryAction: import_zod22.z.object({
|
|
1730
|
+
label: import_zod22.z.string().min(1),
|
|
1731
|
+
href: import_zod22.z.string().min(1)
|
|
1744
1732
|
}),
|
|
1745
1733
|
mealPlan: MyMealPlanListItemSchema.nullable(),
|
|
1746
1734
|
joinRequest: MealPlanJoinRequestSummarySchema.nullable(),
|
|
1747
1735
|
notification: MealPlanNotificationSchema.nullable().default(null)
|
|
1748
1736
|
});
|
|
1749
|
-
var HomeMealPlanDashboardResponseSchema =
|
|
1737
|
+
var HomeMealPlanDashboardResponseSchema = import_zod22.z.object({
|
|
1750
1738
|
generatedAt: ISODateTimeStringSchema,
|
|
1751
|
-
inProgress:
|
|
1752
|
-
today:
|
|
1753
|
-
recordNeeded:
|
|
1754
|
-
pendingJoinRequests:
|
|
1755
|
-
unreadNotifications:
|
|
1756
|
-
nextActions:
|
|
1757
|
-
});
|
|
1758
|
-
var MealMapLayerSchema =
|
|
1739
|
+
inProgress: import_zod22.z.array(MyMealPlanListItemSchema),
|
|
1740
|
+
today: import_zod22.z.array(MyMealPlanListItemSchema),
|
|
1741
|
+
recordNeeded: import_zod22.z.array(MyMealPlanListItemSchema),
|
|
1742
|
+
pendingJoinRequests: import_zod22.z.array(MealPlanJoinRequestSummarySchema),
|
|
1743
|
+
unreadNotifications: import_zod22.z.array(MealPlanNotificationSchema).default([]),
|
|
1744
|
+
nextActions: import_zod22.z.array(HomeMealPlanActionCardSchema)
|
|
1745
|
+
});
|
|
1746
|
+
var MealMapLayerSchema = import_zod22.z.enum([
|
|
1759
1747
|
"MY_MEAL_PLAN_PLACE",
|
|
1760
1748
|
"NEARBY_FRIEND_MEAL_PLAN",
|
|
1761
1749
|
"FRIEND_RECORD_LOCATION",
|
|
1762
1750
|
"RESTAURANT_CANDIDATE"
|
|
1763
1751
|
]);
|
|
1764
|
-
var MealMapMarkerBaseSchema =
|
|
1765
|
-
markerId:
|
|
1766
|
-
lat:
|
|
1767
|
-
lng:
|
|
1768
|
-
title:
|
|
1769
|
-
subtitle:
|
|
1770
|
-
href:
|
|
1752
|
+
var MealMapMarkerBaseSchema = import_zod22.z.object({
|
|
1753
|
+
markerId: import_zod22.z.string().min(1),
|
|
1754
|
+
lat: import_zod22.z.number().min(-90).max(90),
|
|
1755
|
+
lng: import_zod22.z.number().min(-180).max(180),
|
|
1756
|
+
title: import_zod22.z.string().min(1),
|
|
1757
|
+
subtitle: import_zod22.z.string().nullable(),
|
|
1758
|
+
href: import_zod22.z.string().min(1).nullable(),
|
|
1771
1759
|
mealPlanId: MealPlanIdSchema.nullable(),
|
|
1772
1760
|
articleId: ArticleIdSchema.nullable(),
|
|
1773
1761
|
restaurant: RestaurantSchema.nullable(),
|
|
1774
|
-
distanceMeters:
|
|
1762
|
+
distanceMeters: import_zod22.z.number().int().min(0).nullable(),
|
|
1775
1763
|
updatedAt: ISODateTimeStringSchema
|
|
1776
1764
|
});
|
|
1777
|
-
var MealMapMyMealPlanPlaceMetadataSchema =
|
|
1765
|
+
var MealMapMyMealPlanPlaceMetadataSchema = import_zod22.z.object({
|
|
1778
1766
|
ownerId: MemberIdSchema.nullable().default(null),
|
|
1779
|
-
status:
|
|
1780
|
-
participantCount:
|
|
1781
|
-
source:
|
|
1767
|
+
status: import_zod22.z.string().min(1),
|
|
1768
|
+
participantCount: import_zod22.z.number().int().min(1),
|
|
1769
|
+
source: import_zod22.z.string().min(1)
|
|
1782
1770
|
});
|
|
1783
|
-
var MealMapNearbyFriendMealPlanMetadataSchema =
|
|
1771
|
+
var MealMapNearbyFriendMealPlanMetadataSchema = import_zod22.z.object({
|
|
1784
1772
|
ownerId: MemberIdSchema.nullable().default(null),
|
|
1785
|
-
ownerName:
|
|
1786
|
-
participantCount:
|
|
1773
|
+
ownerName: import_zod22.z.string().min(1),
|
|
1774
|
+
participantCount: import_zod22.z.number().int().min(1),
|
|
1787
1775
|
expiresAt: ISODateTimeStringSchema.nullable(),
|
|
1788
|
-
source:
|
|
1776
|
+
source: import_zod22.z.string().min(1)
|
|
1789
1777
|
});
|
|
1790
|
-
var MealMapFriendRecordLocationMetadataSchema =
|
|
1778
|
+
var MealMapFriendRecordLocationMetadataSchema = import_zod22.z.object({
|
|
1791
1779
|
authorId: MemberIdSchema.nullable().default(null),
|
|
1792
|
-
authorName:
|
|
1793
|
-
imageUrl:
|
|
1794
|
-
mealDate:
|
|
1780
|
+
authorName: import_zod22.z.string().min(1),
|
|
1781
|
+
imageUrl: import_zod22.z.string().nullable().default(null),
|
|
1782
|
+
mealDate: import_zod22.z.string().min(1)
|
|
1795
1783
|
});
|
|
1796
|
-
var MealMapRestaurantCandidateCompletionBlockedReasonSchema =
|
|
1784
|
+
var MealMapRestaurantCandidateCompletionBlockedReasonSchema = import_zod22.z.enum([
|
|
1797
1785
|
"OWNER_ONLY",
|
|
1798
1786
|
"STAGE_ALREADY_COMPLETED",
|
|
1799
1787
|
"MEAL_PLAN_NOT_MUTABLE"
|
|
1800
1788
|
]);
|
|
1801
|
-
var MealMapRestaurantCandidateMetadataSchema =
|
|
1789
|
+
var MealMapRestaurantCandidateMetadataSchema = import_zod22.z.object({
|
|
1802
1790
|
stageId: MealPlanDecisionStageIdSchema,
|
|
1803
1791
|
ownerId: MemberIdSchema.nullable().default(null),
|
|
1804
|
-
status:
|
|
1805
|
-
source:
|
|
1806
|
-
stageStatus:
|
|
1807
|
-
canVote:
|
|
1808
|
-
canCompleteStage:
|
|
1792
|
+
status: import_zod22.z.string().min(1),
|
|
1793
|
+
source: import_zod22.z.enum(["search", "fallback", "manual"]).default("search"),
|
|
1794
|
+
stageStatus: import_zod22.z.enum(["OPEN", "COMPLETED", "REOPENED"]).default("OPEN"),
|
|
1795
|
+
canVote: import_zod22.z.boolean().default(false),
|
|
1796
|
+
canCompleteStage: import_zod22.z.boolean().default(false),
|
|
1809
1797
|
completionBlockedReason: MealMapRestaurantCandidateCompletionBlockedReasonSchema.nullable().default(null)
|
|
1810
1798
|
});
|
|
1811
|
-
var MealMapMarkerSchema =
|
|
1799
|
+
var MealMapMarkerSchema = import_zod22.z.discriminatedUnion("layer", [
|
|
1812
1800
|
MealMapMarkerBaseSchema.extend({
|
|
1813
|
-
layer:
|
|
1801
|
+
layer: import_zod22.z.literal("MY_MEAL_PLAN_PLACE"),
|
|
1814
1802
|
metadata: MealMapMyMealPlanPlaceMetadataSchema
|
|
1815
1803
|
}),
|
|
1816
1804
|
MealMapMarkerBaseSchema.extend({
|
|
1817
|
-
layer:
|
|
1805
|
+
layer: import_zod22.z.literal("NEARBY_FRIEND_MEAL_PLAN"),
|
|
1818
1806
|
metadata: MealMapNearbyFriendMealPlanMetadataSchema
|
|
1819
1807
|
}),
|
|
1820
1808
|
MealMapMarkerBaseSchema.extend({
|
|
1821
|
-
layer:
|
|
1809
|
+
layer: import_zod22.z.literal("FRIEND_RECORD_LOCATION"),
|
|
1822
1810
|
metadata: MealMapFriendRecordLocationMetadataSchema
|
|
1823
1811
|
}),
|
|
1824
1812
|
MealMapMarkerBaseSchema.extend({
|
|
1825
|
-
layer:
|
|
1813
|
+
layer: import_zod22.z.literal("RESTAURANT_CANDIDATE"),
|
|
1826
1814
|
metadata: MealMapRestaurantCandidateMetadataSchema
|
|
1827
1815
|
})
|
|
1828
1816
|
]);
|
|
1829
|
-
var MealMapQuerySchema =
|
|
1830
|
-
friendRecordDays:
|
|
1817
|
+
var MealMapQuerySchema = import_zod22.z.object({
|
|
1818
|
+
friendRecordDays: import_zod22.z.coerce.number().int().min(1).max(90).optional().default(7)
|
|
1831
1819
|
});
|
|
1832
|
-
var MealMapResponseSchema =
|
|
1820
|
+
var MealMapResponseSchema = import_zod22.z.object({
|
|
1833
1821
|
generatedAt: ISODateTimeStringSchema,
|
|
1834
|
-
center:
|
|
1835
|
-
lat:
|
|
1836
|
-
lng:
|
|
1837
|
-
source:
|
|
1822
|
+
center: import_zod22.z.object({
|
|
1823
|
+
lat: import_zod22.z.number().min(-90).max(90),
|
|
1824
|
+
lng: import_zod22.z.number().min(-180).max(180),
|
|
1825
|
+
source: import_zod22.z.enum(["LAST_KNOWN_LOCATION", "MY_MEAL_PLAN", "DEFAULT"])
|
|
1838
1826
|
}),
|
|
1839
|
-
layers:
|
|
1840
|
-
myMealPlanPlaces:
|
|
1841
|
-
nearbyFriendMealPlans:
|
|
1842
|
-
friendRecordLocations:
|
|
1843
|
-
restaurantCandidates:
|
|
1827
|
+
layers: import_zod22.z.object({
|
|
1828
|
+
myMealPlanPlaces: import_zod22.z.array(MealMapMarkerSchema),
|
|
1829
|
+
nearbyFriendMealPlans: import_zod22.z.array(MealMapMarkerSchema),
|
|
1830
|
+
friendRecordLocations: import_zod22.z.array(MealMapMarkerSchema),
|
|
1831
|
+
restaurantCandidates: import_zod22.z.array(MealMapMarkerSchema)
|
|
1844
1832
|
})
|
|
1845
1833
|
});
|
|
1846
1834
|
|
|
@@ -1881,222 +1869,222 @@ function compareMealPlanNotificationsByPriority(channel) {
|
|
|
1881
1869
|
}
|
|
1882
1870
|
|
|
1883
1871
|
// src/domain/promotion/referral.schema.ts
|
|
1884
|
-
var
|
|
1885
|
-
var ReferralCreateResponseSchema =
|
|
1872
|
+
var import_zod23 = require("zod");
|
|
1873
|
+
var ReferralCreateResponseSchema = import_zod23.z.object({
|
|
1886
1874
|
code: ReferralCodeSchema,
|
|
1887
|
-
link:
|
|
1875
|
+
link: import_zod23.z.string().url(),
|
|
1888
1876
|
expiresAt: ISODateTimeStringSchema
|
|
1889
1877
|
});
|
|
1890
|
-
var ReferralItemResponseSchema =
|
|
1878
|
+
var ReferralItemResponseSchema = import_zod23.z.object({
|
|
1891
1879
|
code: ReferralCodeSchema,
|
|
1892
1880
|
createdAt: ISODateTimeStringSchema,
|
|
1893
1881
|
expiresAt: ISODateTimeStringSchema,
|
|
1894
|
-
used:
|
|
1882
|
+
used: import_zod23.z.boolean(),
|
|
1895
1883
|
usedByMemberId: MemberIdSchema.nullable(),
|
|
1896
|
-
usedByUsername:
|
|
1884
|
+
usedByUsername: import_zod23.z.string().nullable()
|
|
1897
1885
|
});
|
|
1898
|
-
var RedeemReferralRequestSchema =
|
|
1886
|
+
var RedeemReferralRequestSchema = import_zod23.z.object({
|
|
1899
1887
|
code: ReferralCodeSchema
|
|
1900
1888
|
});
|
|
1901
1889
|
|
|
1902
1890
|
// src/domain/promotion/coupon.schema.ts
|
|
1903
|
-
var
|
|
1904
|
-
var CouponTypeSchema =
|
|
1905
|
-
var CouponStatusSchema =
|
|
1906
|
-
var CouponResponseSchema =
|
|
1891
|
+
var import_zod24 = require("zod");
|
|
1892
|
+
var CouponTypeSchema = import_zod24.z.enum(["DISCOUNT", "SERVICE"]);
|
|
1893
|
+
var CouponStatusSchema = import_zod24.z.enum(["UNUSED", "USED"]);
|
|
1894
|
+
var CouponResponseSchema = import_zod24.z.object({
|
|
1907
1895
|
couponId: CouponIdSchema,
|
|
1908
|
-
title:
|
|
1909
|
-
shopName:
|
|
1896
|
+
title: import_zod24.z.string(),
|
|
1897
|
+
shopName: import_zod24.z.string(),
|
|
1910
1898
|
type: CouponTypeSchema,
|
|
1911
|
-
condition:
|
|
1899
|
+
condition: import_zod24.z.string(),
|
|
1912
1900
|
expiresAt: ISODateStringSchema,
|
|
1913
|
-
used:
|
|
1914
|
-
thumbnailUrl:
|
|
1901
|
+
used: import_zod24.z.boolean(),
|
|
1902
|
+
thumbnailUrl: import_zod24.z.string().url()
|
|
1915
1903
|
});
|
|
1916
1904
|
|
|
1917
1905
|
// src/domain/promotion/challenge.schema.ts
|
|
1918
|
-
var
|
|
1919
|
-
var RewardTypeSchema =
|
|
1920
|
-
var WeekProgressSchema =
|
|
1921
|
-
days:
|
|
1922
|
-
completed:
|
|
1923
|
-
goal:
|
|
1906
|
+
var import_zod25 = require("zod");
|
|
1907
|
+
var RewardTypeSchema = import_zod25.z.enum(["WEEK", "MONTH"]);
|
|
1908
|
+
var WeekProgressSchema = import_zod25.z.object({
|
|
1909
|
+
days: import_zod25.z.array(import_zod25.z.boolean()),
|
|
1910
|
+
completed: import_zod25.z.number().int().min(0),
|
|
1911
|
+
goal: import_zod25.z.number().int().positive()
|
|
1924
1912
|
});
|
|
1925
|
-
var MonthProgressSchema =
|
|
1926
|
-
count:
|
|
1927
|
-
goal:
|
|
1913
|
+
var MonthProgressSchema = import_zod25.z.object({
|
|
1914
|
+
count: import_zod25.z.number().int().min(0),
|
|
1915
|
+
goal: import_zod25.z.number().int().positive()
|
|
1928
1916
|
});
|
|
1929
|
-
var ChallengeStatusResponseSchema =
|
|
1917
|
+
var ChallengeStatusResponseSchema = import_zod25.z.object({
|
|
1930
1918
|
week: WeekProgressSchema,
|
|
1931
1919
|
month: MonthProgressSchema,
|
|
1932
|
-
weekRewardAvailable:
|
|
1933
|
-
monthRewardAvailable:
|
|
1920
|
+
weekRewardAvailable: import_zod25.z.boolean(),
|
|
1921
|
+
monthRewardAvailable: import_zod25.z.boolean()
|
|
1934
1922
|
});
|
|
1935
|
-
var ClaimChallengeRewardRequestSchema =
|
|
1923
|
+
var ClaimChallengeRewardRequestSchema = import_zod25.z.object({
|
|
1936
1924
|
type: RewardTypeSchema
|
|
1937
1925
|
});
|
|
1938
|
-
var ClaimChallengeRewardResponseSchema =
|
|
1926
|
+
var ClaimChallengeRewardResponseSchema = import_zod25.z.object({
|
|
1939
1927
|
rewardType: RewardTypeSchema,
|
|
1940
|
-
claimed:
|
|
1928
|
+
claimed: import_zod25.z.boolean()
|
|
1941
1929
|
});
|
|
1942
1930
|
|
|
1943
1931
|
// src/domain/push/push.schema.ts
|
|
1944
|
-
var
|
|
1945
|
-
var PushProviderSchema =
|
|
1946
|
-
var PushPlatformSchema =
|
|
1947
|
-
var PushPermissionStatusSchema =
|
|
1932
|
+
var import_zod26 = require("zod");
|
|
1933
|
+
var PushProviderSchema = import_zod26.z.enum(["FCM", "APNS_LIVE_ACTIVITY"]);
|
|
1934
|
+
var PushPlatformSchema = import_zod26.z.enum(["WEB", "ANDROID", "IOS"]);
|
|
1935
|
+
var PushPermissionStatusSchema = import_zod26.z.enum([
|
|
1948
1936
|
"UNKNOWN",
|
|
1949
1937
|
"PROMPT",
|
|
1950
1938
|
"GRANTED",
|
|
1951
1939
|
"DENIED"
|
|
1952
1940
|
]);
|
|
1953
|
-
var PushTokenStatusSchema =
|
|
1954
|
-
var RegisterPushTokenRequestSchema =
|
|
1941
|
+
var PushTokenStatusSchema = import_zod26.z.enum(["ACTIVE", "REVOKED", "DISABLED"]);
|
|
1942
|
+
var RegisterPushTokenRequestSchema = import_zod26.z.object({
|
|
1955
1943
|
provider: PushProviderSchema.default("FCM"),
|
|
1956
1944
|
platform: PushPlatformSchema,
|
|
1957
|
-
token:
|
|
1958
|
-
deviceId:
|
|
1959
|
-
appVersion:
|
|
1960
|
-
buildNumber:
|
|
1945
|
+
token: import_zod26.z.string().min(10),
|
|
1946
|
+
deviceId: import_zod26.z.string().min(1).max(128),
|
|
1947
|
+
appVersion: import_zod26.z.string().min(1).max(64).optional(),
|
|
1948
|
+
buildNumber: import_zod26.z.string().min(1).max(64).optional(),
|
|
1961
1949
|
permissionStatus: PushPermissionStatusSchema
|
|
1962
1950
|
});
|
|
1963
|
-
var RevokePushTokenRequestSchema =
|
|
1951
|
+
var RevokePushTokenRequestSchema = import_zod26.z.object({
|
|
1964
1952
|
provider: PushProviderSchema.default("FCM"),
|
|
1965
|
-
token:
|
|
1966
|
-
deviceId:
|
|
1953
|
+
token: import_zod26.z.string().min(10).optional(),
|
|
1954
|
+
deviceId: import_zod26.z.string().min(1).max(128).optional()
|
|
1967
1955
|
});
|
|
1968
|
-
var PushTokenResponseSchema =
|
|
1969
|
-
pushTokenId:
|
|
1956
|
+
var PushTokenResponseSchema = import_zod26.z.object({
|
|
1957
|
+
pushTokenId: import_zod26.z.string().uuid(),
|
|
1970
1958
|
provider: PushProviderSchema,
|
|
1971
1959
|
platform: PushPlatformSchema,
|
|
1972
|
-
deviceId:
|
|
1960
|
+
deviceId: import_zod26.z.string(),
|
|
1973
1961
|
status: PushTokenStatusSchema,
|
|
1974
1962
|
permissionStatus: PushPermissionStatusSchema,
|
|
1975
|
-
appVersion:
|
|
1976
|
-
buildNumber:
|
|
1963
|
+
appVersion: import_zod26.z.string().nullable(),
|
|
1964
|
+
buildNumber: import_zod26.z.string().nullable(),
|
|
1977
1965
|
lastSeenAt: ISODateTimeStringSchema,
|
|
1978
1966
|
revokedAt: ISODateTimeStringSchema.nullable()
|
|
1979
1967
|
});
|
|
1980
|
-
var PushPayloadSchemaVersionSchema =
|
|
1981
|
-
var MealPlanPushPayloadDataSchema =
|
|
1968
|
+
var PushPayloadSchemaVersionSchema = import_zod26.z.literal("2026-06-17");
|
|
1969
|
+
var MealPlanPushPayloadDataSchema = import_zod26.z.object({
|
|
1982
1970
|
schemaVersion: PushPayloadSchemaVersionSchema,
|
|
1983
|
-
notificationId:
|
|
1971
|
+
notificationId: import_zod26.z.string().min(1),
|
|
1984
1972
|
kind: MealPlanNotificationKindSchema,
|
|
1985
1973
|
mealPlanId: MealPlanIdSchema,
|
|
1986
|
-
deepLink:
|
|
1987
|
-
title:
|
|
1988
|
-
body:
|
|
1989
|
-
fcmPriority:
|
|
1990
|
-
liveActivityPriority:
|
|
1974
|
+
deepLink: import_zod26.z.string().min(1),
|
|
1975
|
+
title: import_zod26.z.string().min(1),
|
|
1976
|
+
body: import_zod26.z.string().min(1),
|
|
1977
|
+
fcmPriority: import_zod26.z.coerce.number().int().min(0),
|
|
1978
|
+
liveActivityPriority: import_zod26.z.coerce.number().int().min(0),
|
|
1991
1979
|
liveActivityBehavior: MealPlanLiveActivityBehaviorSchema
|
|
1992
1980
|
});
|
|
1993
|
-
var PushDeliveryStatusSchema =
|
|
1981
|
+
var PushDeliveryStatusSchema = import_zod26.z.enum([
|
|
1994
1982
|
"PENDING",
|
|
1995
1983
|
"SENT",
|
|
1996
1984
|
"FAILED",
|
|
1997
1985
|
"SKIPPED"
|
|
1998
1986
|
]);
|
|
1999
|
-
var PushDeliveryAttemptResultSchema =
|
|
1987
|
+
var PushDeliveryAttemptResultSchema = import_zod26.z.enum([
|
|
2000
1988
|
"SENT",
|
|
2001
1989
|
"FAILED",
|
|
2002
1990
|
"SKIPPED"
|
|
2003
1991
|
]);
|
|
2004
|
-
var PushDeliveryAttemptSummarySchema =
|
|
2005
|
-
attemptId:
|
|
2006
|
-
outboxId:
|
|
2007
|
-
pushTokenId:
|
|
1992
|
+
var PushDeliveryAttemptSummarySchema = import_zod26.z.object({
|
|
1993
|
+
attemptId: import_zod26.z.string().uuid(),
|
|
1994
|
+
outboxId: import_zod26.z.string().uuid(),
|
|
1995
|
+
pushTokenId: import_zod26.z.string().uuid().nullable(),
|
|
2008
1996
|
provider: PushProviderSchema,
|
|
2009
1997
|
result: PushDeliveryAttemptResultSchema,
|
|
2010
|
-
providerMessageId:
|
|
2011
|
-
errorCode:
|
|
2012
|
-
errorMessage:
|
|
2013
|
-
invalidToken:
|
|
1998
|
+
providerMessageId: import_zod26.z.string().nullable(),
|
|
1999
|
+
errorCode: import_zod26.z.string().nullable(),
|
|
2000
|
+
errorMessage: import_zod26.z.string().nullable(),
|
|
2001
|
+
invalidToken: import_zod26.z.boolean(),
|
|
2014
2002
|
createdAt: ISODateTimeStringSchema
|
|
2015
2003
|
});
|
|
2016
|
-
var PushDeliveryOutboxSummarySchema =
|
|
2017
|
-
outboxId:
|
|
2018
|
-
notificationId:
|
|
2019
|
-
memberId:
|
|
2004
|
+
var PushDeliveryOutboxSummarySchema = import_zod26.z.object({
|
|
2005
|
+
outboxId: import_zod26.z.string().uuid(),
|
|
2006
|
+
notificationId: import_zod26.z.string().min(1),
|
|
2007
|
+
memberId: import_zod26.z.number().int().positive(),
|
|
2020
2008
|
status: PushDeliveryStatusSchema,
|
|
2021
|
-
attemptCount:
|
|
2022
|
-
lastError:
|
|
2009
|
+
attemptCount: import_zod26.z.number().int().min(0),
|
|
2010
|
+
lastError: import_zod26.z.string().nullable(),
|
|
2023
2011
|
nextAttemptAt: ISODateTimeStringSchema.nullable(),
|
|
2024
2012
|
sentAt: ISODateTimeStringSchema.nullable(),
|
|
2025
2013
|
createdAt: ISODateTimeStringSchema
|
|
2026
2014
|
});
|
|
2027
2015
|
|
|
2028
2016
|
// src/domain/live-activity/live-activity.schema.ts
|
|
2029
|
-
var
|
|
2030
|
-
var MealPlanLiveActivityPlatformSchema =
|
|
2017
|
+
var import_zod27 = require("zod");
|
|
2018
|
+
var MealPlanLiveActivityPlatformSchema = import_zod27.z.enum([
|
|
2031
2019
|
"IOS_LIVE_ACTIVITY",
|
|
2032
2020
|
"ANDROID_LIVE_UPDATE"
|
|
2033
2021
|
]);
|
|
2034
|
-
var MealPlanLiveActivitySessionStatusSchema =
|
|
2022
|
+
var MealPlanLiveActivitySessionStatusSchema = import_zod27.z.enum([
|
|
2035
2023
|
"ACTIVE",
|
|
2036
2024
|
"ENDED",
|
|
2037
2025
|
"EXPIRED",
|
|
2038
2026
|
"DISABLED"
|
|
2039
2027
|
]);
|
|
2040
|
-
var MealPlanLiveActivityUpdateStatusSchema =
|
|
2028
|
+
var MealPlanLiveActivityUpdateStatusSchema = import_zod27.z.enum([
|
|
2041
2029
|
"PENDING",
|
|
2042
2030
|
"SENT",
|
|
2043
2031
|
"FAILED",
|
|
2044
2032
|
"SKIPPED"
|
|
2045
2033
|
]);
|
|
2046
|
-
var RegisterMealPlanLiveActivitySessionRequestSchema =
|
|
2034
|
+
var RegisterMealPlanLiveActivitySessionRequestSchema = import_zod27.z.object({
|
|
2047
2035
|
platform: MealPlanLiveActivityPlatformSchema,
|
|
2048
|
-
deviceId:
|
|
2049
|
-
activityId:
|
|
2050
|
-
pushToken:
|
|
2051
|
-
appVersion:
|
|
2052
|
-
buildNumber:
|
|
2036
|
+
deviceId: import_zod27.z.string().min(1).max(128),
|
|
2037
|
+
activityId: import_zod27.z.string().min(1).max(128),
|
|
2038
|
+
pushToken: import_zod27.z.string().min(10).optional(),
|
|
2039
|
+
appVersion: import_zod27.z.string().min(1).max(64).optional(),
|
|
2040
|
+
buildNumber: import_zod27.z.string().min(1).max(64).optional()
|
|
2053
2041
|
});
|
|
2054
|
-
var EndMealPlanLiveActivitySessionRequestSchema =
|
|
2042
|
+
var EndMealPlanLiveActivitySessionRequestSchema = import_zod27.z.object({
|
|
2055
2043
|
platform: MealPlanLiveActivityPlatformSchema.optional(),
|
|
2056
|
-
deviceId:
|
|
2057
|
-
activityId:
|
|
2044
|
+
deviceId: import_zod27.z.string().min(1).max(128).optional(),
|
|
2045
|
+
activityId: import_zod27.z.string().min(1).max(128).optional()
|
|
2058
2046
|
});
|
|
2059
|
-
var MealPlanLiveActivityStateSchema =
|
|
2047
|
+
var MealPlanLiveActivityStateSchema = import_zod27.z.object({
|
|
2060
2048
|
mealPlanId: MealPlanIdSchema,
|
|
2061
|
-
title:
|
|
2062
|
-
status:
|
|
2049
|
+
title: import_zod27.z.string().min(1),
|
|
2050
|
+
status: import_zod27.z.string().min(1),
|
|
2063
2051
|
scheduledAt: ISODateTimeStringSchema.nullable(),
|
|
2064
|
-
restaurantName:
|
|
2065
|
-
placeName:
|
|
2066
|
-
deepLink:
|
|
2067
|
-
progressLabel:
|
|
2052
|
+
restaurantName: import_zod27.z.string().nullable(),
|
|
2053
|
+
placeName: import_zod27.z.string().nullable(),
|
|
2054
|
+
deepLink: import_zod27.z.string().min(1),
|
|
2055
|
+
progressLabel: import_zod27.z.string().min(1),
|
|
2068
2056
|
updatedAt: ISODateTimeStringSchema
|
|
2069
2057
|
});
|
|
2070
|
-
var MealPlanLiveActivitySessionResponseSchema =
|
|
2071
|
-
sessionId:
|
|
2058
|
+
var MealPlanLiveActivitySessionResponseSchema = import_zod27.z.object({
|
|
2059
|
+
sessionId: import_zod27.z.string().uuid(),
|
|
2072
2060
|
mealPlanId: MealPlanIdSchema,
|
|
2073
|
-
memberId:
|
|
2061
|
+
memberId: import_zod27.z.number().int().positive(),
|
|
2074
2062
|
platform: MealPlanLiveActivityPlatformSchema,
|
|
2075
2063
|
devicePlatform: PushPlatformSchema,
|
|
2076
|
-
deviceId:
|
|
2077
|
-
activityId:
|
|
2064
|
+
deviceId: import_zod27.z.string(),
|
|
2065
|
+
activityId: import_zod27.z.string(),
|
|
2078
2066
|
status: MealPlanLiveActivitySessionStatusSchema,
|
|
2079
|
-
appVersion:
|
|
2080
|
-
buildNumber:
|
|
2067
|
+
appVersion: import_zod27.z.string().nullable(),
|
|
2068
|
+
buildNumber: import_zod27.z.string().nullable(),
|
|
2081
2069
|
lastEventKind: MealPlanNotificationKindSchema.nullable(),
|
|
2082
2070
|
lastBehavior: MealPlanLiveActivityBehaviorSchema.nullable(),
|
|
2083
2071
|
lastUpdateStatus: MealPlanLiveActivityUpdateStatusSchema.nullable(),
|
|
2084
|
-
lastError:
|
|
2072
|
+
lastError: import_zod27.z.string().nullable(),
|
|
2085
2073
|
startedAt: ISODateTimeStringSchema,
|
|
2086
2074
|
endedAt: ISODateTimeStringSchema.nullable(),
|
|
2087
2075
|
updatedAt: ISODateTimeStringSchema
|
|
2088
2076
|
});
|
|
2089
|
-
var MealPlanLiveActivitySessionListResponseSchema =
|
|
2077
|
+
var MealPlanLiveActivitySessionListResponseSchema = import_zod27.z.object({
|
|
2090
2078
|
mealPlanId: MealPlanIdSchema,
|
|
2091
2079
|
state: MealPlanLiveActivityStateSchema,
|
|
2092
|
-
sessions:
|
|
2080
|
+
sessions: import_zod27.z.array(MealPlanLiveActivitySessionResponseSchema)
|
|
2093
2081
|
});
|
|
2094
2082
|
|
|
2095
2083
|
// src/domain/common/contracts/endpoint.ts
|
|
2096
|
-
var
|
|
2097
|
-
var NoBodySchema =
|
|
2098
|
-
var NoQuerySchema =
|
|
2099
|
-
var NoParamsSchema =
|
|
2084
|
+
var import_zod28 = require("zod");
|
|
2085
|
+
var NoBodySchema = import_zod28.z.undefined();
|
|
2086
|
+
var NoQuerySchema = import_zod28.z.undefined();
|
|
2087
|
+
var NoParamsSchema = import_zod28.z.undefined();
|
|
2100
2088
|
var endpoint = (contract) => ({
|
|
2101
2089
|
method: contract.method,
|
|
2102
2090
|
path: contract.path,
|
|
@@ -2107,12 +2095,12 @@ var endpoint = (contract) => ({
|
|
|
2107
2095
|
});
|
|
2108
2096
|
|
|
2109
2097
|
// src/domain/common/contracts/api.ts
|
|
2110
|
-
var memberIdParam =
|
|
2111
|
-
var articleIdParam =
|
|
2112
|
-
var commentIdParam =
|
|
2113
|
-
var mealPlanIdParam =
|
|
2114
|
-
var mealPlanInviteIdParam =
|
|
2115
|
-
var mealPlanJoinRequestIdParam =
|
|
2098
|
+
var memberIdParam = import_zod29.z.object({ memberId: MemberIdSchema });
|
|
2099
|
+
var articleIdParam = import_zod29.z.object({ articleId: ArticleIdSchema });
|
|
2100
|
+
var commentIdParam = import_zod29.z.object({ commentId: CommentIdSchema });
|
|
2101
|
+
var mealPlanIdParam = import_zod29.z.object({ mealPlanId: MealPlanIdSchema });
|
|
2102
|
+
var mealPlanInviteIdParam = import_zod29.z.object({ inviteId: MealPlanInviteIdSchema });
|
|
2103
|
+
var mealPlanJoinRequestIdParam = import_zod29.z.object({ requestId: MealPlanJoinRequestIdSchema });
|
|
2116
2104
|
var mealPlanDecisionStageIdParam = mealPlanIdParam.extend({
|
|
2117
2105
|
stageId: MealPlanDecisionStageIdSchema
|
|
2118
2106
|
});
|
|
@@ -2123,18 +2111,18 @@ var mealPlanDecisionTaskKeyParam = mealPlanIdParam.extend({
|
|
|
2123
2111
|
taskKey: MealPlanDecisionTaskKeySchema
|
|
2124
2112
|
});
|
|
2125
2113
|
var mealPlanDecisionSnapshotIdParam = mealPlanIdParam.extend({
|
|
2126
|
-
snapshotId:
|
|
2114
|
+
snapshotId: import_zod29.z.string().uuid()
|
|
2127
2115
|
});
|
|
2128
2116
|
var mealPlanParticipantIdParam = mealPlanIdParam.extend({
|
|
2129
|
-
participantId:
|
|
2117
|
+
participantId: import_zod29.z.string().uuid()
|
|
2130
2118
|
});
|
|
2131
|
-
var mealPlanShareTokenParam =
|
|
2132
|
-
var notificationIdParam =
|
|
2133
|
-
var couponIdParam =
|
|
2134
|
-
var mealGroupIdParam =
|
|
2119
|
+
var mealPlanShareTokenParam = import_zod29.z.object({ token: MealPlanShareLinkTokenSchema });
|
|
2120
|
+
var notificationIdParam = import_zod29.z.object({ notificationId: import_zod29.z.string().min(1) });
|
|
2121
|
+
var couponIdParam = import_zod29.z.object({ couponId: CouponIdSchema });
|
|
2122
|
+
var mealGroupIdParam = import_zod29.z.object({ mealGroupId: MealGroupIdSchema });
|
|
2135
2123
|
var mealGroupMemberIdParam = mealGroupIdParam.extend({ memberId: MemberIdSchema });
|
|
2136
|
-
var friendRequestIdParam =
|
|
2137
|
-
var sseTokenQuery =
|
|
2124
|
+
var friendRequestIdParam = import_zod29.z.object({ requestId: FriendRequestIdSchema });
|
|
2125
|
+
var sseTokenQuery = import_zod29.z.object({ token: import_zod29.z.string().min(1) });
|
|
2138
2126
|
var apiContract = {
|
|
2139
2127
|
auth: {
|
|
2140
2128
|
signup: endpoint({ method: "POST", path: "/auth/signup", body: SignupRequestSchema, response: SignupResponseSchema }),
|
|
@@ -2162,7 +2150,7 @@ var apiContract = {
|
|
|
2162
2150
|
mealStatus: {
|
|
2163
2151
|
my: endpoint({ method: "GET", path: "/members/me/meal-status", response: MealStatusResponseSchema }),
|
|
2164
2152
|
updateMealStatus: endpoint({ method: "PATCH", path: "/members/me/meal-status", body: UpdateMealStatusRequestSchema, response: NoContentSchema }),
|
|
2165
|
-
friendMealStatus: endpoint({ method: "GET", path: "/friends/me/meals", query: FriendMealQuerySchema, response:
|
|
2153
|
+
friendMealStatus: endpoint({ method: "GET", path: "/friends/me/meals", query: FriendMealQuerySchema, response: import_zod29.z.array(FriendMealItemResponseSchema) })
|
|
2166
2154
|
},
|
|
2167
2155
|
articles: {
|
|
2168
2156
|
list: endpoint({ method: "GET", path: "/articles/home", query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
|
|
@@ -2201,7 +2189,7 @@ var apiContract = {
|
|
|
2201
2189
|
exposeNearbyFriends: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/nearby-friends/expose", pathParams: mealPlanIdParam, body: ExposeMealPlanToNearbyFriendsRequestSchema, response: ExposeMealPlanToNearbyFriendsResponseSchema }),
|
|
2202
2190
|
closeNearbyFriends: endpoint({ method: "DELETE", path: "/meal-plans/:mealPlanId/nearby-friends/expose", pathParams: mealPlanIdParam, response: NoContentSchema }),
|
|
2203
2191
|
nearbyFriendExposureEligibility: endpoint({ method: "GET", path: "/meal-plans/nearby-friends/eligibility", response: NearbyFriendExposureEligibilitySchema }),
|
|
2204
|
-
nearbyFriends: endpoint({ method: "GET", path: "/meal-plans/nearby-friends", response:
|
|
2192
|
+
nearbyFriends: endpoint({ method: "GET", path: "/meal-plans/nearby-friends", response: import_zod29.z.array(NearbyFriendMealPlanSummarySchema) }),
|
|
2205
2193
|
requestJoin: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/join-requests", pathParams: mealPlanIdParam, body: CreateMealPlanJoinRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
2206
2194
|
acceptJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/accept", pathParams: mealPlanJoinRequestIdParam, response: MealPlanResponseSchema }),
|
|
2207
2195
|
rejectJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/reject", pathParams: mealPlanJoinRequestIdParam, response: NoContentSchema }),
|
|
@@ -2217,7 +2205,7 @@ var apiContract = {
|
|
|
2217
2205
|
},
|
|
2218
2206
|
mealGroups: {
|
|
2219
2207
|
create: endpoint({ method: "POST", path: "/meal-groups", body: CreateMealGroupRequestSchema, response: MealGroupResponseSchema }),
|
|
2220
|
-
list: endpoint({ method: "GET", path: "/meal-groups", response:
|
|
2208
|
+
list: endpoint({ method: "GET", path: "/meal-groups", response: import_zod29.z.array(MealGroupResponseSchema) }),
|
|
2221
2209
|
detail: endpoint({ method: "GET", path: "/meal-groups/:mealGroupId", pathParams: mealGroupIdParam, response: MealGroupResponseSchema }),
|
|
2222
2210
|
startMealPlan: endpoint({ method: "POST", path: "/meal-groups/:mealGroupId/meal-plans", pathParams: mealGroupIdParam, body: StartMealPlanFromGroupRequestSchema, response: CreateMealPlanResponseSchema }),
|
|
2223
2211
|
history: endpoint({ method: "GET", path: "/meal-groups/:mealGroupId/history", pathParams: mealGroupIdParam, response: MealGroupHistoryResponseSchema }),
|
|
@@ -2227,11 +2215,11 @@ var apiContract = {
|
|
|
2227
2215
|
removeMember: endpoint({ method: "DELETE", path: "/meal-groups/:mealGroupId/members/:memberId", pathParams: mealGroupMemberIdParam, response: MealGroupResponseSchema })
|
|
2228
2216
|
},
|
|
2229
2217
|
friends: {
|
|
2230
|
-
list: endpoint({ method: "GET", path: "/friends", response:
|
|
2231
|
-
blockList: endpoint({ method: "GET", path: "/friends/blocks", response:
|
|
2218
|
+
list: endpoint({ method: "GET", path: "/friends", response: import_zod29.z.array(FriendListItemResponseSchema) }),
|
|
2219
|
+
blockList: endpoint({ method: "GET", path: "/friends/blocks", response: import_zod29.z.array(FriendBlockItemResponseSchema) }),
|
|
2232
2220
|
search: endpoint({ method: "GET", path: "/friends/search", query: MemberSearchQuerySchema, response: MemberSerachResponseSchema }),
|
|
2233
|
-
incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response:
|
|
2234
|
-
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoing", response:
|
|
2221
|
+
incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response: import_zod29.z.array(FriendRequestItemResponseSchema) }),
|
|
2222
|
+
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoing", response: import_zod29.z.array(FriendRequestItemResponseSchema) }),
|
|
2235
2223
|
sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
|
|
2236
2224
|
acceptRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/accept", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
2237
2225
|
rejectRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/reject", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
@@ -2241,7 +2229,7 @@ var apiContract = {
|
|
|
2241
2229
|
unfriend: endpoint({ method: "DELETE", path: "/friends/:memberId", pathParams: memberIdParam, response: NoContentSchema })
|
|
2242
2230
|
},
|
|
2243
2231
|
coupons: {
|
|
2244
|
-
list: endpoint({ method: "GET", path: "/coupons", response:
|
|
2232
|
+
list: endpoint({ method: "GET", path: "/coupons", response: import_zod29.z.array(CouponResponseSchema) }),
|
|
2245
2233
|
use: endpoint({ method: "POST", path: "/coupons/:couponId/use", pathParams: couponIdParam, response: NoContentSchema })
|
|
2246
2234
|
},
|
|
2247
2235
|
challenges: {
|
|
@@ -2249,17 +2237,17 @@ var apiContract = {
|
|
|
2249
2237
|
claimReward: endpoint({ method: "POST", path: "/challenges/rewards", body: ClaimChallengeRewardRequestSchema, response: NoContentSchema })
|
|
2250
2238
|
},
|
|
2251
2239
|
referrals: {
|
|
2252
|
-
list: endpoint({ method: "GET", path: "/referrals", response:
|
|
2240
|
+
list: endpoint({ method: "GET", path: "/referrals", response: import_zod29.z.array(ReferralItemResponseSchema) }),
|
|
2253
2241
|
create: endpoint({ method: "POST", path: "/referrals", response: ReferralCreateResponseSchema }),
|
|
2254
2242
|
redeem: endpoint({ method: "POST", path: "/referrals/redeem", body: RedeemReferralRequestSchema, response: NoContentSchema })
|
|
2255
2243
|
},
|
|
2256
2244
|
notifications: {
|
|
2257
|
-
list: endpoint({ method: "GET", path: "/notifications", response:
|
|
2245
|
+
list: endpoint({ method: "GET", path: "/notifications", response: import_zod29.z.array(MealPlanNotificationSchema) }),
|
|
2258
2246
|
markRead: endpoint({ method: "PATCH", path: "/notifications/:notificationId/read", pathParams: notificationIdParam, response: MealPlanNotificationSchema }),
|
|
2259
2247
|
delete: endpoint({ method: "DELETE", path: "/notifications/:notificationId", pathParams: notificationIdParam, response: NoContentSchema })
|
|
2260
2248
|
},
|
|
2261
2249
|
pushTokens: {
|
|
2262
|
-
list: endpoint({ method: "GET", path: "/push-tokens", response:
|
|
2250
|
+
list: endpoint({ method: "GET", path: "/push-tokens", response: import_zod29.z.array(PushTokenResponseSchema) }),
|
|
2263
2251
|
register: endpoint({ method: "POST", path: "/push-tokens", body: RegisterPushTokenRequestSchema, response: PushTokenResponseSchema }),
|
|
2264
2252
|
revoke: endpoint({ method: "POST", path: "/push-tokens/revoke", body: RevokePushTokenRequestSchema, response: NoContentSchema })
|
|
2265
2253
|
},
|
|
@@ -2269,10 +2257,10 @@ var apiContract = {
|
|
|
2269
2257
|
endMealPlanSessions: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/live-activity/end", pathParams: mealPlanIdParam, body: EndMealPlanLiveActivitySessionRequestSchema, response: NoContentSchema })
|
|
2270
2258
|
},
|
|
2271
2259
|
sse: {
|
|
2272
|
-
notifications: endpoint({ method: "GET", path: "/sse/notifications", query: sseTokenQuery, response:
|
|
2260
|
+
notifications: endpoint({ method: "GET", path: "/sse/notifications", query: sseTokenQuery, response: import_zod29.z.any() })
|
|
2273
2261
|
},
|
|
2274
2262
|
health: {
|
|
2275
|
-
healthCheck: endpoint({ method: "GET", path: "/", response:
|
|
2263
|
+
healthCheck: endpoint({ method: "GET", path: "/", response: import_zod29.z.string() })
|
|
2276
2264
|
}
|
|
2277
2265
|
};
|
|
2278
2266
|
|