@zyacreatives/shared 2.1.2 → 2.1.3
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 +3 -2
- package/dist/schemas/post.js +3 -2
- package/package.json +1 -1
- package/src/schemas/post.ts +3 -2
package/dist/schemas/post.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export declare const PostWithFilesEntitySchema: z.ZodObject<{
|
|
|
99
99
|
}, z.core.$strip>>>;
|
|
100
100
|
}, z.core.$strip>;
|
|
101
101
|
export declare const CreatePostInputSchema: z.ZodObject<{
|
|
102
|
+
id: z.ZodCUID2;
|
|
102
103
|
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
103
104
|
parentType: z.ZodDefault<z.ZodEnum<{
|
|
104
105
|
readonly PROJECT: "PROJECT";
|
|
@@ -131,10 +132,10 @@ export declare const CreatePostInputSchema: z.ZodObject<{
|
|
|
131
132
|
readonly MENTORSHIP: "Mentorship";
|
|
132
133
|
}>>;
|
|
133
134
|
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
134
|
-
url: z.
|
|
135
|
+
url: z.ZodURL;
|
|
135
136
|
title: z.ZodOptional<z.ZodString>;
|
|
136
137
|
description: z.ZodOptional<z.ZodString>;
|
|
137
|
-
image: z.ZodOptional<z.
|
|
138
|
+
image: z.ZodOptional<z.ZodURL>;
|
|
138
139
|
}, z.core.$strip>>;
|
|
139
140
|
}, z.core.$strip>;
|
|
140
141
|
export declare const CreatePostOutputSchema: z.ZodObject<{
|
package/dist/schemas/post.js
CHANGED
|
@@ -84,6 +84,7 @@ exports.PostWithFilesEntitySchema = exports.PostEntitySchema.extend({
|
|
|
84
84
|
.openapi({ description: "Files associated with the project." }),
|
|
85
85
|
});
|
|
86
86
|
exports.CreatePostInputSchema = zod_openapi_1.z.object({
|
|
87
|
+
id: zod_openapi_1.z.cuid2(),
|
|
87
88
|
parentId: zod_openapi_1.z
|
|
88
89
|
.cuid2({ message: "Invalid parentId" })
|
|
89
90
|
.optional()
|
|
@@ -118,7 +119,7 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
|
|
|
118
119
|
badge: zod_openapi_1.z.enum(constants_1.POST_BADGE_TYPES).optional(),
|
|
119
120
|
linkMeta: zod_openapi_1.z
|
|
120
121
|
.object({
|
|
121
|
-
url: zod_openapi_1.z.url({ message: "Invalid URL format" })
|
|
122
|
+
url: zod_openapi_1.z.url({ message: "Invalid URL format" }),
|
|
122
123
|
title: zod_openapi_1.z
|
|
123
124
|
.string()
|
|
124
125
|
.max(200, { message: "Title cannot exceed 200 characters" })
|
|
@@ -127,7 +128,7 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
|
|
|
127
128
|
.string()
|
|
128
129
|
.max(500, { message: "Description cannot exceed 500 characters" })
|
|
129
130
|
.optional(),
|
|
130
|
-
image: zod_openapi_1.z.
|
|
131
|
+
image: zod_openapi_1.z.url({ message: "Invalid image URL" }).optional(),
|
|
131
132
|
})
|
|
132
133
|
.optional()
|
|
133
134
|
.openapi({
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -95,6 +95,7 @@ export const PostWithFilesEntitySchema = PostEntitySchema.extend({
|
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
export const CreatePostInputSchema = z.object({
|
|
98
|
+
id: z.cuid2(),
|
|
98
99
|
parentId: z
|
|
99
100
|
.cuid2({ message: "Invalid parentId" })
|
|
100
101
|
.optional()
|
|
@@ -135,7 +136,7 @@ export const CreatePostInputSchema = z.object({
|
|
|
135
136
|
badge: z.enum(POST_BADGE_TYPES).optional(),
|
|
136
137
|
linkMeta: z
|
|
137
138
|
.object({
|
|
138
|
-
url: z.url({ message: "Invalid URL format" })
|
|
139
|
+
url: z.url({ message: "Invalid URL format" }),
|
|
139
140
|
title: z
|
|
140
141
|
.string()
|
|
141
142
|
.max(200, { message: "Title cannot exceed 200 characters" })
|
|
@@ -144,7 +145,7 @@ export const CreatePostInputSchema = z.object({
|
|
|
144
145
|
.string()
|
|
145
146
|
.max(500, { message: "Description cannot exceed 500 characters" })
|
|
146
147
|
.optional(),
|
|
147
|
-
image: z.
|
|
148
|
+
image: z.url({ message: "Invalid image URL" }).optional(),
|
|
148
149
|
})
|
|
149
150
|
.optional()
|
|
150
151
|
.openapi({
|