@zyacreatives/shared 2.2.43 → 2.2.45

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.
@@ -1,4 +1,53 @@
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
+ websiteURL: z.ZodOptional<z.ZodURL>;
47
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
+ createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
49
+ updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
50
+ }, z.core.$strip>;
2
51
  export declare const InvestorEntitySchema: z.ZodObject<{
3
52
  id: z.ZodCUID2;
4
53
  userId: z.ZodCUID2;
@@ -65,6 +114,68 @@ export declare const InvestorEntitySchema: z.ZodObject<{
65
114
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
66
115
  version: z.ZodInt;
67
116
  }, z.core.$strip>;
117
+ export declare const InvestorWithUserEntitySchema: z.ZodObject<{
118
+ id: z.ZodCUID2;
119
+ userId: z.ZodCUID2;
120
+ bio: z.ZodOptional<z.ZodString>;
121
+ location: z.ZodOptional<z.ZodString>;
122
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
123
+ "0-1 year": "0-1 year";
124
+ "1-3 years": "1-3 years";
125
+ "3-5 years": "3-5 years";
126
+ "5+ years": "5+ years";
127
+ }>>;
128
+ investorType: z.ZodOptional<z.ZodEnum<{
129
+ "Angel Investor": "Angel Investor";
130
+ "Venture Capitalist": "Venture Capitalist";
131
+ "Private Equity Firm": "Private Equity Firm";
132
+ "Venture Debt Provider": "Venture Debt Provider";
133
+ Bank: "Bank";
134
+ "Convertible Note Investor": "Convertible Note Investor";
135
+ "Revenue Based Financing Investor": "Revenue Based Financing Investor";
136
+ "Corporate Venture Capitalist": "Corporate Venture Capitalist";
137
+ Government: "Government";
138
+ "Social Impact Investor": "Social Impact Investor";
139
+ }>>;
140
+ investmentSize: z.ZodOptional<z.ZodEnum<{
141
+ "Under 5k USD": "Under 5k USD";
142
+ "5k - 25k USD": "5k - 25k USD";
143
+ "25k - 100k USD": "25k - 100k USD";
144
+ "100k - 500k USD": "100k - 500k USD";
145
+ "500k - 1M USD": "500k - 1M USD";
146
+ "1M+ USD": "1M+ USD";
147
+ }>>;
148
+ geographicFocus: z.ZodOptional<z.ZodEnum<{
149
+ Africa: "Africa";
150
+ Asia: "Asia";
151
+ Europe: "Europe";
152
+ "North America": "North America";
153
+ "South America": "South America";
154
+ "Middle East": "Middle East";
155
+ Oceania: "Oceania";
156
+ "United Kingdom (UK)": "United Kingdom (UK)";
157
+ "United States (US)": "United States (US)";
158
+ Global: "Global";
159
+ Other: "Other";
160
+ }>>;
161
+ websiteURL: z.ZodOptional<z.ZodURL>;
162
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
163
+ createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
164
+ updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
165
+ user: z.ZodObject<{
166
+ email: z.ZodEmail;
167
+ username: z.ZodOptional<z.ZodString>;
168
+ id: z.ZodCUID2;
169
+ name: z.ZodOptional<z.ZodString>;
170
+ image: z.ZodOptional<z.ZodString>;
171
+ role: z.ZodEnum<{
172
+ CREATIVE: "CREATIVE";
173
+ BRAND: "BRAND";
174
+ INVESTOR: "INVESTOR";
175
+ ADMIN: "ADMIN";
176
+ }>;
177
+ }, z.core.$strip>;
178
+ }, z.core.$strip>;
68
179
  export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
69
180
  websiteURL: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.ZodURL, z.ZodLiteral<"">]>>>;
70
181
  experienceLevel: z.ZodDefault<z.ZodEnum<{
@@ -74,6 +185,7 @@ export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
74
185
  "5+ years": "5+ years";
75
186
  }>>;
76
187
  location: z.ZodString;
188
+ disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
77
189
  }, z.core.$strip>;
78
190
  export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
79
191
  bio: z.ZodOptional<z.ZodString>;
@@ -151,6 +263,11 @@ export declare const ListInvestorsInputSchema: z.ZodObject<{
151
263
  page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
152
264
  perPage: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
153
265
  }, z.core.$strip>;
266
+ export declare const SearchInvestorInputSchema: z.ZodObject<{
267
+ string: z.ZodString;
268
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
269
+ cursor: z.ZodOptional<z.ZodString>;
270
+ }, z.core.$strip>;
154
271
  export declare const GetInvestorParamsSchema: z.ZodObject<{
155
272
  value: z.ZodCUID2;
156
273
  }, z.core.$strip>;
@@ -358,3 +475,68 @@ export declare const UpdateInvestorOutputSchema: z.ZodObject<{
358
475
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
359
476
  version: z.ZodInt;
360
477
  }, z.core.$strip>;
478
+ export declare const SearchInvestorOutputSchema: z.ZodObject<{
479
+ investors: z.ZodArray<z.ZodObject<{
480
+ id: z.ZodCUID2;
481
+ userId: z.ZodCUID2;
482
+ bio: z.ZodOptional<z.ZodString>;
483
+ location: z.ZodOptional<z.ZodString>;
484
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
485
+ "0-1 year": "0-1 year";
486
+ "1-3 years": "1-3 years";
487
+ "3-5 years": "3-5 years";
488
+ "5+ years": "5+ years";
489
+ }>>;
490
+ investorType: z.ZodOptional<z.ZodEnum<{
491
+ "Angel Investor": "Angel Investor";
492
+ "Venture Capitalist": "Venture Capitalist";
493
+ "Private Equity Firm": "Private Equity Firm";
494
+ "Venture Debt Provider": "Venture Debt Provider";
495
+ Bank: "Bank";
496
+ "Convertible Note Investor": "Convertible Note Investor";
497
+ "Revenue Based Financing Investor": "Revenue Based Financing Investor";
498
+ "Corporate Venture Capitalist": "Corporate Venture Capitalist";
499
+ Government: "Government";
500
+ "Social Impact Investor": "Social Impact Investor";
501
+ }>>;
502
+ investmentSize: z.ZodOptional<z.ZodEnum<{
503
+ "Under 5k USD": "Under 5k USD";
504
+ "5k - 25k USD": "5k - 25k USD";
505
+ "25k - 100k USD": "25k - 100k USD";
506
+ "100k - 500k USD": "100k - 500k USD";
507
+ "500k - 1M USD": "500k - 1M USD";
508
+ "1M+ USD": "1M+ USD";
509
+ }>>;
510
+ geographicFocus: z.ZodOptional<z.ZodEnum<{
511
+ Africa: "Africa";
512
+ Asia: "Asia";
513
+ Europe: "Europe";
514
+ "North America": "North America";
515
+ "South America": "South America";
516
+ "Middle East": "Middle East";
517
+ Oceania: "Oceania";
518
+ "United Kingdom (UK)": "United Kingdom (UK)";
519
+ "United States (US)": "United States (US)";
520
+ Global: "Global";
521
+ Other: "Other";
522
+ }>>;
523
+ websiteURL: z.ZodOptional<z.ZodURL>;
524
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
525
+ createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
526
+ updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
527
+ user: z.ZodObject<{
528
+ email: z.ZodEmail;
529
+ username: z.ZodOptional<z.ZodString>;
530
+ id: z.ZodCUID2;
531
+ name: z.ZodOptional<z.ZodString>;
532
+ image: z.ZodOptional<z.ZodString>;
533
+ role: z.ZodEnum<{
534
+ CREATIVE: "CREATIVE";
535
+ BRAND: "BRAND";
536
+ INVESTOR: "INVESTOR";
537
+ ADMIN: "ADMIN";
538
+ }>;
539
+ }, z.core.$strip>;
540
+ }, z.core.$strip>>;
541
+ nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
542
+ }, z.core.$strip>;
@@ -1,9 +1,55 @@
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
+ websiteURL: zod_openapi_1.z
37
+ .url()
38
+ .optional()
39
+ .openapi({ example: "https://investorpartners.com" }),
40
+ disciplines: zod_openapi_1.z
41
+ .array(zod_openapi_1.z.string())
42
+ .optional()
43
+ .openapi({ example: ["Product Design", "AI Strategy"] }),
44
+ createdAt: zod_openapi_1.z.coerce
45
+ .date()
46
+ .optional()
47
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
48
+ updatedAt: zod_openapi_1.z.coerce
49
+ .date()
50
+ .optional()
51
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
52
+ });
7
53
  exports.InvestorEntitySchema = zod_openapi_1.z
8
54
  .object({
9
55
  id: zod_openapi_1.z.cuid2().openapi({ example: "inv_cksd0v6q0000s9a5y8z7p3x9" }),
@@ -66,6 +112,9 @@ exports.InvestorEntitySchema = zod_openapi_1.z
66
112
  version: zod_openapi_1.z.int(),
67
113
  })
68
114
  .openapi("InvestorEntity");
115
+ exports.InvestorWithUserEntitySchema = exports.MinimalInvestorEntitySchema.extend({
116
+ user: user_1.MinimalUserSchema,
117
+ });
69
118
  exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
70
119
  .object({
71
120
  websiteURL: zod_openapi_1.z
@@ -73,7 +122,6 @@ exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
73
122
  .transform((val) => {
74
123
  if (!val)
75
124
  return val;
76
- console.log({ val });
77
125
  if (val.startsWith("http://") || val.startsWith("https://")) {
78
126
  return val;
79
127
  }
@@ -90,6 +138,14 @@ exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
90
138
  location: zod_openapi_1.z.string().openapi({
91
139
  example: "UK",
92
140
  }),
141
+ disciplineSlugs: zod_openapi_1.z
142
+ .array(zod_openapi_1.z.string())
143
+ .min(1, "At least one discipline is required")
144
+ .default([])
145
+ .describe("List of discipline slugs.")
146
+ .openapi({
147
+ example: ["fintech", "edtech"],
148
+ }),
93
149
  })
94
150
  .openapi({
95
151
  title: "Create Investor Profile",
@@ -104,7 +160,6 @@ exports.UpdateInvestorProfileInputSchema = zod_openapi_1.z
104
160
  .transform((val) => {
105
161
  if (!val)
106
162
  return val;
107
- console.log({ val });
108
163
  if (val.startsWith("http://") || val.startsWith("https://")) {
109
164
  return val;
110
165
  }
@@ -198,6 +253,19 @@ exports.ListInvestorsInputSchema = zod_openapi_1.z
198
253
  .openapi({ example: 20 }),
199
254
  })
200
255
  .openapi("ListInvestorsInput");
256
+ exports.SearchInvestorInputSchema = zod_openapi_1.z.object({
257
+ string: zod_openapi_1.z
258
+ .string()
259
+ .min(1, { message: "Search string cannot be empty" })
260
+ .max(200, { message: "Search string cannot exceed 200 characters" }),
261
+ limit: zod_openapi_1.z.coerce
262
+ .number()
263
+ .int({ message: "Limit must be an integer" })
264
+ .min(1, { message: "Limit must be at least 1" })
265
+ .max(100, { message: "Limit cannot exceed 100" })
266
+ .default(20),
267
+ cursor: zod_openapi_1.z.string().optional(),
268
+ });
201
269
  exports.GetInvestorParamsSchema = zod_openapi_1.z.object({
202
270
  value: common_1.CuidSchema,
203
271
  });
@@ -205,3 +273,7 @@ exports.GetInvestorQuerySchema = common_1.ProfileIdentifierSchema;
205
273
  exports.CreateInvestorOutputSchema = exports.InvestorEntitySchema;
206
274
  exports.GetInvestorOutputSchema = exports.InvestorEntitySchema;
207
275
  exports.UpdateInvestorOutputSchema = exports.InvestorEntitySchema;
276
+ exports.SearchInvestorOutputSchema = zod_openapi_1.z.object({
277
+ investors: zod_openapi_1.z.array(exports.InvestorWithUserEntitySchema),
278
+ nextCursor: zod_openapi_1.z.string().optional().nullable(),
279
+ });
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.43",
3
+ "version": "2.2.45",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -11,6 +11,65 @@ 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
+ websiteURL: z
57
+ .url()
58
+ .optional()
59
+ .openapi({ example: "https://investorpartners.com" }),
60
+ disciplines: z
61
+ .array(z.string())
62
+ .optional()
63
+ .openapi({ example: ["Product Design", "AI Strategy"] }),
64
+ createdAt: z.coerce
65
+ .date()
66
+ .optional()
67
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
68
+ updatedAt: z.coerce
69
+ .date()
70
+ .optional()
71
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
72
+ });
14
73
 
15
74
  export const InvestorEntitySchema = z
16
75
  .object({
@@ -90,13 +149,16 @@ export const InvestorEntitySchema = z
90
149
  })
91
150
  .openapi("InvestorEntity");
92
151
 
152
+ export const InvestorWithUserEntitySchema = MinimalInvestorEntitySchema.extend({
153
+ user: MinimalUserSchema,
154
+ });
155
+
93
156
  export const CreateInvestorProfileInputSchema = z
94
157
  .object({
95
158
  websiteURL: z
96
159
  .string()
97
160
  .transform((val) => {
98
161
  if (!val) return val;
99
- console.log({ val });
100
162
  if (val.startsWith("http://") || val.startsWith("https://")) {
101
163
  return val;
102
164
  }
@@ -118,6 +180,14 @@ export const CreateInvestorProfileInputSchema = z
118
180
  location: z.string().openapi({
119
181
  example: "UK",
120
182
  }),
183
+ disciplineSlugs: z
184
+ .array(z.string())
185
+ .min(1, "At least one discipline is required")
186
+ .default([])
187
+ .describe("List of discipline slugs.")
188
+ .openapi({
189
+ example: ["fintech", "edtech"],
190
+ }),
121
191
  })
122
192
  .openapi({
123
193
  title: "Create Investor Profile",
@@ -132,7 +202,6 @@ export const UpdateInvestorProfileInputSchema = z
132
202
  .string()
133
203
  .transform((val) => {
134
204
  if (!val) return val;
135
- console.log({ val });
136
205
  if (val.startsWith("http://") || val.startsWith("https://")) {
137
206
  return val;
138
207
  }
@@ -250,6 +319,20 @@ export const ListInvestorsInputSchema = z
250
319
  })
251
320
  .openapi("ListInvestorsInput");
252
321
 
322
+ export const SearchInvestorInputSchema = z.object({
323
+ string: z
324
+ .string()
325
+ .min(1, { message: "Search string cannot be empty" })
326
+ .max(200, { message: "Search string cannot exceed 200 characters" }),
327
+ limit: z.coerce
328
+ .number()
329
+ .int({ message: "Limit must be an integer" })
330
+ .min(1, { message: "Limit must be at least 1" })
331
+ .max(100, { message: "Limit cannot exceed 100" })
332
+ .default(20),
333
+ cursor: z.string().optional(),
334
+ });
335
+
253
336
  export const GetInvestorParamsSchema = z.object({
254
337
  value: CuidSchema,
255
338
  });
@@ -261,3 +344,8 @@ export const CreateInvestorOutputSchema = InvestorEntitySchema;
261
344
  export const GetInvestorOutputSchema = InvestorEntitySchema;
262
345
 
263
346
  export const UpdateInvestorOutputSchema = InvestorEntitySchema;
347
+
348
+ export const SearchInvestorOutputSchema = z.object({
349
+ investors: z.array(InvestorWithUserEntitySchema),
350
+ nextCursor: z.string().optional().nullable(),
351
+ });
@@ -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>;