@zyacreatives/shared 2.0.75 → 2.0.76
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 +1 -1
- package/dist/schemas/post.js +5 -6
- package/package.json +1 -1
- package/src/schemas/post.ts +5 -9
package/dist/schemas/post.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ export declare const CreatePostInputSchema: z.ZodObject<{
|
|
|
131
131
|
readonly MENTORSHIP: "Mentorship";
|
|
132
132
|
}>>;
|
|
133
133
|
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
134
|
-
url: z.
|
|
134
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
135
135
|
title: z.ZodOptional<z.ZodString>;
|
|
136
136
|
description: z.ZodOptional<z.ZodString>;
|
|
137
137
|
image: z.ZodOptional<z.ZodString>;
|
package/dist/schemas/post.js
CHANGED
|
@@ -91,8 +91,7 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
|
|
|
91
91
|
parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES).default(constants_1.ACTIVITY_PARENT_TYPES.POST),
|
|
92
92
|
content: zod_openapi_1.z
|
|
93
93
|
.string()
|
|
94
|
-
.
|
|
95
|
-
.max(1000, { message: "Post content cannot exceed 1000 characters" })
|
|
94
|
+
.max(500, { message: "Post content cannot exceed 500 characters" })
|
|
96
95
|
.optional()
|
|
97
96
|
.openapi({
|
|
98
97
|
description: "Post content",
|
|
@@ -107,19 +106,19 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
|
|
|
107
106
|
order: zod_openapi_1.z
|
|
108
107
|
.number()
|
|
109
108
|
.int({ message: "File order must be an integer" })
|
|
110
|
-
.max(
|
|
109
|
+
.max(5, { message: "File order cannot exceed 5" })
|
|
111
110
|
.default(1),
|
|
112
111
|
}))
|
|
113
|
-
.max(
|
|
112
|
+
.max(5, { message: "Cannot attach more than 5 files" })
|
|
114
113
|
.optional(),
|
|
115
114
|
tags: zod_openapi_1.z
|
|
116
115
|
.array(zod_openapi_1.z.string().min(1, { message: "Tag cannot be empty" }))
|
|
117
|
-
.max(
|
|
116
|
+
.max(3, { message: "Cannot add more than 3 tags" })
|
|
118
117
|
.optional(),
|
|
119
118
|
badge: zod_openapi_1.z.enum(constants_1.POST_BADGE_TYPES).optional(),
|
|
120
119
|
linkMeta: zod_openapi_1.z
|
|
121
120
|
.object({
|
|
122
|
-
url: zod_openapi_1.z.
|
|
121
|
+
url: zod_openapi_1.z.url({ message: "Invalid URL format" }).optional(),
|
|
123
122
|
title: zod_openapi_1.z
|
|
124
123
|
.string()
|
|
125
124
|
.max(200, { message: "Title cannot exceed 200 characters" })
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -102,8 +102,7 @@ export const CreatePostInputSchema = z.object({
|
|
|
102
102
|
parentType: z.enum(ACTIVITY_PARENT_TYPES).default(ACTIVITY_PARENT_TYPES.POST),
|
|
103
103
|
content: z
|
|
104
104
|
.string()
|
|
105
|
-
.
|
|
106
|
-
.max(1000, { message: "Post content cannot exceed 1000 characters" })
|
|
105
|
+
.max(500, { message: "Post content cannot exceed 500 characters" })
|
|
107
106
|
.optional()
|
|
108
107
|
.openapi({
|
|
109
108
|
description: "Post content",
|
|
@@ -122,23 +121,21 @@ export const CreatePostInputSchema = z.object({
|
|
|
122
121
|
.number()
|
|
123
122
|
.int({ message: "File order must be an integer" })
|
|
124
123
|
|
|
125
|
-
.max(
|
|
124
|
+
.max(5, { message: "File order cannot exceed 5" })
|
|
126
125
|
.default(1),
|
|
127
126
|
})
|
|
128
127
|
)
|
|
129
|
-
.max(
|
|
128
|
+
.max(5, { message: "Cannot attach more than 5 files" })
|
|
130
129
|
.optional(),
|
|
131
130
|
|
|
132
131
|
tags: z
|
|
133
132
|
.array(z.string().min(1, { message: "Tag cannot be empty" }))
|
|
134
|
-
.max(
|
|
133
|
+
.max(3, { message: "Cannot add more than 3 tags" })
|
|
135
134
|
.optional(),
|
|
136
|
-
|
|
137
135
|
badge: z.enum(POST_BADGE_TYPES).optional(),
|
|
138
|
-
|
|
139
136
|
linkMeta: z
|
|
140
137
|
.object({
|
|
141
|
-
url: z.
|
|
138
|
+
url: z.url({ message: "Invalid URL format" }).optional(),
|
|
142
139
|
title: z
|
|
143
140
|
.string()
|
|
144
141
|
.max(200, { message: "Title cannot exceed 200 characters" })
|
|
@@ -218,7 +215,6 @@ export const GetFeedOutputSchema = z.object({
|
|
|
218
215
|
nextCursor: z.string().optional(),
|
|
219
216
|
});
|
|
220
217
|
|
|
221
|
-
|
|
222
218
|
export const SearchPostInputSchema = z.object({
|
|
223
219
|
string: z
|
|
224
220
|
.string()
|