-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.d.ts
135 lines (113 loc) · 3.03 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
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
interface SmartcastPower {
currentMode(): Promise<any>;
}
interface SmartcastPairing {
initiate(deviceName?: string, deviceId?: string): Promise<any>;
pair(pin: string): Promise<any>;
useAuthToken(token: string): void;
}
interface SmartcastInput {
current(): Promise<any>;
list(): Promise<any>;
set(name: string): Promise<any>;
}
interface SmartcastControl {
volume: SmartcastControlVolume;
input: SmartcastControlInput;
channel: SmartcastControlChannel;
power: SmartcastControlPower;
keyCommand(codeset: number, code: number, action?: string): Promise<any>;
}
interface SmartcastControlVolume {
up(): Promise<any>;
down(): Promise<any>;
set(): Promise<any>;
mute(): Promise<any>;
unmute(): Promise<any>;
toggleMute(): Promise<any>;
}
interface SmartcastControlInput {
cycle(): Promise<any>;
}
interface SmartcastControlChannel {
up(): Promise<any>;
down(): Promise<any>;
previous(): Promise<any>;
}
interface SmartcastControlPower {
on(): Promise<any>;
off(): Promise<any>;
toggle(): Promise<any>;
}
interface SmartcastTimers {
get(): Promise<any>;
sleepTimer: SmartcastGetSet;
autoPowerOffTimer: SmartcastGetSet;
blankScreen: SmartcastGetExecute;
}
interface SmartcastGet {
get(): Promise<any>;
}
interface SmartcastGetSet {
get(): Promise<any>;
set(value: string): Promise<any>;
}
interface SmartcastGetExecute {
get(): Promise<any>;
execute(): Promise<any>;
}
interface SmartcastSettings {
picture: SmartcastSettingsPicture;
audio: SmartcastGet;
timers: SmartcastTimers;
network: SmartcastGet;
channels: SmartcastGet;
closedCaptions: SmartcastGet;
devices: SmartcastGet;
system: SmartcastSettingsSystem;
mobileDevices: SmartcastGet;
cast: SmartcastGet;
}
interface SmartcastSettingsPicture {
get(): Promise<any>;
size: SmartcastGet;
position: SmartcastGet;
modeEdit: SmartcastGet;
mode: SmartcastGetSet;
color: SmartcastSettingsPictureColor;
calibrationTests: SmartcastGet;
}
interface SmartcastSettingsPictureColor {
calibration: SmartcastGet;
tuner: SmartcastGet;
}
interface SmartcastSettingsSystem {
get(): Promise<any>;
information: SmartcastSettingsSystemInformation;
}
interface SmartcastSettingsSystemInformation {
get(): Promise<any>;
tv: SmartcastGet;
tuner: SmartcastGet;
network: SmartcastGet;
uli: SmartcastGet;
}
declare namespace smartcast {
export interface Device {
discover: (success: (discovery: Discovery) => void, error?: (error: any) => void, timeout?: number) => void;
new(ip: string, authKey?: string): Device;
power: SmartcastPower;
pairing: SmartcastPairing;
input: SmartcastInput;
control: SmartcastControl;
settings: SmartcastSettings;
}
export interface Discovery {
ip: string;
name: string;
manufacturer: string;
model: string;
}
}
declare var smartcast: smartcast.Device;
export = smartcast;