1/*
2 * Copyright (c) 2022-2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License"),
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit NotificationKit
19 */
20
21import { AsyncCallback } from './@ohos.base';
22import { BundleOption as _BundleOption } from './notification/NotificationCommonDef';
23import { NotificationActionButton as _NotificationActionButton } from './notification/notificationActionButton';
24import { NotificationBasicContent as _NotificationBasicContent } from './notification/notificationContent';
25import { NotificationContent as _NotificationContent } from './notification/notificationContent';
26import { NotificationLongTextContent as _NotificationLongTextContent } from './notification/notificationContent';
27import type { NotificationLiveViewContent as _NotificationLiveViewContent } from './notification/notificationContent';
28import { NotificationMultiLineContent as _NotificationMultiLineContent } from './notification/notificationContent';
29import { NotificationPictureContent as _NotificationPictureContent } from './notification/notificationContent';
30import type { LiveViewStatus as _LiveViewStatus } from './notification/notificationContent';
31import { NotificationSystemLiveViewContent as _NotificationSystemLiveViewContent } from './notification/notificationContent';
32import { NotificationCapsule as _NotificationCapsule } from './notification/notificationContent';
33import { NotificationButton as _NotificationButton } from './notification/notificationContent';
34import { NotificationTime as _NotificationTime } from './notification/notificationContent';
35import { NotificationProgress as _NotificationProgress } from './notification/notificationContent';
36import { NotificationFlags as _NotificationFlags } from './notification/notificationFlags';
37import { NotificationFlagStatus as _NotificationFlagStatus } from './notification/notificationFlags';
38import { NotificationRequest as _NotificationRequest } from './notification/notificationRequest';
39import { UnifiedGroupInfo as _UnifiedGroupInfo } from './notification/notificationRequest';
40import { DistributedOptions as _DistributedOptions } from './notification/notificationRequest';
41import type { NotificationFilter as _NotificationFilter } from './notification/notificationRequest';
42import type { NotificationCheckRequest as _NotificationCheckRequest } from './notification/notificationRequest';
43import { NotificationSlot as _NotificationSlot } from './notification/notificationSlot';
44import { NotificationSorting as _NotificationSorting } from './notification/notificationSorting';
45import { NotificationTemplate as _NotificationTemplate } from './notification/notificationTemplate';
46import { NotificationUserInput as _NotificationUserInput } from './notification/notificationUserInput';
47import type UIAbilityContext from './application/UIAbilityContext';
48
49/**
50 * Manages notifications.
51 * <p>Generally, only system applications have permissions on notification subscription and unsubscribe.
52 * You can specify the content of a notification to be published and the content is carried by
53 * {@link NotificationRequest}. A notification ID is unique in an application and must be specified
54 * when using {@link NotificationRequest} to carry the notification content. If a notification
55 * with this ID has been published and you need to use this ID to publish another notification,
56 * the original notification will be updated. In addition, the notification ID can be used to cancel
57 * a notification by calling the {@link #cancel(int)} method.
58 *
59 * @namespace notificationManager
60 * @syscap SystemCapability.Notification.Notification
61 * @since 9
62 */
63/**
64 * Manages notifications.
65 * <p>Generally, only system applications have permissions on notification subscription and unsubscribe.
66 * You can specify the content of a notification to be published and the content is carried by
67 * {@link NotificationRequest}. A notification ID is unique in an application and must be specified
68 * when using {@link NotificationRequest} to carry the notification content. If a notification
69 * with this ID has been published and you need to use this ID to publish another notification,
70 * the original notification will be updated. In addition, the notification ID can be used to cancel
71 * a notification by calling the {@link #cancel(int)} method.
72 *
73 * @namespace notificationManager
74 * @syscap SystemCapability.Notification.Notification
75 * @crossplatform
76 * @atomicservice
77 * @since 12
78 */
79declare namespace notificationManager {
80  /**
81   * Publishes a notification.
82   * <p>If a notification with the same ID has been published by the current application and has not been deleted,
83   * this method will update the notification.
84   *
85   * @param { NotificationRequest } request - notification request
86   * @param { AsyncCallback<void> } callback - The callback of publish.
87   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
88   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
89   * @throws { BusinessError } 1600001 - Internal error.
90   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
91   * @throws { BusinessError } 1600003 - Failed to connect to the service.
92   * @throws { BusinessError } 1600004 - Notification disabled.
93   * @throws { BusinessError } 1600005 - Notification slot disabled.
94   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
95   * @throws { BusinessError } 1600012 - No memory space.
96   * @syscap SystemCapability.Notification.Notification
97   * @since 9
98   */
99  /**
100   * Publishes a notification.
101   * <p>If a notification with the same ID has been published by the current application and has not been deleted,
102   * this method will update the notification.
103   *
104   * @param { NotificationRequest } request - notification request
105   * @param { AsyncCallback<void> } callback - The callback of publish.
106   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
107   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
108   * @throws { BusinessError } 1600001 - Internal error.
109   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
110   * @throws { BusinessError } 1600003 - Failed to connect to the service.
111   * @throws { BusinessError } 1600004 - Notification disabled.
112   * @throws { BusinessError } 1600005 - Notification slot disabled.
113   * @throws { BusinessError } 1600007 - The notification does not exist.
114   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
115   * @throws { BusinessError } 1600012 - No memory space.
116   * @throws { BusinessError } 1600014 - No permission.
117   * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
118   * @throws { BusinessError } 1600016 - The notification version for this update is too low.
119   * @throws { BusinessError } 2300007 - Network unreachable.
120   * @syscap SystemCapability.Notification.Notification
121   * @since 11
122   */
123  /**
124   * Publishes a notification.
125   * <p>If a notification with the same ID has been published by the current application and has not been deleted,
126   * this method will update the notification.
127   *
128   * @param { NotificationRequest } request - notification request
129   * @param { AsyncCallback<void> } callback - The callback of publish.
130   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
131   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
132   * @throws { BusinessError } 1600001 - Internal error.
133   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
134   * @throws { BusinessError } 1600003 - Failed to connect to the service.
135   * @throws { BusinessError } 1600004 - Notification disabled.
136   * @throws { BusinessError } 1600005 - Notification slot disabled.
137   * @throws { BusinessError } 1600007 - The notification does not exist.
138   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
139   * @throws { BusinessError } 1600012 - No memory space.
140   * @throws { BusinessError } 1600014 - No permission.
141   * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
142   * @throws { BusinessError } 1600016 - The notification version for this update is too low.
143   * @throws { BusinessError } 2300007 - Network unreachable.
144   * @syscap SystemCapability.Notification.Notification
145   * @crossplatform
146   * @since 12
147   */
148  function publish(request: NotificationRequest, callback: AsyncCallback<void>): void;
149
150  /**
151   * Publishes a notification.
152   * <p>If a notification with the same ID has been published by the current application and has not been deleted,
153   * this method will update the notification.
154   *
155   * @param { NotificationRequest } request - notification request
156   * @returns { Promise<void> } The promise returned by the function.
157   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
158   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
159   * @throws { BusinessError } 1600001 - Internal error.
160   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
161   * @throws { BusinessError } 1600003 - Failed to connect to the service.
162   * @throws { BusinessError } 1600004 - Notification disabled.
163   * @throws { BusinessError } 1600005 - Notification slot disabled.
164   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
165   * @throws { BusinessError } 1600012 - No memory space.
166   * @syscap SystemCapability.Notification.Notification
167   * @since 9
168   */
169  /**
170   * Publishes a notification.
171   * <p>If a notification with the same ID has been published by the current application and has not been deleted,
172   * this method will update the notification.
173   *
174   * @param { NotificationRequest } request - notification request
175   * @returns { Promise<void> } The promise returned by the function.
176   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
177   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
178   * @throws { BusinessError } 1600001 - Internal error.
179   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
180   * @throws { BusinessError } 1600003 - Failed to connect to the service.
181   * @throws { BusinessError } 1600004 - Notification disabled.
182   * @throws { BusinessError } 1600005 - Notification slot disabled.
183   * @throws { BusinessError } 1600007 - The notification does not exist.
184   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
185   * @throws { BusinessError } 1600012 - No memory space.
186   * @throws { BusinessError } 1600014 - No permission.
187   * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
188   * @throws { BusinessError } 1600016 - The notification version for this update is too low.
189   * @throws { BusinessError } 2300007 - Network unreachable.
190   * @syscap SystemCapability.Notification.Notification
191   * @since 11
192   */
193  /**
194   * Publishes a notification.
195   * <p>If a notification with the same ID has been published by the current application and has not been deleted,
196   * this method will update the notification.
197   *
198   * @param { NotificationRequest } request - notification request
199   * @returns { Promise<void> } The promise returned by the function.
200   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
201   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
202   * @throws { BusinessError } 1600001 - Internal error.
203   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
204   * @throws { BusinessError } 1600003 - Failed to connect to the service.
205   * @throws { BusinessError } 1600004 - Notification disabled.
206   * @throws { BusinessError } 1600005 - Notification slot disabled.
207   * @throws { BusinessError } 1600007 - The notification does not exist.
208   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
209   * @throws { BusinessError } 1600012 - No memory space.
210   * @throws { BusinessError } 1600014 - No permission.
211   * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
212   * @throws { BusinessError } 1600016 - The notification version for this update is too low.
213   * @throws { BusinessError } 2300007 - Network unreachable.
214   * @syscap SystemCapability.Notification.Notification
215   * @crossplatform
216   * @since 12
217   */
218  function publish(request: NotificationRequest): Promise<void>;
219
220  /**
221   * Publishes a notification to the specified user.
222   *
223   * @permission ohos.permission.NOTIFICATION_CONTROLLER
224   * @param { NotificationRequest } request - a notification.
225   * @param { number } userId - of subscriber receiving the notification.
226   * @param { AsyncCallback<void> } callback - The callback of publish.
227   * @throws { BusinessError } 201 - Permission denied.
228   * @throws { BusinessError } 202 - Not system application to call the interface.
229   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
230   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
231   * @throws { BusinessError } 1600001 - Internal error.
232   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
233   * @throws { BusinessError } 1600003 - Failed to connect to the service.
234   * @throws { BusinessError } 1600004 - Notification disabled.
235   * @throws { BusinessError } 1600005 - Notification slot disabled.
236   * @throws { BusinessError } 1600008 - The user does not exist.
237   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
238   * @throws { BusinessError } 1600012 - No memory space.
239   * @syscap SystemCapability.Notification.Notification
240   * @systemapi
241   * @since 9
242   */
243  /**
244   * Publishes a notification to the specified user.
245   *
246   * @permission ohos.permission.NOTIFICATION_CONTROLLER
247   * @param { NotificationRequest } request - a notification.
248   * @param { number } userId - of subscriber receiving the notification.
249   * @param { AsyncCallback<void> } callback - The callback of publish.
250   * @throws { BusinessError } 201 - Permission denied.
251   * @throws { BusinessError } 202 - Not system application to call the interface.
252   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
253   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
254   * @throws { BusinessError } 1600001 - Internal error.
255   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
256   * @throws { BusinessError } 1600003 - Failed to connect to the service.
257   * @throws { BusinessError } 1600004 - Notification disabled.
258   * @throws { BusinessError } 1600005 - Notification slot disabled.
259   * @throws { BusinessError } 1600007 - The notification does not exist.
260   * @throws { BusinessError } 1600008 - The user does not exist.
261   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
262   * @throws { BusinessError } 1600012 - No memory space.
263   * @throws { BusinessError } 1600014 - No permission.
264   * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
265   * @throws { BusinessError } 1600016 - The notification version for this update is too low.
266   * @throws { BusinessError } 2300007 - Network unreachable.
267   * @syscap SystemCapability.Notification.Notification
268   * @systemapi
269   * @since 11
270   */
271  function publish(request: NotificationRequest, userId: number, callback: AsyncCallback<void>): void;
272
273  /**
274   * Publishes a notification to the specified user.
275   *
276   * @permission ohos.permission.NOTIFICATION_CONTROLLER
277   * @param { NotificationRequest } request - a notification.
278   * @param { number } userId - of subscriber receiving the notification.
279   * @returns { Promise<void> } The promise returned by the function.
280   * @throws { BusinessError } 201 - Permission denied.
281   * @throws { BusinessError } 202 - Not system application to call the interface.
282   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
283   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
284   * @throws { BusinessError } 1600001 - Internal error.
285   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
286   * @throws { BusinessError } 1600003 - Failed to connect to the service.
287   * @throws { BusinessError } 1600004 - Notification disabled.
288   * @throws { BusinessError } 1600005 - Notification slot disabled.
289   * @throws { BusinessError } 1600008 - The user does not exist.
290   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
291   * @throws { BusinessError } 1600012 - No memory space.
292   * @syscap SystemCapability.Notification.Notification
293   * @systemapi
294   * @since 9
295   */
296  /**
297   * Publishes a notification to the specified user.
298   *
299   * @permission ohos.permission.NOTIFICATION_CONTROLLER
300   * @param { NotificationRequest } request - a notification.
301   * @param { number } userId - of subscriber receiving the notification.
302   * @returns { Promise<void> } The promise returned by the function.
303   * @throws { BusinessError } 201 - Permission denied.
304   * @throws { BusinessError } 202 - Not system application to call the interface.
305   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
306   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
307   * @throws { BusinessError } 1600001 - Internal error.
308   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
309   * @throws { BusinessError } 1600003 - Failed to connect to the service.
310   * @throws { BusinessError } 1600004 - Notification disabled.
311   * @throws { BusinessError } 1600005 - Notification slot disabled.
312   * @throws { BusinessError } 1600007 - The notification does not exist.
313   * @throws { BusinessError } 1600008 - The user does not exist.
314   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
315   * @throws { BusinessError } 1600012 - No memory space.
316   * @throws { BusinessError } 1600014 - No permission.
317   * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
318   * @throws { BusinessError } 1600016 - The notification version for this update is too low.
319   * @throws { BusinessError } 2300007 - Network unreachable.
320   * @syscap SystemCapability.Notification.Notification
321   * @systemapi
322   * @since 11
323   */
324  function publish(request: NotificationRequest, userId: number): Promise<void>;
325
326  /**
327   * Publishes a representative notification.
328   *
329   * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
330   * @param { NotificationRequest } request - a notification.
331   * @param { string } representativeBundle - bundle name of the representative
332   * @param { number } userId - userid of the representative
333   * @param { AsyncCallback<void> } callback - The callback of publishAsBundle.
334   * @throws { BusinessError } 201 - Permission denied.
335   * @throws { BusinessError } 202 - Not system application to call the interface.
336   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
337   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
338   * @throws { BusinessError } 1600001 - Internal error.
339   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
340   * @throws { BusinessError } 1600003 - Failed to connect to the service.
341   * @throws { BusinessError } 1600004 - Notification disabled.
342   * @throws { BusinessError } 1600005 - Notification slot disabled.
343   * @throws { BusinessError } 1600007 - The notification does not exist.
344   * @throws { BusinessError } 1600008 - The user does not exist.
345   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
346   * @throws { BusinessError } 1600012 - No memory space.
347   * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
348   * @throws { BusinessError } 1600016 - The notification version for this update is too low.
349   * @throws { BusinessError } 2300007 - Network unreachable.
350   * @syscap SystemCapability.Notification.Notification
351   * @systemapi
352   * @since 9
353   */
354  function publishAsBundle(
355    request: NotificationRequest,
356    representativeBundle: string,
357    userId: number,
358    callback: AsyncCallback<void>
359  ): void;
360
361  /**
362   * Publishes a representative notification.
363   *
364   * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
365   * @param { NotificationRequest } request - a notification.
366   * @param { string } representativeBundle - bundle name of the representative
367   * @param { number } userId - userid of the representative
368   * @returns { Promise<void> } The promise returned by the function.
369   * @throws { BusinessError } 201 - Permission denied.
370   * @throws { BusinessError } 202 - Not system application to call the interface.
371   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
372   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
373   * @throws { BusinessError } 1600001 - Internal error.
374   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
375   * @throws { BusinessError } 1600003 - Failed to connect to the service.
376   * @throws { BusinessError } 1600004 - Notification disabled.
377   * @throws { BusinessError } 1600005 - Notification slot disabled.
378   * @throws { BusinessError } 1600007 - The notification does not exist.
379   * @throws { BusinessError } 1600008 - The user does not exist.
380   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
381   * @throws { BusinessError } 1600012 - No memory space.
382   * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
383   * @throws { BusinessError } 1600016 - The notification version for this update is too low.
384   * @throws { BusinessError } 2300007 - Network unreachable.
385   * @syscap SystemCapability.Notification.Notification
386   * @systemapi
387   * @since 9
388   */
389  function publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number): Promise<void>;
390
391  /**
392   * Publishes a representative notification.
393   *
394   * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
395   * @param { BundleOption } representativeBundle - bundle option of the representative.
396   * @param { NotificationRequest } request - a notification.
397   * @returns { Promise<void> } The promise returned by the function.
398   * @throws { BusinessError } 201 - Permission denied.
399   * @throws { BusinessError } 202 - Not system application to call the interface.
400   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
401   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
402   * @throws { BusinessError } 1600001 - Internal error.
403   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
404   * @throws { BusinessError } 1600003 - Failed to connect to the service.
405   * @throws { BusinessError } 1600004 - Notification disabled.
406   * @throws { BusinessError } 1600005 - Notification slot disabled.
407   * @throws { BusinessError } 1600007 - The notification does not exist.
408   * @throws { BusinessError } 1600008 - The user does not exist.
409   * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit.
410   * @throws { BusinessError } 1600012 - No memory space.
411   * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations.
412   * @throws { BusinessError } 1600016 - The notification version for this update is too low.
413   * @throws { BusinessError } 2300007 - Network unreachable.
414   * @syscap SystemCapability.Notification.Notification
415   * @systemapi
416   * @since 12
417   */
418  function publishAsBundle(representativeBundle: BundleOption, request: NotificationRequest): Promise<void>;
419
420  /**
421   * Cancel a notification with the specified ID.
422   *
423   * @param { number } id - ID of the notification to cancel, which must be unique in the application.
424   * @param { AsyncCallback<void> } callback - The callback of cancel.
425   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
426   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
427   * @throws { BusinessError } 1600001 - Internal error.
428   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
429   * @throws { BusinessError } 1600003 - Failed to connect to the service.
430   * @throws { BusinessError } 1600007 - The notification does not exist.
431   * @syscap SystemCapability.Notification.Notification
432   * @since 9
433   */
434  /**
435   * Cancel a notification with the specified ID.
436   *
437   * @param { number } id - ID of the notification to cancel, which must be unique in the application.
438   * @param { AsyncCallback<void> } callback - The callback of cancel.
439   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
440   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
441   * @throws { BusinessError } 1600001 - Internal error.
442   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
443   * @throws { BusinessError } 1600003 - Failed to connect to the service.
444   * @throws { BusinessError } 1600007 - The notification does not exist.
445   * @syscap SystemCapability.Notification.Notification
446   * @crossplatform
447   * @since 12
448   */
449  function cancel(id: number, callback: AsyncCallback<void>): void;
450
451  /**
452   * Cancel a notification with the specified label and ID.
453   *
454   * @param { number } id - ID of the notification to cancel, which must be unique in the application.
455   * @param { string } label - Label of the notification to cancel.
456   * @param { AsyncCallback<void> } callback - The callback of cancel.
457   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
458   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
459   * @throws { BusinessError } 1600001 - Internal error.
460   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
461   * @throws { BusinessError } 1600003 - Failed to connect to the service.
462   * @throws { BusinessError } 1600007 - The notification does not exist.
463   * @syscap SystemCapability.Notification.Notification
464   * @since 9
465   */
466  function cancel(id: number, label: string, callback: AsyncCallback<void>): void;
467
468  /**
469   * Cancel a notification with the specified label and ID.
470   *
471   * @param { number } id - ID of the notification to cancel, which must be unique in the application.
472   * @param { string } [label] - Label of the notification to cancel.
473   * @returns { Promise<void> } The promise returned by the function.
474   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
475   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
476   * @throws { BusinessError } 1600001 - Internal error.
477   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
478   * @throws { BusinessError } 1600003 - Failed to connect to the service.
479   * @throws { BusinessError } 1600007 - The notification does not exist.
480   * @syscap SystemCapability.Notification.Notification
481   * @since 9
482   */
483  function cancel(id: number, label?: string): Promise<void>;
484
485  /**
486   * Cancel a notification with the representative and ID.
487   *
488   * @param { BundleOption } representativeBundle - bundle option of the representative.
489   * @param { number } id - ID of the notification to cancel, which must be unique in the application.
490   * @returns { Promise<void> } The promise returned by the function.
491   * @throws { BusinessError } 202 - Not system application to call the interface.
492   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
493   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
494   * @throws { BusinessError } 1600001 - Internal error.
495   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
496   * @throws { BusinessError } 1600003 - Failed to connect to the service.
497   * @throws { BusinessError } 1600007 - The notification does not exist.
498   * @throws { BusinessError } 1600012 - No memory space.
499   * @throws { BusinessError } 1600017 - There is no corresponding agent relationship configuration.
500   * @syscap SystemCapability.Notification.Notification
501   * @systemapi
502   * @since 12
503   */
504  function cancel(representativeBundle: BundleOption, id: number): Promise<void>;
505
506  /**
507   * Cancel a representative notification.
508   *
509   * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
510   * @param { number } id - ID of the notification to cancel, which must be unique in the application.
511   * @param { string } representativeBundle - bundle name of the representative.
512   * @param { number } userId - userid of the representative.
513   * @param { AsyncCallback<void> } callback - The callback of cancelAsBundle.
514   * @throws { BusinessError } 201 - Permission denied.
515   * @throws { BusinessError } 202 - Not system application to call the interface.
516   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
517   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
518   * @throws { BusinessError } 1600001 - Internal error.
519   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
520   * @throws { BusinessError } 1600003 - Failed to connect to the service.
521   * @throws { BusinessError } 1600007 - The notification does not exist.
522   * @throws { BusinessError } 1600008 - The user does not exist.
523   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
524   * @syscap SystemCapability.Notification.Notification
525   * @systemapi
526   * @since 9
527   */
528  function cancelAsBundle(
529    id: number,
530    representativeBundle: string,
531    userId: number,
532    callback: AsyncCallback<void>
533  ): void;
534
535  /**
536   * Cancel a representative notification.
537   *
538   * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
539   * @param { number } id - ID of the notification to cancel, which must be unique in the application.
540   * @param { string } representativeBundle - bundle name of the representative.
541   * @param { number } userId - userid of the representative.
542   * @returns { Promise<void> } The promise returned by the function.
543   * @throws { BusinessError } 201 - Permission denied.
544   * @throws { BusinessError } 202 - Not system application to call the interface.
545   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
546   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
547   * @throws { BusinessError } 1600001 - Internal error.
548   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
549   * @throws { BusinessError } 1600003 - Failed to connect to the service.
550   * @throws { BusinessError } 1600007 - The notification does not exist.
551   * @throws { BusinessError } 1600008 - The user does not exist.
552   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
553   * @syscap SystemCapability.Notification.Notification
554   * @systemapi
555   * @since 9
556   */
557  function cancelAsBundle(id: number, representativeBundle: string, userId: number): Promise<void>;
558
559  /**
560   * Cancel a representative notification.
561   *
562   * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
563   * @param { BundleOption } representativeBundle - bundle option of the representative.
564   * @param { number } id - ID of the notification to cancel, which must be unique in the application.
565   * @returns { Promise<void> } The promise returned by the function.
566   * @throws { BusinessError } 201 - Permission denied.
567   * @throws { BusinessError } 202 - Not system application to call the interface.
568   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
569   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
570   * @throws { BusinessError } 1600001 - Internal error.
571   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
572   * @throws { BusinessError } 1600003 - Failed to connect to the service.
573   * @throws { BusinessError } 1600007 - The notification does not exist.
574   * @throws { BusinessError } 1600008 - The user does not exist.
575   * @throws { BusinessError } 1600012 - No memory space.
576   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
577   * @syscap SystemCapability.Notification.Notification
578   * @systemapi
579   * @since 12
580   */
581  function cancelAsBundle(representativeBundle: BundleOption, id: number): Promise<void>;
582
583  /**
584   * Cancel all notifications of the current application.
585   *
586   * @param { AsyncCallback<void> } callback - The callback of cancelAll.
587   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
588   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
589   * @throws { BusinessError } 1600001 - Internal error.
590   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
591   * @throws { BusinessError } 1600003 - Failed to connect to the service.
592   * @syscap SystemCapability.Notification.Notification
593   * @since 9
594   */
595  /**
596   * Cancel all notifications of the current application.
597   *
598   * @param { AsyncCallback<void> } callback - The callback of cancelAll.
599   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
600   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
601   * @throws { BusinessError } 1600001 - Internal error.
602   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
603   * @throws { BusinessError } 1600003 - Failed to connect to the service.
604   * @syscap SystemCapability.Notification.Notification
605   * @crossplatform
606   * @since 12
607   */
608  function cancelAll(callback: AsyncCallback<void>): void;
609
610  /**
611   * Cancel all notifications of the current application.
612   *
613   * @returns { Promise<void> } The promise returned by the function.
614   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
615   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
616   * @throws { BusinessError } 1600001 - Internal error.
617   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
618   * @throws { BusinessError } 1600003 - Failed to connect to the service.
619   * @syscap SystemCapability.Notification.Notification
620   * @since 9
621   */
622  /**
623   * Cancel all notifications of the current application.
624   *
625   * @returns { Promise<void> } The promise returned by the function.
626   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
627   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
628   * @throws { BusinessError } 1600001 - Internal error.
629   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
630   * @throws { BusinessError } 1600003 - Failed to connect to the service.
631   * @syscap SystemCapability.Notification.Notification
632   * @crossplatform
633   * @since 12
634   */
635  function cancelAll(): Promise<void>;
636
637  /**
638   * Creates a notification slot.
639   *
640   * @permission ohos.permission.NOTIFICATION_CONTROLLER
641   * @param { NotificationSlot } slot - Indicates the notification slot to be created, which is set by {@link NotificationSlot}.
642   * @param { AsyncCallback<void> } callback - The callback of addSlot.
643   * @throws { BusinessError } 201 - Permission denied.
644   * @throws { BusinessError } 202 - Not system application to call the interface.
645   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
646   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
647   * @throws { BusinessError } 1600001 - Internal error.
648   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
649   * @throws { BusinessError } 1600003 - Failed to connect to the service.
650   * @throws { BusinessError } 1600012 - No memory space.
651   * @syscap SystemCapability.Notification.Notification
652   * @systemapi
653   * @since 9
654   */
655  function addSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void;
656
657  /**
658   * Creates a notification slot.
659   *
660   * @permission ohos.permission.NOTIFICATION_CONTROLLER
661   * @param { NotificationSlot } slot - Indicates the notification slot to be created, which is set by {@link NotificationSlot}.
662   * @returns { Promise<void> } The promise returned by the function.
663   * @throws { BusinessError } 201 - Permission denied.
664   * @throws { BusinessError } 202 - Not system application to call the interface.
665   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
666   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
667   * @throws { BusinessError } 1600001 - Internal error.
668   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
669   * @throws { BusinessError } 1600003 - Failed to connect to the service.
670   * @throws { BusinessError } 1600012 - No memory space.
671   * @syscap SystemCapability.Notification.Notification
672   * @systemapi
673   * @since 9
674   */
675  function addSlot(slot: NotificationSlot): Promise<void>;
676
677  /**
678   * Adds a slot type.
679   *
680   * @param { SlotType } type - Slot type to add.
681   * @param { AsyncCallback<void> } callback - The callback of addSlot.
682   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
683   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
684   * @throws { BusinessError } 1600001 - Internal error.
685   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
686   * @throws { BusinessError } 1600003 - Failed to connect to the service.
687   * @throws { BusinessError } 1600012 - No memory space.
688   * @syscap SystemCapability.Notification.Notification
689   * @since 9
690   */
691  function addSlot(type: SlotType, callback: AsyncCallback<void>): void;
692
693  /**
694   * Adds a slot type.
695   *
696   * @param { SlotType } type - Slot type to add.
697   * @returns { Promise<void> } The promise returned by the function.
698   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
699   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
700   * @throws { BusinessError } 1600001 - Internal error.
701   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
702   * @throws { BusinessError } 1600003 - Failed to connect to the service.
703   * @throws { BusinessError } 1600012 - No memory space.
704   * @syscap SystemCapability.Notification.Notification
705   * @since 9
706   */
707  function addSlot(type: SlotType): Promise<void>;
708
709  /**
710   * Creates notification slots.
711   *
712   * @permission ohos.permission.NOTIFICATION_CONTROLLER
713   * @param { Array<NotificationSlot> } slots - Indicates the notification slots to be created, which is set by {@link NotificationSlot}.
714   * @param { AsyncCallback<void> } callback - The callback of addSlots.
715   * @throws { BusinessError } 201 - Permission denied.
716   * @throws { BusinessError } 202 - Not system application to call the interface.
717   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
718   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
719   * @throws { BusinessError } 1600001 - Internal error.
720   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
721   * @throws { BusinessError } 1600003 - Failed to connect to the service.
722   * @throws { BusinessError } 1600012 - No memory space.
723   * @syscap SystemCapability.Notification.Notification
724   * @systemapi
725   * @since 9
726   */
727  function addSlots(slots: Array<NotificationSlot>, callback: AsyncCallback<void>): void;
728
729  /**
730   * Creates notification slots.
731   *
732   * @permission ohos.permission.NOTIFICATION_CONTROLLER
733   * @param { Array<NotificationSlot> } slots - Indicates the notification slots to be created, which is set by {@link NotificationSlot}.
734   * @returns { Promise<void> } The promise returned by the function.
735   * @throws { BusinessError } 201 - Permission denied.
736   * @throws { BusinessError } 202 - Not system application to call the interface.
737   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
738   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
739   * @throws { BusinessError } 1600001 - Internal error.
740   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
741   * @throws { BusinessError } 1600003 - Failed to connect to the service.
742   * @throws { BusinessError } 1600012 - No memory space.
743   * @syscap SystemCapability.Notification.Notification
744   * @systemapi
745   * @since 9
746   */
747  function addSlots(slots: Array<NotificationSlot>): Promise<void>;
748
749  /**
750   * Obtains a notification slot of the specified slot type.
751   *
752   * @param { SlotType } slotType - Type of the notification slot to obtain.
753   * @param { AsyncCallback<NotificationSlot> } callback - The callback is used to return the NotificationSlot.
754   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
755   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
756   * @throws { BusinessError } 1600001 - Internal error.
757   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
758   * @throws { BusinessError } 1600003 - Failed to connect to the service.
759   * @syscap SystemCapability.Notification.Notification
760   * @since 9
761   */
762  function getSlot(slotType: SlotType, callback: AsyncCallback<NotificationSlot>): void;
763
764  /**
765   * Obtains a notification slot of the specified slot type.
766   *
767   * @param { SlotType } slotType - Type of the notification slot to obtain.
768   * @returns { Promise<NotificationSlot> } Returns the NotificationSlot.
769   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
770   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
771   * @throws { BusinessError } 1600001 - Internal error.
772   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
773   * @throws { BusinessError } 1600003 - Failed to connect to the service.
774   * @syscap SystemCapability.Notification.Notification
775   * @since 9
776   */
777  function getSlot(slotType: SlotType): Promise<NotificationSlot>;
778
779  /**
780   * Obtains all NotificationSlot objects created by the current application.
781   *
782   * @param { AsyncCallback<Array<NotificationSlot>> } callback - The callback is used to return all notification slots
783   *                                                              of this application.
784   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
785   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
786   * @throws { BusinessError } 1600001 - Internal error.
787   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
788   * @throws { BusinessError } 1600003 - Failed to connect to the service.
789   * @syscap SystemCapability.Notification.Notification
790   * @since 9
791   */
792  function getSlots(callback: AsyncCallback<Array<NotificationSlot>>): void;
793
794  /**
795   * Obtains all NotificationSlot objects created by the current application.
796   *
797   * @returns { Promise<Array<NotificationSlot>> } Returns all notification slots of this application.
798   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
799   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
800   * @throws { BusinessError } 1600001 - Internal error.
801   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
802   * @throws { BusinessError } 1600003 - Failed to connect to the service.
803   * @syscap SystemCapability.Notification.Notification
804   * @since 9
805   */
806  function getSlots(): Promise<Array<NotificationSlot>>;
807
808  /**
809   * Obtains allow notification application list.
810   *
811   * @permission ohos.permission.NOTIFICATION_CONTROLLER
812   * @returns { Promise<Array<BundleOption>> } Returns all enable notification applications.
813   * @throws { BusinessError } 201 - Permission denied.
814   * @throws { BusinessError } 202 - Not system application to call the interface.
815   * @throws { BusinessError } 1600001 - Internal error.
816   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
817   * @throws { BusinessError } 1600003 - Failed to connect to the service.
818   * @syscap SystemCapability.Notification.Notification
819   * @systemapi
820   * @since 12
821   */
822  function getAllNotificationEnabledBundles(): Promise<Array<BundleOption>>;
823
824  /**
825   * Removes a NotificationSlot of the specified SlotType created by the current application.
826   *
827   * @param { SlotType } slotType - Type of the NotificationSlot to remove.
828   * @param { AsyncCallback<void> } callback - The callback of removeSlot.
829   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
830   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
831   * @throws { BusinessError } 1600001 - Internal error.
832   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
833   * @throws { BusinessError } 1600003 - Failed to connect to the service.
834   * @syscap SystemCapability.Notification.Notification
835   * @since 9
836   */
837  function removeSlot(slotType: SlotType, callback: AsyncCallback<void>): void;
838
839  /**
840   * Removes a NotificationSlot of the specified SlotType created by the current application.
841   *
842   * @param { SlotType } slotType - Type of the NotificationSlot to remove.
843   * @returns { Promise<void> } The promise returned by the function.
844   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
845   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
846   * @throws { BusinessError } 1600001 - Internal error.
847   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
848   * @throws { BusinessError } 1600003 - Failed to connect to the service.
849   * @syscap SystemCapability.Notification.Notification
850   * @since 9
851   */
852  function removeSlot(slotType: SlotType): Promise<void>;
853
854  /**
855   * Removes all NotificationSlot objects created by the current application.
856   *
857   * @param { AsyncCallback<void> } callback - The callback of removeAllSlots.
858   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
859   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
860   * @throws { BusinessError } 1600001 - Internal error.
861   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
862   * @throws { BusinessError } 1600003 - Failed to connect to the service.
863   * @syscap SystemCapability.Notification.Notification
864   * @since 9
865   */
866  function removeAllSlots(callback: AsyncCallback<void>): void;
867
868  /**
869   * Removes all NotificationSlot objects created by the current application.
870   *
871   * @returns { Promise<void> } The promise returned by the function.
872   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
873   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
874   * @throws { BusinessError } 1600001 - Internal error.
875   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
876   * @throws { BusinessError } 1600003 - Failed to connect to the service.
877   * @syscap SystemCapability.Notification.Notification
878   * @since 9
879   */
880  function removeAllSlots(): Promise<void>;
881
882  /**
883   * Set whether the application can send notifications.
884   *
885   * @permission ohos.permission.NOTIFICATION_CONTROLLER
886   * @param { BundleOption } bundle - The bundle option.
887   * @param { boolean } enable - Set enable or not.
888   * @param { AsyncCallback<void> } callback - The callback of setNotificationEnable.
889   * @throws { BusinessError } 201 - Permission denied.
890   * @throws { BusinessError } 202 - Not system application to call the interface.
891   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
892   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
893   * @throws { BusinessError } 1600001 - Internal error.
894   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
895   * @throws { BusinessError } 1600003 - Failed to connect to the service.
896   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
897   * @syscap SystemCapability.Notification.Notification
898   * @systemapi
899   * @since 9
900   */
901  function setNotificationEnable(bundle: BundleOption, enable: boolean, callback: AsyncCallback<void>): void;
902
903  /**
904   * Set whether the application can send notifications.
905   *
906   * @permission ohos.permission.NOTIFICATION_CONTROLLER
907   * @param { BundleOption } bundle - The bundle option.
908   * @param { boolean } enable - Set enable or not.
909   * @returns { Promise<void> } The promise returned by the function.
910   * @throws { BusinessError } 201 - Permission denied.
911   * @throws { BusinessError } 202 - Not system application to call the interface.
912   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
913   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
914   * @throws { BusinessError } 1600001 - Internal error.
915   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
916   * @throws { BusinessError } 1600003 - Failed to connect to the service.
917   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
918   * @syscap SystemCapability.Notification.Notification
919   * @systemapi
920   * @since 9
921   */
922  function setNotificationEnable(bundle: BundleOption, enable: boolean): Promise<void>;
923
924  /**
925   * Checks whether this application allows to publish notifications.
926   *
927   * @permission ohos.permission.NOTIFICATION_CONTROLLER
928   * @param { BundleOption } bundle - The bundle option.
929   * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled.
930   * @throws { BusinessError } 201 - Permission denied.
931   * @throws { BusinessError } 202 - Not system application to call the interface.
932   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
933   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
934   * @throws { BusinessError } 1600001 - Internal error.
935   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
936   * @throws { BusinessError } 1600003 - Failed to connect to the service.
937   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
938   * @syscap SystemCapability.Notification.Notification
939   * @systemapi
940   * @since 9
941   */
942  function isNotificationEnabled(bundle: BundleOption, callback: AsyncCallback<boolean>): void;
943
944  /**
945   * Checks whether this application allows to publish notifications.
946   *
947   * @permission ohos.permission.NOTIFICATION_CONTROLLER
948   * @param { BundleOption } bundle - The bundle option.
949   * @returns { Promise<boolean> } The promise returned by the function.
950   * @throws { BusinessError } 201 - Permission denied.
951   * @throws { BusinessError } 202 - Not system application to call the interface.
952   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
953   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
954   * @throws { BusinessError } 1600001 - Internal error.
955   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
956   * @throws { BusinessError } 1600003 - Failed to connect to the service.
957   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
958   * @syscap SystemCapability.Notification.Notification
959   * @systemapi
960   * @since 9
961   */
962  function isNotificationEnabled(bundle: BundleOption): Promise<boolean>;
963
964  /**
965   * Checks whether this application allows to publish notifications.
966   *
967   * @permission ohos.permission.NOTIFICATION_CONTROLLER
968   * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled.
969   * @throws { BusinessError } 201 - Permission denied.
970   * @throws { BusinessError } 202 - Not system application to call the interface.
971   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
972   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
973   * @throws { BusinessError } 1600001 - Internal error.
974   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
975   * @throws { BusinessError } 1600003 - Failed to connect to the service.
976   * @syscap SystemCapability.Notification.Notification
977   * @systemapi
978   * @since 9
979   */
980  /**
981   * Checks whether this application allows to publish notifications.
982   *
983   * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled.
984   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
985   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
986   * @throws { BusinessError } 1600001 - Internal error.
987   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
988   * @throws { BusinessError } 1600003 - Failed to connect to the service.
989   * @throws { BusinessError } 1600008 - The user does not exist.
990   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
991   * @syscap SystemCapability.Notification.Notification
992   * @since 11
993   */
994  /**
995   * Checks whether this application allows to publish notifications.
996   *
997   * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled.
998   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
999   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1000   * @throws { BusinessError } 1600001 - Internal error.
1001   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1002   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1003   * @throws { BusinessError } 1600008 - The user does not exist.
1004   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1005   * @syscap SystemCapability.Notification.Notification
1006   * @crossplatform
1007   * @since 12
1008   */
1009  function isNotificationEnabled(callback: AsyncCallback<boolean>): void;
1010
1011  /**
1012   * Checks whether this application allows to publish notifications.
1013   *
1014   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1015   * @returns { Promise<boolean> } The promise returned by the function.
1016   * @throws { BusinessError } 201 - Permission denied.
1017   * @throws { BusinessError } 202 - Not system application to call the interface.
1018   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1019   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1020   * @throws { BusinessError } 1600001 - Internal error.
1021   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1022   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1023   * @syscap SystemCapability.Notification.Notification
1024   * @systemapi
1025   * @since 9
1026   */
1027  /**
1028   * Checks whether this application allows to publish notifications.
1029   *
1030   * @returns { Promise<boolean> } The promise returned by the function.
1031   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1032   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1033   * @throws { BusinessError } 1600001 - Internal error.
1034   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1035   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1036   * @throws { BusinessError } 1600008 - The user does not exist.
1037   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1038   * @syscap SystemCapability.Notification.Notification
1039   * @since 11
1040   */
1041  /**
1042   * Checks whether this application allows to publish notifications.
1043   *
1044   * @returns { Promise<boolean> } The promise returned by the function.
1045   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1046   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1047   * @throws { BusinessError } 1600001 - Internal error.
1048   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1049   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1050   * @throws { BusinessError } 1600008 - The user does not exist.
1051   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1052   * @syscap SystemCapability.Notification.Notification
1053   * @crossplatform
1054   * @since 12
1055   */
1056  function isNotificationEnabled(): Promise<boolean>;
1057
1058  /**
1059   * Checks whether this application allows to publish notifications.
1060   *
1061   * @returns { boolean } Returned by the function.
1062   * @throws { BusinessError } 1600001 - Internal error.
1063   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1064   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1065   * @syscap SystemCapability.Notification.Notification
1066   * @since 12
1067   */
1068  function isNotificationEnabledSync(): boolean;
1069
1070  /**
1071   * Checks whether this application allows to publish notifications under the user.
1072   *
1073   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1074   * @param { number } userId - The userid of the representative.
1075   * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled.
1076   * @throws { BusinessError } 201 - Permission denied.
1077   * @throws { BusinessError } 202 - Not system application to call the interface.
1078   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1079   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1080   * @throws { BusinessError } 1600001 - Internal error.
1081   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1082   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1083   * @throws { BusinessError } 1600008 - The user does not exist.
1084   * @syscap SystemCapability.Notification.Notification
1085   * @systemapi
1086   * @since 9
1087   */
1088  function isNotificationEnabled(userId: number, callback: AsyncCallback<boolean>): void;
1089
1090  /**
1091   * Checks whether this application allows to publish notifications under the user.
1092   *
1093   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1094   * @param { number } userId - The userid of the representative.
1095   * @returns { Promise<boolean> } The promise returned by the function.
1096   * @throws { BusinessError } 201 - Permission denied.
1097   * @throws { BusinessError } 202 - Not system application to call the interface.
1098   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1099   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1100   * @throws { BusinessError } 1600001 - Internal error.
1101   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1102   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1103   * @throws { BusinessError } 1600008 - The user does not exist.
1104   * @syscap SystemCapability.Notification.Notification
1105   * @systemapi
1106   * @since 9
1107   */
1108  function isNotificationEnabled(userId: number): Promise<boolean>;
1109
1110  /**
1111   * Sets whether to allow the specified application to show badge.
1112   *
1113   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1114   * @param { BundleOption } bundle - The bundle option.
1115   * @param { boolean } enable - Set enable or not.
1116   * @param { AsyncCallback<void> } callback - The callback of displayBadge.
1117   * @throws { BusinessError } 201 - Permission denied.
1118   * @throws { BusinessError } 202 - Not system application to call the interface.
1119   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1120   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1121   * @throws { BusinessError } 1600001 - Internal error.
1122   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1123   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1124   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1125   * @syscap SystemCapability.Notification.Notification
1126   * @systemapi
1127   * @since 9
1128   */
1129  function displayBadge(bundle: BundleOption, enable: boolean, callback: AsyncCallback<void>): void;
1130
1131  /**
1132   * Sets whether to allow the specified application to show badge.
1133   *
1134   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1135   * @param { BundleOption } bundle - The bundle option.
1136   * @param { boolean } enable - Set enable or not.
1137   * @returns { Promise<void> } The promise returned by the function.
1138   * @throws { BusinessError } 201 - Permission denied.
1139   * @throws { BusinessError } 202 - Not system application to call the interface.
1140   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1141   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1142   * @throws { BusinessError } 1600001 - Internal error.
1143   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1144   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1145   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1146   * @syscap SystemCapability.Notification.Notification
1147   * @systemapi
1148   * @since 9
1149   */
1150  function displayBadge(bundle: BundleOption, enable: boolean): Promise<void>;
1151
1152  /**
1153   * Obtains the flag that whether to allow the application to show badge.
1154   *
1155   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1156   * @param { BundleOption } bundle - The bundle option.
1157   * @param { AsyncCallback<boolean> } callback - The callback of isBadgeDisplayed.
1158   * @throws { BusinessError } 201 - Permission denied.
1159   * @throws { BusinessError } 202 - Not system application to call the interface.
1160   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1161   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1162   * @throws { BusinessError } 1600001 - Internal error.
1163   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1164   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1165   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1166   * @syscap SystemCapability.Notification.Notification
1167   * @systemapi
1168   * @since 9
1169   */
1170  function isBadgeDisplayed(bundle: BundleOption, callback: AsyncCallback<boolean>): void;
1171
1172  /**
1173   * Obtains the flag that whether to allow the application to show badge.
1174   *
1175   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1176   * @param { BundleOption } bundle - The bundle option.
1177   * @returns { Promise<boolean> } The promise returned by the function.
1178   * @throws { BusinessError } 201 - Permission denied.
1179   * @throws { BusinessError } 202 - Not system application to call the interface.
1180   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1181   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1182   * @throws { BusinessError } 1600001 - Internal error.
1183   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1184   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1185   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1186   * @syscap SystemCapability.Notification.Notification
1187   * @systemapi
1188   * @since 9
1189   */
1190  function isBadgeDisplayed(bundle: BundleOption): Promise<boolean>;
1191
1192  /**
1193   * Update all notification slots for the specified bundle.
1194   *
1195   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1196   * @param { BundleOption } bundle - The bundle option.
1197   * @param { NotificationSlot } slot - Indicates the notification slot.
1198   * @param { AsyncCallback<void> } callback - The callback of setSlotByBundle.
1199   * @throws { BusinessError } 201 - Permission denied.
1200   * @throws { BusinessError } 202 - Not system application to call the interface.
1201   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1202   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1203   * @throws { BusinessError } 1600001 - Internal error.
1204   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1205   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1206   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1207   * @syscap SystemCapability.Notification.Notification
1208   * @systemapi
1209   * @since 9
1210   */
1211  function setSlotByBundle(bundle: BundleOption, slot: NotificationSlot, callback: AsyncCallback<void>): void;
1212
1213  /**
1214   * Update all notification slots for the specified bundle.
1215   *
1216   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1217   * @param { BundleOption } bundle - The bundle option.
1218   * @param { NotificationSlot } slot - Indicates the notification slot.
1219   * @returns { Promise<void> } The promise returned by the function.
1220   * @throws { BusinessError } 201 - Permission denied.
1221   * @throws { BusinessError } 202 - Not system application to call the interface.
1222   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1223   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1224   * @throws { BusinessError } 1600001 - Internal error.
1225   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1226   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1227   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1228   * @syscap SystemCapability.Notification.Notification
1229   * @systemapi
1230   * @since 9
1231   */
1232  function setSlotByBundle(bundle: BundleOption, slot: NotificationSlot): Promise<void>;
1233
1234  /**
1235   * Obtains all notification slots belonging to the specified bundle.
1236   *
1237   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1238   * @param { BundleOption } bundle - The bundle option.
1239   * @param { AsyncCallback<Array<NotificationSlot>> } callback - The callback of getSlotsByBundle.
1240   * @throws { BusinessError } 201 - Permission denied.
1241   * @throws { BusinessError } 202 - Not system application to call the interface.
1242   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1243   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1244   * @throws { BusinessError } 1600001 - Internal error.
1245   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1246   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1247   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1248   * @syscap SystemCapability.Notification.Notification
1249   * @systemapi
1250   * @since 9
1251   */
1252  function getSlotsByBundle(bundle: BundleOption, callback: AsyncCallback<Array<NotificationSlot>>): void;
1253
1254  /**
1255   * Get notification slot for the specified bundle.
1256   *
1257   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1258   * @param { BundleOption } bundle - The bundle option.
1259   * @param { SlotType } slotType - Indicates the notification slot.
1260   * @returns { Promise<NotificationSlot> } Returns the NotificationSlot.
1261   * @throws { BusinessError } 201 - Permission denied.
1262   * @throws { BusinessError } 202 - Not system application to call the interface.
1263   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1264   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1265   * @throws { BusinessError } 1600001 - Internal error.
1266   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1267   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1268   * @throws { BusinessError } 1600012 - No memory space.
1269   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1270   * @syscap SystemCapability.Notification.Notification
1271   * @systemapi
1272   * @since 12
1273   */
1274  function getSlotByBundle(bundle: BundleOption, slotType: SlotType): Promise<NotificationSlot>;
1275
1276  /**
1277   * Obtains all notification slots belonging to the specified bundle.
1278   *
1279   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1280   * @param { BundleOption } bundle - The bundle option.
1281   * @returns { Promise<Array<NotificationSlot>> } The promise returned by the function.
1282   * @throws { BusinessError } 201 - Permission denied.
1283   * @throws { BusinessError } 202 - Not system application to call the interface.
1284   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1285   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1286   * @throws { BusinessError } 1600001 - Internal error.
1287   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1288   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1289   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1290   * @syscap SystemCapability.Notification.Notification
1291   * @systemapi
1292   * @since 9
1293   */
1294  function getSlotsByBundle(bundle: BundleOption): Promise<Array<NotificationSlot>>;
1295
1296  /**
1297   * Obtains number of slot.
1298   *
1299   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1300   * @param { BundleOption } bundle - The bundle option.
1301   * @param { AsyncCallback<number> } callback - The callback of getSlotNumByBundle.
1302   * @throws { BusinessError } 201 - Permission denied.
1303   * @throws { BusinessError } 202 - Not system application to call the interface.
1304   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1305   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1306   * @throws { BusinessError } 1600001 - Internal error.
1307   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1308   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1309   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1310   * @syscap SystemCapability.Notification.Notification
1311   * @systemapi
1312   * @since 9
1313   */
1314  function getSlotNumByBundle(bundle: BundleOption, callback: AsyncCallback<number>): void;
1315
1316  /**
1317   * Obtains number of slot.
1318   *
1319   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1320   * @param { BundleOption } bundle - The bundle option.
1321   * @returns { Promise<number> } The promise returned by the function.
1322   * @throws { BusinessError } 201 - Permission denied.
1323   * @throws { BusinessError } 202 - Not system application to call the interface.
1324   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1325   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1326   * @throws { BusinessError } 1600001 - Internal error.
1327   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1328   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1329   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1330   * @syscap SystemCapability.Notification.Notification
1331   * @systemapi
1332   * @since 9
1333   */
1334  function getSlotNumByBundle(bundle: BundleOption): Promise<number>;
1335
1336  /**
1337   * Obtains all active notifications in the current system. The caller must have system permissions to
1338   * call this method.
1339   *
1340   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1341   * @param { AsyncCallback<Array<NotificationRequest>> } callback - The callback of getAllActiveNotifications.
1342   * @throws { BusinessError } 201 - Permission denied.
1343   * @throws { BusinessError } 202 - Not system application to call the interface.
1344   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1345   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1346   * @throws { BusinessError } 1600001 - Internal error.
1347   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1348   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1349   * @syscap SystemCapability.Notification.Notification
1350   * @systemapi
1351   * @since 9
1352   */
1353  function getAllActiveNotifications(callback: AsyncCallback<Array<NotificationRequest>>): void;
1354
1355  /**
1356   * Obtains all active notifications in the current system. The caller must have system permissions to
1357   * call this method.
1358   *
1359   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1360   * @returns { Promise<Array<NotificationRequest>> } The promise returned by the function.
1361   * @throws { BusinessError } 201 - Permission denied.
1362   * @throws { BusinessError } 202 - Not system application to call the interface.
1363   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1364   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1365   * @throws { BusinessError } 1600001 - Internal error.
1366   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1367   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1368   * @syscap SystemCapability.Notification.Notification
1369   * @systemapi
1370   * @since 9
1371   */
1372  function getAllActiveNotifications(): Promise<Array<NotificationRequest>>;
1373
1374  /**
1375   * Obtains the number of all active notifications.
1376   *
1377   * @param { AsyncCallback<number> } callback - The callback of getActiveNotificationCount.
1378   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1379   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1380   * @throws { BusinessError } 1600001 - Internal error.
1381   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1382   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1383   * @syscap SystemCapability.Notification.Notification
1384   * @since 9
1385   */
1386  function getActiveNotificationCount(callback: AsyncCallback<number>): void;
1387
1388  /**
1389   * Obtains the number of all active notifications.
1390   *
1391   * @returns { Promise<number> } The promise returned by the function.
1392   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1393   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1394   * @throws { BusinessError } 1600001 - Internal error.
1395   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1396   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1397   * @syscap SystemCapability.Notification.Notification
1398   * @since 9
1399   */
1400  function getActiveNotificationCount(): Promise<number>;
1401
1402  /**
1403   * Obtains an array of active notifications.
1404   *
1405   * @param { AsyncCallback<Array<NotificationRequest>> } callback - The callback of getActiveNotifications.
1406   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1407   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1408   * @throws { BusinessError } 1600001 - Internal error.
1409   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1410   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1411   * @syscap SystemCapability.Notification.Notification
1412   * @since 9
1413   */
1414  function getActiveNotifications(callback: AsyncCallback<Array<NotificationRequest>>): void;
1415
1416  /**
1417   * Obtains an array of active notifications.
1418   *
1419   * @returns { Promise<Array<NotificationRequest>> } The promise returned by the function.
1420   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1421   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1422   * @throws { BusinessError } 1600001 - Internal error.
1423   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1424   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1425   * @syscap SystemCapability.Notification.Notification
1426   * @since 9
1427   */
1428  function getActiveNotifications(): Promise<Array<NotificationRequest>>;
1429
1430  /**
1431   * Get the live view notification by bundle option and notification key. If the extraInfoKeys is provided,
1432   * filter the additional information of the live view notification and return the filtered result.
1433   *
1434   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1435   * @param { NotificationFilter } filter - The bundle, notification key and additional information filter of the live view notification.
1436   * @param { AsyncCallback<NotificationRequest> } callback - The callback of getActiveNotificationByFilter.
1437   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1438   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1439   * @throws { BusinessError } 1600007 - The notification does not exist.
1440   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1441   * @syscap SystemCapability.Notification.Notification
1442   * @systemapi
1443   * @since 11
1444   */
1445  function getActiveNotificationByFilter(filter: NotificationFilter, callback: AsyncCallback<NotificationRequest>): void;
1446
1447  /**
1448   * Get the live view notification by bundle option and notification key. If the extraInfoKeys is provided,
1449   * filter the additional information of the live view notification and return the filtered result.
1450   *
1451   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1452   * @param { NotificationFilter } filter - The bundle, notification key and additional information filter of the live view notification.
1453   * @returns { Promise<NotificationRequest> } The promise returned by the function.
1454   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1455   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1456   * @throws { BusinessError } 1600007 - The notification does not exist.
1457   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1458   * @syscap SystemCapability.Notification.Notification
1459   * @systemapi
1460   * @since 11
1461   */
1462  function getActiveNotificationByFilter(filter: NotificationFilter): Promise<NotificationRequest>;
1463
1464  /**
1465   * Cancel the notification of a specified group for this application.
1466   *
1467   * @param { string } groupName - The name of the group.
1468   * @param { AsyncCallback<void> } callback - The callback of cancelGroup.
1469   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1470   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1471   * @throws { BusinessError } 1600001 - Internal error.
1472   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1473   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1474   * @syscap SystemCapability.Notification.Notification
1475   * @since 9
1476   */
1477  function cancelGroup(groupName: string, callback: AsyncCallback<void>): void;
1478
1479  /**
1480   * Cancel the notification of a specified group for this application.
1481   *
1482   * @param { string } groupName - The name of the group.
1483   * @returns { Promise<void> } The promise returned by the function.
1484   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1485   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1486   * @throws { BusinessError } 1600001 - Internal error.
1487   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1488   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1489   * @syscap SystemCapability.Notification.Notification
1490   * @since 9
1491   */
1492  function cancelGroup(groupName: string): Promise<void>;
1493
1494  /**
1495   * Delete the notification of a specified group for this application.
1496   *
1497   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1498   * @param { BundleOption } bundle - The bundle option.
1499   * @param { string } groupName - The name of the group.
1500   * @param { AsyncCallback<void> } callback - The callback of removeGroupByBundle.
1501   * @throws { BusinessError } 201 - Permission denied.
1502   * @throws { BusinessError } 202 - Not system application to call the interface.
1503   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1504   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1505   * @throws { BusinessError } 1600001 - Internal error.
1506   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1507   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1508   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1509   * @syscap SystemCapability.Notification.Notification
1510   * @systemapi
1511   * @since 9
1512   */
1513  function removeGroupByBundle(bundle: BundleOption, groupName: string, callback: AsyncCallback<void>): void;
1514
1515  /**
1516   * Delete the notification of a specified group for this application.
1517   *
1518   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1519   * @param { BundleOption } bundle - The bundle option.
1520   * @param { string } groupName - The name of the group.
1521   * @returns { Promise<void> } The promise returned by the function.
1522   * @throws { BusinessError } 201 - Permission denied.
1523   * @throws { BusinessError } 202 - Not system application to call the interface.
1524   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1525   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1526   * @throws { BusinessError } 1600001 - Internal error.
1527   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1528   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1529   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
1530   * @syscap SystemCapability.Notification.Notification
1531   * @systemapi
1532   * @since 9
1533   */
1534  function removeGroupByBundle(bundle: BundleOption, groupName: string): Promise<void>;
1535
1536  /**
1537   * Set the Do Not Disturb date.
1538   *
1539   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1540   * @param { DoNotDisturbDate } date - The Do Not Disturb date.
1541   * @param { AsyncCallback<void> } callback - The callback of setDoNotDisturbDate.
1542   * @throws { BusinessError } 201 - Permission denied.
1543   * @throws { BusinessError } 202 - Not system application to call the interface.
1544   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1545   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1546   * @throws { BusinessError } 1600001 - Internal error.
1547   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1548   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1549   * @throws { BusinessError } 1600012 - No memory space.
1550   * @syscap SystemCapability.Notification.Notification
1551   * @systemapi
1552   * @since 9
1553   */
1554  function setDoNotDisturbDate(date: DoNotDisturbDate, callback: AsyncCallback<void>): void;
1555
1556  /**
1557   * Set the Do Not Disturb date.
1558   *
1559   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1560   * @param { DoNotDisturbDate } date - The Do Not Disturb date.
1561   * @returns { Promise<void> } The promise returned by the function.
1562   * @throws { BusinessError } 201 - Permission denied.
1563   * @throws { BusinessError } 202 - Not system application to call the interface.
1564   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1565   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1566   * @throws { BusinessError } 1600001 - Internal error.
1567   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1568   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1569   * @throws { BusinessError } 1600012 - No memory space.
1570   * @syscap SystemCapability.Notification.Notification
1571   * @systemapi
1572   * @since 9
1573   */
1574  function setDoNotDisturbDate(date: DoNotDisturbDate): Promise<void>;
1575
1576  /**
1577   * Set the Do Not Disturb date under the specified user.
1578   *
1579   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1580   * @param { DoNotDisturbDate } date - The Do Not Disturb date.
1581   * @param { number } userId - The userId.
1582   * @param { AsyncCallback<void> } callback - The callback of setDoNotDisturbDate.
1583   * @throws { BusinessError } 201 - Permission denied.
1584   * @throws { BusinessError } 202 - Not system application to call the interface.
1585   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1586   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1587   * @throws { BusinessError } 1600001 - Internal error.
1588   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1589   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1590   * @throws { BusinessError } 1600008 - The user does not exist.
1591   * @throws { BusinessError } 1600012 - No memory space.
1592   * @syscap SystemCapability.Notification.Notification
1593   * @systemapi
1594   * @since 9
1595   */
1596  function setDoNotDisturbDate(date: DoNotDisturbDate, userId: number, callback: AsyncCallback<void>): void;
1597
1598  /**
1599   * Set the Do Not Disturb date under the specified user.
1600   *
1601   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1602   * @param { DoNotDisturbDate } date - The Do Not Disturb date.
1603   * @param { number } userId - The userId.
1604   * @returns { Promise<void> } The promise returned by the function.
1605   * @throws { BusinessError } 201 - Permission denied.
1606   * @throws { BusinessError } 202 - Not system application to call the interface.
1607   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1608   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1609   * @throws { BusinessError } 1600001 - Internal error.
1610   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1611   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1612   * @throws { BusinessError } 1600008 - The user does not exist.
1613   * @throws { BusinessError } 1600012 - No memory space.
1614   * @syscap SystemCapability.Notification.Notification
1615   * @systemapi
1616   * @since 9
1617   */
1618  function setDoNotDisturbDate(date: DoNotDisturbDate, userId: number): Promise<void>;
1619
1620  /**
1621   * Obtains the Do Not Disturb date.
1622   *
1623   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1624   * @param { AsyncCallback<DoNotDisturbDate> } callback - The callback is used to return the Do Not Disturb date.
1625   * @throws { BusinessError } 201 - Permission denied.
1626   * @throws { BusinessError } 202 - Not system application to call the interface.
1627   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1628   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1629   * @throws { BusinessError } 1600001 - Internal error.
1630   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1631   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1632   * @throws { BusinessError } 1600012 - No memory space.
1633   * @syscap SystemCapability.Notification.Notification
1634   * @systemapi
1635   * @since 9
1636   */
1637  function getDoNotDisturbDate(callback: AsyncCallback<DoNotDisturbDate>): void;
1638
1639  /**
1640   * Obtains the Do Not Disturb date.
1641   *
1642   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1643   * @returns { Promise<DoNotDisturbDate> } Returns the Do Not Disturb date.
1644   * @throws { BusinessError } 201 - Permission denied.
1645   * @throws { BusinessError } 202 - Not system application to call the interface.
1646   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1647   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1648   * @throws { BusinessError } 1600001 - Internal error.
1649   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1650   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1651   * @throws { BusinessError } 1600012 - No memory space.
1652   * @syscap SystemCapability.Notification.Notification
1653   * @systemapi
1654   * @since 9
1655   */
1656  function getDoNotDisturbDate(): Promise<DoNotDisturbDate>;
1657
1658  /**
1659   * Obtains the Do Not Disturb date.
1660   *
1661   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1662   * @param { number } userId - The userId.
1663   * @param { AsyncCallback<DoNotDisturbDate> } callback - The callback is used to return the Do Not Disturb date.
1664   * @throws { BusinessError } 201 - Permission denied.
1665   * @throws { BusinessError } 202 - Not system application to call the interface.
1666   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1667   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1668   * @throws { BusinessError } 1600001 - Internal error.
1669   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1670   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1671   * @throws { BusinessError } 1600008 - The user does not exist.
1672   * @throws { BusinessError } 1600012 - No memory space.
1673   * @syscap SystemCapability.Notification.Notification
1674   * @systemapi
1675   * @since 9
1676   */
1677  function getDoNotDisturbDate(userId: number, callback: AsyncCallback<DoNotDisturbDate>): void;
1678
1679  /**
1680   * Obtains the Do Not Disturb date.
1681   *
1682   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1683   * @param { number } userId - The userId.
1684   * @returns { Promise<DoNotDisturbDate> } Returns the Do Not Disturb date.
1685   * @throws { BusinessError } 201 - Permission denied.
1686   * @throws { BusinessError } 202 - Not system application to call the interface.
1687   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1688   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1689   * @throws { BusinessError } 1600001 - Internal error.
1690   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1691   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1692   * @throws { BusinessError } 1600008 - The user does not exist.
1693   * @throws { BusinessError } 1600012 - No memory space.
1694   * @syscap SystemCapability.Notification.Notification
1695   * @systemapi
1696   * @since 9
1697   */
1698  function getDoNotDisturbDate(userId: number): Promise<DoNotDisturbDate>;
1699
1700  /**
1701   * Obtains whether to support the Do Not Disturb mode.
1702   *
1703   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1704   * @param { AsyncCallback<boolean> } callback - The callback is used to return whether Do Not Disturb
1705   *                                              mode is supported.
1706   * @throws { BusinessError } 201 - Permission denied.
1707   * @throws { BusinessError } 202 - Not system application to call the interface.
1708   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1709   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1710   * @throws { BusinessError } 1600001 - Internal error.
1711   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1712   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1713   * @syscap SystemCapability.Notification.Notification
1714   * @systemapi
1715   * @since 9
1716   */
1717  function isSupportDoNotDisturbMode(callback: AsyncCallback<boolean>): void;
1718
1719  /**
1720   * Obtains whether to support the Do Not Disturb mode.
1721   *
1722   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1723   * @returns { Promise<boolean> } Returns whether Do Not Disturb mode is supported.
1724   * @throws { BusinessError } 201 - Permission denied.
1725   * @throws { BusinessError } 202 - Not system application to call the interface.
1726   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1727   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1728   * @throws { BusinessError } 1600001 - Internal error.
1729   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1730   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1731   * @syscap SystemCapability.Notification.Notification
1732   * @systemapi
1733   * @since 9
1734   */
1735  function isSupportDoNotDisturbMode(): Promise<boolean>;
1736
1737  /**
1738   * Obtains whether the template is supported by the system.
1739   *
1740   * @param { string } templateName - Name of template to be Obtained.
1741   * @param { AsyncCallback<boolean> } callback - The callback is used to return whether the template is supported.
1742   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1743   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1744   * @throws { BusinessError } 1600001 - Internal error.
1745   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1746   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1747   * @syscap SystemCapability.Notification.Notification
1748   * @since 9
1749   */
1750  function isSupportTemplate(templateName: string, callback: AsyncCallback<boolean>): void;
1751
1752  /**
1753   * Obtains whether the template is supported by the system.
1754   *
1755   * @param { string } templateName - Name of template to be Obtained.
1756   * @returns { Promise<boolean> } Returns whether the template is supported.
1757   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1758   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1759   * @throws { BusinessError } 1600001 - Internal error.
1760   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1761   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1762   * @syscap SystemCapability.Notification.Notification
1763   * @since 9
1764   */
1765  function isSupportTemplate(templateName: string): Promise<boolean>;
1766
1767  /**
1768   * Request permission to send notification.
1769   *
1770   * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification.
1771   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1772   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1773   * @throws { BusinessError } 1600001 - Internal error.
1774   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1775   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1776   * @syscap SystemCapability.Notification.Notification
1777   * @since 9
1778   */
1779  /**
1780   * Request permission to send notification.
1781   *
1782   * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification.
1783   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1784   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1785   * @throws { BusinessError } 1600001 - Internal error.
1786   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1787   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1788   * @throws { BusinessError } 1600004 - Notification disabled.
1789   * @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
1790   * @syscap SystemCapability.Notification.Notification
1791   * @since 11
1792   */
1793  /**
1794   * Request permission to send notification.
1795   *
1796   * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification.
1797   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1798   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1799   * @throws { BusinessError } 1600001 - Internal error.
1800   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1801   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1802   * @throws { BusinessError } 1600004 - Notification disabled.
1803   * @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
1804   * @syscap SystemCapability.Notification.Notification
1805   * @crossplatform
1806   * @since 12
1807   * @deprecated since 12
1808   * @useinstead requestEnableNotification
1809   */
1810  function requestEnableNotification(callback: AsyncCallback<void>): void;
1811
1812  /**
1813   * Request permission to send notification.
1814   *
1815   * @param { UIAbilityContext } context - The context indicates the ability context you want to bind;
1816   * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification.
1817   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1818   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1819   * @throws { BusinessError } 1600001 - Internal error.
1820   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1821   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1822   * @syscap SystemCapability.Notification.Notification
1823   * @StageModelOnly
1824   * @since 10
1825   */
1826  /**
1827   * Request permission to send notification.
1828   *
1829   * @param { UIAbilityContext } context - The context indicates the ability context you want to bind;
1830   * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification.
1831   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1832   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1833   * @throws { BusinessError } 1600001 - Internal error.
1834   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1835   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1836   * @throws { BusinessError } 1600004 - Notification disabled.
1837   * @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
1838   * @syscap SystemCapability.Notification.Notification
1839   * @StageModelOnly
1840   * @since 11
1841   */
1842  /**
1843   * Request permission to send notification.
1844   *
1845   * @param { UIAbilityContext } context - The context indicates the ability context you want to bind;
1846   * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification.
1847   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1848   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1849   * @throws { BusinessError } 1600001 - Internal error.
1850   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1851   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1852   * @throws { BusinessError } 1600004 - Notification disabled.
1853   * @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
1854   * @syscap SystemCapability.Notification.Notification
1855   * @StageModelOnly
1856   * @crossplatform
1857   * @since 12
1858   */
1859  function requestEnableNotification(context: UIAbilityContext, callback: AsyncCallback<void>): void;
1860
1861  /**
1862   * Request permission to send notification.
1863   *
1864   * @returns { Promise<void> } The promise returned by the function.
1865   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1866   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1867   * @throws { BusinessError } 1600001 - Internal error.
1868   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1869   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1870   * @syscap SystemCapability.Notification.Notification
1871   * @since 9
1872   */
1873  /**
1874   * Request permission to send notification.
1875   *
1876   * @returns { Promise<void> } The promise returned by the function.
1877   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1878   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1879   * @throws { BusinessError } 1600001 - Internal error.
1880   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1881   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1882   * @throws { BusinessError } 1600004 - Notification disabled.
1883   * @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
1884   * @syscap SystemCapability.Notification.Notification
1885   * @since 11
1886   */
1887  /**
1888   * Request permission to send notification.
1889   *
1890   * @returns { Promise<void> } The promise returned by the function.
1891   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1892   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1893   * @throws { BusinessError } 1600001 - Internal error.
1894   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1895   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1896   * @throws { BusinessError } 1600004 - Notification disabled.
1897   * @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
1898   * @syscap SystemCapability.Notification.Notification
1899   * @crossplatform
1900   * @since 12
1901   * @deprecated since 12
1902   * @useinstead requestEnableNotification
1903   */
1904  function requestEnableNotification(): Promise<void>;
1905
1906  /**
1907   * Request permission to send notification.
1908   *
1909   * @param { UIAbilityContext } context - The context indicates the ability context you want to bind;
1910   * @returns { Promise<void> } The promise returned by the function.
1911   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1912   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1913   * @throws { BusinessError } 1600001 - Internal error.
1914   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1915   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1916   * @syscap SystemCapability.Notification.Notification
1917   * @StageModelOnly
1918   * @since 10
1919   */
1920  /**
1921   * Request permission to send notification.
1922   *
1923   * @param { UIAbilityContext } context - The context indicates the ability context you want to bind;
1924   * @returns { Promise<void> } The promise returned by the function.
1925   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1926   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1927   * @throws { BusinessError } 1600001 - Internal error.
1928   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1929   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1930   * @throws { BusinessError } 1600004 - Notification disabled.
1931   * @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
1932   * @syscap SystemCapability.Notification.Notification
1933   * @StageModelOnly
1934   * @since 11
1935   */
1936  /**
1937   * Request permission to send notification.
1938   *
1939   * @param { UIAbilityContext } context - The context indicates the ability context you want to bind;
1940   * @returns { Promise<void> } The promise returned by the function.
1941   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1942   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1943   * @throws { BusinessError } 1600001 - Internal error.
1944   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1945   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1946   * @throws { BusinessError } 1600004 - Notification disabled.
1947   * @throws { BusinessError } 1600013 - A notification dialog box is already displayed.
1948   * @syscap SystemCapability.Notification.Notification
1949   * @StageModelOnly
1950   * @crossplatform
1951   * @since 12
1952   */
1953  function requestEnableNotification(context: UIAbilityContext): Promise<void>;
1954
1955  /**
1956   * Sets whether the device supports distributed notification.
1957   *
1958   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1959   * @param { boolean } enable - Set enable or not.
1960   * @param { AsyncCallback<void> } callback - The callback of setDistributedEnable.
1961   * @throws { BusinessError } 201 - Permission denied.
1962   * @throws { BusinessError } 202 - Not system application to call the interface.
1963   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1964   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1965   * @throws { BusinessError } 1600001 - Internal error.
1966   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1967   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1968   * @throws { BusinessError } 1600010 - Distributed operation failed.
1969   * @syscap SystemCapability.Notification.Notification
1970   * @systemapi
1971   * @since 9
1972   */
1973  function setDistributedEnable(enable: boolean, callback: AsyncCallback<void>): void;
1974
1975  /**
1976   * Sets whether the device supports distributed notification.
1977   *
1978   * @permission ohos.permission.NOTIFICATION_CONTROLLER
1979   * @param { boolean } enable - Set enable or not.
1980   * @returns { Promise<void> } The promise returned by the function.
1981   * @throws { BusinessError } 201 - Permission denied.
1982   * @throws { BusinessError } 202 - Not system application to call the interface.
1983   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
1984   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
1985   * @throws { BusinessError } 1600001 - Internal error.
1986   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
1987   * @throws { BusinessError } 1600003 - Failed to connect to the service.
1988   * @throws { BusinessError } 1600010 - Distributed operation failed.
1989   * @syscap SystemCapability.Notification.Notification
1990   * @systemapi
1991   * @since 9
1992   */
1993  function setDistributedEnable(enable: boolean): Promise<void>;
1994
1995  /**
1996   * Obtains whether the device supports distributed notification.
1997   *
1998   * @param { AsyncCallback<boolean> } callback - The callback is used to return whether the distributed
1999   *                                              notification is supported.
2000   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2001   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2002   * @throws { BusinessError } 1600001 - Internal error.
2003   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2004   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2005   * @throws { BusinessError } 1600010 - Distributed operation failed.
2006   * @syscap SystemCapability.Notification.Notification
2007   * @since 9
2008   */
2009  function isDistributedEnabled(callback: AsyncCallback<boolean>): void;
2010
2011  /**
2012   * Obtains whether the device supports distributed notification.
2013   *
2014   * @returns { Promise<boolean> } Returns whether the distributed notification is supported.
2015   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2016   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2017   * @throws { BusinessError } 1600001 - Internal error.
2018   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2019   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2020   * @throws { BusinessError } 1600010 - Distributed operation failed.
2021   * @syscap SystemCapability.Notification.Notification
2022   * @since 9
2023   */
2024  function isDistributedEnabled(): Promise<boolean>;
2025
2026  /**
2027   * Sets whether an application supports distributed notification.
2028   *
2029   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2030   * @param { BundleOption } bundle - The bundle option.
2031   * @param { boolean } enable - Set enable or not.
2032   * @param { AsyncCallback<void> } callback - The callback of setDistributedEnableByBundle.
2033   * @throws { BusinessError } 201 - Permission denied.
2034   * @throws { BusinessError } 202 - Not system application to call the interface.
2035   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2036   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2037   * @throws { BusinessError } 1600001 - Internal error.
2038   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2039   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2040   * @throws { BusinessError } 1600010 - Distributed operation failed.
2041   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2042   * @syscap SystemCapability.Notification.Notification
2043   * @systemapi
2044   * @since 9
2045   */
2046  function setDistributedEnableByBundle(bundle: BundleOption, enable: boolean, callback: AsyncCallback<void>): void;
2047
2048  /**
2049   * Sets whether an application supports distributed notification.
2050   *
2051   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2052   * @param { BundleOption } bundle - The bundle option.
2053   * @param { boolean } enable - Set enable or not.
2054   * @returns { Promise<void> } The promise returned by the function.
2055   * @throws { BusinessError } 201 - Permission denied.
2056   * @throws { BusinessError } 202 - Not system application to call the interface.
2057   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2058   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2059   * @throws { BusinessError } 1600001 - Internal error.
2060   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2061   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2062   * @throws { BusinessError } 1600010 - Distributed operation failed.
2063   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2064   * @syscap SystemCapability.Notification.Notification
2065   * @systemapi
2066   * @since 9
2067   */
2068  function setDistributedEnableByBundle(bundle: BundleOption, enable: boolean): Promise<void>;
2069
2070  /**
2071   * Sets whether an application supports distributed notification.
2072   *
2073   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2074   * @param { BundleOption } bundle - The bundle option.
2075   * @param { string } deviceType - The device type.
2076   * @param { boolean } enable - Set enable or not.
2077   * @returns { Promise<void> } The promise returned by the function.
2078   * @throws { BusinessError } 201 - Permission denied.
2079   * @throws { BusinessError } 202 - Not system application to call the interface.
2080   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2081   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2082   * @throws { BusinessError } 1600001 - Internal error.
2083   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2084   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2085   * @throws { BusinessError } 1600010 - Distributed operation failed.
2086   * @throws { BusinessError } 1600012 - No memory space.
2087   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2088   * @syscap SystemCapability.Notification.Notification
2089   * @systemapi
2090   * @since 12
2091   */
2092  function setDistributedEnabledByBundle(bundle: BundleOption, deviceType: string, enable: boolean): Promise<void>;
2093
2094  /**
2095   * Obtains whether an application supports distributed notification.
2096   *
2097   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2098   * @param { BundleOption } bundle - The bundle option.
2099   * @param { AsyncCallback<boolean> } callback - The callback is used to return whether the distributed
2100   *                                              notification is supported.
2101   * @throws { BusinessError } 201 - Permission denied.
2102   * @throws { BusinessError } 202 - Not system application to call the interface.
2103   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2104   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2105   * @throws { BusinessError } 1600001 - Internal error.
2106   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2107   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2108   * @throws { BusinessError } 1600010 - Distributed operation failed.
2109   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2110   * @syscap SystemCapability.Notification.Notification
2111   * @systemapi
2112   * @since 9
2113   */
2114  function isDistributedEnabledByBundle(bundle: BundleOption, callback: AsyncCallback<boolean>): void;
2115
2116  /**
2117   * Obtains whether an application supports distributed notification.
2118   *
2119   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2120   * @param { BundleOption } bundle - The bundle option.
2121   * @returns { Promise<boolean> } Returns whether the distributed notification is supported.
2122   * @throws { BusinessError } 201 - Permission denied.
2123   * @throws { BusinessError } 202 - Not system application to call the interface.
2124   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2125   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2126   * @throws { BusinessError } 1600001 - Internal error.
2127   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2128   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2129   * @throws { BusinessError } 1600010 - Distributed operation failed.
2130   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2131   * @syscap SystemCapability.Notification.Notification
2132   * @systemapi
2133   * @since 9
2134   */
2135  function isDistributedEnabledByBundle(bundle: BundleOption): Promise<boolean>;
2136
2137  /**
2138   * Obtains whether an application supports distributed notification.
2139   *
2140   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2141   * @param { BundleOption } bundle - The bundle option.
2142   * @param { string } deviceType - The device type.
2143   * @returns { Promise<boolean> } Returns whether the distributed notification is supported.
2144   * @throws { BusinessError } 201 - Permission denied.
2145   * @throws { BusinessError } 202 - Not system application to call the interface.
2146   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2147   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2148   * @throws { BusinessError } 1600001 - Internal error.
2149   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2150   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2151   * @throws { BusinessError } 1600010 - Distributed operation failed.
2152   * @throws { BusinessError } 1600012 - No memory space.
2153   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2154   * @syscap SystemCapability.Notification.Notification
2155   * @systemapi
2156   * @since 12
2157   */
2158  function isDistributedEnabledByBundle(bundle: BundleOption, deviceType: string): Promise<boolean>;
2159
2160  /**
2161   * Sets whether an application supports smart reminders across devices.
2162   *
2163   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2164   * @param { string } deviceType - The device type.
2165   * @param { boolean } enable - Set enable or not.
2166   * @returns { Promise<void> } The promise returned by the function.
2167   * @throws { BusinessError } 201 - Permission denied.
2168   * @throws { BusinessError } 202 - Not system application to call the interface.
2169   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2170   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2171   * @throws { BusinessError } 1600001 - Internal error.
2172   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2173   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2174   * @throws { BusinessError } 1600010 - Distributed operation failed.
2175   * @throws { BusinessError } 1600012 - No memory space.
2176   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2177   * @syscap SystemCapability.Notification.Notification
2178   * @systemapi
2179   * @since 12
2180   */
2181  function setSmartReminderEnabled(deviceType: string, enable: boolean): Promise<void>;
2182
2183  /**
2184   * Obtains whether an application supports smart reminders across devices.
2185   *
2186   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2187   * @param { string } deviceType - The device type.
2188   * @returns { Promise<boolean> } Returns whether the smart reminders across devices notification is supported.
2189   * @throws { BusinessError } 201 - Permission denied.
2190   * @throws { BusinessError } 202 - Not system application to call the interface.
2191   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2192   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2193   * @throws { BusinessError } 1600001 - Internal error.
2194   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2195   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2196   * @throws { BusinessError } 1600010 - Distributed operation failed.
2197   * @throws { BusinessError } 1600012 - No memory space.
2198   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2199   * @syscap SystemCapability.Notification.Notification
2200   * @systemapi
2201   * @since 12
2202   */
2203  function isSmartReminderEnabled(deviceType: string): Promise<boolean>;
2204
2205  /**
2206   * Obtains the remind modes of the notification.
2207   *
2208   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2209   * @param { AsyncCallback<DeviceRemindType> } callback - The callback is used to return the RemindType.
2210   * @throws { BusinessError } 201 - Permission denied.
2211   * @throws { BusinessError } 202 - Not system application to call the interface.
2212   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2213   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2214   * @throws { BusinessError } 1600001 - Internal error.
2215   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2216   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2217   * @syscap SystemCapability.Notification.Notification
2218   * @systemapi
2219   * @since 9
2220   */
2221  function getDeviceRemindType(callback: AsyncCallback<DeviceRemindType>): void;
2222
2223  /**
2224   * Obtains the remind modes of the notification.
2225   *
2226   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2227   * @returns { Promise<DeviceRemindType> } Returns the RemindType.
2228   * @throws { BusinessError } 201 - Permission denied.
2229   * @throws { BusinessError } 202 - Not system application to call the interface.
2230   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2231   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2232   * @throws { BusinessError } 1600001 - Internal error.
2233   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2234   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2235   * @syscap SystemCapability.Notification.Notification
2236   * @systemapi
2237   * @since 9
2238   */
2239  function getDeviceRemindType(): Promise<DeviceRemindType>;
2240
2241  /**
2242   * Set whether the application slot is enabled.
2243   *
2244   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2245   * @param { BundleOption } bundle - The bundle option.
2246   * @param { SlotType } type - Type of the notification slot.
2247   * @param { boolean } enable - Set enable or not.
2248   * @param { AsyncCallback<void> } callback - The callback of setNotificationEnableSlot.
2249   * @throws { BusinessError } 201 - Permission denied.
2250   * @throws { BusinessError } 202 - Not system application to call the interface.
2251   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2252   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2253   * @throws { BusinessError } 1600001 - Internal error.
2254   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2255   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2256   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2257   * @syscap SystemCapability.Notification.Notification
2258   * @systemapi
2259   * @since 9
2260   */
2261  /**
2262   * Set whether the application slot is enabled.
2263   *
2264   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2265   * @param { BundleOption } bundle - The bundle option.
2266   * @param { SlotType } type - Type of the notification slot.
2267   * @param { boolean } enable - Set enable or not.
2268   * @param { AsyncCallback<void> } callback - The callback of setNotificationEnableSlot.
2269   * @throws { BusinessError } 201 - Permission denied.
2270   * @throws { BusinessError } 202 - Not system application to call the interface.
2271   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2272   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2273   * @throws { BusinessError } 1600001 - Internal error.
2274   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2275   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2276   * @throws { BusinessError } 1600012 - No memory space.
2277   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2278   * @syscap SystemCapability.Notification.Notification
2279   * @systemapi
2280   * @since 11
2281   */
2282  function setNotificationEnableSlot(
2283    bundle: BundleOption,
2284    type: SlotType,
2285    enable: boolean,
2286    callback: AsyncCallback<void>
2287  ): void;
2288
2289  /**
2290   * Set whether the application slot is enabled.
2291   *
2292   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2293   * @param { BundleOption } bundle - The bundle option.
2294   * @param { SlotType } type - Type of the notification slot.
2295   * @param { boolean } enable - Set enable or not.
2296   * @param { boolean } isForceControl - Is the notification slot enable affected by the application
2297   *         notification enable, false means affected.
2298   * @param { AsyncCallback<void> } callback - The callback of setNotificationEnableSlot.
2299   * @throws { BusinessError } 201 - Permission denied.
2300   * @throws { BusinessError } 202 - Not system application to call the interface.
2301   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2302   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2303   * @throws { BusinessError } 1600001 - Internal error.
2304   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2305   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2306   * @throws { BusinessError } 1600012 - No memory space.
2307   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2308   * @syscap SystemCapability.Notification.Notification
2309   * @systemapi
2310   * @since 11
2311   */
2312  function setNotificationEnableSlot(
2313    bundle: BundleOption,
2314    type: SlotType,
2315    enable: boolean,
2316    isForceControl: boolean,
2317    callback: AsyncCallback<void>,
2318  ): void;
2319
2320  /**
2321   * Set whether the application slot is enabled.
2322   *
2323   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2324   * @param { BundleOption } bundle - The bundle option.
2325   * @param { SlotType } type - Type of the notification slot.
2326   * @param { boolean } enable - Set enable or not.
2327   * @returns { Promise<void> } The promise returned by the function.
2328   * @throws { BusinessError } 201 - Permission denied.
2329   * @throws { BusinessError } 202 - Not system application to call the interface.
2330   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2331   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2332   * @throws { BusinessError } 1600001 - Internal error.
2333   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2334   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2335   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2336   * @syscap SystemCapability.Notification.Notification
2337   * @systemapi
2338   * @since 9
2339   */
2340  /**
2341   * Set whether the application slot is enabled.
2342   *
2343   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2344   * @param { BundleOption } bundle - The bundle option.
2345   * @param { SlotType } type - Type of the notification slot.
2346   * @param { boolean } enable - Set enable or not.
2347   * @param { boolean } isForceControl - Is the notification slot enable affected by the application
2348   *         notification enable, false means affected.
2349   * @returns { Promise<void> } The promise returned by the function.
2350   * @throws { BusinessError } 201 - Permission denied.
2351   * @throws { BusinessError } 202 - Not system application to call the interface.
2352   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2353   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2354   * @throws { BusinessError } 1600001 - Internal error.
2355   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2356   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2357   * @throws { BusinessError } 1600012 - No memory space.
2358   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2359   * @syscap SystemCapability.Notification.Notification
2360   * @systemapi
2361   * @since 11
2362   */
2363  function setNotificationEnableSlot(bundle: BundleOption, type: SlotType, enable: boolean, isForceControl?: boolean): Promise<void>;
2364
2365  /**
2366   * Obtains whether the application slot is enabled.
2367   *
2368   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2369   * @param { BundleOption } bundle - The bundle option.
2370   * @param { SlotType } type - Type of the notification slot.
2371   * @param { AsyncCallback<boolean> } callback - The callback is used to return whether the application slot is enabled.
2372   * @throws { BusinessError } 201 - Permission denied.
2373   * @throws { BusinessError } 202 - Not system application to call the interface.
2374   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2375   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2376   * @throws { BusinessError } 1600001 - Internal error.
2377   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2378   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2379   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2380   * @syscap SystemCapability.Notification.Notification
2381   * @systemapi
2382   * @since 9
2383   */
2384  function isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncCallback<boolean>): void;
2385
2386  /**
2387   * Obtains whether the application slot is enabled.
2388   *
2389   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2390   * @param { BundleOption } bundle - The bundle option.
2391   * @param { SlotType } type - Type of the notification slot.
2392   * @returns { Promise<boolean> } Returns whether the application slot is enabled.
2393   * @throws { BusinessError } 201 - Permission denied.
2394   * @throws { BusinessError } 202 - Not system application to call the interface.
2395   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2396   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2397   * @throws { BusinessError } 1600001 - Internal error.
2398   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2399   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2400   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2401   * @syscap SystemCapability.Notification.Notification
2402   * @systemapi
2403   * @since 9
2404   */
2405  function isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise<boolean>;
2406
2407  /**
2408   * Set whether to sync notifications to devices that do not have the app installed.
2409   *
2410   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2411   * @param { number } userId - The userId.
2412   * @param { boolean } enable - Set enable or not.
2413   * @param { AsyncCallback<void> } callback - The callback of setSyncNotificationEnabledWithoutApp.
2414   * @throws { BusinessError } 201 - Permission denied.
2415   * @throws { BusinessError } 202 - Not system application to call the interface.
2416   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2417   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2418   * @throws { BusinessError } 1600001 - Internal error.
2419   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2420   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2421   * @throws { BusinessError } 1600008 - The user does not exist.
2422   * @syscap SystemCapability.Notification.Notification
2423   * @systemapi
2424   * @since 9
2425   */
2426  function setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean, callback: AsyncCallback<void>): void;
2427
2428  /**
2429   * Set whether to sync notifications to devices that do not have the app installed.
2430   *
2431   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2432   * @param { number } userId - The userId.
2433   * @param { boolean } enable - Set enable or not.
2434   * @returns { Promise<void> } The promise returned by the function.
2435   * @throws { BusinessError } 201 - Permission denied.
2436   * @throws { BusinessError } 202 - Not system application to call the interface.
2437   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2438   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2439   * @throws { BusinessError } 1600001 - Internal error.
2440   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2441   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2442   * @throws { BusinessError } 1600008 - The user does not exist.
2443   * @syscap SystemCapability.Notification.Notification
2444   * @systemapi
2445   * @since 9
2446   */
2447  function setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean): Promise<void>;
2448
2449  /**
2450   * Obtains whether to sync notifications to devices that do not have the app installed.
2451   *
2452   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2453   * @param { number } userId - The userId.
2454   * @param { AsyncCallback<boolean> } callback - The callback is used to return whether to sync notifications to devices.
2455   * @throws { BusinessError } 201 - Permission denied.
2456   * @throws { BusinessError } 202 - Not system application to call the interface.
2457   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2458   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2459   * @throws { BusinessError } 1600001 - Internal error.
2460   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2461   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2462   * @throws { BusinessError } 1600008 - The user does not exist.
2463   * @syscap SystemCapability.Notification.Notification
2464   * @systemapi
2465   * @since 9
2466   */
2467  function getSyncNotificationEnabledWithoutApp(userId: number, callback: AsyncCallback<boolean>): void;
2468
2469  /**
2470   * Obtains whether to sync notifications to devices that do not have the app installed.
2471   *
2472   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2473   * @param { number } userId - The userId.
2474   * @returns { Promise<boolean> } Returns whether to sync notifications to devices.
2475   * @throws { BusinessError } 201 - Permission denied.
2476   * @throws { BusinessError } 202 - Not system application to call the interface.
2477   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2478   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2479   * @throws { BusinessError } 1600001 - Internal error.
2480   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2481   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2482   * @throws { BusinessError } 1600008 - The user does not exist.
2483   * @syscap SystemCapability.Notification.Notification
2484   * @systemapi
2485   * @since 9
2486   */
2487  function getSyncNotificationEnabledWithoutApp(userId: number): Promise<boolean>;
2488
2489  /**
2490   * Set badge number.
2491   *
2492   * @param { number } badgeNumber - Badge number.
2493   * @param { AsyncCallback<void> } callback - callback - The callback of setBadgeNumber..
2494   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2495   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2496   * @throws { BusinessError } 1600001 - Internal error.
2497   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2498   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2499   * @throws { BusinessError } 1600012 - No memory space.
2500   * @syscap SystemCapability.Notification.Notification
2501   * @since 10
2502   */
2503  /**
2504   * Set badge number.
2505   *
2506   * @param { number } badgeNumber - Badge number.
2507   * @param { AsyncCallback<void> } callback - callback - The callback of setBadgeNumber..
2508   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2509   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2510   * @throws { BusinessError } 1600001 - Internal error.
2511   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2512   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2513   * @throws { BusinessError } 1600012 - No memory space.
2514   * @syscap SystemCapability.Notification.Notification
2515   * @crossplatform
2516   * @since 12
2517   */
2518  function setBadgeNumber(badgeNumber: number, callback: AsyncCallback<void>): void;
2519
2520  /**
2521   * Set badge number.
2522   *
2523   * @param { number } badgeNumber - Badge number.
2524   * @returns { Promise<void> } The promise returned by the function.
2525   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2526   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2527   * @throws { BusinessError } 1600001 - Internal error.
2528   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2529   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2530   * @throws { BusinessError } 1600012 - No memory space.
2531   * @syscap SystemCapability.Notification.Notification
2532   * @since 10
2533   */
2534  /**
2535   * Set badge number.
2536   *
2537   * @param { number } badgeNumber - Badge number.
2538   * @returns { Promise<void> } The promise returned by the function.
2539   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2540   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2541   * @throws { BusinessError } 1600001 - Internal error.
2542   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2543   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2544   * @throws { BusinessError } 1600012 - No memory space.
2545   * @syscap SystemCapability.Notification.Notification
2546   * @crossplatform
2547   * @since 12
2548   */
2549  function setBadgeNumber(badgeNumber: number): Promise<void>;
2550
2551  /**
2552   * Set badge number by bundle.
2553   *
2554   * @param { BundleOption } bundle - Use the bundleOption to carry bundleName and uid of the application.
2555   * @param { number } badgeNumber - Badge number.
2556   * @returns { Promise<void> } The promise returned by the function.
2557   * @throws { BusinessError } 202 - Not system application to call the interface.
2558   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2559   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2560   * @throws { BusinessError } 1600001 - Internal error.
2561   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2562   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2563   * @throws { BusinessError } 1600012 - No memory space.
2564   * @throws { BusinessError } 1600017 - There is no corresponding agent relationship configuration.
2565   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2566   * @syscap SystemCapability.Notification.Notification
2567   * @systemapi
2568   * @since 12
2569   */
2570  function setBadgeNumberByBundle(bundle: BundleOption, badgeNumber: number): Promise<void>;
2571
2572  /**
2573   * Subscribe the callback for check notifications.
2574   *
2575   * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2576   * @param { 'checkNotification' } type - Type of the callback to listen for.
2577   * @param { function } callback - callback - The callback of check notifications.
2578   * @throws { BusinessError } 202 - Not system application.
2579   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2580   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2581   * @throws { BusinessError } 1600001 - Internal error.
2582   * @syscap SystemCapability.Notification.Notification
2583   * @systemapi
2584   * @since 10
2585   */
2586  function on(type: 'checkNotification', callback: (checkInfo: NotificationCheckInfo) => NotificationCheckResult): void;
2587
2588  /**
2589   * Subscribe the callback for check notifications.
2590   *
2591   * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2592   * @param { 'checkNotification' } type - Type of the callback to listen for.
2593   * @param { NotificationCheckRequest } checkRequest - Check Request for filter notification request.
2594   * @param { function } callback - callback - The callback of check notifications.
2595   * @throws { BusinessError } 201 - Permission denied.
2596   * @throws { BusinessError } 202 - Not system application.
2597   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2598   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2599   * @throws { BusinessError } 1600001 - Internal error.
2600   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2601   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2602   * @syscap SystemCapability.Notification.Notification
2603   * @systemapi
2604   * @since 11
2605   */
2606  function on(type: 'checkNotification', checkRequest: NotificationCheckRequest,
2607    callback: (checkInfo: NotificationCheckInfo) => Promise<NotificationCheckResult>): void;
2608
2609  /**
2610   * Unsubscribe the callback for check notifications.
2611   *
2612   * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2613   * @param { 'checkNotification' } type - Type of the callback to listen for.
2614   * @param { function } [callback] - callback - The callback of check notifications.
2615   * @throws { BusinessError } 202 - Not system application.
2616   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2617   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2618   * @throws { BusinessError } 1600001 - Internal error.
2619   * @syscap SystemCapability.Notification.Notification
2620   * @systemapi
2621   * @since 10
2622   */
2623  function off(
2624    type: 'checkNotification',
2625    callback?: (checkInfo: NotificationCheckInfo) => NotificationCheckResult
2626  ): void;
2627
2628  /**
2629   * Trigger system live view notification.
2630   *
2631   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2632   * @param { BundleOption } bundle - The bundle option.
2633   * @param { number } notificationId - The notification id.
2634   * @param { ButtonOptions } buttonOptions - The button option.
2635   * @returns { Promise<void> } The promise returned by the function.
2636   * @throws { BusinessError } 201 - Permission denied.
2637   * @throws { BusinessError } 202 - Not system application to call the interface.
2638   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2639   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2640   * @throws { BusinessError } 1600001 - Internal error.
2641   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2642   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2643   * @throws { BusinessError } 1600007 - The notification does not exist.
2644   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2645   * @syscap SystemCapability.Notification.Notification
2646   * @systemapi
2647   * @since 11
2648   */
2649  function triggerSystemLiveView(bundle: BundleOption, notificationId: number, buttonOptions: ButtonOptions): Promise<void>;
2650
2651  /**
2652   * Subscribe to system live view notifications
2653   *
2654   * @param { SystemLiveViewSubscriber } subscriber - The system live vie notification subscriber.
2655   * @returns { Promise<void> } The promise returned by the function.
2656   * @throws { BusinessError } 202 - Not system application to call the interface.
2657   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2658   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2659   * @throws { BusinessError } 1600001 - Internal error.
2660   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2661   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2662   * @throws { BusinessError } 1600012 - No memory space.
2663   * @syscap SystemCapability.Notification.Notification
2664   * @systemapi
2665   * @since 11
2666   */
2667  function subscribeSystemLiveView(subscriber: SystemLiveViewSubscriber): Promise<void>;
2668
2669  /**
2670   * Set basic configurations of application-level notification channels.
2671   *
2672   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2673   * @param { BundleOption } bundle - The bundle option.
2674   * @param { number } slotFlags - Indicates the slotFlags.
2675   * @returns { Promise<void> } The promise returned by the function.
2676   * @throws { BusinessError } 201 - Permission denied.
2677   * @throws { BusinessError } 202 - Not system application to call the interface.
2678   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2679   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2680   * @throws { BusinessError } 1600001 - Internal error.
2681   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2682   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2683   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2684   * @syscap SystemCapability.Notification.Notification
2685   * @systemapi
2686   * @since 11
2687   */
2688  function setSlotFlagsByBundle(bundle: BundleOption, slotFlags: number): Promise<void>;
2689
2690  /**
2691   * Obtains basic configurations of application-level notification channels.
2692   *
2693   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2694   * @param { BundleOption } bundle - The bundle option.
2695   * @returns { Promise<number> } The promise returned by the function.
2696   * @throws { BusinessError } 201 - Permission denied.
2697   * @throws { BusinessError } 202 - Not system application to call the interface.
2698   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2699   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2700   * @throws { BusinessError } 1600001 - Internal error.
2701   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2702   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2703   * @throws { BusinessError } 17700001 - The specified bundle name was not found.
2704   * @syscap SystemCapability.Notification.Notification
2705   * @systemapi
2706   * @since 11
2707   */
2708  function getSlotFlagsByBundle(bundle: BundleOption): Promise<number>;
2709
2710  /**
2711   * Add do not disturb notification templates.
2712   *
2713   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2714   * @param { Array<DoNotDisturbProfile> } templates - The array of Notification templates.
2715   * @returns { Promise<void> } The promise returned by the function.
2716   * @throws { BusinessError } 201 - Permission denied.
2717   * @throws { BusinessError } 202 - Not system application to call the interface.
2718   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2719   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2720   * @throws { BusinessError } 1600001 - Internal error.
2721   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2722   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2723   * @throws { BusinessError } 1600012 - No memory space.
2724   * @syscap SystemCapability.Notification.Notification
2725   * @systemapi
2726   * @since 12
2727   */
2728  function addDoNotDisturbProfile(templates: Array<DoNotDisturbProfile>): Promise<void>;
2729
2730  /**
2731   * Remove do not disturb notification templates.
2732   *
2733   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2734   * @param { Array<DoNotDisturbProfile> } templates - The array of Notification templates.
2735   * @returns { Promise<void> } The promise returned by the function.
2736   * @throws { BusinessError } 201 - Permission denied.
2737   * @throws { BusinessError } 202 - Not system application to call the interface.
2738   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2739   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2740   * @throws { BusinessError } 1600001 - Internal error.
2741   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2742   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2743   * @throws { BusinessError } 1600012 - No memory space.
2744   * @syscap SystemCapability.Notification.Notification
2745   * @systemapi
2746   * @since 12
2747   */
2748  function removeDoNotDisturbProfile(templates: Array<DoNotDisturbProfile>): Promise<void>;
2749
2750  /**
2751   * Set system additional config information of notification
2752   *
2753   * @permission ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2754   * @param { string } key - addition config key.
2755   * @param { string } value - addition config value.
2756   * @returns { Promise<number> } The promise returned by the function.
2757   * @throws { BusinessError } 201 - Permission denied.
2758   * @throws { BusinessError } 202 - Not system application to call the interface.
2759   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2760   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2761   * @throws { BusinessError } 1600001 - Internal error.
2762   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2763   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2764   * @syscap SystemCapability.Notification.Notification
2765   * @systemapi
2766   * @since 12
2767   */
2768  function setAdditionalConfig(key: string, value: string): Promise<number>;
2769
2770  /**
2771   * Request open the notification settings pop-up window.
2772   *
2773   * @param { UIAbilityContext } context - The context indicates the ability context you want to bind;
2774   * @returns { Promise<void> } The promise returned by the function.
2775   * @throws { BusinessError } 1600001 - Internal error.
2776   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2777   * @throws { BusinessError } 1600018 - the notification settings window is already displayed.
2778   * @syscap SystemCapability.Notification.NotificationSettings
2779   * @stagemodelonly
2780   * @since 13
2781   */
2782  function openNotificationSettings(context: UIAbilityContext): Promise<void>;
2783
2784  /**
2785   * Get do not disturb profile by id.
2786   *
2787   * @permission ohos.permission.NOTIFICATION_CONTROLLER
2788   * @param { number } id - The id of profile.
2789   * @returns { Promise<DoNotDisturbProfile> } The promise returned by the function.
2790   * @throws { BusinessError } 201 - Permission denied.
2791   * @throws { BusinessError } 202 - Not system application to call the interface.
2792   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
2793   * <br>2. Incorrect parameter types. 3. Parameter verification failed.
2794   * @throws { BusinessError } 1600001 - Internal error.
2795   * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
2796   * @throws { BusinessError } 1600003 - Failed to connect to the service.
2797   * @throws { BusinessError } 1600019 - The do-not-disturb profile does not exist.
2798   * @syscap SystemCapability.Notification.Notification
2799   * @systemapi
2800   * @since 13
2801   */
2802  function getDoNotDisturbProfile(id: number): Promise<DoNotDisturbProfile>;
2803
2804  /**
2805   * Describes a button option for a triggering.
2806   *
2807   * @typedef ButtonOptions
2808   * @syscap SystemCapability.Notification.Notification
2809   * @systemapi
2810   * @since 11
2811   */
2812  export interface ButtonOptions {
2813    /**
2814     * The button name for a triggering.
2815     *
2816     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2817     * @type { string }
2818     * @syscap SystemCapability.Notification.Notification
2819     * @systemapi
2820     * @since 11
2821     */
2822    buttonName: string;
2823  }
2824
2825  /**
2826   * Describes a subscriber for system live view.
2827   *
2828   * @typedef SystemLiveViewSubscriber
2829   * @syscap SystemCapability.Notification.Notification
2830   * @systemapi
2831   * @since 11
2832   */
2833  export interface SystemLiveViewSubscriber {
2834    /**
2835     * The callback function that receives a new button option of a notification.
2836     *
2837     * @type { ?function }
2838     * @syscap SystemCapability.Notification.Notification
2839     * @systemapi
2840     * @since 11
2841     */
2842    onResponse?: (notificationId: number, buttonOptions: ButtonOptions) => void;
2843  }
2844
2845  /**
2846   * Describes the parameters of check notifications.
2847   *
2848   * @typedef NotificationCheckInfo
2849   * @syscap SystemCapability.Notification.Notification
2850   * @systemapi
2851   * @since 10
2852   */
2853  export interface NotificationCheckInfo {
2854    /**
2855     * The application bundle name for publishing notification.
2856     *
2857     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2858     * @type { string }
2859     * @syscap SystemCapability.Notification.Notification
2860     * @systemapi
2861     * @since 10
2862     */
2863    bundleName: string;
2864
2865    /**
2866     * The notification id.
2867     *
2868     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2869     * @type { number }
2870     * @syscap SystemCapability.Notification.Notification
2871     * @systemapi
2872     * @since 10
2873     */
2874    notificationId: number;
2875
2876    /**
2877     * Label of the notification.
2878     *
2879     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2880     * @type { ?string }
2881     * @syscap SystemCapability.Notification.Notification
2882     * @systemapi
2883     * @since 11
2884     */
2885    label?: string;
2886
2887    /**
2888     * The notification content type.
2889     *
2890     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2891     * @type { ContentType }
2892     * @syscap SystemCapability.Notification.Notification
2893     * @systemapi
2894     * @since 10
2895     */
2896    contentType: ContentType;
2897
2898    /**
2899     * UserId of the notification creator.
2900     *
2901     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2902     * @type { number }
2903     * @syscap SystemCapability.Notification.Notification
2904     * @systemapi
2905     * @since 11
2906     */
2907    creatorUserId: number;
2908
2909    /**
2910     * Type of the notification slot.
2911     *
2912     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2913     * @type { SlotType }
2914     * @syscap SystemCapability.Notification.Notification
2915     * @systemapi
2916     * @since 11
2917     */
2918    slotType: SlotType;
2919
2920    /**
2921     * Additional information of the live view notification.
2922     *
2923     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2924     * @type { ?Record<string, Object> }
2925     * @syscap SystemCapability.Notification.Notification
2926     * @systemapi
2927     * @since 11
2928     */
2929    extraInfos?: Record<string, Object>;
2930  }
2931
2932  /**
2933   * Describes the result of check notifications.
2934   *
2935   * @typedef NotificationCheckResult
2936   * @syscap SystemCapability.Notification.Notification
2937   * @systemapi
2938   * @since 10
2939   */
2940  export interface NotificationCheckResult {
2941    /**
2942     * The result code. 0-display, 1-no display
2943     *
2944     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2945     * @type { number }
2946     * @syscap SystemCapability.Notification.Notification
2947     * @systemapi
2948     * @since 10
2949     */
2950    code: number;
2951
2952    /**
2953     * The result message.
2954     *
2955     * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER
2956     * @type { string }
2957     * @syscap SystemCapability.Notification.Notification
2958     * @systemapi
2959     * @since 10
2960     */
2961    message: string;
2962  }
2963
2964  /**
2965   * Describes NotificationSlot types.
2966   *
2967   * @enum { number }
2968   * @syscap SystemCapability.Notification.Notification
2969   * @since 9
2970   */
2971  /**
2972   * Describes NotificationSlot types.
2973   *
2974   * @enum { number }
2975   * @syscap SystemCapability.Notification.Notification
2976   * @atomicservice
2977   * @since 12
2978   */
2979  export enum SlotType {
2980    /**
2981     * NotificationSlot of an unknown type.
2982     *
2983     * @syscap SystemCapability.Notification.Notification
2984     * @since 9
2985     */
2986    /**
2987     * NotificationSlot of an unknown type.
2988     *
2989     * @syscap SystemCapability.Notification.Notification
2990     * @atomicservice
2991     * @since 12
2992     */
2993    UNKNOWN_TYPE = 0,
2994
2995    /**
2996     * NotificationSlot for social communication.
2997     *
2998     * @syscap SystemCapability.Notification.Notification
2999     * @since 9
3000     */
3001    /**
3002     * NotificationSlot for social communication.
3003     *
3004     * @syscap SystemCapability.Notification.Notification
3005     * @atomicservice
3006     * @since 12
3007     */
3008    SOCIAL_COMMUNICATION = 1,
3009
3010    /**
3011     * NotificationSlot for service information.
3012     *
3013     * @syscap SystemCapability.Notification.Notification
3014     * @since 9
3015     */
3016    /**
3017     * NotificationSlot for service information.
3018     *
3019     * @syscap SystemCapability.Notification.Notification
3020     * @atomicservice
3021     * @since 12
3022     */
3023    SERVICE_INFORMATION = 2,
3024
3025    /**
3026     * NotificationSlot for content information.
3027     *
3028     * @syscap SystemCapability.Notification.Notification
3029     * @since 9
3030     */
3031    /**
3032     * NotificationSlot for content information.
3033     *
3034     * @syscap SystemCapability.Notification.Notification
3035     * @atomicservice
3036     * @since 12
3037     */
3038    CONTENT_INFORMATION = 3,
3039
3040    /**
3041     * NotificationSlot for live view.
3042     *
3043     * @syscap SystemCapability.Notification.Notification
3044     * @since 11
3045     */
3046    /**
3047     * NotificationSlot for live view.
3048     *
3049     * @syscap SystemCapability.Notification.Notification
3050     * @atomicservice
3051     * @since 12
3052     */
3053    LIVE_VIEW = 4,
3054
3055    /**
3056     * NotificationSlot for customer service.
3057     *
3058     * @syscap SystemCapability.Notification.Notification
3059     * @since 11
3060     */
3061    /**
3062     * NotificationSlot for customer service.
3063     *
3064     * @syscap SystemCapability.Notification.Notification
3065     * @atomicservice
3066     * @since 12
3067     */
3068    CUSTOMER_SERVICE = 5,
3069
3070    /**
3071     * NotificationSlot for emergency information.
3072     *
3073     * @syscap SystemCapability.Notification.Notification
3074     * @systemapi
3075     * @since 12
3076     */
3077    EMERGENCY_INFORMATION = 10,
3078
3079    /**
3080     * NotificationSlot for other purposes.
3081     *
3082     * @syscap SystemCapability.Notification.Notification
3083     * @since 9
3084     */
3085    /**
3086     * NotificationSlot for other purposes.
3087     *
3088     * @syscap SystemCapability.Notification.Notification
3089     * @atomicservice
3090     * @since 12
3091     */
3092    OTHER_TYPES = 0xFFFF
3093  }
3094
3095  /**
3096   * Describes notification content types.
3097   *
3098   * @enum { number }
3099   * @syscap SystemCapability.Notification.Notification
3100   * @since 9
3101   */
3102  /**
3103   * Describes notification content types.
3104   *
3105   * @enum { number }
3106   * @syscap SystemCapability.Notification.Notification
3107   * @crossplatform
3108   * @atomicservice
3109   * @since 12
3110   */
3111  export enum ContentType {
3112    /**
3113     * Normal text notification.
3114     *
3115     * @syscap SystemCapability.Notification.Notification
3116     * @since 9
3117     */
3118    /**
3119     * Normal text notification.
3120     *
3121     * @syscap SystemCapability.Notification.Notification
3122     * @crossplatform
3123     * @atomicservice
3124     * @since 12
3125     */
3126    NOTIFICATION_CONTENT_BASIC_TEXT,
3127
3128    /**
3129     * Long text notification.
3130     *
3131     * @syscap SystemCapability.Notification.Notification
3132     * @since 9
3133     */
3134    /**
3135     * Long text notification.
3136     *
3137     * @syscap SystemCapability.Notification.Notification
3138     * @crossplatform
3139     * @atomicservice
3140     * @since 12
3141     */
3142    NOTIFICATION_CONTENT_LONG_TEXT,
3143
3144    /**
3145     * Picture-attached notification.
3146     *
3147     * @syscap SystemCapability.Notification.Notification
3148     * @since 9
3149     */
3150    /**
3151     * Picture-attached notification.
3152     *
3153     * @syscap SystemCapability.Notification.Notification
3154     * @atomicservice
3155     * @since 12
3156     */
3157    NOTIFICATION_CONTENT_PICTURE,
3158
3159    /**
3160     * Conversation notification.
3161     *
3162     * @syscap SystemCapability.Notification.Notification
3163     * @since 9
3164     */
3165    /**
3166     * Conversation notification.
3167     *
3168     * @syscap SystemCapability.Notification.Notification
3169     * @atomicservice
3170     * @since 12
3171     */
3172    NOTIFICATION_CONTENT_CONVERSATION,
3173
3174    /**
3175     * Multi-line text notification.
3176     *
3177     * @syscap SystemCapability.Notification.Notification
3178     * @since 9
3179     */
3180    /**
3181     * Multi-line text notification.
3182     *
3183     * @syscap SystemCapability.Notification.Notification
3184     * @crossplatform
3185     * @atomicservice
3186     * @since 12
3187     */
3188    NOTIFICATION_CONTENT_MULTILINE,
3189
3190    /**
3191     * System local live view notification.
3192     *
3193     * @syscap SystemCapability.Notification.Notification
3194     * @since 11
3195     */
3196    /**
3197     * System local live view notification.
3198     *
3199     * @syscap SystemCapability.Notification.Notification
3200     * @atomicservice
3201     * @since 12
3202     */
3203    NOTIFICATION_CONTENT_SYSTEM_LIVE_VIEW,
3204
3205    /**
3206     * Common live view notification.
3207     *
3208     * @syscap SystemCapability.Notification.Notification
3209     * @since 11
3210     */
3211    /**
3212     * Common live view notification.
3213     *
3214     * @syscap SystemCapability.Notification.Notification
3215     * @atomicservice
3216     * @since 12
3217     */
3218    NOTIFICATION_CONTENT_LIVE_VIEW,
3219  }
3220
3221  /**
3222   * Indicates the level of the slot
3223   *
3224   * @enum { number }
3225   * @syscap SystemCapability.Notification.Notification
3226   * @since 9
3227   */
3228  export enum SlotLevel {
3229    /**
3230     * Indicates that the notification function is disabled.
3231     *
3232     * @syscap SystemCapability.Notification.Notification
3233     * @since 9
3234     */
3235    LEVEL_NONE = 0,
3236
3237    /**
3238     * Indicates that the notification function is enabled but notification
3239     * icons are not displayed in the status bar, with no banner or prompt tone.
3240     *
3241     * @syscap SystemCapability.Notification.Notification
3242     * @since 9
3243     */
3244    LEVEL_MIN = 1,
3245
3246    /**
3247     * Indicates that the notification function is enabled and notification
3248     * icons are displayed in the status bar, with no banner or prompt tone.
3249     *
3250     * @syscap SystemCapability.Notification.Notification
3251     * @since 9
3252     */
3253    LEVEL_LOW = 2,
3254
3255    /**
3256     * Indicates that the notification function is enabled and notification
3257     * icons are displayed in the status bar, with no banner but with a prompt tone.
3258     *
3259     * @syscap SystemCapability.Notification.Notification
3260     * @since 9
3261     */
3262    LEVEL_DEFAULT = 3,
3263
3264    /**
3265     * Indicates that the notification function is enabled and notification
3266     * icons are displayed in the status bar, with a banner and a prompt tone.
3267     *
3268     * @syscap SystemCapability.Notification.Notification
3269     * @since 9
3270     */
3271    LEVEL_HIGH = 4
3272  }
3273
3274  /**
3275   * The type of the Do Not Disturb.
3276   *
3277   * @enum { number }
3278   * @syscap SystemCapability.Notification.Notification
3279   * @systemapi
3280   * @since 9
3281   */
3282  export enum DoNotDisturbType {
3283    /**
3284     * Non do not disturb type notification
3285     *
3286     * @syscap SystemCapability.Notification.Notification
3287     * @systemapi
3288     * @since 9
3289     */
3290    TYPE_NONE = 0,
3291
3292    /**
3293     * Execute do not disturb once in the set time period (only watch hours and minutes)
3294     *
3295     * @syscap SystemCapability.Notification.Notification
3296     * @systemapi
3297     * @since 9
3298     */
3299    TYPE_ONCE = 1,
3300
3301    /**
3302     * Execute do not disturb every day with a set time period (only watch hours and minutes)
3303     *
3304     * @syscap SystemCapability.Notification.Notification
3305     * @systemapi
3306     * @since 9
3307     */
3308    TYPE_DAILY = 2,
3309
3310    /**
3311     * Execute in the set time period (specify the time, month, day and hour)
3312     *
3313     * @syscap SystemCapability.Notification.Notification
3314     * @systemapi
3315     * @since 9
3316     */
3317    TYPE_CLEARLY = 3
3318  }
3319
3320  /**
3321   * Describes a DoNotDisturbDate instance.
3322   *
3323   * @typedef DoNotDisturbDate
3324   * @syscap SystemCapability.Notification.Notification
3325   * @systemapi
3326   * @since 9
3327   */
3328  export interface DoNotDisturbDate {
3329    /**
3330     * the type of the Do Not Disturb.
3331     *
3332     * @type { DoNotDisturbType }
3333     * @syscap SystemCapability.Notification.Notification
3334     * @systemapi
3335     * @since 9
3336     */
3337    type: DoNotDisturbType;
3338
3339    /**
3340     * The start time of the Do Not Disturb.
3341     *
3342     * @type { Date }
3343     * @syscap SystemCapability.Notification.Notification
3344     * @systemapi
3345     * @since 9
3346     */
3347    begin: Date;
3348
3349    /**
3350     * The end time of the Do Not Disturb.
3351     *
3352     * @type { Date }
3353     * @syscap SystemCapability.Notification.Notification
3354     * @systemapi
3355     * @since 9
3356     */
3357    end: Date;
3358  }
3359
3360  /**
3361   * Describes a DoNotDisturbProfile instance.
3362   *
3363   * @typedef DoNotDisturbProfile
3364   * @syscap SystemCapability.Notification.Notification
3365   * @systemapi
3366   * @since 12
3367   */
3368  export interface DoNotDisturbProfile {
3369    /**
3370     * The profile id of the Do Not disturb.
3371     *
3372     * @type { number }
3373     * @syscap SystemCapability.Notification.Notification
3374     * @systemapi
3375     * @since 12
3376     */
3377    id: number;
3378
3379    /**
3380     * The profile name of the Do Not disturb.
3381     *
3382     * @type { string }
3383     * @syscap SystemCapability.Notification.Notification
3384     * @systemapi
3385     * @since 12
3386     */
3387    name: string;
3388
3389    /**
3390     * The trustlist of application.
3391     *
3392     * @type { ?Array<BundleOption> }
3393     * @syscap SystemCapability.Notification.Notification
3394     * @systemapi
3395     * @since 12
3396     */
3397    trustlist?: Array<BundleOption>;
3398  }
3399
3400  /**
3401   * The remind type of the notification.
3402   *
3403   * @enum { number }
3404   * @syscap SystemCapability.Notification.Notification
3405   * @systemapi
3406   * @since 9
3407   */
3408  export enum DeviceRemindType {
3409    /**
3410     * The device is not in use, no reminder
3411     *
3412     * @syscap SystemCapability.Notification.Notification
3413     * @systemapi
3414     * @since 9
3415     */
3416    IDLE_DONOT_REMIND = 0,
3417
3418    /**
3419     * The device is not in use, remind
3420     *
3421     * @syscap SystemCapability.Notification.Notification
3422     * @systemapi
3423     * @since 9
3424     */
3425    IDLE_REMIND = 1,
3426
3427    /**
3428     * The device is in use, no reminder
3429     *
3430     * @syscap SystemCapability.Notification.Notification
3431     * @systemapi
3432     * @since 9
3433     */
3434    ACTIVE_DONOT_REMIND = 2,
3435
3436    /**
3437     * The device is in use, reminder
3438     *
3439     * @syscap SystemCapability.Notification.Notification
3440     * @systemapi
3441     * @since 9
3442     */
3443    ACTIVE_REMIND = 3
3444  }
3445
3446  /**
3447   * Notification source type
3448   *
3449   * @enum { number }
3450   * @syscap SystemCapability.Notification.Notification
3451   * @systemapi
3452   * @since 9
3453   */
3454  export enum SourceType {
3455    /**
3456     * General notification
3457     *
3458     * @syscap SystemCapability.Notification.Notification
3459     * @systemapi
3460     * @since 9
3461     */
3462    TYPE_NORMAL = 0,
3463
3464    /**
3465     * Continuous notification
3466     *
3467     * @syscap SystemCapability.Notification.Notification
3468     * @systemapi
3469     * @since 9
3470     */
3471    TYPE_CONTINUOUS = 1,
3472
3473    /**
3474     * Scheduled notification
3475     *
3476     * @syscap SystemCapability.Notification.Notification
3477     * @systemapi
3478     * @since 9
3479     */
3480    TYPE_TIMER = 2
3481  }
3482
3483  /**
3484   * Enum for notification control flag status.
3485   *
3486   * @enum { number }
3487   * @syscap SystemCapability.Notification.Notification
3488   * @systemapi
3489   * @since 12
3490   */
3491  export enum NotificationControlFlagStatus {
3492    /**
3493     * Manipulating of the enumeration by bitwise-or operation represents the closing of ringtone.
3494     * @syscap SystemCapability.Notification.Notification
3495     * @systemapi
3496     * @since 12
3497     */
3498    NOTIFICATION_STATUS_CLOSE_SOUND = 1 << 0,
3499
3500    /**
3501     * Manipulating of the enumeration by bitwise-or operation represents the closing of lock screen.
3502     * @syscap SystemCapability.Notification.Notification
3503     * @systemapi
3504     * @since 12
3505     */
3506    NOTIFICATION_STATUS_CLOSE_LOCKSCREEN = 1 << 1,
3507
3508    /**
3509     * Manipulating of the enumeration by bitwise-or operation represents the closing of banner.
3510     * @syscap SystemCapability.Notification.Notification
3511     * @systemapi
3512     * @since 12
3513     */
3514    NOTIFICATION_STATUS_CLOSE_BANNER = 1 << 2,
3515
3516    /**
3517     * Manipulating of the enumeration by bitwise-or operation represents the closing of light screen.
3518     * @syscap SystemCapability.Notification.Notification
3519     * @systemapi
3520     * @since 12
3521     */
3522    NOTIFICATION_STATUS_CLOSE_LIGHT_SCREEN = 1 << 3,
3523
3524    /**
3525     * Manipulating of the enumeration by bitwise-or operation represents the closing of vibration.
3526     * @syscap SystemCapability.Notification.Notification
3527     * @systemapi
3528     * @since 12
3529     */
3530    NOTIFICATION_STATUS_CLOSE_VIBRATION = 1 << 4,
3531
3532    /**
3533     * Manipulating of the enumeration by bitwise-or operation represents the closing of status bar icon.
3534     * @syscap SystemCapability.Notification.Notification
3535     * @systemapi
3536     * @since 12
3537     */
3538    NOTIFICATION_STATUS_CLOSE_STATUSBAR_ICON = 1 << 5
3539  }
3540
3541  /**
3542   * Describes a bundleOption in a notification.
3543   *
3544   * @typedef { _BundleOption } BundleOption
3545   * @syscap SystemCapability.Notification.Notification
3546   * @since 9
3547   */
3548  export type BundleOption = _BundleOption;
3549
3550  /**
3551   * Describes an action button displayed in a notification.
3552   *
3553   * @typedef { _NotificationActionButton } NotificationActionButton
3554   * @syscap SystemCapability.Notification.Notification
3555   * @since 9
3556   */
3557  export type NotificationActionButton = _NotificationActionButton;
3558
3559  /**
3560   * Describes a normal text notification.
3561   *
3562   * @syscap SystemCapability.Notification.Notification
3563   * @since 9
3564   */
3565  /**
3566   * Describes a normal text notification.
3567   *
3568   * @typedef { _NotificationBasicContent } NotificationBasicContent
3569   * @syscap SystemCapability.Notification.Notification
3570   * @crossplatform
3571   * @since 12
3572   */
3573  export type NotificationBasicContent = _NotificationBasicContent;
3574
3575  /**
3576   * Describes notification types.
3577   *
3578   * @syscap SystemCapability.Notification.Notification
3579   * @since 9
3580   */
3581  /**
3582   * Describes notification types.
3583   *
3584   * @typedef { _NotificationContent } NotificationContent
3585   * @syscap SystemCapability.Notification.Notification
3586   * @crossplatform
3587   * @since 12
3588   */
3589  export type NotificationContent = _NotificationContent;
3590
3591  /**
3592   * Describes a long text notification.
3593   *
3594   * @syscap SystemCapability.Notification.Notification
3595   * @since 9
3596   */
3597  /**
3598   * Describes a long text notification.
3599   *
3600   * @typedef { _NotificationLongTextContent } NotificationLongTextContent
3601   * @syscap SystemCapability.Notification.Notification
3602   * @crossplatform
3603   * @since 12
3604   */
3605  export type NotificationLongTextContent = _NotificationLongTextContent;
3606
3607  /**
3608   * Describes a live view notification.
3609   *
3610   * @typedef { _NotificationLiveViewContent } NotificationLiveViewContent
3611   * @syscap SystemCapability.Notification.Notification
3612   * @systemapi
3613   * @since 11
3614   */
3615  export type NotificationLiveViewContent = _NotificationLiveViewContent;
3616
3617  /**
3618   * Describes a multi-line text notification.
3619   *
3620   * @syscap SystemCapability.Notification.Notification
3621   * @since 9
3622   */
3623  /**
3624   * Describes a multi-line text notification.
3625   *
3626   * @typedef { _NotificationMultiLineContent } NotificationMultiLineContent
3627   * @syscap SystemCapability.Notification.Notification
3628   * @crossplatform
3629   * @since 12
3630   */
3631  export type NotificationMultiLineContent = _NotificationMultiLineContent;
3632
3633  /**
3634   * Describes a picture-attached notification.
3635   *
3636   * @typedef { _NotificationPictureContent } NotificationPictureContent
3637   * @syscap SystemCapability.Notification.Notification
3638   * @since 9
3639   */
3640  export type NotificationPictureContent = _NotificationPictureContent;
3641
3642  /**
3643   * Describes a system live view notification.
3644   *
3645   * @typedef { _NotificationSystemLiveViewContent } NotificationSystemLiveViewContent
3646   * @syscap SystemCapability.Notification.Notification
3647   * @since 11
3648   */
3649  export type NotificationSystemLiveViewContent = _NotificationSystemLiveViewContent;
3650
3651  /**
3652   * Describes a NotificationFlags instance.
3653   *
3654   * @typedef { _NotificationFlags } NotificationFlags
3655   * @syscap SystemCapability.Notification.Notification
3656   * @systemapi
3657   * @since 9
3658   */
3659  export type NotificationFlags = _NotificationFlags;
3660
3661  /**
3662   * The status of the notification flag.
3663   *
3664   * @typedef { _NotificationFlagStatus } NotificationFlagStatus
3665   * @syscap SystemCapability.Notification.Notification
3666   * @systemapi
3667   * @since 9
3668   */
3669  export type NotificationFlagStatus = _NotificationFlagStatus;
3670
3671  /**
3672   * Defines a NotificationRequest instance.
3673   *
3674   * @syscap SystemCapability.Notification.Notification
3675   * @since 9
3676   */
3677  /**
3678   * Defines a NotificationRequest instance.
3679   *
3680   * @typedef { _NotificationRequest } NotificationRequest
3681   * @syscap SystemCapability.Notification.Notification
3682   * @crossplatform
3683   * @since 12
3684   */
3685  export type NotificationRequest = _NotificationRequest;
3686
3687  /**
3688   * Defines a UnifiedGroupInfo instance.
3689   *
3690   * @typedef { _UnifiedGroupInfo } UnifiedGroupInfo
3691   * @syscap SystemCapability.Notification.Notification
3692   * @systemapi
3693   * @since 12
3694   */
3695  export type UnifiedGroupInfo = _UnifiedGroupInfo;
3696
3697  /**
3698   * Defines a NotificationFilter instance.
3699   *
3700   * @typedef { _NotificationFilter } NotificationFilter
3701   * @syscap SystemCapability.Notification.Notification
3702   * @systemapi
3703   * @since 11
3704   */
3705  export type NotificationFilter = _NotificationFilter;
3706
3707  /**
3708   * Defines a NotificationCheckRequest instance.
3709   *
3710   * @typedef { _NotificationCheckRequest } NotificationCheckRequest
3711   * @syscap SystemCapability.Notification.Notification
3712   * @systemapi
3713   * @since 11
3714   */
3715  export type NotificationCheckRequest = _NotificationCheckRequest;
3716
3717  /**
3718   * Describes distributed options.
3719   *
3720   * @typedef { _DistributedOptions } DistributedOptions
3721   * @syscap SystemCapability.Notification.Notification
3722   * @since 9
3723   */
3724  export type DistributedOptions = _DistributedOptions;
3725
3726  /**
3727   * Describes a NotificationSlot instance.
3728   *
3729   * @typedef { _NotificationSlot } NotificationSlot
3730   * @syscap SystemCapability.Notification.Notification
3731   * @since 9
3732   */
3733  export type NotificationSlot = _NotificationSlot;
3734
3735  /**
3736   * Describes live view notification option type.
3737   *
3738   * @typedef { _LiveViewStatus } LiveViewStatus
3739   * @syscap SystemCapability.Notification.Notification
3740   * @systemapi
3741   * @since 11
3742   */
3743  export type LiveViewStatus = _LiveViewStatus;
3744
3745  /**
3746   * Provides sorting information about an active notification.
3747   *
3748   * @typedef { _NotificationSorting } NotificationSorting
3749   * @syscap SystemCapability.Notification.Notification
3750   * @systemapi
3751   * @since 9
3752   */
3753  export type NotificationSorting = _NotificationSorting;
3754
3755  /**
3756   * Describes a NotificationTemplate instance.
3757   *
3758   * @typedef { _NotificationTemplate } NotificationTemplate
3759   * @syscap SystemCapability.Notification.Notification
3760   * @since 9
3761   */
3762  export type NotificationTemplate = _NotificationTemplate;
3763
3764  /**
3765   * Describes a NotificationUserInput instance.
3766   *
3767   * @typedef { _NotificationUserInput } NotificationUserInput
3768   * @syscap SystemCapability.Notification.Notification
3769   * @since 9
3770   */
3771  export type NotificationUserInput = _NotificationUserInput;
3772
3773  /**
3774   * Describes a system live view capsule type.
3775   *
3776   * @typedef { _NotificationCapsule } NotificationCapsule
3777   * @syscap SystemCapability.Notification.Notification
3778   * @since 11
3779   */
3780  export type NotificationCapsule = _NotificationCapsule;
3781
3782  /**
3783   * Describes a system live view button type.
3784   *
3785   * @typedef { _NotificationButton } NotificationButton
3786   * @syscap SystemCapability.Notification.Notification
3787   * @since 11
3788   */
3789  export type NotificationButton = _NotificationButton;
3790
3791  /**
3792   * Describes a system live view time type.
3793   *
3794   * @typedef { _NotificationTime } NotificationTime
3795   * @syscap SystemCapability.Notification.Notification
3796   * @since 11
3797   */
3798  export type NotificationTime = _NotificationTime;
3799
3800  /**
3801   * Describes a system live view progress type.
3802   *
3803   * @typedef { _NotificationProgress } NotificationProgress
3804   * @syscap SystemCapability.Notification.Notification
3805   * @since 11
3806   */
3807  export type NotificationProgress = _NotificationProgress;
3808}
3809
3810export default notificationManager;
3811