@kimdaegyu/babmukdang-shared 1.1.3 → 1.1.10
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-U6OQQOPN.js → chunk-4E5E3PFW.js} +6 -2
- package/dist/{chunk-VAWYU5JG.js → chunk-AI2YMBJX.js} +4 -1
- package/dist/{chunk-TY4WZEIZ.js → chunk-K3CZKI2F.js} +12 -4
- package/dist/{chunk-J76VB5SE.js → chunk-OJVXYCSH.js} +2 -3
- package/dist/{chunk-M5OSCHMV.js → chunk-PQMEXOPZ.js} +55 -6
- package/dist/{chunk-UJJMW7II.js → chunk-W4C7XHTX.js} +1 -1
- package/dist/{chunk-W3YQYI4R.js → chunk-W4TUW2GY.js} +2 -2
- package/dist/{chunk-VWPUBTMV.js → chunk-WNYCCQM4.js} +39 -21
- package/dist/{chunk-JEUH3JDZ.js → chunk-YM7YU7IR.js} +108 -88
- package/dist/{chunk-KRVEQVRC.js → chunk-ZH7D7B2Y.js} +10 -4
- package/dist/domain/article/index.cjs +18 -5
- package/dist/domain/article/index.js +8 -4
- package/dist/domain/auth/index.cjs +7 -4
- package/dist/domain/auth/index.js +2 -2
- package/dist/domain/common/index.cjs +258 -189
- package/dist/domain/common/index.js +10 -9
- package/dist/domain/friend/index.cjs +14 -4
- package/dist/domain/friend/index.js +8 -4
- package/dist/domain/index.cjs +278 -191
- package/dist/domain/index.js +41 -23
- package/dist/domain/meal/index.cjs +6 -2
- package/dist/domain/meal/index.js +2 -2
- package/dist/domain/member/index.cjs +12 -6
- package/dist/domain/member/index.js +7 -5
- package/dist/domain/plan/index.cjs +55 -6
- package/dist/domain/plan/index.js +3 -3
- package/dist/domain/promotion/index.cjs +4 -1
- package/dist/domain/promotion/index.js +1 -1
- package/dist/domain/recruit/index.cjs +11 -3
- package/dist/domain/recruit/index.js +10 -9
- package/dist/domain/room/index.cjs +63 -6
- package/dist/domain/room/index.js +10 -2
- package/dist/index.cjs +270 -192
- package/dist/index.js +12 -12
- package/package.json +1 -1
- package/dist/domain/article/index.d.cts +0 -952
- package/dist/domain/article/index.d.ts +0 -952
- package/dist/domain/auth/index.d.cts +0 -72
- package/dist/domain/auth/index.d.ts +0 -72
- package/dist/domain/common/index.d.cts +0 -2689
- package/dist/domain/common/index.d.ts +0 -2689
- package/dist/domain/friend/index.d.cts +0 -117
- package/dist/domain/friend/index.d.ts +0 -117
- package/dist/domain/index.d.cts +0 -14
- package/dist/domain/index.d.ts +0 -14
- package/dist/domain/invitation/index.d.cts +0 -64
- package/dist/domain/invitation/index.d.ts +0 -64
- package/dist/domain/meal/index.d.cts +0 -66
- package/dist/domain/meal/index.d.ts +0 -66
- package/dist/domain/member/index.d.cts +0 -332
- package/dist/domain/member/index.d.ts +0 -332
- package/dist/domain/plan/index.d.cts +0 -178
- package/dist/domain/plan/index.d.ts +0 -178
- package/dist/domain/promotion/index.d.cts +0 -114
- package/dist/domain/promotion/index.d.ts +0 -114
- package/dist/domain/recruit/index.d.cts +0 -130
- package/dist/domain/recruit/index.d.ts +0 -130
- package/dist/domain/restaurant/index.d.cts +0 -82
- package/dist/domain/restaurant/index.d.ts +0 -82
- package/dist/domain/room/index.d.cts +0 -1482
- package/dist/domain/room/index.d.ts +0 -1482
- package/dist/id-dAYxfjZn.d.cts +0 -64
- package/dist/id-dAYxfjZn.d.ts +0 -64
- package/dist/index-DAcw_a8p.d.ts +0 -292
- package/dist/index-DJJo4ejN.d.cts +0 -292
- package/dist/index.d.cts +0 -282
- package/dist/index.d.ts +0 -282
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PlanListQuerySchema,
|
|
3
|
+
PlanResponseSchema
|
|
4
|
+
} from "./chunk-W4TUW2GY.js";
|
|
1
5
|
import {
|
|
2
6
|
FriendMealItemResponseSchema,
|
|
3
7
|
FriendMealQuerySchema,
|
|
4
8
|
MealStatusResponseSchema,
|
|
5
9
|
UpdateMealStatusRequestSchema
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
PlanListQuerySchema,
|
|
9
|
-
PlanResponseSchema
|
|
10
|
-
} from "./chunk-W3YQYI4R.js";
|
|
10
|
+
} from "./chunk-W4C7XHTX.js";
|
|
11
11
|
import {
|
|
12
12
|
ChallengeStatusResponseSchema,
|
|
13
13
|
ClaimChallengeRewardRequestSchema,
|
|
@@ -15,28 +15,35 @@ import {
|
|
|
15
15
|
RedeemReferralRequestSchema,
|
|
16
16
|
ReferralCreateResponseSchema,
|
|
17
17
|
ReferralItemResponseSchema
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AI2YMBJX.js";
|
|
19
|
+
import {
|
|
20
|
+
MatchingNotificationSchema,
|
|
21
|
+
RoomAccessResponseSchema
|
|
22
|
+
} from "./chunk-PQMEXOPZ.js";
|
|
19
23
|
import {
|
|
20
24
|
ArticleDetailResponseSchema,
|
|
25
|
+
ArticleLikeResponseSchema,
|
|
21
26
|
ArticleListQuerySchema,
|
|
22
27
|
CreateArticleRequestSchema,
|
|
23
28
|
CreateCommentRequestSchema,
|
|
24
29
|
PageArticleSummaryResponseSchema,
|
|
25
30
|
PageQuerySchema,
|
|
26
|
-
|
|
27
|
-
SortDirectionSchema
|
|
28
|
-
|
|
31
|
+
PageResponseSchema,
|
|
32
|
+
SortDirectionSchema,
|
|
33
|
+
UploadArticleImageRequestSchema,
|
|
34
|
+
UploadArticleImageResponseSchema
|
|
35
|
+
} from "./chunk-K3CZKI2F.js";
|
|
29
36
|
import {
|
|
30
37
|
LoginRequestSchema,
|
|
31
38
|
SignupRequestSchema,
|
|
32
39
|
SignupResponseSchema,
|
|
33
40
|
TokenResponseSchema
|
|
34
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-OJVXYCSH.js";
|
|
35
42
|
import {
|
|
36
43
|
FriendBlockItemResponseSchema,
|
|
37
44
|
FriendListItemResponseSchema,
|
|
38
45
|
FriendRequestItemResponseSchema
|
|
39
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-4E5E3PFW.js";
|
|
40
47
|
import {
|
|
41
48
|
ISODateTimeStringSchema
|
|
42
49
|
} from "./chunk-HRM3FQPL.js";
|
|
@@ -49,14 +56,16 @@ import {
|
|
|
49
56
|
import {
|
|
50
57
|
CreateProfileRequestSchema,
|
|
51
58
|
MemberCoreSchema,
|
|
59
|
+
MemberFoodPreferenceSchema,
|
|
52
60
|
MemberResponseSchema,
|
|
53
61
|
MemberSearchQuerySchema,
|
|
54
62
|
MemberSerachResponseSchema,
|
|
55
|
-
PresignProfileResponseSchema,
|
|
56
63
|
ProfileDetailResponseSchema,
|
|
57
64
|
UpdatePreferenceRequestSchema,
|
|
58
|
-
UpdateProfileRequestSchema
|
|
59
|
-
|
|
65
|
+
UpdateProfileRequestSchema,
|
|
66
|
+
UploadProfileImageRequestSchema,
|
|
67
|
+
UploadProfileImageResponseSchema
|
|
68
|
+
} from "./chunk-ZH7D7B2Y.js";
|
|
60
69
|
import {
|
|
61
70
|
ArticleIdSchema,
|
|
62
71
|
CommentIdSchema,
|
|
@@ -76,13 +85,39 @@ import {
|
|
|
76
85
|
import { z as z4 } from "zod";
|
|
77
86
|
|
|
78
87
|
// src/domain/common/contracts/api.ts
|
|
79
|
-
import { z as
|
|
88
|
+
import { z as z3 } from "zod";
|
|
80
89
|
|
|
81
|
-
// src/domain/common/
|
|
90
|
+
// src/domain/common/schema/envelope.schema.ts
|
|
82
91
|
import { z } from "zod";
|
|
83
|
-
var
|
|
84
|
-
var
|
|
85
|
-
|
|
92
|
+
var NoContentSchema = z.null();
|
|
93
|
+
var ApiSuccessSchema = (data) => z.object({
|
|
94
|
+
success: z.literal(true),
|
|
95
|
+
code: z.number().int(),
|
|
96
|
+
message: z.string(),
|
|
97
|
+
data
|
|
98
|
+
});
|
|
99
|
+
var ApiFailureSchema = z.object({
|
|
100
|
+
success: z.literal(false),
|
|
101
|
+
status: z.number().int(),
|
|
102
|
+
code: z.string(),
|
|
103
|
+
message: z.string()
|
|
104
|
+
});
|
|
105
|
+
var ApiResponseSchema = (data) => z.union([ApiSuccessSchema(data), ApiFailureSchema]);
|
|
106
|
+
var CreatedEntityIdResponseSchema = z.discriminatedUnion("entity", [
|
|
107
|
+
z.object({ entity: z.literal("article"), id: ArticleIdSchema }),
|
|
108
|
+
z.object({ entity: z.literal("comment"), id: CommentIdSchema }),
|
|
109
|
+
z.object({ entity: z.literal("recruit"), id: RecruitIdSchema }),
|
|
110
|
+
z.object({ entity: z.literal("invitation"), id: InvitationIdSchema }),
|
|
111
|
+
z.object({ entity: z.literal("subscription"), id: SubscriptionIdSchema }),
|
|
112
|
+
z.object({ entity: z.literal("coupon"), id: CouponIdSchema }),
|
|
113
|
+
z.object({ entity: z.literal("plan"), id: PlanIdSchema })
|
|
114
|
+
]);
|
|
115
|
+
|
|
116
|
+
// src/domain/common/contracts/endpoint.ts
|
|
117
|
+
import { z as z2 } from "zod";
|
|
118
|
+
var NoBodySchema = z2.undefined();
|
|
119
|
+
var NoQuerySchema = z2.undefined();
|
|
120
|
+
var NoParamsSchema = z2.undefined();
|
|
86
121
|
var endpoint = (contract) => ({
|
|
87
122
|
method: contract.method,
|
|
88
123
|
path: contract.path,
|
|
@@ -93,74 +128,80 @@ var endpoint = (contract) => ({
|
|
|
93
128
|
});
|
|
94
129
|
|
|
95
130
|
// src/domain/common/contracts/api.ts
|
|
96
|
-
var memberIdParam =
|
|
97
|
-
var
|
|
98
|
-
var
|
|
99
|
-
var
|
|
100
|
-
var
|
|
101
|
-
var invitationIdParam =
|
|
102
|
-
var
|
|
103
|
-
var
|
|
104
|
-
var
|
|
131
|
+
var memberIdParam = z3.object({ memberId: MemberIdSchema });
|
|
132
|
+
var articleIdParam = z3.object({ articleId: ArticleIdSchema });
|
|
133
|
+
var commentIdParam = z3.object({ commentId: CommentIdSchema });
|
|
134
|
+
var recruitIdParam = z3.object({ recruitId: RecruitIdSchema });
|
|
135
|
+
var roomIdParam = z3.object({ roomId: RoomIdSchema });
|
|
136
|
+
var invitationIdParam = z3.object({ invitationId: InvitationIdSchema });
|
|
137
|
+
var notificationIdParam = z3.object({ notificationId: z3.string().min(1) });
|
|
138
|
+
var planIdParam = z3.object({ planId: PlanIdSchema });
|
|
139
|
+
var couponIdParam = z3.object({ couponId: CouponIdSchema });
|
|
140
|
+
var friendRequestIdParam = z3.object({ requestId: FriendRequestIdSchema });
|
|
105
141
|
var apiContract = {
|
|
106
142
|
auth: {
|
|
107
143
|
signup: endpoint({ method: "POST", path: "/auth/signup", body: SignupRequestSchema, response: SignupResponseSchema }),
|
|
108
144
|
login: endpoint({ method: "POST", path: "/auth/login", body: LoginRequestSchema, response: TokenResponseSchema }),
|
|
109
145
|
refresh: endpoint({ method: "POST", path: "/auth/refresh", response: TokenResponseSchema }),
|
|
110
146
|
logout: endpoint({ method: "POST", path: "/auth/logout", response: NoContentSchema })
|
|
111
|
-
// test: endpoint({method: "GET", path: "/auth/test", response: TokenResponseSchema}) TODO: Dev에서만 작동하도록 백엔드에서 수정해야함
|
|
147
|
+
// test: endpoint({method: "GET", path: "/auth/test", response: TokenResponseSchema}) TODO: Dev에서만 작동하도록 백엔드에서 수정해야함
|
|
112
148
|
},
|
|
113
149
|
members: {
|
|
114
150
|
me: endpoint({ method: "GET", path: "/members/me", response: MemberResponseSchema }),
|
|
115
|
-
myProfile: endpoint({ method: "GET", path: "/members/me/
|
|
151
|
+
myProfile: endpoint({ method: "GET", path: "/members/me/profile", response: ProfileDetailResponseSchema }),
|
|
116
152
|
search: endpoint({ method: "GET", path: "/members/search", query: MemberSearchQuerySchema, response: MemberSerachResponseSchema }),
|
|
117
|
-
memberProfile: endpoint({ method: "GET", path: "/members/:memberId", pathParams: memberIdParam, response: ProfileDetailResponseSchema }),
|
|
118
|
-
presignProfileImage: endpoint({ method: "POST", path: "/uploads/presign-profile", response:
|
|
153
|
+
memberProfile: endpoint({ method: "GET", path: "/members/:memberId/profile", pathParams: memberIdParam, response: ProfileDetailResponseSchema }),
|
|
154
|
+
presignProfileImage: endpoint({ method: "POST", path: "/uploads/presign-profile", body: UploadProfileImageRequestSchema, response: UploadProfileImageResponseSchema }),
|
|
119
155
|
createProfile: endpoint({ method: "POST", path: "/members/onboarding", body: CreateProfileRequestSchema, response: NoContentSchema }),
|
|
120
|
-
updateProfile: endpoint({ method: "PATCH", path: "/members/me/profile", body: UpdateProfileRequestSchema, response: NoContentSchema })
|
|
121
|
-
|
|
156
|
+
updateProfile: endpoint({ method: "PATCH", path: "/members/me/profile", body: UpdateProfileRequestSchema, response: NoContentSchema })
|
|
157
|
+
},
|
|
158
|
+
preferences: {
|
|
159
|
+
my: endpoint({ method: "GET", path: "/preferences/me", response: MemberFoodPreferenceSchema }),
|
|
160
|
+
update: endpoint({ method: "PATCH", path: "/preferences/me", body: UpdatePreferenceRequestSchema, response: NoContentSchema })
|
|
122
161
|
},
|
|
123
162
|
mealStatus: {
|
|
124
|
-
my: endpoint({ method: "GET", path: "/meal-status", response: MealStatusResponseSchema }),
|
|
125
|
-
updateMealStatus: endpoint({ method: "PATCH", path: "/meal-status", body: UpdateMealStatusRequestSchema, response: NoContentSchema }),
|
|
126
|
-
friendMealStatus: endpoint({ method: "GET", path: "/
|
|
163
|
+
my: endpoint({ method: "GET", path: "/members/me/meal-status", response: MealStatusResponseSchema }),
|
|
164
|
+
updateMealStatus: endpoint({ method: "PATCH", path: "/members/me/meal-status", body: UpdateMealStatusRequestSchema, response: NoContentSchema }),
|
|
165
|
+
friendMealStatus: endpoint({ method: "GET", path: "/friends/me/meals", query: FriendMealQuerySchema, response: z3.array(FriendMealItemResponseSchema) })
|
|
127
166
|
},
|
|
128
167
|
articles: {
|
|
129
168
|
list: endpoint({ method: "GET", path: "/articles/home", query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
|
|
130
|
-
|
|
169
|
+
byMember: endpoint({ method: "GET", path: "/articles/by-author/:memberId", pathParams: memberIdParam, query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
|
|
131
170
|
my: endpoint({ method: "GET", path: "/articles/my", response: PageArticleSummaryResponseSchema }),
|
|
132
171
|
detail: endpoint({ method: "GET", path: "/articles/:articleId", pathParams: articleIdParam, response: ArticleDetailResponseSchema }),
|
|
133
|
-
create: endpoint({ method: "POST", path: "/articles", body: CreateArticleRequestSchema, response:
|
|
134
|
-
|
|
135
|
-
|
|
172
|
+
create: endpoint({ method: "POST", path: "/articles", body: CreateArticleRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
173
|
+
like: endpoint({ method: "POST", path: "/articles/:articleId/like", pathParams: articleIdParam, response: ArticleLikeResponseSchema }),
|
|
174
|
+
createComment: endpoint({ method: "POST", path: "/articles/:articleId/comments", pathParams: articleIdParam, body: CreateCommentRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
175
|
+
presignArticleImage: endpoint({ method: "POST", path: "/uploads/presign-article", body: UploadArticleImageRequestSchema, response: UploadArticleImageResponseSchema }),
|
|
136
176
|
delete: endpoint({ method: "DELETE", path: "/articles/:articleId", pathParams: articleIdParam, response: NoContentSchema }),
|
|
137
|
-
deleteComment: endpoint({ method: "DELETE", path: "/articles
|
|
177
|
+
deleteComment: endpoint({ method: "DELETE", path: "/articles/comments/:commentId", pathParams: commentIdParam, response: NoContentSchema })
|
|
138
178
|
// TODO: 게시물 수정 기능
|
|
139
179
|
},
|
|
140
180
|
recruits: {
|
|
141
181
|
list: endpoint({ method: "GET", path: "/recruits", query: RecruitListQuerySchema, response: RecruitListResponseSchema }),
|
|
142
182
|
create: endpoint({ method: "POST", path: "/recruits", body: CreateRecruitRequestSchema, response: CreateRecruitResponseSchema }),
|
|
143
183
|
join: endpoint({ method: "POST", path: "/recruits/:recruitId/join", pathParams: recruitIdParam, response: NoContentSchema }),
|
|
144
|
-
close: endpoint({ method: "
|
|
184
|
+
close: endpoint({ method: "POST", path: "/recruits/:recruitId/close", pathParams: recruitIdParam, response: NoContentSchema })
|
|
145
185
|
},
|
|
146
186
|
invitations: {
|
|
147
|
-
list: endpoint({ method: "GET", path: "/invitations", response:
|
|
187
|
+
list: endpoint({ method: "GET", path: "/invitations", response: z3.array(InvitationListItemResponseSchema) }),
|
|
148
188
|
// TODO: Invitation Response 정하기 detail: endpoint({ method: "GET", path: "/invitations/:invitationId", pathParams: invitationIdParam, response: InvitationItemDetailResponseSchema }),
|
|
149
|
-
send: endpoint({ method: "POST", path: "/invitations", body: CreateInvitationRequestSchema, response: SendInvitationResponseSchema }),
|
|
189
|
+
send: endpoint({ method: "POST", path: "/invitations/send", body: CreateInvitationRequestSchema, response: SendInvitationResponseSchema }),
|
|
150
190
|
accept: endpoint({ method: "POST", path: "/invitations/:invitationId/accept", pathParams: invitationIdParam, response: AcceptInvitationResponseSchema }),
|
|
151
191
|
reject: endpoint({ method: "POST", path: "/invitations/:invitationId/reject", pathParams: invitationIdParam, response: NoContentSchema })
|
|
152
192
|
},
|
|
153
193
|
plans: {
|
|
154
|
-
list: endpoint({ method: "GET", path: "/plans", query: PlanListQuerySchema, response:
|
|
194
|
+
list: endpoint({ method: "GET", path: "/plans", query: PlanListQuerySchema, response: z3.array(PlanResponseSchema) }),
|
|
155
195
|
detail: endpoint({ method: "GET", path: "/plans/:planId", pathParams: planIdParam, response: PlanResponseSchema }),
|
|
156
196
|
cancel: endpoint({ method: "PATCH", path: "/plans/:planId/cancel", pathParams: planIdParam, response: NoContentSchema })
|
|
157
197
|
},
|
|
158
198
|
friends: {
|
|
159
|
-
list: endpoint({ method: "GET", path: "/friends", response:
|
|
160
|
-
blockList: endpoint({ method: "GET", path: "/friends/blocks", response:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
199
|
+
list: endpoint({ method: "GET", path: "/friends", response: z3.array(FriendListItemResponseSchema) }),
|
|
200
|
+
blockList: endpoint({ method: "GET", path: "/friends/blocks", response: z3.array(FriendBlockItemResponseSchema) }),
|
|
201
|
+
search: endpoint({ method: "GET", path: "/friends/search", query: MemberSearchQuerySchema, response: MemberSerachResponseSchema }),
|
|
202
|
+
incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response: z3.array(FriendRequestItemResponseSchema) }),
|
|
203
|
+
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoing", response: z3.array(FriendRequestItemResponseSchema) }),
|
|
204
|
+
sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
|
|
164
205
|
acceptRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/accept", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
165
206
|
rejectRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/reject", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
166
207
|
block: endpoint({ method: "POST", path: "/friends/blocks/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
|
|
@@ -169,52 +210,31 @@ var apiContract = {
|
|
|
169
210
|
unfriend: endpoint({ method: "DELETE", path: "/friends/:memberId", pathParams: memberIdParam, response: NoContentSchema })
|
|
170
211
|
},
|
|
171
212
|
coupons: {
|
|
172
|
-
list: endpoint({ method: "GET", path: "/coupons", response:
|
|
173
|
-
use: endpoint({ method: "
|
|
213
|
+
list: endpoint({ method: "GET", path: "/coupons", response: z3.array(CouponResponseSchema) }),
|
|
214
|
+
use: endpoint({ method: "POST", path: "/coupons/:couponId/use", pathParams: couponIdParam, response: NoContentSchema })
|
|
174
215
|
},
|
|
175
216
|
challenges: {
|
|
176
217
|
status: endpoint({ method: "GET", path: "/challenges/status", response: ChallengeStatusResponseSchema }),
|
|
177
218
|
claimReward: endpoint({ method: "POST", path: "/challenges/rewards", body: ClaimChallengeRewardRequestSchema, response: NoContentSchema })
|
|
178
219
|
},
|
|
179
220
|
referrals: {
|
|
180
|
-
list: endpoint({ method: "GET", path: "/referrals", response:
|
|
221
|
+
list: endpoint({ method: "GET", path: "/referrals", response: z3.array(ReferralItemResponseSchema) }),
|
|
181
222
|
create: endpoint({ method: "POST", path: "/referrals", response: ReferralCreateResponseSchema }),
|
|
182
223
|
redeem: endpoint({ method: "POST", path: "/referrals/redeem", body: RedeemReferralRequestSchema, response: NoContentSchema })
|
|
183
224
|
},
|
|
225
|
+
notifications: {
|
|
226
|
+
list: endpoint({ method: "GET", path: "/notifications", response: z3.array(MatchingNotificationSchema) }),
|
|
227
|
+
markRead: endpoint({ method: "PATCH", path: "/notifications/:notificationId/read", pathParams: notificationIdParam, response: MatchingNotificationSchema }),
|
|
228
|
+
delete: endpoint({ method: "DELETE", path: "/notifications/:notificationId", pathParams: notificationIdParam, response: NoContentSchema })
|
|
229
|
+
},
|
|
184
230
|
room: {
|
|
185
|
-
|
|
231
|
+
access: endpoint({ method: "GET", path: "/rooms/:roomId/access", pathParams: roomIdParam, response: RoomAccessResponseSchema })
|
|
186
232
|
},
|
|
187
233
|
health: {
|
|
188
|
-
healthCheck: endpoint({ method: "GET", path: "/", response:
|
|
234
|
+
healthCheck: endpoint({ method: "GET", path: "/", response: z3.string() })
|
|
189
235
|
}
|
|
190
236
|
};
|
|
191
237
|
|
|
192
|
-
// src/domain/common/schema/envelope.schema.ts
|
|
193
|
-
import { z as z3 } from "zod";
|
|
194
|
-
var NoContentSchema = z3.null();
|
|
195
|
-
var ApiSuccessSchema = (data) => z3.object({
|
|
196
|
-
success: z3.literal(true),
|
|
197
|
-
code: z3.number().int(),
|
|
198
|
-
message: z3.string(),
|
|
199
|
-
data
|
|
200
|
-
});
|
|
201
|
-
var ApiFailureSchema = z3.object({
|
|
202
|
-
success: z3.literal(false),
|
|
203
|
-
status: z3.number().int(),
|
|
204
|
-
code: z3.string(),
|
|
205
|
-
message: z3.string()
|
|
206
|
-
});
|
|
207
|
-
var ApiResponseSchema = (data) => z3.union([ApiSuccessSchema(data), ApiFailureSchema]);
|
|
208
|
-
var CreatedEntityIdResponseSchema = z3.discriminatedUnion("entity", [
|
|
209
|
-
z3.object({ entity: z3.literal("article"), id: ArticleIdSchema }),
|
|
210
|
-
z3.object({ entity: z3.literal("comment"), id: CommentIdSchema }),
|
|
211
|
-
z3.object({ entity: z3.literal("recruit"), id: RecruitIdSchema }),
|
|
212
|
-
z3.object({ entity: z3.literal("invitation"), id: InvitationIdSchema }),
|
|
213
|
-
z3.object({ entity: z3.literal("subscription"), id: SubscriptionIdSchema }),
|
|
214
|
-
z3.object({ entity: z3.literal("coupon"), id: CouponIdSchema }),
|
|
215
|
-
z3.object({ entity: z3.literal("plan"), id: PlanIdSchema })
|
|
216
|
-
]);
|
|
217
|
-
|
|
218
238
|
// src/domain/common/contracts/envelope.ts
|
|
219
239
|
var makeApiResponseSchema = ApiResponseSchema;
|
|
220
240
|
var makeApiSuccessSchema = ApiSuccessSchema;
|
|
@@ -254,7 +274,7 @@ var RecruitResponseSchema = z4.object({
|
|
|
254
274
|
author: MemberCoreSchema,
|
|
255
275
|
participants: z4.array(RecruitParticipantSchema)
|
|
256
276
|
});
|
|
257
|
-
var RecruitListResponseSchema =
|
|
277
|
+
var RecruitListResponseSchema = PageResponseSchema(RecruitResponseSchema);
|
|
258
278
|
var CreateRecruitRequestSchema = z4.object({
|
|
259
279
|
targetCount: z4.number().int().min(2),
|
|
260
280
|
meetingAt: ISODateTimeStringSchema,
|
|
@@ -266,6 +286,11 @@ var CreateRecruitResponseSchema = z4.object({
|
|
|
266
286
|
});
|
|
267
287
|
|
|
268
288
|
export {
|
|
289
|
+
NoContentSchema,
|
|
290
|
+
ApiSuccessSchema,
|
|
291
|
+
ApiFailureSchema,
|
|
292
|
+
ApiResponseSchema,
|
|
293
|
+
CreatedEntityIdResponseSchema,
|
|
269
294
|
RecruitStatusSchema,
|
|
270
295
|
RecruitSortBySchema,
|
|
271
296
|
RecruitListQuerySchema,
|
|
@@ -277,11 +302,6 @@ export {
|
|
|
277
302
|
NoParamsSchema,
|
|
278
303
|
endpoint,
|
|
279
304
|
apiContract,
|
|
280
|
-
NoContentSchema,
|
|
281
|
-
ApiSuccessSchema,
|
|
282
|
-
ApiFailureSchema,
|
|
283
|
-
ApiResponseSchema,
|
|
284
|
-
CreatedEntityIdResponseSchema,
|
|
285
305
|
makeApiResponseSchema,
|
|
286
306
|
makeApiSuccessSchema,
|
|
287
307
|
toMemberId,
|
|
@@ -8,11 +8,14 @@ import { z as z2 } from "zod";
|
|
|
8
8
|
|
|
9
9
|
// src/domain/common/contracts/upload.ts
|
|
10
10
|
import z from "zod";
|
|
11
|
-
var
|
|
11
|
+
var UploadPresignImageResponseSchema = z.object({
|
|
12
12
|
key: z.string(),
|
|
13
13
|
putUrl: z.string().url(),
|
|
14
14
|
cdnUrl: z.string().url()
|
|
15
15
|
});
|
|
16
|
+
var UploadPresignImageRequestSchema = z.object({
|
|
17
|
+
contentType: z.string()
|
|
18
|
+
});
|
|
16
19
|
|
|
17
20
|
// src/domain/member/member.schema.ts
|
|
18
21
|
var MemberRoleSchema = z2.enum(["USER", "ADMIN"]);
|
|
@@ -21,7 +24,8 @@ var MemberCoreSchema = z2.object({
|
|
|
21
24
|
username: z2.string().min(1).max(50),
|
|
22
25
|
profileImageUrl: z2.string().url().nullable().optional()
|
|
23
26
|
});
|
|
24
|
-
var
|
|
27
|
+
var UploadProfileImageResponseSchema = UploadPresignImageResponseSchema.extend({});
|
|
28
|
+
var UploadProfileImageRequestSchema = UploadPresignImageRequestSchema.extend({});
|
|
25
29
|
var MemberResponseSchema = MemberCoreSchema.pick({
|
|
26
30
|
memberId: true,
|
|
27
31
|
username: true,
|
|
@@ -56,10 +60,12 @@ var CreateProfileRequestSchema = UpdateProfileRequestSchema.merge(
|
|
|
56
60
|
);
|
|
57
61
|
|
|
58
62
|
export {
|
|
59
|
-
|
|
63
|
+
UploadPresignImageResponseSchema,
|
|
64
|
+
UploadPresignImageRequestSchema,
|
|
60
65
|
MemberRoleSchema,
|
|
61
66
|
MemberCoreSchema,
|
|
62
|
-
|
|
67
|
+
UploadProfileImageResponseSchema,
|
|
68
|
+
UploadProfileImageRequestSchema,
|
|
63
69
|
MemberResponseSchema,
|
|
64
70
|
MemberSearchQuerySchema,
|
|
65
71
|
MemberSerachResponseSchema,
|
|
@@ -33,6 +33,7 @@ __export(article_exports, {
|
|
|
33
33
|
ArticleCommentSchema: () => ArticleCommentSchema,
|
|
34
34
|
ArticleCoreSchema: () => ArticleCoreSchema,
|
|
35
35
|
ArticleDetailResponseSchema: () => ArticleDetailResponseSchema,
|
|
36
|
+
ArticleLikeResponseSchema: () => ArticleLikeResponseSchema,
|
|
36
37
|
ArticleListQuerySchema: () => ArticleListQuerySchema,
|
|
37
38
|
ArticleSortBySchema: () => ArticleSortBySchema,
|
|
38
39
|
ArticleSummaryResponseSchema: () => ArticleSummaryResponseSchema,
|
|
@@ -40,7 +41,8 @@ __export(article_exports, {
|
|
|
40
41
|
CreateCommentRequestSchema: () => CreateCommentRequestSchema,
|
|
41
42
|
FoodAnalysisResultSchema: () => FoodAnalysisResultSchema,
|
|
42
43
|
PageArticleSummaryResponseSchema: () => PageArticleSummaryResponseSchema,
|
|
43
|
-
|
|
44
|
+
UploadArticleImageRequestSchema: () => UploadArticleImageRequestSchema,
|
|
45
|
+
UploadArticleImageResponseSchema: () => UploadArticleImageResponseSchema
|
|
44
46
|
});
|
|
45
47
|
module.exports = __toCommonJS(article_exports);
|
|
46
48
|
|
|
@@ -102,11 +104,14 @@ var import_zod5 = require("zod");
|
|
|
102
104
|
|
|
103
105
|
// src/domain/common/contracts/upload.ts
|
|
104
106
|
var import_zod4 = __toESM(require("zod"), 1);
|
|
105
|
-
var
|
|
107
|
+
var UploadPresignImageResponseSchema = import_zod4.default.object({
|
|
106
108
|
key: import_zod4.default.string(),
|
|
107
109
|
putUrl: import_zod4.default.string().url(),
|
|
108
110
|
cdnUrl: import_zod4.default.string().url()
|
|
109
111
|
});
|
|
112
|
+
var UploadPresignImageRequestSchema = import_zod4.default.object({
|
|
113
|
+
contentType: import_zod4.default.string()
|
|
114
|
+
});
|
|
110
115
|
|
|
111
116
|
// src/domain/member/member.schema.ts
|
|
112
117
|
var MemberRoleSchema = import_zod5.z.enum(["USER", "ADMIN"]);
|
|
@@ -115,7 +120,8 @@ var MemberCoreSchema = import_zod5.z.object({
|
|
|
115
120
|
username: import_zod5.z.string().min(1).max(50),
|
|
116
121
|
profileImageUrl: import_zod5.z.string().url().nullable().optional()
|
|
117
122
|
});
|
|
118
|
-
var
|
|
123
|
+
var UploadProfileImageResponseSchema = UploadPresignImageResponseSchema.extend({});
|
|
124
|
+
var UploadProfileImageRequestSchema = UploadPresignImageRequestSchema.extend({});
|
|
119
125
|
var MemberResponseSchema = MemberCoreSchema.pick({
|
|
120
126
|
memberId: true,
|
|
121
127
|
username: true,
|
|
@@ -183,7 +189,8 @@ var ArticleListQuerySchema = PageQuerySchema.extend({
|
|
|
183
189
|
sortBy: ArticleSortBySchema.optional().default("createdAt"),
|
|
184
190
|
direction: SortDirectionSchema.optional().default("desc")
|
|
185
191
|
});
|
|
186
|
-
var
|
|
192
|
+
var UploadArticleImageResponseSchema = UploadPresignImageResponseSchema.extend({});
|
|
193
|
+
var UploadArticleImageRequestSchema = UploadPresignImageRequestSchema.extend({});
|
|
187
194
|
var FoodAnalysisResultSchema = FoodSchema.extend({
|
|
188
195
|
confidence: import_zod7.z.number().min(0).max(1),
|
|
189
196
|
tsUtc: ISODateTimeStringSchema.optional()
|
|
@@ -223,6 +230,10 @@ var ArticleSummaryResponseSchema = ArticleCoreSchema.extend({
|
|
|
223
230
|
commentCount: import_zod7.z.number().int().min(0),
|
|
224
231
|
likedByMe: import_zod7.z.boolean()
|
|
225
232
|
});
|
|
233
|
+
var ArticleLikeResponseSchema = import_zod7.z.object({
|
|
234
|
+
liked: import_zod7.z.boolean(),
|
|
235
|
+
likeCount: import_zod7.z.number().int().min(0)
|
|
236
|
+
});
|
|
226
237
|
var ArticleDetailResponseSchema = ArticleSummaryResponseSchema.extend({
|
|
227
238
|
comments: import_zod7.z.array(ArticleCommentSchema).optional()
|
|
228
239
|
});
|
|
@@ -232,6 +243,7 @@ var PageArticleSummaryResponseSchema = PageResponseSchema(ArticleSummaryResponse
|
|
|
232
243
|
ArticleCommentSchema,
|
|
233
244
|
ArticleCoreSchema,
|
|
234
245
|
ArticleDetailResponseSchema,
|
|
246
|
+
ArticleLikeResponseSchema,
|
|
235
247
|
ArticleListQuerySchema,
|
|
236
248
|
ArticleSortBySchema,
|
|
237
249
|
ArticleSummaryResponseSchema,
|
|
@@ -239,5 +251,6 @@ var PageArticleSummaryResponseSchema = PageResponseSchema(ArticleSummaryResponse
|
|
|
239
251
|
CreateCommentRequestSchema,
|
|
240
252
|
FoodAnalysisResultSchema,
|
|
241
253
|
PageArticleSummaryResponseSchema,
|
|
242
|
-
|
|
254
|
+
UploadArticleImageRequestSchema,
|
|
255
|
+
UploadArticleImageResponseSchema
|
|
243
256
|
});
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
ArticleCommentSchema,
|
|
3
3
|
ArticleCoreSchema,
|
|
4
4
|
ArticleDetailResponseSchema,
|
|
5
|
+
ArticleLikeResponseSchema,
|
|
5
6
|
ArticleListQuerySchema,
|
|
6
7
|
ArticleSortBySchema,
|
|
7
8
|
ArticleSummaryResponseSchema,
|
|
@@ -9,16 +10,18 @@ import {
|
|
|
9
10
|
CreateCommentRequestSchema,
|
|
10
11
|
FoodAnalysisResultSchema,
|
|
11
12
|
PageArticleSummaryResponseSchema,
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
UploadArticleImageRequestSchema,
|
|
14
|
+
UploadArticleImageResponseSchema
|
|
15
|
+
} from "../../chunk-K3CZKI2F.js";
|
|
14
16
|
import "../../chunk-GTVEQYJW.js";
|
|
15
17
|
import "../../chunk-HRM3FQPL.js";
|
|
16
|
-
import "../../chunk-
|
|
18
|
+
import "../../chunk-ZH7D7B2Y.js";
|
|
17
19
|
import "../../chunk-H77ISYYC.js";
|
|
18
20
|
export {
|
|
19
21
|
ArticleCommentSchema,
|
|
20
22
|
ArticleCoreSchema,
|
|
21
23
|
ArticleDetailResponseSchema,
|
|
24
|
+
ArticleLikeResponseSchema,
|
|
22
25
|
ArticleListQuerySchema,
|
|
23
26
|
ArticleSortBySchema,
|
|
24
27
|
ArticleSummaryResponseSchema,
|
|
@@ -26,5 +29,6 @@ export {
|
|
|
26
29
|
CreateCommentRequestSchema,
|
|
27
30
|
FoodAnalysisResultSchema,
|
|
28
31
|
PageArticleSummaryResponseSchema,
|
|
29
|
-
|
|
32
|
+
UploadArticleImageRequestSchema,
|
|
33
|
+
UploadArticleImageResponseSchema
|
|
30
34
|
};
|
|
@@ -68,11 +68,14 @@ var FoodSchema = import_zod.z.object({
|
|
|
68
68
|
|
|
69
69
|
// src/domain/common/contracts/upload.ts
|
|
70
70
|
var import_zod2 = __toESM(require("zod"), 1);
|
|
71
|
-
var
|
|
71
|
+
var UploadPresignImageResponseSchema = import_zod2.default.object({
|
|
72
72
|
key: import_zod2.default.string(),
|
|
73
73
|
putUrl: import_zod2.default.string().url(),
|
|
74
74
|
cdnUrl: import_zod2.default.string().url()
|
|
75
75
|
});
|
|
76
|
+
var UploadPresignImageRequestSchema = import_zod2.default.object({
|
|
77
|
+
contentType: import_zod2.default.string()
|
|
78
|
+
});
|
|
76
79
|
|
|
77
80
|
// src/domain/member/member.schema.ts
|
|
78
81
|
var MemberRoleSchema = import_zod3.z.enum(["USER", "ADMIN"]);
|
|
@@ -81,7 +84,8 @@ var MemberCoreSchema = import_zod3.z.object({
|
|
|
81
84
|
username: import_zod3.z.string().min(1).max(50),
|
|
82
85
|
profileImageUrl: import_zod3.z.string().url().nullable().optional()
|
|
83
86
|
});
|
|
84
|
-
var
|
|
87
|
+
var UploadProfileImageResponseSchema = UploadPresignImageResponseSchema.extend({});
|
|
88
|
+
var UploadProfileImageRequestSchema = UploadPresignImageRequestSchema.extend({});
|
|
85
89
|
var MemberResponseSchema = MemberCoreSchema.pick({
|
|
86
90
|
memberId: true,
|
|
87
91
|
username: true,
|
|
@@ -116,8 +120,7 @@ var CreateProfileRequestSchema = UpdateProfileRequestSchema.merge(
|
|
|
116
120
|
|
|
117
121
|
// src/domain/auth/auth.schema.ts
|
|
118
122
|
var TokenResponseSchema = import_zod4.z.object({
|
|
119
|
-
accessToken: import_zod4.z.string().min(1)
|
|
120
|
-
accessTokenMaxAge: import_zod4.z.number().int().positive()
|
|
123
|
+
accessToken: import_zod4.z.string().min(1)
|
|
121
124
|
});
|
|
122
125
|
var LoginRequestSchema = import_zod4.z.object({
|
|
123
126
|
email: import_zod4.z.string().email(),
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
SignupRequestSchema,
|
|
4
4
|
SignupResponseSchema,
|
|
5
5
|
TokenResponseSchema
|
|
6
|
-
} from "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
} from "../../chunk-OJVXYCSH.js";
|
|
7
|
+
import "../../chunk-ZH7D7B2Y.js";
|
|
8
8
|
import "../../chunk-H77ISYYC.js";
|
|
9
9
|
export {
|
|
10
10
|
LoginRequestSchema,
|