From 5471c9fdf60003431f1e2c58625d622495eea5d7 Mon Sep 17 00:00:00 2001 From: xuchenghua09 Date: Thu, 30 Dec 2021 01:14:38 +0800 Subject: [PATCH 1/3] Update d.ts Signed-off-by: xuchenghua09 --- api/@ohos.notification.d.ts | 47 +------------------- api/@ohos.wantAgent.d.ts | 27 +---------- api/notification/notificationSubscriber.d.ts | 7 --- 3 files changed, 2 insertions(+), 79 deletions(-) diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index 661c8d46d9..2f0a6c2b4d 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -497,8 +497,6 @@ declare namespace notification { /** * Cancel the notification of a specified group for this application. - * - * @since 8 */ function cancelGroup(groupName: string, callback: AsyncCallback): void; function cancelGroup(groupName: string): Promise; @@ -506,7 +504,6 @@ declare namespace notification { /** * Delete the notification of a specified group for this application. * - * @since 8 * @systemapi Hide this for inner system use. * @permission ohos.permission.NOTIFICATION_CONTROLLER */ @@ -516,7 +513,6 @@ declare namespace notification { /** * Set the Do Not Disturb date. * - * @since 8 * @systemapi Hide this for inner system use. * @permission ohos.permission.NOTIFICATION_CONTROLLER */ @@ -526,7 +522,6 @@ declare namespace notification { /** * Obtains the Do Not Disturb date. * - * @since 8 * @systemapi Hide this for inner system use. * @permission ohos.permission.NOTIFICATION_CONTROLLER */ @@ -536,7 +531,6 @@ declare namespace notification { /** * Obtains whether to support the Do Not Disturb mode. * - * @since 8 * @systemapi Hide this for inner system use. * @permission ohos.permission.NOTIFICATION_CONTROLLER */ @@ -559,44 +553,12 @@ declare namespace notification { label?: string; } - /** - * DisturbMode - * - * @systemapi Hide this for inner system use. - */ - export enum DoNotDisturbMode { - ALLOW_UNKNOWN, - - /** - * Indicates that all notifications are allowed to interrupt the user in Do Not Disturb mode. - */ - ALLOW_ALL, - - /** - * Indicates that only notifications meeting the specified priority criteria are allowed to interrupt - * the user in Do Not Disturb mode. - */ - ALLOW_PRIORITY, - - /** - * Indicates that no notifications are allowed to interrupt the user in Do Not Disturb mode. - */ - ALLOW_NONE, - - /** - * Indicates that only notifications of the {@link NotificationRequest#CLASSIFICATION_ALARM} category - * are allowed to interrupt the user in Do Not Disturb mode. - */ - ALLOW_ALARMS - } - /** * The type of the Do Not Disturb. * - * @since 8 * @systemapi Hide this for inner system use. */ - export enum DoNotDisturbType { + export enum DoNotDisturbType { /** * Non do not disturb type notification */ @@ -626,22 +588,16 @@ declare namespace notification { export interface DoNotDisturbDate { /** * the type of the Do Not Disturb. - * - * @since 8 */ type: DoNotDisturbType; /** * the start time of the Do Not Disturb. - * - * @since 8 */ begin: Date; /** * the end time of the Do Not Disturb. - * - * @since 8 */ end: Date; } @@ -649,7 +605,6 @@ declare namespace notification { /** * Notification source type * - * @since 8 * @systemapi Hide this for inner system use. */ export enum SourceType { diff --git a/api/@ohos.wantAgent.d.ts b/api/@ohos.wantAgent.d.ts index 17dd1c8aa2..e5de044ce7 100644 --- a/api/@ohos.wantAgent.d.ts +++ b/api/@ohos.wantAgent.d.ts @@ -132,32 +132,7 @@ declare namespace wantAgent { /** * Indicates that the created WantAgent should be immutable. */ - CONSTANT_FLAG, - - /** - * Indicates that the current value of element can be replaced when the WantAgent is triggered. - */ - REPLACE_ELEMENT, - - /** - * Indicates that the current value of action can be replaced when the WantAgent is triggered. - */ - REPLACE_ACTION, - - /** - * Indicates that the current value of uri can be replaced when the WantAgent is triggered. - */ - REPLACE_URI, - - /** - * Indicates that the current value of entities can be replaced when the WantAgent is triggered. - */ - REPLACE_ENTITIES, - - /** - * Indicates that the current value of packageName can be replaced when the WantAgent is triggered. - */ - REPLACE_BUNDLE + CONSTANT_FLAG } /** diff --git a/api/notification/notificationSubscriber.d.ts b/api/notification/notificationSubscriber.d.ts index d8e2277bc7..da9d9162bc 100644 --- a/api/notification/notificationSubscriber.d.ts +++ b/api/notification/notificationSubscriber.d.ts @@ -35,13 +35,6 @@ export interface NotificationSubscriber { onConnect?:() => void; onDisconnect?:() => void; onDestroy?:() => void; - onDisturbModeChange?:(mode: notification.DoNotDisturbMode) => void; - - /** - * Callback when the Do Not Disturb setting changed. - * - * @since 8 - */ onDoNotDisturbDateChange?:(mode: notification.DoNotDisturbDate) => void; } -- Gitee From 8c3438d46b2ccb53d254fff8e7ba75d15d8ee068 Mon Sep 17 00:00:00 2001 From: xuchenghua09 Date: Thu, 30 Dec 2021 01:35:25 +0800 Subject: [PATCH 2/3] Update d.ts Signed-off-by: xuchenghua09 --- api/@ohos.notification.d.ts | 23 ++++++++++++++++++++ api/notification/notificationSubscriber.d.ts | 6 +++++ 2 files changed, 29 insertions(+) diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index 2f0a6c2b4d..d16156ee13 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -497,6 +497,8 @@ declare namespace notification { /** * Cancel the notification of a specified group for this application. + * + * @since 8 */ function cancelGroup(groupName: string, callback: AsyncCallback): void; function cancelGroup(groupName: string): Promise; @@ -504,6 +506,7 @@ declare namespace notification { /** * Delete the notification of a specified group for this application. * + * @since 8 * @systemapi Hide this for inner system use. * @permission ohos.permission.NOTIFICATION_CONTROLLER */ @@ -513,6 +516,7 @@ declare namespace notification { /** * Set the Do Not Disturb date. * + * @since 8 * @systemapi Hide this for inner system use. * @permission ohos.permission.NOTIFICATION_CONTROLLER */ @@ -522,6 +526,7 @@ declare namespace notification { /** * Obtains the Do Not Disturb date. * + * @since 8 * @systemapi Hide this for inner system use. * @permission ohos.permission.NOTIFICATION_CONTROLLER */ @@ -531,12 +536,22 @@ declare namespace notification { /** * Obtains whether to support the Do Not Disturb mode. * + * @since 8 * @systemapi Hide this for inner system use. * @permission ohos.permission.NOTIFICATION_CONTROLLER */ function supportDoNotDisturbMode(callback: AsyncCallback): void; function supportDoNotDisturbMode(): Promise; + /** + * Obtains whether the template is supported by the system. + * + * @since 8 + * @param plateName Name of template to be Obtained + */ + function isSupportTemplate(plateName: string, callback: AsyncCallback): void; + function isSupportTemplate(plateName: string): Promise; + /** * Describes a BundleOption. */ @@ -556,6 +571,7 @@ declare namespace notification { /** * The type of the Do Not Disturb. * + * @since 8 * @systemapi Hide this for inner system use. */ export enum DoNotDisturbType { @@ -588,16 +604,22 @@ declare namespace notification { export interface DoNotDisturbDate { /** * the type of the Do Not Disturb. + * + * @since 8 */ type: DoNotDisturbType; /** * the start time of the Do Not Disturb. + * + * @since 8 */ begin: Date; /** * the end time of the Do Not Disturb. + * + * @since 8 */ end: Date; } @@ -605,6 +627,7 @@ declare namespace notification { /** * Notification source type * + * @since 8 * @systemapi Hide this for inner system use. */ export enum SourceType { diff --git a/api/notification/notificationSubscriber.d.ts b/api/notification/notificationSubscriber.d.ts index da9d9162bc..3ae878775d 100644 --- a/api/notification/notificationSubscriber.d.ts +++ b/api/notification/notificationSubscriber.d.ts @@ -35,6 +35,12 @@ export interface NotificationSubscriber { onConnect?:() => void; onDisconnect?:() => void; onDestroy?:() => void; + + /** + * Callback when the Do Not Disturb setting changed. + * + * @since 8 + */ onDoNotDisturbDateChange?:(mode: notification.DoNotDisturbDate) => void; } -- Gitee From 852f575b246a6acdd839d0de6dacd28ee87d6977 Mon Sep 17 00:00:00 2001 From: xuchenghua09 Date: Thu, 30 Dec 2021 01:44:27 +0800 Subject: [PATCH 3/3] Update d.ts Signed-off-by: xuchenghua09 --- api/@ohos.notification.d.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/api/@ohos.notification.d.ts b/api/@ohos.notification.d.ts index d16156ee13..52a3a8233a 100644 --- a/api/@ohos.notification.d.ts +++ b/api/@ohos.notification.d.ts @@ -543,15 +543,6 @@ declare namespace notification { function supportDoNotDisturbMode(callback: AsyncCallback): void; function supportDoNotDisturbMode(): Promise; - /** - * Obtains whether the template is supported by the system. - * - * @since 8 - * @param plateName Name of template to be Obtained - */ - function isSupportTemplate(plateName: string, callback: AsyncCallback): void; - function isSupportTemplate(plateName: string): Promise; - /** * Describes a BundleOption. */ -- Gitee