@zyacreatives/shared 1.7.9 → 1.8.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/post.d.ts +32 -0
- package/dist/schemas/post.js +2 -1
- package/dist/types/post.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/post.ts +1 -0
- package/src/types/post.ts +2 -0
package/dist/schemas/post.d.ts
CHANGED
|
@@ -89,6 +89,38 @@ export declare const CreatePostOutputSchema: z.ZodObject<{
|
|
|
89
89
|
}>;
|
|
90
90
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
91
91
|
}, z.core.$strip>;
|
|
92
|
+
export declare const GetPostOutputSchema: z.ZodObject<{
|
|
93
|
+
id: z.ZodCUID2;
|
|
94
|
+
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
95
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
+
badge: z.ZodOptional<z.ZodString>;
|
|
97
|
+
userId: z.ZodCUID2;
|
|
98
|
+
content: z.ZodString;
|
|
99
|
+
title: z.ZodNullable<z.ZodString>;
|
|
100
|
+
postType: z.ZodEnum<{
|
|
101
|
+
readonly MARKETPLACE: "MARKETPLACE";
|
|
102
|
+
readonly PROJECT: "PROJECT";
|
|
103
|
+
readonly JOB_OPENING: "JOB_OPENING";
|
|
104
|
+
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
105
|
+
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
106
|
+
}>;
|
|
107
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
108
|
+
postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
postId: z.ZodString;
|
|
111
|
+
fileId: z.ZodString;
|
|
112
|
+
order: z.ZodNumber;
|
|
113
|
+
file: z.ZodObject<{
|
|
114
|
+
id: z.ZodCUID2;
|
|
115
|
+
key: z.ZodString;
|
|
116
|
+
mimeType: z.ZodString;
|
|
117
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
118
|
+
userId: z.ZodCUID2;
|
|
119
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
120
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
}, z.core.$strip>>>;
|
|
123
|
+
}, z.core.$strip>;
|
|
92
124
|
export declare const PostIdSchema: z.ZodObject<{
|
|
93
125
|
postId: z.ZodCUID2;
|
|
94
126
|
}, z.core.$strip>;
|
package/dist/schemas/post.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostWithBookmarksEntitySchema = exports.PostWithCommentsEntitySchema = exports.PostWithLikesEntitySchema = exports.MinimalPostSchema = exports.PostIdSchema = exports.CreatePostOutputSchema = exports.CreatePostInputSchema = exports.PostWithFilesEntitySchema = exports.PostFileEntitySchema = exports.PostEntitySchema = void 0;
|
|
3
|
+
exports.PostWithBookmarksEntitySchema = exports.PostWithCommentsEntitySchema = exports.PostWithLikesEntitySchema = exports.MinimalPostSchema = exports.PostIdSchema = exports.GetPostOutputSchema = exports.CreatePostOutputSchema = exports.CreatePostInputSchema = exports.PostWithFilesEntitySchema = exports.PostFileEntitySchema = exports.PostEntitySchema = 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");
|
|
@@ -85,6 +85,7 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
|
|
|
85
85
|
})),
|
|
86
86
|
});
|
|
87
87
|
exports.CreatePostOutputSchema = exports.PostEntitySchema;
|
|
88
|
+
exports.GetPostOutputSchema = exports.PostWithFilesEntitySchema;
|
|
88
89
|
exports.PostIdSchema = zod_openapi_1.z.object({ postId: zod_openapi_1.z.cuid2() });
|
|
89
90
|
exports.MinimalPostSchema = exports.PostEntitySchema.pick({
|
|
90
91
|
title: true,
|
package/dist/types/post.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { CreatePostInputSchema, CreatePostOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema } from "../schemas/post";
|
|
2
|
+
import { CreatePostInputSchema, CreatePostOutputSchema, GetPostOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema } from "../schemas/post";
|
|
3
3
|
export type PostEntity = z.infer<typeof PostEntitySchema>;
|
|
4
4
|
export type PostFileEntity = z.infer<typeof PostFileEntitySchema>;
|
|
5
5
|
export type PostWithFilesEntity = z.infer<typeof PostWithFilesEntitySchema>;
|
|
@@ -9,3 +9,4 @@ export type PostWithPostLikesEntity = z.infer<typeof PostWithLikesEntitySchema>;
|
|
|
9
9
|
export type PostWithPostBookmarksEntity = z.infer<typeof PostWithBookmarksEntitySchema>;
|
|
10
10
|
export type PostIdInput = z.infer<typeof PostIdSchema>;
|
|
11
11
|
export type PostWithPostCommentsEntity = z.infer<typeof PostWithCommentsEntitySchema>;
|
|
12
|
+
export type GetPostOutput = z.infer<typeof GetPostOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -91,6 +91,7 @@ export const CreatePostInputSchema = z.object({
|
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
export const CreatePostOutputSchema = PostEntitySchema;
|
|
94
|
+
export const GetPostOutputSchema = PostWithFilesEntitySchema;
|
|
94
95
|
export const PostIdSchema = z.object({ postId: z.cuid2() });
|
|
95
96
|
export const MinimalPostSchema = PostEntitySchema.pick({
|
|
96
97
|
title: true,
|
package/src/types/post.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from "@hono/zod-openapi";
|
|
|
2
2
|
import {
|
|
3
3
|
CreatePostInputSchema,
|
|
4
4
|
CreatePostOutputSchema,
|
|
5
|
+
GetPostOutputSchema,
|
|
5
6
|
PostEntitySchema,
|
|
6
7
|
PostFileEntitySchema,
|
|
7
8
|
PostIdSchema,
|
|
@@ -24,3 +25,4 @@ export type PostIdInput = z.infer<typeof PostIdSchema>;
|
|
|
24
25
|
export type PostWithPostCommentsEntity = z.infer<
|
|
25
26
|
typeof PostWithCommentsEntitySchema
|
|
26
27
|
>;
|
|
28
|
+
export type GetPostOutput = z.infer<typeof GetPostOutputSchema>;
|