-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.d.ts
81 lines (70 loc) · 1.74 KB
/
index.d.ts
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
export interface Attachment {
/**
* The name used for the attachment.
* Example:
*
* fileName: 'Cute-Kitten.png'
*/
fileName: string;
/**
* There are various ways to use the path param:
*
* - base64 encoded: 'base64://iVBORw..XYZ'
* - local app folder 'file://..
* - anywhere on the device: 'file:///..'
* - or '/some/path/to/file.png'
*/
path: string;
/**
* Used to help the iOS figure out how to send the file (not used on Android).
* Example:
*
* mimeType: 'image/png'
*/
mimeType: string;
}
/**
* The options object passed into the compose function.
*/
export interface ComposeOptions {
/**
* The subject of your email.
*/
subject?: string;
/**
* The plugin will automatically handle plain and html email content.
*/
body?: string;
/**
* A string array of email addresses.
* Known issue: on Android only the first item in the array is added.
*/
to?: string[];
/**
* A string array of email addresses.
* Known issue: on Android only the first item in the array is added.
*/
cc?: string[];
/**
* A string array of email addresses.
* Known issue: on Android only the first item in the array is added.
*/
bcc?: string[];
/**
* An optional Array of attachments.
*/
attachments?: Array<Attachment>;
/**
* @deprecated No longer used, but keeping it around to notify you.
*/
appPickerTitle?: string;
}
/**
* No email client may be available, so test first.
*/
export function available(): Promise<boolean>;
/**
* On iOS the returned boolean indicates whether or not the email was sent by the user.
* On Android it's always true, unfortunately.
*/
export function compose(options: ComposeOptions): Promise<boolean>;