@zyacreatives/shared 2.0.22 → 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.
@@ -112,6 +112,12 @@ export declare const CreatePostInputSchema: z.ZodObject<{
112
112
  readonly DISCUSSION: "Discussion";
113
113
  readonly MENTORSHIP: "Mentorship";
114
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>>;
115
121
  }, z.core.$strip>;
116
122
  export declare const CreatePostOutputSchema: z.ZodObject<{
117
123
  id: z.ZodCUID2;
@@ -104,6 +104,23 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
104
104
  .optional(),
105
105
  tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
106
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.22",
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" }),
@@ -116,6 +115,23 @@ export const CreatePostInputSchema = z.object({
116
115
  .optional(),
117
116
  tags: z.array(z.string()).optional(),
118
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;