2024-04-02 15:11:28 +02:00
|
|
|
import type { JSX } from 'preact'
|
2024-03-29 16:37:35 +01:00
|
|
|
import type { Contact } from './src/contact.ts'
|
2024-03-28 22:32:46 +01:00
|
|
|
|
|
|
|
export type Mail = {
|
2024-03-29 15:58:19 +01:00
|
|
|
from: Contact
|
2024-03-28 22:32:46 +01:00
|
|
|
to: Contact[]
|
|
|
|
subject: string
|
2024-03-29 15:58:19 +01:00
|
|
|
body: JSX.Element
|
2024-03-29 16:35:20 +01:00
|
|
|
options: {
|
|
|
|
cc: Contact[]
|
|
|
|
cci: Contact[]
|
|
|
|
attachments: string[]
|
|
|
|
}
|
2024-03-28 22:32:46 +01:00
|
|
|
}
|
2024-04-02 14:45:12 +02:00
|
|
|
|
|
|
|
export type Template<
|
2024-04-02 15:11:28 +02:00
|
|
|
T extends (props: P) => JSX.Element,
|
2024-04-02 14:45:12 +02:00
|
|
|
P extends Record<string, unknown>,
|
|
|
|
> = {
|
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
builder: T
|
|
|
|
props: {
|
|
|
|
name: string
|
|
|
|
description: string
|
|
|
|
required: boolean
|
|
|
|
multiline: boolean
|
2024-04-02 15:11:28 +02:00
|
|
|
tag: keyof P
|
2024-04-02 14:45:12 +02:00
|
|
|
}[]
|
|
|
|
}
|