-
Notifications
You must be signed in to change notification settings - Fork 44
/
index.d.ts
35 lines (32 loc) · 1.5 KB
/
index.d.ts
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
// Type definitions for node-mac-permissions
// Project: node-mac-permissions
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 askForFoldersAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForFullDiskAccess(): undefined
export function askForInputMonitoringAccess(accessType?: 'listen' | 'post'): 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'
export type AuthType =
| 'accessibility'
| 'bluetooth'
| 'calendar'
| 'camera'
| 'contacts'
| 'full-disk-access'
| 'input-monitoring'
| 'location'
| 'microphone'
| 'music-library'
| 'photos-add-only'
| 'photos-read-write'
| 'reminders'
| 'speech-recognition'
| 'screen'
export type PermissionType = 'authorized' | 'denied' | 'restricted'