@aws-sdk/client-iot-data-plane 3.476.0 → 3.478.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/pagination/ListRetainedMessagesPaginator.js +2 -24
- package/dist-cjs/protocols/Aws_restJson1.js +68 -108
- package/dist-es/pagination/ListRetainedMessagesPaginator.js +2 -23
- package/dist-es/protocols/Aws_restJson1.js +69 -109
- package/dist-types/pagination/ListRetainedMessagesPaginator.d.ts +1 -1
- package/dist-types/ts3.4/pagination/ListRetainedMessagesPaginator.d.ts +3 -3
- package/package.json +7 -6
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListRetainedMessages = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ListRetainedMessagesCommand_1 = require("../commands/ListRetainedMessagesCommand");
|
|
5
6
|
const IoTDataPlaneClient_1 = require("../IoTDataPlaneClient");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListRetainedMessagesCommand_1.ListRetainedMessagesCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListRetainedMessages(config, input, ...additionalArguments) {
|
|
10
|
-
let token = config.startingToken || undefined;
|
|
11
|
-
let hasNext = true;
|
|
12
|
-
let page;
|
|
13
|
-
while (hasNext) {
|
|
14
|
-
input.nextToken = token;
|
|
15
|
-
input["maxResults"] = config.pageSize;
|
|
16
|
-
if (config.client instanceof IoTDataPlaneClient_1.IoTDataPlaneClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected IoTDataPlane | IoTDataPlaneClient");
|
|
21
|
-
}
|
|
22
|
-
yield page;
|
|
23
|
-
const prevToken = token;
|
|
24
|
-
token = page.nextToken;
|
|
25
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
exports.paginateListRetainedMessages = paginateListRetainedMessages;
|
|
7
|
+
exports.paginateListRetainedMessages = (0, core_1.createPaginator)(IoTDataPlaneClient_1.IoTDataPlaneClient, ListRetainedMessagesCommand_1.ListRetainedMessagesCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,173 +1,117 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.de_UpdateThingShadowCommand = exports.de_PublishCommand = exports.de_ListRetainedMessagesCommand = exports.de_ListNamedShadowsForThingCommand = exports.de_GetThingShadowCommand = exports.de_GetRetainedMessageCommand = exports.de_DeleteThingShadowCommand = exports.se_UpdateThingShadowCommand = exports.se_PublishCommand = exports.se_ListRetainedMessagesCommand = exports.se_ListNamedShadowsForThingCommand = exports.se_GetThingShadowCommand = exports.se_GetRetainedMessageCommand = exports.se_DeleteThingShadowCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const IoTDataPlaneServiceException_1 = require("../models/IoTDataPlaneServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const se_DeleteThingShadowCommand = async (input, context) => {
|
|
9
|
-
const
|
|
9
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
10
|
const headers = {};
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
b.bp("/things/{thingName}/shadow");
|
|
12
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
13
13
|
const query = (0, smithy_client_1.map)({
|
|
14
|
-
|
|
14
|
+
[_n]: [, input[_sN]],
|
|
15
15
|
});
|
|
16
16
|
let body;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
hostname,
|
|
20
|
-
port,
|
|
21
|
-
method: "DELETE",
|
|
22
|
-
headers,
|
|
23
|
-
path: resolvedPath,
|
|
24
|
-
query,
|
|
25
|
-
body,
|
|
26
|
-
});
|
|
17
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
18
|
+
return b.build();
|
|
27
19
|
};
|
|
28
20
|
exports.se_DeleteThingShadowCommand = se_DeleteThingShadowCommand;
|
|
29
21
|
const se_GetRetainedMessageCommand = async (input, context) => {
|
|
30
|
-
const
|
|
22
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
31
23
|
const headers = {};
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
b.bp("/retainedMessage/{topic}");
|
|
25
|
+
b.p("topic", () => input.topic, "{topic}", false);
|
|
34
26
|
let body;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
hostname,
|
|
38
|
-
port,
|
|
39
|
-
method: "GET",
|
|
40
|
-
headers,
|
|
41
|
-
path: resolvedPath,
|
|
42
|
-
body,
|
|
43
|
-
});
|
|
27
|
+
b.m("GET").h(headers).b(body);
|
|
28
|
+
return b.build();
|
|
44
29
|
};
|
|
45
30
|
exports.se_GetRetainedMessageCommand = se_GetRetainedMessageCommand;
|
|
46
31
|
const se_GetThingShadowCommand = async (input, context) => {
|
|
47
|
-
const
|
|
32
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
48
33
|
const headers = {};
|
|
49
|
-
|
|
50
|
-
|
|
34
|
+
b.bp("/things/{thingName}/shadow");
|
|
35
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
51
36
|
const query = (0, smithy_client_1.map)({
|
|
52
|
-
|
|
37
|
+
[_n]: [, input[_sN]],
|
|
53
38
|
});
|
|
54
39
|
let body;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
hostname,
|
|
58
|
-
port,
|
|
59
|
-
method: "GET",
|
|
60
|
-
headers,
|
|
61
|
-
path: resolvedPath,
|
|
62
|
-
query,
|
|
63
|
-
body,
|
|
64
|
-
});
|
|
40
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
41
|
+
return b.build();
|
|
65
42
|
};
|
|
66
43
|
exports.se_GetThingShadowCommand = se_GetThingShadowCommand;
|
|
67
44
|
const se_ListNamedShadowsForThingCommand = async (input, context) => {
|
|
68
|
-
const
|
|
45
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
69
46
|
const headers = {};
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
47
|
+
b.bp("/api/things/shadow/ListNamedShadowsForThing/{thingName}");
|
|
48
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
73
49
|
const query = (0, smithy_client_1.map)({
|
|
74
|
-
|
|
75
|
-
|
|
50
|
+
[_nT]: [, input[_nT]],
|
|
51
|
+
[_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
|
|
76
52
|
});
|
|
77
53
|
let body;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
hostname,
|
|
81
|
-
port,
|
|
82
|
-
method: "GET",
|
|
83
|
-
headers,
|
|
84
|
-
path: resolvedPath,
|
|
85
|
-
query,
|
|
86
|
-
body,
|
|
87
|
-
});
|
|
54
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
55
|
+
return b.build();
|
|
88
56
|
};
|
|
89
57
|
exports.se_ListNamedShadowsForThingCommand = se_ListNamedShadowsForThingCommand;
|
|
90
58
|
const se_ListRetainedMessagesCommand = async (input, context) => {
|
|
91
|
-
const
|
|
59
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
92
60
|
const headers = {};
|
|
93
|
-
|
|
61
|
+
b.bp("/retainedMessage");
|
|
94
62
|
const query = (0, smithy_client_1.map)({
|
|
95
|
-
|
|
96
|
-
|
|
63
|
+
[_nT]: [, input[_nT]],
|
|
64
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
97
65
|
});
|
|
98
66
|
let body;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
hostname,
|
|
102
|
-
port,
|
|
103
|
-
method: "GET",
|
|
104
|
-
headers,
|
|
105
|
-
path: resolvedPath,
|
|
106
|
-
query,
|
|
107
|
-
body,
|
|
108
|
-
});
|
|
67
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
68
|
+
return b.build();
|
|
109
69
|
};
|
|
110
70
|
exports.se_ListRetainedMessagesCommand = se_ListRetainedMessagesCommand;
|
|
111
71
|
const se_PublishCommand = async (input, context) => {
|
|
112
|
-
const
|
|
72
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
113
73
|
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
114
74
|
"content-type": "application/octet-stream",
|
|
115
|
-
|
|
116
|
-
() => isSerializableHeaderValue(input
|
|
117
|
-
() => context.base64Encoder(Buffer.from(smithy_client_1.LazyJsonString.fromObject(input
|
|
75
|
+
[_xamup]: [
|
|
76
|
+
() => isSerializableHeaderValue(input[_uP]),
|
|
77
|
+
() => context.base64Encoder(Buffer.from(smithy_client_1.LazyJsonString.fromObject(input[_uP]))),
|
|
118
78
|
],
|
|
119
|
-
|
|
120
|
-
|
|
79
|
+
[_xampfi]: input[_pFI],
|
|
80
|
+
[_xamcd]: input[_cD],
|
|
121
81
|
});
|
|
122
|
-
|
|
123
|
-
|
|
82
|
+
b.bp("/topics/{topic}");
|
|
83
|
+
b.p("topic", () => input.topic, "{topic}", false);
|
|
124
84
|
const query = (0, smithy_client_1.map)({
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
85
|
+
[_q]: [() => input.qos !== void 0, () => input[_q].toString()],
|
|
86
|
+
[_r]: [() => input.retain !== void 0, () => input[_r].toString()],
|
|
87
|
+
[_cT]: [, input[_cT]],
|
|
88
|
+
[_rT]: [, input[_rT]],
|
|
89
|
+
[_mE]: [() => input.messageExpiry !== void 0, () => input[_mE].toString()],
|
|
130
90
|
});
|
|
131
91
|
let body;
|
|
132
92
|
if (input.payload !== undefined) {
|
|
133
93
|
body = input.payload;
|
|
134
94
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
hostname,
|
|
138
|
-
port,
|
|
139
|
-
method: "POST",
|
|
140
|
-
headers,
|
|
141
|
-
path: resolvedPath,
|
|
142
|
-
query,
|
|
143
|
-
body,
|
|
144
|
-
});
|
|
95
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
96
|
+
return b.build();
|
|
145
97
|
};
|
|
146
98
|
exports.se_PublishCommand = se_PublishCommand;
|
|
147
99
|
const se_UpdateThingShadowCommand = async (input, context) => {
|
|
148
|
-
const
|
|
100
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
149
101
|
const headers = {
|
|
150
102
|
"content-type": "application/octet-stream",
|
|
151
103
|
};
|
|
152
|
-
|
|
153
|
-
|
|
104
|
+
b.bp("/things/{thingName}/shadow");
|
|
105
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
154
106
|
const query = (0, smithy_client_1.map)({
|
|
155
|
-
|
|
107
|
+
[_n]: [, input[_sN]],
|
|
156
108
|
});
|
|
157
109
|
let body;
|
|
158
110
|
if (input.payload !== undefined) {
|
|
159
111
|
body = input.payload;
|
|
160
112
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
hostname,
|
|
164
|
-
port,
|
|
165
|
-
method: "POST",
|
|
166
|
-
headers,
|
|
167
|
-
path: resolvedPath,
|
|
168
|
-
query,
|
|
169
|
-
body,
|
|
170
|
-
});
|
|
113
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
114
|
+
return b.build();
|
|
171
115
|
};
|
|
172
116
|
exports.se_UpdateThingShadowCommand = se_UpdateThingShadowCommand;
|
|
173
117
|
const de_DeleteThingShadowCommand = async (output, context) => {
|
|
@@ -674,6 +618,22 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
674
618
|
value !== "" &&
|
|
675
619
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
676
620
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
621
|
+
const _cD = "correlationData";
|
|
622
|
+
const _cT = "contentType";
|
|
623
|
+
const _mE = "messageExpiry";
|
|
624
|
+
const _mR = "maxResults";
|
|
625
|
+
const _n = "name";
|
|
626
|
+
const _nT = "nextToken";
|
|
627
|
+
const _pFI = "payloadFormatIndicator";
|
|
628
|
+
const _pS = "pageSize";
|
|
629
|
+
const _q = "qos";
|
|
630
|
+
const _r = "retain";
|
|
631
|
+
const _rT = "responseTopic";
|
|
632
|
+
const _sN = "shadowName";
|
|
633
|
+
const _uP = "userProperties";
|
|
634
|
+
const _xamcd = "x-amz-mqtt5-correlation-data";
|
|
635
|
+
const _xampfi = "x-amz-mqtt5-payload-format-indicator";
|
|
636
|
+
const _xamup = "x-amz-mqtt5-user-properties";
|
|
677
637
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
678
638
|
if (encoded.length) {
|
|
679
639
|
return JSON.parse(encoded);
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListRetainedMessagesCommand, } from "../commands/ListRetainedMessagesCommand";
|
|
2
3
|
import { IoTDataPlaneClient } from "../IoTDataPlaneClient";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListRetainedMessagesCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListRetainedMessages(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.nextToken = token;
|
|
12
|
-
input["maxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof IoTDataPlaneClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected IoTDataPlane | IoTDataPlaneClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.nextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListRetainedMessages = createPaginator(IoTDataPlaneClient, ListRetainedMessagesCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,164 +1,108 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map,
|
|
1
|
+
import { requestBuilder as rb } from "@smithy/core";
|
|
2
|
+
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, LazyJsonString as __LazyJsonString, map, take, withBaseException, } from "@smithy/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 se_DeleteThingShadowCommand = async (input, context) => {
|
|
6
|
-
const
|
|
6
|
+
const b = rb(input, context);
|
|
7
7
|
const headers = {};
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
b.bp("/things/{thingName}/shadow");
|
|
9
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
10
10
|
const query = map({
|
|
11
|
-
|
|
11
|
+
[_n]: [, input[_sN]],
|
|
12
12
|
});
|
|
13
13
|
let body;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
hostname,
|
|
17
|
-
port,
|
|
18
|
-
method: "DELETE",
|
|
19
|
-
headers,
|
|
20
|
-
path: resolvedPath,
|
|
21
|
-
query,
|
|
22
|
-
body,
|
|
23
|
-
});
|
|
14
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
15
|
+
return b.build();
|
|
24
16
|
};
|
|
25
17
|
export const se_GetRetainedMessageCommand = async (input, context) => {
|
|
26
|
-
const
|
|
18
|
+
const b = rb(input, context);
|
|
27
19
|
const headers = {};
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
b.bp("/retainedMessage/{topic}");
|
|
21
|
+
b.p("topic", () => input.topic, "{topic}", false);
|
|
30
22
|
let body;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
hostname,
|
|
34
|
-
port,
|
|
35
|
-
method: "GET",
|
|
36
|
-
headers,
|
|
37
|
-
path: resolvedPath,
|
|
38
|
-
body,
|
|
39
|
-
});
|
|
23
|
+
b.m("GET").h(headers).b(body);
|
|
24
|
+
return b.build();
|
|
40
25
|
};
|
|
41
26
|
export const se_GetThingShadowCommand = async (input, context) => {
|
|
42
|
-
const
|
|
27
|
+
const b = rb(input, context);
|
|
43
28
|
const headers = {};
|
|
44
|
-
|
|
45
|
-
|
|
29
|
+
b.bp("/things/{thingName}/shadow");
|
|
30
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
46
31
|
const query = map({
|
|
47
|
-
|
|
32
|
+
[_n]: [, input[_sN]],
|
|
48
33
|
});
|
|
49
34
|
let body;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
hostname,
|
|
53
|
-
port,
|
|
54
|
-
method: "GET",
|
|
55
|
-
headers,
|
|
56
|
-
path: resolvedPath,
|
|
57
|
-
query,
|
|
58
|
-
body,
|
|
59
|
-
});
|
|
35
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
36
|
+
return b.build();
|
|
60
37
|
};
|
|
61
38
|
export const se_ListNamedShadowsForThingCommand = async (input, context) => {
|
|
62
|
-
const
|
|
39
|
+
const b = rb(input, context);
|
|
63
40
|
const headers = {};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "thingName", () => input.thingName, "{thingName}", false);
|
|
41
|
+
b.bp("/api/things/shadow/ListNamedShadowsForThing/{thingName}");
|
|
42
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
67
43
|
const query = map({
|
|
68
|
-
|
|
69
|
-
|
|
44
|
+
[_nT]: [, input[_nT]],
|
|
45
|
+
[_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
|
|
70
46
|
});
|
|
71
47
|
let body;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
hostname,
|
|
75
|
-
port,
|
|
76
|
-
method: "GET",
|
|
77
|
-
headers,
|
|
78
|
-
path: resolvedPath,
|
|
79
|
-
query,
|
|
80
|
-
body,
|
|
81
|
-
});
|
|
48
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
49
|
+
return b.build();
|
|
82
50
|
};
|
|
83
51
|
export const se_ListRetainedMessagesCommand = async (input, context) => {
|
|
84
|
-
const
|
|
52
|
+
const b = rb(input, context);
|
|
85
53
|
const headers = {};
|
|
86
|
-
|
|
54
|
+
b.bp("/retainedMessage");
|
|
87
55
|
const query = map({
|
|
88
|
-
|
|
89
|
-
|
|
56
|
+
[_nT]: [, input[_nT]],
|
|
57
|
+
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
90
58
|
});
|
|
91
59
|
let body;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
hostname,
|
|
95
|
-
port,
|
|
96
|
-
method: "GET",
|
|
97
|
-
headers,
|
|
98
|
-
path: resolvedPath,
|
|
99
|
-
query,
|
|
100
|
-
body,
|
|
101
|
-
});
|
|
60
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
61
|
+
return b.build();
|
|
102
62
|
};
|
|
103
63
|
export const se_PublishCommand = async (input, context) => {
|
|
104
|
-
const
|
|
64
|
+
const b = rb(input, context);
|
|
105
65
|
const headers = map({}, isSerializableHeaderValue, {
|
|
106
66
|
"content-type": "application/octet-stream",
|
|
107
|
-
|
|
108
|
-
() => isSerializableHeaderValue(input
|
|
109
|
-
() => context.base64Encoder(Buffer.from(__LazyJsonString.fromObject(input
|
|
67
|
+
[_xamup]: [
|
|
68
|
+
() => isSerializableHeaderValue(input[_uP]),
|
|
69
|
+
() => context.base64Encoder(Buffer.from(__LazyJsonString.fromObject(input[_uP]))),
|
|
110
70
|
],
|
|
111
|
-
|
|
112
|
-
|
|
71
|
+
[_xampfi]: input[_pFI],
|
|
72
|
+
[_xamcd]: input[_cD],
|
|
113
73
|
});
|
|
114
|
-
|
|
115
|
-
|
|
74
|
+
b.bp("/topics/{topic}");
|
|
75
|
+
b.p("topic", () => input.topic, "{topic}", false);
|
|
116
76
|
const query = map({
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
77
|
+
[_q]: [() => input.qos !== void 0, () => input[_q].toString()],
|
|
78
|
+
[_r]: [() => input.retain !== void 0, () => input[_r].toString()],
|
|
79
|
+
[_cT]: [, input[_cT]],
|
|
80
|
+
[_rT]: [, input[_rT]],
|
|
81
|
+
[_mE]: [() => input.messageExpiry !== void 0, () => input[_mE].toString()],
|
|
122
82
|
});
|
|
123
83
|
let body;
|
|
124
84
|
if (input.payload !== undefined) {
|
|
125
85
|
body = input.payload;
|
|
126
86
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
hostname,
|
|
130
|
-
port,
|
|
131
|
-
method: "POST",
|
|
132
|
-
headers,
|
|
133
|
-
path: resolvedPath,
|
|
134
|
-
query,
|
|
135
|
-
body,
|
|
136
|
-
});
|
|
87
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
88
|
+
return b.build();
|
|
137
89
|
};
|
|
138
90
|
export const se_UpdateThingShadowCommand = async (input, context) => {
|
|
139
|
-
const
|
|
91
|
+
const b = rb(input, context);
|
|
140
92
|
const headers = {
|
|
141
93
|
"content-type": "application/octet-stream",
|
|
142
94
|
};
|
|
143
|
-
|
|
144
|
-
|
|
95
|
+
b.bp("/things/{thingName}/shadow");
|
|
96
|
+
b.p("thingName", () => input.thingName, "{thingName}", false);
|
|
145
97
|
const query = map({
|
|
146
|
-
|
|
98
|
+
[_n]: [, input[_sN]],
|
|
147
99
|
});
|
|
148
100
|
let body;
|
|
149
101
|
if (input.payload !== undefined) {
|
|
150
102
|
body = input.payload;
|
|
151
103
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
hostname,
|
|
155
|
-
port,
|
|
156
|
-
method: "POST",
|
|
157
|
-
headers,
|
|
158
|
-
path: resolvedPath,
|
|
159
|
-
query,
|
|
160
|
-
body,
|
|
161
|
-
});
|
|
104
|
+
b.m("POST").h(headers).q(query).b(body);
|
|
105
|
+
return b.build();
|
|
162
106
|
};
|
|
163
107
|
export const de_DeleteThingShadowCommand = async (output, context) => {
|
|
164
108
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -657,6 +601,22 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
657
601
|
value !== "" &&
|
|
658
602
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
659
603
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
604
|
+
const _cD = "correlationData";
|
|
605
|
+
const _cT = "contentType";
|
|
606
|
+
const _mE = "messageExpiry";
|
|
607
|
+
const _mR = "maxResults";
|
|
608
|
+
const _n = "name";
|
|
609
|
+
const _nT = "nextToken";
|
|
610
|
+
const _pFI = "payloadFormatIndicator";
|
|
611
|
+
const _pS = "pageSize";
|
|
612
|
+
const _q = "qos";
|
|
613
|
+
const _r = "retain";
|
|
614
|
+
const _rT = "responseTopic";
|
|
615
|
+
const _sN = "shadowName";
|
|
616
|
+
const _uP = "userProperties";
|
|
617
|
+
const _xamcd = "x-amz-mqtt5-correlation-data";
|
|
618
|
+
const _xampfi = "x-amz-mqtt5-payload-format-indicator";
|
|
619
|
+
const _xamup = "x-amz-mqtt5-user-properties";
|
|
660
620
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
661
621
|
if (encoded.length) {
|
|
662
622
|
return JSON.parse(encoded);
|
|
@@ -4,4 +4,4 @@ import { IoTDataPlanePaginationConfiguration } from "./Interfaces";
|
|
|
4
4
|
/**
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export declare
|
|
7
|
+
export declare const paginateListRetainedMessages: (config: IoTDataPlanePaginationConfiguration, input: ListRetainedMessagesCommandInput, ...rest: any[]) => Paginator<ListRetainedMessagesCommandOutput>;
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
ListRetainedMessagesCommandOutput,
|
|
5
5
|
} from "../commands/ListRetainedMessagesCommand";
|
|
6
6
|
import { IoTDataPlanePaginationConfiguration } from "./Interfaces";
|
|
7
|
-
export declare
|
|
7
|
+
export declare const paginateListRetainedMessages: (
|
|
8
8
|
config: IoTDataPlanePaginationConfiguration,
|
|
9
9
|
input: ListRetainedMessagesCommandInput,
|
|
10
|
-
...
|
|
11
|
-
)
|
|
10
|
+
...rest: any[]
|
|
11
|
+
) => Paginator<ListRetainedMessagesCommandOutput>;
|
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.478.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",
|
|
@@ -20,20 +20,21 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.478.0",
|
|
24
|
+
"@aws-sdk/core": "3.477.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.478.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.468.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.468.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.468.0",
|
|
29
29
|
"@aws-sdk/middleware-signing": "3.468.0",
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.478.0",
|
|
31
31
|
"@aws-sdk/region-config-resolver": "3.470.0",
|
|
32
32
|
"@aws-sdk/types": "3.468.0",
|
|
33
|
-
"@aws-sdk/util-endpoints": "3.
|
|
33
|
+
"@aws-sdk/util-endpoints": "3.478.0",
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "3.468.0",
|
|
35
35
|
"@aws-sdk/util-user-agent-node": "3.470.0",
|
|
36
36
|
"@smithy/config-resolver": "^2.0.21",
|
|
37
|
+
"@smithy/core": "^1.2.0",
|
|
37
38
|
"@smithy/fetch-http-handler": "^2.3.1",
|
|
38
39
|
"@smithy/hash-node": "^2.0.17",
|
|
39
40
|
"@smithy/invalid-dependency": "^2.0.15",
|