/
Mentorship.ts
26 lines (23 loc) · 959 Bytes
/
Mentorship.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { z } from 'zod'
import { ContentDate, ContributionAreaSchema, NumberAsString, SecondaryContributionAreaSchema } from './utils.js'
export const MentorshipSchema = z.object({
primaryContributionArea: ContributionAreaSchema,
secondaryContributionArea: SecondaryContributionAreaSchema,
date: ContentDate,
title: z.string(),
url: z.string().url().optional(),
description: z.string().optional(),
numberOfMentorshipActivities: NumberAsString,
numberOfMentee: NumberAsString.optional()
})
export type Mentorship = z.infer<typeof MentorshipSchema>
export const MentorshipFieldMapping: Record<keyof Mentorship, string> = {
primaryContributionArea: 'select_contributionAreasDDL',
secondaryContributionArea: 'select_contributionAreasDDL2',
date: 'DateOfActivity',
title: 'TitleOfActivity',
url: 'ReferenceUrl',
description: 'Description',
numberOfMentorshipActivities: 'AnnualQuantity',
numberOfMentee: 'AnnualReach'
} as const