@kimdaegyu/babmukdang-shared 1.1.3 → 1.1.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-VWPUBTMV.js → chunk-23FZ4MAS.js} +23 -21
- package/dist/{chunk-TY4WZEIZ.js → chunk-RLVHDFEV.js} +5 -0
- package/dist/{chunk-JEUH3JDZ.js → chunk-SOHYA6XL.js} +28 -23
- package/dist/domain/article/index.cjs +6 -0
- package/dist/domain/article/index.d.cts +12 -1
- package/dist/domain/article/index.d.ts +12 -1
- package/dist/domain/article/index.js +3 -1
- package/dist/domain/common/index.cjs +16 -9
- package/dist/domain/common/index.d.cts +228 -14
- package/dist/domain/common/index.d.ts +228 -14
- package/dist/domain/common/index.js +6 -6
- package/dist/domain/index.cjs +18 -9
- package/dist/domain/index.d.cts +1 -1
- package/dist/domain/index.d.ts +1 -1
- package/dist/domain/index.js +25 -23
- package/dist/domain/meal/index.js +1 -1
- package/dist/domain/plan/index.js +1 -1
- package/dist/domain/recruit/index.js +5 -5
- package/dist/domain/room/index.js +1 -1
- package/dist/{index-DJJo4ejN.d.cts → index-CZT6irsm.d.cts} +4 -2
- package/dist/{index-DAcw_a8p.d.ts → index-DDLVbMTB.d.ts} +4 -2
- package/dist/index.cjs +17 -9
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/package.json +1 -1
|
@@ -29,21 +29,7 @@ import {
|
|
|
29
29
|
toRestaurantId,
|
|
30
30
|
toRoomId,
|
|
31
31
|
toSubscriptionId
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import {
|
|
34
|
-
FriendMealItemResponseSchema,
|
|
35
|
-
FriendMealQuerySchema,
|
|
36
|
-
MealStatusActionSchema,
|
|
37
|
-
MealStatusResponseSchema,
|
|
38
|
-
MealStatusSchema,
|
|
39
|
-
UpdateMealStatusRequestSchema
|
|
40
|
-
} from "./chunk-UJJMW7II.js";
|
|
41
|
-
import {
|
|
42
|
-
PlanListQuerySchema,
|
|
43
|
-
PlanResponseSchema,
|
|
44
|
-
PlanStatusSchema,
|
|
45
|
-
PlanTypeSchema
|
|
46
|
-
} from "./chunk-W3YQYI4R.js";
|
|
32
|
+
} from "./chunk-SOHYA6XL.js";
|
|
47
33
|
import {
|
|
48
34
|
ChallengeStatusResponseSchema,
|
|
49
35
|
ClaimChallengeRewardRequestSchema,
|
|
@@ -55,6 +41,12 @@ import {
|
|
|
55
41
|
ReferralCreateResponseSchema,
|
|
56
42
|
ReferralItemResponseSchema
|
|
57
43
|
} from "./chunk-VAWYU5JG.js";
|
|
44
|
+
import {
|
|
45
|
+
PlanListQuerySchema,
|
|
46
|
+
PlanResponseSchema,
|
|
47
|
+
PlanStatusSchema,
|
|
48
|
+
PlanTypeSchema
|
|
49
|
+
} from "./chunk-W3YQYI4R.js";
|
|
58
50
|
import {
|
|
59
51
|
AddLocationCandidateRequestSchema,
|
|
60
52
|
ChatMessageRequestSchema,
|
|
@@ -93,6 +85,7 @@ import {
|
|
|
93
85
|
ArticleCommentSchema,
|
|
94
86
|
ArticleCoreSchema,
|
|
95
87
|
ArticleDetailResponseSchema,
|
|
88
|
+
ArticleLikeResponseSchema,
|
|
96
89
|
ArticleListQuerySchema,
|
|
97
90
|
ArticleSortBySchema,
|
|
98
91
|
ArticleSummaryResponseSchema,
|
|
@@ -105,7 +98,7 @@ import {
|
|
|
105
98
|
PageResponseSchema,
|
|
106
99
|
PresignArticleResponseSchema,
|
|
107
100
|
SortDirectionSchema
|
|
108
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-RLVHDFEV.js";
|
|
109
102
|
import {
|
|
110
103
|
KakaoPlaceRawSchema,
|
|
111
104
|
RestaurantSchema
|
|
@@ -123,17 +116,25 @@ import {
|
|
|
123
116
|
FriendRequestMemberSchema,
|
|
124
117
|
FriendRequestStatusSchema
|
|
125
118
|
} from "./chunk-U6OQQOPN.js";
|
|
126
|
-
import {
|
|
127
|
-
ISODateStringSchema,
|
|
128
|
-
ISODateTimeStringSchema,
|
|
129
|
-
TimeHHmmStringSchema
|
|
130
|
-
} from "./chunk-HRM3FQPL.js";
|
|
131
119
|
import {
|
|
132
120
|
AcceptInvitationResponseSchema,
|
|
133
121
|
CreateInvitationRequestSchema,
|
|
134
122
|
InvitationListItemResponseSchema,
|
|
135
123
|
SendInvitationResponseSchema
|
|
136
124
|
} from "./chunk-YGFAVC5N.js";
|
|
125
|
+
import {
|
|
126
|
+
FriendMealItemResponseSchema,
|
|
127
|
+
FriendMealQuerySchema,
|
|
128
|
+
MealStatusActionSchema,
|
|
129
|
+
MealStatusResponseSchema,
|
|
130
|
+
MealStatusSchema,
|
|
131
|
+
UpdateMealStatusRequestSchema
|
|
132
|
+
} from "./chunk-UJJMW7II.js";
|
|
133
|
+
import {
|
|
134
|
+
ISODateStringSchema,
|
|
135
|
+
ISODateTimeStringSchema,
|
|
136
|
+
TimeHHmmStringSchema
|
|
137
|
+
} from "./chunk-HRM3FQPL.js";
|
|
137
138
|
import {
|
|
138
139
|
CreateProfileRequestSchema,
|
|
139
140
|
MemberCoreSchema,
|
|
@@ -182,6 +183,7 @@ __export(domain_exports, {
|
|
|
182
183
|
ArticleCoreSchema: () => ArticleCoreSchema,
|
|
183
184
|
ArticleDetailResponseSchema: () => ArticleDetailResponseSchema,
|
|
184
185
|
ArticleIdSchema: () => ArticleIdSchema,
|
|
186
|
+
ArticleLikeResponseSchema: () => ArticleLikeResponseSchema,
|
|
185
187
|
ArticleListQuerySchema: () => ArticleListQuerySchema,
|
|
186
188
|
ArticleSortBySchema: () => ArticleSortBySchema,
|
|
187
189
|
ArticleSummaryResponseSchema: () => ArticleSummaryResponseSchema,
|
|
@@ -85,6 +85,10 @@ var ArticleSummaryResponseSchema = ArticleCoreSchema.extend({
|
|
|
85
85
|
commentCount: z2.number().int().min(0),
|
|
86
86
|
likedByMe: z2.boolean()
|
|
87
87
|
});
|
|
88
|
+
var ArticleLikeResponseSchema = z2.object({
|
|
89
|
+
liked: z2.boolean(),
|
|
90
|
+
likeCount: z2.number().int().min(0)
|
|
91
|
+
});
|
|
88
92
|
var ArticleDetailResponseSchema = ArticleSummaryResponseSchema.extend({
|
|
89
93
|
comments: z2.array(ArticleCommentSchema).optional()
|
|
90
94
|
});
|
|
@@ -104,6 +108,7 @@ export {
|
|
|
104
108
|
ArticleCommentSchema,
|
|
105
109
|
ArticleCoreSchema,
|
|
106
110
|
ArticleSummaryResponseSchema,
|
|
111
|
+
ArticleLikeResponseSchema,
|
|
107
112
|
ArticleDetailResponseSchema,
|
|
108
113
|
PageArticleSummaryResponseSchema
|
|
109
114
|
};
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FriendMealItemResponseSchema,
|
|
3
|
-
FriendMealQuerySchema,
|
|
4
|
-
MealStatusResponseSchema,
|
|
5
|
-
UpdateMealStatusRequestSchema
|
|
6
|
-
} from "./chunk-UJJMW7II.js";
|
|
7
|
-
import {
|
|
8
|
-
PlanListQuerySchema,
|
|
9
|
-
PlanResponseSchema
|
|
10
|
-
} from "./chunk-W3YQYI4R.js";
|
|
11
1
|
import {
|
|
12
2
|
ChallengeStatusResponseSchema,
|
|
13
3
|
ClaimChallengeRewardRequestSchema,
|
|
@@ -16,8 +6,13 @@ import {
|
|
|
16
6
|
ReferralCreateResponseSchema,
|
|
17
7
|
ReferralItemResponseSchema
|
|
18
8
|
} from "./chunk-VAWYU5JG.js";
|
|
9
|
+
import {
|
|
10
|
+
PlanListQuerySchema,
|
|
11
|
+
PlanResponseSchema
|
|
12
|
+
} from "./chunk-W3YQYI4R.js";
|
|
19
13
|
import {
|
|
20
14
|
ArticleDetailResponseSchema,
|
|
15
|
+
ArticleLikeResponseSchema,
|
|
21
16
|
ArticleListQuerySchema,
|
|
22
17
|
CreateArticleRequestSchema,
|
|
23
18
|
CreateCommentRequestSchema,
|
|
@@ -25,7 +20,7 @@ import {
|
|
|
25
20
|
PageQuerySchema,
|
|
26
21
|
PresignArticleResponseSchema,
|
|
27
22
|
SortDirectionSchema
|
|
28
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RLVHDFEV.js";
|
|
29
24
|
import {
|
|
30
25
|
LoginRequestSchema,
|
|
31
26
|
SignupRequestSchema,
|
|
@@ -37,18 +32,25 @@ import {
|
|
|
37
32
|
FriendListItemResponseSchema,
|
|
38
33
|
FriendRequestItemResponseSchema
|
|
39
34
|
} from "./chunk-U6OQQOPN.js";
|
|
40
|
-
import {
|
|
41
|
-
ISODateTimeStringSchema
|
|
42
|
-
} from "./chunk-HRM3FQPL.js";
|
|
43
35
|
import {
|
|
44
36
|
AcceptInvitationResponseSchema,
|
|
45
37
|
CreateInvitationRequestSchema,
|
|
46
38
|
InvitationListItemResponseSchema,
|
|
47
39
|
SendInvitationResponseSchema
|
|
48
40
|
} from "./chunk-YGFAVC5N.js";
|
|
41
|
+
import {
|
|
42
|
+
FriendMealItemResponseSchema,
|
|
43
|
+
FriendMealQuerySchema,
|
|
44
|
+
MealStatusResponseSchema,
|
|
45
|
+
UpdateMealStatusRequestSchema
|
|
46
|
+
} from "./chunk-UJJMW7II.js";
|
|
47
|
+
import {
|
|
48
|
+
ISODateTimeStringSchema
|
|
49
|
+
} from "./chunk-HRM3FQPL.js";
|
|
49
50
|
import {
|
|
50
51
|
CreateProfileRequestSchema,
|
|
51
52
|
MemberCoreSchema,
|
|
53
|
+
MemberFoodPreferenceSchema,
|
|
52
54
|
MemberResponseSchema,
|
|
53
55
|
MemberSearchQuerySchema,
|
|
54
56
|
MemberSerachResponseSchema,
|
|
@@ -94,7 +96,6 @@ var endpoint = (contract) => ({
|
|
|
94
96
|
|
|
95
97
|
// src/domain/common/contracts/api.ts
|
|
96
98
|
var memberIdParam = z2.object({ memberId: MemberIdSchema });
|
|
97
|
-
var authorIdParam = z2.object({ memberId: MemberIdSchema });
|
|
98
99
|
var articleIdParam = z2.object({ articleId: ArticleIdSchema });
|
|
99
100
|
var commentIdParam = z2.object({ commentId: CommentIdSchema });
|
|
100
101
|
var recruitIdParam = z2.object({ recruitId: RecruitIdSchema });
|
|
@@ -117,8 +118,11 @@ var apiContract = {
|
|
|
117
118
|
memberProfile: endpoint({ method: "GET", path: "/members/:memberId", pathParams: memberIdParam, response: ProfileDetailResponseSchema }),
|
|
118
119
|
presignProfileImage: endpoint({ method: "POST", path: "/uploads/presign-profile", response: PresignProfileResponseSchema }),
|
|
119
120
|
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
|
-
|
|
121
|
+
updateProfile: endpoint({ method: "PATCH", path: "/members/me/profile", body: UpdateProfileRequestSchema, response: NoContentSchema })
|
|
122
|
+
},
|
|
123
|
+
preferences: {
|
|
124
|
+
my: endpoint({ method: "GET", path: "/preferences/me", response: MemberFoodPreferenceSchema }),
|
|
125
|
+
update: endpoint({ method: "PATCH", path: "/preferences/me", body: UpdatePreferenceRequestSchema, response: NoContentSchema })
|
|
122
126
|
},
|
|
123
127
|
mealStatus: {
|
|
124
128
|
my: endpoint({ method: "GET", path: "/meal-status", response: MealStatusResponseSchema }),
|
|
@@ -127,14 +131,15 @@ var apiContract = {
|
|
|
127
131
|
},
|
|
128
132
|
articles: {
|
|
129
133
|
list: endpoint({ method: "GET", path: "/articles/home", query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
|
|
130
|
-
|
|
134
|
+
byMember: endpoint({ method: "GET", path: "/articles/by-author/:memberId", pathParams: memberIdParam, query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
|
|
131
135
|
my: endpoint({ method: "GET", path: "/articles/my", response: PageArticleSummaryResponseSchema }),
|
|
132
136
|
detail: endpoint({ method: "GET", path: "/articles/:articleId", pathParams: articleIdParam, response: ArticleDetailResponseSchema }),
|
|
133
|
-
create: endpoint({ method: "POST", path: "/articles", body: CreateArticleRequestSchema, response:
|
|
134
|
-
|
|
137
|
+
create: endpoint({ method: "POST", path: "/articles", body: CreateArticleRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
138
|
+
like: endpoint({ method: "POST", path: "/articles/:articleId/like", pathParams: articleIdParam, response: ArticleLikeResponseSchema }),
|
|
139
|
+
createComment: endpoint({ method: "POST", path: "/articles/:articleId/comments", pathParams: articleIdParam, body: CreateCommentRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
135
140
|
presignArticleImage: endpoint({ method: "POST", path: "/uploads/presign-article", response: PresignArticleResponseSchema }),
|
|
136
141
|
delete: endpoint({ method: "DELETE", path: "/articles/:articleId", pathParams: articleIdParam, response: NoContentSchema }),
|
|
137
|
-
deleteComment: endpoint({ method: "DELETE", path: "/articles
|
|
142
|
+
deleteComment: endpoint({ method: "DELETE", path: "/articles/comments/:commentId", pathParams: commentIdParam, response: NoContentSchema })
|
|
138
143
|
// TODO: 게시물 수정 기능
|
|
139
144
|
},
|
|
140
145
|
recruits: {
|
|
@@ -159,8 +164,8 @@ var apiContract = {
|
|
|
159
164
|
list: endpoint({ method: "GET", path: "/friends", response: z2.array(FriendListItemResponseSchema) }),
|
|
160
165
|
blockList: endpoint({ method: "GET", path: "/friends/blocks", response: z2.array(FriendBlockItemResponseSchema) }),
|
|
161
166
|
incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response: z2.array(FriendRequestItemResponseSchema) }),
|
|
162
|
-
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/
|
|
163
|
-
sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams:
|
|
167
|
+
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoing", response: z2.array(FriendRequestItemResponseSchema) }),
|
|
168
|
+
sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
|
|
164
169
|
acceptRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/accept", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
165
170
|
rejectRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/reject", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
166
171
|
block: endpoint({ method: "POST", path: "/friends/blocks/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
|
|
@@ -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,
|
|
@@ -223,6 +224,10 @@ var ArticleSummaryResponseSchema = ArticleCoreSchema.extend({
|
|
|
223
224
|
commentCount: import_zod7.z.number().int().min(0),
|
|
224
225
|
likedByMe: import_zod7.z.boolean()
|
|
225
226
|
});
|
|
227
|
+
var ArticleLikeResponseSchema = import_zod7.z.object({
|
|
228
|
+
liked: import_zod7.z.boolean(),
|
|
229
|
+
likeCount: import_zod7.z.number().int().min(0)
|
|
230
|
+
});
|
|
226
231
|
var ArticleDetailResponseSchema = ArticleSummaryResponseSchema.extend({
|
|
227
232
|
comments: import_zod7.z.array(ArticleCommentSchema).optional()
|
|
228
233
|
});
|
|
@@ -232,6 +237,7 @@ var PageArticleSummaryResponseSchema = PageResponseSchema(ArticleSummaryResponse
|
|
|
232
237
|
ArticleCommentSchema,
|
|
233
238
|
ArticleCoreSchema,
|
|
234
239
|
ArticleDetailResponseSchema,
|
|
240
|
+
ArticleLikeResponseSchema,
|
|
235
241
|
ArticleListQuerySchema,
|
|
236
242
|
ArticleSortBySchema,
|
|
237
243
|
ArticleSummaryResponseSchema,
|
|
@@ -477,6 +477,16 @@ declare const ArticleSummaryResponseSchema: z.ZodObject<{
|
|
|
477
477
|
}[];
|
|
478
478
|
likedByMe: boolean;
|
|
479
479
|
}>;
|
|
480
|
+
declare const ArticleLikeResponseSchema: z.ZodObject<{
|
|
481
|
+
liked: z.ZodBoolean;
|
|
482
|
+
likeCount: z.ZodNumber;
|
|
483
|
+
}, "strip", z.ZodTypeAny, {
|
|
484
|
+
liked: boolean;
|
|
485
|
+
likeCount: number;
|
|
486
|
+
}, {
|
|
487
|
+
liked: boolean;
|
|
488
|
+
likeCount: number;
|
|
489
|
+
}>;
|
|
480
490
|
declare const ArticleDetailResponseSchema: z.ZodObject<{
|
|
481
491
|
articleId: z.ZodBranded<z.ZodNumber, "ArticleId">;
|
|
482
492
|
author: z.ZodObject<{
|
|
@@ -943,10 +953,11 @@ type ArticleSortBy = z.infer<typeof ArticleSortBySchema>;
|
|
|
943
953
|
type ArticleListQueryRequest = z.infer<typeof ArticleListQuerySchema>;
|
|
944
954
|
type FoodAnalysisResult = z.infer<typeof FoodAnalysisResultSchema>;
|
|
945
955
|
type ArticleSummaryResponse = z.infer<typeof ArticleSummaryResponseSchema>;
|
|
956
|
+
type ArticleLikeResponse = z.infer<typeof ArticleLikeResponseSchema>;
|
|
946
957
|
type ArticleDetailResponse = z.infer<typeof ArticleDetailResponseSchema>;
|
|
947
958
|
type PageArticleSummaryResponse = z.infer<typeof PageArticleSummaryResponseSchema>;
|
|
948
959
|
type PresignArticleResponse = z.infer<typeof PresignArticleResponseSchema>;
|
|
949
960
|
type ArticleCore = z.infer<typeof ArticleCoreSchema>;
|
|
950
961
|
type ArticleComment = z.infer<typeof ArticleCommentSchema>;
|
|
951
962
|
|
|
952
|
-
export { type ArticleComment, ArticleCommentSchema, type ArticleCore, ArticleCoreSchema, type ArticleDetailResponse, ArticleDetailResponseSchema, type ArticleListQueryRequest, ArticleListQuerySchema, type ArticleSortBy, ArticleSortBySchema, type ArticleSummaryResponse, ArticleSummaryResponseSchema, type CreateArticleRequest, CreateArticleRequestSchema, type CreateCommentRequest, CreateCommentRequestSchema, type FoodAnalysisResult, FoodAnalysisResultSchema, type PageArticleSummaryResponse, PageArticleSummaryResponseSchema, type PresignArticleResponse, PresignArticleResponseSchema };
|
|
963
|
+
export { type ArticleComment, ArticleCommentSchema, type ArticleCore, ArticleCoreSchema, type ArticleDetailResponse, ArticleDetailResponseSchema, type ArticleLikeResponse, ArticleLikeResponseSchema, type ArticleListQueryRequest, ArticleListQuerySchema, type ArticleSortBy, ArticleSortBySchema, type ArticleSummaryResponse, ArticleSummaryResponseSchema, type CreateArticleRequest, CreateArticleRequestSchema, type CreateCommentRequest, CreateCommentRequestSchema, type FoodAnalysisResult, FoodAnalysisResultSchema, type PageArticleSummaryResponse, PageArticleSummaryResponseSchema, type PresignArticleResponse, PresignArticleResponseSchema };
|
|
@@ -477,6 +477,16 @@ declare const ArticleSummaryResponseSchema: z.ZodObject<{
|
|
|
477
477
|
}[];
|
|
478
478
|
likedByMe: boolean;
|
|
479
479
|
}>;
|
|
480
|
+
declare const ArticleLikeResponseSchema: z.ZodObject<{
|
|
481
|
+
liked: z.ZodBoolean;
|
|
482
|
+
likeCount: z.ZodNumber;
|
|
483
|
+
}, "strip", z.ZodTypeAny, {
|
|
484
|
+
liked: boolean;
|
|
485
|
+
likeCount: number;
|
|
486
|
+
}, {
|
|
487
|
+
liked: boolean;
|
|
488
|
+
likeCount: number;
|
|
489
|
+
}>;
|
|
480
490
|
declare const ArticleDetailResponseSchema: z.ZodObject<{
|
|
481
491
|
articleId: z.ZodBranded<z.ZodNumber, "ArticleId">;
|
|
482
492
|
author: z.ZodObject<{
|
|
@@ -943,10 +953,11 @@ type ArticleSortBy = z.infer<typeof ArticleSortBySchema>;
|
|
|
943
953
|
type ArticleListQueryRequest = z.infer<typeof ArticleListQuerySchema>;
|
|
944
954
|
type FoodAnalysisResult = z.infer<typeof FoodAnalysisResultSchema>;
|
|
945
955
|
type ArticleSummaryResponse = z.infer<typeof ArticleSummaryResponseSchema>;
|
|
956
|
+
type ArticleLikeResponse = z.infer<typeof ArticleLikeResponseSchema>;
|
|
946
957
|
type ArticleDetailResponse = z.infer<typeof ArticleDetailResponseSchema>;
|
|
947
958
|
type PageArticleSummaryResponse = z.infer<typeof PageArticleSummaryResponseSchema>;
|
|
948
959
|
type PresignArticleResponse = z.infer<typeof PresignArticleResponseSchema>;
|
|
949
960
|
type ArticleCore = z.infer<typeof ArticleCoreSchema>;
|
|
950
961
|
type ArticleComment = z.infer<typeof ArticleCommentSchema>;
|
|
951
962
|
|
|
952
|
-
export { type ArticleComment, ArticleCommentSchema, type ArticleCore, ArticleCoreSchema, type ArticleDetailResponse, ArticleDetailResponseSchema, type ArticleListQueryRequest, ArticleListQuerySchema, type ArticleSortBy, ArticleSortBySchema, type ArticleSummaryResponse, ArticleSummaryResponseSchema, type CreateArticleRequest, CreateArticleRequestSchema, type CreateCommentRequest, CreateCommentRequestSchema, type FoodAnalysisResult, FoodAnalysisResultSchema, type PageArticleSummaryResponse, PageArticleSummaryResponseSchema, type PresignArticleResponse, PresignArticleResponseSchema };
|
|
963
|
+
export { type ArticleComment, ArticleCommentSchema, type ArticleCore, ArticleCoreSchema, type ArticleDetailResponse, ArticleDetailResponseSchema, type ArticleLikeResponse, ArticleLikeResponseSchema, type ArticleListQueryRequest, ArticleListQuerySchema, type ArticleSortBy, ArticleSortBySchema, type ArticleSummaryResponse, ArticleSummaryResponseSchema, type CreateArticleRequest, CreateArticleRequestSchema, type CreateCommentRequest, CreateCommentRequestSchema, type FoodAnalysisResult, FoodAnalysisResultSchema, type PageArticleSummaryResponse, PageArticleSummaryResponseSchema, type PresignArticleResponse, PresignArticleResponseSchema };
|
|
@@ -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,
|
|
@@ -10,7 +11,7 @@ import {
|
|
|
10
11
|
FoodAnalysisResultSchema,
|
|
11
12
|
PageArticleSummaryResponseSchema,
|
|
12
13
|
PresignArticleResponseSchema
|
|
13
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-RLVHDFEV.js";
|
|
14
15
|
import "../../chunk-GTVEQYJW.js";
|
|
15
16
|
import "../../chunk-HRM3FQPL.js";
|
|
16
17
|
import "../../chunk-KRVEQVRC.js";
|
|
@@ -19,6 +20,7 @@ export {
|
|
|
19
20
|
ArticleCommentSchema,
|
|
20
21
|
ArticleCoreSchema,
|
|
21
22
|
ArticleDetailResponseSchema,
|
|
23
|
+
ArticleLikeResponseSchema,
|
|
22
24
|
ArticleListQuerySchema,
|
|
23
25
|
ArticleSortBySchema,
|
|
24
26
|
ArticleSummaryResponseSchema,
|
|
@@ -266,6 +266,10 @@ var ArticleSummaryResponseSchema = ArticleCoreSchema.extend({
|
|
|
266
266
|
commentCount: import_zod7.z.number().int().min(0),
|
|
267
267
|
likedByMe: import_zod7.z.boolean()
|
|
268
268
|
});
|
|
269
|
+
var ArticleLikeResponseSchema = import_zod7.z.object({
|
|
270
|
+
liked: import_zod7.z.boolean(),
|
|
271
|
+
likeCount: import_zod7.z.number().int().min(0)
|
|
272
|
+
});
|
|
269
273
|
var ArticleDetailResponseSchema = ArticleSummaryResponseSchema.extend({
|
|
270
274
|
comments: import_zod7.z.array(ArticleCommentSchema).optional()
|
|
271
275
|
});
|
|
@@ -582,7 +586,6 @@ var endpoint = (contract) => ({
|
|
|
582
586
|
|
|
583
587
|
// src/domain/common/contracts/api.ts
|
|
584
588
|
var memberIdParam = import_zod19.z.object({ memberId: MemberIdSchema });
|
|
585
|
-
var authorIdParam = import_zod19.z.object({ memberId: MemberIdSchema });
|
|
586
589
|
var articleIdParam = import_zod19.z.object({ articleId: ArticleIdSchema });
|
|
587
590
|
var commentIdParam = import_zod19.z.object({ commentId: CommentIdSchema });
|
|
588
591
|
var recruitIdParam = import_zod19.z.object({ recruitId: RecruitIdSchema });
|
|
@@ -605,8 +608,11 @@ var apiContract = {
|
|
|
605
608
|
memberProfile: endpoint({ method: "GET", path: "/members/:memberId", pathParams: memberIdParam, response: ProfileDetailResponseSchema }),
|
|
606
609
|
presignProfileImage: endpoint({ method: "POST", path: "/uploads/presign-profile", response: PresignProfileResponseSchema }),
|
|
607
610
|
createProfile: endpoint({ method: "POST", path: "/members/onboarding", body: CreateProfileRequestSchema, response: NoContentSchema }),
|
|
608
|
-
updateProfile: endpoint({ method: "PATCH", path: "/members/me/profile", body: UpdateProfileRequestSchema, response: NoContentSchema })
|
|
609
|
-
|
|
611
|
+
updateProfile: endpoint({ method: "PATCH", path: "/members/me/profile", body: UpdateProfileRequestSchema, response: NoContentSchema })
|
|
612
|
+
},
|
|
613
|
+
preferences: {
|
|
614
|
+
my: endpoint({ method: "GET", path: "/preferences/me", response: MemberFoodPreferenceSchema }),
|
|
615
|
+
update: endpoint({ method: "PATCH", path: "/preferences/me", body: UpdatePreferenceRequestSchema, response: NoContentSchema })
|
|
610
616
|
},
|
|
611
617
|
mealStatus: {
|
|
612
618
|
my: endpoint({ method: "GET", path: "/meal-status", response: MealStatusResponseSchema }),
|
|
@@ -615,14 +621,15 @@ var apiContract = {
|
|
|
615
621
|
},
|
|
616
622
|
articles: {
|
|
617
623
|
list: endpoint({ method: "GET", path: "/articles/home", query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
|
|
618
|
-
|
|
624
|
+
byMember: endpoint({ method: "GET", path: "/articles/by-author/:memberId", pathParams: memberIdParam, query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
|
|
619
625
|
my: endpoint({ method: "GET", path: "/articles/my", response: PageArticleSummaryResponseSchema }),
|
|
620
626
|
detail: endpoint({ method: "GET", path: "/articles/:articleId", pathParams: articleIdParam, response: ArticleDetailResponseSchema }),
|
|
621
|
-
create: endpoint({ method: "POST", path: "/articles", body: CreateArticleRequestSchema, response:
|
|
622
|
-
|
|
627
|
+
create: endpoint({ method: "POST", path: "/articles", body: CreateArticleRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
628
|
+
like: endpoint({ method: "POST", path: "/articles/:articleId/like", pathParams: articleIdParam, response: ArticleLikeResponseSchema }),
|
|
629
|
+
createComment: endpoint({ method: "POST", path: "/articles/:articleId/comments", pathParams: articleIdParam, body: CreateCommentRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
623
630
|
presignArticleImage: endpoint({ method: "POST", path: "/uploads/presign-article", response: PresignArticleResponseSchema }),
|
|
624
631
|
delete: endpoint({ method: "DELETE", path: "/articles/:articleId", pathParams: articleIdParam, response: NoContentSchema }),
|
|
625
|
-
deleteComment: endpoint({ method: "DELETE", path: "/articles
|
|
632
|
+
deleteComment: endpoint({ method: "DELETE", path: "/articles/comments/:commentId", pathParams: commentIdParam, response: NoContentSchema })
|
|
626
633
|
// TODO: 게시물 수정 기능
|
|
627
634
|
},
|
|
628
635
|
recruits: {
|
|
@@ -647,8 +654,8 @@ var apiContract = {
|
|
|
647
654
|
list: endpoint({ method: "GET", path: "/friends", response: import_zod19.z.array(FriendListItemResponseSchema) }),
|
|
648
655
|
blockList: endpoint({ method: "GET", path: "/friends/blocks", response: import_zod19.z.array(FriendBlockItemResponseSchema) }),
|
|
649
656
|
incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response: import_zod19.z.array(FriendRequestItemResponseSchema) }),
|
|
650
|
-
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/
|
|
651
|
-
sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams:
|
|
657
|
+
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoing", response: import_zod19.z.array(FriendRequestItemResponseSchema) }),
|
|
658
|
+
sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
|
|
652
659
|
acceptRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/accept", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
653
660
|
rejectRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/reject", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
654
661
|
block: endpoint({ method: "POST", path: "/friends/blocks/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
|