@aws-sdk/client-b2bi 3.490.0 → 3.495.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.
Files changed (50) hide show
  1. package/dist-cjs/B2bi.js +1 -65
  2. package/dist-cjs/B2biClient.js +1 -43
  3. package/dist-cjs/commands/CreateCapabilityCommand.js +1 -28
  4. package/dist-cjs/commands/CreatePartnershipCommand.js +1 -29
  5. package/dist-cjs/commands/CreateProfileCommand.js +1 -29
  6. package/dist-cjs/commands/CreateTransformerCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteCapabilityCommand.js +1 -28
  8. package/dist-cjs/commands/DeletePartnershipCommand.js +1 -28
  9. package/dist-cjs/commands/DeleteProfileCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteTransformerCommand.js +1 -28
  11. package/dist-cjs/commands/GetCapabilityCommand.js +1 -28
  12. package/dist-cjs/commands/GetPartnershipCommand.js +1 -29
  13. package/dist-cjs/commands/GetProfileCommand.js +1 -29
  14. package/dist-cjs/commands/GetTransformerCommand.js +1 -28
  15. package/dist-cjs/commands/GetTransformerJobCommand.js +1 -28
  16. package/dist-cjs/commands/ListCapabilitiesCommand.js +1 -28
  17. package/dist-cjs/commands/ListPartnershipsCommand.js +1 -28
  18. package/dist-cjs/commands/ListProfilesCommand.js +1 -28
  19. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  20. package/dist-cjs/commands/ListTransformersCommand.js +1 -28
  21. package/dist-cjs/commands/StartTransformerJobCommand.js +1 -28
  22. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  23. package/dist-cjs/commands/TestMappingCommand.js +1 -28
  24. package/dist-cjs/commands/TestParsingCommand.js +1 -28
  25. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  26. package/dist-cjs/commands/UpdateCapabilityCommand.js +1 -28
  27. package/dist-cjs/commands/UpdatePartnershipCommand.js +1 -29
  28. package/dist-cjs/commands/UpdateProfileCommand.js +1 -29
  29. package/dist-cjs/commands/UpdateTransformerCommand.js +1 -28
  30. package/dist-cjs/commands/index.js +1 -30
  31. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  32. package/dist-cjs/extensionConfiguration.js +1 -2
  33. package/dist-cjs/index.js +2777 -11
  34. package/dist-cjs/models/B2biServiceException.js +1 -12
  35. package/dist-cjs/models/index.js +1 -4
  36. package/dist-cjs/models/models_0.js +1 -227
  37. package/dist-cjs/pagination/Interfaces.js +1 -2
  38. package/dist-cjs/pagination/ListCapabilitiesPaginator.js +1 -7
  39. package/dist-cjs/pagination/ListPartnershipsPaginator.js +1 -7
  40. package/dist-cjs/pagination/ListProfilesPaginator.js +1 -7
  41. package/dist-cjs/pagination/ListTransformersPaginator.js +1 -7
  42. package/dist-cjs/pagination/index.js +1 -8
  43. package/dist-cjs/protocols/Aws_json1_0.js +1 -1822
  44. package/dist-cjs/runtimeExtensions.js +1 -22
  45. package/dist-es/protocols/Aws_json1_0.js +9 -0
  46. package/dist-types/commands/ListTagsForResourceCommand.d.ts +3 -0
  47. package/dist-types/commands/TagResourceCommand.d.ts +3 -0
  48. package/dist-types/commands/TestParsingCommand.d.ts +1 -1
  49. package/dist-types/commands/UntagResourceCommand.d.ts +3 -0
  50. package/package.json +40 -40
@@ -1,1822 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UntagResourceCommand = exports.de_TestParsingCommand = exports.de_TestMappingCommand = exports.de_TagResourceCommand = exports.de_StartTransformerJobCommand = exports.de_ListTransformersCommand = exports.de_ListTagsForResourceCommand = exports.de_ListProfilesCommand = exports.de_ListPartnershipsCommand = exports.de_ListCapabilitiesCommand = exports.de_GetTransformerJobCommand = exports.de_GetTransformerCommand = exports.de_GetProfileCommand = exports.de_GetPartnershipCommand = exports.de_GetCapabilityCommand = exports.de_DeleteTransformerCommand = exports.de_DeleteProfileCommand = exports.de_DeletePartnershipCommand = exports.de_DeleteCapabilityCommand = exports.de_CreateTransformerCommand = exports.de_CreateProfileCommand = exports.de_CreatePartnershipCommand = exports.de_CreateCapabilityCommand = exports.se_UpdateTransformerCommand = exports.se_UpdateProfileCommand = exports.se_UpdatePartnershipCommand = exports.se_UpdateCapabilityCommand = exports.se_UntagResourceCommand = exports.se_TestParsingCommand = exports.se_TestMappingCommand = exports.se_TagResourceCommand = exports.se_StartTransformerJobCommand = exports.se_ListTransformersCommand = exports.se_ListTagsForResourceCommand = exports.se_ListProfilesCommand = exports.se_ListPartnershipsCommand = exports.se_ListCapabilitiesCommand = exports.se_GetTransformerJobCommand = exports.se_GetTransformerCommand = exports.se_GetProfileCommand = exports.se_GetPartnershipCommand = exports.se_GetCapabilityCommand = exports.se_DeleteTransformerCommand = exports.se_DeleteProfileCommand = exports.se_DeletePartnershipCommand = exports.se_DeleteCapabilityCommand = exports.se_CreateTransformerCommand = exports.se_CreateProfileCommand = exports.se_CreatePartnershipCommand = exports.se_CreateCapabilityCommand = void 0;
4
- exports.de_UpdateTransformerCommand = exports.de_UpdateProfileCommand = exports.de_UpdatePartnershipCommand = exports.de_UpdateCapabilityCommand = void 0;
5
- const core_1 = require("@aws-sdk/core");
6
- const protocol_http_1 = require("@smithy/protocol-http");
7
- const smithy_client_1 = require("@smithy/smithy-client");
8
- const uuid_1 = require("uuid");
9
- const B2biServiceException_1 = require("../models/B2biServiceException");
10
- const models_0_1 = require("../models/models_0");
11
- const se_CreateCapabilityCommand = async (input, context) => {
12
- const headers = sharedHeaders("CreateCapability");
13
- let body;
14
- body = JSON.stringify(se_CreateCapabilityRequest(input, context));
15
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
16
- };
17
- exports.se_CreateCapabilityCommand = se_CreateCapabilityCommand;
18
- const se_CreatePartnershipCommand = async (input, context) => {
19
- const headers = sharedHeaders("CreatePartnership");
20
- let body;
21
- body = JSON.stringify(se_CreatePartnershipRequest(input, context));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- exports.se_CreatePartnershipCommand = se_CreatePartnershipCommand;
25
- const se_CreateProfileCommand = async (input, context) => {
26
- const headers = sharedHeaders("CreateProfile");
27
- let body;
28
- body = JSON.stringify(se_CreateProfileRequest(input, context));
29
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
30
- };
31
- exports.se_CreateProfileCommand = se_CreateProfileCommand;
32
- const se_CreateTransformerCommand = async (input, context) => {
33
- const headers = sharedHeaders("CreateTransformer");
34
- let body;
35
- body = JSON.stringify(se_CreateTransformerRequest(input, context));
36
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
37
- };
38
- exports.se_CreateTransformerCommand = se_CreateTransformerCommand;
39
- const se_DeleteCapabilityCommand = async (input, context) => {
40
- const headers = sharedHeaders("DeleteCapability");
41
- let body;
42
- body = JSON.stringify((0, smithy_client_1._json)(input));
43
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
44
- };
45
- exports.se_DeleteCapabilityCommand = se_DeleteCapabilityCommand;
46
- const se_DeletePartnershipCommand = async (input, context) => {
47
- const headers = sharedHeaders("DeletePartnership");
48
- let body;
49
- body = JSON.stringify((0, smithy_client_1._json)(input));
50
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
51
- };
52
- exports.se_DeletePartnershipCommand = se_DeletePartnershipCommand;
53
- const se_DeleteProfileCommand = async (input, context) => {
54
- const headers = sharedHeaders("DeleteProfile");
55
- let body;
56
- body = JSON.stringify((0, smithy_client_1._json)(input));
57
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
- };
59
- exports.se_DeleteProfileCommand = se_DeleteProfileCommand;
60
- const se_DeleteTransformerCommand = async (input, context) => {
61
- const headers = sharedHeaders("DeleteTransformer");
62
- let body;
63
- body = JSON.stringify((0, smithy_client_1._json)(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- exports.se_DeleteTransformerCommand = se_DeleteTransformerCommand;
67
- const se_GetCapabilityCommand = async (input, context) => {
68
- const headers = sharedHeaders("GetCapability");
69
- let body;
70
- body = JSON.stringify((0, smithy_client_1._json)(input));
71
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
72
- };
73
- exports.se_GetCapabilityCommand = se_GetCapabilityCommand;
74
- const se_GetPartnershipCommand = async (input, context) => {
75
- const headers = sharedHeaders("GetPartnership");
76
- let body;
77
- body = JSON.stringify((0, smithy_client_1._json)(input));
78
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
79
- };
80
- exports.se_GetPartnershipCommand = se_GetPartnershipCommand;
81
- const se_GetProfileCommand = async (input, context) => {
82
- const headers = sharedHeaders("GetProfile");
83
- let body;
84
- body = JSON.stringify((0, smithy_client_1._json)(input));
85
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
86
- };
87
- exports.se_GetProfileCommand = se_GetProfileCommand;
88
- const se_GetTransformerCommand = async (input, context) => {
89
- const headers = sharedHeaders("GetTransformer");
90
- let body;
91
- body = JSON.stringify((0, smithy_client_1._json)(input));
92
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
93
- };
94
- exports.se_GetTransformerCommand = se_GetTransformerCommand;
95
- const se_GetTransformerJobCommand = async (input, context) => {
96
- const headers = sharedHeaders("GetTransformerJob");
97
- let body;
98
- body = JSON.stringify((0, smithy_client_1._json)(input));
99
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
100
- };
101
- exports.se_GetTransformerJobCommand = se_GetTransformerJobCommand;
102
- const se_ListCapabilitiesCommand = async (input, context) => {
103
- const headers = sharedHeaders("ListCapabilities");
104
- let body;
105
- body = JSON.stringify((0, smithy_client_1._json)(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- exports.se_ListCapabilitiesCommand = se_ListCapabilitiesCommand;
109
- const se_ListPartnershipsCommand = async (input, context) => {
110
- const headers = sharedHeaders("ListPartnerships");
111
- let body;
112
- body = JSON.stringify((0, smithy_client_1._json)(input));
113
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
114
- };
115
- exports.se_ListPartnershipsCommand = se_ListPartnershipsCommand;
116
- const se_ListProfilesCommand = async (input, context) => {
117
- const headers = sharedHeaders("ListProfiles");
118
- let body;
119
- body = JSON.stringify((0, smithy_client_1._json)(input));
120
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
121
- };
122
- exports.se_ListProfilesCommand = se_ListProfilesCommand;
123
- const se_ListTagsForResourceCommand = async (input, context) => {
124
- const headers = sharedHeaders("ListTagsForResource");
125
- let body;
126
- body = JSON.stringify((0, smithy_client_1._json)(input));
127
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
128
- };
129
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
130
- const se_ListTransformersCommand = async (input, context) => {
131
- const headers = sharedHeaders("ListTransformers");
132
- let body;
133
- body = JSON.stringify((0, smithy_client_1._json)(input));
134
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
135
- };
136
- exports.se_ListTransformersCommand = se_ListTransformersCommand;
137
- const se_StartTransformerJobCommand = async (input, context) => {
138
- const headers = sharedHeaders("StartTransformerJob");
139
- let body;
140
- body = JSON.stringify(se_StartTransformerJobRequest(input, context));
141
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
142
- };
143
- exports.se_StartTransformerJobCommand = se_StartTransformerJobCommand;
144
- const se_TagResourceCommand = async (input, context) => {
145
- const headers = sharedHeaders("TagResource");
146
- let body;
147
- body = JSON.stringify((0, smithy_client_1._json)(input));
148
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
- };
150
- exports.se_TagResourceCommand = se_TagResourceCommand;
151
- const se_TestMappingCommand = async (input, context) => {
152
- const headers = sharedHeaders("TestMapping");
153
- let body;
154
- body = JSON.stringify((0, smithy_client_1._json)(input));
155
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
156
- };
157
- exports.se_TestMappingCommand = se_TestMappingCommand;
158
- const se_TestParsingCommand = async (input, context) => {
159
- const headers = sharedHeaders("TestParsing");
160
- let body;
161
- body = JSON.stringify((0, smithy_client_1._json)(input));
162
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
163
- };
164
- exports.se_TestParsingCommand = se_TestParsingCommand;
165
- const se_UntagResourceCommand = async (input, context) => {
166
- const headers = sharedHeaders("UntagResource");
167
- let body;
168
- body = JSON.stringify((0, smithy_client_1._json)(input));
169
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
170
- };
171
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
172
- const se_UpdateCapabilityCommand = async (input, context) => {
173
- const headers = sharedHeaders("UpdateCapability");
174
- let body;
175
- body = JSON.stringify((0, smithy_client_1._json)(input));
176
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
177
- };
178
- exports.se_UpdateCapabilityCommand = se_UpdateCapabilityCommand;
179
- const se_UpdatePartnershipCommand = async (input, context) => {
180
- const headers = sharedHeaders("UpdatePartnership");
181
- let body;
182
- body = JSON.stringify((0, smithy_client_1._json)(input));
183
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
- };
185
- exports.se_UpdatePartnershipCommand = se_UpdatePartnershipCommand;
186
- const se_UpdateProfileCommand = async (input, context) => {
187
- const headers = sharedHeaders("UpdateProfile");
188
- let body;
189
- body = JSON.stringify((0, smithy_client_1._json)(input));
190
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
191
- };
192
- exports.se_UpdateProfileCommand = se_UpdateProfileCommand;
193
- const se_UpdateTransformerCommand = async (input, context) => {
194
- const headers = sharedHeaders("UpdateTransformer");
195
- let body;
196
- body = JSON.stringify((0, smithy_client_1._json)(input));
197
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
198
- };
199
- exports.se_UpdateTransformerCommand = se_UpdateTransformerCommand;
200
- const de_CreateCapabilityCommand = async (output, context) => {
201
- if (output.statusCode >= 300) {
202
- return de_CreateCapabilityCommandError(output, context);
203
- }
204
- const data = await parseBody(output.body, context);
205
- let contents = {};
206
- contents = de_CreateCapabilityResponse(data, context);
207
- const response = {
208
- $metadata: deserializeMetadata(output),
209
- ...contents,
210
- };
211
- return response;
212
- };
213
- exports.de_CreateCapabilityCommand = de_CreateCapabilityCommand;
214
- const de_CreateCapabilityCommandError = async (output, context) => {
215
- const parsedOutput = {
216
- ...output,
217
- body: await parseErrorBody(output.body, context),
218
- };
219
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
220
- switch (errorCode) {
221
- case "AccessDeniedException":
222
- case "com.amazonaws.b2bi#AccessDeniedException":
223
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
224
- case "ConflictException":
225
- case "com.amazonaws.b2bi#ConflictException":
226
- throw await de_ConflictExceptionRes(parsedOutput, context);
227
- case "InternalServerException":
228
- case "com.amazonaws.b2bi#InternalServerException":
229
- throw await de_InternalServerExceptionRes(parsedOutput, context);
230
- case "ResourceNotFoundException":
231
- case "com.amazonaws.b2bi#ResourceNotFoundException":
232
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
233
- case "ServiceQuotaExceededException":
234
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
235
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
236
- case "ThrottlingException":
237
- case "com.amazonaws.b2bi#ThrottlingException":
238
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
239
- case "ValidationException":
240
- case "com.amazonaws.b2bi#ValidationException":
241
- throw await de_ValidationExceptionRes(parsedOutput, context);
242
- default:
243
- const parsedBody = parsedOutput.body;
244
- return throwDefaultError({
245
- output,
246
- parsedBody,
247
- errorCode,
248
- });
249
- }
250
- };
251
- const de_CreatePartnershipCommand = async (output, context) => {
252
- if (output.statusCode >= 300) {
253
- return de_CreatePartnershipCommandError(output, context);
254
- }
255
- const data = await parseBody(output.body, context);
256
- let contents = {};
257
- contents = de_CreatePartnershipResponse(data, context);
258
- const response = {
259
- $metadata: deserializeMetadata(output),
260
- ...contents,
261
- };
262
- return response;
263
- };
264
- exports.de_CreatePartnershipCommand = de_CreatePartnershipCommand;
265
- const de_CreatePartnershipCommandError = async (output, context) => {
266
- const parsedOutput = {
267
- ...output,
268
- body: await parseErrorBody(output.body, context),
269
- };
270
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
271
- switch (errorCode) {
272
- case "AccessDeniedException":
273
- case "com.amazonaws.b2bi#AccessDeniedException":
274
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
275
- case "ConflictException":
276
- case "com.amazonaws.b2bi#ConflictException":
277
- throw await de_ConflictExceptionRes(parsedOutput, context);
278
- case "InternalServerException":
279
- case "com.amazonaws.b2bi#InternalServerException":
280
- throw await de_InternalServerExceptionRes(parsedOutput, context);
281
- case "ResourceNotFoundException":
282
- case "com.amazonaws.b2bi#ResourceNotFoundException":
283
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
284
- case "ServiceQuotaExceededException":
285
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
286
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
287
- case "ThrottlingException":
288
- case "com.amazonaws.b2bi#ThrottlingException":
289
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
290
- case "ValidationException":
291
- case "com.amazonaws.b2bi#ValidationException":
292
- throw await de_ValidationExceptionRes(parsedOutput, context);
293
- default:
294
- const parsedBody = parsedOutput.body;
295
- return throwDefaultError({
296
- output,
297
- parsedBody,
298
- errorCode,
299
- });
300
- }
301
- };
302
- const de_CreateProfileCommand = async (output, context) => {
303
- if (output.statusCode >= 300) {
304
- return de_CreateProfileCommandError(output, context);
305
- }
306
- const data = await parseBody(output.body, context);
307
- let contents = {};
308
- contents = de_CreateProfileResponse(data, context);
309
- const response = {
310
- $metadata: deserializeMetadata(output),
311
- ...contents,
312
- };
313
- return response;
314
- };
315
- exports.de_CreateProfileCommand = de_CreateProfileCommand;
316
- const de_CreateProfileCommandError = async (output, context) => {
317
- const parsedOutput = {
318
- ...output,
319
- body: await parseErrorBody(output.body, context),
320
- };
321
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
322
- switch (errorCode) {
323
- case "AccessDeniedException":
324
- case "com.amazonaws.b2bi#AccessDeniedException":
325
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
326
- case "ConflictException":
327
- case "com.amazonaws.b2bi#ConflictException":
328
- throw await de_ConflictExceptionRes(parsedOutput, context);
329
- case "InternalServerException":
330
- case "com.amazonaws.b2bi#InternalServerException":
331
- throw await de_InternalServerExceptionRes(parsedOutput, context);
332
- case "ResourceNotFoundException":
333
- case "com.amazonaws.b2bi#ResourceNotFoundException":
334
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
335
- case "ServiceQuotaExceededException":
336
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
337
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
338
- case "ThrottlingException":
339
- case "com.amazonaws.b2bi#ThrottlingException":
340
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
341
- case "ValidationException":
342
- case "com.amazonaws.b2bi#ValidationException":
343
- throw await de_ValidationExceptionRes(parsedOutput, context);
344
- default:
345
- const parsedBody = parsedOutput.body;
346
- return throwDefaultError({
347
- output,
348
- parsedBody,
349
- errorCode,
350
- });
351
- }
352
- };
353
- const de_CreateTransformerCommand = async (output, context) => {
354
- if (output.statusCode >= 300) {
355
- return de_CreateTransformerCommandError(output, context);
356
- }
357
- const data = await parseBody(output.body, context);
358
- let contents = {};
359
- contents = de_CreateTransformerResponse(data, context);
360
- const response = {
361
- $metadata: deserializeMetadata(output),
362
- ...contents,
363
- };
364
- return response;
365
- };
366
- exports.de_CreateTransformerCommand = de_CreateTransformerCommand;
367
- const de_CreateTransformerCommandError = async (output, context) => {
368
- const parsedOutput = {
369
- ...output,
370
- body: await parseErrorBody(output.body, context),
371
- };
372
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
373
- switch (errorCode) {
374
- case "AccessDeniedException":
375
- case "com.amazonaws.b2bi#AccessDeniedException":
376
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
377
- case "ConflictException":
378
- case "com.amazonaws.b2bi#ConflictException":
379
- throw await de_ConflictExceptionRes(parsedOutput, context);
380
- case "InternalServerException":
381
- case "com.amazonaws.b2bi#InternalServerException":
382
- throw await de_InternalServerExceptionRes(parsedOutput, context);
383
- case "ResourceNotFoundException":
384
- case "com.amazonaws.b2bi#ResourceNotFoundException":
385
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
386
- case "ServiceQuotaExceededException":
387
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
388
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
389
- case "ThrottlingException":
390
- case "com.amazonaws.b2bi#ThrottlingException":
391
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
392
- case "ValidationException":
393
- case "com.amazonaws.b2bi#ValidationException":
394
- throw await de_ValidationExceptionRes(parsedOutput, context);
395
- default:
396
- const parsedBody = parsedOutput.body;
397
- return throwDefaultError({
398
- output,
399
- parsedBody,
400
- errorCode,
401
- });
402
- }
403
- };
404
- const de_DeleteCapabilityCommand = async (output, context) => {
405
- if (output.statusCode >= 300) {
406
- return de_DeleteCapabilityCommandError(output, context);
407
- }
408
- await (0, smithy_client_1.collectBody)(output.body, context);
409
- const response = {
410
- $metadata: deserializeMetadata(output),
411
- };
412
- return response;
413
- };
414
- exports.de_DeleteCapabilityCommand = de_DeleteCapabilityCommand;
415
- const de_DeleteCapabilityCommandError = async (output, context) => {
416
- const parsedOutput = {
417
- ...output,
418
- body: await parseErrorBody(output.body, context),
419
- };
420
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
421
- switch (errorCode) {
422
- case "AccessDeniedException":
423
- case "com.amazonaws.b2bi#AccessDeniedException":
424
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
425
- case "ConflictException":
426
- case "com.amazonaws.b2bi#ConflictException":
427
- throw await de_ConflictExceptionRes(parsedOutput, context);
428
- case "InternalServerException":
429
- case "com.amazonaws.b2bi#InternalServerException":
430
- throw await de_InternalServerExceptionRes(parsedOutput, context);
431
- case "ResourceNotFoundException":
432
- case "com.amazonaws.b2bi#ResourceNotFoundException":
433
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
434
- case "ThrottlingException":
435
- case "com.amazonaws.b2bi#ThrottlingException":
436
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
437
- case "ValidationException":
438
- case "com.amazonaws.b2bi#ValidationException":
439
- throw await de_ValidationExceptionRes(parsedOutput, context);
440
- default:
441
- const parsedBody = parsedOutput.body;
442
- return throwDefaultError({
443
- output,
444
- parsedBody,
445
- errorCode,
446
- });
447
- }
448
- };
449
- const de_DeletePartnershipCommand = async (output, context) => {
450
- if (output.statusCode >= 300) {
451
- return de_DeletePartnershipCommandError(output, context);
452
- }
453
- await (0, smithy_client_1.collectBody)(output.body, context);
454
- const response = {
455
- $metadata: deserializeMetadata(output),
456
- };
457
- return response;
458
- };
459
- exports.de_DeletePartnershipCommand = de_DeletePartnershipCommand;
460
- const de_DeletePartnershipCommandError = async (output, context) => {
461
- const parsedOutput = {
462
- ...output,
463
- body: await parseErrorBody(output.body, context),
464
- };
465
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
466
- switch (errorCode) {
467
- case "AccessDeniedException":
468
- case "com.amazonaws.b2bi#AccessDeniedException":
469
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
470
- case "ConflictException":
471
- case "com.amazonaws.b2bi#ConflictException":
472
- throw await de_ConflictExceptionRes(parsedOutput, context);
473
- case "InternalServerException":
474
- case "com.amazonaws.b2bi#InternalServerException":
475
- throw await de_InternalServerExceptionRes(parsedOutput, context);
476
- case "ResourceNotFoundException":
477
- case "com.amazonaws.b2bi#ResourceNotFoundException":
478
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
479
- case "ThrottlingException":
480
- case "com.amazonaws.b2bi#ThrottlingException":
481
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
482
- case "ValidationException":
483
- case "com.amazonaws.b2bi#ValidationException":
484
- throw await de_ValidationExceptionRes(parsedOutput, context);
485
- default:
486
- const parsedBody = parsedOutput.body;
487
- return throwDefaultError({
488
- output,
489
- parsedBody,
490
- errorCode,
491
- });
492
- }
493
- };
494
- const de_DeleteProfileCommand = async (output, context) => {
495
- if (output.statusCode >= 300) {
496
- return de_DeleteProfileCommandError(output, context);
497
- }
498
- await (0, smithy_client_1.collectBody)(output.body, context);
499
- const response = {
500
- $metadata: deserializeMetadata(output),
501
- };
502
- return response;
503
- };
504
- exports.de_DeleteProfileCommand = de_DeleteProfileCommand;
505
- const de_DeleteProfileCommandError = async (output, context) => {
506
- const parsedOutput = {
507
- ...output,
508
- body: await parseErrorBody(output.body, context),
509
- };
510
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
511
- switch (errorCode) {
512
- case "AccessDeniedException":
513
- case "com.amazonaws.b2bi#AccessDeniedException":
514
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
515
- case "ConflictException":
516
- case "com.amazonaws.b2bi#ConflictException":
517
- throw await de_ConflictExceptionRes(parsedOutput, context);
518
- case "InternalServerException":
519
- case "com.amazonaws.b2bi#InternalServerException":
520
- throw await de_InternalServerExceptionRes(parsedOutput, context);
521
- case "ResourceNotFoundException":
522
- case "com.amazonaws.b2bi#ResourceNotFoundException":
523
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
524
- case "ThrottlingException":
525
- case "com.amazonaws.b2bi#ThrottlingException":
526
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
527
- case "ValidationException":
528
- case "com.amazonaws.b2bi#ValidationException":
529
- throw await de_ValidationExceptionRes(parsedOutput, context);
530
- default:
531
- const parsedBody = parsedOutput.body;
532
- return throwDefaultError({
533
- output,
534
- parsedBody,
535
- errorCode,
536
- });
537
- }
538
- };
539
- const de_DeleteTransformerCommand = async (output, context) => {
540
- if (output.statusCode >= 300) {
541
- return de_DeleteTransformerCommandError(output, context);
542
- }
543
- await (0, smithy_client_1.collectBody)(output.body, context);
544
- const response = {
545
- $metadata: deserializeMetadata(output),
546
- };
547
- return response;
548
- };
549
- exports.de_DeleteTransformerCommand = de_DeleteTransformerCommand;
550
- const de_DeleteTransformerCommandError = async (output, context) => {
551
- const parsedOutput = {
552
- ...output,
553
- body: await parseErrorBody(output.body, context),
554
- };
555
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
556
- switch (errorCode) {
557
- case "AccessDeniedException":
558
- case "com.amazonaws.b2bi#AccessDeniedException":
559
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
560
- case "ConflictException":
561
- case "com.amazonaws.b2bi#ConflictException":
562
- throw await de_ConflictExceptionRes(parsedOutput, context);
563
- case "InternalServerException":
564
- case "com.amazonaws.b2bi#InternalServerException":
565
- throw await de_InternalServerExceptionRes(parsedOutput, context);
566
- case "ResourceNotFoundException":
567
- case "com.amazonaws.b2bi#ResourceNotFoundException":
568
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
569
- case "ThrottlingException":
570
- case "com.amazonaws.b2bi#ThrottlingException":
571
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
572
- case "ValidationException":
573
- case "com.amazonaws.b2bi#ValidationException":
574
- throw await de_ValidationExceptionRes(parsedOutput, context);
575
- default:
576
- const parsedBody = parsedOutput.body;
577
- return throwDefaultError({
578
- output,
579
- parsedBody,
580
- errorCode,
581
- });
582
- }
583
- };
584
- const de_GetCapabilityCommand = async (output, context) => {
585
- if (output.statusCode >= 300) {
586
- return de_GetCapabilityCommandError(output, context);
587
- }
588
- const data = await parseBody(output.body, context);
589
- let contents = {};
590
- contents = de_GetCapabilityResponse(data, context);
591
- const response = {
592
- $metadata: deserializeMetadata(output),
593
- ...contents,
594
- };
595
- return response;
596
- };
597
- exports.de_GetCapabilityCommand = de_GetCapabilityCommand;
598
- const de_GetCapabilityCommandError = async (output, context) => {
599
- const parsedOutput = {
600
- ...output,
601
- body: await parseErrorBody(output.body, context),
602
- };
603
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
604
- switch (errorCode) {
605
- case "AccessDeniedException":
606
- case "com.amazonaws.b2bi#AccessDeniedException":
607
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
608
- case "InternalServerException":
609
- case "com.amazonaws.b2bi#InternalServerException":
610
- throw await de_InternalServerExceptionRes(parsedOutput, context);
611
- case "ResourceNotFoundException":
612
- case "com.amazonaws.b2bi#ResourceNotFoundException":
613
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
614
- case "ThrottlingException":
615
- case "com.amazonaws.b2bi#ThrottlingException":
616
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
617
- case "ValidationException":
618
- case "com.amazonaws.b2bi#ValidationException":
619
- throw await de_ValidationExceptionRes(parsedOutput, context);
620
- default:
621
- const parsedBody = parsedOutput.body;
622
- return throwDefaultError({
623
- output,
624
- parsedBody,
625
- errorCode,
626
- });
627
- }
628
- };
629
- const de_GetPartnershipCommand = async (output, context) => {
630
- if (output.statusCode >= 300) {
631
- return de_GetPartnershipCommandError(output, context);
632
- }
633
- const data = await parseBody(output.body, context);
634
- let contents = {};
635
- contents = de_GetPartnershipResponse(data, context);
636
- const response = {
637
- $metadata: deserializeMetadata(output),
638
- ...contents,
639
- };
640
- return response;
641
- };
642
- exports.de_GetPartnershipCommand = de_GetPartnershipCommand;
643
- const de_GetPartnershipCommandError = async (output, context) => {
644
- const parsedOutput = {
645
- ...output,
646
- body: await parseErrorBody(output.body, context),
647
- };
648
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
649
- switch (errorCode) {
650
- case "AccessDeniedException":
651
- case "com.amazonaws.b2bi#AccessDeniedException":
652
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
653
- case "InternalServerException":
654
- case "com.amazonaws.b2bi#InternalServerException":
655
- throw await de_InternalServerExceptionRes(parsedOutput, context);
656
- case "ResourceNotFoundException":
657
- case "com.amazonaws.b2bi#ResourceNotFoundException":
658
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
659
- case "ThrottlingException":
660
- case "com.amazonaws.b2bi#ThrottlingException":
661
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
662
- case "ValidationException":
663
- case "com.amazonaws.b2bi#ValidationException":
664
- throw await de_ValidationExceptionRes(parsedOutput, context);
665
- default:
666
- const parsedBody = parsedOutput.body;
667
- return throwDefaultError({
668
- output,
669
- parsedBody,
670
- errorCode,
671
- });
672
- }
673
- };
674
- const de_GetProfileCommand = async (output, context) => {
675
- if (output.statusCode >= 300) {
676
- return de_GetProfileCommandError(output, context);
677
- }
678
- const data = await parseBody(output.body, context);
679
- let contents = {};
680
- contents = de_GetProfileResponse(data, context);
681
- const response = {
682
- $metadata: deserializeMetadata(output),
683
- ...contents,
684
- };
685
- return response;
686
- };
687
- exports.de_GetProfileCommand = de_GetProfileCommand;
688
- const de_GetProfileCommandError = async (output, context) => {
689
- const parsedOutput = {
690
- ...output,
691
- body: await parseErrorBody(output.body, context),
692
- };
693
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
694
- switch (errorCode) {
695
- case "AccessDeniedException":
696
- case "com.amazonaws.b2bi#AccessDeniedException":
697
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
698
- case "InternalServerException":
699
- case "com.amazonaws.b2bi#InternalServerException":
700
- throw await de_InternalServerExceptionRes(parsedOutput, context);
701
- case "ResourceNotFoundException":
702
- case "com.amazonaws.b2bi#ResourceNotFoundException":
703
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
704
- case "ThrottlingException":
705
- case "com.amazonaws.b2bi#ThrottlingException":
706
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
707
- case "ValidationException":
708
- case "com.amazonaws.b2bi#ValidationException":
709
- throw await de_ValidationExceptionRes(parsedOutput, context);
710
- default:
711
- const parsedBody = parsedOutput.body;
712
- return throwDefaultError({
713
- output,
714
- parsedBody,
715
- errorCode,
716
- });
717
- }
718
- };
719
- const de_GetTransformerCommand = async (output, context) => {
720
- if (output.statusCode >= 300) {
721
- return de_GetTransformerCommandError(output, context);
722
- }
723
- const data = await parseBody(output.body, context);
724
- let contents = {};
725
- contents = de_GetTransformerResponse(data, context);
726
- const response = {
727
- $metadata: deserializeMetadata(output),
728
- ...contents,
729
- };
730
- return response;
731
- };
732
- exports.de_GetTransformerCommand = de_GetTransformerCommand;
733
- const de_GetTransformerCommandError = async (output, context) => {
734
- const parsedOutput = {
735
- ...output,
736
- body: await parseErrorBody(output.body, context),
737
- };
738
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
739
- switch (errorCode) {
740
- case "AccessDeniedException":
741
- case "com.amazonaws.b2bi#AccessDeniedException":
742
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
743
- case "InternalServerException":
744
- case "com.amazonaws.b2bi#InternalServerException":
745
- throw await de_InternalServerExceptionRes(parsedOutput, context);
746
- case "ResourceNotFoundException":
747
- case "com.amazonaws.b2bi#ResourceNotFoundException":
748
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
749
- case "ThrottlingException":
750
- case "com.amazonaws.b2bi#ThrottlingException":
751
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
752
- case "ValidationException":
753
- case "com.amazonaws.b2bi#ValidationException":
754
- throw await de_ValidationExceptionRes(parsedOutput, context);
755
- default:
756
- const parsedBody = parsedOutput.body;
757
- return throwDefaultError({
758
- output,
759
- parsedBody,
760
- errorCode,
761
- });
762
- }
763
- };
764
- const de_GetTransformerJobCommand = async (output, context) => {
765
- if (output.statusCode >= 300) {
766
- return de_GetTransformerJobCommandError(output, context);
767
- }
768
- const data = await parseBody(output.body, context);
769
- let contents = {};
770
- contents = (0, smithy_client_1._json)(data);
771
- const response = {
772
- $metadata: deserializeMetadata(output),
773
- ...contents,
774
- };
775
- return response;
776
- };
777
- exports.de_GetTransformerJobCommand = de_GetTransformerJobCommand;
778
- const de_GetTransformerJobCommandError = async (output, context) => {
779
- const parsedOutput = {
780
- ...output,
781
- body: await parseErrorBody(output.body, context),
782
- };
783
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
784
- switch (errorCode) {
785
- case "AccessDeniedException":
786
- case "com.amazonaws.b2bi#AccessDeniedException":
787
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
788
- case "InternalServerException":
789
- case "com.amazonaws.b2bi#InternalServerException":
790
- throw await de_InternalServerExceptionRes(parsedOutput, context);
791
- case "ResourceNotFoundException":
792
- case "com.amazonaws.b2bi#ResourceNotFoundException":
793
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
794
- case "ThrottlingException":
795
- case "com.amazonaws.b2bi#ThrottlingException":
796
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
797
- case "ValidationException":
798
- case "com.amazonaws.b2bi#ValidationException":
799
- throw await de_ValidationExceptionRes(parsedOutput, context);
800
- default:
801
- const parsedBody = parsedOutput.body;
802
- return throwDefaultError({
803
- output,
804
- parsedBody,
805
- errorCode,
806
- });
807
- }
808
- };
809
- const de_ListCapabilitiesCommand = async (output, context) => {
810
- if (output.statusCode >= 300) {
811
- return de_ListCapabilitiesCommandError(output, context);
812
- }
813
- const data = await parseBody(output.body, context);
814
- let contents = {};
815
- contents = de_ListCapabilitiesResponse(data, context);
816
- const response = {
817
- $metadata: deserializeMetadata(output),
818
- ...contents,
819
- };
820
- return response;
821
- };
822
- exports.de_ListCapabilitiesCommand = de_ListCapabilitiesCommand;
823
- const de_ListCapabilitiesCommandError = async (output, context) => {
824
- const parsedOutput = {
825
- ...output,
826
- body: await parseErrorBody(output.body, context),
827
- };
828
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
829
- const parsedBody = parsedOutput.body;
830
- return throwDefaultError({
831
- output,
832
- parsedBody,
833
- errorCode,
834
- });
835
- };
836
- const de_ListPartnershipsCommand = async (output, context) => {
837
- if (output.statusCode >= 300) {
838
- return de_ListPartnershipsCommandError(output, context);
839
- }
840
- const data = await parseBody(output.body, context);
841
- let contents = {};
842
- contents = de_ListPartnershipsResponse(data, context);
843
- const response = {
844
- $metadata: deserializeMetadata(output),
845
- ...contents,
846
- };
847
- return response;
848
- };
849
- exports.de_ListPartnershipsCommand = de_ListPartnershipsCommand;
850
- const de_ListPartnershipsCommandError = async (output, context) => {
851
- const parsedOutput = {
852
- ...output,
853
- body: await parseErrorBody(output.body, context),
854
- };
855
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
856
- switch (errorCode) {
857
- case "AccessDeniedException":
858
- case "com.amazonaws.b2bi#AccessDeniedException":
859
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
860
- case "InternalServerException":
861
- case "com.amazonaws.b2bi#InternalServerException":
862
- throw await de_InternalServerExceptionRes(parsedOutput, context);
863
- case "ResourceNotFoundException":
864
- case "com.amazonaws.b2bi#ResourceNotFoundException":
865
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
866
- case "ThrottlingException":
867
- case "com.amazonaws.b2bi#ThrottlingException":
868
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
869
- case "ValidationException":
870
- case "com.amazonaws.b2bi#ValidationException":
871
- throw await de_ValidationExceptionRes(parsedOutput, context);
872
- default:
873
- const parsedBody = parsedOutput.body;
874
- return throwDefaultError({
875
- output,
876
- parsedBody,
877
- errorCode,
878
- });
879
- }
880
- };
881
- const de_ListProfilesCommand = async (output, context) => {
882
- if (output.statusCode >= 300) {
883
- return de_ListProfilesCommandError(output, context);
884
- }
885
- const data = await parseBody(output.body, context);
886
- let contents = {};
887
- contents = de_ListProfilesResponse(data, context);
888
- const response = {
889
- $metadata: deserializeMetadata(output),
890
- ...contents,
891
- };
892
- return response;
893
- };
894
- exports.de_ListProfilesCommand = de_ListProfilesCommand;
895
- const de_ListProfilesCommandError = async (output, context) => {
896
- const parsedOutput = {
897
- ...output,
898
- body: await parseErrorBody(output.body, context),
899
- };
900
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
901
- const parsedBody = parsedOutput.body;
902
- return throwDefaultError({
903
- output,
904
- parsedBody,
905
- errorCode,
906
- });
907
- };
908
- const de_ListTagsForResourceCommand = async (output, context) => {
909
- if (output.statusCode >= 300) {
910
- return de_ListTagsForResourceCommandError(output, context);
911
- }
912
- const data = await parseBody(output.body, context);
913
- let contents = {};
914
- contents = (0, smithy_client_1._json)(data);
915
- const response = {
916
- $metadata: deserializeMetadata(output),
917
- ...contents,
918
- };
919
- return response;
920
- };
921
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
922
- const de_ListTagsForResourceCommandError = async (output, context) => {
923
- const parsedOutput = {
924
- ...output,
925
- body: await parseErrorBody(output.body, context),
926
- };
927
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
928
- switch (errorCode) {
929
- case "ResourceNotFoundException":
930
- case "com.amazonaws.b2bi#ResourceNotFoundException":
931
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
932
- case "ValidationException":
933
- case "com.amazonaws.b2bi#ValidationException":
934
- throw await de_ValidationExceptionRes(parsedOutput, context);
935
- default:
936
- const parsedBody = parsedOutput.body;
937
- return throwDefaultError({
938
- output,
939
- parsedBody,
940
- errorCode,
941
- });
942
- }
943
- };
944
- const de_ListTransformersCommand = async (output, context) => {
945
- if (output.statusCode >= 300) {
946
- return de_ListTransformersCommandError(output, context);
947
- }
948
- const data = await parseBody(output.body, context);
949
- let contents = {};
950
- contents = de_ListTransformersResponse(data, context);
951
- const response = {
952
- $metadata: deserializeMetadata(output),
953
- ...contents,
954
- };
955
- return response;
956
- };
957
- exports.de_ListTransformersCommand = de_ListTransformersCommand;
958
- const de_ListTransformersCommandError = async (output, context) => {
959
- const parsedOutput = {
960
- ...output,
961
- body: await parseErrorBody(output.body, context),
962
- };
963
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
964
- const parsedBody = parsedOutput.body;
965
- return throwDefaultError({
966
- output,
967
- parsedBody,
968
- errorCode,
969
- });
970
- };
971
- const de_StartTransformerJobCommand = async (output, context) => {
972
- if (output.statusCode >= 300) {
973
- return de_StartTransformerJobCommandError(output, context);
974
- }
975
- const data = await parseBody(output.body, context);
976
- let contents = {};
977
- contents = (0, smithy_client_1._json)(data);
978
- const response = {
979
- $metadata: deserializeMetadata(output),
980
- ...contents,
981
- };
982
- return response;
983
- };
984
- exports.de_StartTransformerJobCommand = de_StartTransformerJobCommand;
985
- const de_StartTransformerJobCommandError = async (output, context) => {
986
- const parsedOutput = {
987
- ...output,
988
- body: await parseErrorBody(output.body, context),
989
- };
990
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
991
- switch (errorCode) {
992
- case "AccessDeniedException":
993
- case "com.amazonaws.b2bi#AccessDeniedException":
994
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
995
- case "InternalServerException":
996
- case "com.amazonaws.b2bi#InternalServerException":
997
- throw await de_InternalServerExceptionRes(parsedOutput, context);
998
- case "ResourceNotFoundException":
999
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1000
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1001
- case "ThrottlingException":
1002
- case "com.amazonaws.b2bi#ThrottlingException":
1003
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1004
- case "ValidationException":
1005
- case "com.amazonaws.b2bi#ValidationException":
1006
- throw await de_ValidationExceptionRes(parsedOutput, context);
1007
- default:
1008
- const parsedBody = parsedOutput.body;
1009
- return throwDefaultError({
1010
- output,
1011
- parsedBody,
1012
- errorCode,
1013
- });
1014
- }
1015
- };
1016
- const de_TagResourceCommand = async (output, context) => {
1017
- if (output.statusCode >= 300) {
1018
- return de_TagResourceCommandError(output, context);
1019
- }
1020
- await (0, smithy_client_1.collectBody)(output.body, context);
1021
- const response = {
1022
- $metadata: deserializeMetadata(output),
1023
- };
1024
- return response;
1025
- };
1026
- exports.de_TagResourceCommand = de_TagResourceCommand;
1027
- const de_TagResourceCommandError = async (output, context) => {
1028
- const parsedOutput = {
1029
- ...output,
1030
- body: await parseErrorBody(output.body, context),
1031
- };
1032
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1033
- switch (errorCode) {
1034
- case "ResourceNotFoundException":
1035
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1036
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1037
- case "ThrottlingException":
1038
- case "com.amazonaws.b2bi#ThrottlingException":
1039
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1040
- case "ValidationException":
1041
- case "com.amazonaws.b2bi#ValidationException":
1042
- throw await de_ValidationExceptionRes(parsedOutput, context);
1043
- default:
1044
- const parsedBody = parsedOutput.body;
1045
- return throwDefaultError({
1046
- output,
1047
- parsedBody,
1048
- errorCode,
1049
- });
1050
- }
1051
- };
1052
- const de_TestMappingCommand = async (output, context) => {
1053
- if (output.statusCode >= 300) {
1054
- return de_TestMappingCommandError(output, context);
1055
- }
1056
- const data = await parseBody(output.body, context);
1057
- let contents = {};
1058
- contents = (0, smithy_client_1._json)(data);
1059
- const response = {
1060
- $metadata: deserializeMetadata(output),
1061
- ...contents,
1062
- };
1063
- return response;
1064
- };
1065
- exports.de_TestMappingCommand = de_TestMappingCommand;
1066
- const de_TestMappingCommandError = async (output, context) => {
1067
- const parsedOutput = {
1068
- ...output,
1069
- body: await parseErrorBody(output.body, context),
1070
- };
1071
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1072
- switch (errorCode) {
1073
- case "AccessDeniedException":
1074
- case "com.amazonaws.b2bi#AccessDeniedException":
1075
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1076
- case "InternalServerException":
1077
- case "com.amazonaws.b2bi#InternalServerException":
1078
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1079
- case "ResourceNotFoundException":
1080
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1081
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1082
- case "ThrottlingException":
1083
- case "com.amazonaws.b2bi#ThrottlingException":
1084
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1085
- case "ValidationException":
1086
- case "com.amazonaws.b2bi#ValidationException":
1087
- throw await de_ValidationExceptionRes(parsedOutput, context);
1088
- default:
1089
- const parsedBody = parsedOutput.body;
1090
- return throwDefaultError({
1091
- output,
1092
- parsedBody,
1093
- errorCode,
1094
- });
1095
- }
1096
- };
1097
- const de_TestParsingCommand = async (output, context) => {
1098
- if (output.statusCode >= 300) {
1099
- return de_TestParsingCommandError(output, context);
1100
- }
1101
- const data = await parseBody(output.body, context);
1102
- let contents = {};
1103
- contents = (0, smithy_client_1._json)(data);
1104
- const response = {
1105
- $metadata: deserializeMetadata(output),
1106
- ...contents,
1107
- };
1108
- return response;
1109
- };
1110
- exports.de_TestParsingCommand = de_TestParsingCommand;
1111
- const de_TestParsingCommandError = async (output, context) => {
1112
- const parsedOutput = {
1113
- ...output,
1114
- body: await parseErrorBody(output.body, context),
1115
- };
1116
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1117
- switch (errorCode) {
1118
- case "AccessDeniedException":
1119
- case "com.amazonaws.b2bi#AccessDeniedException":
1120
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1121
- case "InternalServerException":
1122
- case "com.amazonaws.b2bi#InternalServerException":
1123
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1124
- case "ResourceNotFoundException":
1125
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1126
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1127
- case "ThrottlingException":
1128
- case "com.amazonaws.b2bi#ThrottlingException":
1129
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1130
- case "ValidationException":
1131
- case "com.amazonaws.b2bi#ValidationException":
1132
- throw await de_ValidationExceptionRes(parsedOutput, context);
1133
- default:
1134
- const parsedBody = parsedOutput.body;
1135
- return throwDefaultError({
1136
- output,
1137
- parsedBody,
1138
- errorCode,
1139
- });
1140
- }
1141
- };
1142
- const de_UntagResourceCommand = async (output, context) => {
1143
- if (output.statusCode >= 300) {
1144
- return de_UntagResourceCommandError(output, context);
1145
- }
1146
- await (0, smithy_client_1.collectBody)(output.body, context);
1147
- const response = {
1148
- $metadata: deserializeMetadata(output),
1149
- };
1150
- return response;
1151
- };
1152
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1153
- const de_UntagResourceCommandError = async (output, context) => {
1154
- const parsedOutput = {
1155
- ...output,
1156
- body: await parseErrorBody(output.body, context),
1157
- };
1158
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1159
- switch (errorCode) {
1160
- case "ResourceNotFoundException":
1161
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1162
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1163
- case "ValidationException":
1164
- case "com.amazonaws.b2bi#ValidationException":
1165
- throw await de_ValidationExceptionRes(parsedOutput, context);
1166
- default:
1167
- const parsedBody = parsedOutput.body;
1168
- return throwDefaultError({
1169
- output,
1170
- parsedBody,
1171
- errorCode,
1172
- });
1173
- }
1174
- };
1175
- const de_UpdateCapabilityCommand = async (output, context) => {
1176
- if (output.statusCode >= 300) {
1177
- return de_UpdateCapabilityCommandError(output, context);
1178
- }
1179
- const data = await parseBody(output.body, context);
1180
- let contents = {};
1181
- contents = de_UpdateCapabilityResponse(data, context);
1182
- const response = {
1183
- $metadata: deserializeMetadata(output),
1184
- ...contents,
1185
- };
1186
- return response;
1187
- };
1188
- exports.de_UpdateCapabilityCommand = de_UpdateCapabilityCommand;
1189
- const de_UpdateCapabilityCommandError = async (output, context) => {
1190
- const parsedOutput = {
1191
- ...output,
1192
- body: await parseErrorBody(output.body, context),
1193
- };
1194
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1195
- switch (errorCode) {
1196
- case "AccessDeniedException":
1197
- case "com.amazonaws.b2bi#AccessDeniedException":
1198
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1199
- case "ConflictException":
1200
- case "com.amazonaws.b2bi#ConflictException":
1201
- throw await de_ConflictExceptionRes(parsedOutput, context);
1202
- case "InternalServerException":
1203
- case "com.amazonaws.b2bi#InternalServerException":
1204
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1205
- case "ResourceNotFoundException":
1206
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1207
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1208
- case "ServiceQuotaExceededException":
1209
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1210
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1211
- case "ThrottlingException":
1212
- case "com.amazonaws.b2bi#ThrottlingException":
1213
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1214
- case "ValidationException":
1215
- case "com.amazonaws.b2bi#ValidationException":
1216
- throw await de_ValidationExceptionRes(parsedOutput, context);
1217
- default:
1218
- const parsedBody = parsedOutput.body;
1219
- return throwDefaultError({
1220
- output,
1221
- parsedBody,
1222
- errorCode,
1223
- });
1224
- }
1225
- };
1226
- const de_UpdatePartnershipCommand = async (output, context) => {
1227
- if (output.statusCode >= 300) {
1228
- return de_UpdatePartnershipCommandError(output, context);
1229
- }
1230
- const data = await parseBody(output.body, context);
1231
- let contents = {};
1232
- contents = de_UpdatePartnershipResponse(data, context);
1233
- const response = {
1234
- $metadata: deserializeMetadata(output),
1235
- ...contents,
1236
- };
1237
- return response;
1238
- };
1239
- exports.de_UpdatePartnershipCommand = de_UpdatePartnershipCommand;
1240
- const de_UpdatePartnershipCommandError = async (output, context) => {
1241
- const parsedOutput = {
1242
- ...output,
1243
- body: await parseErrorBody(output.body, context),
1244
- };
1245
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1246
- switch (errorCode) {
1247
- case "AccessDeniedException":
1248
- case "com.amazonaws.b2bi#AccessDeniedException":
1249
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1250
- case "ConflictException":
1251
- case "com.amazonaws.b2bi#ConflictException":
1252
- throw await de_ConflictExceptionRes(parsedOutput, context);
1253
- case "InternalServerException":
1254
- case "com.amazonaws.b2bi#InternalServerException":
1255
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1256
- case "ResourceNotFoundException":
1257
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1258
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1259
- case "ServiceQuotaExceededException":
1260
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1261
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1262
- case "ThrottlingException":
1263
- case "com.amazonaws.b2bi#ThrottlingException":
1264
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1265
- case "ValidationException":
1266
- case "com.amazonaws.b2bi#ValidationException":
1267
- throw await de_ValidationExceptionRes(parsedOutput, context);
1268
- default:
1269
- const parsedBody = parsedOutput.body;
1270
- return throwDefaultError({
1271
- output,
1272
- parsedBody,
1273
- errorCode,
1274
- });
1275
- }
1276
- };
1277
- const de_UpdateProfileCommand = async (output, context) => {
1278
- if (output.statusCode >= 300) {
1279
- return de_UpdateProfileCommandError(output, context);
1280
- }
1281
- const data = await parseBody(output.body, context);
1282
- let contents = {};
1283
- contents = de_UpdateProfileResponse(data, context);
1284
- const response = {
1285
- $metadata: deserializeMetadata(output),
1286
- ...contents,
1287
- };
1288
- return response;
1289
- };
1290
- exports.de_UpdateProfileCommand = de_UpdateProfileCommand;
1291
- const de_UpdateProfileCommandError = async (output, context) => {
1292
- const parsedOutput = {
1293
- ...output,
1294
- body: await parseErrorBody(output.body, context),
1295
- };
1296
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1297
- switch (errorCode) {
1298
- case "AccessDeniedException":
1299
- case "com.amazonaws.b2bi#AccessDeniedException":
1300
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1301
- case "ConflictException":
1302
- case "com.amazonaws.b2bi#ConflictException":
1303
- throw await de_ConflictExceptionRes(parsedOutput, context);
1304
- case "InternalServerException":
1305
- case "com.amazonaws.b2bi#InternalServerException":
1306
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1307
- case "ResourceNotFoundException":
1308
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1309
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1310
- case "ServiceQuotaExceededException":
1311
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1312
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1313
- case "ThrottlingException":
1314
- case "com.amazonaws.b2bi#ThrottlingException":
1315
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1316
- case "ValidationException":
1317
- case "com.amazonaws.b2bi#ValidationException":
1318
- throw await de_ValidationExceptionRes(parsedOutput, context);
1319
- default:
1320
- const parsedBody = parsedOutput.body;
1321
- return throwDefaultError({
1322
- output,
1323
- parsedBody,
1324
- errorCode,
1325
- });
1326
- }
1327
- };
1328
- const de_UpdateTransformerCommand = async (output, context) => {
1329
- if (output.statusCode >= 300) {
1330
- return de_UpdateTransformerCommandError(output, context);
1331
- }
1332
- const data = await parseBody(output.body, context);
1333
- let contents = {};
1334
- contents = de_UpdateTransformerResponse(data, context);
1335
- const response = {
1336
- $metadata: deserializeMetadata(output),
1337
- ...contents,
1338
- };
1339
- return response;
1340
- };
1341
- exports.de_UpdateTransformerCommand = de_UpdateTransformerCommand;
1342
- const de_UpdateTransformerCommandError = async (output, context) => {
1343
- const parsedOutput = {
1344
- ...output,
1345
- body: await parseErrorBody(output.body, context),
1346
- };
1347
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1348
- switch (errorCode) {
1349
- case "AccessDeniedException":
1350
- case "com.amazonaws.b2bi#AccessDeniedException":
1351
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1352
- case "ConflictException":
1353
- case "com.amazonaws.b2bi#ConflictException":
1354
- throw await de_ConflictExceptionRes(parsedOutput, context);
1355
- case "InternalServerException":
1356
- case "com.amazonaws.b2bi#InternalServerException":
1357
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1358
- case "ResourceNotFoundException":
1359
- case "com.amazonaws.b2bi#ResourceNotFoundException":
1360
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1361
- case "ServiceQuotaExceededException":
1362
- case "com.amazonaws.b2bi#ServiceQuotaExceededException":
1363
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1364
- case "ThrottlingException":
1365
- case "com.amazonaws.b2bi#ThrottlingException":
1366
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1367
- case "ValidationException":
1368
- case "com.amazonaws.b2bi#ValidationException":
1369
- throw await de_ValidationExceptionRes(parsedOutput, context);
1370
- default:
1371
- const parsedBody = parsedOutput.body;
1372
- return throwDefaultError({
1373
- output,
1374
- parsedBody,
1375
- errorCode,
1376
- });
1377
- }
1378
- };
1379
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1380
- const body = parsedOutput.body;
1381
- const deserialized = (0, smithy_client_1._json)(body);
1382
- const exception = new models_0_1.AccessDeniedException({
1383
- $metadata: deserializeMetadata(parsedOutput),
1384
- ...deserialized,
1385
- });
1386
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1387
- };
1388
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1389
- const body = parsedOutput.body;
1390
- const deserialized = (0, smithy_client_1._json)(body);
1391
- const exception = new models_0_1.ConflictException({
1392
- $metadata: deserializeMetadata(parsedOutput),
1393
- ...deserialized,
1394
- });
1395
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1396
- };
1397
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1398
- const body = parsedOutput.body;
1399
- const deserialized = (0, smithy_client_1._json)(body);
1400
- const exception = new models_0_1.InternalServerException({
1401
- $metadata: deserializeMetadata(parsedOutput),
1402
- ...deserialized,
1403
- });
1404
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1405
- };
1406
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1407
- const body = parsedOutput.body;
1408
- const deserialized = (0, smithy_client_1._json)(body);
1409
- const exception = new models_0_1.ResourceNotFoundException({
1410
- $metadata: deserializeMetadata(parsedOutput),
1411
- ...deserialized,
1412
- });
1413
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1414
- };
1415
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1416
- const body = parsedOutput.body;
1417
- const deserialized = (0, smithy_client_1._json)(body);
1418
- const exception = new models_0_1.ServiceQuotaExceededException({
1419
- $metadata: deserializeMetadata(parsedOutput),
1420
- ...deserialized,
1421
- });
1422
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1423
- };
1424
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1425
- const body = parsedOutput.body;
1426
- const deserialized = (0, smithy_client_1._json)(body);
1427
- const exception = new models_0_1.ThrottlingException({
1428
- $metadata: deserializeMetadata(parsedOutput),
1429
- ...deserialized,
1430
- });
1431
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1432
- };
1433
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1434
- const body = parsedOutput.body;
1435
- const deserialized = (0, smithy_client_1._json)(body);
1436
- const exception = new models_0_1.ValidationException({
1437
- $metadata: deserializeMetadata(parsedOutput),
1438
- ...deserialized,
1439
- });
1440
- return (0, smithy_client_1.decorateServiceException)(exception, body);
1441
- };
1442
- const se_CreateCapabilityRequest = (input, context) => {
1443
- return (0, smithy_client_1.take)(input, {
1444
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
1445
- configuration: smithy_client_1._json,
1446
- instructionsDocuments: smithy_client_1._json,
1447
- name: [],
1448
- tags: smithy_client_1._json,
1449
- type: [],
1450
- });
1451
- };
1452
- const se_CreatePartnershipRequest = (input, context) => {
1453
- return (0, smithy_client_1.take)(input, {
1454
- capabilities: smithy_client_1._json,
1455
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
1456
- email: [],
1457
- name: [],
1458
- phone: [],
1459
- profileId: [],
1460
- tags: smithy_client_1._json,
1461
- });
1462
- };
1463
- const se_CreateProfileRequest = (input, context) => {
1464
- return (0, smithy_client_1.take)(input, {
1465
- businessName: [],
1466
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
1467
- email: [],
1468
- logging: [],
1469
- name: [],
1470
- phone: [],
1471
- tags: smithy_client_1._json,
1472
- });
1473
- };
1474
- const se_CreateTransformerRequest = (input, context) => {
1475
- return (0, smithy_client_1.take)(input, {
1476
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
1477
- ediType: smithy_client_1._json,
1478
- fileFormat: [],
1479
- mappingTemplate: [],
1480
- name: [],
1481
- sampleDocument: [],
1482
- tags: smithy_client_1._json,
1483
- });
1484
- };
1485
- const se_StartTransformerJobRequest = (input, context) => {
1486
- return (0, smithy_client_1.take)(input, {
1487
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
1488
- inputFile: smithy_client_1._json,
1489
- outputLocation: smithy_client_1._json,
1490
- transformerId: [],
1491
- });
1492
- };
1493
- const de_CapabilityList = (output, context) => {
1494
- const retVal = (output || [])
1495
- .filter((e) => e != null)
1496
- .map((entry) => {
1497
- return de_CapabilitySummary(entry, context);
1498
- });
1499
- return retVal;
1500
- };
1501
- const de_CapabilitySummary = (output, context) => {
1502
- return (0, smithy_client_1.take)(output, {
1503
- capabilityId: smithy_client_1.expectString,
1504
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1505
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1506
- name: smithy_client_1.expectString,
1507
- type: smithy_client_1.expectString,
1508
- });
1509
- };
1510
- const de_CreateCapabilityResponse = (output, context) => {
1511
- return (0, smithy_client_1.take)(output, {
1512
- capabilityArn: smithy_client_1.expectString,
1513
- capabilityId: smithy_client_1.expectString,
1514
- configuration: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
1515
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1516
- instructionsDocuments: smithy_client_1._json,
1517
- name: smithy_client_1.expectString,
1518
- type: smithy_client_1.expectString,
1519
- });
1520
- };
1521
- const de_CreatePartnershipResponse = (output, context) => {
1522
- return (0, smithy_client_1.take)(output, {
1523
- capabilities: smithy_client_1._json,
1524
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1525
- email: smithy_client_1.expectString,
1526
- name: smithy_client_1.expectString,
1527
- partnershipArn: smithy_client_1.expectString,
1528
- partnershipId: smithy_client_1.expectString,
1529
- phone: smithy_client_1.expectString,
1530
- profileId: smithy_client_1.expectString,
1531
- tradingPartnerId: smithy_client_1.expectString,
1532
- });
1533
- };
1534
- const de_CreateProfileResponse = (output, context) => {
1535
- return (0, smithy_client_1.take)(output, {
1536
- businessName: smithy_client_1.expectString,
1537
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1538
- email: smithy_client_1.expectString,
1539
- logGroupName: smithy_client_1.expectString,
1540
- logging: smithy_client_1.expectString,
1541
- name: smithy_client_1.expectString,
1542
- phone: smithy_client_1.expectString,
1543
- profileArn: smithy_client_1.expectString,
1544
- profileId: smithy_client_1.expectString,
1545
- });
1546
- };
1547
- const de_CreateTransformerResponse = (output, context) => {
1548
- return (0, smithy_client_1.take)(output, {
1549
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1550
- ediType: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
1551
- fileFormat: smithy_client_1.expectString,
1552
- mappingTemplate: smithy_client_1.expectString,
1553
- name: smithy_client_1.expectString,
1554
- sampleDocument: smithy_client_1.expectString,
1555
- status: smithy_client_1.expectString,
1556
- transformerArn: smithy_client_1.expectString,
1557
- transformerId: smithy_client_1.expectString,
1558
- });
1559
- };
1560
- const de_GetCapabilityResponse = (output, context) => {
1561
- return (0, smithy_client_1.take)(output, {
1562
- capabilityArn: smithy_client_1.expectString,
1563
- capabilityId: smithy_client_1.expectString,
1564
- configuration: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
1565
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1566
- instructionsDocuments: smithy_client_1._json,
1567
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1568
- name: smithy_client_1.expectString,
1569
- type: smithy_client_1.expectString,
1570
- });
1571
- };
1572
- const de_GetPartnershipResponse = (output, context) => {
1573
- return (0, smithy_client_1.take)(output, {
1574
- capabilities: smithy_client_1._json,
1575
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1576
- email: smithy_client_1.expectString,
1577
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1578
- name: smithy_client_1.expectString,
1579
- partnershipArn: smithy_client_1.expectString,
1580
- partnershipId: smithy_client_1.expectString,
1581
- phone: smithy_client_1.expectString,
1582
- profileId: smithy_client_1.expectString,
1583
- tradingPartnerId: smithy_client_1.expectString,
1584
- });
1585
- };
1586
- const de_GetProfileResponse = (output, context) => {
1587
- return (0, smithy_client_1.take)(output, {
1588
- businessName: smithy_client_1.expectString,
1589
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1590
- email: smithy_client_1.expectString,
1591
- logGroupName: smithy_client_1.expectString,
1592
- logging: smithy_client_1.expectString,
1593
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1594
- name: smithy_client_1.expectString,
1595
- phone: smithy_client_1.expectString,
1596
- profileArn: smithy_client_1.expectString,
1597
- profileId: smithy_client_1.expectString,
1598
- });
1599
- };
1600
- const de_GetTransformerResponse = (output, context) => {
1601
- return (0, smithy_client_1.take)(output, {
1602
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1603
- ediType: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
1604
- fileFormat: smithy_client_1.expectString,
1605
- mappingTemplate: smithy_client_1.expectString,
1606
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1607
- name: smithy_client_1.expectString,
1608
- sampleDocument: smithy_client_1.expectString,
1609
- status: smithy_client_1.expectString,
1610
- transformerArn: smithy_client_1.expectString,
1611
- transformerId: smithy_client_1.expectString,
1612
- });
1613
- };
1614
- const de_ListCapabilitiesResponse = (output, context) => {
1615
- return (0, smithy_client_1.take)(output, {
1616
- capabilities: (_) => de_CapabilityList(_, context),
1617
- nextToken: smithy_client_1.expectString,
1618
- });
1619
- };
1620
- const de_ListPartnershipsResponse = (output, context) => {
1621
- return (0, smithy_client_1.take)(output, {
1622
- nextToken: smithy_client_1.expectString,
1623
- partnerships: (_) => de_PartnershipList(_, context),
1624
- });
1625
- };
1626
- const de_ListProfilesResponse = (output, context) => {
1627
- return (0, smithy_client_1.take)(output, {
1628
- nextToken: smithy_client_1.expectString,
1629
- profiles: (_) => de_ProfileList(_, context),
1630
- });
1631
- };
1632
- const de_ListTransformersResponse = (output, context) => {
1633
- return (0, smithy_client_1.take)(output, {
1634
- nextToken: smithy_client_1.expectString,
1635
- transformers: (_) => de_TransformerList(_, context),
1636
- });
1637
- };
1638
- const de_PartnershipList = (output, context) => {
1639
- const retVal = (output || [])
1640
- .filter((e) => e != null)
1641
- .map((entry) => {
1642
- return de_PartnershipSummary(entry, context);
1643
- });
1644
- return retVal;
1645
- };
1646
- const de_PartnershipSummary = (output, context) => {
1647
- return (0, smithy_client_1.take)(output, {
1648
- capabilities: smithy_client_1._json,
1649
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1650
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1651
- name: smithy_client_1.expectString,
1652
- partnershipId: smithy_client_1.expectString,
1653
- profileId: smithy_client_1.expectString,
1654
- tradingPartnerId: smithy_client_1.expectString,
1655
- });
1656
- };
1657
- const de_ProfileList = (output, context) => {
1658
- const retVal = (output || [])
1659
- .filter((e) => e != null)
1660
- .map((entry) => {
1661
- return de_ProfileSummary(entry, context);
1662
- });
1663
- return retVal;
1664
- };
1665
- const de_ProfileSummary = (output, context) => {
1666
- return (0, smithy_client_1.take)(output, {
1667
- businessName: smithy_client_1.expectString,
1668
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1669
- logGroupName: smithy_client_1.expectString,
1670
- logging: smithy_client_1.expectString,
1671
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1672
- name: smithy_client_1.expectString,
1673
- profileId: smithy_client_1.expectString,
1674
- });
1675
- };
1676
- const de_TransformerList = (output, context) => {
1677
- const retVal = (output || [])
1678
- .filter((e) => e != null)
1679
- .map((entry) => {
1680
- return de_TransformerSummary(entry, context);
1681
- });
1682
- return retVal;
1683
- };
1684
- const de_TransformerSummary = (output, context) => {
1685
- return (0, smithy_client_1.take)(output, {
1686
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1687
- ediType: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
1688
- fileFormat: smithy_client_1.expectString,
1689
- mappingTemplate: smithy_client_1.expectString,
1690
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1691
- name: smithy_client_1.expectString,
1692
- sampleDocument: smithy_client_1.expectString,
1693
- status: smithy_client_1.expectString,
1694
- transformerId: smithy_client_1.expectString,
1695
- });
1696
- };
1697
- const de_UpdateCapabilityResponse = (output, context) => {
1698
- return (0, smithy_client_1.take)(output, {
1699
- capabilityArn: smithy_client_1.expectString,
1700
- capabilityId: smithy_client_1.expectString,
1701
- configuration: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
1702
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1703
- instructionsDocuments: smithy_client_1._json,
1704
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1705
- name: smithy_client_1.expectString,
1706
- type: smithy_client_1.expectString,
1707
- });
1708
- };
1709
- const de_UpdatePartnershipResponse = (output, context) => {
1710
- return (0, smithy_client_1.take)(output, {
1711
- capabilities: smithy_client_1._json,
1712
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1713
- email: smithy_client_1.expectString,
1714
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1715
- name: smithy_client_1.expectString,
1716
- partnershipArn: smithy_client_1.expectString,
1717
- partnershipId: smithy_client_1.expectString,
1718
- phone: smithy_client_1.expectString,
1719
- profileId: smithy_client_1.expectString,
1720
- tradingPartnerId: smithy_client_1.expectString,
1721
- });
1722
- };
1723
- const de_UpdateProfileResponse = (output, context) => {
1724
- return (0, smithy_client_1.take)(output, {
1725
- businessName: smithy_client_1.expectString,
1726
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1727
- email: smithy_client_1.expectString,
1728
- logGroupName: smithy_client_1.expectString,
1729
- logging: smithy_client_1.expectString,
1730
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1731
- name: smithy_client_1.expectString,
1732
- phone: smithy_client_1.expectString,
1733
- profileArn: smithy_client_1.expectString,
1734
- profileId: smithy_client_1.expectString,
1735
- });
1736
- };
1737
- const de_UpdateTransformerResponse = (output, context) => {
1738
- return (0, smithy_client_1.take)(output, {
1739
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1740
- ediType: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
1741
- fileFormat: smithy_client_1.expectString,
1742
- mappingTemplate: smithy_client_1.expectString,
1743
- modifiedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1744
- name: smithy_client_1.expectString,
1745
- sampleDocument: smithy_client_1.expectString,
1746
- status: smithy_client_1.expectString,
1747
- transformerArn: smithy_client_1.expectString,
1748
- transformerId: smithy_client_1.expectString,
1749
- });
1750
- };
1751
- const deserializeMetadata = (output) => ({
1752
- httpStatusCode: output.statusCode,
1753
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1754
- extendedRequestId: output.headers["x-amz-id-2"],
1755
- cfId: output.headers["x-amz-cf-id"],
1756
- });
1757
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1758
- const throwDefaultError = (0, smithy_client_1.withBaseException)(B2biServiceException_1.B2biServiceException);
1759
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1760
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1761
- const contents = {
1762
- protocol,
1763
- hostname,
1764
- port,
1765
- method: "POST",
1766
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1767
- headers,
1768
- };
1769
- if (resolvedHostname !== undefined) {
1770
- contents.hostname = resolvedHostname;
1771
- }
1772
- if (body !== undefined) {
1773
- contents.body = body;
1774
- }
1775
- return new protocol_http_1.HttpRequest(contents);
1776
- };
1777
- function sharedHeaders(operation) {
1778
- return {
1779
- "content-type": "application/x-amz-json-1.0",
1780
- "x-amz-target": `B2BI.${operation}`,
1781
- };
1782
- }
1783
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1784
- if (encoded.length) {
1785
- return JSON.parse(encoded);
1786
- }
1787
- return {};
1788
- });
1789
- const parseErrorBody = async (errorBody, context) => {
1790
- const value = await parseBody(errorBody, context);
1791
- value.message = value.message ?? value.Message;
1792
- return value;
1793
- };
1794
- const loadRestJsonErrorCode = (output, data) => {
1795
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1796
- const sanitizeErrorCode = (rawValue) => {
1797
- let cleanValue = rawValue;
1798
- if (typeof cleanValue === "number") {
1799
- cleanValue = cleanValue.toString();
1800
- }
1801
- if (cleanValue.indexOf(",") >= 0) {
1802
- cleanValue = cleanValue.split(",")[0];
1803
- }
1804
- if (cleanValue.indexOf(":") >= 0) {
1805
- cleanValue = cleanValue.split(":")[0];
1806
- }
1807
- if (cleanValue.indexOf("#") >= 0) {
1808
- cleanValue = cleanValue.split("#")[1];
1809
- }
1810
- return cleanValue;
1811
- };
1812
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1813
- if (headerKey !== undefined) {
1814
- return sanitizeErrorCode(output.headers[headerKey]);
1815
- }
1816
- if (data.code !== undefined) {
1817
- return sanitizeErrorCode(data.code);
1818
- }
1819
- if (data["__type"] !== undefined) {
1820
- return sanitizeErrorCode(data["__type"]);
1821
- }
1822
- };
1
+ module.exports = require("../index.js");