@zyacreatives/shared 1.1.4 → 1.2.1

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.
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectUpdateOutputEntitySchema = exports.ProjectBookmarkEntitySchema = exports.ProjectCommentEntitySchema = exports.ProjectLikeEntitySchema = exports.ProjectViewEntitySchema = exports.ProjectWithFilesEntitySchema = exports.UserSocialGraphEntitySchema = exports.ProjectSocialGraphEntitySchema = exports.ProjectFileEntitySchema = exports.ProjectEntitySchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
5
+ const constants_1 = require("../constants");
6
+ exports.ProjectEntitySchema = zod_openapi_1.z
7
+ .object({
8
+ id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
9
+ createdAt: zod_openapi_1.z.iso
10
+ .datetime()
11
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
12
+ updatedAt: zod_openapi_1.z.iso
13
+ .datetime()
14
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
15
+ userId: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
16
+ title: zod_openapi_1.z.string().openapi({ example: "Brand Identity Design" }),
17
+ description: zod_openapi_1.z
18
+ .string()
19
+ .optional()
20
+ .openapi({ example: "A full rebrand for a fashion label." }),
21
+ overview: zod_openapi_1.z
22
+ .string()
23
+ .optional()
24
+ .openapi({ example: "Detailed project story and outcomes." }),
25
+ url: zod_openapi_1.z
26
+ .string()
27
+ .url()
28
+ .optional()
29
+ .openapi({ example: "https://example.com/project" }),
30
+ clientId: zod_openapi_1.z.string().optional().openapi({ example: "client_abc123" }),
31
+ clientType: zod_openapi_1.z
32
+ .enum(Object.values(constants_1.CLIENT_TYPES))
33
+ .optional()
34
+ .openapi({ example: "BRAND" }),
35
+ clientName: zod_openapi_1.z.string().optional().openapi({ example: "Nike" }),
36
+ projectCreatorType: zod_openapi_1.z
37
+ .enum(Object.values(constants_1.ROLES))
38
+ .openapi({ example: "CREATIVE" }),
39
+ tags: zod_openapi_1.z
40
+ .array(zod_openapi_1.z.string())
41
+ .optional()
42
+ .openapi({ example: ["branding", "logo"] }),
43
+ isFeatured: zod_openapi_1.z.boolean().optional().openapi({ example: false }),
44
+ startDate: zod_openapi_1.z.iso
45
+ .datetime()
46
+ .optional()
47
+ .openapi({ example: "2025-06-01T00:00:00.000Z" }),
48
+ endDate: zod_openapi_1.z.iso
49
+ .datetime()
50
+ .optional()
51
+ .openapi({ example: "2025-07-15T00:00:00.000Z" }),
52
+ imagePlaceholderUrl: zod_openapi_1.z
53
+ .string()
54
+ .url()
55
+ .optional()
56
+ .openapi({ example: "https://example.com/project-image.png" }),
57
+ })
58
+ .openapi("ProjectEntity");
59
+ exports.ProjectFileEntitySchema = zod_openapi_1.z
60
+ .object({
61
+ id: zod_openapi_1.z.cuid2().openapi({ example: "pfe_cksd0v6q0000s9a5y8z7p3x9" }),
62
+ projectId: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
63
+ url: zod_openapi_1.z
64
+ .string()
65
+ .url()
66
+ .openapi({ example: "https://cdn.example.com/project/image.jpg" }),
67
+ mimeType: zod_openapi_1.z.string().openapi({ example: "image/jpeg" }),
68
+ fileSize: zod_openapi_1.z.number().int().positive().openapi({ example: 1500000 }), // size in bytes
69
+ })
70
+ .openapi("ProjectFileEntity");
71
+ exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
72
+ .object({
73
+ noOfLikes: zod_openapi_1.z.number().int().optional().openapi({ example: 150 }),
74
+ noOfComments: zod_openapi_1.z.number().int().optional().openapi({ example: 45 }),
75
+ noOfBookmarks: zod_openapi_1.z.number().int().optional().openapi({ example: 22 }),
76
+ noOfViews: zod_openapi_1.z.number().int().optional().openapi({ example: 1200 }),
77
+ })
78
+ .openapi("ProjectSocialGraphEntity");
79
+ exports.UserSocialGraphEntitySchema = zod_openapi_1.z
80
+ .object({
81
+ followerCount: zod_openapi_1.z.number().int().optional().openapi({ example: 5000 }),
82
+ followingCount: zod_openapi_1.z.number().int().optional().openapi({ example: 150 }),
83
+ })
84
+ .openapi("UserSocialGraphEntity");
85
+ exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema.merge(exports.ProjectSocialGraphEntitySchema)
86
+ .extend({
87
+ projectFiles: zod_openapi_1.z
88
+ .array(exports.ProjectFileEntitySchema)
89
+ .optional()
90
+ .openapi({ description: "Files associated with the project" }),
91
+ })
92
+ .openapi("ProjectWithFilesEntity");
93
+ exports.ProjectViewEntitySchema = zod_openapi_1.z
94
+ .object({
95
+ id: zod_openapi_1.z.cuid2().openapi({ example: "view_cksd0v6q0000s9a5y8z7p3x9" }),
96
+ userId: zod_openapi_1.z.cuid2().optional().openapi({ example: "user_view_xyz" }),
97
+ ipAddress: zod_openapi_1.z.ipv4().optional().openapi({ example: "192.168.1.1" }),
98
+ userAgent: zod_openapi_1.z
99
+ .string()
100
+ .optional()
101
+ .openapi({ example: "Mozilla/5.0 (Windows NT 10.0; Win64)" }),
102
+ projectId: zod_openapi_1.z.cuid2().openapi({ example: "proj_abc456" }),
103
+ sessionId: zod_openapi_1.z.string().optional().openapi({ example: "sess_xyz789" }),
104
+ viewedAt: zod_openapi_1.z.iso.datetime().openapi({ example: "2025-10-14T10:30:00.000Z" }),
105
+ viewDate: zod_openapi_1.z.iso.datetime().openapi({ example: "2025-10-14T00:00:00.000Z" }),
106
+ })
107
+ .openapi("ProjectViewEntity");
108
+ exports.ProjectLikeEntitySchema = zod_openapi_1.z
109
+ .object({
110
+ createdAt: zod_openapi_1.z.iso
111
+ .datetime()
112
+ .openapi({ example: "2025-10-13T11:00:00.000Z" }),
113
+ userId: zod_openapi_1.z.cuid2().openapi({ example: "user_liker_123" }),
114
+ projectId: zod_openapi_1.z.cuid2().openapi({ example: "proj_abc456" }),
115
+ })
116
+ .openapi("ProjectLikeEntity");
117
+ exports.ProjectCommentEntitySchema = zod_openapi_1.z
118
+ .object({
119
+ id: zod_openapi_1.z.cuid2().openapi({ example: "comment_id_1" }),
120
+ createdAt: zod_openapi_1.z.iso
121
+ .datetime()
122
+ .openapi({ example: "2025-10-13T12:00:00.000Z" }),
123
+ userId: zod_openapi_1.z.cuid2().openapi({ example: "user_commenter_456" }),
124
+ projectId: zod_openapi_1.z.cuid2().openapi({ example: "proj_abc456" }),
125
+ parentCommentId: zod_openapi_1.z
126
+ .cuid2()
127
+ .optional()
128
+ .openapi({ example: "comment_id_parent_1" }),
129
+ content: zod_openapi_1.z
130
+ .string()
131
+ .min(1)
132
+ .openapi({ example: "Amazing work on the color palette!" }),
133
+ })
134
+ .openapi("ProjectCommentEntity");
135
+ exports.ProjectBookmarkEntitySchema = zod_openapi_1.z
136
+ .object({
137
+ createdAt: zod_openapi_1.z.iso
138
+ .datetime()
139
+ .openapi({ example: "2025-10-13T13:00:00.000Z" }),
140
+ userId: zod_openapi_1.z.cuid2().openapi({ example: "user_bookmark_789" }),
141
+ projectId: zod_openapi_1.z.cuid2().openapi({ example: "proj_abc456" }),
142
+ })
143
+ .openapi("ProjectBookmarkEntity");
144
+ // =================================================================
145
+ // 5. Output Schemas
146
+ // =================================================================
147
+ exports.ProjectUpdateOutputEntitySchema = zod_openapi_1.z
148
+ .object({
149
+ id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
150
+ })
151
+ .openapi("ProjectUpdateOutputEntity");
@@ -1,7 +1,7 @@
1
1
  import { z } from "@hono/zod-openapi";
2
2
  export declare const BaseUserEntitySchema: z.ZodObject<{
3
3
  id: z.ZodCUID2;
4
- email: z.ZodEmail;
4
+ email: z.ZodString;
5
5
  emailVerified: z.ZodBoolean;
6
6
  name: z.ZodOptional<z.ZodString>;
7
7
  image: z.ZodOptional<z.ZodString>;
@@ -38,10 +38,10 @@ export declare const BaseUserEntitySchema: z.ZodObject<{
38
38
  }, z.core.$strip>;
39
39
  export declare const MinimalUserSchema: z.ZodObject<{
40
40
  id: z.ZodCUID2;
41
+ username: z.ZodOptional<z.ZodString>;
42
+ email: z.ZodString;
41
43
  name: z.ZodOptional<z.ZodString>;
42
- email: z.ZodEmail;
43
44
  image: z.ZodOptional<z.ZodString>;
44
- username: z.ZodOptional<z.ZodString>;
45
45
  role: z.ZodEnum<{
46
46
  CREATIVE: "CREATIVE";
47
47
  BRAND: "BRAND";
@@ -51,7 +51,7 @@ export declare const MinimalUserSchema: z.ZodObject<{
51
51
  }, z.core.$strip>;
52
52
  export declare const UserEntitySchema: z.ZodObject<{
53
53
  id: z.ZodCUID2;
54
- email: z.ZodEmail;
54
+ email: z.ZodString;
55
55
  emailVerified: z.ZodBoolean;
56
56
  name: z.ZodOptional<z.ZodString>;
57
57
  image: z.ZodOptional<z.ZodString>;
@@ -90,7 +90,7 @@ export declare const UserEntitySchema: z.ZodObject<{
90
90
  }, z.core.$strip>;
91
91
  export declare const UserProfileEntitySchema: z.ZodObject<{
92
92
  id: z.ZodCUID2;
93
- email: z.ZodEmail;
93
+ email: z.ZodString;
94
94
  emailVerified: z.ZodBoolean;
95
95
  name: z.ZodOptional<z.ZodString>;
96
96
  image: z.ZodOptional<z.ZodString>;
@@ -133,47 +133,111 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
133
133
  }>>;
134
134
  bio: z.ZodOptional<z.ZodString>;
135
135
  location: z.ZodOptional<z.ZodString>;
136
- experienceLevel: z.ZodOptional<z.ZodEnum<{
137
- "0-1 year": "0-1 year";
138
- "1-3 years": "1-3 years";
139
- "3-5 years": "3-5 years";
140
- "5+ years": "5+ years";
141
- }>>;
142
- disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
143
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
136
+ experienceLevel: z.ZodOptional<z.ZodString>;
137
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodAny>>;
138
+ tags: z.ZodOptional<z.ZodArray<z.ZodAny>>;
144
139
  brandName: z.ZodOptional<z.ZodString>;
145
140
  websiteURL: z.ZodOptional<z.ZodString>;
146
- investorType: z.ZodOptional<z.ZodEnum<{
147
- "Angel Investor": "Angel Investor";
148
- "Venture Capitalist": "Venture Capitalist";
149
- "Private Equity Firm": "Private Equity Firm";
150
- "Venture Debt Provider": "Venture Debt Provider";
151
- Bank: "Bank";
152
- "Convertible Note Investor": "Convertible Note Investor";
153
- "Revenue Based Financing Investor": "Revenue Based Financing Investor";
154
- "Corporate Venture Capitalist": "Corporate Venture Capitalist";
155
- Government: "Government";
156
- "Social Impact Investor": "Social Impact Investor";
157
- }>>;
158
- investmentSize: z.ZodOptional<z.ZodEnum<{
159
- "Under 5k USD": "Under 5k USD";
160
- "5k - 25k USD": "5k - 25k USD";
161
- "25k - 100k USD": "25k - 100k USD";
162
- "100k - 500k USD": "100k - 500k USD";
163
- "500k - 1M USD": "500k - 1M USD";
164
- "1M+ USD": "1M+ USD";
165
- }>>;
166
- geographicFocus: z.ZodOptional<z.ZodEnum<{
167
- Africa: "Africa";
168
- Asia: "Asia";
169
- Europe: "Europe";
170
- "North America": "North America";
171
- "South America": "South America";
172
- "Middle East": "Middle East";
173
- Oceania: "Oceania";
174
- "United Kingdom (UK)": "United Kingdom (UK)";
175
- "United States (US)": "United States (US)";
176
- Global: "Global";
177
- Other: "Other";
178
- }>>;
141
+ investorType: z.ZodOptional<z.ZodString>;
142
+ investmentSize: z.ZodOptional<z.ZodString>;
143
+ geographicFocus: z.ZodOptional<z.ZodString>;
144
+ }, z.core.$strip>;
145
+ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
146
+ userId: z.ZodCUID2;
147
+ projects: z.ZodArray<z.ZodObject<{
148
+ id: z.ZodCUID2;
149
+ userId: z.ZodCUID2;
150
+ description: z.ZodOptional<z.ZodString>;
151
+ title: z.ZodString;
152
+ createdAt: z.ZodISODateTime;
153
+ updatedAt: z.ZodISODateTime;
154
+ url: z.ZodOptional<z.ZodString>;
155
+ clientId: z.ZodOptional<z.ZodString>;
156
+ clientType: z.ZodOptional<z.ZodEnum<{
157
+ CREATIVE: "CREATIVE";
158
+ BRAND: "BRAND";
159
+ NONE: "NONE";
160
+ }>>;
161
+ clientName: z.ZodOptional<z.ZodString>;
162
+ projectCreatorType: z.ZodEnum<{
163
+ CREATIVE: "CREATIVE";
164
+ BRAND: "BRAND";
165
+ INVESTOR: "INVESTOR";
166
+ ADMIN: "ADMIN";
167
+ }>;
168
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
169
+ isFeatured: z.ZodOptional<z.ZodBoolean>;
170
+ startDate: z.ZodOptional<z.ZodISODateTime>;
171
+ endDate: z.ZodOptional<z.ZodISODateTime>;
172
+ imagePlaceholderUrl: z.ZodOptional<z.ZodString>;
173
+ }, z.core.$strip>>;
174
+ }, z.core.$strip>;
175
+ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
176
+ userId: z.ZodCUID2;
177
+ projectBookmarks: z.ZodArray<z.ZodObject<{
178
+ createdAt: z.ZodISODateTime;
179
+ userId: z.ZodCUID2;
180
+ projectId: z.ZodCUID2;
181
+ project: z.ZodObject<{
182
+ id: z.ZodCUID2;
183
+ description: z.ZodOptional<z.ZodString>;
184
+ title: z.ZodString;
185
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
186
+ startDate: z.ZodOptional<z.ZodISODateTime>;
187
+ endDate: z.ZodOptional<z.ZodISODateTime>;
188
+ imagePlaceholderUrl: z.ZodOptional<z.ZodString>;
189
+ }, z.core.$strip>;
190
+ }, z.core.$strip>>;
191
+ }, z.core.$strip>;
192
+ export declare const UserWithFollowingEntitySchema: z.ZodObject<{
193
+ id: z.ZodCUID2;
194
+ username: z.ZodOptional<z.ZodString>;
195
+ email: z.ZodString;
196
+ name: z.ZodOptional<z.ZodString>;
197
+ image: z.ZodOptional<z.ZodString>;
198
+ role: z.ZodEnum<{
199
+ CREATIVE: "CREATIVE";
200
+ BRAND: "BRAND";
201
+ INVESTOR: "INVESTOR";
202
+ ADMIN: "ADMIN";
203
+ }>;
204
+ following: z.ZodArray<z.ZodObject<{
205
+ id: z.ZodCUID2;
206
+ username: z.ZodOptional<z.ZodString>;
207
+ email: z.ZodString;
208
+ name: z.ZodOptional<z.ZodString>;
209
+ image: z.ZodOptional<z.ZodString>;
210
+ role: z.ZodEnum<{
211
+ CREATIVE: "CREATIVE";
212
+ BRAND: "BRAND";
213
+ INVESTOR: "INVESTOR";
214
+ ADMIN: "ADMIN";
215
+ }>;
216
+ }, z.core.$strip>>;
217
+ }, z.core.$strip>;
218
+ export declare const UserWithFollowersEntitySchema: z.ZodObject<{
219
+ id: z.ZodCUID2;
220
+ username: z.ZodOptional<z.ZodString>;
221
+ email: z.ZodString;
222
+ name: z.ZodOptional<z.ZodString>;
223
+ image: z.ZodOptional<z.ZodString>;
224
+ role: z.ZodEnum<{
225
+ CREATIVE: "CREATIVE";
226
+ BRAND: "BRAND";
227
+ INVESTOR: "INVESTOR";
228
+ ADMIN: "ADMIN";
229
+ }>;
230
+ followers: z.ZodArray<z.ZodObject<{
231
+ id: z.ZodCUID2;
232
+ username: z.ZodOptional<z.ZodString>;
233
+ email: z.ZodString;
234
+ name: z.ZodOptional<z.ZodString>;
235
+ image: z.ZodOptional<z.ZodString>;
236
+ role: z.ZodEnum<{
237
+ CREATIVE: "CREATIVE";
238
+ BRAND: "BRAND";
239
+ INVESTOR: "INVESTOR";
240
+ ADMIN: "ADMIN";
241
+ }>;
242
+ }, z.core.$strip>>;
179
243
  }, z.core.$strip>;
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserProfileEntitySchema = exports.UserEntitySchema = exports.MinimalUserSchema = exports.BaseUserEntitySchema = void 0;
3
+ exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserEntitySchema = exports.MinimalUserSchema = exports.BaseUserEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const common_1 = require("./common");
7
+ const project_1 = require("./project");
7
8
  exports.BaseUserEntitySchema = zod_openapi_1.z
8
9
  .object({
9
10
  id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
10
- email: zod_openapi_1.z.email().openapi({ example: "user@example.com" }),
11
+ email: zod_openapi_1.z.string().email().openapi({ example: "user@example.com" }),
11
12
  emailVerified: zod_openapi_1.z.boolean().openapi({ example: true }),
12
13
  name: zod_openapi_1.z.string().optional().openapi({ example: "John Doe" }),
13
14
  image: zod_openapi_1.z
@@ -47,47 +48,47 @@ exports.MinimalUserSchema = exports.BaseUserEntitySchema.pick({
47
48
  }).openapi("MinimalUser");
48
49
  exports.UserEntitySchema = exports.BaseUserEntitySchema.merge(common_1.UserSocialGraphEntitySchema).openapi("UserEntity");
49
50
  exports.UserProfileEntitySchema = exports.UserEntitySchema.extend({
50
- profileType: zod_openapi_1.z.enum(["creative", "brand", "investor"]).optional().openapi({
51
- example: "creative",
52
- }),
53
- bio: zod_openapi_1.z.string().optional().openapi({
54
- example: "Passionate digital artist focusing on UI/UX.",
55
- }),
56
- location: zod_openapi_1.z.string().optional().openapi({
57
- example: "Lagos, Nigeria",
58
- }),
59
- experienceLevel: zod_openapi_1.z
60
- .enum(Object.values(constants_1.EXPERIENCE_LEVELS))
61
- .optional()
62
- .openapi({ example: constants_1.EXPERIENCE_LEVELS.YEAR_1_3 }),
63
- disciplines: zod_openapi_1.z
64
- .array(zod_openapi_1.z.string())
65
- .optional()
66
- .openapi({
67
- example: ["ui-ux", "frontend"],
68
- }),
69
- tags: zod_openapi_1.z
70
- .array(zod_openapi_1.z.string())
71
- .optional()
72
- .openapi({
73
- example: ["react", "design", "product"],
74
- }),
75
- brandName: zod_openapi_1.z.string().optional().openapi({
76
- example: "Acme Creative Studio",
77
- }),
78
- websiteURL: zod_openapi_1.z.string().optional().openapi({
79
- example: "https://acme-creative.com",
80
- }),
81
- investorType: zod_openapi_1.z
82
- .enum(Object.values(constants_1.INVESTOR_TYPES))
83
- .optional()
84
- .openapi({ example: constants_1.INVESTOR_TYPES.ANGEL_INVESTOR }),
85
- investmentSize: zod_openapi_1.z
86
- .enum(Object.values(constants_1.INVESTMENT_SIZES))
87
- .optional()
88
- .openapi({ example: constants_1.INVESTMENT_SIZES.BETWEEN_25K_100K }),
89
- geographicFocus: zod_openapi_1.z
90
- .enum(Object.values(constants_1.GEOGRAPHIC_FOCUS))
91
- .optional()
92
- .openapi({ example: constants_1.GEOGRAPHIC_FOCUS.AFRICA }),
51
+ profileType: zod_openapi_1.z.enum(["creative", "brand", "investor"]).optional(),
52
+ bio: zod_openapi_1.z.string().optional(),
53
+ location: zod_openapi_1.z.string().optional(),
54
+ experienceLevel: zod_openapi_1.z.string().optional(),
55
+ disciplines: zod_openapi_1.z.array(zod_openapi_1.z.any()).optional(),
56
+ tags: zod_openapi_1.z.array(zod_openapi_1.z.any()).optional(),
57
+ brandName: zod_openapi_1.z.string().optional(),
58
+ websiteURL: zod_openapi_1.z.string().url().optional(),
59
+ investorType: zod_openapi_1.z.string().optional(),
60
+ investmentSize: zod_openapi_1.z.string().optional(),
61
+ geographicFocus: zod_openapi_1.z.string().optional(),
93
62
  }).openapi("UserProfileEntity");
63
+ exports.UserWithProjectsEntitySchema = zod_openapi_1.z
64
+ .object({
65
+ userId: zod_openapi_1.z.cuid2(),
66
+ projects: zod_openapi_1.z.array(project_1.ProjectEntitySchema.omit({ overview: true })),
67
+ })
68
+ .openapi("UserWithProjectsEntity");
69
+ exports.UserWithProjectBookmarksEntitySchema = zod_openapi_1.z
70
+ .object({
71
+ userId: zod_openapi_1.z.cuid2(),
72
+ projectBookmarks: zod_openapi_1.z.array(project_1.ProjectBookmarkEntitySchema.extend({
73
+ project: project_1.ProjectEntitySchema.pick({
74
+ id: true,
75
+ title: true,
76
+ description: true,
77
+ tags: true,
78
+ startDate: true,
79
+ endDate: true,
80
+ imagePlaceholderUrl: true,
81
+ }),
82
+ })),
83
+ })
84
+ .openapi("UserWithProjectBookmarksEntity");
85
+ exports.UserWithFollowingEntitySchema = exports.MinimalUserSchema.extend({
86
+ following: zod_openapi_1.z
87
+ .array(exports.MinimalUserSchema)
88
+ .openapi({ description: "List of users this user is following." }),
89
+ }).openapi("UserWithFollowingEntity");
90
+ exports.UserWithFollowersEntitySchema = exports.MinimalUserSchema.extend({
91
+ followers: zod_openapi_1.z
92
+ .array(exports.MinimalUserSchema)
93
+ .openapi({ description: "List of users who follow this user." }),
94
+ }).openapi("UserWithFollowersEntity");
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,24 +1,16 @@
1
- import type { MinimalUser } from "./user";
2
- export type BrandEntity = {
3
- id: string;
1
+ import { z } from "@hono/zod-openapi";
2
+ import { BrandEntitySchema, BrandWithUserEntitySchema, CreateBrandEndpointResponseSchema, CreateBrandProfileSchema, GetBrandEndpointResponseSchema, GetBrandParamsSchema, GetBrandQuerySchema, ListBrandsInputSchema, UpdateBrandEndpointResponseSchema, UpdateBrandProfileSchema } from "../schemas";
3
+ export type BrandEntity = z.infer<typeof BrandEntitySchema>;
4
+ export type BrandWithUserEntity = z.infer<typeof BrandWithUserEntitySchema>;
5
+ export type ListBrandsInput = z.infer<typeof ListBrandsInputSchema>;
6
+ export type CreateBrandDto = z.infer<typeof CreateBrandProfileSchema> & {
4
7
  userId: string;
5
- brandName: string;
6
- searchVector?: string;
7
- bio?: string;
8
- tags?: string[];
9
- createdAt: Date;
10
- updatedAt: Date;
11
8
  };
12
- export type BrandWithUserEntity = BrandEntity & {
13
- user: MinimalUser;
14
- disciplines: string[];
15
- };
16
- export type ListBrandsInput = {
17
- query?: string;
18
- disciplines?: string[];
19
- experienceLevels?: string[];
20
- location?: string;
21
- tags?: string[];
22
- page?: number;
23
- perPage?: number;
9
+ export type UpdateBrandDto = z.infer<typeof UpdateBrandProfileSchema> & {
10
+ userId: string;
24
11
  };
12
+ export type GetBrandParams = z.infer<typeof GetBrandParamsSchema>;
13
+ export type GetBrandQuery = z.infer<typeof GetBrandQuerySchema>;
14
+ export type CreateBrandEndpointResponse = z.infer<typeof CreateBrandEndpointResponseSchema>;
15
+ export type GetBrandEndpointResponse = z.infer<typeof GetBrandEndpointResponseSchema>;
16
+ export type UpdateBrandEndpointResponse = z.infer<typeof UpdateBrandEndpointResponseSchema>;
@@ -1,28 +1,16 @@
1
- import type { ExperienceLevel } from "../constants";
2
- import type { MinimalUser } from "./user";
3
- export type BaseCreativeEntity = {
4
- id: string;
1
+ import { z } from "@hono/zod-openapi";
2
+ import { CreateCreativeEndpointResponseSchema, CreateCreativeProfileSchema, CreativeEntitySchema, CreativeWithUserEntitySchema, GetCreativeEndpointResponseSchema, GetCreativeParamsSchema, GetCreativeQuerySchema, ListCreativesInputSchema, UpdateCreativeEndpointResponseSchema, UpdateCreativeProfileSchema } from "../schemas";
3
+ export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
4
+ export type CreativeWithUserEntity = z.infer<typeof CreativeWithUserEntitySchema>;
5
+ export type ListCreativesDto = z.infer<typeof ListCreativesInputSchema>;
6
+ export type CreateCreativeDto = z.infer<typeof CreateCreativeProfileSchema> & {
5
7
  userId: string;
6
- bio?: string;
7
- location?: string;
8
- experienceLevel?: ExperienceLevel;
9
- tags?: string[];
10
- disciplines?: string[];
11
- user?: any;
12
- createdAt: Date;
13
- updatedAt: Date;
14
8
  };
15
- export type CreativeEntity = BaseCreativeEntity;
16
- export type CreativeWithUserEntity = CreativeEntity & {
17
- user: MinimalUser;
18
- disciplines: string[];
19
- };
20
- export type ListCreativesInput = {
21
- query?: string;
22
- disciplines?: string[];
23
- experienceLevels?: string[];
24
- location?: string;
25
- tags?: string[];
26
- page?: number;
27
- perPage?: number;
9
+ export type UpdateCreativeDto = z.infer<typeof UpdateCreativeProfileSchema> & {
10
+ userId: string;
28
11
  };
12
+ export type GetCreativeParams = z.infer<typeof GetCreativeParamsSchema>;
13
+ export type GetCreativeQuery = z.infer<typeof GetCreativeQuerySchema>;
14
+ export type CreateCreativeEndpointResponse = z.infer<typeof CreateCreativeEndpointResponseSchema>;
15
+ export type GetCreativeEndpointResponse = z.infer<typeof GetCreativeEndpointResponseSchema>;
16
+ export type UpdateCreativeEndpointResponse = z.infer<typeof UpdateCreativeEndpointResponseSchema>;
@@ -1,30 +1,16 @@
1
- import type { ExperienceLevel, GeographicFocus, InvestmentSize, InvestorType } from "../constants";
2
- import type { MinimalUser } from "./user";
3
- export type InvestorEntity = {
4
- id: string;
1
+ import { z } from "@hono/zod-openapi";
2
+ import { CreateInvestorEndpointResponseSchema, CreateInvestorProfileSchema, GetInvestorEndpointResponseSchema, GetInvestorParamsSchema, GetInvestorQuerySchema, InvestorEntitySchema, InvestorWithUserEntitySchema, ListInvestorsInputSchema, UpdateInvestorEndpointResponseSchema, UpdateInvestorProfileSchema } from "../schemas/investor";
3
+ export type InvestorEntity = z.infer<typeof InvestorEntitySchema>;
4
+ export type InvestorWithUserEntity = z.infer<typeof InvestorWithUserEntitySchema>;
5
+ export type ListInvestorsInput = z.infer<typeof ListInvestorsInputSchema>;
6
+ export type CreateInvestorDto = z.infer<typeof CreateInvestorProfileSchema> & {
5
7
  userId: string;
6
- bio?: string;
7
- location?: string;
8
- experienceLevel?: ExperienceLevel;
9
- geographicFocus?: GeographicFocus;
10
- investmentSize?: InvestmentSize;
11
- investorType?: InvestorType;
12
- websiteURL?: string;
13
- disciplines?: string[];
14
- user?: any;
15
- createdAt: Date;
16
- updatedAt: Date;
17
8
  };
18
- export type InvestorWithUserEntity = InvestorEntity & {
19
- user: MinimalUser;
20
- disciplines: string[];
21
- };
22
- export type ListInvestorsInput = {
23
- query?: string;
24
- disciplines?: string[];
25
- experienceLevels?: string[];
26
- location?: string;
27
- tags?: string[];
28
- page?: number;
29
- perPage?: number;
9
+ export type UpdateInvestorDto = z.infer<typeof UpdateInvestorProfileSchema> & {
10
+ userId: string;
30
11
  };
12
+ export type GetInvestorParams = z.infer<typeof GetInvestorParamsSchema>;
13
+ export type GetInvestorQuery = z.infer<typeof GetInvestorQuerySchema>;
14
+ export type CreateInvestorEndpointResponse = z.infer<typeof CreateInvestorEndpointResponseSchema>;
15
+ export type GetInvestorEndpointResponse = z.infer<typeof GetInvestorEndpointResponseSchema>;
16
+ export type UpdateInvestorEndpointResponse = z.infer<typeof UpdateInvestorEndpointResponseSchema>;
@@ -23,9 +23,9 @@ export type ProjectEntity = {
23
23
  projectCreatorType: Role;
24
24
  tags?: string[];
25
25
  isFeatured?: boolean;
26
- startDate?: Date | null;
26
+ startDate?: Date;
27
27
  imagePlaceholderUrl?: string;
28
- endDate?: Date | null;
28
+ endDate?: Date;
29
29
  };
30
30
  export type ProjectWithFilesEntity = ProjectEntity & ProjectSocialGraphEntity & {
31
31
  projectFiles?: ProjectFileEntity[];
@@ -1,43 +1,10 @@
1
- import type { OnboardingPage, Role, UserStatus } from "../constants";
2
- import type { UserSocialGraphEntity } from "./common";
3
- import type { ProjectBookmarkEntity, ProjectEntity } from "./project";
4
- export type BaseUserEntity = {
5
- id: string;
6
- email: string;
7
- emailVerified: boolean;
8
- name?: string;
9
- image?: string;
10
- username?: string;
11
- displayUsername?: string;
12
- searchVector?: string;
13
- role: Role;
14
- status: UserStatus;
15
- onboardingPage: OnboardingPage;
16
- createdAt: Date;
17
- updatedAt: Date;
18
- };
19
- export type MinimalUser = Pick<BaseUserEntity, "id" | "name" | "email" | "image" | "username" | "role">;
20
- export type UserEntity = BaseUserEntity & UserSocialGraphEntity;
21
- export type UserProfileEntity = UserEntity & {
22
- profileType?: "creative" | "brand" | "investor";
23
- bio?: string;
24
- location?: string;
25
- experienceLevel?: string;
26
- disciplines?: any[];
27
- tags?: any[];
28
- brandName?: string;
29
- websiteURL?: string;
30
- investorType?: string;
31
- investmentSize?: string;
32
- geographicFocus?: string;
33
- };
34
- export type UserWithProjectsEntity = {
35
- userId: string;
36
- projects: Omit<ProjectEntity, "overview">[];
37
- };
38
- export type UserWithProjectBookmarksEntity = {
39
- userId: string;
40
- projectBookmarks: (ProjectBookmarkEntity & {
41
- project: Pick<ProjectEntity, "id" | "title" | "description" | "tags" | "startDate" | "endDate" | "imagePlaceholderUrl">;
42
- })[];
43
- };
1
+ import { z } from "@hono/zod-openapi";
2
+ import { BaseUserEntitySchema, UserWithFollowingEntitySchema, MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectBookmarksEntitySchema, UserWithProjectsEntitySchema, UserWithFollowersEntitySchema } from "../schemas";
3
+ export type BaseUserEntity = z.infer<typeof BaseUserEntitySchema>;
4
+ export type MinimalUser = z.infer<typeof MinimalUserSchema>;
5
+ export type UserEntity = z.infer<typeof UserEntitySchema>;
6
+ export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
7
+ export type UserWithProjectsEntity = z.infer<typeof UserWithProjectsEntitySchema>;
8
+ export type UserWithProjectBookmarksEntity = z.infer<typeof UserWithProjectBookmarksEntitySchema>;
9
+ export type UserWithFollowingEntity = z.infer<typeof UserWithFollowingEntitySchema>;
10
+ export type UserWithFollowersEntity = z.infer<typeof UserWithFollowersEntitySchema>;
@@ -0,0 +1,3 @@
1
+ export declare const slugify: ({ value }: {
2
+ value: string;
3
+ }) => string;