diff --git a/api/@ohos.notificationManager.d.ts b/api/@ohos.notificationManager.d.ts index 69ab2bbeb64e6cea3e26677ee86cb8fcfd87b0a7..8825a107cf44ab74d1a764df7a61066663c7c6fd 100644 --- a/api/@ohos.notificationManager.d.ts +++ b/api/@ohos.notificationManager.d.ts @@ -783,7 +783,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}. @@ -803,7 +803,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}. @@ -3531,7 +3531,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. @@ -3910,40 +3911,40 @@ declare namespace notificationManager { function getDoNotDisturbProfile(id: number): Promise; /** - * Set target device status. + * Disabling notifications based on the application list. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { string } deviceType - The device. - * @param { number } status - The device status. + * @param { boolean } disabled - The switch of disableNotification. + * @param { Array } bundleList - The bundles of disableNotification. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. + * @throws { BusinessError } 1600001 - Internal error. + * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @syscap SystemCapability.Notification.Notification * @systemapi * @since 18 */ - function setTargetDeviceStatus(deviceType: string, status: number): Promise; + function disableNotificationFeature(disabled:boolean, bundleList: Array): Promise; /** - * Disabling notifications based on the application list. + * Set target device status. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { boolean } disabled - The switch of disableNotification. - * @param { Array } bundleList - The bundles of disableNotification. + * @param { string } deviceType - The device. + * @param { number } status - The device status. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. - * @throws { BusinessError } 1600001 - Internal error. - * @throws { BusinessError } 1600002 - Marshalling or unmarshalling error. * @syscap SystemCapability.Notification.Notification * @systemapi * @since 18 */ - function disableNotificationFeature(disabled:boolean, bundleList: Array): Promise; + function setTargetDeviceStatus(deviceType: string, status: number): Promise; /** * Set notification slot synchronization switch. @@ -3960,7 +3961,7 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 18 - */ + */ function setDistributedEnabledBySlot(slot: SlotType, deviceType: string, enabled: boolean): Promise; /** @@ -3977,7 +3978,7 @@ declare namespace notificationManager { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 18 - */ + */ function isDistributedEnabledBySlot(slot: SlotType, deviceType: string): Promise; /** diff --git a/api/notification/notificationContent.d.ts b/api/notification/notificationContent.d.ts index 469caf05052b242c56c17576063a2ccdc85318d6..3e5d6329bad8ab3a0fbf668aa2f6f87354ee0353 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 1b23a086a4ddbb41506ca3a4938a2d01f893c425..44c1c15cfbc26e2c8ad21f0c74a7ad58289ff6c4 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. *