-
Notifications
You must be signed in to change notification settings - Fork 115
/
folders.ts
94 lines (78 loc) · 1.96 KB
/
folders.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
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
* Interface of a folder object from Nylas.
*/
export interface Folder {
/**
* A globally unique object identifier.
*/
id: string;
/**
* Folder name.
*/
name: string;
/**
* The type of object.
*/
object: string;
/**
* Grant ID of the Nylas account
*/
grantId: string;
/**
* (Google only) Folder background color.
*/
backgroundColor?: string;
/**
* (Google only) Indicates if the folder is user created or system created.
*/
systemFolder?: boolean;
/**
* (Google only) Folder text color.
*/
textColor?: string;
/**
* (Microsoft only) The number of immediate child folders in the current folder.
*/
childCount?: number;
/**
* (Microsoft only) ID of the parent folder.
*/
parentId?: string;
/**
* The number of items inside of a folder.
*/
totalCount?: number;
/**
* The number of unread items inside of a folder.
*/
unreadCount?: number;
/**
* Common attribute descriptors shared by system folders across providers.
* For example, Sent email folders have the `["\\Sent"]` attribute.
* For IMAP grants, IMAP providers provide the attributes.
* For Google and Microsoft Graph, Nylas matches system folders to a set of common attributes.
*/
attributes?: string[];
}
/**
* Interface for creating a new folder.
*/
export interface CreateFolderRequest {
/**
* Creates a folder with the specified display name. (Constraints: 1 to 1024 chars)
*/
name: string;
/**
* (Microsoft only) ID of the parent folder.
*/
parentId?: string;
/**
* (Google only) The text color of the folder in the hexadecimal format "#0099EE". See Google Defined Values for more information.
*/
textColor?: string;
/**
* (Google only) The background color of the folder in the hexadecimal format "#0099EE". See Google Defined Values for more information.
*/
backgroundColor?: string;
}
export type UpdateFolderRequest = Partial<CreateFolderRequest>;