新增批量删除接口

Signed-off-by: XKK <huyingsong@huawei.com>
This commit is contained in:
XKK 2023-06-13 09:07:33 +08:00
parent 85d5b97f5f
commit a911672bd1

View File

@ -253,6 +253,26 @@ declare namespace notificationSubscribe {
*/
function remove(hashCode: string, reason: RemoveReason, callback: AsyncCallback<void>): void;
/**
* Remove notifications.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { Array<String> } hashCodes - The hashCode array.
* @param { RemoveReason } reason - The remove reason.
* @param { AsyncCallback<void> } callback - The callback of remove.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
*/
function remove(hashCodes: Array<String>, reason: RemoveReason, callback: AsyncCallback<void>): void;
/**
* Remove notification.
*
@ -273,6 +293,25 @@ declare namespace notificationSubscribe {
*/
function remove(hashCode: string, reason: RemoveReason): Promise<void>;
/**
* Remove notifications.
*
* @permission ohos.permission.NOTIFICATION_CONTROLLER
* @param { Array<String> } hashCodes - The hashCode array.
* @param { RemoveReason } reason - The remove reason.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - Not system application to call the interface.
* @throws { BusinessError } 401 - The parameter check failed.
* @throws { BusinessError } 1600001 - Internal error.
* @throws { BusinessError } 1600002 - Marshalling or unmarshalling error.
* @throws { BusinessError } 1600003 - Failed to connect service.
* @syscap SystemCapability.Notification.Notification
* @systemapi
* @since 10
*/
function remove(hashCodes: Array<String>, reason: RemoveReason): Promise<void>;
/**
* RemoveAll all notifications.
*