scriptable-testlab
Version:
A lightweight, efficient tool designed to manage and update scripts for Scriptable.
54 lines (46 loc) • 1.4 kB
text/typescript
/**
* Device related type definitions
*/
export type DeviceModel = 'iPhone' | 'iPad';
export interface DeviceOrientation {
readonly isInPortrait: boolean;
readonly isInPortraitUpsideDown: boolean;
readonly isInLandscapeLeft: boolean;
readonly isInLandscapeRight: boolean;
readonly isFaceUp: boolean;
readonly isFaceDown: boolean;
}
export interface DeviceBattery {
readonly level: number;
readonly isDischarging: boolean;
readonly isCharging: boolean;
readonly isFullyCharged: boolean;
}
export interface DeviceLocale {
readonly preferredLanguages: ReadonlyArray<string>;
readonly locale: string;
readonly language: string;
}
export interface DeviceAppearance {
readonly isUsingDarkAppearance: boolean;
}
export interface DeviceScreen {
readonly width: number;
readonly height: number;
}
export interface DeviceMockState {
readonly name: string;
readonly systemName: string;
readonly systemVersion: string;
readonly model: DeviceModel;
readonly screenSize: Readonly<DeviceScreen>;
readonly screenResolution: Readonly<DeviceScreen>;
readonly screenScale: number;
readonly screenBrightness: number;
readonly orientation: Readonly<DeviceOrientation>;
readonly battery: Readonly<DeviceBattery>;
readonly locale: Readonly<DeviceLocale>;
readonly appearance: Readonly<DeviceAppearance>;
readonly volume: number;
alertResponse?: number;
}