-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathindex.d.ts
More file actions
42 lines (39 loc) · 1.97 KB
/
index.d.ts
File metadata and controls
42 lines (39 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Type definitions for node-mac-permissions
// Project: node-mac-permissions
export function askForAppleEventsAccess(targetAppBundleId: string, shouldPrompt?: boolean): Promise<Omit<PermissionType, 'restricted'>>
export function askForAccessibilityAccess(): undefined
export function askForCalendarAccess(accessType?: 'write-only' | 'full'): Promise<Omit<PermissionType, 'restricted'>>
export function askForCameraAccess(): Promise<PermissionType>
export function askForContactsAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForExternalStorageAccess(): Promise<PermissionType>
export function askForFocusStatusAccess(): Promise<PermissionType>
export function askForFoldersAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForFullDiskAccess(): undefined
export function askForInputMonitoringAccess(accessType?: 'listen' | 'post'): Promise<Omit<PermissionType, 'restricted'>>
export function askForLocationAccess(accessType?: 'when-in-use' | 'always'): Promise<Omit<PermissionType, 'restricted'>>
export function askForMicrophoneAccess(): Promise<PermissionType>
export function askForPhotosAccess(accessType?: 'add-only' | 'read-write'): Promise<PermissionType>
export function askForRemindersAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForSpeechRecognitionAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForScreenCaptureAccess(openPreferences?: boolean): undefined
export function getAuthStatus(authType: AuthType): PermissionType | 'not determined' | 'provisional' | 'limited'
export type AuthType =
| 'accessibility'
| 'bluetooth'
| 'calendar'
| 'camera'
| 'contacts'
| 'external-storage'
| 'focus-status'
| 'full-disk-access'
| 'input-monitoring'
| 'location'
| 'microphone'
| 'music-library'
| 'notifications'
| 'photos-add-only'
| 'photos-read-write'
| 'reminders'
| 'speech-recognition'
| 'screen'
export type PermissionType = 'authorized' | 'denied' | 'restricted'