@kimdaegyu/babmukdang-shared 1.1.0 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/{chunk-NW5O4R7M.js → chunk-GTVEQYJW.js} +2 -2
  2. package/dist/{chunk-UFVPFUMI.js → chunk-H77ISYYC.js} +17 -1
  3. package/dist/{chunk-FCE6KXNO.js → chunk-J76VB5SE.js} +4 -4
  4. package/dist/chunk-JEUH3JDZ.js +299 -0
  5. package/dist/chunk-KRVEQVRC.js +72 -0
  6. package/dist/{chunk-EJKRR2MZ.js → chunk-M5OSCHMV.js} +14 -15
  7. package/dist/chunk-TY4WZEIZ.js +109 -0
  8. package/dist/chunk-U6OQQOPN.js +35 -0
  9. package/dist/chunk-UJJMW7II.js +37 -0
  10. package/dist/chunk-VAWYU5JG.js +78 -0
  11. package/dist/{chunk-2GRWCRTV.js → chunk-VWPUBTMV.js} +102 -106
  12. package/dist/{chunk-ZNAAA53X.js → chunk-W3YQYI4R.js} +14 -19
  13. package/dist/chunk-YGFAVC5N.js +34 -0
  14. package/dist/domain/article/index.cjs +137 -144
  15. package/dist/domain/article/index.d.cts +208 -282
  16. package/dist/domain/article/index.d.ts +208 -282
  17. package/dist/domain/article/index.js +16 -18
  18. package/dist/domain/auth/index.cjs +51 -45
  19. package/dist/domain/auth/index.d.cts +7 -8
  20. package/dist/domain/auth/index.d.ts +7 -8
  21. package/dist/domain/auth/index.js +3 -6
  22. package/dist/domain/common/index.cjs +430 -425
  23. package/dist/domain/common/index.d.cts +1224 -1111
  24. package/dist/domain/common/index.d.ts +1224 -1111
  25. package/dist/domain/common/index.js +49 -38
  26. package/dist/domain/friend/index.cjs +66 -70
  27. package/dist/domain/friend/index.d.cts +32 -63
  28. package/dist/domain/friend/index.d.ts +32 -63
  29. package/dist/domain/friend/index.js +3 -11
  30. package/dist/domain/index.cjs +469 -474
  31. package/dist/domain/index.d.cts +11 -14
  32. package/dist/domain/index.d.ts +11 -14
  33. package/dist/domain/index.js +103 -117
  34. package/dist/domain/invitation/index.cjs +19 -41
  35. package/dist/domain/invitation/index.d.cts +3 -6
  36. package/dist/domain/invitation/index.d.ts +3 -6
  37. package/dist/domain/invitation/index.js +4 -8
  38. package/dist/domain/meal/index.cjs +108 -13
  39. package/dist/domain/meal/index.d.cts +51 -23
  40. package/dist/domain/meal/index.d.ts +51 -23
  41. package/dist/domain/meal/index.js +8 -3
  42. package/dist/domain/member/index.cjs +63 -54
  43. package/dist/domain/member/index.d.cts +233 -126
  44. package/dist/domain/member/index.d.ts +233 -126
  45. package/dist/domain/member/index.js +17 -17
  46. package/dist/domain/plan/index.cjs +145 -136
  47. package/dist/domain/plan/index.d.cts +22 -33
  48. package/dist/domain/plan/index.d.ts +22 -33
  49. package/dist/domain/plan/index.js +8 -9
  50. package/dist/domain/{referral → promotion}/index.cjs +62 -6
  51. package/dist/domain/promotion/index.d.cts +114 -0
  52. package/dist/domain/promotion/index.d.ts +114 -0
  53. package/dist/domain/promotion/index.js +24 -0
  54. package/dist/domain/recruit/index.cjs +104 -61
  55. package/dist/domain/recruit/index.d.cts +56 -56
  56. package/dist/domain/recruit/index.d.ts +56 -56
  57. package/dist/domain/recruit/index.js +21 -11
  58. package/dist/domain/restaurant/index.cjs +8 -2
  59. package/dist/domain/restaurant/index.d.cts +1 -4
  60. package/dist/domain/restaurant/index.d.ts +1 -4
  61. package/dist/domain/restaurant/index.js +2 -3
  62. package/dist/domain/room/index.cjs +134 -122
  63. package/dist/domain/room/index.d.cts +144 -144
  64. package/dist/domain/room/index.d.ts +144 -144
  65. package/dist/domain/room/index.js +5 -5
  66. package/dist/{id-B-8M90Ef.d.cts → id-dAYxfjZn.d.cts} +22 -1
  67. package/dist/{id-B-8M90Ef.d.ts → id-dAYxfjZn.d.ts} +22 -1
  68. package/dist/index-DAcw_a8p.d.ts +292 -0
  69. package/dist/index-DJJo4ejN.d.cts +292 -0
  70. package/dist/index.cjs +436 -630
  71. package/dist/index.d.cts +27 -142
  72. package/dist/index.d.ts +27 -142
  73. package/dist/index.js +14 -204
  74. package/package.json +55 -50
  75. package/dist/chunk-2SJCUQNN.js +0 -40
  76. package/dist/chunk-35QGRA2X.js +0 -0
  77. package/dist/chunk-3YMV26OY.js +0 -0
  78. package/dist/chunk-4DAOP35P.js +0 -74
  79. package/dist/chunk-6NZPEF4K.js +0 -34
  80. package/dist/chunk-7MGHUZXI.js +0 -25
  81. package/dist/chunk-BVTYAILQ.js +0 -0
  82. package/dist/chunk-F24BT6H4.js +0 -23
  83. package/dist/chunk-IJMADVK5.js +0 -27
  84. package/dist/chunk-IYCA6KHR.js +0 -0
  85. package/dist/chunk-JCN37ARR.js +0 -52
  86. package/dist/chunk-JXYRJKRV.js +0 -0
  87. package/dist/chunk-LCMNVWSP.js +0 -0
  88. package/dist/chunk-MP7TEKEI.js +0 -72
  89. package/dist/chunk-O6DYRCFN.js +0 -0
  90. package/dist/chunk-PDGMGLYH.js +0 -0
  91. package/dist/chunk-TA4BB3UC.js +0 -0
  92. package/dist/chunk-UN7KYFMV.js +0 -0
  93. package/dist/chunk-UXA4FHST.js +0 -19
  94. package/dist/chunk-WNY6POLW.js +0 -0
  95. package/dist/chunk-YVACD5IG.js +0 -127
  96. package/dist/chunk-Z2UFF3MA.js +0 -212
  97. package/dist/chunk-ZSZ3ETY7.js +0 -32
  98. package/dist/domain/challenge/index.cjs +0 -65
  99. package/dist/domain/challenge/index.d.cts +0 -104
  100. package/dist/domain/challenge/index.d.ts +0 -104
  101. package/dist/domain/challenge/index.js +0 -18
  102. package/dist/domain/coupon/index.cjs +0 -74
  103. package/dist/domain/coupon/index.d.cts +0 -38
  104. package/dist/domain/coupon/index.d.ts +0 -38
  105. package/dist/domain/coupon/index.js +0 -14
  106. package/dist/domain/preference/index.cjs +0 -69
  107. package/dist/domain/preference/index.d.cts +0 -31
  108. package/dist/domain/preference/index.d.ts +0 -31
  109. package/dist/domain/preference/index.js +0 -12
  110. package/dist/domain/referral/index.d.cts +0 -51
  111. package/dist/domain/referral/index.d.ts +0 -51
  112. package/dist/domain/referral/index.js +0 -14
  113. package/dist/index-BuInbhtG.d.cts +0 -305
  114. package/dist/index-CKRUOupn.d.ts +0 -305
  115. /package/dist/{chunk-34EKPNPX.js → chunk-NJTV6DRT.js} +0 -0
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  RestaurantIdSchema
3
- } from "./chunk-UFVPFUMI.js";
3
+ } from "./chunk-H77ISYYC.js";
4
4
 
5
- // src/domain/restaurant/schema/restaurant.schema.ts
5
+ // src/domain/restaurant/restaurant.schema.ts
6
6
  import { z } from "zod";
7
7
  var RestaurantSchema = z.object({
8
8
  restaurantId: RestaurantIdSchema,
@@ -1,3 +1,9 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
1
7
  // src/domain/common/schema/id.schema.ts
2
8
  import { z } from "zod";
3
9
  var PositiveIntIdSchema = z.number().int().positive();
@@ -15,8 +21,15 @@ var CouponIdSchema = PositiveIntIdSchema.brand();
15
21
  var SubscriptionIdSchema = PositiveIntIdSchema.brand();
16
22
  var FriendRequestIdSchema = PositiveIntIdSchema.brand();
17
23
  var ReferralCodeSchema = z.string().min(4).max(64).brand();
24
+ var FoodCodeSchema = NonEmptyStringIdSchema.brand();
25
+ var FoodLabelSchema = NonEmptyStringIdSchema.brand();
26
+ var FoodSchema = z.object({
27
+ code: FoodCodeSchema,
28
+ label: FoodLabelSchema
29
+ });
18
30
 
19
31
  export {
32
+ __export,
20
33
  PositiveIntIdSchema,
21
34
  NonEmptyStringIdSchema,
22
35
  MemberIdSchema,
@@ -31,5 +44,8 @@ export {
31
44
  CouponIdSchema,
32
45
  SubscriptionIdSchema,
33
46
  FriendRequestIdSchema,
34
- ReferralCodeSchema
47
+ ReferralCodeSchema,
48
+ FoodCodeSchema,
49
+ FoodLabelSchema,
50
+ FoodSchema
35
51
  };
@@ -1,8 +1,8 @@
1
1
  import {
2
- MemberResponseSchema
3
- } from "./chunk-MP7TEKEI.js";
2
+ MemberCoreSchema
3
+ } from "./chunk-KRVEQVRC.js";
4
4
 
5
- // src/domain/auth/schema/auth.schema.ts
5
+ // src/domain/auth/auth.schema.ts
6
6
  import { z } from "zod";
7
7
  var TokenResponseSchema = z.object({
8
8
  accessToken: z.string().min(1),
@@ -19,7 +19,7 @@ var SignupRequestSchema = z.object({
19
19
  profileImageUrl: z.string().url().nullable().optional()
20
20
  });
21
21
  var SignupResponseSchema = z.object({
22
- member: MemberResponseSchema
22
+ member: MemberCoreSchema
23
23
  });
24
24
 
25
25
  export {
@@ -0,0 +1,299 @@
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
+ import {
12
+ ChallengeStatusResponseSchema,
13
+ ClaimChallengeRewardRequestSchema,
14
+ CouponResponseSchema,
15
+ RedeemReferralRequestSchema,
16
+ ReferralCreateResponseSchema,
17
+ ReferralItemResponseSchema
18
+ } from "./chunk-VAWYU5JG.js";
19
+ import {
20
+ ArticleDetailResponseSchema,
21
+ ArticleListQuerySchema,
22
+ CreateArticleRequestSchema,
23
+ CreateCommentRequestSchema,
24
+ PageArticleSummaryResponseSchema,
25
+ PageQuerySchema,
26
+ PresignArticleResponseSchema,
27
+ SortDirectionSchema
28
+ } from "./chunk-TY4WZEIZ.js";
29
+ import {
30
+ LoginRequestSchema,
31
+ SignupRequestSchema,
32
+ SignupResponseSchema,
33
+ TokenResponseSchema
34
+ } from "./chunk-J76VB5SE.js";
35
+ import {
36
+ FriendBlockItemResponseSchema,
37
+ FriendListItemResponseSchema,
38
+ FriendRequestItemResponseSchema
39
+ } from "./chunk-U6OQQOPN.js";
40
+ import {
41
+ ISODateTimeStringSchema
42
+ } from "./chunk-HRM3FQPL.js";
43
+ import {
44
+ AcceptInvitationResponseSchema,
45
+ CreateInvitationRequestSchema,
46
+ InvitationListItemResponseSchema,
47
+ SendInvitationResponseSchema
48
+ } from "./chunk-YGFAVC5N.js";
49
+ import {
50
+ CreateProfileRequestSchema,
51
+ MemberCoreSchema,
52
+ MemberResponseSchema,
53
+ MemberSearchQuerySchema,
54
+ MemberSerachResponseSchema,
55
+ PresignProfileResponseSchema,
56
+ ProfileDetailResponseSchema,
57
+ UpdatePreferenceRequestSchema,
58
+ UpdateProfileRequestSchema
59
+ } from "./chunk-KRVEQVRC.js";
60
+ import {
61
+ ArticleIdSchema,
62
+ CommentIdSchema,
63
+ CouponIdSchema,
64
+ FriendRequestIdSchema,
65
+ InvitationIdSchema,
66
+ MemberIdSchema,
67
+ PlanIdSchema,
68
+ RecruitIdSchema,
69
+ ReferralCodeSchema,
70
+ RestaurantIdSchema,
71
+ RoomIdSchema,
72
+ SubscriptionIdSchema
73
+ } from "./chunk-H77ISYYC.js";
74
+
75
+ // src/domain/recruit/recruit.schema.ts
76
+ import { z as z4 } from "zod";
77
+
78
+ // src/domain/common/contracts/api.ts
79
+ import { z as z2 } from "zod";
80
+
81
+ // src/domain/common/contracts/endpoint.ts
82
+ import { z } from "zod";
83
+ var NoBodySchema = z.undefined();
84
+ var NoQuerySchema = z.undefined();
85
+ var NoParamsSchema = z.undefined();
86
+ var endpoint = (contract) => ({
87
+ method: contract.method,
88
+ path: contract.path,
89
+ pathParams: contract.pathParams ?? NoParamsSchema,
90
+ query: contract.query ?? NoQuerySchema,
91
+ body: contract.body ?? NoBodySchema,
92
+ response: contract.response
93
+ });
94
+
95
+ // src/domain/common/contracts/api.ts
96
+ var memberIdParam = z2.object({ memberId: MemberIdSchema });
97
+ var authorIdParam = z2.object({ memberId: MemberIdSchema });
98
+ var articleIdParam = z2.object({ articleId: ArticleIdSchema });
99
+ var commentIdParam = z2.object({ commentId: CommentIdSchema });
100
+ var recruitIdParam = z2.object({ recruitId: RecruitIdSchema });
101
+ var invitationIdParam = z2.object({ invitationId: InvitationIdSchema });
102
+ var planIdParam = z2.object({ planId: PlanIdSchema });
103
+ var couponIdParam = z2.object({ couponId: CouponIdSchema });
104
+ var friendRequestIdParam = z2.object({ requestId: FriendRequestIdSchema });
105
+ var apiContract = {
106
+ auth: {
107
+ signup: endpoint({ method: "POST", path: "/auth/signup", body: SignupRequestSchema, response: SignupResponseSchema }),
108
+ login: endpoint({ method: "POST", path: "/auth/login", body: LoginRequestSchema, response: TokenResponseSchema }),
109
+ refresh: endpoint({ method: "POST", path: "/auth/refresh", response: TokenResponseSchema }),
110
+ logout: endpoint({ method: "POST", path: "/auth/logout", response: NoContentSchema })
111
+ // test: endpoint({method: "GET", path: "/auth/test", response: TokenResponseSchema}) TODO: Dev에서만 작동하도록 백엔드에서 수정해야함
112
+ },
113
+ members: {
114
+ me: endpoint({ method: "GET", path: "/members/me", response: MemberResponseSchema }),
115
+ myProfile: endpoint({ method: "GET", path: "/members/me/detail", response: ProfileDetailResponseSchema }),
116
+ 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: PresignProfileResponseSchema }),
119
+ 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
+ updatePreferences: endpoint({ method: "PATCH", path: "/members/me/preferences", body: UpdatePreferenceRequestSchema, response: NoContentSchema })
122
+ },
123
+ 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: "/meal-status/friend", query: FriendMealQuerySchema, response: z2.array(FriendMealItemResponseSchema) })
127
+ },
128
+ articles: {
129
+ list: endpoint({ method: "GET", path: "/articles/home", query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
130
+ byAuthor: endpoint({ method: "GET", path: "/articles/by-author/:authorId", pathParams: authorIdParam, response: PageArticleSummaryResponseSchema }),
131
+ my: endpoint({ method: "GET", path: "/articles/my", response: PageArticleSummaryResponseSchema }),
132
+ detail: endpoint({ method: "GET", path: "/articles/:articleId", pathParams: articleIdParam, response: ArticleDetailResponseSchema }),
133
+ create: endpoint({ method: "POST", path: "/articles", body: CreateArticleRequestSchema, response: NoContentSchema }),
134
+ createComment: endpoint({ method: "POST", path: "/articles/:articleId/comments", pathParams: articleIdParam, body: CreateCommentRequestSchema, response: NoContentSchema }),
135
+ presignArticleImage: endpoint({ method: "POST", path: "/uploads/presign-article", response: PresignArticleResponseSchema }),
136
+ delete: endpoint({ method: "DELETE", path: "/articles/:articleId", pathParams: articleIdParam, response: NoContentSchema }),
137
+ deleteComment: endpoint({ method: "DELETE", path: "/articles/:articleId/comments/:commentId", pathParams: articleIdParam.merge(commentIdParam), response: NoContentSchema })
138
+ // TODO: 게시물 수정 기능
139
+ },
140
+ recruits: {
141
+ list: endpoint({ method: "GET", path: "/recruits", query: RecruitListQuerySchema, response: RecruitListResponseSchema }),
142
+ create: endpoint({ method: "POST", path: "/recruits", body: CreateRecruitRequestSchema, response: CreateRecruitResponseSchema }),
143
+ join: endpoint({ method: "POST", path: "/recruits/:recruitId/join", pathParams: recruitIdParam, response: NoContentSchema }),
144
+ close: endpoint({ method: "PATCH", path: "/recruits/:recruitId/close", pathParams: recruitIdParam, response: NoContentSchema })
145
+ },
146
+ invitations: {
147
+ list: endpoint({ method: "GET", path: "/invitations", response: z2.array(InvitationListItemResponseSchema) }),
148
+ // 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 }),
150
+ accept: endpoint({ method: "POST", path: "/invitations/:invitationId/accept", pathParams: invitationIdParam, response: AcceptInvitationResponseSchema }),
151
+ reject: endpoint({ method: "POST", path: "/invitations/:invitationId/reject", pathParams: invitationIdParam, response: NoContentSchema })
152
+ },
153
+ plans: {
154
+ list: endpoint({ method: "GET", path: "/plans", query: PlanListQuerySchema, response: z2.array(PlanResponseSchema) }),
155
+ detail: endpoint({ method: "GET", path: "/plans/:planId", pathParams: planIdParam, response: PlanResponseSchema }),
156
+ cancel: endpoint({ method: "PATCH", path: "/plans/:planId/cancel", pathParams: planIdParam, response: NoContentSchema })
157
+ },
158
+ friends: {
159
+ list: endpoint({ method: "GET", path: "/friends", response: z2.array(FriendListItemResponseSchema) }),
160
+ blockList: endpoint({ method: "GET", path: "/friends/blocks", response: z2.array(FriendBlockItemResponseSchema) }),
161
+ incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response: z2.array(FriendRequestItemResponseSchema) }),
162
+ outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoint", response: z2.array(FriendRequestItemResponseSchema) }),
163
+ sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams: friendRequestIdParam, response: NoContentSchema }),
164
+ acceptRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/accept", pathParams: friendRequestIdParam, response: NoContentSchema }),
165
+ rejectRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/reject", pathParams: friendRequestIdParam, response: NoContentSchema }),
166
+ block: endpoint({ method: "POST", path: "/friends/blocks/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
167
+ cancelRequest: endpoint({ method: "DELETE", path: "/friends/requests/:requestId", pathParams: friendRequestIdParam, response: NoContentSchema }),
168
+ unblock: endpoint({ method: "DELETE", path: "/friends/blocks/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
169
+ unfriend: endpoint({ method: "DELETE", path: "/friends/:memberId", pathParams: memberIdParam, response: NoContentSchema })
170
+ },
171
+ coupons: {
172
+ list: endpoint({ method: "GET", path: "/coupons", response: z2.array(CouponResponseSchema) }),
173
+ use: endpoint({ method: "PATCH", path: "/coupons/:couponId/use", pathParams: couponIdParam, response: NoContentSchema })
174
+ },
175
+ challenges: {
176
+ status: endpoint({ method: "GET", path: "/challenges/status", response: ChallengeStatusResponseSchema }),
177
+ claimReward: endpoint({ method: "POST", path: "/challenges/rewards", body: ClaimChallengeRewardRequestSchema, response: NoContentSchema })
178
+ },
179
+ referrals: {
180
+ list: endpoint({ method: "GET", path: "/referrals", response: z2.array(ReferralItemResponseSchema) }),
181
+ create: endpoint({ method: "POST", path: "/referrals", response: ReferralCreateResponseSchema }),
182
+ redeem: endpoint({ method: "POST", path: "/referrals/redeem", body: RedeemReferralRequestSchema, response: NoContentSchema })
183
+ },
184
+ room: {
185
+ //TODO: 방 입장 기능
186
+ },
187
+ health: {
188
+ healthCheck: endpoint({ method: "GET", path: "/", response: z2.string() })
189
+ }
190
+ };
191
+
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
+ // src/domain/common/contracts/envelope.ts
219
+ var makeApiResponseSchema = ApiResponseSchema;
220
+ var makeApiSuccessSchema = ApiSuccessSchema;
221
+
222
+ // src/domain/common/contracts/id.ts
223
+ var toMemberId = (value) => MemberIdSchema.parse(value);
224
+ var toArticleId = (value) => ArticleIdSchema.parse(value);
225
+ var toRecruitId = (value) => RecruitIdSchema.parse(value);
226
+ var toInvitationId = (value) => InvitationIdSchema.parse(value);
227
+ var toRoomId = (value) => RoomIdSchema.parse(value);
228
+ var toRestaurantId = (value) => RestaurantIdSchema.parse(value);
229
+ var toCommentId = (value) => CommentIdSchema.parse(value);
230
+ var toPlanId = (value) => PlanIdSchema.parse(value);
231
+ var toCouponId = (value) => CouponIdSchema.parse(value);
232
+ var toSubscriptionId = (value) => SubscriptionIdSchema.parse(value);
233
+ var toFriendRequestId = (value) => FriendRequestIdSchema.parse(value);
234
+ var toReferralCode = (value) => ReferralCodeSchema.parse(value);
235
+
236
+ // src/domain/recruit/recruit.schema.ts
237
+ var RecruitStatusSchema = z4.enum(["OPEN", "CLOSED", "EXPIRED"]);
238
+ var RecruitParticipantSchema = MemberCoreSchema.extend({});
239
+ var RecruitSortBySchema = z4.enum(["createdAt", "deadline", "participantCount"]);
240
+ var RecruitListQuerySchema = PageQuerySchema.extend({
241
+ sortBy: RecruitSortBySchema.default("createdAt"),
242
+ direction: SortDirectionSchema.default("desc")
243
+ });
244
+ var RecruitResponseSchema = z4.object({
245
+ targetCount: z4.number().int().min(2),
246
+ meetingAt: ISODateTimeStringSchema,
247
+ location: z4.string().min(1),
248
+ message: z4.string().max(500),
249
+ recruitId: RecruitIdSchema,
250
+ status: RecruitStatusSchema,
251
+ createdAt: ISODateTimeStringSchema,
252
+ expiredAt: ISODateTimeStringSchema,
253
+ updatedAt: ISODateTimeStringSchema,
254
+ author: MemberCoreSchema,
255
+ participants: z4.array(RecruitParticipantSchema)
256
+ });
257
+ var RecruitListResponseSchema = z4.array(RecruitResponseSchema);
258
+ var CreateRecruitRequestSchema = z4.object({
259
+ targetCount: z4.number().int().min(2),
260
+ meetingAt: ISODateTimeStringSchema,
261
+ location: z4.string().min(1),
262
+ message: z4.string().max(500)
263
+ });
264
+ var CreateRecruitResponseSchema = z4.object({
265
+ recruitId: RecruitIdSchema
266
+ });
267
+
268
+ export {
269
+ RecruitStatusSchema,
270
+ RecruitSortBySchema,
271
+ RecruitListQuerySchema,
272
+ RecruitListResponseSchema,
273
+ CreateRecruitRequestSchema,
274
+ CreateRecruitResponseSchema,
275
+ NoBodySchema,
276
+ NoQuerySchema,
277
+ NoParamsSchema,
278
+ endpoint,
279
+ apiContract,
280
+ NoContentSchema,
281
+ ApiSuccessSchema,
282
+ ApiFailureSchema,
283
+ ApiResponseSchema,
284
+ CreatedEntityIdResponseSchema,
285
+ makeApiResponseSchema,
286
+ makeApiSuccessSchema,
287
+ toMemberId,
288
+ toArticleId,
289
+ toRecruitId,
290
+ toInvitationId,
291
+ toRoomId,
292
+ toRestaurantId,
293
+ toCommentId,
294
+ toPlanId,
295
+ toCouponId,
296
+ toSubscriptionId,
297
+ toFriendRequestId,
298
+ toReferralCode
299
+ };
@@ -0,0 +1,72 @@
1
+ import {
2
+ FoodSchema,
3
+ MemberIdSchema
4
+ } from "./chunk-H77ISYYC.js";
5
+
6
+ // src/domain/member/member.schema.ts
7
+ import { z as z2 } from "zod";
8
+
9
+ // src/domain/common/contracts/upload.ts
10
+ import z from "zod";
11
+ var PresignUploadResponseSchema = z.object({
12
+ key: z.string(),
13
+ putUrl: z.string().url(),
14
+ cdnUrl: z.string().url()
15
+ });
16
+
17
+ // src/domain/member/member.schema.ts
18
+ var MemberRoleSchema = z2.enum(["USER", "ADMIN"]);
19
+ var MemberCoreSchema = z2.object({
20
+ memberId: MemberIdSchema,
21
+ username: z2.string().min(1).max(50),
22
+ profileImageUrl: z2.string().url().nullable().optional()
23
+ });
24
+ var PresignProfileResponseSchema = PresignUploadResponseSchema.extend({});
25
+ var MemberResponseSchema = MemberCoreSchema.pick({
26
+ memberId: true,
27
+ username: true,
28
+ profileImageUrl: true
29
+ });
30
+ var MemberSearchQuerySchema = z2.object({
31
+ email: z2.string().email().optional(),
32
+ username: z2.string().optional()
33
+ });
34
+ var MemberSerachResponseSchema = z2.array(MemberCoreSchema);
35
+ var MemberDetailSchema = MemberCoreSchema.extend({
36
+ bio: z2.string().nullable(),
37
+ friendConunt: z2.number().int().min(0).default(0),
38
+ completedPlans: z2.number().int().min(0).default(0),
39
+ uncompletedPlans: z2.number().int().min(0).default(0)
40
+ });
41
+ var FoodPreferenceItemSchema = FoodSchema.extend({});
42
+ var MemberFoodPreferenceSchema = z2.object({
43
+ liked: z2.array(FoodPreferenceItemSchema).optional(),
44
+ disliked: z2.array(FoodPreferenceItemSchema).optional(),
45
+ allergy: z2.array(FoodPreferenceItemSchema).optional()
46
+ });
47
+ var ProfileDetailResponseSchema = MemberDetailSchema;
48
+ var UpdateProfileRequestSchema = z2.object({
49
+ username: z2.string().min(1).max(50),
50
+ profileImageUrl: z2.string().url().nullable(),
51
+ bio: z2.string().max(500).nullable()
52
+ });
53
+ var UpdatePreferenceRequestSchema = MemberFoodPreferenceSchema;
54
+ var CreateProfileRequestSchema = UpdateProfileRequestSchema.merge(
55
+ UpdatePreferenceRequestSchema
56
+ );
57
+
58
+ export {
59
+ PresignUploadResponseSchema,
60
+ MemberRoleSchema,
61
+ MemberCoreSchema,
62
+ PresignProfileResponseSchema,
63
+ MemberResponseSchema,
64
+ MemberSearchQuerySchema,
65
+ MemberSerachResponseSchema,
66
+ MemberDetailSchema,
67
+ MemberFoodPreferenceSchema,
68
+ ProfileDetailResponseSchema,
69
+ UpdateProfileRequestSchema,
70
+ UpdatePreferenceRequestSchema,
71
+ CreateProfileRequestSchema
72
+ };
@@ -1,27 +1,26 @@
1
1
  import {
2
2
  RestaurantSchema
3
- } from "./chunk-NW5O4R7M.js";
3
+ } from "./chunk-GTVEQYJW.js";
4
4
  import {
5
- MemberResponseSchema
6
- } from "./chunk-MP7TEKEI.js";
5
+ ISODateStringSchema,
6
+ ISODateTimeStringSchema
7
+ } from "./chunk-HRM3FQPL.js";
7
8
  import {
9
+ MemberCoreSchema
10
+ } from "./chunk-KRVEQVRC.js";
11
+ import {
12
+ FoodCodeSchema,
13
+ FoodSchema,
8
14
  MemberIdSchema,
9
15
  RestaurantIdSchema,
10
16
  RoomIdSchema
11
- } from "./chunk-UFVPFUMI.js";
12
- import {
13
- ISODateStringSchema,
14
- ISODateTimeStringSchema
15
- } from "./chunk-HRM3FQPL.js";
17
+ } from "./chunk-H77ISYYC.js";
16
18
 
17
19
  // src/domain/room/schema/room.schema.ts
18
20
  import { z } from "zod";
19
- var MenuCodeSchema = z.string().min(1).brand();
21
+ var MenuCodeSchema = FoodCodeSchema;
20
22
  var LocationIdSchema = z.string().min(1).brand();
21
- var MenuSchema = z.object({
22
- code: MenuCodeSchema,
23
- label: z.string()
24
- });
23
+ var MenuSchema = FoodSchema.extend({});
25
24
  var LocationCandidateSchema = z.object({
26
25
  locationId: LocationIdSchema,
27
26
  placeName: z.string(),
@@ -29,7 +28,7 @@ var LocationCandidateSchema = z.object({
29
28
  lng: z.number(),
30
29
  address: z.string()
31
30
  });
32
- var ParticipantSchema = MemberResponseSchema.extend({
31
+ var ParticipantSchema = MemberCoreSchema.extend({
33
32
  ready: z.boolean()
34
33
  });
35
34
  var RecruitRoomStageSchema = z.enum([
@@ -74,7 +73,7 @@ var RoomSocketErrorSchema = z.object({
74
73
  });
75
74
  var ChatMessageResponseSchema = z.object({
76
75
  messageId: z.string(),
77
- user: MemberResponseSchema,
76
+ user: MemberCoreSchema,
78
77
  message: z.string(),
79
78
  createdAt: ISODateTimeStringSchema
80
79
  });
@@ -0,0 +1,109 @@
1
+ import {
2
+ RestaurantSchema
3
+ } from "./chunk-GTVEQYJW.js";
4
+ import {
5
+ ISODateStringSchema,
6
+ ISODateTimeStringSchema
7
+ } from "./chunk-HRM3FQPL.js";
8
+ import {
9
+ MemberCoreSchema,
10
+ PresignUploadResponseSchema
11
+ } from "./chunk-KRVEQVRC.js";
12
+ import {
13
+ ArticleIdSchema,
14
+ CommentIdSchema,
15
+ FoodSchema,
16
+ MemberIdSchema
17
+ } from "./chunk-H77ISYYC.js";
18
+
19
+ // src/domain/article/article.schema.ts
20
+ import { z as z2 } from "zod";
21
+
22
+ // src/domain/common/schema/pagination.schema.ts
23
+ import { z } from "zod";
24
+ var PageQuerySchema = z.object({
25
+ page: z.number().int().min(0).optional().default(0),
26
+ size: z.number().int().min(1).max(100).optional().default(20)
27
+ });
28
+ var PageMetaSchema = z.object({
29
+ page: z.number().int().min(0),
30
+ size: z.number().int().min(1),
31
+ totalItems: z.number().int().min(0),
32
+ totalPages: z.number().int().min(0),
33
+ hasNext: z.boolean(),
34
+ hasPrevious: z.boolean()
35
+ });
36
+ var PageResponseSchema = (item) => z.object({
37
+ items: z.array(item),
38
+ meta: PageMetaSchema
39
+ });
40
+ var SortDirectionSchema = z.enum(["asc", "desc"]);
41
+
42
+ // src/domain/article/article.schema.ts
43
+ var ArticleSortBySchema = z2.enum(["createdAt", "likeCount", "commentCount"]);
44
+ var ArticleListQuerySchema = PageQuerySchema.extend({
45
+ sortBy: ArticleSortBySchema.optional().default("createdAt"),
46
+ direction: SortDirectionSchema.optional().default("desc")
47
+ });
48
+ var PresignArticleResponseSchema = PresignUploadResponseSchema.extend({});
49
+ var FoodAnalysisResultSchema = FoodSchema.extend({
50
+ confidence: z2.number().min(0).max(1),
51
+ tsUtc: ISODateTimeStringSchema.optional()
52
+ });
53
+ var CreateArticleRequestSchema = z2.object({
54
+ imageUrl: z2.string().url(),
55
+ mealDate: ISODateStringSchema,
56
+ restaurant: RestaurantSchema,
57
+ taggedMemberIds: z2.array(MemberIdSchema).default([]),
58
+ foodAnalysis: FoodAnalysisResultSchema.optional()
59
+ });
60
+ var CreateCommentRequestSchema = z2.object({
61
+ content: z2.string().min(1).max(500),
62
+ parentCommentId: CommentIdSchema.nullish()
63
+ });
64
+ var ArticleCommentSchema = z2.object({
65
+ commentId: CommentIdSchema,
66
+ author: MemberCoreSchema,
67
+ parentCommentId: CommentIdSchema.nullable(),
68
+ content: z2.string(),
69
+ createdAt: ISODateTimeStringSchema,
70
+ updatedAt: ISODateTimeStringSchema
71
+ });
72
+ var ArticleCoreSchema = z2.object({
73
+ articleId: ArticleIdSchema,
74
+ author: MemberCoreSchema,
75
+ imageUrl: z2.string().url(),
76
+ mealDate: ISODateStringSchema,
77
+ restaurant: RestaurantSchema,
78
+ createdAt: ISODateTimeStringSchema,
79
+ updatedAt: ISODateTimeStringSchema,
80
+ expiresAt: ISODateTimeStringSchema,
81
+ taggedMembers: z2.array(MemberCoreSchema)
82
+ });
83
+ var ArticleSummaryResponseSchema = ArticleCoreSchema.extend({
84
+ likeCount: z2.number().int().min(0),
85
+ commentCount: z2.number().int().min(0),
86
+ likedByMe: z2.boolean()
87
+ });
88
+ var ArticleDetailResponseSchema = ArticleSummaryResponseSchema.extend({
89
+ comments: z2.array(ArticleCommentSchema).optional()
90
+ });
91
+ var PageArticleSummaryResponseSchema = PageResponseSchema(ArticleSummaryResponseSchema);
92
+
93
+ export {
94
+ PageQuerySchema,
95
+ PageMetaSchema,
96
+ PageResponseSchema,
97
+ SortDirectionSchema,
98
+ ArticleSortBySchema,
99
+ ArticleListQuerySchema,
100
+ PresignArticleResponseSchema,
101
+ FoodAnalysisResultSchema,
102
+ CreateArticleRequestSchema,
103
+ CreateCommentRequestSchema,
104
+ ArticleCommentSchema,
105
+ ArticleCoreSchema,
106
+ ArticleSummaryResponseSchema,
107
+ ArticleDetailResponseSchema,
108
+ PageArticleSummaryResponseSchema
109
+ };
@@ -0,0 +1,35 @@
1
+ import {
2
+ ISODateTimeStringSchema
3
+ } from "./chunk-HRM3FQPL.js";
4
+ import {
5
+ MemberCoreSchema
6
+ } from "./chunk-KRVEQVRC.js";
7
+ import {
8
+ FriendRequestIdSchema
9
+ } from "./chunk-H77ISYYC.js";
10
+
11
+ // src/domain/friend/friend.schema.ts
12
+ import { z } from "zod";
13
+ var FriendRequestStatusSchema = z.enum(["PENDING", "ACCEPTED", "REJECTED", "CANCELED"]);
14
+ var FriendListItemResponseSchema = MemberCoreSchema.extend({
15
+ friendSince: ISODateTimeStringSchema
16
+ });
17
+ var FriendBlockItemResponseSchema = MemberCoreSchema.extend({
18
+ blockedAt: ISODateTimeStringSchema
19
+ });
20
+ var FriendRequestMemberSchema = MemberCoreSchema;
21
+ var FriendRequestItemResponseSchema = z.object({
22
+ requestId: FriendRequestIdSchema,
23
+ requester: FriendRequestMemberSchema,
24
+ recipient: FriendRequestMemberSchema,
25
+ status: FriendRequestStatusSchema,
26
+ requestedAt: ISODateTimeStringSchema
27
+ });
28
+
29
+ export {
30
+ FriendRequestStatusSchema,
31
+ FriendListItemResponseSchema,
32
+ FriendBlockItemResponseSchema,
33
+ FriendRequestMemberSchema,
34
+ FriendRequestItemResponseSchema
35
+ };
@@ -0,0 +1,37 @@
1
+ import {
2
+ ISODateStringSchema
3
+ } from "./chunk-HRM3FQPL.js";
4
+ import {
5
+ MemberCoreSchema
6
+ } from "./chunk-KRVEQVRC.js";
7
+
8
+ // src/domain/meal/meal.schema.ts
9
+ import { z } from "zod";
10
+ var MealStatusResponseSchema = z.object({
11
+ hungry: z.boolean(),
12
+ label: z.string(),
13
+ updatedAt: ISODateStringSchema,
14
+ secondsToAutoOff: z.number().int().min(0)
15
+ });
16
+ var MealStatusActionSchema = z.enum(["ARTICLE_UPLOAD", "SET_MANNUALY"]);
17
+ var UpdateMealStatusRequestSchema = z.object({
18
+ action: MealStatusActionSchema.optional().default("SET_MANNUALY")
19
+ });
20
+ var MealStatusSchema = z.enum(["ALL", "HUNGRY", "NOT_HUNGRY"]);
21
+ var FriendMealQuerySchema = z.object({
22
+ status: MealStatusSchema.optional().default("ALL")
23
+ });
24
+ var FriendMealItemResponseSchema = MemberCoreSchema.extend({
25
+ hungry: z.boolean(),
26
+ label: z.string(),
27
+ updatedAt: ISODateStringSchema
28
+ });
29
+
30
+ export {
31
+ MealStatusResponseSchema,
32
+ MealStatusActionSchema,
33
+ UpdateMealStatusRequestSchema,
34
+ MealStatusSchema,
35
+ FriendMealQuerySchema,
36
+ FriendMealItemResponseSchema
37
+ };