From aa532a066751ca8c9339137bd6682f183ce60994 Mon Sep 17 00:00:00 2001 From: fangJinliang1 Date: Thu, 17 Nov 2022 16:44:10 +0800 Subject: [PATCH] add interface Signed-off-by: fangJinliang1 Change-Id: Id7aa2ab22daab57cbd2988ab8672f7e30e9b86ae Signed-off-by: fangJinliang1 --- api/@ohos.notificationManager.d.ts | 30 ------------------- api/@ohos.notificationSubscribe.d.ts | 44 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 30 deletions(-) diff --git a/api/@ohos.notificationManager.d.ts b/api/@ohos.notificationManager.d.ts index e35bfb4fcd..6f285ae0bf 100644 --- a/api/@ohos.notificationManager.d.ts +++ b/api/@ohos.notificationManager.d.ts @@ -1157,17 +1157,6 @@ declare namespace notificationManager { uid?: number; } - /** - * Describes a NotificationKey, which can be used to identify a notification. - * @typedef NotificationKey - * @syscap SystemCapability.Notification.Notification - * @since 9 - */ - export interface NotificationKey { - id: number; - label?: string; - } - /** * The type of the Do Not Disturb. * @enum { number } @@ -1277,25 +1266,6 @@ declare namespace notificationManager { TYPE_TIMER = 2, } - /** - * Reason for remove a notification - * @enum { number } - * @syscap SystemCapability.Notification.Notification - * @systemapi - * @since 9 - */ - export enum RemoveReason { - /** - * Notification clicked notification on the status bar - */ - CLICK_REASON_REMOVE = 1, - - /** - * User dismissal notification on the status bar - */ - CANCEL_REASON_REMOVE = 2, - } - /** * Describes an action button displayed in a notification. * @syscap SystemCapability.Notification.Notification diff --git a/api/@ohos.notificationSubscribe.d.ts b/api/@ohos.notificationSubscribe.d.ts index a97f53a9b4..0d530853c1 100644 --- a/api/@ohos.notificationSubscribe.d.ts +++ b/api/@ohos.notificationSubscribe.d.ts @@ -22,11 +22,55 @@ import { EnabledNotificationCallbackData as _EnabledNotificationCallbackData } f /** * @name notificationSubscribe * @since 9 + * @systemapi * @syscap SystemCapability.Notification.Notification * @import import notificationSubscribe from '@ohos.notification.subscribe'; * @permission N/A */ declare namespace notificationSubscribe { + /** + * Describes a BundleOption. + * @typedef BundleOption + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 9 + */ + export interface BundleOption { + bundle: string; + uid?: number; + } + + /** + * Describes a NotificationKey, which can be used to identify a notification. + * @typedef NotificationKey + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 9 + */ + export interface NotificationKey { + id: number; + label?: string; + } + + /** + * Reason for remove a notification + * @enum { number } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 9 + */ + export enum RemoveReason { + /** + * Notification clicked notification on the status bar + */ + CLICK_REASON_REMOVE = 1, + + /** + * User dismissal notification on the status bar + */ + CANCEL_REASON_REMOVE = 2, + } + /** * Subscribe to notifications. * @permission ohos.permission.NOTIFICATION_CONTROLLER -- Gitee