@zyacreatives/shared 2.2.12 → 2.2.14

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.
@@ -6,7 +6,7 @@ export declare const ProjectEntitySchema: z.ZodObject<{
6
6
  description: z.ZodOptional<z.ZodString>;
7
7
  overview: z.ZodOptional<z.ZodString>;
8
8
  url: z.ZodOptional<z.ZodString>;
9
- imagePlaceholderUrl: z.ZodString;
9
+ imagePlaceholderUrl: z.ZodURL;
10
10
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
11
  projectCreatorType: z.ZodEnum<{
12
12
  readonly CREATIVE: "CREATIVE";
@@ -60,13 +60,6 @@ export declare const ProjectEntitySchema: z.ZodObject<{
60
60
  updatedAt: z.ZodCoercedDate<unknown>;
61
61
  version: z.ZodInt;
62
62
  }, z.core.$strip>;
63
- export declare const ProjectFileEntitySchema: z.ZodObject<{
64
- id: z.ZodString;
65
- projectId: z.ZodString;
66
- fileId: z.ZodString;
67
- isPlaceholder: z.ZodBoolean;
68
- order: z.ZodNumber;
69
- }, z.core.$strip>;
70
63
  export declare const ProjectSocialGraphEntitySchema: z.ZodObject<{
71
64
  noOfLikes: z.ZodOptional<z.ZodNumber>;
72
65
  noOfComments: z.ZodOptional<z.ZodNumber>;
@@ -80,7 +73,7 @@ export declare const ProjectDetailsEntitySchema: z.ZodObject<{
80
73
  description: z.ZodOptional<z.ZodString>;
81
74
  overview: z.ZodOptional<z.ZodString>;
82
75
  url: z.ZodOptional<z.ZodString>;
83
- imagePlaceholderUrl: z.ZodString;
76
+ imagePlaceholderUrl: z.ZodURL;
84
77
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
78
  projectCreatorType: z.ZodEnum<{
86
79
  readonly CREATIVE: "CREATIVE";
@@ -146,22 +139,6 @@ export declare const ProjectDetailsEntitySchema: z.ZodObject<{
146
139
  ADMIN: "ADMIN";
147
140
  }>;
148
141
  }, z.core.$strip>;
149
- projectFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
150
- id: z.ZodString;
151
- projectId: z.ZodString;
152
- fileId: z.ZodString;
153
- isPlaceholder: z.ZodBoolean;
154
- order: z.ZodNumber;
155
- file: z.ZodObject<{
156
- id: z.ZodCUID2;
157
- key: z.ZodString;
158
- mimeType: z.ZodString;
159
- url: z.ZodOptional<z.ZodURL>;
160
- userId: z.ZodCUID2;
161
- createdAt: z.ZodCoercedDate<unknown>;
162
- updatedAt: z.ZodCoercedDate<unknown>;
163
- }, z.core.$strip>;
164
- }, z.core.$strip>>>;
165
142
  }, z.core.$strip>;
166
143
  export declare const ProjectUpdateOutputEntitySchema: z.ZodObject<{
167
144
  id: z.ZodCUID2;
@@ -231,12 +208,6 @@ export declare const UpdateProjectInputSchema: z.ZodObject<{
231
208
  readonly ZAR: "ZAR (South African Rand)";
232
209
  }>>;
233
210
  currentTraction: z.ZodOptional<z.ZodString>;
234
- files: z.ZodArray<z.ZodObject<{
235
- key: z.ZodString;
236
- mimeType: z.ZodString;
237
- isPlaceholder: z.ZodDefault<z.ZodBoolean>;
238
- order: z.ZodDefault<z.ZodInt>;
239
- }, z.core.$strip>>;
240
211
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
241
212
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
242
213
  createdAt: z.ZodOptional<z.ZodDate>;
@@ -250,7 +221,7 @@ export declare const CreateProjectOutputSchema: z.ZodObject<{
250
221
  description: z.ZodOptional<z.ZodString>;
251
222
  overview: z.ZodOptional<z.ZodString>;
252
223
  url: z.ZodOptional<z.ZodString>;
253
- imagePlaceholderUrl: z.ZodString;
224
+ imagePlaceholderUrl: z.ZodURL;
254
225
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
255
226
  projectCreatorType: z.ZodEnum<{
256
227
  readonly CREATIVE: "CREATIVE";
@@ -311,7 +282,7 @@ export declare const UpdateProjectOutputSchema: z.ZodObject<{
311
282
  description: z.ZodOptional<z.ZodString>;
312
283
  overview: z.ZodOptional<z.ZodString>;
313
284
  url: z.ZodOptional<z.ZodString>;
314
- imagePlaceholderUrl: z.ZodString;
285
+ imagePlaceholderUrl: z.ZodURL;
315
286
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
316
287
  projectCreatorType: z.ZodEnum<{
317
288
  readonly CREATIVE: "CREATIVE";
@@ -372,7 +343,7 @@ export declare const DeleteProjectOutputSchema: z.ZodObject<{
372
343
  description: z.ZodOptional<z.ZodString>;
373
344
  overview: z.ZodOptional<z.ZodString>;
374
345
  url: z.ZodOptional<z.ZodString>;
375
- imagePlaceholderUrl: z.ZodString;
346
+ imagePlaceholderUrl: z.ZodURL;
376
347
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
377
348
  projectCreatorType: z.ZodEnum<{
378
349
  readonly CREATIVE: "CREATIVE";
@@ -433,7 +404,7 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
433
404
  description: z.ZodOptional<z.ZodString>;
434
405
  overview: z.ZodOptional<z.ZodString>;
435
406
  url: z.ZodOptional<z.ZodString>;
436
- imagePlaceholderUrl: z.ZodString;
407
+ imagePlaceholderUrl: z.ZodURL;
437
408
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
438
409
  projectCreatorType: z.ZodEnum<{
439
410
  readonly CREATIVE: "CREATIVE";
@@ -499,22 +470,6 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
499
470
  ADMIN: "ADMIN";
500
471
  }>;
501
472
  }, z.core.$strip>;
502
- projectFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
503
- id: z.ZodString;
504
- projectId: z.ZodString;
505
- fileId: z.ZodString;
506
- isPlaceholder: z.ZodBoolean;
507
- order: z.ZodNumber;
508
- file: z.ZodObject<{
509
- id: z.ZodCUID2;
510
- key: z.ZodString;
511
- mimeType: z.ZodString;
512
- url: z.ZodOptional<z.ZodURL>;
513
- userId: z.ZodCUID2;
514
- createdAt: z.ZodCoercedDate<unknown>;
515
- updatedAt: z.ZodCoercedDate<unknown>;
516
- }, z.core.$strip>;
517
- }, z.core.$strip>>>;
518
473
  isLiked: z.ZodOptional<z.ZodBoolean>;
519
474
  isBookmarked: z.ZodOptional<z.ZodBoolean>;
520
475
  }, z.core.$strip>;
@@ -525,7 +480,7 @@ export declare const MinimalProjectSchema: z.ZodObject<{
525
480
  id: z.ZodString;
526
481
  description: z.ZodOptional<z.ZodString>;
527
482
  title: z.ZodString;
528
- imagePlaceholderUrl: z.ZodString;
483
+ imagePlaceholderUrl: z.ZodURL;
529
484
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
530
485
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
531
486
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -541,7 +496,7 @@ export declare const SearchProjectsOutputSchema: z.ZodObject<{
541
496
  id: z.ZodString;
542
497
  description: z.ZodOptional<z.ZodString>;
543
498
  title: z.ZodString;
544
- imagePlaceholderUrl: z.ZodString;
499
+ imagePlaceholderUrl: z.ZodURL;
545
500
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
546
501
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
547
502
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -552,7 +507,7 @@ export declare const ProjectWithProjectViewsEntitySchema: z.ZodObject<{
552
507
  id: z.ZodString;
553
508
  description: z.ZodOptional<z.ZodString>;
554
509
  title: z.ZodString;
555
- imagePlaceholderUrl: z.ZodString;
510
+ imagePlaceholderUrl: z.ZodURL;
556
511
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
557
512
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
558
513
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -579,7 +534,7 @@ export declare const ProjectWithProjectCommentsEntitySchema: z.ZodObject<{
579
534
  id: z.ZodString;
580
535
  description: z.ZodOptional<z.ZodString>;
581
536
  title: z.ZodString;
582
- imagePlaceholderUrl: z.ZodString;
537
+ imagePlaceholderUrl: z.ZodURL;
583
538
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
584
539
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
585
540
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -612,7 +567,7 @@ export declare const ProjectWithLikesEntitySchema: z.ZodObject<{
612
567
  id: z.ZodString;
613
568
  description: z.ZodOptional<z.ZodString>;
614
569
  title: z.ZodString;
615
- imagePlaceholderUrl: z.ZodString;
570
+ imagePlaceholderUrl: z.ZodURL;
616
571
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
617
572
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
618
573
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -637,7 +592,7 @@ export declare const ProjectWithProjectBookmarksEntitySchema: z.ZodObject<{
637
592
  id: z.ZodString;
638
593
  description: z.ZodOptional<z.ZodString>;
639
594
  title: z.ZodString;
640
- imagePlaceholderUrl: z.ZodString;
595
+ imagePlaceholderUrl: z.ZodURL;
641
596
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
642
597
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
643
598
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -660,7 +615,7 @@ export declare const GetProjectWithCommentsOutputSchema: z.ZodObject<{
660
615
  id: z.ZodString;
661
616
  description: z.ZodOptional<z.ZodString>;
662
617
  title: z.ZodString;
663
- imagePlaceholderUrl: z.ZodString;
618
+ imagePlaceholderUrl: z.ZodURL;
664
619
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
665
620
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
666
621
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -694,7 +649,7 @@ export declare const GetProjectWithLikesOutputSchema: z.ZodObject<{
694
649
  id: z.ZodString;
695
650
  description: z.ZodOptional<z.ZodString>;
696
651
  title: z.ZodString;
697
- imagePlaceholderUrl: z.ZodString;
652
+ imagePlaceholderUrl: z.ZodURL;
698
653
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
699
654
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
700
655
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetProjectWithLikesOutputSchema = exports.GetProjectWithCommentsOutputSchema = exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithLikesEntitySchema = exports.ProjectWithProjectCommentsEntitySchema = exports.ProjectWithProjectViewsEntitySchema = exports.SearchProjectsOutputSchema = exports.SearchProjectsInputSchema = exports.MinimalProjectSchema = exports.ProjectIdSchema = exports.GetProjectOutputSchema = exports.DeleteProjectOutputSchema = exports.UpdateProjectOutputSchema = exports.CreateProjectOutputSchema = exports.UpdateProjectInputSchema = exports.CreateProjectInputSchema = exports.ProjectUpdateOutputEntitySchema = exports.ProjectDetailsEntitySchema = exports.ProjectSocialGraphEntitySchema = exports.ProjectFileEntitySchema = exports.ProjectEntitySchema = void 0;
3
+ exports.GetProjectWithLikesOutputSchema = exports.GetProjectWithCommentsOutputSchema = exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithLikesEntitySchema = exports.ProjectWithProjectCommentsEntitySchema = exports.ProjectWithProjectViewsEntitySchema = exports.SearchProjectsOutputSchema = exports.SearchProjectsInputSchema = exports.MinimalProjectSchema = exports.ProjectIdSchema = exports.GetProjectOutputSchema = exports.DeleteProjectOutputSchema = exports.UpdateProjectOutputSchema = exports.CreateProjectOutputSchema = exports.UpdateProjectInputSchema = exports.CreateProjectInputSchema = exports.ProjectUpdateOutputEntitySchema = exports.ProjectDetailsEntitySchema = exports.ProjectSocialGraphEntitySchema = exports.ProjectEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
- const file_1 = require("./file");
7
6
  const comment_1 = require("./comment");
8
7
  const bookmark_1 = require("./bookmark");
9
8
  const view_1 = require("./view");
@@ -35,7 +34,7 @@ exports.ProjectEntitySchema = zod_openapi_1.z
35
34
  description: "URL to the project or live demo.",
36
35
  example: "https://example.com/project",
37
36
  }),
38
- imagePlaceholderUrl: zod_openapi_1.z.string().url().openapi({
37
+ imagePlaceholderUrl: zod_openapi_1.z.url().openapi({
39
38
  description: "URL for the placeholder image of the project.",
40
39
  example: "https://img.com",
41
40
  }),
@@ -101,28 +100,6 @@ exports.ProjectEntitySchema = zod_openapi_1.z
101
100
  title: "Project DB Entity",
102
101
  description: "Schema representing a project stored in the database.",
103
102
  });
104
- exports.ProjectFileEntitySchema = zod_openapi_1.z
105
- .object({
106
- id: zod_openapi_1.z
107
- .string()
108
- .openapi({ description: "CUID2 of the project file record." }),
109
- projectId: zod_openapi_1.z.string().openapi({
110
- description: "CUID2 of the project this file belongs to.",
111
- }),
112
- fileId: zod_openapi_1.z.string().openapi({ description: "CUID2 of the linked file." }),
113
- isPlaceholder: zod_openapi_1.z.boolean().openapi({
114
- description: "Indicates whether the file is a placeholder.",
115
- example: false,
116
- }),
117
- order: zod_openapi_1.z.number().int().openapi({
118
- description: "Order index of the file in the project.",
119
- example: 1,
120
- }),
121
- })
122
- .openapi({
123
- title: "Project File Entity",
124
- description: "Schema representing a file associated with a project.",
125
- });
126
103
  exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
127
104
  .object({
128
105
  noOfLikes: zod_openapi_1.z.number().int().optional().openapi({ example: 150 }),
@@ -133,12 +110,6 @@ exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
133
110
  .openapi("ProjectSocialGraphEntity");
134
111
  exports.ProjectDetailsEntitySchema = exports.ProjectEntitySchema.extend({
135
112
  user: user_1.MinimalUserSchema,
136
- projectFiles: zod_openapi_1.z
137
- .array(exports.ProjectFileEntitySchema.extend({
138
- file: file_1.FileEntitySchema,
139
- }))
140
- .optional()
141
- .openapi({ description: "Files associated with the project." }),
142
113
  }).openapi({ title: "ProjectDetailsEntity" });
143
114
  exports.ProjectUpdateOutputEntitySchema = zod_openapi_1.z
144
115
  .object({ id: zod_openapi_1.z.cuid2() })
@@ -189,10 +160,6 @@ exports.UpdateProjectInputSchema = zod_openapi_1.z
189
160
  capitalLookingToRaise: zod_openapi_1.z.string().optional(),
190
161
  capitalLookingToRaiseCurrency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY).optional(),
191
162
  currentTraction: zod_openapi_1.z.string().max(600).optional(),
192
- files: zod_openapi_1.z.array(file_1.CreateFileInputSchema.extend({
193
- isPlaceholder: zod_openapi_1.z.boolean().default(false),
194
- order: zod_openapi_1.z.int().default(1),
195
- })),
196
163
  startDate: zod_openapi_1.z.coerce.date().optional(),
197
164
  endDate: zod_openapi_1.z.coerce.date().optional(),
198
165
  createdAt: zod_openapi_1.z.date().optional(),
@@ -217,7 +217,7 @@ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
217
217
  url: z.ZodOptional<z.ZodString>;
218
218
  createdAt: z.ZodCoercedDate<unknown>;
219
219
  updatedAt: z.ZodCoercedDate<unknown>;
220
- imagePlaceholderUrl: z.ZodString;
220
+ imagePlaceholderUrl: z.ZodURL;
221
221
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
222
222
  projectCreatorType: z.ZodEnum<{
223
223
  readonly CREATIVE: "CREATIVE";
@@ -289,7 +289,7 @@ export declare const UserWithProjectLikesEntitySchema: z.ZodObject<{
289
289
  id: z.ZodString;
290
290
  description: z.ZodOptional<z.ZodString>;
291
291
  title: z.ZodString;
292
- imagePlaceholderUrl: z.ZodString;
292
+ imagePlaceholderUrl: z.ZodURL;
293
293
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
294
294
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
295
295
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -369,7 +369,7 @@ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
369
369
  id: z.ZodString;
370
370
  description: z.ZodOptional<z.ZodString>;
371
371
  title: z.ZodString;
372
- imagePlaceholderUrl: z.ZodString;
372
+ imagePlaceholderUrl: z.ZodURL;
373
373
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
374
374
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
375
375
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -733,7 +733,7 @@ export declare const GetAuthenticatedUserWithProjectsOutputSchema: z.ZodObject<{
733
733
  url: z.ZodOptional<z.ZodString>;
734
734
  createdAt: z.ZodCoercedDate<unknown>;
735
735
  updatedAt: z.ZodCoercedDate<unknown>;
736
- imagePlaceholderUrl: z.ZodString;
736
+ imagePlaceholderUrl: z.ZodURL;
737
737
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
738
738
  projectCreatorType: z.ZodEnum<{
739
739
  readonly CREATIVE: "CREATIVE";
@@ -805,7 +805,7 @@ export declare const GetAuthenticatedUserWithProjectBookmarksOutputSchema: z.Zod
805
805
  id: z.ZodString;
806
806
  description: z.ZodOptional<z.ZodString>;
807
807
  title: z.ZodString;
808
- imagePlaceholderUrl: z.ZodString;
808
+ imagePlaceholderUrl: z.ZodURL;
809
809
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
810
810
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
811
811
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -887,7 +887,7 @@ export declare const GetAuthenticatedUserWithProjectLikesOutputSchema: z.ZodObje
887
887
  id: z.ZodString;
888
888
  description: z.ZodOptional<z.ZodString>;
889
889
  title: z.ZodString;
890
- imagePlaceholderUrl: z.ZodString;
890
+ imagePlaceholderUrl: z.ZodURL;
891
891
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
892
892
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
893
893
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -1,12 +1,11 @@
1
1
  import type { z } from "@hono/zod-openapi";
2
- import type { ProjectEntitySchema, ProjectIdSchema, MinimalProjectSchema, ProjectFileEntitySchema, ProjectDetailsEntitySchema, ProjectWithProjectViewsEntitySchema, ProjectWithProjectCommentsEntitySchema, ProjectWithLikesEntitySchema, ProjectWithProjectBookmarksEntitySchema, CreateProjectInputSchema, CreateProjectOutputSchema, UpdateProjectInputSchema, UpdateProjectOutputSchema, DeleteProjectOutputSchema, GetProjectOutputSchema, SearchProjectsInputSchema, SearchProjectsOutputSchema, GetProjectWithLikesOutputSchema, GetProjectWithCommentsOutputSchema } from "../schemas/project";
2
+ import type { ProjectEntitySchema, ProjectIdSchema, MinimalProjectSchema, ProjectDetailsEntitySchema, ProjectWithProjectViewsEntitySchema, ProjectWithProjectCommentsEntitySchema, ProjectWithLikesEntitySchema, ProjectWithProjectBookmarksEntitySchema, CreateProjectInputSchema, CreateProjectOutputSchema, UpdateProjectInputSchema, UpdateProjectOutputSchema, DeleteProjectOutputSchema, GetProjectOutputSchema, SearchProjectsInputSchema, SearchProjectsOutputSchema, GetProjectWithLikesOutputSchema, GetProjectWithCommentsOutputSchema } from "../schemas/project";
3
3
  import { ViewEntitySchema } from "../schemas/view";
4
4
  import { LikeEntitySchema } from "../schemas/like";
5
5
  import { CommentEntitySchema } from "../schemas/comment";
6
6
  export type ProjectEntity = z.infer<typeof ProjectEntitySchema>;
7
7
  export type ProjectIdInput = z.infer<typeof ProjectIdSchema>;
8
8
  export type MinimalProject = z.infer<typeof MinimalProjectSchema>;
9
- export type ProjectFileEntity = z.infer<typeof ProjectFileEntitySchema>;
10
9
  export type ProjectViewEntity = z.infer<typeof ViewEntitySchema>;
11
10
  export type ProjectLikeEntity = z.infer<typeof LikeEntitySchema>;
12
11
  export type ProjectCommentEntity = z.infer<typeof CommentEntitySchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.12",
3
+ "version": "2.2.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,7 +6,7 @@ import {
6
6
  VENTURE_STAGES,
7
7
  WAGES_CURRENCY,
8
8
  } from "../constants";
9
- import { CreateFileInputSchema, FileEntitySchema } from "./file";
9
+ import { CreateFileInputSchema } from "./file";
10
10
  import { CommentEntitySchema } from "./comment";
11
11
  import { BookmarkEntitySchema } from "./bookmark";
12
12
  import { ViewEntitySchema } from "./view";
@@ -40,7 +40,7 @@ export const ProjectEntitySchema = z
40
40
  description: "URL to the project or live demo.",
41
41
  example: "https://example.com/project",
42
42
  }),
43
- imagePlaceholderUrl: z.string().url().openapi({
43
+ imagePlaceholderUrl: z.url().openapi({
44
44
  description: "URL for the placeholder image of the project.",
45
45
  example: "https://img.com",
46
46
  }),
@@ -107,29 +107,6 @@ export const ProjectEntitySchema = z
107
107
  description: "Schema representing a project stored in the database.",
108
108
  });
109
109
 
110
- export const ProjectFileEntitySchema = z
111
- .object({
112
- id: z
113
- .string()
114
- .openapi({ description: "CUID2 of the project file record." }),
115
- projectId: z.string().openapi({
116
- description: "CUID2 of the project this file belongs to.",
117
- }),
118
- fileId: z.string().openapi({ description: "CUID2 of the linked file." }),
119
- isPlaceholder: z.boolean().openapi({
120
- description: "Indicates whether the file is a placeholder.",
121
- example: false,
122
- }),
123
- order: z.number().int().openapi({
124
- description: "Order index of the file in the project.",
125
- example: 1,
126
- }),
127
- })
128
- .openapi({
129
- title: "Project File Entity",
130
- description: "Schema representing a file associated with a project.",
131
- });
132
-
133
110
  export const ProjectSocialGraphEntitySchema = z
134
111
  .object({
135
112
  noOfLikes: z.number().int().optional().openapi({ example: 150 }),
@@ -141,14 +118,6 @@ export const ProjectSocialGraphEntitySchema = z
141
118
 
142
119
  export const ProjectDetailsEntitySchema = ProjectEntitySchema.extend({
143
120
  user: MinimalUserSchema,
144
- projectFiles: z
145
- .array(
146
- ProjectFileEntitySchema.extend({
147
- file: FileEntitySchema,
148
- }),
149
- )
150
- .optional()
151
- .openapi({ description: "Files associated with the project." }),
152
121
  }).openapi({ title: "ProjectDetailsEntity" });
153
122
 
154
123
  export const ProjectUpdateOutputEntitySchema = z
@@ -203,12 +172,6 @@ export const UpdateProjectInputSchema = z
203
172
  capitalLookingToRaise: z.string().optional(),
204
173
  capitalLookingToRaiseCurrency: z.enum(WAGES_CURRENCY).optional(),
205
174
  currentTraction: z.string().max(600).optional(),
206
- files: z.array(
207
- CreateFileInputSchema.extend({
208
- isPlaceholder: z.boolean().default(false),
209
- order: z.int().default(1),
210
- }),
211
- ),
212
175
  startDate: z.coerce.date().optional(),
213
176
  endDate: z.coerce.date().optional(),
214
177
  createdAt: z.date().optional(),
@@ -3,7 +3,6 @@ import type {
3
3
  ProjectEntitySchema,
4
4
  ProjectIdSchema,
5
5
  MinimalProjectSchema,
6
- ProjectFileEntitySchema,
7
6
  ProjectDetailsEntitySchema,
8
7
  ProjectWithProjectViewsEntitySchema,
9
8
  ProjectWithProjectCommentsEntitySchema,
@@ -27,8 +26,6 @@ import { CommentEntitySchema } from "../schemas/comment";
27
26
  export type ProjectEntity = z.infer<typeof ProjectEntitySchema>;
28
27
  export type ProjectIdInput = z.infer<typeof ProjectIdSchema>;
29
28
  export type MinimalProject = z.infer<typeof MinimalProjectSchema>;
30
-
31
- export type ProjectFileEntity = z.infer<typeof ProjectFileEntitySchema>;
32
29
  export type ProjectViewEntity = z.infer<typeof ViewEntitySchema>;
33
30
  export type ProjectLikeEntity = z.infer<typeof LikeEntitySchema>;
34
31
  export type ProjectCommentEntity = z.infer<typeof CommentEntitySchema>;
@@ -63,4 +60,4 @@ export type GetProjectWithCommentsOutput = z.infer<
63
60
 
64
61
  export type GetProjectWithLikesOutput = z.infer<
65
62
  typeof GetProjectWithLikesOutputSchema
66
- >;
63
+ >;