-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdeclarations.ts
86 lines (74 loc) · 2.24 KB
/
declarations.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
///<reference path="./.d.ts"/>
"use strict";
interface IiPhoneSimulator {
run(applicationPath: string, applicationIdentifier: string): void;
printDeviceTypes(): void;
printSDKS(): void;
sendNotification(notification: string): void;
createSimulator(): ISimulator;
}
interface ICommand {
execute(args: string[]): void;
}
interface ICommandExecutor {
execute(): void;
}
interface IDevice {
name: string;
id: string;
fullId: string;
runtimeVersion: string;
state?: string;
rawDevice?: any; // NodObjC wrapper to device
}
interface ISimctl {
launch(deviceId: string, applicationIdentifier: string): string;
terminate(deviceId: string, appIdentifier: string): string;
install(deviceId: string, applicationPath: string): void;
uninstall(deviceId: string, applicationIdentifier: string, opts?: any): void;
notifyPost(deviceId: string, notification: string): void;
getDevices(): IDevice[];
getLog(deviceId: string, predicate?: string): any;
getAppContainer(deviceId: string, applicationIdentifier: string): string;
}
interface IDictionary<T> {
[key: string]: T;
}
interface ISimulator extends INameGetter {
getDevices(): IDevice[];
getSdks(): ISdk[];
run(applicationPath: string, applicationIdentifier: string): void;
sendNotification(notification: string): void;
getApplicationPath(deviceId: string, applicationIdentifier: string): string;
getInstalledApplications(deviceId: string): IApplication[];
installApplication(deviceId: string, applicationPath: string): void;
uninstallApplication(deviceId: string, appIdentifier: string): void;
startApplication(deviceId: string, appIdentifier: string): string;
stopApplication(deviceId: string, appIdentifier: string, bundleExecutable: string): string;
printDeviceLog(deviceId: string, launchResult?: string): any;
getDeviceLogProcess(deviceId: string): any;
startSimulator(): void;
}
interface INameGetter {
getSimulatorName(deviceName?: string): string;
}
interface IApplication {
guid: string;
appIdentifier: string;
path: string;
}
interface IExecuteOptions {
canRunMainLoop: boolean;
appPath?: string;
applicationIdentifier?: string;
}
interface ISdk {
displayName: string;
version: string;
rootPath?: string;
}
interface IXcodeVersionData {
major: string;
minor: string;
build: string;
}