@zyacreatives/shared 2.5.20 → 2.5.22

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.
@@ -239,13 +239,6 @@ export declare const UpdateProjectInputSchema: z.ZodObject<{
239
239
  version: z.ZodNumber;
240
240
  }, z.core.$strip>;
241
241
  export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
242
- export declare const SearchProjectsInputSchema: z.ZodObject<{
243
- query: z.ZodOptional<z.ZodString>;
244
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
245
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
246
- cursor: z.ZodOptional<z.ZodString>;
247
- }, z.core.$strip>;
248
- export type SearchProjectsInput = z.infer<typeof SearchProjectsInputSchema>;
249
242
  export declare const CommentOnProjectInputSchema: z.ZodObject<{
250
243
  id: z.ZodCUID2;
251
244
  userId: z.ZodCUID2;
@@ -553,6 +546,38 @@ export declare const ProjectSearchDocumentSchema: z.ZodObject<{
553
546
  }, z.core.$strip>>>;
554
547
  }, z.core.$strip>;
555
548
  export type ProjectSearchDocument = z.infer<typeof ProjectSearchDocumentSchema>;
549
+ export declare const SearchProjectsInputSchema: z.ZodObject<{
550
+ query: z.ZodOptional<z.ZodString>;
551
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
552
+ cursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
553
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
554
+ isOpenToInvestment: z.ZodOptional<z.ZodBoolean>;
555
+ minCapital: z.ZodOptional<z.ZodNumber>;
556
+ maxCapital: z.ZodOptional<z.ZodNumber>;
557
+ ventureStages: z.ZodOptional<z.ZodArray<z.ZodEnum<{
558
+ readonly IDEA: "Idea";
559
+ readonly PRE_SEED: "Pre Seed";
560
+ readonly MVP: "MVP";
561
+ readonly SEED: "Seed";
562
+ readonly SERIES_A: "Series A";
563
+ readonly SERIES_B: "Series B";
564
+ readonly SERIES_C: "Series C";
565
+ readonly GROWTH: "Growth";
566
+ readonly EXIT: "Exit";
567
+ }>>>;
568
+ projectCreatorTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
569
+ readonly CREATIVE: "CREATIVE";
570
+ readonly BRAND: "BRAND";
571
+ readonly INVESTOR: "INVESTOR";
572
+ readonly ADMIN: "ADMIN";
573
+ }>>>;
574
+ clientTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
575
+ readonly CREATIVE: "CREATIVE";
576
+ readonly BRAND: "BRAND";
577
+ readonly NONE: "NONE";
578
+ }>>>;
579
+ }, z.core.$strip>;
580
+ export type SearchProjectsInput = z.infer<typeof SearchProjectsInputSchema>;
556
581
  export declare const SearchProjectsOutputSchema: z.ZodObject<{
557
582
  projects: z.ZodArray<z.ZodObject<{
558
583
  id: z.ZodString;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProjectIdSchema = exports.CommentOnProjectOutputSchema = exports.DeleteProjectOutputSchema = exports.UpdateProjectOutputSchema = exports.CreateProjectOutputSchema = exports.ProjectUpdateOutputEntitySchema = exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithProjectViewsEntitySchema = exports.GetProjectWithLikesOutputSchema = exports.ProjectWithLikesEntitySchema = exports.GetProjectWithCommentsOutputSchema = exports.ProjectWithProjectCommentsEntitySchema = exports.SearchProjectsOutputSchema = exports.ProjectSearchDocumentSchema = exports.GetProjectOutputSchema = exports.ProjectDetailsEntitySchema = exports.CommentOnProjectInputSchema = exports.SearchProjectsInputSchema = exports.UpdateProjectInputSchema = exports.CreateProjectInputSchema = exports.ProjectSocialGraphEntitySchema = exports.MinimalProjectSchema = exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema = void 0;
3
+ exports.ProjectIdSchema = exports.CommentOnProjectOutputSchema = exports.DeleteProjectOutputSchema = exports.UpdateProjectOutputSchema = exports.CreateProjectOutputSchema = exports.ProjectUpdateOutputEntitySchema = exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithProjectViewsEntitySchema = exports.GetProjectWithLikesOutputSchema = exports.ProjectWithLikesEntitySchema = exports.GetProjectWithCommentsOutputSchema = exports.ProjectWithProjectCommentsEntitySchema = exports.SearchProjectsOutputSchema = exports.SearchProjectsInputSchema = exports.ProjectSearchDocumentSchema = exports.GetProjectOutputSchema = exports.ProjectDetailsEntitySchema = exports.CommentOnProjectInputSchema = exports.UpdateProjectInputSchema = exports.CreateProjectInputSchema = exports.ProjectSocialGraphEntitySchema = exports.MinimalProjectSchema = exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const comment_1 = require("./comment");
@@ -113,14 +113,6 @@ exports.UpdateProjectInputSchema = zod_openapi_1.z
113
113
  }
114
114
  })
115
115
  .openapi("UpdateProjectInput");
116
- exports.SearchProjectsInputSchema = zod_openapi_1.z
117
- .object({
118
- query: zod_openapi_1.z.string().optional(),
119
- tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
120
- limit: zod_openapi_1.z.coerce.number().min(1).max(100).default(20),
121
- cursor: zod_openapi_1.z.string().optional(),
122
- })
123
- .openapi("SearchProjectsInput");
124
116
  exports.CommentOnProjectInputSchema = comment_1.CommentEntitySchema;
125
117
  exports.ProjectDetailsEntitySchema = exports.ProjectEntitySchema.extend({
126
118
  user: user_1.MinimalUserSchema,
@@ -158,6 +150,20 @@ exports.ProjectSearchDocumentSchema = zod_openapi_1.z
158
150
  files: zod_openapi_1.z.array(file_1.FileEntitySchema).optional(),
159
151
  })
160
152
  .openapi("ProjectSearchDocument");
153
+ exports.SearchProjectsInputSchema = zod_openapi_1.z
154
+ .object({
155
+ query: zod_openapi_1.z.string().optional(),
156
+ limit: zod_openapi_1.z.number().optional().default(40),
157
+ cursor: zod_openapi_1.z.string().optional().nullable(),
158
+ tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
159
+ isOpenToInvestment: zod_openapi_1.z.boolean().optional(),
160
+ minCapital: zod_openapi_1.z.number().optional(),
161
+ maxCapital: zod_openapi_1.z.number().optional(),
162
+ ventureStages: zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.VENTURE_STAGES)).optional(),
163
+ projectCreatorTypes: zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.ROLES)).optional(),
164
+ clientTypes: zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.CLIENT_TYPES)).optional(),
165
+ })
166
+ .openapi("SearchProjectsInput");
161
167
  exports.SearchProjectsOutputSchema = zod_openapi_1.z
162
168
  .object({
163
169
  projects: zod_openapi_1.z.array(exports.ProjectSearchDocumentSchema),
@@ -33,6 +33,8 @@ export declare const UserEntitySchema: z.ZodObject<{
33
33
  version: z.ZodInt;
34
34
  updatedAt: z.ZodCoercedDate<unknown>;
35
35
  }, z.core.$strip>;
36
+ export type BaseUserEntity = z.infer<typeof UserEntitySchema>;
37
+ export type UserEntity = z.infer<typeof UserEntitySchema>;
36
38
  export declare const MinimalUserSchema: z.ZodObject<{
37
39
  email: z.ZodEmail;
38
40
  username: z.ZodOptional<z.ZodString>;
@@ -46,6 +48,7 @@ export declare const MinimalUserSchema: z.ZodObject<{
46
48
  ADMIN: "ADMIN";
47
49
  }>;
48
50
  }, z.core.$strip>;
51
+ export type MinimalUser = z.infer<typeof MinimalUserSchema>;
49
52
  export declare const UserProfileEntitySchema: z.ZodObject<{
50
53
  id: z.ZodCUID2;
51
54
  email: z.ZodEmail;
@@ -218,11 +221,13 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
218
221
  version: z.ZodInt;
219
222
  }, z.core.$strip>;
220
223
  }, z.core.$strip>;
224
+ export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
221
225
  export declare const UserStatsEntitySchema: z.ZodObject<{
222
226
  followerCount: z.ZodInt;
223
227
  followingCount: z.ZodInt;
224
228
  followingIds: z.ZodArray<z.ZodCUID2>;
225
229
  }, z.core.$strip>;
230
+ export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
226
231
  export declare const UserWithProjectsEntitySchema: z.ZodObject<{
227
232
  userId: z.ZodCUID2;
228
233
  projects: z.ZodArray<z.ZodObject<{
@@ -287,6 +292,7 @@ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
287
292
  version: z.ZodNumber;
288
293
  }, z.core.$strip>>;
289
294
  }, z.core.$strip>;
295
+ export type UserWithProjectsEntity = z.infer<typeof UserWithProjectsEntitySchema>;
290
296
  export declare const UserWithPostsEntitySchema: z.ZodObject<{
291
297
  userId: z.ZodCUID2;
292
298
  posts: z.ZodArray<z.ZodObject<{
@@ -364,6 +370,7 @@ export declare const UserWithPostsEntitySchema: z.ZodObject<{
364
370
  }, z.core.$strip>>>;
365
371
  }, z.core.$strip>>;
366
372
  }, z.core.$strip>;
373
+ export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
367
374
  export declare const UserAuthStatusEntitySchema: z.ZodObject<{
368
375
  exists: z.ZodBoolean;
369
376
  isOAuthOnly: z.ZodBoolean;
@@ -399,6 +406,7 @@ export declare const UserWithProjectLikesEntitySchema: z.ZodObject<{
399
406
  }, z.core.$strip>;
400
407
  }, z.core.$strip>>;
401
408
  }, z.core.$strip>;
409
+ export type UserWithProjectLikesEntity = z.infer<typeof UserWithProjectLikesEntitySchema>;
402
410
  export declare const UserWithPostLikesEntitySchema: z.ZodObject<{
403
411
  userId: z.ZodCUID2;
404
412
  postLikes: z.ZodArray<z.ZodObject<{
@@ -429,6 +437,7 @@ export declare const UserWithPostLikesEntitySchema: z.ZodObject<{
429
437
  }, z.core.$strip>;
430
438
  }, z.core.$strip>>;
431
439
  }, z.core.$strip>;
440
+ export type UserWithPostLikesEntity = z.infer<typeof UserWithPostLikesEntitySchema>;
432
441
  export declare const UserWithJobBookmarksEntitySchema: z.ZodObject<{
433
442
  userId: z.ZodCUID2;
434
443
  jobBookmarks: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -474,10 +483,12 @@ export declare const UserWithJobBookmarksEntitySchema: z.ZodObject<{
474
483
  }, z.core.$strip>;
475
484
  }, z.core.$strip>>>;
476
485
  }, z.core.$strip>;
486
+ export type UserWithJobBookmarksEntity = z.infer<typeof UserWithJobBookmarksEntitySchema>;
477
487
  export declare const UserWithJobBookmarksInputSchema: z.ZodObject<{
478
488
  cursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
479
489
  limit: z.ZodNullable<z.ZodOptional<z.ZodInt>>;
480
490
  }, z.core.$strip>;
491
+ export type UserWithJobBookmarksInput = z.infer<typeof UserWithJobBookmarksInputSchema>;
481
492
  export declare const UserWithJobBookmarksOutputSchema: z.ZodObject<{
482
493
  bookmarks: z.ZodObject<{
483
494
  userId: z.ZodCUID2;
@@ -526,6 +537,7 @@ export declare const UserWithJobBookmarksOutputSchema: z.ZodObject<{
526
537
  }, z.core.$strip>;
527
538
  nextCursor: z.ZodNullable<z.ZodString>;
528
539
  }, z.core.$strip>;
540
+ export type UserWithJobBookmarksOutput = z.infer<typeof UserWithJobBookmarksOutputSchema>;
529
541
  export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
530
542
  userId: z.ZodCUID2;
531
543
  projectBookmarks: z.ZodArray<z.ZodObject<{
@@ -624,6 +636,7 @@ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
624
636
  }, z.core.$strip>;
625
637
  }, z.core.$strip>>;
626
638
  }, z.core.$strip>;
639
+ export type UserWithProjectBookmarksEntity = z.infer<typeof UserWithProjectBookmarksEntitySchema>;
627
640
  export declare const UserWithPostBookmarksEntitySchema: z.ZodObject<{
628
641
  userId: z.ZodCUID2;
629
642
  postBookmarks: z.ZodArray<z.ZodObject<{
@@ -718,6 +731,7 @@ export declare const UserWithPostBookmarksEntitySchema: z.ZodObject<{
718
731
  }, z.core.$strip>;
719
732
  }, z.core.$strip>>;
720
733
  }, z.core.$strip>;
734
+ export type UserWithPostBookmarksEntity = z.infer<typeof UserWithPostBookmarksEntitySchema>;
721
735
  export declare const UserWithProductsEntitySchema: z.ZodObject<{
722
736
  userId: z.ZodCUID2;
723
737
  products: z.ZodArray<z.ZodObject<{
@@ -810,10 +824,12 @@ export declare const GetUserWithProjectBookmarksInputSchema: z.ZodObject<{
810
824
  cursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
811
825
  limit: z.ZodNullable<z.ZodOptional<z.ZodInt>>;
812
826
  }, z.core.$strip>;
827
+ export type GetUserWithProjectBookmarksInput = z.infer<typeof GetUserWithProjectBookmarksInputSchema>;
813
828
  export declare const GetUserWithPostBookmarksInputSchema: z.ZodObject<{
814
829
  cursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
815
830
  limit: z.ZodNullable<z.ZodOptional<z.ZodInt>>;
816
831
  }, z.core.$strip>;
832
+ export type GetUserWithPostBookmarksInput = z.infer<typeof GetUserWithPostBookmarksInputSchema>;
817
833
  export declare const GetUserWithProjectBookmarksOutputSchema: z.ZodObject<{
818
834
  bookmarks: z.ZodObject<{
819
835
  userId: z.ZodCUID2;
@@ -915,6 +931,7 @@ export declare const GetUserWithProjectBookmarksOutputSchema: z.ZodObject<{
915
931
  }, z.core.$strip>;
916
932
  nextCursor: z.ZodNullable<z.ZodString>;
917
933
  }, z.core.$strip>;
934
+ export type GetUserWithProjectBookmarksOutput = z.infer<typeof GetUserWithProjectBookmarksOutputSchema>;
918
935
  export declare const GetUserWithProductsOutputSchema: z.ZodObject<{
919
936
  products: z.ZodObject<{
920
937
  userId: z.ZodCUID2;
@@ -1125,6 +1142,7 @@ export declare const GetUserWithPostBookmarksOutputSchema: z.ZodObject<{
1125
1142
  }, z.core.$strip>>;
1126
1143
  nextCursor: z.ZodNullable<z.ZodString>;
1127
1144
  }, z.core.$strip>;
1145
+ export type GetUserWithPostBookmarksOutput = z.infer<typeof GetUserWithPostBookmarksOutputSchema>;
1128
1146
  export declare const UserWithFollowingEntitySchema: z.ZodObject<{
1129
1147
  email: z.ZodEmail;
1130
1148
  username: z.ZodOptional<z.ZodString>;
@@ -1153,6 +1171,7 @@ export declare const UserWithFollowingEntitySchema: z.ZodObject<{
1153
1171
  followsYou: z.ZodOptional<z.ZodBoolean>;
1154
1172
  }, z.core.$strip>>;
1155
1173
  }, z.core.$strip>;
1174
+ export type UserWithFollowingEntity = z.infer<typeof UserWithFollowingEntitySchema>;
1156
1175
  export declare const UserWithFollowersEntitySchema: z.ZodObject<{
1157
1176
  email: z.ZodEmail;
1158
1177
  username: z.ZodOptional<z.ZodString>;
@@ -1181,14 +1200,17 @@ export declare const UserWithFollowersEntitySchema: z.ZodObject<{
1181
1200
  followsYou: z.ZodOptional<z.ZodBoolean>;
1182
1201
  }, z.core.$strip>>;
1183
1202
  }, z.core.$strip>;
1203
+ export type UserWithFollowersEntity = z.infer<typeof UserWithFollowersEntitySchema>;
1184
1204
  export declare const GetUserFollowingInputSchema: z.ZodObject<{
1185
1205
  searchQuery: z.ZodOptional<z.ZodString>;
1186
1206
  offset: z.ZodOptional<z.ZodNumber>;
1187
1207
  }, z.core.$strip>;
1208
+ export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
1188
1209
  export declare const GetUserFollowersInputSchema: z.ZodObject<{
1189
1210
  searchQuery: z.ZodOptional<z.ZodString>;
1190
1211
  offset: z.ZodOptional<z.ZodNumber>;
1191
1212
  }, z.core.$strip>;
1213
+ export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
1192
1214
  export declare const GetUserFollowingOutputSchema: z.ZodObject<{
1193
1215
  nextCursor: z.ZodString;
1194
1216
  following: z.ZodArray<z.ZodObject<{
@@ -1207,6 +1229,7 @@ export declare const GetUserFollowingOutputSchema: z.ZodObject<{
1207
1229
  followsYou: z.ZodOptional<z.ZodBoolean>;
1208
1230
  }, z.core.$strip>>;
1209
1231
  }, z.core.$strip>;
1232
+ export type GetUserFollowingOutput = z.infer<typeof GetUserFollowingOutputSchema>;
1210
1233
  export declare const GetUserFollowersOutputSchema: z.ZodObject<{
1211
1234
  nextCursor: z.ZodString;
1212
1235
  followers: z.ZodArray<z.ZodObject<{
@@ -1225,6 +1248,7 @@ export declare const GetUserFollowersOutputSchema: z.ZodObject<{
1225
1248
  followsYou: z.ZodOptional<z.ZodBoolean>;
1226
1249
  }, z.core.$strip>>;
1227
1250
  }, z.core.$strip>;
1251
+ export type GetUserFollowersOutput = z.infer<typeof GetUserFollowersOutputSchema>;
1228
1252
  export declare const GetAuthenticatedUserOutputSchema: z.ZodObject<{
1229
1253
  id: z.ZodCUID2;
1230
1254
  email: z.ZodEmail;
@@ -1259,6 +1283,7 @@ export declare const GetAuthenticatedUserOutputSchema: z.ZodObject<{
1259
1283
  version: z.ZodInt;
1260
1284
  updatedAt: z.ZodCoercedDate<unknown>;
1261
1285
  }, z.core.$strip>;
1286
+ export type GetAuthenticatedUserOutput = z.infer<typeof GetAuthenticatedUserOutputSchema>;
1262
1287
  export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
1263
1288
  id: z.ZodCUID2;
1264
1289
  email: z.ZodEmail;
@@ -1431,6 +1456,7 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
1431
1456
  version: z.ZodInt;
1432
1457
  }, z.core.$strip>;
1433
1458
  }, z.core.$strip>;
1459
+ export type GetAuthenticatedUserProfileOutput = z.infer<typeof GetAuthenticatedUserProfileOutputSchema>;
1434
1460
  export declare const GetAuthenticatedUserWithProjectsOutputSchema: z.ZodObject<{
1435
1461
  userId: z.ZodCUID2;
1436
1462
  projects: z.ZodArray<z.ZodObject<{
@@ -1495,6 +1521,7 @@ export declare const GetAuthenticatedUserWithProjectsOutputSchema: z.ZodObject<{
1495
1521
  version: z.ZodNumber;
1496
1522
  }, z.core.$strip>>;
1497
1523
  }, z.core.$strip>;
1524
+ export type GetAuthenticatedUserWithProjectsOutput = z.infer<typeof GetAuthenticatedUserWithProjectsOutputSchema>;
1498
1525
  export declare const GetAuthenticatedUserWithProjectBookmarksOutputSchema: z.ZodObject<{
1499
1526
  userId: z.ZodCUID2;
1500
1527
  projectBookmarks: z.ZodArray<z.ZodObject<{
@@ -1593,6 +1620,7 @@ export declare const GetAuthenticatedUserWithProjectBookmarksOutputSchema: z.Zod
1593
1620
  }, z.core.$strip>;
1594
1621
  }, z.core.$strip>>;
1595
1622
  }, z.core.$strip>;
1623
+ export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<typeof GetAuthenticatedUserWithProjectBookmarksOutputSchema>;
1596
1624
  export declare const GetAuthenticatedUserWithProjectLikesOutputSchema: z.ZodObject<{
1597
1625
  userId: z.ZodCUID2;
1598
1626
  projectLikes: z.ZodArray<z.ZodObject<{
@@ -1622,6 +1650,7 @@ export declare const GetAuthenticatedUserWithProjectLikesOutputSchema: z.ZodObje
1622
1650
  }, z.core.$strip>;
1623
1651
  }, z.core.$strip>>;
1624
1652
  }, z.core.$strip>;
1653
+ export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<typeof GetAuthenticatedUserWithProjectLikesOutputSchema>;
1625
1654
  export declare const GetAuthenticatedUserWithUserFollowingOutputSchema: z.ZodObject<{
1626
1655
  email: z.ZodEmail;
1627
1656
  username: z.ZodOptional<z.ZodString>;
@@ -1650,6 +1679,7 @@ export declare const GetAuthenticatedUserWithUserFollowingOutputSchema: z.ZodObj
1650
1679
  followsYou: z.ZodOptional<z.ZodBoolean>;
1651
1680
  }, z.core.$strip>>;
1652
1681
  }, z.core.$strip>;
1682
+ export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<typeof GetAuthenticatedUserWithUserFollowingOutputSchema>;
1653
1683
  export declare const GetAuthenticatedUserWithUserFollowersOutputSchema: z.ZodObject<{
1654
1684
  email: z.ZodEmail;
1655
1685
  username: z.ZodOptional<z.ZodString>;
@@ -1678,6 +1708,7 @@ export declare const GetAuthenticatedUserWithUserFollowersOutputSchema: z.ZodObj
1678
1708
  followsYou: z.ZodOptional<z.ZodBoolean>;
1679
1709
  }, z.core.$strip>>;
1680
1710
  }, z.core.$strip>;
1711
+ export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<typeof GetAuthenticatedUserWithUserFollowersOutputSchema>;
1681
1712
  export declare const GetUserActivityInputSchema: z.ZodObject<{
1682
1713
  activityType: z.ZodEnum<{
1683
1714
  LIKE: "LIKE";
@@ -1687,6 +1718,7 @@ export declare const GetUserActivityInputSchema: z.ZodObject<{
1687
1718
  VIEW: "VIEW";
1688
1719
  }>;
1689
1720
  }, z.core.$strip>;
1721
+ export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
1690
1722
  export declare const GetUserActivityOutputSchema: z.ZodArray<z.ZodObject<{
1691
1723
  parentId: z.ZodCUID2;
1692
1724
  parentType: z.ZodEnum<{
@@ -1701,17 +1733,21 @@ export declare const GetUserActivityOutputSchema: z.ZodArray<z.ZodObject<{
1701
1733
  JOB_APPLICATION: "JOB_APPLICATION";
1702
1734
  }>;
1703
1735
  }, z.core.$strip>>;
1736
+ export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
1704
1737
  export declare const SearchUsersInputSchema: z.ZodObject<{
1705
1738
  query: z.ZodDefault<z.ZodString>;
1706
- role: z.ZodOptional<z.ZodEnum<{
1739
+ roles: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1707
1740
  CREATIVE: "CREATIVE";
1708
1741
  BRAND: "BRAND";
1709
1742
  INVESTOR: "INVESTOR";
1710
1743
  ADMIN: "ADMIN";
1711
- }>>;
1744
+ }>>>;
1745
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
1746
+ locations: z.ZodOptional<z.ZodArray<z.ZodString>>;
1712
1747
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1713
- cursor: z.ZodOptional<z.ZodString>;
1748
+ cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1714
1749
  }, z.core.$strip>;
1750
+ export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
1715
1751
  export declare const SearchUsersOutputSchema: z.ZodObject<{
1716
1752
  users: z.ZodArray<z.ZodObject<{
1717
1753
  email: z.ZodEmail;
@@ -1732,6 +1768,7 @@ export declare const SearchUsersOutputSchema: z.ZodObject<{
1732
1768
  }, z.core.$strip>>;
1733
1769
  nextCursor: z.ZodOptional<z.ZodString>;
1734
1770
  }, z.core.$strip>;
1771
+ export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
1735
1772
  export declare const UserSearchDocumentSchema: z.ZodObject<{
1736
1773
  id: z.ZodCUID2;
1737
1774
  email: z.ZodEmail;
@@ -1749,3 +1786,4 @@ export declare const UserSearchDocumentSchema: z.ZodObject<{
1749
1786
  updatedAt: z.ZodNullable<z.ZodString>;
1750
1787
  createdAt: z.ZodNullable<z.ZodString>;
1751
1788
  }, z.core.$strip>;
1789
+ export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
@@ -12,9 +12,6 @@ const investor_1 = require("./investor");
12
12
  const post_1 = require("./post");
13
13
  const job_1 = require("./job");
14
14
  const product_1 = require("./product");
15
- // ==========================================
16
- // 1. CORE USER ENTITIES
17
- // ==========================================
18
15
  exports.UserEntitySchema = zod_openapi_1.z
19
16
  .object({
20
17
  id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
@@ -69,9 +66,6 @@ exports.UserStatsEntitySchema = zod_openapi_1.z.object({
69
66
  .array(zod_openapi_1.z.cuid2())
70
67
  .openapi({ example: ["cksd0v6q0000s9a5y8z7p3x9", "clm1a2b3c0000abc"] }),
71
68
  });
72
- // ==========================================
73
- // 2. CONTENT ASSOCIATIONS (Projects, Posts)
74
- // ==========================================
75
69
  exports.UserWithProjectsEntitySchema = zod_openapi_1.z
76
70
  .object({
77
71
  userId: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
@@ -91,9 +85,6 @@ exports.UserAuthStatusEntitySchema = zod_openapi_1.z.object({
91
85
  isOAuthOnly: zod_openapi_1.z.boolean(),
92
86
  providers: zod_openapi_1.z.array(zod_openapi_1.z.string()),
93
87
  });
94
- // ==========================================
95
- // 3. LIKES
96
- // ==========================================
97
88
  exports.UserWithProjectLikesEntitySchema = zod_openapi_1.z.object({
98
89
  userId: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
99
90
  projectLikes: zod_openapi_1.z
@@ -126,9 +117,6 @@ exports.UserWithPostLikesEntitySchema = zod_openapi_1.z.object({
126
117
  }))
127
118
  .openapi({ example: [] }),
128
119
  });
129
- // ==========================================
130
- // 4. BOOKMARKS
131
- // ==========================================
132
120
  exports.UserWithJobBookmarksEntitySchema = zod_openapi_1.z.object({
133
121
  userId: zod_openapi_1.z.cuid2().openapi({ example: "afoaifaofi" }),
134
122
  jobBookmarks: zod_openapi_1.z
@@ -184,9 +172,6 @@ exports.GetUserWithPostBookmarksOutputSchema = zod_openapi_1.z.object({
184
172
  })),
185
173
  nextCursor: zod_openapi_1.z.string().nullable(),
186
174
  });
187
- // ==========================================
188
- // 5. FOLLOWERS & FOLLOWING
189
- // ==========================================
190
175
  exports.UserWithFollowingEntitySchema = exports.MinimalUserSchema.extend({
191
176
  following: zod_openapi_1.z
192
177
  .array(exports.MinimalUserSchema.extend({
@@ -235,9 +220,6 @@ exports.GetUserFollowersOutputSchema = zod_openapi_1.z.object({
235
220
  }))
236
221
  .openapi({ example: [] }),
237
222
  });
238
- // ==========================================
239
- // 6. AUTHENTICATED USER OUTPUTS
240
- // ==========================================
241
223
  exports.GetAuthenticatedUserOutputSchema = exports.UserEntitySchema;
242
224
  exports.GetAuthenticatedUserProfileOutputSchema = exports.UserProfileEntitySchema;
243
225
  exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.UserWithProjectsEntitySchema;
@@ -245,9 +227,6 @@ exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.UserWithP
245
227
  exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.UserWithProjectLikesEntitySchema;
246
228
  exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.UserWithFollowingEntitySchema;
247
229
  exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.UserWithFollowersEntitySchema;
248
- // ==========================================
249
- // 7. ACTIVITY
250
- // ==========================================
251
230
  exports.GetUserActivityInputSchema = zod_openapi_1.z.object({
252
231
  activityType: zod_openapi_1.z
253
232
  .enum(Object.values(constants_1.ACTIVITY_TYPES))
@@ -261,20 +240,25 @@ exports.GetUserActivityOutputSchema = zod_openapi_1.z
261
240
  .openapi({ example: "POST" }),
262
241
  }))
263
242
  .openapi({ example: [] });
264
- // ==========================================
265
- // 8. SEARCH
266
- // ==========================================
267
243
  exports.SearchUsersInputSchema = zod_openapi_1.z.object({
268
244
  query: zod_openapi_1.z.string().default("").openapi({
269
245
  example: "john",
270
246
  description: "Search by name, email, username, or discipline",
271
247
  }),
272
- role: zod_openapi_1.z
273
- .enum(Object.values(constants_1.ROLES))
248
+ roles: zod_openapi_1.z
249
+ .array(zod_openapi_1.z.enum(Object.values(constants_1.ROLES)))
274
250
  .optional()
275
- .openapi({ example: "CREATIVE" }),
251
+ .openapi({ example: ["CREATIVE", "BRAND"] }),
252
+ disciplines: zod_openapi_1.z
253
+ .array(zod_openapi_1.z.string())
254
+ .optional()
255
+ .openapi({ example: ["Design Systems", "Web Development"] }),
256
+ locations: zod_openapi_1.z
257
+ .array(zod_openapi_1.z.string())
258
+ .optional()
259
+ .openapi({ example: ["Lagos, Nigeria", "London, UK"] }),
276
260
  limit: zod_openapi_1.z.coerce.number().min(1).max(100).default(20).openapi({ example: 20 }),
277
- cursor: zod_openapi_1.z.string().optional().openapi({
261
+ cursor: zod_openapi_1.z.string().nullable().optional().openapi({
278
262
  example: "cksd0v6q0000cursor",
279
263
  description: "The offset/cursor for pagination",
280
264
  }),
@@ -3,7 +3,6 @@ export * from "./bookmark";
3
3
  export * from "./like";
4
4
  export * from "./common";
5
5
  export * from "./discipline";
6
- export * from "./user";
7
6
  export * from "./comment";
8
7
  export * from "./username";
9
8
  export * from "./entity-stats";
@@ -19,7 +19,6 @@ __exportStar(require("./bookmark"), exports);
19
19
  __exportStar(require("./like"), exports);
20
20
  __exportStar(require("./common"), exports);
21
21
  __exportStar(require("./discipline"), exports);
22
- __exportStar(require("./user"), exports);
23
22
  __exportStar(require("./comment"), exports);
24
23
  __exportStar(require("./username"), exports);
25
24
  __exportStar(require("./entity-stats"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.20",
3
+ "version": "2.5.22",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -136,17 +136,6 @@ export const UpdateProjectInputSchema = z
136
136
 
137
137
  export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
138
138
 
139
- export const SearchProjectsInputSchema = z
140
- .object({
141
- query: z.string().optional(),
142
- tags: z.array(z.string()).optional(),
143
- limit: z.coerce.number().min(1).max(100).default(20),
144
- cursor: z.string().optional(),
145
- })
146
- .openapi("SearchProjectsInput");
147
-
148
- export type SearchProjectsInput = z.infer<typeof SearchProjectsInputSchema>;
149
-
150
139
  export const CommentOnProjectInputSchema = CommentEntitySchema;
151
140
 
152
141
  export type CommentOnProjectInput = z.infer<typeof CommentOnProjectInputSchema>;
@@ -196,6 +185,23 @@ export const ProjectSearchDocumentSchema = z
196
185
 
197
186
  export type ProjectSearchDocument = z.infer<typeof ProjectSearchDocumentSchema>;
198
187
 
188
+ export const SearchProjectsInputSchema = z
189
+ .object({
190
+ query: z.string().optional(),
191
+ limit: z.number().optional().default(40),
192
+ cursor: z.string().optional().nullable(),
193
+ tags: z.array(z.string()).optional(),
194
+ isOpenToInvestment: z.boolean().optional(),
195
+ minCapital: z.number().optional(),
196
+ maxCapital: z.number().optional(),
197
+ ventureStages: z.array(z.enum(VENTURE_STAGES)).optional(),
198
+ projectCreatorTypes: z.array(z.enum(ROLES)).optional(),
199
+ clientTypes: z.array(z.enum(CLIENT_TYPES)).optional(),
200
+ })
201
+ .openapi("SearchProjectsInput");
202
+
203
+ export type SearchProjectsInput = z.infer<typeof SearchProjectsInputSchema>;
204
+
199
205
  export const SearchProjectsOutputSchema = z
200
206
  .object({
201
207
  projects: z.array(ProjectSearchDocumentSchema),
@@ -14,6 +14,7 @@ import type {
14
14
  ActivityType,
15
15
  ActivityParentType,
16
16
  } from "../constants";
17
+
17
18
  import { ProjectEntitySchema, ProjectSearchDocumentSchema } from "./project";
18
19
  import { BookmarkEntitySchema } from "./bookmark";
19
20
  import { LikeEntitySchema } from "./like";
@@ -28,10 +29,6 @@ import {
28
29
  import { JobEntitySchema, JobSearchDocumentSchema } from "./job";
29
30
  import { ProductEntitySchema } from "./product";
30
31
 
31
- // ==========================================
32
- // 1. CORE USER ENTITIES
33
- // ==========================================
34
-
35
32
  export const UserEntitySchema = z
36
33
  .object({
37
34
  id: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
@@ -68,6 +65,9 @@ export const UserEntitySchema = z
68
65
  })
69
66
  .openapi("BaseUserEntity");
70
67
 
68
+ export type BaseUserEntity = z.infer<typeof UserEntitySchema>;
69
+ export type UserEntity = z.infer<typeof UserEntitySchema>;
70
+
71
71
  export const MinimalUserSchema = UserEntitySchema.pick({
72
72
  id: true,
73
73
  name: true,
@@ -77,6 +77,8 @@ export const MinimalUserSchema = UserEntitySchema.pick({
77
77
  role: true,
78
78
  }).openapi("MinimalUser");
79
79
 
80
+ export type MinimalUser = z.infer<typeof MinimalUserSchema>;
81
+
80
82
  export const UserProfileEntitySchema = UserEntitySchema.extend({
81
83
  profileType: z
82
84
  .enum(["creative", "brand", "investor"])
@@ -87,6 +89,8 @@ export const UserProfileEntitySchema = UserEntitySchema.extend({
87
89
  investor: InvestorEntitySchema,
88
90
  }).openapi("UserProfileEntity");
89
91
 
92
+ export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
93
+
90
94
  export const UserStatsEntitySchema = z.object({
91
95
  followerCount: z.int().openapi({ example: 1540 }),
92
96
  followingCount: z.int().openapi({ example: 234 }),
@@ -95,9 +99,7 @@ export const UserStatsEntitySchema = z.object({
95
99
  .openapi({ example: ["cksd0v6q0000s9a5y8z7p3x9", "clm1a2b3c0000abc"] }),
96
100
  });
97
101
 
98
- // ==========================================
99
- // 2. CONTENT ASSOCIATIONS (Projects, Posts)
100
- // ==========================================
102
+ export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
101
103
 
102
104
  export const UserWithProjectsEntitySchema = z
103
105
  .object({
@@ -108,6 +110,10 @@ export const UserWithProjectsEntitySchema = z
108
110
  })
109
111
  .openapi("UserWithProjectsEntity");
110
112
 
113
+ export type UserWithProjectsEntity = z.infer<
114
+ typeof UserWithProjectsEntitySchema
115
+ >;
116
+
111
117
  export const UserWithPostsEntitySchema = z
112
118
  .object({
113
119
  userId: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
@@ -115,6 +121,8 @@ export const UserWithPostsEntitySchema = z
115
121
  })
116
122
  .openapi("UserWithPostsEntity");
117
123
 
124
+ export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
125
+
118
126
  export const UserAuthStatusEntitySchema = z.object({
119
127
  exists: z.boolean(),
120
128
  isOAuthOnly: z.boolean(),
@@ -123,10 +131,6 @@ export const UserAuthStatusEntitySchema = z.object({
123
131
 
124
132
  export type UserAuthStatusEntity = z.infer<typeof UserAuthStatusEntitySchema>;
125
133
 
126
- // ==========================================
127
- // 3. LIKES
128
- // ==========================================
129
-
130
134
  export const UserWithProjectLikesEntitySchema = z.object({
131
135
  userId: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
132
136
  projectLikes: z
@@ -146,6 +150,10 @@ export const UserWithProjectLikesEntitySchema = z.object({
146
150
  .openapi({ example: [] }),
147
151
  });
148
152
 
153
+ export type UserWithProjectLikesEntity = z.infer<
154
+ typeof UserWithProjectLikesEntitySchema
155
+ >;
156
+
149
157
  export const UserWithPostLikesEntitySchema = z.object({
150
158
  userId: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
151
159
  postLikes: z
@@ -165,9 +173,9 @@ export const UserWithPostLikesEntitySchema = z.object({
165
173
  .openapi({ example: [] }),
166
174
  });
167
175
 
168
- // ==========================================
169
- // 4. BOOKMARKS
170
- // ==========================================
176
+ export type UserWithPostLikesEntity = z.infer<
177
+ typeof UserWithPostLikesEntitySchema
178
+ >;
171
179
 
172
180
  export const UserWithJobBookmarksEntitySchema = z.object({
173
181
  userId: z.cuid2().openapi({ example: "afoaifaofi" }),
@@ -182,16 +190,28 @@ export const UserWithJobBookmarksEntitySchema = z.object({
182
190
  .optional(),
183
191
  });
184
192
 
193
+ export type UserWithJobBookmarksEntity = z.infer<
194
+ typeof UserWithJobBookmarksEntitySchema
195
+ >;
196
+
185
197
  export const UserWithJobBookmarksInputSchema = z.object({
186
198
  cursor: z.string().optional().nullable(),
187
199
  limit: z.int().positive().optional().nullable(),
188
200
  });
189
201
 
202
+ export type UserWithJobBookmarksInput = z.infer<
203
+ typeof UserWithJobBookmarksInputSchema
204
+ >;
205
+
190
206
  export const UserWithJobBookmarksOutputSchema = z.object({
191
207
  bookmarks: UserWithJobBookmarksEntitySchema,
192
208
  nextCursor: z.string().nullable(),
193
209
  });
194
210
 
211
+ export type UserWithJobBookmarksOutput = z.infer<
212
+ typeof UserWithJobBookmarksOutputSchema
213
+ >;
214
+
195
215
  export const UserWithProjectBookmarksEntitySchema = z
196
216
  .object({
197
217
  userId: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
@@ -205,6 +225,10 @@ export const UserWithProjectBookmarksEntitySchema = z
205
225
  })
206
226
  .openapi("UserWithProjectBookmarksEntity");
207
227
 
228
+ export type UserWithProjectBookmarksEntity = z.infer<
229
+ typeof UserWithProjectBookmarksEntitySchema
230
+ >;
231
+
208
232
  export const UserWithPostBookmarksEntitySchema = z.object({
209
233
  userId: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
210
234
  postBookmarks: z.array(
@@ -214,6 +238,10 @@ export const UserWithPostBookmarksEntitySchema = z.object({
214
238
  ),
215
239
  });
216
240
 
241
+ export type UserWithPostBookmarksEntity = z.infer<
242
+ typeof UserWithPostBookmarksEntitySchema
243
+ >;
244
+
217
245
  export const UserWithProductsEntitySchema = z.object({
218
246
  userId: z.cuid2(),
219
247
  products: z.array(ProductEntitySchema),
@@ -225,14 +253,27 @@ export type UserWithProductsEntity = z.infer<
225
253
 
226
254
  export const GetUserWithProjectBookmarksInputSchema =
227
255
  UserWithJobBookmarksInputSchema;
256
+
257
+ export type GetUserWithProjectBookmarksInput = z.infer<
258
+ typeof GetUserWithProjectBookmarksInputSchema
259
+ >;
260
+
228
261
  export const GetUserWithPostBookmarksInputSchema =
229
262
  UserWithJobBookmarksInputSchema;
230
263
 
264
+ export type GetUserWithPostBookmarksInput = z.infer<
265
+ typeof GetUserWithPostBookmarksInputSchema
266
+ >;
267
+
231
268
  export const GetUserWithProjectBookmarksOutputSchema = z.object({
232
269
  bookmarks: UserWithProjectBookmarksEntitySchema,
233
270
  nextCursor: z.string().nullable(),
234
271
  });
235
272
 
273
+ export type GetUserWithProjectBookmarksOutput = z.infer<
274
+ typeof GetUserWithProjectBookmarksOutputSchema
275
+ >;
276
+
236
277
  export const GetUserWithProductsOutputSchema = z.object({
237
278
  products: UserWithProductsEntitySchema,
238
279
  noOfProducts: z.int().nullable(),
@@ -252,9 +293,9 @@ export const GetUserWithPostBookmarksOutputSchema = z.object({
252
293
  nextCursor: z.string().nullable(),
253
294
  });
254
295
 
255
- // ==========================================
256
- // 5. FOLLOWERS & FOLLOWING
257
- // ==========================================
296
+ export type GetUserWithPostBookmarksOutput = z.infer<
297
+ typeof GetUserWithPostBookmarksOutputSchema
298
+ >;
258
299
 
259
300
  export const UserWithFollowingEntitySchema = MinimalUserSchema.extend({
260
301
  following: z
@@ -270,6 +311,10 @@ export const UserWithFollowingEntitySchema = MinimalUserSchema.extend({
270
311
  }),
271
312
  }).openapi("UserWithFollowingEntity");
272
313
 
314
+ export type UserWithFollowingEntity = z.infer<
315
+ typeof UserWithFollowingEntitySchema
316
+ >;
317
+
273
318
  export const UserWithFollowersEntitySchema = MinimalUserSchema.extend({
274
319
  followers: z
275
320
  .array(
@@ -284,16 +329,24 @@ export const UserWithFollowersEntitySchema = MinimalUserSchema.extend({
284
329
  }),
285
330
  }).openapi("UserWithFollowersEntity");
286
331
 
332
+ export type UserWithFollowersEntity = z.infer<
333
+ typeof UserWithFollowersEntitySchema
334
+ >;
335
+
287
336
  export const GetUserFollowingInputSchema = z.object({
288
337
  searchQuery: z.string().optional().openapi({ example: "design systems" }),
289
338
  offset: z.number().int().nonnegative().optional().openapi({ example: 20 }),
290
339
  });
291
340
 
341
+ export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
342
+
292
343
  export const GetUserFollowersInputSchema = z.object({
293
344
  searchQuery: z.string().optional().openapi({ example: "design systems" }),
294
345
  offset: z.number().int().nonnegative().optional().openapi({ example: 20 }),
295
346
  });
296
347
 
348
+ export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
349
+
297
350
  export const GetUserFollowingOutputSchema = z.object({
298
351
  nextCursor: z.string().openapi({ example: "cksd0v6q0000nxtcur" }),
299
352
  following: z
@@ -306,6 +359,10 @@ export const GetUserFollowingOutputSchema = z.object({
306
359
  .openapi({ example: [] }),
307
360
  });
308
361
 
362
+ export type GetUserFollowingOutput = z.infer<
363
+ typeof GetUserFollowingOutputSchema
364
+ >;
365
+
309
366
  export const GetUserFollowersOutputSchema = z.object({
310
367
  nextCursor: z.string().openapi({ example: "cksd0v6q0000nxtcur" }),
311
368
  followers: z
@@ -318,26 +375,56 @@ export const GetUserFollowersOutputSchema = z.object({
318
375
  .openapi({ example: [] }),
319
376
  });
320
377
 
321
- // ==========================================
322
- // 6. AUTHENTICATED USER OUTPUTS
323
- // ==========================================
378
+ export type GetUserFollowersOutput = z.infer<
379
+ typeof GetUserFollowersOutputSchema
380
+ >;
324
381
 
325
382
  export const GetAuthenticatedUserOutputSchema = UserEntitySchema;
383
+
384
+ export type GetAuthenticatedUserOutput = z.infer<
385
+ typeof GetAuthenticatedUserOutputSchema
386
+ >;
387
+
326
388
  export const GetAuthenticatedUserProfileOutputSchema = UserProfileEntitySchema;
389
+
390
+ export type GetAuthenticatedUserProfileOutput = z.infer<
391
+ typeof GetAuthenticatedUserProfileOutputSchema
392
+ >;
393
+
327
394
  export const GetAuthenticatedUserWithProjectsOutputSchema =
328
395
  UserWithProjectsEntitySchema;
396
+
397
+ export type GetAuthenticatedUserWithProjectsOutput = z.infer<
398
+ typeof GetAuthenticatedUserWithProjectsOutputSchema
399
+ >;
400
+
329
401
  export const GetAuthenticatedUserWithProjectBookmarksOutputSchema =
330
402
  UserWithProjectBookmarksEntitySchema;
403
+
404
+ export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<
405
+ typeof GetAuthenticatedUserWithProjectBookmarksOutputSchema
406
+ >;
407
+
331
408
  export const GetAuthenticatedUserWithProjectLikesOutputSchema =
332
409
  UserWithProjectLikesEntitySchema;
410
+
411
+ export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<
412
+ typeof GetAuthenticatedUserWithProjectLikesOutputSchema
413
+ >;
414
+
333
415
  export const GetAuthenticatedUserWithUserFollowingOutputSchema =
334
416
  UserWithFollowingEntitySchema;
417
+
418
+ export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<
419
+ typeof GetAuthenticatedUserWithUserFollowingOutputSchema
420
+ >;
421
+
335
422
  export const GetAuthenticatedUserWithUserFollowersOutputSchema =
336
423
  UserWithFollowersEntitySchema;
337
424
 
338
- // ==========================================
339
- // 7. ACTIVITY
340
- // ==========================================
425
+ export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
426
+ typeof GetAuthenticatedUserWithUserFollowersOutputSchema
427
+ >;
341
428
 
342
429
  export const GetUserActivityInputSchema = z.object({
343
430
  activityType: z
@@ -345,6 +432,8 @@ export const GetUserActivityInputSchema = z.object({
345
432
  .openapi({ example: "LIKE" }),
346
433
  });
347
434
 
435
+ export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
436
+
348
437
  export const GetUserActivityOutputSchema = z
349
438
  .array(
350
439
  z.object({
@@ -361,26 +450,34 @@ export const GetUserActivityOutputSchema = z
361
450
  )
362
451
  .openapi({ example: [] });
363
452
 
364
- // ==========================================
365
- // 8. SEARCH
366
- // ==========================================
453
+ export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
367
454
 
368
455
  export const SearchUsersInputSchema = z.object({
369
456
  query: z.string().default("").openapi({
370
457
  example: "john",
371
458
  description: "Search by name, email, username, or discipline",
372
459
  }),
373
- role: z
374
- .enum(Object.values(ROLES) as [Role, ...Role[]])
460
+ roles: z
461
+ .array(z.enum(Object.values(ROLES) as [Role, ...Role[]]))
462
+ .optional()
463
+ .openapi({ example: ["CREATIVE", "BRAND"] }),
464
+ disciplines: z
465
+ .array(z.string())
375
466
  .optional()
376
- .openapi({ example: "CREATIVE" }),
467
+ .openapi({ example: ["Design Systems", "Web Development"] }),
468
+ locations: z
469
+ .array(z.string())
470
+ .optional()
471
+ .openapi({ example: ["Lagos, Nigeria", "London, UK"] }),
377
472
  limit: z.coerce.number().min(1).max(100).default(20).openapi({ example: 20 }),
378
- cursor: z.string().optional().openapi({
473
+ cursor: z.string().nullable().optional().openapi({
379
474
  example: "cksd0v6q0000cursor",
380
475
  description: "The offset/cursor for pagination",
381
476
  }),
382
477
  });
383
478
 
479
+ export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
480
+
384
481
  export const SearchUsersOutputSchema = z.object({
385
482
  users: z
386
483
  .array(
@@ -406,6 +503,8 @@ export const SearchUsersOutputSchema = z.object({
406
503
  }),
407
504
  });
408
505
 
506
+ export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
507
+
409
508
  export const UserSearchDocumentSchema = z
410
509
  .object({
411
510
  id: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
@@ -437,3 +536,5 @@ export const UserSearchDocumentSchema = z
437
536
  title: "User Search Document",
438
537
  description: "Flattened schema used for indexing users in search engines.",
439
538
  });
539
+
540
+ export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
@@ -3,7 +3,6 @@ export * from "./bookmark";
3
3
  export * from "./like";
4
4
  export * from "./common";
5
5
  export * from "./discipline";
6
- export * from "./user";
7
6
  export * from "./comment";
8
7
  export * from "./username";
9
8
  export * from "./entity-stats";
package/src/types/user.ts DELETED
@@ -1,157 +0,0 @@
1
- import { z } from "@hono/zod-openapi";
2
-
3
- import {
4
- UserEntitySchema,
5
- MinimalUserSchema,
6
- UserProfileEntitySchema,
7
- UserStatsEntitySchema,
8
- UserWithProjectsEntitySchema,
9
- UserWithPostsEntitySchema,
10
- UserWithProjectLikesEntitySchema,
11
- UserWithPostLikesEntitySchema,
12
- UserWithJobBookmarksEntitySchema,
13
- UserWithJobBookmarksInputSchema,
14
- UserWithJobBookmarksOutputSchema,
15
- UserWithProjectBookmarksEntitySchema,
16
- UserWithPostBookmarksEntitySchema,
17
- GetUserWithProjectBookmarksInputSchema,
18
- GetUserWithPostBookmarksInputSchema,
19
- GetUserWithProjectBookmarksOutputSchema,
20
- GetUserWithPostBookmarksOutputSchema,
21
- UserWithFollowingEntitySchema,
22
- UserWithFollowersEntitySchema,
23
- GetUserFollowingInputSchema,
24
- GetUserFollowersInputSchema,
25
- GetUserFollowingOutputSchema,
26
- GetUserFollowersOutputSchema,
27
- GetAuthenticatedUserOutputSchema,
28
- GetAuthenticatedUserProfileOutputSchema,
29
- GetAuthenticatedUserWithProjectsOutputSchema,
30
- GetAuthenticatedUserWithProjectBookmarksOutputSchema,
31
- GetAuthenticatedUserWithProjectLikesOutputSchema,
32
- GetAuthenticatedUserWithUserFollowingOutputSchema,
33
- GetAuthenticatedUserWithUserFollowersOutputSchema,
34
- GetUserActivityInputSchema,
35
- GetUserActivityOutputSchema,
36
- SearchUsersInputSchema,
37
- SearchUsersOutputSchema,
38
- UserSearchDocumentSchema,
39
- } from "../schemas/user";
40
-
41
- // ==========================================
42
- // 1. CORE USER ENTITIES
43
- // ==========================================
44
- export type BaseUserEntity = z.infer<typeof UserEntitySchema>;
45
- export type UserEntity = z.infer<typeof UserEntitySchema>;
46
- export type MinimalUser = z.infer<typeof MinimalUserSchema>;
47
- export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
48
- export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
49
-
50
- // ==========================================
51
- // 2. CONTENT ASSOCIATIONS (Projects, Posts)
52
- // ==========================================
53
- export type UserWithProjectsEntity = z.infer<
54
- typeof UserWithProjectsEntitySchema
55
- >;
56
- export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
57
-
58
- // ==========================================
59
- // 3. LIKES
60
- // ==========================================
61
- export type UserWithProjectLikesEntity = z.infer<
62
- typeof UserWithProjectLikesEntitySchema
63
- >;
64
- export type UserWithPostLikesEntity = z.infer<
65
- typeof UserWithPostLikesEntitySchema
66
- >;
67
-
68
- // ==========================================
69
- // 4. BOOKMARKS
70
- // ==========================================
71
- export type UserWithJobBookmarksEntity = z.infer<
72
- typeof UserWithJobBookmarksEntitySchema
73
- >;
74
- export type UserWithJobBookmarksInput = z.infer<
75
- typeof UserWithJobBookmarksInputSchema
76
- >;
77
- export type UserWithJobBookmarksOutput = z.infer<
78
- typeof UserWithJobBookmarksOutputSchema
79
- >;
80
-
81
- export type UserWithProjectBookmarksEntity = z.infer<
82
- typeof UserWithProjectBookmarksEntitySchema
83
- >;
84
- export type UserWithPostBookmarksEntity = z.infer<
85
- typeof UserWithPostBookmarksEntitySchema
86
- >;
87
-
88
- export type GetUserWithProjectBookmarksInput = z.infer<
89
- typeof GetUserWithProjectBookmarksInputSchema
90
- >;
91
- export type GetUserWithPostBookmarksInput = z.infer<
92
- typeof GetUserWithPostBookmarksInputSchema
93
- >;
94
- export type GetUserWithProjectBookmarksOutput = z.infer<
95
- typeof GetUserWithProjectBookmarksOutputSchema
96
- >;
97
- export type GetUserWithPostBookmarksOutput = z.infer<
98
- typeof GetUserWithPostBookmarksOutputSchema
99
- >;
100
-
101
- // ==========================================
102
- // 5. FOLLOWERS & FOLLOWING
103
- // ==========================================
104
- export type UserWithFollowingEntity = z.infer<
105
- typeof UserWithFollowingEntitySchema
106
- >;
107
- export type UserWithFollowersEntity = z.infer<
108
- typeof UserWithFollowersEntitySchema
109
- >;
110
-
111
- export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
112
- export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
113
-
114
- export type GetUserFollowingOutput = z.infer<
115
- typeof GetUserFollowingOutputSchema
116
- >;
117
- export type GetUserFollowersOutput = z.infer<
118
- typeof GetUserFollowersOutputSchema
119
- >;
120
-
121
- // ==========================================
122
- // 6. AUTHENTICATED USER OUTPUTS
123
- // ==========================================
124
- export type GetAuthenticatedUserOutput = z.infer<
125
- typeof GetAuthenticatedUserOutputSchema
126
- >;
127
- export type GetAuthenticatedUserProfileOutput = z.infer<
128
- typeof GetAuthenticatedUserProfileOutputSchema
129
- >;
130
- export type GetAuthenticatedUserWithProjectsOutput = z.infer<
131
- typeof GetAuthenticatedUserWithProjectsOutputSchema
132
- >;
133
- export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<
134
- typeof GetAuthenticatedUserWithProjectBookmarksOutputSchema
135
- >;
136
- export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<
137
- typeof GetAuthenticatedUserWithProjectLikesOutputSchema
138
- >;
139
- export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<
140
- typeof GetAuthenticatedUserWithUserFollowingOutputSchema
141
- >;
142
- export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
143
- typeof GetAuthenticatedUserWithUserFollowersOutputSchema
144
- >;
145
-
146
- // ==========================================
147
- // 7. ACTIVITY
148
- // ==========================================
149
- export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
150
- export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
151
-
152
- // ==========================================
153
- // 8. SEARCH
154
- // ==========================================
155
- export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
156
- export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
157
- export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;