1
1
// Type definitions for node-mac-permissions
2
2
// Project: node-mac-permissions
3
3
4
- export function askForCalendarAccess ( ) : Promise < 'authorized' | 'denied' >
5
- export function askForContactsAccess ( ) : Promise < 'authorized' | 'denied' >
6
- export function askForFoldersAccess ( ) : Promise < 'authorized' | 'denied' >
4
+ export function askForCalendarAccess ( ) : Promise < Omit < PermissionType , 'restricted' > >
5
+ export function askForContactsAccess ( ) : Promise < Omit < PermissionType , 'restricted' > >
6
+ export function askForFoldersAccess ( ) : Promise < Omit < PermissionType , 'restricted' > >
7
7
export function askForFullDiskAccess ( ) : undefined
8
- export function askForRemindersAccess ( ) : Promise < 'authorized' | 'denied' >
9
- export function askForCameraAccess ( ) : Promise < 'authorized' | 'denied' | 'restricted' >
10
- export function askForMicrophoneAccess ( ) : Promise < 'authorized' | 'denied' | 'restricted' >
11
- export function askForPhotosAccess ( ) : Promise < 'authorized' | 'denied' | 'restricted' >
12
- export function askForSpeechRecognitionAccess ( ) : Promise < 'authorized' | 'denied' >
8
+ export function askForRemindersAccess ( ) : Promise < Omit < PermissionType , 'restricted' > >
9
+ export function askForCameraAccess ( ) : Promise < PermissionType >
10
+ export function askForMicrophoneAccess ( ) : Promise < PermissionType >
11
+ export function askForPhotosAccess ( ) : Promise < PermissionType >
12
+ export function askForSpeechRecognitionAccess ( ) : Promise < Omit < PermissionType , 'restricted' > >
13
13
export function askForScreenCaptureAccess ( ) : undefined
14
14
export function askForAccessibilityAccess ( ) : undefined
15
- export function getAuthStatus ( authType : AuthType ) : PermissionType
15
+ export function getAuthStatus ( authType : AuthType ) : PermissionType | 'not determined'
16
16
17
17
export type AuthType =
18
+ | 'bluetooth'
18
19
| 'contacts'
19
20
| 'calendar'
20
21
| 'reminders'
@@ -23,8 +24,9 @@ export type AuthType =
23
24
| 'photos'
24
25
| 'speech-recognition'
25
26
| 'microphone'
27
+ | 'music-library'
26
28
| 'accessibility'
27
29
| 'location'
28
30
| 'screen'
29
31
30
- export type PermissionType = 'not determined' | 'denied' | 'authorized ' | 'restricted'
32
+ export type PermissionType = 'authorized' | 'denied ' | 'restricted'
0 commit comments