-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathconstants.d.ts
90 lines (82 loc) · 2.23 KB
/
constants.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
/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Minimum TypeScript Version: 3.0
/**
* Main interfaces to access local home platform functionality.
* @preferred
*/
declare namespace smarthome {
// Placeholder enum. Actual implementation depends on integration.
enum Intents {}
/**
* Common data type enumerations.
*/
namespace Constants {
/**
* Radio types, useful for apps in deciding the transport to use.
*/
enum RadioType {
BLE = 'BLE',
WIFI = 'WIFI',
}
/**
* Protocol to be used in commands while communicating with the SDK.
* This value is handled automatically by the SDK when using
* [[BleRequestData]], [[HttpRequestData]], [[TcpRequestData]], and
* [[UdpRequestData]].
*/
enum Protocol {
BLE = 'BLE',
HTTP = 'HTTP',
TCP = 'TCP',
UDP = 'UDP',
}
/**
* Supported operations by BLE transport.
*/
enum BleOperation {
CREATE_BOND = 'CREATE_BOND',
DISCONNECT = 'DISCONNECT',
READ = 'READ',
REGISTER_FOR_NOTIFICATIONS = 'REGISTER_FOR_NOTIFICATIONS',
REMOVE_BOND = 'REMOVE_BOND',
REQUEST_MTU = 'REQUEST_MTU',
WRITE = 'WRITE',
WRITE_WITHOUT_RESPONSE = 'WRITE_WITHOUT_RESPONSE',
}
/**
* HTTP transport methods supported by [[HttpRequestData]].
*/
enum HttpOperation {
GET = 'GET',
POST = 'POST',
PUT = 'PUT',
}
/**
* TCP transport methods supported by [[TcpRequestData]].
*/
enum TcpOperation {
READ = 'READ',
WRITE = 'WRITE',
}
/** Supported event types. */
enum EventType {
AUTOCONNECT = 'autoconnect',
DISCONNECT = 'disconnect',
}
}
}