Skip to content

Commit f419d22

Browse files
committed
chore(types): update ts defs
1 parent a23b473 commit f419d22

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

index.d.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
// Type definitions for node-mac-permissions
22
// Project: node-mac-permissions
33

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'>>
77
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'>>
1313
export function askForScreenCaptureAccess(): undefined
1414
export function askForAccessibilityAccess(): undefined
15-
export function getAuthStatus(authType: AuthType): PermissionType
15+
export function getAuthStatus(authType: AuthType): PermissionType | 'not determined'
1616

1717
export type AuthType =
18+
| 'bluetooth'
1819
| 'contacts'
1920
| 'calendar'
2021
| 'reminders'
@@ -23,8 +24,9 @@ export type AuthType =
2324
| 'photos'
2425
| 'speech-recognition'
2526
| 'microphone'
27+
| 'music-library'
2628
| 'accessibility'
2729
| 'location'
2830
| 'screen'
2931

30-
export type PermissionType = 'not determined' | 'denied' | 'authorized' | 'restricted'
32+
export type PermissionType = 'authorized' | 'denied' | 'restricted'

0 commit comments

Comments
 (0)