2021-12-22 14:59:07 +01:00
|
|
|
import { Result as ResultFromPrisma } from 'db'
|
2022-06-07 08:49:12 +02:00
|
|
|
import { Answer, VariableWithValue } from '.'
|
2022-06-11 07:27:38 +02:00
|
|
|
import { InputBlockType } from './typebot/blocks/shared'
|
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 = {
|
2022-07-01 17:08:35 +02:00
|
|
|
id: string
|
2022-03-21 17:05:51 +01:00
|
|
|
label: string
|
2022-11-06 09:57:08 +01:00
|
|
|
blocks?: {
|
|
|
|
id: string
|
|
|
|
groupId: string
|
|
|
|
}[]
|
2022-06-11 07:27:38 +02:00
|
|
|
blockType?: InputBlockType
|
2022-11-06 09:57:08 +01:00
|
|
|
variableIds?: string[]
|
2022-03-21 17:05:51 +01:00
|
|
|
}
|