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