@aws-sdk/client-connectcases 3.928.0 → 3.929.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 (66) hide show
  1. package/dist-cjs/index.js +1928 -2305
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/ConnectCasesClient.js +2 -0
  4. package/dist-es/commands/BatchGetCaseRuleCommand.js +3 -9
  5. package/dist-es/commands/BatchGetFieldCommand.js +3 -9
  6. package/dist-es/commands/BatchPutFieldOptionsCommand.js +3 -9
  7. package/dist-es/commands/CreateCaseCommand.js +3 -10
  8. package/dist-es/commands/CreateCaseRuleCommand.js +3 -9
  9. package/dist-es/commands/CreateDomainCommand.js +3 -9
  10. package/dist-es/commands/CreateFieldCommand.js +3 -9
  11. package/dist-es/commands/CreateLayoutCommand.js +3 -9
  12. package/dist-es/commands/CreateRelatedItemCommand.js +3 -10
  13. package/dist-es/commands/CreateTemplateCommand.js +3 -9
  14. package/dist-es/commands/DeleteCaseCommand.js +3 -9
  15. package/dist-es/commands/DeleteCaseRuleCommand.js +3 -9
  16. package/dist-es/commands/DeleteDomainCommand.js +3 -9
  17. package/dist-es/commands/DeleteFieldCommand.js +3 -9
  18. package/dist-es/commands/DeleteLayoutCommand.js +3 -9
  19. package/dist-es/commands/DeleteRelatedItemCommand.js +3 -9
  20. package/dist-es/commands/DeleteTemplateCommand.js +3 -9
  21. package/dist-es/commands/GetCaseAuditEventsCommand.js +3 -10
  22. package/dist-es/commands/GetCaseCommand.js +3 -9
  23. package/dist-es/commands/GetCaseEventConfigurationCommand.js +3 -9
  24. package/dist-es/commands/GetDomainCommand.js +3 -9
  25. package/dist-es/commands/GetLayoutCommand.js +3 -9
  26. package/dist-es/commands/GetTemplateCommand.js +3 -9
  27. package/dist-es/commands/ListCaseRulesCommand.js +3 -9
  28. package/dist-es/commands/ListCasesForContactCommand.js +3 -9
  29. package/dist-es/commands/ListDomainsCommand.js +3 -9
  30. package/dist-es/commands/ListFieldOptionsCommand.js +3 -9
  31. package/dist-es/commands/ListFieldsCommand.js +3 -9
  32. package/dist-es/commands/ListLayoutsCommand.js +3 -9
  33. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  34. package/dist-es/commands/ListTemplatesCommand.js +3 -9
  35. package/dist-es/commands/PutCaseEventConfigurationCommand.js +3 -9
  36. package/dist-es/commands/SearchAllRelatedItemsCommand.js +3 -10
  37. package/dist-es/commands/SearchCasesCommand.js +3 -9
  38. package/dist-es/commands/SearchRelatedItemsCommand.js +3 -10
  39. package/dist-es/commands/TagResourceCommand.js +3 -9
  40. package/dist-es/commands/UntagResourceCommand.js +3 -9
  41. package/dist-es/commands/UpdateCaseCommand.js +3 -10
  42. package/dist-es/commands/UpdateCaseRuleCommand.js +3 -9
  43. package/dist-es/commands/UpdateFieldCommand.js +3 -9
  44. package/dist-es/commands/UpdateLayoutCommand.js +3 -9
  45. package/dist-es/commands/UpdateTemplateCommand.js +3 -9
  46. package/dist-es/models/models_0.js +0 -139
  47. package/dist-es/runtimeConfig.shared.js +2 -0
  48. package/dist-es/schemas/schemas_0.js +1832 -0
  49. package/dist-types/ConnectCasesClient.d.ts +10 -1
  50. package/dist-types/models/models_0.d.ts +0 -84
  51. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  52. package/dist-types/runtimeConfig.d.ts +1 -0
  53. package/dist-types/runtimeConfig.native.d.ts +1 -0
  54. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  55. package/dist-types/schemas/schemas_0.d.ts +250 -0
  56. package/dist-types/ts3.4/ConnectCasesClient.d.ts +4 -0
  57. package/dist-types/ts3.4/models/models_0.d.ts +0 -55
  58. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  59. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  60. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  61. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  62. package/dist-types/ts3.4/schemas/schemas_0.d.ts +257 -0
  63. package/package.json +2 -3
  64. package/dist-es/protocols/Aws_restJson1.js +0 -1837
  65. package/dist-types/protocols/Aws_restJson1.d.ts +0 -380
  66. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -509
@@ -1,1837 +0,0 @@
1
- import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, strictParseInt32 as __strictParseInt32, take, withBaseException, } from "@smithy/smithy-client";
4
- import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
- import { ConnectCasesServiceException as __BaseException } from "../models/ConnectCasesServiceException";
6
- import { AccessDeniedException, BooleanCondition, CaseFilter, CaseRuleDetails, ConflictException, CustomFieldsFilter, FieldFilter, FieldValueUnion, InternalServerException, OperandTwo, RelatedItemInputContent, RelatedItemTypeFilter, ResourceNotFoundException, ServiceQuotaExceededException, SlaInputContent, ThrottlingException, ValidationException, } from "../models/models_0";
7
- export const se_BatchGetCaseRuleCommand = async (input, context) => {
8
- const b = rb(input, context);
9
- const headers = {
10
- "content-type": "application/json",
11
- };
12
- b.bp("/domains/{domainId}/rules-batch");
13
- b.p("domainId", () => input.domainId, "{domainId}", false);
14
- let body;
15
- body = JSON.stringify(take(input, {
16
- caseRules: (_) => _json(_),
17
- }));
18
- b.m("POST").h(headers).b(body);
19
- return b.build();
20
- };
21
- export const se_BatchGetFieldCommand = async (input, context) => {
22
- const b = rb(input, context);
23
- const headers = {
24
- "content-type": "application/json",
25
- };
26
- b.bp("/domains/{domainId}/fields-batch");
27
- b.p("domainId", () => input.domainId, "{domainId}", false);
28
- let body;
29
- body = JSON.stringify(take(input, {
30
- fields: (_) => _json(_),
31
- }));
32
- b.m("POST").h(headers).b(body);
33
- return b.build();
34
- };
35
- export const se_BatchPutFieldOptionsCommand = async (input, context) => {
36
- const b = rb(input, context);
37
- const headers = {
38
- "content-type": "application/json",
39
- };
40
- b.bp("/domains/{domainId}/fields/{fieldId}/options");
41
- b.p("domainId", () => input.domainId, "{domainId}", false);
42
- b.p("fieldId", () => input.fieldId, "{fieldId}", false);
43
- let body;
44
- body = JSON.stringify(take(input, {
45
- options: (_) => _json(_),
46
- }));
47
- b.m("PUT").h(headers).b(body);
48
- return b.build();
49
- };
50
- export const se_CreateCaseCommand = async (input, context) => {
51
- const b = rb(input, context);
52
- const headers = {
53
- "content-type": "application/json",
54
- };
55
- b.bp("/domains/{domainId}/cases");
56
- b.p("domainId", () => input.domainId, "{domainId}", false);
57
- let body;
58
- body = JSON.stringify(take(input, {
59
- clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
60
- fields: (_) => se_FieldValueList(_, context),
61
- performedBy: (_) => _json(_),
62
- templateId: [],
63
- }));
64
- b.m("POST").h(headers).b(body);
65
- return b.build();
66
- };
67
- export const se_CreateCaseRuleCommand = async (input, context) => {
68
- const b = rb(input, context);
69
- const headers = {
70
- "content-type": "application/json",
71
- };
72
- b.bp("/domains/{domainId}/case-rules");
73
- b.p("domainId", () => input.domainId, "{domainId}", false);
74
- let body;
75
- body = JSON.stringify(take(input, {
76
- description: [],
77
- name: [],
78
- rule: (_) => se_CaseRuleDetails(_, context),
79
- }));
80
- b.m("POST").h(headers).b(body);
81
- return b.build();
82
- };
83
- export const se_CreateDomainCommand = async (input, context) => {
84
- const b = rb(input, context);
85
- const headers = {
86
- "content-type": "application/json",
87
- };
88
- b.bp("/domains");
89
- let body;
90
- body = JSON.stringify(take(input, {
91
- name: [],
92
- }));
93
- b.m("POST").h(headers).b(body);
94
- return b.build();
95
- };
96
- export const se_CreateFieldCommand = async (input, context) => {
97
- const b = rb(input, context);
98
- const headers = {
99
- "content-type": "application/json",
100
- };
101
- b.bp("/domains/{domainId}/fields");
102
- b.p("domainId", () => input.domainId, "{domainId}", false);
103
- let body;
104
- body = JSON.stringify(take(input, {
105
- description: [],
106
- name: [],
107
- type: [],
108
- }));
109
- b.m("POST").h(headers).b(body);
110
- return b.build();
111
- };
112
- export const se_CreateLayoutCommand = async (input, context) => {
113
- const b = rb(input, context);
114
- const headers = {
115
- "content-type": "application/json",
116
- };
117
- b.bp("/domains/{domainId}/layouts");
118
- b.p("domainId", () => input.domainId, "{domainId}", false);
119
- let body;
120
- body = JSON.stringify(take(input, {
121
- content: (_) => _json(_),
122
- name: [],
123
- }));
124
- b.m("POST").h(headers).b(body);
125
- return b.build();
126
- };
127
- export const se_CreateRelatedItemCommand = async (input, context) => {
128
- const b = rb(input, context);
129
- const headers = {
130
- "content-type": "application/json",
131
- };
132
- b.bp("/domains/{domainId}/cases/{caseId}/related-items");
133
- b.p("domainId", () => input.domainId, "{domainId}", false);
134
- b.p("caseId", () => input.caseId, "{caseId}", false);
135
- let body;
136
- body = JSON.stringify(take(input, {
137
- content: (_) => se_RelatedItemInputContent(_, context),
138
- performedBy: (_) => _json(_),
139
- type: [],
140
- }));
141
- b.m("POST").h(headers).b(body);
142
- return b.build();
143
- };
144
- export const se_CreateTemplateCommand = async (input, context) => {
145
- const b = rb(input, context);
146
- const headers = {
147
- "content-type": "application/json",
148
- };
149
- b.bp("/domains/{domainId}/templates");
150
- b.p("domainId", () => input.domainId, "{domainId}", false);
151
- let body;
152
- body = JSON.stringify(take(input, {
153
- description: [],
154
- layoutConfiguration: (_) => _json(_),
155
- name: [],
156
- requiredFields: (_) => _json(_),
157
- rules: (_) => _json(_),
158
- status: [],
159
- }));
160
- b.m("POST").h(headers).b(body);
161
- return b.build();
162
- };
163
- export const se_DeleteCaseCommand = async (input, context) => {
164
- const b = rb(input, context);
165
- const headers = {};
166
- b.bp("/domains/{domainId}/cases/{caseId}");
167
- b.p("domainId", () => input.domainId, "{domainId}", false);
168
- b.p("caseId", () => input.caseId, "{caseId}", false);
169
- let body;
170
- b.m("DELETE").h(headers).b(body);
171
- return b.build();
172
- };
173
- export const se_DeleteCaseRuleCommand = async (input, context) => {
174
- const b = rb(input, context);
175
- const headers = {};
176
- b.bp("/domains/{domainId}/case-rules/{caseRuleId}");
177
- b.p("domainId", () => input.domainId, "{domainId}", false);
178
- b.p("caseRuleId", () => input.caseRuleId, "{caseRuleId}", false);
179
- let body;
180
- b.m("DELETE").h(headers).b(body);
181
- return b.build();
182
- };
183
- export const se_DeleteDomainCommand = async (input, context) => {
184
- const b = rb(input, context);
185
- const headers = {};
186
- b.bp("/domains/{domainId}");
187
- b.p("domainId", () => input.domainId, "{domainId}", false);
188
- let body;
189
- b.m("DELETE").h(headers).b(body);
190
- return b.build();
191
- };
192
- export const se_DeleteFieldCommand = async (input, context) => {
193
- const b = rb(input, context);
194
- const headers = {};
195
- b.bp("/domains/{domainId}/fields/{fieldId}");
196
- b.p("domainId", () => input.domainId, "{domainId}", false);
197
- b.p("fieldId", () => input.fieldId, "{fieldId}", false);
198
- let body;
199
- b.m("DELETE").h(headers).b(body);
200
- return b.build();
201
- };
202
- export const se_DeleteLayoutCommand = async (input, context) => {
203
- const b = rb(input, context);
204
- const headers = {};
205
- b.bp("/domains/{domainId}/layouts/{layoutId}");
206
- b.p("domainId", () => input.domainId, "{domainId}", false);
207
- b.p("layoutId", () => input.layoutId, "{layoutId}", false);
208
- let body;
209
- b.m("DELETE").h(headers).b(body);
210
- return b.build();
211
- };
212
- export const se_DeleteRelatedItemCommand = async (input, context) => {
213
- const b = rb(input, context);
214
- const headers = {};
215
- b.bp("/domains/{domainId}/cases/{caseId}/related-items/{relatedItemId}");
216
- b.p("domainId", () => input.domainId, "{domainId}", false);
217
- b.p("caseId", () => input.caseId, "{caseId}", false);
218
- b.p("relatedItemId", () => input.relatedItemId, "{relatedItemId}", false);
219
- let body;
220
- b.m("DELETE").h(headers).b(body);
221
- return b.build();
222
- };
223
- export const se_DeleteTemplateCommand = async (input, context) => {
224
- const b = rb(input, context);
225
- const headers = {};
226
- b.bp("/domains/{domainId}/templates/{templateId}");
227
- b.p("domainId", () => input.domainId, "{domainId}", false);
228
- b.p("templateId", () => input.templateId, "{templateId}", false);
229
- let body;
230
- b.m("DELETE").h(headers).b(body);
231
- return b.build();
232
- };
233
- export const se_GetCaseCommand = async (input, context) => {
234
- const b = rb(input, context);
235
- const headers = {
236
- "content-type": "application/json",
237
- };
238
- b.bp("/domains/{domainId}/cases/{caseId}");
239
- b.p("caseId", () => input.caseId, "{caseId}", false);
240
- b.p("domainId", () => input.domainId, "{domainId}", false);
241
- let body;
242
- body = JSON.stringify(take(input, {
243
- fields: (_) => _json(_),
244
- nextToken: [],
245
- }));
246
- b.m("POST").h(headers).b(body);
247
- return b.build();
248
- };
249
- export const se_GetCaseAuditEventsCommand = async (input, context) => {
250
- const b = rb(input, context);
251
- const headers = {
252
- "content-type": "application/json",
253
- };
254
- b.bp("/domains/{domainId}/cases/{caseId}/audit-history");
255
- b.p("caseId", () => input.caseId, "{caseId}", false);
256
- b.p("domainId", () => input.domainId, "{domainId}", false);
257
- let body;
258
- body = JSON.stringify(take(input, {
259
- maxResults: [],
260
- nextToken: [],
261
- }));
262
- b.m("POST").h(headers).b(body);
263
- return b.build();
264
- };
265
- export const se_GetCaseEventConfigurationCommand = async (input, context) => {
266
- const b = rb(input, context);
267
- const headers = {};
268
- b.bp("/domains/{domainId}/case-event-configuration");
269
- b.p("domainId", () => input.domainId, "{domainId}", false);
270
- let body;
271
- b.m("POST").h(headers).b(body);
272
- return b.build();
273
- };
274
- export const se_GetDomainCommand = async (input, context) => {
275
- const b = rb(input, context);
276
- const headers = {};
277
- b.bp("/domains/{domainId}");
278
- b.p("domainId", () => input.domainId, "{domainId}", false);
279
- let body;
280
- b.m("POST").h(headers).b(body);
281
- return b.build();
282
- };
283
- export const se_GetLayoutCommand = async (input, context) => {
284
- const b = rb(input, context);
285
- const headers = {};
286
- b.bp("/domains/{domainId}/layouts/{layoutId}");
287
- b.p("domainId", () => input.domainId, "{domainId}", false);
288
- b.p("layoutId", () => input.layoutId, "{layoutId}", false);
289
- let body;
290
- b.m("POST").h(headers).b(body);
291
- return b.build();
292
- };
293
- export const se_GetTemplateCommand = async (input, context) => {
294
- const b = rb(input, context);
295
- const headers = {};
296
- b.bp("/domains/{domainId}/templates/{templateId}");
297
- b.p("domainId", () => input.domainId, "{domainId}", false);
298
- b.p("templateId", () => input.templateId, "{templateId}", false);
299
- let body;
300
- b.m("POST").h(headers).b(body);
301
- return b.build();
302
- };
303
- export const se_ListCaseRulesCommand = async (input, context) => {
304
- const b = rb(input, context);
305
- const headers = {};
306
- b.bp("/domains/{domainId}/rules-list");
307
- b.p("domainId", () => input.domainId, "{domainId}", false);
308
- const query = map({
309
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
310
- [_nT]: [, input[_nT]],
311
- });
312
- let body;
313
- b.m("POST").h(headers).q(query).b(body);
314
- return b.build();
315
- };
316
- export const se_ListCasesForContactCommand = async (input, context) => {
317
- const b = rb(input, context);
318
- const headers = {
319
- "content-type": "application/json",
320
- };
321
- b.bp("/domains/{domainId}/list-cases-for-contact");
322
- b.p("domainId", () => input.domainId, "{domainId}", false);
323
- let body;
324
- body = JSON.stringify(take(input, {
325
- contactArn: [],
326
- maxResults: [],
327
- nextToken: [],
328
- }));
329
- b.m("POST").h(headers).b(body);
330
- return b.build();
331
- };
332
- export const se_ListDomainsCommand = async (input, context) => {
333
- const b = rb(input, context);
334
- const headers = {};
335
- b.bp("/domains-list");
336
- const query = map({
337
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
338
- [_nT]: [, input[_nT]],
339
- });
340
- let body;
341
- b.m("POST").h(headers).q(query).b(body);
342
- return b.build();
343
- };
344
- export const se_ListFieldOptionsCommand = async (input, context) => {
345
- const b = rb(input, context);
346
- const headers = {};
347
- b.bp("/domains/{domainId}/fields/{fieldId}/options-list");
348
- b.p("domainId", () => input.domainId, "{domainId}", false);
349
- b.p("fieldId", () => input.fieldId, "{fieldId}", false);
350
- const query = map({
351
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
352
- [_nT]: [, input[_nT]],
353
- [_v]: [() => input.values !== void 0, () => input[_v] || []],
354
- });
355
- let body;
356
- b.m("POST").h(headers).q(query).b(body);
357
- return b.build();
358
- };
359
- export const se_ListFieldsCommand = async (input, context) => {
360
- const b = rb(input, context);
361
- const headers = {};
362
- b.bp("/domains/{domainId}/fields-list");
363
- b.p("domainId", () => input.domainId, "{domainId}", false);
364
- const query = map({
365
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
366
- [_nT]: [, input[_nT]],
367
- });
368
- let body;
369
- b.m("POST").h(headers).q(query).b(body);
370
- return b.build();
371
- };
372
- export const se_ListLayoutsCommand = async (input, context) => {
373
- const b = rb(input, context);
374
- const headers = {};
375
- b.bp("/domains/{domainId}/layouts-list");
376
- b.p("domainId", () => input.domainId, "{domainId}", false);
377
- const query = map({
378
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
379
- [_nT]: [, input[_nT]],
380
- });
381
- let body;
382
- b.m("POST").h(headers).q(query).b(body);
383
- return b.build();
384
- };
385
- export const se_ListTagsForResourceCommand = async (input, context) => {
386
- const b = rb(input, context);
387
- const headers = {};
388
- b.bp("/tags/{arn}");
389
- b.p("arn", () => input.arn, "{arn}", false);
390
- let body;
391
- b.m("GET").h(headers).b(body);
392
- return b.build();
393
- };
394
- export const se_ListTemplatesCommand = async (input, context) => {
395
- const b = rb(input, context);
396
- const headers = {};
397
- b.bp("/domains/{domainId}/templates-list");
398
- b.p("domainId", () => input.domainId, "{domainId}", false);
399
- const query = map({
400
- [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
401
- [_nT]: [, input[_nT]],
402
- [_s]: [() => input.status !== void 0, () => input[_s] || []],
403
- });
404
- let body;
405
- b.m("POST").h(headers).q(query).b(body);
406
- return b.build();
407
- };
408
- export const se_PutCaseEventConfigurationCommand = async (input, context) => {
409
- const b = rb(input, context);
410
- const headers = {
411
- "content-type": "application/json",
412
- };
413
- b.bp("/domains/{domainId}/case-event-configuration");
414
- b.p("domainId", () => input.domainId, "{domainId}", false);
415
- let body;
416
- body = JSON.stringify(take(input, {
417
- eventBridge: (_) => _json(_),
418
- }));
419
- b.m("PUT").h(headers).b(body);
420
- return b.build();
421
- };
422
- export const se_SearchAllRelatedItemsCommand = async (input, context) => {
423
- const b = rb(input, context);
424
- const headers = {
425
- "content-type": "application/json",
426
- };
427
- b.bp("/domains/{domainId}/related-items-search");
428
- b.p("domainId", () => input.domainId, "{domainId}", false);
429
- let body;
430
- body = JSON.stringify(take(input, {
431
- filters: (_) => se_RelatedItemFilterList(_, context),
432
- maxResults: [],
433
- nextToken: [],
434
- sorts: (_) => _json(_),
435
- }));
436
- b.m("POST").h(headers).b(body);
437
- return b.build();
438
- };
439
- export const se_SearchCasesCommand = async (input, context) => {
440
- const b = rb(input, context);
441
- const headers = {
442
- "content-type": "application/json",
443
- };
444
- b.bp("/domains/{domainId}/cases-search");
445
- b.p("domainId", () => input.domainId, "{domainId}", false);
446
- let body;
447
- body = JSON.stringify(take(input, {
448
- fields: (_) => _json(_),
449
- filter: (_) => se_CaseFilter(_, context),
450
- maxResults: [],
451
- nextToken: [],
452
- searchTerm: [],
453
- sorts: (_) => _json(_),
454
- }));
455
- b.m("POST").h(headers).b(body);
456
- return b.build();
457
- };
458
- export const se_SearchRelatedItemsCommand = async (input, context) => {
459
- const b = rb(input, context);
460
- const headers = {
461
- "content-type": "application/json",
462
- };
463
- b.bp("/domains/{domainId}/cases/{caseId}/related-items-search");
464
- b.p("domainId", () => input.domainId, "{domainId}", false);
465
- b.p("caseId", () => input.caseId, "{caseId}", false);
466
- let body;
467
- body = JSON.stringify(take(input, {
468
- filters: (_) => se_RelatedItemFilterList(_, context),
469
- maxResults: [],
470
- nextToken: [],
471
- }));
472
- b.m("POST").h(headers).b(body);
473
- return b.build();
474
- };
475
- export const se_TagResourceCommand = async (input, context) => {
476
- const b = rb(input, context);
477
- const headers = {
478
- "content-type": "application/json",
479
- };
480
- b.bp("/tags/{arn}");
481
- b.p("arn", () => input.arn, "{arn}", false);
482
- let body;
483
- body = JSON.stringify(take(input, {
484
- tags: (_) => se_Tags(_, context),
485
- }));
486
- b.m("POST").h(headers).b(body);
487
- return b.build();
488
- };
489
- export const se_UntagResourceCommand = async (input, context) => {
490
- const b = rb(input, context);
491
- const headers = {};
492
- b.bp("/tags/{arn}");
493
- b.p("arn", () => input.arn, "{arn}", false);
494
- const query = map({
495
- [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
496
- });
497
- let body;
498
- b.m("DELETE").h(headers).q(query).b(body);
499
- return b.build();
500
- };
501
- export const se_UpdateCaseCommand = async (input, context) => {
502
- const b = rb(input, context);
503
- const headers = {
504
- "content-type": "application/json",
505
- };
506
- b.bp("/domains/{domainId}/cases/{caseId}");
507
- b.p("domainId", () => input.domainId, "{domainId}", false);
508
- b.p("caseId", () => input.caseId, "{caseId}", false);
509
- let body;
510
- body = JSON.stringify(take(input, {
511
- fields: (_) => se_FieldValueList(_, context),
512
- performedBy: (_) => _json(_),
513
- }));
514
- b.m("PUT").h(headers).b(body);
515
- return b.build();
516
- };
517
- export const se_UpdateCaseRuleCommand = async (input, context) => {
518
- const b = rb(input, context);
519
- const headers = {
520
- "content-type": "application/json",
521
- };
522
- b.bp("/domains/{domainId}/case-rules/{caseRuleId}");
523
- b.p("domainId", () => input.domainId, "{domainId}", false);
524
- b.p("caseRuleId", () => input.caseRuleId, "{caseRuleId}", false);
525
- let body;
526
- body = JSON.stringify(take(input, {
527
- description: [],
528
- name: [],
529
- rule: (_) => se_CaseRuleDetails(_, context),
530
- }));
531
- b.m("PUT").h(headers).b(body);
532
- return b.build();
533
- };
534
- export const se_UpdateFieldCommand = async (input, context) => {
535
- const b = rb(input, context);
536
- const headers = {
537
- "content-type": "application/json",
538
- };
539
- b.bp("/domains/{domainId}/fields/{fieldId}");
540
- b.p("domainId", () => input.domainId, "{domainId}", false);
541
- b.p("fieldId", () => input.fieldId, "{fieldId}", false);
542
- let body;
543
- body = JSON.stringify(take(input, {
544
- description: [],
545
- name: [],
546
- }));
547
- b.m("PUT").h(headers).b(body);
548
- return b.build();
549
- };
550
- export const se_UpdateLayoutCommand = async (input, context) => {
551
- const b = rb(input, context);
552
- const headers = {
553
- "content-type": "application/json",
554
- };
555
- b.bp("/domains/{domainId}/layouts/{layoutId}");
556
- b.p("domainId", () => input.domainId, "{domainId}", false);
557
- b.p("layoutId", () => input.layoutId, "{layoutId}", false);
558
- let body;
559
- body = JSON.stringify(take(input, {
560
- content: (_) => _json(_),
561
- name: [],
562
- }));
563
- b.m("PUT").h(headers).b(body);
564
- return b.build();
565
- };
566
- export const se_UpdateTemplateCommand = async (input, context) => {
567
- const b = rb(input, context);
568
- const headers = {
569
- "content-type": "application/json",
570
- };
571
- b.bp("/domains/{domainId}/templates/{templateId}");
572
- b.p("domainId", () => input.domainId, "{domainId}", false);
573
- b.p("templateId", () => input.templateId, "{templateId}", false);
574
- let body;
575
- body = JSON.stringify(take(input, {
576
- description: [],
577
- layoutConfiguration: (_) => _json(_),
578
- name: [],
579
- requiredFields: (_) => _json(_),
580
- rules: (_) => _json(_),
581
- status: [],
582
- }));
583
- b.m("PUT").h(headers).b(body);
584
- return b.build();
585
- };
586
- export const de_BatchGetCaseRuleCommand = async (output, context) => {
587
- if (output.statusCode !== 200 && output.statusCode >= 300) {
588
- return de_CommandError(output, context);
589
- }
590
- const contents = map({
591
- $metadata: deserializeMetadata(output),
592
- });
593
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
594
- const doc = take(data, {
595
- caseRules: (_) => de_BatchGetCaseRuleList(_, context),
596
- errors: _json,
597
- unprocessedCaseRules: _json,
598
- });
599
- Object.assign(contents, doc);
600
- return contents;
601
- };
602
- export const de_BatchGetFieldCommand = async (output, context) => {
603
- if (output.statusCode !== 200 && output.statusCode >= 300) {
604
- return de_CommandError(output, context);
605
- }
606
- const contents = map({
607
- $metadata: deserializeMetadata(output),
608
- });
609
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
610
- const doc = take(data, {
611
- errors: _json,
612
- fields: (_) => de_BatchGetFieldList(_, context),
613
- });
614
- Object.assign(contents, doc);
615
- return contents;
616
- };
617
- export const de_BatchPutFieldOptionsCommand = async (output, context) => {
618
- if (output.statusCode !== 200 && output.statusCode >= 300) {
619
- return de_CommandError(output, context);
620
- }
621
- const contents = map({
622
- $metadata: deserializeMetadata(output),
623
- });
624
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
625
- const doc = take(data, {
626
- errors: _json,
627
- });
628
- Object.assign(contents, doc);
629
- return contents;
630
- };
631
- export const de_CreateCaseCommand = async (output, context) => {
632
- if (output.statusCode !== 200 && output.statusCode >= 300) {
633
- return de_CommandError(output, context);
634
- }
635
- const contents = map({
636
- $metadata: deserializeMetadata(output),
637
- });
638
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
639
- const doc = take(data, {
640
- caseArn: __expectString,
641
- caseId: __expectString,
642
- });
643
- Object.assign(contents, doc);
644
- return contents;
645
- };
646
- export const de_CreateCaseRuleCommand = async (output, context) => {
647
- if (output.statusCode !== 200 && output.statusCode >= 300) {
648
- return de_CommandError(output, context);
649
- }
650
- const contents = map({
651
- $metadata: deserializeMetadata(output),
652
- });
653
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
654
- const doc = take(data, {
655
- caseRuleArn: __expectString,
656
- caseRuleId: __expectString,
657
- });
658
- Object.assign(contents, doc);
659
- return contents;
660
- };
661
- export const de_CreateDomainCommand = async (output, context) => {
662
- if (output.statusCode !== 200 && output.statusCode >= 300) {
663
- return de_CommandError(output, context);
664
- }
665
- const contents = map({
666
- $metadata: deserializeMetadata(output),
667
- });
668
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
669
- const doc = take(data, {
670
- domainArn: __expectString,
671
- domainId: __expectString,
672
- domainStatus: __expectString,
673
- });
674
- Object.assign(contents, doc);
675
- return contents;
676
- };
677
- export const de_CreateFieldCommand = async (output, context) => {
678
- if (output.statusCode !== 200 && output.statusCode >= 300) {
679
- return de_CommandError(output, context);
680
- }
681
- const contents = map({
682
- $metadata: deserializeMetadata(output),
683
- });
684
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
685
- const doc = take(data, {
686
- fieldArn: __expectString,
687
- fieldId: __expectString,
688
- });
689
- Object.assign(contents, doc);
690
- return contents;
691
- };
692
- export const de_CreateLayoutCommand = async (output, context) => {
693
- if (output.statusCode !== 200 && output.statusCode >= 300) {
694
- return de_CommandError(output, context);
695
- }
696
- const contents = map({
697
- $metadata: deserializeMetadata(output),
698
- });
699
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
700
- const doc = take(data, {
701
- layoutArn: __expectString,
702
- layoutId: __expectString,
703
- });
704
- Object.assign(contents, doc);
705
- return contents;
706
- };
707
- export const de_CreateRelatedItemCommand = async (output, context) => {
708
- if (output.statusCode !== 200 && output.statusCode >= 300) {
709
- return de_CommandError(output, context);
710
- }
711
- const contents = map({
712
- $metadata: deserializeMetadata(output),
713
- });
714
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
715
- const doc = take(data, {
716
- relatedItemArn: __expectString,
717
- relatedItemId: __expectString,
718
- });
719
- Object.assign(contents, doc);
720
- return contents;
721
- };
722
- export const de_CreateTemplateCommand = async (output, context) => {
723
- if (output.statusCode !== 200 && output.statusCode >= 300) {
724
- return de_CommandError(output, context);
725
- }
726
- const contents = map({
727
- $metadata: deserializeMetadata(output),
728
- });
729
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
730
- const doc = take(data, {
731
- templateArn: __expectString,
732
- templateId: __expectString,
733
- });
734
- Object.assign(contents, doc);
735
- return contents;
736
- };
737
- export const de_DeleteCaseCommand = async (output, context) => {
738
- if (output.statusCode !== 200 && output.statusCode >= 300) {
739
- return de_CommandError(output, context);
740
- }
741
- const contents = map({
742
- $metadata: deserializeMetadata(output),
743
- });
744
- await collectBody(output.body, context);
745
- return contents;
746
- };
747
- export const de_DeleteCaseRuleCommand = async (output, context) => {
748
- if (output.statusCode !== 200 && output.statusCode >= 300) {
749
- return de_CommandError(output, context);
750
- }
751
- const contents = map({
752
- $metadata: deserializeMetadata(output),
753
- });
754
- await collectBody(output.body, context);
755
- return contents;
756
- };
757
- export const de_DeleteDomainCommand = async (output, context) => {
758
- if (output.statusCode !== 200 && output.statusCode >= 300) {
759
- return de_CommandError(output, context);
760
- }
761
- const contents = map({
762
- $metadata: deserializeMetadata(output),
763
- });
764
- await collectBody(output.body, context);
765
- return contents;
766
- };
767
- export const de_DeleteFieldCommand = async (output, context) => {
768
- if (output.statusCode !== 200 && output.statusCode >= 300) {
769
- return de_CommandError(output, context);
770
- }
771
- const contents = map({
772
- $metadata: deserializeMetadata(output),
773
- });
774
- await collectBody(output.body, context);
775
- return contents;
776
- };
777
- export const de_DeleteLayoutCommand = async (output, context) => {
778
- if (output.statusCode !== 200 && output.statusCode >= 300) {
779
- return de_CommandError(output, context);
780
- }
781
- const contents = map({
782
- $metadata: deserializeMetadata(output),
783
- });
784
- await collectBody(output.body, context);
785
- return contents;
786
- };
787
- export const de_DeleteRelatedItemCommand = async (output, context) => {
788
- if (output.statusCode !== 200 && output.statusCode >= 300) {
789
- return de_CommandError(output, context);
790
- }
791
- const contents = map({
792
- $metadata: deserializeMetadata(output),
793
- });
794
- await collectBody(output.body, context);
795
- return contents;
796
- };
797
- export const de_DeleteTemplateCommand = async (output, context) => {
798
- if (output.statusCode !== 200 && output.statusCode >= 300) {
799
- return de_CommandError(output, context);
800
- }
801
- const contents = map({
802
- $metadata: deserializeMetadata(output),
803
- });
804
- await collectBody(output.body, context);
805
- return contents;
806
- };
807
- export const de_GetCaseCommand = async (output, context) => {
808
- if (output.statusCode !== 200 && output.statusCode >= 300) {
809
- return de_CommandError(output, context);
810
- }
811
- const contents = map({
812
- $metadata: deserializeMetadata(output),
813
- });
814
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
815
- const doc = take(data, {
816
- fields: (_) => de_FieldValueList(_, context),
817
- nextToken: __expectString,
818
- tags: (_) => de_Tags(_, context),
819
- templateId: __expectString,
820
- });
821
- Object.assign(contents, doc);
822
- return contents;
823
- };
824
- export const de_GetCaseAuditEventsCommand = async (output, context) => {
825
- if (output.statusCode !== 200 && output.statusCode >= 300) {
826
- return de_CommandError(output, context);
827
- }
828
- const contents = map({
829
- $metadata: deserializeMetadata(output),
830
- });
831
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
832
- const doc = take(data, {
833
- auditEvents: (_) => de_AuditEventsList(_, context),
834
- nextToken: __expectString,
835
- });
836
- Object.assign(contents, doc);
837
- return contents;
838
- };
839
- export const de_GetCaseEventConfigurationCommand = async (output, context) => {
840
- if (output.statusCode !== 200 && output.statusCode >= 300) {
841
- return de_CommandError(output, context);
842
- }
843
- const contents = map({
844
- $metadata: deserializeMetadata(output),
845
- });
846
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
847
- const doc = take(data, {
848
- eventBridge: _json,
849
- });
850
- Object.assign(contents, doc);
851
- return contents;
852
- };
853
- export const de_GetDomainCommand = async (output, context) => {
854
- if (output.statusCode !== 200 && output.statusCode >= 300) {
855
- return de_CommandError(output, context);
856
- }
857
- const contents = map({
858
- $metadata: deserializeMetadata(output),
859
- });
860
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
861
- const doc = take(data, {
862
- createdTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
863
- domainArn: __expectString,
864
- domainId: __expectString,
865
- domainStatus: __expectString,
866
- name: __expectString,
867
- tags: (_) => de_Tags(_, context),
868
- });
869
- Object.assign(contents, doc);
870
- return contents;
871
- };
872
- export const de_GetLayoutCommand = async (output, context) => {
873
- if (output.statusCode !== 200 && output.statusCode >= 300) {
874
- return de_CommandError(output, context);
875
- }
876
- const contents = map({
877
- $metadata: deserializeMetadata(output),
878
- });
879
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
880
- const doc = take(data, {
881
- content: (_) => _json(__expectUnion(_)),
882
- createdTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
883
- deleted: __expectBoolean,
884
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
885
- layoutArn: __expectString,
886
- layoutId: __expectString,
887
- name: __expectString,
888
- tags: (_) => de_Tags(_, context),
889
- });
890
- Object.assign(contents, doc);
891
- return contents;
892
- };
893
- export const de_GetTemplateCommand = async (output, context) => {
894
- if (output.statusCode !== 200 && output.statusCode >= 300) {
895
- return de_CommandError(output, context);
896
- }
897
- const contents = map({
898
- $metadata: deserializeMetadata(output),
899
- });
900
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
901
- const doc = take(data, {
902
- createdTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
903
- deleted: __expectBoolean,
904
- description: __expectString,
905
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
906
- layoutConfiguration: _json,
907
- name: __expectString,
908
- requiredFields: _json,
909
- rules: _json,
910
- status: __expectString,
911
- tags: (_) => de_Tags(_, context),
912
- templateArn: __expectString,
913
- templateId: __expectString,
914
- });
915
- Object.assign(contents, doc);
916
- return contents;
917
- };
918
- export const de_ListCaseRulesCommand = async (output, context) => {
919
- if (output.statusCode !== 200 && output.statusCode >= 300) {
920
- return de_CommandError(output, context);
921
- }
922
- const contents = map({
923
- $metadata: deserializeMetadata(output),
924
- });
925
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
926
- const doc = take(data, {
927
- caseRules: _json,
928
- nextToken: __expectString,
929
- });
930
- Object.assign(contents, doc);
931
- return contents;
932
- };
933
- export const de_ListCasesForContactCommand = async (output, context) => {
934
- if (output.statusCode !== 200 && output.statusCode >= 300) {
935
- return de_CommandError(output, context);
936
- }
937
- const contents = map({
938
- $metadata: deserializeMetadata(output),
939
- });
940
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
941
- const doc = take(data, {
942
- cases: _json,
943
- nextToken: __expectString,
944
- });
945
- Object.assign(contents, doc);
946
- return contents;
947
- };
948
- export const de_ListDomainsCommand = async (output, context) => {
949
- if (output.statusCode !== 200 && output.statusCode >= 300) {
950
- return de_CommandError(output, context);
951
- }
952
- const contents = map({
953
- $metadata: deserializeMetadata(output),
954
- });
955
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
956
- const doc = take(data, {
957
- domains: _json,
958
- nextToken: __expectString,
959
- });
960
- Object.assign(contents, doc);
961
- return contents;
962
- };
963
- export const de_ListFieldOptionsCommand = async (output, context) => {
964
- if (output.statusCode !== 200 && output.statusCode >= 300) {
965
- return de_CommandError(output, context);
966
- }
967
- const contents = map({
968
- $metadata: deserializeMetadata(output),
969
- });
970
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
971
- const doc = take(data, {
972
- nextToken: __expectString,
973
- options: _json,
974
- });
975
- Object.assign(contents, doc);
976
- return contents;
977
- };
978
- export const de_ListFieldsCommand = async (output, context) => {
979
- if (output.statusCode !== 200 && output.statusCode >= 300) {
980
- return de_CommandError(output, context);
981
- }
982
- const contents = map({
983
- $metadata: deserializeMetadata(output),
984
- });
985
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
986
- const doc = take(data, {
987
- fields: _json,
988
- nextToken: __expectString,
989
- });
990
- Object.assign(contents, doc);
991
- return contents;
992
- };
993
- export const de_ListLayoutsCommand = async (output, context) => {
994
- if (output.statusCode !== 200 && output.statusCode >= 300) {
995
- return de_CommandError(output, context);
996
- }
997
- const contents = map({
998
- $metadata: deserializeMetadata(output),
999
- });
1000
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1001
- const doc = take(data, {
1002
- layouts: _json,
1003
- nextToken: __expectString,
1004
- });
1005
- Object.assign(contents, doc);
1006
- return contents;
1007
- };
1008
- export const de_ListTagsForResourceCommand = async (output, context) => {
1009
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1010
- return de_CommandError(output, context);
1011
- }
1012
- const contents = map({
1013
- $metadata: deserializeMetadata(output),
1014
- });
1015
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1016
- const doc = take(data, {
1017
- tags: (_) => de_Tags(_, context),
1018
- });
1019
- Object.assign(contents, doc);
1020
- return contents;
1021
- };
1022
- export const de_ListTemplatesCommand = async (output, context) => {
1023
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1024
- return de_CommandError(output, context);
1025
- }
1026
- const contents = map({
1027
- $metadata: deserializeMetadata(output),
1028
- });
1029
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1030
- const doc = take(data, {
1031
- nextToken: __expectString,
1032
- templates: _json,
1033
- });
1034
- Object.assign(contents, doc);
1035
- return contents;
1036
- };
1037
- export const de_PutCaseEventConfigurationCommand = async (output, context) => {
1038
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1039
- return de_CommandError(output, context);
1040
- }
1041
- const contents = map({
1042
- $metadata: deserializeMetadata(output),
1043
- });
1044
- await collectBody(output.body, context);
1045
- return contents;
1046
- };
1047
- export const de_SearchAllRelatedItemsCommand = async (output, context) => {
1048
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1049
- return de_CommandError(output, context);
1050
- }
1051
- const contents = map({
1052
- $metadata: deserializeMetadata(output),
1053
- });
1054
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1055
- const doc = take(data, {
1056
- nextToken: __expectString,
1057
- relatedItems: (_) => de_SearchAllRelatedItemsResponseItemList(_, context),
1058
- });
1059
- Object.assign(contents, doc);
1060
- return contents;
1061
- };
1062
- export const de_SearchCasesCommand = async (output, context) => {
1063
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1064
- return de_CommandError(output, context);
1065
- }
1066
- const contents = map({
1067
- $metadata: deserializeMetadata(output),
1068
- });
1069
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1070
- const doc = take(data, {
1071
- cases: (_) => de_SearchCasesResponseItemList(_, context),
1072
- nextToken: __expectString,
1073
- });
1074
- Object.assign(contents, doc);
1075
- return contents;
1076
- };
1077
- export const de_SearchRelatedItemsCommand = async (output, context) => {
1078
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1079
- return de_CommandError(output, context);
1080
- }
1081
- const contents = map({
1082
- $metadata: deserializeMetadata(output),
1083
- });
1084
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1085
- const doc = take(data, {
1086
- nextToken: __expectString,
1087
- relatedItems: (_) => de_SearchRelatedItemsResponseItemList(_, context),
1088
- });
1089
- Object.assign(contents, doc);
1090
- return contents;
1091
- };
1092
- export const de_TagResourceCommand = async (output, context) => {
1093
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1094
- return de_CommandError(output, context);
1095
- }
1096
- const contents = map({
1097
- $metadata: deserializeMetadata(output),
1098
- });
1099
- await collectBody(output.body, context);
1100
- return contents;
1101
- };
1102
- export const de_UntagResourceCommand = async (output, context) => {
1103
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1104
- return de_CommandError(output, context);
1105
- }
1106
- const contents = map({
1107
- $metadata: deserializeMetadata(output),
1108
- });
1109
- await collectBody(output.body, context);
1110
- return contents;
1111
- };
1112
- export const de_UpdateCaseCommand = async (output, context) => {
1113
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1114
- return de_CommandError(output, context);
1115
- }
1116
- const contents = map({
1117
- $metadata: deserializeMetadata(output),
1118
- });
1119
- await collectBody(output.body, context);
1120
- return contents;
1121
- };
1122
- export const de_UpdateCaseRuleCommand = async (output, context) => {
1123
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1124
- return de_CommandError(output, context);
1125
- }
1126
- const contents = map({
1127
- $metadata: deserializeMetadata(output),
1128
- });
1129
- await collectBody(output.body, context);
1130
- return contents;
1131
- };
1132
- export const de_UpdateFieldCommand = async (output, context) => {
1133
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1134
- return de_CommandError(output, context);
1135
- }
1136
- const contents = map({
1137
- $metadata: deserializeMetadata(output),
1138
- });
1139
- await collectBody(output.body, context);
1140
- return contents;
1141
- };
1142
- export const de_UpdateLayoutCommand = async (output, context) => {
1143
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1144
- return de_CommandError(output, context);
1145
- }
1146
- const contents = map({
1147
- $metadata: deserializeMetadata(output),
1148
- });
1149
- await collectBody(output.body, context);
1150
- return contents;
1151
- };
1152
- export const de_UpdateTemplateCommand = async (output, context) => {
1153
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1154
- return de_CommandError(output, context);
1155
- }
1156
- const contents = map({
1157
- $metadata: deserializeMetadata(output),
1158
- });
1159
- await collectBody(output.body, context);
1160
- return contents;
1161
- };
1162
- const de_CommandError = async (output, context) => {
1163
- const parsedOutput = {
1164
- ...output,
1165
- body: await parseErrorBody(output.body, context),
1166
- };
1167
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1168
- switch (errorCode) {
1169
- case "AccessDeniedException":
1170
- case "com.amazonaws.connectcases#AccessDeniedException":
1171
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1172
- case "InternalServerException":
1173
- case "com.amazonaws.connectcases#InternalServerException":
1174
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1175
- case "ResourceNotFoundException":
1176
- case "com.amazonaws.connectcases#ResourceNotFoundException":
1177
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1178
- case "ThrottlingException":
1179
- case "com.amazonaws.connectcases#ThrottlingException":
1180
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1181
- case "ValidationException":
1182
- case "com.amazonaws.connectcases#ValidationException":
1183
- throw await de_ValidationExceptionRes(parsedOutput, context);
1184
- case "ServiceQuotaExceededException":
1185
- case "com.amazonaws.connectcases#ServiceQuotaExceededException":
1186
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1187
- case "ConflictException":
1188
- case "com.amazonaws.connectcases#ConflictException":
1189
- throw await de_ConflictExceptionRes(parsedOutput, context);
1190
- default:
1191
- const parsedBody = parsedOutput.body;
1192
- return throwDefaultError({
1193
- output,
1194
- parsedBody,
1195
- errorCode,
1196
- });
1197
- }
1198
- };
1199
- const throwDefaultError = withBaseException(__BaseException);
1200
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1201
- const contents = map({});
1202
- const data = parsedOutput.body;
1203
- const doc = take(data, {
1204
- message: __expectString,
1205
- });
1206
- Object.assign(contents, doc);
1207
- const exception = new AccessDeniedException({
1208
- $metadata: deserializeMetadata(parsedOutput),
1209
- ...contents,
1210
- });
1211
- return __decorateServiceException(exception, parsedOutput.body);
1212
- };
1213
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1214
- const contents = map({});
1215
- const data = parsedOutput.body;
1216
- const doc = take(data, {
1217
- message: __expectString,
1218
- });
1219
- Object.assign(contents, doc);
1220
- const exception = new ConflictException({
1221
- $metadata: deserializeMetadata(parsedOutput),
1222
- ...contents,
1223
- });
1224
- return __decorateServiceException(exception, parsedOutput.body);
1225
- };
1226
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1227
- const contents = map({
1228
- [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => __strictParseInt32(parsedOutput.headers[_ra])],
1229
- });
1230
- const data = parsedOutput.body;
1231
- const doc = take(data, {
1232
- message: __expectString,
1233
- });
1234
- Object.assign(contents, doc);
1235
- const exception = new InternalServerException({
1236
- $metadata: deserializeMetadata(parsedOutput),
1237
- ...contents,
1238
- });
1239
- return __decorateServiceException(exception, parsedOutput.body);
1240
- };
1241
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1242
- const contents = map({});
1243
- const data = parsedOutput.body;
1244
- const doc = take(data, {
1245
- message: __expectString,
1246
- resourceId: __expectString,
1247
- resourceType: __expectString,
1248
- });
1249
- Object.assign(contents, doc);
1250
- const exception = new ResourceNotFoundException({
1251
- $metadata: deserializeMetadata(parsedOutput),
1252
- ...contents,
1253
- });
1254
- return __decorateServiceException(exception, parsedOutput.body);
1255
- };
1256
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1257
- const contents = map({});
1258
- const data = parsedOutput.body;
1259
- const doc = take(data, {
1260
- message: __expectString,
1261
- });
1262
- Object.assign(contents, doc);
1263
- const exception = new ServiceQuotaExceededException({
1264
- $metadata: deserializeMetadata(parsedOutput),
1265
- ...contents,
1266
- });
1267
- return __decorateServiceException(exception, parsedOutput.body);
1268
- };
1269
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1270
- const contents = map({});
1271
- const data = parsedOutput.body;
1272
- const doc = take(data, {
1273
- message: __expectString,
1274
- });
1275
- Object.assign(contents, doc);
1276
- const exception = new ThrottlingException({
1277
- $metadata: deserializeMetadata(parsedOutput),
1278
- ...contents,
1279
- });
1280
- return __decorateServiceException(exception, parsedOutput.body);
1281
- };
1282
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1283
- const contents = map({});
1284
- const data = parsedOutput.body;
1285
- const doc = take(data, {
1286
- message: __expectString,
1287
- });
1288
- Object.assign(contents, doc);
1289
- const exception = new ValidationException({
1290
- $metadata: deserializeMetadata(parsedOutput),
1291
- ...contents,
1292
- });
1293
- return __decorateServiceException(exception, parsedOutput.body);
1294
- };
1295
- const se_BooleanCondition = (input, context) => {
1296
- return BooleanCondition.visit(input, {
1297
- equalTo: (value) => ({ equalTo: se_BooleanOperands(value, context) }),
1298
- notEqualTo: (value) => ({ notEqualTo: se_BooleanOperands(value, context) }),
1299
- _: (name, value) => ({ [name]: value }),
1300
- });
1301
- };
1302
- const se_BooleanConditionList = (input, context) => {
1303
- return input
1304
- .filter((e) => e != null)
1305
- .map((entry) => {
1306
- return se_BooleanCondition(entry, context);
1307
- });
1308
- };
1309
- const se_BooleanOperands = (input, context) => {
1310
- return take(input, {
1311
- operandOne: _json,
1312
- operandTwo: (_) => se_OperandTwo(_, context),
1313
- result: [],
1314
- });
1315
- };
1316
- const se_CaseFilter = (input, context) => {
1317
- return CaseFilter.visit(input, {
1318
- andAll: (value) => ({ andAll: se_CaseFilterList(value, context) }),
1319
- field: (value) => ({ field: se_FieldFilter(value, context) }),
1320
- not: (value) => ({ not: se_CaseFilter(value, context) }),
1321
- orAll: (value) => ({ orAll: se_CaseFilterList(value, context) }),
1322
- _: (name, value) => ({ [name]: value }),
1323
- });
1324
- };
1325
- const se_CaseFilterList = (input, context) => {
1326
- return input
1327
- .filter((e) => e != null)
1328
- .map((entry) => {
1329
- return se_CaseFilter(entry, context);
1330
- });
1331
- };
1332
- const se_CaseRuleDetails = (input, context) => {
1333
- return CaseRuleDetails.visit(input, {
1334
- fieldOptions: (value) => ({ fieldOptions: _json(value) }),
1335
- hidden: (value) => ({ hidden: se_HiddenCaseRule(value, context) }),
1336
- required: (value) => ({ required: se_RequiredCaseRule(value, context) }),
1337
- _: (name, value) => ({ [name]: value }),
1338
- });
1339
- };
1340
- const se_CustomFieldsFilter = (input, context) => {
1341
- return CustomFieldsFilter.visit(input, {
1342
- andAll: (value) => ({ andAll: se_CustomFieldsFilterList(value, context) }),
1343
- field: (value) => ({ field: se_FieldFilter(value, context) }),
1344
- not: (value) => ({ not: se_CustomFieldsFilter(value, context) }),
1345
- orAll: (value) => ({ orAll: se_CustomFieldsFilterList(value, context) }),
1346
- _: (name, value) => ({ [name]: value }),
1347
- });
1348
- };
1349
- const se_CustomFieldsFilterList = (input, context) => {
1350
- return input
1351
- .filter((e) => e != null)
1352
- .map((entry) => {
1353
- return se_CustomFieldsFilter(entry, context);
1354
- });
1355
- };
1356
- const se_CustomFilter = (input, context) => {
1357
- return take(input, {
1358
- fields: (_) => se_CustomFieldsFilter(_, context),
1359
- });
1360
- };
1361
- const se_CustomInputContent = (input, context) => {
1362
- return take(input, {
1363
- fields: (_) => se_FieldValueList(_, context),
1364
- });
1365
- };
1366
- const se_FieldFilter = (input, context) => {
1367
- return FieldFilter.visit(input, {
1368
- contains: (value) => ({ contains: se_FieldValue(value, context) }),
1369
- equalTo: (value) => ({ equalTo: se_FieldValue(value, context) }),
1370
- greaterThan: (value) => ({ greaterThan: se_FieldValue(value, context) }),
1371
- greaterThanOrEqualTo: (value) => ({ greaterThanOrEqualTo: se_FieldValue(value, context) }),
1372
- lessThan: (value) => ({ lessThan: se_FieldValue(value, context) }),
1373
- lessThanOrEqualTo: (value) => ({ lessThanOrEqualTo: se_FieldValue(value, context) }),
1374
- _: (name, value) => ({ [name]: value }),
1375
- });
1376
- };
1377
- const se_FieldValue = (input, context) => {
1378
- return take(input, {
1379
- id: [],
1380
- value: (_) => se_FieldValueUnion(_, context),
1381
- });
1382
- };
1383
- const se_FieldValueList = (input, context) => {
1384
- return input
1385
- .filter((e) => e != null)
1386
- .map((entry) => {
1387
- return se_FieldValue(entry, context);
1388
- });
1389
- };
1390
- const se_FieldValueUnion = (input, context) => {
1391
- return FieldValueUnion.visit(input, {
1392
- booleanValue: (value) => ({ booleanValue: value }),
1393
- doubleValue: (value) => ({ doubleValue: __serializeFloat(value) }),
1394
- emptyValue: (value) => ({ emptyValue: _json(value) }),
1395
- stringValue: (value) => ({ stringValue: value }),
1396
- userArnValue: (value) => ({ userArnValue: value }),
1397
- _: (name, value) => ({ [name]: value }),
1398
- });
1399
- };
1400
- const se_HiddenCaseRule = (input, context) => {
1401
- return take(input, {
1402
- conditions: (_) => se_BooleanConditionList(_, context),
1403
- defaultValue: [],
1404
- });
1405
- };
1406
- const se_OperandTwo = (input, context) => {
1407
- return OperandTwo.visit(input, {
1408
- booleanValue: (value) => ({ booleanValue: value }),
1409
- doubleValue: (value) => ({ doubleValue: __serializeFloat(value) }),
1410
- emptyValue: (value) => ({ emptyValue: _json(value) }),
1411
- stringValue: (value) => ({ stringValue: value }),
1412
- _: (name, value) => ({ [name]: value }),
1413
- });
1414
- };
1415
- const se_RelatedItemFilterList = (input, context) => {
1416
- return input
1417
- .filter((e) => e != null)
1418
- .map((entry) => {
1419
- return se_RelatedItemTypeFilter(entry, context);
1420
- });
1421
- };
1422
- const se_RelatedItemInputContent = (input, context) => {
1423
- return RelatedItemInputContent.visit(input, {
1424
- comment: (value) => ({ comment: _json(value) }),
1425
- connectCase: (value) => ({ connectCase: _json(value) }),
1426
- contact: (value) => ({ contact: _json(value) }),
1427
- custom: (value) => ({ custom: se_CustomInputContent(value, context) }),
1428
- file: (value) => ({ file: _json(value) }),
1429
- sla: (value) => ({ sla: se_SlaInputContent(value, context) }),
1430
- _: (name, value) => ({ [name]: value }),
1431
- });
1432
- };
1433
- const se_RelatedItemTypeFilter = (input, context) => {
1434
- return RelatedItemTypeFilter.visit(input, {
1435
- comment: (value) => ({ comment: _json(value) }),
1436
- connectCase: (value) => ({ connectCase: _json(value) }),
1437
- contact: (value) => ({ contact: _json(value) }),
1438
- custom: (value) => ({ custom: se_CustomFilter(value, context) }),
1439
- file: (value) => ({ file: _json(value) }),
1440
- sla: (value) => ({ sla: _json(value) }),
1441
- _: (name, value) => ({ [name]: value }),
1442
- });
1443
- };
1444
- const se_RequiredCaseRule = (input, context) => {
1445
- return take(input, {
1446
- conditions: (_) => se_BooleanConditionList(_, context),
1447
- defaultValue: [],
1448
- });
1449
- };
1450
- const se_SlaFieldValueUnionList = (input, context) => {
1451
- return input
1452
- .filter((e) => e != null)
1453
- .map((entry) => {
1454
- return se_FieldValueUnion(entry, context);
1455
- });
1456
- };
1457
- const se_SlaInputConfiguration = (input, context) => {
1458
- return take(input, {
1459
- fieldId: [],
1460
- name: [],
1461
- targetFieldValues: (_) => se_SlaFieldValueUnionList(_, context),
1462
- targetSlaMinutes: [],
1463
- type: [],
1464
- });
1465
- };
1466
- const se_SlaInputContent = (input, context) => {
1467
- return SlaInputContent.visit(input, {
1468
- slaInputConfiguration: (value) => ({ slaInputConfiguration: se_SlaInputConfiguration(value, context) }),
1469
- _: (name, value) => ({ [name]: value }),
1470
- });
1471
- };
1472
- const se_Tags = (input, context) => {
1473
- return Object.entries(input).reduce((acc, [key, value]) => {
1474
- if (value === null) {
1475
- acc[key] = null;
1476
- return acc;
1477
- }
1478
- acc[key] = value;
1479
- return acc;
1480
- }, {});
1481
- };
1482
- const de_AuditEvent = (output, context) => {
1483
- return take(output, {
1484
- eventId: __expectString,
1485
- fields: (_) => de_AuditEventFieldList(_, context),
1486
- performedBy: _json,
1487
- performedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1488
- relatedItemType: __expectString,
1489
- type: __expectString,
1490
- });
1491
- };
1492
- const de_AuditEventField = (output, context) => {
1493
- return take(output, {
1494
- eventFieldId: __expectString,
1495
- newValue: (_) => de_AuditEventFieldValueUnion(__expectUnion(_), context),
1496
- oldValue: (_) => de_AuditEventFieldValueUnion(__expectUnion(_), context),
1497
- });
1498
- };
1499
- const de_AuditEventFieldList = (output, context) => {
1500
- const retVal = (output || []).map((entry) => {
1501
- if (entry === null) {
1502
- return null;
1503
- }
1504
- return de_AuditEventField(entry, context);
1505
- });
1506
- return retVal;
1507
- };
1508
- const de_AuditEventFieldValueUnion = (output, context) => {
1509
- if (__expectBoolean(output.booleanValue) !== undefined) {
1510
- return { booleanValue: __expectBoolean(output.booleanValue) };
1511
- }
1512
- if (__limitedParseDouble(output.doubleValue) !== undefined) {
1513
- return { doubleValue: __limitedParseDouble(output.doubleValue) };
1514
- }
1515
- if (output.emptyValue != null) {
1516
- return {
1517
- emptyValue: _json(output.emptyValue),
1518
- };
1519
- }
1520
- if (__expectString(output.stringValue) !== undefined) {
1521
- return { stringValue: __expectString(output.stringValue) };
1522
- }
1523
- if (__expectString(output.userArnValue) !== undefined) {
1524
- return { userArnValue: __expectString(output.userArnValue) };
1525
- }
1526
- return { $unknown: Object.entries(output)[0] };
1527
- };
1528
- const de_AuditEventsList = (output, context) => {
1529
- const retVal = (output || []).map((entry) => {
1530
- if (entry === null) {
1531
- return null;
1532
- }
1533
- return de_AuditEvent(entry, context);
1534
- });
1535
- return retVal;
1536
- };
1537
- const de_BatchGetCaseRuleList = (output, context) => {
1538
- const retVal = (output || [])
1539
- .filter((e) => e != null)
1540
- .map((entry) => {
1541
- return de_GetCaseRuleResponse(entry, context);
1542
- });
1543
- return retVal;
1544
- };
1545
- const de_BatchGetFieldList = (output, context) => {
1546
- const retVal = (output || [])
1547
- .filter((e) => e != null)
1548
- .map((entry) => {
1549
- return de_GetFieldResponse(entry, context);
1550
- });
1551
- return retVal;
1552
- };
1553
- const de_BooleanCondition = (output, context) => {
1554
- if (output.equalTo != null) {
1555
- return {
1556
- equalTo: de_BooleanOperands(output.equalTo, context),
1557
- };
1558
- }
1559
- if (output.notEqualTo != null) {
1560
- return {
1561
- notEqualTo: de_BooleanOperands(output.notEqualTo, context),
1562
- };
1563
- }
1564
- return { $unknown: Object.entries(output)[0] };
1565
- };
1566
- const de_BooleanConditionList = (output, context) => {
1567
- const retVal = (output || [])
1568
- .filter((e) => e != null)
1569
- .map((entry) => {
1570
- return de_BooleanCondition(__expectUnion(entry), context);
1571
- });
1572
- return retVal;
1573
- };
1574
- const de_BooleanOperands = (output, context) => {
1575
- return take(output, {
1576
- operandOne: (_) => _json(__expectUnion(_)),
1577
- operandTwo: (_) => de_OperandTwo(__expectUnion(_), context),
1578
- result: __expectBoolean,
1579
- });
1580
- };
1581
- const de_CaseRuleDetails = (output, context) => {
1582
- if (output.fieldOptions != null) {
1583
- return {
1584
- fieldOptions: _json(output.fieldOptions),
1585
- };
1586
- }
1587
- if (output.hidden != null) {
1588
- return {
1589
- hidden: de_HiddenCaseRule(output.hidden, context),
1590
- };
1591
- }
1592
- if (output.required != null) {
1593
- return {
1594
- required: de_RequiredCaseRule(output.required, context),
1595
- };
1596
- }
1597
- return { $unknown: Object.entries(output)[0] };
1598
- };
1599
- const de_ContactContent = (output, context) => {
1600
- return take(output, {
1601
- channel: __expectString,
1602
- connectedToSystemTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1603
- contactArn: __expectString,
1604
- });
1605
- };
1606
- const de_CustomContent = (output, context) => {
1607
- return take(output, {
1608
- fields: (_) => de_FieldValueList(_, context),
1609
- });
1610
- };
1611
- const de_FieldValue = (output, context) => {
1612
- return take(output, {
1613
- id: __expectString,
1614
- value: (_) => de_FieldValueUnion(__expectUnion(_), context),
1615
- });
1616
- };
1617
- const de_FieldValueList = (output, context) => {
1618
- const retVal = (output || [])
1619
- .filter((e) => e != null)
1620
- .map((entry) => {
1621
- return de_FieldValue(entry, context);
1622
- });
1623
- return retVal;
1624
- };
1625
- const de_FieldValueUnion = (output, context) => {
1626
- if (__expectBoolean(output.booleanValue) !== undefined) {
1627
- return { booleanValue: __expectBoolean(output.booleanValue) };
1628
- }
1629
- if (__limitedParseDouble(output.doubleValue) !== undefined) {
1630
- return { doubleValue: __limitedParseDouble(output.doubleValue) };
1631
- }
1632
- if (output.emptyValue != null) {
1633
- return {
1634
- emptyValue: _json(output.emptyValue),
1635
- };
1636
- }
1637
- if (__expectString(output.stringValue) !== undefined) {
1638
- return { stringValue: __expectString(output.stringValue) };
1639
- }
1640
- if (__expectString(output.userArnValue) !== undefined) {
1641
- return { userArnValue: __expectString(output.userArnValue) };
1642
- }
1643
- return { $unknown: Object.entries(output)[0] };
1644
- };
1645
- const de_GetCaseRuleResponse = (output, context) => {
1646
- return take(output, {
1647
- caseRuleArn: __expectString,
1648
- caseRuleId: __expectString,
1649
- createdTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1650
- deleted: __expectBoolean,
1651
- description: __expectString,
1652
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1653
- name: __expectString,
1654
- rule: (_) => de_CaseRuleDetails(__expectUnion(_), context),
1655
- tags: (_) => de_Tags(_, context),
1656
- });
1657
- };
1658
- const de_GetFieldResponse = (output, context) => {
1659
- return take(output, {
1660
- createdTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1661
- deleted: __expectBoolean,
1662
- description: __expectString,
1663
- fieldArn: __expectString,
1664
- fieldId: __expectString,
1665
- lastModifiedTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1666
- name: __expectString,
1667
- namespace: __expectString,
1668
- tags: (_) => de_Tags(_, context),
1669
- type: __expectString,
1670
- });
1671
- };
1672
- const de_HiddenCaseRule = (output, context) => {
1673
- return take(output, {
1674
- conditions: (_) => de_BooleanConditionList(_, context),
1675
- defaultValue: __expectBoolean,
1676
- });
1677
- };
1678
- const de_OperandTwo = (output, context) => {
1679
- if (__expectBoolean(output.booleanValue) !== undefined) {
1680
- return { booleanValue: __expectBoolean(output.booleanValue) };
1681
- }
1682
- if (__limitedParseDouble(output.doubleValue) !== undefined) {
1683
- return { doubleValue: __limitedParseDouble(output.doubleValue) };
1684
- }
1685
- if (output.emptyValue != null) {
1686
- return {
1687
- emptyValue: _json(output.emptyValue),
1688
- };
1689
- }
1690
- if (__expectString(output.stringValue) !== undefined) {
1691
- return { stringValue: __expectString(output.stringValue) };
1692
- }
1693
- return { $unknown: Object.entries(output)[0] };
1694
- };
1695
- const de_RelatedItemContent = (output, context) => {
1696
- if (output.comment != null) {
1697
- return {
1698
- comment: _json(output.comment),
1699
- };
1700
- }
1701
- if (output.connectCase != null) {
1702
- return {
1703
- connectCase: _json(output.connectCase),
1704
- };
1705
- }
1706
- if (output.contact != null) {
1707
- return {
1708
- contact: de_ContactContent(output.contact, context),
1709
- };
1710
- }
1711
- if (output.custom != null) {
1712
- return {
1713
- custom: de_CustomContent(output.custom, context),
1714
- };
1715
- }
1716
- if (output.file != null) {
1717
- return {
1718
- file: _json(output.file),
1719
- };
1720
- }
1721
- if (output.sla != null) {
1722
- return {
1723
- sla: de_SlaContent(output.sla, context),
1724
- };
1725
- }
1726
- return { $unknown: Object.entries(output)[0] };
1727
- };
1728
- const de_RequiredCaseRule = (output, context) => {
1729
- return take(output, {
1730
- conditions: (_) => de_BooleanConditionList(_, context),
1731
- defaultValue: __expectBoolean,
1732
- });
1733
- };
1734
- const de_SearchAllRelatedItemsResponseItem = (output, context) => {
1735
- return take(output, {
1736
- associationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1737
- caseId: __expectString,
1738
- content: (_) => de_RelatedItemContent(__expectUnion(_), context),
1739
- performedBy: (_) => _json(__expectUnion(_)),
1740
- relatedItemId: __expectString,
1741
- tags: (_) => de_Tags(_, context),
1742
- type: __expectString,
1743
- });
1744
- };
1745
- const de_SearchAllRelatedItemsResponseItemList = (output, context) => {
1746
- const retVal = (output || []).map((entry) => {
1747
- if (entry === null) {
1748
- return null;
1749
- }
1750
- return de_SearchAllRelatedItemsResponseItem(entry, context);
1751
- });
1752
- return retVal;
1753
- };
1754
- const de_SearchCasesResponseItem = (output, context) => {
1755
- return take(output, {
1756
- caseId: __expectString,
1757
- fields: (_) => de_FieldValueList(_, context),
1758
- tags: (_) => de_Tags(_, context),
1759
- templateId: __expectString,
1760
- });
1761
- };
1762
- const de_SearchCasesResponseItemList = (output, context) => {
1763
- const retVal = (output || []).map((entry) => {
1764
- if (entry === null) {
1765
- return null;
1766
- }
1767
- return de_SearchCasesResponseItem(entry, context);
1768
- });
1769
- return retVal;
1770
- };
1771
- const de_SearchRelatedItemsResponseItem = (output, context) => {
1772
- return take(output, {
1773
- associationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1774
- content: (_) => de_RelatedItemContent(__expectUnion(_), context),
1775
- performedBy: (_) => _json(__expectUnion(_)),
1776
- relatedItemId: __expectString,
1777
- tags: (_) => de_Tags(_, context),
1778
- type: __expectString,
1779
- });
1780
- };
1781
- const de_SearchRelatedItemsResponseItemList = (output, context) => {
1782
- const retVal = (output || []).map((entry) => {
1783
- if (entry === null) {
1784
- return null;
1785
- }
1786
- return de_SearchRelatedItemsResponseItem(entry, context);
1787
- });
1788
- return retVal;
1789
- };
1790
- const de_SlaConfiguration = (output, context) => {
1791
- return take(output, {
1792
- completionTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1793
- fieldId: __expectString,
1794
- name: __expectString,
1795
- status: __expectString,
1796
- targetFieldValues: (_) => de_SlaFieldValueUnionList(_, context),
1797
- targetTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1798
- type: __expectString,
1799
- });
1800
- };
1801
- const de_SlaContent = (output, context) => {
1802
- return take(output, {
1803
- slaConfiguration: (_) => de_SlaConfiguration(_, context),
1804
- });
1805
- };
1806
- const de_SlaFieldValueUnionList = (output, context) => {
1807
- const retVal = (output || [])
1808
- .filter((e) => e != null)
1809
- .map((entry) => {
1810
- return de_FieldValueUnion(__expectUnion(entry), context);
1811
- });
1812
- return retVal;
1813
- };
1814
- const de_Tags = (output, context) => {
1815
- return Object.entries(output).reduce((acc, [key, value]) => {
1816
- if (value === null) {
1817
- acc[key] = null;
1818
- return acc;
1819
- }
1820
- acc[key] = __expectString(value);
1821
- return acc;
1822
- }, {});
1823
- };
1824
- const deserializeMetadata = (output) => ({
1825
- httpStatusCode: output.statusCode,
1826
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1827
- extendedRequestId: output.headers["x-amz-id-2"],
1828
- cfId: output.headers["x-amz-cf-id"],
1829
- });
1830
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1831
- const _mR = "maxResults";
1832
- const _nT = "nextToken";
1833
- const _rAS = "retryAfterSeconds";
1834
- const _ra = "retry-after";
1835
- const _s = "status";
1836
- const _tK = "tagKeys";
1837
- const _v = "values";