2
0
Files
bot/packages/models/src/result.ts
2022-03-28 17:07:47 +02:00

23 lines
539 B
TypeScript

import { Result as ResultFromPrisma } from 'db'
import { Answer, InputStepType, VariableWithValue } from '.'
export type Result = Omit<ResultFromPrisma, 'createdAt' | 'variables'> & {
createdAt: string
variables: VariableWithValue[]
}
export type ResultWithAnswers = Result & { answers: Answer[] }
export type ResultValues = Pick<
ResultWithAnswers,
'answers' | 'createdAt' | 'variables'
>
export type ResultHeaderCell = {
label: string
stepId?: string
stepType?: InputStepType
isLong?: boolean
variableId?: string
}