From b87f8e9eb6abecf3dc4439299ce6241b4538293d Mon Sep 17 00:00:00 2001 From: heguokai Date: Thu, 19 Jun 2025 15:27:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: heguokai --- api/@ohos.notificationManager.d.ts | 9 ++++++--- api/notification/notificationContent.d.ts | 8 ++++---- api/notification/notificationSubscribeInfo.d.ts | 12 ++++++++++++ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/api/@ohos.notificationManager.d.ts b/api/@ohos.notificationManager.d.ts index ee9e5e9c83..8725f50917 100644 --- a/api/@ohos.notificationManager.d.ts +++ b/api/@ohos.notificationManager.d.ts @@ -793,7 +793,7 @@ declare namespace notificationManager { function addSlot(type: SlotType): Promise; /** - * Creates notification slots. + * Creates a notification slot. * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { Array } slots - Indicates the notification slots to be created, which is set by {@link NotificationSlot}. @@ -814,7 +814,7 @@ declare namespace notificationManager { function addSlots(slots: Array, callback: AsyncCallback): void; /** - * Creates notification slots. + * Creates a notification slot. * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { Array } slots - Indicates the notification slots to be created, which is set by {@link NotificationSlot}. @@ -3600,7 +3600,8 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER * @param { 'checkNotification' } type - Type of the callback to listen for. - * @param { function } [callback] - callback - The callback of check notifications. + * @param { function } [callback] - callback - The callback + * of check notifications. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. @@ -4034,6 +4035,7 @@ declare namespace notificationManager { *
2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.Notification * @systemapi + * @since 18 * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ @@ -4052,6 +4054,7 @@ declare namespace notificationManager { *
2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.Notification * @systemapi + * @since 18 * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ diff --git a/api/notification/notificationContent.d.ts b/api/notification/notificationContent.d.ts index 469caf0505..3e5d6329ba 100644 --- a/api/notification/notificationContent.d.ts +++ b/api/notification/notificationContent.d.ts @@ -376,14 +376,14 @@ export interface NotificationMultiLineContent extends NotificationBasicContent { briefText: string; /** - * Long title of the multi-line text notification. + * Brief text of the multi-line text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification * @since 7 */ /** - * Long title of the multi-line text notification. + * Brief text of the multi-line text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification @@ -423,7 +423,7 @@ export interface NotificationMultiLineContent extends NotificationBasicContent { */ export interface NotificationPictureContent extends NotificationBasicContent { /** - * Brief text of the multi-line text notification. + * Multi-line content of the multi-line text notification. * * @type { string } * @syscap SystemCapability.Notification.Notification @@ -723,7 +723,7 @@ export interface NotificationTime { initialTime?: number; /** - * + * * Count down the time. * * @type { ?boolean } diff --git a/api/notification/notificationSubscribeInfo.d.ts b/api/notification/notificationSubscribeInfo.d.ts index 1b23a086a4..44c1c15cfb 100644 --- a/api/notification/notificationSubscribeInfo.d.ts +++ b/api/notification/notificationSubscribeInfo.d.ts @@ -18,6 +18,8 @@ * @kit NotificationKit */ +import type notificationManager from '../@ohos.notificationManager'; + /** * Sets filter criteria of publishers for subscribing to desired notifications. * @@ -61,6 +63,16 @@ export interface NotificationSubscribeInfo { */ deviceType?: string; + /** + * Specifies the scope of notification slots for subscription. + * + * @type { ?Array } + * @syscap SystemCapability.Notification.Notification + * @systemapi + * @since 18 + */ + slotTypes?: Array; + /** * Filtered notification type range. * -- Gitee