1 | import {
|
2 | PermissionResponse as EXPermissionResponse,
|
3 | PermissionStatus,
|
4 | PermissionExpiration,
|
5 | } from 'expo-modules-core';
|
6 |
|
7 | export 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 |
|
24 | export interface PermissionResponse extends EXPermissionResponse {
|
25 | permissions: PermissionMap;
|
26 | }
|
27 |
|
28 | export interface PermissionMap {
|
29 | [permissionType: string ]: PermissionInfo;
|
30 | }
|
31 |
|
32 | export interface PermissionInfo extends EXPermissionResponse {
|
33 | |
34 |
|
35 |
|
36 | accessPrivileges?: 'all' | 'limited' | 'none';
|
37 | scope?: 'whenInUse' | 'always' | 'none';
|
38 | android?: PermissionDetailsLocationAndroid;
|
39 | }
|
40 |
|
41 | export { PermissionStatus };
|
42 |
|
43 | export { PermissionExpiration };
|
44 |
|
45 | export type PermissionDetailsLocationAndroid = {
|
46 | accuracy: 'fine' | 'coarse' | 'none';
|
47 | };
|