UNPKG

5.01 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class IotData extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: IotData.Types.ClientConfiguration)
13 config: Config & IotData.Types.ClientConfiguration;
14 /**
15 * Deletes the thing shadow for the specified thing. For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
16 */
17 deleteThingShadow(params: IotData.Types.DeleteThingShadowRequest, callback?: (err: AWSError, data: IotData.Types.DeleteThingShadowResponse) => void): Request<IotData.Types.DeleteThingShadowResponse, AWSError>;
18 /**
19 * Deletes the thing shadow for the specified thing. For more information, see DeleteThingShadow in the AWS IoT Developer Guide.
20 */
21 deleteThingShadow(callback?: (err: AWSError, data: IotData.Types.DeleteThingShadowResponse) => void): Request<IotData.Types.DeleteThingShadowResponse, AWSError>;
22 /**
23 * Gets the thing shadow for the specified thing. For more information, see GetThingShadow in the AWS IoT Developer Guide.
24 */
25 getThingShadow(params: IotData.Types.GetThingShadowRequest, callback?: (err: AWSError, data: IotData.Types.GetThingShadowResponse) => void): Request<IotData.Types.GetThingShadowResponse, AWSError>;
26 /**
27 * Gets the thing shadow for the specified thing. For more information, see GetThingShadow in the AWS IoT Developer Guide.
28 */
29 getThingShadow(callback?: (err: AWSError, data: IotData.Types.GetThingShadowResponse) => void): Request<IotData.Types.GetThingShadowResponse, AWSError>;
30 /**
31 * Publishes state information. For more information, see HTTP Protocol in the AWS IoT Developer Guide.
32 */
33 publish(params: IotData.Types.PublishRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
34 /**
35 * Publishes state information. For more information, see HTTP Protocol in the AWS IoT Developer Guide.
36 */
37 publish(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
38 /**
39 * Updates the thing shadow for the specified thing. For more information, see UpdateThingShadow in the AWS IoT Developer Guide.
40 */
41 updateThingShadow(params: IotData.Types.UpdateThingShadowRequest, callback?: (err: AWSError, data: IotData.Types.UpdateThingShadowResponse) => void): Request<IotData.Types.UpdateThingShadowResponse, AWSError>;
42 /**
43 * Updates the thing shadow for the specified thing. For more information, see UpdateThingShadow in the AWS IoT Developer Guide.
44 */
45 updateThingShadow(callback?: (err: AWSError, data: IotData.Types.UpdateThingShadowResponse) => void): Request<IotData.Types.UpdateThingShadowResponse, AWSError>;
46}
47declare namespace IotData {
48 export interface DeleteThingShadowRequest {
49 /**
50 * The name of the thing.
51 */
52 thingName: ThingName;
53 }
54 export interface DeleteThingShadowResponse {
55 /**
56 * The state information, in JSON format.
57 */
58 payload: JsonDocument;
59 }
60 export interface GetThingShadowRequest {
61 /**
62 * The name of the thing.
63 */
64 thingName: ThingName;
65 }
66 export interface GetThingShadowResponse {
67 /**
68 * The state information, in JSON format.
69 */
70 payload?: JsonDocument;
71 }
72 export type JsonDocument = Buffer|Uint8Array|Blob|string;
73 export type Payload = Buffer|Uint8Array|Blob|string;
74 export interface PublishRequest {
75 /**
76 * The name of the MQTT topic.
77 */
78 topic: Topic;
79 /**
80 * The Quality of Service (QoS) level.
81 */
82 qos?: Qos;
83 /**
84 * The state information, in JSON format.
85 */
86 payload?: Payload;
87 }
88 export type Qos = number;
89 export type ThingName = string;
90 export type Topic = string;
91 export interface UpdateThingShadowRequest {
92 /**
93 * The name of the thing.
94 */
95 thingName: ThingName;
96 /**
97 * The state information, in JSON format.
98 */
99 payload: JsonDocument;
100 }
101 export interface UpdateThingShadowResponse {
102 /**
103 * The state information, in JSON format.
104 */
105 payload?: JsonDocument;
106 }
107 /**
108 * 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.
109 */
110 export type apiVersion = "2015-05-28"|"latest"|string;
111 export interface ClientApiVersions {
112 /**
113 * 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.
114 */
115 apiVersion?: apiVersion;
116 }
117 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
118 /**
119 * Contains interfaces for use with the IotData client.
120 */
121 export import Types = IotData;
122}
123export = IotData;