@zyacreatives/shared 2.5.37 → 2.5.39
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/brand.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const BrandEntitySchema: z.ZodObject<{
|
|
|
14
14
|
userId: z.ZodCUID2;
|
|
15
15
|
brandName: z.ZodString;
|
|
16
16
|
bio: z.ZodOptional<z.ZodString>;
|
|
17
|
+
location: z.ZodString;
|
|
17
18
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
19
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
19
20
|
url: z.ZodURL;
|
|
@@ -38,6 +39,7 @@ export declare const BrandEntitySchema: z.ZodObject<{
|
|
|
38
39
|
export type BrandEntity = z.infer<typeof BrandEntitySchema>;
|
|
39
40
|
export declare const CreateBrandProfileInputSchema: z.ZodObject<{
|
|
40
41
|
brandName: z.ZodString;
|
|
42
|
+
location: z.ZodString;
|
|
41
43
|
disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
42
44
|
}, z.core.$strip>;
|
|
43
45
|
export type CreateBrandProfileInput = z.infer<typeof CreateBrandProfileInputSchema>;
|
|
@@ -54,6 +56,7 @@ export declare const UpdateBrandProfileInputSchema: z.ZodObject<{
|
|
|
54
56
|
readonly GENERIC_WEBSITE: "Generic Website";
|
|
55
57
|
}>;
|
|
56
58
|
}, z.core.$strip>>>;
|
|
59
|
+
location: z.ZodString;
|
|
57
60
|
achievements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
58
61
|
title: z.ZodString;
|
|
59
62
|
link: z.ZodOptional<z.ZodURL>;
|
|
@@ -83,6 +86,7 @@ export declare const CreateBrandOutputSchema: z.ZodObject<{
|
|
|
83
86
|
userId: z.ZodCUID2;
|
|
84
87
|
brandName: z.ZodString;
|
|
85
88
|
bio: z.ZodOptional<z.ZodString>;
|
|
89
|
+
location: z.ZodString;
|
|
86
90
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
91
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
88
92
|
url: z.ZodURL;
|
|
@@ -110,6 +114,7 @@ export declare const GetBrandOutputSchema: z.ZodObject<{
|
|
|
110
114
|
userId: z.ZodCUID2;
|
|
111
115
|
brandName: z.ZodString;
|
|
112
116
|
bio: z.ZodOptional<z.ZodString>;
|
|
117
|
+
location: z.ZodString;
|
|
113
118
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
114
119
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
115
120
|
url: z.ZodURL;
|
|
@@ -137,6 +142,7 @@ export declare const UpdateBrandOutputSchema: z.ZodObject<{
|
|
|
137
142
|
userId: z.ZodCUID2;
|
|
138
143
|
brandName: z.ZodString;
|
|
139
144
|
bio: z.ZodOptional<z.ZodString>;
|
|
145
|
+
location: z.ZodString;
|
|
140
146
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
141
147
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
142
148
|
url: z.ZodURL;
|
package/dist/schemas/brand.js
CHANGED
|
@@ -30,6 +30,9 @@ exports.BrandEntitySchema = zod_openapi_1.z
|
|
|
30
30
|
bio: zod_openapi_1.z.string().optional().openapi({
|
|
31
31
|
example: "Leading software development firm focused on AI.",
|
|
32
32
|
}),
|
|
33
|
+
location: zod_openapi_1.z.string().openapi({
|
|
34
|
+
example: "UK",
|
|
35
|
+
}),
|
|
33
36
|
disciplines: zod_openapi_1.z
|
|
34
37
|
.array(zod_openapi_1.z.string())
|
|
35
38
|
.optional()
|
|
@@ -60,6 +63,9 @@ exports.CreateBrandProfileInputSchema = zod_openapi_1.z
|
|
|
60
63
|
.string()
|
|
61
64
|
.min(1, "Brand name is required")
|
|
62
65
|
.openapi({ example: "Acme Creative Studio" }),
|
|
66
|
+
location: zod_openapi_1.z.string().openapi({
|
|
67
|
+
example: "UK",
|
|
68
|
+
}),
|
|
63
69
|
disciplineSlugs: zod_openapi_1.z
|
|
64
70
|
.array(zod_openapi_1.z.string())
|
|
65
71
|
.min(1, "At least one discipline is required")
|
|
@@ -82,6 +88,9 @@ exports.UpdateBrandProfileInputSchema = zod_openapi_1.z
|
|
|
82
88
|
})
|
|
83
89
|
.array()
|
|
84
90
|
.optional(),
|
|
91
|
+
location: zod_openapi_1.z.string().openapi({
|
|
92
|
+
example: "UK",
|
|
93
|
+
}),
|
|
85
94
|
achievements: zod_openapi_1.z
|
|
86
95
|
.object({
|
|
87
96
|
title: zod_openapi_1.z.string(),
|
|
@@ -184,8 +184,8 @@ export declare const UpdateProjectInputSchema: z.ZodObject<{
|
|
|
184
184
|
title: z.ZodOptional<z.ZodString>;
|
|
185
185
|
description: z.ZodOptional<z.ZodString>;
|
|
186
186
|
overview: z.ZodOptional<z.ZodString>;
|
|
187
|
-
url: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.
|
|
188
|
-
imagePlaceholderUrl: z.ZodOptional<z.ZodURL>;
|
|
187
|
+
url: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.ZodURL, z.ZodLiteral<"">]>>>;
|
|
188
|
+
imagePlaceholderUrl: z.ZodUnion<[z.ZodOptional<z.ZodURL>, z.ZodLiteral<"">]>;
|
|
189
189
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
190
190
|
projectCreatorType: z.ZodOptional<z.ZodEnum<{
|
|
191
191
|
readonly CREATIVE: "CREATIVE";
|
|
@@ -193,7 +193,7 @@ export declare const UpdateProjectInputSchema: z.ZodObject<{
|
|
|
193
193
|
readonly INVESTOR: "INVESTOR";
|
|
194
194
|
readonly ADMIN: "ADMIN";
|
|
195
195
|
}>>;
|
|
196
|
-
clientId: z.ZodPipe<z.ZodPipe<z.ZodString
|
|
196
|
+
clientId: z.ZodPipe<z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>, z.ZodOptional<z.ZodCUID2>>;
|
|
197
197
|
clientType: z.ZodOptional<z.ZodEnum<{
|
|
198
198
|
readonly CREATIVE: "CREATIVE";
|
|
199
199
|
readonly BRAND: "BRAND";
|
|
@@ -236,7 +236,7 @@ export declare const UpdateProjectInputSchema: z.ZodObject<{
|
|
|
236
236
|
isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
|
|
237
237
|
startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
238
238
|
endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
239
|
-
version: z.ZodNumber
|
|
239
|
+
version: z.ZodDefault<z.ZodNumber>;
|
|
240
240
|
}, z.core.$strip>;
|
|
241
241
|
export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
|
|
242
242
|
export declare const CommentOnProjectInputSchema: z.ZodObject<{
|
package/dist/schemas/project.js
CHANGED
|
@@ -86,15 +86,16 @@ exports.UpdateProjectInputSchema = zod_openapi_1.z
|
|
|
86
86
|
return val;
|
|
87
87
|
return `https://${val}`;
|
|
88
88
|
})
|
|
89
|
-
.pipe(zod_openapi_1.z.
|
|
89
|
+
.pipe(zod_openapi_1.z.url("Check your link.").or(zod_openapi_1.z.literal("")))
|
|
90
90
|
.optional(),
|
|
91
|
-
imagePlaceholderUrl: zod_openapi_1.z.url().optional(),
|
|
91
|
+
imagePlaceholderUrl: zod_openapi_1.z.url().optional().or(zod_openapi_1.z.literal("")),
|
|
92
92
|
tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
|
|
93
93
|
projectCreatorType: zod_openapi_1.z.enum(constants_1.ROLES).optional(),
|
|
94
94
|
clientId: zod_openapi_1.z
|
|
95
95
|
.string()
|
|
96
|
-
.
|
|
97
|
-
.
|
|
96
|
+
.optional()
|
|
97
|
+
.transform((val) => (val === "" || val === undefined ? undefined : val))
|
|
98
|
+
.pipe(zod_openapi_1.z.cuid2().optional()),
|
|
98
99
|
clientType: zod_openapi_1.z.enum(constants_1.CLIENT_TYPES).optional(),
|
|
99
100
|
clientName: zod_openapi_1.z.string().optional(),
|
|
100
101
|
isFeatured: zod_openapi_1.z.boolean().optional(),
|
|
@@ -120,7 +121,7 @@ exports.UpdateProjectInputSchema = zod_openapi_1.z
|
|
|
120
121
|
isOpenToInvestment: zod_openapi_1.z.boolean().default(false),
|
|
121
122
|
startDate: zod_openapi_1.z.coerce.date().optional(),
|
|
122
123
|
endDate: zod_openapi_1.z.coerce.date().optional(),
|
|
123
|
-
version: zod_openapi_1.z.number().int(),
|
|
124
|
+
version: zod_openapi_1.z.number().int().default(1),
|
|
124
125
|
})
|
|
125
126
|
.superRefine(({ startDate, endDate }, ctx) => {
|
|
126
127
|
const today = new Date();
|
|
@@ -136,7 +137,7 @@ exports.UpdateProjectInputSchema = zod_openapi_1.z
|
|
|
136
137
|
ctx.addIssue({
|
|
137
138
|
path: ["endDate"],
|
|
138
139
|
code: "custom",
|
|
139
|
-
message: "End date must
|
|
140
|
+
message: "End date must be after the start date.",
|
|
140
141
|
});
|
|
141
142
|
}
|
|
142
143
|
})
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
|
|
|
92
92
|
userId: z.ZodCUID2;
|
|
93
93
|
brandName: z.ZodString;
|
|
94
94
|
bio: z.ZodOptional<z.ZodString>;
|
|
95
|
+
location: z.ZodString;
|
|
95
96
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
97
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
97
98
|
url: z.ZodURL;
|
|
@@ -1329,6 +1330,7 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
|
|
|
1329
1330
|
userId: z.ZodCUID2;
|
|
1330
1331
|
brandName: z.ZodString;
|
|
1331
1332
|
bio: z.ZodOptional<z.ZodString>;
|
|
1333
|
+
location: z.ZodString;
|
|
1332
1334
|
disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1333
1335
|
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1334
1336
|
url: z.ZodURL;
|
package/package.json
CHANGED
package/src/schemas/brand.ts
CHANGED
|
@@ -31,6 +31,9 @@ export const BrandEntitySchema = z
|
|
|
31
31
|
bio: z.string().optional().openapi({
|
|
32
32
|
example: "Leading software development firm focused on AI.",
|
|
33
33
|
}),
|
|
34
|
+
location: z.string().openapi({
|
|
35
|
+
example: "UK",
|
|
36
|
+
}),
|
|
34
37
|
disciplines: z
|
|
35
38
|
.array(z.string())
|
|
36
39
|
.optional()
|
|
@@ -64,6 +67,9 @@ export const CreateBrandProfileInputSchema = z
|
|
|
64
67
|
.string()
|
|
65
68
|
.min(1, "Brand name is required")
|
|
66
69
|
.openapi({ example: "Acme Creative Studio" }),
|
|
70
|
+
location: z.string().openapi({
|
|
71
|
+
example: "UK",
|
|
72
|
+
}),
|
|
67
73
|
disciplineSlugs: z
|
|
68
74
|
.array(z.string())
|
|
69
75
|
.min(1, "At least one discipline is required")
|
|
@@ -91,6 +97,9 @@ export const UpdateBrandProfileInputSchema = z
|
|
|
91
97
|
})
|
|
92
98
|
.array()
|
|
93
99
|
.optional(),
|
|
100
|
+
location: z.string().openapi({
|
|
101
|
+
example: "UK",
|
|
102
|
+
}),
|
|
94
103
|
achievements: z
|
|
95
104
|
.object({
|
|
96
105
|
title: z.string(),
|
package/src/schemas/project.ts
CHANGED
|
@@ -104,15 +104,16 @@ export const UpdateProjectInputSchema = z
|
|
|
104
104
|
if (val.startsWith("http://") || val.startsWith("https://")) return val;
|
|
105
105
|
return `https://${val}`;
|
|
106
106
|
})
|
|
107
|
-
.pipe(z.
|
|
107
|
+
.pipe(z.url("Check your link.").or(z.literal("")))
|
|
108
108
|
.optional(),
|
|
109
|
-
imagePlaceholderUrl: z.url().optional(),
|
|
109
|
+
imagePlaceholderUrl: z.url().optional().or(z.literal("")),
|
|
110
110
|
tags: z.array(z.string()).optional(),
|
|
111
111
|
projectCreatorType: z.enum(ROLES).optional(),
|
|
112
112
|
clientId: z
|
|
113
113
|
.string()
|
|
114
|
-
.
|
|
115
|
-
.
|
|
114
|
+
.optional()
|
|
115
|
+
.transform((val) => (val === "" || val === undefined ? undefined : val))
|
|
116
|
+
.pipe(z.cuid2().optional()),
|
|
116
117
|
clientType: z.enum(CLIENT_TYPES).optional(),
|
|
117
118
|
clientName: z.string().optional(),
|
|
118
119
|
isFeatured: z.boolean().optional(),
|
|
@@ -138,7 +139,7 @@ export const UpdateProjectInputSchema = z
|
|
|
138
139
|
isOpenToInvestment: z.boolean().default(false),
|
|
139
140
|
startDate: z.coerce.date().optional(),
|
|
140
141
|
endDate: z.coerce.date().optional(),
|
|
141
|
-
version: z.number().int(),
|
|
142
|
+
version: z.number().int().default(1),
|
|
142
143
|
})
|
|
143
144
|
.superRefine(({ startDate, endDate }, ctx) => {
|
|
144
145
|
const today = new Date();
|
|
@@ -154,12 +155,12 @@ export const UpdateProjectInputSchema = z
|
|
|
154
155
|
ctx.addIssue({
|
|
155
156
|
path: ["endDate"],
|
|
156
157
|
code: "custom",
|
|
157
|
-
message: "End date must
|
|
158
|
+
message: "End date must be after the start date.",
|
|
158
159
|
});
|
|
159
160
|
}
|
|
160
161
|
})
|
|
161
162
|
.openapi("UpdateProjectInput");
|
|
162
|
-
|
|
163
|
+
|
|
163
164
|
export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;
|
|
164
165
|
|
|
165
166
|
export const CommentOnProjectInputSchema = CommentEntitySchema;
|