new Mailbox(jmap, id, name, optsopt)
This class represents a JMAP Mailbox.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jmap |
Client | The Client instance that created this Mailbox. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
id |
String | The unique identifier of this Mailbox. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
name |
String | The user-visible name (i.e.: display name) of this Mailbox. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
opts |
Object |
<optional> |
The optional properties of this Mailbox. Properties
|
- Source:
- See:
Extends
Methods
(static) fromJSONObject(jmap, object) → {Mailbox}
Creates a Mailbox from its JSON representation.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
jmap |
Client | The Client instance passed to the Mailbox constructor. |
|||||||||
object |
Object | The JSON representation of the Mailbox, as a Javascript object. Properties
|
- Source:
Returns:
- Type
- Mailbox
destroy() → {Promise}
Destroy this Mailbox on the server.
- Source:
- See:
Returns:
A Promise, as per Client.destroyMailbox.
- Type
- Promise
getMessageList(optionsopt) → {Promise}
Fetches a message list from this Mailbox.
This will delegate to Client#getMessageList, passing the following filter:
{
inMailboxes: [<this Mailbox id>]
}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> |
The options object passed to Client#getMessageList. Please note that the filter option will be overriden if defined. |
- Source:
- See:
Returns:
A promise that eventually resolves with a MessageList instance.
- Type
- Promise
update(options) → {Promise}
Update this Mailbox.
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | The attribute to be updated in this Mailbox. Properties
|
- Source:
- See:
Returns:
A Promise, as per Client.updateMailbox.
- Type
- Promise