2
0

👷 Transpile components for better DX

This commit is contained in:
Baptiste Arnaud
2022-09-18 09:46:42 +02:00
committed by Baptiste Arnaud
parent 898367a33b
commit c1dd4d403e
147 changed files with 343 additions and 485 deletions

24
packages/models/result.ts Normal file
View File

@ -0,0 +1,24 @@
import { Result as ResultFromPrisma } from 'db'
import { Answer, VariableWithValue } from '.'
import { InputBlockType } from './typebot/blocks/shared'
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 = {
id: string
label: string
blockId?: string
blockType?: InputBlockType
isLong?: boolean
variableId?: string
}