/
ForumParticipationMicrosoft.ts
28 lines (25 loc) · 1.09 KB
/
ForumParticipationMicrosoft.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
27
28
import { z } from 'zod'
import { ContentDate, ContributionAreaSchema, NumberAsString, SecondaryContributionAreaSchema } from './utils.js'
export const ForumParticipationMicrosoftSchema = z.object({
primaryContributionArea: ContributionAreaSchema,
secondaryContributionArea: SecondaryContributionAreaSchema,
date: ContentDate,
title: z.string(),
url: z.string().url().optional(),
description: z.string().optional(),
numberOfAnswers: NumberAsString,
numberOfPosts: NumberAsString.optional(),
numberOfViewsOnAnswers: NumberAsString.optional()
})
export type ForumParticipationMicrosoft = z.infer<typeof ForumParticipationMicrosoftSchema>
export const ForumParticipationMicrosoftFieldMapping: Record<keyof ForumParticipationMicrosoft, string> = {
primaryContributionArea: 'select_contributionAreasDDL',
secondaryContributionArea: 'select_contributionAreasDDL2',
date: 'DateOfActivity',
title: 'TitleOfActivity',
url: 'ReferenceUrl',
description: 'Description',
numberOfAnswers: 'AnnualQuantity',
numberOfPosts: 'SecondAnnualQuantity',
numberOfViewsOnAnswers: 'AnnualReach'
} as const