iotdata.d.ts
6.48 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import {Request} from '../lib/request';
import {Response} from '../lib/response';
import {AWSError} from '../lib/error';
import {Service} from '../lib/service';
import {ServiceConfigurationOptions} from '../lib/service';
import {ConfigBase as Config} from '../lib/config-base';
interface Blob {}
declare class IotData extends Service {
/**
* Constructs a service object. This object has one method for each API operation.
*/
constructor(options?: IotData.Types.ClientConfiguration)
config: Config & IotData.Types.ClientConfiguration;
/**
* Deletes the shadow for the specified thing. For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
*/
deleteThingShadow(params: IotData.Types.DeleteThingShadowRequest, callback?: (err: AWSError, data: IotData.Types.DeleteThingShadowResponse) => void): Request<IotData.Types.DeleteThingShadowResponse, AWSError>;
/**
* Deletes the shadow for the specified thing. For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
*/
deleteThingShadow(callback?: (err: AWSError, data: IotData.Types.DeleteThingShadowResponse) => void): Request<IotData.Types.DeleteThingShadowResponse, AWSError>;
/**
* Gets the shadow for the specified thing. For more information, see GetThingShadow in the AWS IoT Developer Guide.
*/
getThingShadow(params: IotData.Types.GetThingShadowRequest, callback?: (err: AWSError, data: IotData.Types.GetThingShadowResponse) => void): Request<IotData.Types.GetThingShadowResponse, AWSError>;
/**
* Gets the shadow for the specified thing. For more information, see GetThingShadow in the AWS IoT Developer Guide.
*/
getThingShadow(callback?: (err: AWSError, data: IotData.Types.GetThingShadowResponse) => void): Request<IotData.Types.GetThingShadowResponse, AWSError>;
/**
* Lists the shadows for the specified thing.
*/
listNamedShadowsForThing(params: IotData.Types.ListNamedShadowsForThingRequest, callback?: (err: AWSError, data: IotData.Types.ListNamedShadowsForThingResponse) => void): Request<IotData.Types.ListNamedShadowsForThingResponse, AWSError>;
/**
* Lists the shadows for the specified thing.
*/
listNamedShadowsForThing(callback?: (err: AWSError, data: IotData.Types.ListNamedShadowsForThingResponse) => void): Request<IotData.Types.ListNamedShadowsForThingResponse, AWSError>;
/**
* Publishes state information. For more information, see HTTP Protocol in the AWS IoT Developer Guide.
*/
publish(params: IotData.Types.PublishRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Publishes state information. For more information, see HTTP Protocol in the AWS IoT Developer Guide.
*/
publish(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Updates the shadow for the specified thing. For more information, see UpdateThingShadow in the AWS IoT Developer Guide.
*/
updateThingShadow(params: IotData.Types.UpdateThingShadowRequest, callback?: (err: AWSError, data: IotData.Types.UpdateThingShadowResponse) => void): Request<IotData.Types.UpdateThingShadowResponse, AWSError>;
/**
* Updates the shadow for the specified thing. For more information, see UpdateThingShadow in the AWS IoT Developer Guide.
*/
updateThingShadow(callback?: (err: AWSError, data: IotData.Types.UpdateThingShadowResponse) => void): Request<IotData.Types.UpdateThingShadowResponse, AWSError>;
}
declare namespace IotData {
export interface DeleteThingShadowRequest {
/**
* The name of the thing.
*/
thingName: ThingName;
/**
* The name of the shadow.
*/
shadowName?: ShadowName;
}
export interface DeleteThingShadowResponse {
/**
* The state information, in JSON format.
*/
payload: JsonDocument;
}
export interface GetThingShadowRequest {
/**
* The name of the thing.
*/
thingName: ThingName;
/**
* The name of the shadow.
*/
shadowName?: ShadowName;
}
export interface GetThingShadowResponse {
/**
* The state information, in JSON format.
*/
payload?: JsonDocument;
}
export type JsonDocument = Buffer|Uint8Array|Blob|string;
export interface ListNamedShadowsForThingRequest {
/**
* The name of the thing.
*/
thingName: ThingName;
/**
* The token to retrieve the next set of results.
*/
nextToken?: NextToken;
/**
* The result page size.
*/
pageSize?: PageSize;
}
export interface ListNamedShadowsForThingResponse {
/**
* The list of shadows for the specified thing.
*/
results?: NamedShadowList;
/**
* The token for the next set of results, or null if there are no additional results.
*/
nextToken?: NextToken;
/**
* The Epoch date and time the response was generated by AWS IoT.
*/
timestamp?: Timestamp;
}
export type NamedShadowList = ShadowName[];
export type NextToken = string;
export type PageSize = number;
export type Payload = Buffer|Uint8Array|Blob|string;
export interface PublishRequest {
/**
* The name of the MQTT topic.
*/
topic: Topic;
/**
* The Quality of Service (QoS) level.
*/
qos?: Qos;
/**
* The state information, in JSON format.
*/
payload?: Payload;
}
export type Qos = number;
export type ShadowName = string;
export type ThingName = string;
export type Timestamp = number;
export type Topic = string;
export interface UpdateThingShadowRequest {
/**
* The name of the thing.
*/
thingName: ThingName;
/**
* The name of the shadow.
*/
shadowName?: ShadowName;
/**
* The state information, in JSON format.
*/
payload: JsonDocument;
}
export interface UpdateThingShadowResponse {
/**
* The state information, in JSON format.
*/
payload?: JsonDocument;
}
/**
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
*/
export type apiVersion = "2015-05-28"|"latest"|string;
export interface ClientApiVersions {
/**
* A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
*/
apiVersion?: apiVersion;
}
export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
/**
* Contains interfaces for use with the IotData client.
*/
export import Types = IotData;
}
export = IotData;