1/* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"), 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit BackgroundTasksKit 19 */ 20 21import { AsyncCallback } from './@ohos.base'; 22import notification from './@ohos.notificationManager'; 23import { NotificationSlot } from './notification/notificationSlot'; 24import { ValuesBucket } from './@ohos.data.ValuesBucket'; 25 26/** 27 * Providers static methods for managing reminders, including publishing or canceling a reminder. 28 * Add or remove a notification slot, and obtain or cancel all reminders of the current application. 29 * 30 * @namespace reminderAgentManager 31 * @syscap SystemCapability.Notification.ReminderAgent 32 * @since 9 33 */ 34declare namespace reminderAgentManager { 35 /** 36 * Publishes a scheduled reminder. 37 * 38 * @permission ohos.permission.PUBLISH_AGENT_REMINDER 39 * @param { ReminderRequest } reminderReq - Indicates the reminder instance to publish. 40 * @param { AsyncCallback<number> } callback - Indicates the callback function. 41 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 42 * @throws { BusinessError } 1700001 - Notification is not enabled. 43 * @throws { BusinessError } 1700002 - The number of reminders exceeds the limit. 44 * @syscap SystemCapability.Notification.ReminderAgent 45 * @since 9 46 */ 47 function publishReminder(reminderReq: ReminderRequest, callback: AsyncCallback<number>): void; 48 49 /** 50 * Publishes a scheduled reminder. 51 * 52 * @permission ohos.permission.PUBLISH_AGENT_REMINDER 53 * @param { ReminderRequest } reminderReq - Indicates the reminder instance to publish. 54 * @returns { Promise<number> } The reminder id. 55 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 56 * @throws { BusinessError } 1700001 - Notification is not enabled. 57 * @throws { BusinessError } 1700002 - The number of reminders exceeds the limit. 58 * @syscap SystemCapability.Notification.ReminderAgent 59 * @since 9 60 */ 61 function publishReminder(reminderReq: ReminderRequest): Promise<number>; 62 63 /** 64 * Cancel a reminder. 65 * 66 * @param { number } reminderId - Indicates the reminder id. 67 * @param { AsyncCallback<void> } callback - Indicates the callback function. 68 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 69 * @throws { BusinessError } 1700003 - The reminder does not exist. 70 * @throws { BusinessError } 1700004 - The bundle name does not exist. 71 * @syscap SystemCapability.Notification.ReminderAgent 72 * @since 9 73 */ 74 function cancelReminder(reminderId: number, callback: AsyncCallback<void>): void; 75 76 /** 77 * Cancel a reminder. 78 * 79 * @param { number } reminderId - Indicates the reminder id. 80 * @returns { Promise<void> } The promise returned by the function. 81 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 82 * @throws { BusinessError } 1700003 - The reminder does not exist. 83 * @throws { BusinessError } 1700004 - The bundle name does not exist. 84 * @syscap SystemCapability.Notification.ReminderAgent 85 * @since 9 86 */ 87 function cancelReminder(reminderId: number): Promise<void>; 88 89 /** 90 * Obtains all the valid reminders of current application. 91 * 92 * @param { AsyncCallback<Array<ReminderRequest>> } callback - Indicates the callback function. 93 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 94 * @throws { BusinessError } 1700004 - The bundle name does not exist. 95 * @syscap SystemCapability.Notification.ReminderAgent 96 * @since 9 97 */ 98 function getValidReminders(callback: AsyncCallback<Array<ReminderRequest>>): void; 99 100 /** 101 * Obtains all the valid reminders of current application. 102 * 103 * @returns { Promise<Array<ReminderRequest>> } The promise returned by the function. 104 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 105 * @throws { BusinessError } 1700004 - The bundle name does not exist. 106 * @syscap SystemCapability.Notification.ReminderAgent 107 * @since 9 108 */ 109 function getValidReminders(): Promise<Array<ReminderRequest>>; 110 111 /** 112 * Cancel all the reminders of current application. 113 * 114 * @param { AsyncCallback<void> } callback - Indicates the callback function. 115 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 116 * @throws { BusinessError } 1700004 - The bundle name does not exist. 117 * @syscap SystemCapability.Notification.ReminderAgent 118 * @since 9 119 */ 120 function cancelAllReminders(callback: AsyncCallback<void>): void; 121 122 /** 123 * Cancel all the reminders of current application. 124 * 125 * @returns { Promise<void> } The promise returned by the function. 126 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 127 * @throws { BusinessError } 1700004 - The bundle name does not exist. 128 * @syscap SystemCapability.Notification.ReminderAgent 129 * @since 9 130 */ 131 function cancelAllReminders(): Promise<void>; 132 133 /** 134 * Add notification slot. 135 * 136 * @param { NotificationSlot } slot - Indicates the slot. 137 * @param { AsyncCallback<void> } callback - Indicates the callback function. 138 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 139 * @syscap SystemCapability.Notification.ReminderAgent 140 * @since 9 141 */ 142 function addNotificationSlot(slot: NotificationSlot, callback: AsyncCallback<void>): void; 143 144 /** 145 * Add notification slot. 146 * 147 * @param { NotificationSlot } slot - Indicates the slot. 148 * @returns { Promise<void> } The promise returned by the function. 149 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 150 * @syscap SystemCapability.Notification.ReminderAgent 151 * @since 9 152 */ 153 function addNotificationSlot(slot: NotificationSlot): Promise<void>; 154 155 /** 156 * Deletes a created notification slot based on the slot type. 157 * 158 * @param { notification.SlotType } slotType Indicates the type of the slot. 159 * @param { AsyncCallback<void> } callback - Indicates the callback function. 160 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 161 * @syscap SystemCapability.Notification.ReminderAgent 162 * @since 9 163 */ 164 function removeNotificationSlot(slotType: notification.SlotType, callback: AsyncCallback<void>): void; 165 166 /** 167 * Deletes a created notification slot based on the slot type. 168 * 169 * @param { notification.SlotType } slotType Indicates the type of the slot. 170 * @returns { Promise<void> } The promise returned by the function. 171 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 172 * @syscap SystemCapability.Notification.ReminderAgent 173 * @since 9 174 */ 175 function removeNotificationSlot(slotType: notification.SlotType): Promise<void>; 176 177 /** 178 * add exclude date for calendar reminder request. 179 * 180 * @param { number } reminderId reminder id 181 * @param { Date } date date time 182 * @returns { Promise<void> } The promise returned by the function. 183 * @throws { BusinessError } 201 - Permission denied 184 * @throws { BusinessError } 401 - If the input parameter is not valid parameter. 185 * @throws { BusinessError } 1700003 - The reminder does not exist. 186 * @syscap SystemCapability.Notification.ReminderAgent 187 * @since 12 188 */ 189 function addExcludeDate(reminderId: number, date: Date): Promise<void>; 190 191 /** 192 * delete exclude date for calendar reminder request. 193 * 194 * @param { number } reminderId reminder id 195 * @returns { Promise<void> } The promise returned by the function. 196 * @throws { BusinessError } 201 - Permission denied 197 * @throws { BusinessError } 1700003 - The reminder does not exist. 198 * @syscap SystemCapability.Notification.ReminderAgent 199 * @since 12 200 */ 201 function deleteExcludeDates(reminderId: number): Promise<void>; 202 203 /** 204 * get exclude dates 205 * 206 * @param { number } reminderId reminder id 207 * @returns { Promise<Array<Date>> } The promise returned by the function. 208 * @throws { BusinessError } 201 - Permission denied 209 * @throws { BusinessError } 1700003 - The reminder does not exist. 210 * @syscap SystemCapability.Notification.ReminderAgent 211 * @since 12 212 */ 213 function getExcludeDates(reminderId: number): Promise<Array<Date>>; 214 215 /** 216 * Obtains all the valid reminders of current application, include reminderId. 217 * 218 * @returns { Promise<Array<ReminderInfo>> } The promise returned by the function. 219 * @throws { BusinessError } 201 - Permission denied. 220 * @syscap SystemCapability.Notification.ReminderAgent 221 * @since 12 222 */ 223 function getAllValidReminders(): Promise<Array<ReminderInfo>>; 224 225 /** 226 * Declares action button type. 227 * 228 * @enum { number } 229 * @syscap SystemCapability.Notification.ReminderAgent 230 * @since 9 231 */ 232 export enum ActionButtonType { 233 /** 234 * Button for closing the reminder. 235 * 236 * @syscap SystemCapability.Notification.ReminderAgent 237 * @since 9 238 */ 239 ACTION_BUTTON_TYPE_CLOSE = 0, 240 241 /** 242 * Button for snoozing the reminder. 243 * 244 * @syscap SystemCapability.Notification.ReminderAgent 245 * @since 9 246 */ 247 ACTION_BUTTON_TYPE_SNOOZE = 1, 248 249 /** 250 * The custom button. 251 * 252 * @syscap SystemCapability.Notification.ReminderAgent 253 * @systemapi Hide this for inner system use. 254 * @since 10 255 */ 256 ACTION_BUTTON_TYPE_CUSTOM = 2 257 } 258 259 /** 260 * Declares reminder type. 261 * 262 * @enum { number } 263 * 264 * @syscap SystemCapability.Notification.ReminderAgent 265 * @since 9 266 */ 267 export enum ReminderType { 268 /** 269 * Countdown reminder. 270 * 271 * @syscap SystemCapability.Notification.ReminderAgent 272 * @since 9 273 */ 274 REMINDER_TYPE_TIMER = 0, 275 276 /** 277 * Calendar reminder. 278 * 279 * @syscap SystemCapability.Notification.ReminderAgent 280 * @since 9 281 */ 282 REMINDER_TYPE_CALENDAR = 1, 283 284 /** 285 * Alarm reminder. 286 * 287 * @syscap SystemCapability.Notification.ReminderAgent 288 * @since 9 289 */ 290 REMINDER_TYPE_ALARM = 2 291 } 292 293 /** 294 * Action button information. The button will show on displayed reminder. 295 * 296 * @interface ActionButton 297 * 298 * @syscap SystemCapability.Notification.ReminderAgent 299 * @since 9 300 */ 301 interface ActionButton { 302 /** 303 * Text on the button. 304 * 305 * @type { string } 306 * @syscap SystemCapability.Notification.ReminderAgent 307 * @since 9 308 */ 309 title: string; 310 311 /** 312 * Resource ID for button title. 313 * 314 * @type { ?string } 315 * @syscap SystemCapability.Notification.ReminderAgent 316 * @since 11 317 */ 318 titleResource?: string; 319 320 /** 321 * Button type. 322 * 323 * @type { ActionButtonType } 324 * @syscap SystemCapability.Notification.ReminderAgent 325 * @since 9 326 */ 327 type: ActionButtonType; 328 329 /** 330 * Information about the ability that is redirected to when the button is clicked. 331 * 332 * @type { ?WantAgent } 333 * @syscap SystemCapability.Notification.ReminderAgent 334 * @systemapi Hide this for inner system use. 335 * @since 10 336 */ 337 wantAgent?: WantAgent; 338 339 /** 340 * It will update the database when the button is clicked. 341 * 342 * @type { ?DataShareUpdate } 343 * @syscap SystemCapability.Notification.ReminderAgent 344 * @systemapi Hide this for inner system use. 345 * @since 11 346 */ 347 dataShareUpdate?: DataShareUpdate; 348 } 349 350 /** 351 * Want agent information. 352 * It will switch to target ability when you click the displayed reminder. 353 * 354 * @interface WantAgent 355 * @syscap SystemCapability.Notification.ReminderAgent 356 * @since 9 357 */ 358 interface WantAgent { 359 /** 360 * Name of the package redirected to when the reminder notification is clicked. 361 * 362 * @type { string } 363 * @syscap SystemCapability.Notification.ReminderAgent 364 * @since 9 365 */ 366 pkgName: string; 367 368 /** 369 * Name of the ability that is redirected to when the reminder notification is clicked. 370 * 371 * @type { string } 372 * @syscap SystemCapability.Notification.ReminderAgent 373 * @since 9 374 */ 375 abilityName: string; 376 377 /** 378 * The Uniform Resource Identifier (URI) that will be redirected to. 379 * 380 * @type { ?string } 381 * @syscap SystemCapability.Notification.ReminderAgent 382 * @since 12 383 */ 384 uri?: string; 385 386 /** 387 * The description of the WantParams object in an Want 388 * 389 * @type { ?Record<string, Object> } 390 * @syscap SystemCapability.Notification.ReminderAgent 391 * @since 12 392 */ 393 parameters?: Record<string, Object>; 394 } 395 396 /** 397 * DataShareUpdate information. 398 * It will update the database when the button is clicked. 399 * 400 * @interface DataShareUpdate 401 * @syscap SystemCapability.Notification.ReminderAgent 402 * @systemapi Hide this for inner system use. 403 * @since 11 404 */ 405 interface DataShareUpdate { 406 /** 407 * Indicates the path of data to update. 408 * 409 * @type { string } 410 * @syscap SystemCapability.Notification.ReminderAgent 411 * @systemapi Hide this for inner system use. 412 * @since 11 413 */ 414 uri: string; 415 416 /** 417 * Indicates filter criteria. 418 * 419 * @type { Record<string, number | string | boolean> } 420 * @syscap SystemCapability.Notification.ReminderAgent 421 * @systemapi Hide this for inner system use. 422 * @since 11 423 */ 424 equalTo: Record<string, number | string | boolean>; 425 426 /** 427 * Indicates the data to update. This parameter can be null. 428 * 429 * @type { ValuesBucket } 430 * @syscap SystemCapability.Notification.ReminderAgent 431 * @systemapi Hide this for inner system use. 432 * @since 11 433 */ 434 value: ValuesBucket; 435 } 436 437 /** 438 * Max screen want agent information. 439 * 440 * @interface MaxScreenWantAgent 441 * @syscap SystemCapability.Notification.ReminderAgent 442 * @since 9 443 */ 444 interface MaxScreenWantAgent { 445 /** 446 * Name of the package that is automatically started when the reminder arrives and the device is not in use. 447 * 448 * @type { string } 449 * @syscap SystemCapability.Notification.ReminderAgent 450 * @since 9 451 */ 452 pkgName: string; 453 454 /** 455 * Name of the ability that is automatically started when the reminder arrives and the device is not in use. 456 * 457 * @type { string } 458 * @syscap SystemCapability.Notification.ReminderAgent 459 * @since 9 460 */ 461 abilityName: string; 462 } 463 464 /** 465 * Reminder Common information. 466 * 467 * @interface ReminderRequest 468 * @syscap SystemCapability.Notification.ReminderAgent 469 * @since 9 470 */ 471 interface ReminderRequest { 472 /** 473 * Type of the reminder. 474 * 475 * @type { ReminderType } 476 * @syscap SystemCapability.Notification.ReminderAgent 477 * @since 9 478 */ 479 reminderType: ReminderType; 480 481 /** 482 * Action button displayed on the reminder notification. 483 * (The parameter is optional. Up to two buttons are supported). 484 * 485 * @syscap SystemCapability.Notification.ReminderAgent 486 * @since 9 487 */ 488 /** 489 * Action button displayed on the reminder notification. 490 * (The parameter is optional. Up to three buttons are supported). 491 * 492 * @type { ?[ActionButton?, ActionButton?, ActionButton?] } 493 * @syscap SystemCapability.Notification.ReminderAgent 494 * @since 10 495 */ 496 actionButton?: [ActionButton?, ActionButton?, ActionButton?]; 497 498 /** 499 * Information about the ability that is redirected to when the notification is clicked. 500 * 501 * @type { ?WantAgent } 502 * @syscap SystemCapability.Notification.ReminderAgent 503 * @since 9 504 */ 505 wantAgent?: WantAgent; 506 507 /** 508 * Information about the ability that is automatically started when the reminder arrives. 509 * If the device is in use, a notification will be displayed. 510 * 511 * @type { ?MaxScreenWantAgent } 512 * @syscap SystemCapability.Notification.ReminderAgent 513 * @since 9 514 */ 515 maxScreenWantAgent?: MaxScreenWantAgent; 516 517 /** 518 * Ringing duration. 519 * 520 * @type { ?number } 521 * @syscap SystemCapability.Notification.ReminderAgent 522 * @since 9 523 */ 524 ringDuration?: number; 525 526 /** 527 * Number of reminder snooze times. 528 * 529 * @type { ?number } 530 * @syscap SystemCapability.Notification.ReminderAgent 531 * @since 9 532 */ 533 snoozeTimes?: number; 534 535 /** 536 * Reminder snooze interval. 537 * 538 * @type { ?number } 539 * @syscap SystemCapability.Notification.ReminderAgent 540 * @since 9 541 */ 542 timeInterval?: number; 543 544 /** 545 * Reminder title. 546 * 547 * @type { ?string } 548 * @syscap SystemCapability.Notification.ReminderAgent 549 * @since 9 550 */ 551 title?: string; 552 553 /** 554 * Resource ID for title. 555 * 556 * @type { ?number } 557 * @syscap SystemCapability.Notification.ReminderAgent 558 * @since 18 559 */ 560 titleResourceId?: number; 561 562 /** 563 * Reminder content. 564 * 565 * @type { ?string } 566 * @syscap SystemCapability.Notification.ReminderAgent 567 * @since 9 568 */ 569 content?: string; 570 571 /** 572 * Resource ID for content. 573 * 574 * @type { ?number } 575 * @syscap SystemCapability.Notification.ReminderAgent 576 * @since 18 577 */ 578 contentResourceId?: number; 579 580 /** 581 * Content to be displayed when the reminder is expired. 582 * 583 * @type { ?string } 584 * @syscap SystemCapability.Notification.ReminderAgent 585 * @since 9 586 */ 587 expiredContent?: string; 588 589 /** 590 * Resource ID for expired content. 591 * 592 * @type { ?number } 593 * @syscap SystemCapability.Notification.ReminderAgent 594 * @since 18 595 */ 596 expiredContentResourceId?: number; 597 598 /** 599 * Content to be displayed when the reminder is snoozing. 600 * 601 * @type { ?string } 602 * @syscap SystemCapability.Notification.ReminderAgent 603 * @since 9 604 */ 605 snoozeContent?: string; 606 607 /** 608 * Resource ID for snooze content. 609 * 610 * @type { ?number } 611 * @syscap SystemCapability.Notification.ReminderAgent 612 * @since 18 613 */ 614 snoozeContentResourceId?: number; 615 616 /** 617 * Notification id. If there are reminders with the same ID, the later one will overwrite the earlier one. 618 * 619 * @type { ?number } 620 * @syscap SystemCapability.Notification.ReminderAgent 621 * @since 9 622 */ 623 notificationId?: number; 624 625 /** 626 * If the same group ID is set for reminders, these reminders are canceled together. 627 * 628 * @type { ?string } 629 * @syscap SystemCapability.Notification.ReminderAgent 630 * @since 11 631 */ 632 groupId?: string; 633 634 /** 635 * Type of the slot used by the reminder. 636 * 637 * @type { ?notification.SlotType } 638 * @syscap SystemCapability.Notification.ReminderAgent 639 * @since 9 640 */ 641 slotType?: notification.SlotType; 642 643 /** 644 * Whether the notification is automatically cleared. 645 * 646 * @type { ?boolean } 647 * @syscap SystemCapability.Notification.ReminderAgent 648 * @since 10 649 */ 650 tapDismissed?: boolean; 651 652 /** 653 * Time when the notification is automatically cleared. 654 * 655 * @type { ?number } 656 * @syscap SystemCapability.Notification.ReminderAgent 657 * @since 10 658 */ 659 autoDeletedTime?: number; 660 661 /** 662 * Type of the snoozeSlot used by the reminder. 663 * 664 * @type { ?notification.SlotType } 665 * @syscap SystemCapability.Notification.ReminderAgent 666 * @since 11 667 */ 668 snoozeSlotType?: notification.SlotType; 669 670 /** 671 * The directory of storing reminder announcements. 672 * 673 * @type { ?string } 674 * @syscap SystemCapability.Notification.ReminderAgent 675 * @since 11 676 */ 677 customRingUri?: string; 678 } 679 680 /** 681 * Calendar reminder information. 682 * 683 * @extends ReminderRequest 684 * @typedef ReminderRequestCalendar 685 * @syscap SystemCapability.Notification.ReminderAgent 686 * @since 9 687 */ 688 interface ReminderRequestCalendar extends ReminderRequest { 689 /** 690 * Reminder time. 691 * 692 * @type { LocalDateTime } 693 * @syscap SystemCapability.Notification.ReminderAgent 694 * @since 9 695 */ 696 dateTime: LocalDateTime; 697 698 /** 699 * Month in which the reminder repeats. 700 * 701 * @type { ?Array<number> } 702 * @syscap SystemCapability.Notification.ReminderAgent 703 * @since 9 704 */ 705 repeatMonths?: Array<number>; 706 707 /** 708 * Date on which the reminder repeats. 709 * 710 * @type { ?Array<number> } 711 * @syscap SystemCapability.Notification.ReminderAgent 712 * @since 9 713 */ 714 repeatDays?: Array<number>; 715 716 /** 717 * Days of a week when the reminder repeats. 718 * 719 * @type { ?Array<number> } 720 * @syscap SystemCapability.Notification.ReminderAgent 721 * @since 11 722 */ 723 daysOfWeek?: Array<number>; 724 725 /** 726 * calendar end date time 727 * 728 * @type { ?LocalDateTime } 729 * @syscap SystemCapability.Notification.ReminderAgent 730 * @since 12 731 */ 732 endDateTime?: LocalDateTime; 733 734 /** 735 * For custom repeat calendar(RRule), the service extension will pull up when 736 * param set and the notification arrived. 737 * 738 * @type { ?WantAgent } 739 * @syscap SystemCapability.Notification.ReminderAgent 740 * @systemapi Hide this for inner system use. 741 * @since 12 742 */ 743 rruleWantAgent?: WantAgent; 744 } 745 746 /** 747 * Alarm reminder information. 748 * 749 * @extends ReminderRequest 750 * @typedef ReminderRequestAlarm 751 * @syscap SystemCapability.Notification.ReminderAgent 752 * @since 9 753 */ 754 interface ReminderRequestAlarm extends ReminderRequest { 755 /** 756 * Hour portion of the reminder time. 757 * 758 * @type { number } 759 * @syscap SystemCapability.Notification.ReminderAgent 760 * @since 9 761 */ 762 hour: number; 763 764 /** 765 * Minute portion of the reminder time. 766 * 767 * @type { number } 768 * @syscap SystemCapability.Notification.ReminderAgent 769 * @since 9 770 */ 771 minute: number; 772 773 /** 774 * Days of a week when the reminder repeats. 775 * 776 * @type { ?Array<number> } 777 * @syscap SystemCapability.Notification.ReminderAgent 778 * @since 9 779 */ 780 daysOfWeek?: Array<number>; 781 } 782 783 /** 784 * CountDown reminder information. 785 * 786 * @extends ReminderRequest 787 * @typedef ReminderRequestTimer 788 * @syscap SystemCapability.Notification.ReminderAgent 789 * @since 9 790 */ 791 interface ReminderRequestTimer extends ReminderRequest { 792 /** 793 * The number of seconds to count down. 794 * 795 * @type { number } 796 * @syscap SystemCapability.Notification.ReminderAgent 797 * @since 9 798 */ 799 triggerTimeInSeconds: number; 800 } 801 802 /** 803 * Reminder information, include reminderId. 804 * 805 * @interface ReminderInfo 806 * @syscap SystemCapability.Notification.ReminderAgent 807 * @since 12 808 */ 809 interface ReminderInfo { 810 /** 811 * Reminder id. 812 * 813 * @type { number } 814 * @syscap SystemCapability.Notification.ReminderAgent 815 * @since 12 816 */ 817 reminderId: number; 818 819 /** 820 * Reminder request. 821 * 822 * @type { ReminderRequest } 823 * @syscap SystemCapability.Notification.ReminderAgent 824 * @since 12 825 */ 826 reminderReq: ReminderRequest; 827 } 828 829 /** 830 * Used for ReminderRequestCalendar when set the time. 831 * 832 * @interface LocalDateTime 833 * @syscap SystemCapability.Notification.ReminderAgent 834 * @since 9 835 */ 836 interface LocalDateTime { 837 /** 838 * Value of year. 839 * 840 * @type { number } 841 * @syscap SystemCapability.Notification.ReminderAgent 842 * @since 9 843 */ 844 year: number; 845 846 /** 847 * Value of month. 848 * 849 * @type { number } 850 * @syscap SystemCapability.Notification.ReminderAgent 851 * @since 9 852 */ 853 month: number; 854 855 /** 856 * Value of day. 857 * 858 * @type { number } 859 * @syscap SystemCapability.Notification.ReminderAgent 860 * @since 9 861 */ 862 day: number; 863 864 /** 865 * Value of hour. 866 * 867 * @type { number } 868 * @syscap SystemCapability.Notification.ReminderAgent 869 * @since 9 870 */ 871 hour: number; 872 873 /** 874 * Value of minute. 875 * 876 * @type { number } 877 * @syscap SystemCapability.Notification.ReminderAgent 878 * @since 9 879 */ 880 minute: number; 881 882 /** 883 * Value of second. 884 * 885 * @type { ?number } 886 * @syscap SystemCapability.Notification.ReminderAgent 887 * @since 9 888 */ 889 second?: number; 890 } 891} 892export default reminderAgentManager; 893