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