From 85390087174580dbf1484f45a4a58bcfb4ceee50 Mon Sep 17 00:00:00 2001 From: zero-cyc Date: Thu, 10 Feb 2022 20:26:52 +0800 Subject: [PATCH] chenlien@huawei.com Signed-off-by: zero-cyc Change-Id: I180283ca6ea9370f8ea20d85271c761d7146b6ea --- interfaces/kits/js/@ohos.notification.d.ts | 31 +++++++++++-------- .../notificationActionButton.d.ts | 3 +- .../js/notification/notificationContent.d.ts | 15 +++------ .../kits/js/notification/notificationFlags.ts | 3 +- .../notification/notificationMessageUser.d.ts | 3 +- .../js/notification/notificationRequest.d.ts | 3 +- .../js/notification/notificationSlot.d.ts | 3 +- .../js/notification/notificationSorting.d.ts | 3 +- .../notification/notificationSortingMap.d.ts | 3 +- .../notificationSubscribeInfo.d.ts | 3 +- .../notification/notificationSubscriber.d.ts | 6 ++-- .../js/notification/notificationTemplate.d.ts | 3 +- .../notification/notificationUserInput.d.ts | 3 +- 13 files changed, 35 insertions(+), 47 deletions(-) diff --git a/interfaces/kits/js/@ohos.notification.d.ts b/interfaces/kits/js/@ohos.notification.d.ts index edbbd33d7..41b9500ee 100644 --- a/interfaces/kits/js/@ohos.notification.d.ts +++ b/interfaces/kits/js/@ohos.notification.d.ts @@ -32,8 +32,7 @@ import { NotificationRequest } from './notification/notificationRequest'; * * @name notification * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @import import notification from '@ohos.notification'; * @permission N/A */ @@ -44,7 +43,8 @@ declare namespace notification { *

If a notification with the same ID has been published by the current application and has not been deleted, * this method will update the notification. * - * @param Publishes a notification. + * @param request notification request + * @param callback callback function */ function publish(request: NotificationRequest, callback: AsyncCallback): void; function publish(request: NotificationRequest): Promise; @@ -52,15 +52,17 @@ declare namespace notification { /** * Cancels a notification with the specified ID. * - * @param ID of the notification to cancel, which must be unique in the application. + * @param id of the notification to cancel, which must be unique in the application. + * @param callback callback function */ function cancel(id: number, callback: AsyncCallback): void; /** * Cancels a notification with the specified label and ID. * - * @param ID of the notification to cancel, which must be unique in the application. - * @param Label of the notification to cancel. + * @param id ID of the notification to cancel, which must be unique in the application. + * @param label Label of the notification to cancel. + * @param callback callback function */ function cancel(id: number, label: string, callback: AsyncCallback): void; function cancel(id: number, label?: string): Promise; @@ -78,6 +80,7 @@ declare namespace notification { * This parameter must be specified. * * @systemapi Hide this for inner system use. + * @param callback callback function */ function addSlot(slot: NotificationSlot, callback: AsyncCallback): void; @@ -94,7 +97,8 @@ declare namespace notification { /** * Adds a slot type. * - * @param Slot type to add. + * @param type Slot type to add. + * @param callback callback function */ function addSlot(type: SlotType, callback: AsyncCallback): void; function addSlot(type: SlotType): Promise; @@ -104,7 +108,7 @@ declare namespace notification { * * @param slots Indicates the notification slots to be created, which is set by {@link NotificationSlot}. * This parameter must be specified. - * + * @param callback callback function * @systemapi Hide this for inner system use. */ function addSlots(slots: Array, callback: AsyncCallback): void; @@ -122,8 +126,8 @@ declare namespace notification { /** * Obtains a notification slot of the specified slot type. * - * @param Type of the notification slot to obtain. - * + * @param slotType Type of the notification slot to obtain. + * @param callback callback function * @return Returns the created {@link NotificationSlot}. */ function getSlot(slotType: SlotType, callback: AsyncCallback): void; @@ -140,7 +144,8 @@ declare namespace notification { /** * Removes a NotificationSlot of the specified SlotType created by the current application. * - * @param Type of the NotificationSlot to remove. + * @param slotType of the NotificationSlot to remove. + * @param callback callback function */ function removeSlot(slotType: SlotType, callback: AsyncCallback): void; function removeSlot(slotType: SlotType): Promise; @@ -186,8 +191,7 @@ declare namespace notification { * * @name ContentType * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A */ export enum ContentType { @@ -548,6 +552,7 @@ declare namespace notification { * * @since 8 * @param templateName Name of template to be Obtained + * @param callback callback function */ function isSupportTemplate(templateName: string, callback: AsyncCallback): void; function isSupportTemplate(templateName: string): Promise; diff --git a/interfaces/kits/js/notification/notificationActionButton.d.ts b/interfaces/kits/js/notification/notificationActionButton.d.ts index 9428cc4f0..cd67a4452 100644 --- a/interfaces/kits/js/notification/notificationActionButton.d.ts +++ b/interfaces/kits/js/notification/notificationActionButton.d.ts @@ -20,9 +20,8 @@ import { WantAgent } from '../@ohos.wantAgent'; * Describes an action button displayed in a notification. * @name NotificationActionButton * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission N/A - * @sysCap SystemCapability.Notification.ANS + * @syscap SystemCapability.Notification.Notification */ export interface NotificationActionButton { /** diff --git a/interfaces/kits/js/notification/notificationContent.d.ts b/interfaces/kits/js/notification/notificationContent.d.ts index 037300c24..c31d1d1d7 100644 --- a/interfaces/kits/js/notification/notificationContent.d.ts +++ b/interfaces/kits/js/notification/notificationContent.d.ts @@ -22,8 +22,7 @@ import { MessageUser } from './notificationMessageUser'; * * @name NotificationBasicContent * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A */ export interface NotificationBasicContent { @@ -48,8 +47,7 @@ export interface NotificationBasicContent { * * @name NotificationLongTextContent * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A */ export interface NotificationLongTextContent extends NotificationBasicContent { @@ -74,8 +72,7 @@ export interface NotificationLongTextContent extends NotificationBasicContent { * * @name NotificationMultiLineContent * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A */ export interface NotificationMultiLineContent extends NotificationBasicContent { @@ -100,8 +97,7 @@ export interface NotificationMultiLineContent extends NotificationBasicContent { * * @name NotificationPictureContent * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A */ export interface NotificationPictureContent extends NotificationBasicContent { @@ -188,8 +184,7 @@ export interface ConversationalMessage { * * @name NotificationContent * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A */ export interface NotificationContent { diff --git a/interfaces/kits/js/notification/notificationFlags.ts b/interfaces/kits/js/notification/notificationFlags.ts index 58c4a6831..e19f9593d 100644 --- a/interfaces/kits/js/notification/notificationFlags.ts +++ b/interfaces/kits/js/notification/notificationFlags.ts @@ -18,9 +18,8 @@ * * @name NotificationFlags * @since 8 - * @devices phone, tablet, tv, wearable, car * @permission N/A - * @sysCap SystemCapability.Notification.ANS + * @syscap SystemCapability.Notification.Notification */ export interface NotificationFlags { /** diff --git a/interfaces/kits/js/notification/notificationMessageUser.d.ts b/interfaces/kits/js/notification/notificationMessageUser.d.ts index 40d01bde1..97a9c8171 100644 --- a/interfaces/kits/js/notification/notificationMessageUser.d.ts +++ b/interfaces/kits/js/notification/notificationMessageUser.d.ts @@ -20,9 +20,8 @@ import image from '../@ohos.multimedia.image'; * * @name MessageUser * @since 8 - * @devices phone, tablet, tv, wearable, car * @permission N/A - * @sysCap SystemCapability.Notification.ANS + * @syscap SystemCapability.Notification.Notification */ export interface MessageUser { /** diff --git a/interfaces/kits/js/notification/notificationRequest.d.ts b/interfaces/kits/js/notification/notificationRequest.d.ts index 971ecb0c7..f53673de2 100644 --- a/interfaces/kits/js/notification/notificationRequest.d.ts +++ b/interfaces/kits/js/notification/notificationRequest.d.ts @@ -26,8 +26,7 @@ import { NotificationFlags } from './notificationFlags'; * * @name NotificationRequest * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A */ export interface NotificationRequest { diff --git a/interfaces/kits/js/notification/notificationSlot.d.ts b/interfaces/kits/js/notification/notificationSlot.d.ts index 82ff360f7..a41d522ee 100644 --- a/interfaces/kits/js/notification/notificationSlot.d.ts +++ b/interfaces/kits/js/notification/notificationSlot.d.ts @@ -20,9 +20,8 @@ import notification from '../@ohos.notification'; * * @name NotificationSlot * @since 7 - * @devices phone, tablet, tv, wearable, car * @permission N/A - * @sysCap SystemCapability.Notification.ANS + * @syscap SystemCapability.Notification.Notification */ export interface NotificationSlot { /** diff --git a/interfaces/kits/js/notification/notificationSorting.d.ts b/interfaces/kits/js/notification/notificationSorting.d.ts index a4d917145..315555509 100644 --- a/interfaces/kits/js/notification/notificationSorting.d.ts +++ b/interfaces/kits/js/notification/notificationSorting.d.ts @@ -19,8 +19,7 @@ import { NotificationSlot } from './notificationSlot'; * Provides sorting information about an active notification. * * @name NotificationSorting - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A * @systemapi Hide this for inner system use. * @since 7 diff --git a/interfaces/kits/js/notification/notificationSortingMap.d.ts b/interfaces/kits/js/notification/notificationSortingMap.d.ts index 2b2a73b4e..1b62fa6a4 100644 --- a/interfaces/kits/js/notification/notificationSortingMap.d.ts +++ b/interfaces/kits/js/notification/notificationSortingMap.d.ts @@ -20,8 +20,7 @@ import { NotificationSorting } from './notificationSorting'; * * @name NotificationSortingMap * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A * @systemapi Hide this for inner system use. */ diff --git a/interfaces/kits/js/notification/notificationSubscribeInfo.d.ts b/interfaces/kits/js/notification/notificationSubscribeInfo.d.ts index d7ee89bd9..6886554c5 100644 --- a/interfaces/kits/js/notification/notificationSubscribeInfo.d.ts +++ b/interfaces/kits/js/notification/notificationSubscribeInfo.d.ts @@ -18,8 +18,7 @@ * * @name NotificationSubscribeInfo * @since 7 - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A * @systemapi Hide this for inner system use. */ diff --git a/interfaces/kits/js/notification/notificationSubscriber.d.ts b/interfaces/kits/js/notification/notificationSubscriber.d.ts index 3ae878775..2ab26d469 100644 --- a/interfaces/kits/js/notification/notificationSubscriber.d.ts +++ b/interfaces/kits/js/notification/notificationSubscriber.d.ts @@ -22,8 +22,7 @@ import notification from '../@ohos.notification'; * a notification is canceled. * * @name NotificationSubscriber - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A * @systemapi Hide this for inner system use. * @since 7 @@ -49,8 +48,7 @@ export interface NotificationSubscriber { * a notification is canceled. * * @name SubscribeCallbackData - * @sysCap SystemCapability.Notification.ANS - * @devices phone, tablet, tv, wearable, car + * @syscap SystemCapability.Notification.Notification * @permission N/A * @systemapi Hide this for inner system use. * @since 7 diff --git a/interfaces/kits/js/notification/notificationTemplate.d.ts b/interfaces/kits/js/notification/notificationTemplate.d.ts index d131ed5cb..db281d66c 100644 --- a/interfaces/kits/js/notification/notificationTemplate.d.ts +++ b/interfaces/kits/js/notification/notificationTemplate.d.ts @@ -18,9 +18,8 @@ * * @name NotificationTemplate * @since 8 - * @devices phone, tablet, tv, wearable, car * @permission N/A - * @sysCap SystemCapability.Notification.ANS + * @syscap SystemCapability.Notification.Notification */ export interface NotificationTemplate { /** diff --git a/interfaces/kits/js/notification/notificationUserInput.d.ts b/interfaces/kits/js/notification/notificationUserInput.d.ts index 389d1c43c..fdb67ccd9 100644 --- a/interfaces/kits/js/notification/notificationUserInput.d.ts +++ b/interfaces/kits/js/notification/notificationUserInput.d.ts @@ -18,9 +18,8 @@ * * @name NotificationUserInput * @since 8 - * @devices phone, tablet, tv, wearable, car * @permission N/A - * @sysCap SystemCapability.Notification.ANS + * @syscap SystemCapability.Notification.Notification */ export interface NotificationUserInput { /** -- Gitee