feat: add src/types.ts
This commit is contained in:
parent
0c63014dd1
commit
c238f77451
28
src/types.ts
Normal file
28
src/types.ts
Normal file
@ -0,0 +1,28 @@
|
||||
export type TemplateType = 'email' | 'report'
|
||||
export type BlockType = 'heading' | 'text' | 'kpi' | 'button' | 'image' | 'divider' | 'table'
|
||||
|
||||
export type Block = {
|
||||
id: string
|
||||
type: BlockType
|
||||
props: Record<string, unknown>
|
||||
}
|
||||
|
||||
export type TemplateDocument = {
|
||||
blocks: Block[]
|
||||
}
|
||||
|
||||
export type TemplateRecord = {
|
||||
id: string
|
||||
name: string
|
||||
type: TemplateType
|
||||
status: string
|
||||
draft_document: TemplateDocument
|
||||
sample_data: Record<string, unknown>
|
||||
published_version?: number | null
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export type TemplateSummary = Pick<
|
||||
TemplateRecord,
|
||||
'id' | 'name' | 'type' | 'status' | 'published_version' | 'updated_at'
|
||||
>
|
||||
Loading…
x
Reference in New Issue
Block a user