@zyacreatives/shared 1.6.9 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/schemas/bookmark.d.ts +15 -0
- package/dist/schemas/bookmark.js +8 -1
- package/dist/schemas/comment.d.ts +24 -0
- package/dist/schemas/comment.js +12 -1
- package/dist/schemas/like.d.ts +15 -0
- package/dist/schemas/like.js +8 -1
- package/dist/schemas/project.d.ts +0 -49
- package/dist/schemas/project.js +1 -14
- package/dist/types/project.d.ts +1 -5
- package/package.json +1 -1
- package/src/schemas/bookmark.ts +9 -0
- package/src/schemas/comment.ts +14 -0
- package/src/schemas/like.ts +9 -0
- package/src/schemas/project.ts +0 -16
- package/src/types/project.ts +0 -15
|
@@ -6,3 +6,18 @@ export declare const BookmarkEntitySchema: z.ZodObject<{
|
|
|
6
6
|
parentId: z.ZodCUID2;
|
|
7
7
|
parentType: z.ZodString;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
|
+
export declare const BookmarkInputSchema: z.ZodObject<{
|
|
10
|
+
parentId: z.ZodString;
|
|
11
|
+
parentType: z.ZodEnum<{
|
|
12
|
+
readonly PROJECT: "PROJECT";
|
|
13
|
+
readonly POST: "POST";
|
|
14
|
+
}>;
|
|
15
|
+
userId: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const BookmarkOutputSchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodCUID2;
|
|
19
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
20
|
+
userId: z.ZodCUID2;
|
|
21
|
+
parentId: z.ZodCUID2;
|
|
22
|
+
parentType: z.ZodString;
|
|
23
|
+
}, z.core.$strip>;
|
package/dist/schemas/bookmark.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BookmarkEntitySchema = void 0;
|
|
3
|
+
exports.BookmarkOutputSchema = exports.BookmarkInputSchema = exports.BookmarkEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
5
6
|
exports.BookmarkEntitySchema = zod_openapi_1.z
|
|
6
7
|
.object({
|
|
7
8
|
id: zod_openapi_1.z.cuid2().openapi({
|
|
@@ -29,3 +30,9 @@ exports.BookmarkEntitySchema = zod_openapi_1.z
|
|
|
29
30
|
title: "Bookmark",
|
|
30
31
|
description: "Represents a user bookmark on a specific parent entity.",
|
|
31
32
|
});
|
|
33
|
+
exports.BookmarkInputSchema = zod_openapi_1.z.object({
|
|
34
|
+
parentId: zod_openapi_1.z.string(),
|
|
35
|
+
parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES),
|
|
36
|
+
userId: zod_openapi_1.z.string(),
|
|
37
|
+
});
|
|
38
|
+
exports.BookmarkOutputSchema = exports.BookmarkEntitySchema;
|
|
@@ -15,3 +15,27 @@ export declare const CommentEntitySchema: z.ZodObject<{
|
|
|
15
15
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
16
16
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
17
17
|
}, z.core.$strip>;
|
|
18
|
+
export declare const CommentInputSchema: z.ZodObject<{
|
|
19
|
+
content: z.ZodString;
|
|
20
|
+
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
21
|
+
replyToId: z.ZodOptional<z.ZodCUID2>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export declare const DeleteCommentInputSchema: z.ZodObject<{
|
|
24
|
+
commentId: z.ZodCUID2;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export declare const CommentOutputSchema: z.ZodObject<{
|
|
27
|
+
id: z.ZodCUID2;
|
|
28
|
+
userId: z.ZodCUID2;
|
|
29
|
+
parentId: z.ZodCUID2;
|
|
30
|
+
parentType: z.ZodEnum<{
|
|
31
|
+
readonly PROJECT: "PROJECT";
|
|
32
|
+
readonly POST: "POST";
|
|
33
|
+
}>;
|
|
34
|
+
content: z.ZodString;
|
|
35
|
+
commenterUsername: z.ZodString;
|
|
36
|
+
commenterName: z.ZodString;
|
|
37
|
+
commenterImageUrl: z.ZodOptional<z.ZodString>;
|
|
38
|
+
replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
|
|
39
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
40
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
41
|
+
}, z.core.$strip>;
|
package/dist/schemas/comment.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CommentEntitySchema = void 0;
|
|
6
|
+
exports.CommentOutputSchema = exports.DeleteCommentInputSchema = exports.CommentInputSchema = exports.CommentEntitySchema = void 0;
|
|
7
7
|
const zod_1 = __importDefault(require("zod"));
|
|
8
8
|
const constants_1 = require("../constants");
|
|
9
9
|
exports.CommentEntitySchema = zod_1.default.object({
|
|
@@ -45,3 +45,14 @@ exports.CommentEntitySchema = zod_1.default.object({
|
|
|
45
45
|
format: "date-time",
|
|
46
46
|
}),
|
|
47
47
|
});
|
|
48
|
+
exports.CommentInputSchema = zod_1.default
|
|
49
|
+
.object({
|
|
50
|
+
content: zod_1.default.string(),
|
|
51
|
+
parentCommentId: zod_1.default.cuid2().optional(),
|
|
52
|
+
replyToId: zod_1.default.cuid2().optional(),
|
|
53
|
+
})
|
|
54
|
+
.openapi({ title: "Comment on Project" });
|
|
55
|
+
exports.DeleteCommentInputSchema = zod_1.default.object({
|
|
56
|
+
commentId: zod_1.default.cuid2(),
|
|
57
|
+
});
|
|
58
|
+
exports.CommentOutputSchema = exports.CommentEntitySchema;
|
package/dist/schemas/like.d.ts
CHANGED
|
@@ -6,3 +6,18 @@ export declare const LikeEntitySchema: z.ZodObject<{
|
|
|
6
6
|
parentId: z.ZodCUID2;
|
|
7
7
|
parentType: z.ZodString;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
|
+
export declare const LikeInputSchema: z.ZodObject<{
|
|
10
|
+
parentId: z.ZodString;
|
|
11
|
+
parentType: z.ZodEnum<{
|
|
12
|
+
readonly PROJECT: "PROJECT";
|
|
13
|
+
readonly POST: "POST";
|
|
14
|
+
}>;
|
|
15
|
+
userId: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const LikeOutputSchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodCUID2;
|
|
19
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
20
|
+
userId: z.ZodCUID2;
|
|
21
|
+
parentId: z.ZodCUID2;
|
|
22
|
+
parentType: z.ZodString;
|
|
23
|
+
}, z.core.$strip>;
|
package/dist/schemas/like.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LikeEntitySchema = void 0;
|
|
3
|
+
exports.LikeOutputSchema = exports.LikeInputSchema = exports.LikeEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
5
6
|
exports.LikeEntitySchema = zod_openapi_1.z
|
|
6
7
|
.object({
|
|
7
8
|
id: zod_openapi_1.z.cuid2().openapi({
|
|
@@ -29,3 +30,9 @@ exports.LikeEntitySchema = zod_openapi_1.z
|
|
|
29
30
|
description: "Represents a single like event on a parent entity.",
|
|
30
31
|
title: "Like",
|
|
31
32
|
});
|
|
33
|
+
exports.LikeInputSchema = zod_openapi_1.z.object({
|
|
34
|
+
parentId: zod_openapi_1.z.string(),
|
|
35
|
+
parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES),
|
|
36
|
+
userId: zod_openapi_1.z.string(),
|
|
37
|
+
});
|
|
38
|
+
exports.LikeOutputSchema = exports.LikeEntitySchema;
|
|
@@ -155,13 +155,6 @@ export declare const ViewProjectInputSchema: z.ZodObject<{
|
|
|
155
155
|
viewedAt: z.ZodOptional<z.ZodDate>;
|
|
156
156
|
viewDate: z.ZodOptional<z.ZodDate>;
|
|
157
157
|
}, z.core.$strip>;
|
|
158
|
-
export declare const CommentOnProjectInputSchema: z.ZodObject<{
|
|
159
|
-
content: z.ZodString;
|
|
160
|
-
parentCommentId: z.ZodOptional<z.ZodCUID2>;
|
|
161
|
-
}, z.core.$strip>;
|
|
162
|
-
export declare const DeleteProjectCommentInputSchema: z.ZodObject<{
|
|
163
|
-
commentId: z.ZodCUID2;
|
|
164
|
-
}, z.core.$strip>;
|
|
165
158
|
export declare const CreateProjectOutputSchema: z.ZodObject<{
|
|
166
159
|
id: z.ZodString;
|
|
167
160
|
userId: z.ZodString;
|
|
@@ -220,38 +213,6 @@ export declare const UpdateProjectOutputSchema: z.ZodObject<{
|
|
|
220
213
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
221
214
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
222
215
|
}, z.core.$strip>;
|
|
223
|
-
export declare const CommentOnProjectOutputSchema: z.ZodObject<{
|
|
224
|
-
id: z.ZodCUID2;
|
|
225
|
-
userId: z.ZodCUID2;
|
|
226
|
-
parentId: z.ZodCUID2;
|
|
227
|
-
parentType: z.ZodEnum<{
|
|
228
|
-
readonly PROJECT: "PROJECT";
|
|
229
|
-
readonly POST: "POST";
|
|
230
|
-
}>;
|
|
231
|
-
content: z.ZodString;
|
|
232
|
-
commenterUsername: z.ZodString;
|
|
233
|
-
commenterName: z.ZodString;
|
|
234
|
-
commenterImageUrl: z.ZodOptional<z.ZodString>;
|
|
235
|
-
replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
|
|
236
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
237
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
238
|
-
}, z.core.$strip>;
|
|
239
|
-
export declare const DeleteProjectCommentOutputSchema: z.ZodObject<{
|
|
240
|
-
id: z.ZodCUID2;
|
|
241
|
-
userId: z.ZodCUID2;
|
|
242
|
-
parentId: z.ZodCUID2;
|
|
243
|
-
parentType: z.ZodEnum<{
|
|
244
|
-
readonly PROJECT: "PROJECT";
|
|
245
|
-
readonly POST: "POST";
|
|
246
|
-
}>;
|
|
247
|
-
content: z.ZodString;
|
|
248
|
-
commenterUsername: z.ZodString;
|
|
249
|
-
commenterName: z.ZodString;
|
|
250
|
-
commenterImageUrl: z.ZodOptional<z.ZodString>;
|
|
251
|
-
replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
|
|
252
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
253
|
-
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
254
|
-
}, z.core.$strip>;
|
|
255
216
|
export declare const DeleteProjectOutputSchema: z.ZodObject<{
|
|
256
217
|
id: z.ZodString;
|
|
257
218
|
userId: z.ZodString;
|
|
@@ -326,19 +287,9 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
|
|
|
326
287
|
}, z.core.$strip>;
|
|
327
288
|
}, z.core.$strip>>>;
|
|
328
289
|
}, z.core.$strip>;
|
|
329
|
-
export declare const BookmarkProjectOutputSchema: z.ZodObject<{
|
|
330
|
-
id: z.ZodCUID2;
|
|
331
|
-
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
332
|
-
userId: z.ZodCUID2;
|
|
333
|
-
parentId: z.ZodCUID2;
|
|
334
|
-
parentType: z.ZodString;
|
|
335
|
-
}, z.core.$strip>;
|
|
336
290
|
export declare const ProjectIdSchema: z.ZodObject<{
|
|
337
291
|
projectId: z.ZodCUID2;
|
|
338
292
|
}, z.core.$strip>;
|
|
339
|
-
export declare const CommentOnProjectParamsSchema: z.ZodObject<{
|
|
340
|
-
projectId: z.ZodCUID2;
|
|
341
|
-
}, z.core.$strip>;
|
|
342
293
|
export declare const MinimalProjectSchema: z.ZodObject<{
|
|
343
294
|
id: z.ZodString;
|
|
344
295
|
description: z.ZodOptional<z.ZodString>;
|
package/dist/schemas/project.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithProjectLikesEntitySchema = exports.ProjectWithProjectCommentsEntitySchema = exports.ProjectWithProjectViewsEntitySchema = exports.ListProjectsInputSchema = exports.MinimalProjectSchema = exports.
|
|
3
|
+
exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithProjectLikesEntitySchema = exports.ProjectWithProjectCommentsEntitySchema = exports.ProjectWithProjectViewsEntitySchema = exports.ListProjectsInputSchema = exports.MinimalProjectSchema = exports.ProjectIdSchema = exports.GetProjectOutputSchema = exports.DeleteProjectOutputSchema = exports.UpdateProjectOutputSchema = exports.CreateProjectOutputSchema = exports.ViewProjectInputSchema = exports.UpdateProjectInputSchema = exports.CreateProjectInputSchema = exports.ProjectUpdateOutputEntitySchema = exports.ProjectWithFilesEntitySchema = exports.ProjectSocialGraphEntitySchema = exports.ProjectFileEntitySchema = exports.ProjectEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const file_1 = require("./file");
|
|
@@ -215,24 +215,11 @@ exports.ViewProjectInputSchema = zod_openapi_1.z
|
|
|
215
215
|
viewDate: zod_openapi_1.z.date().optional(),
|
|
216
216
|
})
|
|
217
217
|
.openapi({ title: "View Project" });
|
|
218
|
-
exports.CommentOnProjectInputSchema = zod_openapi_1.z
|
|
219
|
-
.object({
|
|
220
|
-
content: zod_openapi_1.z.string(),
|
|
221
|
-
parentCommentId: zod_openapi_1.z.cuid2().optional(),
|
|
222
|
-
})
|
|
223
|
-
.openapi({ title: "Comment on Project" });
|
|
224
|
-
exports.DeleteProjectCommentInputSchema = zod_openapi_1.z.object({
|
|
225
|
-
commentId: zod_openapi_1.z.cuid2(),
|
|
226
|
-
});
|
|
227
218
|
exports.CreateProjectOutputSchema = exports.ProjectEntitySchema;
|
|
228
219
|
exports.UpdateProjectOutputSchema = exports.ProjectEntitySchema;
|
|
229
|
-
exports.CommentOnProjectOutputSchema = comment_1.CommentEntitySchema;
|
|
230
|
-
exports.DeleteProjectCommentOutputSchema = comment_1.CommentEntitySchema;
|
|
231
220
|
exports.DeleteProjectOutputSchema = exports.ProjectEntitySchema;
|
|
232
221
|
exports.GetProjectOutputSchema = exports.ProjectWithFilesEntitySchema;
|
|
233
|
-
exports.BookmarkProjectOutputSchema = bookmark_1.BookmarkEntitySchema;
|
|
234
222
|
exports.ProjectIdSchema = zod_openapi_1.z.object({ projectId: zod_openapi_1.z.cuid2() });
|
|
235
|
-
exports.CommentOnProjectParamsSchema = exports.ProjectIdSchema;
|
|
236
223
|
exports.MinimalProjectSchema = exports.ProjectEntitySchema.pick({
|
|
237
224
|
id: true,
|
|
238
225
|
title: true,
|
package/dist/types/project.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from "@hono/zod-openapi";
|
|
2
|
-
import type { ProjectEntitySchema, ProjectIdSchema, MinimalProjectSchema, ProjectFileEntitySchema, ProjectWithFilesEntitySchema, ProjectWithProjectViewsEntitySchema, ProjectWithProjectCommentsEntitySchema, ProjectWithProjectLikesEntitySchema, ProjectWithProjectBookmarksEntitySchema, CreateProjectInputSchema, CreateProjectOutputSchema, UpdateProjectInputSchema, UpdateProjectOutputSchema, DeleteProjectOutputSchema, GetProjectOutputSchema, ListProjectsInputSchema, ViewProjectInputSchema
|
|
2
|
+
import type { ProjectEntitySchema, ProjectIdSchema, MinimalProjectSchema, ProjectFileEntitySchema, ProjectWithFilesEntitySchema, ProjectWithProjectViewsEntitySchema, ProjectWithProjectCommentsEntitySchema, ProjectWithProjectLikesEntitySchema, ProjectWithProjectBookmarksEntitySchema, CreateProjectInputSchema, CreateProjectOutputSchema, UpdateProjectInputSchema, UpdateProjectOutputSchema, DeleteProjectOutputSchema, GetProjectOutputSchema, ListProjectsInputSchema, ViewProjectInputSchema } from "../schemas/project";
|
|
3
3
|
import { ViewEntitySchema } from "../schemas/view";
|
|
4
4
|
import { LikeEntitySchema } from "../schemas/like";
|
|
5
5
|
import { CommentEntitySchema } from "../schemas/comment";
|
|
@@ -23,7 +23,3 @@ export type DeleteProjectOutput = z.infer<typeof DeleteProjectOutputSchema>;
|
|
|
23
23
|
export type GetProjectOutput = z.infer<typeof GetProjectOutputSchema>;
|
|
24
24
|
export type ListProjectsInput = z.infer<typeof ListProjectsInputSchema>;
|
|
25
25
|
export type ViewProjectInput = z.infer<typeof ViewProjectInputSchema>;
|
|
26
|
-
export type CommentOnProjectInput = z.infer<typeof CommentOnProjectInputSchema>;
|
|
27
|
-
export type CommentOnProjectOutput = z.infer<typeof CommentOnProjectOutputSchema>;
|
|
28
|
-
export type DeleteProjectCommentOutput = z.infer<typeof DeleteProjectCommentOutputSchema>;
|
|
29
|
-
export type BookmarkProjectOutput = z.infer<typeof BookmarkProjectOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/bookmark.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
+
import { ACTIVITY_PARENT_TYPES } from "../constants";
|
|
2
3
|
|
|
3
4
|
export const BookmarkEntitySchema = z
|
|
4
5
|
.object({
|
|
@@ -27,3 +28,11 @@ export const BookmarkEntitySchema = z
|
|
|
27
28
|
title: "Bookmark",
|
|
28
29
|
description: "Represents a user bookmark on a specific parent entity.",
|
|
29
30
|
});
|
|
31
|
+
|
|
32
|
+
export const BookmarkInputSchema = z.object({
|
|
33
|
+
parentId: z.string(),
|
|
34
|
+
parentType: z.enum(ACTIVITY_PARENT_TYPES),
|
|
35
|
+
userId: z.string(),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const BookmarkOutputSchema = BookmarkEntitySchema;
|
package/src/schemas/comment.ts
CHANGED
|
@@ -42,3 +42,17 @@ export const CommentEntitySchema = z.object({
|
|
|
42
42
|
format: "date-time",
|
|
43
43
|
}),
|
|
44
44
|
});
|
|
45
|
+
|
|
46
|
+
export const CommentInputSchema = z
|
|
47
|
+
.object({
|
|
48
|
+
content: z.string(),
|
|
49
|
+
parentCommentId: z.cuid2().optional(),
|
|
50
|
+
replyToId: z.cuid2().optional(),
|
|
51
|
+
})
|
|
52
|
+
.openapi({ title: "Comment on Project" });
|
|
53
|
+
|
|
54
|
+
export const DeleteCommentInputSchema = z.object({
|
|
55
|
+
commentId: z.cuid2(),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export const CommentOutputSchema = CommentEntitySchema;
|
package/src/schemas/like.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
+
import { ACTIVITY_PARENT_TYPES } from "../constants";
|
|
2
3
|
|
|
3
4
|
export const LikeEntitySchema = z
|
|
4
5
|
.object({
|
|
@@ -27,3 +28,11 @@ export const LikeEntitySchema = z
|
|
|
27
28
|
description: "Represents a single like event on a parent entity.",
|
|
28
29
|
title: "Like",
|
|
29
30
|
});
|
|
31
|
+
|
|
32
|
+
export const LikeInputSchema = z.object({
|
|
33
|
+
parentId: z.string(),
|
|
34
|
+
parentType: z.enum(ACTIVITY_PARENT_TYPES),
|
|
35
|
+
userId: z.string(),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const LikeOutputSchema = LikeEntitySchema;
|
package/src/schemas/project.ts
CHANGED
|
@@ -226,28 +226,12 @@ export const ViewProjectInputSchema = z
|
|
|
226
226
|
})
|
|
227
227
|
.openapi({ title: "View Project" });
|
|
228
228
|
|
|
229
|
-
export const CommentOnProjectInputSchema = z
|
|
230
|
-
.object({
|
|
231
|
-
content: z.string(),
|
|
232
|
-
parentCommentId: z.cuid2().optional(),
|
|
233
|
-
})
|
|
234
|
-
.openapi({ title: "Comment on Project" });
|
|
235
|
-
|
|
236
|
-
export const DeleteProjectCommentInputSchema = z.object({
|
|
237
|
-
commentId: z.cuid2(),
|
|
238
|
-
});
|
|
239
|
-
|
|
240
229
|
export const CreateProjectOutputSchema = ProjectEntitySchema;
|
|
241
230
|
export const UpdateProjectOutputSchema = ProjectEntitySchema;
|
|
242
|
-
export const CommentOnProjectOutputSchema = CommentEntitySchema;
|
|
243
|
-
export const DeleteProjectCommentOutputSchema = CommentEntitySchema;
|
|
244
231
|
export const DeleteProjectOutputSchema = ProjectEntitySchema;
|
|
245
232
|
export const GetProjectOutputSchema = ProjectWithFilesEntitySchema;
|
|
246
|
-
export const BookmarkProjectOutputSchema = BookmarkEntitySchema;
|
|
247
233
|
|
|
248
234
|
export const ProjectIdSchema = z.object({ projectId: z.cuid2() });
|
|
249
|
-
export const CommentOnProjectParamsSchema = ProjectIdSchema;
|
|
250
|
-
|
|
251
235
|
export const MinimalProjectSchema = ProjectEntitySchema.pick({
|
|
252
236
|
id: true,
|
|
253
237
|
title: true,
|
package/src/types/project.ts
CHANGED
|
@@ -17,10 +17,6 @@ import type {
|
|
|
17
17
|
GetProjectOutputSchema,
|
|
18
18
|
ListProjectsInputSchema,
|
|
19
19
|
ViewProjectInputSchema,
|
|
20
|
-
CommentOnProjectInputSchema,
|
|
21
|
-
CommentOnProjectOutputSchema,
|
|
22
|
-
DeleteProjectCommentOutputSchema,
|
|
23
|
-
BookmarkProjectOutputSchema,
|
|
24
20
|
} from "../schemas/project";
|
|
25
21
|
import { ViewEntitySchema } from "../schemas/view";
|
|
26
22
|
import { LikeEntitySchema } from "../schemas/like";
|
|
@@ -60,14 +56,3 @@ export type DeleteProjectOutput = z.infer<typeof DeleteProjectOutputSchema>;
|
|
|
60
56
|
export type GetProjectOutput = z.infer<typeof GetProjectOutputSchema>;
|
|
61
57
|
export type ListProjectsInput = z.infer<typeof ListProjectsInputSchema>;
|
|
62
58
|
export type ViewProjectInput = z.infer<typeof ViewProjectInputSchema>;
|
|
63
|
-
|
|
64
|
-
export type CommentOnProjectInput = z.infer<typeof CommentOnProjectInputSchema>;
|
|
65
|
-
export type CommentOnProjectOutput = z.infer<
|
|
66
|
-
typeof CommentOnProjectOutputSchema
|
|
67
|
-
>;
|
|
68
|
-
|
|
69
|
-
export type DeleteProjectCommentOutput = z.infer<
|
|
70
|
-
typeof DeleteProjectCommentOutputSchema
|
|
71
|
-
>;
|
|
72
|
-
|
|
73
|
-
export type BookmarkProjectOutput = z.infer<typeof BookmarkProjectOutputSchema>;
|