@zyacreatives/shared 2.2.11 → 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;
@@ -244,7 +221,65 @@ export declare const UpdateProjectInputSchema: z.ZodObject<{
244
221
  version: z.ZodInt;
245
222
  }, z.core.$strip>;
246
223
  export declare const CreateProjectOutputSchema: z.ZodObject<{
247
- id: z.ZodCUID2;
224
+ id: z.ZodString;
225
+ userId: z.ZodString;
226
+ title: z.ZodString;
227
+ description: z.ZodOptional<z.ZodString>;
228
+ overview: z.ZodOptional<z.ZodString>;
229
+ url: z.ZodOptional<z.ZodString>;
230
+ imagePlaceholderUrl: z.ZodString;
231
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
232
+ projectCreatorType: z.ZodEnum<{
233
+ readonly CREATIVE: "CREATIVE";
234
+ readonly BRAND: "BRAND";
235
+ readonly INVESTOR: "INVESTOR";
236
+ readonly ADMIN: "ADMIN";
237
+ }>;
238
+ clientId: z.ZodOptional<z.ZodString>;
239
+ status: z.ZodEnum<{
240
+ readonly ACTIVE: "ACTIVE";
241
+ readonly DRAFT: "DRAFT";
242
+ readonly ARCHIVED: "ARCHIVED";
243
+ }>;
244
+ clientType: z.ZodOptional<z.ZodEnum<{
245
+ readonly CREATIVE: "CREATIVE";
246
+ readonly BRAND: "BRAND";
247
+ readonly NONE: "NONE";
248
+ }>>;
249
+ clientName: z.ZodOptional<z.ZodString>;
250
+ isFeatured: z.ZodOptional<z.ZodBoolean>;
251
+ problemBeingSolved: z.ZodOptional<z.ZodString>;
252
+ whoItsFor: z.ZodOptional<z.ZodString>;
253
+ ventureStage: z.ZodOptional<z.ZodEnum<{
254
+ readonly IDEA: "Idea";
255
+ readonly PRE_SEED: "Pre Seed";
256
+ readonly MVP: "MVP";
257
+ readonly SEED: "Seed";
258
+ readonly SERIES_A: "Series A";
259
+ readonly SERIES_B: "Series B";
260
+ readonly SERIES_C: "Series C";
261
+ readonly GROWTH: "Growth";
262
+ readonly EXIT: "Exit";
263
+ }>>;
264
+ capitalLookingToRaise: z.ZodString;
265
+ capitalLookingToRaiseCurrency: z.ZodOptional<z.ZodEnum<{
266
+ readonly USD: "USD (United States Dollar)";
267
+ readonly EUR: "EUR (Euro)";
268
+ readonly GBP: "GBP (British Pound Sterling)";
269
+ readonly NGN: "NGN (Nigerian Naira)";
270
+ readonly CAD: "CAD (Canadian Dollar)";
271
+ readonly AUD: "AUD (Australian Dollar)";
272
+ readonly JPY: "JPY (Japanese Yen)";
273
+ readonly CHF: "CHF (Swiss Franc)";
274
+ readonly INR: "INR (Indian Rupee)";
275
+ readonly ZAR: "ZAR (South African Rand)";
276
+ }>>;
277
+ currentTraction: z.ZodString;
278
+ startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
279
+ endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
280
+ createdAt: z.ZodCoercedDate<unknown>;
281
+ updatedAt: z.ZodCoercedDate<unknown>;
282
+ version: z.ZodInt;
248
283
  }, z.core.$strip>;
249
284
  export declare const UpdateProjectOutputSchema: z.ZodObject<{
250
285
  id: z.ZodString;
@@ -441,22 +476,6 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
441
476
  ADMIN: "ADMIN";
442
477
  }>;
443
478
  }, z.core.$strip>;
444
- projectFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
445
- id: z.ZodString;
446
- projectId: z.ZodString;
447
- fileId: z.ZodString;
448
- isPlaceholder: z.ZodBoolean;
449
- order: z.ZodNumber;
450
- file: z.ZodObject<{
451
- id: z.ZodCUID2;
452
- key: z.ZodString;
453
- mimeType: z.ZodString;
454
- url: z.ZodOptional<z.ZodURL>;
455
- userId: z.ZodCUID2;
456
- createdAt: z.ZodCoercedDate<unknown>;
457
- updatedAt: z.ZodCoercedDate<unknown>;
458
- }, z.core.$strip>;
459
- }, z.core.$strip>>>;
460
479
  isLiked: z.ZodOptional<z.ZodBoolean>;
461
480
  isBookmarked: z.ZodOptional<z.ZodBoolean>;
462
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() })
@@ -220,9 +192,7 @@ exports.UpdateProjectInputSchema = zod_openapi_1.z
220
192
  }
221
193
  })
222
194
  .openapi({ title: "Update Project" });
223
- exports.CreateProjectOutputSchema = zod_openapi_1.z.object({
224
- id: zod_openapi_1.z.cuid2(),
225
- });
195
+ exports.CreateProjectOutputSchema = exports.ProjectEntitySchema;
226
196
  exports.UpdateProjectOutputSchema = exports.ProjectEntitySchema;
227
197
  exports.DeleteProjectOutputSchema = exports.ProjectEntitySchema;
228
198
  exports.GetProjectOutputSchema = exports.ProjectDetailsEntitySchema.extend({
@@ -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.11",
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
@@ -236,9 +205,7 @@ export const UpdateProjectInputSchema = z
236
205
  })
237
206
  .openapi({ title: "Update Project" });
238
207
 
239
- export const CreateProjectOutputSchema = z.object({
240
- id: z.cuid2(),
241
- });
208
+ export const CreateProjectOutputSchema = ProjectEntitySchema;
242
209
  export const UpdateProjectOutputSchema = ProjectEntitySchema;
243
210
  export const DeleteProjectOutputSchema = ProjectEntitySchema;
244
211
 
@@ -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
+ >;