@zyacreatives/shared 2.2.42 → 2.2.44
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.
- package/dist/schemas/investor.d.ts +204 -0
- package/dist/schemas/investor.js +87 -3
- package/dist/schemas/user.d.ts +10 -0
- package/dist/types/investor.d.ts +5 -1
- package/package.json +1 -1
- package/src/schemas/investor.ts +102 -2
- package/src/types/investor.ts +14 -0
|
@@ -1,4 +1,52 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
+
export declare const MinimalInvestorEntitySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodCUID2;
|
|
4
|
+
userId: z.ZodCUID2;
|
|
5
|
+
bio: z.ZodOptional<z.ZodString>;
|
|
6
|
+
location: z.ZodOptional<z.ZodString>;
|
|
7
|
+
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
8
|
+
"0-1 year": "0-1 year";
|
|
9
|
+
"1-3 years": "1-3 years";
|
|
10
|
+
"3-5 years": "3-5 years";
|
|
11
|
+
"5+ years": "5+ years";
|
|
12
|
+
}>>;
|
|
13
|
+
investorType: z.ZodOptional<z.ZodEnum<{
|
|
14
|
+
"Angel Investor": "Angel Investor";
|
|
15
|
+
"Venture Capitalist": "Venture Capitalist";
|
|
16
|
+
"Private Equity Firm": "Private Equity Firm";
|
|
17
|
+
"Venture Debt Provider": "Venture Debt Provider";
|
|
18
|
+
Bank: "Bank";
|
|
19
|
+
"Convertible Note Investor": "Convertible Note Investor";
|
|
20
|
+
"Revenue Based Financing Investor": "Revenue Based Financing Investor";
|
|
21
|
+
"Corporate Venture Capitalist": "Corporate Venture Capitalist";
|
|
22
|
+
Government: "Government";
|
|
23
|
+
"Social Impact Investor": "Social Impact Investor";
|
|
24
|
+
}>>;
|
|
25
|
+
investmentSize: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
"Under 5k USD": "Under 5k USD";
|
|
27
|
+
"5k - 25k USD": "5k - 25k USD";
|
|
28
|
+
"25k - 100k USD": "25k - 100k USD";
|
|
29
|
+
"100k - 500k USD": "100k - 500k USD";
|
|
30
|
+
"500k - 1M USD": "500k - 1M USD";
|
|
31
|
+
"1M+ USD": "1M+ USD";
|
|
32
|
+
}>>;
|
|
33
|
+
geographicFocus: z.ZodOptional<z.ZodEnum<{
|
|
34
|
+
Africa: "Africa";
|
|
35
|
+
Asia: "Asia";
|
|
36
|
+
Europe: "Europe";
|
|
37
|
+
"North America": "North America";
|
|
38
|
+
"South America": "South America";
|
|
39
|
+
"Middle East": "Middle East";
|
|
40
|
+
Oceania: "Oceania";
|
|
41
|
+
"United Kingdom (UK)": "United Kingdom (UK)";
|
|
42
|
+
"United States (US)": "United States (US)";
|
|
43
|
+
Global: "Global";
|
|
44
|
+
Other: "Other";
|
|
45
|
+
}>>;
|
|
46
|
+
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
48
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
2
50
|
export declare const InvestorEntitySchema: z.ZodObject<{
|
|
3
51
|
id: z.ZodCUID2;
|
|
4
52
|
userId: z.ZodCUID2;
|
|
@@ -55,11 +103,77 @@ export declare const InvestorEntitySchema: z.ZodObject<{
|
|
|
55
103
|
readonly GENERIC_WEBSITE: "Generic Website";
|
|
56
104
|
}>;
|
|
57
105
|
}, z.core.$strip>>>;
|
|
106
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
107
|
+
title: z.ZodString;
|
|
108
|
+
link: z.ZodOptional<z.ZodString>;
|
|
109
|
+
year: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
110
|
+
}, z.core.$strip>>>;
|
|
58
111
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
112
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
60
113
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
61
114
|
version: z.ZodInt;
|
|
62
115
|
}, z.core.$strip>;
|
|
116
|
+
export declare const InvestorWithUserEntitySchema: z.ZodObject<{
|
|
117
|
+
id: z.ZodCUID2;
|
|
118
|
+
userId: z.ZodCUID2;
|
|
119
|
+
bio: z.ZodOptional<z.ZodString>;
|
|
120
|
+
location: z.ZodOptional<z.ZodString>;
|
|
121
|
+
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
122
|
+
"0-1 year": "0-1 year";
|
|
123
|
+
"1-3 years": "1-3 years";
|
|
124
|
+
"3-5 years": "3-5 years";
|
|
125
|
+
"5+ years": "5+ years";
|
|
126
|
+
}>>;
|
|
127
|
+
investorType: z.ZodOptional<z.ZodEnum<{
|
|
128
|
+
"Angel Investor": "Angel Investor";
|
|
129
|
+
"Venture Capitalist": "Venture Capitalist";
|
|
130
|
+
"Private Equity Firm": "Private Equity Firm";
|
|
131
|
+
"Venture Debt Provider": "Venture Debt Provider";
|
|
132
|
+
Bank: "Bank";
|
|
133
|
+
"Convertible Note Investor": "Convertible Note Investor";
|
|
134
|
+
"Revenue Based Financing Investor": "Revenue Based Financing Investor";
|
|
135
|
+
"Corporate Venture Capitalist": "Corporate Venture Capitalist";
|
|
136
|
+
Government: "Government";
|
|
137
|
+
"Social Impact Investor": "Social Impact Investor";
|
|
138
|
+
}>>;
|
|
139
|
+
investmentSize: z.ZodOptional<z.ZodEnum<{
|
|
140
|
+
"Under 5k USD": "Under 5k USD";
|
|
141
|
+
"5k - 25k USD": "5k - 25k USD";
|
|
142
|
+
"25k - 100k USD": "25k - 100k USD";
|
|
143
|
+
"100k - 500k USD": "100k - 500k USD";
|
|
144
|
+
"500k - 1M USD": "500k - 1M USD";
|
|
145
|
+
"1M+ USD": "1M+ USD";
|
|
146
|
+
}>>;
|
|
147
|
+
geographicFocus: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
Africa: "Africa";
|
|
149
|
+
Asia: "Asia";
|
|
150
|
+
Europe: "Europe";
|
|
151
|
+
"North America": "North America";
|
|
152
|
+
"South America": "South America";
|
|
153
|
+
"Middle East": "Middle East";
|
|
154
|
+
Oceania: "Oceania";
|
|
155
|
+
"United Kingdom (UK)": "United Kingdom (UK)";
|
|
156
|
+
"United States (US)": "United States (US)";
|
|
157
|
+
Global: "Global";
|
|
158
|
+
Other: "Other";
|
|
159
|
+
}>>;
|
|
160
|
+
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
161
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
162
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
163
|
+
user: z.ZodObject<{
|
|
164
|
+
email: z.ZodEmail;
|
|
165
|
+
username: z.ZodOptional<z.ZodString>;
|
|
166
|
+
id: z.ZodCUID2;
|
|
167
|
+
name: z.ZodOptional<z.ZodString>;
|
|
168
|
+
image: z.ZodOptional<z.ZodString>;
|
|
169
|
+
role: z.ZodEnum<{
|
|
170
|
+
CREATIVE: "CREATIVE";
|
|
171
|
+
BRAND: "BRAND";
|
|
172
|
+
INVESTOR: "INVESTOR";
|
|
173
|
+
ADMIN: "ADMIN";
|
|
174
|
+
}>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
}, z.core.$strip>;
|
|
63
177
|
export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
|
|
64
178
|
websiteURL: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.ZodURL, z.ZodLiteral<"">]>>>;
|
|
65
179
|
experienceLevel: z.ZodDefault<z.ZodEnum<{
|
|
@@ -69,6 +183,7 @@ export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
|
|
|
69
183
|
"5+ years": "5+ years";
|
|
70
184
|
}>>;
|
|
71
185
|
location: z.ZodString;
|
|
186
|
+
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
72
187
|
}, z.core.$strip>;
|
|
73
188
|
export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
|
|
74
189
|
bio: z.ZodOptional<z.ZodString>;
|
|
@@ -124,6 +239,11 @@ export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
|
|
|
124
239
|
readonly GENERIC_WEBSITE: "Generic Website";
|
|
125
240
|
}>;
|
|
126
241
|
}, z.core.$strip>>>;
|
|
242
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
243
|
+
title: z.ZodString;
|
|
244
|
+
link: z.ZodOptional<z.ZodString>;
|
|
245
|
+
year: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
246
|
+
}, z.core.$strip>>>;
|
|
127
247
|
location: z.ZodOptional<z.ZodString>;
|
|
128
248
|
version: z.ZodInt;
|
|
129
249
|
}, z.core.$strip>;
|
|
@@ -141,6 +261,11 @@ export declare const ListInvestorsInputSchema: z.ZodObject<{
|
|
|
141
261
|
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
142
262
|
perPage: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
143
263
|
}, z.core.$strip>;
|
|
264
|
+
export declare const SearchInvestorInputSchema: z.ZodObject<{
|
|
265
|
+
string: z.ZodString;
|
|
266
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
267
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
268
|
+
}, z.core.$strip>;
|
|
144
269
|
export declare const GetInvestorParamsSchema: z.ZodObject<{
|
|
145
270
|
value: z.ZodCUID2;
|
|
146
271
|
}, z.core.$strip>;
|
|
@@ -206,6 +331,11 @@ export declare const CreateInvestorOutputSchema: z.ZodObject<{
|
|
|
206
331
|
readonly GENERIC_WEBSITE: "Generic Website";
|
|
207
332
|
}>;
|
|
208
333
|
}, z.core.$strip>>>;
|
|
334
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
335
|
+
title: z.ZodString;
|
|
336
|
+
link: z.ZodOptional<z.ZodString>;
|
|
337
|
+
year: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
338
|
+
}, z.core.$strip>>>;
|
|
209
339
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
210
340
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
211
341
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -267,6 +397,11 @@ export declare const GetInvestorOutputSchema: z.ZodObject<{
|
|
|
267
397
|
readonly GENERIC_WEBSITE: "Generic Website";
|
|
268
398
|
}>;
|
|
269
399
|
}, z.core.$strip>>>;
|
|
400
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
401
|
+
title: z.ZodString;
|
|
402
|
+
link: z.ZodOptional<z.ZodString>;
|
|
403
|
+
year: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
404
|
+
}, z.core.$strip>>>;
|
|
270
405
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
271
406
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
272
407
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -328,8 +463,77 @@ export declare const UpdateInvestorOutputSchema: z.ZodObject<{
|
|
|
328
463
|
readonly GENERIC_WEBSITE: "Generic Website";
|
|
329
464
|
}>;
|
|
330
465
|
}, z.core.$strip>>>;
|
|
466
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
467
|
+
title: z.ZodString;
|
|
468
|
+
link: z.ZodOptional<z.ZodString>;
|
|
469
|
+
year: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
470
|
+
}, z.core.$strip>>>;
|
|
331
471
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
332
472
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
333
473
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
334
474
|
version: z.ZodInt;
|
|
335
475
|
}, z.core.$strip>;
|
|
476
|
+
export declare const SearchInvestorOutputSchema: z.ZodObject<{
|
|
477
|
+
investors: z.ZodArray<z.ZodObject<{
|
|
478
|
+
id: z.ZodCUID2;
|
|
479
|
+
userId: z.ZodCUID2;
|
|
480
|
+
bio: z.ZodOptional<z.ZodString>;
|
|
481
|
+
location: z.ZodOptional<z.ZodString>;
|
|
482
|
+
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
483
|
+
"0-1 year": "0-1 year";
|
|
484
|
+
"1-3 years": "1-3 years";
|
|
485
|
+
"3-5 years": "3-5 years";
|
|
486
|
+
"5+ years": "5+ years";
|
|
487
|
+
}>>;
|
|
488
|
+
investorType: z.ZodOptional<z.ZodEnum<{
|
|
489
|
+
"Angel Investor": "Angel Investor";
|
|
490
|
+
"Venture Capitalist": "Venture Capitalist";
|
|
491
|
+
"Private Equity Firm": "Private Equity Firm";
|
|
492
|
+
"Venture Debt Provider": "Venture Debt Provider";
|
|
493
|
+
Bank: "Bank";
|
|
494
|
+
"Convertible Note Investor": "Convertible Note Investor";
|
|
495
|
+
"Revenue Based Financing Investor": "Revenue Based Financing Investor";
|
|
496
|
+
"Corporate Venture Capitalist": "Corporate Venture Capitalist";
|
|
497
|
+
Government: "Government";
|
|
498
|
+
"Social Impact Investor": "Social Impact Investor";
|
|
499
|
+
}>>;
|
|
500
|
+
investmentSize: z.ZodOptional<z.ZodEnum<{
|
|
501
|
+
"Under 5k USD": "Under 5k USD";
|
|
502
|
+
"5k - 25k USD": "5k - 25k USD";
|
|
503
|
+
"25k - 100k USD": "25k - 100k USD";
|
|
504
|
+
"100k - 500k USD": "100k - 500k USD";
|
|
505
|
+
"500k - 1M USD": "500k - 1M USD";
|
|
506
|
+
"1M+ USD": "1M+ USD";
|
|
507
|
+
}>>;
|
|
508
|
+
geographicFocus: z.ZodOptional<z.ZodEnum<{
|
|
509
|
+
Africa: "Africa";
|
|
510
|
+
Asia: "Asia";
|
|
511
|
+
Europe: "Europe";
|
|
512
|
+
"North America": "North America";
|
|
513
|
+
"South America": "South America";
|
|
514
|
+
"Middle East": "Middle East";
|
|
515
|
+
Oceania: "Oceania";
|
|
516
|
+
"United Kingdom (UK)": "United Kingdom (UK)";
|
|
517
|
+
"United States (US)": "United States (US)";
|
|
518
|
+
Global: "Global";
|
|
519
|
+
Other: "Other";
|
|
520
|
+
}>>;
|
|
521
|
+
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
522
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
523
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
524
|
+
user: z.ZodObject<{
|
|
525
|
+
email: z.ZodEmail;
|
|
526
|
+
username: z.ZodOptional<z.ZodString>;
|
|
527
|
+
id: z.ZodCUID2;
|
|
528
|
+
name: z.ZodOptional<z.ZodString>;
|
|
529
|
+
image: z.ZodOptional<z.ZodString>;
|
|
530
|
+
role: z.ZodEnum<{
|
|
531
|
+
CREATIVE: "CREATIVE";
|
|
532
|
+
BRAND: "BRAND";
|
|
533
|
+
INVESTOR: "INVESTOR";
|
|
534
|
+
ADMIN: "ADMIN";
|
|
535
|
+
}>;
|
|
536
|
+
}, z.core.$strip>;
|
|
537
|
+
}, z.core.$strip>>;
|
|
538
|
+
nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
539
|
+
}, z.core.$strip>;
|
package/dist/schemas/investor.js
CHANGED
|
@@ -1,9 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateInvestorOutputSchema = exports.GetInvestorOutputSchema = exports.CreateInvestorOutputSchema = exports.GetInvestorQuerySchema = exports.GetInvestorParamsSchema = exports.ListInvestorsInputSchema = exports.UpdateInvestorProfileInputSchema = exports.CreateInvestorProfileInputSchema = exports.InvestorEntitySchema = void 0;
|
|
3
|
+
exports.SearchInvestorOutputSchema = exports.UpdateInvestorOutputSchema = exports.GetInvestorOutputSchema = exports.CreateInvestorOutputSchema = exports.GetInvestorQuerySchema = exports.GetInvestorParamsSchema = exports.SearchInvestorInputSchema = exports.ListInvestorsInputSchema = exports.UpdateInvestorProfileInputSchema = exports.CreateInvestorProfileInputSchema = exports.InvestorWithUserEntitySchema = exports.InvestorEntitySchema = exports.MinimalInvestorEntitySchema = 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 user_1 = require("./user");
|
|
8
|
+
exports.MinimalInvestorEntitySchema = zod_openapi_1.z.object({
|
|
9
|
+
id: zod_openapi_1.z.cuid2().openapi({ example: "inv_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
10
|
+
userId: zod_openapi_1.z.cuid2().openapi({ example: "user_owner_123" }),
|
|
11
|
+
bio: zod_openapi_1.z
|
|
12
|
+
.string()
|
|
13
|
+
.optional()
|
|
14
|
+
.openapi({ example: "Early stage VC focusing on creative technology." }),
|
|
15
|
+
location: zod_openapi_1.z.string().optional().openapi({ example: "New York, USA" }),
|
|
16
|
+
experienceLevel: zod_openapi_1.z
|
|
17
|
+
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
18
|
+
.optional()
|
|
19
|
+
.openapi({ example: "EXPERT" }),
|
|
20
|
+
investorType: zod_openapi_1.z
|
|
21
|
+
.enum(Object.values(constants_1.INVESTOR_TYPES))
|
|
22
|
+
.optional()
|
|
23
|
+
.openapi({ example: "VC" }),
|
|
24
|
+
investmentSize: zod_openapi_1.z
|
|
25
|
+
.enum(Object.values(constants_1.INVESTMENT_SIZES))
|
|
26
|
+
.optional()
|
|
27
|
+
.openapi({
|
|
28
|
+
example: "SEED",
|
|
29
|
+
}),
|
|
30
|
+
geographicFocus: zod_openapi_1.z
|
|
31
|
+
.enum(Object.values(constants_1.GEOGRAPHIC_FOCUS))
|
|
32
|
+
.optional()
|
|
33
|
+
.openapi({
|
|
34
|
+
example: "GLOBAL",
|
|
35
|
+
}),
|
|
36
|
+
disciplines: zod_openapi_1.z
|
|
37
|
+
.array(zod_openapi_1.z.string())
|
|
38
|
+
.optional()
|
|
39
|
+
.openapi({ example: ["Product Design", "AI Strategy"] }),
|
|
40
|
+
createdAt: zod_openapi_1.z.coerce
|
|
41
|
+
.date()
|
|
42
|
+
.optional()
|
|
43
|
+
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
44
|
+
updatedAt: zod_openapi_1.z.coerce
|
|
45
|
+
.date()
|
|
46
|
+
.optional()
|
|
47
|
+
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
48
|
+
});
|
|
7
49
|
exports.InvestorEntitySchema = zod_openapi_1.z
|
|
8
50
|
.object({
|
|
9
51
|
id: zod_openapi_1.z.cuid2().openapi({ example: "inv_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -43,6 +85,14 @@ exports.InvestorEntitySchema = zod_openapi_1.z
|
|
|
43
85
|
})
|
|
44
86
|
.array()
|
|
45
87
|
.optional(),
|
|
88
|
+
achievements: zod_openapi_1.z
|
|
89
|
+
.object({
|
|
90
|
+
title: zod_openapi_1.z.string(),
|
|
91
|
+
link: zod_openapi_1.z.string().optional(),
|
|
92
|
+
year: zod_openapi_1.z.coerce.number().int().optional(),
|
|
93
|
+
})
|
|
94
|
+
.array()
|
|
95
|
+
.optional(),
|
|
46
96
|
disciplines: zod_openapi_1.z
|
|
47
97
|
.array(zod_openapi_1.z.string())
|
|
48
98
|
.optional()
|
|
@@ -58,6 +108,9 @@ exports.InvestorEntitySchema = zod_openapi_1.z
|
|
|
58
108
|
version: zod_openapi_1.z.int(),
|
|
59
109
|
})
|
|
60
110
|
.openapi("InvestorEntity");
|
|
111
|
+
exports.InvestorWithUserEntitySchema = exports.MinimalInvestorEntitySchema.extend({
|
|
112
|
+
user: user_1.MinimalUserSchema,
|
|
113
|
+
});
|
|
61
114
|
exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
|
|
62
115
|
.object({
|
|
63
116
|
websiteURL: zod_openapi_1.z
|
|
@@ -65,7 +118,6 @@ exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
|
|
|
65
118
|
.transform((val) => {
|
|
66
119
|
if (!val)
|
|
67
120
|
return val;
|
|
68
|
-
console.log({ val });
|
|
69
121
|
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
70
122
|
return val;
|
|
71
123
|
}
|
|
@@ -82,6 +134,14 @@ exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
|
|
|
82
134
|
location: zod_openapi_1.z.string().openapi({
|
|
83
135
|
example: "UK",
|
|
84
136
|
}),
|
|
137
|
+
disciplineSlugs: zod_openapi_1.z
|
|
138
|
+
.array(zod_openapi_1.z.string())
|
|
139
|
+
.min(1, "At least one discipline is required")
|
|
140
|
+
.default([])
|
|
141
|
+
.describe("List of discipline slugs.")
|
|
142
|
+
.openapi({
|
|
143
|
+
example: ["fintech", "edtech"],
|
|
144
|
+
}),
|
|
85
145
|
})
|
|
86
146
|
.openapi({
|
|
87
147
|
title: "Create Investor Profile",
|
|
@@ -96,7 +156,6 @@ exports.UpdateInvestorProfileInputSchema = zod_openapi_1.z
|
|
|
96
156
|
.transform((val) => {
|
|
97
157
|
if (!val)
|
|
98
158
|
return val;
|
|
99
|
-
console.log({ val });
|
|
100
159
|
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
101
160
|
return val;
|
|
102
161
|
}
|
|
@@ -145,6 +204,14 @@ exports.UpdateInvestorProfileInputSchema = zod_openapi_1.z
|
|
|
145
204
|
})
|
|
146
205
|
.array()
|
|
147
206
|
.optional(),
|
|
207
|
+
achievements: zod_openapi_1.z
|
|
208
|
+
.object({
|
|
209
|
+
title: zod_openapi_1.z.string(),
|
|
210
|
+
link: zod_openapi_1.z.string().optional(),
|
|
211
|
+
year: zod_openapi_1.z.coerce.number().int().optional(),
|
|
212
|
+
})
|
|
213
|
+
.array()
|
|
214
|
+
.optional(),
|
|
148
215
|
location: zod_openapi_1.z.string().optional().openapi({
|
|
149
216
|
example: "UK",
|
|
150
217
|
}),
|
|
@@ -182,6 +249,19 @@ exports.ListInvestorsInputSchema = zod_openapi_1.z
|
|
|
182
249
|
.openapi({ example: 20 }),
|
|
183
250
|
})
|
|
184
251
|
.openapi("ListInvestorsInput");
|
|
252
|
+
exports.SearchInvestorInputSchema = zod_openapi_1.z.object({
|
|
253
|
+
string: zod_openapi_1.z
|
|
254
|
+
.string()
|
|
255
|
+
.min(1, { message: "Search string cannot be empty" })
|
|
256
|
+
.max(200, { message: "Search string cannot exceed 200 characters" }),
|
|
257
|
+
limit: zod_openapi_1.z.coerce
|
|
258
|
+
.number()
|
|
259
|
+
.int({ message: "Limit must be an integer" })
|
|
260
|
+
.min(1, { message: "Limit must be at least 1" })
|
|
261
|
+
.max(100, { message: "Limit cannot exceed 100" })
|
|
262
|
+
.default(20),
|
|
263
|
+
cursor: zod_openapi_1.z.string().optional(),
|
|
264
|
+
});
|
|
185
265
|
exports.GetInvestorParamsSchema = zod_openapi_1.z.object({
|
|
186
266
|
value: common_1.CuidSchema,
|
|
187
267
|
});
|
|
@@ -189,3 +269,7 @@ exports.GetInvestorQuerySchema = common_1.ProfileIdentifierSchema;
|
|
|
189
269
|
exports.CreateInvestorOutputSchema = exports.InvestorEntitySchema;
|
|
190
270
|
exports.GetInvestorOutputSchema = exports.InvestorEntitySchema;
|
|
191
271
|
exports.UpdateInvestorOutputSchema = exports.InvestorEntitySchema;
|
|
272
|
+
exports.SearchInvestorOutputSchema = zod_openapi_1.z.object({
|
|
273
|
+
investors: zod_openapi_1.z.array(exports.InvestorWithUserEntitySchema),
|
|
274
|
+
nextCursor: zod_openapi_1.z.string().optional().nullable(),
|
|
275
|
+
});
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -212,6 +212,11 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
|
|
|
212
212
|
readonly GENERIC_WEBSITE: "Generic Website";
|
|
213
213
|
}>;
|
|
214
214
|
}, z.core.$strip>>>;
|
|
215
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
216
|
+
title: z.ZodString;
|
|
217
|
+
link: z.ZodOptional<z.ZodString>;
|
|
218
|
+
year: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
219
|
+
}, z.core.$strip>>>;
|
|
215
220
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
216
221
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
217
222
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
@@ -740,6 +745,11 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
|
|
|
740
745
|
readonly GENERIC_WEBSITE: "Generic Website";
|
|
741
746
|
}>;
|
|
742
747
|
}, z.core.$strip>>>;
|
|
748
|
+
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
749
|
+
title: z.ZodString;
|
|
750
|
+
link: z.ZodOptional<z.ZodString>;
|
|
751
|
+
year: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
752
|
+
}, z.core.$strip>>>;
|
|
743
753
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
744
754
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
745
755
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
package/dist/types/investor.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { CreateInvestorOutputSchema, CreateInvestorProfileInputSchema, GetInvestorOutputSchema, GetInvestorParamsSchema, GetInvestorQuerySchema, InvestorEntitySchema, ListInvestorsInputSchema, UpdateInvestorOutputSchema, UpdateInvestorProfileInputSchema } from "../schemas/investor";
|
|
2
|
+
import { CreateInvestorOutputSchema, CreateInvestorProfileInputSchema, GetInvestorOutputSchema, GetInvestorParamsSchema, GetInvestorQuerySchema, InvestorEntitySchema, InvestorWithUserEntitySchema, ListInvestorsInputSchema, MinimalInvestorEntitySchema, SearchInvestorInputSchema, SearchInvestorOutputSchema, UpdateInvestorOutputSchema, UpdateInvestorProfileInputSchema } from "../schemas/investor";
|
|
3
3
|
export type InvestorEntity = z.infer<typeof InvestorEntitySchema>;
|
|
4
|
+
export type MinimalInvestorEntity = z.infer<typeof MinimalInvestorEntitySchema>;
|
|
5
|
+
export type InvestorWithUserEntity = z.infer<typeof InvestorWithUserEntitySchema>;
|
|
4
6
|
export type ListInvestorsInput = z.infer<typeof ListInvestorsInputSchema>;
|
|
5
7
|
export type CreateInvestorInput = z.infer<typeof CreateInvestorProfileInputSchema>;
|
|
6
8
|
export type UpdateInvestorInput = z.infer<typeof UpdateInvestorProfileInputSchema>;
|
|
9
|
+
export type SearchInvestorInput = z.infer<typeof SearchInvestorInputSchema>;
|
|
7
10
|
export type GetInvestorParams = z.infer<typeof GetInvestorParamsSchema>;
|
|
8
11
|
export type GetInvestorQuery = z.infer<typeof GetInvestorQuerySchema>;
|
|
9
12
|
export type CreateInvestorOutput = z.infer<typeof CreateInvestorOutputSchema>;
|
|
10
13
|
export type GetInvestorOutput = z.infer<typeof GetInvestorOutputSchema>;
|
|
11
14
|
export type UpdateInvestorOutput = z.infer<typeof UpdateInvestorOutputSchema>;
|
|
15
|
+
export type SearchInvestorOutput = z.infer<typeof SearchInvestorOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/investor.ts
CHANGED
|
@@ -11,6 +11,61 @@ import {
|
|
|
11
11
|
LINK_TYPES,
|
|
12
12
|
} from "../constants";
|
|
13
13
|
import { CuidSchema, ProfileIdentifierSchema } from "./common";
|
|
14
|
+
import { MinimalUserSchema } from "./user";
|
|
15
|
+
|
|
16
|
+
export const MinimalInvestorEntitySchema = z.object({
|
|
17
|
+
id: z.cuid2().openapi({ example: "inv_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
18
|
+
userId: z.cuid2().openapi({ example: "user_owner_123" }),
|
|
19
|
+
bio: z
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.openapi({ example: "Early stage VC focusing on creative technology." }),
|
|
23
|
+
location: z.string().optional().openapi({ example: "New York, USA" }),
|
|
24
|
+
experienceLevel: z
|
|
25
|
+
.enum(
|
|
26
|
+
Object.values(EXPERIENCE_LEVELS) as [
|
|
27
|
+
ExperienceLevel,
|
|
28
|
+
...ExperienceLevel[],
|
|
29
|
+
],
|
|
30
|
+
)
|
|
31
|
+
.optional()
|
|
32
|
+
.openapi({ example: "EXPERT" }),
|
|
33
|
+
investorType: z
|
|
34
|
+
.enum(Object.values(INVESTOR_TYPES) as [InvestorType, ...InvestorType[]])
|
|
35
|
+
.optional()
|
|
36
|
+
.openapi({ example: "VC" }),
|
|
37
|
+
investmentSize: z
|
|
38
|
+
.enum(
|
|
39
|
+
Object.values(INVESTMENT_SIZES) as [InvestmentSize, ...InvestmentSize[]],
|
|
40
|
+
)
|
|
41
|
+
.optional()
|
|
42
|
+
.openapi({
|
|
43
|
+
example: "SEED",
|
|
44
|
+
}),
|
|
45
|
+
geographicFocus: z
|
|
46
|
+
.enum(
|
|
47
|
+
Object.values(GEOGRAPHIC_FOCUS) as [
|
|
48
|
+
GeographicFocus,
|
|
49
|
+
...GeographicFocus[],
|
|
50
|
+
],
|
|
51
|
+
)
|
|
52
|
+
.optional()
|
|
53
|
+
.openapi({
|
|
54
|
+
example: "GLOBAL",
|
|
55
|
+
}),
|
|
56
|
+
disciplines: z
|
|
57
|
+
.array(z.string())
|
|
58
|
+
.optional()
|
|
59
|
+
.openapi({ example: ["Product Design", "AI Strategy"] }),
|
|
60
|
+
createdAt: z.coerce
|
|
61
|
+
.date()
|
|
62
|
+
.optional()
|
|
63
|
+
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
64
|
+
updatedAt: z.coerce
|
|
65
|
+
.date()
|
|
66
|
+
.optional()
|
|
67
|
+
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
68
|
+
});
|
|
14
69
|
|
|
15
70
|
export const InvestorEntitySchema = z
|
|
16
71
|
.object({
|
|
@@ -66,6 +121,14 @@ export const InvestorEntitySchema = z
|
|
|
66
121
|
})
|
|
67
122
|
.array()
|
|
68
123
|
.optional(),
|
|
124
|
+
achievements: z
|
|
125
|
+
.object({
|
|
126
|
+
title: z.string(),
|
|
127
|
+
link: z.string().optional(),
|
|
128
|
+
year: z.coerce.number().int().optional(),
|
|
129
|
+
})
|
|
130
|
+
.array()
|
|
131
|
+
.optional(),
|
|
69
132
|
disciplines: z
|
|
70
133
|
.array(z.string())
|
|
71
134
|
.optional()
|
|
@@ -82,13 +145,16 @@ export const InvestorEntitySchema = z
|
|
|
82
145
|
})
|
|
83
146
|
.openapi("InvestorEntity");
|
|
84
147
|
|
|
148
|
+
export const InvestorWithUserEntitySchema = MinimalInvestorEntitySchema.extend({
|
|
149
|
+
user: MinimalUserSchema,
|
|
150
|
+
});
|
|
151
|
+
|
|
85
152
|
export const CreateInvestorProfileInputSchema = z
|
|
86
153
|
.object({
|
|
87
154
|
websiteURL: z
|
|
88
155
|
.string()
|
|
89
156
|
.transform((val) => {
|
|
90
157
|
if (!val) return val;
|
|
91
|
-
console.log({ val });
|
|
92
158
|
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
93
159
|
return val;
|
|
94
160
|
}
|
|
@@ -110,6 +176,14 @@ export const CreateInvestorProfileInputSchema = z
|
|
|
110
176
|
location: z.string().openapi({
|
|
111
177
|
example: "UK",
|
|
112
178
|
}),
|
|
179
|
+
disciplineSlugs: z
|
|
180
|
+
.array(z.string())
|
|
181
|
+
.min(1, "At least one discipline is required")
|
|
182
|
+
.default([])
|
|
183
|
+
.describe("List of discipline slugs.")
|
|
184
|
+
.openapi({
|
|
185
|
+
example: ["fintech", "edtech"],
|
|
186
|
+
}),
|
|
113
187
|
})
|
|
114
188
|
.openapi({
|
|
115
189
|
title: "Create Investor Profile",
|
|
@@ -124,7 +198,6 @@ export const UpdateInvestorProfileInputSchema = z
|
|
|
124
198
|
.string()
|
|
125
199
|
.transform((val) => {
|
|
126
200
|
if (!val) return val;
|
|
127
|
-
console.log({ val });
|
|
128
201
|
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
129
202
|
return val;
|
|
130
203
|
}
|
|
@@ -188,6 +261,14 @@ export const UpdateInvestorProfileInputSchema = z
|
|
|
188
261
|
})
|
|
189
262
|
.array()
|
|
190
263
|
.optional(),
|
|
264
|
+
achievements: z
|
|
265
|
+
.object({
|
|
266
|
+
title: z.string(),
|
|
267
|
+
link: z.string().optional(),
|
|
268
|
+
year: z.coerce.number().int().optional(),
|
|
269
|
+
})
|
|
270
|
+
.array()
|
|
271
|
+
.optional(),
|
|
191
272
|
location: z.string().optional().openapi({
|
|
192
273
|
example: "UK",
|
|
193
274
|
}),
|
|
@@ -234,6 +315,20 @@ export const ListInvestorsInputSchema = z
|
|
|
234
315
|
})
|
|
235
316
|
.openapi("ListInvestorsInput");
|
|
236
317
|
|
|
318
|
+
export const SearchInvestorInputSchema = z.object({
|
|
319
|
+
string: z
|
|
320
|
+
.string()
|
|
321
|
+
.min(1, { message: "Search string cannot be empty" })
|
|
322
|
+
.max(200, { message: "Search string cannot exceed 200 characters" }),
|
|
323
|
+
limit: z.coerce
|
|
324
|
+
.number()
|
|
325
|
+
.int({ message: "Limit must be an integer" })
|
|
326
|
+
.min(1, { message: "Limit must be at least 1" })
|
|
327
|
+
.max(100, { message: "Limit cannot exceed 100" })
|
|
328
|
+
.default(20),
|
|
329
|
+
cursor: z.string().optional(),
|
|
330
|
+
});
|
|
331
|
+
|
|
237
332
|
export const GetInvestorParamsSchema = z.object({
|
|
238
333
|
value: CuidSchema,
|
|
239
334
|
});
|
|
@@ -245,3 +340,8 @@ export const CreateInvestorOutputSchema = InvestorEntitySchema;
|
|
|
245
340
|
export const GetInvestorOutputSchema = InvestorEntitySchema;
|
|
246
341
|
|
|
247
342
|
export const UpdateInvestorOutputSchema = InvestorEntitySchema;
|
|
343
|
+
|
|
344
|
+
export const SearchInvestorOutputSchema = z.object({
|
|
345
|
+
investors: z.array(InvestorWithUserEntitySchema),
|
|
346
|
+
nextCursor: z.string().optional().nullable(),
|
|
347
|
+
});
|
package/src/types/investor.ts
CHANGED
|
@@ -6,13 +6,23 @@ import {
|
|
|
6
6
|
GetInvestorParamsSchema,
|
|
7
7
|
GetInvestorQuerySchema,
|
|
8
8
|
InvestorEntitySchema,
|
|
9
|
+
InvestorWithUserEntitySchema,
|
|
9
10
|
ListInvestorsInputSchema,
|
|
11
|
+
MinimalInvestorEntitySchema,
|
|
12
|
+
SearchInvestorInputSchema,
|
|
13
|
+
SearchInvestorOutputSchema,
|
|
10
14
|
UpdateInvestorOutputSchema,
|
|
11
15
|
UpdateInvestorProfileInputSchema,
|
|
12
16
|
} from "../schemas/investor";
|
|
13
17
|
|
|
14
18
|
export type InvestorEntity = z.infer<typeof InvestorEntitySchema>;
|
|
15
19
|
|
|
20
|
+
export type MinimalInvestorEntity = z.infer<typeof MinimalInvestorEntitySchema>;
|
|
21
|
+
|
|
22
|
+
export type InvestorWithUserEntity = z.infer<
|
|
23
|
+
typeof InvestorWithUserEntitySchema
|
|
24
|
+
>;
|
|
25
|
+
|
|
16
26
|
export type ListInvestorsInput = z.infer<typeof ListInvestorsInputSchema>;
|
|
17
27
|
|
|
18
28
|
export type CreateInvestorInput = z.infer<
|
|
@@ -23,6 +33,8 @@ export type UpdateInvestorInput = z.infer<
|
|
|
23
33
|
typeof UpdateInvestorProfileInputSchema
|
|
24
34
|
>;
|
|
25
35
|
|
|
36
|
+
export type SearchInvestorInput = z.infer<typeof SearchInvestorInputSchema>;
|
|
37
|
+
|
|
26
38
|
export type GetInvestorParams = z.infer<typeof GetInvestorParamsSchema>;
|
|
27
39
|
|
|
28
40
|
export type GetInvestorQuery = z.infer<typeof GetInvestorQuerySchema>;
|
|
@@ -32,3 +44,5 @@ export type CreateInvestorOutput = z.infer<typeof CreateInvestorOutputSchema>;
|
|
|
32
44
|
export type GetInvestorOutput = z.infer<typeof GetInvestorOutputSchema>;
|
|
33
45
|
|
|
34
46
|
export type UpdateInvestorOutput = z.infer<typeof UpdateInvestorOutputSchema>;
|
|
47
|
+
|
|
48
|
+
export type SearchInvestorOutput = z.infer<typeof SearchInvestorOutputSchema>;
|