-
Notifications
You must be signed in to change notification settings - Fork 63
/
office.notificationmessagedetails.yml
131 lines (109 loc) · 4.47 KB
/
office.notificationmessagedetails.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
### YamlMime:TSType
name: Office.NotificationMessageDetails
uid: 'outlook!Office.NotificationMessageDetails:interface'
package: outlook!
fullName: Office.NotificationMessageDetails
summary: An array of `NotificationMessageDetails` objects are returned by the `NotificationMessages.getAllAsync` method.
remarks: >-
\[ [API set: Mailbox 1.3](/javascript/api/requirement-sets/outlook/outlook-api-requirement-sets) \]
**[Minimum permission
level](https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions)<!-- -->**:
**read item**
**[Applicable Outlook
mode](https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points)<!-- -->**:
Compose or Read
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/35-notifications/add-getall-remove.yaml
// Gets all the notification messages and their keys for the current mail item.
Office.context.mailbox.item.notificationMessages.getAllAsync((asyncResult) => {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
console.log(asyncResult.error.message);
return;
}
console.log(asyncResult.value);
});
```
isPreview: false
isDeprecated: false
type: interface
properties:
- name: icon
uid: 'outlook!Office.NotificationMessageDetails#icon:member'
package: outlook!
fullName: icon
summary: >-
A reference to an icon that is defined in the manifest. It appears in the infobar area. It is applicable if the
type is `InformationalMessage`<!-- -->, and is required if the type is `InsightMessage`<!-- -->. Specifying this
parameter for an unsupported type results in an exception.
**Note**: At present, the custom icon is displayed in Outlook on Windows only and not on other clients (e.g.,
Mac, web browser).
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'icon?: string;'
return:
type: string
- name: key
uid: 'outlook!Office.NotificationMessageDetails#key:member'
package: outlook!
fullName: key
summary: The identifier for the notification message.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'key?: string;'
return:
type: string
- name: message
uid: 'outlook!Office.NotificationMessageDetails#message:member'
package: outlook!
fullName: message
summary: >-
The text of the notification message. Maximum length is 150 characters. If the developer passes in a longer
string, an `ArgumentOutOfRange` exception is thrown.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'message: string;'
return:
type: string
- name: persistent
uid: 'outlook!Office.NotificationMessageDetails#persistent:member'
package: outlook!
fullName: persistent
summary: >-
Specifies if the message should be persistent. Only applicable when type is `InformationalMessage`<!-- -->. If
true, the message remains until removed by this add-in or dismissed by the user. If false, it is removed when the
user navigates to a different item. For error notifications, the message persists until the user sees it once.
Specifying this parameter for an unsupported type throws an exception.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'persistent?: Boolean;'
return:
type: Boolean
- name: type
uid: 'outlook!Office.NotificationMessageDetails#type:member'
package: outlook!
fullName: type
summary: >-
Specifies the `ItemNotificationMessageType` of message.
If type is `ProgressIndicator` or `ErrorMessage`<!-- -->, an icon is automatically supplied and the message is not
persistent. Therefore the icon and persistent properties are not valid for these types of messages. Including them
will result in an `ArgumentException`<!-- -->.
If type is `ProgressIndicator`<!-- -->, the developer should remove or replace the progress indicator when the
action is complete.
**Important**: Only the `InformationalMessage` type is supported in Outlook on Android and on iOS.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'type: MailboxEnums.ItemNotificationMessageType | string;'
return:
type: '<xref uid="outlook!Office.MailboxEnums.ItemNotificationMessageType:enum" /> | string'