161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2022-2024 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"), 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit NotificationKit 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ciimport { AsyncCallback } from './@ohos.base'; 2261847f8eSopenharmony_ciimport { BundleOption as _BundleOption } from './notification/NotificationCommonDef'; 2361847f8eSopenharmony_ciimport { NotificationActionButton as _NotificationActionButton } from './notification/notificationActionButton'; 2461847f8eSopenharmony_ciimport { NotificationBasicContent as _NotificationBasicContent } from './notification/notificationContent'; 2561847f8eSopenharmony_ciimport { NotificationContent as _NotificationContent } from './notification/notificationContent'; 2661847f8eSopenharmony_ciimport { NotificationLongTextContent as _NotificationLongTextContent } from './notification/notificationContent'; 2761847f8eSopenharmony_ciimport type { NotificationLiveViewContent as _NotificationLiveViewContent } from './notification/notificationContent'; 2861847f8eSopenharmony_ciimport { NotificationMultiLineContent as _NotificationMultiLineContent } from './notification/notificationContent'; 2961847f8eSopenharmony_ciimport { NotificationPictureContent as _NotificationPictureContent } from './notification/notificationContent'; 3061847f8eSopenharmony_ciimport type { LiveViewStatus as _LiveViewStatus } from './notification/notificationContent'; 3161847f8eSopenharmony_ciimport { NotificationSystemLiveViewContent as _NotificationSystemLiveViewContent } from './notification/notificationContent'; 3261847f8eSopenharmony_ciimport { NotificationCapsule as _NotificationCapsule } from './notification/notificationContent'; 3361847f8eSopenharmony_ciimport { NotificationButton as _NotificationButton } from './notification/notificationContent'; 3461847f8eSopenharmony_ciimport { NotificationTime as _NotificationTime } from './notification/notificationContent'; 3561847f8eSopenharmony_ciimport { NotificationProgress as _NotificationProgress } from './notification/notificationContent'; 3661847f8eSopenharmony_ciimport { NotificationFlags as _NotificationFlags } from './notification/notificationFlags'; 3761847f8eSopenharmony_ciimport { NotificationFlagStatus as _NotificationFlagStatus } from './notification/notificationFlags'; 3861847f8eSopenharmony_ciimport { NotificationRequest as _NotificationRequest } from './notification/notificationRequest'; 3961847f8eSopenharmony_ciimport { UnifiedGroupInfo as _UnifiedGroupInfo } from './notification/notificationRequest'; 4061847f8eSopenharmony_ciimport { DistributedOptions as _DistributedOptions } from './notification/notificationRequest'; 4161847f8eSopenharmony_ciimport type { NotificationFilter as _NotificationFilter } from './notification/notificationRequest'; 4261847f8eSopenharmony_ciimport type { NotificationCheckRequest as _NotificationCheckRequest } from './notification/notificationRequest'; 4361847f8eSopenharmony_ciimport { NotificationSlot as _NotificationSlot } from './notification/notificationSlot'; 4461847f8eSopenharmony_ciimport { NotificationSorting as _NotificationSorting } from './notification/notificationSorting'; 4561847f8eSopenharmony_ciimport { NotificationTemplate as _NotificationTemplate } from './notification/notificationTemplate'; 4661847f8eSopenharmony_ciimport { NotificationUserInput as _NotificationUserInput } from './notification/notificationUserInput'; 4761847f8eSopenharmony_ciimport type UIAbilityContext from './application/UIAbilityContext'; 4861847f8eSopenharmony_ci 4961847f8eSopenharmony_ci/** 5061847f8eSopenharmony_ci * Manages notifications. 5161847f8eSopenharmony_ci * <p>Generally, only system applications have permissions on notification subscription and unsubscribe. 5261847f8eSopenharmony_ci * You can specify the content of a notification to be published and the content is carried by 5361847f8eSopenharmony_ci * {@link NotificationRequest}. A notification ID is unique in an application and must be specified 5461847f8eSopenharmony_ci * when using {@link NotificationRequest} to carry the notification content. If a notification 5561847f8eSopenharmony_ci * with this ID has been published and you need to use this ID to publish another notification, 5661847f8eSopenharmony_ci * the original notification will be updated. In addition, the notification ID can be used to cancel 5761847f8eSopenharmony_ci * a notification by calling the {@link #cancel(int)} method. 5861847f8eSopenharmony_ci * 5961847f8eSopenharmony_ci * @namespace notificationManager 6061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 6161847f8eSopenharmony_ci * @since 9 6261847f8eSopenharmony_ci */ 6361847f8eSopenharmony_ci/** 6461847f8eSopenharmony_ci * Manages notifications. 6561847f8eSopenharmony_ci * <p>Generally, only system applications have permissions on notification subscription and unsubscribe. 6661847f8eSopenharmony_ci * You can specify the content of a notification to be published and the content is carried by 6761847f8eSopenharmony_ci * {@link NotificationRequest}. A notification ID is unique in an application and must be specified 6861847f8eSopenharmony_ci * when using {@link NotificationRequest} to carry the notification content. If a notification 6961847f8eSopenharmony_ci * with this ID has been published and you need to use this ID to publish another notification, 7061847f8eSopenharmony_ci * the original notification will be updated. In addition, the notification ID can be used to cancel 7161847f8eSopenharmony_ci * a notification by calling the {@link #cancel(int)} method. 7261847f8eSopenharmony_ci * 7361847f8eSopenharmony_ci * @namespace notificationManager 7461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 7561847f8eSopenharmony_ci * @crossplatform 7661847f8eSopenharmony_ci * @atomicservice 7761847f8eSopenharmony_ci * @since 12 7861847f8eSopenharmony_ci */ 7961847f8eSopenharmony_cideclare namespace notificationManager { 8061847f8eSopenharmony_ci /** 8161847f8eSopenharmony_ci * Publishes a notification. 8261847f8eSopenharmony_ci * <p>If a notification with the same ID has been published by the current application and has not been deleted, 8361847f8eSopenharmony_ci * this method will update the notification. 8461847f8eSopenharmony_ci * 8561847f8eSopenharmony_ci * @param { NotificationRequest } request - notification request 8661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of publish. 8761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 8861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 8961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 9061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 9161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 9261847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 9361847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 9461847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 9561847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 9661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 9761847f8eSopenharmony_ci * @since 9 9861847f8eSopenharmony_ci */ 9961847f8eSopenharmony_ci /** 10061847f8eSopenharmony_ci * Publishes a notification. 10161847f8eSopenharmony_ci * <p>If a notification with the same ID has been published by the current application and has not been deleted, 10261847f8eSopenharmony_ci * this method will update the notification. 10361847f8eSopenharmony_ci * 10461847f8eSopenharmony_ci * @param { NotificationRequest } request - notification request 10561847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of publish. 10661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 10761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 10861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 10961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 11061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 11161847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 11261847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 11361847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 11461847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 11561847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 11661847f8eSopenharmony_ci * @throws { BusinessError } 1600014 - No permission. 11761847f8eSopenharmony_ci * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations. 11861847f8eSopenharmony_ci * @throws { BusinessError } 1600016 - The notification version for this update is too low. 11961847f8eSopenharmony_ci * @throws { BusinessError } 2300007 - Network unreachable. 12061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 12161847f8eSopenharmony_ci * @since 11 12261847f8eSopenharmony_ci */ 12361847f8eSopenharmony_ci /** 12461847f8eSopenharmony_ci * Publishes a notification. 12561847f8eSopenharmony_ci * <p>If a notification with the same ID has been published by the current application and has not been deleted, 12661847f8eSopenharmony_ci * this method will update the notification. 12761847f8eSopenharmony_ci * 12861847f8eSopenharmony_ci * @param { NotificationRequest } request - notification request 12961847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of publish. 13061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 13161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 13261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 13361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 13461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 13561847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 13661847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 13761847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 13861847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 13961847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 14061847f8eSopenharmony_ci * @throws { BusinessError } 1600014 - No permission. 14161847f8eSopenharmony_ci * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations. 14261847f8eSopenharmony_ci * @throws { BusinessError } 1600016 - The notification version for this update is too low. 14361847f8eSopenharmony_ci * @throws { BusinessError } 2300007 - Network unreachable. 14461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 14561847f8eSopenharmony_ci * @crossplatform 14661847f8eSopenharmony_ci * @since 12 14761847f8eSopenharmony_ci */ 14861847f8eSopenharmony_ci function publish(request: NotificationRequest, callback: AsyncCallback<void>): void; 14961847f8eSopenharmony_ci 15061847f8eSopenharmony_ci /** 15161847f8eSopenharmony_ci * Publishes a notification. 15261847f8eSopenharmony_ci * <p>If a notification with the same ID has been published by the current application and has not been deleted, 15361847f8eSopenharmony_ci * this method will update the notification. 15461847f8eSopenharmony_ci * 15561847f8eSopenharmony_ci * @param { NotificationRequest } request - notification request 15661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 15761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 15861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 15961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 16061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 16161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 16261847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 16361847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 16461847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 16561847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 16661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 16761847f8eSopenharmony_ci * @since 9 16861847f8eSopenharmony_ci */ 16961847f8eSopenharmony_ci /** 17061847f8eSopenharmony_ci * Publishes a notification. 17161847f8eSopenharmony_ci * <p>If a notification with the same ID has been published by the current application and has not been deleted, 17261847f8eSopenharmony_ci * this method will update the notification. 17361847f8eSopenharmony_ci * 17461847f8eSopenharmony_ci * @param { NotificationRequest } request - notification request 17561847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 17661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 17761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 17861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 17961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 18061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 18161847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 18261847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 18361847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 18461847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 18561847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 18661847f8eSopenharmony_ci * @throws { BusinessError } 1600014 - No permission. 18761847f8eSopenharmony_ci * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations. 18861847f8eSopenharmony_ci * @throws { BusinessError } 1600016 - The notification version for this update is too low. 18961847f8eSopenharmony_ci * @throws { BusinessError } 2300007 - Network unreachable. 19061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 19161847f8eSopenharmony_ci * @since 11 19261847f8eSopenharmony_ci */ 19361847f8eSopenharmony_ci /** 19461847f8eSopenharmony_ci * Publishes a notification. 19561847f8eSopenharmony_ci * <p>If a notification with the same ID has been published by the current application and has not been deleted, 19661847f8eSopenharmony_ci * this method will update the notification. 19761847f8eSopenharmony_ci * 19861847f8eSopenharmony_ci * @param { NotificationRequest } request - notification request 19961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 20061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 20161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 20261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 20361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 20461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 20561847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 20661847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 20761847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 20861847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 20961847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 21061847f8eSopenharmony_ci * @throws { BusinessError } 1600014 - No permission. 21161847f8eSopenharmony_ci * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations. 21261847f8eSopenharmony_ci * @throws { BusinessError } 1600016 - The notification version for this update is too low. 21361847f8eSopenharmony_ci * @throws { BusinessError } 2300007 - Network unreachable. 21461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 21561847f8eSopenharmony_ci * @crossplatform 21661847f8eSopenharmony_ci * @since 12 21761847f8eSopenharmony_ci */ 21861847f8eSopenharmony_ci function publish(request: NotificationRequest): Promise<void>; 21961847f8eSopenharmony_ci 22061847f8eSopenharmony_ci /** 22161847f8eSopenharmony_ci * Publishes a notification to the specified user. 22261847f8eSopenharmony_ci * 22361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 22461847f8eSopenharmony_ci * @param { NotificationRequest } request - a notification. 22561847f8eSopenharmony_ci * @param { number } userId - of subscriber receiving the notification. 22661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of publish. 22761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 22861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 22961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 23061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 23161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 23261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 23361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 23461847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 23561847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 23661847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 23761847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 23861847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 23961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 24061847f8eSopenharmony_ci * @systemapi 24161847f8eSopenharmony_ci * @since 9 24261847f8eSopenharmony_ci */ 24361847f8eSopenharmony_ci /** 24461847f8eSopenharmony_ci * Publishes a notification to the specified user. 24561847f8eSopenharmony_ci * 24661847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 24761847f8eSopenharmony_ci * @param { NotificationRequest } request - a notification. 24861847f8eSopenharmony_ci * @param { number } userId - of subscriber receiving the notification. 24961847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of publish. 25061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 25161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 25261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 25361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 25461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 25561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 25661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 25761847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 25861847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 25961847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 26061847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 26161847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 26261847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 26361847f8eSopenharmony_ci * @throws { BusinessError } 1600014 - No permission. 26461847f8eSopenharmony_ci * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations. 26561847f8eSopenharmony_ci * @throws { BusinessError } 1600016 - The notification version for this update is too low. 26661847f8eSopenharmony_ci * @throws { BusinessError } 2300007 - Network unreachable. 26761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 26861847f8eSopenharmony_ci * @systemapi 26961847f8eSopenharmony_ci * @since 11 27061847f8eSopenharmony_ci */ 27161847f8eSopenharmony_ci function publish(request: NotificationRequest, userId: number, callback: AsyncCallback<void>): void; 27261847f8eSopenharmony_ci 27361847f8eSopenharmony_ci /** 27461847f8eSopenharmony_ci * Publishes a notification to the specified user. 27561847f8eSopenharmony_ci * 27661847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 27761847f8eSopenharmony_ci * @param { NotificationRequest } request - a notification. 27861847f8eSopenharmony_ci * @param { number } userId - of subscriber receiving the notification. 27961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 28061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 28161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 28261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 28361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 28461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 28561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 28661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 28761847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 28861847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 28961847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 29061847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 29161847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 29261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 29361847f8eSopenharmony_ci * @systemapi 29461847f8eSopenharmony_ci * @since 9 29561847f8eSopenharmony_ci */ 29661847f8eSopenharmony_ci /** 29761847f8eSopenharmony_ci * Publishes a notification to the specified user. 29861847f8eSopenharmony_ci * 29961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 30061847f8eSopenharmony_ci * @param { NotificationRequest } request - a notification. 30161847f8eSopenharmony_ci * @param { number } userId - of subscriber receiving the notification. 30261847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 30361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 30461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 30561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 30661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 30761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 30861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 30961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 31061847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 31161847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 31261847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 31361847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 31461847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 31561847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 31661847f8eSopenharmony_ci * @throws { BusinessError } 1600014 - No permission. 31761847f8eSopenharmony_ci * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations. 31861847f8eSopenharmony_ci * @throws { BusinessError } 1600016 - The notification version for this update is too low. 31961847f8eSopenharmony_ci * @throws { BusinessError } 2300007 - Network unreachable. 32061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 32161847f8eSopenharmony_ci * @systemapi 32261847f8eSopenharmony_ci * @since 11 32361847f8eSopenharmony_ci */ 32461847f8eSopenharmony_ci function publish(request: NotificationRequest, userId: number): Promise<void>; 32561847f8eSopenharmony_ci 32661847f8eSopenharmony_ci /** 32761847f8eSopenharmony_ci * Publishes a representative notification. 32861847f8eSopenharmony_ci * 32961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 33061847f8eSopenharmony_ci * @param { NotificationRequest } request - a notification. 33161847f8eSopenharmony_ci * @param { string } representativeBundle - bundle name of the representative 33261847f8eSopenharmony_ci * @param { number } userId - userid of the representative 33361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of publishAsBundle. 33461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 33561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 33661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 33761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 33861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 33961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 34061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 34161847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 34261847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 34361847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 34461847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 34561847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 34661847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 34761847f8eSopenharmony_ci * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations. 34861847f8eSopenharmony_ci * @throws { BusinessError } 1600016 - The notification version for this update is too low. 34961847f8eSopenharmony_ci * @throws { BusinessError } 2300007 - Network unreachable. 35061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 35161847f8eSopenharmony_ci * @systemapi 35261847f8eSopenharmony_ci * @since 9 35361847f8eSopenharmony_ci */ 35461847f8eSopenharmony_ci function publishAsBundle( 35561847f8eSopenharmony_ci request: NotificationRequest, 35661847f8eSopenharmony_ci representativeBundle: string, 35761847f8eSopenharmony_ci userId: number, 35861847f8eSopenharmony_ci callback: AsyncCallback<void> 35961847f8eSopenharmony_ci ): void; 36061847f8eSopenharmony_ci 36161847f8eSopenharmony_ci /** 36261847f8eSopenharmony_ci * Publishes a representative notification. 36361847f8eSopenharmony_ci * 36461847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 36561847f8eSopenharmony_ci * @param { NotificationRequest } request - a notification. 36661847f8eSopenharmony_ci * @param { string } representativeBundle - bundle name of the representative 36761847f8eSopenharmony_ci * @param { number } userId - userid of the representative 36861847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 36961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 37061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 37161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 37261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 37361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 37461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 37561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 37661847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 37761847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 37861847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 37961847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 38061847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 38161847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 38261847f8eSopenharmony_ci * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations. 38361847f8eSopenharmony_ci * @throws { BusinessError } 1600016 - The notification version for this update is too low. 38461847f8eSopenharmony_ci * @throws { BusinessError } 2300007 - Network unreachable. 38561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 38661847f8eSopenharmony_ci * @systemapi 38761847f8eSopenharmony_ci * @since 9 38861847f8eSopenharmony_ci */ 38961847f8eSopenharmony_ci function publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number): Promise<void>; 39061847f8eSopenharmony_ci 39161847f8eSopenharmony_ci /** 39261847f8eSopenharmony_ci * Publishes a representative notification. 39361847f8eSopenharmony_ci * 39461847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 39561847f8eSopenharmony_ci * @param { BundleOption } representativeBundle - bundle option of the representative. 39661847f8eSopenharmony_ci * @param { NotificationRequest } request - a notification. 39761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 39861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 39961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 40061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 40161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 40261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 40361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 40461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 40561847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 40661847f8eSopenharmony_ci * @throws { BusinessError } 1600005 - Notification slot disabled. 40761847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 40861847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 40961847f8eSopenharmony_ci * @throws { BusinessError } 1600009 - The notification sending frequency reaches the upper limit. 41061847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 41161847f8eSopenharmony_ci * @throws { BusinessError } 1600015 - The current notification status does not support duplicate configurations. 41261847f8eSopenharmony_ci * @throws { BusinessError } 1600016 - The notification version for this update is too low. 41361847f8eSopenharmony_ci * @throws { BusinessError } 2300007 - Network unreachable. 41461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 41561847f8eSopenharmony_ci * @systemapi 41661847f8eSopenharmony_ci * @since 12 41761847f8eSopenharmony_ci */ 41861847f8eSopenharmony_ci function publishAsBundle(representativeBundle: BundleOption, request: NotificationRequest): Promise<void>; 41961847f8eSopenharmony_ci 42061847f8eSopenharmony_ci /** 42161847f8eSopenharmony_ci * Cancel a notification with the specified ID. 42261847f8eSopenharmony_ci * 42361847f8eSopenharmony_ci * @param { number } id - ID of the notification to cancel, which must be unique in the application. 42461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of cancel. 42561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 42661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 42761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 42861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 42961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 43061847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 43161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 43261847f8eSopenharmony_ci * @since 9 43361847f8eSopenharmony_ci */ 43461847f8eSopenharmony_ci /** 43561847f8eSopenharmony_ci * Cancel a notification with the specified ID. 43661847f8eSopenharmony_ci * 43761847f8eSopenharmony_ci * @param { number } id - ID of the notification to cancel, which must be unique in the application. 43861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of cancel. 43961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 44061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 44161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 44261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 44361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 44461847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 44561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 44661847f8eSopenharmony_ci * @crossplatform 44761847f8eSopenharmony_ci * @since 12 44861847f8eSopenharmony_ci */ 44961847f8eSopenharmony_ci function cancel(id: number, callback: AsyncCallback<void>): void; 45061847f8eSopenharmony_ci 45161847f8eSopenharmony_ci /** 45261847f8eSopenharmony_ci * Cancel a notification with the specified label and ID. 45361847f8eSopenharmony_ci * 45461847f8eSopenharmony_ci * @param { number } id - ID of the notification to cancel, which must be unique in the application. 45561847f8eSopenharmony_ci * @param { string } label - Label of the notification to cancel. 45661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of cancel. 45761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 45861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 45961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 46061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 46161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 46261847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 46361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 46461847f8eSopenharmony_ci * @since 9 46561847f8eSopenharmony_ci */ 46661847f8eSopenharmony_ci function cancel(id: number, label: string, callback: AsyncCallback<void>): void; 46761847f8eSopenharmony_ci 46861847f8eSopenharmony_ci /** 46961847f8eSopenharmony_ci * Cancel a notification with the specified label and ID. 47061847f8eSopenharmony_ci * 47161847f8eSopenharmony_ci * @param { number } id - ID of the notification to cancel, which must be unique in the application. 47261847f8eSopenharmony_ci * @param { string } [label] - Label of the notification to cancel. 47361847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 47461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 47561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 47661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 47761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 47861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 47961847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 48061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 48161847f8eSopenharmony_ci * @since 9 48261847f8eSopenharmony_ci */ 48361847f8eSopenharmony_ci function cancel(id: number, label?: string): Promise<void>; 48461847f8eSopenharmony_ci 48561847f8eSopenharmony_ci /** 48661847f8eSopenharmony_ci * Cancel a notification with the representative and ID. 48761847f8eSopenharmony_ci * 48861847f8eSopenharmony_ci * @param { BundleOption } representativeBundle - bundle option of the representative. 48961847f8eSopenharmony_ci * @param { number } id - ID of the notification to cancel, which must be unique in the application. 49061847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 49161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 49261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 49361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 49461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 49561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 49661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 49761847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 49861847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 49961847f8eSopenharmony_ci * @throws { BusinessError } 1600017 - There is no corresponding agent relationship configuration. 50061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 50161847f8eSopenharmony_ci * @systemapi 50261847f8eSopenharmony_ci * @since 12 50361847f8eSopenharmony_ci */ 50461847f8eSopenharmony_ci function cancel(representativeBundle: BundleOption, id: number): Promise<void>; 50561847f8eSopenharmony_ci 50661847f8eSopenharmony_ci /** 50761847f8eSopenharmony_ci * Cancel a representative notification. 50861847f8eSopenharmony_ci * 50961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 51061847f8eSopenharmony_ci * @param { number } id - ID of the notification to cancel, which must be unique in the application. 51161847f8eSopenharmony_ci * @param { string } representativeBundle - bundle name of the representative. 51261847f8eSopenharmony_ci * @param { number } userId - userid of the representative. 51361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of cancelAsBundle. 51461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 51561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 51661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 51761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 51861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 51961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 52061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 52161847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 52261847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 52361847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 52461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 52561847f8eSopenharmony_ci * @systemapi 52661847f8eSopenharmony_ci * @since 9 52761847f8eSopenharmony_ci */ 52861847f8eSopenharmony_ci function cancelAsBundle( 52961847f8eSopenharmony_ci id: number, 53061847f8eSopenharmony_ci representativeBundle: string, 53161847f8eSopenharmony_ci userId: number, 53261847f8eSopenharmony_ci callback: AsyncCallback<void> 53361847f8eSopenharmony_ci ): void; 53461847f8eSopenharmony_ci 53561847f8eSopenharmony_ci /** 53661847f8eSopenharmony_ci * Cancel a representative notification. 53761847f8eSopenharmony_ci * 53861847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 53961847f8eSopenharmony_ci * @param { number } id - ID of the notification to cancel, which must be unique in the application. 54061847f8eSopenharmony_ci * @param { string } representativeBundle - bundle name of the representative. 54161847f8eSopenharmony_ci * @param { number } userId - userid of the representative. 54261847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 54361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 54461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 54561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 54661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 54761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 54861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 54961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 55061847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 55161847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 55261847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 55361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 55461847f8eSopenharmony_ci * @systemapi 55561847f8eSopenharmony_ci * @since 9 55661847f8eSopenharmony_ci */ 55761847f8eSopenharmony_ci function cancelAsBundle(id: number, representativeBundle: string, userId: number): Promise<void>; 55861847f8eSopenharmony_ci 55961847f8eSopenharmony_ci /** 56061847f8eSopenharmony_ci * Cancel a representative notification. 56161847f8eSopenharmony_ci * 56261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 56361847f8eSopenharmony_ci * @param { BundleOption } representativeBundle - bundle option of the representative. 56461847f8eSopenharmony_ci * @param { number } id - ID of the notification to cancel, which must be unique in the application. 56561847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 56661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 56761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 56861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 56961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 57061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 57161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 57261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 57361847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 57461847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 57561847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 57661847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 57761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 57861847f8eSopenharmony_ci * @systemapi 57961847f8eSopenharmony_ci * @since 12 58061847f8eSopenharmony_ci */ 58161847f8eSopenharmony_ci function cancelAsBundle(representativeBundle: BundleOption, id: number): Promise<void>; 58261847f8eSopenharmony_ci 58361847f8eSopenharmony_ci /** 58461847f8eSopenharmony_ci * Cancel all notifications of the current application. 58561847f8eSopenharmony_ci * 58661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of cancelAll. 58761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 58861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 58961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 59061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 59161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 59261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 59361847f8eSopenharmony_ci * @since 9 59461847f8eSopenharmony_ci */ 59561847f8eSopenharmony_ci /** 59661847f8eSopenharmony_ci * Cancel all notifications of the current application. 59761847f8eSopenharmony_ci * 59861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of cancelAll. 59961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 60061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 60161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 60261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 60361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 60461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 60561847f8eSopenharmony_ci * @crossplatform 60661847f8eSopenharmony_ci * @since 12 60761847f8eSopenharmony_ci */ 60861847f8eSopenharmony_ci function cancelAll(callback: AsyncCallback<void>): void; 60961847f8eSopenharmony_ci 61061847f8eSopenharmony_ci /** 61161847f8eSopenharmony_ci * Cancel all notifications of the current application. 61261847f8eSopenharmony_ci * 61361847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 61461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 61561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 61661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 61761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 61861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 61961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 62061847f8eSopenharmony_ci * @since 9 62161847f8eSopenharmony_ci */ 62261847f8eSopenharmony_ci /** 62361847f8eSopenharmony_ci * Cancel all notifications of the current application. 62461847f8eSopenharmony_ci * 62561847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 62661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 62761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 62861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 62961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 63061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 63161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 63261847f8eSopenharmony_ci * @crossplatform 63361847f8eSopenharmony_ci * @since 12 63461847f8eSopenharmony_ci */ 63561847f8eSopenharmony_ci function cancelAll(): Promise<void>; 63661847f8eSopenharmony_ci 63761847f8eSopenharmony_ci /** 63861847f8eSopenharmony_ci * Creates a notification slot. 63961847f8eSopenharmony_ci * 64061847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 64161847f8eSopenharmony_ci * @param { NotificationSlot } slot - Indicates the notification slot to be created, which is set by {@link NotificationSlot}. 64261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of addSlot. 64361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 64461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 64561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 64661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 64761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 64861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 64961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 65061847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 65161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 65261847f8eSopenharmony_ci * @systemapi 65361847f8eSopenharmony_ci * @since 9 65461847f8eSopenharmony_ci */ 65561847f8eSopenharmony_ci function addSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void; 65661847f8eSopenharmony_ci 65761847f8eSopenharmony_ci /** 65861847f8eSopenharmony_ci * Creates a notification slot. 65961847f8eSopenharmony_ci * 66061847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 66161847f8eSopenharmony_ci * @param { NotificationSlot } slot - Indicates the notification slot to be created, which is set by {@link NotificationSlot}. 66261847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 66361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 66461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 66561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 66661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 66761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 66861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 66961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 67061847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 67161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 67261847f8eSopenharmony_ci * @systemapi 67361847f8eSopenharmony_ci * @since 9 67461847f8eSopenharmony_ci */ 67561847f8eSopenharmony_ci function addSlot(slot: NotificationSlot): Promise<void>; 67661847f8eSopenharmony_ci 67761847f8eSopenharmony_ci /** 67861847f8eSopenharmony_ci * Adds a slot type. 67961847f8eSopenharmony_ci * 68061847f8eSopenharmony_ci * @param { SlotType } type - Slot type to add. 68161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of addSlot. 68261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 68361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 68461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 68561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 68661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 68761847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 68861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 68961847f8eSopenharmony_ci * @since 9 69061847f8eSopenharmony_ci */ 69161847f8eSopenharmony_ci function addSlot(type: SlotType, callback: AsyncCallback<void>): void; 69261847f8eSopenharmony_ci 69361847f8eSopenharmony_ci /** 69461847f8eSopenharmony_ci * Adds a slot type. 69561847f8eSopenharmony_ci * 69661847f8eSopenharmony_ci * @param { SlotType } type - Slot type to add. 69761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 69861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 69961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 70061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 70161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 70261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 70361847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 70461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 70561847f8eSopenharmony_ci * @since 9 70661847f8eSopenharmony_ci */ 70761847f8eSopenharmony_ci function addSlot(type: SlotType): Promise<void>; 70861847f8eSopenharmony_ci 70961847f8eSopenharmony_ci /** 71061847f8eSopenharmony_ci * Creates notification slots. 71161847f8eSopenharmony_ci * 71261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 71361847f8eSopenharmony_ci * @param { Array<NotificationSlot> } slots - Indicates the notification slots to be created, which is set by {@link NotificationSlot}. 71461847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of addSlots. 71561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 71661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 71761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 71861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 71961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 72061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 72161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 72261847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 72361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 72461847f8eSopenharmony_ci * @systemapi 72561847f8eSopenharmony_ci * @since 9 72661847f8eSopenharmony_ci */ 72761847f8eSopenharmony_ci function addSlots(slots: Array<NotificationSlot>, callback: AsyncCallback<void>): void; 72861847f8eSopenharmony_ci 72961847f8eSopenharmony_ci /** 73061847f8eSopenharmony_ci * Creates notification slots. 73161847f8eSopenharmony_ci * 73261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 73361847f8eSopenharmony_ci * @param { Array<NotificationSlot> } slots - Indicates the notification slots to be created, which is set by {@link NotificationSlot}. 73461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 73561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 73661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 73761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 73861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 73961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 74061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 74161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 74261847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 74361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 74461847f8eSopenharmony_ci * @systemapi 74561847f8eSopenharmony_ci * @since 9 74661847f8eSopenharmony_ci */ 74761847f8eSopenharmony_ci function addSlots(slots: Array<NotificationSlot>): Promise<void>; 74861847f8eSopenharmony_ci 74961847f8eSopenharmony_ci /** 75061847f8eSopenharmony_ci * Obtains a notification slot of the specified slot type. 75161847f8eSopenharmony_ci * 75261847f8eSopenharmony_ci * @param { SlotType } slotType - Type of the notification slot to obtain. 75361847f8eSopenharmony_ci * @param { AsyncCallback<NotificationSlot> } callback - The callback is used to return the NotificationSlot. 75461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 75561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 75661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 75761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 75861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 75961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 76061847f8eSopenharmony_ci * @since 9 76161847f8eSopenharmony_ci */ 76261847f8eSopenharmony_ci function getSlot(slotType: SlotType, callback: AsyncCallback<NotificationSlot>): void; 76361847f8eSopenharmony_ci 76461847f8eSopenharmony_ci /** 76561847f8eSopenharmony_ci * Obtains a notification slot of the specified slot type. 76661847f8eSopenharmony_ci * 76761847f8eSopenharmony_ci * @param { SlotType } slotType - Type of the notification slot to obtain. 76861847f8eSopenharmony_ci * @returns { Promise<NotificationSlot> } Returns the NotificationSlot. 76961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 77061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 77161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 77261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 77361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 77461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 77561847f8eSopenharmony_ci * @since 9 77661847f8eSopenharmony_ci */ 77761847f8eSopenharmony_ci function getSlot(slotType: SlotType): Promise<NotificationSlot>; 77861847f8eSopenharmony_ci 77961847f8eSopenharmony_ci /** 78061847f8eSopenharmony_ci * Obtains all NotificationSlot objects created by the current application. 78161847f8eSopenharmony_ci * 78261847f8eSopenharmony_ci * @param { AsyncCallback<Array<NotificationSlot>> } callback - The callback is used to return all notification slots 78361847f8eSopenharmony_ci * of this application. 78461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 78561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 78661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 78761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 78861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 78961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 79061847f8eSopenharmony_ci * @since 9 79161847f8eSopenharmony_ci */ 79261847f8eSopenharmony_ci function getSlots(callback: AsyncCallback<Array<NotificationSlot>>): void; 79361847f8eSopenharmony_ci 79461847f8eSopenharmony_ci /** 79561847f8eSopenharmony_ci * Obtains all NotificationSlot objects created by the current application. 79661847f8eSopenharmony_ci * 79761847f8eSopenharmony_ci * @returns { Promise<Array<NotificationSlot>> } Returns all notification slots of this application. 79861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 79961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 80061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 80161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 80261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 80361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 80461847f8eSopenharmony_ci * @since 9 80561847f8eSopenharmony_ci */ 80661847f8eSopenharmony_ci function getSlots(): Promise<Array<NotificationSlot>>; 80761847f8eSopenharmony_ci 80861847f8eSopenharmony_ci /** 80961847f8eSopenharmony_ci * Obtains allow notification application list. 81061847f8eSopenharmony_ci * 81161847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 81261847f8eSopenharmony_ci * @returns { Promise<Array<BundleOption>> } Returns all enable notification applications. 81361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 81461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 81561847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 81661847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 81761847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 81861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 81961847f8eSopenharmony_ci * @systemapi 82061847f8eSopenharmony_ci * @since 12 82161847f8eSopenharmony_ci */ 82261847f8eSopenharmony_ci function getAllNotificationEnabledBundles(): Promise<Array<BundleOption>>; 82361847f8eSopenharmony_ci 82461847f8eSopenharmony_ci /** 82561847f8eSopenharmony_ci * Removes a NotificationSlot of the specified SlotType created by the current application. 82661847f8eSopenharmony_ci * 82761847f8eSopenharmony_ci * @param { SlotType } slotType - Type of the NotificationSlot to remove. 82861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of removeSlot. 82961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 83061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 83161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 83261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 83361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 83461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 83561847f8eSopenharmony_ci * @since 9 83661847f8eSopenharmony_ci */ 83761847f8eSopenharmony_ci function removeSlot(slotType: SlotType, callback: AsyncCallback<void>): void; 83861847f8eSopenharmony_ci 83961847f8eSopenharmony_ci /** 84061847f8eSopenharmony_ci * Removes a NotificationSlot of the specified SlotType created by the current application. 84161847f8eSopenharmony_ci * 84261847f8eSopenharmony_ci * @param { SlotType } slotType - Type of the NotificationSlot to remove. 84361847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 84461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 84561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 84661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 84761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 84861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 84961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 85061847f8eSopenharmony_ci * @since 9 85161847f8eSopenharmony_ci */ 85261847f8eSopenharmony_ci function removeSlot(slotType: SlotType): Promise<void>; 85361847f8eSopenharmony_ci 85461847f8eSopenharmony_ci /** 85561847f8eSopenharmony_ci * Removes all NotificationSlot objects created by the current application. 85661847f8eSopenharmony_ci * 85761847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of removeAllSlots. 85861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 85961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 86061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 86161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 86261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 86361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 86461847f8eSopenharmony_ci * @since 9 86561847f8eSopenharmony_ci */ 86661847f8eSopenharmony_ci function removeAllSlots(callback: AsyncCallback<void>): void; 86761847f8eSopenharmony_ci 86861847f8eSopenharmony_ci /** 86961847f8eSopenharmony_ci * Removes all NotificationSlot objects created by the current application. 87061847f8eSopenharmony_ci * 87161847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 87261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 87361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 87461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 87561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 87661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 87761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 87861847f8eSopenharmony_ci * @since 9 87961847f8eSopenharmony_ci */ 88061847f8eSopenharmony_ci function removeAllSlots(): Promise<void>; 88161847f8eSopenharmony_ci 88261847f8eSopenharmony_ci /** 88361847f8eSopenharmony_ci * Set whether the application can send notifications. 88461847f8eSopenharmony_ci * 88561847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 88661847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 88761847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 88861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setNotificationEnable. 88961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 89061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 89161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 89261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 89361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 89461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 89561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 89661847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 89761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 89861847f8eSopenharmony_ci * @systemapi 89961847f8eSopenharmony_ci * @since 9 90061847f8eSopenharmony_ci */ 90161847f8eSopenharmony_ci function setNotificationEnable(bundle: BundleOption, enable: boolean, callback: AsyncCallback<void>): void; 90261847f8eSopenharmony_ci 90361847f8eSopenharmony_ci /** 90461847f8eSopenharmony_ci * Set whether the application can send notifications. 90561847f8eSopenharmony_ci * 90661847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 90761847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 90861847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 90961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 91061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 91161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 91261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 91361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 91461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 91561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 91661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 91761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 91861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 91961847f8eSopenharmony_ci * @systemapi 92061847f8eSopenharmony_ci * @since 9 92161847f8eSopenharmony_ci */ 92261847f8eSopenharmony_ci function setNotificationEnable(bundle: BundleOption, enable: boolean): Promise<void>; 92361847f8eSopenharmony_ci 92461847f8eSopenharmony_ci /** 92561847f8eSopenharmony_ci * Checks whether this application allows to publish notifications. 92661847f8eSopenharmony_ci * 92761847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 92861847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 92961847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled. 93061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 93161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 93261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 93361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 93461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 93561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 93661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 93761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 93861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 93961847f8eSopenharmony_ci * @systemapi 94061847f8eSopenharmony_ci * @since 9 94161847f8eSopenharmony_ci */ 94261847f8eSopenharmony_ci function isNotificationEnabled(bundle: BundleOption, callback: AsyncCallback<boolean>): void; 94361847f8eSopenharmony_ci 94461847f8eSopenharmony_ci /** 94561847f8eSopenharmony_ci * Checks whether this application allows to publish notifications. 94661847f8eSopenharmony_ci * 94761847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 94861847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 94961847f8eSopenharmony_ci * @returns { Promise<boolean> } The promise returned by the function. 95061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 95161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 95261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 95361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 95461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 95561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 95661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 95761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 95861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 95961847f8eSopenharmony_ci * @systemapi 96061847f8eSopenharmony_ci * @since 9 96161847f8eSopenharmony_ci */ 96261847f8eSopenharmony_ci function isNotificationEnabled(bundle: BundleOption): Promise<boolean>; 96361847f8eSopenharmony_ci 96461847f8eSopenharmony_ci /** 96561847f8eSopenharmony_ci * Checks whether this application allows to publish notifications. 96661847f8eSopenharmony_ci * 96761847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 96861847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled. 96961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 97061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 97161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 97261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 97361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 97461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 97561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 97661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 97761847f8eSopenharmony_ci * @systemapi 97861847f8eSopenharmony_ci * @since 9 97961847f8eSopenharmony_ci */ 98061847f8eSopenharmony_ci /** 98161847f8eSopenharmony_ci * Checks whether this application allows to publish notifications. 98261847f8eSopenharmony_ci * 98361847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled. 98461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 98561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 98661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 98761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 98861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 98961847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 99061847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 99161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 99261847f8eSopenharmony_ci * @since 11 99361847f8eSopenharmony_ci */ 99461847f8eSopenharmony_ci /** 99561847f8eSopenharmony_ci * Checks whether this application allows to publish notifications. 99661847f8eSopenharmony_ci * 99761847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled. 99861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 99961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 100061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 100161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 100261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 100361847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 100461847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 100561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 100661847f8eSopenharmony_ci * @crossplatform 100761847f8eSopenharmony_ci * @since 12 100861847f8eSopenharmony_ci */ 100961847f8eSopenharmony_ci function isNotificationEnabled(callback: AsyncCallback<boolean>): void; 101061847f8eSopenharmony_ci 101161847f8eSopenharmony_ci /** 101261847f8eSopenharmony_ci * Checks whether this application allows to publish notifications. 101361847f8eSopenharmony_ci * 101461847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 101561847f8eSopenharmony_ci * @returns { Promise<boolean> } The promise returned by the function. 101661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 101761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 101861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 101961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 102061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 102161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 102261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 102361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 102461847f8eSopenharmony_ci * @systemapi 102561847f8eSopenharmony_ci * @since 9 102661847f8eSopenharmony_ci */ 102761847f8eSopenharmony_ci /** 102861847f8eSopenharmony_ci * Checks whether this application allows to publish notifications. 102961847f8eSopenharmony_ci * 103061847f8eSopenharmony_ci * @returns { Promise<boolean> } The promise returned by the function. 103161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 103261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 103361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 103461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 103561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 103661847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 103761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 103861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 103961847f8eSopenharmony_ci * @since 11 104061847f8eSopenharmony_ci */ 104161847f8eSopenharmony_ci /** 104261847f8eSopenharmony_ci * Checks whether this application allows to publish notifications. 104361847f8eSopenharmony_ci * 104461847f8eSopenharmony_ci * @returns { Promise<boolean> } The promise returned by the function. 104561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 104661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 104761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 104861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 104961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 105061847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 105161847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 105261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 105361847f8eSopenharmony_ci * @crossplatform 105461847f8eSopenharmony_ci * @since 12 105561847f8eSopenharmony_ci */ 105661847f8eSopenharmony_ci function isNotificationEnabled(): Promise<boolean>; 105761847f8eSopenharmony_ci 105861847f8eSopenharmony_ci /** 105961847f8eSopenharmony_ci * Checks whether this application allows to publish notifications. 106061847f8eSopenharmony_ci * 106161847f8eSopenharmony_ci * @returns { boolean } Returned by the function. 106261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 106361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 106461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 106561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 106661847f8eSopenharmony_ci * @since 12 106761847f8eSopenharmony_ci */ 106861847f8eSopenharmony_ci function isNotificationEnabledSync(): boolean; 106961847f8eSopenharmony_ci 107061847f8eSopenharmony_ci /** 107161847f8eSopenharmony_ci * Checks whether this application allows to publish notifications under the user. 107261847f8eSopenharmony_ci * 107361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 107461847f8eSopenharmony_ci * @param { number } userId - The userid of the representative. 107561847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback of isNotificationEnabled. 107661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 107761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 107861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 107961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 108061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 108161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 108261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 108361847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 108461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 108561847f8eSopenharmony_ci * @systemapi 108661847f8eSopenharmony_ci * @since 9 108761847f8eSopenharmony_ci */ 108861847f8eSopenharmony_ci function isNotificationEnabled(userId: number, callback: AsyncCallback<boolean>): void; 108961847f8eSopenharmony_ci 109061847f8eSopenharmony_ci /** 109161847f8eSopenharmony_ci * Checks whether this application allows to publish notifications under the user. 109261847f8eSopenharmony_ci * 109361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 109461847f8eSopenharmony_ci * @param { number } userId - The userid of the representative. 109561847f8eSopenharmony_ci * @returns { Promise<boolean> } The promise returned by the function. 109661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 109761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 109861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 109961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 110061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 110161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 110261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 110361847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 110461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 110561847f8eSopenharmony_ci * @systemapi 110661847f8eSopenharmony_ci * @since 9 110761847f8eSopenharmony_ci */ 110861847f8eSopenharmony_ci function isNotificationEnabled(userId: number): Promise<boolean>; 110961847f8eSopenharmony_ci 111061847f8eSopenharmony_ci /** 111161847f8eSopenharmony_ci * Sets whether to allow the specified application to show badge. 111261847f8eSopenharmony_ci * 111361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 111461847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 111561847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 111661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of displayBadge. 111761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 111861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 111961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 112061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 112161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 112261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 112361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 112461847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 112561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 112661847f8eSopenharmony_ci * @systemapi 112761847f8eSopenharmony_ci * @since 9 112861847f8eSopenharmony_ci */ 112961847f8eSopenharmony_ci function displayBadge(bundle: BundleOption, enable: boolean, callback: AsyncCallback<void>): void; 113061847f8eSopenharmony_ci 113161847f8eSopenharmony_ci /** 113261847f8eSopenharmony_ci * Sets whether to allow the specified application to show badge. 113361847f8eSopenharmony_ci * 113461847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 113561847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 113661847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 113761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 113861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 113961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 114061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 114161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 114261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 114361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 114461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 114561847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 114661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 114761847f8eSopenharmony_ci * @systemapi 114861847f8eSopenharmony_ci * @since 9 114961847f8eSopenharmony_ci */ 115061847f8eSopenharmony_ci function displayBadge(bundle: BundleOption, enable: boolean): Promise<void>; 115161847f8eSopenharmony_ci 115261847f8eSopenharmony_ci /** 115361847f8eSopenharmony_ci * Obtains the flag that whether to allow the application to show badge. 115461847f8eSopenharmony_ci * 115561847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 115661847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 115761847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback of isBadgeDisplayed. 115861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 115961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 116061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 116161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 116261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 116361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 116461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 116561847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 116661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 116761847f8eSopenharmony_ci * @systemapi 116861847f8eSopenharmony_ci * @since 9 116961847f8eSopenharmony_ci */ 117061847f8eSopenharmony_ci function isBadgeDisplayed(bundle: BundleOption, callback: AsyncCallback<boolean>): void; 117161847f8eSopenharmony_ci 117261847f8eSopenharmony_ci /** 117361847f8eSopenharmony_ci * Obtains the flag that whether to allow the application to show badge. 117461847f8eSopenharmony_ci * 117561847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 117661847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 117761847f8eSopenharmony_ci * @returns { Promise<boolean> } The promise returned by the function. 117861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 117961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 118061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 118161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 118261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 118361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 118461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 118561847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 118661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 118761847f8eSopenharmony_ci * @systemapi 118861847f8eSopenharmony_ci * @since 9 118961847f8eSopenharmony_ci */ 119061847f8eSopenharmony_ci function isBadgeDisplayed(bundle: BundleOption): Promise<boolean>; 119161847f8eSopenharmony_ci 119261847f8eSopenharmony_ci /** 119361847f8eSopenharmony_ci * Update all notification slots for the specified bundle. 119461847f8eSopenharmony_ci * 119561847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 119661847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 119761847f8eSopenharmony_ci * @param { NotificationSlot } slot - Indicates the notification slot. 119861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setSlotByBundle. 119961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 120061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 120161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 120261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 120361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 120461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 120561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 120661847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 120761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 120861847f8eSopenharmony_ci * @systemapi 120961847f8eSopenharmony_ci * @since 9 121061847f8eSopenharmony_ci */ 121161847f8eSopenharmony_ci function setSlotByBundle(bundle: BundleOption, slot: NotificationSlot, callback: AsyncCallback<void>): void; 121261847f8eSopenharmony_ci 121361847f8eSopenharmony_ci /** 121461847f8eSopenharmony_ci * Update all notification slots for the specified bundle. 121561847f8eSopenharmony_ci * 121661847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 121761847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 121861847f8eSopenharmony_ci * @param { NotificationSlot } slot - Indicates the notification slot. 121961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 122061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 122161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 122261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 122361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 122461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 122561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 122661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 122761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 122861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 122961847f8eSopenharmony_ci * @systemapi 123061847f8eSopenharmony_ci * @since 9 123161847f8eSopenharmony_ci */ 123261847f8eSopenharmony_ci function setSlotByBundle(bundle: BundleOption, slot: NotificationSlot): Promise<void>; 123361847f8eSopenharmony_ci 123461847f8eSopenharmony_ci /** 123561847f8eSopenharmony_ci * Obtains all notification slots belonging to the specified bundle. 123661847f8eSopenharmony_ci * 123761847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 123861847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 123961847f8eSopenharmony_ci * @param { AsyncCallback<Array<NotificationSlot>> } callback - The callback of getSlotsByBundle. 124061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 124161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 124261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 124361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 124461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 124561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 124661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 124761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 124861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 124961847f8eSopenharmony_ci * @systemapi 125061847f8eSopenharmony_ci * @since 9 125161847f8eSopenharmony_ci */ 125261847f8eSopenharmony_ci function getSlotsByBundle(bundle: BundleOption, callback: AsyncCallback<Array<NotificationSlot>>): void; 125361847f8eSopenharmony_ci 125461847f8eSopenharmony_ci /** 125561847f8eSopenharmony_ci * Get notification slot for the specified bundle. 125661847f8eSopenharmony_ci * 125761847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 125861847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 125961847f8eSopenharmony_ci * @param { SlotType } slotType - Indicates the notification slot. 126061847f8eSopenharmony_ci * @returns { Promise<NotificationSlot> } Returns the NotificationSlot. 126161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 126261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 126361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 126461847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 126561847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 126661847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 126761847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 126861847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 126961847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 127061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 127161847f8eSopenharmony_ci * @systemapi 127261847f8eSopenharmony_ci * @since 12 127361847f8eSopenharmony_ci */ 127461847f8eSopenharmony_ci function getSlotByBundle(bundle: BundleOption, slotType: SlotType): Promise<NotificationSlot>; 127561847f8eSopenharmony_ci 127661847f8eSopenharmony_ci /** 127761847f8eSopenharmony_ci * Obtains all notification slots belonging to the specified bundle. 127861847f8eSopenharmony_ci * 127961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 128061847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 128161847f8eSopenharmony_ci * @returns { Promise<Array<NotificationSlot>> } The promise returned by the function. 128261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 128361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 128461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 128561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 128661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 128761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 128861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 128961847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 129061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 129161847f8eSopenharmony_ci * @systemapi 129261847f8eSopenharmony_ci * @since 9 129361847f8eSopenharmony_ci */ 129461847f8eSopenharmony_ci function getSlotsByBundle(bundle: BundleOption): Promise<Array<NotificationSlot>>; 129561847f8eSopenharmony_ci 129661847f8eSopenharmony_ci /** 129761847f8eSopenharmony_ci * Obtains number of slot. 129861847f8eSopenharmony_ci * 129961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 130061847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 130161847f8eSopenharmony_ci * @param { AsyncCallback<number> } callback - The callback of getSlotNumByBundle. 130261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 130361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 130461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 130561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 130661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 130761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 130861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 130961847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 131061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 131161847f8eSopenharmony_ci * @systemapi 131261847f8eSopenharmony_ci * @since 9 131361847f8eSopenharmony_ci */ 131461847f8eSopenharmony_ci function getSlotNumByBundle(bundle: BundleOption, callback: AsyncCallback<number>): void; 131561847f8eSopenharmony_ci 131661847f8eSopenharmony_ci /** 131761847f8eSopenharmony_ci * Obtains number of slot. 131861847f8eSopenharmony_ci * 131961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 132061847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 132161847f8eSopenharmony_ci * @returns { Promise<number> } The promise returned by the function. 132261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 132361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 132461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 132561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 132661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 132761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 132861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 132961847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 133061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 133161847f8eSopenharmony_ci * @systemapi 133261847f8eSopenharmony_ci * @since 9 133361847f8eSopenharmony_ci */ 133461847f8eSopenharmony_ci function getSlotNumByBundle(bundle: BundleOption): Promise<number>; 133561847f8eSopenharmony_ci 133661847f8eSopenharmony_ci /** 133761847f8eSopenharmony_ci * Obtains all active notifications in the current system. The caller must have system permissions to 133861847f8eSopenharmony_ci * call this method. 133961847f8eSopenharmony_ci * 134061847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 134161847f8eSopenharmony_ci * @param { AsyncCallback<Array<NotificationRequest>> } callback - The callback of getAllActiveNotifications. 134261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 134361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 134461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 134561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 134661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 134761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 134861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 134961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 135061847f8eSopenharmony_ci * @systemapi 135161847f8eSopenharmony_ci * @since 9 135261847f8eSopenharmony_ci */ 135361847f8eSopenharmony_ci function getAllActiveNotifications(callback: AsyncCallback<Array<NotificationRequest>>): void; 135461847f8eSopenharmony_ci 135561847f8eSopenharmony_ci /** 135661847f8eSopenharmony_ci * Obtains all active notifications in the current system. The caller must have system permissions to 135761847f8eSopenharmony_ci * call this method. 135861847f8eSopenharmony_ci * 135961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 136061847f8eSopenharmony_ci * @returns { Promise<Array<NotificationRequest>> } The promise returned by the function. 136161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 136261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 136361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 136461847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 136561847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 136661847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 136761847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 136861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 136961847f8eSopenharmony_ci * @systemapi 137061847f8eSopenharmony_ci * @since 9 137161847f8eSopenharmony_ci */ 137261847f8eSopenharmony_ci function getAllActiveNotifications(): Promise<Array<NotificationRequest>>; 137361847f8eSopenharmony_ci 137461847f8eSopenharmony_ci /** 137561847f8eSopenharmony_ci * Obtains the number of all active notifications. 137661847f8eSopenharmony_ci * 137761847f8eSopenharmony_ci * @param { AsyncCallback<number> } callback - The callback of getActiveNotificationCount. 137861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 137961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 138061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 138161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 138261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 138361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 138461847f8eSopenharmony_ci * @since 9 138561847f8eSopenharmony_ci */ 138661847f8eSopenharmony_ci function getActiveNotificationCount(callback: AsyncCallback<number>): void; 138761847f8eSopenharmony_ci 138861847f8eSopenharmony_ci /** 138961847f8eSopenharmony_ci * Obtains the number of all active notifications. 139061847f8eSopenharmony_ci * 139161847f8eSopenharmony_ci * @returns { Promise<number> } The promise returned by the function. 139261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 139361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 139461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 139561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 139661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 139761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 139861847f8eSopenharmony_ci * @since 9 139961847f8eSopenharmony_ci */ 140061847f8eSopenharmony_ci function getActiveNotificationCount(): Promise<number>; 140161847f8eSopenharmony_ci 140261847f8eSopenharmony_ci /** 140361847f8eSopenharmony_ci * Obtains an array of active notifications. 140461847f8eSopenharmony_ci * 140561847f8eSopenharmony_ci * @param { AsyncCallback<Array<NotificationRequest>> } callback - The callback of getActiveNotifications. 140661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 140761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 140861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 140961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 141061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 141161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 141261847f8eSopenharmony_ci * @since 9 141361847f8eSopenharmony_ci */ 141461847f8eSopenharmony_ci function getActiveNotifications(callback: AsyncCallback<Array<NotificationRequest>>): void; 141561847f8eSopenharmony_ci 141661847f8eSopenharmony_ci /** 141761847f8eSopenharmony_ci * Obtains an array of active notifications. 141861847f8eSopenharmony_ci * 141961847f8eSopenharmony_ci * @returns { Promise<Array<NotificationRequest>> } The promise returned by the function. 142061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 142161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 142261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 142361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 142461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 142561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 142661847f8eSopenharmony_ci * @since 9 142761847f8eSopenharmony_ci */ 142861847f8eSopenharmony_ci function getActiveNotifications(): Promise<Array<NotificationRequest>>; 142961847f8eSopenharmony_ci 143061847f8eSopenharmony_ci /** 143161847f8eSopenharmony_ci * Get the live view notification by bundle option and notification key. If the extraInfoKeys is provided, 143261847f8eSopenharmony_ci * filter the additional information of the live view notification and return the filtered result. 143361847f8eSopenharmony_ci * 143461847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 143561847f8eSopenharmony_ci * @param { NotificationFilter } filter - The bundle, notification key and additional information filter of the live view notification. 143661847f8eSopenharmony_ci * @param { AsyncCallback<NotificationRequest> } callback - The callback of getActiveNotificationByFilter. 143761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 143861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 143961847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 144061847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 144161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 144261847f8eSopenharmony_ci * @systemapi 144361847f8eSopenharmony_ci * @since 11 144461847f8eSopenharmony_ci */ 144561847f8eSopenharmony_ci function getActiveNotificationByFilter(filter: NotificationFilter, callback: AsyncCallback<NotificationRequest>): void; 144661847f8eSopenharmony_ci 144761847f8eSopenharmony_ci /** 144861847f8eSopenharmony_ci * Get the live view notification by bundle option and notification key. If the extraInfoKeys is provided, 144961847f8eSopenharmony_ci * filter the additional information of the live view notification and return the filtered result. 145061847f8eSopenharmony_ci * 145161847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 145261847f8eSopenharmony_ci * @param { NotificationFilter } filter - The bundle, notification key and additional information filter of the live view notification. 145361847f8eSopenharmony_ci * @returns { Promise<NotificationRequest> } The promise returned by the function. 145461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 145561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 145661847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 145761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 145861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 145961847f8eSopenharmony_ci * @systemapi 146061847f8eSopenharmony_ci * @since 11 146161847f8eSopenharmony_ci */ 146261847f8eSopenharmony_ci function getActiveNotificationByFilter(filter: NotificationFilter): Promise<NotificationRequest>; 146361847f8eSopenharmony_ci 146461847f8eSopenharmony_ci /** 146561847f8eSopenharmony_ci * Cancel the notification of a specified group for this application. 146661847f8eSopenharmony_ci * 146761847f8eSopenharmony_ci * @param { string } groupName - The name of the group. 146861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of cancelGroup. 146961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 147061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 147161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 147261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 147361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 147461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 147561847f8eSopenharmony_ci * @since 9 147661847f8eSopenharmony_ci */ 147761847f8eSopenharmony_ci function cancelGroup(groupName: string, callback: AsyncCallback<void>): void; 147861847f8eSopenharmony_ci 147961847f8eSopenharmony_ci /** 148061847f8eSopenharmony_ci * Cancel the notification of a specified group for this application. 148161847f8eSopenharmony_ci * 148261847f8eSopenharmony_ci * @param { string } groupName - The name of the group. 148361847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 148461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 148561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 148661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 148761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 148861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 148961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 149061847f8eSopenharmony_ci * @since 9 149161847f8eSopenharmony_ci */ 149261847f8eSopenharmony_ci function cancelGroup(groupName: string): Promise<void>; 149361847f8eSopenharmony_ci 149461847f8eSopenharmony_ci /** 149561847f8eSopenharmony_ci * Delete the notification of a specified group for this application. 149661847f8eSopenharmony_ci * 149761847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 149861847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 149961847f8eSopenharmony_ci * @param { string } groupName - The name of the group. 150061847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of removeGroupByBundle. 150161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 150261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 150361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 150461847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 150561847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 150661847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 150761847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 150861847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 150961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 151061847f8eSopenharmony_ci * @systemapi 151161847f8eSopenharmony_ci * @since 9 151261847f8eSopenharmony_ci */ 151361847f8eSopenharmony_ci function removeGroupByBundle(bundle: BundleOption, groupName: string, callback: AsyncCallback<void>): void; 151461847f8eSopenharmony_ci 151561847f8eSopenharmony_ci /** 151661847f8eSopenharmony_ci * Delete the notification of a specified group for this application. 151761847f8eSopenharmony_ci * 151861847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 151961847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 152061847f8eSopenharmony_ci * @param { string } groupName - The name of the group. 152161847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 152261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 152361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 152461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 152561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 152661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 152761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 152861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 152961847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 153061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 153161847f8eSopenharmony_ci * @systemapi 153261847f8eSopenharmony_ci * @since 9 153361847f8eSopenharmony_ci */ 153461847f8eSopenharmony_ci function removeGroupByBundle(bundle: BundleOption, groupName: string): Promise<void>; 153561847f8eSopenharmony_ci 153661847f8eSopenharmony_ci /** 153761847f8eSopenharmony_ci * Set the Do Not Disturb date. 153861847f8eSopenharmony_ci * 153961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 154061847f8eSopenharmony_ci * @param { DoNotDisturbDate } date - The Do Not Disturb date. 154161847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setDoNotDisturbDate. 154261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 154361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 154461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 154561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 154661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 154761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 154861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 154961847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 155061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 155161847f8eSopenharmony_ci * @systemapi 155261847f8eSopenharmony_ci * @since 9 155361847f8eSopenharmony_ci */ 155461847f8eSopenharmony_ci function setDoNotDisturbDate(date: DoNotDisturbDate, callback: AsyncCallback<void>): void; 155561847f8eSopenharmony_ci 155661847f8eSopenharmony_ci /** 155761847f8eSopenharmony_ci * Set the Do Not Disturb date. 155861847f8eSopenharmony_ci * 155961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 156061847f8eSopenharmony_ci * @param { DoNotDisturbDate } date - The Do Not Disturb date. 156161847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 156261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 156361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 156461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 156561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 156661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 156761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 156861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 156961847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 157061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 157161847f8eSopenharmony_ci * @systemapi 157261847f8eSopenharmony_ci * @since 9 157361847f8eSopenharmony_ci */ 157461847f8eSopenharmony_ci function setDoNotDisturbDate(date: DoNotDisturbDate): Promise<void>; 157561847f8eSopenharmony_ci 157661847f8eSopenharmony_ci /** 157761847f8eSopenharmony_ci * Set the Do Not Disturb date under the specified user. 157861847f8eSopenharmony_ci * 157961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 158061847f8eSopenharmony_ci * @param { DoNotDisturbDate } date - The Do Not Disturb date. 158161847f8eSopenharmony_ci * @param { number } userId - The userId. 158261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setDoNotDisturbDate. 158361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 158461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 158561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 158661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 158761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 158861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 158961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 159061847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 159161847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 159261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 159361847f8eSopenharmony_ci * @systemapi 159461847f8eSopenharmony_ci * @since 9 159561847f8eSopenharmony_ci */ 159661847f8eSopenharmony_ci function setDoNotDisturbDate(date: DoNotDisturbDate, userId: number, callback: AsyncCallback<void>): void; 159761847f8eSopenharmony_ci 159861847f8eSopenharmony_ci /** 159961847f8eSopenharmony_ci * Set the Do Not Disturb date under the specified user. 160061847f8eSopenharmony_ci * 160161847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 160261847f8eSopenharmony_ci * @param { DoNotDisturbDate } date - The Do Not Disturb date. 160361847f8eSopenharmony_ci * @param { number } userId - The userId. 160461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 160561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 160661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 160761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 160861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 160961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 161061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 161161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 161261847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 161361847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 161461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 161561847f8eSopenharmony_ci * @systemapi 161661847f8eSopenharmony_ci * @since 9 161761847f8eSopenharmony_ci */ 161861847f8eSopenharmony_ci function setDoNotDisturbDate(date: DoNotDisturbDate, userId: number): Promise<void>; 161961847f8eSopenharmony_ci 162061847f8eSopenharmony_ci /** 162161847f8eSopenharmony_ci * Obtains the Do Not Disturb date. 162261847f8eSopenharmony_ci * 162361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 162461847f8eSopenharmony_ci * @param { AsyncCallback<DoNotDisturbDate> } callback - The callback is used to return the Do Not Disturb date. 162561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 162661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 162761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 162861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 162961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 163061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 163161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 163261847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 163361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 163461847f8eSopenharmony_ci * @systemapi 163561847f8eSopenharmony_ci * @since 9 163661847f8eSopenharmony_ci */ 163761847f8eSopenharmony_ci function getDoNotDisturbDate(callback: AsyncCallback<DoNotDisturbDate>): void; 163861847f8eSopenharmony_ci 163961847f8eSopenharmony_ci /** 164061847f8eSopenharmony_ci * Obtains the Do Not Disturb date. 164161847f8eSopenharmony_ci * 164261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 164361847f8eSopenharmony_ci * @returns { Promise<DoNotDisturbDate> } Returns the Do Not Disturb date. 164461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 164561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 164661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 164761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 164861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 164961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 165061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 165161847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 165261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 165361847f8eSopenharmony_ci * @systemapi 165461847f8eSopenharmony_ci * @since 9 165561847f8eSopenharmony_ci */ 165661847f8eSopenharmony_ci function getDoNotDisturbDate(): Promise<DoNotDisturbDate>; 165761847f8eSopenharmony_ci 165861847f8eSopenharmony_ci /** 165961847f8eSopenharmony_ci * Obtains the Do Not Disturb date. 166061847f8eSopenharmony_ci * 166161847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 166261847f8eSopenharmony_ci * @param { number } userId - The userId. 166361847f8eSopenharmony_ci * @param { AsyncCallback<DoNotDisturbDate> } callback - The callback is used to return the Do Not Disturb date. 166461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 166561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 166661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 166761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 166861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 166961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 167061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 167161847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 167261847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 167361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 167461847f8eSopenharmony_ci * @systemapi 167561847f8eSopenharmony_ci * @since 9 167661847f8eSopenharmony_ci */ 167761847f8eSopenharmony_ci function getDoNotDisturbDate(userId: number, callback: AsyncCallback<DoNotDisturbDate>): void; 167861847f8eSopenharmony_ci 167961847f8eSopenharmony_ci /** 168061847f8eSopenharmony_ci * Obtains the Do Not Disturb date. 168161847f8eSopenharmony_ci * 168261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 168361847f8eSopenharmony_ci * @param { number } userId - The userId. 168461847f8eSopenharmony_ci * @returns { Promise<DoNotDisturbDate> } Returns the Do Not Disturb date. 168561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 168661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 168761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 168861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 168961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 169061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 169161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 169261847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 169361847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 169461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 169561847f8eSopenharmony_ci * @systemapi 169661847f8eSopenharmony_ci * @since 9 169761847f8eSopenharmony_ci */ 169861847f8eSopenharmony_ci function getDoNotDisturbDate(userId: number): Promise<DoNotDisturbDate>; 169961847f8eSopenharmony_ci 170061847f8eSopenharmony_ci /** 170161847f8eSopenharmony_ci * Obtains whether to support the Do Not Disturb mode. 170261847f8eSopenharmony_ci * 170361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 170461847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback is used to return whether Do Not Disturb 170561847f8eSopenharmony_ci * mode is supported. 170661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 170761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 170861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 170961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 171061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 171161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 171261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 171361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 171461847f8eSopenharmony_ci * @systemapi 171561847f8eSopenharmony_ci * @since 9 171661847f8eSopenharmony_ci */ 171761847f8eSopenharmony_ci function isSupportDoNotDisturbMode(callback: AsyncCallback<boolean>): void; 171861847f8eSopenharmony_ci 171961847f8eSopenharmony_ci /** 172061847f8eSopenharmony_ci * Obtains whether to support the Do Not Disturb mode. 172161847f8eSopenharmony_ci * 172261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 172361847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns whether Do Not Disturb mode is supported. 172461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 172561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 172661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 172761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 172861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 172961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 173061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 173161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 173261847f8eSopenharmony_ci * @systemapi 173361847f8eSopenharmony_ci * @since 9 173461847f8eSopenharmony_ci */ 173561847f8eSopenharmony_ci function isSupportDoNotDisturbMode(): Promise<boolean>; 173661847f8eSopenharmony_ci 173761847f8eSopenharmony_ci /** 173861847f8eSopenharmony_ci * Obtains whether the template is supported by the system. 173961847f8eSopenharmony_ci * 174061847f8eSopenharmony_ci * @param { string } templateName - Name of template to be Obtained. 174161847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback is used to return whether the template is supported. 174261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 174361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 174461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 174561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 174661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 174761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 174861847f8eSopenharmony_ci * @since 9 174961847f8eSopenharmony_ci */ 175061847f8eSopenharmony_ci function isSupportTemplate(templateName: string, callback: AsyncCallback<boolean>): void; 175161847f8eSopenharmony_ci 175261847f8eSopenharmony_ci /** 175361847f8eSopenharmony_ci * Obtains whether the template is supported by the system. 175461847f8eSopenharmony_ci * 175561847f8eSopenharmony_ci * @param { string } templateName - Name of template to be Obtained. 175661847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns whether the template is supported. 175761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 175861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 175961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 176061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 176161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 176261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 176361847f8eSopenharmony_ci * @since 9 176461847f8eSopenharmony_ci */ 176561847f8eSopenharmony_ci function isSupportTemplate(templateName: string): Promise<boolean>; 176661847f8eSopenharmony_ci 176761847f8eSopenharmony_ci /** 176861847f8eSopenharmony_ci * Request permission to send notification. 176961847f8eSopenharmony_ci * 177061847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification. 177161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 177261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 177361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 177461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 177561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 177661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 177761847f8eSopenharmony_ci * @since 9 177861847f8eSopenharmony_ci */ 177961847f8eSopenharmony_ci /** 178061847f8eSopenharmony_ci * Request permission to send notification. 178161847f8eSopenharmony_ci * 178261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification. 178361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 178461847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 178561847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 178661847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 178761847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 178861847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 178961847f8eSopenharmony_ci * @throws { BusinessError } 1600013 - A notification dialog box is already displayed. 179061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 179161847f8eSopenharmony_ci * @since 11 179261847f8eSopenharmony_ci */ 179361847f8eSopenharmony_ci /** 179461847f8eSopenharmony_ci * Request permission to send notification. 179561847f8eSopenharmony_ci * 179661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification. 179761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 179861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 179961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 180061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 180161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 180261847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 180361847f8eSopenharmony_ci * @throws { BusinessError } 1600013 - A notification dialog box is already displayed. 180461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 180561847f8eSopenharmony_ci * @crossplatform 180661847f8eSopenharmony_ci * @since 12 180761847f8eSopenharmony_ci * @deprecated since 12 180861847f8eSopenharmony_ci * @useinstead requestEnableNotification 180961847f8eSopenharmony_ci */ 181061847f8eSopenharmony_ci function requestEnableNotification(callback: AsyncCallback<void>): void; 181161847f8eSopenharmony_ci 181261847f8eSopenharmony_ci /** 181361847f8eSopenharmony_ci * Request permission to send notification. 181461847f8eSopenharmony_ci * 181561847f8eSopenharmony_ci * @param { UIAbilityContext } context - The context indicates the ability context you want to bind; 181661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification. 181761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 181861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 181961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 182061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 182161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 182261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 182361847f8eSopenharmony_ci * @StageModelOnly 182461847f8eSopenharmony_ci * @since 10 182561847f8eSopenharmony_ci */ 182661847f8eSopenharmony_ci /** 182761847f8eSopenharmony_ci * Request permission to send notification. 182861847f8eSopenharmony_ci * 182961847f8eSopenharmony_ci * @param { UIAbilityContext } context - The context indicates the ability context you want to bind; 183061847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification. 183161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 183261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 183361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 183461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 183561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 183661847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 183761847f8eSopenharmony_ci * @throws { BusinessError } 1600013 - A notification dialog box is already displayed. 183861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 183961847f8eSopenharmony_ci * @StageModelOnly 184061847f8eSopenharmony_ci * @since 11 184161847f8eSopenharmony_ci */ 184261847f8eSopenharmony_ci /** 184361847f8eSopenharmony_ci * Request permission to send notification. 184461847f8eSopenharmony_ci * 184561847f8eSopenharmony_ci * @param { UIAbilityContext } context - The context indicates the ability context you want to bind; 184661847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of requestEnableNotification. 184761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 184861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 184961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 185061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 185161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 185261847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 185361847f8eSopenharmony_ci * @throws { BusinessError } 1600013 - A notification dialog box is already displayed. 185461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 185561847f8eSopenharmony_ci * @StageModelOnly 185661847f8eSopenharmony_ci * @crossplatform 185761847f8eSopenharmony_ci * @since 12 185861847f8eSopenharmony_ci */ 185961847f8eSopenharmony_ci function requestEnableNotification(context: UIAbilityContext, callback: AsyncCallback<void>): void; 186061847f8eSopenharmony_ci 186161847f8eSopenharmony_ci /** 186261847f8eSopenharmony_ci * Request permission to send notification. 186361847f8eSopenharmony_ci * 186461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 186561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 186661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 186761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 186861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 186961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 187061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 187161847f8eSopenharmony_ci * @since 9 187261847f8eSopenharmony_ci */ 187361847f8eSopenharmony_ci /** 187461847f8eSopenharmony_ci * Request permission to send notification. 187561847f8eSopenharmony_ci * 187661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 187761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 187861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 187961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 188061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 188161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 188261847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 188361847f8eSopenharmony_ci * @throws { BusinessError } 1600013 - A notification dialog box is already displayed. 188461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 188561847f8eSopenharmony_ci * @since 11 188661847f8eSopenharmony_ci */ 188761847f8eSopenharmony_ci /** 188861847f8eSopenharmony_ci * Request permission to send notification. 188961847f8eSopenharmony_ci * 189061847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 189161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 189261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 189361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 189461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 189561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 189661847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 189761847f8eSopenharmony_ci * @throws { BusinessError } 1600013 - A notification dialog box is already displayed. 189861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 189961847f8eSopenharmony_ci * @crossplatform 190061847f8eSopenharmony_ci * @since 12 190161847f8eSopenharmony_ci * @deprecated since 12 190261847f8eSopenharmony_ci * @useinstead requestEnableNotification 190361847f8eSopenharmony_ci */ 190461847f8eSopenharmony_ci function requestEnableNotification(): Promise<void>; 190561847f8eSopenharmony_ci 190661847f8eSopenharmony_ci /** 190761847f8eSopenharmony_ci * Request permission to send notification. 190861847f8eSopenharmony_ci * 190961847f8eSopenharmony_ci * @param { UIAbilityContext } context - The context indicates the ability context you want to bind; 191061847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 191161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 191261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 191361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 191461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 191561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 191661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 191761847f8eSopenharmony_ci * @StageModelOnly 191861847f8eSopenharmony_ci * @since 10 191961847f8eSopenharmony_ci */ 192061847f8eSopenharmony_ci /** 192161847f8eSopenharmony_ci * Request permission to send notification. 192261847f8eSopenharmony_ci * 192361847f8eSopenharmony_ci * @param { UIAbilityContext } context - The context indicates the ability context you want to bind; 192461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 192561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 192661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 192761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 192861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 192961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 193061847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 193161847f8eSopenharmony_ci * @throws { BusinessError } 1600013 - A notification dialog box is already displayed. 193261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 193361847f8eSopenharmony_ci * @StageModelOnly 193461847f8eSopenharmony_ci * @since 11 193561847f8eSopenharmony_ci */ 193661847f8eSopenharmony_ci /** 193761847f8eSopenharmony_ci * Request permission to send notification. 193861847f8eSopenharmony_ci * 193961847f8eSopenharmony_ci * @param { UIAbilityContext } context - The context indicates the ability context you want to bind; 194061847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 194161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 194261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 194361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 194461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 194561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 194661847f8eSopenharmony_ci * @throws { BusinessError } 1600004 - Notification disabled. 194761847f8eSopenharmony_ci * @throws { BusinessError } 1600013 - A notification dialog box is already displayed. 194861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 194961847f8eSopenharmony_ci * @StageModelOnly 195061847f8eSopenharmony_ci * @crossplatform 195161847f8eSopenharmony_ci * @since 12 195261847f8eSopenharmony_ci */ 195361847f8eSopenharmony_ci function requestEnableNotification(context: UIAbilityContext): Promise<void>; 195461847f8eSopenharmony_ci 195561847f8eSopenharmony_ci /** 195661847f8eSopenharmony_ci * Sets whether the device supports distributed notification. 195761847f8eSopenharmony_ci * 195861847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 195961847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 196061847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setDistributedEnable. 196161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 196261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 196361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 196461847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 196561847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 196661847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 196761847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 196861847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 196961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 197061847f8eSopenharmony_ci * @systemapi 197161847f8eSopenharmony_ci * @since 9 197261847f8eSopenharmony_ci */ 197361847f8eSopenharmony_ci function setDistributedEnable(enable: boolean, callback: AsyncCallback<void>): void; 197461847f8eSopenharmony_ci 197561847f8eSopenharmony_ci /** 197661847f8eSopenharmony_ci * Sets whether the device supports distributed notification. 197761847f8eSopenharmony_ci * 197861847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 197961847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 198061847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 198161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 198261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 198361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 198461847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 198561847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 198661847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 198761847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 198861847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 198961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 199061847f8eSopenharmony_ci * @systemapi 199161847f8eSopenharmony_ci * @since 9 199261847f8eSopenharmony_ci */ 199361847f8eSopenharmony_ci function setDistributedEnable(enable: boolean): Promise<void>; 199461847f8eSopenharmony_ci 199561847f8eSopenharmony_ci /** 199661847f8eSopenharmony_ci * Obtains whether the device supports distributed notification. 199761847f8eSopenharmony_ci * 199861847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback is used to return whether the distributed 199961847f8eSopenharmony_ci * notification is supported. 200061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 200161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 200261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 200361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 200461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 200561847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 200661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 200761847f8eSopenharmony_ci * @since 9 200861847f8eSopenharmony_ci */ 200961847f8eSopenharmony_ci function isDistributedEnabled(callback: AsyncCallback<boolean>): void; 201061847f8eSopenharmony_ci 201161847f8eSopenharmony_ci /** 201261847f8eSopenharmony_ci * Obtains whether the device supports distributed notification. 201361847f8eSopenharmony_ci * 201461847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns whether the distributed notification is supported. 201561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 201661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 201761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 201861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 201961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 202061847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 202161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 202261847f8eSopenharmony_ci * @since 9 202361847f8eSopenharmony_ci */ 202461847f8eSopenharmony_ci function isDistributedEnabled(): Promise<boolean>; 202561847f8eSopenharmony_ci 202661847f8eSopenharmony_ci /** 202761847f8eSopenharmony_ci * Sets whether an application supports distributed notification. 202861847f8eSopenharmony_ci * 202961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 203061847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 203161847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 203261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setDistributedEnableByBundle. 203361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 203461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 203561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 203661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 203761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 203861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 203961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 204061847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 204161847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 204261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 204361847f8eSopenharmony_ci * @systemapi 204461847f8eSopenharmony_ci * @since 9 204561847f8eSopenharmony_ci */ 204661847f8eSopenharmony_ci function setDistributedEnableByBundle(bundle: BundleOption, enable: boolean, callback: AsyncCallback<void>): void; 204761847f8eSopenharmony_ci 204861847f8eSopenharmony_ci /** 204961847f8eSopenharmony_ci * Sets whether an application supports distributed notification. 205061847f8eSopenharmony_ci * 205161847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 205261847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 205361847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 205461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 205561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 205661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 205761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 205861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 205961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 206061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 206161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 206261847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 206361847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 206461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 206561847f8eSopenharmony_ci * @systemapi 206661847f8eSopenharmony_ci * @since 9 206761847f8eSopenharmony_ci */ 206861847f8eSopenharmony_ci function setDistributedEnableByBundle(bundle: BundleOption, enable: boolean): Promise<void>; 206961847f8eSopenharmony_ci 207061847f8eSopenharmony_ci /** 207161847f8eSopenharmony_ci * Sets whether an application supports distributed notification. 207261847f8eSopenharmony_ci * 207361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 207461847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 207561847f8eSopenharmony_ci * @param { string } deviceType - The device type. 207661847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 207761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 207861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 207961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 208061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 208161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 208261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 208361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 208461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 208561847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 208661847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 208761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 208861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 208961847f8eSopenharmony_ci * @systemapi 209061847f8eSopenharmony_ci * @since 12 209161847f8eSopenharmony_ci */ 209261847f8eSopenharmony_ci function setDistributedEnabledByBundle(bundle: BundleOption, deviceType: string, enable: boolean): Promise<void>; 209361847f8eSopenharmony_ci 209461847f8eSopenharmony_ci /** 209561847f8eSopenharmony_ci * Obtains whether an application supports distributed notification. 209661847f8eSopenharmony_ci * 209761847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 209861847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 209961847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback is used to return whether the distributed 210061847f8eSopenharmony_ci * notification is supported. 210161847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 210261847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 210361847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 210461847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 210561847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 210661847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 210761847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 210861847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 210961847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 211061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 211161847f8eSopenharmony_ci * @systemapi 211261847f8eSopenharmony_ci * @since 9 211361847f8eSopenharmony_ci */ 211461847f8eSopenharmony_ci function isDistributedEnabledByBundle(bundle: BundleOption, callback: AsyncCallback<boolean>): void; 211561847f8eSopenharmony_ci 211661847f8eSopenharmony_ci /** 211761847f8eSopenharmony_ci * Obtains whether an application supports distributed notification. 211861847f8eSopenharmony_ci * 211961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 212061847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 212161847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns whether the distributed notification is supported. 212261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 212361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 212461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 212561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 212661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 212761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 212861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 212961847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 213061847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 213161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 213261847f8eSopenharmony_ci * @systemapi 213361847f8eSopenharmony_ci * @since 9 213461847f8eSopenharmony_ci */ 213561847f8eSopenharmony_ci function isDistributedEnabledByBundle(bundle: BundleOption): Promise<boolean>; 213661847f8eSopenharmony_ci 213761847f8eSopenharmony_ci /** 213861847f8eSopenharmony_ci * Obtains whether an application supports distributed notification. 213961847f8eSopenharmony_ci * 214061847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 214161847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 214261847f8eSopenharmony_ci * @param { string } deviceType - The device type. 214361847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns whether the distributed notification is supported. 214461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 214561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 214661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 214761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 214861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 214961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 215061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 215161847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 215261847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 215361847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 215461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 215561847f8eSopenharmony_ci * @systemapi 215661847f8eSopenharmony_ci * @since 12 215761847f8eSopenharmony_ci */ 215861847f8eSopenharmony_ci function isDistributedEnabledByBundle(bundle: BundleOption, deviceType: string): Promise<boolean>; 215961847f8eSopenharmony_ci 216061847f8eSopenharmony_ci /** 216161847f8eSopenharmony_ci * Sets whether an application supports smart reminders across devices. 216261847f8eSopenharmony_ci * 216361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 216461847f8eSopenharmony_ci * @param { string } deviceType - The device type. 216561847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 216661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 216761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 216861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 216961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 217061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 217161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 217261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 217361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 217461847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 217561847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 217661847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 217761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 217861847f8eSopenharmony_ci * @systemapi 217961847f8eSopenharmony_ci * @since 12 218061847f8eSopenharmony_ci */ 218161847f8eSopenharmony_ci function setSmartReminderEnabled(deviceType: string, enable: boolean): Promise<void>; 218261847f8eSopenharmony_ci 218361847f8eSopenharmony_ci /** 218461847f8eSopenharmony_ci * Obtains whether an application supports smart reminders across devices. 218561847f8eSopenharmony_ci * 218661847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 218761847f8eSopenharmony_ci * @param { string } deviceType - The device type. 218861847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns whether the smart reminders across devices notification is supported. 218961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 219061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 219161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 219261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 219361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 219461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 219561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 219661847f8eSopenharmony_ci * @throws { BusinessError } 1600010 - Distributed operation failed. 219761847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 219861847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 219961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 220061847f8eSopenharmony_ci * @systemapi 220161847f8eSopenharmony_ci * @since 12 220261847f8eSopenharmony_ci */ 220361847f8eSopenharmony_ci function isSmartReminderEnabled(deviceType: string): Promise<boolean>; 220461847f8eSopenharmony_ci 220561847f8eSopenharmony_ci /** 220661847f8eSopenharmony_ci * Obtains the remind modes of the notification. 220761847f8eSopenharmony_ci * 220861847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 220961847f8eSopenharmony_ci * @param { AsyncCallback<DeviceRemindType> } callback - The callback is used to return the RemindType. 221061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 221161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 221261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 221361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 221461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 221561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 221661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 221761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 221861847f8eSopenharmony_ci * @systemapi 221961847f8eSopenharmony_ci * @since 9 222061847f8eSopenharmony_ci */ 222161847f8eSopenharmony_ci function getDeviceRemindType(callback: AsyncCallback<DeviceRemindType>): void; 222261847f8eSopenharmony_ci 222361847f8eSopenharmony_ci /** 222461847f8eSopenharmony_ci * Obtains the remind modes of the notification. 222561847f8eSopenharmony_ci * 222661847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 222761847f8eSopenharmony_ci * @returns { Promise<DeviceRemindType> } Returns the RemindType. 222861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 222961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 223061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 223161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 223261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 223361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 223461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 223561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 223661847f8eSopenharmony_ci * @systemapi 223761847f8eSopenharmony_ci * @since 9 223861847f8eSopenharmony_ci */ 223961847f8eSopenharmony_ci function getDeviceRemindType(): Promise<DeviceRemindType>; 224061847f8eSopenharmony_ci 224161847f8eSopenharmony_ci /** 224261847f8eSopenharmony_ci * Set whether the application slot is enabled. 224361847f8eSopenharmony_ci * 224461847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 224561847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 224661847f8eSopenharmony_ci * @param { SlotType } type - Type of the notification slot. 224761847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 224861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setNotificationEnableSlot. 224961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 225061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 225161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 225261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 225361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 225461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 225561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 225661847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 225761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 225861847f8eSopenharmony_ci * @systemapi 225961847f8eSopenharmony_ci * @since 9 226061847f8eSopenharmony_ci */ 226161847f8eSopenharmony_ci /** 226261847f8eSopenharmony_ci * Set whether the application slot is enabled. 226361847f8eSopenharmony_ci * 226461847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 226561847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 226661847f8eSopenharmony_ci * @param { SlotType } type - Type of the notification slot. 226761847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 226861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setNotificationEnableSlot. 226961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 227061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 227161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 227261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 227361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 227461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 227561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 227661847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 227761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 227861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 227961847f8eSopenharmony_ci * @systemapi 228061847f8eSopenharmony_ci * @since 11 228161847f8eSopenharmony_ci */ 228261847f8eSopenharmony_ci function setNotificationEnableSlot( 228361847f8eSopenharmony_ci bundle: BundleOption, 228461847f8eSopenharmony_ci type: SlotType, 228561847f8eSopenharmony_ci enable: boolean, 228661847f8eSopenharmony_ci callback: AsyncCallback<void> 228761847f8eSopenharmony_ci ): void; 228861847f8eSopenharmony_ci 228961847f8eSopenharmony_ci /** 229061847f8eSopenharmony_ci * Set whether the application slot is enabled. 229161847f8eSopenharmony_ci * 229261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 229361847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 229461847f8eSopenharmony_ci * @param { SlotType } type - Type of the notification slot. 229561847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 229661847f8eSopenharmony_ci * @param { boolean } isForceControl - Is the notification slot enable affected by the application 229761847f8eSopenharmony_ci * notification enable, false means affected. 229861847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setNotificationEnableSlot. 229961847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 230061847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 230161847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 230261847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 230361847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 230461847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 230561847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 230661847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 230761847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 230861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 230961847f8eSopenharmony_ci * @systemapi 231061847f8eSopenharmony_ci * @since 11 231161847f8eSopenharmony_ci */ 231261847f8eSopenharmony_ci function setNotificationEnableSlot( 231361847f8eSopenharmony_ci bundle: BundleOption, 231461847f8eSopenharmony_ci type: SlotType, 231561847f8eSopenharmony_ci enable: boolean, 231661847f8eSopenharmony_ci isForceControl: boolean, 231761847f8eSopenharmony_ci callback: AsyncCallback<void>, 231861847f8eSopenharmony_ci ): void; 231961847f8eSopenharmony_ci 232061847f8eSopenharmony_ci /** 232161847f8eSopenharmony_ci * Set whether the application slot is enabled. 232261847f8eSopenharmony_ci * 232361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 232461847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 232561847f8eSopenharmony_ci * @param { SlotType } type - Type of the notification slot. 232661847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 232761847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 232861847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 232961847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 233061847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 233161847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 233261847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 233361847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 233461847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 233561847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 233661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 233761847f8eSopenharmony_ci * @systemapi 233861847f8eSopenharmony_ci * @since 9 233961847f8eSopenharmony_ci */ 234061847f8eSopenharmony_ci /** 234161847f8eSopenharmony_ci * Set whether the application slot is enabled. 234261847f8eSopenharmony_ci * 234361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 234461847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 234561847f8eSopenharmony_ci * @param { SlotType } type - Type of the notification slot. 234661847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 234761847f8eSopenharmony_ci * @param { boolean } isForceControl - Is the notification slot enable affected by the application 234861847f8eSopenharmony_ci * notification enable, false means affected. 234961847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 235061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 235161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 235261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 235361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 235461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 235561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 235661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 235761847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 235861847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 235961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 236061847f8eSopenharmony_ci * @systemapi 236161847f8eSopenharmony_ci * @since 11 236261847f8eSopenharmony_ci */ 236361847f8eSopenharmony_ci function setNotificationEnableSlot(bundle: BundleOption, type: SlotType, enable: boolean, isForceControl?: boolean): Promise<void>; 236461847f8eSopenharmony_ci 236561847f8eSopenharmony_ci /** 236661847f8eSopenharmony_ci * Obtains whether the application slot is enabled. 236761847f8eSopenharmony_ci * 236861847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 236961847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 237061847f8eSopenharmony_ci * @param { SlotType } type - Type of the notification slot. 237161847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback is used to return whether the application slot is enabled. 237261847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 237361847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 237461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 237561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 237661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 237761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 237861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 237961847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 238061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 238161847f8eSopenharmony_ci * @systemapi 238261847f8eSopenharmony_ci * @since 9 238361847f8eSopenharmony_ci */ 238461847f8eSopenharmony_ci function isNotificationSlotEnabled(bundle: BundleOption, type: SlotType, callback: AsyncCallback<boolean>): void; 238561847f8eSopenharmony_ci 238661847f8eSopenharmony_ci /** 238761847f8eSopenharmony_ci * Obtains whether the application slot is enabled. 238861847f8eSopenharmony_ci * 238961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 239061847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 239161847f8eSopenharmony_ci * @param { SlotType } type - Type of the notification slot. 239261847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns whether the application slot is enabled. 239361847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 239461847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 239561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 239661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 239761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 239861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 239961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 240061847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 240161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 240261847f8eSopenharmony_ci * @systemapi 240361847f8eSopenharmony_ci * @since 9 240461847f8eSopenharmony_ci */ 240561847f8eSopenharmony_ci function isNotificationSlotEnabled(bundle: BundleOption, type: SlotType): Promise<boolean>; 240661847f8eSopenharmony_ci 240761847f8eSopenharmony_ci /** 240861847f8eSopenharmony_ci * Set whether to sync notifications to devices that do not have the app installed. 240961847f8eSopenharmony_ci * 241061847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 241161847f8eSopenharmony_ci * @param { number } userId - The userId. 241261847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 241361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - The callback of setSyncNotificationEnabledWithoutApp. 241461847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 241561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 241661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 241761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 241861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 241961847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 242061847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 242161847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 242261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 242361847f8eSopenharmony_ci * @systemapi 242461847f8eSopenharmony_ci * @since 9 242561847f8eSopenharmony_ci */ 242661847f8eSopenharmony_ci function setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean, callback: AsyncCallback<void>): void; 242761847f8eSopenharmony_ci 242861847f8eSopenharmony_ci /** 242961847f8eSopenharmony_ci * Set whether to sync notifications to devices that do not have the app installed. 243061847f8eSopenharmony_ci * 243161847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 243261847f8eSopenharmony_ci * @param { number } userId - The userId. 243361847f8eSopenharmony_ci * @param { boolean } enable - Set enable or not. 243461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 243561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 243661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 243761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 243861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 243961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 244061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 244161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 244261847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 244361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 244461847f8eSopenharmony_ci * @systemapi 244561847f8eSopenharmony_ci * @since 9 244661847f8eSopenharmony_ci */ 244761847f8eSopenharmony_ci function setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean): Promise<void>; 244861847f8eSopenharmony_ci 244961847f8eSopenharmony_ci /** 245061847f8eSopenharmony_ci * Obtains whether to sync notifications to devices that do not have the app installed. 245161847f8eSopenharmony_ci * 245261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 245361847f8eSopenharmony_ci * @param { number } userId - The userId. 245461847f8eSopenharmony_ci * @param { AsyncCallback<boolean> } callback - The callback is used to return whether to sync notifications to devices. 245561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 245661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 245761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 245861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 245961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 246061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 246161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 246261847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 246361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 246461847f8eSopenharmony_ci * @systemapi 246561847f8eSopenharmony_ci * @since 9 246661847f8eSopenharmony_ci */ 246761847f8eSopenharmony_ci function getSyncNotificationEnabledWithoutApp(userId: number, callback: AsyncCallback<boolean>): void; 246861847f8eSopenharmony_ci 246961847f8eSopenharmony_ci /** 247061847f8eSopenharmony_ci * Obtains whether to sync notifications to devices that do not have the app installed. 247161847f8eSopenharmony_ci * 247261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 247361847f8eSopenharmony_ci * @param { number } userId - The userId. 247461847f8eSopenharmony_ci * @returns { Promise<boolean> } Returns whether to sync notifications to devices. 247561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 247661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 247761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 247861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 247961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 248061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 248161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 248261847f8eSopenharmony_ci * @throws { BusinessError } 1600008 - The user does not exist. 248361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 248461847f8eSopenharmony_ci * @systemapi 248561847f8eSopenharmony_ci * @since 9 248661847f8eSopenharmony_ci */ 248761847f8eSopenharmony_ci function getSyncNotificationEnabledWithoutApp(userId: number): Promise<boolean>; 248861847f8eSopenharmony_ci 248961847f8eSopenharmony_ci /** 249061847f8eSopenharmony_ci * Set badge number. 249161847f8eSopenharmony_ci * 249261847f8eSopenharmony_ci * @param { number } badgeNumber - Badge number. 249361847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - callback - The callback of setBadgeNumber.. 249461847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 249561847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 249661847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 249761847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 249861847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 249961847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 250061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 250161847f8eSopenharmony_ci * @since 10 250261847f8eSopenharmony_ci */ 250361847f8eSopenharmony_ci /** 250461847f8eSopenharmony_ci * Set badge number. 250561847f8eSopenharmony_ci * 250661847f8eSopenharmony_ci * @param { number } badgeNumber - Badge number. 250761847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - callback - The callback of setBadgeNumber.. 250861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 250961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 251061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 251161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 251261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 251361847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 251461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 251561847f8eSopenharmony_ci * @crossplatform 251661847f8eSopenharmony_ci * @since 12 251761847f8eSopenharmony_ci */ 251861847f8eSopenharmony_ci function setBadgeNumber(badgeNumber: number, callback: AsyncCallback<void>): void; 251961847f8eSopenharmony_ci 252061847f8eSopenharmony_ci /** 252161847f8eSopenharmony_ci * Set badge number. 252261847f8eSopenharmony_ci * 252361847f8eSopenharmony_ci * @param { number } badgeNumber - Badge number. 252461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 252561847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 252661847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 252761847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 252861847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 252961847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 253061847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 253161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 253261847f8eSopenharmony_ci * @since 10 253361847f8eSopenharmony_ci */ 253461847f8eSopenharmony_ci /** 253561847f8eSopenharmony_ci * Set badge number. 253661847f8eSopenharmony_ci * 253761847f8eSopenharmony_ci * @param { number } badgeNumber - Badge number. 253861847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 253961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 254061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 254161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 254261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 254361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 254461847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 254561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 254661847f8eSopenharmony_ci * @crossplatform 254761847f8eSopenharmony_ci * @since 12 254861847f8eSopenharmony_ci */ 254961847f8eSopenharmony_ci function setBadgeNumber(badgeNumber: number): Promise<void>; 255061847f8eSopenharmony_ci 255161847f8eSopenharmony_ci /** 255261847f8eSopenharmony_ci * Set badge number by bundle. 255361847f8eSopenharmony_ci * 255461847f8eSopenharmony_ci * @param { BundleOption } bundle - Use the bundleOption to carry bundleName and uid of the application. 255561847f8eSopenharmony_ci * @param { number } badgeNumber - Badge number. 255661847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 255761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 255861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 255961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 256061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 256161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 256261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 256361847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 256461847f8eSopenharmony_ci * @throws { BusinessError } 1600017 - There is no corresponding agent relationship configuration. 256561847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 256661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 256761847f8eSopenharmony_ci * @systemapi 256861847f8eSopenharmony_ci * @since 12 256961847f8eSopenharmony_ci */ 257061847f8eSopenharmony_ci function setBadgeNumberByBundle(bundle: BundleOption, badgeNumber: number): Promise<void>; 257161847f8eSopenharmony_ci 257261847f8eSopenharmony_ci /** 257361847f8eSopenharmony_ci * Subscribe the callback for check notifications. 257461847f8eSopenharmony_ci * 257561847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 257661847f8eSopenharmony_ci * @param { 'checkNotification' } type - Type of the callback to listen for. 257761847f8eSopenharmony_ci * @param { function } callback - callback - The callback of check notifications. 257861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application. 257961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 258061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 258161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 258261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 258361847f8eSopenharmony_ci * @systemapi 258461847f8eSopenharmony_ci * @since 10 258561847f8eSopenharmony_ci */ 258661847f8eSopenharmony_ci function on(type: 'checkNotification', callback: (checkInfo: NotificationCheckInfo) => NotificationCheckResult): void; 258761847f8eSopenharmony_ci 258861847f8eSopenharmony_ci /** 258961847f8eSopenharmony_ci * Subscribe the callback for check notifications. 259061847f8eSopenharmony_ci * 259161847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 259261847f8eSopenharmony_ci * @param { 'checkNotification' } type - Type of the callback to listen for. 259361847f8eSopenharmony_ci * @param { NotificationCheckRequest } checkRequest - Check Request for filter notification request. 259461847f8eSopenharmony_ci * @param { function } callback - callback - The callback of check notifications. 259561847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 259661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application. 259761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 259861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 259961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 260061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 260161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 260261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 260361847f8eSopenharmony_ci * @systemapi 260461847f8eSopenharmony_ci * @since 11 260561847f8eSopenharmony_ci */ 260661847f8eSopenharmony_ci function on(type: 'checkNotification', checkRequest: NotificationCheckRequest, 260761847f8eSopenharmony_ci callback: (checkInfo: NotificationCheckInfo) => Promise<NotificationCheckResult>): void; 260861847f8eSopenharmony_ci 260961847f8eSopenharmony_ci /** 261061847f8eSopenharmony_ci * Unsubscribe the callback for check notifications. 261161847f8eSopenharmony_ci * 261261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 261361847f8eSopenharmony_ci * @param { 'checkNotification' } type - Type of the callback to listen for. 261461847f8eSopenharmony_ci * @param { function } [callback] - callback - The callback of check notifications. 261561847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application. 261661847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 261761847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 261861847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 261961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 262061847f8eSopenharmony_ci * @systemapi 262161847f8eSopenharmony_ci * @since 10 262261847f8eSopenharmony_ci */ 262361847f8eSopenharmony_ci function off( 262461847f8eSopenharmony_ci type: 'checkNotification', 262561847f8eSopenharmony_ci callback?: (checkInfo: NotificationCheckInfo) => NotificationCheckResult 262661847f8eSopenharmony_ci ): void; 262761847f8eSopenharmony_ci 262861847f8eSopenharmony_ci /** 262961847f8eSopenharmony_ci * Trigger system live view notification. 263061847f8eSopenharmony_ci * 263161847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 263261847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 263361847f8eSopenharmony_ci * @param { number } notificationId - The notification id. 263461847f8eSopenharmony_ci * @param { ButtonOptions } buttonOptions - The button option. 263561847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 263661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 263761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 263861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 263961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 264061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 264161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 264261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 264361847f8eSopenharmony_ci * @throws { BusinessError } 1600007 - The notification does not exist. 264461847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 264561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 264661847f8eSopenharmony_ci * @systemapi 264761847f8eSopenharmony_ci * @since 11 264861847f8eSopenharmony_ci */ 264961847f8eSopenharmony_ci function triggerSystemLiveView(bundle: BundleOption, notificationId: number, buttonOptions: ButtonOptions): Promise<void>; 265061847f8eSopenharmony_ci 265161847f8eSopenharmony_ci /** 265261847f8eSopenharmony_ci * Subscribe to system live view notifications 265361847f8eSopenharmony_ci * 265461847f8eSopenharmony_ci * @param { SystemLiveViewSubscriber } subscriber - The system live vie notification subscriber. 265561847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 265661847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 265761847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 265861847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 265961847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 266061847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 266161847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 266261847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 266361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 266461847f8eSopenharmony_ci * @systemapi 266561847f8eSopenharmony_ci * @since 11 266661847f8eSopenharmony_ci */ 266761847f8eSopenharmony_ci function subscribeSystemLiveView(subscriber: SystemLiveViewSubscriber): Promise<void>; 266861847f8eSopenharmony_ci 266961847f8eSopenharmony_ci /** 267061847f8eSopenharmony_ci * Set basic configurations of application-level notification channels. 267161847f8eSopenharmony_ci * 267261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 267361847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 267461847f8eSopenharmony_ci * @param { number } slotFlags - Indicates the slotFlags. 267561847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 267661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 267761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 267861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 267961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 268061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 268161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 268261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 268361847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 268461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 268561847f8eSopenharmony_ci * @systemapi 268661847f8eSopenharmony_ci * @since 11 268761847f8eSopenharmony_ci */ 268861847f8eSopenharmony_ci function setSlotFlagsByBundle(bundle: BundleOption, slotFlags: number): Promise<void>; 268961847f8eSopenharmony_ci 269061847f8eSopenharmony_ci /** 269161847f8eSopenharmony_ci * Obtains basic configurations of application-level notification channels. 269261847f8eSopenharmony_ci * 269361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 269461847f8eSopenharmony_ci * @param { BundleOption } bundle - The bundle option. 269561847f8eSopenharmony_ci * @returns { Promise<number> } The promise returned by the function. 269661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 269761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 269861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 269961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 270061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 270161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 270261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 270361847f8eSopenharmony_ci * @throws { BusinessError } 17700001 - The specified bundle name was not found. 270461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 270561847f8eSopenharmony_ci * @systemapi 270661847f8eSopenharmony_ci * @since 11 270761847f8eSopenharmony_ci */ 270861847f8eSopenharmony_ci function getSlotFlagsByBundle(bundle: BundleOption): Promise<number>; 270961847f8eSopenharmony_ci 271061847f8eSopenharmony_ci /** 271161847f8eSopenharmony_ci * Add do not disturb notification templates. 271261847f8eSopenharmony_ci * 271361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 271461847f8eSopenharmony_ci * @param { Array<DoNotDisturbProfile> } templates - The array of Notification templates. 271561847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 271661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 271761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 271861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 271961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 272061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 272161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 272261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 272361847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 272461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 272561847f8eSopenharmony_ci * @systemapi 272661847f8eSopenharmony_ci * @since 12 272761847f8eSopenharmony_ci */ 272861847f8eSopenharmony_ci function addDoNotDisturbProfile(templates: Array<DoNotDisturbProfile>): Promise<void>; 272961847f8eSopenharmony_ci 273061847f8eSopenharmony_ci /** 273161847f8eSopenharmony_ci * Remove do not disturb notification templates. 273261847f8eSopenharmony_ci * 273361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 273461847f8eSopenharmony_ci * @param { Array<DoNotDisturbProfile> } templates - The array of Notification templates. 273561847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 273661847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 273761847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 273861847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 273961847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 274061847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 274161847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 274261847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 274361847f8eSopenharmony_ci * @throws { BusinessError } 1600012 - No memory space. 274461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 274561847f8eSopenharmony_ci * @systemapi 274661847f8eSopenharmony_ci * @since 12 274761847f8eSopenharmony_ci */ 274861847f8eSopenharmony_ci function removeDoNotDisturbProfile(templates: Array<DoNotDisturbProfile>): Promise<void>; 274961847f8eSopenharmony_ci 275061847f8eSopenharmony_ci /** 275161847f8eSopenharmony_ci * Set system additional config information of notification 275261847f8eSopenharmony_ci * 275361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_AGENT_CONTROLLER 275461847f8eSopenharmony_ci * @param { string } key - addition config key. 275561847f8eSopenharmony_ci * @param { string } value - addition config value. 275661847f8eSopenharmony_ci * @returns { Promise<number> } The promise returned by the function. 275761847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 275861847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 275961847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 276061847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 276161847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 276261847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 276361847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 276461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 276561847f8eSopenharmony_ci * @systemapi 276661847f8eSopenharmony_ci * @since 12 276761847f8eSopenharmony_ci */ 276861847f8eSopenharmony_ci function setAdditionalConfig(key: string, value: string): Promise<number>; 276961847f8eSopenharmony_ci 277061847f8eSopenharmony_ci /** 277161847f8eSopenharmony_ci * Request open the notification settings pop-up window. 277261847f8eSopenharmony_ci * 277361847f8eSopenharmony_ci * @param { UIAbilityContext } context - The context indicates the ability context you want to bind; 277461847f8eSopenharmony_ci * @returns { Promise<void> } The promise returned by the function. 277561847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 277661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 277761847f8eSopenharmony_ci * @throws { BusinessError } 1600018 - the notification settings window is already displayed. 277861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.NotificationSettings 277961847f8eSopenharmony_ci * @stagemodelonly 278061847f8eSopenharmony_ci * @since 13 278161847f8eSopenharmony_ci */ 278261847f8eSopenharmony_ci function openNotificationSettings(context: UIAbilityContext): Promise<void>; 278361847f8eSopenharmony_ci 278461847f8eSopenharmony_ci /** 278561847f8eSopenharmony_ci * Get do not disturb profile by id. 278661847f8eSopenharmony_ci * 278761847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER 278861847f8eSopenharmony_ci * @param { number } id - The id of profile. 278961847f8eSopenharmony_ci * @returns { Promise<DoNotDisturbProfile> } The promise returned by the function. 279061847f8eSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 279161847f8eSopenharmony_ci * @throws { BusinessError } 202 - Not system application to call the interface. 279261847f8eSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 279361847f8eSopenharmony_ci * <br>2. Incorrect parameter types. 3. Parameter verification failed. 279461847f8eSopenharmony_ci * @throws { BusinessError } 1600001 - Internal error. 279561847f8eSopenharmony_ci * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. 279661847f8eSopenharmony_ci * @throws { BusinessError } 1600003 - Failed to connect to the service. 279761847f8eSopenharmony_ci * @throws { BusinessError } 1600019 - The do-not-disturb profile does not exist. 279861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 279961847f8eSopenharmony_ci * @systemapi 280061847f8eSopenharmony_ci * @since 13 280161847f8eSopenharmony_ci */ 280261847f8eSopenharmony_ci function getDoNotDisturbProfile(id: number): Promise<DoNotDisturbProfile>; 280361847f8eSopenharmony_ci 280461847f8eSopenharmony_ci /** 280561847f8eSopenharmony_ci * Describes a button option for a triggering. 280661847f8eSopenharmony_ci * 280761847f8eSopenharmony_ci * @typedef ButtonOptions 280861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 280961847f8eSopenharmony_ci * @systemapi 281061847f8eSopenharmony_ci * @since 11 281161847f8eSopenharmony_ci */ 281261847f8eSopenharmony_ci export interface ButtonOptions { 281361847f8eSopenharmony_ci /** 281461847f8eSopenharmony_ci * The button name for a triggering. 281561847f8eSopenharmony_ci * 281661847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 281761847f8eSopenharmony_ci * @type { string } 281861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 281961847f8eSopenharmony_ci * @systemapi 282061847f8eSopenharmony_ci * @since 11 282161847f8eSopenharmony_ci */ 282261847f8eSopenharmony_ci buttonName: string; 282361847f8eSopenharmony_ci } 282461847f8eSopenharmony_ci 282561847f8eSopenharmony_ci /** 282661847f8eSopenharmony_ci * Describes a subscriber for system live view. 282761847f8eSopenharmony_ci * 282861847f8eSopenharmony_ci * @typedef SystemLiveViewSubscriber 282961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 283061847f8eSopenharmony_ci * @systemapi 283161847f8eSopenharmony_ci * @since 11 283261847f8eSopenharmony_ci */ 283361847f8eSopenharmony_ci export interface SystemLiveViewSubscriber { 283461847f8eSopenharmony_ci /** 283561847f8eSopenharmony_ci * The callback function that receives a new button option of a notification. 283661847f8eSopenharmony_ci * 283761847f8eSopenharmony_ci * @type { ?function } 283861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 283961847f8eSopenharmony_ci * @systemapi 284061847f8eSopenharmony_ci * @since 11 284161847f8eSopenharmony_ci */ 284261847f8eSopenharmony_ci onResponse?: (notificationId: number, buttonOptions: ButtonOptions) => void; 284361847f8eSopenharmony_ci } 284461847f8eSopenharmony_ci 284561847f8eSopenharmony_ci /** 284661847f8eSopenharmony_ci * Describes the parameters of check notifications. 284761847f8eSopenharmony_ci * 284861847f8eSopenharmony_ci * @typedef NotificationCheckInfo 284961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 285061847f8eSopenharmony_ci * @systemapi 285161847f8eSopenharmony_ci * @since 10 285261847f8eSopenharmony_ci */ 285361847f8eSopenharmony_ci export interface NotificationCheckInfo { 285461847f8eSopenharmony_ci /** 285561847f8eSopenharmony_ci * The application bundle name for publishing notification. 285661847f8eSopenharmony_ci * 285761847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 285861847f8eSopenharmony_ci * @type { string } 285961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 286061847f8eSopenharmony_ci * @systemapi 286161847f8eSopenharmony_ci * @since 10 286261847f8eSopenharmony_ci */ 286361847f8eSopenharmony_ci bundleName: string; 286461847f8eSopenharmony_ci 286561847f8eSopenharmony_ci /** 286661847f8eSopenharmony_ci * The notification id. 286761847f8eSopenharmony_ci * 286861847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 286961847f8eSopenharmony_ci * @type { number } 287061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 287161847f8eSopenharmony_ci * @systemapi 287261847f8eSopenharmony_ci * @since 10 287361847f8eSopenharmony_ci */ 287461847f8eSopenharmony_ci notificationId: number; 287561847f8eSopenharmony_ci 287661847f8eSopenharmony_ci /** 287761847f8eSopenharmony_ci * Label of the notification. 287861847f8eSopenharmony_ci * 287961847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 288061847f8eSopenharmony_ci * @type { ?string } 288161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 288261847f8eSopenharmony_ci * @systemapi 288361847f8eSopenharmony_ci * @since 11 288461847f8eSopenharmony_ci */ 288561847f8eSopenharmony_ci label?: string; 288661847f8eSopenharmony_ci 288761847f8eSopenharmony_ci /** 288861847f8eSopenharmony_ci * The notification content type. 288961847f8eSopenharmony_ci * 289061847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 289161847f8eSopenharmony_ci * @type { ContentType } 289261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 289361847f8eSopenharmony_ci * @systemapi 289461847f8eSopenharmony_ci * @since 10 289561847f8eSopenharmony_ci */ 289661847f8eSopenharmony_ci contentType: ContentType; 289761847f8eSopenharmony_ci 289861847f8eSopenharmony_ci /** 289961847f8eSopenharmony_ci * UserId of the notification creator. 290061847f8eSopenharmony_ci * 290161847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 290261847f8eSopenharmony_ci * @type { number } 290361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 290461847f8eSopenharmony_ci * @systemapi 290561847f8eSopenharmony_ci * @since 11 290661847f8eSopenharmony_ci */ 290761847f8eSopenharmony_ci creatorUserId: number; 290861847f8eSopenharmony_ci 290961847f8eSopenharmony_ci /** 291061847f8eSopenharmony_ci * Type of the notification slot. 291161847f8eSopenharmony_ci * 291261847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 291361847f8eSopenharmony_ci * @type { SlotType } 291461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 291561847f8eSopenharmony_ci * @systemapi 291661847f8eSopenharmony_ci * @since 11 291761847f8eSopenharmony_ci */ 291861847f8eSopenharmony_ci slotType: SlotType; 291961847f8eSopenharmony_ci 292061847f8eSopenharmony_ci /** 292161847f8eSopenharmony_ci * Additional information of the live view notification. 292261847f8eSopenharmony_ci * 292361847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 292461847f8eSopenharmony_ci * @type { ?Record<string, Object> } 292561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 292661847f8eSopenharmony_ci * @systemapi 292761847f8eSopenharmony_ci * @since 11 292861847f8eSopenharmony_ci */ 292961847f8eSopenharmony_ci extraInfos?: Record<string, Object>; 293061847f8eSopenharmony_ci } 293161847f8eSopenharmony_ci 293261847f8eSopenharmony_ci /** 293361847f8eSopenharmony_ci * Describes the result of check notifications. 293461847f8eSopenharmony_ci * 293561847f8eSopenharmony_ci * @typedef NotificationCheckResult 293661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 293761847f8eSopenharmony_ci * @systemapi 293861847f8eSopenharmony_ci * @since 10 293961847f8eSopenharmony_ci */ 294061847f8eSopenharmony_ci export interface NotificationCheckResult { 294161847f8eSopenharmony_ci /** 294261847f8eSopenharmony_ci * The result code. 0-display, 1-no display 294361847f8eSopenharmony_ci * 294461847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 294561847f8eSopenharmony_ci * @type { number } 294661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 294761847f8eSopenharmony_ci * @systemapi 294861847f8eSopenharmony_ci * @since 10 294961847f8eSopenharmony_ci */ 295061847f8eSopenharmony_ci code: number; 295161847f8eSopenharmony_ci 295261847f8eSopenharmony_ci /** 295361847f8eSopenharmony_ci * The result message. 295461847f8eSopenharmony_ci * 295561847f8eSopenharmony_ci * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER 295661847f8eSopenharmony_ci * @type { string } 295761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 295861847f8eSopenharmony_ci * @systemapi 295961847f8eSopenharmony_ci * @since 10 296061847f8eSopenharmony_ci */ 296161847f8eSopenharmony_ci message: string; 296261847f8eSopenharmony_ci } 296361847f8eSopenharmony_ci 296461847f8eSopenharmony_ci /** 296561847f8eSopenharmony_ci * Describes NotificationSlot types. 296661847f8eSopenharmony_ci * 296761847f8eSopenharmony_ci * @enum { number } 296861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 296961847f8eSopenharmony_ci * @since 9 297061847f8eSopenharmony_ci */ 297161847f8eSopenharmony_ci /** 297261847f8eSopenharmony_ci * Describes NotificationSlot types. 297361847f8eSopenharmony_ci * 297461847f8eSopenharmony_ci * @enum { number } 297561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 297661847f8eSopenharmony_ci * @atomicservice 297761847f8eSopenharmony_ci * @since 12 297861847f8eSopenharmony_ci */ 297961847f8eSopenharmony_ci export enum SlotType { 298061847f8eSopenharmony_ci /** 298161847f8eSopenharmony_ci * NotificationSlot of an unknown type. 298261847f8eSopenharmony_ci * 298361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 298461847f8eSopenharmony_ci * @since 9 298561847f8eSopenharmony_ci */ 298661847f8eSopenharmony_ci /** 298761847f8eSopenharmony_ci * NotificationSlot of an unknown type. 298861847f8eSopenharmony_ci * 298961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 299061847f8eSopenharmony_ci * @atomicservice 299161847f8eSopenharmony_ci * @since 12 299261847f8eSopenharmony_ci */ 299361847f8eSopenharmony_ci UNKNOWN_TYPE = 0, 299461847f8eSopenharmony_ci 299561847f8eSopenharmony_ci /** 299661847f8eSopenharmony_ci * NotificationSlot for social communication. 299761847f8eSopenharmony_ci * 299861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 299961847f8eSopenharmony_ci * @since 9 300061847f8eSopenharmony_ci */ 300161847f8eSopenharmony_ci /** 300261847f8eSopenharmony_ci * NotificationSlot for social communication. 300361847f8eSopenharmony_ci * 300461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 300561847f8eSopenharmony_ci * @atomicservice 300661847f8eSopenharmony_ci * @since 12 300761847f8eSopenharmony_ci */ 300861847f8eSopenharmony_ci SOCIAL_COMMUNICATION = 1, 300961847f8eSopenharmony_ci 301061847f8eSopenharmony_ci /** 301161847f8eSopenharmony_ci * NotificationSlot for service information. 301261847f8eSopenharmony_ci * 301361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 301461847f8eSopenharmony_ci * @since 9 301561847f8eSopenharmony_ci */ 301661847f8eSopenharmony_ci /** 301761847f8eSopenharmony_ci * NotificationSlot for service information. 301861847f8eSopenharmony_ci * 301961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 302061847f8eSopenharmony_ci * @atomicservice 302161847f8eSopenharmony_ci * @since 12 302261847f8eSopenharmony_ci */ 302361847f8eSopenharmony_ci SERVICE_INFORMATION = 2, 302461847f8eSopenharmony_ci 302561847f8eSopenharmony_ci /** 302661847f8eSopenharmony_ci * NotificationSlot for content information. 302761847f8eSopenharmony_ci * 302861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 302961847f8eSopenharmony_ci * @since 9 303061847f8eSopenharmony_ci */ 303161847f8eSopenharmony_ci /** 303261847f8eSopenharmony_ci * NotificationSlot for content information. 303361847f8eSopenharmony_ci * 303461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 303561847f8eSopenharmony_ci * @atomicservice 303661847f8eSopenharmony_ci * @since 12 303761847f8eSopenharmony_ci */ 303861847f8eSopenharmony_ci CONTENT_INFORMATION = 3, 303961847f8eSopenharmony_ci 304061847f8eSopenharmony_ci /** 304161847f8eSopenharmony_ci * NotificationSlot for live view. 304261847f8eSopenharmony_ci * 304361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 304461847f8eSopenharmony_ci * @since 11 304561847f8eSopenharmony_ci */ 304661847f8eSopenharmony_ci /** 304761847f8eSopenharmony_ci * NotificationSlot for live view. 304861847f8eSopenharmony_ci * 304961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 305061847f8eSopenharmony_ci * @atomicservice 305161847f8eSopenharmony_ci * @since 12 305261847f8eSopenharmony_ci */ 305361847f8eSopenharmony_ci LIVE_VIEW = 4, 305461847f8eSopenharmony_ci 305561847f8eSopenharmony_ci /** 305661847f8eSopenharmony_ci * NotificationSlot for customer service. 305761847f8eSopenharmony_ci * 305861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 305961847f8eSopenharmony_ci * @since 11 306061847f8eSopenharmony_ci */ 306161847f8eSopenharmony_ci /** 306261847f8eSopenharmony_ci * NotificationSlot for customer service. 306361847f8eSopenharmony_ci * 306461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 306561847f8eSopenharmony_ci * @atomicservice 306661847f8eSopenharmony_ci * @since 12 306761847f8eSopenharmony_ci */ 306861847f8eSopenharmony_ci CUSTOMER_SERVICE = 5, 306961847f8eSopenharmony_ci 307061847f8eSopenharmony_ci /** 307161847f8eSopenharmony_ci * NotificationSlot for emergency information. 307261847f8eSopenharmony_ci * 307361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 307461847f8eSopenharmony_ci * @systemapi 307561847f8eSopenharmony_ci * @since 12 307661847f8eSopenharmony_ci */ 307761847f8eSopenharmony_ci EMERGENCY_INFORMATION = 10, 307861847f8eSopenharmony_ci 307961847f8eSopenharmony_ci /** 308061847f8eSopenharmony_ci * NotificationSlot for other purposes. 308161847f8eSopenharmony_ci * 308261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 308361847f8eSopenharmony_ci * @since 9 308461847f8eSopenharmony_ci */ 308561847f8eSopenharmony_ci /** 308661847f8eSopenharmony_ci * NotificationSlot for other purposes. 308761847f8eSopenharmony_ci * 308861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 308961847f8eSopenharmony_ci * @atomicservice 309061847f8eSopenharmony_ci * @since 12 309161847f8eSopenharmony_ci */ 309261847f8eSopenharmony_ci OTHER_TYPES = 0xFFFF 309361847f8eSopenharmony_ci } 309461847f8eSopenharmony_ci 309561847f8eSopenharmony_ci /** 309661847f8eSopenharmony_ci * Describes notification content types. 309761847f8eSopenharmony_ci * 309861847f8eSopenharmony_ci * @enum { number } 309961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 310061847f8eSopenharmony_ci * @since 9 310161847f8eSopenharmony_ci */ 310261847f8eSopenharmony_ci /** 310361847f8eSopenharmony_ci * Describes notification content types. 310461847f8eSopenharmony_ci * 310561847f8eSopenharmony_ci * @enum { number } 310661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 310761847f8eSopenharmony_ci * @crossplatform 310861847f8eSopenharmony_ci * @atomicservice 310961847f8eSopenharmony_ci * @since 12 311061847f8eSopenharmony_ci */ 311161847f8eSopenharmony_ci export enum ContentType { 311261847f8eSopenharmony_ci /** 311361847f8eSopenharmony_ci * Normal text notification. 311461847f8eSopenharmony_ci * 311561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 311661847f8eSopenharmony_ci * @since 9 311761847f8eSopenharmony_ci */ 311861847f8eSopenharmony_ci /** 311961847f8eSopenharmony_ci * Normal text notification. 312061847f8eSopenharmony_ci * 312161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 312261847f8eSopenharmony_ci * @crossplatform 312361847f8eSopenharmony_ci * @atomicservice 312461847f8eSopenharmony_ci * @since 12 312561847f8eSopenharmony_ci */ 312661847f8eSopenharmony_ci NOTIFICATION_CONTENT_BASIC_TEXT, 312761847f8eSopenharmony_ci 312861847f8eSopenharmony_ci /** 312961847f8eSopenharmony_ci * Long text notification. 313061847f8eSopenharmony_ci * 313161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 313261847f8eSopenharmony_ci * @since 9 313361847f8eSopenharmony_ci */ 313461847f8eSopenharmony_ci /** 313561847f8eSopenharmony_ci * Long text notification. 313661847f8eSopenharmony_ci * 313761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 313861847f8eSopenharmony_ci * @crossplatform 313961847f8eSopenharmony_ci * @atomicservice 314061847f8eSopenharmony_ci * @since 12 314161847f8eSopenharmony_ci */ 314261847f8eSopenharmony_ci NOTIFICATION_CONTENT_LONG_TEXT, 314361847f8eSopenharmony_ci 314461847f8eSopenharmony_ci /** 314561847f8eSopenharmony_ci * Picture-attached notification. 314661847f8eSopenharmony_ci * 314761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 314861847f8eSopenharmony_ci * @since 9 314961847f8eSopenharmony_ci */ 315061847f8eSopenharmony_ci /** 315161847f8eSopenharmony_ci * Picture-attached notification. 315261847f8eSopenharmony_ci * 315361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 315461847f8eSopenharmony_ci * @atomicservice 315561847f8eSopenharmony_ci * @since 12 315661847f8eSopenharmony_ci */ 315761847f8eSopenharmony_ci NOTIFICATION_CONTENT_PICTURE, 315861847f8eSopenharmony_ci 315961847f8eSopenharmony_ci /** 316061847f8eSopenharmony_ci * Conversation notification. 316161847f8eSopenharmony_ci * 316261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 316361847f8eSopenharmony_ci * @since 9 316461847f8eSopenharmony_ci */ 316561847f8eSopenharmony_ci /** 316661847f8eSopenharmony_ci * Conversation notification. 316761847f8eSopenharmony_ci * 316861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 316961847f8eSopenharmony_ci * @atomicservice 317061847f8eSopenharmony_ci * @since 12 317161847f8eSopenharmony_ci */ 317261847f8eSopenharmony_ci NOTIFICATION_CONTENT_CONVERSATION, 317361847f8eSopenharmony_ci 317461847f8eSopenharmony_ci /** 317561847f8eSopenharmony_ci * Multi-line text notification. 317661847f8eSopenharmony_ci * 317761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 317861847f8eSopenharmony_ci * @since 9 317961847f8eSopenharmony_ci */ 318061847f8eSopenharmony_ci /** 318161847f8eSopenharmony_ci * Multi-line text notification. 318261847f8eSopenharmony_ci * 318361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 318461847f8eSopenharmony_ci * @crossplatform 318561847f8eSopenharmony_ci * @atomicservice 318661847f8eSopenharmony_ci * @since 12 318761847f8eSopenharmony_ci */ 318861847f8eSopenharmony_ci NOTIFICATION_CONTENT_MULTILINE, 318961847f8eSopenharmony_ci 319061847f8eSopenharmony_ci /** 319161847f8eSopenharmony_ci * System local live view notification. 319261847f8eSopenharmony_ci * 319361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 319461847f8eSopenharmony_ci * @since 11 319561847f8eSopenharmony_ci */ 319661847f8eSopenharmony_ci /** 319761847f8eSopenharmony_ci * System local live view notification. 319861847f8eSopenharmony_ci * 319961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 320061847f8eSopenharmony_ci * @atomicservice 320161847f8eSopenharmony_ci * @since 12 320261847f8eSopenharmony_ci */ 320361847f8eSopenharmony_ci NOTIFICATION_CONTENT_SYSTEM_LIVE_VIEW, 320461847f8eSopenharmony_ci 320561847f8eSopenharmony_ci /** 320661847f8eSopenharmony_ci * Common live view notification. 320761847f8eSopenharmony_ci * 320861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 320961847f8eSopenharmony_ci * @since 11 321061847f8eSopenharmony_ci */ 321161847f8eSopenharmony_ci /** 321261847f8eSopenharmony_ci * Common live view notification. 321361847f8eSopenharmony_ci * 321461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 321561847f8eSopenharmony_ci * @atomicservice 321661847f8eSopenharmony_ci * @since 12 321761847f8eSopenharmony_ci */ 321861847f8eSopenharmony_ci NOTIFICATION_CONTENT_LIVE_VIEW, 321961847f8eSopenharmony_ci } 322061847f8eSopenharmony_ci 322161847f8eSopenharmony_ci /** 322261847f8eSopenharmony_ci * Indicates the level of the slot 322361847f8eSopenharmony_ci * 322461847f8eSopenharmony_ci * @enum { number } 322561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 322661847f8eSopenharmony_ci * @since 9 322761847f8eSopenharmony_ci */ 322861847f8eSopenharmony_ci export enum SlotLevel { 322961847f8eSopenharmony_ci /** 323061847f8eSopenharmony_ci * Indicates that the notification function is disabled. 323161847f8eSopenharmony_ci * 323261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 323361847f8eSopenharmony_ci * @since 9 323461847f8eSopenharmony_ci */ 323561847f8eSopenharmony_ci LEVEL_NONE = 0, 323661847f8eSopenharmony_ci 323761847f8eSopenharmony_ci /** 323861847f8eSopenharmony_ci * Indicates that the notification function is enabled but notification 323961847f8eSopenharmony_ci * icons are not displayed in the status bar, with no banner or prompt tone. 324061847f8eSopenharmony_ci * 324161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 324261847f8eSopenharmony_ci * @since 9 324361847f8eSopenharmony_ci */ 324461847f8eSopenharmony_ci LEVEL_MIN = 1, 324561847f8eSopenharmony_ci 324661847f8eSopenharmony_ci /** 324761847f8eSopenharmony_ci * Indicates that the notification function is enabled and notification 324861847f8eSopenharmony_ci * icons are displayed in the status bar, with no banner or prompt tone. 324961847f8eSopenharmony_ci * 325061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 325161847f8eSopenharmony_ci * @since 9 325261847f8eSopenharmony_ci */ 325361847f8eSopenharmony_ci LEVEL_LOW = 2, 325461847f8eSopenharmony_ci 325561847f8eSopenharmony_ci /** 325661847f8eSopenharmony_ci * Indicates that the notification function is enabled and notification 325761847f8eSopenharmony_ci * icons are displayed in the status bar, with no banner but with a prompt tone. 325861847f8eSopenharmony_ci * 325961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 326061847f8eSopenharmony_ci * @since 9 326161847f8eSopenharmony_ci */ 326261847f8eSopenharmony_ci LEVEL_DEFAULT = 3, 326361847f8eSopenharmony_ci 326461847f8eSopenharmony_ci /** 326561847f8eSopenharmony_ci * Indicates that the notification function is enabled and notification 326661847f8eSopenharmony_ci * icons are displayed in the status bar, with a banner and a prompt tone. 326761847f8eSopenharmony_ci * 326861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 326961847f8eSopenharmony_ci * @since 9 327061847f8eSopenharmony_ci */ 327161847f8eSopenharmony_ci LEVEL_HIGH = 4 327261847f8eSopenharmony_ci } 327361847f8eSopenharmony_ci 327461847f8eSopenharmony_ci /** 327561847f8eSopenharmony_ci * The type of the Do Not Disturb. 327661847f8eSopenharmony_ci * 327761847f8eSopenharmony_ci * @enum { number } 327861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 327961847f8eSopenharmony_ci * @systemapi 328061847f8eSopenharmony_ci * @since 9 328161847f8eSopenharmony_ci */ 328261847f8eSopenharmony_ci export enum DoNotDisturbType { 328361847f8eSopenharmony_ci /** 328461847f8eSopenharmony_ci * Non do not disturb type notification 328561847f8eSopenharmony_ci * 328661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 328761847f8eSopenharmony_ci * @systemapi 328861847f8eSopenharmony_ci * @since 9 328961847f8eSopenharmony_ci */ 329061847f8eSopenharmony_ci TYPE_NONE = 0, 329161847f8eSopenharmony_ci 329261847f8eSopenharmony_ci /** 329361847f8eSopenharmony_ci * Execute do not disturb once in the set time period (only watch hours and minutes) 329461847f8eSopenharmony_ci * 329561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 329661847f8eSopenharmony_ci * @systemapi 329761847f8eSopenharmony_ci * @since 9 329861847f8eSopenharmony_ci */ 329961847f8eSopenharmony_ci TYPE_ONCE = 1, 330061847f8eSopenharmony_ci 330161847f8eSopenharmony_ci /** 330261847f8eSopenharmony_ci * Execute do not disturb every day with a set time period (only watch hours and minutes) 330361847f8eSopenharmony_ci * 330461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 330561847f8eSopenharmony_ci * @systemapi 330661847f8eSopenharmony_ci * @since 9 330761847f8eSopenharmony_ci */ 330861847f8eSopenharmony_ci TYPE_DAILY = 2, 330961847f8eSopenharmony_ci 331061847f8eSopenharmony_ci /** 331161847f8eSopenharmony_ci * Execute in the set time period (specify the time, month, day and hour) 331261847f8eSopenharmony_ci * 331361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 331461847f8eSopenharmony_ci * @systemapi 331561847f8eSopenharmony_ci * @since 9 331661847f8eSopenharmony_ci */ 331761847f8eSopenharmony_ci TYPE_CLEARLY = 3 331861847f8eSopenharmony_ci } 331961847f8eSopenharmony_ci 332061847f8eSopenharmony_ci /** 332161847f8eSopenharmony_ci * Describes a DoNotDisturbDate instance. 332261847f8eSopenharmony_ci * 332361847f8eSopenharmony_ci * @typedef DoNotDisturbDate 332461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 332561847f8eSopenharmony_ci * @systemapi 332661847f8eSopenharmony_ci * @since 9 332761847f8eSopenharmony_ci */ 332861847f8eSopenharmony_ci export interface DoNotDisturbDate { 332961847f8eSopenharmony_ci /** 333061847f8eSopenharmony_ci * the type of the Do Not Disturb. 333161847f8eSopenharmony_ci * 333261847f8eSopenharmony_ci * @type { DoNotDisturbType } 333361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 333461847f8eSopenharmony_ci * @systemapi 333561847f8eSopenharmony_ci * @since 9 333661847f8eSopenharmony_ci */ 333761847f8eSopenharmony_ci type: DoNotDisturbType; 333861847f8eSopenharmony_ci 333961847f8eSopenharmony_ci /** 334061847f8eSopenharmony_ci * The start time of the Do Not Disturb. 334161847f8eSopenharmony_ci * 334261847f8eSopenharmony_ci * @type { Date } 334361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 334461847f8eSopenharmony_ci * @systemapi 334561847f8eSopenharmony_ci * @since 9 334661847f8eSopenharmony_ci */ 334761847f8eSopenharmony_ci begin: Date; 334861847f8eSopenharmony_ci 334961847f8eSopenharmony_ci /** 335061847f8eSopenharmony_ci * The end time of the Do Not Disturb. 335161847f8eSopenharmony_ci * 335261847f8eSopenharmony_ci * @type { Date } 335361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 335461847f8eSopenharmony_ci * @systemapi 335561847f8eSopenharmony_ci * @since 9 335661847f8eSopenharmony_ci */ 335761847f8eSopenharmony_ci end: Date; 335861847f8eSopenharmony_ci } 335961847f8eSopenharmony_ci 336061847f8eSopenharmony_ci /** 336161847f8eSopenharmony_ci * Describes a DoNotDisturbProfile instance. 336261847f8eSopenharmony_ci * 336361847f8eSopenharmony_ci * @typedef DoNotDisturbProfile 336461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 336561847f8eSopenharmony_ci * @systemapi 336661847f8eSopenharmony_ci * @since 12 336761847f8eSopenharmony_ci */ 336861847f8eSopenharmony_ci export interface DoNotDisturbProfile { 336961847f8eSopenharmony_ci /** 337061847f8eSopenharmony_ci * The profile id of the Do Not disturb. 337161847f8eSopenharmony_ci * 337261847f8eSopenharmony_ci * @type { number } 337361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 337461847f8eSopenharmony_ci * @systemapi 337561847f8eSopenharmony_ci * @since 12 337661847f8eSopenharmony_ci */ 337761847f8eSopenharmony_ci id: number; 337861847f8eSopenharmony_ci 337961847f8eSopenharmony_ci /** 338061847f8eSopenharmony_ci * The profile name of the Do Not disturb. 338161847f8eSopenharmony_ci * 338261847f8eSopenharmony_ci * @type { string } 338361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 338461847f8eSopenharmony_ci * @systemapi 338561847f8eSopenharmony_ci * @since 12 338661847f8eSopenharmony_ci */ 338761847f8eSopenharmony_ci name: string; 338861847f8eSopenharmony_ci 338961847f8eSopenharmony_ci /** 339061847f8eSopenharmony_ci * The trustlist of application. 339161847f8eSopenharmony_ci * 339261847f8eSopenharmony_ci * @type { ?Array<BundleOption> } 339361847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 339461847f8eSopenharmony_ci * @systemapi 339561847f8eSopenharmony_ci * @since 12 339661847f8eSopenharmony_ci */ 339761847f8eSopenharmony_ci trustlist?: Array<BundleOption>; 339861847f8eSopenharmony_ci } 339961847f8eSopenharmony_ci 340061847f8eSopenharmony_ci /** 340161847f8eSopenharmony_ci * The remind type of the notification. 340261847f8eSopenharmony_ci * 340361847f8eSopenharmony_ci * @enum { number } 340461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 340561847f8eSopenharmony_ci * @systemapi 340661847f8eSopenharmony_ci * @since 9 340761847f8eSopenharmony_ci */ 340861847f8eSopenharmony_ci export enum DeviceRemindType { 340961847f8eSopenharmony_ci /** 341061847f8eSopenharmony_ci * The device is not in use, no reminder 341161847f8eSopenharmony_ci * 341261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 341361847f8eSopenharmony_ci * @systemapi 341461847f8eSopenharmony_ci * @since 9 341561847f8eSopenharmony_ci */ 341661847f8eSopenharmony_ci IDLE_DONOT_REMIND = 0, 341761847f8eSopenharmony_ci 341861847f8eSopenharmony_ci /** 341961847f8eSopenharmony_ci * The device is not in use, remind 342061847f8eSopenharmony_ci * 342161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 342261847f8eSopenharmony_ci * @systemapi 342361847f8eSopenharmony_ci * @since 9 342461847f8eSopenharmony_ci */ 342561847f8eSopenharmony_ci IDLE_REMIND = 1, 342661847f8eSopenharmony_ci 342761847f8eSopenharmony_ci /** 342861847f8eSopenharmony_ci * The device is in use, no reminder 342961847f8eSopenharmony_ci * 343061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 343161847f8eSopenharmony_ci * @systemapi 343261847f8eSopenharmony_ci * @since 9 343361847f8eSopenharmony_ci */ 343461847f8eSopenharmony_ci ACTIVE_DONOT_REMIND = 2, 343561847f8eSopenharmony_ci 343661847f8eSopenharmony_ci /** 343761847f8eSopenharmony_ci * The device is in use, reminder 343861847f8eSopenharmony_ci * 343961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 344061847f8eSopenharmony_ci * @systemapi 344161847f8eSopenharmony_ci * @since 9 344261847f8eSopenharmony_ci */ 344361847f8eSopenharmony_ci ACTIVE_REMIND = 3 344461847f8eSopenharmony_ci } 344561847f8eSopenharmony_ci 344661847f8eSopenharmony_ci /** 344761847f8eSopenharmony_ci * Notification source type 344861847f8eSopenharmony_ci * 344961847f8eSopenharmony_ci * @enum { number } 345061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 345161847f8eSopenharmony_ci * @systemapi 345261847f8eSopenharmony_ci * @since 9 345361847f8eSopenharmony_ci */ 345461847f8eSopenharmony_ci export enum SourceType { 345561847f8eSopenharmony_ci /** 345661847f8eSopenharmony_ci * General notification 345761847f8eSopenharmony_ci * 345861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 345961847f8eSopenharmony_ci * @systemapi 346061847f8eSopenharmony_ci * @since 9 346161847f8eSopenharmony_ci */ 346261847f8eSopenharmony_ci TYPE_NORMAL = 0, 346361847f8eSopenharmony_ci 346461847f8eSopenharmony_ci /** 346561847f8eSopenharmony_ci * Continuous notification 346661847f8eSopenharmony_ci * 346761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 346861847f8eSopenharmony_ci * @systemapi 346961847f8eSopenharmony_ci * @since 9 347061847f8eSopenharmony_ci */ 347161847f8eSopenharmony_ci TYPE_CONTINUOUS = 1, 347261847f8eSopenharmony_ci 347361847f8eSopenharmony_ci /** 347461847f8eSopenharmony_ci * Scheduled notification 347561847f8eSopenharmony_ci * 347661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 347761847f8eSopenharmony_ci * @systemapi 347861847f8eSopenharmony_ci * @since 9 347961847f8eSopenharmony_ci */ 348061847f8eSopenharmony_ci TYPE_TIMER = 2 348161847f8eSopenharmony_ci } 348261847f8eSopenharmony_ci 348361847f8eSopenharmony_ci /** 348461847f8eSopenharmony_ci * Enum for notification control flag status. 348561847f8eSopenharmony_ci * 348661847f8eSopenharmony_ci * @enum { number } 348761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 348861847f8eSopenharmony_ci * @systemapi 348961847f8eSopenharmony_ci * @since 12 349061847f8eSopenharmony_ci */ 349161847f8eSopenharmony_ci export enum NotificationControlFlagStatus { 349261847f8eSopenharmony_ci /** 349361847f8eSopenharmony_ci * Manipulating of the enumeration by bitwise-or operation represents the closing of ringtone. 349461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 349561847f8eSopenharmony_ci * @systemapi 349661847f8eSopenharmony_ci * @since 12 349761847f8eSopenharmony_ci */ 349861847f8eSopenharmony_ci NOTIFICATION_STATUS_CLOSE_SOUND = 1 << 0, 349961847f8eSopenharmony_ci 350061847f8eSopenharmony_ci /** 350161847f8eSopenharmony_ci * Manipulating of the enumeration by bitwise-or operation represents the closing of lock screen. 350261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 350361847f8eSopenharmony_ci * @systemapi 350461847f8eSopenharmony_ci * @since 12 350561847f8eSopenharmony_ci */ 350661847f8eSopenharmony_ci NOTIFICATION_STATUS_CLOSE_LOCKSCREEN = 1 << 1, 350761847f8eSopenharmony_ci 350861847f8eSopenharmony_ci /** 350961847f8eSopenharmony_ci * Manipulating of the enumeration by bitwise-or operation represents the closing of banner. 351061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 351161847f8eSopenharmony_ci * @systemapi 351261847f8eSopenharmony_ci * @since 12 351361847f8eSopenharmony_ci */ 351461847f8eSopenharmony_ci NOTIFICATION_STATUS_CLOSE_BANNER = 1 << 2, 351561847f8eSopenharmony_ci 351661847f8eSopenharmony_ci /** 351761847f8eSopenharmony_ci * Manipulating of the enumeration by bitwise-or operation represents the closing of light screen. 351861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 351961847f8eSopenharmony_ci * @systemapi 352061847f8eSopenharmony_ci * @since 12 352161847f8eSopenharmony_ci */ 352261847f8eSopenharmony_ci NOTIFICATION_STATUS_CLOSE_LIGHT_SCREEN = 1 << 3, 352361847f8eSopenharmony_ci 352461847f8eSopenharmony_ci /** 352561847f8eSopenharmony_ci * Manipulating of the enumeration by bitwise-or operation represents the closing of vibration. 352661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 352761847f8eSopenharmony_ci * @systemapi 352861847f8eSopenharmony_ci * @since 12 352961847f8eSopenharmony_ci */ 353061847f8eSopenharmony_ci NOTIFICATION_STATUS_CLOSE_VIBRATION = 1 << 4, 353161847f8eSopenharmony_ci 353261847f8eSopenharmony_ci /** 353361847f8eSopenharmony_ci * Manipulating of the enumeration by bitwise-or operation represents the closing of status bar icon. 353461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 353561847f8eSopenharmony_ci * @systemapi 353661847f8eSopenharmony_ci * @since 12 353761847f8eSopenharmony_ci */ 353861847f8eSopenharmony_ci NOTIFICATION_STATUS_CLOSE_STATUSBAR_ICON = 1 << 5 353961847f8eSopenharmony_ci } 354061847f8eSopenharmony_ci 354161847f8eSopenharmony_ci /** 354261847f8eSopenharmony_ci * Describes a bundleOption in a notification. 354361847f8eSopenharmony_ci * 354461847f8eSopenharmony_ci * @typedef { _BundleOption } BundleOption 354561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 354661847f8eSopenharmony_ci * @since 9 354761847f8eSopenharmony_ci */ 354861847f8eSopenharmony_ci export type BundleOption = _BundleOption; 354961847f8eSopenharmony_ci 355061847f8eSopenharmony_ci /** 355161847f8eSopenharmony_ci * Describes an action button displayed in a notification. 355261847f8eSopenharmony_ci * 355361847f8eSopenharmony_ci * @typedef { _NotificationActionButton } NotificationActionButton 355461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 355561847f8eSopenharmony_ci * @since 9 355661847f8eSopenharmony_ci */ 355761847f8eSopenharmony_ci export type NotificationActionButton = _NotificationActionButton; 355861847f8eSopenharmony_ci 355961847f8eSopenharmony_ci /** 356061847f8eSopenharmony_ci * Describes a normal text notification. 356161847f8eSopenharmony_ci * 356261847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 356361847f8eSopenharmony_ci * @since 9 356461847f8eSopenharmony_ci */ 356561847f8eSopenharmony_ci /** 356661847f8eSopenharmony_ci * Describes a normal text notification. 356761847f8eSopenharmony_ci * 356861847f8eSopenharmony_ci * @typedef { _NotificationBasicContent } NotificationBasicContent 356961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 357061847f8eSopenharmony_ci * @crossplatform 357161847f8eSopenharmony_ci * @since 12 357261847f8eSopenharmony_ci */ 357361847f8eSopenharmony_ci export type NotificationBasicContent = _NotificationBasicContent; 357461847f8eSopenharmony_ci 357561847f8eSopenharmony_ci /** 357661847f8eSopenharmony_ci * Describes notification types. 357761847f8eSopenharmony_ci * 357861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 357961847f8eSopenharmony_ci * @since 9 358061847f8eSopenharmony_ci */ 358161847f8eSopenharmony_ci /** 358261847f8eSopenharmony_ci * Describes notification types. 358361847f8eSopenharmony_ci * 358461847f8eSopenharmony_ci * @typedef { _NotificationContent } NotificationContent 358561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 358661847f8eSopenharmony_ci * @crossplatform 358761847f8eSopenharmony_ci * @since 12 358861847f8eSopenharmony_ci */ 358961847f8eSopenharmony_ci export type NotificationContent = _NotificationContent; 359061847f8eSopenharmony_ci 359161847f8eSopenharmony_ci /** 359261847f8eSopenharmony_ci * Describes a long text notification. 359361847f8eSopenharmony_ci * 359461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 359561847f8eSopenharmony_ci * @since 9 359661847f8eSopenharmony_ci */ 359761847f8eSopenharmony_ci /** 359861847f8eSopenharmony_ci * Describes a long text notification. 359961847f8eSopenharmony_ci * 360061847f8eSopenharmony_ci * @typedef { _NotificationLongTextContent } NotificationLongTextContent 360161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 360261847f8eSopenharmony_ci * @crossplatform 360361847f8eSopenharmony_ci * @since 12 360461847f8eSopenharmony_ci */ 360561847f8eSopenharmony_ci export type NotificationLongTextContent = _NotificationLongTextContent; 360661847f8eSopenharmony_ci 360761847f8eSopenharmony_ci /** 360861847f8eSopenharmony_ci * Describes a live view notification. 360961847f8eSopenharmony_ci * 361061847f8eSopenharmony_ci * @typedef { _NotificationLiveViewContent } NotificationLiveViewContent 361161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 361261847f8eSopenharmony_ci * @systemapi 361361847f8eSopenharmony_ci * @since 11 361461847f8eSopenharmony_ci */ 361561847f8eSopenharmony_ci export type NotificationLiveViewContent = _NotificationLiveViewContent; 361661847f8eSopenharmony_ci 361761847f8eSopenharmony_ci /** 361861847f8eSopenharmony_ci * Describes a multi-line text notification. 361961847f8eSopenharmony_ci * 362061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 362161847f8eSopenharmony_ci * @since 9 362261847f8eSopenharmony_ci */ 362361847f8eSopenharmony_ci /** 362461847f8eSopenharmony_ci * Describes a multi-line text notification. 362561847f8eSopenharmony_ci * 362661847f8eSopenharmony_ci * @typedef { _NotificationMultiLineContent } NotificationMultiLineContent 362761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 362861847f8eSopenharmony_ci * @crossplatform 362961847f8eSopenharmony_ci * @since 12 363061847f8eSopenharmony_ci */ 363161847f8eSopenharmony_ci export type NotificationMultiLineContent = _NotificationMultiLineContent; 363261847f8eSopenharmony_ci 363361847f8eSopenharmony_ci /** 363461847f8eSopenharmony_ci * Describes a picture-attached notification. 363561847f8eSopenharmony_ci * 363661847f8eSopenharmony_ci * @typedef { _NotificationPictureContent } NotificationPictureContent 363761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 363861847f8eSopenharmony_ci * @since 9 363961847f8eSopenharmony_ci */ 364061847f8eSopenharmony_ci export type NotificationPictureContent = _NotificationPictureContent; 364161847f8eSopenharmony_ci 364261847f8eSopenharmony_ci /** 364361847f8eSopenharmony_ci * Describes a system live view notification. 364461847f8eSopenharmony_ci * 364561847f8eSopenharmony_ci * @typedef { _NotificationSystemLiveViewContent } NotificationSystemLiveViewContent 364661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 364761847f8eSopenharmony_ci * @since 11 364861847f8eSopenharmony_ci */ 364961847f8eSopenharmony_ci export type NotificationSystemLiveViewContent = _NotificationSystemLiveViewContent; 365061847f8eSopenharmony_ci 365161847f8eSopenharmony_ci /** 365261847f8eSopenharmony_ci * Describes a NotificationFlags instance. 365361847f8eSopenharmony_ci * 365461847f8eSopenharmony_ci * @typedef { _NotificationFlags } NotificationFlags 365561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 365661847f8eSopenharmony_ci * @systemapi 365761847f8eSopenharmony_ci * @since 9 365861847f8eSopenharmony_ci */ 365961847f8eSopenharmony_ci export type NotificationFlags = _NotificationFlags; 366061847f8eSopenharmony_ci 366161847f8eSopenharmony_ci /** 366261847f8eSopenharmony_ci * The status of the notification flag. 366361847f8eSopenharmony_ci * 366461847f8eSopenharmony_ci * @typedef { _NotificationFlagStatus } NotificationFlagStatus 366561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 366661847f8eSopenharmony_ci * @systemapi 366761847f8eSopenharmony_ci * @since 9 366861847f8eSopenharmony_ci */ 366961847f8eSopenharmony_ci export type NotificationFlagStatus = _NotificationFlagStatus; 367061847f8eSopenharmony_ci 367161847f8eSopenharmony_ci /** 367261847f8eSopenharmony_ci * Defines a NotificationRequest instance. 367361847f8eSopenharmony_ci * 367461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 367561847f8eSopenharmony_ci * @since 9 367661847f8eSopenharmony_ci */ 367761847f8eSopenharmony_ci /** 367861847f8eSopenharmony_ci * Defines a NotificationRequest instance. 367961847f8eSopenharmony_ci * 368061847f8eSopenharmony_ci * @typedef { _NotificationRequest } NotificationRequest 368161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 368261847f8eSopenharmony_ci * @crossplatform 368361847f8eSopenharmony_ci * @since 12 368461847f8eSopenharmony_ci */ 368561847f8eSopenharmony_ci export type NotificationRequest = _NotificationRequest; 368661847f8eSopenharmony_ci 368761847f8eSopenharmony_ci /** 368861847f8eSopenharmony_ci * Defines a UnifiedGroupInfo instance. 368961847f8eSopenharmony_ci * 369061847f8eSopenharmony_ci * @typedef { _UnifiedGroupInfo } UnifiedGroupInfo 369161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 369261847f8eSopenharmony_ci * @systemapi 369361847f8eSopenharmony_ci * @since 12 369461847f8eSopenharmony_ci */ 369561847f8eSopenharmony_ci export type UnifiedGroupInfo = _UnifiedGroupInfo; 369661847f8eSopenharmony_ci 369761847f8eSopenharmony_ci /** 369861847f8eSopenharmony_ci * Defines a NotificationFilter instance. 369961847f8eSopenharmony_ci * 370061847f8eSopenharmony_ci * @typedef { _NotificationFilter } NotificationFilter 370161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 370261847f8eSopenharmony_ci * @systemapi 370361847f8eSopenharmony_ci * @since 11 370461847f8eSopenharmony_ci */ 370561847f8eSopenharmony_ci export type NotificationFilter = _NotificationFilter; 370661847f8eSopenharmony_ci 370761847f8eSopenharmony_ci /** 370861847f8eSopenharmony_ci * Defines a NotificationCheckRequest instance. 370961847f8eSopenharmony_ci * 371061847f8eSopenharmony_ci * @typedef { _NotificationCheckRequest } NotificationCheckRequest 371161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 371261847f8eSopenharmony_ci * @systemapi 371361847f8eSopenharmony_ci * @since 11 371461847f8eSopenharmony_ci */ 371561847f8eSopenharmony_ci export type NotificationCheckRequest = _NotificationCheckRequest; 371661847f8eSopenharmony_ci 371761847f8eSopenharmony_ci /** 371861847f8eSopenharmony_ci * Describes distributed options. 371961847f8eSopenharmony_ci * 372061847f8eSopenharmony_ci * @typedef { _DistributedOptions } DistributedOptions 372161847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 372261847f8eSopenharmony_ci * @since 9 372361847f8eSopenharmony_ci */ 372461847f8eSopenharmony_ci export type DistributedOptions = _DistributedOptions; 372561847f8eSopenharmony_ci 372661847f8eSopenharmony_ci /** 372761847f8eSopenharmony_ci * Describes a NotificationSlot instance. 372861847f8eSopenharmony_ci * 372961847f8eSopenharmony_ci * @typedef { _NotificationSlot } NotificationSlot 373061847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 373161847f8eSopenharmony_ci * @since 9 373261847f8eSopenharmony_ci */ 373361847f8eSopenharmony_ci export type NotificationSlot = _NotificationSlot; 373461847f8eSopenharmony_ci 373561847f8eSopenharmony_ci /** 373661847f8eSopenharmony_ci * Describes live view notification option type. 373761847f8eSopenharmony_ci * 373861847f8eSopenharmony_ci * @typedef { _LiveViewStatus } LiveViewStatus 373961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 374061847f8eSopenharmony_ci * @systemapi 374161847f8eSopenharmony_ci * @since 11 374261847f8eSopenharmony_ci */ 374361847f8eSopenharmony_ci export type LiveViewStatus = _LiveViewStatus; 374461847f8eSopenharmony_ci 374561847f8eSopenharmony_ci /** 374661847f8eSopenharmony_ci * Provides sorting information about an active notification. 374761847f8eSopenharmony_ci * 374861847f8eSopenharmony_ci * @typedef { _NotificationSorting } NotificationSorting 374961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 375061847f8eSopenharmony_ci * @systemapi 375161847f8eSopenharmony_ci * @since 9 375261847f8eSopenharmony_ci */ 375361847f8eSopenharmony_ci export type NotificationSorting = _NotificationSorting; 375461847f8eSopenharmony_ci 375561847f8eSopenharmony_ci /** 375661847f8eSopenharmony_ci * Describes a NotificationTemplate instance. 375761847f8eSopenharmony_ci * 375861847f8eSopenharmony_ci * @typedef { _NotificationTemplate } NotificationTemplate 375961847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 376061847f8eSopenharmony_ci * @since 9 376161847f8eSopenharmony_ci */ 376261847f8eSopenharmony_ci export type NotificationTemplate = _NotificationTemplate; 376361847f8eSopenharmony_ci 376461847f8eSopenharmony_ci /** 376561847f8eSopenharmony_ci * Describes a NotificationUserInput instance. 376661847f8eSopenharmony_ci * 376761847f8eSopenharmony_ci * @typedef { _NotificationUserInput } NotificationUserInput 376861847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 376961847f8eSopenharmony_ci * @since 9 377061847f8eSopenharmony_ci */ 377161847f8eSopenharmony_ci export type NotificationUserInput = _NotificationUserInput; 377261847f8eSopenharmony_ci 377361847f8eSopenharmony_ci /** 377461847f8eSopenharmony_ci * Describes a system live view capsule type. 377561847f8eSopenharmony_ci * 377661847f8eSopenharmony_ci * @typedef { _NotificationCapsule } NotificationCapsule 377761847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 377861847f8eSopenharmony_ci * @since 11 377961847f8eSopenharmony_ci */ 378061847f8eSopenharmony_ci export type NotificationCapsule = _NotificationCapsule; 378161847f8eSopenharmony_ci 378261847f8eSopenharmony_ci /** 378361847f8eSopenharmony_ci * Describes a system live view button type. 378461847f8eSopenharmony_ci * 378561847f8eSopenharmony_ci * @typedef { _NotificationButton } NotificationButton 378661847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 378761847f8eSopenharmony_ci * @since 11 378861847f8eSopenharmony_ci */ 378961847f8eSopenharmony_ci export type NotificationButton = _NotificationButton; 379061847f8eSopenharmony_ci 379161847f8eSopenharmony_ci /** 379261847f8eSopenharmony_ci * Describes a system live view time type. 379361847f8eSopenharmony_ci * 379461847f8eSopenharmony_ci * @typedef { _NotificationTime } NotificationTime 379561847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 379661847f8eSopenharmony_ci * @since 11 379761847f8eSopenharmony_ci */ 379861847f8eSopenharmony_ci export type NotificationTime = _NotificationTime; 379961847f8eSopenharmony_ci 380061847f8eSopenharmony_ci /** 380161847f8eSopenharmony_ci * Describes a system live view progress type. 380261847f8eSopenharmony_ci * 380361847f8eSopenharmony_ci * @typedef { _NotificationProgress } NotificationProgress 380461847f8eSopenharmony_ci * @syscap SystemCapability.Notification.Notification 380561847f8eSopenharmony_ci * @since 11 380661847f8eSopenharmony_ci */ 380761847f8eSopenharmony_ci export type NotificationProgress = _NotificationProgress; 380861847f8eSopenharmony_ci} 380961847f8eSopenharmony_ci 381061847f8eSopenharmony_ciexport default notificationManager; 3811