@zyacreatives/shared 2.2.65 → 2.2.66

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.
@@ -47,9 +47,9 @@ export declare const PostEntitySchema: z.ZodObject<{
47
47
  }, z.core.$strip>>;
48
48
  }, z.core.$strip>;
49
49
  export declare const PostFileEntitySchema: z.ZodObject<{
50
- id: z.ZodString;
51
- postId: z.ZodString;
52
- fileId: z.ZodString;
50
+ id: z.ZodCUID2;
51
+ postId: z.ZodCUID2;
52
+ fileId: z.ZodCUID2;
53
53
  order: z.ZodNumber;
54
54
  }, z.core.$strip>;
55
55
  export declare const PostWithFilesEntitySchema: z.ZodObject<{
@@ -99,9 +99,9 @@ export declare const PostWithFilesEntitySchema: z.ZodObject<{
99
99
  image: z.ZodOptional<z.ZodURL>;
100
100
  }, z.core.$strip>>;
101
101
  postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
102
- id: z.ZodString;
103
- postId: z.ZodString;
104
- fileId: z.ZodString;
102
+ id: z.ZodCUID2;
103
+ postId: z.ZodCUID2;
104
+ fileId: z.ZodCUID2;
105
105
  order: z.ZodNumber;
106
106
  url: z.ZodURL;
107
107
  }, z.core.$strip>>>;
@@ -244,9 +244,9 @@ export declare const GetPostOutputSchema: z.ZodObject<{
244
244
  image: z.ZodOptional<z.ZodURL>;
245
245
  }, z.core.$strip>>;
246
246
  postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
247
- id: z.ZodString;
248
- postId: z.ZodString;
249
- fileId: z.ZodString;
247
+ id: z.ZodCUID2;
248
+ postId: z.ZodCUID2;
249
+ fileId: z.ZodCUID2;
250
250
  order: z.ZodNumber;
251
251
  url: z.ZodURL;
252
252
  }, z.core.$strip>>>;
@@ -405,7 +405,7 @@ export declare const GetPostWithBookmarksOutputSchema: z.ZodObject<{
405
405
  totalNo: z.ZodNumber;
406
406
  }, z.core.$strip>;
407
407
  export declare const LinkPreviewInputSchema: z.ZodObject<{
408
- url: z.ZodString;
408
+ url: z.ZodURL;
409
409
  }, z.core.$strip>;
410
410
  export declare const LinkPreviewOutputSchema: z.ZodObject<{
411
411
  title: z.ZodString;
@@ -460,9 +460,9 @@ export declare const FeedPostEntitySchema: z.ZodObject<{
460
460
  image: z.ZodOptional<z.ZodURL>;
461
461
  }, z.core.$strip>>;
462
462
  postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
463
- id: z.ZodString;
464
- postId: z.ZodString;
465
- fileId: z.ZodString;
463
+ id: z.ZodCUID2;
464
+ postId: z.ZodCUID2;
465
+ fileId: z.ZodCUID2;
466
466
  order: z.ZodNumber;
467
467
  url: z.ZodURL;
468
468
  }, z.core.$strip>>>;
@@ -540,9 +540,9 @@ export declare const GetFeedOutputSchema: z.ZodObject<{
540
540
  image: z.ZodOptional<z.ZodURL>;
541
541
  }, z.core.$strip>>;
542
542
  postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
543
- id: z.ZodString;
544
- postId: z.ZodString;
545
- fileId: z.ZodString;
543
+ id: z.ZodCUID2;
544
+ postId: z.ZodCUID2;
545
+ fileId: z.ZodCUID2;
546
546
  order: z.ZodNumber;
547
547
  url: z.ZodURL;
548
548
  }, z.core.$strip>>>;
@@ -622,9 +622,9 @@ export declare const SearchPostOutputSchema: z.ZodObject<{
622
622
  image: z.ZodOptional<z.ZodURL>;
623
623
  }, z.core.$strip>>;
624
624
  postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
625
- id: z.ZodString;
626
- postId: z.ZodString;
627
- fileId: z.ZodString;
625
+ id: z.ZodCUID2;
626
+ postId: z.ZodCUID2;
627
+ fileId: z.ZodCUID2;
628
628
  order: z.ZodNumber;
629
629
  url: z.ZodURL;
630
630
  }, z.core.$strip>>>;
@@ -694,3 +694,53 @@ export declare const PostAnalyticsOutputSchema: z.ZodObject<{
694
694
  }, z.core.$strip>;
695
695
  }, z.core.$strip>;
696
696
  }, z.core.$strip>;
697
+ export declare const PostSearchDocumentSchema: z.ZodObject<{
698
+ id: z.ZodCUID2;
699
+ userId: z.ZodCUID2;
700
+ parentId: z.ZodNullable<z.ZodCUID2>;
701
+ parentType: z.ZodEnum<{
702
+ readonly PROJECT: "PROJECT";
703
+ readonly USER: "USER";
704
+ readonly JOB: "JOB";
705
+ readonly POST: "POST";
706
+ readonly COMMENT: "COMMENT";
707
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
708
+ }>;
709
+ creatorUsername: z.ZodNullable<z.ZodString>;
710
+ creatorFullName: z.ZodNullable<z.ZodString>;
711
+ creatorImageUrl: z.ZodNullable<z.ZodCUID2>;
712
+ tagIds: z.ZodArray<z.ZodNumber>;
713
+ tagNames: z.ZodArray<z.ZodString>;
714
+ badge: z.ZodNullable<z.ZodEnum<{
715
+ readonly NETWORKING: "Networking";
716
+ readonly FUNDING: "Funding";
717
+ readonly COLLABORATION: "Collaboration";
718
+ readonly OPPORTUNITIES: "Opportunities";
719
+ readonly SHOWCASE: "Showcase";
720
+ readonly LEARNING: "Learning";
721
+ readonly DISCUSSION: "Discussion";
722
+ readonly MENTORSHIP: "Mentorship";
723
+ }>>;
724
+ postType: z.ZodEnum<{
725
+ readonly MARKETPLACE: "MARKETPLACE";
726
+ readonly PROJECT: "PROJECT";
727
+ readonly JOB_OPENING: "JOB_OPENING";
728
+ readonly DEFAULT_POST: "DEFAULT_POST";
729
+ readonly POST_WITH_LINKS: "POST_WITH_LINKS";
730
+ readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
731
+ readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
732
+ }>;
733
+ content: z.ZodNullable<z.ZodString>;
734
+ linkTitle: z.ZodNullable<z.ZodString>;
735
+ linkDescription: z.ZodNullable<z.ZodString>;
736
+ linkUrl: z.ZodNullable<z.ZodURL>;
737
+ linkImage: z.ZodNullable<z.ZodURL>;
738
+ postFiles: z.ZodNullable<z.ZodArray<z.ZodObject<{
739
+ id: z.ZodCUID2;
740
+ postId: z.ZodCUID2;
741
+ fileId: z.ZodCUID2;
742
+ order: z.ZodNumber;
743
+ url: z.ZodURL;
744
+ }, z.core.$strip>>>;
745
+ createdAt: z.ZodNullable<z.ZodString>;
746
+ }, z.core.$strip>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PostAnalyticsOutputSchema = exports.ReportPostInputSchema = exports.SearchPostOutputSchema = exports.SearchPostInputSchema = exports.GetFeedOutputSchema = exports.GetFeedInputSchema = exports.FeedPostEntitySchema = exports.LinkPreviewOutputSchema = exports.LinkPreviewInputSchema = exports.GetPostWithBookmarksOutputSchema = exports.PostWithBookmarksEntitySchema = exports.GetPostWithCommentsOutputSchema = exports.PostWithCommentsEntitySchema = exports.GetPostWithLikesOutputSchema = exports.PostWithLikesEntitySchema = exports.MinimalPostSchema = exports.PostIdSchema = exports.GetPostOutputSchema = exports.CreatePostOutputSchema = exports.CreatePostInputSchema = exports.PostWithFilesEntitySchema = exports.PostFileEntitySchema = exports.PostEntitySchema = void 0;
3
+ exports.PostSearchDocumentSchema = exports.PostAnalyticsOutputSchema = exports.ReportPostInputSchema = exports.SearchPostOutputSchema = exports.SearchPostInputSchema = exports.GetFeedOutputSchema = exports.GetFeedInputSchema = exports.FeedPostEntitySchema = exports.LinkPreviewOutputSchema = exports.LinkPreviewInputSchema = exports.GetPostWithBookmarksOutputSchema = exports.PostWithBookmarksEntitySchema = exports.GetPostWithCommentsOutputSchema = exports.PostWithCommentsEntitySchema = exports.GetPostWithLikesOutputSchema = exports.PostWithLikesEntitySchema = exports.MinimalPostSchema = exports.PostIdSchema = exports.GetPostOutputSchema = exports.CreatePostOutputSchema = exports.CreatePostInputSchema = exports.PostWithFilesEntitySchema = exports.PostFileEntitySchema = exports.PostEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const file_1 = require("./file");
@@ -16,20 +16,38 @@ exports.PostEntitySchema = zod_openapi_1.z.object({
16
16
  .cuid2()
17
17
  .optional()
18
18
  .openapi({ description: "Parent id", example: "ckj1a2b3c0000abc" }),
19
- parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES).default(constants_1.ACTIVITY_PARENT_TYPES.POST),
19
+ parentType: zod_openapi_1.z
20
+ .enum(constants_1.ACTIVITY_PARENT_TYPES)
21
+ .default(constants_1.ACTIVITY_PARENT_TYPES.POST)
22
+ .openapi({ example: "POST" }),
20
23
  tags: zod_openapi_1.z
21
24
  .array(zod_openapi_1.z.object({
22
- name: zod_openapi_1.z.string(),
23
- id: zod_openapi_1.z.int(),
25
+ name: zod_openapi_1.z.string().openapi({ example: "javascript" }),
26
+ id: zod_openapi_1.z.int().openapi({ example: 101 }),
24
27
  }))
25
- .optional(),
26
- badge: zod_openapi_1.z.enum(constants_1.POST_BADGE_TYPES).optional(),
28
+ .optional()
29
+ .openapi({
30
+ example: [{ name: "javascript", id: 101 }],
31
+ }),
32
+ badge: zod_openapi_1.z
33
+ .enum(constants_1.POST_BADGE_TYPES)
34
+ .optional()
35
+ .openapi({ example: "FEATURED" }),
27
36
  userId: zod_openapi_1.z
28
37
  .cuid2()
29
38
  .openapi({ description: "User id", example: "ckj1a2b3c0000def" }),
30
- creatorUsername: zod_openapi_1.z.string().optional().openapi({ description: "Username" }),
31
- creatorFullName: zod_openapi_1.z.string().optional(),
32
- creatorImageUrl: zod_openapi_1.z.cuid2().optional().openapi({ description: "Username" }),
39
+ creatorUsername: zod_openapi_1.z
40
+ .string()
41
+ .optional()
42
+ .openapi({ description: "Username", example: "dev_guru" }),
43
+ creatorFullName: zod_openapi_1.z
44
+ .string()
45
+ .optional()
46
+ .openapi({ example: "Jane Doe" }),
47
+ creatorImageUrl: zod_openapi_1.z
48
+ .cuid2()
49
+ .optional()
50
+ .openapi({ description: "Creator Image ID", example: "clm1a2b3c0000pic" }),
33
51
  content: zod_openapi_1.z
34
52
  .string()
35
53
  .optional()
@@ -40,18 +58,30 @@ exports.PostEntitySchema = zod_openapi_1.z.object({
40
58
  return plainText.length <= 300;
41
59
  }, {
42
60
  message: "Post content cannot exceed 300 characters",
43
- }),
61
+ })
62
+ .openapi({ example: "Check out my new portfolio update!" }),
44
63
  postType: zod_openapi_1.z.enum(constants_1.POST_TYPES).openapi({
45
64
  description: "Type of the post entity this statistic belongs to.",
46
65
  title: "Post Type",
66
+ example: "PROJECT",
47
67
  }),
48
- createdAt: zod_openapi_1.z.coerce.date().optional(),
68
+ createdAt: zod_openapi_1.z
69
+ .coerce
70
+ .date()
71
+ .optional()
72
+ .openapi({ example: "2026-03-11T14:43:09Z" }),
49
73
  linkMeta: zod_openapi_1.z
50
74
  .object({
51
- url: zod_openapi_1.z.url(),
52
- title: zod_openapi_1.z.string().optional(),
53
- description: zod_openapi_1.z.string().optional(),
54
- image: zod_openapi_1.z.url().optional(),
75
+ url: zod_openapi_1.z.url().openapi({ example: "https://example.com" }),
76
+ title: zod_openapi_1.z.string().optional().openapi({ example: "Example Website" }),
77
+ description: zod_openapi_1.z
78
+ .string()
79
+ .optional()
80
+ .openapi({ example: "This is an example link" }),
81
+ image: zod_openapi_1.z
82
+ .url()
83
+ .optional()
84
+ .openapi({ example: "https://example.com/preview.jpg" }),
55
85
  })
56
86
  .optional()
57
87
  .openapi({
@@ -67,12 +97,16 @@ exports.PostEntitySchema = zod_openapi_1.z.object({
67
97
  exports.PostFileEntitySchema = zod_openapi_1.z
68
98
  .object({
69
99
  id: zod_openapi_1.z
70
- .string()
71
- .openapi({ description: "CUID2 of the project file record." }),
72
- postId: zod_openapi_1.z.string().openapi({
100
+ .cuid2()
101
+ .openapi({ description: "CUID2 of the project file record.", example: "cxy1a2b3c0000qwe" }),
102
+ postId: zod_openapi_1.z.cuid2().openapi({
73
103
  description: "CUID2 of the post this file belongs to.",
104
+ example: "ckj1a2b3c0000xyz",
105
+ }),
106
+ fileId: zod_openapi_1.z.cuid2().openapi({
107
+ description: "CUID2 of the linked file.",
108
+ example: "cvb1a2b3c0000rty"
74
109
  }),
75
- fileId: zod_openapi_1.z.string().openapi({ description: "CUID2 of the linked file." }),
76
110
  order: zod_openapi_1.z.number().int().openapi({
77
111
  description: "Order index of the file in the project.",
78
112
  example: 1,
@@ -85,18 +119,32 @@ exports.PostFileEntitySchema = zod_openapi_1.z
85
119
  exports.PostWithFilesEntitySchema = exports.PostEntitySchema.extend({
86
120
  postFiles: zod_openapi_1.z
87
121
  .array(exports.PostFileEntitySchema.extend({
88
- url: zod_openapi_1.z.url(),
122
+ url: zod_openapi_1.z.url().openapi({ example: "https://cdn.example.com/image.png" }),
89
123
  }))
90
124
  .optional()
91
- .openapi({ description: "Files associated with the project." }),
125
+ .openapi({
126
+ description: "Files associated with the project.",
127
+ example: [
128
+ {
129
+ id: "cxy1a2b3c0000qwe",
130
+ postId: "ckj1a2b3c0000xyz",
131
+ fileId: "cvb1a2b3c0000rty",
132
+ order: 1,
133
+ url: "https://cdn.example.com/image.png"
134
+ }
135
+ ]
136
+ }),
92
137
  });
93
138
  exports.CreatePostInputSchema = zod_openapi_1.z.object({
94
- id: zod_openapi_1.z.cuid2(),
139
+ id: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000xyz" }),
95
140
  parentId: zod_openapi_1.z
96
141
  .cuid2({ message: "Invalid parentId" })
97
142
  .optional()
98
143
  .openapi({ description: "Parent id", example: "ckl1a2b3c0000abc" }),
99
- parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES).default(constants_1.ACTIVITY_PARENT_TYPES.POST),
144
+ parentType: zod_openapi_1.z
145
+ .enum(constants_1.ACTIVITY_PARENT_TYPES)
146
+ .default(constants_1.ACTIVITY_PARENT_TYPES.POST)
147
+ .openapi({ example: "POST" }),
100
148
  content: zod_openapi_1.z
101
149
  .string()
102
150
  .max(300, { message: "Post content cannot exceed 300 characters" })
@@ -115,29 +163,36 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
115
163
  .number()
116
164
  .int({ message: "File order must be an integer" })
117
165
  .max(5, { message: "File order cannot exceed 5" })
118
- .default(1),
166
+ .default(1)
167
+ .openapi({ example: 1 }),
119
168
  }))
120
169
  .max(5, { message: "Cannot attach more than 5 files" })
121
- .optional(),
170
+ .optional()
171
+ .openapi({
172
+ example: [{ fileId: "cvb1a2b3c0000rty", order: 1 }]
173
+ }),
122
174
  tags: zod_openapi_1.z
123
- .array(zod_openapi_1.z.string().min(1, { message: "Tag cannot be empty" }))
175
+ .array(zod_openapi_1.z.string().min(1, { message: "Tag cannot be empty" }).openapi({ example: "react" }))
124
176
  .max(3, { message: "Cannot add more than 3 tags" })
125
- .optional(),
126
- badge: zod_openapi_1.z.enum(constants_1.POST_BADGE_TYPES).optional(),
177
+ .optional()
178
+ .openapi({ example: ["react", "frontend"] }),
179
+ badge: zod_openapi_1.z.enum(constants_1.POST_BADGE_TYPES).optional().openapi({ example: "TRENDING" }),
127
180
  linkMeta: zod_openapi_1.z
128
181
  .object({
129
- url: zod_openapi_1.z.url({ message: "Invalid URL format" }),
182
+ url: zod_openapi_1.z.url({ message: "Invalid URL format" }).openapi({ example: "https://example.com" }),
130
183
  title: zod_openapi_1.z
131
184
  .string()
132
185
  .max(200, { message: "Title cannot exceed 200 characters" })
133
- .optional(),
186
+ .optional()
187
+ .openapi({ example: "Example Website" }),
134
188
  description: zod_openapi_1.z
135
189
  .string()
136
190
  .max(500, {
137
191
  message: "Description cannot exceed 500 characters",
138
192
  })
139
- .optional(),
140
- image: zod_openapi_1.z.url({ message: "Invalid image URL" }).optional(),
193
+ .optional()
194
+ .openapi({ example: "This is an example link" }),
195
+ image: zod_openapi_1.z.url({ message: "Invalid image URL" }).optional().openapi({ example: "https://example.com/preview.jpg" }),
141
196
  })
142
197
  .optional()
143
198
  .openapi({
@@ -152,7 +207,9 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
152
207
  });
153
208
  exports.CreatePostOutputSchema = exports.PostEntitySchema;
154
209
  exports.GetPostOutputSchema = exports.PostWithFilesEntitySchema;
155
- exports.PostIdSchema = zod_openapi_1.z.object({ postId: zod_openapi_1.z.cuid2() });
210
+ exports.PostIdSchema = zod_openapi_1.z.object({
211
+ postId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000xyz" })
212
+ });
156
213
  exports.MinimalPostSchema = exports.PostEntitySchema.pick({
157
214
  id: true,
158
215
  parentId: true,
@@ -160,102 +217,142 @@ exports.MinimalPostSchema = exports.PostEntitySchema.pick({
160
217
  });
161
218
  exports.PostWithLikesEntitySchema = exports.MinimalPostSchema.extend({
162
219
  likes: zod_openapi_1.z.array(activity_1.ActivitySchema.extend({
163
- followsYou: zod_openapi_1.z.boolean().optional(),
164
- isFollowing: zod_openapi_1.z.boolean().optional(),
165
- })),
220
+ followsYou: zod_openapi_1.z.boolean().optional().openapi({ example: true }),
221
+ isFollowing: zod_openapi_1.z.boolean().optional().openapi({ example: false }),
222
+ })).openapi({ example: [] }),
166
223
  }).openapi({
167
224
  title: "PostWithPostLikesEntity",
168
225
  });
169
226
  exports.GetPostWithLikesOutputSchema = exports.PostWithLikesEntitySchema.extend({
170
- nextCursor: zod_openapi_1.z.string().optional().nullable(),
227
+ nextCursor: zod_openapi_1.z.string().optional().nullable().openapi({ example: "ckj1a2b3c0000nxt" }),
171
228
  });
172
229
  exports.PostWithCommentsEntitySchema = exports.MinimalPostSchema.extend({
173
- comments: zod_openapi_1.z.array(comment_1.CommentEntitySchema),
230
+ comments: zod_openapi_1.z.array(comment_1.CommentEntitySchema).openapi({ example: [] }),
174
231
  }).openapi({
175
232
  title: "PostWithPostCommentsEntity",
176
233
  });
177
234
  exports.GetPostWithCommentsOutputSchema = exports.PostWithCommentsEntitySchema.extend({
178
- nextCursor: zod_openapi_1.z.string().optional().nullable(),
235
+ nextCursor: zod_openapi_1.z.string().optional().nullable().openapi({ example: "ckj1a2b3c0000nxt" }),
179
236
  });
180
237
  exports.PostWithBookmarksEntitySchema = exports.MinimalPostSchema.extend({
181
- bookmarks: zod_openapi_1.z.array(activity_1.ActivitySchema),
238
+ bookmarks: zod_openapi_1.z.array(activity_1.ActivitySchema).openapi({ example: [] }),
182
239
  }).openapi({
183
240
  title: "PostWithPostBookmarksEntity",
184
241
  });
185
242
  exports.GetPostWithBookmarksOutputSchema = exports.PostWithBookmarksEntitySchema.extend({
186
- totalNo: zod_openapi_1.z.number().int(),
243
+ totalNo: zod_openapi_1.z.number().int().openapi({ example: 42 }),
187
244
  });
188
245
  exports.LinkPreviewInputSchema = zod_openapi_1.z.object({
189
- url: zod_openapi_1.z.string(),
246
+ url: zod_openapi_1.z.url().openapi({ example: "https://example.com/article" }),
190
247
  });
191
248
  exports.LinkPreviewOutputSchema = zod_openapi_1.z.object({
192
- title: zod_openapi_1.z.string(),
193
- description: zod_openapi_1.z.string().optional(),
194
- image: zod_openapi_1.z.string().optional(),
195
- url: zod_openapi_1.z.string().optional(),
249
+ title: zod_openapi_1.z.string().openapi({ example: "Great Article" }),
250
+ description: zod_openapi_1.z.string().optional().openapi({ example: "A detailed breakdown of the topic." }),
251
+ image: zod_openapi_1.z.string().optional().openapi({ example: "https://example.com/hero.jpg" }),
252
+ url: zod_openapi_1.z.string().optional().openapi({ example: "https://example.com/article" }),
196
253
  });
197
254
  exports.FeedPostEntitySchema = exports.PostWithFilesEntitySchema.extend({
198
255
  stats: entity_stats_1.EntityStatsSchema,
199
- score: zod_openapi_1.z.number(),
200
- isLiked: zod_openapi_1.z.boolean().optional(),
201
- isFollowing: zod_openapi_1.z.boolean().optional(),
202
- isBookmarked: zod_openapi_1.z.boolean().optional(),
256
+ score: zod_openapi_1.z.number().openapi({ example: 98.5 }),
257
+ isLiked: zod_openapi_1.z.boolean().optional().openapi({ example: true }),
258
+ isFollowing: zod_openapi_1.z.boolean().optional().openapi({ example: false }),
259
+ isBookmarked: zod_openapi_1.z.boolean().optional().openapi({ example: false }),
203
260
  });
204
261
  exports.GetFeedInputSchema = zod_openapi_1.z.object({
205
- limit: zod_openapi_1.z.number().optional(),
206
- cursor: zod_openapi_1.z.string().optional(),
262
+ limit: zod_openapi_1.z.number().int().optional().openapi({ example: 20 }),
263
+ cursor: zod_openapi_1.z.string().optional().openapi({ example: "ckj1a2b3c0000cur" }),
207
264
  });
208
265
  exports.GetFeedOutputSchema = zod_openapi_1.z.object({
209
- feed: zod_openapi_1.z.array(exports.FeedPostEntitySchema),
210
- nextCursor: zod_openapi_1.z.string().optional().nullable(),
266
+ feed: zod_openapi_1.z.array(exports.FeedPostEntitySchema).openapi({ example: [] }),
267
+ nextCursor: zod_openapi_1.z.string().optional().nullable().openapi({ example: "ckj1a2b3c0000nxt" }),
211
268
  });
212
269
  exports.SearchPostInputSchema = zod_openapi_1.z.object({
213
270
  queryString: zod_openapi_1.z
214
271
  .string()
215
272
  .min(1, { message: "Search string cannot be empty" })
216
- .max(200, { message: "Search string cannot exceed 200 characters" }),
217
- cursor: zod_openapi_1.z.string().optional(),
273
+ .max(200, { message: "Search string cannot exceed 200 characters" })
274
+ .openapi({ example: "typescript utility types" }),
275
+ cursor: zod_openapi_1.z.string().optional().openapi({ example: "ckj1a2b3c0000cur" }),
218
276
  });
219
277
  exports.SearchPostOutputSchema = zod_openapi_1.z.object({
220
- posts: zod_openapi_1.z.array(exports.FeedPostEntitySchema),
221
- nextCursor: zod_openapi_1.z.string().optional().nullable(),
278
+ posts: zod_openapi_1.z.array(exports.FeedPostEntitySchema).openapi({ example: [] }),
279
+ nextCursor: zod_openapi_1.z.string().optional().nullable().openapi({ example: "ckj1a2b3c0000nxt" }),
222
280
  });
223
281
  exports.ReportPostInputSchema = zod_openapi_1.z.object({
224
282
  complaint: zod_openapi_1.z
225
283
  .string()
226
- .max(200, { error: "Complaint cannot be longer than 200 characters" }),
284
+ .max(200, { error: "Complaint cannot be longer than 200 characters" })
285
+ .openapi({ example: "This post contains spam." }),
227
286
  });
228
287
  const AnalyticsChartItemSchema = zod_openapi_1.z.object({
229
- x: zod_openapi_1.z.string(),
230
- y: zod_openapi_1.z.number(),
288
+ x: zod_openapi_1.z.string().openapi({ example: "2026-03-11" }),
289
+ y: zod_openapi_1.z.number().openapi({ example: 150 }),
231
290
  });
232
291
  exports.PostAnalyticsOutputSchema = zod_openapi_1.z.object({
233
292
  awareness: zod_openapi_1.z.object({
234
- reach: zod_openapi_1.z.number(),
235
- impressions: zod_openapi_1.z.number(),
236
- visitors: zod_openapi_1.z.number(),
237
- newFollowers: zod_openapi_1.z.number(),
293
+ reach: zod_openapi_1.z.number().openapi({ example: 5000 }),
294
+ impressions: zod_openapi_1.z.number().openapi({ example: 6500 }),
295
+ visitors: zod_openapi_1.z.number().openapi({ example: 1200 }),
296
+ newFollowers: zod_openapi_1.z.number().openapi({ example: 45 }),
238
297
  }),
239
298
  engagement: zod_openapi_1.z.object({
240
- rate: zod_openapi_1.z.number(),
241
- likes: zod_openapi_1.z.number(),
242
- comments: zod_openapi_1.z.number(),
243
- linkCopied: zod_openapi_1.z.number(),
244
- bookmarks: zod_openapi_1.z.number(),
245
- tagsClicked: zod_openapi_1.z.array(AnalyticsChartItemSchema),
246
- platformShares: zod_openapi_1.z.array(AnalyticsChartItemSchema),
299
+ rate: zod_openapi_1.z.number().openapi({ example: 4.2 }),
300
+ likes: zod_openapi_1.z.number().openapi({ example: 210 }),
301
+ comments: zod_openapi_1.z.number().openapi({ example: 34 }),
302
+ linkCopied: zod_openapi_1.z.number().openapi({ example: 12 }),
303
+ bookmarks: zod_openapi_1.z.number().openapi({ example: 56 }),
304
+ tagsClicked: zod_openapi_1.z.array(AnalyticsChartItemSchema).openapi({ example: [{ x: "javascript", y: 25 }] }),
305
+ platformShares: zod_openapi_1.z.array(AnalyticsChartItemSchema).openapi({ example: [{ x: "Twitter", y: 10 }] }),
247
306
  }),
248
307
  behavior: zod_openapi_1.z.object({
249
- viralityScore: zod_openapi_1.z.number(),
250
- frictionRatio: zod_openapi_1.z.number(),
251
- consumptionDepth: zod_openapi_1.z.number(),
308
+ viralityScore: zod_openapi_1.z.number().openapi({ example: 8.5 }),
309
+ frictionRatio: zod_openapi_1.z.number().openapi({ example: 1.2 }),
310
+ consumptionDepth: zod_openapi_1.z.number().openapi({ example: 65.4 }),
252
311
  sentiment: zod_openapi_1.z.object({
253
- positive: zod_openapi_1.z.number(),
254
- negative: zod_openapi_1.z.number(),
255
- score: zod_openapi_1.z.number(),
256
- reports: zod_openapi_1.z.number(),
257
- notInterested: zod_openapi_1.z.number(),
258
- status: zod_openapi_1.z.enum(["Healthy", "Polarizing"]),
312
+ positive: zod_openapi_1.z.number().openapi({ example: 85 }),
313
+ negative: zod_openapi_1.z.number().openapi({ example: 5 }),
314
+ score: zod_openapi_1.z.number().openapi({ example: 9.1 }),
315
+ reports: zod_openapi_1.z.number().openapi({ example: 0 }),
316
+ notInterested: zod_openapi_1.z.number().openapi({ example: 2 }),
317
+ status: zod_openapi_1.z.enum(["Healthy", "Polarizing"]).openapi({ example: "Healthy" }),
259
318
  }),
260
319
  }),
261
320
  });
321
+ exports.PostSearchDocumentSchema = zod_openapi_1.z.object({
322
+ id: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000doc" }),
323
+ userId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000usr" }),
324
+ parentId: zod_openapi_1.z.cuid2().nullable().openapi({ example: "ckj1a2b3c0000prt" }),
325
+ parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES).openapi({ example: "POST" }),
326
+ creatorUsername: zod_openapi_1.z.string().nullable().openapi({ example: "tech_lead" }),
327
+ creatorFullName: zod_openapi_1.z.string().nullable().openapi({ example: "Alex Smith" }),
328
+ creatorImageUrl: zod_openapi_1.z.cuid2().nullable().openapi({ example: "clm1a2b3c0000pic" }),
329
+ tagIds: zod_openapi_1.z.array(zod_openapi_1.z.number()).openapi({ example: [101, 102] }),
330
+ tagNames: zod_openapi_1.z.array(zod_openapi_1.z.string()).openapi({ example: ["react", "typescript"] }),
331
+ badge: zod_openapi_1.z.enum(constants_1.POST_BADGE_TYPES).nullable().openapi({ example: "TRENDING" }),
332
+ postType: zod_openapi_1.z.enum(constants_1.POST_TYPES).openapi({ example: "PROJECT" }),
333
+ content: zod_openapi_1.z.string().nullable().openapi({ example: "Here is my latest open source tool." }),
334
+ linkTitle: zod_openapi_1.z.string().nullable().openapi({ example: "GitHub Repo" }),
335
+ linkDescription: zod_openapi_1.z.string().nullable().openapi({ example: "A fast, modern build system." }),
336
+ linkUrl: zod_openapi_1.z.url().nullable().openapi({ example: "https://github.com/project" }),
337
+ linkImage: zod_openapi_1.z.url().nullable().openapi({ example: "https://github.com/image.png" }),
338
+ postFiles: zod_openapi_1.z
339
+ .array(exports.PostFileEntitySchema.extend({
340
+ url: zod_openapi_1.z.url().openapi({ example: "https://cdn.example.com/file1.png" }),
341
+ }))
342
+ .nullable()
343
+ .openapi({
344
+ example: [
345
+ {
346
+ id: "cxy1a2b3c0000qwe",
347
+ postId: "ckj1a2b3c0000doc",
348
+ fileId: "cvb1a2b3c0000rty",
349
+ order: 1,
350
+ url: "https://cdn.example.com/file1.png",
351
+ },
352
+ ],
353
+ }),
354
+ createdAt: zod_openapi_1.z.string().nullable().openapi({ example: "2026-03-11T14:43:09.000Z" }),
355
+ }).openapi({
356
+ title: "Post Search Document",
357
+ description: "Flattened schema used for indexing posts in search engines.",
358
+ });
@@ -49,7 +49,7 @@ export declare const MinimalUserSchema: z.ZodObject<{
49
49
  export declare const UserStatsEntitySchema: z.ZodObject<{
50
50
  followerCount: z.ZodInt;
51
51
  followingCount: z.ZodInt;
52
- followingIds: z.ZodArray<z.ZodString>;
52
+ followingIds: z.ZodArray<z.ZodCUID2>;
53
53
  }, z.core.$strip>;
54
54
  export declare const UserProfileEntitySchema: z.ZodObject<{
55
55
  id: z.ZodCUID2;
@@ -542,9 +542,9 @@ export declare const UserWithPostsEntitySchema: z.ZodObject<{
542
542
  image: z.ZodOptional<z.ZodURL>;
543
543
  }, z.core.$strip>>;
544
544
  postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
545
- id: z.ZodString;
546
- postId: z.ZodString;
547
- fileId: z.ZodString;
545
+ id: z.ZodCUID2;
546
+ postId: z.ZodCUID2;
547
+ fileId: z.ZodCUID2;
548
548
  order: z.ZodNumber;
549
549
  url: z.ZodURL;
550
550
  }, z.core.$strip>>>;
@@ -938,7 +938,7 @@ export declare const GetUserActivityInputSchema: z.ZodObject<{
938
938
  }>;
939
939
  }, z.core.$strip>;
940
940
  export declare const GetUserActivityOutputSchema: z.ZodArray<z.ZodObject<{
941
- parentId: z.ZodString;
941
+ parentId: z.ZodCUID2;
942
942
  parentType: z.ZodEnum<{
943
943
  PROJECT: "PROJECT";
944
944
  USER: "USER";
@@ -979,3 +979,21 @@ export declare const SearchUsersOutputSchema: z.ZodObject<{
979
979
  }, z.core.$strip>>;
980
980
  nextCursor: z.ZodOptional<z.ZodString>;
981
981
  }, z.core.$strip>;
982
+ export declare const UserSearchDocumentSchema: z.ZodObject<{
983
+ id: z.ZodCUID2;
984
+ email: z.ZodEmail;
985
+ username: z.ZodNullable<z.ZodString>;
986
+ name: z.ZodNullable<z.ZodString>;
987
+ image: z.ZodNullable<z.ZodString>;
988
+ role: z.ZodEnum<{
989
+ CREATIVE: "CREATIVE";
990
+ BRAND: "BRAND";
991
+ INVESTOR: "INVESTOR";
992
+ ADMIN: "ADMIN";
993
+ }>;
994
+ bio: z.ZodNullable<z.ZodString>;
995
+ location: z.ZodNullable<z.ZodString>;
996
+ disciplines: z.ZodNullable<z.ZodArray<z.ZodString>>;
997
+ updatedAt: z.ZodNullable<z.ZodString>;
998
+ createdAt: z.ZodNullable<z.ZodString>;
999
+ }, z.core.$strip>;