@zyacreatives/shared 2.5.13 → 2.5.15
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/creative.d.ts +1 -1
- package/dist/schemas/creative.js +1 -1
- package/dist/schemas/investor.d.ts +15 -2
- package/dist/schemas/investor.js +27 -61
- package/dist/schemas/post.d.ts +1 -1
- package/dist/schemas/post.js +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +0 -1
- package/package.json +1 -1
- package/src/schemas/creative.ts +1 -1
- package/src/schemas/investor.ts +65 -63
- package/src/schemas/post.ts +1 -1
- package/src/types/index.ts +0 -1
- package/src/types/investor.ts +0 -48
|
@@ -65,7 +65,7 @@ export declare const CreateCreativeProfileInputSchema: z.ZodObject<{
|
|
|
65
65
|
readonly YEAR_3_5: "3-5 years";
|
|
66
66
|
readonly YEAR_5_PLUS: "5+ years";
|
|
67
67
|
}>;
|
|
68
|
-
role: z.
|
|
68
|
+
role: z.ZodString;
|
|
69
69
|
location: z.ZodString;
|
|
70
70
|
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
71
71
|
}, z.core.$strip>;
|
package/dist/schemas/creative.js
CHANGED
|
@@ -96,7 +96,7 @@ exports.CreateCreativeProfileInputSchema = zod_openapi_1.z
|
|
|
96
96
|
.enum(constants_1.EXPERIENCE_LEVELS)
|
|
97
97
|
.describe("Overall experience range of the creative.")
|
|
98
98
|
.openapi({ example: constants_1.EXPERIENCE_LEVELS.YEAR_1_3 }),
|
|
99
|
-
role: zod_openapi_1.z.string().
|
|
99
|
+
role: zod_openapi_1.z.string().openapi({ example: "Designer" }),
|
|
100
100
|
location: zod_openapi_1.z
|
|
101
101
|
.string()
|
|
102
102
|
.max(100)
|
|
@@ -48,6 +48,7 @@ export declare const MinimalInvestorEntitySchema: z.ZodObject<{
|
|
|
48
48
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
49
49
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
50
50
|
}, z.core.$strip>;
|
|
51
|
+
export type MinimalInvestorEntity = z.infer<typeof MinimalInvestorEntitySchema>;
|
|
51
52
|
export declare const InvestorEntitySchema: z.ZodObject<{
|
|
52
53
|
id: z.ZodCUID2;
|
|
53
54
|
userId: z.ZodCUID2;
|
|
@@ -114,6 +115,7 @@ export declare const InvestorEntitySchema: z.ZodObject<{
|
|
|
114
115
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
115
116
|
version: z.ZodInt;
|
|
116
117
|
}, z.core.$strip>;
|
|
118
|
+
export type InvestorEntity = z.infer<typeof InvestorEntitySchema>;
|
|
117
119
|
export declare const InvestorWithUserEntitySchema: z.ZodObject<{
|
|
118
120
|
id: z.ZodCUID2;
|
|
119
121
|
userId: z.ZodCUID2;
|
|
@@ -176,16 +178,18 @@ export declare const InvestorWithUserEntitySchema: z.ZodObject<{
|
|
|
176
178
|
}>;
|
|
177
179
|
}, z.core.$strip>;
|
|
178
180
|
}, z.core.$strip>;
|
|
181
|
+
export type InvestorWithUserEntity = z.infer<typeof InvestorWithUserEntitySchema>;
|
|
179
182
|
export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
|
|
180
183
|
websiteURL: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.ZodURL, z.ZodLiteral<"">]>>>;
|
|
181
|
-
experienceLevel: z.
|
|
184
|
+
experienceLevel: z.ZodEnum<{
|
|
182
185
|
"0-1 year": "0-1 year";
|
|
183
186
|
"1-3 years": "1-3 years";
|
|
184
187
|
"3-5 years": "3-5 years";
|
|
185
188
|
"5+ years": "5+ years";
|
|
186
|
-
}
|
|
189
|
+
}>;
|
|
187
190
|
location: z.ZodString;
|
|
188
191
|
}, z.core.$strip>;
|
|
192
|
+
export type CreateInvestorInput = z.infer<typeof CreateInvestorProfileInputSchema>;
|
|
189
193
|
export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
|
|
190
194
|
bio: z.ZodOptional<z.ZodString>;
|
|
191
195
|
websiteURL: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.ZodURL, z.ZodLiteral<"">]>>>;
|
|
@@ -248,6 +252,7 @@ export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
|
|
|
248
252
|
location: z.ZodOptional<z.ZodString>;
|
|
249
253
|
version: z.ZodInt;
|
|
250
254
|
}, z.core.$strip>;
|
|
255
|
+
export type UpdateInvestorInput = z.infer<typeof UpdateInvestorProfileInputSchema>;
|
|
251
256
|
export declare const ListInvestorsInputSchema: z.ZodObject<{
|
|
252
257
|
query: z.ZodOptional<z.ZodString>;
|
|
253
258
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -262,20 +267,24 @@ export declare const ListInvestorsInputSchema: z.ZodObject<{
|
|
|
262
267
|
page: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
263
268
|
perPage: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
264
269
|
}, z.core.$strip>;
|
|
270
|
+
export type ListInvestorsInput = z.infer<typeof ListInvestorsInputSchema>;
|
|
265
271
|
export declare const SearchInvestorInputSchema: z.ZodObject<{
|
|
266
272
|
string: z.ZodString;
|
|
267
273
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
268
274
|
cursor: z.ZodOptional<z.ZodString>;
|
|
269
275
|
}, z.core.$strip>;
|
|
276
|
+
export type SearchInvestorInput = z.infer<typeof SearchInvestorInputSchema>;
|
|
270
277
|
export declare const GetInvestorParamsSchema: z.ZodObject<{
|
|
271
278
|
value: z.ZodCUID2;
|
|
272
279
|
}, z.core.$strip>;
|
|
280
|
+
export type GetInvestorParams = z.infer<typeof GetInvestorParamsSchema>;
|
|
273
281
|
export declare const GetInvestorQuerySchema: z.ZodObject<{
|
|
274
282
|
by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
275
283
|
id: "id";
|
|
276
284
|
userId: "userId";
|
|
277
285
|
}>>>;
|
|
278
286
|
}, z.core.$strip>;
|
|
287
|
+
export type GetInvestorQuery = z.infer<typeof GetInvestorQuerySchema>;
|
|
279
288
|
export declare const CreateInvestorOutputSchema: z.ZodObject<{
|
|
280
289
|
id: z.ZodCUID2;
|
|
281
290
|
userId: z.ZodCUID2;
|
|
@@ -342,6 +351,7 @@ export declare const CreateInvestorOutputSchema: z.ZodObject<{
|
|
|
342
351
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
343
352
|
version: z.ZodInt;
|
|
344
353
|
}, z.core.$strip>;
|
|
354
|
+
export type CreateInvestorOutput = z.infer<typeof CreateInvestorOutputSchema>;
|
|
345
355
|
export declare const GetInvestorOutputSchema: z.ZodObject<{
|
|
346
356
|
id: z.ZodCUID2;
|
|
347
357
|
userId: z.ZodCUID2;
|
|
@@ -408,6 +418,7 @@ export declare const GetInvestorOutputSchema: z.ZodObject<{
|
|
|
408
418
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
409
419
|
version: z.ZodInt;
|
|
410
420
|
}, z.core.$strip>;
|
|
421
|
+
export type GetInvestorOutput = z.infer<typeof GetInvestorOutputSchema>;
|
|
411
422
|
export declare const UpdateInvestorOutputSchema: z.ZodObject<{
|
|
412
423
|
id: z.ZodCUID2;
|
|
413
424
|
userId: z.ZodCUID2;
|
|
@@ -474,6 +485,7 @@ export declare const UpdateInvestorOutputSchema: z.ZodObject<{
|
|
|
474
485
|
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
475
486
|
version: z.ZodInt;
|
|
476
487
|
}, z.core.$strip>;
|
|
488
|
+
export type UpdateInvestorOutput = z.infer<typeof UpdateInvestorOutputSchema>;
|
|
477
489
|
export declare const SearchInvestorOutputSchema: z.ZodObject<{
|
|
478
490
|
investors: z.ZodArray<z.ZodObject<{
|
|
479
491
|
id: z.ZodCUID2;
|
|
@@ -539,3 +551,4 @@ export declare const SearchInvestorOutputSchema: z.ZodObject<{
|
|
|
539
551
|
}, z.core.$strip>>;
|
|
540
552
|
nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
541
553
|
}, z.core.$strip>;
|
|
554
|
+
export type SearchInvestorOutput = z.infer<typeof SearchInvestorOutputSchema>;
|
package/dist/schemas/investor.js
CHANGED
|
@@ -5,6 +5,27 @@ const zod_openapi_1 = require("@hono/zod-openapi");
|
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
const user_1 = require("./user");
|
|
8
|
+
const WebsiteUrlInputSchema = zod_openapi_1.z
|
|
9
|
+
.string()
|
|
10
|
+
.transform((val) => {
|
|
11
|
+
if (!val)
|
|
12
|
+
return val;
|
|
13
|
+
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
14
|
+
return val;
|
|
15
|
+
}
|
|
16
|
+
return `https://${val}`;
|
|
17
|
+
})
|
|
18
|
+
.pipe(zod_openapi_1.z.url("Invalid URL").or(zod_openapi_1.z.literal("")))
|
|
19
|
+
.optional();
|
|
20
|
+
const InvestorLinkSchema = zod_openapi_1.z.object({
|
|
21
|
+
url: zod_openapi_1.z.union([zod_openapi_1.z.url({ message: "Please enter a valid URL" }), zod_openapi_1.z.literal("")]),
|
|
22
|
+
type: zod_openapi_1.z.enum(constants_1.LINK_TYPES),
|
|
23
|
+
});
|
|
24
|
+
const InvestorAchievementSchema = zod_openapi_1.z.object({
|
|
25
|
+
title: zod_openapi_1.z.string(),
|
|
26
|
+
link: zod_openapi_1.z.string().optional(),
|
|
27
|
+
year: zod_openapi_1.z.coerce.number().int().optional(),
|
|
28
|
+
});
|
|
8
29
|
exports.MinimalInvestorEntitySchema = zod_openapi_1.z.object({
|
|
9
30
|
id: zod_openapi_1.z.cuid2().openapi({ example: "inv_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
10
31
|
userId: zod_openapi_1.z.cuid2().openapi({ example: "user_owner_123" }),
|
|
@@ -79,24 +100,8 @@ exports.InvestorEntitySchema = zod_openapi_1.z
|
|
|
79
100
|
.url()
|
|
80
101
|
.optional()
|
|
81
102
|
.openapi({ example: "https://investorpartners.com" }),
|
|
82
|
-
links: zod_openapi_1.z
|
|
83
|
-
|
|
84
|
-
url: zod_openapi_1.z.union([
|
|
85
|
-
zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
|
|
86
|
-
zod_openapi_1.z.literal(""),
|
|
87
|
-
]),
|
|
88
|
-
type: zod_openapi_1.z.enum(constants_1.LINK_TYPES),
|
|
89
|
-
})
|
|
90
|
-
.array()
|
|
91
|
-
.optional(),
|
|
92
|
-
achievements: zod_openapi_1.z
|
|
93
|
-
.object({
|
|
94
|
-
title: zod_openapi_1.z.string(),
|
|
95
|
-
link: zod_openapi_1.z.string().optional(),
|
|
96
|
-
year: zod_openapi_1.z.coerce.number().int().optional(),
|
|
97
|
-
})
|
|
98
|
-
.array()
|
|
99
|
-
.optional(),
|
|
103
|
+
links: zod_openapi_1.z.array(InvestorLinkSchema).optional(),
|
|
104
|
+
achievements: zod_openapi_1.z.array(InvestorAchievementSchema).optional(),
|
|
100
105
|
disciplines: zod_openapi_1.z
|
|
101
106
|
.array(zod_openapi_1.z.string())
|
|
102
107
|
.optional()
|
|
@@ -117,21 +122,9 @@ exports.InvestorWithUserEntitySchema = exports.MinimalInvestorEntitySchema.exten
|
|
|
117
122
|
});
|
|
118
123
|
exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
|
|
119
124
|
.object({
|
|
120
|
-
websiteURL:
|
|
121
|
-
.string()
|
|
122
|
-
.transform((val) => {
|
|
123
|
-
if (!val)
|
|
124
|
-
return val;
|
|
125
|
-
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
126
|
-
return val;
|
|
127
|
-
}
|
|
128
|
-
return `https://${val}`;
|
|
129
|
-
})
|
|
130
|
-
.pipe(zod_openapi_1.z.url("Invalid URL").or(zod_openapi_1.z.literal("")))
|
|
131
|
-
.optional(),
|
|
125
|
+
websiteURL: WebsiteUrlInputSchema,
|
|
132
126
|
experienceLevel: zod_openapi_1.z
|
|
133
127
|
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
134
|
-
.default(constants_1.EXPERIENCE_LEVELS.YEAR_0_1)
|
|
135
128
|
.openapi({
|
|
136
129
|
example: "0-1 year",
|
|
137
130
|
}),
|
|
@@ -147,18 +140,7 @@ exports.UpdateInvestorProfileInputSchema = zod_openapi_1.z
|
|
|
147
140
|
bio: zod_openapi_1.z.string().max(600).optional().openapi({
|
|
148
141
|
example: "Seasoned venture capitalist with a focus on healthtech.",
|
|
149
142
|
}),
|
|
150
|
-
websiteURL:
|
|
151
|
-
.string()
|
|
152
|
-
.transform((val) => {
|
|
153
|
-
if (!val)
|
|
154
|
-
return val;
|
|
155
|
-
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
156
|
-
return val;
|
|
157
|
-
}
|
|
158
|
-
return `https://${val}`;
|
|
159
|
-
})
|
|
160
|
-
.pipe(zod_openapi_1.z.url("Invalid URL").or(zod_openapi_1.z.literal("")))
|
|
161
|
-
.optional(),
|
|
143
|
+
websiteURL: WebsiteUrlInputSchema,
|
|
162
144
|
experienceLevel: zod_openapi_1.z
|
|
163
145
|
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
164
146
|
.optional()
|
|
@@ -190,24 +172,8 @@ exports.UpdateInvestorProfileInputSchema = zod_openapi_1.z
|
|
|
190
172
|
.openapi({
|
|
191
173
|
example: "GLOBAL",
|
|
192
174
|
}),
|
|
193
|
-
links: zod_openapi_1.z
|
|
194
|
-
|
|
195
|
-
url: zod_openapi_1.z.union([
|
|
196
|
-
zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
|
|
197
|
-
zod_openapi_1.z.literal(""),
|
|
198
|
-
]),
|
|
199
|
-
type: zod_openapi_1.z.enum(constants_1.LINK_TYPES),
|
|
200
|
-
})
|
|
201
|
-
.array()
|
|
202
|
-
.optional(),
|
|
203
|
-
achievements: zod_openapi_1.z
|
|
204
|
-
.object({
|
|
205
|
-
title: zod_openapi_1.z.string(),
|
|
206
|
-
link: zod_openapi_1.z.string().optional(),
|
|
207
|
-
year: zod_openapi_1.z.coerce.number().int().optional(),
|
|
208
|
-
})
|
|
209
|
-
.array()
|
|
210
|
-
.optional(),
|
|
175
|
+
links: zod_openapi_1.z.array(InvestorLinkSchema).optional(),
|
|
176
|
+
achievements: zod_openapi_1.z.array(InvestorAchievementSchema).optional(),
|
|
211
177
|
location: zod_openapi_1.z.string().optional().openapi({
|
|
212
178
|
example: "UK",
|
|
213
179
|
}),
|
package/dist/schemas/post.d.ts
CHANGED
|
@@ -288,7 +288,7 @@ export declare const CreatePostInputSchema: z.ZodObject<{
|
|
|
288
288
|
url: z.ZodURL;
|
|
289
289
|
title: z.ZodOptional<z.ZodString>;
|
|
290
290
|
description: z.ZodOptional<z.ZodString>;
|
|
291
|
-
image: z.ZodOptional<z.
|
|
291
|
+
image: z.ZodOptional<z.ZodString>;
|
|
292
292
|
}, z.core.$strip>>;
|
|
293
293
|
}, z.core.$strip>;
|
|
294
294
|
export type CreatePostInput = z.infer<typeof CreatePostInputSchema>;
|
package/dist/schemas/post.js
CHANGED
|
@@ -168,7 +168,7 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
|
|
|
168
168
|
.optional()
|
|
169
169
|
.openapi({ example: "This is an example link" }),
|
|
170
170
|
image: zod_openapi_1.z
|
|
171
|
-
.
|
|
171
|
+
.string({ message: "" })
|
|
172
172
|
.optional()
|
|
173
173
|
.openapi({ example: "https://example.com/preview.jpg" }),
|
|
174
174
|
})
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -19,7 +19,6 @@ __exportStar(require("./bookmark"), exports);
|
|
|
19
19
|
__exportStar(require("./like"), exports);
|
|
20
20
|
__exportStar(require("./common"), exports);
|
|
21
21
|
__exportStar(require("./discipline"), exports);
|
|
22
|
-
__exportStar(require("./investor"), exports);
|
|
23
22
|
__exportStar(require("./project"), exports);
|
|
24
23
|
__exportStar(require("./user"), exports);
|
|
25
24
|
__exportStar(require("./comment"), exports);
|
package/package.json
CHANGED
package/src/schemas/creative.ts
CHANGED
|
@@ -111,7 +111,7 @@ export const CreateCreativeProfileInputSchema = z
|
|
|
111
111
|
.enum(EXPERIENCE_LEVELS)
|
|
112
112
|
.describe("Overall experience range of the creative.")
|
|
113
113
|
.openapi({ example: EXPERIENCE_LEVELS.YEAR_1_3 }),
|
|
114
|
-
role: z.string().
|
|
114
|
+
role: z.string().openapi({ example: "Designer" }),
|
|
115
115
|
location: z
|
|
116
116
|
.string()
|
|
117
117
|
.max(100)
|
package/src/schemas/investor.ts
CHANGED
|
@@ -1,18 +1,41 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
import {
|
|
3
3
|
EXPERIENCE_LEVELS,
|
|
4
|
-
ExperienceLevel,
|
|
4
|
+
type ExperienceLevel,
|
|
5
5
|
GEOGRAPHIC_FOCUS,
|
|
6
|
-
GeographicFocus,
|
|
6
|
+
type GeographicFocus,
|
|
7
7
|
INVESTMENT_SIZES,
|
|
8
|
-
InvestmentSize,
|
|
8
|
+
type InvestmentSize,
|
|
9
9
|
INVESTOR_TYPES,
|
|
10
|
-
InvestorType,
|
|
10
|
+
type InvestorType,
|
|
11
11
|
LINK_TYPES,
|
|
12
12
|
} from "../constants";
|
|
13
13
|
import { CuidSchema, ProfileIdentifierSchema } from "./common";
|
|
14
14
|
import { MinimalUserSchema } from "./user";
|
|
15
15
|
|
|
16
|
+
const WebsiteUrlInputSchema = z
|
|
17
|
+
.string()
|
|
18
|
+
.transform((val) => {
|
|
19
|
+
if (!val) return val;
|
|
20
|
+
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
21
|
+
return val;
|
|
22
|
+
}
|
|
23
|
+
return `https://${val}`;
|
|
24
|
+
})
|
|
25
|
+
.pipe(z.url("Invalid URL").or(z.literal("")))
|
|
26
|
+
.optional();
|
|
27
|
+
|
|
28
|
+
const InvestorLinkSchema = z.object({
|
|
29
|
+
url: z.union([z.url({ message: "Please enter a valid URL" }), z.literal("")]),
|
|
30
|
+
type: z.enum(LINK_TYPES),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const InvestorAchievementSchema = z.object({
|
|
34
|
+
title: z.string(),
|
|
35
|
+
link: z.string().optional(),
|
|
36
|
+
year: z.coerce.number().int().optional(),
|
|
37
|
+
});
|
|
38
|
+
|
|
16
39
|
export const MinimalInvestorEntitySchema = z.object({
|
|
17
40
|
id: z.cuid2().openapi({ example: "inv_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
18
41
|
userId: z.cuid2().openapi({ example: "user_owner_123" }),
|
|
@@ -71,6 +94,8 @@ export const MinimalInvestorEntitySchema = z.object({
|
|
|
71
94
|
.openapi({ example: "2025-10-13T09:00:00.000Z" }),
|
|
72
95
|
});
|
|
73
96
|
|
|
97
|
+
export type MinimalInvestorEntity = z.infer<typeof MinimalInvestorEntitySchema>;
|
|
98
|
+
|
|
74
99
|
export const InvestorEntitySchema = z
|
|
75
100
|
.object({
|
|
76
101
|
id: z.cuid2().openapi({ example: "inv_cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -115,24 +140,8 @@ export const InvestorEntitySchema = z
|
|
|
115
140
|
.url()
|
|
116
141
|
.optional()
|
|
117
142
|
.openapi({ example: "https://investorpartners.com" }),
|
|
118
|
-
links: z
|
|
119
|
-
|
|
120
|
-
url: z.union([
|
|
121
|
-
z.url({ message: "Please enter a valid URL" }),
|
|
122
|
-
z.literal(""),
|
|
123
|
-
]),
|
|
124
|
-
type: z.enum(LINK_TYPES),
|
|
125
|
-
})
|
|
126
|
-
.array()
|
|
127
|
-
.optional(),
|
|
128
|
-
achievements: z
|
|
129
|
-
.object({
|
|
130
|
-
title: z.string(),
|
|
131
|
-
link: z.string().optional(),
|
|
132
|
-
year: z.coerce.number().int().optional(),
|
|
133
|
-
})
|
|
134
|
-
.array()
|
|
135
|
-
.optional(),
|
|
143
|
+
links: z.array(InvestorLinkSchema).optional(),
|
|
144
|
+
achievements: z.array(InvestorAchievementSchema).optional(),
|
|
136
145
|
disciplines: z
|
|
137
146
|
.array(z.string())
|
|
138
147
|
.optional()
|
|
@@ -149,23 +158,19 @@ export const InvestorEntitySchema = z
|
|
|
149
158
|
})
|
|
150
159
|
.openapi("InvestorEntity");
|
|
151
160
|
|
|
161
|
+
export type InvestorEntity = z.infer<typeof InvestorEntitySchema>;
|
|
162
|
+
|
|
152
163
|
export const InvestorWithUserEntitySchema = MinimalInvestorEntitySchema.extend({
|
|
153
164
|
user: MinimalUserSchema,
|
|
154
165
|
});
|
|
155
166
|
|
|
167
|
+
export type InvestorWithUserEntity = z.infer<
|
|
168
|
+
typeof InvestorWithUserEntitySchema
|
|
169
|
+
>;
|
|
170
|
+
|
|
156
171
|
export const CreateInvestorProfileInputSchema = z
|
|
157
172
|
.object({
|
|
158
|
-
websiteURL:
|
|
159
|
-
.string()
|
|
160
|
-
.transform((val) => {
|
|
161
|
-
if (!val) return val;
|
|
162
|
-
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
163
|
-
return val;
|
|
164
|
-
}
|
|
165
|
-
return `https://${val}`;
|
|
166
|
-
})
|
|
167
|
-
.pipe(z.url("Invalid URL").or(z.literal("")))
|
|
168
|
-
.optional(),
|
|
173
|
+
websiteURL: WebsiteUrlInputSchema,
|
|
169
174
|
experienceLevel: z
|
|
170
175
|
.enum(
|
|
171
176
|
Object.values(EXPERIENCE_LEVELS) as [
|
|
@@ -173,7 +178,6 @@ export const CreateInvestorProfileInputSchema = z
|
|
|
173
178
|
...ExperienceLevel[],
|
|
174
179
|
],
|
|
175
180
|
)
|
|
176
|
-
.default(EXPERIENCE_LEVELS.YEAR_0_1)
|
|
177
181
|
.openapi({
|
|
178
182
|
example: "0-1 year",
|
|
179
183
|
}),
|
|
@@ -185,22 +189,16 @@ export const CreateInvestorProfileInputSchema = z
|
|
|
185
189
|
title: "Create Investor Profile",
|
|
186
190
|
});
|
|
187
191
|
|
|
192
|
+
export type CreateInvestorInput = z.infer<
|
|
193
|
+
typeof CreateInvestorProfileInputSchema
|
|
194
|
+
>;
|
|
195
|
+
|
|
188
196
|
export const UpdateInvestorProfileInputSchema = z
|
|
189
197
|
.object({
|
|
190
198
|
bio: z.string().max(600).optional().openapi({
|
|
191
199
|
example: "Seasoned venture capitalist with a focus on healthtech.",
|
|
192
200
|
}),
|
|
193
|
-
websiteURL:
|
|
194
|
-
.string()
|
|
195
|
-
.transform((val) => {
|
|
196
|
-
if (!val) return val;
|
|
197
|
-
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
198
|
-
return val;
|
|
199
|
-
}
|
|
200
|
-
return `https://${val}`;
|
|
201
|
-
})
|
|
202
|
-
.pipe(z.url("Invalid URL").or(z.literal("")))
|
|
203
|
-
.optional(),
|
|
201
|
+
websiteURL: WebsiteUrlInputSchema,
|
|
204
202
|
experienceLevel: z
|
|
205
203
|
.enum(
|
|
206
204
|
Object.values(EXPERIENCE_LEVELS) as [
|
|
@@ -247,24 +245,8 @@ export const UpdateInvestorProfileInputSchema = z
|
|
|
247
245
|
.openapi({
|
|
248
246
|
example: "GLOBAL",
|
|
249
247
|
}),
|
|
250
|
-
links: z
|
|
251
|
-
|
|
252
|
-
url: z.union([
|
|
253
|
-
z.url({ message: "Please enter a valid URL" }),
|
|
254
|
-
z.literal(""),
|
|
255
|
-
]),
|
|
256
|
-
type: z.enum(LINK_TYPES),
|
|
257
|
-
})
|
|
258
|
-
.array()
|
|
259
|
-
.optional(),
|
|
260
|
-
achievements: z
|
|
261
|
-
.object({
|
|
262
|
-
title: z.string(),
|
|
263
|
-
link: z.string().optional(),
|
|
264
|
-
year: z.coerce.number().int().optional(),
|
|
265
|
-
})
|
|
266
|
-
.array()
|
|
267
|
-
.optional(),
|
|
248
|
+
links: z.array(InvestorLinkSchema).optional(),
|
|
249
|
+
achievements: z.array(InvestorAchievementSchema).optional(),
|
|
268
250
|
location: z.string().optional().openapi({
|
|
269
251
|
example: "UK",
|
|
270
252
|
}),
|
|
@@ -274,6 +256,10 @@ export const UpdateInvestorProfileInputSchema = z
|
|
|
274
256
|
title: "Update Investor Profile",
|
|
275
257
|
});
|
|
276
258
|
|
|
259
|
+
export type UpdateInvestorInput = z.infer<
|
|
260
|
+
typeof UpdateInvestorProfileInputSchema
|
|
261
|
+
>;
|
|
262
|
+
|
|
277
263
|
export const ListInvestorsInputSchema = z
|
|
278
264
|
.object({
|
|
279
265
|
query: z.string().optional().openapi({ example: "creative tech investor" }),
|
|
@@ -311,6 +297,8 @@ export const ListInvestorsInputSchema = z
|
|
|
311
297
|
})
|
|
312
298
|
.openapi("ListInvestorsInput");
|
|
313
299
|
|
|
300
|
+
export type ListInvestorsInput = z.infer<typeof ListInvestorsInputSchema>;
|
|
301
|
+
|
|
314
302
|
export const SearchInvestorInputSchema = z.object({
|
|
315
303
|
string: z
|
|
316
304
|
.string()
|
|
@@ -325,19 +313,33 @@ export const SearchInvestorInputSchema = z.object({
|
|
|
325
313
|
cursor: z.string().optional(),
|
|
326
314
|
});
|
|
327
315
|
|
|
316
|
+
export type SearchInvestorInput = z.infer<typeof SearchInvestorInputSchema>;
|
|
317
|
+
|
|
328
318
|
export const GetInvestorParamsSchema = z.object({
|
|
329
319
|
value: CuidSchema,
|
|
330
320
|
});
|
|
331
321
|
|
|
322
|
+
export type GetInvestorParams = z.infer<typeof GetInvestorParamsSchema>;
|
|
323
|
+
|
|
332
324
|
export const GetInvestorQuerySchema = ProfileIdentifierSchema;
|
|
333
325
|
|
|
326
|
+
export type GetInvestorQuery = z.infer<typeof GetInvestorQuerySchema>;
|
|
327
|
+
|
|
334
328
|
export const CreateInvestorOutputSchema = InvestorEntitySchema;
|
|
335
329
|
|
|
330
|
+
export type CreateInvestorOutput = z.infer<typeof CreateInvestorOutputSchema>;
|
|
331
|
+
|
|
336
332
|
export const GetInvestorOutputSchema = InvestorEntitySchema;
|
|
337
333
|
|
|
334
|
+
export type GetInvestorOutput = z.infer<typeof GetInvestorOutputSchema>;
|
|
335
|
+
|
|
338
336
|
export const UpdateInvestorOutputSchema = InvestorEntitySchema;
|
|
339
337
|
|
|
338
|
+
export type UpdateInvestorOutput = z.infer<typeof UpdateInvestorOutputSchema>;
|
|
339
|
+
|
|
340
340
|
export const SearchInvestorOutputSchema = z.object({
|
|
341
341
|
investors: z.array(InvestorWithUserEntitySchema),
|
|
342
342
|
nextCursor: z.string().optional().nullable(),
|
|
343
343
|
});
|
|
344
|
+
|
|
345
|
+
export type SearchInvestorOutput = z.infer<typeof SearchInvestorOutputSchema>;
|
package/src/schemas/post.ts
CHANGED
|
@@ -185,7 +185,7 @@ export const CreatePostInputSchema = z.object({
|
|
|
185
185
|
.optional()
|
|
186
186
|
.openapi({ example: "This is an example link" }),
|
|
187
187
|
image: z
|
|
188
|
-
.
|
|
188
|
+
.string({ message: "" })
|
|
189
189
|
.optional()
|
|
190
190
|
.openapi({ example: "https://example.com/preview.jpg" }),
|
|
191
191
|
})
|
package/src/types/index.ts
CHANGED
package/src/types/investor.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import {
|
|
3
|
-
CreateInvestorOutputSchema,
|
|
4
|
-
CreateInvestorProfileInputSchema,
|
|
5
|
-
GetInvestorOutputSchema,
|
|
6
|
-
GetInvestorParamsSchema,
|
|
7
|
-
GetInvestorQuerySchema,
|
|
8
|
-
InvestorEntitySchema,
|
|
9
|
-
InvestorWithUserEntitySchema,
|
|
10
|
-
ListInvestorsInputSchema,
|
|
11
|
-
MinimalInvestorEntitySchema,
|
|
12
|
-
SearchInvestorInputSchema,
|
|
13
|
-
SearchInvestorOutputSchema,
|
|
14
|
-
UpdateInvestorOutputSchema,
|
|
15
|
-
UpdateInvestorProfileInputSchema,
|
|
16
|
-
} from "../schemas/investor";
|
|
17
|
-
|
|
18
|
-
export type InvestorEntity = z.infer<typeof InvestorEntitySchema>;
|
|
19
|
-
|
|
20
|
-
export type MinimalInvestorEntity = z.infer<typeof MinimalInvestorEntitySchema>;
|
|
21
|
-
|
|
22
|
-
export type InvestorWithUserEntity = z.infer<
|
|
23
|
-
typeof InvestorWithUserEntitySchema
|
|
24
|
-
>;
|
|
25
|
-
|
|
26
|
-
export type ListInvestorsInput = z.infer<typeof ListInvestorsInputSchema>;
|
|
27
|
-
|
|
28
|
-
export type CreateInvestorInput = z.infer<
|
|
29
|
-
typeof CreateInvestorProfileInputSchema
|
|
30
|
-
>;
|
|
31
|
-
|
|
32
|
-
export type UpdateInvestorInput = z.infer<
|
|
33
|
-
typeof UpdateInvestorProfileInputSchema
|
|
34
|
-
>;
|
|
35
|
-
|
|
36
|
-
export type SearchInvestorInput = z.infer<typeof SearchInvestorInputSchema>;
|
|
37
|
-
|
|
38
|
-
export type GetInvestorParams = z.infer<typeof GetInvestorParamsSchema>;
|
|
39
|
-
|
|
40
|
-
export type GetInvestorQuery = z.infer<typeof GetInvestorQuerySchema>;
|
|
41
|
-
|
|
42
|
-
export type CreateInvestorOutput = z.infer<typeof CreateInvestorOutputSchema>;
|
|
43
|
-
|
|
44
|
-
export type GetInvestorOutput = z.infer<typeof GetInvestorOutputSchema>;
|
|
45
|
-
|
|
46
|
-
export type UpdateInvestorOutput = z.infer<typeof UpdateInvestorOutputSchema>;
|
|
47
|
-
|
|
48
|
-
export type SearchInvestorOutput = z.infer<typeof SearchInvestorOutputSchema>;
|