diff --git a/api/@ohos.reminderAgent.d.ts b/api/@ohos.reminderAgent.d.ts index d6d9878513bb9dd74dc8891d01ce90da89a1254e..189240f5242db95a289c5e6b939210f7967f11fd 100644 --- a/api/@ohos.reminderAgent.d.ts +++ b/api/@ohos.reminderAgent.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"), * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,6 +24,8 @@ import { NotificationSlot } from './notification/notificationSlot'; * @since 7 * @syscap SystemCapability.Notification.ReminderAgent * @import reminderAgent from '@ohos.reminderAgent'; + * @deprecated since 9 + * @useinstead reminderAgentManager */ declare namespace reminderAgent { /** @@ -35,6 +37,8 @@ declare namespace reminderAgent { * @param reminderReq Indicates the reminder instance to publish. * @param callback Indicates the callback function. * @returns reminder id. + * @deprecated since 9 + * @useinstead reminderAgentManager.publishReminder */ function publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback): void; function publishReminder(reminderReq: ReminderRequest): Promise; @@ -46,6 +50,8 @@ declare namespace reminderAgent { * @syscap SystemCapability.Notification.ReminderAgent * @param reminderId Indicates the reminder id. * @param callback Indicates the callback function. + * @deprecated since 9 + * @useinstead reminderAgentManager.cancelReminder */ function cancelReminder(reminderId: number, callback: AsyncCallback): void; function cancelReminder(reminderId: number): Promise; @@ -56,6 +62,8 @@ declare namespace reminderAgent { * @since 7 * @syscap SystemCapability.Notification.ReminderAgent * @param callback Indicates the callback function. + * @deprecated since 9 + * @useinstead reminderAgentManager.getValidReminders */ function getValidReminders(callback: AsyncCallback>): void; function getValidReminders(): Promise>; @@ -66,6 +74,8 @@ declare namespace reminderAgent { * @since 7 * @syscap SystemCapability.Notification.ReminderAgent * @param callback Indicates the callback function. + * @deprecated since 9 + * @useinstead reminderAgentManager.cancelAllReminders */ function cancelAllReminders(callback: AsyncCallback): void; function cancelAllReminders(): Promise; @@ -77,6 +87,8 @@ declare namespace reminderAgent { * @syscap SystemCapability.Notification.ReminderAgent * @param slot Indicates the slot. * @param callback Indicates the callback function. + * @deprecated since 9 + * @useinstead reminderAgentManager.addNotificationSlot */ function addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback): void; function addNotificationSlot(slot: NotificationSlot): Promise; @@ -88,6 +100,8 @@ declare namespace reminderAgent { * @syscap SystemCapability.Notification.ReminderAgent * @param slotType Indicates the type of the slot. * @param callback Indicates the callback function. + * @deprecated since 9 + * @useinstead reminderAgentManager.removeNotificationSlot */ function removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback): void; function removeNotificationSlot(slotType: notification.SlotType): Promise; @@ -97,12 +111,16 @@ declare namespace reminderAgent { * * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ActionButtonType */ export enum ActionButtonType { /** * Button for closing the reminder. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_CLOSE */ ACTION_BUTTON_TYPE_CLOSE = 0, @@ -110,6 +128,8 @@ declare namespace reminderAgent { * Button for snoozing the reminder. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ActionButtonType.ACTION_BUTTON_TYPE_SNOOZE */ ACTION_BUTTON_TYPE_SNOOZE = 1 } @@ -119,12 +139,16 @@ declare namespace reminderAgent { * * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderType */ export enum ReminderType { /** * Countdown reminder. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderType.REMINDER_TYPE_TIMER */ REMINDER_TYPE_TIMER = 0, @@ -132,6 +156,8 @@ declare namespace reminderAgent { * Calendar reminder. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderType.REMINDER_TYPE_CALENDAR */ REMINDER_TYPE_CALENDAR = 1, @@ -139,6 +165,8 @@ declare namespace reminderAgent { * Alarm reminder. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderType.REMINDER_TYPE_ALARM */ REMINDER_TYPE_ALARM = 2 } @@ -148,12 +176,16 @@ declare namespace reminderAgent { * * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ActionButton */ interface ActionButton { /** * Text on the button. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ActionButton.title */ title: string; @@ -161,6 +193,8 @@ declare namespace reminderAgent { * Button type. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ActionButton.type */ type: ActionButtonType; } @@ -171,12 +205,16 @@ declare namespace reminderAgent { * * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.WantAgent */ interface WantAgent { /** * Name of the package redirected to when the reminder notification is clicked. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.WantAgent.pkgName */ pkgName: string; @@ -184,6 +222,8 @@ declare namespace reminderAgent { * Name of the ability that is redirected to when the reminder notification is clicked. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.WantAgent.abilityName */ abilityName: string; } @@ -193,12 +233,16 @@ declare namespace reminderAgent { * * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.MaxScreenWantAgent */ 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 + * @deprecated since 9 + * @useinstead reminderAgentManager.MaxScreenWantAgent.pkgName */ pkgName: string; @@ -206,6 +250,8 @@ declare namespace reminderAgent { * 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 + * @deprecated since 9 + * @useinstead reminderAgentManager.MaxScreenWantAgent.abilityName */ abilityName: string; } @@ -215,12 +261,16 @@ declare namespace reminderAgent { * * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest */ interface ReminderRequest { /** * Type of the reminder. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.reminderType */ reminderType: ReminderType; @@ -229,6 +279,8 @@ declare namespace reminderAgent { * (The parameter is optional. Up to two buttons are supported). * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.actionButton */ actionButton?: [ActionButton?, ActionButton?]; @@ -236,6 +288,8 @@ declare namespace reminderAgent { * Information about the ability that is redirected to when the notification is clicked. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.wantAgent */ wantAgent?: WantAgent; @@ -244,6 +298,8 @@ declare namespace reminderAgent { * If the device is in use, a notification will be displayed. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.maxScreenWantAgent */ maxScreenWantAgent?: MaxScreenWantAgent; @@ -251,6 +307,8 @@ declare namespace reminderAgent { * Ringing duration. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.ringDuration */ ringDuration?: number; @@ -258,6 +316,8 @@ declare namespace reminderAgent { * Number of reminder snooze times. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.snoozeTimes */ snoozeTimes?: number; @@ -265,6 +325,8 @@ declare namespace reminderAgent { * Reminder snooze interval. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.timeInterval */ timeInterval?: number; @@ -272,6 +334,8 @@ declare namespace reminderAgent { * Reminder title. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.title */ title?: string; @@ -279,6 +343,8 @@ declare namespace reminderAgent { * Reminder content. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.content */ content?: string; @@ -286,6 +352,8 @@ declare namespace reminderAgent { * Content to be displayed when the reminder is expired. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.expiredContent */ expiredContent?: string; @@ -293,6 +361,8 @@ declare namespace reminderAgent { * Content to be displayed when the reminder is snoozing. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.snoozeContent */ snoozeContent?: string; @@ -300,6 +370,8 @@ declare namespace reminderAgent { * notification id. If there are reminders with the same ID, the later one will overwrite the earlier one. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.notificationId */ notificationId?: number; @@ -307,15 +379,23 @@ declare namespace reminderAgent { * Type of the slot used by the reminder. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequest.slotType */ slotType?: notification.SlotType; } + /** + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestCalendar + */ interface ReminderRequestCalendar extends ReminderRequest { /** * Reminder time. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestCalendar.dateTime */ dateTime: LocalDateTime; @@ -323,6 +403,8 @@ declare namespace reminderAgent { * Month in which the reminder repeats. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestCalendar.repeatMonths */ repeatMonths?: Array; @@ -330,6 +412,8 @@ declare namespace reminderAgent { * Date on which the reminder repeats. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestCalendar.repeatDays */ repeatDays?: Array; } @@ -339,12 +423,16 @@ declare namespace reminderAgent { * * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestAlarm */ interface ReminderRequestAlarm extends ReminderRequest { /** * Hour portion of the reminder time. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestAlarm.hour */ hour: number; @@ -352,6 +440,8 @@ declare namespace reminderAgent { * minute portion of the remidner time. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestAlarm.minute */ minute: number; @@ -359,6 +449,8 @@ declare namespace reminderAgent { * Days of a week when the reminder repeates. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestAlarm.daysOfWeek */ daysOfWeek?: Array; } @@ -368,6 +460,8 @@ declare namespace reminderAgent { * * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestTimer */ interface ReminderRequestTimer extends ReminderRequest { triggerTimeInSeconds: number; @@ -378,6 +472,8 @@ declare namespace reminderAgent { * value of year. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestTimer.year */ year: number; @@ -385,6 +481,8 @@ declare namespace reminderAgent { * value of month. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestTimer.month */ month: number; @@ -392,6 +490,8 @@ declare namespace reminderAgent { * value of day. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestTimer.day */ day: number; @@ -399,6 +499,8 @@ declare namespace reminderAgent { * value of hour. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestTimer.hour */ hour: number; @@ -406,6 +508,8 @@ declare namespace reminderAgent { * value of minute. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestTimer.minute */ minute: number; @@ -413,6 +517,8 @@ declare namespace reminderAgent { * value of second. * @since 7 * @syscap SystemCapability.Notification.ReminderAgent + * @deprecated since 9 + * @useinstead reminderAgentManager.ReminderRequestTimer.second */ second?: number; } diff --git a/api/@ohos.reminderAgentManager.d.ts b/api/@ohos.reminderAgentManager.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b96875149f9c98207c5f5dee9f2d5c8fd1e62060 --- /dev/null +++ b/api/@ohos.reminderAgentManager.d.ts @@ -0,0 +1,484 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AsyncCallback } from './basic'; +import notification from './@ohos.notification'; +import { NotificationSlot } from './notification/notificationSlot'; + +/** + * Providers static methods for managing reminders, including publishing or canceling a reminder. + * adding or removing a notification slot, and obtaining or cancelling all reminders of the current application. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @import reminderAgentManager from '@ohos.reminderAgentManager'; + */ +declare namespace reminderAgentManager { + /** + * Publishes a scheduled reminder. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @permission ohos.permission.PUBLISH_AGENT_REMINDER + * @param { ReminderRequest } reminderReq - Indicates the reminder instance to publish. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + */ + function publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback): void; + + /** + * Publishes a scheduled reminder. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @permission ohos.permission.PUBLISH_AGENT_REMINDER + * @param { ReminderRequest } reminderReq - Indicates the reminder instance to publish. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + * @returns { Promise } The reminder id. + */ + function publishReminder(reminderReq: ReminderRequest): Promise; + + /** + * Cancels a reminder. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @param { number } reminderId - Indicates the reminder id. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + */ + function cancelReminder(reminderId: number, callback: AsyncCallback): void; + + /** + * Cancels a reminder. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @param { number } reminderId - Indicates the reminder id. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + * @returns { Promise } The promise returned by the function. + */ + function cancelReminder(reminderId: number): Promise; + + /** + * Obtains all the valid reminders of current application. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @param { AsyncCallback> } callback - Indicates the callback function. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + */ + function getValidReminders(callback: AsyncCallback>): void; + + /** + * Obtains all the valid reminders of current application. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + * @returns { Promise> } The promise returned by the function. + */ + function getValidReminders(): Promise>; + + /** + * Cancels all the reminders of current application. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + */ + function cancelAllReminders(callback: AsyncCallback): void; + + /** + * Cancels all the reminders of current application. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + * @returns { Promise } The promise returned by the function. + */ + function cancelAllReminders(): Promise; + + /** + * Add notification slot. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @param { NotificationSlot } slot - Indicates the slot. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + */ + function addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback): void; + + /** + * Add notification slot. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @param { NotificationSlot } slot - Indicates the slot. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + * @returns { Promise } The promise returned by the function. + */ + function addNotificationSlot(slot: NotificationSlot): Promise; + + /** + * Deletes a created notification slot based on the slot type. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @param { notification.SlotType } slotType Indicates the type of the slot. + * @param { AsyncCallback } callback - Indicates the callback function. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + */ + function removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback): void; + + /** + * Deletes a created notification slot based on the slot type. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + * @param { notification.SlotType } slotType Indicates the type of the slot. + * @throws { BusinessError } 401 - If the input parameter is not valid parameter. + * @returns { Promise } The promise returned by the function. + */ + function removeNotificationSlot(slotType: notification.SlotType): Promise; + + /** + * Declares action button type. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + export enum ActionButtonType { + /** + * Button for closing the reminder. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + ACTION_BUTTON_TYPE_CLOSE = 0, + + /** + * Button for snoozing the reminder. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + ACTION_BUTTON_TYPE_SNOOZE = 1 + } + + /** + * Declares reminder type. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + export enum ReminderType { + /** + * Countdown reminder. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + REMINDER_TYPE_TIMER = 0, + + /** + * Calendar reminder. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + REMINDER_TYPE_CALENDAR = 1, + + /** + * Alarm reminder. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + REMINDER_TYPE_ALARM = 2 + } + + /** + * Action button information. The button will show on displayed reminder. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + interface ActionButton { + /** + * Text on the button. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + title: string; + + /** + * Button type. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + type: ActionButtonType; + } + + /** + * Want agent information. + * It will switch to target ability when you click the displayed reminder. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + interface WantAgent { + /** + * Name of the package redirected to when the reminder notification is clicked. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + pkgName: string; + + /** + * Name of the ability that is redirected to when the reminder notification is clicked. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + abilityName: string; + } + + /** + * Max screen want agent information. + * + * @since 9 + * @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 9 + * @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 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + abilityName: string; + } + + /** + * Reminder Common information. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + interface ReminderRequest { + /** + * Type of the reminder. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + reminderType: ReminderType; + + /** + * Action button displayed on the reminder notification. + * (The parameter is optional. Up to two buttons are supported). + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + actionButton?: [ActionButton?, ActionButton?]; + + /** + * Information about the ability that is redirected to when the notification is clicked. + * @since 9 + * @syscap SystemCapability.Notification.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 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + maxScreenWantAgent?: MaxScreenWantAgent; + + /** + * Ringing duration. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + ringDuration?: number; + + /** + * Number of reminder snooze times. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + snoozeTimes?: number; + + /** + * Reminder snooze interval. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + timeInterval?: number; + + /** + * Reminder title. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + title?: string; + + /** + * Reminder content. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + content?: string; + + /** + * Content to be displayed when the reminder is expired. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + expiredContent?: string; + + /** + * Content to be displayed when the reminder is snoozing. + * @since 9 + * @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 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + notificationId?: number; + + /** + * Type of the slot used by the reminder. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + slotType?: notification.SlotType; + } + + interface ReminderRequestCalendar extends ReminderRequest { + /** + * Reminder time. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + dateTime: LocalDateTime; + + /** + * Month in which the reminder repeats. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + repeatMonths?: Array; + + /** + * Date on which the reminder repeats. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + repeatDays?: Array; + } + + /** + * Alarm reminder information. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + interface ReminderRequestAlarm extends ReminderRequest { + /** + * Hour portion of the reminder time. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + hour: number; + + /** + * Minute portion of the reminder time. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + minute: number; + + /** + * Days of a week when the reminder repeates. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + daysOfWeek?: Array; + } + + /** + * CountDown reminder information. + * + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + interface ReminderRequestTimer extends ReminderRequest { + triggerTimeInSeconds: number; + } + + interface LocalDateTime { + /** + * Value of year. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + year: number; + + /** + * Value of month. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + month: number; + + /** + * Value of day. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + day: number; + + /** + * Value of hour. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + hour: number; + + /** + * Value of minute. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + minute: number; + + /** + * Value of second. + * @since 9 + * @syscap SystemCapability.Notification.ReminderAgent + */ + second?: number; + } +} +export default reminderAgentManager;