mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
Type for permissions in DeviceLanchAppConfig (#37498)
This commit is contained in:
committed by
Pranav Senthilnathan
parent
1881c7eaad
commit
6a9b457fb1
39
types/detox/index.d.ts
vendored
39
types/detox/index.d.ts
vendored
@@ -423,6 +423,43 @@ declare global {
|
||||
*/
|
||||
reuse?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Source for string definitions is https://github.com/wix/AppleSimulatorUtils
|
||||
*/
|
||||
interface DevicePermissions {
|
||||
location?: LocationPermission;
|
||||
notifications?: NotificationsPermission;
|
||||
calendar?: CalendarPermission;
|
||||
camera?: CameraPermission;
|
||||
contacts?: ContactsPermission;
|
||||
health?: HealthPermission;
|
||||
homekit?: HomekitPermission;
|
||||
medialibrary?: MediaLibraryPermission;
|
||||
microphone?: MicrophonePermission;
|
||||
motion?: MotionPermission;
|
||||
photos?: PhotosPermission;
|
||||
reminders?: RemindersPermission;
|
||||
siri?: SiriPermission;
|
||||
speech?: SpeechPermission;
|
||||
}
|
||||
|
||||
type LocationPermission = "always" | "inuse" | "never" | "unset";
|
||||
type PermissionState = "YES" | "NO" | "unset";
|
||||
type CameraPermission = PermissionState;
|
||||
type ContactsPermission = PermissionState;
|
||||
type CalendarPermission = PermissionState;
|
||||
type HealthPermission = PermissionState;
|
||||
type HomekitPermission = PermissionState;
|
||||
type MediaLibraryPermission = PermissionState;
|
||||
type MicrophonePermission = PermissionState;
|
||||
type MotionPermission = PermissionState;
|
||||
type PhotosPermission = PermissionState;
|
||||
type RemindersPermission = PermissionState;
|
||||
type SiriPermission = PermissionState;
|
||||
type SpeechPermission = PermissionState;
|
||||
type NotificationsPermission = PermissionState;
|
||||
|
||||
interface DeviceLanchAppConfig {
|
||||
/**
|
||||
* Restart the app
|
||||
@@ -433,7 +470,7 @@ declare global {
|
||||
* Set runtime permissions
|
||||
* Grant or deny runtime permissions for your application.
|
||||
*/
|
||||
permissions?: any;
|
||||
permissions?: DevicePermissions;
|
||||
/**
|
||||
* Launch from URL
|
||||
* Mock opening the app from URL to test your app's deep link handling mechanism.
|
||||
|
||||
Reference in New Issue
Block a user