@aws-sdk/client-connectparticipant 3.303.0 → 3.309.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/commands/CompleteAttachmentUploadCommand.js +2 -2
- package/dist-cjs/commands/CreateParticipantConnectionCommand.js +2 -2
- package/dist-cjs/commands/DisconnectParticipantCommand.js +2 -2
- package/dist-cjs/commands/GetAttachmentCommand.js +2 -2
- package/dist-cjs/commands/GetTranscriptCommand.js +2 -2
- package/dist-cjs/commands/SendEventCommand.js +2 -2
- package/dist-cjs/commands/SendMessageCommand.js +2 -2
- package/dist-cjs/commands/StartAttachmentUploadCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +118 -126
- package/dist-es/commands/CompleteAttachmentUploadCommand.js +3 -3
- package/dist-es/commands/CreateParticipantConnectionCommand.js +3 -3
- package/dist-es/commands/DisconnectParticipantCommand.js +3 -3
- package/dist-es/commands/GetAttachmentCommand.js +3 -3
- package/dist-es/commands/GetTranscriptCommand.js +3 -3
- package/dist-es/commands/SendEventCommand.js +3 -3
- package/dist-es/commands/SendMessageCommand.js +3 -3
- package/dist-es/commands/StartAttachmentUploadCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +101 -109
- package/dist-types/protocols/Aws_restJson1.d.ts +64 -16
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +16 -16
- package/package.json +29 -29
|
@@ -3,7 +3,7 @@ import { decorateServiceException as __decorateServiceException, expectNonNull a
|
|
|
3
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
4
4
|
import { ConnectParticipantServiceException as __BaseException } from "../models/ConnectParticipantServiceException";
|
|
5
5
|
import { AccessDeniedException, ConflictException, InternalServerException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
|
-
export const
|
|
6
|
+
export const se_CompleteAttachmentUploadCommand = async (input, context) => {
|
|
7
7
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
8
|
const headers = map({}, isSerializableHeaderValue, {
|
|
9
9
|
"content-type": "application/json",
|
|
@@ -12,9 +12,7 @@ export const serializeAws_restJson1CompleteAttachmentUploadCommand = async (inpu
|
|
|
12
12
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/participant/complete-attachment-upload";
|
|
13
13
|
let body;
|
|
14
14
|
body = JSON.stringify({
|
|
15
|
-
...(input.AttachmentIds != null && {
|
|
16
|
-
AttachmentIds: serializeAws_restJson1AttachmentIdList(input.AttachmentIds, context),
|
|
17
|
-
}),
|
|
15
|
+
...(input.AttachmentIds != null && { AttachmentIds: se_AttachmentIdList(input.AttachmentIds, context) }),
|
|
18
16
|
ClientToken: input.ClientToken ?? generateIdempotencyToken(),
|
|
19
17
|
});
|
|
20
18
|
return new __HttpRequest({
|
|
@@ -27,7 +25,7 @@ export const serializeAws_restJson1CompleteAttachmentUploadCommand = async (inpu
|
|
|
27
25
|
body,
|
|
28
26
|
});
|
|
29
27
|
};
|
|
30
|
-
export const
|
|
28
|
+
export const se_CreateParticipantConnectionCommand = async (input, context) => {
|
|
31
29
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
32
30
|
const headers = map({}, isSerializableHeaderValue, {
|
|
33
31
|
"content-type": "application/json",
|
|
@@ -37,7 +35,7 @@ export const serializeAws_restJson1CreateParticipantConnectionCommand = async (i
|
|
|
37
35
|
let body;
|
|
38
36
|
body = JSON.stringify({
|
|
39
37
|
...(input.ConnectParticipant != null && { ConnectParticipant: input.ConnectParticipant }),
|
|
40
|
-
...(input.Type != null && { Type:
|
|
38
|
+
...(input.Type != null && { Type: se_ConnectionTypeList(input.Type, context) }),
|
|
41
39
|
});
|
|
42
40
|
return new __HttpRequest({
|
|
43
41
|
protocol,
|
|
@@ -49,7 +47,7 @@ export const serializeAws_restJson1CreateParticipantConnectionCommand = async (i
|
|
|
49
47
|
body,
|
|
50
48
|
});
|
|
51
49
|
};
|
|
52
|
-
export const
|
|
50
|
+
export const se_DisconnectParticipantCommand = async (input, context) => {
|
|
53
51
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
54
52
|
const headers = map({}, isSerializableHeaderValue, {
|
|
55
53
|
"content-type": "application/json",
|
|
@@ -70,7 +68,7 @@ export const serializeAws_restJson1DisconnectParticipantCommand = async (input,
|
|
|
70
68
|
body,
|
|
71
69
|
});
|
|
72
70
|
};
|
|
73
|
-
export const
|
|
71
|
+
export const se_GetAttachmentCommand = async (input, context) => {
|
|
74
72
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
75
73
|
const headers = map({}, isSerializableHeaderValue, {
|
|
76
74
|
"content-type": "application/json",
|
|
@@ -91,7 +89,7 @@ export const serializeAws_restJson1GetAttachmentCommand = async (input, context)
|
|
|
91
89
|
body,
|
|
92
90
|
});
|
|
93
91
|
};
|
|
94
|
-
export const
|
|
92
|
+
export const se_GetTranscriptCommand = async (input, context) => {
|
|
95
93
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
96
94
|
const headers = map({}, isSerializableHeaderValue, {
|
|
97
95
|
"content-type": "application/json",
|
|
@@ -105,9 +103,7 @@ export const serializeAws_restJson1GetTranscriptCommand = async (input, context)
|
|
|
105
103
|
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
106
104
|
...(input.ScanDirection != null && { ScanDirection: input.ScanDirection }),
|
|
107
105
|
...(input.SortOrder != null && { SortOrder: input.SortOrder }),
|
|
108
|
-
...(input.StartPosition != null && {
|
|
109
|
-
StartPosition: serializeAws_restJson1StartPosition(input.StartPosition, context),
|
|
110
|
-
}),
|
|
106
|
+
...(input.StartPosition != null && { StartPosition: se_StartPosition(input.StartPosition, context) }),
|
|
111
107
|
});
|
|
112
108
|
return new __HttpRequest({
|
|
113
109
|
protocol,
|
|
@@ -119,7 +115,7 @@ export const serializeAws_restJson1GetTranscriptCommand = async (input, context)
|
|
|
119
115
|
body,
|
|
120
116
|
});
|
|
121
117
|
};
|
|
122
|
-
export const
|
|
118
|
+
export const se_SendEventCommand = async (input, context) => {
|
|
123
119
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
124
120
|
const headers = map({}, isSerializableHeaderValue, {
|
|
125
121
|
"content-type": "application/json",
|
|
@@ -142,7 +138,7 @@ export const serializeAws_restJson1SendEventCommand = async (input, context) =>
|
|
|
142
138
|
body,
|
|
143
139
|
});
|
|
144
140
|
};
|
|
145
|
-
export const
|
|
141
|
+
export const se_SendMessageCommand = async (input, context) => {
|
|
146
142
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
147
143
|
const headers = map({}, isSerializableHeaderValue, {
|
|
148
144
|
"content-type": "application/json",
|
|
@@ -165,7 +161,7 @@ export const serializeAws_restJson1SendMessageCommand = async (input, context) =
|
|
|
165
161
|
body,
|
|
166
162
|
});
|
|
167
163
|
};
|
|
168
|
-
export const
|
|
164
|
+
export const se_StartAttachmentUploadCommand = async (input, context) => {
|
|
169
165
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
170
166
|
const headers = map({}, isSerializableHeaderValue, {
|
|
171
167
|
"content-type": "application/json",
|
|
@@ -189,9 +185,9 @@ export const serializeAws_restJson1StartAttachmentUploadCommand = async (input,
|
|
|
189
185
|
body,
|
|
190
186
|
});
|
|
191
187
|
};
|
|
192
|
-
export const
|
|
188
|
+
export const de_CompleteAttachmentUploadCommand = async (output, context) => {
|
|
193
189
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
194
|
-
return
|
|
190
|
+
return de_CompleteAttachmentUploadCommandError(output, context);
|
|
195
191
|
}
|
|
196
192
|
const contents = map({
|
|
197
193
|
$metadata: deserializeMetadata(output),
|
|
@@ -199,7 +195,7 @@ export const deserializeAws_restJson1CompleteAttachmentUploadCommand = async (ou
|
|
|
199
195
|
await collectBody(output.body, context);
|
|
200
196
|
return contents;
|
|
201
197
|
};
|
|
202
|
-
const
|
|
198
|
+
const de_CompleteAttachmentUploadCommandError = async (output, context) => {
|
|
203
199
|
const parsedOutput = {
|
|
204
200
|
...output,
|
|
205
201
|
body: await parseErrorBody(output.body, context),
|
|
@@ -208,22 +204,22 @@ const deserializeAws_restJson1CompleteAttachmentUploadCommandError = async (outp
|
|
|
208
204
|
switch (errorCode) {
|
|
209
205
|
case "AccessDeniedException":
|
|
210
206
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
211
|
-
throw await
|
|
207
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
212
208
|
case "ConflictException":
|
|
213
209
|
case "com.amazonaws.connectparticipant#ConflictException":
|
|
214
|
-
throw await
|
|
210
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
215
211
|
case "InternalServerException":
|
|
216
212
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
217
|
-
throw await
|
|
213
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
218
214
|
case "ServiceQuotaExceededException":
|
|
219
215
|
case "com.amazonaws.connectparticipant#ServiceQuotaExceededException":
|
|
220
|
-
throw await
|
|
216
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
221
217
|
case "ThrottlingException":
|
|
222
218
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
223
|
-
throw await
|
|
219
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
224
220
|
case "ValidationException":
|
|
225
221
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
226
|
-
throw await
|
|
222
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
227
223
|
default:
|
|
228
224
|
const parsedBody = parsedOutput.body;
|
|
229
225
|
throwDefaultError({
|
|
@@ -234,23 +230,23 @@ const deserializeAws_restJson1CompleteAttachmentUploadCommandError = async (outp
|
|
|
234
230
|
});
|
|
235
231
|
}
|
|
236
232
|
};
|
|
237
|
-
export const
|
|
233
|
+
export const de_CreateParticipantConnectionCommand = async (output, context) => {
|
|
238
234
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
239
|
-
return
|
|
235
|
+
return de_CreateParticipantConnectionCommandError(output, context);
|
|
240
236
|
}
|
|
241
237
|
const contents = map({
|
|
242
238
|
$metadata: deserializeMetadata(output),
|
|
243
239
|
});
|
|
244
240
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
245
241
|
if (data.ConnectionCredentials != null) {
|
|
246
|
-
contents.ConnectionCredentials =
|
|
242
|
+
contents.ConnectionCredentials = de_ConnectionCredentials(data.ConnectionCredentials, context);
|
|
247
243
|
}
|
|
248
244
|
if (data.Websocket != null) {
|
|
249
|
-
contents.Websocket =
|
|
245
|
+
contents.Websocket = de_Websocket(data.Websocket, context);
|
|
250
246
|
}
|
|
251
247
|
return contents;
|
|
252
248
|
};
|
|
253
|
-
const
|
|
249
|
+
const de_CreateParticipantConnectionCommandError = async (output, context) => {
|
|
254
250
|
const parsedOutput = {
|
|
255
251
|
...output,
|
|
256
252
|
body: await parseErrorBody(output.body, context),
|
|
@@ -259,16 +255,16 @@ const deserializeAws_restJson1CreateParticipantConnectionCommandError = async (o
|
|
|
259
255
|
switch (errorCode) {
|
|
260
256
|
case "AccessDeniedException":
|
|
261
257
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
262
|
-
throw await
|
|
258
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
263
259
|
case "InternalServerException":
|
|
264
260
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
265
|
-
throw await
|
|
261
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
266
262
|
case "ThrottlingException":
|
|
267
263
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
268
|
-
throw await
|
|
264
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
269
265
|
case "ValidationException":
|
|
270
266
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
271
|
-
throw await
|
|
267
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
272
268
|
default:
|
|
273
269
|
const parsedBody = parsedOutput.body;
|
|
274
270
|
throwDefaultError({
|
|
@@ -279,9 +275,9 @@ const deserializeAws_restJson1CreateParticipantConnectionCommandError = async (o
|
|
|
279
275
|
});
|
|
280
276
|
}
|
|
281
277
|
};
|
|
282
|
-
export const
|
|
278
|
+
export const de_DisconnectParticipantCommand = async (output, context) => {
|
|
283
279
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
284
|
-
return
|
|
280
|
+
return de_DisconnectParticipantCommandError(output, context);
|
|
285
281
|
}
|
|
286
282
|
const contents = map({
|
|
287
283
|
$metadata: deserializeMetadata(output),
|
|
@@ -289,7 +285,7 @@ export const deserializeAws_restJson1DisconnectParticipantCommand = async (outpu
|
|
|
289
285
|
await collectBody(output.body, context);
|
|
290
286
|
return contents;
|
|
291
287
|
};
|
|
292
|
-
const
|
|
288
|
+
const de_DisconnectParticipantCommandError = async (output, context) => {
|
|
293
289
|
const parsedOutput = {
|
|
294
290
|
...output,
|
|
295
291
|
body: await parseErrorBody(output.body, context),
|
|
@@ -298,16 +294,16 @@ const deserializeAws_restJson1DisconnectParticipantCommandError = async (output,
|
|
|
298
294
|
switch (errorCode) {
|
|
299
295
|
case "AccessDeniedException":
|
|
300
296
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
301
|
-
throw await
|
|
297
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
302
298
|
case "InternalServerException":
|
|
303
299
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
304
|
-
throw await
|
|
300
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
305
301
|
case "ThrottlingException":
|
|
306
302
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
307
|
-
throw await
|
|
303
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
308
304
|
case "ValidationException":
|
|
309
305
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
310
|
-
throw await
|
|
306
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
311
307
|
default:
|
|
312
308
|
const parsedBody = parsedOutput.body;
|
|
313
309
|
throwDefaultError({
|
|
@@ -318,9 +314,9 @@ const deserializeAws_restJson1DisconnectParticipantCommandError = async (output,
|
|
|
318
314
|
});
|
|
319
315
|
}
|
|
320
316
|
};
|
|
321
|
-
export const
|
|
317
|
+
export const de_GetAttachmentCommand = async (output, context) => {
|
|
322
318
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
323
|
-
return
|
|
319
|
+
return de_GetAttachmentCommandError(output, context);
|
|
324
320
|
}
|
|
325
321
|
const contents = map({
|
|
326
322
|
$metadata: deserializeMetadata(output),
|
|
@@ -334,7 +330,7 @@ export const deserializeAws_restJson1GetAttachmentCommand = async (output, conte
|
|
|
334
330
|
}
|
|
335
331
|
return contents;
|
|
336
332
|
};
|
|
337
|
-
const
|
|
333
|
+
const de_GetAttachmentCommandError = async (output, context) => {
|
|
338
334
|
const parsedOutput = {
|
|
339
335
|
...output,
|
|
340
336
|
body: await parseErrorBody(output.body, context),
|
|
@@ -343,16 +339,16 @@ const deserializeAws_restJson1GetAttachmentCommandError = async (output, context
|
|
|
343
339
|
switch (errorCode) {
|
|
344
340
|
case "AccessDeniedException":
|
|
345
341
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
346
|
-
throw await
|
|
342
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
347
343
|
case "InternalServerException":
|
|
348
344
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
349
|
-
throw await
|
|
345
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
350
346
|
case "ThrottlingException":
|
|
351
347
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
352
|
-
throw await
|
|
348
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
353
349
|
case "ValidationException":
|
|
354
350
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
355
|
-
throw await
|
|
351
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
356
352
|
default:
|
|
357
353
|
const parsedBody = parsedOutput.body;
|
|
358
354
|
throwDefaultError({
|
|
@@ -363,9 +359,9 @@ const deserializeAws_restJson1GetAttachmentCommandError = async (output, context
|
|
|
363
359
|
});
|
|
364
360
|
}
|
|
365
361
|
};
|
|
366
|
-
export const
|
|
362
|
+
export const de_GetTranscriptCommand = async (output, context) => {
|
|
367
363
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
368
|
-
return
|
|
364
|
+
return de_GetTranscriptCommandError(output, context);
|
|
369
365
|
}
|
|
370
366
|
const contents = map({
|
|
371
367
|
$metadata: deserializeMetadata(output),
|
|
@@ -378,11 +374,11 @@ export const deserializeAws_restJson1GetTranscriptCommand = async (output, conte
|
|
|
378
374
|
contents.NextToken = __expectString(data.NextToken);
|
|
379
375
|
}
|
|
380
376
|
if (data.Transcript != null) {
|
|
381
|
-
contents.Transcript =
|
|
377
|
+
contents.Transcript = de_Transcript(data.Transcript, context);
|
|
382
378
|
}
|
|
383
379
|
return contents;
|
|
384
380
|
};
|
|
385
|
-
const
|
|
381
|
+
const de_GetTranscriptCommandError = async (output, context) => {
|
|
386
382
|
const parsedOutput = {
|
|
387
383
|
...output,
|
|
388
384
|
body: await parseErrorBody(output.body, context),
|
|
@@ -391,16 +387,16 @@ const deserializeAws_restJson1GetTranscriptCommandError = async (output, context
|
|
|
391
387
|
switch (errorCode) {
|
|
392
388
|
case "AccessDeniedException":
|
|
393
389
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
394
|
-
throw await
|
|
390
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
395
391
|
case "InternalServerException":
|
|
396
392
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
397
|
-
throw await
|
|
393
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
398
394
|
case "ThrottlingException":
|
|
399
395
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
400
|
-
throw await
|
|
396
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
401
397
|
case "ValidationException":
|
|
402
398
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
403
|
-
throw await
|
|
399
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
404
400
|
default:
|
|
405
401
|
const parsedBody = parsedOutput.body;
|
|
406
402
|
throwDefaultError({
|
|
@@ -411,9 +407,9 @@ const deserializeAws_restJson1GetTranscriptCommandError = async (output, context
|
|
|
411
407
|
});
|
|
412
408
|
}
|
|
413
409
|
};
|
|
414
|
-
export const
|
|
410
|
+
export const de_SendEventCommand = async (output, context) => {
|
|
415
411
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
416
|
-
return
|
|
412
|
+
return de_SendEventCommandError(output, context);
|
|
417
413
|
}
|
|
418
414
|
const contents = map({
|
|
419
415
|
$metadata: deserializeMetadata(output),
|
|
@@ -427,7 +423,7 @@ export const deserializeAws_restJson1SendEventCommand = async (output, context)
|
|
|
427
423
|
}
|
|
428
424
|
return contents;
|
|
429
425
|
};
|
|
430
|
-
const
|
|
426
|
+
const de_SendEventCommandError = async (output, context) => {
|
|
431
427
|
const parsedOutput = {
|
|
432
428
|
...output,
|
|
433
429
|
body: await parseErrorBody(output.body, context),
|
|
@@ -436,16 +432,16 @@ const deserializeAws_restJson1SendEventCommandError = async (output, context) =>
|
|
|
436
432
|
switch (errorCode) {
|
|
437
433
|
case "AccessDeniedException":
|
|
438
434
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
439
|
-
throw await
|
|
435
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
440
436
|
case "InternalServerException":
|
|
441
437
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
442
|
-
throw await
|
|
438
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
443
439
|
case "ThrottlingException":
|
|
444
440
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
445
|
-
throw await
|
|
441
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
446
442
|
case "ValidationException":
|
|
447
443
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
448
|
-
throw await
|
|
444
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
449
445
|
default:
|
|
450
446
|
const parsedBody = parsedOutput.body;
|
|
451
447
|
throwDefaultError({
|
|
@@ -456,9 +452,9 @@ const deserializeAws_restJson1SendEventCommandError = async (output, context) =>
|
|
|
456
452
|
});
|
|
457
453
|
}
|
|
458
454
|
};
|
|
459
|
-
export const
|
|
455
|
+
export const de_SendMessageCommand = async (output, context) => {
|
|
460
456
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
461
|
-
return
|
|
457
|
+
return de_SendMessageCommandError(output, context);
|
|
462
458
|
}
|
|
463
459
|
const contents = map({
|
|
464
460
|
$metadata: deserializeMetadata(output),
|
|
@@ -472,7 +468,7 @@ export const deserializeAws_restJson1SendMessageCommand = async (output, context
|
|
|
472
468
|
}
|
|
473
469
|
return contents;
|
|
474
470
|
};
|
|
475
|
-
const
|
|
471
|
+
const de_SendMessageCommandError = async (output, context) => {
|
|
476
472
|
const parsedOutput = {
|
|
477
473
|
...output,
|
|
478
474
|
body: await parseErrorBody(output.body, context),
|
|
@@ -481,16 +477,16 @@ const deserializeAws_restJson1SendMessageCommandError = async (output, context)
|
|
|
481
477
|
switch (errorCode) {
|
|
482
478
|
case "AccessDeniedException":
|
|
483
479
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
484
|
-
throw await
|
|
480
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
485
481
|
case "InternalServerException":
|
|
486
482
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
487
|
-
throw await
|
|
483
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
488
484
|
case "ThrottlingException":
|
|
489
485
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
490
|
-
throw await
|
|
486
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
491
487
|
case "ValidationException":
|
|
492
488
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
493
|
-
throw await
|
|
489
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
494
490
|
default:
|
|
495
491
|
const parsedBody = parsedOutput.body;
|
|
496
492
|
throwDefaultError({
|
|
@@ -501,9 +497,9 @@ const deserializeAws_restJson1SendMessageCommandError = async (output, context)
|
|
|
501
497
|
});
|
|
502
498
|
}
|
|
503
499
|
};
|
|
504
|
-
export const
|
|
500
|
+
export const de_StartAttachmentUploadCommand = async (output, context) => {
|
|
505
501
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
506
|
-
return
|
|
502
|
+
return de_StartAttachmentUploadCommandError(output, context);
|
|
507
503
|
}
|
|
508
504
|
const contents = map({
|
|
509
505
|
$metadata: deserializeMetadata(output),
|
|
@@ -513,11 +509,11 @@ export const deserializeAws_restJson1StartAttachmentUploadCommand = async (outpu
|
|
|
513
509
|
contents.AttachmentId = __expectString(data.AttachmentId);
|
|
514
510
|
}
|
|
515
511
|
if (data.UploadMetadata != null) {
|
|
516
|
-
contents.UploadMetadata =
|
|
512
|
+
contents.UploadMetadata = de_UploadMetadata(data.UploadMetadata, context);
|
|
517
513
|
}
|
|
518
514
|
return contents;
|
|
519
515
|
};
|
|
520
|
-
const
|
|
516
|
+
const de_StartAttachmentUploadCommandError = async (output, context) => {
|
|
521
517
|
const parsedOutput = {
|
|
522
518
|
...output,
|
|
523
519
|
body: await parseErrorBody(output.body, context),
|
|
@@ -526,19 +522,19 @@ const deserializeAws_restJson1StartAttachmentUploadCommandError = async (output,
|
|
|
526
522
|
switch (errorCode) {
|
|
527
523
|
case "AccessDeniedException":
|
|
528
524
|
case "com.amazonaws.connectparticipant#AccessDeniedException":
|
|
529
|
-
throw await
|
|
525
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
530
526
|
case "InternalServerException":
|
|
531
527
|
case "com.amazonaws.connectparticipant#InternalServerException":
|
|
532
|
-
throw await
|
|
528
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
533
529
|
case "ServiceQuotaExceededException":
|
|
534
530
|
case "com.amazonaws.connectparticipant#ServiceQuotaExceededException":
|
|
535
|
-
throw await
|
|
531
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
536
532
|
case "ThrottlingException":
|
|
537
533
|
case "com.amazonaws.connectparticipant#ThrottlingException":
|
|
538
|
-
throw await
|
|
534
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
539
535
|
case "ValidationException":
|
|
540
536
|
case "com.amazonaws.connectparticipant#ValidationException":
|
|
541
|
-
throw await
|
|
537
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
542
538
|
default:
|
|
543
539
|
const parsedBody = parsedOutput.body;
|
|
544
540
|
throwDefaultError({
|
|
@@ -550,7 +546,7 @@ const deserializeAws_restJson1StartAttachmentUploadCommandError = async (output,
|
|
|
550
546
|
}
|
|
551
547
|
};
|
|
552
548
|
const map = __map;
|
|
553
|
-
const
|
|
549
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
554
550
|
const contents = map({});
|
|
555
551
|
const data = parsedOutput.body;
|
|
556
552
|
if (data.Message != null) {
|
|
@@ -562,7 +558,7 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
562
558
|
});
|
|
563
559
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
564
560
|
};
|
|
565
|
-
const
|
|
561
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
566
562
|
const contents = map({});
|
|
567
563
|
const data = parsedOutput.body;
|
|
568
564
|
if (data.Message != null) {
|
|
@@ -574,7 +570,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
574
570
|
});
|
|
575
571
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
576
572
|
};
|
|
577
|
-
const
|
|
573
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
578
574
|
const contents = map({});
|
|
579
575
|
const data = parsedOutput.body;
|
|
580
576
|
if (data.Message != null) {
|
|
@@ -586,7 +582,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
586
582
|
});
|
|
587
583
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
588
584
|
};
|
|
589
|
-
const
|
|
585
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
590
586
|
const contents = map({});
|
|
591
587
|
const data = parsedOutput.body;
|
|
592
588
|
if (data.Message != null) {
|
|
@@ -598,7 +594,7 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
598
594
|
});
|
|
599
595
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
600
596
|
};
|
|
601
|
-
const
|
|
597
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
602
598
|
const contents = map({});
|
|
603
599
|
const data = parsedOutput.body;
|
|
604
600
|
if (data.Message != null) {
|
|
@@ -610,7 +606,7 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
|
|
|
610
606
|
});
|
|
611
607
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
612
608
|
};
|
|
613
|
-
const
|
|
609
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
614
610
|
const contents = map({});
|
|
615
611
|
const data = parsedOutput.body;
|
|
616
612
|
if (data.Message != null) {
|
|
@@ -622,28 +618,28 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
622
618
|
});
|
|
623
619
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
624
620
|
};
|
|
625
|
-
const
|
|
621
|
+
const se_AttachmentIdList = (input, context) => {
|
|
626
622
|
return input
|
|
627
623
|
.filter((e) => e != null)
|
|
628
624
|
.map((entry) => {
|
|
629
625
|
return entry;
|
|
630
626
|
});
|
|
631
627
|
};
|
|
632
|
-
const
|
|
628
|
+
const se_ConnectionTypeList = (input, context) => {
|
|
633
629
|
return input
|
|
634
630
|
.filter((e) => e != null)
|
|
635
631
|
.map((entry) => {
|
|
636
632
|
return entry;
|
|
637
633
|
});
|
|
638
634
|
};
|
|
639
|
-
const
|
|
635
|
+
const se_StartPosition = (input, context) => {
|
|
640
636
|
return {
|
|
641
637
|
...(input.AbsoluteTime != null && { AbsoluteTime: input.AbsoluteTime }),
|
|
642
638
|
...(input.Id != null && { Id: input.Id }),
|
|
643
639
|
...(input.MostRecent != null && { MostRecent: input.MostRecent }),
|
|
644
640
|
};
|
|
645
641
|
};
|
|
646
|
-
const
|
|
642
|
+
const de_AttachmentItem = (output, context) => {
|
|
647
643
|
return {
|
|
648
644
|
AttachmentId: __expectString(output.AttachmentId),
|
|
649
645
|
AttachmentName: __expectString(output.AttachmentName),
|
|
@@ -651,86 +647,82 @@ const deserializeAws_restJson1AttachmentItem = (output, context) => {
|
|
|
651
647
|
Status: __expectString(output.Status),
|
|
652
648
|
};
|
|
653
649
|
};
|
|
654
|
-
const
|
|
650
|
+
const de_Attachments = (output, context) => {
|
|
655
651
|
const retVal = (output || [])
|
|
656
652
|
.filter((e) => e != null)
|
|
657
653
|
.map((entry) => {
|
|
658
654
|
if (entry === null) {
|
|
659
655
|
return null;
|
|
660
656
|
}
|
|
661
|
-
return
|
|
657
|
+
return de_AttachmentItem(entry, context);
|
|
662
658
|
});
|
|
663
659
|
return retVal;
|
|
664
660
|
};
|
|
665
|
-
const
|
|
661
|
+
const de_ConnectionCredentials = (output, context) => {
|
|
666
662
|
return {
|
|
667
663
|
ConnectionToken: __expectString(output.ConnectionToken),
|
|
668
664
|
Expiry: __expectString(output.Expiry),
|
|
669
665
|
};
|
|
670
666
|
};
|
|
671
|
-
const
|
|
667
|
+
const de_Item = (output, context) => {
|
|
672
668
|
return {
|
|
673
669
|
AbsoluteTime: __expectString(output.AbsoluteTime),
|
|
674
|
-
Attachments: output.Attachments != null ?
|
|
670
|
+
Attachments: output.Attachments != null ? de_Attachments(output.Attachments, context) : undefined,
|
|
675
671
|
ContactId: __expectString(output.ContactId),
|
|
676
672
|
Content: __expectString(output.Content),
|
|
677
673
|
ContentType: __expectString(output.ContentType),
|
|
678
674
|
DisplayName: __expectString(output.DisplayName),
|
|
679
675
|
Id: __expectString(output.Id),
|
|
680
|
-
MessageMetadata: output.MessageMetadata != null
|
|
681
|
-
? deserializeAws_restJson1MessageMetadata(output.MessageMetadata, context)
|
|
682
|
-
: undefined,
|
|
676
|
+
MessageMetadata: output.MessageMetadata != null ? de_MessageMetadata(output.MessageMetadata, context) : undefined,
|
|
683
677
|
ParticipantId: __expectString(output.ParticipantId),
|
|
684
678
|
ParticipantRole: __expectString(output.ParticipantRole),
|
|
685
679
|
RelatedContactId: __expectString(output.RelatedContactId),
|
|
686
680
|
Type: __expectString(output.Type),
|
|
687
681
|
};
|
|
688
682
|
};
|
|
689
|
-
const
|
|
683
|
+
const de_MessageMetadata = (output, context) => {
|
|
690
684
|
return {
|
|
691
685
|
MessageId: __expectString(output.MessageId),
|
|
692
|
-
Receipts: output.Receipts != null ?
|
|
686
|
+
Receipts: output.Receipts != null ? de_Receipts(output.Receipts, context) : undefined,
|
|
693
687
|
};
|
|
694
688
|
};
|
|
695
|
-
const
|
|
689
|
+
const de_Receipt = (output, context) => {
|
|
696
690
|
return {
|
|
697
691
|
DeliveredTimestamp: __expectString(output.DeliveredTimestamp),
|
|
698
692
|
ReadTimestamp: __expectString(output.ReadTimestamp),
|
|
699
693
|
RecipientParticipantId: __expectString(output.RecipientParticipantId),
|
|
700
694
|
};
|
|
701
695
|
};
|
|
702
|
-
const
|
|
696
|
+
const de_Receipts = (output, context) => {
|
|
703
697
|
const retVal = (output || [])
|
|
704
698
|
.filter((e) => e != null)
|
|
705
699
|
.map((entry) => {
|
|
706
700
|
if (entry === null) {
|
|
707
701
|
return null;
|
|
708
702
|
}
|
|
709
|
-
return
|
|
703
|
+
return de_Receipt(entry, context);
|
|
710
704
|
});
|
|
711
705
|
return retVal;
|
|
712
706
|
};
|
|
713
|
-
const
|
|
707
|
+
const de_Transcript = (output, context) => {
|
|
714
708
|
const retVal = (output || [])
|
|
715
709
|
.filter((e) => e != null)
|
|
716
710
|
.map((entry) => {
|
|
717
711
|
if (entry === null) {
|
|
718
712
|
return null;
|
|
719
713
|
}
|
|
720
|
-
return
|
|
714
|
+
return de_Item(entry, context);
|
|
721
715
|
});
|
|
722
716
|
return retVal;
|
|
723
717
|
};
|
|
724
|
-
const
|
|
718
|
+
const de_UploadMetadata = (output, context) => {
|
|
725
719
|
return {
|
|
726
|
-
HeadersToInclude: output.HeadersToInclude != null
|
|
727
|
-
? deserializeAws_restJson1UploadMetadataSignedHeaders(output.HeadersToInclude, context)
|
|
728
|
-
: undefined,
|
|
720
|
+
HeadersToInclude: output.HeadersToInclude != null ? de_UploadMetadataSignedHeaders(output.HeadersToInclude, context) : undefined,
|
|
729
721
|
Url: __expectString(output.Url),
|
|
730
722
|
UrlExpiry: __expectString(output.UrlExpiry),
|
|
731
723
|
};
|
|
732
724
|
};
|
|
733
|
-
const
|
|
725
|
+
const de_UploadMetadataSignedHeaders = (output, context) => {
|
|
734
726
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
735
727
|
if (value === null) {
|
|
736
728
|
return acc;
|
|
@@ -739,7 +731,7 @@ const deserializeAws_restJson1UploadMetadataSignedHeaders = (output, context) =>
|
|
|
739
731
|
return acc;
|
|
740
732
|
}, {});
|
|
741
733
|
};
|
|
742
|
-
const
|
|
734
|
+
const de_Websocket = (output, context) => {
|
|
743
735
|
return {
|
|
744
736
|
ConnectionExpiry: __expectString(output.ConnectionExpiry),
|
|
745
737
|
Url: __expectString(output.Url),
|