/
ProductGroupFeedback.ts
26 lines (23 loc) · 1012 Bytes
/
ProductGroupFeedback.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 ProductGroupFeedbackSchema = z.object({
primaryContributionArea: ContributionAreaSchema,
secondaryContributionArea: SecondaryContributionAreaSchema,
date: ContentDate,
title: z.string(),
url: z.string().url().optional(),
description: z.string().optional(),
numberOfEvents: NumberAsString,
numberOfFeedbacksProvided: NumberAsString.optional()
})
export type ProductGroupFeedback = z.infer<typeof ProductGroupFeedbackSchema>
export const ProductGroupFeedbackFieldMapping: Record<keyof ProductGroupFeedback, string> = {
primaryContributionArea: 'select_contributionAreasDDL',
secondaryContributionArea: 'select_contributionAreasDDL2',
date: 'DateOfActivity',
title: 'TitleOfActivity',
url: 'ReferenceUrl',
description: 'Description',
numberOfEvents: 'AnnualQuantity',
numberOfFeedbacksProvided: 'SecondAnnualQuantity'
} as const