@kimdaegyu/babmukdang-shared 1.0.7 → 1.1.1
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-4XAGRJUM.js +61 -0
- package/dist/chunk-5QLCZOPJ.js +34 -0
- package/dist/chunk-AATETFLU.js +312 -0
- package/dist/chunk-ADIREWTX.js +72 -0
- package/dist/chunk-ET2Z5ZYA.js +37 -0
- package/dist/chunk-HRM3FQPL.js +12 -0
- package/dist/chunk-JNJRBUKR.js +30 -0
- package/dist/chunk-M7HH7FMO.js +40 -0
- package/dist/chunk-NAPCX4Q6.js +183 -0
- package/dist/chunk-NCVWB52E.js +0 -0
- package/dist/chunk-NJTV6DRT.js +0 -0
- package/dist/chunk-O56CI56W.js +37 -0
- package/dist/chunk-PFSZSKD5.js +0 -0
- package/dist/chunk-RHQHBUO4.js +78 -0
- package/dist/chunk-XTBVYY5B.js +286 -0
- package/dist/chunk-XWTMYXPO.js +109 -0
- package/dist/chunk-YJ7RUOEJ.js +35 -0
- package/dist/domain/article/index.cjs +243 -0
- package/dist/domain/article/index.d.cts +952 -0
- package/dist/domain/article/index.d.ts +952 -0
- package/dist/domain/article/index.js +30 -0
- package/dist/domain/auth/index.cjs +141 -0
- package/dist/domain/auth/index.d.cts +72 -0
- package/dist/domain/auth/index.d.ts +72 -0
- package/dist/domain/auth/index.js +14 -0
- package/dist/domain/common/index.cjs +756 -0
- package/dist/domain/common/index.d.cts +2689 -0
- package/dist/domain/common/index.d.ts +2689 -0
- package/dist/domain/common/index.js +106 -0
- package/dist/domain/friend/index.cjs +148 -0
- package/dist/domain/friend/index.d.cts +117 -0
- package/dist/domain/friend/index.d.ts +117 -0
- package/dist/domain/friend/index.js +17 -0
- package/dist/domain/index.cjs +974 -0
- package/dist/domain/index.d.cts +14 -0
- package/dist/domain/index.d.ts +14 -0
- package/dist/domain/index.js +308 -0
- package/dist/domain/invitation/index.cjs +82 -0
- package/dist/domain/invitation/index.d.cts +64 -0
- package/dist/domain/invitation/index.d.ts +64 -0
- package/dist/domain/invitation/index.js +13 -0
- package/dist/domain/meal/index.cjs +154 -0
- package/dist/domain/meal/index.d.cts +66 -0
- package/dist/domain/meal/index.d.ts +66 -0
- package/dist/domain/meal/index.js +20 -0
- package/dist/domain/member/index.cjs +136 -0
- package/dist/domain/member/index.d.cts +332 -0
- package/dist/domain/member/index.d.ts +332 -0
- package/dist/domain/member/index.js +30 -0
- package/dist/domain/plan/index.cjs +278 -0
- package/dist/domain/plan/index.d.cts +178 -0
- package/dist/domain/plan/index.d.ts +178 -0
- package/dist/domain/plan/index.js +18 -0
- package/dist/domain/promotion/index.cjs +134 -0
- 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 +181 -0
- package/dist/domain/recruit/index.d.cts +130 -0
- package/dist/domain/recruit/index.d.ts +130 -0
- package/dist/domain/recruit/index.js +29 -0
- package/dist/domain/restaurant/index.cjs +85 -0
- package/dist/domain/restaurant/index.d.cts +82 -0
- package/dist/domain/restaurant/index.d.ts +82 -0
- package/dist/domain/restaurant/index.js +10 -0
- package/dist/domain/room/index.cjs +344 -0
- package/dist/domain/room/index.d.cts +1482 -0
- package/dist/domain/room/index.d.ts +1482 -0
- package/dist/domain/room/index.js +74 -0
- package/dist/id-_a-oManb.d.cts +58 -0
- package/dist/id-_a-oManb.d.ts +58 -0
- package/dist/index-CqcSqpDV.d.ts +286 -0
- package/dist/index-HEHaDbrV.d.cts +286 -0
- package/dist/index.cjs +825 -21
- package/dist/index.d.cts +108 -616
- package/dist/index.d.ts +108 -616
- package/dist/index.js +33 -36
- package/package.json +55 -39
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RestaurantSchema
|
|
3
|
+
} from "./chunk-ET2Z5ZYA.js";
|
|
4
|
+
import {
|
|
5
|
+
ISODateStringSchema,
|
|
6
|
+
ISODateTimeStringSchema
|
|
7
|
+
} from "./chunk-HRM3FQPL.js";
|
|
8
|
+
import {
|
|
9
|
+
MemberCoreSchema,
|
|
10
|
+
PresignUploadResponseSchema
|
|
11
|
+
} from "./chunk-ADIREWTX.js";
|
|
12
|
+
import {
|
|
13
|
+
ArticleIdSchema,
|
|
14
|
+
CommentIdSchema,
|
|
15
|
+
FoodSchema,
|
|
16
|
+
MemberIdSchema
|
|
17
|
+
} from "./chunk-4XAGRJUM.js";
|
|
18
|
+
|
|
19
|
+
// src/domain/article/article.schema.ts
|
|
20
|
+
import { z as z2 } from "zod";
|
|
21
|
+
|
|
22
|
+
// src/domain/common/schema/pagination.schema.ts
|
|
23
|
+
import { z } from "zod";
|
|
24
|
+
var PageQuerySchema = z.object({
|
|
25
|
+
page: z.number().int().min(0).optional().default(0),
|
|
26
|
+
size: z.number().int().min(1).max(100).optional().default(20)
|
|
27
|
+
});
|
|
28
|
+
var PageMetaSchema = z.object({
|
|
29
|
+
page: z.number().int().min(0),
|
|
30
|
+
size: z.number().int().min(1),
|
|
31
|
+
totalItems: z.number().int().min(0),
|
|
32
|
+
totalPages: z.number().int().min(0),
|
|
33
|
+
hasNext: z.boolean(),
|
|
34
|
+
hasPrevious: z.boolean()
|
|
35
|
+
});
|
|
36
|
+
var PageResponseSchema = (item) => z.object({
|
|
37
|
+
items: z.array(item),
|
|
38
|
+
meta: PageMetaSchema
|
|
39
|
+
});
|
|
40
|
+
var SortDirectionSchema = z.enum(["asc", "desc"]);
|
|
41
|
+
|
|
42
|
+
// src/domain/article/article.schema.ts
|
|
43
|
+
var ArticleSortBySchema = z2.enum(["createdAt", "likeCount", "commentCount"]);
|
|
44
|
+
var ArticleListQuerySchema = PageQuerySchema.extend({
|
|
45
|
+
sortBy: ArticleSortBySchema.optional().default("createdAt"),
|
|
46
|
+
direction: SortDirectionSchema.optional().default("desc")
|
|
47
|
+
});
|
|
48
|
+
var PresignArticleResponseSchema = PresignUploadResponseSchema.extend({});
|
|
49
|
+
var FoodAnalysisResultSchema = FoodSchema.extend({
|
|
50
|
+
confidence: z2.number().min(0).max(1),
|
|
51
|
+
tsUtc: ISODateTimeStringSchema.optional()
|
|
52
|
+
});
|
|
53
|
+
var CreateArticleRequestSchema = z2.object({
|
|
54
|
+
imageUrl: z2.string().url(),
|
|
55
|
+
mealDate: ISODateStringSchema,
|
|
56
|
+
restaurant: RestaurantSchema,
|
|
57
|
+
taggedMemberIds: z2.array(MemberIdSchema).default([]),
|
|
58
|
+
foodAnalysis: FoodAnalysisResultSchema.optional()
|
|
59
|
+
});
|
|
60
|
+
var CreateCommentRequestSchema = z2.object({
|
|
61
|
+
content: z2.string().min(1).max(500),
|
|
62
|
+
parentCommentId: CommentIdSchema.nullish()
|
|
63
|
+
});
|
|
64
|
+
var ArticleCommentSchema = z2.object({
|
|
65
|
+
commentId: CommentIdSchema,
|
|
66
|
+
author: MemberCoreSchema,
|
|
67
|
+
parentCommentId: CommentIdSchema.nullable(),
|
|
68
|
+
content: z2.string(),
|
|
69
|
+
createdAt: ISODateTimeStringSchema,
|
|
70
|
+
updatedAt: ISODateTimeStringSchema
|
|
71
|
+
});
|
|
72
|
+
var ArticleCoreSchema = z2.object({
|
|
73
|
+
articleId: ArticleIdSchema,
|
|
74
|
+
author: MemberCoreSchema,
|
|
75
|
+
imageUrl: z2.string().url(),
|
|
76
|
+
mealDate: ISODateStringSchema,
|
|
77
|
+
restaurant: RestaurantSchema,
|
|
78
|
+
createdAt: ISODateTimeStringSchema,
|
|
79
|
+
updatedAt: ISODateTimeStringSchema,
|
|
80
|
+
expiresAt: ISODateTimeStringSchema,
|
|
81
|
+
taggedMembers: z2.array(MemberCoreSchema)
|
|
82
|
+
});
|
|
83
|
+
var ArticleSummaryResponseSchema = ArticleCoreSchema.extend({
|
|
84
|
+
likeCount: z2.number().int().min(0),
|
|
85
|
+
commentCount: z2.number().int().min(0),
|
|
86
|
+
likedByMe: z2.boolean()
|
|
87
|
+
});
|
|
88
|
+
var ArticleDetailResponseSchema = ArticleSummaryResponseSchema.extend({
|
|
89
|
+
comments: z2.array(ArticleCommentSchema).optional()
|
|
90
|
+
});
|
|
91
|
+
var PageArticleSummaryResponseSchema = PageResponseSchema(ArticleSummaryResponseSchema);
|
|
92
|
+
|
|
93
|
+
export {
|
|
94
|
+
PageQuerySchema,
|
|
95
|
+
PageMetaSchema,
|
|
96
|
+
PageResponseSchema,
|
|
97
|
+
SortDirectionSchema,
|
|
98
|
+
ArticleSortBySchema,
|
|
99
|
+
ArticleListQuerySchema,
|
|
100
|
+
PresignArticleResponseSchema,
|
|
101
|
+
FoodAnalysisResultSchema,
|
|
102
|
+
CreateArticleRequestSchema,
|
|
103
|
+
CreateCommentRequestSchema,
|
|
104
|
+
ArticleCommentSchema,
|
|
105
|
+
ArticleCoreSchema,
|
|
106
|
+
ArticleSummaryResponseSchema,
|
|
107
|
+
ArticleDetailResponseSchema,
|
|
108
|
+
PageArticleSummaryResponseSchema
|
|
109
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ISODateTimeStringSchema
|
|
3
|
+
} from "./chunk-HRM3FQPL.js";
|
|
4
|
+
import {
|
|
5
|
+
MemberCoreSchema
|
|
6
|
+
} from "./chunk-ADIREWTX.js";
|
|
7
|
+
import {
|
|
8
|
+
FriendRequestIdSchema
|
|
9
|
+
} from "./chunk-4XAGRJUM.js";
|
|
10
|
+
|
|
11
|
+
// src/domain/friend/friend.schema.ts
|
|
12
|
+
import { z } from "zod";
|
|
13
|
+
var FriendRequestStatusSchema = z.enum(["PENDING", "ACCEPTED", "REJECTED", "CANCELED"]);
|
|
14
|
+
var FriendListItemResponseSchema = MemberCoreSchema.extend({
|
|
15
|
+
friendSince: ISODateTimeStringSchema
|
|
16
|
+
});
|
|
17
|
+
var FriendBlockItemResponseSchema = MemberCoreSchema.extend({
|
|
18
|
+
blockedAt: ISODateTimeStringSchema
|
|
19
|
+
});
|
|
20
|
+
var FriendRequestMemberSchema = MemberCoreSchema;
|
|
21
|
+
var FriendRequestItemResponseSchema = z.object({
|
|
22
|
+
requestId: FriendRequestIdSchema,
|
|
23
|
+
requester: FriendRequestMemberSchema,
|
|
24
|
+
recipient: FriendRequestMemberSchema,
|
|
25
|
+
status: FriendRequestStatusSchema,
|
|
26
|
+
requestedAt: ISODateTimeStringSchema
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
FriendRequestStatusSchema,
|
|
31
|
+
FriendListItemResponseSchema,
|
|
32
|
+
FriendBlockItemResponseSchema,
|
|
33
|
+
FriendRequestMemberSchema,
|
|
34
|
+
FriendRequestItemResponseSchema
|
|
35
|
+
};
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
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
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/domain/article/index.ts
|
|
31
|
+
var article_exports = {};
|
|
32
|
+
__export(article_exports, {
|
|
33
|
+
ArticleCommentSchema: () => ArticleCommentSchema,
|
|
34
|
+
ArticleCoreSchema: () => ArticleCoreSchema,
|
|
35
|
+
ArticleDetailResponseSchema: () => ArticleDetailResponseSchema,
|
|
36
|
+
ArticleListQuerySchema: () => ArticleListQuerySchema,
|
|
37
|
+
ArticleSortBySchema: () => ArticleSortBySchema,
|
|
38
|
+
ArticleSummaryResponseSchema: () => ArticleSummaryResponseSchema,
|
|
39
|
+
CreateArticleRequestSchema: () => CreateArticleRequestSchema,
|
|
40
|
+
CreateCommentRequestSchema: () => CreateCommentRequestSchema,
|
|
41
|
+
FoodAnalysisResultSchema: () => FoodAnalysisResultSchema,
|
|
42
|
+
PageArticleSummaryResponseSchema: () => PageArticleSummaryResponseSchema,
|
|
43
|
+
PresignArticleResponseSchema: () => PresignArticleResponseSchema
|
|
44
|
+
});
|
|
45
|
+
module.exports = __toCommonJS(article_exports);
|
|
46
|
+
|
|
47
|
+
// src/domain/article/article.schema.ts
|
|
48
|
+
var import_zod7 = require("zod");
|
|
49
|
+
|
|
50
|
+
// src/domain/common/schema/date.schema.ts
|
|
51
|
+
var import_zod = require("zod");
|
|
52
|
+
var isoDateRegex = /^\d{4}-\d{2}-\d{2}$/;
|
|
53
|
+
var ISODateStringSchema = import_zod.z.string().regex(isoDateRegex, "Expected ISO date string in YYYY-MM-DD format");
|
|
54
|
+
var ISODateTimeStringSchema = import_zod.z.string().datetime({ offset: true, message: "Expected ISO datetime string" });
|
|
55
|
+
var TimeHHmmStringSchema = import_zod.z.string().regex(/^\d{2}:\d{2}$/, "Expected time string in HH:mm format");
|
|
56
|
+
|
|
57
|
+
// src/domain/common/schema/id.schema.ts
|
|
58
|
+
var import_zod2 = require("zod");
|
|
59
|
+
var PositiveIntIdSchema = import_zod2.z.number().int().positive();
|
|
60
|
+
var NonEmptyStringIdSchema = import_zod2.z.string().min(1);
|
|
61
|
+
var MemberIdSchema = PositiveIntIdSchema.brand();
|
|
62
|
+
var ArticleIdSchema = PositiveIntIdSchema.brand();
|
|
63
|
+
var CommentIdSchema = PositiveIntIdSchema.brand();
|
|
64
|
+
var RecruitIdSchema = PositiveIntIdSchema.brand();
|
|
65
|
+
var PlanIdSchema = PositiveIntIdSchema.brand();
|
|
66
|
+
var InvitationIdSchema = PositiveIntIdSchema.brand();
|
|
67
|
+
var RoomIdSchema = NonEmptyStringIdSchema.brand();
|
|
68
|
+
var RestaurantIdSchema = NonEmptyStringIdSchema.brand();
|
|
69
|
+
var CouponIdSchema = PositiveIntIdSchema.brand();
|
|
70
|
+
var SubscriptionIdSchema = PositiveIntIdSchema.brand();
|
|
71
|
+
var FriendRequestIdSchema = PositiveIntIdSchema.brand();
|
|
72
|
+
var ReferralCodeSchema = import_zod2.z.string().min(4).max(64).brand();
|
|
73
|
+
var FoodCodeSchema = NonEmptyStringIdSchema.brand();
|
|
74
|
+
var FoodLabelSchema = NonEmptyStringIdSchema.brand();
|
|
75
|
+
var FoodSchema = import_zod2.z.object({
|
|
76
|
+
code: FoodCodeSchema,
|
|
77
|
+
label: FoodLabelSchema
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// src/domain/common/schema/pagination.schema.ts
|
|
81
|
+
var import_zod3 = require("zod");
|
|
82
|
+
var PageQuerySchema = import_zod3.z.object({
|
|
83
|
+
page: import_zod3.z.number().int().min(0).optional().default(0),
|
|
84
|
+
size: import_zod3.z.number().int().min(1).max(100).optional().default(20)
|
|
85
|
+
});
|
|
86
|
+
var PageMetaSchema = import_zod3.z.object({
|
|
87
|
+
page: import_zod3.z.number().int().min(0),
|
|
88
|
+
size: import_zod3.z.number().int().min(1),
|
|
89
|
+
totalItems: import_zod3.z.number().int().min(0),
|
|
90
|
+
totalPages: import_zod3.z.number().int().min(0),
|
|
91
|
+
hasNext: import_zod3.z.boolean(),
|
|
92
|
+
hasPrevious: import_zod3.z.boolean()
|
|
93
|
+
});
|
|
94
|
+
var PageResponseSchema = (item) => import_zod3.z.object({
|
|
95
|
+
items: import_zod3.z.array(item),
|
|
96
|
+
meta: PageMetaSchema
|
|
97
|
+
});
|
|
98
|
+
var SortDirectionSchema = import_zod3.z.enum(["asc", "desc"]);
|
|
99
|
+
|
|
100
|
+
// src/domain/member/member.schema.ts
|
|
101
|
+
var import_zod5 = require("zod");
|
|
102
|
+
|
|
103
|
+
// src/domain/common/contracts/upload.ts
|
|
104
|
+
var import_zod4 = __toESM(require("zod"), 1);
|
|
105
|
+
var PresignUploadResponseSchema = import_zod4.default.object({
|
|
106
|
+
key: import_zod4.default.string(),
|
|
107
|
+
putUrl: import_zod4.default.string().url(),
|
|
108
|
+
cdnUrl: import_zod4.default.string().url()
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// src/domain/member/member.schema.ts
|
|
112
|
+
var MemberRoleSchema = import_zod5.z.enum(["USER", "ADMIN"]);
|
|
113
|
+
var MemberCoreSchema = import_zod5.z.object({
|
|
114
|
+
memberId: MemberIdSchema,
|
|
115
|
+
username: import_zod5.z.string().min(1).max(50),
|
|
116
|
+
profileImageUrl: import_zod5.z.string().url().nullable().optional()
|
|
117
|
+
});
|
|
118
|
+
var PresignProfileResponseSchema = PresignUploadResponseSchema.extend({});
|
|
119
|
+
var MemberResponseSchema = MemberCoreSchema.pick({
|
|
120
|
+
memberId: true,
|
|
121
|
+
username: true,
|
|
122
|
+
profileImageUrl: true
|
|
123
|
+
});
|
|
124
|
+
var MemberSearchQuerySchema = import_zod5.z.object({
|
|
125
|
+
email: import_zod5.z.string().email().optional(),
|
|
126
|
+
username: import_zod5.z.string().optional()
|
|
127
|
+
});
|
|
128
|
+
var MemberSerachResponseSchema = import_zod5.z.array(MemberCoreSchema);
|
|
129
|
+
var MemberDetailSchema = MemberCoreSchema.extend({
|
|
130
|
+
bio: import_zod5.z.string().nullable(),
|
|
131
|
+
friendConunt: import_zod5.z.number().int().min(0).default(0),
|
|
132
|
+
completedPlans: import_zod5.z.number().int().min(0).default(0),
|
|
133
|
+
uncompletedPlans: import_zod5.z.number().int().min(0).default(0)
|
|
134
|
+
});
|
|
135
|
+
var FoodPreferenceItemSchema = FoodSchema.extend({});
|
|
136
|
+
var MemberFoodPreferenceSchema = import_zod5.z.object({
|
|
137
|
+
liked: import_zod5.z.array(FoodPreferenceItemSchema).optional(),
|
|
138
|
+
disliked: import_zod5.z.array(FoodPreferenceItemSchema).optional(),
|
|
139
|
+
allergy: import_zod5.z.array(FoodPreferenceItemSchema).optional()
|
|
140
|
+
});
|
|
141
|
+
var UpdateProfileRequestSchema = import_zod5.z.object({
|
|
142
|
+
username: import_zod5.z.string().min(1).max(50),
|
|
143
|
+
profileImageUrl: import_zod5.z.string().url().nullable(),
|
|
144
|
+
bio: import_zod5.z.string().max(500).nullable()
|
|
145
|
+
});
|
|
146
|
+
var UpdatePreferenceRequestSchema = MemberFoodPreferenceSchema;
|
|
147
|
+
var CreateProfileRequestSchema = UpdateProfileRequestSchema.merge(
|
|
148
|
+
UpdatePreferenceRequestSchema
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
// src/domain/restaurant/restaurant.schema.ts
|
|
152
|
+
var import_zod6 = require("zod");
|
|
153
|
+
var RestaurantSchema = import_zod6.z.object({
|
|
154
|
+
restaurantId: RestaurantIdSchema,
|
|
155
|
+
placeName: import_zod6.z.string(),
|
|
156
|
+
categoryName: import_zod6.z.string(),
|
|
157
|
+
categoryGroupName: import_zod6.z.string(),
|
|
158
|
+
distance: import_zod6.z.string().optional(),
|
|
159
|
+
roadAddressName: import_zod6.z.string(),
|
|
160
|
+
addressName: import_zod6.z.string(),
|
|
161
|
+
phone: import_zod6.z.string().nullable(),
|
|
162
|
+
placeUrl: import_zod6.z.string().url().nullable(),
|
|
163
|
+
lat: import_zod6.z.number(),
|
|
164
|
+
lng: import_zod6.z.number()
|
|
165
|
+
});
|
|
166
|
+
var KakaoPlaceRawSchema = import_zod6.z.object({
|
|
167
|
+
id: RestaurantIdSchema,
|
|
168
|
+
place_name: import_zod6.z.string(),
|
|
169
|
+
category_name: import_zod6.z.string(),
|
|
170
|
+
category_group_name: import_zod6.z.string(),
|
|
171
|
+
distance: import_zod6.z.string(),
|
|
172
|
+
road_address_name: import_zod6.z.string(),
|
|
173
|
+
address_name: import_zod6.z.string(),
|
|
174
|
+
phone: import_zod6.z.string(),
|
|
175
|
+
place_url: import_zod6.z.string().url().optional(),
|
|
176
|
+
lat: import_zod6.z.number(),
|
|
177
|
+
lng: import_zod6.z.number()
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// src/domain/article/article.schema.ts
|
|
181
|
+
var ArticleSortBySchema = import_zod7.z.enum(["createdAt", "likeCount", "commentCount"]);
|
|
182
|
+
var ArticleListQuerySchema = PageQuerySchema.extend({
|
|
183
|
+
sortBy: ArticleSortBySchema.optional().default("createdAt"),
|
|
184
|
+
direction: SortDirectionSchema.optional().default("desc")
|
|
185
|
+
});
|
|
186
|
+
var PresignArticleResponseSchema = PresignUploadResponseSchema.extend({});
|
|
187
|
+
var FoodAnalysisResultSchema = FoodSchema.extend({
|
|
188
|
+
confidence: import_zod7.z.number().min(0).max(1),
|
|
189
|
+
tsUtc: ISODateTimeStringSchema.optional()
|
|
190
|
+
});
|
|
191
|
+
var CreateArticleRequestSchema = import_zod7.z.object({
|
|
192
|
+
imageUrl: import_zod7.z.string().url(),
|
|
193
|
+
mealDate: ISODateStringSchema,
|
|
194
|
+
restaurant: RestaurantSchema,
|
|
195
|
+
taggedMemberIds: import_zod7.z.array(MemberIdSchema).default([]),
|
|
196
|
+
foodAnalysis: FoodAnalysisResultSchema.optional()
|
|
197
|
+
});
|
|
198
|
+
var CreateCommentRequestSchema = import_zod7.z.object({
|
|
199
|
+
content: import_zod7.z.string().min(1).max(500),
|
|
200
|
+
parentCommentId: CommentIdSchema.nullish()
|
|
201
|
+
});
|
|
202
|
+
var ArticleCommentSchema = import_zod7.z.object({
|
|
203
|
+
commentId: CommentIdSchema,
|
|
204
|
+
author: MemberCoreSchema,
|
|
205
|
+
parentCommentId: CommentIdSchema.nullable(),
|
|
206
|
+
content: import_zod7.z.string(),
|
|
207
|
+
createdAt: ISODateTimeStringSchema,
|
|
208
|
+
updatedAt: ISODateTimeStringSchema
|
|
209
|
+
});
|
|
210
|
+
var ArticleCoreSchema = import_zod7.z.object({
|
|
211
|
+
articleId: ArticleIdSchema,
|
|
212
|
+
author: MemberCoreSchema,
|
|
213
|
+
imageUrl: import_zod7.z.string().url(),
|
|
214
|
+
mealDate: ISODateStringSchema,
|
|
215
|
+
restaurant: RestaurantSchema,
|
|
216
|
+
createdAt: ISODateTimeStringSchema,
|
|
217
|
+
updatedAt: ISODateTimeStringSchema,
|
|
218
|
+
expiresAt: ISODateTimeStringSchema,
|
|
219
|
+
taggedMembers: import_zod7.z.array(MemberCoreSchema)
|
|
220
|
+
});
|
|
221
|
+
var ArticleSummaryResponseSchema = ArticleCoreSchema.extend({
|
|
222
|
+
likeCount: import_zod7.z.number().int().min(0),
|
|
223
|
+
commentCount: import_zod7.z.number().int().min(0),
|
|
224
|
+
likedByMe: import_zod7.z.boolean()
|
|
225
|
+
});
|
|
226
|
+
var ArticleDetailResponseSchema = ArticleSummaryResponseSchema.extend({
|
|
227
|
+
comments: import_zod7.z.array(ArticleCommentSchema).optional()
|
|
228
|
+
});
|
|
229
|
+
var PageArticleSummaryResponseSchema = PageResponseSchema(ArticleSummaryResponseSchema);
|
|
230
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
231
|
+
0 && (module.exports = {
|
|
232
|
+
ArticleCommentSchema,
|
|
233
|
+
ArticleCoreSchema,
|
|
234
|
+
ArticleDetailResponseSchema,
|
|
235
|
+
ArticleListQuerySchema,
|
|
236
|
+
ArticleSortBySchema,
|
|
237
|
+
ArticleSummaryResponseSchema,
|
|
238
|
+
CreateArticleRequestSchema,
|
|
239
|
+
CreateCommentRequestSchema,
|
|
240
|
+
FoodAnalysisResultSchema,
|
|
241
|
+
PageArticleSummaryResponseSchema,
|
|
242
|
+
PresignArticleResponseSchema
|
|
243
|
+
});
|