Type for permissions in DeviceLanchAppConfig (#37498)

This commit is contained in:
Sargis Azaryan
2019-08-14 00:26:15 +02:00
committed by Pranav Senthilnathan
parent 1881c7eaad
commit 6a9b457fb1

View File

@@ -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.