-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathinterfaces.d.ts
161 lines (128 loc) · 4.2 KB
/
interfaces.d.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
import { Transform, TransformOptions } from "stream";
declare global {
namespace IOSDeviceLib {
interface IDeviceActionInfo {
deviceId: string;
event: string;
deviceColor?: string;
deviceName?: string;
productType?: string;
productVersion?: string;
status?: string;
isUSBConnected: number;
isWiFiConnected: number;
}
interface IDeviceId {
deviceId: string;
}
interface IAppId {
appId: string;
}
interface IAppDevice extends IDeviceId, IAppId {
}
interface IDestination {
destination: string;
}
interface ISource {
source: string;
}
interface IReadOperationData extends IAppDevice {
path: string;
}
interface IFileData extends ISource, IDestination {
}
interface IFileOperationData extends IAppDevice, IFileData {
}
interface IUploadFilesData extends IAppDevice {
files: IFileData[];
}
interface IDeleteFileData extends IAppDevice, IDestination {
}
interface IDdiApplicationData extends IAppDevice {
ddi: string;
}
interface IIOSApplicationData extends IDdiApplicationData {
waitForDebugger?: string;
}
interface IPostNotificationData extends IDeviceId {
commandType: string;
notificationName: string;
}
interface IAwaitNotificatioNResponseData extends IDeviceId {
responseCommandType: string;
responsePropertyName: string;
socket: number;
timeout: number;
}
interface IDeviceResponse extends IDeviceId {
response: string;
}
interface IDeviceMultipleResponse extends IDeviceId {
response: string[];
}
interface IApplicationInfo {
CFBundleIdentifier: string;
IceniumLiveSyncEnabled: boolean;
configuration: string;
}
interface IDeviceAppInfo extends IDeviceId {
response: IApplicationInfo[];
}
interface IMessage {
message: string;
}
interface IDeviceLogData extends IDeviceId, IMessage {
}
interface IDeviceApplication {
CFBundleExecutable: string;
Path: string;
}
interface IDeviceLookupInfo extends IDeviceId {
response: { [key: string]: IDeviceApplication };
}
interface IDeviceError extends Error {
deviceId: string;
}
interface IConnectToPortData extends IDeviceId {
port: number;
}
interface ISocketData extends IDeviceId {
socket: number;
}
interface ISendMessageToSocketData extends ISocketData, IMessage {
}
interface IReceiveMessagesFromSocketData extends ISocketData {
callback: SocketMessageHandler;
context: any;
}
interface ISocketMessage extends ISocketData, IMessage {
}
interface IConnectToPortResponse extends IDeviceId {
host: string;
port: number;
}
interface IOSDeviceLib extends NodeJS.EventEmitter {
new(onDeviceFound: (found: IDeviceActionInfo) => void, onDeviceUpdated: (updated: IDeviceActionInfo) => void, onDeviceLost: (found: IDeviceActionInfo) => void): IOSDeviceLib;
install(ipaPath: string, deviceIdentifiers: string[]): Promise<IDeviceResponse>[];
uninstall(ipaPath: string, deviceIdentifiers: string[]): Promise<IDeviceResponse>[];
list(listArray: IReadOperationData[]): Promise<IDeviceMultipleResponse>[];
upload(uploadArray: IUploadFilesData[]): Promise<IDeviceResponse>[];
download(downloadArray: IFileOperationData[]): Promise<IDeviceResponse>[];
read(readArray: IReadOperationData[]): Promise<IDeviceResponse>[];
delete(deleteArray: IDeleteFileData[]): Promise<IDeviceResponse>[];
postNotification(postNotificationArray: IPostNotificationData[]): Promise<IDeviceResponse>[];
awaitNotificationResponse(awaitNotificationResponseArray: IAwaitNotificatioNResponseData[]): Promise<IDeviceResponse>[];
apps(deviceIdentifiers: string[]): Promise<IDeviceAppInfo>[];
start(startArray: IIOSApplicationData[]): Promise<IDeviceResponse>[];
stop(stopArray: IIOSApplicationData[]): Promise<IDeviceResponse>[];
startDeviceLog(deviceIdentifiers: string[]): void;
connectToPort(connectToPortArray: IConnectToPortData[]): Promise<IConnectToPortResponse>[];
dispose(signal?: string): void;
on(event: "deviceLogData", listener: (response: IDeviceLogData) => void): this;
}
type SocketMessageHandler = (message: ISocketMessage) => void;
interface MessageUnpackStream extends Transform {
new(opts?: TransformOptions): MessageUnpackStream;
}
}
}