2021-12-22 14:59:07 +01:00
|
|
|
import { Result as ResultFromPrisma } from 'db'
|
2022-03-21 17:05:51 +01:00
|
|
|
import { Answer, InputStepType, VariableWithValue } from '.'
|
2021-12-22 14:59:07 +01:00
|
|
|
|
2022-03-28 17:07:47 +02:00
|
|
|
export type Result = Omit<ResultFromPrisma, 'createdAt' | 'variables'> & {
|
|
|
|
createdAt: string
|
|
|
|
variables: VariableWithValue[]
|
|
|
|
}
|
2022-02-21 15:51:40 +01:00
|
|
|
|
|
|
|
export type ResultWithAnswers = Result & { answers: Answer[] }
|
2022-02-22 10:16:35 +01:00
|
|
|
|
|
|
|
export type ResultValues = Pick<
|
|
|
|
ResultWithAnswers,
|
2022-03-28 17:07:47 +02:00
|
|
|
'answers' | 'createdAt' | 'variables'
|
2022-02-22 10:16:35 +01:00
|
|
|
>
|
2022-03-21 17:05:51 +01:00
|
|
|
|
|
|
|
export type ResultHeaderCell = {
|
|
|
|
label: string
|
|
|
|
stepId?: string
|
|
|
|
stepType?: InputStepType
|
|
|
|
isLong?: boolean
|
|
|
|
variableId?: string
|
|
|
|
}
|