1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | import { ApiClientObjectMap } from '../../../common';
|
17 | export declare type SmartHomeV1Intents = 'action.devices.SYNC' | 'action.devices.QUERY' | 'action.devices.EXECUTE' | 'action.devices.DISCONNECT';
|
18 | export declare type SmartHomeV1ExecuteStatus = 'SUCCESS' | 'PENDING' | 'OFFLINE' | 'ERROR';
|
19 | export declare type SmartHomeV1ExecuteErrors = string;
|
20 | export interface SmartHomeV1SyncRequestInputs {
|
21 | intent: SmartHomeV1Intents;
|
22 | }
|
23 | export interface SmartHomeV1SyncRequest {
|
24 | requestId: string;
|
25 | inputs: SmartHomeV1SyncRequestInputs[];
|
26 | }
|
27 | export interface SmartHomeV1QueryRequestDevices {
|
28 | id: string;
|
29 | customData?: ApiClientObjectMap<any>;
|
30 | }
|
31 | export interface SmartHomeV1QueryRequestPayload {
|
32 | devices: SmartHomeV1QueryRequestDevices[];
|
33 | }
|
34 | export interface SmartHomeV1QueryRequestInputs {
|
35 | intent: SmartHomeV1Intents;
|
36 | payload: SmartHomeV1QueryRequestPayload;
|
37 | }
|
38 | export interface SmartHomeV1QueryRequest {
|
39 | requestId: string;
|
40 | inputs: SmartHomeV1QueryRequestInputs[];
|
41 | }
|
42 | export interface SmartHomeV1ExecuteRequestExecution {
|
43 | command: string;
|
44 | params?: ApiClientObjectMap<any>;
|
45 | challenge?: {
|
46 | pin?: string;
|
47 | ack?: boolean;
|
48 | };
|
49 | }
|
50 | export interface SmartHomeV1ExecuteRequestCommands {
|
51 | devices: SmartHomeV1QueryRequestDevices[];
|
52 | execution: SmartHomeV1ExecuteRequestExecution[];
|
53 | }
|
54 | export interface SmartHomeV1ExecuteRequestPayload {
|
55 | commands: SmartHomeV1ExecuteRequestCommands[];
|
56 | }
|
57 | export interface SmartHomeV1ExecuteRequestInputs {
|
58 | intent: SmartHomeV1Intents;
|
59 | payload: SmartHomeV1ExecuteRequestPayload;
|
60 | }
|
61 | export interface SmartHomeV1ExecuteRequest {
|
62 | requestId: string;
|
63 | inputs: SmartHomeV1ExecuteRequestInputs[];
|
64 | }
|
65 | export interface SmartHomeV1DisconnectRequest {
|
66 | requestId: string;
|
67 | inputs: {
|
68 | intent: 'action.devices.DISCONNECT';
|
69 | }[];
|
70 | }
|
71 | export declare type SmartHomeV1Request = SmartHomeV1SyncRequest | SmartHomeV1QueryRequest | SmartHomeV1ExecuteRequest | SmartHomeV1DisconnectRequest;
|
72 | export interface SmartHomeV1SyncName {
|
73 | defaultNames: string[];
|
74 | name: string;
|
75 | nicknames: string[];
|
76 | }
|
77 | export interface SmartHomeV1SyncDeviceInfo {
|
78 | manufacturer: string;
|
79 | model: string;
|
80 | hwVersion: string;
|
81 | swVersion: string;
|
82 | }
|
83 | export interface SmartHomeV1SyncOtherDeviceIds {
|
84 | agentId?: string;
|
85 | deviceId: string;
|
86 | }
|
87 | export interface SmartHomeV1SyncDevices {
|
88 | id: string;
|
89 | type: string;
|
90 | traits: string[];
|
91 | name: SmartHomeV1SyncName;
|
92 | willReportState: boolean;
|
93 | deviceInfo?: SmartHomeV1SyncDeviceInfo;
|
94 | attributes?: ApiClientObjectMap<any>;
|
95 | customData?: ApiClientObjectMap<any>;
|
96 | roomHint?: string;
|
97 | otherDeviceIds?: SmartHomeV1SyncOtherDeviceIds[];
|
98 | }
|
99 | export interface SmartHomeV1SyncPayload {
|
100 | agentUserId?: string;
|
101 | errorCode?: string;
|
102 | debugString?: string;
|
103 | devices: SmartHomeV1SyncDevices[];
|
104 | }
|
105 | export interface SmartHomeV1SyncResponse {
|
106 | requestId: string;
|
107 | payload: SmartHomeV1SyncPayload;
|
108 | }
|
109 | export interface SmartHomeV1QueryPayload {
|
110 | devices: ApiClientObjectMap<any>;
|
111 | }
|
112 | export interface SmartHomeV1QueryResponse {
|
113 | requestId: string;
|
114 | payload: SmartHomeV1QueryPayload;
|
115 | }
|
116 | export interface SmartHomeV1ExecuteResponseCommands {
|
117 | ids: string[];
|
118 | status: SmartHomeV1ExecuteStatus;
|
119 | errorCode?: SmartHomeV1ExecuteErrors;
|
120 | debugString?: string;
|
121 | states?: ApiClientObjectMap<any>;
|
122 | challengeNeeded?: {
|
123 | type: challengeType;
|
124 | };
|
125 | }
|
126 | export declare type challengeType = 'ackNeeded' | 'pinNeeded' | 'challengeFailedPinNeeded';
|
127 | export interface SmartHomeV1ExecutePayload {
|
128 | commands: SmartHomeV1ExecuteResponseCommands[];
|
129 | errorCode?: SmartHomeV1ExecuteErrors;
|
130 | debugString?: string;
|
131 | }
|
132 | export interface SmartHomeV1ExecuteResponse {
|
133 | requestId: string;
|
134 | payload: SmartHomeV1ExecutePayload;
|
135 | }
|
136 | export interface SmartHomeV1DisconnectResponse {
|
137 | }
|
138 | export declare type SmartHomeV1Response = SmartHomeV1SyncResponse | SmartHomeV1QueryResponse | SmartHomeV1ExecuteResponse | SmartHomeV1DisconnectResponse;
|
139 | export interface SmartHomeV1ReportStateRequest {
|
140 | requestId: string;
|
141 | agentUserId: string;
|
142 | payload: {
|
143 | devices: {
|
144 | states: ApiClientObjectMap<any>;
|
145 | };
|
146 | };
|
147 | }
|