@zyacreatives/shared 2.0.25 → 2.0.27

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.
@@ -86,7 +86,7 @@ export declare const PostWithFilesEntitySchema: z.ZodObject<{
86
86
  }, z.core.$strip>;
87
87
  export declare const CreatePostInputSchema: z.ZodObject<{
88
88
  parentId: z.ZodOptional<z.ZodCUID2>;
89
- content: z.ZodString;
89
+ content: z.ZodOptional<z.ZodString>;
90
90
  postType: z.ZodDefault<z.ZodEnum<{
91
91
  readonly MARKETPLACE: "MARKETPLACE";
92
92
  readonly PROJECT: "PROJECT";
@@ -321,4 +321,5 @@ export declare const FeedPostEntitySchema: z.ZodObject<{
321
321
  viewsCount: z.ZodNumber;
322
322
  commentsCount: z.ZodNumber;
323
323
  };
324
+ score: z.ZodNumber;
324
325
  }, z.core.$strip>;
@@ -82,10 +82,13 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
82
82
  .cuid2()
83
83
  .optional()
84
84
  .openapi({ description: "Parent id", example: "ckl1a2b3c0000abc" }),
85
- content: zod_openapi_1.z.string().openapi({
85
+ content: zod_openapi_1.z
86
+ .string()
87
+ .openapi({
86
88
  description: "Post content",
87
89
  example: "New project announcement",
88
- }),
90
+ })
91
+ .optional(),
89
92
  postType: zod_openapi_1.z
90
93
  .enum(constants_1.POST_TYPES)
91
94
  .default("DEFAULT_POST")
@@ -149,5 +152,6 @@ exports.LinkPreviewOutputSchema = zod_openapi_1.z.object({
149
152
  url: zod_openapi_1.z.string().optional(),
150
153
  });
151
154
  exports.FeedPostEntitySchema = exports.PostWithFilesEntitySchema.extend({
152
- stats: entity_stats_1.EntityStatsSchema.shape
155
+ stats: entity_stats_1.EntityStatsSchema.shape,
156
+ score: zod_openapi_1.z.number(),
153
157
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.0.25",
3
+ "version": "2.0.27",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,6 @@ export const PostEntitySchema = z.object({
20
20
  userId: z
21
21
  .cuid2()
22
22
  .openapi({ description: "User id", example: "ckj1a2b3c0000def" }),
23
-
24
23
  creatorUsername: z.string().optional().openapi({ description: "Username" }),
25
24
  creatorFullName: z.string().optional(),
26
25
  creatorImageUrl: z.cuid2().optional().openapi({ description: "Username" }),
@@ -89,10 +88,13 @@ export const CreatePostInputSchema = z.object({
89
88
  .cuid2()
90
89
  .optional()
91
90
  .openapi({ description: "Parent id", example: "ckl1a2b3c0000abc" }),
92
- content: z.string().openapi({
93
- description: "Post content",
94
- example: "New project announcement",
95
- }),
91
+ content: z
92
+ .string()
93
+ .openapi({
94
+ description: "Post content",
95
+ example: "New project announcement",
96
+ })
97
+ .optional(),
96
98
  postType: z
97
99
  .enum(POST_TYPES)
98
100
  .default("DEFAULT_POST")
@@ -164,7 +166,7 @@ export const LinkPreviewOutputSchema = z.object({
164
166
  url: z.string().optional(),
165
167
  });
166
168
 
167
-
168
169
  export const FeedPostEntitySchema = PostWithFilesEntitySchema.extend({
169
- stats: EntityStatsSchema.shape
170
- })
170
+ stats: EntityStatsSchema.shape,
171
+ score: z.number(),
172
+ });