From 407f1e28b52111db07f7e4f530f67529d60e765c Mon Sep 17 00:00:00 2001 From: derek Date: Mon, 28 Feb 2022 10:44:07 +0800 Subject: [PATCH 1/2] add reminderAgent api Signed-off-by: derek Change-Id: If22a0ab008a3cfa38a9a8c92c2b20935d831b480 --- api/@ohos.reminderAgent.d.ts | 120 ++++++++++++++++++++++++++++++++++- 1 file changed, 119 insertions(+), 1 deletion(-) diff --git a/api/@ohos.reminderAgent.d.ts b/api/@ohos.reminderAgent.d.ts index 67c0841c9b..363402f25c 100644 --- a/api/@ohos.reminderAgent.d.ts +++ b/api/@ohos.reminderAgent.d.ts @@ -188,6 +188,28 @@ declare namespace reminderAgent { abilityName: string; } + /** + * Max screen want agent information. + * + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent + */ + interface MaxScreenWantAgent { + /** + * Name of the package that is automatically started when the reminder arrives and the device is not in use. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + pkgName: string; + + /** + * Name of the ability that is automatically started when the reminder arrives and the device is not in use. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + abilityName: string; + } + /** * Reminder Common information. * @@ -217,6 +239,35 @@ declare namespace reminderAgent { */ wantAgent?: WantAgent; + /** + * Information about the ability that is automatically started when the reminder arrives. + * If the device is in use, a notification will be displayed. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent + */ + maxScreenWantAgent?: MaxScreenWantAgent; + + /** + * Ringing duration. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + ringDuration?: number; + + /** + * Number of reminder snooze times. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + snoozeTimes?: number; + + /** + * Reminder snooze interval. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + timeInterval?: number; + /** * Reminder title. * @since 7 @@ -232,12 +283,19 @@ declare namespace reminderAgent { content?: string; /** - * Content to be displayed when the reminder is snoozing. + * Content to be displayed when the reminder is expired. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent */ expiredContent?: string; + /** + * Content to be displayed when the reminder is snoozing. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + snoozeContent?: string; + /** * notification id. If there are reminders with the same ID, the later one will overwrite the earlier one. * @since 7 @@ -253,6 +311,29 @@ declare namespace reminderAgent { slotType?: notification.SlotType; } + interface ReminderRequestCalendar extends ReminderRequest { + /** + * Reminder time. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + dateTime: LocalDataTime; + + /** + * Month in which the reminder repeats. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + repeatMonths?: Array; + + /** + * Date on which the reminder repeats. + * @since 7 + * @syscap SystemCapability.Notification.ReminderAgent. + */ + repeatDays?: Array; + } + /** * Alarm reminder information. * @@ -291,5 +372,42 @@ declare namespace reminderAgent { interface ReminderRequestTimer extends ReminderRequest { triggerTimeInSeconds: number; } + + interface LocalDataTime { + /** + * value of year. + * @since 7 + * @syscap LocalDataTime. + */ + year: number; + + /** + * value of month. + * @since 7 + * @syscap LocalDataTime. + */ + month: number; + + /** + * value of day. + * @since 7 + * @syscap LocalDataTime. + */ + day: number; + + /** + * value of hour. + * @since 7 + * @syscap LocalDataTime. + */ + hour: number; + + /** + * value of minute. + * @since 7 + * @syscap LocalDataTime. + */ + minute: number; + } } export default reminderAgent; \ No newline at end of file -- Gitee From 1ad7a0184777f6e4ad7ff08c577d619c062cf668 Mon Sep 17 00:00:00 2001 From: derek Date: Mon, 28 Feb 2022 10:48:15 +0800 Subject: [PATCH 2/2] add reminderAgent api Signed-off-by: derek Change-Id: I6dd72c020199d41d15a9020a4c55d7f37a2fd9ea --- api/@ohos.reminderAgent.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/@ohos.reminderAgent.d.ts b/api/@ohos.reminderAgent.d.ts index 363402f25c..4fb85da2d0 100644 --- a/api/@ohos.reminderAgent.d.ts +++ b/api/@ohos.reminderAgent.d.ts @@ -317,7 +317,7 @@ declare namespace reminderAgent { * @since 7 * @syscap SystemCapability.Notification.ReminderAgent. */ - dateTime: LocalDataTime; + dateTime: LocalDateTime; /** * Month in which the reminder repeats. @@ -373,39 +373,39 @@ declare namespace reminderAgent { triggerTimeInSeconds: number; } - interface LocalDataTime { + interface LocalDateTime { /** * value of year. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ year: number; /** * value of month. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ month: number; /** * value of day. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ day: number; /** * value of hour. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ hour: number; /** * value of minute. * @since 7 - * @syscap LocalDataTime. + * @syscap SystemCapability.Notification.ReminderAgent. */ minute: number; } -- Gitee