@zyacreatives/shared 2.5.15 → 2.5.17

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.
@@ -1,7 +1,7 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- /**
3
- * BASE ENTITY SCHEMAS
4
- */
2
+ import { CommentEntitySchema } from "./comment";
3
+ import { ViewEntitySchema } from "./view";
4
+ import { LikeEntitySchema } from "./like";
5
5
  export declare const ProjectEntitySchema: z.ZodObject<{
6
6
  id: z.ZodCUID2;
7
7
  userId: z.ZodCUID2;
@@ -64,6 +64,93 @@ export declare const ProjectEntitySchema: z.ZodObject<{
64
64
  updatedAt: z.ZodCoercedDate<unknown>;
65
65
  version: z.ZodNumber;
66
66
  }, z.core.$strip>;
67
+ export type ProjectEntity = z.infer<typeof ProjectEntitySchema>;
68
+ export declare const ProjectWithFilesEntitySchema: z.ZodObject<{
69
+ id: z.ZodCUID2;
70
+ userId: z.ZodCUID2;
71
+ title: z.ZodString;
72
+ description: z.ZodOptional<z.ZodString>;
73
+ overview: z.ZodOptional<z.ZodString>;
74
+ url: z.ZodOptional<z.ZodURL>;
75
+ imagePlaceholderUrl: z.ZodURL;
76
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
77
+ projectCreatorType: z.ZodEnum<{
78
+ readonly CREATIVE: "CREATIVE";
79
+ readonly BRAND: "BRAND";
80
+ readonly INVESTOR: "INVESTOR";
81
+ readonly ADMIN: "ADMIN";
82
+ }>;
83
+ clientId: z.ZodOptional<z.ZodCUID2>;
84
+ status: z.ZodEnum<{
85
+ readonly ACTIVE: "ACTIVE";
86
+ readonly DRAFT: "DRAFT";
87
+ readonly ARCHIVED: "ARCHIVED";
88
+ }>;
89
+ clientType: z.ZodOptional<z.ZodEnum<{
90
+ readonly CREATIVE: "CREATIVE";
91
+ readonly BRAND: "BRAND";
92
+ readonly NONE: "NONE";
93
+ }>>;
94
+ clientName: z.ZodOptional<z.ZodString>;
95
+ isFeatured: z.ZodOptional<z.ZodBoolean>;
96
+ problemBeingSolved: z.ZodOptional<z.ZodString>;
97
+ whoItsFor: z.ZodOptional<z.ZodString>;
98
+ ventureStage: z.ZodOptional<z.ZodEnum<{
99
+ readonly IDEA: "Idea";
100
+ readonly PRE_SEED: "Pre Seed";
101
+ readonly MVP: "MVP";
102
+ readonly SEED: "Seed";
103
+ readonly SERIES_A: "Series A";
104
+ readonly SERIES_B: "Series B";
105
+ readonly SERIES_C: "Series C";
106
+ readonly GROWTH: "Growth";
107
+ readonly EXIT: "Exit";
108
+ }>>;
109
+ capitalLookingToRaise: z.ZodString;
110
+ capitalLookingToRaiseCurrency: z.ZodOptional<z.ZodEnum<{
111
+ readonly USD: "USD (United States Dollar)";
112
+ readonly EUR: "EUR (Euro)";
113
+ readonly GBP: "GBP (British Pound Sterling)";
114
+ readonly NGN: "NGN (Nigerian Naira)";
115
+ readonly CAD: "CAD (Canadian Dollar)";
116
+ readonly AUD: "AUD (Australian Dollar)";
117
+ readonly JPY: "JPY (Japanese Yen)";
118
+ readonly CHF: "CHF (Swiss Franc)";
119
+ readonly INR: "INR (Indian Rupee)";
120
+ readonly ZAR: "ZAR (South African Rand)";
121
+ }>>;
122
+ currentTraction: z.ZodString;
123
+ isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
124
+ startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
125
+ endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
126
+ createdAt: z.ZodCoercedDate<unknown>;
127
+ updatedAt: z.ZodCoercedDate<unknown>;
128
+ version: z.ZodNumber;
129
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
+ id: z.ZodCUID2;
131
+ key: z.ZodString;
132
+ mimeType: z.ZodString;
133
+ url: z.ZodURL;
134
+ parentId: z.ZodNullable<z.ZodCUID2>;
135
+ parentType: z.ZodNullable<z.ZodEnum<{
136
+ readonly PROJECT: "PROJECT";
137
+ readonly USER: "USER";
138
+ readonly JOB: "JOB";
139
+ readonly POST: "POST";
140
+ readonly PRODUCT: "PRODUCT";
141
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
142
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
143
+ readonly COMMENT: "COMMENT";
144
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
145
+ }>>;
146
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
147
+ order: z.ZodNumber;
148
+ createdAt: z.ZodCoercedDate<unknown>;
149
+ updatedAt: z.ZodCoercedDate<unknown>;
150
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
151
+ }, z.core.$strip>>>;
152
+ }, z.core.$strip>;
153
+ export type ProjectWithFilesEntity = z.infer<typeof ProjectWithFilesEntitySchema>;
67
154
  export declare const MinimalProjectSchema: z.ZodObject<{
68
155
  description: z.ZodOptional<z.ZodString>;
69
156
  title: z.ZodString;
@@ -73,15 +160,13 @@ export declare const MinimalProjectSchema: z.ZodObject<{
73
160
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
74
161
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
75
162
  }, z.core.$strip>;
163
+ export type MinimalProject = z.infer<typeof MinimalProjectSchema>;
76
164
  export declare const ProjectSocialGraphEntitySchema: z.ZodObject<{
77
165
  noOfLikes: z.ZodOptional<z.ZodNumber>;
78
166
  noOfComments: z.ZodOptional<z.ZodNumber>;
79
167
  noOfBookmarks: z.ZodOptional<z.ZodNumber>;
80
168
  noOfViews: z.ZodOptional<z.ZodNumber>;
81
169
  }, z.core.$strip>;
82
- /**
83
- * INPUT SCHEMAS
84
- */
85
170
  export declare const CreateProjectInputSchema: z.ZodObject<{
86
171
  id: z.ZodOptional<z.ZodCUID2>;
87
172
  title: z.ZodString;
@@ -93,6 +178,7 @@ export declare const CreateProjectInputSchema: z.ZodObject<{
93
178
  readonly ARCHIVED: "ARCHIVED";
94
179
  }>>;
95
180
  }, z.core.$strip>;
181
+ export type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;
96
182
  export declare const UpdateProjectInputSchema: z.ZodObject<{
97
183
  id: z.ZodCUID2;
98
184
  title: z.ZodOptional<z.ZodString>;
@@ -152,12 +238,14 @@ export declare const UpdateProjectInputSchema: z.ZodObject<{
152
238
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
153
239
  version: z.ZodNumber;
154
240
  }, z.core.$strip>;
241
+ export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
155
242
  export declare const SearchProjectsInputSchema: z.ZodObject<{
156
243
  query: z.ZodOptional<z.ZodString>;
157
244
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
158
245
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
159
246
  cursor: z.ZodOptional<z.ZodString>;
160
247
  }, z.core.$strip>;
248
+ export type SearchProjectsInput = z.infer<typeof SearchProjectsInputSchema>;
161
249
  export declare const CommentOnProjectInputSchema: z.ZodObject<{
162
250
  id: z.ZodCUID2;
163
251
  userId: z.ZodCUID2;
@@ -185,9 +273,7 @@ export declare const CommentOnProjectInputSchema: z.ZodObject<{
185
273
  hasReplies: z.ZodOptional<z.ZodBoolean>;
186
274
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
187
275
  }, z.core.$strip>;
188
- /**
189
- * OUTPUT / VIEW SCHEMAS
190
- */
276
+ export type CommentOnProjectInput = z.infer<typeof CommentOnProjectInputSchema>;
191
277
  export declare const ProjectDetailsEntitySchema: z.ZodObject<{
192
278
  id: z.ZodCUID2;
193
279
  userId: z.ZodCUID2;
@@ -262,7 +348,31 @@ export declare const ProjectDetailsEntitySchema: z.ZodObject<{
262
348
  ADMIN: "ADMIN";
263
349
  }>;
264
350
  }, z.core.$strip>;
351
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
352
+ id: z.ZodCUID2;
353
+ key: z.ZodString;
354
+ mimeType: z.ZodString;
355
+ url: z.ZodURL;
356
+ parentId: z.ZodNullable<z.ZodCUID2>;
357
+ parentType: z.ZodNullable<z.ZodEnum<{
358
+ readonly PROJECT: "PROJECT";
359
+ readonly USER: "USER";
360
+ readonly JOB: "JOB";
361
+ readonly POST: "POST";
362
+ readonly PRODUCT: "PRODUCT";
363
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
364
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
365
+ readonly COMMENT: "COMMENT";
366
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
367
+ }>>;
368
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
369
+ order: z.ZodNumber;
370
+ createdAt: z.ZodCoercedDate<unknown>;
371
+ updatedAt: z.ZodCoercedDate<unknown>;
372
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
373
+ }, z.core.$strip>>>;
265
374
  }, z.core.$strip>;
375
+ export type ProjectDetailsEntity = z.infer<typeof ProjectDetailsEntitySchema>;
266
376
  export declare const GetProjectOutputSchema: z.ZodObject<{
267
377
  id: z.ZodCUID2;
268
378
  userId: z.ZodCUID2;
@@ -337,9 +447,33 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
337
447
  ADMIN: "ADMIN";
338
448
  }>;
339
449
  }, z.core.$strip>;
450
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
451
+ id: z.ZodCUID2;
452
+ key: z.ZodString;
453
+ mimeType: z.ZodString;
454
+ url: z.ZodURL;
455
+ parentId: z.ZodNullable<z.ZodCUID2>;
456
+ parentType: z.ZodNullable<z.ZodEnum<{
457
+ readonly PROJECT: "PROJECT";
458
+ readonly USER: "USER";
459
+ readonly JOB: "JOB";
460
+ readonly POST: "POST";
461
+ readonly PRODUCT: "PRODUCT";
462
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
463
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
464
+ readonly COMMENT: "COMMENT";
465
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
466
+ }>>;
467
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
468
+ order: z.ZodNumber;
469
+ createdAt: z.ZodCoercedDate<unknown>;
470
+ updatedAt: z.ZodCoercedDate<unknown>;
471
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
472
+ }, z.core.$strip>>>;
340
473
  isLiked: z.ZodOptional<z.ZodBoolean>;
341
474
  isBookmarked: z.ZodOptional<z.ZodBoolean>;
342
475
  }, z.core.$strip>;
476
+ export type GetProjectOutput = z.infer<typeof GetProjectOutputSchema>;
343
477
  export declare const ProjectSearchDocumentSchema: z.ZodObject<{
344
478
  id: z.ZodString;
345
479
  userId: z.ZodString;
@@ -351,6 +485,7 @@ export declare const ProjectSearchDocumentSchema: z.ZodObject<{
351
485
  readonly INVESTOR: "INVESTOR";
352
486
  readonly ADMIN: "ADMIN";
353
487
  }>;
488
+ isOpenToInvestment: z.ZodBoolean;
354
489
  createdAt: z.ZodNumber;
355
490
  updatedAt: z.ZodNumber;
356
491
  description: z.ZodOptional<z.ZodString>;
@@ -382,6 +517,7 @@ export declare const ProjectSearchDocumentSchema: z.ZodObject<{
382
517
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
383
518
  creatorUsername: z.ZodString;
384
519
  creatorImageUrl: z.ZodString;
520
+ creatorName: z.ZodString;
385
521
  clientId: z.ZodOptional<z.ZodString>;
386
522
  clientType: z.ZodOptional<z.ZodEnum<{
387
523
  readonly CREATIVE: "CREATIVE";
@@ -392,7 +528,31 @@ export declare const ProjectSearchDocumentSchema: z.ZodObject<{
392
528
  isFeatured: z.ZodOptional<z.ZodBoolean>;
393
529
  startDate: z.ZodOptional<z.ZodNumber>;
394
530
  endDate: z.ZodOptional<z.ZodNumber>;
531
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
532
+ id: z.ZodCUID2;
533
+ key: z.ZodString;
534
+ mimeType: z.ZodString;
535
+ url: z.ZodURL;
536
+ parentId: z.ZodNullable<z.ZodCUID2>;
537
+ parentType: z.ZodNullable<z.ZodEnum<{
538
+ readonly PROJECT: "PROJECT";
539
+ readonly USER: "USER";
540
+ readonly JOB: "JOB";
541
+ readonly POST: "POST";
542
+ readonly PRODUCT: "PRODUCT";
543
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
544
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
545
+ readonly COMMENT: "COMMENT";
546
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
547
+ }>>;
548
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
549
+ order: z.ZodNumber;
550
+ createdAt: z.ZodCoercedDate<unknown>;
551
+ updatedAt: z.ZodCoercedDate<unknown>;
552
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
553
+ }, z.core.$strip>>>;
395
554
  }, z.core.$strip>;
555
+ export type ProjectSearchDocument = z.infer<typeof ProjectSearchDocumentSchema>;
396
556
  export declare const SearchProjectsOutputSchema: z.ZodObject<{
397
557
  projects: z.ZodArray<z.ZodObject<{
398
558
  id: z.ZodString;
@@ -405,6 +565,7 @@ export declare const SearchProjectsOutputSchema: z.ZodObject<{
405
565
  readonly INVESTOR: "INVESTOR";
406
566
  readonly ADMIN: "ADMIN";
407
567
  }>;
568
+ isOpenToInvestment: z.ZodBoolean;
408
569
  createdAt: z.ZodNumber;
409
570
  updatedAt: z.ZodNumber;
410
571
  description: z.ZodOptional<z.ZodString>;
@@ -436,6 +597,7 @@ export declare const SearchProjectsOutputSchema: z.ZodObject<{
436
597
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
437
598
  creatorUsername: z.ZodString;
438
599
  creatorImageUrl: z.ZodString;
600
+ creatorName: z.ZodString;
439
601
  clientId: z.ZodOptional<z.ZodString>;
440
602
  clientType: z.ZodOptional<z.ZodEnum<{
441
603
  readonly CREATIVE: "CREATIVE";
@@ -446,9 +608,33 @@ export declare const SearchProjectsOutputSchema: z.ZodObject<{
446
608
  isFeatured: z.ZodOptional<z.ZodBoolean>;
447
609
  startDate: z.ZodOptional<z.ZodNumber>;
448
610
  endDate: z.ZodOptional<z.ZodNumber>;
611
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
612
+ id: z.ZodCUID2;
613
+ key: z.ZodString;
614
+ mimeType: z.ZodString;
615
+ url: z.ZodURL;
616
+ parentId: z.ZodNullable<z.ZodCUID2>;
617
+ parentType: z.ZodNullable<z.ZodEnum<{
618
+ readonly PROJECT: "PROJECT";
619
+ readonly USER: "USER";
620
+ readonly JOB: "JOB";
621
+ readonly POST: "POST";
622
+ readonly PRODUCT: "PRODUCT";
623
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
624
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
625
+ readonly COMMENT: "COMMENT";
626
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
627
+ }>>;
628
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
629
+ order: z.ZodNumber;
630
+ createdAt: z.ZodCoercedDate<unknown>;
631
+ updatedAt: z.ZodCoercedDate<unknown>;
632
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
633
+ }, z.core.$strip>>>;
449
634
  }, z.core.$strip>>;
450
635
  nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
451
636
  }, z.core.$strip>;
637
+ export type SearchProjectsOutput = z.infer<typeof SearchProjectsOutputSchema>;
452
638
  export declare const ProjectWithProjectCommentsEntitySchema: z.ZodObject<{
453
639
  description: z.ZodOptional<z.ZodString>;
454
640
  title: z.ZodString;
@@ -485,6 +671,7 @@ export declare const ProjectWithProjectCommentsEntitySchema: z.ZodObject<{
485
671
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
486
672
  }, z.core.$strip>>;
487
673
  }, z.core.$strip>;
674
+ export type ProjectWithProjectCommentsEntity = z.infer<typeof ProjectWithProjectCommentsEntitySchema>;
488
675
  export declare const GetProjectWithCommentsOutputSchema: z.ZodObject<{
489
676
  description: z.ZodOptional<z.ZodString>;
490
677
  title: z.ZodString;
@@ -522,6 +709,7 @@ export declare const GetProjectWithCommentsOutputSchema: z.ZodObject<{
522
709
  }, z.core.$strip>>;
523
710
  nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
524
711
  }, z.core.$strip>;
712
+ export type GetProjectWithCommentsOutput = z.infer<typeof GetProjectWithCommentsOutputSchema>;
525
713
  export declare const ProjectWithLikesEntitySchema: z.ZodObject<{
526
714
  description: z.ZodOptional<z.ZodString>;
527
715
  title: z.ZodString;
@@ -547,6 +735,7 @@ export declare const ProjectWithLikesEntitySchema: z.ZodObject<{
547
735
  isFollowing: z.ZodOptional<z.ZodBoolean>;
548
736
  }, z.core.$strip>>;
549
737
  }, z.core.$strip>;
738
+ export type ProjectWithLikesEntity = z.infer<typeof ProjectWithLikesEntitySchema>;
550
739
  export declare const GetProjectWithLikesOutputSchema: z.ZodObject<{
551
740
  description: z.ZodOptional<z.ZodString>;
552
741
  title: z.ZodString;
@@ -573,6 +762,7 @@ export declare const GetProjectWithLikesOutputSchema: z.ZodObject<{
573
762
  }, z.core.$strip>>;
574
763
  nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
575
764
  }, z.core.$strip>;
765
+ export type GetProjectWithLikesOutput = z.infer<typeof GetProjectWithLikesOutputSchema>;
576
766
  export declare const ProjectWithProjectViewsEntitySchema: z.ZodObject<{
577
767
  description: z.ZodOptional<z.ZodString>;
578
768
  title: z.ZodString;
@@ -603,6 +793,7 @@ export declare const ProjectWithProjectViewsEntitySchema: z.ZodObject<{
603
793
  viewDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
604
794
  }, z.core.$strip>>;
605
795
  }, z.core.$strip>;
796
+ export type ProjectWithProjectViewsEntity = z.infer<typeof ProjectWithProjectViewsEntitySchema>;
606
797
  export declare const ProjectWithProjectBookmarksEntitySchema: z.ZodObject<{
607
798
  description: z.ZodOptional<z.ZodString>;
608
799
  title: z.ZodString;
@@ -629,6 +820,7 @@ export declare const ProjectWithProjectBookmarksEntitySchema: z.ZodObject<{
629
820
  }>;
630
821
  }, z.core.$strip>>;
631
822
  }, z.core.$strip>;
823
+ export type ProjectWithProjectBookmarksEntity = z.infer<typeof ProjectWithProjectBookmarksEntitySchema>;
632
824
  export declare const ProjectUpdateOutputEntitySchema: z.ZodObject<{
633
825
  id: z.ZodCUID2;
634
826
  }, z.core.$strip>;
@@ -694,6 +886,7 @@ export declare const CreateProjectOutputSchema: z.ZodObject<{
694
886
  updatedAt: z.ZodCoercedDate<unknown>;
695
887
  version: z.ZodNumber;
696
888
  }, z.core.$strip>;
889
+ export type CreateProjectOutput = z.infer<typeof CreateProjectOutputSchema>;
697
890
  export declare const UpdateProjectOutputSchema: z.ZodObject<{
698
891
  id: z.ZodCUID2;
699
892
  userId: z.ZodCUID2;
@@ -756,6 +949,7 @@ export declare const UpdateProjectOutputSchema: z.ZodObject<{
756
949
  updatedAt: z.ZodCoercedDate<unknown>;
757
950
  version: z.ZodNumber;
758
951
  }, z.core.$strip>;
952
+ export type UpdateProjectOutput = z.infer<typeof UpdateProjectOutputSchema>;
759
953
  export declare const DeleteProjectOutputSchema: z.ZodObject<{
760
954
  id: z.ZodCUID2;
761
955
  userId: z.ZodCUID2;
@@ -818,6 +1012,7 @@ export declare const DeleteProjectOutputSchema: z.ZodObject<{
818
1012
  updatedAt: z.ZodCoercedDate<unknown>;
819
1013
  version: z.ZodNumber;
820
1014
  }, z.core.$strip>;
1015
+ export type DeleteProjectOutput = z.infer<typeof DeleteProjectOutputSchema>;
821
1016
  export declare const CommentOnProjectOutputSchema: z.ZodObject<{
822
1017
  id: z.ZodCUID2;
823
1018
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -843,16 +1038,11 @@ export declare const CommentOnProjectOutputSchema: z.ZodObject<{
843
1038
  hasReplies: z.ZodOptional<z.ZodBoolean>;
844
1039
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
845
1040
  }, z.core.$strip>;
846
- /**
847
- * SEARCH & UTILITY SCHEMAS
848
- */
1041
+ export type CommentOnProjectOutput = z.infer<typeof CommentOnProjectOutputSchema>;
849
1042
  export declare const ProjectIdSchema: z.ZodObject<{
850
1043
  projectId: z.ZodCUID2;
851
1044
  }, z.core.$strip>;
852
- export declare const CreateProjectFileInputSchema: z.ZodObject<{
853
- key: z.ZodString;
854
- projectId: z.ZodCUID2;
855
- }, z.core.$strip>;
856
- export declare const DeleteProjectFileInputSchema: z.ZodObject<{
857
- keys: z.ZodArray<z.ZodString>;
858
- }, z.core.$strip>;
1045
+ export type ProjectIdInput = z.infer<typeof ProjectIdSchema>;
1046
+ export type ProjectViewEntity = z.infer<typeof ViewEntitySchema>;
1047
+ export type ProjectLikeEntity = z.infer<typeof LikeEntitySchema>;
1048
+ export type ProjectCommentEntity = z.infer<typeof CommentEntitySchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeleteProjectFileInputSchema = exports.CreateProjectFileInputSchema = 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.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.ProjectSearchDocumentSchema = exports.GetProjectOutputSchema = exports.ProjectDetailsEntitySchema = exports.CommentOnProjectInputSchema = exports.SearchProjectsInputSchema = 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");
@@ -8,9 +8,7 @@ const bookmark_1 = require("./bookmark");
8
8
  const view_1 = require("./view");
9
9
  const user_1 = require("./user");
10
10
  const activity_1 = require("./activity");
11
- /**
12
- * BASE ENTITY SCHEMAS
13
- */
11
+ const file_1 = require("./file");
14
12
  exports.ProjectEntitySchema = zod_openapi_1.z
15
13
  .object({
16
14
  id: zod_openapi_1.z.cuid2(),
@@ -41,6 +39,9 @@ exports.ProjectEntitySchema = zod_openapi_1.z
41
39
  version: zod_openapi_1.z.number().int(),
42
40
  })
43
41
  .openapi("ProjectEntity");
42
+ exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema.extend({
43
+ files: zod_openapi_1.z.array(file_1.FileEntitySchema).optional(),
44
+ }).openapi("ProjectWithFilesEntity");
44
45
  exports.MinimalProjectSchema = exports.ProjectEntitySchema.pick({
45
46
  id: true,
46
47
  title: true,
@@ -58,9 +59,6 @@ exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
58
59
  noOfViews: zod_openapi_1.z.number().int().optional(),
59
60
  })
60
61
  .openapi("ProjectSocialGraphEntity");
61
- /**
62
- * INPUT SCHEMAS
63
- */
64
62
  exports.CreateProjectInputSchema = zod_openapi_1.z
65
63
  .object({
66
64
  id: zod_openapi_1.z.cuid2().optional(),
@@ -124,11 +122,9 @@ exports.SearchProjectsInputSchema = zod_openapi_1.z
124
122
  })
125
123
  .openapi("SearchProjectsInput");
126
124
  exports.CommentOnProjectInputSchema = comment_1.CommentEntitySchema;
127
- /**
128
- * OUTPUT / VIEW SCHEMAS
129
- */
130
125
  exports.ProjectDetailsEntitySchema = exports.ProjectEntitySchema.extend({
131
126
  user: user_1.MinimalUserSchema,
127
+ files: zod_openapi_1.z.array(file_1.FileEntitySchema).optional(),
132
128
  }).openapi("ProjectDetailsEntity");
133
129
  exports.GetProjectOutputSchema = exports.ProjectDetailsEntitySchema.extend({
134
130
  isLiked: zod_openapi_1.z.boolean().optional(),
@@ -141,6 +137,7 @@ exports.ProjectSearchDocumentSchema = zod_openapi_1.z
141
137
  title: zod_openapi_1.z.string(),
142
138
  imagePlaceholderUrl: zod_openapi_1.z.url(),
143
139
  projectCreatorType: zod_openapi_1.z.enum(constants_1.ROLES),
140
+ isOpenToInvestment: zod_openapi_1.z.boolean(),
144
141
  createdAt: zod_openapi_1.z.number(),
145
142
  updatedAt: zod_openapi_1.z.number(),
146
143
  description: zod_openapi_1.z.string().optional(),
@@ -151,12 +148,14 @@ exports.ProjectSearchDocumentSchema = zod_openapi_1.z
151
148
  tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
152
149
  creatorUsername: zod_openapi_1.z.string(),
153
150
  creatorImageUrl: zod_openapi_1.z.string(),
151
+ creatorName: zod_openapi_1.z.string(),
154
152
  clientId: zod_openapi_1.z.string().optional(),
155
153
  clientType: zod_openapi_1.z.enum(constants_1.CLIENT_TYPES).optional(),
156
154
  clientName: zod_openapi_1.z.string().optional(),
157
155
  isFeatured: zod_openapi_1.z.boolean().optional(),
158
156
  startDate: zod_openapi_1.z.number().optional(),
159
157
  endDate: zod_openapi_1.z.number().optional(),
158
+ files: zod_openapi_1.z.array(file_1.FileEntitySchema).optional(),
160
159
  })
161
160
  .openapi("ProjectSearchDocument");
162
161
  exports.SearchProjectsOutputSchema = zod_openapi_1.z
@@ -196,14 +195,4 @@ exports.CommentOnProjectOutputSchema = comment_1.CommentEntitySchema.omit({
196
195
  likesCount: true,
197
196
  isLiked: true,
198
197
  });
199
- /**
200
- * SEARCH & UTILITY SCHEMAS
201
- */
202
198
  exports.ProjectIdSchema = zod_openapi_1.z.object({ projectId: zod_openapi_1.z.cuid2() });
203
- exports.CreateProjectFileInputSchema = zod_openapi_1.z.object({
204
- key: zod_openapi_1.z.string().max(500),
205
- projectId: zod_openapi_1.z.cuid2(),
206
- });
207
- exports.DeleteProjectFileInputSchema = zod_openapi_1.z.object({
208
- keys: zod_openapi_1.z.array(zod_openapi_1.z.string()),
209
- });
@@ -555,6 +555,7 @@ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
555
555
  readonly INVESTOR: "INVESTOR";
556
556
  readonly ADMIN: "ADMIN";
557
557
  }>;
558
+ isOpenToInvestment: z.ZodBoolean;
558
559
  createdAt: z.ZodNumber;
559
560
  updatedAt: z.ZodNumber;
560
561
  description: z.ZodOptional<z.ZodString>;
@@ -586,6 +587,7 @@ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
586
587
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
587
588
  creatorUsername: z.ZodString;
588
589
  creatorImageUrl: z.ZodString;
590
+ creatorName: z.ZodString;
589
591
  clientId: z.ZodOptional<z.ZodString>;
590
592
  clientType: z.ZodOptional<z.ZodEnum<{
591
593
  readonly CREATIVE: "CREATIVE";
@@ -596,6 +598,29 @@ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
596
598
  isFeatured: z.ZodOptional<z.ZodBoolean>;
597
599
  startDate: z.ZodOptional<z.ZodNumber>;
598
600
  endDate: z.ZodOptional<z.ZodNumber>;
601
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
602
+ id: z.ZodCUID2;
603
+ key: z.ZodString;
604
+ mimeType: z.ZodString;
605
+ url: z.ZodURL;
606
+ parentId: z.ZodNullable<z.ZodCUID2>;
607
+ parentType: z.ZodNullable<z.ZodEnum<{
608
+ readonly PROJECT: "PROJECT";
609
+ readonly USER: "USER";
610
+ readonly JOB: "JOB";
611
+ readonly POST: "POST";
612
+ readonly PRODUCT: "PRODUCT";
613
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
614
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
615
+ readonly COMMENT: "COMMENT";
616
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
617
+ }>>;
618
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
619
+ order: z.ZodNumber;
620
+ createdAt: z.ZodCoercedDate<unknown>;
621
+ updatedAt: z.ZodCoercedDate<unknown>;
622
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
623
+ }, z.core.$strip>>>;
599
624
  }, z.core.$strip>;
600
625
  }, z.core.$strip>>;
601
626
  }, z.core.$strip>;
@@ -819,6 +844,7 @@ export declare const GetUserWithProjectBookmarksOutputSchema: z.ZodObject<{
819
844
  readonly INVESTOR: "INVESTOR";
820
845
  readonly ADMIN: "ADMIN";
821
846
  }>;
847
+ isOpenToInvestment: z.ZodBoolean;
822
848
  createdAt: z.ZodNumber;
823
849
  updatedAt: z.ZodNumber;
824
850
  description: z.ZodOptional<z.ZodString>;
@@ -850,6 +876,7 @@ export declare const GetUserWithProjectBookmarksOutputSchema: z.ZodObject<{
850
876
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
851
877
  creatorUsername: z.ZodString;
852
878
  creatorImageUrl: z.ZodString;
879
+ creatorName: z.ZodString;
853
880
  clientId: z.ZodOptional<z.ZodString>;
854
881
  clientType: z.ZodOptional<z.ZodEnum<{
855
882
  readonly CREATIVE: "CREATIVE";
@@ -860,6 +887,29 @@ export declare const GetUserWithProjectBookmarksOutputSchema: z.ZodObject<{
860
887
  isFeatured: z.ZodOptional<z.ZodBoolean>;
861
888
  startDate: z.ZodOptional<z.ZodNumber>;
862
889
  endDate: z.ZodOptional<z.ZodNumber>;
890
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
891
+ id: z.ZodCUID2;
892
+ key: z.ZodString;
893
+ mimeType: z.ZodString;
894
+ url: z.ZodURL;
895
+ parentId: z.ZodNullable<z.ZodCUID2>;
896
+ parentType: z.ZodNullable<z.ZodEnum<{
897
+ readonly PROJECT: "PROJECT";
898
+ readonly USER: "USER";
899
+ readonly JOB: "JOB";
900
+ readonly POST: "POST";
901
+ readonly PRODUCT: "PRODUCT";
902
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
903
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
904
+ readonly COMMENT: "COMMENT";
905
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
906
+ }>>;
907
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
908
+ order: z.ZodNumber;
909
+ createdAt: z.ZodCoercedDate<unknown>;
910
+ updatedAt: z.ZodCoercedDate<unknown>;
911
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
912
+ }, z.core.$strip>>>;
863
913
  }, z.core.$strip>;
864
914
  }, z.core.$strip>>;
865
915
  }, z.core.$strip>;
@@ -1474,6 +1524,7 @@ export declare const GetAuthenticatedUserWithProjectBookmarksOutputSchema: z.Zod
1474
1524
  readonly INVESTOR: "INVESTOR";
1475
1525
  readonly ADMIN: "ADMIN";
1476
1526
  }>;
1527
+ isOpenToInvestment: z.ZodBoolean;
1477
1528
  createdAt: z.ZodNumber;
1478
1529
  updatedAt: z.ZodNumber;
1479
1530
  description: z.ZodOptional<z.ZodString>;
@@ -1505,6 +1556,7 @@ export declare const GetAuthenticatedUserWithProjectBookmarksOutputSchema: z.Zod
1505
1556
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
1506
1557
  creatorUsername: z.ZodString;
1507
1558
  creatorImageUrl: z.ZodString;
1559
+ creatorName: z.ZodString;
1508
1560
  clientId: z.ZodOptional<z.ZodString>;
1509
1561
  clientType: z.ZodOptional<z.ZodEnum<{
1510
1562
  readonly CREATIVE: "CREATIVE";
@@ -1515,6 +1567,29 @@ export declare const GetAuthenticatedUserWithProjectBookmarksOutputSchema: z.Zod
1515
1567
  isFeatured: z.ZodOptional<z.ZodBoolean>;
1516
1568
  startDate: z.ZodOptional<z.ZodNumber>;
1517
1569
  endDate: z.ZodOptional<z.ZodNumber>;
1570
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
1571
+ id: z.ZodCUID2;
1572
+ key: z.ZodString;
1573
+ mimeType: z.ZodString;
1574
+ url: z.ZodURL;
1575
+ parentId: z.ZodNullable<z.ZodCUID2>;
1576
+ parentType: z.ZodNullable<z.ZodEnum<{
1577
+ readonly PROJECT: "PROJECT";
1578
+ readonly USER: "USER";
1579
+ readonly JOB: "JOB";
1580
+ readonly POST: "POST";
1581
+ readonly PRODUCT: "PRODUCT";
1582
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
1583
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
1584
+ readonly COMMENT: "COMMENT";
1585
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
1586
+ }>>;
1587
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
1588
+ order: z.ZodNumber;
1589
+ createdAt: z.ZodCoercedDate<unknown>;
1590
+ updatedAt: z.ZodCoercedDate<unknown>;
1591
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
1592
+ }, z.core.$strip>>>;
1518
1593
  }, z.core.$strip>;
1519
1594
  }, z.core.$strip>>;
1520
1595
  }, z.core.$strip>;
@@ -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 "./project";
7
6
  export * from "./user";
8
7
  export * from "./comment";
9
8
  export * from "./username";
@@ -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("./project"), exports);
23
22
  __exportStar(require("./user"), exports);
24
23
  __exportStar(require("./comment"), exports);
25
24
  __exportStar(require("./username"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.15",
3
+ "version": "2.5.17",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,10 +11,8 @@ import { BookmarkEntitySchema } from "./bookmark";
11
11
  import { ViewEntitySchema } from "./view";
12
12
  import { MinimalUserSchema } from "./user";
13
13
  import { ActivitySchema } from "./activity";
14
-
15
- /**
16
- * BASE ENTITY SCHEMAS
17
- */
14
+ import { FileEntitySchema } from "./file";
15
+ import { LikeEntitySchema } from "./like";
18
16
 
19
17
  export const ProjectEntitySchema = z
20
18
  .object({
@@ -47,6 +45,16 @@ export const ProjectEntitySchema = z
47
45
  })
48
46
  .openapi("ProjectEntity");
49
47
 
48
+ export type ProjectEntity = z.infer<typeof ProjectEntitySchema>;
49
+
50
+ export const ProjectWithFilesEntitySchema = ProjectEntitySchema.extend({
51
+ files: z.array(FileEntitySchema).optional(),
52
+ }).openapi("ProjectWithFilesEntity");
53
+
54
+ export type ProjectWithFilesEntity = z.infer<
55
+ typeof ProjectWithFilesEntitySchema
56
+ >;
57
+
50
58
  export const MinimalProjectSchema = ProjectEntitySchema.pick({
51
59
  id: true,
52
60
  title: true,
@@ -57,6 +65,8 @@ export const MinimalProjectSchema = ProjectEntitySchema.pick({
57
65
  imagePlaceholderUrl: true,
58
66
  }).openapi("MinimalProject");
59
67
 
68
+ export type MinimalProject = z.infer<typeof MinimalProjectSchema>;
69
+
60
70
  export const ProjectSocialGraphEntitySchema = z
61
71
  .object({
62
72
  noOfLikes: z.number().int().optional(),
@@ -66,10 +76,6 @@ export const ProjectSocialGraphEntitySchema = z
66
76
  })
67
77
  .openapi("ProjectSocialGraphEntity");
68
78
 
69
- /**
70
- * INPUT SCHEMAS
71
- */
72
-
73
79
  export const CreateProjectInputSchema = z
74
80
  .object({
75
81
  id: z.cuid2().optional(),
@@ -80,6 +86,8 @@ export const CreateProjectInputSchema = z
80
86
  })
81
87
  .openapi("CreateProjectInput");
82
88
 
89
+ export type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;
90
+
83
91
  export const UpdateProjectInputSchema = z
84
92
  .object({
85
93
  id: z.cuid2(),
@@ -126,6 +134,8 @@ export const UpdateProjectInputSchema = z
126
134
  })
127
135
  .openapi("UpdateProjectInput");
128
136
 
137
+ export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
138
+
129
139
  export const SearchProjectsInputSchema = z
130
140
  .object({
131
141
  query: z.string().optional(),
@@ -135,21 +145,26 @@ export const SearchProjectsInputSchema = z
135
145
  })
136
146
  .openapi("SearchProjectsInput");
137
147
 
148
+ export type SearchProjectsInput = z.infer<typeof SearchProjectsInputSchema>;
149
+
138
150
  export const CommentOnProjectInputSchema = CommentEntitySchema;
139
151
 
140
- /**
141
- * OUTPUT / VIEW SCHEMAS
142
- */
152
+ export type CommentOnProjectInput = z.infer<typeof CommentOnProjectInputSchema>;
143
153
 
144
154
  export const ProjectDetailsEntitySchema = ProjectEntitySchema.extend({
145
155
  user: MinimalUserSchema,
156
+ files: z.array(FileEntitySchema).optional(),
146
157
  }).openapi("ProjectDetailsEntity");
147
158
 
159
+ export type ProjectDetailsEntity = z.infer<typeof ProjectDetailsEntitySchema>;
160
+
148
161
  export const GetProjectOutputSchema = ProjectDetailsEntitySchema.extend({
149
162
  isLiked: z.boolean().optional(),
150
163
  isBookmarked: z.boolean().optional(),
151
164
  }).openapi("GetProjectOutput");
152
165
 
166
+ export type GetProjectOutput = z.infer<typeof GetProjectOutputSchema>;
167
+
153
168
  export const ProjectSearchDocumentSchema = z
154
169
  .object({
155
170
  id: z.string(),
@@ -157,6 +172,7 @@ export const ProjectSearchDocumentSchema = z
157
172
  title: z.string(),
158
173
  imagePlaceholderUrl: z.url(),
159
174
  projectCreatorType: z.enum(ROLES),
175
+ isOpenToInvestment: z.boolean(),
160
176
  createdAt: z.number(),
161
177
  updatedAt: z.number(),
162
178
  description: z.string().optional(),
@@ -167,15 +183,19 @@ export const ProjectSearchDocumentSchema = z
167
183
  tags: z.array(z.string()).optional(),
168
184
  creatorUsername: z.string(),
169
185
  creatorImageUrl: z.string(),
186
+ creatorName: z.string(),
170
187
  clientId: z.string().optional(),
171
188
  clientType: z.enum(CLIENT_TYPES).optional(),
172
189
  clientName: z.string().optional(),
173
190
  isFeatured: z.boolean().optional(),
174
191
  startDate: z.number().optional(),
175
192
  endDate: z.number().optional(),
193
+ files: z.array(FileEntitySchema).optional(),
176
194
  })
177
195
  .openapi("ProjectSearchDocument");
178
196
 
197
+ export type ProjectSearchDocument = z.infer<typeof ProjectSearchDocumentSchema>;
198
+
179
199
  export const SearchProjectsOutputSchema = z
180
200
  .object({
181
201
  projects: z.array(ProjectSearchDocumentSchema),
@@ -183,16 +203,26 @@ export const SearchProjectsOutputSchema = z
183
203
  })
184
204
  .openapi("SearchProjectsOutput");
185
205
 
206
+ export type SearchProjectsOutput = z.infer<typeof SearchProjectsOutputSchema>;
207
+
186
208
  export const ProjectWithProjectCommentsEntitySchema =
187
209
  MinimalProjectSchema.extend({
188
210
  comments: z.array(CommentEntitySchema),
189
211
  }).openapi("ProjectWithProjectCommentsEntity");
190
212
 
213
+ export type ProjectWithProjectCommentsEntity = z.infer<
214
+ typeof ProjectWithProjectCommentsEntitySchema
215
+ >;
216
+
191
217
  export const GetProjectWithCommentsOutputSchema =
192
218
  ProjectWithProjectCommentsEntitySchema.extend({
193
219
  nextCursor: z.string().optional().nullable(),
194
220
  }).openapi("GetProjectWithCommentsOutput");
195
221
 
222
+ export type GetProjectWithCommentsOutput = z.infer<
223
+ typeof GetProjectWithCommentsOutputSchema
224
+ >;
225
+
196
226
  export const ProjectWithLikesEntitySchema = MinimalProjectSchema.extend({
197
227
  likes: z.array(
198
228
  ActivitySchema.extend({
@@ -202,42 +232,60 @@ export const ProjectWithLikesEntitySchema = MinimalProjectSchema.extend({
202
232
  ),
203
233
  }).openapi("ProjectWithLikesEntity");
204
234
 
235
+ export type ProjectWithLikesEntity = z.infer<
236
+ typeof ProjectWithLikesEntitySchema
237
+ >;
238
+
205
239
  export const GetProjectWithLikesOutputSchema =
206
240
  ProjectWithLikesEntitySchema.extend({
207
241
  nextCursor: z.string().optional().nullable(),
208
242
  }).openapi("GetProjectWithLikesOutput");
209
243
 
244
+ export type GetProjectWithLikesOutput = z.infer<
245
+ typeof GetProjectWithLikesOutputSchema
246
+ >;
247
+
210
248
  export const ProjectWithProjectViewsEntitySchema = MinimalProjectSchema.extend({
211
249
  views: z.array(ViewEntitySchema),
212
250
  }).openapi("ProjectWithProjectViewsEntity");
213
251
 
252
+ export type ProjectWithProjectViewsEntity = z.infer<
253
+ typeof ProjectWithProjectViewsEntitySchema
254
+ >;
255
+
214
256
  export const ProjectWithProjectBookmarksEntitySchema =
215
257
  MinimalProjectSchema.extend({
216
258
  bookmarks: z.array(BookmarkEntitySchema),
217
259
  }).openapi("ProjectWithProjectBookmarksEntity");
218
260
 
261
+ export type ProjectWithProjectBookmarksEntity = z.infer<
262
+ typeof ProjectWithProjectBookmarksEntitySchema
263
+ >;
264
+
219
265
  export const ProjectUpdateOutputEntitySchema = z.object({
220
266
  id: z.cuid2(),
221
267
  });
268
+
222
269
  export const CreateProjectOutputSchema = ProjectEntitySchema;
270
+ export type CreateProjectOutput = z.infer<typeof CreateProjectOutputSchema>;
271
+
223
272
  export const UpdateProjectOutputSchema = ProjectEntitySchema;
273
+ export type UpdateProjectOutput = z.infer<typeof UpdateProjectOutputSchema>;
274
+
224
275
  export const DeleteProjectOutputSchema = ProjectEntitySchema;
276
+ export type DeleteProjectOutput = z.infer<typeof DeleteProjectOutputSchema>;
277
+
225
278
  export const CommentOnProjectOutputSchema = CommentEntitySchema.omit({
226
279
  likesCount: true,
227
280
  isLiked: true,
228
281
  });
229
-
230
- /**
231
- * SEARCH & UTILITY SCHEMAS
232
- */
282
+ export type CommentOnProjectOutput = z.infer<
283
+ typeof CommentOnProjectOutputSchema
284
+ >;
233
285
 
234
286
  export const ProjectIdSchema = z.object({ projectId: z.cuid2() });
287
+ export type ProjectIdInput = z.infer<typeof ProjectIdSchema>;
235
288
 
236
- export const CreateProjectFileInputSchema = z.object({
237
- key: z.string().max(500),
238
- projectId: z.cuid2(),
239
- });
240
-
241
- export const DeleteProjectFileInputSchema = z.object({
242
- keys: z.array(z.string()),
243
- });
289
+ export type ProjectViewEntity = z.infer<typeof ViewEntitySchema>;
290
+ export type ProjectLikeEntity = z.infer<typeof LikeEntitySchema>;
291
+ export type ProjectCommentEntity = z.infer<typeof CommentEntitySchema>;
@@ -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 "./project";
7
6
  export * from "./user";
8
7
  export * from "./comment";
9
8
  export * from "./username";
@@ -1,81 +0,0 @@
1
- import type { z } from "@hono/zod-openapi";
2
- import type {
3
- ProjectEntitySchema,
4
- ProjectIdSchema,
5
- MinimalProjectSchema,
6
- ProjectDetailsEntitySchema,
7
- ProjectWithProjectViewsEntitySchema,
8
- ProjectWithProjectCommentsEntitySchema,
9
- ProjectWithLikesEntitySchema,
10
- ProjectWithProjectBookmarksEntitySchema,
11
- CreateProjectInputSchema,
12
- CreateProjectOutputSchema,
13
- UpdateProjectInputSchema,
14
- UpdateProjectOutputSchema,
15
- DeleteProjectOutputSchema,
16
- GetProjectOutputSchema,
17
- SearchProjectsInputSchema,
18
- SearchProjectsOutputSchema,
19
- GetProjectWithLikesOutputSchema,
20
- GetProjectWithCommentsOutputSchema,
21
- CommentOnProjectInputSchema,
22
- CommentOnProjectOutputSchema,
23
- ProjectSearchDocumentSchema,
24
- CreateProjectFileInputSchema,
25
- DeleteProjectFileInputSchema,
26
- } from "../schemas/project";
27
- import { ViewEntitySchema } from "../schemas/view";
28
- import { LikeEntitySchema } from "../schemas/like";
29
- import { CommentEntitySchema } from "../schemas/comment";
30
-
31
- export type ProjectEntity = z.infer<typeof ProjectEntitySchema>;
32
- export type ProjectIdInput = z.infer<typeof ProjectIdSchema>;
33
- export type MinimalProject = z.infer<typeof MinimalProjectSchema>;
34
- export type ProjectViewEntity = z.infer<typeof ViewEntitySchema>;
35
- export type ProjectLikeEntity = z.infer<typeof LikeEntitySchema>;
36
- export type ProjectCommentEntity = z.infer<typeof CommentEntitySchema>;
37
-
38
- export type ProjectDetailsEntity = z.infer<typeof ProjectDetailsEntitySchema>;
39
- export type ProjectWithProjectViewsEntity = z.infer<
40
- typeof ProjectWithProjectViewsEntitySchema
41
- >;
42
- export type ProjectWithProjectCommentsEntity = z.infer<
43
- typeof ProjectWithProjectCommentsEntitySchema
44
- >;
45
- export type ProjectWithLikesEntity = z.infer<
46
- typeof ProjectWithLikesEntitySchema
47
- >;
48
- export type ProjectWithProjectBookmarksEntity = z.infer<
49
- typeof ProjectWithProjectBookmarksEntitySchema
50
- >;
51
-
52
- export type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;
53
- export type CreateProjectOutput = z.infer<typeof CreateProjectOutputSchema>;
54
- export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
55
- export type UpdateProjectOutput = z.infer<typeof UpdateProjectOutputSchema>;
56
- export type DeleteProjectOutput = z.infer<typeof DeleteProjectOutputSchema>;
57
-
58
- export type GetProjectOutput = z.infer<typeof GetProjectOutputSchema>;
59
- export type SearchProjectsInput = z.infer<typeof SearchProjectsInputSchema>;
60
- export type SearchProjectsOutput = z.infer<typeof SearchProjectsOutputSchema>;
61
-
62
- export type GetProjectWithCommentsOutput = z.infer<
63
- typeof GetProjectWithCommentsOutputSchema
64
- >;
65
-
66
- export type GetProjectWithLikesOutput = z.infer<
67
- typeof GetProjectWithLikesOutputSchema
68
- >;
69
-
70
- export type CommentOnProjectInput = z.infer<typeof CommentOnProjectInputSchema>;
71
-
72
- export type CommentOnProjectOutput = z.infer<
73
- typeof CommentOnProjectOutputSchema
74
- >;
75
-
76
- export type ProjectSearchDocument = z.infer<typeof ProjectSearchDocumentSchema>;
77
-
78
- export type ProjectFileInput = z.infer<typeof CreateProjectFileInputSchema>;
79
- export type DeleteProjectFileInput = z.infer<
80
- typeof DeleteProjectFileInputSchema
81
- >;