mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
0ee2a86129
* refactor: extract contracts workspace package * fix: preserve screenshot diff result contract * test: stabilize Android keyboard smoke
61 lines
1.5 KiB
TypeScript
61 lines
1.5 KiB
TypeScript
// The public API vocabulary for device settings and permission grants.
|
|
|
|
import type { DeviceCommandBaseOptions } from './client-connection.ts';
|
|
|
|
export type PermissionTarget =
|
|
| 'camera'
|
|
| 'microphone'
|
|
| 'photos'
|
|
| 'contacts'
|
|
| 'contacts-limited'
|
|
| 'notifications'
|
|
| 'calendar'
|
|
| 'location'
|
|
| 'location-always'
|
|
| 'media-library'
|
|
| 'motion'
|
|
| 'reminders'
|
|
| 'siri'
|
|
| 'accessibility'
|
|
| 'screen-recording'
|
|
| 'input-monitoring';
|
|
|
|
export type SettingsUpdateOptions =
|
|
| (DeviceCommandBaseOptions & {
|
|
setting: 'clear-app-state';
|
|
state: 'clear';
|
|
app?: string;
|
|
})
|
|
| (DeviceCommandBaseOptions & {
|
|
setting: 'wifi' | 'airplane' | 'location';
|
|
state: 'on' | 'off';
|
|
})
|
|
| (DeviceCommandBaseOptions & {
|
|
setting: 'location';
|
|
state: 'set';
|
|
latitude: number;
|
|
longitude: number;
|
|
})
|
|
| (DeviceCommandBaseOptions & {
|
|
setting: 'animations';
|
|
state: 'on' | 'off';
|
|
})
|
|
| (DeviceCommandBaseOptions & {
|
|
setting: 'appearance';
|
|
state: 'light' | 'dark' | 'toggle';
|
|
})
|
|
| (DeviceCommandBaseOptions & {
|
|
setting: 'faceid' | 'touchid';
|
|
state: 'match' | 'nonmatch' | 'enroll' | 'unenroll';
|
|
})
|
|
| (DeviceCommandBaseOptions & {
|
|
setting: 'fingerprint';
|
|
state: 'match' | 'nonmatch';
|
|
})
|
|
| (DeviceCommandBaseOptions & {
|
|
setting: 'permission';
|
|
state: 'grant' | 'deny' | 'reset';
|
|
permission: PermissionTarget;
|
|
mode?: 'full' | 'limited';
|
|
});
|