/* Version: 16.0.3825.1000 */
/*
Copyright (c) Microsoft Corporation. All rights reserved.
*/
/*
Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
*/
Office._appMode = {
Read: 1,
Compose: 2,
ReadCompose: 3
}
Office._cast_item = function () {
this.toAppointmentCompose = function (item) {
return new Office._$MailboxAppointment(Office._appMode.Compose);
}
this.toAppointmentRead = function (item) {
return new Office._$MailboxAppointment(Office._appMode.Read);
}
this.toAppointment = function (item) {
return new Office._$MailboxAppointment(Office._appMode.ReadCompose);
}
this.toMessageCompose = function (item) {
return new Office._$MailboxMessage(Office._appMode.Compose);
}
this.toMessageRead = function (item) {
return new Office._$MailboxMessage(Office._appMode.Read);
}
this.toMessage = function (item) {
return new Office._$MailboxMessage(Office._appMode.ReadCompose);
}
this.toItemCompose = function (item) {
return new Office._$MailboxItem(Office._appMode.Compose);
}
this.toItemRead = function (item) {
return new Office._$MailboxItem(Office._appMode.Read);
}
};
Office._context_mailbox_item = function () {
Office._$MailboxItem_helper(this, Office._appMode.ReadCompose);
Office._$MailboxAppointment_helper(this, Office._appMode.ReadCompose);
Office._$MailboxMessage_helper(this, Office._appMode.ReadCompose);
};
Office._$MailboxItem = function (appMode) {
Office._$MailboxItem_helper(this, appMode);
Office._$MailboxAppointment_helper(this, appMode);
Office._$MailboxMessage_helper(this, appMode);
}
Office._$MailboxAppointment = function (appMode) {
Office._$MailboxItem_helper(this, appMode);
Office._$MailboxAppointment_helper(this, appMode);
}
Office._$MailboxMessage = function (appMode) {
Office._$MailboxItem_helper(this, appMode);
Office._$MailboxMessage_helper(this, appMode);
}
Office._$MailboxItem_helper = function (obj, appMode) {
// Field documentation ------------------------------------------
// Attachments property.
attachmentsDoc = {
attachments_read: {
conditions: {
hosts: ["outlook; not outlookcompose"]
},
name: "attachments",
annotate: {
///Gets a list of attachments to the item.
attachments: undefined
},
contents: function () {
return new Array(new Office._context_mailbox_item_attachmentDetails())
}
},
attachments_read_compose: {
conditions: {
hosts: ["outlook; outlookcompose"]
},
name: "attachments",
annotate: {
///Gets a list of attachments to the item. In compose mode the attachments property is undefined. In read mode it returns a list of attachments to the item.
attachments: undefined
},
contents: function () {
return new Array(new Office._context_mailbox_item_attachmentDetails())
}
}
}
bodyDoc = {
body_compose: {
conditions: {
hosts: ["not outlook, outlookcompose"]
},
name: "body",
annotate: {
/// Provides methods to get and set the body of the item.
body: undefined
},
contents: function () {
return new Office._context_mailbox_item_body()
}
},
body_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "body",
annotate: {
/// Gets the content of an item. In read mode, the body property is undefined. In compose mode it returns a Body object.
body: undefined
},
contents: function () {
return new Office._context_mailbox_item_body()
}
}
}
// dateTimeCreated property.
dateTimeCreatedDoc = {
dateTimeCreated_read: {
conditions: {
hosts: ["outlook, not outlookcompose"]
},
name: "dateTimeCreated",
annotate: {
///Gets the date and time that the item was created.
dateTimeCreated: undefined
},
contents: function () {
return new Date()
}
},
dateTimeCreated_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "dateTimeCreated",
annotate: {
///Gets the date and time that the item was created. In compose mode the dateTimeCreated property is undefined.
dateTimeCreated: undefined
},
contents: function () {
return new Date()
}
}
}
// dateTimeModified property.
dateTimeModifiedDoc = {
dateTimeModified_read: {
conditions: {
hosts: ["outlook, not outlookcompose"]
},
name: "dateTimeModified",
annotate: {
///Gets the date and time that the item was last modified.
dateTimeModified: undefined
},
contents: function () {
return new Date()
}
},
dateTimeModified_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "dateTimeModified",
annotate: {
///Gets the date and time that the item was last modified. In compose mode the dateTimeModified property is undefined.
dateTimeModified: undefined
},
contents: function () {
return new Date()
}
}
}
// itemClass property.
itemClassDoc = {
itemClass_read: {
conditions: {
hosts: ["outlook, not outlookcompose"]
},
name: "itemClass",
annotate: {
///Gets the item class of the item.
itemClass: undefined
}
},
itemClass_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "itemClass",
annotate: {
///Gets the item class of the item. In compose mode the itemClass property is undefined.
itemClass: undefined
}
}
}
// itemId property
// This property is in all modes, so it gets processed in place rather than
// after the extra documentation is removed.
Office._processContents(obj, {
itemIdDoc: {
conditions: {
hosts: ["outlook", "outlookcompose"]
},
name: "itemId",
annotate: {
///Gets the Exchange Web Services (EWS) item identifier of an item.
itemId: undefined
}
}
})
// itemType property.
Office._processContents(obj, {
itemTypeDoc: {
conditions: {
hosts: ["outlook", "outlookcompose"]
},
name: "itemType",
annotate: {
///Gets the type of an item that an instance represents.
itemType: undefined
}
}
})
//obj.normalizedSubject = {};
normalizedSubjectDoc = {
normalizedSubject_read: {
conditions: {
hosts: ["outlook, not outlookcompose"]
},
name: "normalizedSubject",
annotate: {
///Gets the subject of the item, with standard prefixes removed.
normalizedSubject: undefined
}
},
normalizedSubject_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "normalizedSubject",
annotate: {
///Gets the subject of the item, with standard prefixes removed. In compose mode, the normalizedSubject property is undefined.
normalizedSubject: undefined
}
}
}
subjectDoc = {
subject_compose: {
conditions: {
hosts: ["not outlook, outlookcompose"]
},
name: "subject",
annotate: {
/// Provides methods to get and set the item subject.
subject: undefined
},
contents: function () {
return new Office._context_mailbox_item_subject()
}
},
subject_read: {
conditions: {
hosts: ["outlook, not outlookcompose"]
},
name: "subject",
annotate: {
/// Gets the subject of the item.
subject: undefined
}
},
subject_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "subject",
annotate: {
/// Gets the subject of an item. In compose mode the Subject property returns a Subject object. In read mode, it returns a string.
subject: undefined
}
}
}
if (appMode == Office._appMode.Compose) {
delete attachmentsDoc["attachments_read"];
delete attachmentsDoc["attachments_read_compose"];
delete bodyDoc.body_compose["conditions"];
delete bodyDoc["body_read_compose"];
delete dateTimeCreatedDoc["dateTimeCreated_read"];
delete dateTimeCreatedDoc["dateTimeCreated_read_compose"];
delete dateTimeModifiedDoc["dateTimeModified_read"];
delete dateTimeModifiedDoc["dateTimeModified_read_compose"];
delete itemClassDoc["itemClass_read"];
delete itemClassDoc["itemClass_read_compose"];
delete normalizedSubjectDoc["normalizedSubject_read"];
delete normalizedSubjectDoc["normalizedSubject_read_compose"];
delete subjectDoc.subject_compose["conditions"];
delete subjectDoc["subject_read"];
delete subjectDoc["subject_read_compose"];
}
else if (appMode == Office._appMode.Read) {
delete attachmentsDoc.attachments_read["conditions"];
delete attachmentsDoc["attachments_read_compose"];
delete bodyDoc["body_compose"];
delete bodyDoc["body_read_compose"];
delete dateTimeCreatedDoc.dateTimeCreated_read["conditions"];
delete dateTimeCreatedDoc["dateTimeCreated_read_compose"];
delete dateTimeModifiedDoc.dateTimeModified_read["conditions"];
delete dateTimeModifiedDoc["dateTimeModified_read_compose"];
delete itemClassDoc.itemClass_read["conditions"];
delete itemClassDoc["itemClass_read_compose"];
delete normalizedSubjectDoc.normalizedSubject_read["conditions"];
delete normalizedSubjectDoc["normalizedSubject_read_compose"];
delete subjectDoc.subject_read["conditions"];
delete subjectDoc["subject_compose"];
delete subjectDoc["subject_read_compose"];
}
else if (appMode == Office._appMode.ReadCompose) {
delete attachmentsDoc["attachments_read"];
delete attachmentsDoc.attachments_read_compose["conditions"];
delete bodyDoc["body_compose"];
delete bodyDoc.body_read_compose["conditions"];
delete dateTimeCreatedDoc["dateTimeCreated_read"];
delete dateTimeCreatedDoc.dateTimeCreated_read_compose["conditions"];
delete dateTimeModifiedDoc["dateTimeModified_read"];
delete dateTimeModifiedDoc.dateTimeModified_read_compose["conditions"];
delete itemClassDoc["itemClass_read"];
delete itemClassDoc.itemClass_read_compose["conditions"];
delete normalizedSubjectDoc["normalizedSubject_read"];
delete normalizedSubjectDoc.normalizedSubject_read_compose["conditions"];
delete subjectDoc["subject_compose"];
delete subjectDoc["subject_read"];
delete subjectDoc.subject_read_compose["conditions"];
}
Office._processContents(obj, attachmentsDoc);
Office._processContents(obj, bodyDoc);
Office._processContents(obj, dateTimeCreatedDoc);
Office._processContents(obj, dateTimeModifiedDoc);
Office._processContents(obj, itemClassDoc);
Office._processContents(obj, normalizedSubjectDoc);
Office._processContents(obj, subjectDoc);
if (appMode == Office._appMode.Compose || appMode == Office._appMode.ReadCompose) {
obj.addFileAttachmentAsync = function (uri, attachmentName, options, callback) {
///Attach a file to an item.
///A URI that provides the location of the file. Required.
///The name to display while the attachment is loading. The name is limited to 256 characters. Required.
///An optional parameters or state data passed to the callback method. Optional.
///The method to invoke when the attachment finishes uploading. Optional.
var result = new Office._Mailbox_AsyncResult("attachmentAsync");
if (arguments.length == 3) { callback = options; }
callback(result);
};
obj.addItemAttachmentAsync = function (itemId, attachmentName, options, callback) {
///Attach an email item to an item.
///The Exchange identifier of the item to attach. The maximum length is 100 characters.
///The name to display while the attachment is loading. The name is limited to 256 characters.
///An optional parameters or state data passed to the callback method.
///The method to invoke when the attachment finishes uploading.
var result = new Office._Mailbox_AsyncResult("attachmentAsync");
if (arguments.length == 3) { callback = options; }
callback(result);
};
obj.removeAttachmentAsync = function (attachmentIndex, options, callback) {
///Removes a file or item that was previously attached to an item.
///The index of the attachment to remove.
///An optional parameters or state data passed to the callback method.
///The method to invoke when the attachment is removed.
var result = new Office._Mailbox_AsyncResult("removeAttachmentAsync");
if (arguments.length == 2) { callback = options; }
callback(result);
};
Office._processItem(obj, {
conditions: {
reqs: ["set Mailbox GE 1.2"]
},
metaOnly: true,
contents: {
getSelectedDataAsync: {
value: function (coercionType, options, callback) {
///Gets the selected data in the subject or body of the current item; or null if not data is selected.
///One of the CoercionType enumeration values indicating whether the selected content is HTML or plain text.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous method is complete.
var result = new Office._Mailbox_AsyncResult("getSelectedDataAsync");
if (arguments.length == 2) { callback = options; }
callback(result);
}
},
setSelectedDataAsync: {
value: function (data, options, callback) {
///Sets the specified data in the subject or body of the current item.
///The text to insert into the subject or body of the item.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous method is complete.
var result = new Office._Mailbox_AsyncResult();
if (arguments.length == 2) { callback = options; }
callback(result);
}
}
}
});
}
if (appMode == Office._appMode.Read || appMode == Office._appMode.ReadCompose) {
obj.displayReplyAllForm = function (htmlBody) {
///Display a form for creating an email reply to all recipients.
///The HTML contents of the email reply. 32 KB limit.
};
obj.displayReplyForm = function (htmlBody) {
///Display a form for creating an email reply to the sender.
///The HTML contents of the email reply. 32 KB limit
};
Office._processItem(obj, {
conditions: {
reqs: ["set Mailbox GE 1.2"]
},
metaOnly: true,
contents: {
displayReplyAllForm: {
value: function (replyForm) {
///Display a form for creating an email reply to all recipients.
///Syntax example: {
///
"body": "..." ,
///
"attachments": [
///
{
///
"type":"item",
///
"id":"...",
///
},
///
{
///
"type":"file",
///
"name":"...",
///
"url":"...",
///
}
///
]}
///
body: HTML contents of the email reply. Optional, 32 KB limit.
///
attachments: An array of JSON objects that are either file or item attachments. Optional.
///
attachments:type: "item" to indicate that the attachment is an Exchange item, or "file" to indicate that the attachment is a file.
///
attachments:id: The EWS identifier of the item to attach. 100 character limit.
///
attachments:file: The file name of the file to attach. 255 character limit.
///
attachments:url: The URL of the location where the file bytes are located. 2048 character limit.
///
-or-
///
The HTML contents of the email reply. 32 KB limit.
}
},
displayReplyForm: {
value: function (replyForm) {
///Display a form for creating an email reply to the sender.
///Syntax example: {
///
"body": "..." ,
///
"attachments": [
///
{
///
"type":"item",
///
"id":"...",
///
},
///
{
///
"type":"file",
///
"name":"...",
///
"url":"...",
///
}
///
]}
///
body: HTML contents of the email reply. Optional, 32 KB limit.
///
attachments: An array of JSON objects that are either file or item attachments. Optional.
///
attachments:type: "item" to indicate that the attachment is an Exchange item, or "file" to indicate that the attachment is a file.
///
attachments:id: The EWS identifier of the item to attach. 100 character limit.
///
attachments:file: The file name of the file to attach. 255 character limit.
///
attachments:url: The URL of the location where the file bytes are located. 2048 character limit.
///
-or-
///
The HTML contents of the email reply. 32 KB limit.
}
}
}
});
obj.getEntities = function () {
///Gets an array of entities found in an item.
return (new Office._context_mailbox_item_entities());
};
obj.getEntitiesByType = function (entityType) {
///Gets an array of entities of the specified entity type found in an item.
///One of the EntityType enumeration values.
if (entityType == Office.MailboxEnums.EntityType.Address) {
return (new Array(""));
}
if (entityType == Office.MailboxEnums.EntityType.Contact) {
return (new Array(new Office._context_mailbox_item_contact()));
}
if (entityType == Office.MailboxEnums.EntityType.EmailAddress) {
return (new Array(""));
}
if (entityType == Office.MailboxEnums.EntityType.MeetingSuggestion) {
return (new Array(new Office._context_mailbox_item_meetingSuggestion()));
}
if (entityType == Office.MailboxEnums.EntityType.PhoneNumber) {
return (new Array(new Office._context_mailbox_item_phoneNumber()));
}
if (entityType == Office.MailboxEnums.EntityType.TaskSuggestion) {
return (new Array(new Office._context_mailbox_item_taskSuggestion()));
}
if (entityType == Office.MailboxEnums.EntityType.Url) {
return (new Array(""));
}
};
obj.getFilteredEntitiesByName = function (name) {
///Returns well-known enitities that pass the named filter defined in the manifest XML file.
///The name of the filter defined in the manifest XML file.
return (new Array(Office._context_mailbox_item_entities()));
};
obj.getRegExMatches = function () {
///Returns string values that match the regular expressions defined in the manifest XML file.
return (new Array(""));
};
obj.getRegExMatchesByName = function (name) {
///Returns string values that match the named regular expression defined in the manifest XML file.
///The name of the regular expression defined in the manifest XML file.
return (new Array(""));
};
}
obj.loadCustomPropertiesAsync = function (callback, userContext) {
///Asynchronously loads custom properties that are specific to the item and a mail app for Outlook.
///The method to call when the asynchronous load is complete.
///Any state data that is passed to the asynchronous method.
var result = new Office._Mailbox_AsyncResult("loadCustomPropertiesAsync");
callback(result);
};
};
Office._$MailboxAppointment_helper = function (obj, appMode) {
// End property.
endDoc = {
end_compose: {
conditions: {
hosts: ["not outlook; outlookcompose"]
},
name: "end",
annotate: {
/// Provides methods to get and set the end time of an appointment.
end: undefined
},
contents: function () {
return new Office._context_mailbox_item_time();
}
},
end_read: {
conditions: {
hosts: ["outlook; not outlookcompose"]
},
name: "end",
annotate: {
///Gets the date and time that the appointment is to end.
end: undefined
},
contents: function () {
return new Date();
}
},
end_read_compose: {
conditions: {
hosts: ["outlook; outlookcompose"]
},
name: "end",
annotate: {
/// Gets the date and time that the appointment is to end. In read mode, returns Date object. In compose mode, returns a Time object.
end: undefined
}
}
}
// Location property.
locationDoc = {
location_compose: {
conditions: {
hosts: ["not outlook, outlookcompose"]
},
name: "location",
annotate: {
/// Provides methods to get and set the location of an appointment.
location: undefined
},
contents: function () {
return new Office._context_mailbox_item_location()
}
},
location_read: {
conditions: {
hosts: ["not outlook, outlookcompose"]
},
name: "location",
annotate: {
///Gets the location of an appointment.
location: undefined
}
},
location_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "location",
annotate: {
/// Gets the location of an appointment. In read mode, returns a string. In compose mode returns a Location object.
location: undefined
}
}
}
// Optional attendees property.
optionalAttendeesDoc = {
optionalAttendees_compose: {
conditions: {
hosts: ["not outlook; outlookcompose"]
},
name: "optionalAttendees",
annotate: {
/// Provides methods to get and set the optional attendees of an appointment.
optionalAttendees: undefined
},
contents: function () {
return new Office._context_mailbox_item_recipients();
}
},
optionalAttendees_read: {
conditions: {
hosts: ["outlook; not outlookcompose"]
},
name: "optionalAttendees",
annotate: {
///Gets a list of email addresses for optional attendees of an appointment.
optionalAttendees: undefined
},
contents: function () {
return new Array(new Office._context_mailbox_item_emailAddressDetails())
}
},
optionalAttendees_read_compose: {
conditions: {
hosts: ["outlook; outlookcompose"]
},
name: "optionalAttendees",
annotate: {
/// Gets a list of email addresses for optional attendees of an appointment. In read mode, returns an array of EmailAddressDetails objects. In compose mode, returns a Recipients object.
optionalAttendees: undefined
}
}
}
// Organizer property.
organizerDoc = {
organizer_read: {
conditions: {
hosts: ["outlook, not outlookcompose"]
},
name: "organizer",
annotate: {
///Gets the email address of the meeting organizer for the specified meeting.
organizer: undefined
},
contents: function () {
return new Office._context_mailbox_item_emailAddressDetails()
}
},
organizer_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "organizer",
annotate: {
///Gets the email address of the meeting organizer for the specified meeting. In compose mode, the organizer property is undefined.
organizer: undefined
},
contents: function () {
return new Office._context_mailbox_item_emailAddressDetails()
}
}
}
// Required attendees
requiredAttendeesDoc = {
requiredAttendees_compose: {
conditions: {
hosts: ["not outlook, outlookcompose"]
},
name: "requiredAttendees",
annotate: {
/// Provides methods to get and set the required attendees of an appointment.
requiredAttendees: undefined
},
contents: function () {
return new Office._context_mailbox_item_recipients();
}
},
requiredAttendees_read: {
conditions: {
hosts: ["outlook; not outlookcompose"]
},
name: "requiredAttendees",
annotate: {
/// Gets a list of email addresses for required attendees of an appointment.
requiredAttendees: undefined
},
contents: function () {
return new Array(new Office._context_mailbox_item_emailAddressDetails())
}
},
requiredAttendees_read_compose: {
conditions: {
hosts: ["outlook; outlookcompose"]
},
name: "requiredAttendees",
annotate: {
/// Gets a list of email addresses for required attendees of an appointment. In read mode, returns an array of EmailAddressDetails objects. In compose mode, returns a Recipients object.
requiredAttendees: undefined
}
}
}
// Resources property.
resourcesDoc = {
resources_read: {
conditions: {
hosts: ["outlook; not outlookcompose"]
},
name: "resources",
annotate: {
/// Gets the resources required for an appointment.
resources: undefined
},
contents: function () {
return new Array(new Office._context_mailbox_item_emailAddressDetails())
}
},
resources_read_compose: {
conditions: {
hosts: ["outlook; outlookcompose"]
},
name: "resources",
annotate: {
/// Gets the resources required for an appointment. In read mode, returns an array of EmailAddressDetails objects. In compose mode, the resources property is undefined.
resources: undefined
}
}
}
// Start property
startDoc = {
start_compose: {
conditions: {
hosts: ["not outlook; outlookcompose"]
},
name: "start",
annotate: {
/// Provides methods to get and set the start time for the appointment.
start: undefined
},
contents: function () {
return new Office._context_mailbox_item_time();
}
},
start_read: {
conditions: {
hosts: ["outlook; not outlookcompose"]
},
name: "start",
annotate: {
///Gets the date and time that the appointment is to begin.
start: undefined
},
contents: function () {
return new Date();
}
},
start_read_compose: {
conditions: {
hosts: ["outlook; outlookcompose"]
},
name: "start",
annotate: {
/// Gets the date and time that the appointment is to begin. In read mode, returns Date object. In compose mode, returns a Time object.
start: undefined
}
}
}
if (appMode == Office._appMode.Compose) {
delete endDoc.end_compose["conditions"];
delete endDoc["end_read"];
delete endDoc["end_read_compose"];
delete locationDoc.location_compose["conditions"];
delete locationDoc["location_read"];
delete locationDoc["location_read_compose"];
delete optionalAttendeesDoc.optionalAttendees_compose["conditions"];
delete optionalAttendeesDoc["optionalAttendees_read"];
delete optionalAttendeesDoc["optionalAttendees_read_compose"];
delete organizerDoc["organizer_read"];
delete organizerDoc["organizer_read_compose"];
delete requiredAttendeesDoc.requiredAttendees_compose["conditions"];
delete requiredAttendeesDoc["requiredAttendees_read"];
delete requiredAttendeesDoc["requiredAttendees_read_compose"];
delete resourcesDoc["resources_read"];
delete resourcesDoc["resources_read_compose"];
delete startDoc.start_compose["conditions"];
delete startDoc["start_read"];
delete startDoc["start_read_compose"];
}
else if (appMode == Office._appMode.Read) {
delete endDoc["end_compose"];
delete endDoc.end_read["conditions"];
delete endDoc["end_read_compose"];
delete locationDoc["location_compose"];
delete locationDoc.location_read["conditions"];
delete locationDoc["location_read_compose"];
delete optionalAttendeesDoc["optionalAttendees_compose"];
delete optionalAttendeesDoc.optionalAttendees_read["conditions"];
delete optionalAttendeesDoc["optionalAttendees_read_compose"];
delete organizerDoc.organizer_read["conditions"];
delete organizerDoc["organizer_read_compose"];
delete requiredAttendeesDoc["requiredAttendees_compose"];
delete requiredAttendeesDoc.requiredAttendees_read["conditions"];
delete requiredAttendeesDoc["requiredAttendees_read_compose"];
delete resourcesDoc.resources_read["conditions"];
delete resourcesDoc["resources_read_compose"];
delete startDoc["start_compose"];
delete startDoc.start_read["conditions"];
delete startDoc["start_read_compose"];
}
else if (appMode == Office._appMode.ReadCompose) {
delete endDoc["end_compose"];
delete endDoc["end_read"];
delete endDoc.end_read_compose["condtions"];
delete locationDoc["location_compose"];
delete locationDoc["location_read"];
delete optionalAttendeesDoc["optionalAttendees_compose"];
delete optionalAttendeesDoc["optionalAttendees_read"];
delete optionalAttendeesDoc.optionalAttendees_read_compose["conditions"];
delete locationDoc.location_read_compose["conditions"];
delete organizerDoc["organizer_read"];
delete organizerDoc.organizer_read_compose["conditions"];
delete requiredAttendeesDoc["requiredAttendees_compose"];
delete requiredAttendeesDoc["requiredAttendees_read"];
delete requiredAttendeesDoc.requiredAttendees_read_compose["conditions"];
delete resourcesDoc["resources_read"];
delete resourcesDoc.resources_read_compose["conditions"];
delete startDoc["start_compose"];
delete startDoc["start_read"];
delete startDoc.start_read_compose["conditions"];
}
Office._processContents(obj, endDoc);
Office._processContents(obj, locationDoc);
Office._processContents(obj, optionalAttendeesDoc);
Office._processContents(obj, organizerDoc);
Office._processContents(obj, requiredAttendeesDoc);
Office._processContents(obj, resourcesDoc);
Office._processContents(obj, startDoc);
};
Office._$MailboxMessage_helper = function (obj, appMode) {
// BCC property.
bccDoc = {
bcc_compose: {
conditions: {
hosts: ["not outlook; outlookcompose"]
},
name: "bcc",
annotate: {
/// Provides methods to get and set the Bcc recipients of a message.
bcc: undefined
},
contents: function () {
return new Office._context_mailbox_item_recipients();
}
},
bcc_read_compose: {
conditions: {
hosts: ["outlook; outlookcompose"]
},
name: "bcc",
annotate: {
/// Gets the Bcc recipients of a message. In read mode, the bcc property is undefined. In compose mode it returns a Recipients object.
bcc: undefined
}
}
}
// CC property.
ccDoc = {
cc_compose: {
conditions: {
hosts: ["not outlook; outlookcompose"]
},
name: "cc",
annotate: {
/// Provides methods to get and set the carbon-copy (Cc) recipients of a message.
cc: undefined
},
contents: function () {
return new Office._context_mailbox_item_recipients();
}
},
cc_read: {
conditions: {
hosts: ["outlook; not outlookcompose"]
},
name: "cc",
annotate: {
/// Gets the carbon-copy (Cc) recipients of a message.
cc: undefined
},
contents: function () {
return new Array(new Office._context_mailbox_item_emailAddressDetails())
}
},
cc_read_compose: {
conditions: {
hosts: ["outlook; outlookcompose"]
},
name: "cc",
annotate: {
/// Gets the carbon-copy (Cc) recipients of a message. In read mode, the cc property returns an array of EmailAddressDetails objects. In compose mode it returns a Recipients object.
cc: undefined
}
}
}
// conversationId property
Office._processContents(obj, {
conversationIdDoc: {
conditions: {
hosts: ["outlook", "outlookcompose"]
},
name: "conversationId",
annotate: {
///Gets an identifier for the email conversation that contains a particular message.
conversationId: undefined
}
}
});
// From property.
fromDoc = {
from_read: {
conditions: {
hosts: ["outlook, not outlookcompose"]
},
name: "from",
annotate: {
/// Gets the email address of the message's sender.
from: undefined
},
contents: function () {
return new Office._context_mailbox_item_emailAddressDetails();
}
},
from_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "from",
annotate: {
/// Gets the email address of the message's sender. In compose mode, the from property is undefined.
from: undefined
},
contents: function () {
return new Office._context_mailbox_item_emailAddressDetails();
}
}
}
// InternetMessageId property.
internetMessageIdDoc = {
internetMessageId_read: {
conditions: {
hosts: ["outlook, not outlookcompose"]
},
name: "internetMessageId",
annotate: {
/// Gets the internet message identifier of the message.
internetMessageId: undefined
}
},
internetMessageId_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "internetMessageId",
annotate: {
/// Gets the internet message identifier of the message. In compose mode, the internetMessageId property is undefined.
internetMessageId: undefined
}
}
}
// Sender property.
senderDoc = {
sender_read: {
conditions: {
hosts: ["outlook, not outlookcompose"]
},
name: "sender",
annotate: {
/// Gets the email address of the message sender.
sender: undefined
},
contents: function () {
return new Office._context_mailbox_item_emailAddressDetails();
}
},
sender_read_compose: {
conditions: {
hosts: ["outlook, outlookcompose"]
},
name: "sender",
annotate: {
/// Gets the email address of the message sender. In compose mode, the sender property is undefined.
sender: undefined
},
contents: function () {
return new Office._context_mailbox_item_emailAddressDetails();
}
}
}
// To property
toDoc = {
to_compose: {
conditions: {
hosts: ["not outlook; outlookcompose"]
},
name: "to",
annotate: {
/// Provides methods to get and set the list of recipients of a message.
to: undefined
},
contents: function () {
return new Office._context_mailbox_item_recipients();
}
},
to_read: {
conditions: {
hosts: ["outlook; not outlookcompose"]
},
name: "to",
annotate: {
/// Gets the list of recipients of a message.
to: undefined
},
contents: function () {
return new Array(new Office._context_mailbox_item_emailAddressDetails())
}
},
to_read_compose: {
conditions: {
hosts: ["outlook; outlookcompose"]
},
name: "to",
annotate: {
/// Gets the list of recipients of a message. In read mode, the to property returns an array of EmailAddressDetails objects. In compose mode, it returns a Recipients object.
to: undefined
}
}
}
if (appMode == Office._appMode.Compose) {
delete bccDoc.bcc_compose["conditions"];
delete bccDoc["bcc_read_compose"];
delete ccDoc.cc_compose["conditions"];
delete ccDoc["cc_read"];
delete ccDoc["cc_read_compose"];
delete fromDoc["from_read"];
delete fromDoc["from_read_compose"];
delete internetMessageIdDoc["internetMessageId_read"];
delete internetMessageIdDoc["internetMessageId_read_compose"];
delete senderDoc["sender_read"];
delete senderDoc["sender_read_compose"];
delete toDoc.to_compose["conditions"];
delete toDoc["to_read"];
delete toDoc["to_read_compose"];
}
else if (appMode == Office._appMode.Read) {
delete bccDoc["bcc_compose"];
delete bccDoc["bcc_read_compose"];
delete ccDoc["cc_compose"];
delete ccDoc.cc_read["conditions"];
delete ccDoc["cc_read_compose"];
delete fromDoc.from_read["conditions"];
delete fromDoc["from_read_compose"];
delete internetMessageIdDoc.internetMessageId_read["conditions"];
delete internetMessageIdDoc["internetMessageId_read_compose"];
delete senderDoc.sender_read["conditions"];
delete senderDoc["sender_read_compose"];
delete toDoc["to_compose"];
delete toDoc.to_read["conditions"];
delete toDoc["to_read_compose"];
}
else if (appMode == Office._appMode.ReadCompose) {
delete bccDoc["bcc_compose"];
delete bccDoc.bcc_read_compose["conditions"];
delete ccDoc["cc_compose"];
delete ccDoc["cc_read"];
delete ccDoc.cc_read_compose["conditions"];
delete fromDoc["from_read"];
delete fromDoc.from_read_compose["conditions"];
delete internetMessageIdDoc["internetMessageId_read"];
delete internetMessageIdDoc.internetMessageId_read_compose["conditions"];
delete senderDoc["sender_read"];
delete senderDoc.sender_read_compose["conditions"];
delete toDoc["to_compose"];
delete toDoc["to_read"];
delete toDoc.to_read_compose["conditions"];
}
Office._processContents(obj, bccDoc);
Office._processContents(obj, ccDoc);
Office._processContents(obj, fromDoc);
Office._processContents(obj, internetMessageIdDoc);
Office._processContents(obj, senderDoc);
Office._processContents(obj, toDoc);
}
Office._context_mailbox = function () {
///Gets the URL of the Exchange Web Services (EWS) endpoint for this email account.
///Represents the current item (message or appointment).
///Represents the host application's user profile information.
///Provides troubleshooting capabilities for a mail app.
var instance = new Office._context_mailbox_item();
this.ewsUrl = {};
this.item = intellisense.nullWithCompletionsOf(instance);
this.userProfile = new Office._context_mailbox_userProfile();
this.diagnostics = new Office._context_mailbox_diagnostics();
this.displayAppointmentForm = function (itemId) {
///Displays an existing calendar appointment.
///The Exchange Web Services (EWS) identifier for an existing calendar appointment.
};
this.displayMessageForm = function (itemId) {
///Displays an existing message.
///The Exchange Web Services (EWS) identifier for an existing message.
};
this.displayNewAppointmentForm = function (meetingRequest) {
///Display a form for creating a new calendar appointment.
///
/// Syntax example: {requiredAttendees:, optionalAttendees:, start:, end:, location:, resources:, subject:, body:}
///
requiredAttendees: An array of strings containing the SMTP email addresses of the required attendees for the meeting. The array is limited to 100 entries.
///
optionalAttendees: An array of strings containing the SMTP email addresses of the optional attendees for the meeting. The array is limited to 100 entries.
///
start: The start date and time of the appointment.
///
end: The end date and time of the appointment.
///
location: A string containing the location of the appointment. Limited to 255 characters.
///
resources: An array of strings containing the resources required for the appointment. The array is limited to 100 entries.
///
subject: A string containing the subject of the appointment. Limited to 255 characters.
///
body: The body of the appointment message. Limited to 32 Kb.
///
};
this.convertToLocalClientTime = function (timeValue) {
///Gets a dictionary containing time information in local client time.
///The date and time to convert.
}
this.convertToUtcClientTime = function (input) {
///Get s Date object from a dictionary containing time information.
///A dictionary containing a date. The dictionary should contain the following fields: year, month, date, hours, minutes, seconds, time zone, time zone offset.
}
this.getCallbackTokenAsync = function (callback, userContext) {
///Gets a token that can be used to retrieve attachments for the current item. This method is only available in read mode.
///The method to call when the asynchronous method is complete.
///Any state data that is passed to the asynchronous method.
var result = new Office._Mailbox_AsyncResult("getCallbackTokenAsync");
callback(result);
}
this.getUserIdentityTokenAsync = function (callback, userContext) {
///Gets a token identifying the user and the mail app for Outlook.
///The method to call when the asynchronous load method is complete.
///Any state data that is passed to the asynchronous method.
var result = new Office._Mailbox_AsyncResult("getUserIdentityTokenAsync");
callback(result);
};
this.makeEwsRequestAsync = function (data, callback, userContext) {
///Gets a token identifying the user and the mail app for Outlook.
///Makes an asynchronous request to an Exchange Web Services (EWS) service on the Microsoft Exchange Server 2013 Preview that hosts the mail app for Outlook.
///The method to call when the asynchronous load method is complete.
///Any state data that is passed to the asynchronous method.
var result = new Office._Mailbox_AsyncResult("makeEwsRequestAsync");
callback(result);
};
}
Office._context_mailbox_diagnostics = function () {
///Gets a string containing the name of the host application for the mail app.
///Gets a string containing the version of either the host application or the Exchange server.
///Gets a string containing the current view of the Outlook Web App.
this.hostName = {};
this.hostVersion = {};
this.OWAView = {};
}
Office._context_mailbox_item_attachmentDetails = function () {
/// Indicates whether the attachment is an Exchange item or file.
/// The MIME content type of the attachment.
/// The Exchange Web Services (EWS) attachment identifer for the attachment.
/// true if the attachment is inline, otherwise, false.
/// The name of the attachment.
/// Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult("bodyGetTypeAsync");
if (arguments.length == 1) { callback = options; }
callback(result);
};
this.prependAsync = function (data, options, callback) {
///Sets the body of a message or meeting.
///The text to insert at the beginning of the item body. The string is limited to 1,000,000 characters.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult();
if (arguments.length == 2) { callback = options; }
callback(result);
};
this.setSelectedDataAsync = function (data, options, callback) {
///Replaces the selection in the body with the specified text.
///The text to insert in the item body. The string is limited to 1,000,000 characters.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult();
if (arguments.length == 2) { callback = options; }
callback(result);
};
}
Office._context_mailbox_item_contact = function () {
///Gets the mailing and street addresses associated with a contact.
///Gets the name of the business associated with a contact.
///Gets the SMTP email addresses associated with a contact.
///Gets the name of the person associated with a contact.
///Gets the phone numbers associated with a contact.
///Get the list of Internet URLs associated with a contact.
this.addresses = new Array("");
this.businessName = {};
this.emailAddresses = new Array("");
this.personName = {};
this.phoneNumbers = new Array(new Office._context_mailbox_item_phoneNumber());
this.urls = new Array("");
}
Office._context_mailbox_item_customProperties = function () {
this.get = function (name) {
///Gets the value of the specicifed custom property.
///The name of the custom property to be returned.
}
this.remove = function (name) {
///Removes the specicifed custom property.
///The name of the custom property to be removed.
}
this.saveAsync = function (callback, userContext) {
///Saves item-specific custom properties to the Exchange server.
///The method to call when an asynchronous call is complete.
///Any state data that is passed to the callback method.
}
this.set = function (name, value) {
///Sets the value of the specicifed custom property.
///The name of the custom property to be set.
///The value of the custom property to be set.
}
}
Office._context_mailbox_item_emailAddressDetails = function () {
///One of the ResponseType enumeration values.
///Gets the display name associated with the email address.
///Gets the SMTP email address.
///One of the RecipientType enumeration values.
this.appointmentResponse = {};
this.displayName = {};
this.emailAddress = {};
this.recipientType = {};
}
Office._context_mailbox_item_emailUser = function () {
///Gets the name associated with an email account.
this.name = {};
///Gets the SMTP email address of the email account.
this.userId = {};
}
Office._context_mailbox_item_entities = function () {
///Gets the physical addresses (street or mailing address) found in an email message or appointment.
///Gets the contacts found in an email message or appointment.
///Gets the email addresses found in an email message or appointment.
///Gets the meeting suggestions found in an email message or appointment.
///Gets the phone numbers found in an email message or appointment.
///Gets the task suggestions found in an email message or appointment.
///Gets the Internet URLs found in an email message or appointment.
this.addresses = new Array("");
this.contacts = new Array(new Office._context_mailbox_item_contact());
this.emailAddresses = new Array("");
this.meetingSuggestions = new Array(new Office._context_mailbox_item_meetingSuggestion());
this.phoneNumbers = new Array(new Office._context_mailbox_item_phoneNumber());
this.taskSuggestions = new Array(new Office._context_mailbox_item_taskSuggestion());
this.urls = new Array("");
}
Office._context_mailbox_item_location = function () {
this.getAsync = function (options, callback) {
///Gets the location of an appointment.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult("locationGetAsync");
if (arguments.length == 1) { callback = options; }
callback(result);
};
this.setAsync = function (location, options, callback) {
///Sets the subject of an item.
///The location of the appointment. The string is limited to 255 characters.
///Any optional parameters or state data passed to the method. Optional.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult();
if (arguments.length == 2) { callback = options; }
callback(result);
}
}
Office._context_mailbox_item_meetingRequest = function () {
///Gets the date and time that a meeting is to end.
///Gets the location of the proposed meeting.
///Gets a list of the optional attendees for the meeting.
///Gets the required attendees for the meeting.
///Gets a list of the resources required for the meeting.
///Gets the date and time that the meeting is to begin.
this.end = new Date;
this.location = {};
this.optionalAttendees = new Array(new Office._context_mailbox_item_emailAddressDetails());
this.requiredAttendees = new Array(new Office._context_mailbox_item_emailAddressDetails());
this.resources = new Array("");
this.start = new Date();
}
Office._context_mailbox_item_meetingSuggestion = function () {
///Gets the attendees for a suggested meeting.
///Gets the date and time that a suggested meeting is to end.
///Gets the location of a suggested meeting.
///Gets a string that was identified as a meeting suggestion.
///Gets the date and time that a suggested meeting is to begin.
///Gets the subject of a suggested meeting.
this.attendees = new Array(new Office._Context_mailbox_item_emailAddressDetails());
this.end = new Date();
this.location = {};
this.meetingString = {};
this.start = new Date();
this.subject = {};
}
Office._context_mailbox_item_recipients = function () {
this.addAsync = function (recipients, options, callback) {
///Adds recipients to an item.
///
/// An array containing the recipients of the item. It can be:
///
An array of strings containing the SMTP email addresses of the recipients.
///
An array of {"diplayName":, "emailAddress":} dictionaries.
///
An array of EmailAddressDetail objects.
///
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult();
if (arguments.length == 2) { callback = options; }
callback(result);
};
this.getAsync = function (options, callback) {
///Gets the list of recipients for the item.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult("recipientGetAsync");
if (arguments.length == 1) { callback = options; }
callback(result);
};
this.setAsync = function (recipients, options, callback) {
///Sets the recipients of an item.
///
/// An array containing the recipients of the item. The array is limited to 100 entries. It can be:
///
An array of strings containing the SMTP email addresses of the recipients.
///
An array of {"diplayName":, "emailAddress":} dictionaries.
///
An array of EmailAddressDetail objects.
///
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult();
if (arguments.length == 2) { callback = options; }
callback(result);
}
}
Office._context_mailbox_item_phoneNumber = function () {
///Gets the text that was identified in an item as a phone number.
///Gets a text string identified as a phone number.
///Gets the type of a phone number.
this.originalPhoneString = {};
this.phoneString = {};
this.type = {};
}
Office._context_mailbox_item_subject = function () {
this.getAsync = function (options, callback) {
///Gets the subject of an item.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult("subjectGetAsync");
if (arguments.length = 1) { callback = options; }
callback(result);
};
this.setAsync = function (data, options, callback) {
///Sets the subject of an item.
///The subject of the item. The string is limited to 255 characters.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult();
if (arguments.length == 2) { callback = options; }
callback(result);
}
}
Office._context_mailbox_item_taskSuggestion = function () {
///Gets the users that should be assigned a suggested task.
///Gets the text of an item that was identified as a task suggestion.
this.assignees = new Array(new Office._context_mailbox_item_emailAddressDetails());
this.taskString = {};
}
Office._context_mailbox_item_time = function () {
this.getAsync = function (options, callback) {
///Gets the UTC value of a time.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult("subjectGetAsync");
if (arguments.length == 1) { callback = options; }
callback(result);
};
this.setAsync = function (dateTime, options, callback) {
///Sets the subject of an item.
///The date and time to set in UTC.
///Any optional parameters or state data passed to the method.
///The method to call when the asynchronous request is complete.
var result = new Office._Mailbox_AsyncResult();
if (arguments.length == 2) { callback = options; }
callback(result);
}
}
Office._context_mailbox_userProfile = function () {
///Gets the user's display name.
///Gets the user's SMTP email address.
///Gets the user's local time zone.
this.displayName = {};
this.emailAddress = {};
this.timeZone = {};
}
Office._context_mailbox_selectedDataResult = function () {
///The selected text.
///Indicates whether the data is from the item's subject line or body.
this.data = {};
this.sourceProperty = {};
}
Office._Mailbox_AsyncResult = function (method) {
///The userContext parameter passed to the callback function.
///Any error that occured while processing the asynchronous request.
///The status of the asynchronous request.
this.asyncContext = {};
this.error = {};
this.status = {};
if (method == "attachmentAsync") {
this.value = {}
intellisense.annotate(this, {
///The identifier of the attachment.
value: null
});
}
if (method == "getCallbackTokenAsync") {
this.value = {};
intellisense.annotate(this, {
///The EWS callback token.
value: null
});
}
if (method == "getUserIdentityTokenAsync") {
this.value = {}
intellisense.annotate(this, {
///A JSON Web token that identifies the current user.
value: null
});
}
if (method == "makeEwsRequestAsync") {
this.value = {};
intellisense.annotate(this, {
///The XML response from the EWS operation.
value: null
});
}
if (method == "loadCustomPropertiesAsync") {
this.value = new Office._context_mailbox_item_customProperties();
intellisense.annotate(this, {
///The custom properties
value: null
});
}
if (method == "bodyGetTypeAsync") {
this.value = {};
annotate(this, {
///A value that indicates whether the body is text or HTML.
value: undefined
});
}
if (method == "locationGetAsync") {
this.value = {};
intellisense.annotate(this, {
///The location of the appointment.
value: undefined
});
}
if (method == "recipientGetAsync") {
this.value = {};
intellisense.annotate(this, {
///An array of EmailAddressDetails objects containt the recipients of the item.
value: undefined
});
}
if (method == "subjectGetAsync") {
this.value = {};
intellisense.annotate(this, {
///The subject of the item.
value: undefined
});
}
if (method == "getSelectedDataAsync") {
this.value = new Office._context_mailbox_selectedDataResult();
intellisense.annotate(this, {
///The selected data.
value:undefined
});
}
}
Office._MailboxEnums = function () {
this.AttachmentType = {
///Specifies that the attachment is a file.
File: "file",
///Specifies that the attachment is an email message, appointment, or task.
Item: "item"
};
this.BodyType = {
///Specifies that the item body is in HTML format.
HTML: "HTML",
///Specifies that the item body is text format.
Text: "text"
};
this.EntityType = {
///Specifies that the entity is a meeting suggestion.
MeetingSuggestion: "meetingSuggestion",
///Specifies that the entity is a task suggestion.
TaskSuggestion: "taskSuggestion",
///Specifies that the entity is a postal address.
Address: "address",
///Specifies that the entity is SMTP email address.
EmailAddress: "emailAddress",
///Specifies that the entity is an Internet URL.
Url: "url",
///Specifies that the entity is US phone number.
PhoneNumber: "phoneNumber",
///Specifies that the entity is a contact.
Contact: "contact"
};
this.ItemType = {
///Specifies a message item. This is an IPM.Note type.
Message: "message",
///Specifies an appointment item. This is an IPM.Appointment type.
Appointment: "appointment"
};
this.SourceProperty = {
///Specifies that the source of the text is the body of an appointment or message.
MailBody: "mailBody",
///Specifies that the source of the text is the subject of an appointment or message.
MailSubject: "mailSubject"
};
this.RecipientType = {
///Specifies that the recipient is not one of the other recipient types.
Other: "other",
///Specifies that the recipient is a distribution list containing a list of email addresses.
DistributionList: "distributionList",
///Specifies that the recipient is an SMTP email address that is on the Exchange server.
User: "user",
///Specifies that the recipient is an SMTP email address that is not on the Exchange server.
ExternalUser: "externalUser"
};
this.ResponseType = {
///Specifies that no response has been received.
None: "none",
///Specifies that you are the meeting organizer.
Organizer: "organizer",
///Specifies that the attendee is tentatively attending.
Tentative: "tentative",
///Specifies that the attendee is attending.
Accepted: "accepted",
///Specifies that the attendee is not attending.
Declined: "declined"
};
};