@zyacreatives/shared 2.2.40 → 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,7 +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
- 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<"">]>>>;
54
54
  experienceLevel: z.ZodDefault<z.ZodEnum<{
55
55
  "0-1 year": "0-1 year";
56
56
  "1-3 years": "1-3 years";
@@ -61,7 +61,7 @@ export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
61
61
  }, z.core.$strip>;
62
62
  export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
63
63
  bio: z.ZodOptional<z.ZodString>;
64
- 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<"">]>>>;
65
65
  experienceLevel: z.ZodOptional<z.ZodEnum<{
66
66
  "0-1 year": "0-1 year";
67
67
  "1-3 years": "1-3 years";
@@ -50,9 +50,19 @@ exports.InvestorEntitySchema = zod_openapi_1.z
50
50
  .openapi("InvestorEntity");
51
51
  exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
52
52
  .object({
53
- websiteURL: zod_openapi_1.z.url("Invalid url").optional().openapi({
54
- example: "https://www.investorportfolio.com",
55
- }),
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(),
56
66
  experienceLevel: zod_openapi_1.z
57
67
  .enum(Object.values(constants_1.EXPERIENCE_LEVELS))
58
68
  .default(constants_1.EXPERIENCE_LEVELS.YEAR_0_1)
@@ -71,9 +81,19 @@ exports.UpdateInvestorProfileInputSchema = zod_openapi_1.z
71
81
  bio: zod_openapi_1.z.string().max(600).optional().openapi({
72
82
  example: "Seasoned venture capitalist with a focus on healthtech.",
73
83
  }),
74
- websiteURL: zod_openapi_1.z.url("Invalid url").optional().openapi({
75
- example: "https://www.vcgroup.com",
76
- }),
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(),
77
97
  experienceLevel: zod_openapi_1.z
78
98
  .enum(Object.values(constants_1.EXPERIENCE_LEVELS))
79
99
  .optional()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.40",
3
+ "version": "2.2.41",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -73,9 +73,18 @@ export const InvestorEntitySchema = z
73
73
 
74
74
  export const CreateInvestorProfileInputSchema = z
75
75
  .object({
76
- websiteURL: z.url("Invalid url").optional().openapi({
77
- example: "https://www.investorportfolio.com",
78
- }),
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(),
79
88
  experienceLevel: z
80
89
  .enum(
81
90
  Object.values(EXPERIENCE_LEVELS) as [
@@ -100,9 +109,18 @@ export const UpdateInvestorProfileInputSchema = z
100
109
  bio: z.string().max(600).optional().openapi({
101
110
  example: "Seasoned venture capitalist with a focus on healthtech.",
102
111
  }),
103
- websiteURL: z.url("Invalid url").optional().openapi({
104
- example: "https://www.vcgroup.com",
105
- }),
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(),
106
124
  experienceLevel: z
107
125
  .enum(
108
126
  Object.values(EXPERIENCE_LEVELS) as [