Home Reference Source
import Message from 'magister.js/src/message.js'
public class | source

Message

Extends:

MagisterThing → Message

Constructor Summary

Public Constructor
public

constructor(magister: Magister, raw: Object)

Member Summary

Public Members
public

This will be undefined per default, a fill using fill is required to retrieve the attachments for this Message.

public
public

If creating a message, this will be an empty string per default.

public
public
public
public
public
public
public
public
public
public
public
public get

Method Summary

Public Methods
public

addRecipient(recipients: Person | Person[])

public
public

createReplyMessage(content: string): *

public
public

fill(fillPersons: Boolean): Promise<Message>

public

move(destination: *): *

public
public

Update the server to reflect the changes made on the properties of this Message instance.

public
public

toString(): *

Inherited Summary

From class MagisterThing
public

Public Constructors

public constructor(magister: Magister, raw: Object) source

Params:

NameTypeAttributeDescription
magister Magister

The Magister object you want to send this message from.

raw Object
  • optional

Not needed, only used internally.

Public Members

public attachments: File[] source

This will be undefined per default, a fill using fill is required to retrieve the attachments for this Message.

public begin: Date source

public body: String source

If creating a message, this will be an empty string per default. When retrieving a message from Magister, this will be undefined per default, you should use fill to get the body.

public end: Date source

public folderId: String source

public id: String source

public isFlagged: Boolean source

public isRead: Boolean source

public recipients: Person[] source

public sendDate: Date source

public sender: Person source

public state: Number source

public subject: String source

public summary: String source

public get type: String source

Public Methods

public addRecipient(recipients: Person | Person[]) source

Params:

NameTypeAttributeDescription
recipients Person | Person[]

public createForwardMessage(content: string): * source

Params:

NameTypeAttributeDescription
content string
  • optional
  • default:

Return:

*

public createReplyMessage(content: string): * source

Params:

NameTypeAttributeDescription
content string
  • optional
  • default:

Return:

*

public createReplyToAllMessage(content: string): * source

Params:

NameTypeAttributeDescription
content string
  • optional
  • default:

Return:

*

public fill(fillPersons: Boolean): Promise<Message> source

Params:

NameTypeAttributeDescription
fillPersons Boolean
  • optional
  • default: false

Return:

Promise<Message>

public move(destination: *): * source

Params:

NameTypeAttributeDescription
destination *

Return:

*

public remove(): Promise<Error|undefined> source

public saveChanges(): Promise<undefined> source

Update the server to reflect the changes made on the properties of this Message instance.

Return:

Promise<undefined>

public send(): Promise<Message> source

Return:

Promise<Message>

public toString(): * source

Return:

*