@aws-sdk/client-iot-data-plane 3.1074.0 → 3.1076.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/index.js CHANGED
@@ -1,21 +1,57 @@
1
- var __exportStar = (m, e) => { Object.assign(e, m); };
2
- const { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
1
+ const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
3
2
  const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require("@smithy/core");
4
- const { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
3
+ const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
5
4
  exports.$Command = Command;
6
5
  exports.__Client = Client;
7
- const { resolveRegionConfig } = require("@smithy/core/config");
8
- const { resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
9
- const { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
10
- const { resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
11
- const { getSchemaSerdePlugin } = require("@smithy/core/schema");
12
- const { resolveHttpAuthSchemeConfig, defaultIoTDataPlaneHttpAuthSchemeParametersProvider } = require("./auth/httpAuthSchemeProvider");
13
- const { getRuntimeConfig } = require("./runtimeConfig");
14
- const { DeleteConnection$, DeleteThingShadow$, GetConnection$, GetRetainedMessage$, GetThingShadow$, ListNamedShadowsForThing$, ListRetainedMessages$, ListSubscriptions$, Publish$, SendDirectMessage$, UpdateThingShadow$ } = require("./schemas/schemas_0");
15
- __exportStar(require("./schemas/schemas_0"), exports);
16
- __exportStar(require("./models/errors"), exports);
17
- const { IoTDataPlaneServiceException } = require("./models/IoTDataPlaneServiceException");
18
- exports.IoTDataPlaneServiceException = IoTDataPlaneServiceException;
6
+ const { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require("@smithy/core/config");
7
+ const { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
8
+ const { parseUrl, getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
9
+ const { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
10
+ const { TypeRegistry, getSchemaSerdePlugin } = require("@smithy/core/schema");
11
+ const { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
12
+ const { defaultProvider } = require("@aws-sdk/credential-provider-node");
13
+ const { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require("@smithy/core/serde");
14
+ const { streamCollector, NodeHttpHandler } = require("@smithy/node-http-handler");
15
+ const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
16
+
17
+ const defaultIoTDataPlaneHttpAuthSchemeParametersProvider = async (config, context, input) => {
18
+ return {
19
+ operation: getSmithyContext(context).operation,
20
+ region: await normalizeProvider(config.region)() || (() => {
21
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
22
+ })(),
23
+ };
24
+ };
25
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
26
+ return {
27
+ schemeId: "aws.auth#sigv4",
28
+ signingProperties: {
29
+ name: "iotdata",
30
+ region: authParameters.region,
31
+ },
32
+ propertiesExtractor: (config, context) => ({
33
+ signingProperties: {
34
+ config,
35
+ context,
36
+ },
37
+ }),
38
+ };
39
+ }
40
+ const defaultIoTDataPlaneHttpAuthSchemeProvider = (authParameters) => {
41
+ const options = [];
42
+ switch (authParameters.operation) {
43
+ default: {
44
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
45
+ }
46
+ }
47
+ return options;
48
+ };
49
+ const resolveHttpAuthSchemeConfig = (config) => {
50
+ const config_0 = resolveAwsSdkSigV4Config(config);
51
+ return Object.assign(config_0, {
52
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
53
+ });
54
+ };
19
55
 
20
56
  const resolveClientEndpointParameters = (options) => {
21
57
  return Object.assign(options, {
@@ -31,6 +67,654 @@ const commonParams = {
31
67
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
32
68
  };
33
69
 
70
+ var version = "3.1075.0";
71
+ var packageInfo = {
72
+ version: version};
73
+
74
+ const n = "ref";
75
+ const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = "stringEquals", h = { [n]: "Endpoint" }, i = { [n]: d }, j = { [n]: "Region" }, k = { "fn": f, "argv": [i, "name"] }, l = {}, m = [j];
76
+ const _data = {
77
+ conditions: [
78
+ [c, [h]],
79
+ [c, m],
80
+ ["aws.partition", m, d],
81
+ [e, [{ [n]: "UseFIPS" }, b]],
82
+ [e, [{ [n]: "UseDualStack" }, b]],
83
+ [e, [{ fn: f, argv: [i, "supportsDualStack"] }, b]],
84
+ [e, [{ fn: f, argv: [i, "supportsFIPS"] }, b]],
85
+ [g, [j, "ca-central-1"]],
86
+ [g, [j, "cn-north-1"]],
87
+ [g, [j, "us-east-1"]],
88
+ [g, [k, "aws"]],
89
+ [g, [k, "aws-cn"]],
90
+ [g, [k, "aws-us-gov"]],
91
+ [g, [j, "us-east-2"]],
92
+ [g, [j, "us-west-1"]],
93
+ [g, [j, "us-west-2"]],
94
+ [g, [j, "us-gov-east-1"]],
95
+ [g, [j, "us-gov-west-1"]]
96
+ ],
97
+ results: [
98
+ [a],
99
+ [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
100
+ [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
101
+ [h, l],
102
+ ["https://data-ats.iot-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", l],
103
+ [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
104
+ ["https://data.iot-fips.ca-central-1.amazonaws.com", l],
105
+ ["https://data.iot-fips.us-east-1.amazonaws.com", l],
106
+ ["https://data.iot-fips.us-east-2.amazonaws.com", l],
107
+ ["https://data.iot-fips.us-west-1.amazonaws.com", l],
108
+ ["https://data.iot-fips.us-west-2.amazonaws.com", l],
109
+ ["https://data.iot-fips.us-gov-east-1.amazonaws.com", l],
110
+ ["https://data.iot-fips.us-gov-west-1.amazonaws.com", l],
111
+ ["https://data-ats.iot-fips.{Region}.{PartitionResult#dnsSuffix}", l],
112
+ [a, "FIPS is enabled but this partition does not support FIPS"],
113
+ ["https://data-ats.iot.{Region}.{PartitionResult#dualStackDnsSuffix}", l],
114
+ [a, "DualStack is enabled but this partition does not support DualStack"],
115
+ ["https://data.ats.iot.cn-north-1.amazonaws.com.cn", l],
116
+ ["https://data-ats.iot.{Region}.amazonaws.com", l],
117
+ ["https://data-ats.iot.{Region}.amazonaws.com.cn", l],
118
+ ["https://data-ats.iot.{Region}.{PartitionResult#dnsSuffix}", l],
119
+ [a, "Invalid Configuration: Missing Region"]
120
+ ]
121
+ };
122
+ const root = 2;
123
+ const r = 100_000_000;
124
+ const nodes = new Int32Array([
125
+ -1, 1, -1,
126
+ 0, 23, 3,
127
+ 1, 4, r + 21,
128
+ 2, 5, r + 21,
129
+ 3, 12, 6,
130
+ 4, 11, 7,
131
+ 8, r + 17, 8,
132
+ 10, r + 18, 9,
133
+ 11, r + 19, 10,
134
+ 12, r + 18, r + 20,
135
+ 5, r + 15, r + 16,
136
+ 4, 21, 13,
137
+ 6, 14, r + 14,
138
+ 7, r + 6, 15,
139
+ 9, r + 7, 16,
140
+ 13, r + 8, 17,
141
+ 14, r + 9, 18,
142
+ 15, r + 10, 19,
143
+ 16, r + 11, 20,
144
+ 17, r + 12, r + 13,
145
+ 5, 22, r + 5,
146
+ 6, r + 4, r + 5,
147
+ 3, r + 1, 24,
148
+ 4, r + 2, r + 3,
149
+ ]);
150
+ const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
151
+
152
+ const cache = new EndpointCache({
153
+ size: 50,
154
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
155
+ });
156
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
157
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
158
+ endpointParams: endpointParams,
159
+ logger: context.logger,
160
+ }));
161
+ };
162
+ customEndpointFunctions.aws = awsEndpointFunctions;
163
+
164
+ class IoTDataPlaneServiceException extends ServiceException {
165
+ constructor(options) {
166
+ super(options);
167
+ Object.setPrototypeOf(this, IoTDataPlaneServiceException.prototype);
168
+ }
169
+ }
170
+
171
+ class ConflictException extends IoTDataPlaneServiceException {
172
+ name = "ConflictException";
173
+ $fault = "client";
174
+ constructor(opts) {
175
+ super({
176
+ name: "ConflictException",
177
+ $fault: "client",
178
+ ...opts,
179
+ });
180
+ Object.setPrototypeOf(this, ConflictException.prototype);
181
+ }
182
+ }
183
+ class ForbiddenException extends IoTDataPlaneServiceException {
184
+ name = "ForbiddenException";
185
+ $fault = "client";
186
+ constructor(opts) {
187
+ super({
188
+ name: "ForbiddenException",
189
+ $fault: "client",
190
+ ...opts,
191
+ });
192
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
193
+ }
194
+ }
195
+ class InternalFailureException extends IoTDataPlaneServiceException {
196
+ name = "InternalFailureException";
197
+ $fault = "server";
198
+ constructor(opts) {
199
+ super({
200
+ name: "InternalFailureException",
201
+ $fault: "server",
202
+ ...opts,
203
+ });
204
+ Object.setPrototypeOf(this, InternalFailureException.prototype);
205
+ }
206
+ }
207
+ class InvalidRequestException extends IoTDataPlaneServiceException {
208
+ name = "InvalidRequestException";
209
+ $fault = "client";
210
+ constructor(opts) {
211
+ super({
212
+ name: "InvalidRequestException",
213
+ $fault: "client",
214
+ ...opts,
215
+ });
216
+ Object.setPrototypeOf(this, InvalidRequestException.prototype);
217
+ }
218
+ }
219
+ class ResourceNotFoundException extends IoTDataPlaneServiceException {
220
+ name = "ResourceNotFoundException";
221
+ $fault = "client";
222
+ constructor(opts) {
223
+ super({
224
+ name: "ResourceNotFoundException",
225
+ $fault: "client",
226
+ ...opts,
227
+ });
228
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
229
+ }
230
+ }
231
+ class ThrottlingException extends IoTDataPlaneServiceException {
232
+ name = "ThrottlingException";
233
+ $fault = "client";
234
+ constructor(opts) {
235
+ super({
236
+ name: "ThrottlingException",
237
+ $fault: "client",
238
+ ...opts,
239
+ });
240
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
241
+ }
242
+ }
243
+ class MethodNotAllowedException extends IoTDataPlaneServiceException {
244
+ name = "MethodNotAllowedException";
245
+ $fault = "client";
246
+ constructor(opts) {
247
+ super({
248
+ name: "MethodNotAllowedException",
249
+ $fault: "client",
250
+ ...opts,
251
+ });
252
+ Object.setPrototypeOf(this, MethodNotAllowedException.prototype);
253
+ }
254
+ }
255
+ class ServiceUnavailableException extends IoTDataPlaneServiceException {
256
+ name = "ServiceUnavailableException";
257
+ $fault = "server";
258
+ constructor(opts) {
259
+ super({
260
+ name: "ServiceUnavailableException",
261
+ $fault: "server",
262
+ ...opts,
263
+ });
264
+ Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
265
+ }
266
+ }
267
+ class UnauthorizedException extends IoTDataPlaneServiceException {
268
+ name = "UnauthorizedException";
269
+ $fault = "client";
270
+ constructor(opts) {
271
+ super({
272
+ name: "UnauthorizedException",
273
+ $fault: "client",
274
+ ...opts,
275
+ });
276
+ Object.setPrototypeOf(this, UnauthorizedException.prototype);
277
+ }
278
+ }
279
+ class UnsupportedDocumentEncodingException extends IoTDataPlaneServiceException {
280
+ name = "UnsupportedDocumentEncodingException";
281
+ $fault = "client";
282
+ constructor(opts) {
283
+ super({
284
+ name: "UnsupportedDocumentEncodingException",
285
+ $fault: "client",
286
+ ...opts,
287
+ });
288
+ Object.setPrototypeOf(this, UnsupportedDocumentEncodingException.prototype);
289
+ }
290
+ }
291
+ class GatewayTimeoutException extends IoTDataPlaneServiceException {
292
+ name = "GatewayTimeoutException";
293
+ $fault = "server";
294
+ constructor(opts) {
295
+ super({
296
+ name: "GatewayTimeoutException",
297
+ $fault: "server",
298
+ ...opts,
299
+ });
300
+ Object.setPrototypeOf(this, GatewayTimeoutException.prototype);
301
+ }
302
+ }
303
+ class RequestEntityTooLargeException extends IoTDataPlaneServiceException {
304
+ name = "RequestEntityTooLargeException";
305
+ $fault = "client";
306
+ constructor(opts) {
307
+ super({
308
+ name: "RequestEntityTooLargeException",
309
+ $fault: "client",
310
+ ...opts,
311
+ });
312
+ Object.setPrototypeOf(this, RequestEntityTooLargeException.prototype);
313
+ }
314
+ }
315
+
316
+ const _CE = "ConflictException";
317
+ const _DC = "DeleteConnection";
318
+ const _DCR = "DeleteConnectionRequest";
319
+ const _DTS = "DeleteThingShadow";
320
+ const _DTSR = "DeleteThingShadowRequest";
321
+ const _DTSRe = "DeleteThingShadowResponse";
322
+ const _FE = "ForbiddenException";
323
+ const _GC = "GetConnection";
324
+ const _GCR = "GetConnectionRequest";
325
+ const _GCRe = "GetConnectionResponse";
326
+ const _GRM = "GetRetainedMessage";
327
+ const _GRMR = "GetRetainedMessageRequest";
328
+ const _GRMRe = "GetRetainedMessageResponse";
329
+ const _GTE = "GatewayTimeoutException";
330
+ const _GTS = "GetThingShadow";
331
+ const _GTSR = "GetThingShadowRequest";
332
+ const _GTSRe = "GetThingShadowResponse";
333
+ const _IFE = "InternalFailureException";
334
+ const _IRE = "InvalidRequestException";
335
+ const _LNSFT = "ListNamedShadowsForThing";
336
+ const _LNSFTR = "ListNamedShadowsForThingRequest";
337
+ const _LNSFTRi = "ListNamedShadowsForThingResponse";
338
+ const _LRM = "ListRetainedMessages";
339
+ const _LRMR = "ListRetainedMessagesRequest";
340
+ const _LRMRi = "ListRetainedMessagesResponse";
341
+ const _LS = "ListSubscriptions";
342
+ const _LSR = "ListSubscriptionsRequest";
343
+ const _LSRi = "ListSubscriptionsResponse";
344
+ const _MNAE = "MethodNotAllowedException";
345
+ const _P = "Publish";
346
+ const _PR = "PublishRequest";
347
+ const _RETLE = "RequestEntityTooLargeException";
348
+ const _RML = "RetainedMessageList";
349
+ const _RMS = "RetainedMessageSummary";
350
+ const _RNFE = "ResourceNotFoundException";
351
+ const _SDM = "SendDirectMessage";
352
+ const _SDMR = "SendDirectMessageRequest";
353
+ const _SDMRe = "SendDirectMessageResponse";
354
+ const _SJUP = "SynthesizedJsonUserProperties";
355
+ const _SL = "SubscriptionList";
356
+ const _SS = "SubscriptionSummary";
357
+ const _SUE = "ServiceUnavailableException";
358
+ const _TE = "ThrottlingException";
359
+ const _UDEE = "UnsupportedDocumentEncodingException";
360
+ const _UE = "UnauthorizedException";
361
+ const _UTS = "UpdateThingShadow";
362
+ const _UTSR = "UpdateThingShadowRequest";
363
+ const _UTSRp = "UpdateThingShadowResponse";
364
+ const _a = "application/json";
365
+ const _c = "client";
366
+ const _cD = "correlationData";
367
+ const _cI = "clientId";
368
+ const _cS = "cleanSession";
369
+ const _cSo = "connectedSince";
370
+ const _cT = "contentType";
371
+ const _co = "connected";
372
+ const _con = "confirmation";
373
+ const _dR = "disconnectReason";
374
+ const _dS = "disconnectedSince";
375
+ const _e = "error";
376
+ const _h = "http";
377
+ const _hE = "httpError";
378
+ const _hH = "httpHeader";
379
+ const _hQ = "httpQuery";
380
+ const _iSI = "includeSocketInformation";
381
+ const _kAD = "keepAliveDuration";
382
+ const _lMT = "lastModifiedTime";
383
+ const _m = "message";
384
+ const _mE = "messageExpiry";
385
+ const _mR = "maxResults";
386
+ const _mT = "mediaType";
387
+ const _n = "name";
388
+ const _nT = "nextToken";
389
+ const _p = "payload";
390
+ const _pFI = "payloadFormatIndicator";
391
+ const _pS = "pageSize";
392
+ const _pSa = "payloadSize";
393
+ const _pWM = "preventWillMessage";
394
+ const _q = "qos";
395
+ const _r = "results";
396
+ const _rT = "retainedTopics";
397
+ const _rTe = "responseTopic";
398
+ const _re = "retain";
399
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.iotdataplane";
400
+ const _sE = "sessionExpiry";
401
+ const _sI = "sourceIp";
402
+ const _sN = "shadowName";
403
+ const _sP = "sourcePort";
404
+ const _se = "server";
405
+ const _su = "subscriptions";
406
+ const _t = "topic";
407
+ const _tF = "topicFilter";
408
+ const _tI = "targetIp";
409
+ const _tIr = "traceId";
410
+ const _tN = "thingName";
411
+ const _tP = "targetPort";
412
+ const _ti = "timestamp";
413
+ const _tim = "timeout";
414
+ const _uP = "userProperties";
415
+ const _vEI = "vpcEndpointId";
416
+ const _xamcd = "x-amz-mqtt5-correlation-data";
417
+ const _xampfi = "x-amz-mqtt5-payload-format-indicator";
418
+ const _xamup = "x-amz-mqtt5-user-properties";
419
+ const n0 = "com.amazonaws.iotdataplane";
420
+ const _s_registry = TypeRegistry.for(_s);
421
+ var IoTDataPlaneServiceException$ = [-3, _s, "IoTDataPlaneServiceException", 0, [], []];
422
+ _s_registry.registerError(IoTDataPlaneServiceException$, IoTDataPlaneServiceException);
423
+ const n0_registry = TypeRegistry.for(n0);
424
+ var ConflictException$ = [-3, n0, _CE,
425
+ { [_e]: _c, [_hE]: 409 },
426
+ [_m],
427
+ [0]
428
+ ];
429
+ n0_registry.registerError(ConflictException$, ConflictException);
430
+ var ForbiddenException$ = [-3, n0, _FE,
431
+ { [_e]: _c, [_hE]: 403 },
432
+ [_m],
433
+ [0]
434
+ ];
435
+ n0_registry.registerError(ForbiddenException$, ForbiddenException);
436
+ var GatewayTimeoutException$ = [-3, n0, _GTE,
437
+ { [_e]: _se, [_hE]: 504 },
438
+ [_m],
439
+ [0]
440
+ ];
441
+ n0_registry.registerError(GatewayTimeoutException$, GatewayTimeoutException);
442
+ var InternalFailureException$ = [-3, n0, _IFE,
443
+ { [_e]: _se, [_hE]: 500 },
444
+ [_m],
445
+ [0]
446
+ ];
447
+ n0_registry.registerError(InternalFailureException$, InternalFailureException);
448
+ var InvalidRequestException$ = [-3, n0, _IRE,
449
+ { [_e]: _c, [_hE]: 400 },
450
+ [_m],
451
+ [0]
452
+ ];
453
+ n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
454
+ var MethodNotAllowedException$ = [-3, n0, _MNAE,
455
+ { [_e]: _c, [_hE]: 405 },
456
+ [_m],
457
+ [0]
458
+ ];
459
+ n0_registry.registerError(MethodNotAllowedException$, MethodNotAllowedException);
460
+ var RequestEntityTooLargeException$ = [-3, n0, _RETLE,
461
+ { [_e]: _c, [_hE]: 413 },
462
+ [_m],
463
+ [0]
464
+ ];
465
+ n0_registry.registerError(RequestEntityTooLargeException$, RequestEntityTooLargeException);
466
+ var ResourceNotFoundException$ = [-3, n0, _RNFE,
467
+ { [_e]: _c, [_hE]: 404 },
468
+ [_m],
469
+ [0]
470
+ ];
471
+ n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
472
+ var ServiceUnavailableException$ = [-3, n0, _SUE,
473
+ { [_e]: _se, [_hE]: 503 },
474
+ [_m],
475
+ [0]
476
+ ];
477
+ n0_registry.registerError(ServiceUnavailableException$, ServiceUnavailableException);
478
+ var ThrottlingException$ = [-3, n0, _TE,
479
+ { [_e]: _c, [_hE]: 429 },
480
+ [_m],
481
+ [0]
482
+ ];
483
+ n0_registry.registerError(ThrottlingException$, ThrottlingException);
484
+ var UnauthorizedException$ = [-3, n0, _UE,
485
+ { [_e]: _c, [_hE]: 401 },
486
+ [_m],
487
+ [0]
488
+ ];
489
+ n0_registry.registerError(UnauthorizedException$, UnauthorizedException);
490
+ var UnsupportedDocumentEncodingException$ = [-3, n0, _UDEE,
491
+ { [_e]: _c, [_hE]: 415 },
492
+ [_m],
493
+ [0]
494
+ ];
495
+ n0_registry.registerError(UnsupportedDocumentEncodingException$, UnsupportedDocumentEncodingException);
496
+ const errorTypeRegistries = [
497
+ _s_registry,
498
+ n0_registry,
499
+ ];
500
+ var SynthesizedJsonUserProperties = [0, n0, _SJUP, { [_mT]: _a }, 0];
501
+ var DeleteConnectionRequest$ = [3, n0, _DCR,
502
+ 0,
503
+ [_cI, _cS, _pWM],
504
+ [[0, 1], [2, { [_hQ]: _cS }], [2, { [_hQ]: _pWM }]], 1
505
+ ];
506
+ var DeleteThingShadowRequest$ = [3, n0, _DTSR,
507
+ 0,
508
+ [_tN, _sN],
509
+ [[0, 1], [0, { [_hQ]: _n }]], 1
510
+ ];
511
+ var DeleteThingShadowResponse$ = [3, n0, _DTSRe,
512
+ 0,
513
+ [_p],
514
+ [[21, 16]], 1
515
+ ];
516
+ var GetConnectionRequest$ = [3, n0, _GCR,
517
+ 0,
518
+ [_cI, _iSI],
519
+ [[0, 1], [2, { [_hQ]: _iSI }]], 1
520
+ ];
521
+ var GetConnectionResponse$ = [3, n0, _GCRe,
522
+ 0,
523
+ [_co, _tN, _cS, _sI, _sP, _tI, _tP, _kAD, _cSo, _dS, _dR, _sE, _cI, _vEI],
524
+ [2, 0, 2, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 0]
525
+ ];
526
+ var GetRetainedMessageRequest$ = [3, n0, _GRMR,
527
+ 0,
528
+ [_t],
529
+ [[0, 1]], 1
530
+ ];
531
+ var GetRetainedMessageResponse$ = [3, n0, _GRMRe,
532
+ 0,
533
+ [_t, _p, _q, _lMT, _uP],
534
+ [0, 21, 1, 1, 21]
535
+ ];
536
+ var GetThingShadowRequest$ = [3, n0, _GTSR,
537
+ 0,
538
+ [_tN, _sN],
539
+ [[0, 1], [0, { [_hQ]: _n }]], 1
540
+ ];
541
+ var GetThingShadowResponse$ = [3, n0, _GTSRe,
542
+ 0,
543
+ [_p],
544
+ [[21, 16]]
545
+ ];
546
+ var ListNamedShadowsForThingRequest$ = [3, n0, _LNSFTR,
547
+ 0,
548
+ [_tN, _nT, _pS],
549
+ [[0, 1], [0, { [_hQ]: _nT }], [1, { [_hQ]: _pS }]], 1
550
+ ];
551
+ var ListNamedShadowsForThingResponse$ = [3, n0, _LNSFTRi,
552
+ 0,
553
+ [_r, _nT, _ti],
554
+ [64 | 0, 0, 1]
555
+ ];
556
+ var ListRetainedMessagesRequest$ = [3, n0, _LRMR,
557
+ 0,
558
+ [_nT, _mR],
559
+ [[0, { [_hQ]: _nT }], [1, { [_hQ]: _mR }]]
560
+ ];
561
+ var ListRetainedMessagesResponse$ = [3, n0, _LRMRi,
562
+ 0,
563
+ [_rT, _nT],
564
+ [() => RetainedMessageList, 0]
565
+ ];
566
+ var ListSubscriptionsRequest$ = [3, n0, _LSR,
567
+ 0,
568
+ [_cI, _nT, _mR],
569
+ [[0, 1], [0, { [_hQ]: _nT }], [1, { [_hQ]: _mR }]], 1
570
+ ];
571
+ var ListSubscriptionsResponse$ = [3, n0, _LSRi,
572
+ 0,
573
+ [_su, _nT],
574
+ [() => SubscriptionList, 0]
575
+ ];
576
+ var PublishRequest$ = [3, n0, _PR,
577
+ 0,
578
+ [_t, _q, _re, _p, _uP, _pFI, _cT, _rTe, _cD, _mE],
579
+ [[0, 1], [1, { [_hQ]: _q }], [2, { [_hQ]: _re }], [21, 16], [() => SynthesizedJsonUserProperties, { [_hH]: _xamup }], [0, { [_hH]: _xampfi }], [0, { [_hQ]: _cT }], [0, { [_hQ]: _rTe }], [0, { [_hH]: _xamcd }], [1, { [_hQ]: _mE }]], 1
580
+ ];
581
+ var RetainedMessageSummary$ = [3, n0, _RMS,
582
+ 0,
583
+ [_t, _pSa, _q, _lMT],
584
+ [0, 1, 1, 1]
585
+ ];
586
+ var SendDirectMessageRequest$ = [3, n0, _SDMR,
587
+ 0,
588
+ [_cI, _t, _cT, _rTe, _con, _tim, _p, _uP, _pFI, _cD],
589
+ [[0, 1], [0, { [_hQ]: _t }], [0, { [_hQ]: _cT }], [0, { [_hQ]: _rTe }], [2, { [_hQ]: _con }], [1, { [_hQ]: _tim }], [21, 16], [() => SynthesizedJsonUserProperties, { [_hH]: _xamup }], [0, { [_hH]: _xampfi }], [0, { [_hH]: _xamcd }]], 2
590
+ ];
591
+ var SendDirectMessageResponse$ = [3, n0, _SDMRe,
592
+ 0,
593
+ [_m, _tIr],
594
+ [0, 0]
595
+ ];
596
+ var SubscriptionSummary$ = [3, n0, _SS,
597
+ 0,
598
+ [_tF, _q],
599
+ [0, 1], 2
600
+ ];
601
+ var UpdateThingShadowRequest$ = [3, n0, _UTSR,
602
+ 0,
603
+ [_tN, _p, _sN],
604
+ [[0, 1], [21, 16], [0, { [_hQ]: _n }]], 2
605
+ ];
606
+ var UpdateThingShadowResponse$ = [3, n0, _UTSRp,
607
+ 0,
608
+ [_p],
609
+ [[21, 16]]
610
+ ];
611
+ var __Unit = "unit";
612
+ var RetainedMessageList = [1, n0, _RML,
613
+ 0, () => RetainedMessageSummary$
614
+ ];
615
+ var SubscriptionList = [1, n0, _SL,
616
+ 0, () => SubscriptionSummary$
617
+ ];
618
+ var DeleteConnection$ = [9, n0, _DC,
619
+ { [_h]: ["DELETE", "/connections/{clientId}", 200] }, () => DeleteConnectionRequest$, () => __Unit
620
+ ];
621
+ var DeleteThingShadow$ = [9, n0, _DTS,
622
+ { [_h]: ["DELETE", "/things/{thingName}/shadow", 200] }, () => DeleteThingShadowRequest$, () => DeleteThingShadowResponse$
623
+ ];
624
+ var GetConnection$ = [9, n0, _GC,
625
+ { [_h]: ["GET", "/connections/{clientId}", 200] }, () => GetConnectionRequest$, () => GetConnectionResponse$
626
+ ];
627
+ var GetRetainedMessage$ = [9, n0, _GRM,
628
+ { [_h]: ["GET", "/retainedMessage/{topic}", 200] }, () => GetRetainedMessageRequest$, () => GetRetainedMessageResponse$
629
+ ];
630
+ var GetThingShadow$ = [9, n0, _GTS,
631
+ { [_h]: ["GET", "/things/{thingName}/shadow", 200] }, () => GetThingShadowRequest$, () => GetThingShadowResponse$
632
+ ];
633
+ var ListNamedShadowsForThing$ = [9, n0, _LNSFT,
634
+ { [_h]: ["GET", "/api/things/shadow/ListNamedShadowsForThing/{thingName}", 200] }, () => ListNamedShadowsForThingRequest$, () => ListNamedShadowsForThingResponse$
635
+ ];
636
+ var ListRetainedMessages$ = [9, n0, _LRM,
637
+ { [_h]: ["GET", "/retainedMessage", 200] }, () => ListRetainedMessagesRequest$, () => ListRetainedMessagesResponse$
638
+ ];
639
+ var ListSubscriptions$ = [9, n0, _LS,
640
+ { [_h]: ["GET", "/connections/{clientId}/subscriptions", 200] }, () => ListSubscriptionsRequest$, () => ListSubscriptionsResponse$
641
+ ];
642
+ var Publish$ = [9, n0, _P,
643
+ { [_h]: ["POST", "/topics/{topic}", 200] }, () => PublishRequest$, () => __Unit
644
+ ];
645
+ var SendDirectMessage$ = [9, n0, _SDM,
646
+ { [_h]: ["POST", "/connections/{clientId}/messages", 200] }, () => SendDirectMessageRequest$, () => SendDirectMessageResponse$
647
+ ];
648
+ var UpdateThingShadow$ = [9, n0, _UTS,
649
+ { [_h]: ["POST", "/things/{thingName}/shadow", 200] }, () => UpdateThingShadowRequest$, () => UpdateThingShadowResponse$
650
+ ];
651
+
652
+ const getRuntimeConfig$1 = (config) => {
653
+ return {
654
+ apiVersion: "2015-05-28",
655
+ base64Decoder: config?.base64Decoder ?? fromBase64,
656
+ base64Encoder: config?.base64Encoder ?? toBase64,
657
+ disableHostPrefix: config?.disableHostPrefix ?? false,
658
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
659
+ extensions: config?.extensions ?? [],
660
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultIoTDataPlaneHttpAuthSchemeProvider,
661
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
662
+ {
663
+ schemeId: "aws.auth#sigv4",
664
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
665
+ signer: new AwsSdkSigV4Signer(),
666
+ },
667
+ ],
668
+ logger: config?.logger ?? new NoOpLogger(),
669
+ protocol: config?.protocol ?? AwsRestJsonProtocol,
670
+ protocolSettings: config?.protocolSettings ?? {
671
+ defaultNamespace: "com.amazonaws.iotdataplane",
672
+ errorTypeRegistries,
673
+ version: "2015-05-28",
674
+ serviceTarget: "IotMoonrakerService",
675
+ },
676
+ serviceId: config?.serviceId ?? "IoT Data Plane",
677
+ urlParser: config?.urlParser ?? parseUrl,
678
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
679
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
680
+ };
681
+ };
682
+
683
+ const getRuntimeConfig = (config) => {
684
+ emitWarningIfUnsupportedVersion(process.version);
685
+ const defaultsMode = resolveDefaultsModeConfig(config);
686
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
687
+ const clientSharedValues = getRuntimeConfig$1(config);
688
+ emitWarningIfUnsupportedVersion$1(process.version);
689
+ const loaderConfig = {
690
+ profile: config?.profile,
691
+ logger: clientSharedValues.logger,
692
+ };
693
+ return {
694
+ ...clientSharedValues,
695
+ ...config,
696
+ runtime: "node",
697
+ defaultsMode,
698
+ authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
699
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
700
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider,
701
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
702
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
703
+ region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
704
+ requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
705
+ retryMode: config?.retryMode ??
706
+ loadConfig({
707
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
708
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
709
+ }, config),
710
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
711
+ streamCollector: config?.streamCollector ?? streamCollector,
712
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
713
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
714
+ userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
715
+ };
716
+ };
717
+
34
718
  const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
35
719
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
36
720
  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
@@ -273,19 +957,79 @@ const PayloadFormatIndicator = {
273
957
  UTF8_DATA: "UTF8_DATA",
274
958
  };
275
959
 
960
+ exports.ConflictException = ConflictException;
961
+ exports.ConflictException$ = ConflictException$;
962
+ exports.DeleteConnection$ = DeleteConnection$;
276
963
  exports.DeleteConnectionCommand = DeleteConnectionCommand;
964
+ exports.DeleteConnectionRequest$ = DeleteConnectionRequest$;
965
+ exports.DeleteThingShadow$ = DeleteThingShadow$;
277
966
  exports.DeleteThingShadowCommand = DeleteThingShadowCommand;
967
+ exports.DeleteThingShadowRequest$ = DeleteThingShadowRequest$;
968
+ exports.DeleteThingShadowResponse$ = DeleteThingShadowResponse$;
969
+ exports.ForbiddenException = ForbiddenException;
970
+ exports.ForbiddenException$ = ForbiddenException$;
971
+ exports.GatewayTimeoutException = GatewayTimeoutException;
972
+ exports.GatewayTimeoutException$ = GatewayTimeoutException$;
973
+ exports.GetConnection$ = GetConnection$;
278
974
  exports.GetConnectionCommand = GetConnectionCommand;
975
+ exports.GetConnectionRequest$ = GetConnectionRequest$;
976
+ exports.GetConnectionResponse$ = GetConnectionResponse$;
977
+ exports.GetRetainedMessage$ = GetRetainedMessage$;
279
978
  exports.GetRetainedMessageCommand = GetRetainedMessageCommand;
979
+ exports.GetRetainedMessageRequest$ = GetRetainedMessageRequest$;
980
+ exports.GetRetainedMessageResponse$ = GetRetainedMessageResponse$;
981
+ exports.GetThingShadow$ = GetThingShadow$;
280
982
  exports.GetThingShadowCommand = GetThingShadowCommand;
983
+ exports.GetThingShadowRequest$ = GetThingShadowRequest$;
984
+ exports.GetThingShadowResponse$ = GetThingShadowResponse$;
985
+ exports.InternalFailureException = InternalFailureException;
986
+ exports.InternalFailureException$ = InternalFailureException$;
987
+ exports.InvalidRequestException = InvalidRequestException;
988
+ exports.InvalidRequestException$ = InvalidRequestException$;
281
989
  exports.IoTDataPlane = IoTDataPlane;
282
990
  exports.IoTDataPlaneClient = IoTDataPlaneClient;
991
+ exports.IoTDataPlaneServiceException = IoTDataPlaneServiceException;
992
+ exports.IoTDataPlaneServiceException$ = IoTDataPlaneServiceException$;
993
+ exports.ListNamedShadowsForThing$ = ListNamedShadowsForThing$;
283
994
  exports.ListNamedShadowsForThingCommand = ListNamedShadowsForThingCommand;
995
+ exports.ListNamedShadowsForThingRequest$ = ListNamedShadowsForThingRequest$;
996
+ exports.ListNamedShadowsForThingResponse$ = ListNamedShadowsForThingResponse$;
997
+ exports.ListRetainedMessages$ = ListRetainedMessages$;
284
998
  exports.ListRetainedMessagesCommand = ListRetainedMessagesCommand;
999
+ exports.ListRetainedMessagesRequest$ = ListRetainedMessagesRequest$;
1000
+ exports.ListRetainedMessagesResponse$ = ListRetainedMessagesResponse$;
1001
+ exports.ListSubscriptions$ = ListSubscriptions$;
285
1002
  exports.ListSubscriptionsCommand = ListSubscriptionsCommand;
1003
+ exports.ListSubscriptionsRequest$ = ListSubscriptionsRequest$;
1004
+ exports.ListSubscriptionsResponse$ = ListSubscriptionsResponse$;
1005
+ exports.MethodNotAllowedException = MethodNotAllowedException;
1006
+ exports.MethodNotAllowedException$ = MethodNotAllowedException$;
286
1007
  exports.PayloadFormatIndicator = PayloadFormatIndicator;
1008
+ exports.Publish$ = Publish$;
287
1009
  exports.PublishCommand = PublishCommand;
1010
+ exports.PublishRequest$ = PublishRequest$;
1011
+ exports.RequestEntityTooLargeException = RequestEntityTooLargeException;
1012
+ exports.RequestEntityTooLargeException$ = RequestEntityTooLargeException$;
1013
+ exports.ResourceNotFoundException = ResourceNotFoundException;
1014
+ exports.ResourceNotFoundException$ = ResourceNotFoundException$;
1015
+ exports.RetainedMessageSummary$ = RetainedMessageSummary$;
1016
+ exports.SendDirectMessage$ = SendDirectMessage$;
288
1017
  exports.SendDirectMessageCommand = SendDirectMessageCommand;
1018
+ exports.SendDirectMessageRequest$ = SendDirectMessageRequest$;
1019
+ exports.SendDirectMessageResponse$ = SendDirectMessageResponse$;
1020
+ exports.ServiceUnavailableException = ServiceUnavailableException;
1021
+ exports.ServiceUnavailableException$ = ServiceUnavailableException$;
1022
+ exports.SubscriptionSummary$ = SubscriptionSummary$;
1023
+ exports.ThrottlingException = ThrottlingException;
1024
+ exports.ThrottlingException$ = ThrottlingException$;
1025
+ exports.UnauthorizedException = UnauthorizedException;
1026
+ exports.UnauthorizedException$ = UnauthorizedException$;
1027
+ exports.UnsupportedDocumentEncodingException = UnsupportedDocumentEncodingException;
1028
+ exports.UnsupportedDocumentEncodingException$ = UnsupportedDocumentEncodingException$;
1029
+ exports.UpdateThingShadow$ = UpdateThingShadow$;
289
1030
  exports.UpdateThingShadowCommand = UpdateThingShadowCommand;
1031
+ exports.UpdateThingShadowRequest$ = UpdateThingShadowRequest$;
1032
+ exports.UpdateThingShadowResponse$ = UpdateThingShadowResponse$;
1033
+ exports.errorTypeRegistries = errorTypeRegistries;
290
1034
  exports.paginateListRetainedMessages = paginateListRetainedMessages;
291
1035
  exports.paginateListSubscriptions = paginateListSubscriptions;