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