@zyacreatives/shared 2.2.40 → 2.2.42

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.
@@ -44,13 +44,24 @@ export declare const InvestorEntitySchema: z.ZodObject<{
44
44
  "Social Impact Investor": "Social Impact Investor";
45
45
  }>>;
46
46
  websiteURL: z.ZodOptional<z.ZodURL>;
47
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
48
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
49
+ type: z.ZodEnum<{
50
+ readonly INSTAGRAM: "Instagram";
51
+ readonly LINKEDIN: "LinkedIn";
52
+ readonly TWITTER: "Twitter";
53
+ readonly YOUTUBE: "Youtube";
54
+ readonly PORTFOLIO: "Portfolio Website";
55
+ readonly GENERIC_WEBSITE: "Generic Website";
56
+ }>;
57
+ }, z.core.$strip>>>;
47
58
  disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
59
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
49
60
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
50
61
  version: z.ZodInt;
51
62
  }, z.core.$strip>;
52
63
  export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
53
- 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<"">]>>>;
54
65
  experienceLevel: z.ZodDefault<z.ZodEnum<{
55
66
  "0-1 year": "0-1 year";
56
67
  "1-3 years": "1-3 years";
@@ -61,7 +72,7 @@ export declare const CreateInvestorProfileInputSchema: z.ZodObject<{
61
72
  }, z.core.$strip>;
62
73
  export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
63
74
  bio: z.ZodOptional<z.ZodString>;
64
- websiteURL: z.ZodOptional<z.ZodURL>;
75
+ websiteURL: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.ZodURL, z.ZodLiteral<"">]>>>;
65
76
  experienceLevel: z.ZodOptional<z.ZodEnum<{
66
77
  "0-1 year": "0-1 year";
67
78
  "1-3 years": "1-3 years";
@@ -102,6 +113,17 @@ export declare const UpdateInvestorProfileInputSchema: z.ZodObject<{
102
113
  Global: "Global";
103
114
  Other: "Other";
104
115
  }>>;
116
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
117
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
118
+ type: z.ZodEnum<{
119
+ readonly INSTAGRAM: "Instagram";
120
+ readonly LINKEDIN: "LinkedIn";
121
+ readonly TWITTER: "Twitter";
122
+ readonly YOUTUBE: "Youtube";
123
+ readonly PORTFOLIO: "Portfolio Website";
124
+ readonly GENERIC_WEBSITE: "Generic Website";
125
+ }>;
126
+ }, z.core.$strip>>>;
105
127
  location: z.ZodOptional<z.ZodString>;
106
128
  version: z.ZodInt;
107
129
  }, z.core.$strip>;
@@ -173,6 +195,17 @@ export declare const CreateInvestorOutputSchema: z.ZodObject<{
173
195
  "Social Impact Investor": "Social Impact Investor";
174
196
  }>>;
175
197
  websiteURL: z.ZodOptional<z.ZodURL>;
198
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
199
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
200
+ type: z.ZodEnum<{
201
+ readonly INSTAGRAM: "Instagram";
202
+ readonly LINKEDIN: "LinkedIn";
203
+ readonly TWITTER: "Twitter";
204
+ readonly YOUTUBE: "Youtube";
205
+ readonly PORTFOLIO: "Portfolio Website";
206
+ readonly GENERIC_WEBSITE: "Generic Website";
207
+ }>;
208
+ }, z.core.$strip>>>;
176
209
  disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
177
210
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
178
211
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -223,6 +256,17 @@ export declare const GetInvestorOutputSchema: z.ZodObject<{
223
256
  "Social Impact Investor": "Social Impact Investor";
224
257
  }>>;
225
258
  websiteURL: z.ZodOptional<z.ZodURL>;
259
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
260
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
261
+ type: z.ZodEnum<{
262
+ readonly INSTAGRAM: "Instagram";
263
+ readonly LINKEDIN: "LinkedIn";
264
+ readonly TWITTER: "Twitter";
265
+ readonly YOUTUBE: "Youtube";
266
+ readonly PORTFOLIO: "Portfolio Website";
267
+ readonly GENERIC_WEBSITE: "Generic Website";
268
+ }>;
269
+ }, z.core.$strip>>>;
226
270
  disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
227
271
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
228
272
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -273,6 +317,17 @@ export declare const UpdateInvestorOutputSchema: z.ZodObject<{
273
317
  "Social Impact Investor": "Social Impact Investor";
274
318
  }>>;
275
319
  websiteURL: z.ZodOptional<z.ZodURL>;
320
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
321
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
322
+ type: z.ZodEnum<{
323
+ readonly INSTAGRAM: "Instagram";
324
+ readonly LINKEDIN: "LinkedIn";
325
+ readonly TWITTER: "Twitter";
326
+ readonly YOUTUBE: "Youtube";
327
+ readonly PORTFOLIO: "Portfolio Website";
328
+ readonly GENERIC_WEBSITE: "Generic Website";
329
+ }>;
330
+ }, z.core.$strip>>>;
276
331
  disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
277
332
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
278
333
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -33,6 +33,16 @@ exports.InvestorEntitySchema = zod_openapi_1.z
33
33
  .url()
34
34
  .optional()
35
35
  .openapi({ example: "https://investorpartners.com" }),
36
+ links: zod_openapi_1.z
37
+ .object({
38
+ url: zod_openapi_1.z.union([
39
+ zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
40
+ zod_openapi_1.z.literal(""),
41
+ ]),
42
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES),
43
+ })
44
+ .array()
45
+ .optional(),
36
46
  disciplines: zod_openapi_1.z
37
47
  .array(zod_openapi_1.z.string())
38
48
  .optional()
@@ -50,9 +60,19 @@ exports.InvestorEntitySchema = zod_openapi_1.z
50
60
  .openapi("InvestorEntity");
51
61
  exports.CreateInvestorProfileInputSchema = zod_openapi_1.z
52
62
  .object({
53
- websiteURL: zod_openapi_1.z.url("Invalid url").optional().openapi({
54
- example: "https://www.investorportfolio.com",
55
- }),
63
+ websiteURL: zod_openapi_1.z
64
+ .string()
65
+ .transform((val) => {
66
+ if (!val)
67
+ return val;
68
+ console.log({ val });
69
+ if (val.startsWith("http://") || val.startsWith("https://")) {
70
+ return val;
71
+ }
72
+ return `https://${val}`;
73
+ })
74
+ .pipe(zod_openapi_1.z.url("Invalid URL").or(zod_openapi_1.z.literal("")))
75
+ .optional(),
56
76
  experienceLevel: zod_openapi_1.z
57
77
  .enum(Object.values(constants_1.EXPERIENCE_LEVELS))
58
78
  .default(constants_1.EXPERIENCE_LEVELS.YEAR_0_1)
@@ -71,9 +91,19 @@ exports.UpdateInvestorProfileInputSchema = zod_openapi_1.z
71
91
  bio: zod_openapi_1.z.string().max(600).optional().openapi({
72
92
  example: "Seasoned venture capitalist with a focus on healthtech.",
73
93
  }),
74
- websiteURL: zod_openapi_1.z.url("Invalid url").optional().openapi({
75
- example: "https://www.vcgroup.com",
76
- }),
94
+ websiteURL: zod_openapi_1.z
95
+ .string()
96
+ .transform((val) => {
97
+ if (!val)
98
+ return val;
99
+ console.log({ val });
100
+ if (val.startsWith("http://") || val.startsWith("https://")) {
101
+ return val;
102
+ }
103
+ return `https://${val}`;
104
+ })
105
+ .pipe(zod_openapi_1.z.url("Invalid URL").or(zod_openapi_1.z.literal("")))
106
+ .optional(),
77
107
  experienceLevel: zod_openapi_1.z
78
108
  .enum(Object.values(constants_1.EXPERIENCE_LEVELS))
79
109
  .optional()
@@ -105,6 +135,16 @@ exports.UpdateInvestorProfileInputSchema = zod_openapi_1.z
105
135
  .openapi({
106
136
  example: "GLOBAL",
107
137
  }),
138
+ links: zod_openapi_1.z
139
+ .object({
140
+ url: zod_openapi_1.z.union([
141
+ zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
142
+ zod_openapi_1.z.literal(""),
143
+ ]),
144
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES),
145
+ })
146
+ .array()
147
+ .optional(),
108
148
  location: zod_openapi_1.z.string().optional().openapi({
109
149
  example: "UK",
110
150
  }),
@@ -201,6 +201,17 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
201
201
  "Social Impact Investor": "Social Impact Investor";
202
202
  }>>;
203
203
  websiteURL: z.ZodOptional<z.ZodURL>;
204
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
205
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
206
+ type: z.ZodEnum<{
207
+ readonly INSTAGRAM: "Instagram";
208
+ readonly LINKEDIN: "LinkedIn";
209
+ readonly TWITTER: "Twitter";
210
+ readonly YOUTUBE: "Youtube";
211
+ readonly PORTFOLIO: "Portfolio Website";
212
+ readonly GENERIC_WEBSITE: "Generic Website";
213
+ }>;
214
+ }, z.core.$strip>>>;
204
215
  disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
205
216
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
206
217
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
@@ -718,6 +729,17 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
718
729
  "Social Impact Investor": "Social Impact Investor";
719
730
  }>>;
720
731
  websiteURL: z.ZodOptional<z.ZodURL>;
732
+ links: z.ZodOptional<z.ZodArray<z.ZodObject<{
733
+ url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
734
+ type: z.ZodEnum<{
735
+ readonly INSTAGRAM: "Instagram";
736
+ readonly LINKEDIN: "LinkedIn";
737
+ readonly TWITTER: "Twitter";
738
+ readonly YOUTUBE: "Youtube";
739
+ readonly PORTFOLIO: "Portfolio Website";
740
+ readonly GENERIC_WEBSITE: "Generic Website";
741
+ }>;
742
+ }, z.core.$strip>>>;
721
743
  disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
722
744
  createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
723
745
  updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.40",
3
+ "version": "2.2.42",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,6 +8,7 @@ import {
8
8
  InvestmentSize,
9
9
  INVESTOR_TYPES,
10
10
  InvestorType,
11
+ LINK_TYPES,
11
12
  } from "../constants";
12
13
  import { CuidSchema, ProfileIdentifierSchema } from "./common";
13
14
 
@@ -55,6 +56,16 @@ export const InvestorEntitySchema = z
55
56
  .url()
56
57
  .optional()
57
58
  .openapi({ example: "https://investorpartners.com" }),
59
+ links: z
60
+ .object({
61
+ url: z.union([
62
+ z.url({ message: "Please enter a valid URL" }),
63
+ z.literal(""),
64
+ ]),
65
+ type: z.enum(LINK_TYPES),
66
+ })
67
+ .array()
68
+ .optional(),
58
69
  disciplines: z
59
70
  .array(z.string())
60
71
  .optional()
@@ -73,9 +84,18 @@ export const InvestorEntitySchema = z
73
84
 
74
85
  export const CreateInvestorProfileInputSchema = z
75
86
  .object({
76
- websiteURL: z.url("Invalid url").optional().openapi({
77
- example: "https://www.investorportfolio.com",
78
- }),
87
+ websiteURL: z
88
+ .string()
89
+ .transform((val) => {
90
+ if (!val) return val;
91
+ console.log({ val });
92
+ if (val.startsWith("http://") || val.startsWith("https://")) {
93
+ return val;
94
+ }
95
+ return `https://${val}`;
96
+ })
97
+ .pipe(z.url("Invalid URL").or(z.literal("")))
98
+ .optional(),
79
99
  experienceLevel: z
80
100
  .enum(
81
101
  Object.values(EXPERIENCE_LEVELS) as [
@@ -100,9 +120,18 @@ export const UpdateInvestorProfileInputSchema = z
100
120
  bio: z.string().max(600).optional().openapi({
101
121
  example: "Seasoned venture capitalist with a focus on healthtech.",
102
122
  }),
103
- websiteURL: z.url("Invalid url").optional().openapi({
104
- example: "https://www.vcgroup.com",
105
- }),
123
+ websiteURL: z
124
+ .string()
125
+ .transform((val) => {
126
+ if (!val) return val;
127
+ console.log({ val });
128
+ if (val.startsWith("http://") || val.startsWith("https://")) {
129
+ return val;
130
+ }
131
+ return `https://${val}`;
132
+ })
133
+ .pipe(z.url("Invalid URL").or(z.literal("")))
134
+ .optional(),
106
135
  experienceLevel: z
107
136
  .enum(
108
137
  Object.values(EXPERIENCE_LEVELS) as [
@@ -149,6 +178,16 @@ export const UpdateInvestorProfileInputSchema = z
149
178
  .openapi({
150
179
  example: "GLOBAL",
151
180
  }),
181
+ links: z
182
+ .object({
183
+ url: z.union([
184
+ z.url({ message: "Please enter a valid URL" }),
185
+ z.literal(""),
186
+ ]),
187
+ type: z.enum(LINK_TYPES),
188
+ })
189
+ .array()
190
+ .optional(),
152
191
  location: z.string().optional().openapi({
153
192
  example: "UK",
154
193
  }),