Skip to content

Commit 45b7f89

Browse files
nsolterNicholas Solter
andauthored
Fixes 418: adds documentation and type definitions for interruptionLe… (#419)
Co-authored-by: Nicholas Solter <[email protected]>
1 parent 32dbeef commit 45b7f89

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,9 @@ request is an object containing:
357357
- `criticalSoundVolume` : A number between 0 and 1 for volume of critical notification. Default volume will be used if not specified.
358358
- `userInfo` : An object containing additional notification data.
359359
- `isTimeZoneAgnostic` : If true, fireDate adjusted automatically upon time zone changes (e.g. for an alarm clock).
360+
- `interruptionLevel` (iOS15+): A string specifying the interruption level. Valid values are `'active'`, `'passive'`, `'timeSensitive'`, or `'critical'`
360361

361-
request.repeatsComponent is an object containing (each field is optionnal):
362+
request.repeatsComponent is an object containing (each field is optional):
362363

363364
- `year`: Will repeat every selected year in your fireDate.
364365
- `month`: Will repeat every selected month in your fireDate.

index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,11 @@ export type NotificationRequest = {
203203
* Optional data to be added to the notification
204204
*/
205205
userInfo?: Record<string, any>;
206+
/**
207+
* The interruption level for the notification.
208+
* Possible values: 'passive', 'active', 'timeSensitive', 'critical'
209+
*/
210+
interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical',
206211
};
207212

208213
/**

js/types.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ export type NotificationRequest = {|
7878
* FireDate adjusted automatically upon time zone changes (e.g. for an alarm clock).
7979
*/
8080
isTimeZoneAgnostic?: boolean,
81+
/**
82+
* The interruption level for the notification.
83+
* Possible values: 'passive', 'active', 'timeSensitive', 'critical'
84+
*/
85+
interruptionLevel?: 'passive' | 'active' | 'timeSensitive' | 'critical',
8186
|};
8287

8388
/**

0 commit comments

Comments
 (0)