@aws-sdk/client-iot-data-plane 3.216.0 → 3.218.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/models/models_0.js +6 -1
- package/dist-cjs/protocols/Aws_restJson1.js +14 -2
- package/dist-es/models/models_0.js +5 -0
- package/dist-es/protocols/Aws_restJson1.js +15 -3
- package/dist-types/models/models_0.d.ts +45 -2
- package/dist-types/ts3.4/models/models_0.d.ts +14 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateThingShadowResponseFilterSensitiveLog = exports.UpdateThingShadowRequestFilterSensitiveLog = exports.PublishRequestFilterSensitiveLog = exports.ListRetainedMessagesResponseFilterSensitiveLog = exports.RetainedMessageSummaryFilterSensitiveLog = exports.ListRetainedMessagesRequestFilterSensitiveLog = exports.ListNamedShadowsForThingResponseFilterSensitiveLog = exports.ListNamedShadowsForThingRequestFilterSensitiveLog = exports.GetThingShadowResponseFilterSensitiveLog = exports.GetThingShadowRequestFilterSensitiveLog = exports.GetRetainedMessageResponseFilterSensitiveLog = exports.GetRetainedMessageRequestFilterSensitiveLog = exports.DeleteThingShadowResponseFilterSensitiveLog = exports.DeleteThingShadowRequestFilterSensitiveLog = exports.RequestEntityTooLargeException = exports.UnsupportedDocumentEncodingException = exports.UnauthorizedException = exports.ThrottlingException = exports.ServiceUnavailableException = exports.ResourceNotFoundException = exports.MethodNotAllowedException = exports.InvalidRequestException = exports.InternalFailureException = exports.ConflictException = void 0;
|
|
3
|
+
exports.UpdateThingShadowResponseFilterSensitiveLog = exports.UpdateThingShadowRequestFilterSensitiveLog = exports.PublishRequestFilterSensitiveLog = exports.ListRetainedMessagesResponseFilterSensitiveLog = exports.RetainedMessageSummaryFilterSensitiveLog = exports.ListRetainedMessagesRequestFilterSensitiveLog = exports.ListNamedShadowsForThingResponseFilterSensitiveLog = exports.ListNamedShadowsForThingRequestFilterSensitiveLog = exports.GetThingShadowResponseFilterSensitiveLog = exports.GetThingShadowRequestFilterSensitiveLog = exports.GetRetainedMessageResponseFilterSensitiveLog = exports.GetRetainedMessageRequestFilterSensitiveLog = exports.DeleteThingShadowResponseFilterSensitiveLog = exports.DeleteThingShadowRequestFilterSensitiveLog = exports.RequestEntityTooLargeException = exports.PayloadFormatIndicator = exports.UnsupportedDocumentEncodingException = exports.UnauthorizedException = exports.ThrottlingException = exports.ServiceUnavailableException = exports.ResourceNotFoundException = exports.MethodNotAllowedException = exports.InvalidRequestException = exports.InternalFailureException = exports.ConflictException = void 0;
|
|
4
4
|
const IoTDataPlaneServiceException_1 = require("./IoTDataPlaneServiceException");
|
|
5
5
|
class ConflictException extends IoTDataPlaneServiceException_1.IoTDataPlaneServiceException {
|
|
6
6
|
constructor(opts) {
|
|
@@ -119,6 +119,11 @@ class UnsupportedDocumentEncodingException extends IoTDataPlaneServiceException_
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
exports.UnsupportedDocumentEncodingException = UnsupportedDocumentEncodingException;
|
|
122
|
+
var PayloadFormatIndicator;
|
|
123
|
+
(function (PayloadFormatIndicator) {
|
|
124
|
+
PayloadFormatIndicator["UNSPECIFIED_BYTES"] = "UNSPECIFIED_BYTES";
|
|
125
|
+
PayloadFormatIndicator["UTF8_DATA"] = "UTF8_DATA";
|
|
126
|
+
})(PayloadFormatIndicator = exports.PayloadFormatIndicator || (exports.PayloadFormatIndicator = {}));
|
|
122
127
|
class RequestEntityTooLargeException extends IoTDataPlaneServiceException_1.IoTDataPlaneServiceException {
|
|
123
128
|
constructor(opts) {
|
|
124
129
|
super({
|
|
@@ -110,14 +110,23 @@ const serializeAws_restJson1ListRetainedMessagesCommand = async (input, context)
|
|
|
110
110
|
exports.serializeAws_restJson1ListRetainedMessagesCommand = serializeAws_restJson1ListRetainedMessagesCommand;
|
|
111
111
|
const serializeAws_restJson1PublishCommand = async (input, context) => {
|
|
112
112
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
113
|
-
const headers = {
|
|
113
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
114
114
|
"content-type": "application/octet-stream",
|
|
115
|
-
|
|
115
|
+
"x-amz-mqtt5-user-properties": [
|
|
116
|
+
() => isSerializableHeaderValue(input.userProperties),
|
|
117
|
+
() => context.base64Encoder(Buffer.from(smithy_client_1.LazyJsonString.fromObject(input.userProperties))),
|
|
118
|
+
],
|
|
119
|
+
"x-amz-mqtt5-payload-format-indicator": input.payloadFormatIndicator,
|
|
120
|
+
"x-amz-mqtt5-correlation-data": input.correlationData,
|
|
121
|
+
});
|
|
116
122
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/topics/{topic}";
|
|
117
123
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "topic", () => input.topic, "{topic}", false);
|
|
118
124
|
const query = map({
|
|
119
125
|
qos: [() => input.qos !== void 0, () => input.qos.toString()],
|
|
120
126
|
retain: [() => input.retain !== void 0, () => input.retain.toString()],
|
|
127
|
+
contentType: [, input.contentType],
|
|
128
|
+
responseTopic: [, input.responseTopic],
|
|
129
|
+
messageExpiry: [() => input.messageExpiry !== void 0, () => input.messageExpiry.toString()],
|
|
121
130
|
});
|
|
122
131
|
let body;
|
|
123
132
|
if (input.payload !== undefined) {
|
|
@@ -465,6 +474,9 @@ const deserializeAws_restJson1PublishCommandError = async (output, context) => {
|
|
|
465
474
|
case "MethodNotAllowedException":
|
|
466
475
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
467
476
|
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
477
|
+
case "ThrottlingException":
|
|
478
|
+
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
479
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
468
480
|
case "UnauthorizedException":
|
|
469
481
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
470
482
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
@@ -107,6 +107,11 @@ export class UnsupportedDocumentEncodingException extends __BaseException {
|
|
|
107
107
|
Object.setPrototypeOf(this, UnsupportedDocumentEncodingException.prototype);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
+
export var PayloadFormatIndicator;
|
|
111
|
+
(function (PayloadFormatIndicator) {
|
|
112
|
+
PayloadFormatIndicator["UNSPECIFIED_BYTES"] = "UNSPECIFIED_BYTES";
|
|
113
|
+
PayloadFormatIndicator["UTF8_DATA"] = "UTF8_DATA";
|
|
114
|
+
})(PayloadFormatIndicator || (PayloadFormatIndicator = {}));
|
|
110
115
|
export class RequestEntityTooLargeException extends __BaseException {
|
|
111
116
|
constructor(opts) {
|
|
112
117
|
super({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { IoTDataPlaneServiceException as __BaseException } from "../models/IoTDataPlaneServiceException";
|
|
4
4
|
import { ConflictException, InternalFailureException, InvalidRequestException, MethodNotAllowedException, RequestEntityTooLargeException, ResourceNotFoundException, ServiceUnavailableException, ThrottlingException, UnauthorizedException, UnsupportedDocumentEncodingException, } from "../models/models_0";
|
|
5
5
|
export const serializeAws_restJson1DeleteThingShadowCommand = async (input, context) => {
|
|
@@ -102,14 +102,23 @@ export const serializeAws_restJson1ListRetainedMessagesCommand = async (input, c
|
|
|
102
102
|
};
|
|
103
103
|
export const serializeAws_restJson1PublishCommand = async (input, context) => {
|
|
104
104
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
105
|
-
const headers = {
|
|
105
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
106
106
|
"content-type": "application/octet-stream",
|
|
107
|
-
|
|
107
|
+
"x-amz-mqtt5-user-properties": [
|
|
108
|
+
() => isSerializableHeaderValue(input.userProperties),
|
|
109
|
+
() => context.base64Encoder(Buffer.from(__LazyJsonString.fromObject(input.userProperties))),
|
|
110
|
+
],
|
|
111
|
+
"x-amz-mqtt5-payload-format-indicator": input.payloadFormatIndicator,
|
|
112
|
+
"x-amz-mqtt5-correlation-data": input.correlationData,
|
|
113
|
+
});
|
|
108
114
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/topics/{topic}";
|
|
109
115
|
resolvedPath = __resolvedPath(resolvedPath, input, "topic", () => input.topic, "{topic}", false);
|
|
110
116
|
const query = map({
|
|
111
117
|
qos: [() => input.qos !== void 0, () => input.qos.toString()],
|
|
112
118
|
retain: [() => input.retain !== void 0, () => input.retain.toString()],
|
|
119
|
+
contentType: [, input.contentType],
|
|
120
|
+
responseTopic: [, input.responseTopic],
|
|
121
|
+
messageExpiry: [() => input.messageExpiry !== void 0, () => input.messageExpiry.toString()],
|
|
113
122
|
});
|
|
114
123
|
let body;
|
|
115
124
|
if (input.payload !== undefined) {
|
|
@@ -449,6 +458,9 @@ const deserializeAws_restJson1PublishCommandError = async (output, context) => {
|
|
|
449
458
|
case "MethodNotAllowedException":
|
|
450
459
|
case "com.amazonaws.iotdataplane#MethodNotAllowedException":
|
|
451
460
|
throw await deserializeAws_restJson1MethodNotAllowedExceptionResponse(parsedOutput, context);
|
|
461
|
+
case "ThrottlingException":
|
|
462
|
+
case "com.amazonaws.iotdataplane#ThrottlingException":
|
|
463
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
452
464
|
case "UnauthorizedException":
|
|
453
465
|
case "com.amazonaws.iotdataplane#UnauthorizedException":
|
|
454
466
|
throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
|
|
1
|
+
import { ExceptionOptionType as __ExceptionOptionType, LazyJsonString as __LazyJsonString } from "@aws-sdk/smithy-client";
|
|
2
2
|
import { IoTDataPlaneServiceException as __BaseException } from "./IoTDataPlaneServiceException";
|
|
3
3
|
/**
|
|
4
4
|
* <p>The specified version does not match the version of the document.</p>
|
|
@@ -245,6 +245,10 @@ export interface ListRetainedMessagesResponse {
|
|
|
245
245
|
*/
|
|
246
246
|
nextToken?: string;
|
|
247
247
|
}
|
|
248
|
+
export declare enum PayloadFormatIndicator {
|
|
249
|
+
UNSPECIFIED_BYTES = "UNSPECIFIED_BYTES",
|
|
250
|
+
UTF8_DATA = "UTF8_DATA"
|
|
251
|
+
}
|
|
248
252
|
/**
|
|
249
253
|
* <p>The input for the Publish operation.</p>
|
|
250
254
|
*/
|
|
@@ -254,7 +258,7 @@ export interface PublishRequest {
|
|
|
254
258
|
*/
|
|
255
259
|
topic: string | undefined;
|
|
256
260
|
/**
|
|
257
|
-
* <p>The Quality of Service (QoS) level.</p>
|
|
261
|
+
* <p>The Quality of Service (QoS) level. The default QoS level is 0.</p>
|
|
258
262
|
*/
|
|
259
263
|
qos?: number;
|
|
260
264
|
/**
|
|
@@ -272,6 +276,45 @@ export interface PublishRequest {
|
|
|
272
276
|
* <code>true</code> deletes the retained message identified by <b>topic</b> from Amazon Web Services IoT Core.</p>
|
|
273
277
|
*/
|
|
274
278
|
payload?: Uint8Array;
|
|
279
|
+
/**
|
|
280
|
+
* <p>A JSON string that contains an array of JSON objects. If you don’t use Amazon Web Services SDK or CLI,
|
|
281
|
+
* you must encode the JSON string to base64 format before adding it to the HTTP header.
|
|
282
|
+
* <code>userProperties</code> is an HTTP header value in the API.</p>
|
|
283
|
+
* <p>The following example <code>userProperties</code> parameter is a JSON string which
|
|
284
|
+
* represents two User Properties. Note that it needs to be base64-encoded:</p>
|
|
285
|
+
* <p>
|
|
286
|
+
* <code>[{"deviceName": "alpha"}, {"deviceCnt": "45"}]</code>
|
|
287
|
+
* </p>
|
|
288
|
+
*/
|
|
289
|
+
userProperties?: __LazyJsonString | string;
|
|
290
|
+
/**
|
|
291
|
+
* <p>An <code>Enum</code> string value that indicates whether the payload is formatted as
|
|
292
|
+
* UTF-8. <code>payloadFormatIndicator</code> is an HTTP header value in the API.</p>
|
|
293
|
+
*/
|
|
294
|
+
payloadFormatIndicator?: PayloadFormatIndicator | string;
|
|
295
|
+
/**
|
|
296
|
+
* <p>A UTF-8 encoded string that describes the content of the publishing message.</p>
|
|
297
|
+
*/
|
|
298
|
+
contentType?: string;
|
|
299
|
+
/**
|
|
300
|
+
* <p>A UTF-8 encoded string that's used as the topic name for a response message. The response
|
|
301
|
+
* topic is used to describe the topic which the receiver should publish to as part of the
|
|
302
|
+
* request-response flow. The topic must not contain wildcard characters.</p>
|
|
303
|
+
*/
|
|
304
|
+
responseTopic?: string;
|
|
305
|
+
/**
|
|
306
|
+
* <p>The base64-encoded binary data used by the sender of the request message to identify which
|
|
307
|
+
* request the response message is for when it's received. <code>correlationData</code> is an
|
|
308
|
+
* HTTP header value in the API.</p>
|
|
309
|
+
*/
|
|
310
|
+
correlationData?: string;
|
|
311
|
+
/**
|
|
312
|
+
* <p>A user-defined integer value that represents the message expiry interval in seconds. If
|
|
313
|
+
* absent, the message doesn't expire. For more information about the limits of
|
|
314
|
+
* <code>messageExpiry</code>, see <a href="https://docs.aws.amazon.com/general/latest/gr/iot-core.html#message-broker-limits">Amazon Web Services IoT Core message broker and
|
|
315
|
+
* protocol limits and quotas </a> from the Amazon Web Services Reference Guide.</p>
|
|
316
|
+
*/
|
|
317
|
+
messageExpiry?: number;
|
|
275
318
|
}
|
|
276
319
|
/**
|
|
277
320
|
* <p>The payload exceeds the maximum size allowed.</p>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ExceptionOptionType as __ExceptionOptionType,
|
|
3
|
+
LazyJsonString as __LazyJsonString,
|
|
4
|
+
} from "@aws-sdk/smithy-client";
|
|
2
5
|
import { IoTDataPlaneServiceException as __BaseException } from "./IoTDataPlaneServiceException";
|
|
3
6
|
export declare class ConflictException extends __BaseException {
|
|
4
7
|
readonly name: "ConflictException";
|
|
@@ -111,11 +114,21 @@ export interface ListRetainedMessagesResponse {
|
|
|
111
114
|
retainedTopics?: RetainedMessageSummary[];
|
|
112
115
|
nextToken?: string;
|
|
113
116
|
}
|
|
117
|
+
export declare enum PayloadFormatIndicator {
|
|
118
|
+
UNSPECIFIED_BYTES = "UNSPECIFIED_BYTES",
|
|
119
|
+
UTF8_DATA = "UTF8_DATA",
|
|
120
|
+
}
|
|
114
121
|
export interface PublishRequest {
|
|
115
122
|
topic: string | undefined;
|
|
116
123
|
qos?: number;
|
|
117
124
|
retain?: boolean;
|
|
118
125
|
payload?: Uint8Array;
|
|
126
|
+
userProperties?: __LazyJsonString | string;
|
|
127
|
+
payloadFormatIndicator?: PayloadFormatIndicator | string;
|
|
128
|
+
contentType?: string;
|
|
129
|
+
responseTopic?: string;
|
|
130
|
+
correlationData?: string;
|
|
131
|
+
messageExpiry?: number;
|
|
119
132
|
}
|
|
120
133
|
export declare class RequestEntityTooLargeException extends __BaseException {
|
|
121
134
|
readonly name: "RequestEntityTooLargeException";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-iot-data-plane",
|
|
3
3
|
"description": "AWS SDK for JavaScript Iot Data Plane Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.218.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
21
21
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
22
|
-
"@aws-sdk/client-sts": "3.
|
|
22
|
+
"@aws-sdk/client-sts": "3.218.0",
|
|
23
23
|
"@aws-sdk/config-resolver": "3.215.0",
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.218.0",
|
|
25
25
|
"@aws-sdk/fetch-http-handler": "3.215.0",
|
|
26
26
|
"@aws-sdk/hash-node": "3.215.0",
|
|
27
27
|
"@aws-sdk/invalid-dependency": "3.215.0",
|