Skip to content

Commit

Permalink
chore(types): update ts defs
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Apr 25, 2022
1 parent a23b473 commit f419d22
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
// Type definitions for node-mac-permissions
// Project: node-mac-permissions

export function askForCalendarAccess(): Promise<'authorized' | 'denied'>
export function askForContactsAccess(): Promise<'authorized' | 'denied'>
export function askForFoldersAccess(): Promise<'authorized' | 'denied'>
export function askForCalendarAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForContactsAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForFoldersAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForFullDiskAccess(): undefined
export function askForRemindersAccess(): Promise<'authorized' | 'denied'>
export function askForCameraAccess(): Promise<'authorized' | 'denied' | 'restricted'>
export function askForMicrophoneAccess(): Promise<'authorized' | 'denied' | 'restricted'>
export function askForPhotosAccess(): Promise<'authorized' | 'denied' | 'restricted'>
export function askForSpeechRecognitionAccess(): Promise<'authorized' | 'denied'>
export function askForRemindersAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForCameraAccess(): Promise<PermissionType>
export function askForMicrophoneAccess(): Promise<PermissionType>
export function askForPhotosAccess(): Promise<PermissionType>
export function askForSpeechRecognitionAccess(): Promise<Omit<PermissionType, 'restricted'>>
export function askForScreenCaptureAccess(): undefined
export function askForAccessibilityAccess(): undefined
export function getAuthStatus(authType: AuthType): PermissionType
export function getAuthStatus(authType: AuthType): PermissionType | 'not determined'

export type AuthType =
| 'bluetooth'
| 'contacts'
| 'calendar'
| 'reminders'
Expand All @@ -23,8 +24,9 @@ export type AuthType =
| 'photos'
| 'speech-recognition'
| 'microphone'
| 'music-library'
| 'accessibility'
| 'location'
| 'screen'

export type PermissionType = 'not determined' | 'denied' | 'authorized' | 'restricted'
export type PermissionType = 'authorized' | 'denied' | 'restricted'

0 comments on commit f419d22

Please sign in to comment.