@kimdaegyu/babmukdang-shared 2.0.2 → 2.0.3

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.
Files changed (52) hide show
  1. package/dist/{chunk-EX7S5FI5.js → chunk-3TY6OPD3.js} +4 -4
  2. package/dist/{chunk-QUAG5LF5.js → chunk-6O2YTBVC.js} +4 -11
  3. package/dist/{chunk-TOXRHSD6.js → chunk-7JYVBXKQ.js} +1 -1
  4. package/dist/chunk-7UZD4LBQ.js +459 -0
  5. package/dist/chunk-BSJC7OVV.js +10 -0
  6. package/dist/{chunk-YV734GYZ.js → chunk-C63TN7L3.js} +9 -26
  7. package/dist/{chunk-Q4BPFDVB.js → chunk-CGFW5LYV.js} +6 -34
  8. package/dist/{chunk-TIOX7OHA.js → chunk-GOOH2LGN.js} +24 -58
  9. package/dist/{chunk-EYZU5HPG.js → chunk-HRM3FQPL.js} +1 -4
  10. package/dist/{chunk-3BLXZW4U.js → chunk-LEH6UFL7.js} +11 -35
  11. package/dist/{chunk-P3MYMK34.js → chunk-NENVUHL5.js} +9 -17
  12. package/dist/{chunk-IPANLE7B.js → chunk-OPMBGBYS.js} +34 -34
  13. package/dist/{chunk-G7TITUHT.js → chunk-QFPVAJ2U.js} +1 -1
  14. package/dist/{chunk-65DWKLP6.js → chunk-RZPNVRRS.js} +5 -14
  15. package/dist/{chunk-DRCY5UNQ.js → chunk-VD3VGLBQ.js} +4 -9
  16. package/dist/{chunk-GESEM4IA.js → chunk-WYBFBLQC.js} +6 -17
  17. package/dist/{chunk-6R5CCY5Q.js → chunk-XMRYAG3V.js} +0 -2
  18. package/dist/domain/article/index.cjs +13 -41
  19. package/dist/domain/article/index.js +5 -5
  20. package/dist/domain/auth/index.cjs +8 -25
  21. package/dist/domain/auth/index.js +3 -3
  22. package/dist/domain/common/index.cjs +735 -1332
  23. package/dist/domain/common/index.js +15 -14
  24. package/dist/domain/food/index.cjs +5 -28
  25. package/dist/domain/food/index.d.cts +4 -4
  26. package/dist/domain/food/index.d.ts +4 -4
  27. package/dist/domain/food/index.js +7 -5
  28. package/dist/domain/friend/index.cjs +10 -35
  29. package/dist/domain/friend/index.js +4 -4
  30. package/dist/domain/index.cjs +736 -1476
  31. package/dist/domain/index.d.cts +4 -5
  32. package/dist/domain/index.d.ts +4 -5
  33. package/dist/domain/index.js +35 -35
  34. package/dist/domain/live-activity/index.cjs +422 -371
  35. package/dist/domain/live-activity/index.js +9 -8
  36. package/dist/domain/meal/index.cjs +11 -38
  37. package/dist/domain/meal/index.js +4 -4
  38. package/dist/domain/meal-plan/index.cjs +462 -426
  39. package/dist/domain/meal-plan/index.d.cts +149 -50
  40. package/dist/domain/meal-plan/index.d.ts +149 -50
  41. package/dist/domain/meal-plan/index.js +7 -8
  42. package/dist/domain/member/index.cjs +8 -25
  43. package/dist/domain/member/index.js +2 -2
  44. package/dist/domain/promotion/index.cjs +4 -16
  45. package/dist/domain/promotion/index.js +3 -3
  46. package/dist/domain/push/index.cjs +392 -341
  47. package/dist/domain/push/index.js +7 -6
  48. package/dist/domain/restaurant/index.js +2 -2
  49. package/dist/index.cjs +736 -1475
  50. package/dist/index.js +17 -16
  51. package/package.json +1 -1
  52. package/dist/chunk-KREAZLLH.js +0 -1062
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  PushPlatformSchema
3
- } from "./chunk-GESEM4IA.js";
3
+ } from "./chunk-WYBFBLQC.js";
4
4
  import {
5
5
  MealPlanLiveActivityBehaviorSchema,
6
6
  MealPlanNotificationKindSchema
7
- } from "./chunk-TIOX7OHA.js";
7
+ } from "./chunk-GOOH2LGN.js";
8
8
  import {
9
9
  ISODateTimeStringSchema
10
- } from "./chunk-EYZU5HPG.js";
10
+ } from "./chunk-HRM3FQPL.js";
11
11
  import {
12
12
  MealPlanIdSchema
13
- } from "./chunk-6R5CCY5Q.js";
13
+ } from "./chunk-XMRYAG3V.js";
14
14
 
15
15
  // src/domain/live-activity/live-activity.schema.ts
16
16
  import { z } from "zod";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  MemberCoreSchema
3
- } from "./chunk-YV734GYZ.js";
3
+ } from "./chunk-C63TN7L3.js";
4
4
  import {
5
5
  ISODateStringSchema
6
- } from "./chunk-EYZU5HPG.js";
6
+ } from "./chunk-HRM3FQPL.js";
7
7
 
8
8
  // src/domain/meal/meal.schema.ts
9
9
  import { z } from "zod";
@@ -13,18 +13,11 @@ var MealStatusResponseSchema = z.object({
13
13
  updatedAt: ISODateStringSchema,
14
14
  secondsToAutoOff: z.number().int().min(0)
15
15
  });
16
- var MealStatusActionSchema = z.enum([
17
- "ARTICLE_UPLOAD",
18
- "SET_MANNUALY"
19
- ]);
16
+ var MealStatusActionSchema = z.enum(["ARTICLE_UPLOAD", "SET_MANNUALY"]);
20
17
  var UpdateMealStatusRequestSchema = z.object({
21
18
  action: MealStatusActionSchema.optional().default("SET_MANNUALY")
22
19
  });
23
- var MealStatusSchema = z.enum([
24
- "ALL",
25
- "HUNGRY",
26
- "NOT_HUNGRY"
27
- ]);
20
+ var MealStatusSchema = z.enum(["ALL", "HUNGRY", "NOT_HUNGRY"]);
28
21
  var FriendMealQuerySchema = z.object({
29
22
  status: MealStatusSchema.optional().default("ALL")
30
23
  });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RestaurantIdSchema
3
- } from "./chunk-6R5CCY5Q.js";
3
+ } from "./chunk-XMRYAG3V.js";
4
4
 
5
5
  // src/domain/restaurant/restaurant.schema.ts
6
6
  import { z } from "zod";
@@ -0,0 +1,459 @@
1
+ import {
2
+ FriendMealItemResponseSchema,
3
+ FriendMealQuerySchema,
4
+ MealStatusResponseSchema,
5
+ UpdateMealStatusRequestSchema
6
+ } from "./chunk-6O2YTBVC.js";
7
+ import {
8
+ ChallengeStatusResponseSchema,
9
+ ClaimChallengeRewardRequestSchema,
10
+ CouponResponseSchema,
11
+ RedeemReferralRequestSchema,
12
+ ReferralCreateResponseSchema,
13
+ ReferralItemResponseSchema
14
+ } from "./chunk-RZPNVRRS.js";
15
+ import {
16
+ ArticleDetailResponseSchema,
17
+ ArticleLikeResponseSchema,
18
+ ArticleListQuerySchema,
19
+ CreateArticleRequestSchema,
20
+ CreateCommentRequestSchema,
21
+ PageArticleSummaryResponseSchema,
22
+ UploadArticleImageRequestSchema,
23
+ UploadArticleImageResponseSchema
24
+ } from "./chunk-NENVUHL5.js";
25
+ import {
26
+ LoginRequestSchema,
27
+ SignupRequestSchema,
28
+ SignupResponseSchema,
29
+ TokenResponseSchema
30
+ } from "./chunk-QFPVAJ2U.js";
31
+ import {
32
+ FriendBlockItemResponseSchema,
33
+ FriendListItemResponseSchema,
34
+ FriendRequestItemResponseSchema
35
+ } from "./chunk-VD3VGLBQ.js";
36
+ import {
37
+ EndMealPlanLiveActivitySessionRequestSchema,
38
+ MealPlanLiveActivitySessionListResponseSchema,
39
+ MealPlanLiveActivitySessionResponseSchema,
40
+ RegisterMealPlanLiveActivitySessionRequestSchema
41
+ } from "./chunk-3TY6OPD3.js";
42
+ import {
43
+ AddMealGroupMemberRequestSchema,
44
+ CreateMealGroupRequestSchema,
45
+ CreateMealPlanShareLinkRequestSchema,
46
+ HomeMealPlanDashboardResponseSchema,
47
+ JoinMealPlanGuestRequestSchema,
48
+ JoinMealPlanGuestResponseSchema,
49
+ MealGroupHistoryResponseSchema,
50
+ MealGroupPreferenceSummarySchema,
51
+ MealGroupResponseSchema,
52
+ MealMapQuerySchema,
53
+ MealMapResponseSchema,
54
+ MealPlanGuestSessionQuerySchema,
55
+ MealPlanGuestSessionResponseSchema,
56
+ MealPlanShareLinkSummarySchema,
57
+ MealPlanSharePreviewResponseSchema,
58
+ StartMealPlanFromGroupRequestSchema,
59
+ UpdateMealGroupMemberRoleRequestSchema
60
+ } from "./chunk-LEH6UFL7.js";
61
+ import {
62
+ PushTokenResponseSchema,
63
+ RegisterPushTokenRequestSchema,
64
+ RevokePushTokenRequestSchema
65
+ } from "./chunk-WYBFBLQC.js";
66
+ import {
67
+ CompleteMealPlanDecisionStageRequestSchema,
68
+ ConfirmMealPlanDecisionSnapshotRequestSchema,
69
+ CreateMealPlanChangeRequestSchema,
70
+ CreateMealPlanInviteRequestSchema,
71
+ CreateMealPlanJoinRequestSchema,
72
+ CreateMealPlanRequestSchema,
73
+ CreateMealPlanResponseSchema,
74
+ CreateMealPlanVoteRequestSchema,
75
+ ExposeMealPlanToNearbyFriendsRequestSchema,
76
+ ExposeMealPlanToNearbyFriendsResponseSchema,
77
+ MealPlanChatMessageListResponseSchema,
78
+ MealPlanDecisionProgressSchema,
79
+ MealPlanDecisionStageIdSchema,
80
+ MealPlanDecisionTaskKeySchema,
81
+ MealPlanInviteListResponseSchema,
82
+ MealPlanNotificationSchema,
83
+ MealPlanResponseSchema,
84
+ MyMealPlanListResponseSchema,
85
+ NearbyFriendExposureEligibilitySchema,
86
+ NearbyFriendMealPlanSummarySchema,
87
+ ReopenMealPlanDecisionTaskRequestSchema,
88
+ SendMealPlanInviteResponseSchema,
89
+ UpdateMealPlanContextRequestSchema
90
+ } from "./chunk-GOOH2LGN.js";
91
+ import {
92
+ CreateProfileRequestSchema,
93
+ MemberFoodPreferenceSchema,
94
+ MemberLocationSettingsResponseSchema,
95
+ MemberResponseSchema,
96
+ MemberSearchQuerySchema,
97
+ MemberSerachResponseSchema,
98
+ ProfileDetailResponseSchema,
99
+ UpdateMemberLocationConsentRequestSchema,
100
+ UpdateMemberLocationRequestSchema,
101
+ UpdatePreferenceRequestSchema,
102
+ UpdateProfileRequestSchema,
103
+ UploadProfileImageRequestSchema,
104
+ UploadProfileImageResponseSchema
105
+ } from "./chunk-C63TN7L3.js";
106
+ import {
107
+ ArticleIdSchema,
108
+ CommentIdSchema,
109
+ CouponIdSchema,
110
+ FriendRequestIdSchema,
111
+ MealGroupIdSchema,
112
+ MealPlanChangeRequestIdSchema,
113
+ MealPlanChatMessageIdSchema,
114
+ MealPlanChatRoomIdSchema,
115
+ MealPlanIdSchema,
116
+ MealPlanInviteIdSchema,
117
+ MealPlanJoinRequestIdSchema,
118
+ MealPlanNearbyFriendExposureBatchIdSchema,
119
+ MealPlanShareLinkIdSchema,
120
+ MealPlanShareLinkTokenSchema,
121
+ MemberIdSchema,
122
+ ReferralCodeSchema,
123
+ RestaurantIdSchema,
124
+ SubscriptionIdSchema
125
+ } from "./chunk-XMRYAG3V.js";
126
+
127
+ // src/domain/common/contracts/api.ts
128
+ import { z as z4 } from "zod";
129
+
130
+ // src/domain/common/schema/cache-invalidation.schema.ts
131
+ import { z } from "zod";
132
+ var CacheInvalidationEntitySchema = z.enum([
133
+ "article",
134
+ "mealPlan",
135
+ "mealPlanInvite",
136
+ "mealPlanParticipant",
137
+ "mealPlanDecision",
138
+ "mealPlanChat",
139
+ "mealGroup",
140
+ "notification",
141
+ "friend"
142
+ ]);
143
+ var CacheInvalidationActionSchema = z.enum([
144
+ "created",
145
+ "updated",
146
+ "deleted",
147
+ "accepted",
148
+ "rejected",
149
+ "cancelled",
150
+ "closed",
151
+ "joined",
152
+ "ready",
153
+ "confirmed",
154
+ "locked",
155
+ "completed",
156
+ "recorded",
157
+ "read"
158
+ ]);
159
+ var CacheInvalidationKeySchema = z.enum([
160
+ "articles",
161
+ "mealPlans",
162
+ "mealPlanDetail",
163
+ "mealPlanInvites",
164
+ "mealPlanJoinRequests",
165
+ "mealPlanNearbyFriends",
166
+ "mealPlanMessages",
167
+ "mealGroups",
168
+ "notifications",
169
+ "friends",
170
+ "friendMeals"
171
+ ]);
172
+ var CacheInvalidationEventSchema = z.object({
173
+ type: z.literal("cache.invalidate"),
174
+ entity: CacheInvalidationEntitySchema,
175
+ action: CacheInvalidationActionSchema,
176
+ id: z.union([z.string(), z.number()]).optional(),
177
+ keys: z.array(CacheInvalidationKeySchema).min(1),
178
+ occurredAt: z.string().datetime()
179
+ });
180
+
181
+ // src/domain/common/schema/envelope.schema.ts
182
+ import { z as z2 } from "zod";
183
+ var NoContentSchema = z2.null();
184
+ var ApiSuccessSchema = (data) => z2.object({
185
+ success: z2.literal(true),
186
+ code: z2.number().int(),
187
+ message: z2.string(),
188
+ data
189
+ });
190
+ var ApiFailureSchema = z2.object({
191
+ success: z2.literal(false),
192
+ status: z2.number().int(),
193
+ code: z2.string(),
194
+ message: z2.string()
195
+ });
196
+ var ApiResponseSchema = (data) => z2.union([ApiSuccessSchema(data), ApiFailureSchema]);
197
+ var CreatedEntityIdResponseSchema = z2.discriminatedUnion("entity", [
198
+ z2.object({ entity: z2.literal("article"), id: ArticleIdSchema }),
199
+ z2.object({ entity: z2.literal("comment"), id: CommentIdSchema }),
200
+ z2.object({ entity: z2.literal("subscription"), id: SubscriptionIdSchema }),
201
+ z2.object({ entity: z2.literal("coupon"), id: CouponIdSchema }),
202
+ z2.object({ entity: z2.literal("mealPlan"), id: MealPlanIdSchema }),
203
+ z2.object({ entity: z2.literal("mealPlanInvite"), id: MealPlanInviteIdSchema }),
204
+ z2.object({ entity: z2.literal("mealPlanJoinRequest"), id: MealPlanJoinRequestIdSchema }),
205
+ z2.object({ entity: z2.literal("mealPlanChangeRequest"), id: MealPlanChangeRequestIdSchema }),
206
+ z2.object({ entity: z2.literal("mealPlanShareLink"), id: MealPlanShareLinkIdSchema }),
207
+ z2.object({ entity: z2.literal("mealPlanChatMessage"), id: MealPlanChatMessageIdSchema }),
208
+ z2.object({ entity: z2.literal("mealGroup"), id: MealGroupIdSchema })
209
+ ]);
210
+
211
+ // src/domain/common/contracts/endpoint.ts
212
+ import { z as z3 } from "zod";
213
+ var NoBodySchema = z3.undefined();
214
+ var NoQuerySchema = z3.undefined();
215
+ var NoParamsSchema = z3.undefined();
216
+ var endpoint = (contract) => ({
217
+ method: contract.method,
218
+ path: contract.path,
219
+ pathParams: contract.pathParams ?? NoParamsSchema,
220
+ query: contract.query ?? NoQuerySchema,
221
+ body: contract.body ?? NoBodySchema,
222
+ response: contract.response
223
+ });
224
+
225
+ // src/domain/common/contracts/api.ts
226
+ var memberIdParam = z4.object({ memberId: MemberIdSchema });
227
+ var articleIdParam = z4.object({ articleId: ArticleIdSchema });
228
+ var commentIdParam = z4.object({ commentId: CommentIdSchema });
229
+ var mealPlanIdParam = z4.object({ mealPlanId: MealPlanIdSchema });
230
+ var mealPlanInviteIdParam = z4.object({ inviteId: MealPlanInviteIdSchema });
231
+ var mealPlanJoinRequestIdParam = z4.object({ requestId: MealPlanJoinRequestIdSchema });
232
+ var mealPlanDecisionStageIdParam = mealPlanIdParam.extend({
233
+ stageId: MealPlanDecisionStageIdSchema
234
+ });
235
+ var mealPlanChangeRequestIdParam = mealPlanIdParam.extend({
236
+ requestId: MealPlanChangeRequestIdSchema
237
+ });
238
+ var mealPlanDecisionTaskKeyParam = mealPlanIdParam.extend({
239
+ taskKey: MealPlanDecisionTaskKeySchema
240
+ });
241
+ var mealPlanDecisionSnapshotIdParam = mealPlanIdParam.extend({
242
+ snapshotId: z4.string().uuid()
243
+ });
244
+ var mealPlanParticipantIdParam = mealPlanIdParam.extend({
245
+ participantId: z4.string().uuid()
246
+ });
247
+ var mealPlanShareTokenParam = z4.object({ token: MealPlanShareLinkTokenSchema });
248
+ var notificationIdParam = z4.object({ notificationId: z4.string().min(1) });
249
+ var couponIdParam = z4.object({ couponId: CouponIdSchema });
250
+ var mealGroupIdParam = z4.object({ mealGroupId: MealGroupIdSchema });
251
+ var mealGroupMemberIdParam = mealGroupIdParam.extend({ memberId: MemberIdSchema });
252
+ var friendRequestIdParam = z4.object({ requestId: FriendRequestIdSchema });
253
+ var sseTokenQuery = z4.object({ token: z4.string().min(1) });
254
+ var apiContract = {
255
+ auth: {
256
+ signup: endpoint({ method: "POST", path: "/auth/signup", body: SignupRequestSchema, response: SignupResponseSchema }),
257
+ login: endpoint({ method: "POST", path: "/auth/login", body: LoginRequestSchema, response: TokenResponseSchema }),
258
+ refresh: endpoint({ method: "POST", path: "/auth/refresh", response: TokenResponseSchema }),
259
+ logout: endpoint({ method: "POST", path: "/auth/logout", response: NoContentSchema })
260
+ },
261
+ members: {
262
+ me: endpoint({ method: "GET", path: "/members/me", response: MemberResponseSchema }),
263
+ myProfile: endpoint({ method: "GET", path: "/members/me/profile", response: ProfileDetailResponseSchema }),
264
+ search: endpoint({ method: "GET", path: "/members/search", query: MemberSearchQuerySchema, response: MemberSerachResponseSchema }),
265
+ memberProfile: endpoint({ method: "GET", path: "/members/:memberId/profile", pathParams: memberIdParam, response: ProfileDetailResponseSchema }),
266
+ presignProfileImage: endpoint({ method: "POST", path: "/uploads/presign-profile", body: UploadProfileImageRequestSchema, response: UploadProfileImageResponseSchema }),
267
+ createProfile: endpoint({ method: "POST", path: "/members/onboarding", body: CreateProfileRequestSchema, response: NoContentSchema }),
268
+ createProfileAlias: endpoint({ method: "POST", path: "/onboarding", body: CreateProfileRequestSchema, response: NoContentSchema }),
269
+ updateProfile: endpoint({ method: "PATCH", path: "/members/me/profile", body: UpdateProfileRequestSchema, response: NoContentSchema }),
270
+ locationSettings: endpoint({ method: "GET", path: "/members/me/location-settings", response: MemberLocationSettingsResponseSchema }),
271
+ updateLocationConsent: endpoint({ method: "PATCH", path: "/members/me/location-consent", body: UpdateMemberLocationConsentRequestSchema, response: MemberLocationSettingsResponseSchema }),
272
+ updateLocation: endpoint({ method: "PATCH", path: "/members/me/location", body: UpdateMemberLocationRequestSchema, response: MemberLocationSettingsResponseSchema })
273
+ },
274
+ preferences: {
275
+ my: endpoint({ method: "GET", path: "/preferences/me", response: MemberFoodPreferenceSchema }),
276
+ update: endpoint({ method: "PATCH", path: "/preferences/me", body: UpdatePreferenceRequestSchema, response: NoContentSchema })
277
+ },
278
+ mealStatus: {
279
+ my: endpoint({ method: "GET", path: "/members/me/meal-status", response: MealStatusResponseSchema }),
280
+ updateMealStatus: endpoint({ method: "PATCH", path: "/members/me/meal-status", body: UpdateMealStatusRequestSchema, response: NoContentSchema }),
281
+ friendMealStatus: endpoint({ method: "GET", path: "/friends/me/meals", query: FriendMealQuerySchema, response: z4.array(FriendMealItemResponseSchema) })
282
+ },
283
+ articles: {
284
+ list: endpoint({ method: "GET", path: "/articles/home", query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
285
+ byMember: endpoint({ method: "GET", path: "/articles/by-author/:memberId", pathParams: memberIdParam, query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
286
+ my: endpoint({ method: "GET", path: "/articles/my", response: PageArticleSummaryResponseSchema }),
287
+ detail: endpoint({ method: "GET", path: "/articles/:articleId", pathParams: articleIdParam, response: ArticleDetailResponseSchema }),
288
+ create: endpoint({ method: "POST", path: "/articles", body: CreateArticleRequestSchema, response: CreatedEntityIdResponseSchema }),
289
+ like: endpoint({ method: "POST", path: "/articles/:articleId/like", pathParams: articleIdParam, response: ArticleLikeResponseSchema }),
290
+ createComment: endpoint({ method: "POST", path: "/articles/:articleId/comments", pathParams: articleIdParam, body: CreateCommentRequestSchema, response: CreatedEntityIdResponseSchema }),
291
+ presignArticleImage: endpoint({ method: "POST", path: "/uploads/presign-article", body: UploadArticleImageRequestSchema, response: UploadArticleImageResponseSchema }),
292
+ delete: endpoint({ method: "DELETE", path: "/articles/:articleId", pathParams: articleIdParam, response: NoContentSchema }),
293
+ deleteComment: endpoint({ method: "DELETE", path: "/articles/comments/:commentId", pathParams: commentIdParam, response: NoContentSchema })
294
+ },
295
+ mealPlans: {
296
+ create: endpoint({ method: "POST", path: "/meal-plans", body: CreateMealPlanRequestSchema, response: CreateMealPlanResponseSchema }),
297
+ my: endpoint({ method: "GET", path: "/meal-plans/me", response: MyMealPlanListResponseSchema }),
298
+ homeDashboard: endpoint({ method: "GET", path: "/meal-plans/home-dashboard", response: HomeMealPlanDashboardResponseSchema }),
299
+ map: endpoint({ method: "GET", path: "/meal-plans/map", query: MealMapQuerySchema, response: MealMapResponseSchema }),
300
+ detail: endpoint({ method: "GET", path: "/meal-plans/:mealPlanId", pathParams: mealPlanIdParam, response: MealPlanResponseSchema }),
301
+ chatMessages: endpoint({ method: "GET", path: "/meal-plans/:mealPlanId/chat/messages", pathParams: mealPlanIdParam, response: MealPlanChatMessageListResponseSchema }),
302
+ updateContext: endpoint({ method: "PATCH", path: "/meal-plans/:mealPlanId/context", pathParams: mealPlanIdParam, body: UpdateMealPlanContextRequestSchema, response: MealPlanResponseSchema }),
303
+ complete: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/complete", pathParams: mealPlanIdParam, response: MealPlanResponseSchema }),
304
+ cancel: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/cancel", pathParams: mealPlanIdParam, response: MealPlanResponseSchema }),
305
+ removeParticipant: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/participants/:participantId/remove", pathParams: mealPlanParticipantIdParam, response: MealPlanResponseSchema }),
306
+ recorded: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/recorded", pathParams: mealPlanIdParam, response: MealPlanResponseSchema }),
307
+ invite: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/invites", pathParams: mealPlanIdParam, body: CreateMealPlanInviteRequestSchema, response: SendMealPlanInviteResponseSchema }),
308
+ receivedInvites: endpoint({ method: "GET", path: "/meal-plans/invites/received", response: MealPlanInviteListResponseSchema }),
309
+ sentInvites: endpoint({ method: "GET", path: "/meal-plans/invites/sent", response: MealPlanInviteListResponseSchema }),
310
+ acceptInvite: endpoint({ method: "POST", path: "/meal-plans/invites/:inviteId/accept", pathParams: mealPlanInviteIdParam, response: MealPlanResponseSchema }),
311
+ declineInvite: endpoint({ method: "POST", path: "/meal-plans/invites/:inviteId/decline", pathParams: mealPlanInviteIdParam, response: NoContentSchema }),
312
+ createShareLink: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/share-links", pathParams: mealPlanIdParam, body: CreateMealPlanShareLinkRequestSchema, response: MealPlanShareLinkSummarySchema }),
313
+ sharePreview: endpoint({ method: "GET", path: "/meal-plan-links/:token", pathParams: mealPlanShareTokenParam, response: MealPlanSharePreviewResponseSchema }),
314
+ joinGuest: endpoint({ method: "POST", path: "/meal-plan-links/:token/join", pathParams: mealPlanShareTokenParam, body: JoinMealPlanGuestRequestSchema, response: JoinMealPlanGuestResponseSchema }),
315
+ guestSession: endpoint({ method: "GET", path: "/meal-plan-links/:token/session", pathParams: mealPlanShareTokenParam, query: MealPlanGuestSessionQuerySchema, response: MealPlanGuestSessionResponseSchema }),
316
+ guestChatMessages: endpoint({ method: "GET", path: "/meal-plan-links/:token/chat/messages", pathParams: mealPlanShareTokenParam, query: MealPlanGuestSessionQuerySchema, response: MealPlanChatMessageListResponseSchema }),
317
+ exposeNearbyFriends: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/nearby-friends/expose", pathParams: mealPlanIdParam, body: ExposeMealPlanToNearbyFriendsRequestSchema, response: ExposeMealPlanToNearbyFriendsResponseSchema }),
318
+ closeNearbyFriends: endpoint({ method: "DELETE", path: "/meal-plans/:mealPlanId/nearby-friends/expose", pathParams: mealPlanIdParam, response: NoContentSchema }),
319
+ nearbyFriendExposureEligibility: endpoint({ method: "GET", path: "/meal-plans/nearby-friends/eligibility", response: NearbyFriendExposureEligibilitySchema }),
320
+ nearbyFriends: endpoint({ method: "GET", path: "/meal-plans/nearby-friends", response: z4.array(NearbyFriendMealPlanSummarySchema) }),
321
+ requestJoin: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/join-requests", pathParams: mealPlanIdParam, body: CreateMealPlanJoinRequestSchema, response: CreatedEntityIdResponseSchema }),
322
+ acceptJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/accept", pathParams: mealPlanJoinRequestIdParam, response: MealPlanResponseSchema }),
323
+ rejectJoinRequest: endpoint({ method: "POST", path: "/meal-plans/join-requests/:requestId/reject", pathParams: mealPlanJoinRequestIdParam, response: NoContentSchema }),
324
+ vote: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/stages/:stageId/votes", pathParams: mealPlanDecisionStageIdParam, body: CreateMealPlanVoteRequestSchema, response: MealPlanResponseSchema }),
325
+ completeStage: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/stages/:stageId/complete", pathParams: mealPlanDecisionStageIdParam, body: CompleteMealPlanDecisionStageRequestSchema, response: MealPlanResponseSchema }),
326
+ decisionProgress: endpoint({ method: "GET", path: "/meal-plans/:mealPlanId/decision-progress", pathParams: mealPlanIdParam, response: MealPlanDecisionProgressSchema }),
327
+ reopenDecisionTask: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/decision-tasks/:taskKey/reopen", pathParams: mealPlanDecisionTaskKeyParam, body: ReopenMealPlanDecisionTaskRequestSchema, response: MealPlanResponseSchema }),
328
+ confirmDecisionSnapshot: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/decision-snapshots/:snapshotId/confirm", pathParams: mealPlanDecisionSnapshotIdParam, body: ConfirmMealPlanDecisionSnapshotRequestSchema, response: MealPlanResponseSchema }),
329
+ ready: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/ready", pathParams: mealPlanIdParam, response: MealPlanResponseSchema }),
330
+ unready: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/unready", pathParams: mealPlanIdParam, response: MealPlanResponseSchema }),
331
+ createChangeRequest: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/change-requests", pathParams: mealPlanIdParam, body: CreateMealPlanChangeRequestSchema, response: CreatedEntityIdResponseSchema }),
332
+ acceptChangeRequest: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/change-requests/:requestId/accept", pathParams: mealPlanChangeRequestIdParam, response: MealPlanResponseSchema }),
333
+ confirm: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/confirm", pathParams: mealPlanIdParam, response: MealPlanResponseSchema })
334
+ },
335
+ mealGroups: {
336
+ create: endpoint({ method: "POST", path: "/meal-groups", body: CreateMealGroupRequestSchema, response: MealGroupResponseSchema }),
337
+ list: endpoint({ method: "GET", path: "/meal-groups", response: z4.array(MealGroupResponseSchema) }),
338
+ detail: endpoint({ method: "GET", path: "/meal-groups/:mealGroupId", pathParams: mealGroupIdParam, response: MealGroupResponseSchema }),
339
+ startMealPlan: endpoint({ method: "POST", path: "/meal-groups/:mealGroupId/meal-plans", pathParams: mealGroupIdParam, body: StartMealPlanFromGroupRequestSchema, response: CreateMealPlanResponseSchema }),
340
+ history: endpoint({ method: "GET", path: "/meal-groups/:mealGroupId/history", pathParams: mealGroupIdParam, response: MealGroupHistoryResponseSchema }),
341
+ preferences: endpoint({ method: "GET", path: "/meal-groups/:mealGroupId/preferences", pathParams: mealGroupIdParam, response: MealGroupPreferenceSummarySchema }),
342
+ addMember: endpoint({ method: "POST", path: "/meal-groups/:mealGroupId/members", pathParams: mealGroupIdParam, body: AddMealGroupMemberRequestSchema, response: MealGroupResponseSchema }),
343
+ updateMemberRole: endpoint({ method: "PATCH", path: "/meal-groups/:mealGroupId/members/:memberId/role", pathParams: mealGroupMemberIdParam, body: UpdateMealGroupMemberRoleRequestSchema, response: MealGroupResponseSchema }),
344
+ removeMember: endpoint({ method: "DELETE", path: "/meal-groups/:mealGroupId/members/:memberId", pathParams: mealGroupMemberIdParam, response: MealGroupResponseSchema })
345
+ },
346
+ friends: {
347
+ list: endpoint({ method: "GET", path: "/friends", response: z4.array(FriendListItemResponseSchema) }),
348
+ blockList: endpoint({ method: "GET", path: "/friends/blocks", response: z4.array(FriendBlockItemResponseSchema) }),
349
+ search: endpoint({ method: "GET", path: "/friends/search", query: MemberSearchQuerySchema, response: MemberSerachResponseSchema }),
350
+ incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response: z4.array(FriendRequestItemResponseSchema) }),
351
+ outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoing", response: z4.array(FriendRequestItemResponseSchema) }),
352
+ sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
353
+ acceptRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/accept", pathParams: friendRequestIdParam, response: NoContentSchema }),
354
+ rejectRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/reject", pathParams: friendRequestIdParam, response: NoContentSchema }),
355
+ block: endpoint({ method: "POST", path: "/friends/blocks/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
356
+ cancelRequest: endpoint({ method: "DELETE", path: "/friends/requests/:requestId", pathParams: friendRequestIdParam, response: NoContentSchema }),
357
+ unblock: endpoint({ method: "DELETE", path: "/friends/blocks/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
358
+ unfriend: endpoint({ method: "DELETE", path: "/friends/:memberId", pathParams: memberIdParam, response: NoContentSchema })
359
+ },
360
+ coupons: {
361
+ list: endpoint({ method: "GET", path: "/coupons", response: z4.array(CouponResponseSchema) }),
362
+ use: endpoint({ method: "POST", path: "/coupons/:couponId/use", pathParams: couponIdParam, response: NoContentSchema })
363
+ },
364
+ challenges: {
365
+ status: endpoint({ method: "GET", path: "/challenges/status", response: ChallengeStatusResponseSchema }),
366
+ claimReward: endpoint({ method: "POST", path: "/challenges/rewards", body: ClaimChallengeRewardRequestSchema, response: NoContentSchema })
367
+ },
368
+ referrals: {
369
+ list: endpoint({ method: "GET", path: "/referrals", response: z4.array(ReferralItemResponseSchema) }),
370
+ create: endpoint({ method: "POST", path: "/referrals", response: ReferralCreateResponseSchema }),
371
+ redeem: endpoint({ method: "POST", path: "/referrals/redeem", body: RedeemReferralRequestSchema, response: NoContentSchema })
372
+ },
373
+ notifications: {
374
+ list: endpoint({ method: "GET", path: "/notifications", response: z4.array(MealPlanNotificationSchema) }),
375
+ markRead: endpoint({ method: "PATCH", path: "/notifications/:notificationId/read", pathParams: notificationIdParam, response: MealPlanNotificationSchema }),
376
+ delete: endpoint({ method: "DELETE", path: "/notifications/:notificationId", pathParams: notificationIdParam, response: NoContentSchema })
377
+ },
378
+ pushTokens: {
379
+ list: endpoint({ method: "GET", path: "/push-tokens", response: z4.array(PushTokenResponseSchema) }),
380
+ register: endpoint({ method: "POST", path: "/push-tokens", body: RegisterPushTokenRequestSchema, response: PushTokenResponseSchema }),
381
+ revoke: endpoint({ method: "POST", path: "/push-tokens/revoke", body: RevokePushTokenRequestSchema, response: NoContentSchema })
382
+ },
383
+ liveActivities: {
384
+ listMealPlanSessions: endpoint({ method: "GET", path: "/meal-plans/:mealPlanId/live-activity", pathParams: mealPlanIdParam, response: MealPlanLiveActivitySessionListResponseSchema }),
385
+ registerMealPlanSession: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/live-activity/sessions", pathParams: mealPlanIdParam, body: RegisterMealPlanLiveActivitySessionRequestSchema, response: MealPlanLiveActivitySessionResponseSchema }),
386
+ endMealPlanSessions: endpoint({ method: "POST", path: "/meal-plans/:mealPlanId/live-activity/end", pathParams: mealPlanIdParam, body: EndMealPlanLiveActivitySessionRequestSchema, response: NoContentSchema })
387
+ },
388
+ sse: {
389
+ notifications: endpoint({ method: "GET", path: "/sse/notifications", query: sseTokenQuery, response: z4.any() })
390
+ },
391
+ health: {
392
+ healthCheck: endpoint({ method: "GET", path: "/", response: z4.string() })
393
+ }
394
+ };
395
+
396
+ // src/domain/common/contracts/cache-invalidation.ts
397
+ var CACHE_INVALIDATION_SSE_EVENT = "cache-invalidate";
398
+
399
+ // src/domain/common/contracts/envelope.ts
400
+ var makeApiResponseSchema = ApiResponseSchema;
401
+ var makeApiSuccessSchema = ApiSuccessSchema;
402
+
403
+ // src/domain/common/contracts/id.ts
404
+ var toMemberId = (value) => MemberIdSchema.parse(value);
405
+ var toArticleId = (value) => ArticleIdSchema.parse(value);
406
+ var toMealPlanId = (value) => MealPlanIdSchema.parse(value);
407
+ var toMealPlanInviteId = (value) => MealPlanInviteIdSchema.parse(value);
408
+ var toMealPlanJoinRequestId = (value) => MealPlanJoinRequestIdSchema.parse(value);
409
+ var toMealPlanNearbyFriendExposureBatchId = (value) => MealPlanNearbyFriendExposureBatchIdSchema.parse(value);
410
+ var toMealPlanChangeRequestId = (value) => MealPlanChangeRequestIdSchema.parse(value);
411
+ var toMealPlanShareLinkId = (value) => MealPlanShareLinkIdSchema.parse(value);
412
+ var toMealPlanShareLinkToken = (value) => MealPlanShareLinkTokenSchema.parse(value);
413
+ var toMealPlanChatRoomId = (value) => MealPlanChatRoomIdSchema.parse(value);
414
+ var toMealPlanChatMessageId = (value) => MealPlanChatMessageIdSchema.parse(value);
415
+ var toMealGroupId = (value) => MealGroupIdSchema.parse(value);
416
+ var toRestaurantId = (value) => RestaurantIdSchema.parse(value);
417
+ var toCommentId = (value) => CommentIdSchema.parse(value);
418
+ var toCouponId = (value) => CouponIdSchema.parse(value);
419
+ var toSubscriptionId = (value) => SubscriptionIdSchema.parse(value);
420
+ var toFriendRequestId = (value) => FriendRequestIdSchema.parse(value);
421
+ var toReferralCode = (value) => ReferralCodeSchema.parse(value);
422
+
423
+ export {
424
+ CacheInvalidationEntitySchema,
425
+ CacheInvalidationActionSchema,
426
+ CacheInvalidationKeySchema,
427
+ CacheInvalidationEventSchema,
428
+ NoContentSchema,
429
+ ApiSuccessSchema,
430
+ ApiFailureSchema,
431
+ ApiResponseSchema,
432
+ CreatedEntityIdResponseSchema,
433
+ NoBodySchema,
434
+ NoQuerySchema,
435
+ NoParamsSchema,
436
+ endpoint,
437
+ apiContract,
438
+ CACHE_INVALIDATION_SSE_EVENT,
439
+ makeApiResponseSchema,
440
+ makeApiSuccessSchema,
441
+ toMemberId,
442
+ toArticleId,
443
+ toMealPlanId,
444
+ toMealPlanInviteId,
445
+ toMealPlanJoinRequestId,
446
+ toMealPlanNearbyFriendExposureBatchId,
447
+ toMealPlanChangeRequestId,
448
+ toMealPlanShareLinkId,
449
+ toMealPlanShareLinkToken,
450
+ toMealPlanChatRoomId,
451
+ toMealPlanChatMessageId,
452
+ toMealGroupId,
453
+ toRestaurantId,
454
+ toCommentId,
455
+ toCouponId,
456
+ toSubscriptionId,
457
+ toFriendRequestId,
458
+ toReferralCode
459
+ };
@@ -0,0 +1,10 @@
1
+ // src/domain/food/food.contracts.ts
2
+ var FOOD_CODE_MANIFEST_PATH = "/manifests/food-code-manifest.json";
3
+ var AI_CLASS_TO_FOOD_CODE_MAP_PATH = "/manifests/ai-class-to-food-code-map.json";
4
+ var FOOD_IMAGE_INDEX_PATH = "/manifests/food-image-index.json";
5
+
6
+ export {
7
+ FOOD_CODE_MANIFEST_PATH,
8
+ AI_CLASS_TO_FOOD_CODE_MAP_PATH,
9
+ FOOD_IMAGE_INDEX_PATH
10
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  FoodSchema,
3
3
  MemberIdSchema
4
- } from "./chunk-6R5CCY5Q.js";
4
+ } from "./chunk-XMRYAG3V.js";
5
5
 
6
6
  // src/domain/member/member.schema.ts
7
7
  import { z as z2 } from "zod";
@@ -18,24 +18,10 @@ var UploadPresignImageRequestSchema = z.object({
18
18
  });
19
19
 
20
20
  // src/domain/member/member.schema.ts
21
- var MemberRoleSchema = z2.enum([
22
- "USER",
23
- "ADMIN"
24
- ]);
25
- var LocationConsentStatusSchema = z2.enum([
26
- "UNKNOWN",
27
- "GRANTED",
28
- "DENIED"
29
- ]);
30
- var OnboardingStatusSchema = z2.enum([
31
- "REQUIRED",
32
- "COMPLETED"
33
- ]);
34
- var PermissionKindSchema = z2.enum([
35
- "LOCATION",
36
- "NOTIFICATION",
37
- "CAMERA"
38
- ]);
21
+ var MemberRoleSchema = z2.enum(["USER", "ADMIN"]);
22
+ var LocationConsentStatusSchema = z2.enum(["UNKNOWN", "GRANTED", "DENIED"]);
23
+ var OnboardingStatusSchema = z2.enum(["REQUIRED", "COMPLETED"]);
24
+ var PermissionKindSchema = z2.enum(["LOCATION", "NOTIFICATION", "CAMERA"]);
39
25
  var PermissionStatusSchema = z2.enum([
40
26
  "UNKNOWN",
41
27
  "PROMPT",
@@ -44,12 +30,7 @@ var PermissionStatusSchema = z2.enum([
44
30
  "LIMITED",
45
31
  "UNSUPPORTED"
46
32
  ]);
47
- var PermissionPlatformSchema = z2.enum([
48
- "WEB",
49
- "IOS",
50
- "ANDROID",
51
- "UNKNOWN"
52
- ]);
33
+ var PermissionPlatformSchema = z2.enum(["WEB", "IOS", "ANDROID", "UNKNOWN"]);
53
34
  var DevicePermissionSnapshotSchema = z2.object({
54
35
  kind: PermissionKindSchema,
55
36
  status: PermissionStatusSchema,
@@ -123,7 +104,9 @@ var UpdateProfileRequestSchema = z2.object({
123
104
  bio: z2.string().max(500).nullable()
124
105
  });
125
106
  var UpdatePreferenceRequestSchema = MemberFoodPreferenceSchema;
126
- var CompleteOnboardingRequestSchema = UpdateProfileRequestSchema.merge(UpdatePreferenceRequestSchema);
107
+ var CompleteOnboardingRequestSchema = UpdateProfileRequestSchema.merge(
108
+ UpdatePreferenceRequestSchema
109
+ );
127
110
  var OnboardingDraftSchema = z2.object({
128
111
  username: z2.string().min(1).max(50).optional(),
129
112
  profileImageUrl: z2.string().url().nullable().optional(),