@kimdaegyu/babmukdang-shared 1.0.7 → 1.1.0
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-2GRWCRTV.js +328 -0
- package/dist/chunk-2SJCUQNN.js +40 -0
- package/dist/chunk-34EKPNPX.js +0 -0
- package/dist/chunk-35QGRA2X.js +0 -0
- package/dist/chunk-3YMV26OY.js +0 -0
- package/dist/chunk-4DAOP35P.js +74 -0
- package/dist/chunk-6NZPEF4K.js +34 -0
- package/dist/chunk-7MGHUZXI.js +25 -0
- package/dist/chunk-BVTYAILQ.js +0 -0
- package/dist/chunk-EJKRR2MZ.js +184 -0
- package/dist/chunk-F24BT6H4.js +23 -0
- package/dist/chunk-FCE6KXNO.js +30 -0
- package/dist/chunk-HRM3FQPL.js +12 -0
- package/dist/chunk-IJMADVK5.js +27 -0
- package/dist/chunk-IYCA6KHR.js +0 -0
- package/dist/chunk-JCN37ARR.js +52 -0
- package/dist/chunk-JXYRJKRV.js +0 -0
- package/dist/chunk-LCMNVWSP.js +0 -0
- package/dist/chunk-MP7TEKEI.js +72 -0
- package/dist/chunk-NCVWB52E.js +0 -0
- package/dist/chunk-NW5O4R7M.js +37 -0
- package/dist/chunk-O6DYRCFN.js +0 -0
- package/dist/chunk-PDGMGLYH.js +0 -0
- package/dist/chunk-PFSZSKD5.js +0 -0
- package/dist/chunk-TA4BB3UC.js +0 -0
- package/dist/chunk-UFVPFUMI.js +35 -0
- package/dist/chunk-UN7KYFMV.js +0 -0
- package/dist/chunk-UXA4FHST.js +19 -0
- package/dist/chunk-WNY6POLW.js +0 -0
- package/dist/chunk-YVACD5IG.js +127 -0
- package/dist/chunk-Z2UFF3MA.js +212 -0
- package/dist/chunk-ZNAAA53X.js +45 -0
- package/dist/chunk-ZSZ3ETY7.js +32 -0
- package/dist/domain/article/index.cjs +250 -0
- package/dist/domain/article/index.d.cts +1026 -0
- package/dist/domain/article/index.d.ts +1026 -0
- package/dist/domain/article/index.js +32 -0
- package/dist/domain/auth/index.cjs +135 -0
- package/dist/domain/auth/index.d.cts +73 -0
- package/dist/domain/auth/index.d.ts +73 -0
- package/dist/domain/auth/index.js +17 -0
- package/dist/domain/challenge/index.cjs +65 -0
- package/dist/domain/challenge/index.d.cts +104 -0
- package/dist/domain/challenge/index.d.ts +104 -0
- package/dist/domain/challenge/index.js +18 -0
- package/dist/domain/common/index.cjs +769 -0
- package/dist/domain/common/index.d.cts +2576 -0
- package/dist/domain/common/index.d.ts +2576 -0
- package/dist/domain/common/index.js +107 -0
- package/dist/domain/coupon/index.cjs +74 -0
- package/dist/domain/coupon/index.d.cts +38 -0
- package/dist/domain/coupon/index.d.ts +38 -0
- package/dist/domain/coupon/index.js +14 -0
- package/dist/domain/friend/index.cjs +152 -0
- package/dist/domain/friend/index.d.cts +148 -0
- package/dist/domain/friend/index.d.ts +148 -0
- package/dist/domain/friend/index.js +25 -0
- package/dist/domain/index.cjs +997 -0
- package/dist/domain/index.d.cts +17 -0
- package/dist/domain/index.d.ts +17 -0
- package/dist/domain/index.js +334 -0
- package/dist/domain/invitation/index.cjs +104 -0
- package/dist/domain/invitation/index.d.cts +67 -0
- package/dist/domain/invitation/index.d.ts +67 -0
- package/dist/domain/invitation/index.js +17 -0
- package/dist/domain/meal/index.cjs +59 -0
- package/dist/domain/meal/index.d.cts +38 -0
- package/dist/domain/meal/index.d.ts +38 -0
- package/dist/domain/meal/index.js +15 -0
- package/dist/domain/member/index.cjs +127 -0
- package/dist/domain/member/index.d.cts +225 -0
- package/dist/domain/member/index.d.ts +225 -0
- package/dist/domain/member/index.js +30 -0
- package/dist/domain/plan/index.cjs +269 -0
- package/dist/domain/plan/index.d.cts +189 -0
- package/dist/domain/plan/index.d.ts +189 -0
- package/dist/domain/plan/index.js +19 -0
- package/dist/domain/preference/index.cjs +69 -0
- package/dist/domain/preference/index.d.cts +31 -0
- package/dist/domain/preference/index.d.ts +31 -0
- package/dist/domain/preference/index.js +12 -0
- package/dist/domain/recruit/index.cjs +138 -0
- package/dist/domain/recruit/index.d.cts +130 -0
- package/dist/domain/recruit/index.d.ts +130 -0
- package/dist/domain/recruit/index.js +19 -0
- package/dist/domain/referral/index.cjs +78 -0
- package/dist/domain/referral/index.d.cts +51 -0
- package/dist/domain/referral/index.d.ts +51 -0
- package/dist/domain/referral/index.js +14 -0
- package/dist/domain/restaurant/index.cjs +79 -0
- package/dist/domain/restaurant/index.d.cts +85 -0
- package/dist/domain/restaurant/index.d.ts +85 -0
- package/dist/domain/restaurant/index.js +11 -0
- package/dist/domain/room/index.cjs +332 -0
- package/dist/domain/room/index.d.cts +1482 -0
- package/dist/domain/room/index.d.ts +1482 -0
- package/dist/domain/room/index.js +74 -0
- package/dist/id-B-8M90Ef.d.cts +43 -0
- package/dist/id-B-8M90Ef.d.ts +43 -0
- package/dist/index-BuInbhtG.d.cts +305 -0
- package/dist/index-CKRUOupn.d.ts +305 -0
- package/dist/index.cjs +845 -21
- package/dist/index.d.cts +113 -569
- package/dist/index.d.ts +113 -569
- package/dist/index.js +50 -30
- package/package.json +50 -39
|
@@ -0,0 +1,769 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/domain/common/index.ts
|
|
21
|
+
var common_exports = {};
|
|
22
|
+
__export(common_exports, {
|
|
23
|
+
ApiFailureSchema: () => ApiFailureSchema,
|
|
24
|
+
ApiResponseSchema: () => ApiResponseSchema,
|
|
25
|
+
ApiSuccessSchema: () => ApiSuccessSchema,
|
|
26
|
+
ArticleIdSchema: () => ArticleIdSchema,
|
|
27
|
+
CommentIdSchema: () => CommentIdSchema,
|
|
28
|
+
CouponIdSchema: () => CouponIdSchema,
|
|
29
|
+
CreatedEntityIdResponseSchema: () => CreatedEntityIdResponseSchema,
|
|
30
|
+
CreatedIdResponseSchema: () => CreatedIdResponseSchema,
|
|
31
|
+
FriendRequestIdSchema: () => FriendRequestIdSchema,
|
|
32
|
+
ISODateStringSchema: () => ISODateStringSchema,
|
|
33
|
+
ISODateTimeStringSchema: () => ISODateTimeStringSchema,
|
|
34
|
+
InvitationIdSchema: () => InvitationIdSchema,
|
|
35
|
+
MemberIdSchema: () => MemberIdSchema,
|
|
36
|
+
NoBodySchema: () => NoBodySchema,
|
|
37
|
+
NoContentSchema: () => NoContentSchema,
|
|
38
|
+
NoParamsSchema: () => NoParamsSchema,
|
|
39
|
+
NoQuerySchema: () => NoQuerySchema,
|
|
40
|
+
NonEmptyStringIdSchema: () => NonEmptyStringIdSchema,
|
|
41
|
+
PageRequestSchema: () => PageRequestSchema,
|
|
42
|
+
PageResponseSchema: () => PageResponseSchema,
|
|
43
|
+
PageableObjectSchema: () => PageableObjectSchema,
|
|
44
|
+
PlanIdSchema: () => PlanIdSchema,
|
|
45
|
+
PositiveIntIdSchema: () => PositiveIntIdSchema,
|
|
46
|
+
RecruitIdSchema: () => RecruitIdSchema,
|
|
47
|
+
ReferralCodeSchema: () => ReferralCodeSchema,
|
|
48
|
+
RestaurantIdSchema: () => RestaurantIdSchema,
|
|
49
|
+
RoomIdSchema: () => RoomIdSchema,
|
|
50
|
+
SortObjectSchema: () => SortObjectSchema,
|
|
51
|
+
SubscriptionIdSchema: () => SubscriptionIdSchema,
|
|
52
|
+
TimeHHmmStringSchema: () => TimeHHmmStringSchema,
|
|
53
|
+
UserIdSchema: () => UserIdSchema,
|
|
54
|
+
apiContract: () => apiContract,
|
|
55
|
+
endpoint: () => endpoint,
|
|
56
|
+
makeApiResponseSchema: () => makeApiResponseSchema,
|
|
57
|
+
makeApiSuccessSchema: () => makeApiSuccessSchema,
|
|
58
|
+
toArticleId: () => toArticleId,
|
|
59
|
+
toInvitationId: () => toInvitationId,
|
|
60
|
+
toMemberId: () => toMemberId,
|
|
61
|
+
toRecruitId: () => toRecruitId,
|
|
62
|
+
toRestaurantId: () => toRestaurantId,
|
|
63
|
+
toRoomId: () => toRoomId
|
|
64
|
+
});
|
|
65
|
+
module.exports = __toCommonJS(common_exports);
|
|
66
|
+
|
|
67
|
+
// src/domain/common/contracts/api.ts
|
|
68
|
+
var import_zod20 = require("zod");
|
|
69
|
+
|
|
70
|
+
// src/domain/article/schema/article.schema.ts
|
|
71
|
+
var import_zod6 = require("zod");
|
|
72
|
+
|
|
73
|
+
// src/domain/common/schema/date.schema.ts
|
|
74
|
+
var import_zod = require("zod");
|
|
75
|
+
var isoDateRegex = /^\d{4}-\d{2}-\d{2}$/;
|
|
76
|
+
var ISODateStringSchema = import_zod.z.string().regex(isoDateRegex, "Expected ISO date string in YYYY-MM-DD format");
|
|
77
|
+
var ISODateTimeStringSchema = import_zod.z.string().datetime({ offset: true, message: "Expected ISO datetime string" });
|
|
78
|
+
var TimeHHmmStringSchema = import_zod.z.string().regex(/^\d{2}:\d{2}$/, "Expected time string in HH:mm format");
|
|
79
|
+
|
|
80
|
+
// src/domain/common/schema/id.schema.ts
|
|
81
|
+
var import_zod2 = require("zod");
|
|
82
|
+
var PositiveIntIdSchema = import_zod2.z.number().int().positive();
|
|
83
|
+
var NonEmptyStringIdSchema = import_zod2.z.string().min(1);
|
|
84
|
+
var MemberIdSchema = PositiveIntIdSchema.brand();
|
|
85
|
+
var UserIdSchema = MemberIdSchema;
|
|
86
|
+
var ArticleIdSchema = PositiveIntIdSchema.brand();
|
|
87
|
+
var CommentIdSchema = PositiveIntIdSchema.brand();
|
|
88
|
+
var RecruitIdSchema = PositiveIntIdSchema.brand();
|
|
89
|
+
var PlanIdSchema = PositiveIntIdSchema.brand();
|
|
90
|
+
var InvitationIdSchema = PositiveIntIdSchema.brand();
|
|
91
|
+
var RoomIdSchema = NonEmptyStringIdSchema.brand();
|
|
92
|
+
var RestaurantIdSchema = NonEmptyStringIdSchema.brand();
|
|
93
|
+
var CouponIdSchema = PositiveIntIdSchema.brand();
|
|
94
|
+
var SubscriptionIdSchema = PositiveIntIdSchema.brand();
|
|
95
|
+
var FriendRequestIdSchema = PositiveIntIdSchema.brand();
|
|
96
|
+
var ReferralCodeSchema = import_zod2.z.string().min(4).max(64).brand();
|
|
97
|
+
|
|
98
|
+
// src/domain/common/schema/pagination.schema.ts
|
|
99
|
+
var import_zod3 = require("zod");
|
|
100
|
+
var PageRequestSchema = import_zod3.z.object({
|
|
101
|
+
page: import_zod3.z.number().int().min(0).default(0),
|
|
102
|
+
size: import_zod3.z.number().int().min(1).max(100).default(20)
|
|
103
|
+
});
|
|
104
|
+
var SortObjectSchema = import_zod3.z.object({
|
|
105
|
+
empty: import_zod3.z.boolean(),
|
|
106
|
+
sorted: import_zod3.z.boolean(),
|
|
107
|
+
unsorted: import_zod3.z.boolean()
|
|
108
|
+
});
|
|
109
|
+
var PageableObjectSchema = import_zod3.z.object({
|
|
110
|
+
offset: import_zod3.z.number().int().min(0),
|
|
111
|
+
sort: SortObjectSchema,
|
|
112
|
+
paged: import_zod3.z.boolean(),
|
|
113
|
+
pageNumber: import_zod3.z.number().int().min(0),
|
|
114
|
+
pageSize: import_zod3.z.number().int().min(1),
|
|
115
|
+
unpaged: import_zod3.z.boolean()
|
|
116
|
+
});
|
|
117
|
+
var PageResponseSchema = (item) => import_zod3.z.object({
|
|
118
|
+
totalElements: import_zod3.z.number().int().min(0),
|
|
119
|
+
totalPages: import_zod3.z.number().int().min(0),
|
|
120
|
+
first: import_zod3.z.boolean(),
|
|
121
|
+
size: import_zod3.z.number().int().min(0),
|
|
122
|
+
content: import_zod3.z.array(item),
|
|
123
|
+
number: import_zod3.z.number().int().min(0),
|
|
124
|
+
sort: SortObjectSchema,
|
|
125
|
+
numberOfElements: import_zod3.z.number().int().min(0),
|
|
126
|
+
pageable: PageableObjectSchema,
|
|
127
|
+
last: import_zod3.z.boolean(),
|
|
128
|
+
empty: import_zod3.z.boolean()
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// src/domain/member/schema/member.schema.ts
|
|
132
|
+
var import_zod4 = require("zod");
|
|
133
|
+
var MemberRoleSchema = import_zod4.z.enum(["USER", "ADMIN"]);
|
|
134
|
+
var MemberCoreSchema = import_zod4.z.object({
|
|
135
|
+
memberId: MemberIdSchema,
|
|
136
|
+
username: import_zod4.z.string().min(1).max(50),
|
|
137
|
+
profileImageUrl: import_zod4.z.string().url().nullable()
|
|
138
|
+
});
|
|
139
|
+
var MemberResponseSchema = MemberCoreSchema.pick({
|
|
140
|
+
memberId: true,
|
|
141
|
+
username: true,
|
|
142
|
+
profileImageUrl: true
|
|
143
|
+
});
|
|
144
|
+
var MemberSummaryResponseSchema = MemberCoreSchema.extend({
|
|
145
|
+
friends: import_zod4.z.number().int().min(0).default(0),
|
|
146
|
+
completedPlans: import_zod4.z.number().int().min(0).default(0),
|
|
147
|
+
uncompletedPlans: import_zod4.z.number().int().min(0).default(0)
|
|
148
|
+
});
|
|
149
|
+
var AuthPrincipalSchema = import_zod4.z.object({
|
|
150
|
+
memberId: MemberIdSchema,
|
|
151
|
+
role: MemberRoleSchema
|
|
152
|
+
});
|
|
153
|
+
var ProfilePreferenceItemSchema = import_zod4.z.object({
|
|
154
|
+
code: import_zod4.z.string(),
|
|
155
|
+
label: import_zod4.z.string()
|
|
156
|
+
});
|
|
157
|
+
var ProfileDetailResponseSchema = MemberCoreSchema.extend({
|
|
158
|
+
bio: import_zod4.z.string().nullable(),
|
|
159
|
+
planCount: import_zod4.z.number().int().min(0),
|
|
160
|
+
likes: import_zod4.z.array(ProfilePreferenceItemSchema),
|
|
161
|
+
dislikes: import_zod4.z.array(ProfilePreferenceItemSchema),
|
|
162
|
+
allergies: import_zod4.z.array(ProfilePreferenceItemSchema)
|
|
163
|
+
});
|
|
164
|
+
var UpdateProfileRequestSchema = import_zod4.z.object({
|
|
165
|
+
username: import_zod4.z.string().min(1).max(50),
|
|
166
|
+
profileImageUrl: import_zod4.z.string().url().nullable(),
|
|
167
|
+
bio: import_zod4.z.string().max(500).nullable()
|
|
168
|
+
});
|
|
169
|
+
var OnboardingPreferenceRequestSchema = import_zod4.z.object({
|
|
170
|
+
likedCodes: import_zod4.z.array(import_zod4.z.string()),
|
|
171
|
+
dislikedCodes: import_zod4.z.array(import_zod4.z.string()),
|
|
172
|
+
allergyCodes: import_zod4.z.array(import_zod4.z.string())
|
|
173
|
+
});
|
|
174
|
+
var OnboardingRequestSchema = UpdateProfileRequestSchema.merge(
|
|
175
|
+
OnboardingPreferenceRequestSchema
|
|
176
|
+
);
|
|
177
|
+
var PreferenceMetaResponseSchema = import_zod4.z.object({
|
|
178
|
+
onboardedAt: ISODateTimeStringSchema.nullable(),
|
|
179
|
+
lastUpdatedAt: ISODateTimeStringSchema.nullable(),
|
|
180
|
+
revision: import_zod4.z.number().int().min(0)
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// src/domain/restaurant/schema/restaurant.schema.ts
|
|
184
|
+
var import_zod5 = require("zod");
|
|
185
|
+
var RestaurantSchema = import_zod5.z.object({
|
|
186
|
+
restaurantId: RestaurantIdSchema,
|
|
187
|
+
placeName: import_zod5.z.string(),
|
|
188
|
+
categoryName: import_zod5.z.string(),
|
|
189
|
+
categoryGroupName: import_zod5.z.string(),
|
|
190
|
+
distance: import_zod5.z.string().optional(),
|
|
191
|
+
roadAddressName: import_zod5.z.string(),
|
|
192
|
+
addressName: import_zod5.z.string(),
|
|
193
|
+
phone: import_zod5.z.string().nullable(),
|
|
194
|
+
placeUrl: import_zod5.z.string().url().nullable(),
|
|
195
|
+
lat: import_zod5.z.number(),
|
|
196
|
+
lng: import_zod5.z.number()
|
|
197
|
+
});
|
|
198
|
+
var KakaoPlaceRawSchema = import_zod5.z.object({
|
|
199
|
+
id: RestaurantIdSchema,
|
|
200
|
+
place_name: import_zod5.z.string(),
|
|
201
|
+
category_name: import_zod5.z.string(),
|
|
202
|
+
category_group_name: import_zod5.z.string(),
|
|
203
|
+
distance: import_zod5.z.string(),
|
|
204
|
+
road_address_name: import_zod5.z.string(),
|
|
205
|
+
address_name: import_zod5.z.string(),
|
|
206
|
+
phone: import_zod5.z.string(),
|
|
207
|
+
place_url: import_zod5.z.string().url().optional(),
|
|
208
|
+
lat: import_zod5.z.number(),
|
|
209
|
+
lng: import_zod5.z.number()
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
// src/domain/article/schema/article.schema.ts
|
|
213
|
+
var FoodAnalysisResultSchema = import_zod6.z.object({
|
|
214
|
+
code: import_zod6.z.string(),
|
|
215
|
+
label: import_zod6.z.string(),
|
|
216
|
+
confidence: import_zod6.z.number().min(0).max(1),
|
|
217
|
+
tsUtc: ISODateTimeStringSchema.optional()
|
|
218
|
+
});
|
|
219
|
+
var ArticlePostRequestSchema = import_zod6.z.object({
|
|
220
|
+
imageUrl: import_zod6.z.string().url(),
|
|
221
|
+
mealDate: ISODateStringSchema,
|
|
222
|
+
restaurant: RestaurantSchema,
|
|
223
|
+
taggedMemberIds: import_zod6.z.array(MemberIdSchema).default([]),
|
|
224
|
+
foodAnalysis: FoodAnalysisResultSchema.optional()
|
|
225
|
+
});
|
|
226
|
+
var CreateArticleResponseSchema = import_zod6.z.object({
|
|
227
|
+
articleId: ArticleIdSchema
|
|
228
|
+
});
|
|
229
|
+
var CommentPostRequestSchema = import_zod6.z.object({
|
|
230
|
+
content: import_zod6.z.string().min(1).max(500),
|
|
231
|
+
parentCommentId: CommentIdSchema.nullish()
|
|
232
|
+
});
|
|
233
|
+
var CreateCommentResponseSchema = import_zod6.z.object({
|
|
234
|
+
commentId: CommentIdSchema
|
|
235
|
+
});
|
|
236
|
+
var CommentResponseSchema = import_zod6.z.object({
|
|
237
|
+
commentId: CommentIdSchema,
|
|
238
|
+
author: MemberResponseSchema,
|
|
239
|
+
parentCommentId: CommentIdSchema.nullable(),
|
|
240
|
+
content: import_zod6.z.string(),
|
|
241
|
+
createdAt: ISODateTimeStringSchema,
|
|
242
|
+
updatedAt: ISODateTimeStringSchema
|
|
243
|
+
});
|
|
244
|
+
var ArticleCoreSchema = import_zod6.z.object({
|
|
245
|
+
articleId: ArticleIdSchema,
|
|
246
|
+
author: MemberResponseSchema,
|
|
247
|
+
imageUrl: import_zod6.z.string().url(),
|
|
248
|
+
mealDate: ISODateStringSchema,
|
|
249
|
+
restaurant: RestaurantSchema,
|
|
250
|
+
createdAt: ISODateTimeStringSchema,
|
|
251
|
+
updatedAt: ISODateTimeStringSchema,
|
|
252
|
+
expiresAt: ISODateTimeStringSchema,
|
|
253
|
+
taggedMembers: import_zod6.z.array(MemberResponseSchema)
|
|
254
|
+
});
|
|
255
|
+
var ArticleSummaryResponseSchema = ArticleCoreSchema.extend({
|
|
256
|
+
likeCount: import_zod6.z.number().int().min(0),
|
|
257
|
+
commentCount: import_zod6.z.number().int().min(0),
|
|
258
|
+
likedByMe: import_zod6.z.boolean()
|
|
259
|
+
});
|
|
260
|
+
var ArticleDetailResponseSchema = ArticleSummaryResponseSchema.extend({
|
|
261
|
+
comments: import_zod6.z.array(CommentResponseSchema).optional()
|
|
262
|
+
});
|
|
263
|
+
var PageArticleSummaryResponseSchema = PageResponseSchema(
|
|
264
|
+
ArticleSummaryResponseSchema
|
|
265
|
+
);
|
|
266
|
+
var PresignUploadResponseSchema = import_zod6.z.object({
|
|
267
|
+
key: import_zod6.z.string(),
|
|
268
|
+
putUrl: import_zod6.z.string().url(),
|
|
269
|
+
cdnUrl: import_zod6.z.string().url()
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// src/domain/auth/schema/auth.schema.ts
|
|
273
|
+
var import_zod7 = require("zod");
|
|
274
|
+
var TokenResponseSchema = import_zod7.z.object({
|
|
275
|
+
accessToken: import_zod7.z.string().min(1),
|
|
276
|
+
accessTokenMaxAge: import_zod7.z.number().int().positive()
|
|
277
|
+
});
|
|
278
|
+
var LoginRequestSchema = import_zod7.z.object({
|
|
279
|
+
email: import_zod7.z.string().email(),
|
|
280
|
+
password: import_zod7.z.string().min(1)
|
|
281
|
+
});
|
|
282
|
+
var SignupRequestSchema = import_zod7.z.object({
|
|
283
|
+
email: import_zod7.z.string().email(),
|
|
284
|
+
password: import_zod7.z.string().min(8),
|
|
285
|
+
username: import_zod7.z.string().min(1).max(50),
|
|
286
|
+
profileImageUrl: import_zod7.z.string().url().nullable().optional()
|
|
287
|
+
});
|
|
288
|
+
var SignupResponseSchema = import_zod7.z.object({
|
|
289
|
+
member: MemberResponseSchema
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
// src/domain/challenge/schema/challenge.schema.ts
|
|
293
|
+
var import_zod8 = require("zod");
|
|
294
|
+
var RewardTypeSchema = import_zod8.z.enum(["WEEK", "MONTH"]);
|
|
295
|
+
var WeekProgressSchema = import_zod8.z.object({
|
|
296
|
+
days: import_zod8.z.array(import_zod8.z.boolean()),
|
|
297
|
+
completed: import_zod8.z.number().int().min(0),
|
|
298
|
+
goal: import_zod8.z.number().int().positive()
|
|
299
|
+
});
|
|
300
|
+
var MonthProgressSchema = import_zod8.z.object({
|
|
301
|
+
count: import_zod8.z.number().int().min(0),
|
|
302
|
+
goal: import_zod8.z.number().int().positive()
|
|
303
|
+
});
|
|
304
|
+
var ChallengeStatusResponseSchema = import_zod8.z.object({
|
|
305
|
+
week: WeekProgressSchema,
|
|
306
|
+
month: MonthProgressSchema,
|
|
307
|
+
weekRewardAvailable: import_zod8.z.boolean(),
|
|
308
|
+
monthRewardAvailable: import_zod8.z.boolean()
|
|
309
|
+
});
|
|
310
|
+
var ClaimChallengeRewardRequestSchema = import_zod8.z.object({
|
|
311
|
+
type: RewardTypeSchema
|
|
312
|
+
});
|
|
313
|
+
var ClaimChallengeRewardResponseSchema = import_zod8.z.object({
|
|
314
|
+
rewardType: RewardTypeSchema,
|
|
315
|
+
claimed: import_zod8.z.boolean()
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
// src/domain/coupon/schema/coupon.schema.ts
|
|
319
|
+
var import_zod9 = require("zod");
|
|
320
|
+
var CouponTypeSchema = import_zod9.z.enum(["DISCOUNT", "SERVICE"]);
|
|
321
|
+
var CouponStatusSchema = import_zod9.z.enum(["UNUSED", "USED"]);
|
|
322
|
+
var CouponResponseSchema = import_zod9.z.object({
|
|
323
|
+
couponId: CouponIdSchema,
|
|
324
|
+
title: import_zod9.z.string(),
|
|
325
|
+
shopName: import_zod9.z.string(),
|
|
326
|
+
type: CouponTypeSchema,
|
|
327
|
+
condition: import_zod9.z.string(),
|
|
328
|
+
expiresAt: ISODateStringSchema,
|
|
329
|
+
used: import_zod9.z.boolean(),
|
|
330
|
+
thumbnailUrl: import_zod9.z.string().url()
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
// src/domain/common/schema/envelope.schema.ts
|
|
334
|
+
var import_zod10 = require("zod");
|
|
335
|
+
var NoContentSchema = import_zod10.z.null();
|
|
336
|
+
var ApiSuccessSchema = (data) => import_zod10.z.object({
|
|
337
|
+
success: import_zod10.z.literal(true),
|
|
338
|
+
code: import_zod10.z.number().int(),
|
|
339
|
+
message: import_zod10.z.string(),
|
|
340
|
+
data
|
|
341
|
+
});
|
|
342
|
+
var ApiFailureSchema = import_zod10.z.object({
|
|
343
|
+
success: import_zod10.z.literal(false),
|
|
344
|
+
status: import_zod10.z.number().int(),
|
|
345
|
+
code: import_zod10.z.string(),
|
|
346
|
+
message: import_zod10.z.string()
|
|
347
|
+
});
|
|
348
|
+
var ApiResponseSchema = (data) => import_zod10.z.union([ApiSuccessSchema(data), ApiFailureSchema]);
|
|
349
|
+
var CreatedIdResponseSchema = import_zod10.z.object({
|
|
350
|
+
id: import_zod10.z.number().int().positive()
|
|
351
|
+
});
|
|
352
|
+
var CreatedEntityIdResponseSchema = import_zod10.z.object({
|
|
353
|
+
entity: import_zod10.z.enum([
|
|
354
|
+
"article",
|
|
355
|
+
"comment",
|
|
356
|
+
"recruit",
|
|
357
|
+
"invitation",
|
|
358
|
+
"subscription",
|
|
359
|
+
"coupon",
|
|
360
|
+
"plan"
|
|
361
|
+
]),
|
|
362
|
+
id: import_zod10.z.number().int().positive()
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
// src/domain/friend/schema/friend.schema.ts
|
|
366
|
+
var import_zod11 = require("zod");
|
|
367
|
+
var FriendMealFilterSchema = import_zod11.z.enum(["ALL", "HUNGRY", "NOT_HUNGRY"]);
|
|
368
|
+
var FriendRequestStatusSchema = import_zod11.z.enum([
|
|
369
|
+
"PENDING",
|
|
370
|
+
"ACCEPTED",
|
|
371
|
+
"REJECTED",
|
|
372
|
+
"CANCELED"
|
|
373
|
+
]);
|
|
374
|
+
var FriendMealItemResponseSchema = MemberResponseSchema.extend({
|
|
375
|
+
hungry: import_zod11.z.boolean(),
|
|
376
|
+
label: import_zod11.z.string()
|
|
377
|
+
});
|
|
378
|
+
var FriendListItemResponseSchema = MemberResponseSchema.extend({
|
|
379
|
+
friendSince: ISODateTimeStringSchema
|
|
380
|
+
});
|
|
381
|
+
var FriendBlockItemResponseSchema = MemberResponseSchema.extend({
|
|
382
|
+
blockedAt: ISODateTimeStringSchema
|
|
383
|
+
});
|
|
384
|
+
var FriendRequestMemberSchema = MemberResponseSchema;
|
|
385
|
+
var FriendRequestItemResponseSchema = import_zod11.z.object({
|
|
386
|
+
requestId: FriendRequestIdSchema,
|
|
387
|
+
requester: FriendRequestMemberSchema,
|
|
388
|
+
recipient: FriendRequestMemberSchema,
|
|
389
|
+
status: FriendRequestStatusSchema,
|
|
390
|
+
requestedAt: ISODateTimeStringSchema
|
|
391
|
+
});
|
|
392
|
+
var FriendActionRequestSchema = import_zod11.z.object({
|
|
393
|
+
memberId: MemberIdSchema
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
// src/domain/invitation/schema/invitation.schema.ts
|
|
397
|
+
var import_zod12 = require("zod");
|
|
398
|
+
var InvitationPostRequestSchema = import_zod12.z.object({
|
|
399
|
+
inviteeId: MemberIdSchema,
|
|
400
|
+
message: import_zod12.z.string().min(1).max(500)
|
|
401
|
+
});
|
|
402
|
+
var InvitationListItemResponseSchema = import_zod12.z.object({
|
|
403
|
+
invitationId: InvitationIdSchema,
|
|
404
|
+
inviterName: import_zod12.z.string(),
|
|
405
|
+
inviterProfileImageUrl: import_zod12.z.string().url().nullable().optional()
|
|
406
|
+
});
|
|
407
|
+
var SendInvitationResponseSchema = import_zod12.z.object({
|
|
408
|
+
invitationId: InvitationIdSchema
|
|
409
|
+
});
|
|
410
|
+
var AcceptInvitationResponseSchema = import_zod12.z.object({
|
|
411
|
+
invitationId: InvitationIdSchema,
|
|
412
|
+
room: import_zod12.z.object({
|
|
413
|
+
type: import_zod12.z.literal("invitation"),
|
|
414
|
+
roomId: RoomIdSchema
|
|
415
|
+
})
|
|
416
|
+
});
|
|
417
|
+
var RejectInvitationResponseSchema = NoContentSchema;
|
|
418
|
+
|
|
419
|
+
// src/domain/meal/schema/meal.schema.ts
|
|
420
|
+
var import_zod13 = require("zod");
|
|
421
|
+
var MealStatusSchema = import_zod13.z.enum(["FED", "FASTING"]);
|
|
422
|
+
var MealStatusActionSchema = import_zod13.z.enum(["ATE_NOW", "SET_OFF"]);
|
|
423
|
+
var UpdateMealStatusRequestSchema = import_zod13.z.object({
|
|
424
|
+
action: MealStatusActionSchema
|
|
425
|
+
});
|
|
426
|
+
var MealStatusResponseSchema = import_zod13.z.object({
|
|
427
|
+
status: MealStatusSchema,
|
|
428
|
+
lastMealAt: ISODateTimeStringSchema.nullable(),
|
|
429
|
+
fastingMinutes: import_zod13.z.number().int().min(0),
|
|
430
|
+
fastingHours: import_zod13.z.number().min(0),
|
|
431
|
+
secondsToAutoOff: import_zod13.z.number().int().min(0)
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
// src/domain/plan/schema/plan.schema.ts
|
|
435
|
+
var import_zod15 = require("zod");
|
|
436
|
+
|
|
437
|
+
// src/domain/room/schema/room.schema.ts
|
|
438
|
+
var import_zod14 = require("zod");
|
|
439
|
+
var MenuCodeSchema = import_zod14.z.string().min(1).brand();
|
|
440
|
+
var LocationIdSchema = import_zod14.z.string().min(1).brand();
|
|
441
|
+
var MenuSchema = import_zod14.z.object({
|
|
442
|
+
code: MenuCodeSchema,
|
|
443
|
+
label: import_zod14.z.string()
|
|
444
|
+
});
|
|
445
|
+
var LocationCandidateSchema = import_zod14.z.object({
|
|
446
|
+
locationId: LocationIdSchema,
|
|
447
|
+
placeName: import_zod14.z.string(),
|
|
448
|
+
lat: import_zod14.z.number(),
|
|
449
|
+
lng: import_zod14.z.number(),
|
|
450
|
+
address: import_zod14.z.string()
|
|
451
|
+
});
|
|
452
|
+
var ParticipantSchema = MemberResponseSchema.extend({
|
|
453
|
+
ready: import_zod14.z.boolean()
|
|
454
|
+
});
|
|
455
|
+
var RecruitRoomStageSchema = import_zod14.z.enum([
|
|
456
|
+
"waiting",
|
|
457
|
+
"location",
|
|
458
|
+
"location-vote",
|
|
459
|
+
"exclude-menu",
|
|
460
|
+
"menu",
|
|
461
|
+
"restaurant",
|
|
462
|
+
"finish"
|
|
463
|
+
]);
|
|
464
|
+
var InvitationRoomStageSchema = import_zod14.z.enum([
|
|
465
|
+
"waiting",
|
|
466
|
+
"date",
|
|
467
|
+
"time",
|
|
468
|
+
"location",
|
|
469
|
+
"location-vote",
|
|
470
|
+
"exclude-menu",
|
|
471
|
+
"menu",
|
|
472
|
+
"restaurant",
|
|
473
|
+
"finish"
|
|
474
|
+
]);
|
|
475
|
+
var ReadyStateRequestSchema = import_zod14.z.object({
|
|
476
|
+
isReady: import_zod14.z.boolean()
|
|
477
|
+
});
|
|
478
|
+
var ChatMessageRequestSchema = import_zod14.z.object({
|
|
479
|
+
message: import_zod14.z.string().min(1).max(500)
|
|
480
|
+
});
|
|
481
|
+
var VoteLocationRequestSchema = import_zod14.z.object({ locationId: LocationIdSchema });
|
|
482
|
+
var ExcludeMenuRequestSchema = import_zod14.z.object({ menu: MenuSchema });
|
|
483
|
+
var PickMenuRequestSchema = import_zod14.z.object({ menuCode: MenuCodeSchema });
|
|
484
|
+
var PickRestaurantRequestSchema = import_zod14.z.object({ restaurantId: RestaurantIdSchema });
|
|
485
|
+
var PickTimesRequestSchema = import_zod14.z.object({ times: import_zod14.z.array(import_zod14.z.string().min(1)).min(1) });
|
|
486
|
+
var PickDateRequestSchema = import_zod14.z.object({ dates: import_zod14.z.array(ISODateStringSchema).min(1) });
|
|
487
|
+
var RoomAssignedResponseSchema = import_zod14.z.object({
|
|
488
|
+
roomId: RoomIdSchema
|
|
489
|
+
});
|
|
490
|
+
var RoomSocketErrorSchema = import_zod14.z.object({
|
|
491
|
+
code: import_zod14.z.string(),
|
|
492
|
+
message: import_zod14.z.string()
|
|
493
|
+
});
|
|
494
|
+
var ChatMessageResponseSchema = import_zod14.z.object({
|
|
495
|
+
messageId: import_zod14.z.string(),
|
|
496
|
+
user: MemberResponseSchema,
|
|
497
|
+
message: import_zod14.z.string(),
|
|
498
|
+
createdAt: ISODateTimeStringSchema
|
|
499
|
+
});
|
|
500
|
+
var ReadyStateChangedSchema = import_zod14.z.object({
|
|
501
|
+
readyCount: import_zod14.z.number().int().min(0),
|
|
502
|
+
participantCount: import_zod14.z.number().int().min(0)
|
|
503
|
+
});
|
|
504
|
+
var FinalStateSchema = import_zod14.z.object({
|
|
505
|
+
location: LocationCandidateSchema.optional(),
|
|
506
|
+
excludeMenu: import_zod14.z.array(MenuSchema).optional(),
|
|
507
|
+
menu: MenuSchema.optional(),
|
|
508
|
+
restaurant: RestaurantSchema.optional(),
|
|
509
|
+
time: import_zod14.z.string().optional(),
|
|
510
|
+
date: ISODateStringSchema.optional()
|
|
511
|
+
});
|
|
512
|
+
var RoomInitialStateSchema = import_zod14.z.object({
|
|
513
|
+
participants: import_zod14.z.array(ParticipantSchema),
|
|
514
|
+
chat: import_zod14.z.array(ChatMessageResponseSchema),
|
|
515
|
+
final: FinalStateSchema
|
|
516
|
+
});
|
|
517
|
+
var PhaseDataBroadcastSchema = import_zod14.z.object({
|
|
518
|
+
phase: import_zod14.z.union([RecruitRoomStageSchema, InvitationRoomStageSchema]),
|
|
519
|
+
data: import_zod14.z.unknown()
|
|
520
|
+
});
|
|
521
|
+
var TimePicksUpdateResponseSchema = import_zod14.z.array(
|
|
522
|
+
import_zod14.z.object({ memberId: MemberIdSchema, times: import_zod14.z.array(import_zod14.z.string()) })
|
|
523
|
+
);
|
|
524
|
+
var DatePicksUpdateResponseSchema = import_zod14.z.array(
|
|
525
|
+
import_zod14.z.object({ memberId: MemberIdSchema, dates: import_zod14.z.array(ISODateStringSchema) })
|
|
526
|
+
);
|
|
527
|
+
var LocationCandidateAddUpdateResponseSchema = import_zod14.z.array(
|
|
528
|
+
LocationCandidateSchema.extend({ authorMemberId: MemberIdSchema })
|
|
529
|
+
);
|
|
530
|
+
var LocationCandidateVoteUpdateResponseSchema = import_zod14.z.array(
|
|
531
|
+
import_zod14.z.object({ locationId: LocationIdSchema, votes: import_zod14.z.array(MemberIdSchema) })
|
|
532
|
+
);
|
|
533
|
+
var ExcludeMenuUpdateResponseSchema = import_zod14.z.array(
|
|
534
|
+
import_zod14.z.object({ memberId: MemberIdSchema, exclusions: import_zod14.z.array(MenuSchema) })
|
|
535
|
+
);
|
|
536
|
+
var MenuPickUpdateResponseSchema = import_zod14.z.array(
|
|
537
|
+
import_zod14.z.object({ menuCode: MenuCodeSchema, selectedMembers: import_zod14.z.array(MemberIdSchema) })
|
|
538
|
+
);
|
|
539
|
+
var RestaurantPickUpdateResponseSchema = import_zod14.z.array(
|
|
540
|
+
import_zod14.z.object({ restaurantId: RestaurantIdSchema, selectedMembers: import_zod14.z.array(MemberIdSchema) })
|
|
541
|
+
);
|
|
542
|
+
|
|
543
|
+
// src/domain/plan/schema/plan.schema.ts
|
|
544
|
+
var PlanStatusSchema = import_zod15.z.enum(["PLANNING", "COMPLETED"]);
|
|
545
|
+
var PlanTypeSchema = import_zod15.z.enum(["RECRUIT", "INVITATION"]);
|
|
546
|
+
var CreatePlanRequestSchema = import_zod15.z.object({
|
|
547
|
+
meetingDate: ISODateStringSchema,
|
|
548
|
+
meetingTime: TimeHHmmStringSchema
|
|
549
|
+
});
|
|
550
|
+
var PlanResponseSchema = import_zod15.z.object({
|
|
551
|
+
planId: PlanIdSchema,
|
|
552
|
+
meetingAt: ISODateTimeStringSchema,
|
|
553
|
+
location: LocationCandidateSchema.nullable(),
|
|
554
|
+
restaurant: RestaurantSchema.nullable(),
|
|
555
|
+
author: MemberResponseSchema.nullable(),
|
|
556
|
+
participants: import_zod15.z.array(MemberResponseSchema),
|
|
557
|
+
status: PlanStatusSchema,
|
|
558
|
+
type: PlanTypeSchema,
|
|
559
|
+
createdAt: ISODateTimeStringSchema,
|
|
560
|
+
updatedAt: ISODateTimeStringSchema
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
// src/domain/preference/schema/preference.schema.ts
|
|
564
|
+
var import_zod16 = require("zod");
|
|
565
|
+
var FoodPreferenceTypeSchema = import_zod16.z.enum(["LIKE", "DISLIKE", "ALLERGY"]);
|
|
566
|
+
var FoodPreferenceResponseSchema = import_zod16.z.object({
|
|
567
|
+
id: import_zod16.z.number().int().positive(),
|
|
568
|
+
memberId: MemberIdSchema,
|
|
569
|
+
foodCode: import_zod16.z.string(),
|
|
570
|
+
type: FoodPreferenceTypeSchema,
|
|
571
|
+
createdAt: ISODateTimeStringSchema,
|
|
572
|
+
updatedAt: ISODateTimeStringSchema
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
// src/domain/recruit/schema/recruit.schema.ts
|
|
576
|
+
var import_zod17 = require("zod");
|
|
577
|
+
var RecruitStatusSchema = import_zod17.z.enum(["OPEN", "CLOSED", "EXPIRED"]);
|
|
578
|
+
var RecruitRequestSchema = import_zod17.z.object({
|
|
579
|
+
targetCount: import_zod17.z.number().int().min(2),
|
|
580
|
+
meetingAt: ISODateTimeStringSchema,
|
|
581
|
+
location: import_zod17.z.string().min(1),
|
|
582
|
+
message: import_zod17.z.string().max(500)
|
|
583
|
+
});
|
|
584
|
+
var RecruitParticipantSchema = MemberResponseSchema.extend({});
|
|
585
|
+
var RecruitResponseSchema = RecruitRequestSchema.extend({
|
|
586
|
+
recruitId: RecruitIdSchema,
|
|
587
|
+
status: RecruitStatusSchema,
|
|
588
|
+
createdAt: ISODateTimeStringSchema,
|
|
589
|
+
expiredAt: ISODateTimeStringSchema,
|
|
590
|
+
updatedAt: ISODateTimeStringSchema,
|
|
591
|
+
author: MemberResponseSchema,
|
|
592
|
+
participants: import_zod17.z.array(RecruitParticipantSchema)
|
|
593
|
+
});
|
|
594
|
+
var CreateRecruitResponseSchema = import_zod17.z.object({
|
|
595
|
+
recruitId: RecruitIdSchema
|
|
596
|
+
});
|
|
597
|
+
|
|
598
|
+
// src/domain/referral/schema/referral.schema.ts
|
|
599
|
+
var import_zod18 = require("zod");
|
|
600
|
+
var ReferralCreateResponseSchema = import_zod18.z.object({
|
|
601
|
+
code: ReferralCodeSchema,
|
|
602
|
+
link: import_zod18.z.string().url(),
|
|
603
|
+
expiresAt: ISODateTimeStringSchema
|
|
604
|
+
});
|
|
605
|
+
var ReferralItemResponseSchema = import_zod18.z.object({
|
|
606
|
+
code: ReferralCodeSchema,
|
|
607
|
+
createdAt: ISODateTimeStringSchema,
|
|
608
|
+
expiresAt: ISODateTimeStringSchema,
|
|
609
|
+
used: import_zod18.z.boolean(),
|
|
610
|
+
usedByMemberId: MemberIdSchema.nullable(),
|
|
611
|
+
usedByUsername: import_zod18.z.string().nullable()
|
|
612
|
+
});
|
|
613
|
+
var RedeemReferralRequestSchema = import_zod18.z.object({
|
|
614
|
+
code: ReferralCodeSchema
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
// src/domain/common/contracts/endpoint.ts
|
|
618
|
+
var import_zod19 = require("zod");
|
|
619
|
+
var NoBodySchema = import_zod19.z.undefined();
|
|
620
|
+
var NoQuerySchema = import_zod19.z.undefined();
|
|
621
|
+
var NoParamsSchema = import_zod19.z.undefined();
|
|
622
|
+
var endpoint = (contract) => ({
|
|
623
|
+
method: contract.method,
|
|
624
|
+
path: contract.path,
|
|
625
|
+
pathParams: contract.pathParams ?? NoParamsSchema,
|
|
626
|
+
query: contract.query ?? NoQuerySchema,
|
|
627
|
+
body: contract.body ?? NoBodySchema,
|
|
628
|
+
response: contract.response
|
|
629
|
+
});
|
|
630
|
+
|
|
631
|
+
// src/domain/common/contracts/api.ts
|
|
632
|
+
var memberIdParam = import_zod20.z.object({ memberId: MemberIdSchema });
|
|
633
|
+
var articleIdParam = import_zod20.z.object({ articleId: ArticleIdSchema });
|
|
634
|
+
var commentIdParam = import_zod20.z.object({ commentId: CommentIdSchema });
|
|
635
|
+
var recruitIdParam = import_zod20.z.object({ recruitId: RecruitIdSchema });
|
|
636
|
+
var invitationIdParam = import_zod20.z.object({ invitationId: InvitationIdSchema });
|
|
637
|
+
var planIdParam = import_zod20.z.object({ planId: PlanIdSchema });
|
|
638
|
+
var couponIdParam = import_zod20.z.object({ couponId: CouponIdSchema });
|
|
639
|
+
var friendRequestIdParam = import_zod20.z.object({ requestId: FriendRequestIdSchema });
|
|
640
|
+
var apiContract = {
|
|
641
|
+
auth: {
|
|
642
|
+
signup: endpoint({ method: "POST", path: "/auth/signup", body: SignupRequestSchema, response: SignupResponseSchema }),
|
|
643
|
+
login: endpoint({ method: "POST", path: "/auth/login", body: LoginRequestSchema, response: TokenResponseSchema }),
|
|
644
|
+
refresh: endpoint({ method: "POST", path: "/auth/refresh", response: TokenResponseSchema }),
|
|
645
|
+
logout: endpoint({ method: "POST", path: "/auth/logout", response: NoContentSchema })
|
|
646
|
+
},
|
|
647
|
+
members: {
|
|
648
|
+
me: endpoint({ method: "GET", path: "/members/me", response: MemberResponseSchema }),
|
|
649
|
+
summary: endpoint({ method: "GET", path: "/members/me/summary", response: MemberSummaryResponseSchema }),
|
|
650
|
+
detail: endpoint({ method: "GET", path: "/members/:memberId", pathParams: memberIdParam, response: ProfileDetailResponseSchema }),
|
|
651
|
+
updateProfile: endpoint({ method: "PATCH", path: "/members/me/profile", body: UpdateProfileRequestSchema, response: ProfileDetailResponseSchema }),
|
|
652
|
+
onboarding: endpoint({ method: "POST", path: "/members/me/onboarding", body: OnboardingRequestSchema, response: PreferenceMetaResponseSchema }),
|
|
653
|
+
updateOnboardingPreferences: endpoint({ method: "PATCH", path: "/members/me/preferences", body: OnboardingPreferenceRequestSchema, response: PreferenceMetaResponseSchema })
|
|
654
|
+
},
|
|
655
|
+
articles: {
|
|
656
|
+
list: endpoint({ method: "GET", path: "/articles", response: PageArticleSummaryResponseSchema }),
|
|
657
|
+
detail: endpoint({ method: "GET", path: "/articles/:articleId", pathParams: articleIdParam, response: ArticleDetailResponseSchema }),
|
|
658
|
+
create: endpoint({ method: "POST", path: "/articles", body: ArticlePostRequestSchema, response: CreateArticleResponseSchema }),
|
|
659
|
+
delete: endpoint({ method: "DELETE", path: "/articles/:articleId", pathParams: articleIdParam, response: NoContentSchema }),
|
|
660
|
+
createComment: endpoint({ method: "POST", path: "/articles/:articleId/comments", pathParams: articleIdParam, body: CommentPostRequestSchema, response: CreateCommentResponseSchema }),
|
|
661
|
+
deleteComment: endpoint({ method: "DELETE", path: "/articles/:articleId/comments/:commentId", pathParams: articleIdParam.merge(commentIdParam), response: NoContentSchema }),
|
|
662
|
+
presignArticleImage: endpoint({ method: "POST", path: "/uploads/articles/presign", response: PresignUploadResponseSchema }),
|
|
663
|
+
presignProfileImage: endpoint({ method: "POST", path: "/uploads/profiles/presign", response: PresignUploadResponseSchema })
|
|
664
|
+
},
|
|
665
|
+
recruits: {
|
|
666
|
+
list: endpoint({ method: "GET", path: "/recruits", response: import_zod20.z.array(RecruitResponseSchema) }),
|
|
667
|
+
detail: endpoint({ method: "GET", path: "/recruits/:recruitId", pathParams: recruitIdParam, response: RecruitResponseSchema }),
|
|
668
|
+
create: endpoint({ method: "POST", path: "/recruits", body: RecruitRequestSchema, response: CreateRecruitResponseSchema }),
|
|
669
|
+
close: endpoint({ method: "PATCH", path: "/recruits/:recruitId/close", pathParams: recruitIdParam, response: NoContentSchema }),
|
|
670
|
+
join: endpoint({ method: "POST", path: "/recruits/:recruitId/join", pathParams: recruitIdParam, response: NoContentSchema })
|
|
671
|
+
},
|
|
672
|
+
invitations: {
|
|
673
|
+
list: endpoint({ method: "GET", path: "/invitations", response: import_zod20.z.array(InvitationListItemResponseSchema) }),
|
|
674
|
+
send: endpoint({ method: "POST", path: "/invitations", body: InvitationPostRequestSchema, response: SendInvitationResponseSchema }),
|
|
675
|
+
accept: endpoint({ method: "POST", path: "/invitations/:invitationId/accept", pathParams: invitationIdParam, response: AcceptInvitationResponseSchema }),
|
|
676
|
+
reject: endpoint({ method: "POST", path: "/invitations/:invitationId/reject", pathParams: invitationIdParam, response: RejectInvitationResponseSchema })
|
|
677
|
+
},
|
|
678
|
+
plans: {
|
|
679
|
+
list: endpoint({ method: "GET", path: "/plans", response: import_zod20.z.array(PlanResponseSchema) }),
|
|
680
|
+
detail: endpoint({ method: "GET", path: "/plans/:planId", pathParams: planIdParam, response: PlanResponseSchema }),
|
|
681
|
+
create: endpoint({ method: "POST", path: "/plans", body: CreatePlanRequestSchema, response: PlanResponseSchema })
|
|
682
|
+
},
|
|
683
|
+
mealStatus: {
|
|
684
|
+
get: endpoint({ method: "GET", path: "/members/me/meal-status", response: MealStatusResponseSchema }),
|
|
685
|
+
update: endpoint({ method: "PATCH", path: "/members/me/meal-status", body: UpdateMealStatusRequestSchema, response: NoContentSchema })
|
|
686
|
+
},
|
|
687
|
+
friends: {
|
|
688
|
+
list: endpoint({ method: "GET", path: "/friends", response: import_zod20.z.array(FriendListItemResponseSchema) }),
|
|
689
|
+
meals: endpoint({ method: "GET", path: "/friends/meals", query: import_zod20.z.object({ filter: FriendMealFilterSchema.optional() }), response: import_zod20.z.array(FriendMealItemResponseSchema) }),
|
|
690
|
+
blocks: endpoint({ method: "GET", path: "/friends/blocks", response: import_zod20.z.array(FriendBlockItemResponseSchema) }),
|
|
691
|
+
request: endpoint({ method: "POST", path: "/friends/requests", body: FriendActionRequestSchema, response: FriendRequestItemResponseSchema }),
|
|
692
|
+
acceptRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/accept", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
693
|
+
rejectRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/reject", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
694
|
+
block: endpoint({ method: "POST", path: "/friends/blocks", body: FriendActionRequestSchema, response: NoContentSchema }),
|
|
695
|
+
unblock: endpoint({ method: "DELETE", path: "/friends/blocks/:memberId", pathParams: memberIdParam, response: NoContentSchema })
|
|
696
|
+
},
|
|
697
|
+
preferences: {
|
|
698
|
+
list: endpoint({ method: "GET", path: "/preferences", response: import_zod20.z.array(FoodPreferenceResponseSchema) })
|
|
699
|
+
},
|
|
700
|
+
coupons: {
|
|
701
|
+
list: endpoint({ method: "GET", path: "/coupons", response: import_zod20.z.array(CouponResponseSchema) }),
|
|
702
|
+
use: endpoint({ method: "PATCH", path: "/coupons/:couponId/use", pathParams: couponIdParam, response: NoContentSchema })
|
|
703
|
+
},
|
|
704
|
+
challenges: {
|
|
705
|
+
status: endpoint({ method: "GET", path: "/challenges/status", response: ChallengeStatusResponseSchema }),
|
|
706
|
+
claimReward: endpoint({ method: "POST", path: "/challenges/rewards", body: ClaimChallengeRewardRequestSchema, response: ClaimChallengeRewardResponseSchema })
|
|
707
|
+
},
|
|
708
|
+
referrals: {
|
|
709
|
+
create: endpoint({ method: "POST", path: "/referrals", response: ReferralCreateResponseSchema }),
|
|
710
|
+
list: endpoint({ method: "GET", path: "/referrals", response: import_zod20.z.array(ReferralItemResponseSchema) }),
|
|
711
|
+
redeem: endpoint({ method: "POST", path: "/referrals/redeem", body: RedeemReferralRequestSchema, response: NoContentSchema })
|
|
712
|
+
}
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
// src/domain/common/contracts/envelope.ts
|
|
716
|
+
var makeApiResponseSchema = ApiResponseSchema;
|
|
717
|
+
var makeApiSuccessSchema = ApiSuccessSchema;
|
|
718
|
+
|
|
719
|
+
// src/domain/common/contracts/id.ts
|
|
720
|
+
var toMemberId = (value) => MemberIdSchema.parse(value);
|
|
721
|
+
var toArticleId = (value) => ArticleIdSchema.parse(value);
|
|
722
|
+
var toRecruitId = (value) => RecruitIdSchema.parse(value);
|
|
723
|
+
var toInvitationId = (value) => InvitationIdSchema.parse(value);
|
|
724
|
+
var toRoomId = (value) => RoomIdSchema.parse(value);
|
|
725
|
+
var toRestaurantId = (value) => RestaurantIdSchema.parse(value);
|
|
726
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
727
|
+
0 && (module.exports = {
|
|
728
|
+
ApiFailureSchema,
|
|
729
|
+
ApiResponseSchema,
|
|
730
|
+
ApiSuccessSchema,
|
|
731
|
+
ArticleIdSchema,
|
|
732
|
+
CommentIdSchema,
|
|
733
|
+
CouponIdSchema,
|
|
734
|
+
CreatedEntityIdResponseSchema,
|
|
735
|
+
CreatedIdResponseSchema,
|
|
736
|
+
FriendRequestIdSchema,
|
|
737
|
+
ISODateStringSchema,
|
|
738
|
+
ISODateTimeStringSchema,
|
|
739
|
+
InvitationIdSchema,
|
|
740
|
+
MemberIdSchema,
|
|
741
|
+
NoBodySchema,
|
|
742
|
+
NoContentSchema,
|
|
743
|
+
NoParamsSchema,
|
|
744
|
+
NoQuerySchema,
|
|
745
|
+
NonEmptyStringIdSchema,
|
|
746
|
+
PageRequestSchema,
|
|
747
|
+
PageResponseSchema,
|
|
748
|
+
PageableObjectSchema,
|
|
749
|
+
PlanIdSchema,
|
|
750
|
+
PositiveIntIdSchema,
|
|
751
|
+
RecruitIdSchema,
|
|
752
|
+
ReferralCodeSchema,
|
|
753
|
+
RestaurantIdSchema,
|
|
754
|
+
RoomIdSchema,
|
|
755
|
+
SortObjectSchema,
|
|
756
|
+
SubscriptionIdSchema,
|
|
757
|
+
TimeHHmmStringSchema,
|
|
758
|
+
UserIdSchema,
|
|
759
|
+
apiContract,
|
|
760
|
+
endpoint,
|
|
761
|
+
makeApiResponseSchema,
|
|
762
|
+
makeApiSuccessSchema,
|
|
763
|
+
toArticleId,
|
|
764
|
+
toInvitationId,
|
|
765
|
+
toMemberId,
|
|
766
|
+
toRecruitId,
|
|
767
|
+
toRestaurantId,
|
|
768
|
+
toRoomId
|
|
769
|
+
});
|