@zyacreatives/shared 2.0.21 → 2.0.23

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.
@@ -102,7 +102,22 @@ export declare const CreatePostInputSchema: z.ZodObject<{
102
102
  order: z.ZodDefault<z.ZodInt>;
103
103
  }, z.core.$strip>>>;
104
104
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
- badge: z.ZodOptional<z.ZodString>;
105
+ badge: z.ZodOptional<z.ZodEnum<{
106
+ readonly NETWORKING: "Networking";
107
+ readonly FUNDING: "Funding";
108
+ readonly COLLABORATION: "Collaboration";
109
+ readonly OPPORTUNITIES: "Opportunities";
110
+ readonly SHOWCASE: "Showcase";
111
+ readonly LEARNING: "Learning";
112
+ readonly DISCUSSION: "Discussion";
113
+ readonly MENTORSHIP: "Mentorship";
114
+ }>>;
115
+ linkMeta: z.ZodOptional<z.ZodObject<{
116
+ url: z.ZodURL;
117
+ title: z.ZodOptional<z.ZodString>;
118
+ description: z.ZodOptional<z.ZodString>;
119
+ image: z.ZodOptional<z.ZodURL>;
120
+ }, z.core.$strip>>;
106
121
  }, z.core.$strip>;
107
122
  export declare const CreatePostOutputSchema: z.ZodObject<{
108
123
  id: z.ZodCUID2;
@@ -103,7 +103,24 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
103
103
  }))
104
104
  .optional(),
105
105
  tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
106
- badge: zod_openapi_1.z.string().optional(),
106
+ badge: zod_openapi_1.z.enum(constants_1.POST_BADGE_TYPES).optional(),
107
+ linkMeta: zod_openapi_1.z
108
+ .object({
109
+ url: zod_openapi_1.z.url(),
110
+ title: zod_openapi_1.z.string().optional(),
111
+ description: zod_openapi_1.z.string().optional(),
112
+ image: zod_openapi_1.z.url().optional(),
113
+ })
114
+ .optional()
115
+ .openapi({
116
+ description: "Optional metadata for a single link in the post",
117
+ example: {
118
+ url: "https://example.com",
119
+ title: "Example Website",
120
+ description: "This is an example link",
121
+ image: "https://example.com/preview.jpg",
122
+ },
123
+ }),
107
124
  });
108
125
  exports.CreatePostOutputSchema = exports.PostEntitySchema;
109
126
  exports.GetPostOutputSchema = exports.PostWithFilesEntitySchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.0.21",
3
+ "version": "2.0.23",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,7 +23,6 @@ export const PostEntitySchema = z.object({
23
23
  creatorUsername: z.string().optional().openapi({ description: "Username" }),
24
24
  creatorFullName: z.string().optional(),
25
25
  creatorImageUrl: z.cuid2().optional().openapi({ description: "Username" }),
26
-
27
26
  content: z
28
27
  .string()
29
28
  .openapi({ description: "Post content", example: "Hello world" }),
@@ -115,7 +114,24 @@ export const CreatePostInputSchema = z.object({
115
114
  )
116
115
  .optional(),
117
116
  tags: z.array(z.string()).optional(),
118
- badge: z.string().optional(),
117
+ badge: z.enum(POST_BADGE_TYPES).optional(),
118
+ linkMeta: z
119
+ .object({
120
+ url: z.url(),
121
+ title: z.string().optional(),
122
+ description: z.string().optional(),
123
+ image: z.url().optional(),
124
+ })
125
+ .optional()
126
+ .openapi({
127
+ description: "Optional metadata for a single link in the post",
128
+ example: {
129
+ url: "https://example.com",
130
+ title: "Example Website",
131
+ description: "This is an example link",
132
+ image: "https://example.com/preview.jpg",
133
+ },
134
+ }),
119
135
  });
120
136
 
121
137
  export const CreatePostOutputSchema = PostEntitySchema;