From 902be5ce36072ad2e70fcf52bb97e56ea62d9968 Mon Sep 17 00:00:00 2001 From: njupthan Date: Tue, 11 Jan 2022 17:08:05 +0000 Subject: [PATCH] Update all dts to master branch of ANS and SDK repositories Signed-off-by: njupthan --- interfaces/kits/js/@ohos.notification.d.ts | 82 +++++++++++++++---- interfaces/kits/js/@ohos.wantAgent.d.ts | 27 +----- .../notification/notificationSubscriber.d.ts | 1 - 3 files changed, 66 insertions(+), 44 deletions(-) diff --git a/interfaces/kits/js/@ohos.notification.d.ts b/interfaces/kits/js/@ohos.notification.d.ts index 79467c48a..edbbd33d7 100644 --- a/interfaces/kits/js/@ohos.notification.d.ts +++ b/interfaces/kits/js/@ohos.notification.d.ts @@ -547,11 +547,11 @@ declare namespace notification { * Obtains whether the template is supported by the system. * * @since 8 - * @param plateName Name of template to be Obtained + * @param templateName Name of template to be Obtained */ - function isSupportTemplate(plateName: string, callback: AsyncCallback): void; - function isSupportTemplate(plateName: string): Promise; - + function isSupportTemplate(templateName: string, callback: AsyncCallback): void; + function isSupportTemplate(templateName: string): Promise; + /** * Describes a BundleOption. */ @@ -569,34 +569,82 @@ declare namespace notification { } /** - * DisturbMode + * The type of the Do Not Disturb. * + * @since 8 * @systemapi Hide this for inner system use. */ - export enum DoNotDisturbMode { - ALLOW_UNKNOWN, + export enum DoNotDisturbType { + /** + * Non do not disturb type notification + */ + TYPE_NONE = 0, /** - * Indicates that all notifications are allowed to interrupt the user in Do Not Disturb mode. + * Execute do not disturb once in the set time period (only watch hours and minutes) */ - ALLOW_ALL, + TYPE_ONCE = 1, /** - * Indicates that only notifications meeting the specified priority criteria are allowed to interrupt - * the user in Do Not Disturb mode. + * Execute do not disturb every day with a set time period (only watch hours and minutes) */ - ALLOW_PRIORITY, + TYPE_DAILY = 2, /** - * Indicates that no notifications are allowed to interrupt the user in Do Not Disturb mode. + * Execute in the set time period (specify the time, month, day and hour) */ - ALLOW_NONE, + TYPE_CLEARLY = 3, + } + /** + * Describes a DoNotDisturbDate instance. + * + * @systemapi Hide this for inner system use. + */ + export interface DoNotDisturbDate { /** - * Indicates that only notifications of the {@link NotificationRequest#CLASSIFICATION_ALARM} category - * are allowed to interrupt the user in Do Not Disturb mode. + * the type of the Do Not Disturb. + * + * @since 8 */ - ALLOW_ALARMS + 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; + } + + /** + * Notification source type + * + * @since 8 + * @systemapi Hide this for inner system use. + */ + export enum SourceType { + /** + * General notification + */ + TYPE_NORMAL = 0x00000000, + + /** + * Continuous notification + */ + TYPE_CONTINUOUS = 0x00000001, + + /** + * Scheduled notification + */ + TYPE_TIMER = 0x00000002, } /** diff --git a/interfaces/kits/js/@ohos.wantAgent.d.ts b/interfaces/kits/js/@ohos.wantAgent.d.ts index 17dd1c8aa..e5de044ce 100644 --- a/interfaces/kits/js/@ohos.wantAgent.d.ts +++ b/interfaces/kits/js/@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/interfaces/kits/js/notification/notificationSubscriber.d.ts b/interfaces/kits/js/notification/notificationSubscriber.d.ts index d8e2277bc..3ae878775 100644 --- a/interfaces/kits/js/notification/notificationSubscriber.d.ts +++ b/interfaces/kits/js/notification/notificationSubscriber.d.ts @@ -35,7 +35,6 @@ export interface NotificationSubscriber { onConnect?:() => void; onDisconnect?:() => void; onDestroy?:() => void; - onDisturbModeChange?:(mode: notification.DoNotDisturbMode) => void; /** * Callback when the Do Not Disturb setting changed. -- Gitee