UNPKG

1.09 kBPlain TextView Raw
1import {
2 PermissionResponse as EXPermissionResponse,
3 PermissionStatus,
4 PermissionExpiration,
5} from 'expo-modules-core';
6
7export type PermissionType =
8 | 'camera'
9 | 'cameraRoll'
10 | 'mediaLibrary'
11 | 'mediaLibraryWriteOnly'
12 | 'audioRecording'
13 | 'location'
14 | 'locationForeground'
15 | 'locationBackground'
16 | 'userFacingNotifications'
17 | 'notifications'
18 | 'contacts'
19 | 'calendar'
20 | 'reminders'
21 | 'motion'
22 | 'systemBrightness';
23
24export interface PermissionResponse extends EXPermissionResponse {
25 permissions: PermissionMap;
26}
27
28export interface PermissionMap {
29 [permissionType: string /* PermissionType */]: PermissionInfo;
30}
31
32export interface PermissionInfo extends EXPermissionResponse {
33 /**
34 * iOS only - Permission.MEDIA_LIBRARY/MEDIA_LIBRARY_WRITE_ONLY
35 */
36 accessPrivileges?: 'all' | 'limited' | 'none';
37 scope?: 'whenInUse' | 'always' | 'none';
38 android?: PermissionDetailsLocationAndroid;
39}
40
41export { PermissionStatus };
42
43export { PermissionExpiration };
44
45export type PermissionDetailsLocationAndroid = {
46 accuracy: 'fine' | 'coarse' | 'none';
47};