mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 06:40:35 +08:00
Merge pull request #26327 from AlexJerabek/AlexJ-OutlookMigration
Office.js: Removing redundant mode guidance and documenting reply form types
This commit is contained in:
186
types/office-js/index.d.ts
vendored
186
types/office-js/index.d.ts
vendored
@@ -6432,49 +6432,12 @@ declare namespace Office {
|
||||
}
|
||||
|
||||
/**
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation).
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information.
|
||||
*/
|
||||
interface Appointment extends Item {
|
||||
/**
|
||||
* Gets or sets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. Read and compose modes for appointment items. Read mode for meeting request items.
|
||||
*
|
||||
* The recurrence property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance in a series. null is returned for single appointments and meeting requests of single appointments. undefined is returned for messages that are not meeting requests.
|
||||
*
|
||||
* Note: Meeting requests have an itemClass value of IPM.Schedule.Meeting.Request.
|
||||
*
|
||||
* Note: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single appointment and NOT a part of a series.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* Minimum permission level: ReadItem
|
||||
*
|
||||
* Applicable Outlook mode: Compose or read
|
||||
*/
|
||||
recurrence: Recurrence;
|
||||
|
||||
/**
|
||||
* Gets the id of the series that an instance belongs to.
|
||||
*
|
||||
* In OWA and Outlook, the seriesId returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. However, in iOS and Android, the seriesId returns the REST ID of the parent item.
|
||||
*
|
||||
* Note: The identifier returned by the seriesId property is the same as the Exchange Web Services item identifier. The seriesId property is not identical to the Outlook IDs used by the Outlook REST API. Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. For more details, see [Use the Outlook REST APIs from an Outlook add-in](https://docs.microsoft.com/outlook/add-ins/use-rest-api).
|
||||
*
|
||||
* The seriesId property returns null for items that do not have parent items such as single appointments, series items, or meeting requests and returns undefined for any other items that are not meeting requests.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* Minimum permission level: ReadItem
|
||||
*
|
||||
* Applicable Outlook mode: Compose or read
|
||||
*/
|
||||
seriesId: string;
|
||||
}
|
||||
/**
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation).
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information.
|
||||
*/
|
||||
interface AppointmentCompose extends Appointment, ItemCompose {
|
||||
/**
|
||||
@@ -6567,14 +6530,29 @@ declare namespace Office {
|
||||
start: Time;
|
||||
}
|
||||
/**
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation).
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information.
|
||||
*/
|
||||
interface AppointmentRead extends Appointment, ItemRead {
|
||||
/**
|
||||
* Gets the date and time that the appointment is to end.
|
||||
*
|
||||
* The end property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the convertToLocalClientTime method to convert the end property value to the client's local date and time.
|
||||
*
|
||||
* The end property returns a Date object.
|
||||
*
|
||||
* When you use the Time.setAsync method to set the end time, you should use the convertToUtcClientTime method to convert the local time on the client to UTC for the server.
|
||||
*
|
||||
* [Api set: Mailbox 1.0]
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* Minimum permission level: ReadItem
|
||||
*
|
||||
* Applicable Outlook mode: Compose or read
|
||||
*/
|
||||
end: Date;
|
||||
/**
|
||||
* Gets or sets the location of an appointment.
|
||||
*
|
||||
* *Read mode*
|
||||
* Gets the location of an appointment.
|
||||
*
|
||||
* The location property returns a string that contains the location of the appointment.
|
||||
*
|
||||
@@ -6590,8 +6568,6 @@ declare namespace Office {
|
||||
/**
|
||||
* Provides access to the optional attendees of an event. The type of object and level of access depends on the mode of the current item.
|
||||
*
|
||||
* *Read mode*
|
||||
*
|
||||
* The optionalAttendees property returns an array that contains an EmailAddressDetails object for each optional attendee to the meeting.
|
||||
*
|
||||
* [Api set: Mailbox 1.0]
|
||||
@@ -6618,8 +6594,6 @@ declare namespace Office {
|
||||
/**
|
||||
* Provides access to the required attendees of an event. The type of object and level of access depends on the mode of the current item.
|
||||
*
|
||||
* *Read mode*
|
||||
*
|
||||
* The requiredAttendees property returns an array that contains an EmailAddressDetails object for each required attendee to the meeting.
|
||||
*
|
||||
* [Api set: Mailbox 1.0]
|
||||
@@ -6632,12 +6606,10 @@ declare namespace Office {
|
||||
*/
|
||||
requiredAttendees: EmailAddressDetails[];
|
||||
/**
|
||||
* Gets or sets the date and time that the appointment is to begin.
|
||||
* Gets the date and time that the appointment is to begin.
|
||||
*
|
||||
* The start property is expressed as a Coordinated Universal Time (UTC) date and time value. You can use the convertToLocalClientTime method to convert the value to the client's local date and time.
|
||||
*
|
||||
* *Read mode*
|
||||
*
|
||||
* The start property returns a Date object.
|
||||
*
|
||||
* [Api set: Mailbox 1.0]
|
||||
@@ -6650,6 +6622,7 @@ declare namespace Office {
|
||||
*/
|
||||
start: Date;
|
||||
}
|
||||
|
||||
interface AppointmentForm {
|
||||
/**
|
||||
* Gets an object that provides methods for manipulating the body of an item.
|
||||
@@ -6871,6 +6844,44 @@ declare namespace Office {
|
||||
*/
|
||||
notificationMessages: NotificationMessages;
|
||||
|
||||
/**
|
||||
* Gets or sets the recurrence pattern of an appointment. Gets the recurrence pattern of a meeting request. Read and compose modes for appointment items. Read mode for meeting request items.
|
||||
*
|
||||
* The recurrence property returns a recurrence object for recurring appointments or meetings requests if an item is a series or an instance in a series. null is returned for single appointments and meeting requests of single appointments. undefined is returned for messages that are not meeting requests.
|
||||
*
|
||||
* Note: Meeting requests have an itemClass value of IPM.Schedule.Meeting.Request.
|
||||
*
|
||||
* Note: If the recurrence object is null, this indicates that the object is a single appointment or a meeting request of a single appointment and NOT a part of a series.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* Minimum permission level: ReadItem
|
||||
*
|
||||
* Applicable Outlook mode: Compose or read
|
||||
*/
|
||||
recurrence: Recurrence;
|
||||
|
||||
/**
|
||||
* Gets the id of the series that an instance belongs to.
|
||||
*
|
||||
* In OWA and Outlook, the seriesId returns the Exchange Web Services (EWS) ID of the parent (series) item that this item belongs to. However, in iOS and Android, the seriesId returns the REST ID of the parent item.
|
||||
*
|
||||
* Note: The identifier returned by the seriesId property is the same as the Exchange Web Services item identifier. The seriesId property is not identical to the Outlook IDs used by the Outlook REST API. Before making REST API calls using this value, it should be converted using Office.context.mailbox.convertToRestId. For more details, see [Use the Outlook REST APIs from an Outlook add-in](https://docs.microsoft.com/outlook/add-ins/use-rest-api).
|
||||
*
|
||||
* The seriesId property returns null for items that do not have parent items such as single appointments, series items, or meeting requests and returns undefined for any other items that are not meeting requests.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* Minimum permission level: ReadItem
|
||||
*
|
||||
* Applicable Outlook mode: Compose or read
|
||||
*/
|
||||
seriesId: string;
|
||||
|
||||
/**
|
||||
* Adds an event handler for a supported event.
|
||||
*
|
||||
@@ -6972,7 +6983,7 @@ declare namespace Office {
|
||||
removeHandlerAsync(eventType:EventType, handler: any, callback?: (result: AsyncResult) => void): void;
|
||||
}
|
||||
/**
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation).
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information.
|
||||
*/
|
||||
interface ItemCompose extends Item {
|
||||
/**
|
||||
@@ -6980,8 +6991,6 @@ declare namespace Office {
|
||||
*
|
||||
* The subject property gets or sets the entire subject of the item, as sent by the email server.
|
||||
*
|
||||
* *Compose mode*
|
||||
*
|
||||
* The subject property returns a Subject object that provides methods to get and set the subject.
|
||||
*
|
||||
* [Api set: Mailbox 1.0]
|
||||
@@ -7568,7 +7577,7 @@ declare namespace Office {
|
||||
setSelectedDataAsync(data: string, callback: (result: AsyncResult) => void): void;
|
||||
}
|
||||
/**
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation).
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information.
|
||||
*/
|
||||
interface ItemRead extends Item {
|
||||
/**
|
||||
@@ -7638,12 +7647,10 @@ declare namespace Office {
|
||||
*/
|
||||
normalizedSubject: string;
|
||||
/**
|
||||
* Gets or sets the description that appears in the subject field of an item.
|
||||
* Gets the description that appears in the subject field of an item.
|
||||
*
|
||||
* The subject property gets or sets the entire subject of the item, as sent by the email server.
|
||||
*
|
||||
* *Read mode*
|
||||
*
|
||||
* The subject property returns a string. Use the normalizedSubject property to get the subject minus any leading prefixes such as RE: and FW:.
|
||||
*
|
||||
* [Api set: Mailbox 1.0]
|
||||
@@ -7675,14 +7682,7 @@ declare namespace Office {
|
||||
*
|
||||
* @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB
|
||||
* OR
|
||||
* An object that contains body or attachment data and a callback function
|
||||
* htmlBody: A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB.
|
||||
* attachments: An array of JSON objects that are either file or item attachments.
|
||||
* attachments.type: Indicates the type of attachment. Must be file for a file attachment or item for an item attachment.
|
||||
* attachments.name: A string that contains the name of the attachment, up to 255 characters in length.
|
||||
* attachments.url: Only used if type is set to file. The URI of the location for the file.
|
||||
* attachments.isLine: Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the attachment list.
|
||||
* attachments.itemId: Only used if type is set to item. The EWS item id of the attachment. This is a string up to 100 characters.
|
||||
* A ReplyFormData object that contains body or attachment data and a callback function
|
||||
*/
|
||||
displayReplyAllForm(formData: string | ReplyFormData): void;
|
||||
/**
|
||||
@@ -7706,14 +7706,7 @@ declare namespace Office {
|
||||
*
|
||||
* @param formData A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB.
|
||||
* OR
|
||||
* An object that contains body or attachment data and a callback function. The object is defined as follows.
|
||||
* htmlBody: A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB.
|
||||
* attachments: An array of JSON objects that are either file or item attachments.
|
||||
* attachments.type: Indicates the type of attachment. Must be file for a file attachment or item for an item attachment.
|
||||
* attachments.name: A string that contains the name of the attachment, up to 255 characters in length.
|
||||
* attachments.url: Only used if type is set to file. The URI of the location for the file.
|
||||
* attachments.isLine: Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the attachment list.
|
||||
* attachments.itemId: Only used if type is set to item. The EWS item id of the attachment. This is a string up to 100 characters.
|
||||
* A ReplyFormData object that contains body or attachment data and a callback function.
|
||||
*/
|
||||
displayReplyForm(formData: string | ReplyFormData): void;
|
||||
/**
|
||||
@@ -7895,7 +7888,7 @@ declare namespace Office {
|
||||
getSelectedRegExMatches(): any;
|
||||
}
|
||||
/**
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation).
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information.
|
||||
*/
|
||||
interface Message extends Item {
|
||||
/**
|
||||
@@ -7915,8 +7908,9 @@ declare namespace Office {
|
||||
*/
|
||||
conversationId: string;
|
||||
}
|
||||
/**
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation).
|
||||
|
||||
/**
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information.
|
||||
*/
|
||||
interface MessageCompose extends Message, ItemCompose {
|
||||
/**
|
||||
@@ -7966,8 +7960,6 @@ declare namespace Office {
|
||||
/**
|
||||
* Provides access to the recipients on the To line of a message. The type of object and level of access depends on the mode of the current item.
|
||||
*
|
||||
* *Compose mode*
|
||||
*
|
||||
* The to property returns a Recipients object that provides methods to get or update the recipients on the To line of the message.
|
||||
*
|
||||
* [Api set: Mailbox 1.0]
|
||||
@@ -7981,14 +7973,12 @@ declare namespace Office {
|
||||
to: Recipients;
|
||||
}
|
||||
/**
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the [Object Model pages for more information](https://review.docs.microsoft.com/en-us/javascript/office/objectmodel/preview-requirement-set/office-item?branch=AlexJ-OMPreservation).
|
||||
* Important: This is an internal Outlook object, not directly exposed through existing interfaces. You should treat this as a mode of Office.context.mailbox.item. Refer to the Object Model pages for more information.
|
||||
*/
|
||||
interface MessageRead extends Message, ItemRead {
|
||||
/**
|
||||
* Provides access to the Cc (carbon copy) recipients of a message. The type of object and level of access depends on the mode of the current item.
|
||||
*
|
||||
* *Read mode*
|
||||
*
|
||||
* The cc property returns an array that contains an EmailAddressDetails object for each recipient listed on the Cc line of the message. The collection is limited to a maximum of 100 members.
|
||||
*
|
||||
* [Api set: Mailbox 1.0]
|
||||
@@ -8049,8 +8039,6 @@ declare namespace Office {
|
||||
/**
|
||||
* Provides access to the recipients on the To line of a message. The type of object and level of access depends on the mode of the current item.
|
||||
*
|
||||
* *Read mode*
|
||||
*
|
||||
* The to property returns an array that contains an EmailAddressDetails object for each recipient listed on the To line of the message. The collection is limited to a maximum of 100 members.
|
||||
*
|
||||
* [Api set: Mailbox 1.0]
|
||||
@@ -9402,15 +9390,47 @@ declare namespace Office {
|
||||
firstDayOfWeek: MailboxEnums.Days;
|
||||
}
|
||||
|
||||
/**
|
||||
* A file or item attachment. Used when displaying a reply form.
|
||||
*/
|
||||
export interface ReplyFormAttachment {
|
||||
/**
|
||||
* Indicates the type of attachment. Must be file for a file attachment or item for an item attachment.
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* A string that contains the name of the attachment, up to 255 characters in length.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Only used if type is set to file. The URI of the location for the file.
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* Only used if type is set to file. If true, indicates that the attachment will be shown inline in the message body, and should not be displayed in the attachment list.
|
||||
*/
|
||||
inLine?: boolean;
|
||||
/**
|
||||
* Only used if type is set to item. The EWS item id of the attachment. This is a string up to 100 characters.
|
||||
*/
|
||||
itemId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A ReplyFormData object that contains body or attachment data and a callback function. Used when displaying a reply form.
|
||||
*/
|
||||
interface ReplyFormData {
|
||||
/**
|
||||
* A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB.
|
||||
*/
|
||||
htmlBody?: string;
|
||||
/**
|
||||
* An array of ReplyFormAttachments that are either file or item attachments.
|
||||
*/
|
||||
attachments?: ReplyFormAttachment[];
|
||||
/**
|
||||
* When the reply display call completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an AsyncResult object.
|
||||
*/
|
||||
callback?: (result: AsyncResult) => void;
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user