@@ -16,6 +16,8 @@ The `@cap-js/notifications` package is a [CDS plugin](https://cap.cloud.sap/docs
16
16
- [ Simple Notification with title] ( #simple-notification-with-title )
17
17
- [ Simple Notification with title and description] ( #simple-notification-with-title-and-description )
18
18
- [ Custom Notifications] ( #custom-notifications )
19
+ - [ With standard parameters] ( #with-standard-parameters )
20
+ - [ Passing the whole notification object] ( #passing-the-whole-notification-object )
19
21
- [ Sample Application with notifications] ( #sample-application-with-notifications )
20
22
- [ In Local Environment] ( #in-local-environment )
21
23
- [ In Production Environment] ( #in-production-environment )
@@ -109,34 +111,8 @@ alert.notify({
109
111
#### Custom Notifications
110
112
You can use these two signature to send the custom notification with pre-defined notification types.
111
113
112
- #### Passing the whole notification object
113
- By using this approach you need to pass the whole notification object as described in the API documentation
114
- ``` js
115
- alert .notify ({
116
- NotificationTypeKey: ' IncidentCreated' ,
117
- NotificationTypeVersion: ' 1' ,
118
- Priority: ' NEUTRAL' ,
119
- Properties: [
120
- {
121
- Key: ' name' ,
122
- IsSensitive: false ,
123
- Language: ' en' ,
124
- Value: ' Engine overheating' ,
125
- Type: ' String'
126
- },
127
- {
128
- Key: ' customer' ,
129
- IsSensitive: false ,
130
- Language: ' en' ,
131
- Value: ' John' ,
132
- Type: ' String'
133
- }
134
- ],
135
-
136
- });
137
- ```
114
+ ##### With standard parameters
138
115
139
- #### Passing the notification object in parts
140
116
By using this approach you can post a notification by providing different parts of the notification object grouped in related units
141
117
``` js
142
118
alert .notify ({
@@ -191,6 +167,34 @@ Possible parameters:
191
167
* ** navigation** - All navigation related parameters, this argument is optional
192
168
* ** payload** - The rest parameters that can be passed, this argument is optional
193
169
170
+ ##### Passing the whole notification object
171
+
172
+ By using this approach you need to pass the whole notification object as described in the API documentation
173
+ ``` js
174
+ alert .notify ({
175
+ NotificationTypeKey: ' IncidentCreated' ,
176
+ NotificationTypeVersion: ' 1' ,
177
+ Priority: ' NEUTRAL' ,
178
+ Properties: [
179
+ {
180
+ Key: ' name' ,
181
+ IsSensitive: false ,
182
+ Language: ' en' ,
183
+ Value: ' Engine overheating' ,
184
+ Type: ' String'
185
+ },
186
+ {
187
+ Key: ' customer' ,
188
+ IsSensitive: false ,
189
+ Language: ' en' ,
190
+ Value: ' John' ,
191
+ Type: ' String'
192
+ }
193
+ ],
194
+
195
+ });
196
+ ```
197
+
194
198
### Sample Application with notifications
195
199
196
200
#### In Local Environment
0 commit comments