iotdata.d.ts (4988B)
1 import {Request} from '../lib/request'; 2 import {Response} from '../lib/response'; 3 import {AWSError} from '../lib/error'; 4 import {Service} from '../lib/service'; 5 import {ServiceConfigurationOptions} from '../lib/service'; 6 import {ConfigBase as Config} from '../lib/config'; 7 interface Blob {} 8 declare 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 } 47 declare namespace IotData.Types { 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 type ErrorMessage = string; 61 export interface GetThingShadowRequest { 62 /** 63 * The name of the thing. 64 */ 65 thingName: ThingName; 66 } 67 export interface GetThingShadowResponse { 68 /** 69 * The state information, in JSON format. 70 */ 71 payload?: JsonDocument; 72 } 73 export type JsonDocument = Buffer|Uint8Array|Blob|string; 74 export type Payload = Buffer|Uint8Array|Blob|string; 75 export interface PublishRequest { 76 /** 77 * The name of the MQTT topic. 78 */ 79 topic: Topic; 80 /** 81 * The Quality of Service (QoS) level. 82 */ 83 qos?: Qos; 84 /** 85 * The state information, in JSON format. 86 */ 87 payload?: Payload; 88 } 89 export type Qos = number; 90 export type ThingName = string; 91 export type Topic = string; 92 export interface UpdateThingShadowRequest { 93 /** 94 * The name of the thing. 95 */ 96 thingName: ThingName; 97 /** 98 * The state information, in JSON format. 99 */ 100 payload: JsonDocument; 101 } 102 export interface UpdateThingShadowResponse { 103 /** 104 * The state information, in JSON format. 105 */ 106 payload?: JsonDocument; 107 } 108 export type errorMessage = string; 109 /** 110 * 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. 111 */ 112 export type apiVersion = "2015-05-28"|"latest"|string; 113 export interface ClientApiVersions { 114 /** 115 * 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. 116 */ 117 apiVersion?: apiVersion; 118 } 119 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions; 120 } 121 export = IotData;