@zyacreatives/shared 2.2.39 → 2.2.41
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.
|
@@ -50,8 +50,7 @@ export declare const InvestorEntitySchema: z.ZodObject<{
|
|
|
50
50
|
version: z.ZodInt;
|
|
51
51
|
}, z.core.$strip>;
|
|
52
52
|
export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
|
|
53
|
-
|
|
54
|
-
websiteURL: z.ZodOptional<z.ZodURL>;
|
|
53
|
+
websiteURL: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.ZodURL, z.ZodLiteral<"">]>>>;
|
|
55
54
|
experienceLevel: z.ZodDefault<z.ZodEnum<{
|
|
56
55
|
"0-1 year": "0-1 year";
|
|
57
56
|
"1-3 years": "1-3 years";
|
|
@@ -62,7 +61,7 @@ export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
|
|
|
62
61
|
}, z.core.$strip>;
|
|
63
62
|
export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
|
|
64
63
|
bio: z.ZodOptional<z.ZodString>;
|
|
65
|
-
websiteURL: z.ZodOptional<z.ZodURL
|
|
64
|
+
websiteURL: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.ZodURL, z.ZodLiteral<"">]>>>;
|
|
66
65
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
67
66
|
"0-1 year": "0-1 year";
|
|
68
67
|
"1-3 years": "1-3 years";
|
package/dist/schemas/investor.js
CHANGED
|
@@ -50,12 +50,19 @@ exports.InvestorEntitySchema = zod_openapi_1.z
|
|
|
50
50
|
.openapi("InvestorEntity");
|
|
51
51
|
exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
|
|
52
52
|
.object({
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
websiteURL: zod_openapi_1.z
|
|
54
|
+
.string()
|
|
55
|
+
.transform((val) => {
|
|
56
|
+
if (!val)
|
|
57
|
+
return val;
|
|
58
|
+
console.log({ val });
|
|
59
|
+
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
60
|
+
return val;
|
|
61
|
+
}
|
|
62
|
+
return `https://${val}`;
|
|
63
|
+
})
|
|
64
|
+
.pipe(zod_openapi_1.z.url("Invalid URL").or(zod_openapi_1.z.literal("")))
|
|
65
|
+
.optional(),
|
|
59
66
|
experienceLevel: zod_openapi_1.z
|
|
60
67
|
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
61
68
|
.default(constants_1.EXPERIENCE_LEVELS.YEAR_0_1)
|
|
@@ -74,9 +81,19 @@ exports.UpdateInvestorProfileInputSchema = zod_openapi_1.z
|
|
|
74
81
|
bio: zod_openapi_1.z.string().max(600).optional().openapi({
|
|
75
82
|
example: "Seasoned venture capitalist with a focus on healthtech.",
|
|
76
83
|
}),
|
|
77
|
-
websiteURL: zod_openapi_1.z
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
websiteURL: zod_openapi_1.z
|
|
85
|
+
.string()
|
|
86
|
+
.transform((val) => {
|
|
87
|
+
if (!val)
|
|
88
|
+
return val;
|
|
89
|
+
console.log({ val });
|
|
90
|
+
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
91
|
+
return val;
|
|
92
|
+
}
|
|
93
|
+
return `https://${val}`;
|
|
94
|
+
})
|
|
95
|
+
.pipe(zod_openapi_1.z.url("Invalid URL").or(zod_openapi_1.z.literal("")))
|
|
96
|
+
.optional(),
|
|
80
97
|
experienceLevel: zod_openapi_1.z
|
|
81
98
|
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
82
99
|
.optional()
|
package/package.json
CHANGED
package/src/schemas/investor.ts
CHANGED
|
@@ -73,12 +73,18 @@ export const InvestorEntitySchema = z
|
|
|
73
73
|
|
|
74
74
|
export const CreateInvestorProfileInputSchema = z
|
|
75
75
|
.object({
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
websiteURL: z
|
|
77
|
+
.string()
|
|
78
|
+
.transform((val) => {
|
|
79
|
+
if (!val) return val;
|
|
80
|
+
console.log({ val });
|
|
81
|
+
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
82
|
+
return val;
|
|
83
|
+
}
|
|
84
|
+
return `https://${val}`;
|
|
85
|
+
})
|
|
86
|
+
.pipe(z.url("Invalid URL").or(z.literal("")))
|
|
87
|
+
.optional(),
|
|
82
88
|
experienceLevel: z
|
|
83
89
|
.enum(
|
|
84
90
|
Object.values(EXPERIENCE_LEVELS) as [
|
|
@@ -103,9 +109,18 @@ export const UpdateInvestorProfileInputSchema = z
|
|
|
103
109
|
bio: z.string().max(600).optional().openapi({
|
|
104
110
|
example: "Seasoned venture capitalist with a focus on healthtech.",
|
|
105
111
|
}),
|
|
106
|
-
websiteURL: z
|
|
107
|
-
|
|
108
|
-
|
|
112
|
+
websiteURL: z
|
|
113
|
+
.string()
|
|
114
|
+
.transform((val) => {
|
|
115
|
+
if (!val) return val;
|
|
116
|
+
console.log({ val });
|
|
117
|
+
if (val.startsWith("http://") || val.startsWith("https://")) {
|
|
118
|
+
return val;
|
|
119
|
+
}
|
|
120
|
+
return `https://${val}`;
|
|
121
|
+
})
|
|
122
|
+
.pipe(z.url("Invalid URL").or(z.literal("")))
|
|
123
|
+
.optional(),
|
|
109
124
|
experienceLevel: z
|
|
110
125
|
.enum(
|
|
111
126
|
Object.values(EXPERIENCE_LEVELS) as [
|