diff --git a/types/detox/index.d.ts b/types/detox/index.d.ts index 4e890c0cf1..ad9f864102 100644 --- a/types/detox/index.d.ts +++ b/types/detox/index.d.ts @@ -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.