♻️ (models) Change to features-centric folder structure
This commit is contained in:
committed by
Baptiste Arnaud
parent
a9d04798bc
commit
a5c8a8a95c
27
packages/models/src/features/result.ts
Normal file
27
packages/models/src/features/result.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { Result as ResultFromPrisma } from 'db'
|
||||
import { Answer } from './answer'
|
||||
import { InputBlockType } from './blocks'
|
||||
import { VariableWithValue } from './typebot/variable'
|
||||
|
||||
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
|
||||
blocks?: {
|
||||
id: string
|
||||
groupId: string
|
||||
}[]
|
||||
blockType?: InputBlockType
|
||||
variableIds?: string[]
|
||||
}
|
Reference in New Issue
Block a user