feat: mail composition
Signed-off-by: Sebastian <krupinski01@gmail.com>
This commit is contained in:
+45
-3
@@ -1,5 +1,47 @@
|
||||
import type { ServiceObject } from "@MailManager/models/service"
|
||||
import type { EntityIdentifier, ServiceIdentifier } from "@MailManager/types/common"
|
||||
|
||||
export enum ComposerMode {
|
||||
Fresh,
|
||||
Reply,
|
||||
Forward,
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user