@kimdaegyu/babmukdang-shared 1.1.4 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-U6OQQOPN.js → chunk-4E5E3PFW.js} +6 -2
- package/dist/{chunk-VAWYU5JG.js → chunk-AI2YMBJX.js} +4 -1
- package/dist/{chunk-RLVHDFEV.js → chunk-K3CZKI2F.js} +7 -4
- package/dist/{chunk-J76VB5SE.js → chunk-OJVXYCSH.js} +2 -3
- package/dist/{chunk-M5OSCHMV.js → chunk-PQMEXOPZ.js} +55 -6
- package/dist/{chunk-UJJMW7II.js → chunk-W4C7XHTX.js} +1 -1
- package/dist/{chunk-W3YQYI4R.js → chunk-W4TUW2GY.js} +2 -2
- package/dist/{chunk-23FZ4MAS.js → chunk-WNYCCQM4.js} +49 -33
- package/dist/{chunk-SOHYA6XL.js → chunk-YM7YU7IR.js} +102 -87
- package/dist/{chunk-KRVEQVRC.js → chunk-ZH7D7B2Y.js} +10 -4
- package/dist/domain/article/index.cjs +12 -5
- package/dist/domain/article/index.d.cts +11 -3
- package/dist/domain/article/index.d.ts +11 -3
- package/dist/domain/article/index.js +6 -4
- package/dist/domain/auth/index.cjs +7 -4
- package/dist/domain/auth/index.d.cts +0 -3
- package/dist/domain/auth/index.d.ts +0 -3
- package/dist/domain/auth/index.js +2 -2
- package/dist/domain/common/index.cjs +243 -181
- package/dist/domain/common/index.d.cts +370 -120
- package/dist/domain/common/index.d.ts +370 -120
- package/dist/domain/common/index.js +12 -11
- package/dist/domain/friend/index.cjs +14 -4
- package/dist/domain/friend/index.d.cts +15 -1
- package/dist/domain/friend/index.d.ts +15 -1
- package/dist/domain/friend/index.js +8 -4
- package/dist/domain/index.cjs +261 -183
- package/dist/domain/index.d.cts +315 -13
- package/dist/domain/index.d.ts +315 -13
- package/dist/domain/index.js +51 -35
- package/dist/domain/meal/index.cjs +6 -2
- package/dist/domain/meal/index.js +3 -3
- package/dist/domain/member/index.cjs +12 -6
- package/dist/domain/member/index.d.cts +11 -3
- package/dist/domain/member/index.d.ts +11 -3
- package/dist/domain/member/index.js +7 -5
- package/dist/domain/plan/index.cjs +55 -6
- package/dist/domain/plan/index.d.cts +2 -2
- package/dist/domain/plan/index.d.ts +2 -2
- package/dist/domain/plan/index.js +4 -4
- package/dist/domain/promotion/index.cjs +4 -1
- package/dist/domain/promotion/index.d.cts +49 -5
- package/dist/domain/promotion/index.d.ts +49 -5
- package/dist/domain/promotion/index.js +1 -1
- package/dist/domain/recruit/index.cjs +11 -3
- package/dist/domain/recruit/index.d.cts +160 -76
- package/dist/domain/recruit/index.d.ts +160 -76
- package/dist/domain/recruit/index.js +11 -10
- package/dist/domain/restaurant/index.d.cts +1 -75
- package/dist/domain/restaurant/index.d.ts +1 -75
- package/dist/domain/room/index.cjs +63 -6
- package/dist/domain/room/index.d.cts +1192 -31
- package/dist/domain/room/index.d.ts +1192 -31
- package/dist/domain/room/index.js +11 -3
- package/dist/index.cjs +251 -359
- package/dist/index.d.cts +15 -281
- package/dist/index.d.ts +15 -281
- package/dist/index.js +12 -188
- package/dist/restaurant.schema-CuEcX3S3.d.cts +78 -0
- package/dist/restaurant.schema-CuEcX3S3.d.ts +78 -0
- package/package.json +1 -1
- package/dist/index-CZT6irsm.d.cts +0 -294
- package/dist/index-DDLVbMTB.d.ts +0 -294
|
@@ -83,7 +83,7 @@ __export(common_exports, {
|
|
|
83
83
|
module.exports = __toCommonJS(common_exports);
|
|
84
84
|
|
|
85
85
|
// src/domain/common/contracts/api.ts
|
|
86
|
-
var
|
|
86
|
+
var import_zod20 = require("zod");
|
|
87
87
|
|
|
88
88
|
// src/domain/article/article.schema.ts
|
|
89
89
|
var import_zod7 = require("zod");
|
|
@@ -144,11 +144,14 @@ var import_zod5 = require("zod");
|
|
|
144
144
|
|
|
145
145
|
// src/domain/common/contracts/upload.ts
|
|
146
146
|
var import_zod4 = __toESM(require("zod"), 1);
|
|
147
|
-
var
|
|
147
|
+
var UploadPresignImageResponseSchema = import_zod4.default.object({
|
|
148
148
|
key: import_zod4.default.string(),
|
|
149
149
|
putUrl: import_zod4.default.string().url(),
|
|
150
150
|
cdnUrl: import_zod4.default.string().url()
|
|
151
151
|
});
|
|
152
|
+
var UploadPresignImageRequestSchema = import_zod4.default.object({
|
|
153
|
+
contentType: import_zod4.default.string()
|
|
154
|
+
});
|
|
152
155
|
|
|
153
156
|
// src/domain/member/member.schema.ts
|
|
154
157
|
var MemberRoleSchema = import_zod5.z.enum(["USER", "ADMIN"]);
|
|
@@ -157,7 +160,8 @@ var MemberCoreSchema = import_zod5.z.object({
|
|
|
157
160
|
username: import_zod5.z.string().min(1).max(50),
|
|
158
161
|
profileImageUrl: import_zod5.z.string().url().nullable().optional()
|
|
159
162
|
});
|
|
160
|
-
var
|
|
163
|
+
var UploadProfileImageResponseSchema = UploadPresignImageResponseSchema.extend({});
|
|
164
|
+
var UploadProfileImageRequestSchema = UploadPresignImageRequestSchema.extend({});
|
|
161
165
|
var MemberResponseSchema = MemberCoreSchema.pick({
|
|
162
166
|
memberId: true,
|
|
163
167
|
username: true,
|
|
@@ -226,7 +230,8 @@ var ArticleListQuerySchema = PageQuerySchema.extend({
|
|
|
226
230
|
sortBy: ArticleSortBySchema.optional().default("createdAt"),
|
|
227
231
|
direction: SortDirectionSchema.optional().default("desc")
|
|
228
232
|
});
|
|
229
|
-
var
|
|
233
|
+
var UploadArticleImageResponseSchema = UploadPresignImageResponseSchema.extend({});
|
|
234
|
+
var UploadArticleImageRequestSchema = UploadPresignImageRequestSchema.extend({});
|
|
230
235
|
var FoodAnalysisResultSchema = FoodSchema.extend({
|
|
231
236
|
confidence: import_zod7.z.number().min(0).max(1),
|
|
232
237
|
tsUtc: ISODateTimeStringSchema.optional()
|
|
@@ -278,8 +283,7 @@ var PageArticleSummaryResponseSchema = PageResponseSchema(ArticleSummaryResponse
|
|
|
278
283
|
// src/domain/auth/auth.schema.ts
|
|
279
284
|
var import_zod8 = require("zod");
|
|
280
285
|
var TokenResponseSchema = import_zod8.z.object({
|
|
281
|
-
accessToken: import_zod8.z.string().min(1)
|
|
282
|
-
accessTokenMaxAge: import_zod8.z.number().int().positive()
|
|
286
|
+
accessToken: import_zod8.z.string().min(1)
|
|
283
287
|
});
|
|
284
288
|
var LoginRequestSchema = import_zod8.z.object({
|
|
285
289
|
email: import_zod8.z.string().email(),
|
|
@@ -308,7 +312,10 @@ var MonthProgressSchema = import_zod9.z.object({
|
|
|
308
312
|
goal: import_zod9.z.number().int().positive()
|
|
309
313
|
});
|
|
310
314
|
var ChallengeStatusResponseSchema = import_zod9.z.object({
|
|
311
|
-
|
|
315
|
+
week: WeekProgressSchema,
|
|
316
|
+
month: MonthProgressSchema,
|
|
317
|
+
weekRewardAvailable: import_zod9.z.boolean(),
|
|
318
|
+
monthRewardAvailable: import_zod9.z.boolean()
|
|
312
319
|
});
|
|
313
320
|
var ClaimChallengeRewardRequestSchema = import_zod9.z.object({
|
|
314
321
|
type: RewardTypeSchema
|
|
@@ -318,9 +325,35 @@ var ClaimChallengeRewardResponseSchema = import_zod9.z.object({
|
|
|
318
325
|
claimed: import_zod9.z.boolean()
|
|
319
326
|
});
|
|
320
327
|
|
|
321
|
-
// src/domain/
|
|
328
|
+
// src/domain/common/schema/envelope.schema.ts
|
|
322
329
|
var import_zod10 = require("zod");
|
|
323
|
-
var
|
|
330
|
+
var NoContentSchema = import_zod10.z.null();
|
|
331
|
+
var ApiSuccessSchema = (data) => import_zod10.z.object({
|
|
332
|
+
success: import_zod10.z.literal(true),
|
|
333
|
+
code: import_zod10.z.number().int(),
|
|
334
|
+
message: import_zod10.z.string(),
|
|
335
|
+
data
|
|
336
|
+
});
|
|
337
|
+
var ApiFailureSchema = import_zod10.z.object({
|
|
338
|
+
success: import_zod10.z.literal(false),
|
|
339
|
+
status: import_zod10.z.number().int(),
|
|
340
|
+
code: import_zod10.z.string(),
|
|
341
|
+
message: import_zod10.z.string()
|
|
342
|
+
});
|
|
343
|
+
var ApiResponseSchema = (data) => import_zod10.z.union([ApiSuccessSchema(data), ApiFailureSchema]);
|
|
344
|
+
var CreatedEntityIdResponseSchema = import_zod10.z.discriminatedUnion("entity", [
|
|
345
|
+
import_zod10.z.object({ entity: import_zod10.z.literal("article"), id: ArticleIdSchema }),
|
|
346
|
+
import_zod10.z.object({ entity: import_zod10.z.literal("comment"), id: CommentIdSchema }),
|
|
347
|
+
import_zod10.z.object({ entity: import_zod10.z.literal("recruit"), id: RecruitIdSchema }),
|
|
348
|
+
import_zod10.z.object({ entity: import_zod10.z.literal("invitation"), id: InvitationIdSchema }),
|
|
349
|
+
import_zod10.z.object({ entity: import_zod10.z.literal("subscription"), id: SubscriptionIdSchema }),
|
|
350
|
+
import_zod10.z.object({ entity: import_zod10.z.literal("coupon"), id: CouponIdSchema }),
|
|
351
|
+
import_zod10.z.object({ entity: import_zod10.z.literal("plan"), id: PlanIdSchema })
|
|
352
|
+
]);
|
|
353
|
+
|
|
354
|
+
// src/domain/friend/friend.schema.ts
|
|
355
|
+
var import_zod11 = require("zod");
|
|
356
|
+
var FriendRequestStatusSchema = import_zod11.z.enum(["PENDING", "ACCEPTED", "REJECTED", "CANCELED"]);
|
|
324
357
|
var FriendListItemResponseSchema = MemberCoreSchema.extend({
|
|
325
358
|
friendSince: ISODateTimeStringSchema
|
|
326
359
|
});
|
|
@@ -328,77 +361,79 @@ var FriendBlockItemResponseSchema = MemberCoreSchema.extend({
|
|
|
328
361
|
blockedAt: ISODateTimeStringSchema
|
|
329
362
|
});
|
|
330
363
|
var FriendRequestMemberSchema = MemberCoreSchema;
|
|
331
|
-
var FriendRequestItemResponseSchema =
|
|
364
|
+
var FriendRequestItemResponseSchema = import_zod11.z.object({
|
|
332
365
|
requestId: FriendRequestIdSchema,
|
|
333
366
|
requester: FriendRequestMemberSchema,
|
|
334
367
|
recipient: FriendRequestMemberSchema,
|
|
335
368
|
status: FriendRequestStatusSchema,
|
|
336
369
|
requestedAt: ISODateTimeStringSchema
|
|
337
370
|
});
|
|
371
|
+
var FriendSearchQuerySchema = import_zod11.z.string().min(1).max(50);
|
|
372
|
+
var FriendSearchResponseSchema = import_zod11.z.array(MemberCoreSchema);
|
|
338
373
|
|
|
339
374
|
// src/domain/invitation/invitation.schema.ts
|
|
340
|
-
var
|
|
341
|
-
var CreateInvitationRequestSchema =
|
|
375
|
+
var import_zod12 = require("zod");
|
|
376
|
+
var CreateInvitationRequestSchema = import_zod12.z.object({
|
|
342
377
|
inviteeId: MemberIdSchema,
|
|
343
|
-
message:
|
|
378
|
+
message: import_zod12.z.string().min(1).max(500)
|
|
344
379
|
});
|
|
345
|
-
var InvitationListItemResponseSchema =
|
|
380
|
+
var InvitationListItemResponseSchema = import_zod12.z.object({
|
|
346
381
|
invitationId: InvitationIdSchema,
|
|
347
|
-
inviterName:
|
|
348
|
-
inviterProfileImageUrl:
|
|
382
|
+
inviterName: import_zod12.z.string(),
|
|
383
|
+
inviterProfileImageUrl: import_zod12.z.string().url().nullable().optional()
|
|
349
384
|
});
|
|
350
|
-
var SendInvitationResponseSchema =
|
|
385
|
+
var SendInvitationResponseSchema = import_zod12.z.object({
|
|
351
386
|
invitationId: InvitationIdSchema
|
|
352
387
|
});
|
|
353
|
-
var AcceptInvitationResponseSchema =
|
|
388
|
+
var AcceptInvitationResponseSchema = import_zod12.z.object({
|
|
354
389
|
invitationId: InvitationIdSchema,
|
|
355
|
-
room:
|
|
356
|
-
type:
|
|
390
|
+
room: import_zod12.z.object({
|
|
391
|
+
type: import_zod12.z.literal("invitation"),
|
|
357
392
|
roomId: RoomIdSchema
|
|
358
393
|
})
|
|
359
394
|
});
|
|
360
395
|
|
|
361
396
|
// src/domain/meal/meal.schema.ts
|
|
362
|
-
var
|
|
363
|
-
var MealStatusResponseSchema =
|
|
364
|
-
hungry:
|
|
365
|
-
label:
|
|
397
|
+
var import_zod13 = require("zod");
|
|
398
|
+
var MealStatusResponseSchema = import_zod13.z.object({
|
|
399
|
+
hungry: import_zod13.z.boolean(),
|
|
400
|
+
label: import_zod13.z.string(),
|
|
366
401
|
updatedAt: ISODateStringSchema,
|
|
367
|
-
secondsToAutoOff:
|
|
402
|
+
secondsToAutoOff: import_zod13.z.number().int().min(0)
|
|
368
403
|
});
|
|
369
|
-
var MealStatusActionSchema =
|
|
370
|
-
var UpdateMealStatusRequestSchema =
|
|
404
|
+
var MealStatusActionSchema = import_zod13.z.enum(["ARTICLE_UPLOAD", "SET_MANNUALY"]);
|
|
405
|
+
var UpdateMealStatusRequestSchema = import_zod13.z.object({
|
|
371
406
|
action: MealStatusActionSchema.optional().default("SET_MANNUALY")
|
|
372
407
|
});
|
|
373
|
-
var MealStatusSchema =
|
|
374
|
-
var FriendMealQuerySchema =
|
|
408
|
+
var MealStatusSchema = import_zod13.z.enum(["ALL", "HUNGRY", "NOT_HUNGRY"]);
|
|
409
|
+
var FriendMealQuerySchema = import_zod13.z.object({
|
|
375
410
|
status: MealStatusSchema.optional().default("ALL")
|
|
376
411
|
});
|
|
377
412
|
var FriendMealItemResponseSchema = MemberCoreSchema.extend({
|
|
378
|
-
hungry:
|
|
379
|
-
label:
|
|
413
|
+
hungry: import_zod13.z.boolean(),
|
|
414
|
+
label: import_zod13.z.string(),
|
|
380
415
|
updatedAt: ISODateStringSchema
|
|
381
416
|
});
|
|
382
417
|
|
|
383
418
|
// src/domain/plan/plan.schema.ts
|
|
384
|
-
var
|
|
419
|
+
var import_zod15 = require("zod");
|
|
385
420
|
|
|
386
421
|
// src/domain/room/schema/room.schema.ts
|
|
387
|
-
var
|
|
422
|
+
var import_zod14 = require("zod");
|
|
388
423
|
var MenuCodeSchema = FoodCodeSchema;
|
|
389
|
-
var LocationIdSchema =
|
|
424
|
+
var LocationIdSchema = import_zod14.z.string().min(1).brand();
|
|
390
425
|
var MenuSchema = FoodSchema.extend({});
|
|
391
|
-
var LocationCandidateSchema =
|
|
426
|
+
var LocationCandidateSchema = import_zod14.z.object({
|
|
392
427
|
locationId: LocationIdSchema,
|
|
393
|
-
placeName:
|
|
394
|
-
lat:
|
|
395
|
-
lng:
|
|
396
|
-
address:
|
|
428
|
+
placeName: import_zod14.z.string(),
|
|
429
|
+
lat: import_zod14.z.number(),
|
|
430
|
+
lng: import_zod14.z.number(),
|
|
431
|
+
address: import_zod14.z.string()
|
|
397
432
|
});
|
|
398
433
|
var ParticipantSchema = MemberCoreSchema.extend({
|
|
399
|
-
ready:
|
|
434
|
+
ready: import_zod14.z.boolean()
|
|
400
435
|
});
|
|
401
|
-
var RecruitRoomStageSchema =
|
|
436
|
+
var RecruitRoomStageSchema = import_zod14.z.enum([
|
|
402
437
|
"waiting",
|
|
403
438
|
"location",
|
|
404
439
|
"location-vote",
|
|
@@ -407,7 +442,8 @@ var RecruitRoomStageSchema = import_zod13.z.enum([
|
|
|
407
442
|
"restaurant",
|
|
408
443
|
"finish"
|
|
409
444
|
]);
|
|
410
|
-
var
|
|
445
|
+
var RoomTypeSchema = import_zod14.z.enum(["recruit", "invitation"]);
|
|
446
|
+
var InvitationRoomStageSchema = import_zod14.z.enum([
|
|
411
447
|
"waiting",
|
|
412
448
|
"date",
|
|
413
449
|
"time",
|
|
@@ -418,163 +454,207 @@ var InvitationRoomStageSchema = import_zod13.z.enum([
|
|
|
418
454
|
"restaurant",
|
|
419
455
|
"finish"
|
|
420
456
|
]);
|
|
421
|
-
var ReadyStateRequestSchema =
|
|
422
|
-
isReady:
|
|
423
|
-
});
|
|
424
|
-
var ChatMessageRequestSchema =
|
|
425
|
-
message:
|
|
426
|
-
});
|
|
427
|
-
var VoteLocationRequestSchema =
|
|
428
|
-
var ExcludeMenuRequestSchema =
|
|
429
|
-
var PickMenuRequestSchema =
|
|
430
|
-
var PickRestaurantRequestSchema =
|
|
431
|
-
var PickTimesRequestSchema =
|
|
432
|
-
var PickDateRequestSchema =
|
|
433
|
-
var RoomAssignedResponseSchema =
|
|
457
|
+
var ReadyStateRequestSchema = import_zod14.z.object({
|
|
458
|
+
isReady: import_zod14.z.boolean()
|
|
459
|
+
});
|
|
460
|
+
var ChatMessageRequestSchema = import_zod14.z.object({
|
|
461
|
+
message: import_zod14.z.string().min(1).max(500)
|
|
462
|
+
});
|
|
463
|
+
var VoteLocationRequestSchema = import_zod14.z.object({ locationId: LocationIdSchema });
|
|
464
|
+
var ExcludeMenuRequestSchema = import_zod14.z.object({ menu: MenuSchema });
|
|
465
|
+
var PickMenuRequestSchema = import_zod14.z.object({ menuCode: MenuCodeSchema });
|
|
466
|
+
var PickRestaurantRequestSchema = import_zod14.z.object({ restaurantId: RestaurantIdSchema });
|
|
467
|
+
var PickTimesRequestSchema = import_zod14.z.object({ times: import_zod14.z.array(import_zod14.z.string().min(1)).min(1) });
|
|
468
|
+
var PickDateRequestSchema = import_zod14.z.object({ dates: import_zod14.z.array(ISODateStringSchema).min(1) });
|
|
469
|
+
var RoomAssignedResponseSchema = import_zod14.z.object({
|
|
434
470
|
roomId: RoomIdSchema
|
|
435
471
|
});
|
|
436
|
-
var
|
|
437
|
-
|
|
438
|
-
|
|
472
|
+
var RoomAccessResponseSchema = import_zod14.z.object({
|
|
473
|
+
roomId: RoomIdSchema,
|
|
474
|
+
roomType: RoomTypeSchema,
|
|
475
|
+
stage: import_zod14.z.union([RecruitRoomStageSchema, InvitationRoomStageSchema]),
|
|
476
|
+
canJoin: import_zod14.z.boolean()
|
|
477
|
+
});
|
|
478
|
+
var MatchingNotificationKindSchema = import_zod14.z.enum(["recruit", "invitation"]);
|
|
479
|
+
var MatchingNotificationSchema = import_zod14.z.object({
|
|
480
|
+
notificationId: import_zod14.z.string().min(1),
|
|
481
|
+
kind: MatchingNotificationKindSchema,
|
|
482
|
+
roomId: RoomIdSchema,
|
|
483
|
+
roomType: RoomTypeSchema,
|
|
484
|
+
title: import_zod14.z.string().min(1),
|
|
485
|
+
message: import_zod14.z.string().min(1),
|
|
486
|
+
createdAt: ISODateTimeStringSchema,
|
|
487
|
+
readAt: ISODateTimeStringSchema.nullable()
|
|
488
|
+
});
|
|
489
|
+
var RoomSocketErrorSchema = import_zod14.z.object({
|
|
490
|
+
code: import_zod14.z.string(),
|
|
491
|
+
message: import_zod14.z.string()
|
|
439
492
|
});
|
|
440
|
-
var ChatMessageResponseSchema =
|
|
441
|
-
messageId:
|
|
493
|
+
var ChatMessageResponseSchema = import_zod14.z.object({
|
|
494
|
+
messageId: import_zod14.z.string(),
|
|
442
495
|
user: MemberCoreSchema,
|
|
443
|
-
message:
|
|
496
|
+
message: import_zod14.z.string(),
|
|
444
497
|
createdAt: ISODateTimeStringSchema
|
|
445
498
|
});
|
|
446
|
-
var ReadyStateChangedSchema =
|
|
447
|
-
readyCount:
|
|
448
|
-
participantCount:
|
|
499
|
+
var ReadyStateChangedSchema = import_zod14.z.object({
|
|
500
|
+
readyCount: import_zod14.z.number().int().min(0),
|
|
501
|
+
participantCount: import_zod14.z.number().int().min(0)
|
|
449
502
|
});
|
|
450
|
-
var FinalStateSchema =
|
|
503
|
+
var FinalStateSchema = import_zod14.z.object({
|
|
451
504
|
location: LocationCandidateSchema.optional(),
|
|
452
|
-
excludeMenu:
|
|
505
|
+
excludeMenu: import_zod14.z.array(MenuSchema).optional(),
|
|
453
506
|
menu: MenuSchema.optional(),
|
|
454
507
|
restaurant: RestaurantSchema.optional(),
|
|
455
|
-
time:
|
|
508
|
+
time: import_zod14.z.string().optional(),
|
|
456
509
|
date: ISODateStringSchema.optional()
|
|
457
510
|
});
|
|
458
|
-
var RoomInitialStateSchema =
|
|
459
|
-
participants:
|
|
460
|
-
chat:
|
|
511
|
+
var RoomInitialStateSchema = import_zod14.z.object({
|
|
512
|
+
participants: import_zod14.z.array(ParticipantSchema),
|
|
513
|
+
chat: import_zod14.z.array(ChatMessageResponseSchema),
|
|
461
514
|
final: FinalStateSchema
|
|
462
515
|
});
|
|
463
|
-
var
|
|
464
|
-
|
|
465
|
-
data: import_zod13.z.unknown()
|
|
466
|
-
});
|
|
467
|
-
var TimePicksUpdateResponseSchema = import_zod13.z.array(
|
|
468
|
-
import_zod13.z.object({ memberId: MemberIdSchema, times: import_zod13.z.array(import_zod13.z.string()) })
|
|
516
|
+
var TimePicksUpdateResponseSchema = import_zod14.z.array(
|
|
517
|
+
import_zod14.z.object({ memberId: MemberIdSchema, times: import_zod14.z.array(import_zod14.z.string()) })
|
|
469
518
|
);
|
|
470
|
-
var DatePicksUpdateResponseSchema =
|
|
471
|
-
|
|
519
|
+
var DatePicksUpdateResponseSchema = import_zod14.z.array(
|
|
520
|
+
import_zod14.z.object({ memberId: MemberIdSchema, dates: import_zod14.z.array(ISODateStringSchema) })
|
|
472
521
|
);
|
|
473
|
-
var LocationCandidateAddUpdateResponseSchema =
|
|
522
|
+
var LocationCandidateAddUpdateResponseSchema = import_zod14.z.array(
|
|
474
523
|
LocationCandidateSchema.extend({ authorMemberId: MemberIdSchema })
|
|
475
524
|
);
|
|
476
|
-
var LocationCandidateVoteUpdateResponseSchema =
|
|
477
|
-
|
|
525
|
+
var LocationCandidateVoteUpdateResponseSchema = import_zod14.z.array(
|
|
526
|
+
import_zod14.z.object({ locationId: LocationIdSchema, votes: import_zod14.z.array(MemberIdSchema) })
|
|
478
527
|
);
|
|
479
|
-
var ExcludeMenuUpdateResponseSchema =
|
|
480
|
-
|
|
528
|
+
var ExcludeMenuUpdateResponseSchema = import_zod14.z.array(
|
|
529
|
+
import_zod14.z.object({ memberId: MemberIdSchema, exclusions: import_zod14.z.array(MenuSchema) })
|
|
481
530
|
);
|
|
482
|
-
var MenuPickUpdateResponseSchema =
|
|
483
|
-
|
|
531
|
+
var MenuPickUpdateResponseSchema = import_zod14.z.array(
|
|
532
|
+
import_zod14.z.object({ menuCode: MenuCodeSchema, selectedMembers: import_zod14.z.array(MemberIdSchema) })
|
|
484
533
|
);
|
|
485
|
-
var RestaurantPickUpdateResponseSchema =
|
|
486
|
-
|
|
534
|
+
var RestaurantPickUpdateResponseSchema = import_zod14.z.array(
|
|
535
|
+
import_zod14.z.object({ restaurantId: RestaurantIdSchema, selectedMembers: import_zod14.z.array(MemberIdSchema) })
|
|
487
536
|
);
|
|
537
|
+
var WaitingPhaseDataSchema = import_zod14.z.object({
|
|
538
|
+
locationInitial: import_zod14.z.string().optional(),
|
|
539
|
+
meetingAt: ISODateTimeStringSchema.optional()
|
|
540
|
+
});
|
|
541
|
+
var LocationVotePhaseDataSchema = import_zod14.z.object({
|
|
542
|
+
locations: LocationCandidateAddUpdateResponseSchema,
|
|
543
|
+
votes: LocationCandidateVoteUpdateResponseSchema
|
|
544
|
+
});
|
|
545
|
+
var ExcludeMenuPhaseDataSchema = import_zod14.z.object({
|
|
546
|
+
recentMenus: import_zod14.z.array(import_zod14.z.object({ userId: import_zod14.z.string(), menuList: import_zod14.z.array(MenuSchema) })),
|
|
547
|
+
excludedMenuList: ExcludeMenuUpdateResponseSchema
|
|
548
|
+
});
|
|
549
|
+
var MenuPhaseDataSchema = import_zod14.z.object({
|
|
550
|
+
initialMenus: import_zod14.z.array(MenuSchema),
|
|
551
|
+
menuPick: MenuPickUpdateResponseSchema
|
|
552
|
+
});
|
|
553
|
+
var RestaurantPhaseDataSchema = import_zod14.z.object({
|
|
554
|
+
initialRestaurants: import_zod14.z.array(RestaurantSchema),
|
|
555
|
+
restaurantUserList: RestaurantPickUpdateResponseSchema
|
|
556
|
+
});
|
|
557
|
+
var PhaseDataBroadcastSchema = import_zod14.z.discriminatedUnion("phase", [
|
|
558
|
+
import_zod14.z.object({ phase: import_zod14.z.literal("waiting"), data: WaitingPhaseDataSchema }),
|
|
559
|
+
import_zod14.z.object({ phase: import_zod14.z.literal("date"), data: DatePicksUpdateResponseSchema }),
|
|
560
|
+
import_zod14.z.object({ phase: import_zod14.z.literal("time"), data: TimePicksUpdateResponseSchema }),
|
|
561
|
+
import_zod14.z.object({ phase: import_zod14.z.literal("location"), data: WaitingPhaseDataSchema }),
|
|
562
|
+
import_zod14.z.object({ phase: import_zod14.z.literal("location-vote"), data: LocationVotePhaseDataSchema }),
|
|
563
|
+
import_zod14.z.object({ phase: import_zod14.z.literal("exclude-menu"), data: ExcludeMenuPhaseDataSchema }),
|
|
564
|
+
import_zod14.z.object({ phase: import_zod14.z.literal("menu"), data: MenuPhaseDataSchema }),
|
|
565
|
+
import_zod14.z.object({ phase: import_zod14.z.literal("restaurant"), data: RestaurantPhaseDataSchema }),
|
|
566
|
+
import_zod14.z.object({ phase: import_zod14.z.literal("finish"), data: WaitingPhaseDataSchema })
|
|
567
|
+
]);
|
|
488
568
|
|
|
489
569
|
// src/domain/plan/plan.schema.ts
|
|
490
|
-
var PlanStatusSchema =
|
|
491
|
-
var PlanTypeSchema =
|
|
492
|
-
var PlanResponseSchema =
|
|
570
|
+
var PlanStatusSchema = import_zod15.z.enum(["PLANNING", "COMPLETED"]);
|
|
571
|
+
var PlanTypeSchema = import_zod15.z.enum(["RECRUIT", "INVITATION"]);
|
|
572
|
+
var PlanResponseSchema = import_zod15.z.object({
|
|
493
573
|
planId: PlanIdSchema,
|
|
494
574
|
meetingAt: ISODateTimeStringSchema,
|
|
495
575
|
location: LocationCandidateSchema.nullable(),
|
|
496
576
|
restaurant: RestaurantSchema.nullable(),
|
|
497
577
|
author: MemberCoreSchema,
|
|
498
|
-
participants:
|
|
578
|
+
participants: import_zod15.z.array(MemberCoreSchema),
|
|
499
579
|
status: PlanStatusSchema,
|
|
500
580
|
type: PlanTypeSchema,
|
|
501
581
|
createdAt: ISODateTimeStringSchema,
|
|
502
582
|
updatedAt: ISODateTimeStringSchema
|
|
503
583
|
});
|
|
504
|
-
var PlanListQuerySchema =
|
|
584
|
+
var PlanListQuerySchema = import_zod15.z.object({});
|
|
505
585
|
|
|
506
586
|
// src/domain/recruit/recruit.schema.ts
|
|
507
|
-
var
|
|
508
|
-
var RecruitStatusSchema =
|
|
587
|
+
var import_zod16 = require("zod");
|
|
588
|
+
var RecruitStatusSchema = import_zod16.z.enum(["OPEN", "CLOSED", "EXPIRED"]);
|
|
509
589
|
var RecruitParticipantSchema = MemberCoreSchema.extend({});
|
|
510
|
-
var RecruitSortBySchema =
|
|
590
|
+
var RecruitSortBySchema = import_zod16.z.enum(["createdAt", "deadline", "participantCount"]);
|
|
511
591
|
var RecruitListQuerySchema = PageQuerySchema.extend({
|
|
512
592
|
sortBy: RecruitSortBySchema.default("createdAt"),
|
|
513
593
|
direction: SortDirectionSchema.default("desc")
|
|
514
594
|
});
|
|
515
|
-
var RecruitResponseSchema =
|
|
516
|
-
targetCount:
|
|
595
|
+
var RecruitResponseSchema = import_zod16.z.object({
|
|
596
|
+
targetCount: import_zod16.z.number().int().min(2),
|
|
517
597
|
meetingAt: ISODateTimeStringSchema,
|
|
518
|
-
location:
|
|
519
|
-
message:
|
|
598
|
+
location: import_zod16.z.string().min(1),
|
|
599
|
+
message: import_zod16.z.string().max(500),
|
|
520
600
|
recruitId: RecruitIdSchema,
|
|
521
601
|
status: RecruitStatusSchema,
|
|
522
602
|
createdAt: ISODateTimeStringSchema,
|
|
523
603
|
expiredAt: ISODateTimeStringSchema,
|
|
524
604
|
updatedAt: ISODateTimeStringSchema,
|
|
525
605
|
author: MemberCoreSchema,
|
|
526
|
-
participants:
|
|
606
|
+
participants: import_zod16.z.array(RecruitParticipantSchema)
|
|
527
607
|
});
|
|
528
|
-
var RecruitListResponseSchema =
|
|
529
|
-
var CreateRecruitRequestSchema =
|
|
530
|
-
targetCount:
|
|
608
|
+
var RecruitListResponseSchema = PageResponseSchema(RecruitResponseSchema);
|
|
609
|
+
var CreateRecruitRequestSchema = import_zod16.z.object({
|
|
610
|
+
targetCount: import_zod16.z.number().int().min(2),
|
|
531
611
|
meetingAt: ISODateTimeStringSchema,
|
|
532
|
-
location:
|
|
533
|
-
message:
|
|
612
|
+
location: import_zod16.z.string().min(1),
|
|
613
|
+
message: import_zod16.z.string().max(500)
|
|
534
614
|
});
|
|
535
|
-
var CreateRecruitResponseSchema =
|
|
615
|
+
var CreateRecruitResponseSchema = import_zod16.z.object({
|
|
536
616
|
recruitId: RecruitIdSchema
|
|
537
617
|
});
|
|
538
618
|
|
|
539
619
|
// src/domain/promotion/referral.schema.ts
|
|
540
|
-
var
|
|
541
|
-
var ReferralCreateResponseSchema =
|
|
620
|
+
var import_zod17 = require("zod");
|
|
621
|
+
var ReferralCreateResponseSchema = import_zod17.z.object({
|
|
542
622
|
code: ReferralCodeSchema,
|
|
543
|
-
link:
|
|
623
|
+
link: import_zod17.z.string().url(),
|
|
544
624
|
expiresAt: ISODateTimeStringSchema
|
|
545
625
|
});
|
|
546
|
-
var ReferralItemResponseSchema =
|
|
626
|
+
var ReferralItemResponseSchema = import_zod17.z.object({
|
|
547
627
|
code: ReferralCodeSchema,
|
|
548
628
|
createdAt: ISODateTimeStringSchema,
|
|
549
629
|
expiresAt: ISODateTimeStringSchema,
|
|
550
|
-
used:
|
|
630
|
+
used: import_zod17.z.boolean(),
|
|
551
631
|
usedByMemberId: MemberIdSchema.nullable(),
|
|
552
|
-
usedByUsername:
|
|
632
|
+
usedByUsername: import_zod17.z.string().nullable()
|
|
553
633
|
});
|
|
554
|
-
var RedeemReferralRequestSchema =
|
|
634
|
+
var RedeemReferralRequestSchema = import_zod17.z.object({
|
|
555
635
|
code: ReferralCodeSchema
|
|
556
636
|
});
|
|
557
637
|
|
|
558
638
|
// src/domain/promotion/coupon.schema.ts
|
|
559
|
-
var
|
|
560
|
-
var CouponTypeSchema =
|
|
561
|
-
var CouponStatusSchema =
|
|
562
|
-
var CouponResponseSchema =
|
|
639
|
+
var import_zod18 = require("zod");
|
|
640
|
+
var CouponTypeSchema = import_zod18.z.enum(["DISCOUNT", "SERVICE"]);
|
|
641
|
+
var CouponStatusSchema = import_zod18.z.enum(["UNUSED", "USED"]);
|
|
642
|
+
var CouponResponseSchema = import_zod18.z.object({
|
|
563
643
|
couponId: CouponIdSchema,
|
|
564
|
-
title:
|
|
565
|
-
shopName:
|
|
644
|
+
title: import_zod18.z.string(),
|
|
645
|
+
shopName: import_zod18.z.string(),
|
|
566
646
|
type: CouponTypeSchema,
|
|
567
|
-
condition:
|
|
647
|
+
condition: import_zod18.z.string(),
|
|
568
648
|
expiresAt: ISODateStringSchema,
|
|
569
|
-
used:
|
|
570
|
-
thumbnailUrl:
|
|
649
|
+
used: import_zod18.z.boolean(),
|
|
650
|
+
thumbnailUrl: import_zod18.z.string().url()
|
|
571
651
|
});
|
|
572
652
|
|
|
573
653
|
// src/domain/common/contracts/endpoint.ts
|
|
574
|
-
var
|
|
575
|
-
var NoBodySchema =
|
|
576
|
-
var NoQuerySchema =
|
|
577
|
-
var NoParamsSchema =
|
|
654
|
+
var import_zod19 = require("zod");
|
|
655
|
+
var NoBodySchema = import_zod19.z.undefined();
|
|
656
|
+
var NoQuerySchema = import_zod19.z.undefined();
|
|
657
|
+
var NoParamsSchema = import_zod19.z.undefined();
|
|
578
658
|
var endpoint = (contract) => ({
|
|
579
659
|
method: contract.method,
|
|
580
660
|
path: contract.path,
|
|
@@ -585,28 +665,30 @@ var endpoint = (contract) => ({
|
|
|
585
665
|
});
|
|
586
666
|
|
|
587
667
|
// src/domain/common/contracts/api.ts
|
|
588
|
-
var memberIdParam =
|
|
589
|
-
var articleIdParam =
|
|
590
|
-
var commentIdParam =
|
|
591
|
-
var recruitIdParam =
|
|
592
|
-
var
|
|
593
|
-
var
|
|
594
|
-
var
|
|
595
|
-
var
|
|
668
|
+
var memberIdParam = import_zod20.z.object({ memberId: MemberIdSchema });
|
|
669
|
+
var articleIdParam = import_zod20.z.object({ articleId: ArticleIdSchema });
|
|
670
|
+
var commentIdParam = import_zod20.z.object({ commentId: CommentIdSchema });
|
|
671
|
+
var recruitIdParam = import_zod20.z.object({ recruitId: RecruitIdSchema });
|
|
672
|
+
var roomIdParam = import_zod20.z.object({ roomId: RoomIdSchema });
|
|
673
|
+
var invitationIdParam = import_zod20.z.object({ invitationId: InvitationIdSchema });
|
|
674
|
+
var notificationIdParam = import_zod20.z.object({ notificationId: import_zod20.z.string().min(1) });
|
|
675
|
+
var planIdParam = import_zod20.z.object({ planId: PlanIdSchema });
|
|
676
|
+
var couponIdParam = import_zod20.z.object({ couponId: CouponIdSchema });
|
|
677
|
+
var friendRequestIdParam = import_zod20.z.object({ requestId: FriendRequestIdSchema });
|
|
596
678
|
var apiContract = {
|
|
597
679
|
auth: {
|
|
598
680
|
signup: endpoint({ method: "POST", path: "/auth/signup", body: SignupRequestSchema, response: SignupResponseSchema }),
|
|
599
681
|
login: endpoint({ method: "POST", path: "/auth/login", body: LoginRequestSchema, response: TokenResponseSchema }),
|
|
600
682
|
refresh: endpoint({ method: "POST", path: "/auth/refresh", response: TokenResponseSchema }),
|
|
601
683
|
logout: endpoint({ method: "POST", path: "/auth/logout", response: NoContentSchema })
|
|
602
|
-
// test: endpoint({method: "GET", path: "/auth/test", response: TokenResponseSchema}) TODO: Dev에서만 작동하도록 백엔드에서 수정해야함
|
|
684
|
+
// test: endpoint({method: "GET", path: "/auth/test", response: TokenResponseSchema}) TODO: Dev에서만 작동하도록 백엔드에서 수정해야함
|
|
603
685
|
},
|
|
604
686
|
members: {
|
|
605
687
|
me: endpoint({ method: "GET", path: "/members/me", response: MemberResponseSchema }),
|
|
606
|
-
myProfile: endpoint({ method: "GET", path: "/members/me/
|
|
688
|
+
myProfile: endpoint({ method: "GET", path: "/members/me/profile", response: ProfileDetailResponseSchema }),
|
|
607
689
|
search: endpoint({ method: "GET", path: "/members/search", query: MemberSearchQuerySchema, response: MemberSerachResponseSchema }),
|
|
608
|
-
memberProfile: endpoint({ method: "GET", path: "/members/:memberId", pathParams: memberIdParam, response: ProfileDetailResponseSchema }),
|
|
609
|
-
presignProfileImage: endpoint({ method: "POST", path: "/uploads/presign-profile", response:
|
|
690
|
+
memberProfile: endpoint({ method: "GET", path: "/members/:memberId/profile", pathParams: memberIdParam, response: ProfileDetailResponseSchema }),
|
|
691
|
+
presignProfileImage: endpoint({ method: "POST", path: "/uploads/presign-profile", body: UploadProfileImageRequestSchema, response: UploadProfileImageResponseSchema }),
|
|
610
692
|
createProfile: endpoint({ method: "POST", path: "/members/onboarding", body: CreateProfileRequestSchema, response: NoContentSchema }),
|
|
611
693
|
updateProfile: endpoint({ method: "PATCH", path: "/members/me/profile", body: UpdateProfileRequestSchema, response: NoContentSchema })
|
|
612
694
|
},
|
|
@@ -615,9 +697,9 @@ var apiContract = {
|
|
|
615
697
|
update: endpoint({ method: "PATCH", path: "/preferences/me", body: UpdatePreferenceRequestSchema, response: NoContentSchema })
|
|
616
698
|
},
|
|
617
699
|
mealStatus: {
|
|
618
|
-
my: endpoint({ method: "GET", path: "/meal-status", response: MealStatusResponseSchema }),
|
|
619
|
-
updateMealStatus: endpoint({ method: "PATCH", path: "/meal-status", body: UpdateMealStatusRequestSchema, response: NoContentSchema }),
|
|
620
|
-
friendMealStatus: endpoint({ method: "GET", path: "/
|
|
700
|
+
my: endpoint({ method: "GET", path: "/members/me/meal-status", response: MealStatusResponseSchema }),
|
|
701
|
+
updateMealStatus: endpoint({ method: "PATCH", path: "/members/me/meal-status", body: UpdateMealStatusRequestSchema, response: NoContentSchema }),
|
|
702
|
+
friendMealStatus: endpoint({ method: "GET", path: "/friends/me/meals", query: FriendMealQuerySchema, response: import_zod20.z.array(FriendMealItemResponseSchema) })
|
|
621
703
|
},
|
|
622
704
|
articles: {
|
|
623
705
|
list: endpoint({ method: "GET", path: "/articles/home", query: ArticleListQuerySchema, response: PageArticleSummaryResponseSchema }),
|
|
@@ -627,7 +709,7 @@ var apiContract = {
|
|
|
627
709
|
create: endpoint({ method: "POST", path: "/articles", body: CreateArticleRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
628
710
|
like: endpoint({ method: "POST", path: "/articles/:articleId/like", pathParams: articleIdParam, response: ArticleLikeResponseSchema }),
|
|
629
711
|
createComment: endpoint({ method: "POST", path: "/articles/:articleId/comments", pathParams: articleIdParam, body: CreateCommentRequestSchema, response: CreatedEntityIdResponseSchema }),
|
|
630
|
-
presignArticleImage: endpoint({ method: "POST", path: "/uploads/presign-article", response:
|
|
712
|
+
presignArticleImage: endpoint({ method: "POST", path: "/uploads/presign-article", body: UploadArticleImageRequestSchema, response: UploadArticleImageResponseSchema }),
|
|
631
713
|
delete: endpoint({ method: "DELETE", path: "/articles/:articleId", pathParams: articleIdParam, response: NoContentSchema }),
|
|
632
714
|
deleteComment: endpoint({ method: "DELETE", path: "/articles/comments/:commentId", pathParams: commentIdParam, response: NoContentSchema })
|
|
633
715
|
// TODO: 게시물 수정 기능
|
|
@@ -636,25 +718,26 @@ var apiContract = {
|
|
|
636
718
|
list: endpoint({ method: "GET", path: "/recruits", query: RecruitListQuerySchema, response: RecruitListResponseSchema }),
|
|
637
719
|
create: endpoint({ method: "POST", path: "/recruits", body: CreateRecruitRequestSchema, response: CreateRecruitResponseSchema }),
|
|
638
720
|
join: endpoint({ method: "POST", path: "/recruits/:recruitId/join", pathParams: recruitIdParam, response: NoContentSchema }),
|
|
639
|
-
close: endpoint({ method: "
|
|
721
|
+
close: endpoint({ method: "POST", path: "/recruits/:recruitId/close", pathParams: recruitIdParam, response: NoContentSchema })
|
|
640
722
|
},
|
|
641
723
|
invitations: {
|
|
642
|
-
list: endpoint({ method: "GET", path: "/invitations", response:
|
|
724
|
+
list: endpoint({ method: "GET", path: "/invitations", response: import_zod20.z.array(InvitationListItemResponseSchema) }),
|
|
643
725
|
// TODO: Invitation Response 정하기 detail: endpoint({ method: "GET", path: "/invitations/:invitationId", pathParams: invitationIdParam, response: InvitationItemDetailResponseSchema }),
|
|
644
|
-
send: endpoint({ method: "POST", path: "/invitations", body: CreateInvitationRequestSchema, response: SendInvitationResponseSchema }),
|
|
726
|
+
send: endpoint({ method: "POST", path: "/invitations/send", body: CreateInvitationRequestSchema, response: SendInvitationResponseSchema }),
|
|
645
727
|
accept: endpoint({ method: "POST", path: "/invitations/:invitationId/accept", pathParams: invitationIdParam, response: AcceptInvitationResponseSchema }),
|
|
646
728
|
reject: endpoint({ method: "POST", path: "/invitations/:invitationId/reject", pathParams: invitationIdParam, response: NoContentSchema })
|
|
647
729
|
},
|
|
648
730
|
plans: {
|
|
649
|
-
list: endpoint({ method: "GET", path: "/plans", query: PlanListQuerySchema, response:
|
|
731
|
+
list: endpoint({ method: "GET", path: "/plans", query: PlanListQuerySchema, response: import_zod20.z.array(PlanResponseSchema) }),
|
|
650
732
|
detail: endpoint({ method: "GET", path: "/plans/:planId", pathParams: planIdParam, response: PlanResponseSchema }),
|
|
651
733
|
cancel: endpoint({ method: "PATCH", path: "/plans/:planId/cancel", pathParams: planIdParam, response: NoContentSchema })
|
|
652
734
|
},
|
|
653
735
|
friends: {
|
|
654
|
-
list: endpoint({ method: "GET", path: "/friends", response:
|
|
655
|
-
blockList: endpoint({ method: "GET", path: "/friends/blocks", response:
|
|
656
|
-
|
|
657
|
-
|
|
736
|
+
list: endpoint({ method: "GET", path: "/friends", response: import_zod20.z.array(FriendListItemResponseSchema) }),
|
|
737
|
+
blockList: endpoint({ method: "GET", path: "/friends/blocks", response: import_zod20.z.array(FriendBlockItemResponseSchema) }),
|
|
738
|
+
search: endpoint({ method: "GET", path: "/friends/search", query: MemberSearchQuerySchema, response: MemberSerachResponseSchema }),
|
|
739
|
+
incomingRequest: endpoint({ method: "GET", path: "/friends/requests/incoming", response: import_zod20.z.array(FriendRequestItemResponseSchema) }),
|
|
740
|
+
outgoingRequest: endpoint({ method: "GET", path: "/friends/requests/outgoing", response: import_zod20.z.array(FriendRequestItemResponseSchema) }),
|
|
658
741
|
sendRequest: endpoint({ method: "POST", path: "/friends/requests/:memberId", pathParams: memberIdParam, response: NoContentSchema }),
|
|
659
742
|
acceptRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/accept", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
660
743
|
rejectRequest: endpoint({ method: "POST", path: "/friends/requests/:requestId/reject", pathParams: friendRequestIdParam, response: NoContentSchema }),
|
|
@@ -664,52 +747,31 @@ var apiContract = {
|
|
|
664
747
|
unfriend: endpoint({ method: "DELETE", path: "/friends/:memberId", pathParams: memberIdParam, response: NoContentSchema })
|
|
665
748
|
},
|
|
666
749
|
coupons: {
|
|
667
|
-
list: endpoint({ method: "GET", path: "/coupons", response:
|
|
668
|
-
use: endpoint({ method: "
|
|
750
|
+
list: endpoint({ method: "GET", path: "/coupons", response: import_zod20.z.array(CouponResponseSchema) }),
|
|
751
|
+
use: endpoint({ method: "POST", path: "/coupons/:couponId/use", pathParams: couponIdParam, response: NoContentSchema })
|
|
669
752
|
},
|
|
670
753
|
challenges: {
|
|
671
754
|
status: endpoint({ method: "GET", path: "/challenges/status", response: ChallengeStatusResponseSchema }),
|
|
672
755
|
claimReward: endpoint({ method: "POST", path: "/challenges/rewards", body: ClaimChallengeRewardRequestSchema, response: NoContentSchema })
|
|
673
756
|
},
|
|
674
757
|
referrals: {
|
|
675
|
-
list: endpoint({ method: "GET", path: "/referrals", response:
|
|
758
|
+
list: endpoint({ method: "GET", path: "/referrals", response: import_zod20.z.array(ReferralItemResponseSchema) }),
|
|
676
759
|
create: endpoint({ method: "POST", path: "/referrals", response: ReferralCreateResponseSchema }),
|
|
677
760
|
redeem: endpoint({ method: "POST", path: "/referrals/redeem", body: RedeemReferralRequestSchema, response: NoContentSchema })
|
|
678
761
|
},
|
|
762
|
+
notifications: {
|
|
763
|
+
list: endpoint({ method: "GET", path: "/notifications", response: import_zod20.z.array(MatchingNotificationSchema) }),
|
|
764
|
+
markRead: endpoint({ method: "PATCH", path: "/notifications/:notificationId/read", pathParams: notificationIdParam, response: MatchingNotificationSchema }),
|
|
765
|
+
delete: endpoint({ method: "DELETE", path: "/notifications/:notificationId", pathParams: notificationIdParam, response: NoContentSchema })
|
|
766
|
+
},
|
|
679
767
|
room: {
|
|
680
|
-
|
|
768
|
+
access: endpoint({ method: "GET", path: "/rooms/:roomId/access", pathParams: roomIdParam, response: RoomAccessResponseSchema })
|
|
681
769
|
},
|
|
682
770
|
health: {
|
|
683
|
-
healthCheck: endpoint({ method: "GET", path: "/", response:
|
|
771
|
+
healthCheck: endpoint({ method: "GET", path: "/", response: import_zod20.z.string() })
|
|
684
772
|
}
|
|
685
773
|
};
|
|
686
774
|
|
|
687
|
-
// src/domain/common/schema/envelope.schema.ts
|
|
688
|
-
var import_zod20 = require("zod");
|
|
689
|
-
var NoContentSchema = import_zod20.z.null();
|
|
690
|
-
var ApiSuccessSchema = (data) => import_zod20.z.object({
|
|
691
|
-
success: import_zod20.z.literal(true),
|
|
692
|
-
code: import_zod20.z.number().int(),
|
|
693
|
-
message: import_zod20.z.string(),
|
|
694
|
-
data
|
|
695
|
-
});
|
|
696
|
-
var ApiFailureSchema = import_zod20.z.object({
|
|
697
|
-
success: import_zod20.z.literal(false),
|
|
698
|
-
status: import_zod20.z.number().int(),
|
|
699
|
-
code: import_zod20.z.string(),
|
|
700
|
-
message: import_zod20.z.string()
|
|
701
|
-
});
|
|
702
|
-
var ApiResponseSchema = (data) => import_zod20.z.union([ApiSuccessSchema(data), ApiFailureSchema]);
|
|
703
|
-
var CreatedEntityIdResponseSchema = import_zod20.z.discriminatedUnion("entity", [
|
|
704
|
-
import_zod20.z.object({ entity: import_zod20.z.literal("article"), id: ArticleIdSchema }),
|
|
705
|
-
import_zod20.z.object({ entity: import_zod20.z.literal("comment"), id: CommentIdSchema }),
|
|
706
|
-
import_zod20.z.object({ entity: import_zod20.z.literal("recruit"), id: RecruitIdSchema }),
|
|
707
|
-
import_zod20.z.object({ entity: import_zod20.z.literal("invitation"), id: InvitationIdSchema }),
|
|
708
|
-
import_zod20.z.object({ entity: import_zod20.z.literal("subscription"), id: SubscriptionIdSchema }),
|
|
709
|
-
import_zod20.z.object({ entity: import_zod20.z.literal("coupon"), id: CouponIdSchema }),
|
|
710
|
-
import_zod20.z.object({ entity: import_zod20.z.literal("plan"), id: PlanIdSchema })
|
|
711
|
-
]);
|
|
712
|
-
|
|
713
775
|
// src/domain/common/contracts/envelope.ts
|
|
714
776
|
var makeApiResponseSchema = ApiResponseSchema;
|
|
715
777
|
var makeApiSuccessSchema = ApiSuccessSchema;
|