mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-05 01:30:17 +00:00
[office-js-preview] (Outlook) Add masterCategories
This commit is contained in:
155
types/office-js-preview/index.d.ts
vendored
155
types/office-js-preview/index.d.ts
vendored
@@ -16912,6 +16912,21 @@ declare namespace Office {
|
||||
* `ItemCompose`, `ItemRead`, `MessageCompose`, `MessageRead`, `AppointmentCompose`, `AppointmentRead`
|
||||
*/
|
||||
item: Item & ItemCompose & ItemRead & MessageRead & MessageCompose & AppointmentRead & AppointmentCompose;
|
||||
/**
|
||||
* Gets an object that provides methods to manage the categories master list associated with a mailbox.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
*
|
||||
* <table>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadMailbox</td></tr>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or Read</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
masterCategories: MasterCategories;
|
||||
/**
|
||||
* Gets the URL of the REST endpoint for this email account.
|
||||
*
|
||||
@@ -17400,7 +17415,8 @@ declare namespace Office {
|
||||
* Represents the categories on an item.
|
||||
*
|
||||
* In Outlook, a user can group messages and appointments by using a category to color-code them.
|
||||
* The user defines categories in a master list on their mailbox. They can then apply one or more categories to an item.
|
||||
* The user defines {@link MasterCategories | categories in a master list} on their mailbox.
|
||||
* They can then apply one or more categories to an item.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
@@ -17555,6 +17571,143 @@ declare namespace Office {
|
||||
color: Office.MailboxEnums.CategoryColor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the categories master list on the mailbox.
|
||||
*
|
||||
* In Outlook, a user can group messages and appointments by using a category to color-code them.
|
||||
* The user defines categories in a master list on their mailbox. They can then apply one or more categories to an item.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
* <table>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadMailbox</td></tr>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or Read</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
interface MasterCategories {
|
||||
/**
|
||||
* Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color.
|
||||
*
|
||||
* @param categories - The categories to be added to the master list on the mailbox.
|
||||
* @param options - Optional. An object literal that contains one or more of the following properties.
|
||||
* asyncContext: Developers can provide any object they wish to access in the callback method.
|
||||
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
|
||||
* type Office.AsyncResult.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
* <table>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadWriteMailbox</td></tr>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or Read</td></tr>
|
||||
* <tr><td>Errors</td><td>DuplicateCategory - One of the categories provided is already in the master category list.</td></tr>
|
||||
* <tr><td></td><td>PermissionDenied - The user does not have permission to perform this action.</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
addAsync(categories: CategoryDetails[], options?: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
||||
/**
|
||||
* Adds categories to the master list on a mailbox. Each category must have a unique name but multiple categories can use the same color.
|
||||
*
|
||||
* @param categories - The categories to be added to the master list on the mailbox.
|
||||
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
|
||||
* type Office.AsyncResult. If adding categories fails, the asyncResult.error property will contain an error code.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
* <table>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadWriteMailbox</td></tr>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or Read</td></tr>
|
||||
* <tr><td>Errors</td><td>DuplicateCategory - One of the categories provided is already in the master category list.</td></tr>
|
||||
* <tr><td></td><td>PermissionDenied - The user does not have permission to perform this action.</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
addAsync(categories: CategoryDetails[], callback: (asyncResult: Office.AsyncResult<void>) => void): void;
|
||||
/**
|
||||
* Gets the master list of categories on a mailbox.
|
||||
*
|
||||
* @param options - An object literal that contains one or more of the following properties.
|
||||
* asyncContext: Developers can provide any object they wish to access in the callback method.
|
||||
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
|
||||
* type Office.AsyncResult. If adding categories fails, the asyncResult.error property will contain an error code.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
* <table>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadMailbox</td></tr>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or Read</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
getAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<CategoryDetails[]>) => void): void;
|
||||
/**
|
||||
* Gets the master list of categories on a mailbox.
|
||||
*
|
||||
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
|
||||
* type Office.AsyncResult.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
* <table>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadMailbox</td></tr>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or Read</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
getAsync(callback: (asyncResult: Office.AsyncResult<CategoryDetails[]>) => void): void;
|
||||
/**
|
||||
* Removes categories from the master list on a mailbox.
|
||||
*
|
||||
* @param categories - The categories to be removed from the master list on the mailbox.
|
||||
* @param options - Optional. An object literal that contains one or more of the following properties.
|
||||
* asyncContext: Developers can provide any object they wish to access in the callback method.
|
||||
* @param callback - Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of
|
||||
* type Office.AsyncResult. If removing categories fails, the asyncResult.error property will contain an error code.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
* <table>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadWriteMailbox</td></tr>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or Read</td></tr>
|
||||
* <tr><td>Errors</td><td>PermissionDenied - The user does not have permission to perform this action.</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
removeAsync(categories: CategoryDetails[], options?: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
|
||||
/**
|
||||
* Removes categories from the master list on a mailbox.
|
||||
*
|
||||
* @param categories - The categories to be removed from the master list on the mailbox.
|
||||
* @param callback - When the method completes, the function passed in the callback parameter is called with a single parameter of
|
||||
* type Office.AsyncResult. If removing categories fails, the asyncResult.error property will contain an error code.
|
||||
*
|
||||
* [Api set: Mailbox Preview]
|
||||
*
|
||||
* @remarks
|
||||
* <table>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/understanding-outlook-add-in-permissions | Minimum permission level}</td><td>ReadWriteMailbox</td></tr>
|
||||
* <tr><td>{@link https://docs.microsoft.com/outlook/add-ins/#extension-points | Applicable Outlook mode}</td><td>Compose or Read</td></tr>
|
||||
* <tr><td>Errors</td><td>PermissionDenied - The user does not have permission to perform this action.</td></tr>
|
||||
* </table>
|
||||
*
|
||||
* @beta
|
||||
*/
|
||||
removeAsync(categories: CategoryDetails[], callback: (asyncResult: Office.AsyncResult<void>) => void): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a suggested meeting found in an item. Read mode only.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user