content: publish evidence-led portfolio copy
This commit is contained in:
@@ -116,6 +116,7 @@ const projectSchema = z.object({
|
||||
url: httpUrl.optional(),
|
||||
assetIds: z.array(opaqueId),
|
||||
media: z.array(mediaPresentationSchema).optional(),
|
||||
mediaLayout: z.enum(['single', 'portrait-strip', 'chart-pair']).optional(),
|
||||
}).strict().superRefine((project, context) => {
|
||||
if (project.visibility === 'private' && project.url !== undefined) {
|
||||
context.addIssue({ code: 'custom', message: 'A private project may not include a url.', path: ['url'] });
|
||||
@@ -138,6 +139,13 @@ const projectSchema = z.object({
|
||||
});
|
||||
}
|
||||
}
|
||||
if (project.mediaLayout !== undefined && (project.media === undefined || project.media.length === 0)) {
|
||||
context.addIssue({
|
||||
code: 'custom',
|
||||
message: 'Project mediaLayout requires at least one media presentation.',
|
||||
path: ['mediaLayout'],
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const portfolioContentSchema = z.object({
|
||||
@@ -145,6 +153,12 @@ const portfolioContentSchema = z.object({
|
||||
name: z.literal('Luca Pîslaru'),
|
||||
role: z.literal('System Administrator & Full-Stack Developer'),
|
||||
valueProposition: visibleString,
|
||||
location: z.object({
|
||||
city: visibleString,
|
||||
country: visibleString,
|
||||
countryCode: z.string().regex(/^[A-Z]{2}$/, 'Country code must be a two-letter uppercase code.'),
|
||||
}).strict(),
|
||||
availability: visibleString,
|
||||
}).strict(),
|
||||
navigation: z.array(navigationItemSchema).length(8),
|
||||
profile: z.object({
|
||||
@@ -170,6 +184,12 @@ const portfolioContentSchema = z.object({
|
||||
title: z.literal('Secure self-hosted platform and lifecycle'),
|
||||
summary: visibleString,
|
||||
bands: z.array(z.object({ id: opaqueId, title: visibleString, summary: visibleString }).strict()).length(4),
|
||||
featuredOperation: z.object({
|
||||
title: visibleString,
|
||||
context: visibleString,
|
||||
actions: z.array(visibleString).min(3).max(6),
|
||||
outcome: visibleString,
|
||||
}).strict(),
|
||||
}).strict(),
|
||||
projects: z.object({
|
||||
selected: z.array(projectSchema).length(3),
|
||||
@@ -180,6 +200,7 @@ const portfolioContentSchema = z.object({
|
||||
technologies: z.array(z.object({ name: visibleString, assetId: opaqueId.optional() }).strict()).min(1),
|
||||
}).strict()).min(1),
|
||||
contact: z.object({
|
||||
introduction: visibleString,
|
||||
email: z.email(),
|
||||
social: z.array(z.object({
|
||||
service: z.enum(['GitHub', 'GitLab', 'LinkedIn']),
|
||||
|
||||
Reference in New Issue
Block a user