forked from richinfante/iphonebackuptools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
90 lines (80 loc) · 2.26 KB
/
index.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
export interface BackupReport {
udid: string;
encrypted: boolean;
date: string;
deviceName: string;
serialNumber: string;
iOSVersion: string;
backupVersion: string;
}
export interface Call {
id: number;
date: string;
answered: boolean;
originated: boolean;
callType: string;
duration: string;
location: string;
country: string;
service: string;
address: string;
}
export interface SMSMessage {
id: number;
date: string;
sender: string;
text: string;
dateRead: string;
dateDelivered: string;
isDelivered: boolean;
isFinished: boolean;
isFromMe: boolean;
isRead: boolean;
isSent: boolean;
attachments: any[];
}
export interface SMSChat {
id: number;
date: string;
service: string;
chatName: string;
displayName: string;
messages: SMSMessage[];
}
export interface Contact {
id: number;
first: string;
last: string;
organization: string | null;
phoneWork: string | null;
phoneMobile: string | null;
phoneHome: string | null;
iphone: string | null;
email: string | null;
createdDate: string;
note: string | null;
picture: boolean;
picture_file: string | null;
services: {
google_profile: string | null;
icloud: string | null;
service: string | null;
username: string | null;
url: string | null;
};
address: string | null;
city: string | null;
}
declare function run(command: "backups.list"): Promise<BackupReport[]>;
declare function run(command: "messages.all", options: { backup: string }): Promise<SMSChat[]>;
declare function run(command: "phone.calls", options: { backup: string }): Promise<Call[]>;
declare function run(command: "phone.address_book", options: { backup: string }): Promise<Contact[]>;
declare function configure(options: { base: string; id: string; password: string; }): Promise<void>;
declare function releaseConnections(options: { base: string; id: string; password: string; }): Promise<void>;
export interface Ibackuptool {
configure: typeof configure;
run: typeof run;
releaseConnections: typeof releaseConnections;
}
declare const ibackuptool: Ibackuptool;
export = ibackuptool;