@aws-sdk/client-sagemaker-a2i-runtime 3.490.0 → 3.496.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.
@@ -1,12 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SageMakerA2IRuntimeServiceException = exports.__ServiceException = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
- class SageMakerA2IRuntimeServiceException extends smithy_client_1.ServiceException {
7
- constructor(options) {
8
- super(options);
9
- Object.setPrototypeOf(this, SageMakerA2IRuntimeServiceException.prototype);
10
- }
11
- }
12
- exports.SageMakerA2IRuntimeServiceException = SageMakerA2IRuntimeServiceException;
1
+ module.exports = require("../index.js");
@@ -1,4 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./models_0"), exports);
1
+ module.exports = require("../index.js");
@@ -1,103 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContentClassifier = exports.ServiceQuotaExceededException = exports.ConflictException = exports.SortOrder = exports.HumanLoopStatus = exports.ValidationException = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = void 0;
4
- const SageMakerA2IRuntimeServiceException_1 = require("./SageMakerA2IRuntimeServiceException");
5
- class InternalServerException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
6
- constructor(opts) {
7
- super({
8
- name: "InternalServerException",
9
- $fault: "server",
10
- ...opts,
11
- });
12
- this.name = "InternalServerException";
13
- this.$fault = "server";
14
- Object.setPrototypeOf(this, InternalServerException.prototype);
15
- this.Message = opts.Message;
16
- }
17
- }
18
- exports.InternalServerException = InternalServerException;
19
- class ResourceNotFoundException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
20
- constructor(opts) {
21
- super({
22
- name: "ResourceNotFoundException",
23
- $fault: "client",
24
- ...opts,
25
- });
26
- this.name = "ResourceNotFoundException";
27
- this.$fault = "client";
28
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
29
- this.Message = opts.Message;
30
- }
31
- }
32
- exports.ResourceNotFoundException = ResourceNotFoundException;
33
- class ThrottlingException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
34
- constructor(opts) {
35
- super({
36
- name: "ThrottlingException",
37
- $fault: "client",
38
- ...opts,
39
- });
40
- this.name = "ThrottlingException";
41
- this.$fault = "client";
42
- Object.setPrototypeOf(this, ThrottlingException.prototype);
43
- this.Message = opts.Message;
44
- }
45
- }
46
- exports.ThrottlingException = ThrottlingException;
47
- class ValidationException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
48
- constructor(opts) {
49
- super({
50
- name: "ValidationException",
51
- $fault: "client",
52
- ...opts,
53
- });
54
- this.name = "ValidationException";
55
- this.$fault = "client";
56
- Object.setPrototypeOf(this, ValidationException.prototype);
57
- this.Message = opts.Message;
58
- }
59
- }
60
- exports.ValidationException = ValidationException;
61
- exports.HumanLoopStatus = {
62
- COMPLETED: "Completed",
63
- FAILED: "Failed",
64
- IN_PROGRESS: "InProgress",
65
- STOPPED: "Stopped",
66
- STOPPING: "Stopping",
67
- };
68
- exports.SortOrder = {
69
- ASCENDING: "Ascending",
70
- DESCENDING: "Descending",
71
- };
72
- class ConflictException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
73
- constructor(opts) {
74
- super({
75
- name: "ConflictException",
76
- $fault: "client",
77
- ...opts,
78
- });
79
- this.name = "ConflictException";
80
- this.$fault = "client";
81
- Object.setPrototypeOf(this, ConflictException.prototype);
82
- this.Message = opts.Message;
83
- }
84
- }
85
- exports.ConflictException = ConflictException;
86
- class ServiceQuotaExceededException extends SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException {
87
- constructor(opts) {
88
- super({
89
- name: "ServiceQuotaExceededException",
90
- $fault: "client",
91
- ...opts,
92
- });
93
- this.name = "ServiceQuotaExceededException";
94
- this.$fault = "client";
95
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
96
- this.Message = opts.Message;
97
- }
98
- }
99
- exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
100
- exports.ContentClassifier = {
101
- FREE_OF_ADULT_CONTENT: "FreeOfAdultContent",
102
- FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION: "FreeOfPersonallyIdentifiableInformation",
103
- };
1
+ module.exports = require("../index.js");
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ module.exports = require("../index.js");
@@ -1,7 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.paginateListHumanLoops = void 0;
4
- const core_1 = require("@smithy/core");
5
- const ListHumanLoopsCommand_1 = require("../commands/ListHumanLoopsCommand");
6
- const SageMakerA2IRuntimeClient_1 = require("../SageMakerA2IRuntimeClient");
7
- exports.paginateListHumanLoops = (0, core_1.createPaginator)(SageMakerA2IRuntimeClient_1.SageMakerA2IRuntimeClient, ListHumanLoopsCommand_1.ListHumanLoopsCommand, "NextToken", "NextToken", "MaxResults");
1
+ module.exports = require("../index.js");
@@ -1,5 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./Interfaces"), exports);
5
- tslib_1.__exportStar(require("./ListHumanLoopsPaginator"), exports);
1
+ module.exports = require("../index.js");
@@ -1,453 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_StopHumanLoopCommand = exports.de_StartHumanLoopCommand = exports.de_ListHumanLoopsCommand = exports.de_DescribeHumanLoopCommand = exports.de_DeleteHumanLoopCommand = exports.se_StopHumanLoopCommand = exports.se_StartHumanLoopCommand = exports.se_ListHumanLoopsCommand = exports.se_DescribeHumanLoopCommand = exports.se_DeleteHumanLoopCommand = void 0;
4
- const core_1 = require("@smithy/core");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const models_0_1 = require("../models/models_0");
7
- const SageMakerA2IRuntimeServiceException_1 = require("../models/SageMakerA2IRuntimeServiceException");
8
- const se_DeleteHumanLoopCommand = async (input, context) => {
9
- const b = (0, core_1.requestBuilder)(input, context);
10
- const headers = {};
11
- b.bp("/human-loops/{HumanLoopName}");
12
- b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
13
- let body;
14
- b.m("DELETE").h(headers).b(body);
15
- return b.build();
16
- };
17
- exports.se_DeleteHumanLoopCommand = se_DeleteHumanLoopCommand;
18
- const se_DescribeHumanLoopCommand = async (input, context) => {
19
- const b = (0, core_1.requestBuilder)(input, context);
20
- const headers = {};
21
- b.bp("/human-loops/{HumanLoopName}");
22
- b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
23
- let body;
24
- b.m("GET").h(headers).b(body);
25
- return b.build();
26
- };
27
- exports.se_DescribeHumanLoopCommand = se_DescribeHumanLoopCommand;
28
- const se_ListHumanLoopsCommand = async (input, context) => {
29
- const b = (0, core_1.requestBuilder)(input, context);
30
- const headers = {};
31
- b.bp("/human-loops");
32
- const query = (0, smithy_client_1.map)({
33
- [_CTA]: [
34
- () => input.CreationTimeAfter !== void 0,
35
- () => (input[_CTA].toISOString().split(".")[0] + "Z").toString(),
36
- ],
37
- [_CTB]: [
38
- () => input.CreationTimeBefore !== void 0,
39
- () => (input[_CTB].toISOString().split(".")[0] + "Z").toString(),
40
- ],
41
- [_FDA]: [, (0, smithy_client_1.expectNonNull)(input[_FDA], `FlowDefinitionArn`)],
42
- [_SO]: [, input[_SO]],
43
- [_NT]: [, input[_NT]],
44
- [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
45
- });
46
- let body;
47
- b.m("GET").h(headers).q(query).b(body);
48
- return b.build();
49
- };
50
- exports.se_ListHumanLoopsCommand = se_ListHumanLoopsCommand;
51
- const se_StartHumanLoopCommand = async (input, context) => {
52
- const b = (0, core_1.requestBuilder)(input, context);
53
- const headers = {
54
- "content-type": "application/json",
55
- };
56
- b.bp("/human-loops");
57
- let body;
58
- body = JSON.stringify((0, smithy_client_1.take)(input, {
59
- DataAttributes: (_) => (0, smithy_client_1._json)(_),
60
- FlowDefinitionArn: [],
61
- HumanLoopInput: (_) => (0, smithy_client_1._json)(_),
62
- HumanLoopName: [],
63
- }));
64
- b.m("POST").h(headers).b(body);
65
- return b.build();
66
- };
67
- exports.se_StartHumanLoopCommand = se_StartHumanLoopCommand;
68
- const se_StopHumanLoopCommand = async (input, context) => {
69
- const b = (0, core_1.requestBuilder)(input, context);
70
- const headers = {
71
- "content-type": "application/json",
72
- };
73
- b.bp("/human-loops/stop");
74
- let body;
75
- body = JSON.stringify((0, smithy_client_1.take)(input, {
76
- HumanLoopName: [],
77
- }));
78
- b.m("POST").h(headers).b(body);
79
- return b.build();
80
- };
81
- exports.se_StopHumanLoopCommand = se_StopHumanLoopCommand;
82
- const de_DeleteHumanLoopCommand = async (output, context) => {
83
- if (output.statusCode !== 200 && output.statusCode >= 300) {
84
- return de_DeleteHumanLoopCommandError(output, context);
85
- }
86
- const contents = (0, smithy_client_1.map)({
87
- $metadata: deserializeMetadata(output),
88
- });
89
- await (0, smithy_client_1.collectBody)(output.body, context);
90
- return contents;
91
- };
92
- exports.de_DeleteHumanLoopCommand = de_DeleteHumanLoopCommand;
93
- const de_DeleteHumanLoopCommandError = async (output, context) => {
94
- const parsedOutput = {
95
- ...output,
96
- body: await parseErrorBody(output.body, context),
97
- };
98
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
99
- switch (errorCode) {
100
- case "InternalServerException":
101
- case "com.amazonaws.sagemakera2iruntime#InternalServerException":
102
- throw await de_InternalServerExceptionRes(parsedOutput, context);
103
- case "ResourceNotFoundException":
104
- case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
105
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
106
- case "ThrottlingException":
107
- case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
108
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
109
- case "ValidationException":
110
- case "com.amazonaws.sagemakera2iruntime#ValidationException":
111
- throw await de_ValidationExceptionRes(parsedOutput, context);
112
- default:
113
- const parsedBody = parsedOutput.body;
114
- return throwDefaultError({
115
- output,
116
- parsedBody,
117
- errorCode,
118
- });
119
- }
120
- };
121
- const de_DescribeHumanLoopCommand = async (output, context) => {
122
- if (output.statusCode !== 200 && output.statusCode >= 300) {
123
- return de_DescribeHumanLoopCommandError(output, context);
124
- }
125
- const contents = (0, smithy_client_1.map)({
126
- $metadata: deserializeMetadata(output),
127
- });
128
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
129
- const doc = (0, smithy_client_1.take)(data, {
130
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
131
- FailureCode: smithy_client_1.expectString,
132
- FailureReason: smithy_client_1.expectString,
133
- FlowDefinitionArn: smithy_client_1.expectString,
134
- HumanLoopArn: smithy_client_1.expectString,
135
- HumanLoopName: smithy_client_1.expectString,
136
- HumanLoopOutput: smithy_client_1._json,
137
- HumanLoopStatus: smithy_client_1.expectString,
138
- });
139
- Object.assign(contents, doc);
140
- return contents;
141
- };
142
- exports.de_DescribeHumanLoopCommand = de_DescribeHumanLoopCommand;
143
- const de_DescribeHumanLoopCommandError = async (output, context) => {
144
- const parsedOutput = {
145
- ...output,
146
- body: await parseErrorBody(output.body, context),
147
- };
148
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
149
- switch (errorCode) {
150
- case "InternalServerException":
151
- case "com.amazonaws.sagemakera2iruntime#InternalServerException":
152
- throw await de_InternalServerExceptionRes(parsedOutput, context);
153
- case "ResourceNotFoundException":
154
- case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
155
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
156
- case "ThrottlingException":
157
- case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
158
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
159
- case "ValidationException":
160
- case "com.amazonaws.sagemakera2iruntime#ValidationException":
161
- throw await de_ValidationExceptionRes(parsedOutput, context);
162
- default:
163
- const parsedBody = parsedOutput.body;
164
- return throwDefaultError({
165
- output,
166
- parsedBody,
167
- errorCode,
168
- });
169
- }
170
- };
171
- const de_ListHumanLoopsCommand = async (output, context) => {
172
- if (output.statusCode !== 200 && output.statusCode >= 300) {
173
- return de_ListHumanLoopsCommandError(output, context);
174
- }
175
- const contents = (0, smithy_client_1.map)({
176
- $metadata: deserializeMetadata(output),
177
- });
178
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
179
- const doc = (0, smithy_client_1.take)(data, {
180
- HumanLoopSummaries: (_) => de_HumanLoopSummaries(_, context),
181
- NextToken: smithy_client_1.expectString,
182
- });
183
- Object.assign(contents, doc);
184
- return contents;
185
- };
186
- exports.de_ListHumanLoopsCommand = de_ListHumanLoopsCommand;
187
- const de_ListHumanLoopsCommandError = async (output, context) => {
188
- const parsedOutput = {
189
- ...output,
190
- body: await parseErrorBody(output.body, context),
191
- };
192
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
193
- switch (errorCode) {
194
- case "InternalServerException":
195
- case "com.amazonaws.sagemakera2iruntime#InternalServerException":
196
- throw await de_InternalServerExceptionRes(parsedOutput, context);
197
- case "ResourceNotFoundException":
198
- case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
199
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
200
- case "ThrottlingException":
201
- case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
202
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
203
- case "ValidationException":
204
- case "com.amazonaws.sagemakera2iruntime#ValidationException":
205
- throw await de_ValidationExceptionRes(parsedOutput, context);
206
- default:
207
- const parsedBody = parsedOutput.body;
208
- return throwDefaultError({
209
- output,
210
- parsedBody,
211
- errorCode,
212
- });
213
- }
214
- };
215
- const de_StartHumanLoopCommand = async (output, context) => {
216
- if (output.statusCode !== 200 && output.statusCode >= 300) {
217
- return de_StartHumanLoopCommandError(output, context);
218
- }
219
- const contents = (0, smithy_client_1.map)({
220
- $metadata: deserializeMetadata(output),
221
- });
222
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
223
- const doc = (0, smithy_client_1.take)(data, {
224
- HumanLoopArn: smithy_client_1.expectString,
225
- });
226
- Object.assign(contents, doc);
227
- return contents;
228
- };
229
- exports.de_StartHumanLoopCommand = de_StartHumanLoopCommand;
230
- const de_StartHumanLoopCommandError = async (output, context) => {
231
- const parsedOutput = {
232
- ...output,
233
- body: await parseErrorBody(output.body, context),
234
- };
235
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
236
- switch (errorCode) {
237
- case "ConflictException":
238
- case "com.amazonaws.sagemakera2iruntime#ConflictException":
239
- throw await de_ConflictExceptionRes(parsedOutput, context);
240
- case "InternalServerException":
241
- case "com.amazonaws.sagemakera2iruntime#InternalServerException":
242
- throw await de_InternalServerExceptionRes(parsedOutput, context);
243
- case "ServiceQuotaExceededException":
244
- case "com.amazonaws.sagemakera2iruntime#ServiceQuotaExceededException":
245
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
246
- case "ThrottlingException":
247
- case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
248
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
249
- case "ValidationException":
250
- case "com.amazonaws.sagemakera2iruntime#ValidationException":
251
- throw await de_ValidationExceptionRes(parsedOutput, context);
252
- default:
253
- const parsedBody = parsedOutput.body;
254
- return throwDefaultError({
255
- output,
256
- parsedBody,
257
- errorCode,
258
- });
259
- }
260
- };
261
- const de_StopHumanLoopCommand = async (output, context) => {
262
- if (output.statusCode !== 200 && output.statusCode >= 300) {
263
- return de_StopHumanLoopCommandError(output, context);
264
- }
265
- const contents = (0, smithy_client_1.map)({
266
- $metadata: deserializeMetadata(output),
267
- });
268
- await (0, smithy_client_1.collectBody)(output.body, context);
269
- return contents;
270
- };
271
- exports.de_StopHumanLoopCommand = de_StopHumanLoopCommand;
272
- const de_StopHumanLoopCommandError = async (output, context) => {
273
- const parsedOutput = {
274
- ...output,
275
- body: await parseErrorBody(output.body, context),
276
- };
277
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
278
- switch (errorCode) {
279
- case "InternalServerException":
280
- case "com.amazonaws.sagemakera2iruntime#InternalServerException":
281
- throw await de_InternalServerExceptionRes(parsedOutput, context);
282
- case "ResourceNotFoundException":
283
- case "com.amazonaws.sagemakera2iruntime#ResourceNotFoundException":
284
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
285
- case "ThrottlingException":
286
- case "com.amazonaws.sagemakera2iruntime#ThrottlingException":
287
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
288
- case "ValidationException":
289
- case "com.amazonaws.sagemakera2iruntime#ValidationException":
290
- throw await de_ValidationExceptionRes(parsedOutput, context);
291
- default:
292
- const parsedBody = parsedOutput.body;
293
- return throwDefaultError({
294
- output,
295
- parsedBody,
296
- errorCode,
297
- });
298
- }
299
- };
300
- const throwDefaultError = (0, smithy_client_1.withBaseException)(SageMakerA2IRuntimeServiceException_1.SageMakerA2IRuntimeServiceException);
301
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
302
- const contents = (0, smithy_client_1.map)({});
303
- const data = parsedOutput.body;
304
- const doc = (0, smithy_client_1.take)(data, {
305
- Message: smithy_client_1.expectString,
306
- });
307
- Object.assign(contents, doc);
308
- const exception = new models_0_1.ConflictException({
309
- $metadata: deserializeMetadata(parsedOutput),
310
- ...contents,
311
- });
312
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
313
- };
314
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
315
- const contents = (0, smithy_client_1.map)({});
316
- const data = parsedOutput.body;
317
- const doc = (0, smithy_client_1.take)(data, {
318
- Message: smithy_client_1.expectString,
319
- });
320
- Object.assign(contents, doc);
321
- const exception = new models_0_1.InternalServerException({
322
- $metadata: deserializeMetadata(parsedOutput),
323
- ...contents,
324
- });
325
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
326
- };
327
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
328
- const contents = (0, smithy_client_1.map)({});
329
- const data = parsedOutput.body;
330
- const doc = (0, smithy_client_1.take)(data, {
331
- Message: smithy_client_1.expectString,
332
- });
333
- Object.assign(contents, doc);
334
- const exception = new models_0_1.ResourceNotFoundException({
335
- $metadata: deserializeMetadata(parsedOutput),
336
- ...contents,
337
- });
338
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
339
- };
340
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
341
- const contents = (0, smithy_client_1.map)({});
342
- const data = parsedOutput.body;
343
- const doc = (0, smithy_client_1.take)(data, {
344
- Message: smithy_client_1.expectString,
345
- });
346
- Object.assign(contents, doc);
347
- const exception = new models_0_1.ServiceQuotaExceededException({
348
- $metadata: deserializeMetadata(parsedOutput),
349
- ...contents,
350
- });
351
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
352
- };
353
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
354
- const contents = (0, smithy_client_1.map)({});
355
- const data = parsedOutput.body;
356
- const doc = (0, smithy_client_1.take)(data, {
357
- Message: smithy_client_1.expectString,
358
- });
359
- Object.assign(contents, doc);
360
- const exception = new models_0_1.ThrottlingException({
361
- $metadata: deserializeMetadata(parsedOutput),
362
- ...contents,
363
- });
364
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
365
- };
366
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
367
- const contents = (0, smithy_client_1.map)({});
368
- const data = parsedOutput.body;
369
- const doc = (0, smithy_client_1.take)(data, {
370
- Message: smithy_client_1.expectString,
371
- });
372
- Object.assign(contents, doc);
373
- const exception = new models_0_1.ValidationException({
374
- $metadata: deserializeMetadata(parsedOutput),
375
- ...contents,
376
- });
377
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
378
- };
379
- const de_HumanLoopSummaries = (output, context) => {
380
- const retVal = (output || [])
381
- .filter((e) => e != null)
382
- .map((entry) => {
383
- return de_HumanLoopSummary(entry, context);
384
- });
385
- return retVal;
386
- };
387
- const de_HumanLoopSummary = (output, context) => {
388
- return (0, smithy_client_1.take)(output, {
389
- CreationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
390
- FailureReason: smithy_client_1.expectString,
391
- FlowDefinitionArn: smithy_client_1.expectString,
392
- HumanLoopName: smithy_client_1.expectString,
393
- HumanLoopStatus: smithy_client_1.expectString,
394
- });
395
- };
396
- const deserializeMetadata = (output) => ({
397
- httpStatusCode: output.statusCode,
398
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
399
- extendedRequestId: output.headers["x-amz-id-2"],
400
- cfId: output.headers["x-amz-cf-id"],
401
- });
402
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
403
- const isSerializableHeaderValue = (value) => value !== undefined &&
404
- value !== null &&
405
- value !== "" &&
406
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
407
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
408
- const _CTA = "CreationTimeAfter";
409
- const _CTB = "CreationTimeBefore";
410
- const _FDA = "FlowDefinitionArn";
411
- const _MR = "MaxResults";
412
- const _NT = "NextToken";
413
- const _SO = "SortOrder";
414
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
415
- if (encoded.length) {
416
- return JSON.parse(encoded);
417
- }
418
- return {};
419
- });
420
- const parseErrorBody = async (errorBody, context) => {
421
- const value = await parseBody(errorBody, context);
422
- value.message = value.message ?? value.Message;
423
- return value;
424
- };
425
- const loadRestJsonErrorCode = (output, data) => {
426
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
427
- const sanitizeErrorCode = (rawValue) => {
428
- let cleanValue = rawValue;
429
- if (typeof cleanValue === "number") {
430
- cleanValue = cleanValue.toString();
431
- }
432
- if (cleanValue.indexOf(",") >= 0) {
433
- cleanValue = cleanValue.split(",")[0];
434
- }
435
- if (cleanValue.indexOf(":") >= 0) {
436
- cleanValue = cleanValue.split(":")[0];
437
- }
438
- if (cleanValue.indexOf("#") >= 0) {
439
- cleanValue = cleanValue.split("#")[1];
440
- }
441
- return cleanValue;
442
- };
443
- const headerKey = findKey(output.headers, "x-amzn-errortype");
444
- if (headerKey !== undefined) {
445
- return sanitizeErrorCode(output.headers[headerKey]);
446
- }
447
- if (data.code !== undefined) {
448
- return sanitizeErrorCode(data.code);
449
- }
450
- if (data["__type"] !== undefined) {
451
- return sanitizeErrorCode(data["__type"]);
452
- }
453
- };
1
+ module.exports = require("../index.js");
@@ -1,22 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveRuntimeExtensions = void 0;
4
- const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const asPartial = (t) => t;
8
- const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
9
- const extensionConfiguration = {
10
- ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
11
- ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
12
- ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
13
- };
14
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
15
- return {
16
- ...runtimeConfig,
17
- ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
18
- ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
19
- ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
20
- };
21
- };
22
- exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
1
+ module.exports = require("./index.js");