@zyacreatives/shared 2.1.2 → 2.1.4

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.
@@ -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.ZodOptional<z.ZodURL>;
135
+ url: z.ZodURL;
135
136
  title: z.ZodOptional<z.ZodString>;
136
137
  description: z.ZodOptional<z.ZodString>;
137
- image: z.ZodOptional<z.ZodString>;
138
+ image: z.ZodOptional<z.ZodURL>;
138
139
  }, z.core.$strip>>;
139
140
  }, z.core.$strip>;
140
141
  export declare const CreatePostOutputSchema: z.ZodObject<{
@@ -440,8 +441,7 @@ export declare const GetFeedOutputSchema: z.ZodObject<{
440
441
  nextCursor: z.ZodOptional<z.ZodString>;
441
442
  }, z.core.$strip>;
442
443
  export declare const SearchPostInputSchema: z.ZodObject<{
443
- string: z.ZodString;
444
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
444
+ queryString: z.ZodString;
445
445
  cursor: z.ZodOptional<z.ZodString>;
446
446
  }, z.core.$strip>;
447
447
  export declare const SearchPostOutputSchema: z.ZodObject<{
@@ -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" }).optional(),
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.string().url({ message: "Invalid image URL" }).optional(),
131
+ image: zod_openapi_1.z.url({ message: "Invalid image URL" }).optional(),
131
132
  })
132
133
  .optional()
133
134
  .openapi({
@@ -189,16 +190,10 @@ exports.GetFeedOutputSchema = zod_openapi_1.z.object({
189
190
  nextCursor: zod_openapi_1.z.string().optional(),
190
191
  });
191
192
  exports.SearchPostInputSchema = zod_openapi_1.z.object({
192
- string: zod_openapi_1.z
193
+ queryString: zod_openapi_1.z
193
194
  .string()
194
195
  .min(1, { message: "Search string cannot be empty" })
195
196
  .max(200, { message: "Search string cannot exceed 200 characters" }),
196
- limit: zod_openapi_1.z.coerce
197
- .number()
198
- .int({ message: "Limit must be an integer" })
199
- .min(1, { message: "Limit must be at least 1" })
200
- .max(100, { message: "Limit cannot exceed 100" })
201
- .default(20),
202
197
  cursor: zod_openapi_1.z.string().optional(),
203
198
  });
204
199
  exports.SearchPostOutputSchema = zod_openapi_1.z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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" }).optional(),
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.string().url({ message: "Invalid image URL" }).optional(),
148
+ image: z.url({ message: "Invalid image URL" }).optional(),
148
149
  })
149
150
  .optional()
150
151
  .openapi({
@@ -216,16 +217,10 @@ export const GetFeedOutputSchema = z.object({
216
217
  });
217
218
 
218
219
  export const SearchPostInputSchema = z.object({
219
- string: z
220
+ queryString: z
220
221
  .string()
221
222
  .min(1, { message: "Search string cannot be empty" })
222
223
  .max(200, { message: "Search string cannot exceed 200 characters" }),
223
- limit: z.coerce
224
- .number()
225
- .int({ message: "Limit must be an integer" })
226
- .min(1, { message: "Limit must be at least 1" })
227
- .max(100, { message: "Limit cannot exceed 100" })
228
- .default(20),
229
224
  cursor: z.string().optional(),
230
225
  });
231
226