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