@kimdaegyu/babmukdang-shared 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-OPMBGBYS.js → chunk-2W4HVSYK.js} +64 -52
- package/dist/{chunk-3TY6OPD3.js → chunk-CUOJE3ER.js} +2 -2
- package/dist/chunk-FODWQLEY.js +346 -0
- package/dist/{chunk-WYBFBLQC.js → chunk-HHU5TRDP.js} +1 -1
- package/dist/{chunk-7UZD4LBQ.js → chunk-IW342TDD.js} +21 -23
- package/dist/domain/article/index.js +2 -2
- package/dist/domain/common/index.cjs +0 -1
- package/dist/domain/common/index.js +11 -11
- package/dist/domain/friend/index.js +2 -2
- package/dist/domain/index.cjs +284 -248
- package/dist/domain/index.d.cts +14 -3
- package/dist/domain/index.d.ts +14 -3
- package/dist/domain/index.js +66 -54
- package/dist/domain/live-activity/index.js +6 -6
- package/dist/domain/meal/index.js +2 -2
- package/dist/domain/meal-plan/index.cjs +149 -112
- package/dist/domain/meal-plan/index.d.cts +1207 -1
- package/dist/domain/meal-plan/index.d.ts +1207 -1
- package/dist/domain/meal-plan/index.js +16 -4
- package/dist/domain/push/index.js +4 -4
- package/dist/index.cjs +278 -248
- package/dist/index.js +13 -13
- package/package.json +1 -1
- package/dist/chunk-LEH6UFL7.js +0 -314
- package/dist/{chunk-6O2YTBVC.js → chunk-EQLAVUHF.js} +3 -3
- package/dist/{chunk-NENVUHL5.js → chunk-IRAFNZDL.js} +4 -4
- package/dist/{chunk-VD3VGLBQ.js → chunk-Q6Y2NBB6.js} +3 -3
- package/dist/{chunk-GOOH2LGN.js → chunk-QPTK7F7Y.js} +6 -6
package/dist/index.cjs
CHANGED
|
@@ -168,6 +168,12 @@ __export(domain_exports, {
|
|
|
168
168
|
MealPlanDecisionTaskKeySchema: () => MealPlanDecisionTaskKeySchema,
|
|
169
169
|
MealPlanDecisionTaskProgressSchema: () => MealPlanDecisionTaskProgressSchema,
|
|
170
170
|
MealPlanDecisionTaskStatusSchema: () => MealPlanDecisionTaskStatusSchema,
|
|
171
|
+
MealPlanDecisionVoteSocketAckSchema: () => MealPlanDecisionVoteSocketAckSchema,
|
|
172
|
+
MealPlanDecisionVoteSocketErrorSchema: () => MealPlanDecisionVoteSocketErrorSchema,
|
|
173
|
+
MealPlanDecisionVoteSocketEvent: () => MealPlanDecisionVoteSocketEvent,
|
|
174
|
+
MealPlanDecisionVoteSocketFailureAckSchema: () => MealPlanDecisionVoteSocketFailureAckSchema,
|
|
175
|
+
MealPlanDecisionVoteSocketPayloadSchema: () => MealPlanDecisionVoteSocketPayloadSchema,
|
|
176
|
+
MealPlanDecisionVoteSocketSuccessAckSchema: () => MealPlanDecisionVoteSocketSuccessAckSchema,
|
|
171
177
|
MealPlanGuestParticipantSchema: () => MealPlanGuestParticipantSchema,
|
|
172
178
|
MealPlanGuestSessionQuerySchema: () => MealPlanGuestSessionQuerySchema,
|
|
173
179
|
MealPlanGuestSessionResponseSchema: () => MealPlanGuestSessionResponseSchema,
|
|
@@ -615,7 +621,7 @@ var SignupResponseSchema = import_zod8.z.object({
|
|
|
615
621
|
});
|
|
616
622
|
|
|
617
623
|
// src/domain/common/contracts/api.ts
|
|
618
|
-
var
|
|
624
|
+
var import_zod30 = require("zod");
|
|
619
625
|
|
|
620
626
|
// src/domain/common/schema/cache-invalidation.schema.ts
|
|
621
627
|
var import_zod9 = require("zod");
|
|
@@ -1579,219 +1585,244 @@ var MealPlanNotificationSchema = import_zod19.z.object({
|
|
|
1579
1585
|
readAt: ISODateTimeStringSchema.nullable()
|
|
1580
1586
|
});
|
|
1581
1587
|
|
|
1582
|
-
// src/domain/meal-plan/meal-plan
|
|
1588
|
+
// src/domain/meal-plan/meal-plan.socket.ts
|
|
1583
1589
|
var import_zod20 = require("zod");
|
|
1584
|
-
var
|
|
1590
|
+
var MealPlanDecisionVoteSocketEvent = "mealPlan:decision:vote";
|
|
1591
|
+
var MealPlanDecisionVoteSocketPayloadSchema = CreateMealPlanVoteRequestSchema.extend({
|
|
1592
|
+
mealPlanId: MealPlanIdSchema,
|
|
1593
|
+
stageId: MealPlanDecisionStageIdSchema,
|
|
1594
|
+
guestSessionToken: import_zod20.z.string().min(1).optional()
|
|
1595
|
+
});
|
|
1596
|
+
var MealPlanDecisionVoteSocketErrorSchema = import_zod20.z.object({
|
|
1597
|
+
code: import_zod20.z.string().min(1),
|
|
1598
|
+
message: import_zod20.z.string().min(1)
|
|
1599
|
+
});
|
|
1600
|
+
var MealPlanDecisionVoteSocketSuccessAckSchema = import_zod20.z.object({
|
|
1601
|
+
ok: import_zod20.z.literal(true),
|
|
1602
|
+
mealPlan: MealPlanResponseSchema
|
|
1603
|
+
});
|
|
1604
|
+
var MealPlanDecisionVoteSocketFailureAckSchema = import_zod20.z.object({
|
|
1605
|
+
ok: import_zod20.z.literal(false),
|
|
1606
|
+
error: MealPlanDecisionVoteSocketErrorSchema
|
|
1607
|
+
});
|
|
1608
|
+
var MealPlanDecisionVoteSocketAckSchema = import_zod20.z.discriminatedUnion("ok", [
|
|
1609
|
+
MealPlanDecisionVoteSocketSuccessAckSchema,
|
|
1610
|
+
MealPlanDecisionVoteSocketFailureAckSchema
|
|
1611
|
+
]);
|
|
1612
|
+
|
|
1613
|
+
// src/domain/meal-plan/meal-plan-share-link.schema.ts
|
|
1614
|
+
var import_zod21 = require("zod");
|
|
1615
|
+
var CreateMealPlanShareLinkRequestSchema = import_zod21.z.object({
|
|
1585
1616
|
expiresAt: ISODateTimeStringSchema.optional(),
|
|
1586
|
-
guestJoinEnabled:
|
|
1617
|
+
guestJoinEnabled: import_zod21.z.boolean().default(true)
|
|
1587
1618
|
});
|
|
1588
|
-
var MealPlanShareLinkSummarySchema =
|
|
1619
|
+
var MealPlanShareLinkSummarySchema = import_zod21.z.object({
|
|
1589
1620
|
shareLinkId: MealPlanShareLinkIdSchema,
|
|
1590
1621
|
mealPlanId: MealPlanIdSchema,
|
|
1591
1622
|
token: MealPlanShareLinkTokenSchema,
|
|
1592
|
-
url:
|
|
1623
|
+
url: import_zod21.z.string().url(),
|
|
1593
1624
|
expiresAt: ISODateTimeStringSchema,
|
|
1594
|
-
guestJoinEnabled:
|
|
1625
|
+
guestJoinEnabled: import_zod21.z.boolean(),
|
|
1595
1626
|
createdAt: ISODateTimeStringSchema
|
|
1596
1627
|
});
|
|
1597
|
-
var MealPlanSharePreviewResponseSchema =
|
|
1628
|
+
var MealPlanSharePreviewResponseSchema = import_zod21.z.object({
|
|
1598
1629
|
mealPlanId: MealPlanIdSchema,
|
|
1599
1630
|
token: MealPlanShareLinkTokenSchema,
|
|
1600
|
-
title:
|
|
1601
|
-
ownerName:
|
|
1602
|
-
participantCount:
|
|
1631
|
+
title: import_zod21.z.string(),
|
|
1632
|
+
ownerName: import_zod21.z.string(),
|
|
1633
|
+
participantCount: import_zod21.z.number().int().min(1),
|
|
1603
1634
|
expiresAt: ISODateTimeStringSchema,
|
|
1604
|
-
guestJoinEnabled:
|
|
1635
|
+
guestJoinEnabled: import_zod21.z.boolean()
|
|
1605
1636
|
});
|
|
1606
|
-
var JoinMealPlanGuestRequestSchema =
|
|
1607
|
-
nickname:
|
|
1608
|
-
password:
|
|
1637
|
+
var JoinMealPlanGuestRequestSchema = import_zod21.z.object({
|
|
1638
|
+
nickname: import_zod21.z.string().min(1).max(50),
|
|
1639
|
+
password: import_zod21.z.string().min(1).max(100).optional()
|
|
1609
1640
|
});
|
|
1610
|
-
var JoinMealPlanGuestResponseSchema =
|
|
1641
|
+
var JoinMealPlanGuestResponseSchema = import_zod21.z.object({
|
|
1611
1642
|
mealPlanId: MealPlanIdSchema,
|
|
1612
|
-
guestId:
|
|
1613
|
-
sessionToken:
|
|
1643
|
+
guestId: import_zod21.z.string().min(1),
|
|
1644
|
+
sessionToken: import_zod21.z.string().min(1)
|
|
1614
1645
|
});
|
|
1615
|
-
var MealPlanGuestSessionQuerySchema =
|
|
1616
|
-
sessionToken:
|
|
1646
|
+
var MealPlanGuestSessionQuerySchema = import_zod21.z.object({
|
|
1647
|
+
sessionToken: import_zod21.z.string().min(1)
|
|
1617
1648
|
});
|
|
1618
|
-
var MealPlanGuestSessionResponseSchema =
|
|
1649
|
+
var MealPlanGuestSessionResponseSchema = import_zod21.z.object({
|
|
1619
1650
|
mealPlan: MealPlanResponseSchema,
|
|
1620
1651
|
token: MealPlanShareLinkTokenSchema,
|
|
1621
|
-
guestId:
|
|
1622
|
-
nickname:
|
|
1623
|
-
sessionToken:
|
|
1652
|
+
guestId: import_zod21.z.string().min(1),
|
|
1653
|
+
nickname: import_zod21.z.string().min(1).max(50),
|
|
1654
|
+
sessionToken: import_zod21.z.string().min(1)
|
|
1624
1655
|
});
|
|
1625
1656
|
|
|
1626
1657
|
// src/domain/meal-plan/meal-group.schema.ts
|
|
1627
|
-
var
|
|
1628
|
-
var MealGroupMemberRoleSchema =
|
|
1658
|
+
var import_zod22 = require("zod");
|
|
1659
|
+
var MealGroupMemberRoleSchema = import_zod22.z.enum([
|
|
1629
1660
|
"OWNER",
|
|
1630
1661
|
"MEMBER"
|
|
1631
1662
|
]);
|
|
1632
|
-
var MealGroupMemberSchema =
|
|
1663
|
+
var MealGroupMemberSchema = import_zod22.z.object({
|
|
1633
1664
|
member: MemberCoreSchema,
|
|
1634
1665
|
role: MealGroupMemberRoleSchema,
|
|
1635
1666
|
joinedAt: ISODateTimeStringSchema
|
|
1636
1667
|
});
|
|
1637
|
-
var MealGroupResponseSchema =
|
|
1668
|
+
var MealGroupResponseSchema = import_zod22.z.object({
|
|
1638
1669
|
mealGroupId: MealGroupIdSchema,
|
|
1639
|
-
name:
|
|
1670
|
+
name: import_zod22.z.string().min(1).max(50),
|
|
1640
1671
|
owner: MemberCoreSchema,
|
|
1641
|
-
profileImageUrl:
|
|
1642
|
-
members:
|
|
1643
|
-
recentMealPlanIds:
|
|
1672
|
+
profileImageUrl: import_zod22.z.string().url().nullable(),
|
|
1673
|
+
members: import_zod22.z.array(MealGroupMemberSchema),
|
|
1674
|
+
recentMealPlanIds: import_zod22.z.array(MealPlanIdSchema),
|
|
1644
1675
|
createdAt: ISODateTimeStringSchema,
|
|
1645
1676
|
updatedAt: ISODateTimeStringSchema
|
|
1646
1677
|
});
|
|
1647
|
-
var CreateMealGroupRequestSchema =
|
|
1648
|
-
name:
|
|
1649
|
-
memberIds:
|
|
1650
|
-
profileImageUrl:
|
|
1678
|
+
var CreateMealGroupRequestSchema = import_zod22.z.object({
|
|
1679
|
+
name: import_zod22.z.string().min(1).max(50),
|
|
1680
|
+
memberIds: import_zod22.z.array(import_zod22.z.number().int().positive()).min(1),
|
|
1681
|
+
profileImageUrl: import_zod22.z.string().url().nullable().optional(),
|
|
1651
1682
|
sourceMealPlanId: MealPlanIdSchema.optional()
|
|
1652
1683
|
});
|
|
1653
|
-
var StartMealPlanFromGroupRequestSchema =
|
|
1654
|
-
title:
|
|
1684
|
+
var StartMealPlanFromGroupRequestSchema = import_zod22.z.object({
|
|
1685
|
+
title: import_zod22.z.string().min(1).max(100).optional()
|
|
1655
1686
|
});
|
|
1656
|
-
var AddMealGroupMemberRequestSchema =
|
|
1657
|
-
memberId:
|
|
1687
|
+
var AddMealGroupMemberRequestSchema = import_zod22.z.object({
|
|
1688
|
+
memberId: import_zod22.z.number().int().positive(),
|
|
1658
1689
|
role: MealGroupMemberRoleSchema.default("MEMBER")
|
|
1659
1690
|
});
|
|
1660
|
-
var UpdateMealGroupMemberRoleRequestSchema =
|
|
1691
|
+
var UpdateMealGroupMemberRoleRequestSchema = import_zod22.z.object({
|
|
1661
1692
|
role: MealGroupMemberRoleSchema
|
|
1662
1693
|
});
|
|
1663
1694
|
var MealGroupHistoryItemSchema = MyMealPlanListItemSchema.extend({});
|
|
1664
|
-
var MealGroupPreferenceSummarySchema =
|
|
1695
|
+
var MealGroupPreferenceSummarySchema = import_zod22.z.object({
|
|
1665
1696
|
mealGroupId: MealGroupIdSchema,
|
|
1666
|
-
frequentMenuCategories:
|
|
1667
|
-
frequentRestaurants:
|
|
1668
|
-
recentMenuCategories:
|
|
1669
|
-
recommendationContext:
|
|
1670
|
-
preferredMenuCategories:
|
|
1671
|
-
excludedMenuCategories:
|
|
1672
|
-
candidateMenuCategories:
|
|
1697
|
+
frequentMenuCategories: import_zod22.z.array(import_zod22.z.object({ label: import_zod22.z.string(), count: import_zod22.z.number().int().min(0) })),
|
|
1698
|
+
frequentRestaurants: import_zod22.z.array(import_zod22.z.object({ restaurantName: import_zod22.z.string(), count: import_zod22.z.number().int().min(0) })),
|
|
1699
|
+
recentMenuCategories: import_zod22.z.array(import_zod22.z.string()),
|
|
1700
|
+
recommendationContext: import_zod22.z.object({
|
|
1701
|
+
preferredMenuCategories: import_zod22.z.array(import_zod22.z.string()),
|
|
1702
|
+
excludedMenuCategories: import_zod22.z.array(import_zod22.z.string()),
|
|
1703
|
+
candidateMenuCategories: import_zod22.z.array(import_zod22.z.string())
|
|
1673
1704
|
})
|
|
1674
1705
|
});
|
|
1675
|
-
var MealGroupHistoryResponseSchema =
|
|
1706
|
+
var MealGroupHistoryResponseSchema = import_zod22.z.array(MealGroupHistoryItemSchema);
|
|
1676
1707
|
|
|
1677
1708
|
// src/domain/meal-plan/meal-plan-home-map.schema.ts
|
|
1678
|
-
var
|
|
1679
|
-
var HomeMealPlanActionKindSchema =
|
|
1709
|
+
var import_zod23 = require("zod");
|
|
1710
|
+
var HomeMealPlanActionKindSchema = import_zod23.z.enum([
|
|
1680
1711
|
"CONTINUE_DECISION",
|
|
1681
1712
|
"TODAY_UPCOMING",
|
|
1682
1713
|
"RECORD_NEEDED",
|
|
1683
1714
|
"RESPOND_JOIN_REQUEST",
|
|
1684
1715
|
"NOTIFICATION_FOLLOW_UP"
|
|
1685
1716
|
]);
|
|
1686
|
-
var HomeMealPlanActionCardSchema =
|
|
1687
|
-
actionId:
|
|
1717
|
+
var HomeMealPlanActionCardSchema = import_zod23.z.object({
|
|
1718
|
+
actionId: import_zod23.z.string().min(1),
|
|
1688
1719
|
kind: HomeMealPlanActionKindSchema,
|
|
1689
|
-
priority:
|
|
1690
|
-
title:
|
|
1691
|
-
description:
|
|
1692
|
-
primaryAction:
|
|
1693
|
-
label:
|
|
1694
|
-
href:
|
|
1720
|
+
priority: import_zod23.z.number().int().min(0),
|
|
1721
|
+
title: import_zod23.z.string().min(1),
|
|
1722
|
+
description: import_zod23.z.string().min(1),
|
|
1723
|
+
primaryAction: import_zod23.z.object({
|
|
1724
|
+
label: import_zod23.z.string().min(1),
|
|
1725
|
+
href: import_zod23.z.string().min(1)
|
|
1695
1726
|
}),
|
|
1696
1727
|
mealPlan: MyMealPlanListItemSchema.nullable(),
|
|
1697
1728
|
joinRequest: MealPlanJoinRequestSummarySchema.nullable(),
|
|
1698
1729
|
notification: MealPlanNotificationSchema.nullable().default(null)
|
|
1699
1730
|
});
|
|
1700
|
-
var HomeMealPlanDashboardResponseSchema =
|
|
1731
|
+
var HomeMealPlanDashboardResponseSchema = import_zod23.z.object({
|
|
1701
1732
|
generatedAt: ISODateTimeStringSchema,
|
|
1702
|
-
inProgress:
|
|
1703
|
-
today:
|
|
1704
|
-
recordNeeded:
|
|
1705
|
-
pendingJoinRequests:
|
|
1706
|
-
unreadNotifications:
|
|
1707
|
-
nextActions:
|
|
1708
|
-
});
|
|
1709
|
-
var MealMapLayerSchema =
|
|
1733
|
+
inProgress: import_zod23.z.array(MyMealPlanListItemSchema),
|
|
1734
|
+
today: import_zod23.z.array(MyMealPlanListItemSchema),
|
|
1735
|
+
recordNeeded: import_zod23.z.array(MyMealPlanListItemSchema),
|
|
1736
|
+
pendingJoinRequests: import_zod23.z.array(MealPlanJoinRequestSummarySchema),
|
|
1737
|
+
unreadNotifications: import_zod23.z.array(MealPlanNotificationSchema).default([]),
|
|
1738
|
+
nextActions: import_zod23.z.array(HomeMealPlanActionCardSchema)
|
|
1739
|
+
});
|
|
1740
|
+
var MealMapLayerSchema = import_zod23.z.enum([
|
|
1710
1741
|
"MY_MEAL_PLAN_PLACE",
|
|
1711
1742
|
"NEARBY_FRIEND_MEAL_PLAN",
|
|
1712
1743
|
"FRIEND_RECORD_LOCATION",
|
|
1713
1744
|
"RESTAURANT_CANDIDATE"
|
|
1714
1745
|
]);
|
|
1715
|
-
var MealMapMarkerBaseSchema =
|
|
1716
|
-
markerId:
|
|
1717
|
-
lat:
|
|
1718
|
-
lng:
|
|
1719
|
-
title:
|
|
1720
|
-
subtitle:
|
|
1721
|
-
href:
|
|
1746
|
+
var MealMapMarkerBaseSchema = import_zod23.z.object({
|
|
1747
|
+
markerId: import_zod23.z.string().min(1),
|
|
1748
|
+
lat: import_zod23.z.number().min(-90).max(90),
|
|
1749
|
+
lng: import_zod23.z.number().min(-180).max(180),
|
|
1750
|
+
title: import_zod23.z.string().min(1),
|
|
1751
|
+
subtitle: import_zod23.z.string().nullable(),
|
|
1752
|
+
href: import_zod23.z.string().min(1).nullable(),
|
|
1722
1753
|
mealPlanId: MealPlanIdSchema.nullable(),
|
|
1723
1754
|
articleId: ArticleIdSchema.nullable(),
|
|
1724
1755
|
restaurant: RestaurantSchema.nullable(),
|
|
1725
|
-
distanceMeters:
|
|
1756
|
+
distanceMeters: import_zod23.z.number().int().min(0).nullable(),
|
|
1726
1757
|
updatedAt: ISODateTimeStringSchema
|
|
1727
1758
|
});
|
|
1728
|
-
var MealMapMyMealPlanPlaceMetadataSchema =
|
|
1759
|
+
var MealMapMyMealPlanPlaceMetadataSchema = import_zod23.z.object({
|
|
1729
1760
|
ownerId: MemberIdSchema.nullable().default(null),
|
|
1730
|
-
status:
|
|
1731
|
-
participantCount:
|
|
1732
|
-
source:
|
|
1761
|
+
status: import_zod23.z.string().min(1),
|
|
1762
|
+
participantCount: import_zod23.z.number().int().min(1),
|
|
1763
|
+
source: import_zod23.z.string().min(1)
|
|
1733
1764
|
});
|
|
1734
|
-
var MealMapNearbyFriendMealPlanMetadataSchema =
|
|
1765
|
+
var MealMapNearbyFriendMealPlanMetadataSchema = import_zod23.z.object({
|
|
1735
1766
|
ownerId: MemberIdSchema.nullable().default(null),
|
|
1736
|
-
ownerName:
|
|
1737
|
-
participantCount:
|
|
1767
|
+
ownerName: import_zod23.z.string().min(1),
|
|
1768
|
+
participantCount: import_zod23.z.number().int().min(1),
|
|
1738
1769
|
expiresAt: ISODateTimeStringSchema.nullable(),
|
|
1739
|
-
source:
|
|
1770
|
+
source: import_zod23.z.string().min(1)
|
|
1740
1771
|
});
|
|
1741
|
-
var MealMapFriendRecordLocationMetadataSchema =
|
|
1772
|
+
var MealMapFriendRecordLocationMetadataSchema = import_zod23.z.object({
|
|
1742
1773
|
authorId: MemberIdSchema.nullable().default(null),
|
|
1743
|
-
authorName:
|
|
1744
|
-
imageUrl:
|
|
1745
|
-
mealDate:
|
|
1774
|
+
authorName: import_zod23.z.string().min(1),
|
|
1775
|
+
imageUrl: import_zod23.z.string().nullable().default(null),
|
|
1776
|
+
mealDate: import_zod23.z.string().min(1)
|
|
1746
1777
|
});
|
|
1747
|
-
var MealMapRestaurantCandidateCompletionBlockedReasonSchema =
|
|
1778
|
+
var MealMapRestaurantCandidateCompletionBlockedReasonSchema = import_zod23.z.enum([
|
|
1748
1779
|
"OWNER_ONLY",
|
|
1749
1780
|
"STAGE_ALREADY_COMPLETED",
|
|
1750
1781
|
"MEAL_PLAN_NOT_MUTABLE"
|
|
1751
1782
|
]);
|
|
1752
|
-
var MealMapRestaurantCandidateMetadataSchema =
|
|
1783
|
+
var MealMapRestaurantCandidateMetadataSchema = import_zod23.z.object({
|
|
1753
1784
|
stageId: MealPlanDecisionStageIdSchema,
|
|
1754
1785
|
ownerId: MemberIdSchema.nullable().default(null),
|
|
1755
|
-
status:
|
|
1756
|
-
source:
|
|
1757
|
-
stageStatus:
|
|
1758
|
-
canVote:
|
|
1759
|
-
canCompleteStage:
|
|
1786
|
+
status: import_zod23.z.string().min(1),
|
|
1787
|
+
source: import_zod23.z.enum(["search", "fallback", "manual"]).default("search"),
|
|
1788
|
+
stageStatus: import_zod23.z.enum(["OPEN", "COMPLETED", "REOPENED"]).default("OPEN"),
|
|
1789
|
+
canVote: import_zod23.z.boolean().default(false),
|
|
1790
|
+
canCompleteStage: import_zod23.z.boolean().default(false),
|
|
1760
1791
|
completionBlockedReason: MealMapRestaurantCandidateCompletionBlockedReasonSchema.nullable().default(null)
|
|
1761
1792
|
});
|
|
1762
|
-
var MealMapMarkerSchema =
|
|
1793
|
+
var MealMapMarkerSchema = import_zod23.z.discriminatedUnion("layer", [
|
|
1763
1794
|
MealMapMarkerBaseSchema.extend({
|
|
1764
|
-
layer:
|
|
1795
|
+
layer: import_zod23.z.literal("MY_MEAL_PLAN_PLACE"),
|
|
1765
1796
|
metadata: MealMapMyMealPlanPlaceMetadataSchema
|
|
1766
1797
|
}),
|
|
1767
1798
|
MealMapMarkerBaseSchema.extend({
|
|
1768
|
-
layer:
|
|
1799
|
+
layer: import_zod23.z.literal("NEARBY_FRIEND_MEAL_PLAN"),
|
|
1769
1800
|
metadata: MealMapNearbyFriendMealPlanMetadataSchema
|
|
1770
1801
|
}),
|
|
1771
1802
|
MealMapMarkerBaseSchema.extend({
|
|
1772
|
-
layer:
|
|
1803
|
+
layer: import_zod23.z.literal("FRIEND_RECORD_LOCATION"),
|
|
1773
1804
|
metadata: MealMapFriendRecordLocationMetadataSchema
|
|
1774
1805
|
}),
|
|
1775
1806
|
MealMapMarkerBaseSchema.extend({
|
|
1776
|
-
layer:
|
|
1807
|
+
layer: import_zod23.z.literal("RESTAURANT_CANDIDATE"),
|
|
1777
1808
|
metadata: MealMapRestaurantCandidateMetadataSchema
|
|
1778
1809
|
})
|
|
1779
1810
|
]);
|
|
1780
|
-
var MealMapQuerySchema =
|
|
1781
|
-
friendRecordDays:
|
|
1811
|
+
var MealMapQuerySchema = import_zod23.z.object({
|
|
1812
|
+
friendRecordDays: import_zod23.z.coerce.number().int().min(1).max(90).optional().default(7)
|
|
1782
1813
|
});
|
|
1783
|
-
var MealMapResponseSchema =
|
|
1814
|
+
var MealMapResponseSchema = import_zod23.z.object({
|
|
1784
1815
|
generatedAt: ISODateTimeStringSchema,
|
|
1785
|
-
center:
|
|
1786
|
-
lat:
|
|
1787
|
-
lng:
|
|
1788
|
-
source:
|
|
1816
|
+
center: import_zod23.z.object({
|
|
1817
|
+
lat: import_zod23.z.number().min(-90).max(90),
|
|
1818
|
+
lng: import_zod23.z.number().min(-180).max(180),
|
|
1819
|
+
source: import_zod23.z.enum(["LAST_KNOWN_LOCATION", "MY_MEAL_PLAN", "DEFAULT"])
|
|
1789
1820
|
}),
|
|
1790
|
-
layers:
|
|
1791
|
-
myMealPlanPlaces:
|
|
1792
|
-
nearbyFriendMealPlans:
|
|
1793
|
-
friendRecordLocations:
|
|
1794
|
-
restaurantCandidates:
|
|
1821
|
+
layers: import_zod23.z.object({
|
|
1822
|
+
myMealPlanPlaces: import_zod23.z.array(MealMapMarkerSchema),
|
|
1823
|
+
nearbyFriendMealPlans: import_zod23.z.array(MealMapMarkerSchema),
|
|
1824
|
+
friendRecordLocations: import_zod23.z.array(MealMapMarkerSchema),
|
|
1825
|
+
restaurantCandidates: import_zod23.z.array(MealMapMarkerSchema)
|
|
1795
1826
|
})
|
|
1796
1827
|
});
|
|
1797
1828
|
|
|
@@ -1832,222 +1863,222 @@ function compareMealPlanNotificationsByPriority(channel) {
|
|
|
1832
1863
|
}
|
|
1833
1864
|
|
|
1834
1865
|
// src/domain/promotion/referral.schema.ts
|
|
1835
|
-
var
|
|
1836
|
-
var ReferralCreateResponseSchema =
|
|
1866
|
+
var import_zod24 = require("zod");
|
|
1867
|
+
var ReferralCreateResponseSchema = import_zod24.z.object({
|
|
1837
1868
|
code: ReferralCodeSchema,
|
|
1838
|
-
link:
|
|
1869
|
+
link: import_zod24.z.string().url(),
|
|
1839
1870
|
expiresAt: ISODateTimeStringSchema
|
|
1840
1871
|
});
|
|
1841
|
-
var ReferralItemResponseSchema =
|
|
1872
|
+
var ReferralItemResponseSchema = import_zod24.z.object({
|
|
1842
1873
|
code: ReferralCodeSchema,
|
|
1843
1874
|
createdAt: ISODateTimeStringSchema,
|
|
1844
1875
|
expiresAt: ISODateTimeStringSchema,
|
|
1845
|
-
used:
|
|
1876
|
+
used: import_zod24.z.boolean(),
|
|
1846
1877
|
usedByMemberId: MemberIdSchema.nullable(),
|
|
1847
|
-
usedByUsername:
|
|
1878
|
+
usedByUsername: import_zod24.z.string().nullable()
|
|
1848
1879
|
});
|
|
1849
|
-
var RedeemReferralRequestSchema =
|
|
1880
|
+
var RedeemReferralRequestSchema = import_zod24.z.object({
|
|
1850
1881
|
code: ReferralCodeSchema
|
|
1851
1882
|
});
|
|
1852
1883
|
|
|
1853
1884
|
// src/domain/promotion/coupon.schema.ts
|
|
1854
|
-
var
|
|
1855
|
-
var CouponTypeSchema =
|
|
1856
|
-
var CouponStatusSchema =
|
|
1857
|
-
var CouponResponseSchema =
|
|
1885
|
+
var import_zod25 = require("zod");
|
|
1886
|
+
var CouponTypeSchema = import_zod25.z.enum(["DISCOUNT", "SERVICE"]);
|
|
1887
|
+
var CouponStatusSchema = import_zod25.z.enum(["UNUSED", "USED"]);
|
|
1888
|
+
var CouponResponseSchema = import_zod25.z.object({
|
|
1858
1889
|
couponId: CouponIdSchema,
|
|
1859
|
-
title:
|
|
1860
|
-
shopName:
|
|
1890
|
+
title: import_zod25.z.string(),
|
|
1891
|
+
shopName: import_zod25.z.string(),
|
|
1861
1892
|
type: CouponTypeSchema,
|
|
1862
|
-
condition:
|
|
1893
|
+
condition: import_zod25.z.string(),
|
|
1863
1894
|
expiresAt: ISODateStringSchema,
|
|
1864
|
-
used:
|
|
1865
|
-
thumbnailUrl:
|
|
1895
|
+
used: import_zod25.z.boolean(),
|
|
1896
|
+
thumbnailUrl: import_zod25.z.string().url()
|
|
1866
1897
|
});
|
|
1867
1898
|
|
|
1868
1899
|
// src/domain/promotion/challenge.schema.ts
|
|
1869
|
-
var
|
|
1870
|
-
var RewardTypeSchema =
|
|
1871
|
-
var WeekProgressSchema =
|
|
1872
|
-
days:
|
|
1873
|
-
completed:
|
|
1874
|
-
goal:
|
|
1900
|
+
var import_zod26 = require("zod");
|
|
1901
|
+
var RewardTypeSchema = import_zod26.z.enum(["WEEK", "MONTH"]);
|
|
1902
|
+
var WeekProgressSchema = import_zod26.z.object({
|
|
1903
|
+
days: import_zod26.z.array(import_zod26.z.boolean()),
|
|
1904
|
+
completed: import_zod26.z.number().int().min(0),
|
|
1905
|
+
goal: import_zod26.z.number().int().positive()
|
|
1875
1906
|
});
|
|
1876
|
-
var MonthProgressSchema =
|
|
1877
|
-
count:
|
|
1878
|
-
goal:
|
|
1907
|
+
var MonthProgressSchema = import_zod26.z.object({
|
|
1908
|
+
count: import_zod26.z.number().int().min(0),
|
|
1909
|
+
goal: import_zod26.z.number().int().positive()
|
|
1879
1910
|
});
|
|
1880
|
-
var ChallengeStatusResponseSchema =
|
|
1911
|
+
var ChallengeStatusResponseSchema = import_zod26.z.object({
|
|
1881
1912
|
week: WeekProgressSchema,
|
|
1882
1913
|
month: MonthProgressSchema,
|
|
1883
|
-
weekRewardAvailable:
|
|
1884
|
-
monthRewardAvailable:
|
|
1914
|
+
weekRewardAvailable: import_zod26.z.boolean(),
|
|
1915
|
+
monthRewardAvailable: import_zod26.z.boolean()
|
|
1885
1916
|
});
|
|
1886
|
-
var ClaimChallengeRewardRequestSchema =
|
|
1917
|
+
var ClaimChallengeRewardRequestSchema = import_zod26.z.object({
|
|
1887
1918
|
type: RewardTypeSchema
|
|
1888
1919
|
});
|
|
1889
|
-
var ClaimChallengeRewardResponseSchema =
|
|
1920
|
+
var ClaimChallengeRewardResponseSchema = import_zod26.z.object({
|
|
1890
1921
|
rewardType: RewardTypeSchema,
|
|
1891
|
-
claimed:
|
|
1922
|
+
claimed: import_zod26.z.boolean()
|
|
1892
1923
|
});
|
|
1893
1924
|
|
|
1894
1925
|
// src/domain/push/push.schema.ts
|
|
1895
|
-
var
|
|
1896
|
-
var PushProviderSchema =
|
|
1897
|
-
var PushPlatformSchema =
|
|
1898
|
-
var PushPermissionStatusSchema =
|
|
1926
|
+
var import_zod27 = require("zod");
|
|
1927
|
+
var PushProviderSchema = import_zod27.z.enum(["FCM", "APNS_LIVE_ACTIVITY"]);
|
|
1928
|
+
var PushPlatformSchema = import_zod27.z.enum(["WEB", "ANDROID", "IOS"]);
|
|
1929
|
+
var PushPermissionStatusSchema = import_zod27.z.enum([
|
|
1899
1930
|
"UNKNOWN",
|
|
1900
1931
|
"PROMPT",
|
|
1901
1932
|
"GRANTED",
|
|
1902
1933
|
"DENIED"
|
|
1903
1934
|
]);
|
|
1904
|
-
var PushTokenStatusSchema =
|
|
1905
|
-
var RegisterPushTokenRequestSchema =
|
|
1935
|
+
var PushTokenStatusSchema = import_zod27.z.enum(["ACTIVE", "REVOKED", "DISABLED"]);
|
|
1936
|
+
var RegisterPushTokenRequestSchema = import_zod27.z.object({
|
|
1906
1937
|
provider: PushProviderSchema.default("FCM"),
|
|
1907
1938
|
platform: PushPlatformSchema,
|
|
1908
|
-
token:
|
|
1909
|
-
deviceId:
|
|
1910
|
-
appVersion:
|
|
1911
|
-
buildNumber:
|
|
1939
|
+
token: import_zod27.z.string().min(10),
|
|
1940
|
+
deviceId: import_zod27.z.string().min(1).max(128),
|
|
1941
|
+
appVersion: import_zod27.z.string().min(1).max(64).optional(),
|
|
1942
|
+
buildNumber: import_zod27.z.string().min(1).max(64).optional(),
|
|
1912
1943
|
permissionStatus: PushPermissionStatusSchema
|
|
1913
1944
|
});
|
|
1914
|
-
var RevokePushTokenRequestSchema =
|
|
1945
|
+
var RevokePushTokenRequestSchema = import_zod27.z.object({
|
|
1915
1946
|
provider: PushProviderSchema.default("FCM"),
|
|
1916
|
-
token:
|
|
1917
|
-
deviceId:
|
|
1947
|
+
token: import_zod27.z.string().min(10).optional(),
|
|
1948
|
+
deviceId: import_zod27.z.string().min(1).max(128).optional()
|
|
1918
1949
|
});
|
|
1919
|
-
var PushTokenResponseSchema =
|
|
1920
|
-
pushTokenId:
|
|
1950
|
+
var PushTokenResponseSchema = import_zod27.z.object({
|
|
1951
|
+
pushTokenId: import_zod27.z.string().uuid(),
|
|
1921
1952
|
provider: PushProviderSchema,
|
|
1922
1953
|
platform: PushPlatformSchema,
|
|
1923
|
-
deviceId:
|
|
1954
|
+
deviceId: import_zod27.z.string(),
|
|
1924
1955
|
status: PushTokenStatusSchema,
|
|
1925
1956
|
permissionStatus: PushPermissionStatusSchema,
|
|
1926
|
-
appVersion:
|
|
1927
|
-
buildNumber:
|
|
1957
|
+
appVersion: import_zod27.z.string().nullable(),
|
|
1958
|
+
buildNumber: import_zod27.z.string().nullable(),
|
|
1928
1959
|
lastSeenAt: ISODateTimeStringSchema,
|
|
1929
1960
|
revokedAt: ISODateTimeStringSchema.nullable()
|
|
1930
1961
|
});
|
|
1931
|
-
var PushPayloadSchemaVersionSchema =
|
|
1932
|
-
var MealPlanPushPayloadDataSchema =
|
|
1962
|
+
var PushPayloadSchemaVersionSchema = import_zod27.z.literal("2026-06-17");
|
|
1963
|
+
var MealPlanPushPayloadDataSchema = import_zod27.z.object({
|
|
1933
1964
|
schemaVersion: PushPayloadSchemaVersionSchema,
|
|
1934
|
-
notificationId:
|
|
1965
|
+
notificationId: import_zod27.z.string().min(1),
|
|
1935
1966
|
kind: MealPlanNotificationKindSchema,
|
|
1936
1967
|
mealPlanId: MealPlanIdSchema,
|
|
1937
|
-
deepLink:
|
|
1938
|
-
title:
|
|
1939
|
-
body:
|
|
1940
|
-
fcmPriority:
|
|
1941
|
-
liveActivityPriority:
|
|
1968
|
+
deepLink: import_zod27.z.string().min(1),
|
|
1969
|
+
title: import_zod27.z.string().min(1),
|
|
1970
|
+
body: import_zod27.z.string().min(1),
|
|
1971
|
+
fcmPriority: import_zod27.z.coerce.number().int().min(0),
|
|
1972
|
+
liveActivityPriority: import_zod27.z.coerce.number().int().min(0),
|
|
1942
1973
|
liveActivityBehavior: MealPlanLiveActivityBehaviorSchema
|
|
1943
1974
|
});
|
|
1944
|
-
var PushDeliveryStatusSchema =
|
|
1975
|
+
var PushDeliveryStatusSchema = import_zod27.z.enum([
|
|
1945
1976
|
"PENDING",
|
|
1946
1977
|
"SENT",
|
|
1947
1978
|
"FAILED",
|
|
1948
1979
|
"SKIPPED"
|
|
1949
1980
|
]);
|
|
1950
|
-
var PushDeliveryAttemptResultSchema =
|
|
1981
|
+
var PushDeliveryAttemptResultSchema = import_zod27.z.enum([
|
|
1951
1982
|
"SENT",
|
|
1952
1983
|
"FAILED",
|
|
1953
1984
|
"SKIPPED"
|
|
1954
1985
|
]);
|
|
1955
|
-
var PushDeliveryAttemptSummarySchema =
|
|
1956
|
-
attemptId:
|
|
1957
|
-
outboxId:
|
|
1958
|
-
pushTokenId:
|
|
1986
|
+
var PushDeliveryAttemptSummarySchema = import_zod27.z.object({
|
|
1987
|
+
attemptId: import_zod27.z.string().uuid(),
|
|
1988
|
+
outboxId: import_zod27.z.string().uuid(),
|
|
1989
|
+
pushTokenId: import_zod27.z.string().uuid().nullable(),
|
|
1959
1990
|
provider: PushProviderSchema,
|
|
1960
1991
|
result: PushDeliveryAttemptResultSchema,
|
|
1961
|
-
providerMessageId:
|
|
1962
|
-
errorCode:
|
|
1963
|
-
errorMessage:
|
|
1964
|
-
invalidToken:
|
|
1992
|
+
providerMessageId: import_zod27.z.string().nullable(),
|
|
1993
|
+
errorCode: import_zod27.z.string().nullable(),
|
|
1994
|
+
errorMessage: import_zod27.z.string().nullable(),
|
|
1995
|
+
invalidToken: import_zod27.z.boolean(),
|
|
1965
1996
|
createdAt: ISODateTimeStringSchema
|
|
1966
1997
|
});
|
|
1967
|
-
var PushDeliveryOutboxSummarySchema =
|
|
1968
|
-
outboxId:
|
|
1969
|
-
notificationId:
|
|
1970
|
-
memberId:
|
|
1998
|
+
var PushDeliveryOutboxSummarySchema = import_zod27.z.object({
|
|
1999
|
+
outboxId: import_zod27.z.string().uuid(),
|
|
2000
|
+
notificationId: import_zod27.z.string().min(1),
|
|
2001
|
+
memberId: import_zod27.z.number().int().positive(),
|
|
1971
2002
|
status: PushDeliveryStatusSchema,
|
|
1972
|
-
attemptCount:
|
|
1973
|
-
lastError:
|
|
2003
|
+
attemptCount: import_zod27.z.number().int().min(0),
|
|
2004
|
+
lastError: import_zod27.z.string().nullable(),
|
|
1974
2005
|
nextAttemptAt: ISODateTimeStringSchema.nullable(),
|
|
1975
2006
|
sentAt: ISODateTimeStringSchema.nullable(),
|
|
1976
2007
|
createdAt: ISODateTimeStringSchema
|
|
1977
2008
|
});
|
|
1978
2009
|
|
|
1979
2010
|
// src/domain/live-activity/live-activity.schema.ts
|
|
1980
|
-
var
|
|
1981
|
-
var MealPlanLiveActivityPlatformSchema =
|
|
2011
|
+
var import_zod28 = require("zod");
|
|
2012
|
+
var MealPlanLiveActivityPlatformSchema = import_zod28.z.enum([
|
|
1982
2013
|
"IOS_LIVE_ACTIVITY",
|
|
1983
2014
|
"ANDROID_LIVE_UPDATE"
|
|
1984
2015
|
]);
|
|
1985
|
-
var MealPlanLiveActivitySessionStatusSchema =
|
|
2016
|
+
var MealPlanLiveActivitySessionStatusSchema = import_zod28.z.enum([
|
|
1986
2017
|
"ACTIVE",
|
|
1987
2018
|
"ENDED",
|
|
1988
2019
|
"EXPIRED",
|
|
1989
2020
|
"DISABLED"
|
|
1990
2021
|
]);
|
|
1991
|
-
var MealPlanLiveActivityUpdateStatusSchema =
|
|
2022
|
+
var MealPlanLiveActivityUpdateStatusSchema = import_zod28.z.enum([
|
|
1992
2023
|
"PENDING",
|
|
1993
2024
|
"SENT",
|
|
1994
2025
|
"FAILED",
|
|
1995
2026
|
"SKIPPED"
|
|
1996
2027
|
]);
|
|
1997
|
-
var RegisterMealPlanLiveActivitySessionRequestSchema =
|
|
2028
|
+
var RegisterMealPlanLiveActivitySessionRequestSchema = import_zod28.z.object({
|
|
1998
2029
|
platform: MealPlanLiveActivityPlatformSchema,
|
|
1999
|
-
deviceId:
|
|
2000
|
-
activityId:
|
|
2001
|
-
pushToken:
|
|
2002
|
-
appVersion:
|
|
2003
|
-
buildNumber:
|
|
2030
|
+
deviceId: import_zod28.z.string().min(1).max(128),
|
|
2031
|
+
activityId: import_zod28.z.string().min(1).max(128),
|
|
2032
|
+
pushToken: import_zod28.z.string().min(10).optional(),
|
|
2033
|
+
appVersion: import_zod28.z.string().min(1).max(64).optional(),
|
|
2034
|
+
buildNumber: import_zod28.z.string().min(1).max(64).optional()
|
|
2004
2035
|
});
|
|
2005
|
-
var EndMealPlanLiveActivitySessionRequestSchema =
|
|
2036
|
+
var EndMealPlanLiveActivitySessionRequestSchema = import_zod28.z.object({
|
|
2006
2037
|
platform: MealPlanLiveActivityPlatformSchema.optional(),
|
|
2007
|
-
deviceId:
|
|
2008
|
-
activityId:
|
|
2038
|
+
deviceId: import_zod28.z.string().min(1).max(128).optional(),
|
|
2039
|
+
activityId: import_zod28.z.string().min(1).max(128).optional()
|
|
2009
2040
|
});
|
|
2010
|
-
var MealPlanLiveActivityStateSchema =
|
|
2041
|
+
var MealPlanLiveActivityStateSchema = import_zod28.z.object({
|
|
2011
2042
|
mealPlanId: MealPlanIdSchema,
|
|
2012
|
-
title:
|
|
2013
|
-
status:
|
|
2043
|
+
title: import_zod28.z.string().min(1),
|
|
2044
|
+
status: import_zod28.z.string().min(1),
|
|
2014
2045
|
scheduledAt: ISODateTimeStringSchema.nullable(),
|
|
2015
|
-
restaurantName:
|
|
2016
|
-
placeName:
|
|
2017
|
-
deepLink:
|
|
2018
|
-
progressLabel:
|
|
2046
|
+
restaurantName: import_zod28.z.string().nullable(),
|
|
2047
|
+
placeName: import_zod28.z.string().nullable(),
|
|
2048
|
+
deepLink: import_zod28.z.string().min(1),
|
|
2049
|
+
progressLabel: import_zod28.z.string().min(1),
|
|
2019
2050
|
updatedAt: ISODateTimeStringSchema
|
|
2020
2051
|
});
|
|
2021
|
-
var MealPlanLiveActivitySessionResponseSchema =
|
|
2022
|
-
sessionId:
|
|
2052
|
+
var MealPlanLiveActivitySessionResponseSchema = import_zod28.z.object({
|
|
2053
|
+
sessionId: import_zod28.z.string().uuid(),
|
|
2023
2054
|
mealPlanId: MealPlanIdSchema,
|
|
2024
|
-
memberId:
|
|
2055
|
+
memberId: import_zod28.z.number().int().positive(),
|
|
2025
2056
|
platform: MealPlanLiveActivityPlatformSchema,
|
|
2026
2057
|
devicePlatform: PushPlatformSchema,
|
|
2027
|
-
deviceId:
|
|
2028
|
-
activityId:
|
|
2058
|
+
deviceId: import_zod28.z.string(),
|
|
2059
|
+
activityId: import_zod28.z.string(),
|
|
2029
2060
|
status: MealPlanLiveActivitySessionStatusSchema,
|
|
2030
|
-
appVersion:
|
|
2031
|
-
buildNumber:
|
|
2061
|
+
appVersion: import_zod28.z.string().nullable(),
|
|
2062
|
+
buildNumber: import_zod28.z.string().nullable(),
|
|
2032
2063
|
lastEventKind: MealPlanNotificationKindSchema.nullable(),
|
|
2033
2064
|
lastBehavior: MealPlanLiveActivityBehaviorSchema.nullable(),
|
|
2034
2065
|
lastUpdateStatus: MealPlanLiveActivityUpdateStatusSchema.nullable(),
|
|
2035
|
-
lastError:
|
|
2066
|
+
lastError: import_zod28.z.string().nullable(),
|
|
2036
2067
|
startedAt: ISODateTimeStringSchema,
|
|
2037
2068
|
endedAt: ISODateTimeStringSchema.nullable(),
|
|
2038
2069
|
updatedAt: ISODateTimeStringSchema
|
|
2039
2070
|
});
|
|
2040
|
-
var MealPlanLiveActivitySessionListResponseSchema =
|
|
2071
|
+
var MealPlanLiveActivitySessionListResponseSchema = import_zod28.z.object({
|
|
2041
2072
|
mealPlanId: MealPlanIdSchema,
|
|
2042
2073
|
state: MealPlanLiveActivityStateSchema,
|
|
2043
|
-
sessions:
|
|
2074
|
+
sessions: import_zod28.z.array(MealPlanLiveActivitySessionResponseSchema)
|
|
2044
2075
|
});
|
|
2045
2076
|
|
|
2046
2077
|
// src/domain/common/contracts/endpoint.ts
|
|
2047
|
-
var
|
|
2048
|
-
var NoBodySchema =
|
|
2049
|
-
var NoQuerySchema =
|
|
2050
|
-
var NoParamsSchema =
|
|
2078
|
+
var import_zod29 = require("zod");
|
|
2079
|
+
var NoBodySchema = import_zod29.z.undefined();
|
|
2080
|
+
var NoQuerySchema = import_zod29.z.undefined();
|
|
2081
|
+
var NoParamsSchema = import_zod29.z.undefined();
|
|
2051
2082
|
var endpoint = (contract) => ({
|
|
2052
2083
|
method: contract.method,
|
|
2053
2084
|
path: contract.path,
|
|
@@ -2058,12 +2089,12 @@ var endpoint = (contract) => ({
|
|
|
2058
2089
|
});
|
|
2059
2090
|
|
|
2060
2091
|
// src/domain/common/contracts/api.ts
|
|
2061
|
-
var memberIdParam =
|
|
2062
|
-
var articleIdParam =
|
|
2063
|
-
var commentIdParam =
|
|
2064
|
-
var mealPlanIdParam =
|
|
2065
|
-
var mealPlanInviteIdParam =
|
|
2066
|
-
var mealPlanJoinRequestIdParam =
|
|
2092
|
+
var memberIdParam = import_zod30.z.object({ memberId: MemberIdSchema });
|
|
2093
|
+
var articleIdParam = import_zod30.z.object({ articleId: ArticleIdSchema });
|
|
2094
|
+
var commentIdParam = import_zod30.z.object({ commentId: CommentIdSchema });
|
|
2095
|
+
var mealPlanIdParam = import_zod30.z.object({ mealPlanId: MealPlanIdSchema });
|
|
2096
|
+
var mealPlanInviteIdParam = import_zod30.z.object({ inviteId: MealPlanInviteIdSchema });
|
|
2097
|
+
var mealPlanJoinRequestIdParam = import_zod30.z.object({ requestId: MealPlanJoinRequestIdSchema });
|
|
2067
2098
|
var mealPlanDecisionStageIdParam = mealPlanIdParam.extend({
|
|
2068
2099
|
stageId: MealPlanDecisionStageIdSchema
|
|
2069
2100
|
});
|
|
@@ -2074,18 +2105,18 @@ var mealPlanDecisionTaskKeyParam = mealPlanIdParam.extend({
|
|
|
2074
2105
|
taskKey: MealPlanDecisionTaskKeySchema
|
|
2075
2106
|
});
|
|
2076
2107
|
var mealPlanDecisionSnapshotIdParam = mealPlanIdParam.extend({
|
|
2077
|
-
snapshotId:
|
|
2108
|
+
snapshotId: import_zod30.z.string().uuid()
|
|
2078
2109
|
});
|
|
2079
2110
|
var mealPlanParticipantIdParam = mealPlanIdParam.extend({
|
|
2080
|
-
participantId:
|
|
2111
|
+
participantId: import_zod30.z.string().uuid()
|
|
2081
2112
|
});
|
|
2082
|
-
var mealPlanShareTokenParam =
|
|
2083
|
-
var notificationIdParam =
|
|
2084
|
-
var couponIdParam =
|
|
2085
|
-
var mealGroupIdParam =
|
|
2113
|
+
var mealPlanShareTokenParam = import_zod30.z.object({ token: MealPlanShareLinkTokenSchema });
|
|
2114
|
+
var notificationIdParam = import_zod30.z.object({ notificationId: import_zod30.z.string().min(1) });
|
|
2115
|
+
var couponIdParam = import_zod30.z.object({ couponId: CouponIdSchema });
|
|
2116
|
+
var mealGroupIdParam = import_zod30.z.object({ mealGroupId: MealGroupIdSchema });
|
|
2086
2117
|
var mealGroupMemberIdParam = mealGroupIdParam.extend({ memberId: MemberIdSchema });
|
|
2087
|
-
var friendRequestIdParam =
|
|
2088
|
-
var sseTokenQuery =
|
|
2118
|
+
var friendRequestIdParam = import_zod30.z.object({ requestId: FriendRequestIdSchema });
|
|
2119
|
+
var sseTokenQuery = import_zod30.z.object({ token: import_zod30.z.string().min(1) });
|
|
2089
2120
|
var apiContract = {
|
|
2090
2121
|
auth: {
|
|
2091
2122
|
signup: endpoint({ method: "POST", path: "/auth/signup", body: SignupRequestSchema, response: SignupResponseSchema }),
|
|
@@ -2113,7 +2144,7 @@ var apiContract = {
|
|
|
2113
2144
|
mealStatus: {
|
|
2114
2145
|
my: endpoint({ method: "GET", path: "/members/me/meal-status", response: MealStatusResponseSchema }),
|
|
2115
2146
|
updateMealStatus: endpoint({ method: "PATCH", path: "/members/me/meal-status", body: UpdateMealStatusRequestSchema, response: NoContentSchema }),
|
|
2116
|
-
friendMealStatus: endpoint({ method: "GET", path: "/friends/me/meals", query: FriendMealQuerySchema, response:
|
|
2147
|
+
friendMealStatus: endpoint({ method: "GET", path: "/friends/me/meals", query: FriendMealQuerySchema, response: import_zod30.z.array(FriendMealItemResponseSchema) })
|
|
2117
2148
|
},
|
|
2118
2149
|
articles: {
|
|
2119
2150
|
list: endpoint({ method: "GET", path: "/articles/home", query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
|
|
@@ -2152,11 +2183,10 @@ var apiContract = {
|
|
|
2152
2183
|
exposeNearbyFriends: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/nearby-friends/expose", pathParams: mealPlanIdParam, body: ExposeMealPlanToNearbyFriendsRequestSchema, response: ExposeMealPlanToNearbyFriendsResponseSchema }),
|
|
2153
2184
|
closeNearbyFriends: endpoint({ method: "DELETE", path: "/meal-plans/:mealPlanId/nearby-friends/expose", pathParams: mealPlanIdParam, response: NoContentSchema }),
|
|
2154
2185
|
nearbyFriendExposureEligibility: endpoint({ method: "GET", path: "/meal-plans/nearby-friends/eligibility", response: NearbyFriendExposureEligibilitySchema }),
|
|
2155
|
-
nearbyFriends: endpoint({ method: "GET", path: "/meal-plans/nearby-friends", response:
|
|
2186
|
+
nearbyFriends: endpoint({ method: "GET", path: "/meal-plans/nearby-friends", response: import_zod30.z.array(NearbyFriendMealPlanSummarySchema) }),
|
|
2156
2187
|
requestJoin: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/join-requests", pathParams: mealPlanIdParam, body: CreateMealPlanJoinRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
2157
2188
|
acceptJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/accept", pathParams: mealPlanJoinRequestIdParam, response: MealPlanResponseSchema }),
|
|
2158
2189
|
rejectJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/reject", pathParams: mealPlanJoinRequestIdParam, response: NoContentSchema }),
|
|
2159
|
-
vote: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/stages/:stageId/votes", pathParams: mealPlanDecisionStageIdParam, body: CreateMealPlanVoteRequestSchema, response: MealPlanResponseSchema }),
|
|
2160
2190
|
completeStage: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/stages/:stageId/complete", pathParams: mealPlanDecisionStageIdParam, body: CompleteMealPlanDecisionStageRequestSchema, response: MealPlanResponseSchema }),
|
|
2161
2191
|
decisionProgress: endpoint({ method: "GET", path: "/meal-plans/:mealPlanId/decision-progress", pathParams: mealPlanIdParam, response: MealPlanDecisionProgressSchema }),
|
|
2162
2192
|
reopenDecisionTask: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/decision-tasks/:taskKey/reopen", pathParams: mealPlanDecisionTaskKeyParam, body: ReopenMealPlanDecisionTaskRequestSchema, response: MealPlanResponseSchema }),
|
|
@@ -2169,7 +2199,7 @@ var apiContract = {
|
|
|
2169
2199
|
},
|
|
2170
2200
|
mealGroups: {
|
|
2171
2201
|
create: endpoint({ method: "POST", path: "/meal-groups", body: CreateMealGroupRequestSchema, response: MealGroupResponseSchema }),
|
|
2172
|
-
list: endpoint({ method: "GET", path: "/meal-groups", response:
|
|
2202
|
+
list: endpoint({ method: "GET", path: "/meal-groups", response: import_zod30.z.array(MealGroupResponseSchema) }),
|
|
2173
2203
|
detail: endpoint({ method: "GET", path: "/meal-groups/:mealGroupId", pathParams: mealGroupIdParam, response: MealGroupResponseSchema }),
|
|
2174
2204
|
startMealPlan: endpoint({ method: "POST", path: "/meal-groups/:mealGroupId/meal-plans", pathParams: mealGroupIdParam, body: StartMealPlanFromGroupRequestSchema, response: CreateMealPlanResponseSchema }),
|
|
2175
2205
|
history: endpoint({ method: "GET", path: "/meal-groups/:mealGroupId/history", pathParams: mealGroupIdParam, response: MealGroupHistoryResponseSchema }),
|
|
@@ -2179,11 +2209,11 @@ var apiContract = {
|
|
|
2179
2209
|
removeMember: endpoint({ method: "DELETE", path: "/meal-groups/:mealGroupId/members/:memberId", pathParams: mealGroupMemberIdParam, response: MealGroupResponseSchema })
|
|
2180
2210
|
},
|
|
2181
2211
|
friends: {
|
|
2182
|
-
list: endpoint({ method: "GET", path: "/friends", response:
|
|
2183
|
-
blockList: endpoint({ method: "GET", path: "/friends/blocks", response:
|
|
2212
|
+
list: endpoint({ method: "GET", path: "/friends", response: import_zod30.z.array(FriendListItemResponseSchema) }),
|
|
2213
|
+
blockList: endpoint({ method: "GET", path: "/friends/blocks", response: import_zod30.z.array(FriendBlockItemResponseSchema) }),
|
|
2184
2214
|
search: endpoint({ method: "GET", path: "/friends/search", query: MemberSearchQuerySchema, response: MemberSerachResponseSchema }),
|
|
2185
|
-
incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response:
|
|
2186
|
-
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoing", response:
|
|
2215
|
+
incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response: import_zod30.z.array(FriendRequestItemResponseSchema) }),
|
|
2216
|
+
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoing", response: import_zod30.z.array(FriendRequestItemResponseSchema) }),
|
|
2187
2217
|
sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
|
|
2188
2218
|
acceptRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/accept", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
2189
2219
|
rejectRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/reject", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
@@ -2193,7 +2223,7 @@ var apiContract = {
|
|
|
2193
2223
|
unfriend: endpoint({ method: "DELETE", path: "/friends/:memberId", pathParams: memberIdParam, response: NoContentSchema })
|
|
2194
2224
|
},
|
|
2195
2225
|
coupons: {
|
|
2196
|
-
list: endpoint({ method: "GET", path: "/coupons", response:
|
|
2226
|
+
list: endpoint({ method: "GET", path: "/coupons", response: import_zod30.z.array(CouponResponseSchema) }),
|
|
2197
2227
|
use: endpoint({ method: "POST", path: "/coupons/:couponId/use", pathParams: couponIdParam, response: NoContentSchema })
|
|
2198
2228
|
},
|
|
2199
2229
|
challenges: {
|
|
@@ -2201,17 +2231,17 @@ var apiContract = {
|
|
|
2201
2231
|
claimReward: endpoint({ method: "POST", path: "/challenges/rewards", body: ClaimChallengeRewardRequestSchema, response: NoContentSchema })
|
|
2202
2232
|
},
|
|
2203
2233
|
referrals: {
|
|
2204
|
-
list: endpoint({ method: "GET", path: "/referrals", response:
|
|
2234
|
+
list: endpoint({ method: "GET", path: "/referrals", response: import_zod30.z.array(ReferralItemResponseSchema) }),
|
|
2205
2235
|
create: endpoint({ method: "POST", path: "/referrals", response: ReferralCreateResponseSchema }),
|
|
2206
2236
|
redeem: endpoint({ method: "POST", path: "/referrals/redeem", body: RedeemReferralRequestSchema, response: NoContentSchema })
|
|
2207
2237
|
},
|
|
2208
2238
|
notifications: {
|
|
2209
|
-
list: endpoint({ method: "GET", path: "/notifications", response:
|
|
2239
|
+
list: endpoint({ method: "GET", path: "/notifications", response: import_zod30.z.array(MealPlanNotificationSchema) }),
|
|
2210
2240
|
markRead: endpoint({ method: "PATCH", path: "/notifications/:notificationId/read", pathParams: notificationIdParam, response: MealPlanNotificationSchema }),
|
|
2211
2241
|
delete: endpoint({ method: "DELETE", path: "/notifications/:notificationId", pathParams: notificationIdParam, response: NoContentSchema })
|
|
2212
2242
|
},
|
|
2213
2243
|
pushTokens: {
|
|
2214
|
-
list: endpoint({ method: "GET", path: "/push-tokens", response:
|
|
2244
|
+
list: endpoint({ method: "GET", path: "/push-tokens", response: import_zod30.z.array(PushTokenResponseSchema) }),
|
|
2215
2245
|
register: endpoint({ method: "POST", path: "/push-tokens", body: RegisterPushTokenRequestSchema, response: PushTokenResponseSchema }),
|
|
2216
2246
|
revoke: endpoint({ method: "POST", path: "/push-tokens/revoke", body: RevokePushTokenRequestSchema, response: NoContentSchema })
|
|
2217
2247
|
},
|
|
@@ -2221,10 +2251,10 @@ var apiContract = {
|
|
|
2221
2251
|
endMealPlanSessions: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/live-activity/end", pathParams: mealPlanIdParam, body: EndMealPlanLiveActivitySessionRequestSchema, response: NoContentSchema })
|
|
2222
2252
|
},
|
|
2223
2253
|
sse: {
|
|
2224
|
-
notifications: endpoint({ method: "GET", path: "/sse/notifications", query: sseTokenQuery, response:
|
|
2254
|
+
notifications: endpoint({ method: "GET", path: "/sse/notifications", query: sseTokenQuery, response: import_zod30.z.any() })
|
|
2225
2255
|
},
|
|
2226
2256
|
health: {
|
|
2227
|
-
healthCheck: endpoint({ method: "GET", path: "/", response:
|
|
2257
|
+
healthCheck: endpoint({ method: "GET", path: "/", response: import_zod30.z.string() })
|
|
2228
2258
|
}
|
|
2229
2259
|
};
|
|
2230
2260
|
|