|
2 | 2 |
|
3 | 3 | import type { PermissionState, PluginListenerHandle } from '@capacitor/core'; |
4 | 4 |
|
| 5 | +export type LocalNotificationPresentationOption = 'badge' | 'sound' | 'banner' | 'list'; |
| 6 | + |
5 | 7 | declare module '@capacitor/cli' { |
6 | 8 | export interface PluginsConfig { |
7 | 9 | /** |
8 | | - * On Android, the Local Notifications can be configured with the following options: |
| 10 | + * The Local Notifications can be configured with the following options: |
9 | 11 | */ |
10 | 12 | LocalNotifications?: { |
11 | 13 | /** |
@@ -47,6 +49,22 @@ declare module '@capacitor/cli' { |
47 | 49 | * @example "beep.wav" |
48 | 50 | */ |
49 | 51 | sound?: string; |
| 52 | + |
| 53 | + /** |
| 54 | + * This is an array of strings you can combine. Possible values in the array are: |
| 55 | + * - `badge`: badge count on the app icon is updated (default value) |
| 56 | + * - `sound`: the device will ring/vibrate when the notification is received |
| 57 | + * - `banner`: the notification is displayed as a banner |
| 58 | + * - `list`: the notification is displayed in the notification center |
| 59 | + * |
| 60 | + * An empty array can be provided if none of the options are desired. |
| 61 | + * |
| 62 | + * Only available for iOS. |
| 63 | + * |
| 64 | + * @since 8.2.0 |
| 65 | + * @example ["badge", "sound", "banner", "list"] |
| 66 | + */ |
| 67 | + presentationOptions?: LocalNotificationPresentationOption[]; |
50 | 68 | }; |
51 | 69 | } |
52 | 70 | } |
@@ -699,6 +717,34 @@ export interface LocalNotificationSchema { |
699 | 717 | */ |
700 | 718 | interruptionLevel?: InterruptionLevel; |
701 | 719 |
|
| 720 | + /** |
| 721 | + * The score the system uses to determine if the notification is the |
| 722 | + * featured notification when the system groups the app's notifications. |
| 723 | + * |
| 724 | + * The value must be between 0 and 1, where 0 is the least relevant and |
| 725 | + * 1 is the most relevant. The default value is 0. |
| 726 | + * |
| 727 | + * Sets `relevanceScore` on the |
| 728 | + * [`UNMutableNotificationContent`](https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent). |
| 729 | + * |
| 730 | + * Only available for iOS. |
| 731 | + * |
| 732 | + * @since 8.1.0 |
| 733 | + */ |
| 734 | + relevanceScore?: number; |
| 735 | + |
| 736 | + /** |
| 737 | + * The interruption level that indicates the priority and delivery timing of a notification. |
| 738 | + * |
| 739 | + * Sets `interruptionLevel` on the |
| 740 | + * [`UNMutableNotificationContent`](https://developer.apple.com/documentation/usernotifications/unmutablenotificationcontent). |
| 741 | + * |
| 742 | + * Only available for iOS. |
| 743 | + * |
| 744 | + * @since 8.1.0 |
| 745 | + */ |
| 746 | + interruptionLevel?: InterruptionLevel; |
| 747 | + |
702 | 748 | /** |
703 | 749 | * Used to group multiple notifications. |
704 | 750 | * |
|
0 commit comments