👷 Transpile components for better DX
This commit is contained in:
committed by
Baptiste Arnaud
parent
898367a33b
commit
c1dd4d403e
24
packages/models/result.ts
Normal file
24
packages/models/result.ts
Normal 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
|
||||
}
|
Reference in New Issue
Block a user