Skip to content

Commit 482ac70

Browse files
[office-js][office-js-preview] (Outlook) Document InitializationContextChanged event (DefinitelyTyped#71472)
1 parent dfb194a commit 482ac70

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

types/office-js-preview/index.d.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,22 @@ declare namespace Office {
652652
* [Api set: Mailbox 1.10]
653653
*/
654654
InfobarClicked,
655+
/**
656+
* Occurs in Outlook when an add-in's task pane is opened from an {@link https://learn.microsoft.com/outlook/actionable-messages | actionable message},
657+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} notification,
658+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts} dialog, or
659+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting} dialog.
660+
* This event prevents an add-in from relaunching if its task pane is already open in Outlook.
661+
*
662+
* **Important**: The `InitializationContextChanged` event can only be handled in a task pane. Function commands can't register a handler for this event.
663+
*
664+
* To add an event handler for the `InitializationContextChanged` event, use the `addHandlerAsync` method of the `Item` object.
665+
* The event handler receives an argument of type
666+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15 | Office.InitializationContextChangedEventArgs}.
667+
*
668+
* [Api set: Mailbox 1.15]
669+
*/
670+
InitializationContextChanged,
655671
/**
656672
* Occurs when a different Outlook item is selected for viewing while the task pane is pinned.
657673
*
@@ -14819,6 +14835,33 @@ declare namespace Office {
1481914835
*/
1482014836
infobarType: MailboxEnums.InfobarType;
1482114837
}
14838+
/**
14839+
* Provides data from an {@link https://learn.microsoft.com/outlook/actionable-messages | actionable message},
14840+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} notification,
14841+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts} dialog, or
14842+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting} dialog when the
14843+
* `Office.EventType.InitializationContextChanged` event occurs.
14844+
*
14845+
* @remarks
14846+
* [Api set: Mailbox 1.15]
14847+
*/
14848+
export interface InitializationContextChangedEventArgs {
14849+
/**
14850+
* Represents the data to be passed to an add-in's task pane from an actionable message, notification message, Smart Alerts dialog, or integrated
14851+
* spam-reporting dialog.
14852+
*
14853+
* @remarks
14854+
* [Api set: Mailbox 1.15]
14855+
*/
14856+
initializationContextData: string;
14857+
/**
14858+
* Represents the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}.
14859+
*
14860+
* @remarks
14861+
* [Api set: Mailbox 1.15]
14862+
*/
14863+
type: "olkInitializationContextChanged";
14864+
}
1482214865
/**
1482314866
* The `InternetHeaders` object represents custom internet headers that are preserved after the message item leaves Exchange
1482414867
* and is converted to a MIME message.

types/office-js/index.d.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,22 @@ declare namespace Office {
652652
* [Api set: Mailbox 1.10]
653653
*/
654654
InfobarClicked,
655+
/**
656+
* Occurs in Outlook when an add-in's task pane is opened from an {@link https://learn.microsoft.com/outlook/actionable-messages | actionable message},
657+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} notification,
658+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts} dialog, or
659+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting} dialog.
660+
* This event prevents an add-in from relaunching if its task pane is already open in Outlook.
661+
*
662+
* **Important**: The `InitializationContextChanged` event can only be handled in a task pane. Function commands can't register a handler for this event.
663+
*
664+
* To add an event handler for the `InitializationContextChanged` event, use the `addHandlerAsync` method of the `Item` object.
665+
* The event handler receives an argument of type
666+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.initializationcontextchangedeventargs?view=outlook-js-1.15 | Office.InitializationContextChangedEventArgs}.
667+
*
668+
* [Api set: Mailbox 1.15]
669+
*/
670+
InitializationContextChanged,
655671
/**
656672
* Occurs when a different Outlook item is selected for viewing while the task pane is pinned.
657673
*
@@ -14505,6 +14521,33 @@ declare namespace Office {
1450514521
*/
1450614522
infobarType: MailboxEnums.InfobarType;
1450714523
}
14524+
/**
14525+
* Provides data from an {@link https://learn.microsoft.com/outlook/actionable-messages | actionable message},
14526+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailboxenums.itemnotificationmessagetype#fields | InsightMessage} notification,
14527+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/onmessagesend-onappointmentsend-events | Smart Alerts} dialog, or
14528+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/spam-reporting | integrated spam-reporting} dialog when the
14529+
* `Office.EventType.InitializationContextChanged` event occurs.
14530+
*
14531+
* @remarks
14532+
* [Api set: Mailbox 1.15]
14533+
*/
14534+
export interface InitializationContextChangedEventArgs {
14535+
/**
14536+
* Represents the data to be passed to an add-in's task pane from an actionable message, notification message, Smart Alerts dialog, or integrated
14537+
* spam-reporting dialog.
14538+
*
14539+
* @remarks
14540+
* [Api set: Mailbox 1.15]
14541+
*/
14542+
initializationContextData: string;
14543+
/**
14544+
* Represents the type of the event. For details, refer to {@link https://learn.microsoft.com/javascript/api/office/office.eventtype | Office.EventType}.
14545+
*
14546+
* @remarks
14547+
* [Api set: Mailbox 1.15]
14548+
*/
14549+
type: "olkInitializationContextChanged";
14550+
}
1450814551
/**
1450914552
* The `InternetHeaders` object represents custom internet headers that are preserved after the message item leaves Exchange
1451014553
* and is converted to a MIME message.

0 commit comments

Comments
 (0)