@aws-sdk/client-connectparticipant 3.312.0 → 3.316.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/ConnectParticipant.js +12 -112
- package/dist-cjs/protocols/Aws_restJson1.js +124 -253
- package/dist-es/ConnectParticipant.js +12 -112
- package/dist-es/protocols/Aws_restJson1.js +103 -232
- package/dist-types/ConnectParticipant.d.ts +23 -117
- package/dist-types/ts3.4/ConnectParticipant.d.ts +4 -1
- package/package.json +6 -6
|
@@ -8,16 +8,16 @@ const ConnectParticipantServiceException_1 = require("../models/ConnectParticipa
|
|
|
8
8
|
const models_0_1 = require("../models/models_0");
|
|
9
9
|
const se_CompleteAttachmentUploadCommand = async (input, context) => {
|
|
10
10
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
11
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
11
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
12
12
|
"content-type": "application/json",
|
|
13
13
|
"x-amz-bearer": input.ConnectionToken,
|
|
14
14
|
});
|
|
15
15
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/complete-attachment-upload";
|
|
16
16
|
let body;
|
|
17
|
-
body = JSON.stringify({
|
|
18
|
-
|
|
19
|
-
ClientToken:
|
|
20
|
-
});
|
|
17
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
18
|
+
AttachmentIds: (_) => (0, smithy_client_1._json)(_),
|
|
19
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
20
|
+
}));
|
|
21
21
|
return new protocol_http_1.HttpRequest({
|
|
22
22
|
protocol,
|
|
23
23
|
hostname,
|
|
@@ -31,16 +31,16 @@ const se_CompleteAttachmentUploadCommand = async (input, context) => {
|
|
|
31
31
|
exports.se_CompleteAttachmentUploadCommand = se_CompleteAttachmentUploadCommand;
|
|
32
32
|
const se_CreateParticipantConnectionCommand = async (input, context) => {
|
|
33
33
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
34
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
34
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
35
35
|
"content-type": "application/json",
|
|
36
36
|
"x-amz-bearer": input.ParticipantToken,
|
|
37
37
|
});
|
|
38
38
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/connection";
|
|
39
39
|
let body;
|
|
40
|
-
body = JSON.stringify({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
});
|
|
40
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
41
|
+
ConnectParticipant: [],
|
|
42
|
+
Type: (_) => (0, smithy_client_1._json)(_),
|
|
43
|
+
}));
|
|
44
44
|
return new protocol_http_1.HttpRequest({
|
|
45
45
|
protocol,
|
|
46
46
|
hostname,
|
|
@@ -54,15 +54,15 @@ const se_CreateParticipantConnectionCommand = async (input, context) => {
|
|
|
54
54
|
exports.se_CreateParticipantConnectionCommand = se_CreateParticipantConnectionCommand;
|
|
55
55
|
const se_DisconnectParticipantCommand = async (input, context) => {
|
|
56
56
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
57
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
57
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
58
58
|
"content-type": "application/json",
|
|
59
59
|
"x-amz-bearer": input.ConnectionToken,
|
|
60
60
|
});
|
|
61
61
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/disconnect";
|
|
62
62
|
let body;
|
|
63
|
-
body = JSON.stringify({
|
|
64
|
-
ClientToken:
|
|
65
|
-
});
|
|
63
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
64
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
65
|
+
}));
|
|
66
66
|
return new protocol_http_1.HttpRequest({
|
|
67
67
|
protocol,
|
|
68
68
|
hostname,
|
|
@@ -76,15 +76,15 @@ const se_DisconnectParticipantCommand = async (input, context) => {
|
|
|
76
76
|
exports.se_DisconnectParticipantCommand = se_DisconnectParticipantCommand;
|
|
77
77
|
const se_GetAttachmentCommand = async (input, context) => {
|
|
78
78
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
79
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
79
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
80
80
|
"content-type": "application/json",
|
|
81
81
|
"x-amz-bearer": input.ConnectionToken,
|
|
82
82
|
});
|
|
83
83
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/attachment";
|
|
84
84
|
let body;
|
|
85
|
-
body = JSON.stringify({
|
|
86
|
-
|
|
87
|
-
});
|
|
85
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
86
|
+
AttachmentId: [],
|
|
87
|
+
}));
|
|
88
88
|
return new protocol_http_1.HttpRequest({
|
|
89
89
|
protocol,
|
|
90
90
|
hostname,
|
|
@@ -98,20 +98,20 @@ const se_GetAttachmentCommand = async (input, context) => {
|
|
|
98
98
|
exports.se_GetAttachmentCommand = se_GetAttachmentCommand;
|
|
99
99
|
const se_GetTranscriptCommand = async (input, context) => {
|
|
100
100
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
101
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
101
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
102
102
|
"content-type": "application/json",
|
|
103
103
|
"x-amz-bearer": input.ConnectionToken,
|
|
104
104
|
});
|
|
105
105
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/transcript";
|
|
106
106
|
let body;
|
|
107
|
-
body = JSON.stringify({
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
});
|
|
107
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
108
|
+
ContactId: [],
|
|
109
|
+
MaxResults: [],
|
|
110
|
+
NextToken: [],
|
|
111
|
+
ScanDirection: [],
|
|
112
|
+
SortOrder: [],
|
|
113
|
+
StartPosition: (_) => (0, smithy_client_1._json)(_),
|
|
114
|
+
}));
|
|
115
115
|
return new protocol_http_1.HttpRequest({
|
|
116
116
|
protocol,
|
|
117
117
|
hostname,
|
|
@@ -125,17 +125,17 @@ const se_GetTranscriptCommand = async (input, context) => {
|
|
|
125
125
|
exports.se_GetTranscriptCommand = se_GetTranscriptCommand;
|
|
126
126
|
const se_SendEventCommand = async (input, context) => {
|
|
127
127
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
128
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
128
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
129
129
|
"content-type": "application/json",
|
|
130
130
|
"x-amz-bearer": input.ConnectionToken,
|
|
131
131
|
});
|
|
132
132
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/event";
|
|
133
133
|
let body;
|
|
134
|
-
body = JSON.stringify({
|
|
135
|
-
ClientToken:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
});
|
|
134
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
135
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
136
|
+
Content: [],
|
|
137
|
+
ContentType: [],
|
|
138
|
+
}));
|
|
139
139
|
return new protocol_http_1.HttpRequest({
|
|
140
140
|
protocol,
|
|
141
141
|
hostname,
|
|
@@ -149,17 +149,17 @@ const se_SendEventCommand = async (input, context) => {
|
|
|
149
149
|
exports.se_SendEventCommand = se_SendEventCommand;
|
|
150
150
|
const se_SendMessageCommand = async (input, context) => {
|
|
151
151
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
152
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
152
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
153
153
|
"content-type": "application/json",
|
|
154
154
|
"x-amz-bearer": input.ConnectionToken,
|
|
155
155
|
});
|
|
156
156
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/message";
|
|
157
157
|
let body;
|
|
158
|
-
body = JSON.stringify({
|
|
159
|
-
ClientToken:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
});
|
|
158
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
159
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
160
|
+
Content: [],
|
|
161
|
+
ContentType: [],
|
|
162
|
+
}));
|
|
163
163
|
return new protocol_http_1.HttpRequest({
|
|
164
164
|
protocol,
|
|
165
165
|
hostname,
|
|
@@ -173,18 +173,18 @@ const se_SendMessageCommand = async (input, context) => {
|
|
|
173
173
|
exports.se_SendMessageCommand = se_SendMessageCommand;
|
|
174
174
|
const se_StartAttachmentUploadCommand = async (input, context) => {
|
|
175
175
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
176
|
-
const headers = map({}, isSerializableHeaderValue, {
|
|
176
|
+
const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
|
|
177
177
|
"content-type": "application/json",
|
|
178
178
|
"x-amz-bearer": input.ConnectionToken,
|
|
179
179
|
});
|
|
180
180
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/start-attachment-upload";
|
|
181
181
|
let body;
|
|
182
|
-
body = JSON.stringify({
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
ClientToken:
|
|
186
|
-
|
|
187
|
-
});
|
|
182
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
183
|
+
AttachmentName: [],
|
|
184
|
+
AttachmentSizeInBytes: [],
|
|
185
|
+
ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
186
|
+
ContentType: [],
|
|
187
|
+
}));
|
|
188
188
|
return new protocol_http_1.HttpRequest({
|
|
189
189
|
protocol,
|
|
190
190
|
hostname,
|
|
@@ -200,7 +200,7 @@ const de_CompleteAttachmentUploadCommand = async (output, context) => {
|
|
|
200
200
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
201
201
|
return de_CompleteAttachmentUploadCommandError(output, context);
|
|
202
202
|
}
|
|
203
|
-
const contents = map({
|
|
203
|
+
const contents = (0, smithy_client_1.map)({
|
|
204
204
|
$metadata: deserializeMetadata(output),
|
|
205
205
|
});
|
|
206
206
|
await collectBody(output.body, context);
|
|
@@ -234,10 +234,9 @@ const de_CompleteAttachmentUploadCommandError = async (output, context) => {
|
|
|
234
234
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
235
235
|
default:
|
|
236
236
|
const parsedBody = parsedOutput.body;
|
|
237
|
-
|
|
237
|
+
return throwDefaultError({
|
|
238
238
|
output,
|
|
239
239
|
parsedBody,
|
|
240
|
-
exceptionCtor: ConnectParticipantServiceException_1.ConnectParticipantServiceException,
|
|
241
240
|
errorCode,
|
|
242
241
|
});
|
|
243
242
|
}
|
|
@@ -246,16 +245,15 @@ const de_CreateParticipantConnectionCommand = async (output, context) => {
|
|
|
246
245
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
247
246
|
return de_CreateParticipantConnectionCommandError(output, context);
|
|
248
247
|
}
|
|
249
|
-
const contents = map({
|
|
248
|
+
const contents = (0, smithy_client_1.map)({
|
|
250
249
|
$metadata: deserializeMetadata(output),
|
|
251
250
|
});
|
|
252
251
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
252
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
253
|
+
ConnectionCredentials: smithy_client_1._json,
|
|
254
|
+
Websocket: smithy_client_1._json,
|
|
255
|
+
});
|
|
256
|
+
Object.assign(contents, doc);
|
|
259
257
|
return contents;
|
|
260
258
|
};
|
|
261
259
|
exports.de_CreateParticipantConnectionCommand = de_CreateParticipantConnectionCommand;
|
|
@@ -280,10 +278,9 @@ const de_CreateParticipantConnectionCommandError = async (output, context) => {
|
|
|
280
278
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
281
279
|
default:
|
|
282
280
|
const parsedBody = parsedOutput.body;
|
|
283
|
-
|
|
281
|
+
return throwDefaultError({
|
|
284
282
|
output,
|
|
285
283
|
parsedBody,
|
|
286
|
-
exceptionCtor: ConnectParticipantServiceException_1.ConnectParticipantServiceException,
|
|
287
284
|
errorCode,
|
|
288
285
|
});
|
|
289
286
|
}
|
|
@@ -292,7 +289,7 @@ const de_DisconnectParticipantCommand = async (output, context) => {
|
|
|
292
289
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
293
290
|
return de_DisconnectParticipantCommandError(output, context);
|
|
294
291
|
}
|
|
295
|
-
const contents = map({
|
|
292
|
+
const contents = (0, smithy_client_1.map)({
|
|
296
293
|
$metadata: deserializeMetadata(output),
|
|
297
294
|
});
|
|
298
295
|
await collectBody(output.body, context);
|
|
@@ -320,10 +317,9 @@ const de_DisconnectParticipantCommandError = async (output, context) => {
|
|
|
320
317
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
321
318
|
default:
|
|
322
319
|
const parsedBody = parsedOutput.body;
|
|
323
|
-
|
|
320
|
+
return throwDefaultError({
|
|
324
321
|
output,
|
|
325
322
|
parsedBody,
|
|
326
|
-
exceptionCtor: ConnectParticipantServiceException_1.ConnectParticipantServiceException,
|
|
327
323
|
errorCode,
|
|
328
324
|
});
|
|
329
325
|
}
|
|
@@ -332,16 +328,15 @@ const de_GetAttachmentCommand = async (output, context) => {
|
|
|
332
328
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
333
329
|
return de_GetAttachmentCommandError(output, context);
|
|
334
330
|
}
|
|
335
|
-
const contents = map({
|
|
331
|
+
const contents = (0, smithy_client_1.map)({
|
|
336
332
|
$metadata: deserializeMetadata(output),
|
|
337
333
|
});
|
|
338
334
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}
|
|
335
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
336
|
+
Url: smithy_client_1.expectString,
|
|
337
|
+
UrlExpiry: smithy_client_1.expectString,
|
|
338
|
+
});
|
|
339
|
+
Object.assign(contents, doc);
|
|
345
340
|
return contents;
|
|
346
341
|
};
|
|
347
342
|
exports.de_GetAttachmentCommand = de_GetAttachmentCommand;
|
|
@@ -366,10 +361,9 @@ const de_GetAttachmentCommandError = async (output, context) => {
|
|
|
366
361
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
367
362
|
default:
|
|
368
363
|
const parsedBody = parsedOutput.body;
|
|
369
|
-
|
|
364
|
+
return throwDefaultError({
|
|
370
365
|
output,
|
|
371
366
|
parsedBody,
|
|
372
|
-
exceptionCtor: ConnectParticipantServiceException_1.ConnectParticipantServiceException,
|
|
373
367
|
errorCode,
|
|
374
368
|
});
|
|
375
369
|
}
|
|
@@ -378,19 +372,16 @@ const de_GetTranscriptCommand = async (output, context) => {
|
|
|
378
372
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
379
373
|
return de_GetTranscriptCommandError(output, context);
|
|
380
374
|
}
|
|
381
|
-
const contents = map({
|
|
375
|
+
const contents = (0, smithy_client_1.map)({
|
|
382
376
|
$metadata: deserializeMetadata(output),
|
|
383
377
|
});
|
|
384
378
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
if (data.Transcript != null) {
|
|
392
|
-
contents.Transcript = de_Transcript(data.Transcript, context);
|
|
393
|
-
}
|
|
379
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
380
|
+
InitialContactId: smithy_client_1.expectString,
|
|
381
|
+
NextToken: smithy_client_1.expectString,
|
|
382
|
+
Transcript: smithy_client_1._json,
|
|
383
|
+
});
|
|
384
|
+
Object.assign(contents, doc);
|
|
394
385
|
return contents;
|
|
395
386
|
};
|
|
396
387
|
exports.de_GetTranscriptCommand = de_GetTranscriptCommand;
|
|
@@ -415,10 +406,9 @@ const de_GetTranscriptCommandError = async (output, context) => {
|
|
|
415
406
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
416
407
|
default:
|
|
417
408
|
const parsedBody = parsedOutput.body;
|
|
418
|
-
|
|
409
|
+
return throwDefaultError({
|
|
419
410
|
output,
|
|
420
411
|
parsedBody,
|
|
421
|
-
exceptionCtor: ConnectParticipantServiceException_1.ConnectParticipantServiceException,
|
|
422
412
|
errorCode,
|
|
423
413
|
});
|
|
424
414
|
}
|
|
@@ -427,16 +417,15 @@ const de_SendEventCommand = async (output, context) => {
|
|
|
427
417
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
428
418
|
return de_SendEventCommandError(output, context);
|
|
429
419
|
}
|
|
430
|
-
const contents = map({
|
|
420
|
+
const contents = (0, smithy_client_1.map)({
|
|
431
421
|
$metadata: deserializeMetadata(output),
|
|
432
422
|
});
|
|
433
423
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
}
|
|
424
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
425
|
+
AbsoluteTime: smithy_client_1.expectString,
|
|
426
|
+
Id: smithy_client_1.expectString,
|
|
427
|
+
});
|
|
428
|
+
Object.assign(contents, doc);
|
|
440
429
|
return contents;
|
|
441
430
|
};
|
|
442
431
|
exports.de_SendEventCommand = de_SendEventCommand;
|
|
@@ -461,10 +450,9 @@ const de_SendEventCommandError = async (output, context) => {
|
|
|
461
450
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
462
451
|
default:
|
|
463
452
|
const parsedBody = parsedOutput.body;
|
|
464
|
-
|
|
453
|
+
return throwDefaultError({
|
|
465
454
|
output,
|
|
466
455
|
parsedBody,
|
|
467
|
-
exceptionCtor: ConnectParticipantServiceException_1.ConnectParticipantServiceException,
|
|
468
456
|
errorCode,
|
|
469
457
|
});
|
|
470
458
|
}
|
|
@@ -473,16 +461,15 @@ const de_SendMessageCommand = async (output, context) => {
|
|
|
473
461
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
474
462
|
return de_SendMessageCommandError(output, context);
|
|
475
463
|
}
|
|
476
|
-
const contents = map({
|
|
464
|
+
const contents = (0, smithy_client_1.map)({
|
|
477
465
|
$metadata: deserializeMetadata(output),
|
|
478
466
|
});
|
|
479
467
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}
|
|
468
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
469
|
+
AbsoluteTime: smithy_client_1.expectString,
|
|
470
|
+
Id: smithy_client_1.expectString,
|
|
471
|
+
});
|
|
472
|
+
Object.assign(contents, doc);
|
|
486
473
|
return contents;
|
|
487
474
|
};
|
|
488
475
|
exports.de_SendMessageCommand = de_SendMessageCommand;
|
|
@@ -507,10 +494,9 @@ const de_SendMessageCommandError = async (output, context) => {
|
|
|
507
494
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
508
495
|
default:
|
|
509
496
|
const parsedBody = parsedOutput.body;
|
|
510
|
-
|
|
497
|
+
return throwDefaultError({
|
|
511
498
|
output,
|
|
512
499
|
parsedBody,
|
|
513
|
-
exceptionCtor: ConnectParticipantServiceException_1.ConnectParticipantServiceException,
|
|
514
500
|
errorCode,
|
|
515
501
|
});
|
|
516
502
|
}
|
|
@@ -519,16 +505,15 @@ const de_StartAttachmentUploadCommand = async (output, context) => {
|
|
|
519
505
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
520
506
|
return de_StartAttachmentUploadCommandError(output, context);
|
|
521
507
|
}
|
|
522
|
-
const contents = map({
|
|
508
|
+
const contents = (0, smithy_client_1.map)({
|
|
523
509
|
$metadata: deserializeMetadata(output),
|
|
524
510
|
});
|
|
525
511
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
}
|
|
512
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
513
|
+
AttachmentId: smithy_client_1.expectString,
|
|
514
|
+
UploadMetadata: smithy_client_1._json,
|
|
515
|
+
});
|
|
516
|
+
Object.assign(contents, doc);
|
|
532
517
|
return contents;
|
|
533
518
|
};
|
|
534
519
|
exports.de_StartAttachmentUploadCommand = de_StartAttachmentUploadCommand;
|
|
@@ -556,21 +541,21 @@ const de_StartAttachmentUploadCommandError = async (output, context) => {
|
|
|
556
541
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
557
542
|
default:
|
|
558
543
|
const parsedBody = parsedOutput.body;
|
|
559
|
-
|
|
544
|
+
return throwDefaultError({
|
|
560
545
|
output,
|
|
561
546
|
parsedBody,
|
|
562
|
-
exceptionCtor: ConnectParticipantServiceException_1.ConnectParticipantServiceException,
|
|
563
547
|
errorCode,
|
|
564
548
|
});
|
|
565
549
|
}
|
|
566
550
|
};
|
|
567
|
-
const
|
|
551
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(ConnectParticipantServiceException_1.ConnectParticipantServiceException);
|
|
568
552
|
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
569
|
-
const contents = map({});
|
|
553
|
+
const contents = (0, smithy_client_1.map)({});
|
|
570
554
|
const data = parsedOutput.body;
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
}
|
|
555
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
556
|
+
Message: smithy_client_1.expectString,
|
|
557
|
+
});
|
|
558
|
+
Object.assign(contents, doc);
|
|
574
559
|
const exception = new models_0_1.AccessDeniedException({
|
|
575
560
|
$metadata: deserializeMetadata(parsedOutput),
|
|
576
561
|
...contents,
|
|
@@ -578,11 +563,12 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
|
578
563
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
579
564
|
};
|
|
580
565
|
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
581
|
-
const contents = map({});
|
|
566
|
+
const contents = (0, smithy_client_1.map)({});
|
|
582
567
|
const data = parsedOutput.body;
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
}
|
|
568
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
569
|
+
Message: smithy_client_1.expectString,
|
|
570
|
+
});
|
|
571
|
+
Object.assign(contents, doc);
|
|
586
572
|
const exception = new models_0_1.ConflictException({
|
|
587
573
|
$metadata: deserializeMetadata(parsedOutput),
|
|
588
574
|
...contents,
|
|
@@ -590,11 +576,12 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
|
590
576
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
591
577
|
};
|
|
592
578
|
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
593
|
-
const contents = map({});
|
|
579
|
+
const contents = (0, smithy_client_1.map)({});
|
|
594
580
|
const data = parsedOutput.body;
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
}
|
|
581
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
582
|
+
Message: smithy_client_1.expectString,
|
|
583
|
+
});
|
|
584
|
+
Object.assign(contents, doc);
|
|
598
585
|
const exception = new models_0_1.InternalServerException({
|
|
599
586
|
$metadata: deserializeMetadata(parsedOutput),
|
|
600
587
|
...contents,
|
|
@@ -602,11 +589,12 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
|
602
589
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
603
590
|
};
|
|
604
591
|
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
605
|
-
const contents = map({});
|
|
592
|
+
const contents = (0, smithy_client_1.map)({});
|
|
606
593
|
const data = parsedOutput.body;
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
}
|
|
594
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
595
|
+
Message: smithy_client_1.expectString,
|
|
596
|
+
});
|
|
597
|
+
Object.assign(contents, doc);
|
|
610
598
|
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
611
599
|
$metadata: deserializeMetadata(parsedOutput),
|
|
612
600
|
...contents,
|
|
@@ -614,11 +602,12 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
614
602
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
615
603
|
};
|
|
616
604
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
617
|
-
const contents = map({});
|
|
605
|
+
const contents = (0, smithy_client_1.map)({});
|
|
618
606
|
const data = parsedOutput.body;
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}
|
|
607
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
608
|
+
Message: smithy_client_1.expectString,
|
|
609
|
+
});
|
|
610
|
+
Object.assign(contents, doc);
|
|
622
611
|
const exception = new models_0_1.ThrottlingException({
|
|
623
612
|
$metadata: deserializeMetadata(parsedOutput),
|
|
624
613
|
...contents,
|
|
@@ -626,136 +615,18 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
|
626
615
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
627
616
|
};
|
|
628
617
|
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
629
|
-
const contents = map({});
|
|
618
|
+
const contents = (0, smithy_client_1.map)({});
|
|
630
619
|
const data = parsedOutput.body;
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
}
|
|
620
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
621
|
+
Message: smithy_client_1.expectString,
|
|
622
|
+
});
|
|
623
|
+
Object.assign(contents, doc);
|
|
634
624
|
const exception = new models_0_1.ValidationException({
|
|
635
625
|
$metadata: deserializeMetadata(parsedOutput),
|
|
636
626
|
...contents,
|
|
637
627
|
});
|
|
638
628
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
639
629
|
};
|
|
640
|
-
const se_AttachmentIdList = (input, context) => {
|
|
641
|
-
return input
|
|
642
|
-
.filter((e) => e != null)
|
|
643
|
-
.map((entry) => {
|
|
644
|
-
return entry;
|
|
645
|
-
});
|
|
646
|
-
};
|
|
647
|
-
const se_ConnectionTypeList = (input, context) => {
|
|
648
|
-
return input
|
|
649
|
-
.filter((e) => e != null)
|
|
650
|
-
.map((entry) => {
|
|
651
|
-
return entry;
|
|
652
|
-
});
|
|
653
|
-
};
|
|
654
|
-
const se_StartPosition = (input, context) => {
|
|
655
|
-
return {
|
|
656
|
-
...(input.AbsoluteTime != null && { AbsoluteTime: input.AbsoluteTime }),
|
|
657
|
-
...(input.Id != null && { Id: input.Id }),
|
|
658
|
-
...(input.MostRecent != null && { MostRecent: input.MostRecent }),
|
|
659
|
-
};
|
|
660
|
-
};
|
|
661
|
-
const de_AttachmentItem = (output, context) => {
|
|
662
|
-
return {
|
|
663
|
-
AttachmentId: (0, smithy_client_1.expectString)(output.AttachmentId),
|
|
664
|
-
AttachmentName: (0, smithy_client_1.expectString)(output.AttachmentName),
|
|
665
|
-
ContentType: (0, smithy_client_1.expectString)(output.ContentType),
|
|
666
|
-
Status: (0, smithy_client_1.expectString)(output.Status),
|
|
667
|
-
};
|
|
668
|
-
};
|
|
669
|
-
const de_Attachments = (output, context) => {
|
|
670
|
-
const retVal = (output || [])
|
|
671
|
-
.filter((e) => e != null)
|
|
672
|
-
.map((entry) => {
|
|
673
|
-
if (entry === null) {
|
|
674
|
-
return null;
|
|
675
|
-
}
|
|
676
|
-
return de_AttachmentItem(entry, context);
|
|
677
|
-
});
|
|
678
|
-
return retVal;
|
|
679
|
-
};
|
|
680
|
-
const de_ConnectionCredentials = (output, context) => {
|
|
681
|
-
return {
|
|
682
|
-
ConnectionToken: (0, smithy_client_1.expectString)(output.ConnectionToken),
|
|
683
|
-
Expiry: (0, smithy_client_1.expectString)(output.Expiry),
|
|
684
|
-
};
|
|
685
|
-
};
|
|
686
|
-
const de_Item = (output, context) => {
|
|
687
|
-
return {
|
|
688
|
-
AbsoluteTime: (0, smithy_client_1.expectString)(output.AbsoluteTime),
|
|
689
|
-
Attachments: output.Attachments != null ? de_Attachments(output.Attachments, context) : undefined,
|
|
690
|
-
ContactId: (0, smithy_client_1.expectString)(output.ContactId),
|
|
691
|
-
Content: (0, smithy_client_1.expectString)(output.Content),
|
|
692
|
-
ContentType: (0, smithy_client_1.expectString)(output.ContentType),
|
|
693
|
-
DisplayName: (0, smithy_client_1.expectString)(output.DisplayName),
|
|
694
|
-
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
695
|
-
MessageMetadata: output.MessageMetadata != null ? de_MessageMetadata(output.MessageMetadata, context) : undefined,
|
|
696
|
-
ParticipantId: (0, smithy_client_1.expectString)(output.ParticipantId),
|
|
697
|
-
ParticipantRole: (0, smithy_client_1.expectString)(output.ParticipantRole),
|
|
698
|
-
RelatedContactId: (0, smithy_client_1.expectString)(output.RelatedContactId),
|
|
699
|
-
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
700
|
-
};
|
|
701
|
-
};
|
|
702
|
-
const de_MessageMetadata = (output, context) => {
|
|
703
|
-
return {
|
|
704
|
-
MessageId: (0, smithy_client_1.expectString)(output.MessageId),
|
|
705
|
-
Receipts: output.Receipts != null ? de_Receipts(output.Receipts, context) : undefined,
|
|
706
|
-
};
|
|
707
|
-
};
|
|
708
|
-
const de_Receipt = (output, context) => {
|
|
709
|
-
return {
|
|
710
|
-
DeliveredTimestamp: (0, smithy_client_1.expectString)(output.DeliveredTimestamp),
|
|
711
|
-
ReadTimestamp: (0, smithy_client_1.expectString)(output.ReadTimestamp),
|
|
712
|
-
RecipientParticipantId: (0, smithy_client_1.expectString)(output.RecipientParticipantId),
|
|
713
|
-
};
|
|
714
|
-
};
|
|
715
|
-
const de_Receipts = (output, context) => {
|
|
716
|
-
const retVal = (output || [])
|
|
717
|
-
.filter((e) => e != null)
|
|
718
|
-
.map((entry) => {
|
|
719
|
-
if (entry === null) {
|
|
720
|
-
return null;
|
|
721
|
-
}
|
|
722
|
-
return de_Receipt(entry, context);
|
|
723
|
-
});
|
|
724
|
-
return retVal;
|
|
725
|
-
};
|
|
726
|
-
const de_Transcript = (output, context) => {
|
|
727
|
-
const retVal = (output || [])
|
|
728
|
-
.filter((e) => e != null)
|
|
729
|
-
.map((entry) => {
|
|
730
|
-
if (entry === null) {
|
|
731
|
-
return null;
|
|
732
|
-
}
|
|
733
|
-
return de_Item(entry, context);
|
|
734
|
-
});
|
|
735
|
-
return retVal;
|
|
736
|
-
};
|
|
737
|
-
const de_UploadMetadata = (output, context) => {
|
|
738
|
-
return {
|
|
739
|
-
HeadersToInclude: output.HeadersToInclude != null ? de_UploadMetadataSignedHeaders(output.HeadersToInclude, context) : undefined,
|
|
740
|
-
Url: (0, smithy_client_1.expectString)(output.Url),
|
|
741
|
-
UrlExpiry: (0, smithy_client_1.expectString)(output.UrlExpiry),
|
|
742
|
-
};
|
|
743
|
-
};
|
|
744
|
-
const de_UploadMetadataSignedHeaders = (output, context) => {
|
|
745
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
746
|
-
if (value === null) {
|
|
747
|
-
return acc;
|
|
748
|
-
}
|
|
749
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
750
|
-
return acc;
|
|
751
|
-
}, {});
|
|
752
|
-
};
|
|
753
|
-
const de_Websocket = (output, context) => {
|
|
754
|
-
return {
|
|
755
|
-
ConnectionExpiry: (0, smithy_client_1.expectString)(output.ConnectionExpiry),
|
|
756
|
-
Url: (0, smithy_client_1.expectString)(output.Url),
|
|
757
|
-
};
|
|
758
|
-
};
|
|
759
630
|
const deserializeMetadata = (output) => ({
|
|
760
631
|
httpStatusCode: output.statusCode,
|
|
761
632
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|