Files
mail/src/types/composer.ts
T
2026-06-16 13:24:54 -04:00

47 lines
1010 B
TypeScript

import type { ServiceObject } from "@MailManager/models/service"
import type { EntityIdentifier, ServiceIdentifier } from "@MailManager/types/common"
export enum ComposerMode {
Fresh = 'fresh',
Reply = 'reply',
Forward = 'forward',
}
export interface ComposerDraftAttachment {
identifier: string
composition: string
origin: 'source' | 'upload'
name: string
type: string
size: number
source: EntityIdentifier | null
}
export interface ComposerDraftMessage {
to: string[]
cc: string[]
bcc: string[]
subject: string
body: {
html: string
text: string
}
}
export interface ComposerDraft {
action: ComposerMode
identifier: string
revision: number
sender: ComposerSenderIdentity
source: EntityIdentifier | null
stageStatus: 'local' | 'staged'
stagedAt: Date | null
message: ComposerDraftMessage
attachments: Record<string, ComposerDraftAttachment>
}
export interface ComposerSenderIdentity {
service: ServiceObject
address: string
label: string | null
}