@zyacreatives/shared 2.2.12 → 2.2.13

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.
@@ -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>;
@@ -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;
@@ -499,22 +476,6 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
499
476
  ADMIN: "ADMIN";
500
477
  }>;
501
478
  }, 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
479
  isLiked: z.ZodOptional<z.ZodBoolean>;
519
480
  isBookmarked: z.ZodOptional<z.ZodBoolean>;
520
481
  }, z.core.$strip>;
@@ -1,6 +1,6 @@
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
6
  const file_1 = require("./file");
@@ -101,28 +101,6 @@ exports.ProjectEntitySchema = zod_openapi_1.z
101
101
  title: "Project DB Entity",
102
102
  description: "Schema representing a project stored in the database.",
103
103
  });
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
104
  exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
127
105
  .object({
128
106
  noOfLikes: zod_openapi_1.z.number().int().optional().openapi({ example: 150 }),
@@ -133,12 +111,6 @@ exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
133
111
  .openapi("ProjectSocialGraphEntity");
134
112
  exports.ProjectDetailsEntitySchema = exports.ProjectEntitySchema.extend({
135
113
  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
114
  }).openapi({ title: "ProjectDetailsEntity" });
143
115
  exports.ProjectUpdateOutputEntitySchema = zod_openapi_1.z
144
116
  .object({ id: zod_openapi_1.z.cuid2() })
@@ -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.13",
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";
@@ -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
@@ -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
+ >;