-
Notifications
You must be signed in to change notification settings - Fork 780
Expand file tree
/
Copy pathattachment.d.ts
More file actions
35 lines (31 loc) · 880 Bytes
/
attachment.d.ts
File metadata and controls
35 lines (31 loc) · 880 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
export interface AttachmentData {
content: string;
filename: string;
type?: string;
disposition?: string;
contentId?: string;
}
export interface AttachmentJSON {
content: string;
filename: string;
type?: string;
disposition?: string;
content_id?: string;
}
export default class Attachment implements AttachmentData {
content: string;
filename: string;
type?: string;
disposition?: string;
contentId?: string;
constructor(data?: AttachmentData);
fromData(data: AttachmentData): void;
setContent(content: string): void;
setFilename(filename: string): void;
setType(type: string): void;
setDisposition(disposition: string): void;
setContentId(contentId: string): void;
toJSON(): AttachmentJSON;
static create(data: AttachmentData | Attachment): Attachment;
static create(data: AttachmentData[] | Attachment[]): Attachment[];
}