@zyacreatives/shared 2.0.52 → 2.0.53
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 +24 -6
- package/dist/schemas/post.js +7 -2
- package/package.json +1 -1
- package/src/schemas/post.ts +10 -3
package/dist/schemas/post.d.ts
CHANGED
|
@@ -2,7 +2,10 @@ import { z } from "@hono/zod-openapi";
|
|
|
2
2
|
export declare const PostEntitySchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodCUID2;
|
|
4
4
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
5
|
-
tags: z.ZodOptional<z.ZodArray<z.
|
|
5
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
id: z.ZodInt;
|
|
8
|
+
}, z.core.$strip>>>;
|
|
6
9
|
badge: z.ZodOptional<z.ZodEnum<{
|
|
7
10
|
readonly NETWORKING: "Networking";
|
|
8
11
|
readonly FUNDING: "Funding";
|
|
@@ -44,7 +47,10 @@ export declare const PostFileEntitySchema: z.ZodObject<{
|
|
|
44
47
|
export declare const PostWithFilesEntitySchema: z.ZodObject<{
|
|
45
48
|
id: z.ZodCUID2;
|
|
46
49
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
47
|
-
tags: z.ZodOptional<z.ZodArray<z.
|
|
50
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
id: z.ZodInt;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
48
54
|
badge: z.ZodOptional<z.ZodEnum<{
|
|
49
55
|
readonly NETWORKING: "Networking";
|
|
50
56
|
readonly FUNDING: "Funding";
|
|
@@ -122,7 +128,10 @@ export declare const CreatePostInputSchema: z.ZodObject<{
|
|
|
122
128
|
export declare const CreatePostOutputSchema: z.ZodObject<{
|
|
123
129
|
id: z.ZodCUID2;
|
|
124
130
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
125
|
-
tags: z.ZodOptional<z.ZodArray<z.
|
|
131
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
id: z.ZodInt;
|
|
134
|
+
}, z.core.$strip>>>;
|
|
126
135
|
badge: z.ZodOptional<z.ZodEnum<{
|
|
127
136
|
readonly NETWORKING: "Networking";
|
|
128
137
|
readonly FUNDING: "Funding";
|
|
@@ -158,7 +167,10 @@ export declare const CreatePostOutputSchema: z.ZodObject<{
|
|
|
158
167
|
export declare const GetPostOutputSchema: z.ZodObject<{
|
|
159
168
|
id: z.ZodCUID2;
|
|
160
169
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
161
|
-
tags: z.ZodOptional<z.ZodArray<z.
|
|
170
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
171
|
+
name: z.ZodString;
|
|
172
|
+
id: z.ZodInt;
|
|
173
|
+
}, z.core.$strip>>>;
|
|
162
174
|
badge: z.ZodOptional<z.ZodEnum<{
|
|
163
175
|
readonly NETWORKING: "Networking";
|
|
164
176
|
readonly FUNDING: "Funding";
|
|
@@ -269,7 +281,10 @@ export declare const LinkPreviewOutputSchema: z.ZodObject<{
|
|
|
269
281
|
export declare const FeedPostEntitySchema: z.ZodObject<{
|
|
270
282
|
id: z.ZodCUID2;
|
|
271
283
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
272
|
-
tags: z.ZodOptional<z.ZodArray<z.
|
|
284
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
285
|
+
name: z.ZodString;
|
|
286
|
+
id: z.ZodInt;
|
|
287
|
+
}, z.core.$strip>>>;
|
|
273
288
|
badge: z.ZodOptional<z.ZodEnum<{
|
|
274
289
|
readonly NETWORKING: "Networking";
|
|
275
290
|
readonly FUNDING: "Funding";
|
|
@@ -333,7 +348,10 @@ export declare const GetFeedInputSchema: z.ZodObject<{
|
|
|
333
348
|
export declare const GetFeedOutputSchema: z.ZodArray<z.ZodObject<{
|
|
334
349
|
id: z.ZodCUID2;
|
|
335
350
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
336
|
-
tags: z.ZodOptional<z.ZodArray<z.
|
|
351
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
352
|
+
name: z.ZodString;
|
|
353
|
+
id: z.ZodInt;
|
|
354
|
+
}, z.core.$strip>>>;
|
|
337
355
|
badge: z.ZodOptional<z.ZodEnum<{
|
|
338
356
|
readonly NETWORKING: "Networking";
|
|
339
357
|
readonly FUNDING: "Funding";
|
package/dist/schemas/post.js
CHANGED
|
@@ -16,7 +16,12 @@ exports.PostEntitySchema = zod_openapi_1.z.object({
|
|
|
16
16
|
.cuid2()
|
|
17
17
|
.optional()
|
|
18
18
|
.openapi({ description: "Parent id", example: "ckj1a2b3c0000abc" }),
|
|
19
|
-
tags: zod_openapi_1.z
|
|
19
|
+
tags: zod_openapi_1.z
|
|
20
|
+
.array(zod_openapi_1.z.object({
|
|
21
|
+
name: zod_openapi_1.z.string(),
|
|
22
|
+
id: zod_openapi_1.z.int(),
|
|
23
|
+
}))
|
|
24
|
+
.optional(),
|
|
20
25
|
badge: zod_openapi_1.z.enum(constants_1.POST_BADGE_TYPES).optional(),
|
|
21
26
|
userId: zod_openapi_1.z
|
|
22
27
|
.cuid2()
|
|
@@ -156,7 +161,7 @@ exports.FeedPostEntitySchema = exports.PostWithFilesEntitySchema.extend({
|
|
|
156
161
|
score: zod_openapi_1.z.number(),
|
|
157
162
|
isLiked: zod_openapi_1.z.boolean().optional(),
|
|
158
163
|
isFollowing: zod_openapi_1.z.boolean().optional(),
|
|
159
|
-
isBookmarked: zod_openapi_1.z.boolean().optional()
|
|
164
|
+
isBookmarked: zod_openapi_1.z.boolean().optional(),
|
|
160
165
|
});
|
|
161
166
|
exports.GetFeedInputSchema = zod_openapi_1.z.object({
|
|
162
167
|
limit: zod_openapi_1.z.number().optional(),
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -15,7 +15,14 @@ export const PostEntitySchema = z.object({
|
|
|
15
15
|
.optional()
|
|
16
16
|
.openapi({ description: "Parent id", example: "ckj1a2b3c0000abc" }),
|
|
17
17
|
|
|
18
|
-
tags: z
|
|
18
|
+
tags: z
|
|
19
|
+
.array(
|
|
20
|
+
z.object({
|
|
21
|
+
name: z.string(),
|
|
22
|
+
id: z.int(),
|
|
23
|
+
})
|
|
24
|
+
)
|
|
25
|
+
.optional(),
|
|
19
26
|
badge: z.enum(POST_BADGE_TYPES).optional(),
|
|
20
27
|
userId: z
|
|
21
28
|
.cuid2()
|
|
@@ -171,7 +178,7 @@ export const FeedPostEntitySchema = PostWithFilesEntitySchema.extend({
|
|
|
171
178
|
score: z.number(),
|
|
172
179
|
isLiked: z.boolean().optional(),
|
|
173
180
|
isFollowing: z.boolean().optional(),
|
|
174
|
-
isBookmarked: z.boolean().optional()
|
|
181
|
+
isBookmarked: z.boolean().optional(),
|
|
175
182
|
});
|
|
176
183
|
|
|
177
184
|
export const GetFeedInputSchema = z.object({
|
|
@@ -179,4 +186,4 @@ export const GetFeedInputSchema = z.object({
|
|
|
179
186
|
cursor: z.string().optional(),
|
|
180
187
|
});
|
|
181
188
|
|
|
182
|
-
export const GetFeedOutputSchema = z.array(FeedPostEntitySchema)
|
|
189
|
+
export const GetFeedOutputSchema = z.array(FeedPostEntitySchema);
|