@aws-sdk/client-connectcases 3.490.0 → 3.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/ConnectCases.js +1 -71
- package/dist-cjs/ConnectCasesClient.js +1 -43
- package/dist-cjs/commands/BatchGetFieldCommand.js +1 -28
- package/dist-cjs/commands/BatchPutFieldOptionsCommand.js +1 -28
- package/dist-cjs/commands/CreateCaseCommand.js +1 -28
- package/dist-cjs/commands/CreateDomainCommand.js +1 -28
- package/dist-cjs/commands/CreateFieldCommand.js +1 -28
- package/dist-cjs/commands/CreateLayoutCommand.js +1 -28
- package/dist-cjs/commands/CreateRelatedItemCommand.js +1 -28
- package/dist-cjs/commands/CreateTemplateCommand.js +1 -28
- package/dist-cjs/commands/DeleteDomainCommand.js +1 -28
- package/dist-cjs/commands/GetCaseCommand.js +1 -28
- package/dist-cjs/commands/GetCaseEventConfigurationCommand.js +1 -28
- package/dist-cjs/commands/GetDomainCommand.js +1 -28
- package/dist-cjs/commands/GetLayoutCommand.js +1 -28
- package/dist-cjs/commands/GetTemplateCommand.js +1 -28
- package/dist-cjs/commands/ListCasesForContactCommand.js +1 -28
- package/dist-cjs/commands/ListDomainsCommand.js +1 -28
- package/dist-cjs/commands/ListFieldOptionsCommand.js +1 -28
- package/dist-cjs/commands/ListFieldsCommand.js +1 -28
- package/dist-cjs/commands/ListLayoutsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/ListTemplatesCommand.js +1 -28
- package/dist-cjs/commands/PutCaseEventConfigurationCommand.js +1 -28
- package/dist-cjs/commands/SearchCasesCommand.js +1 -28
- package/dist-cjs/commands/SearchRelatedItemsCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateCaseCommand.js +1 -28
- package/dist-cjs/commands/UpdateFieldCommand.js +1 -28
- package/dist-cjs/commands/UpdateLayoutCommand.js +1 -28
- package/dist-cjs/commands/UpdateTemplateCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -33
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +3289 -11
- package/dist-cjs/models/ConnectCasesServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -232
- package/dist-cjs/pagination/GetCasePaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListCasesForContactPaginator.js +1 -7
- package/dist-cjs/pagination/ListDomainsPaginator.js +1 -7
- package/dist-cjs/pagination/ListFieldOptionsPaginator.js +1 -7
- package/dist-cjs/pagination/ListFieldsPaginator.js +1 -7
- package/dist-cjs/pagination/ListLayoutsPaginator.js +1 -7
- package/dist-cjs/pagination/ListTemplatesPaginator.js +1 -7
- package/dist-cjs/pagination/SearchCasesPaginator.js +1 -7
- package/dist-cjs/pagination/SearchRelatedItemsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -13
- package/dist-cjs/protocols/Aws_restJson1.js +1 -2219
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,2219 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_ListTagsForResourceCommand = exports.de_ListLayoutsCommand = exports.de_ListFieldsCommand = exports.de_ListFieldOptionsCommand = exports.de_ListDomainsCommand = exports.de_ListCasesForContactCommand = exports.de_GetTemplateCommand = exports.de_GetLayoutCommand = exports.de_GetDomainCommand = exports.de_GetCaseEventConfigurationCommand = exports.de_GetCaseCommand = exports.de_DeleteDomainCommand = exports.de_CreateTemplateCommand = exports.de_CreateRelatedItemCommand = exports.de_CreateLayoutCommand = exports.de_CreateFieldCommand = exports.de_CreateDomainCommand = exports.de_CreateCaseCommand = exports.de_BatchPutFieldOptionsCommand = exports.de_BatchGetFieldCommand = exports.se_UpdateTemplateCommand = exports.se_UpdateLayoutCommand = exports.se_UpdateFieldCommand = exports.se_UpdateCaseCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SearchRelatedItemsCommand = exports.se_SearchCasesCommand = exports.se_PutCaseEventConfigurationCommand = exports.se_ListTemplatesCommand = exports.se_ListTagsForResourceCommand = exports.se_ListLayoutsCommand = exports.se_ListFieldsCommand = exports.se_ListFieldOptionsCommand = exports.se_ListDomainsCommand = exports.se_ListCasesForContactCommand = exports.se_GetTemplateCommand = exports.se_GetLayoutCommand = exports.se_GetDomainCommand = exports.se_GetCaseEventConfigurationCommand = exports.se_GetCaseCommand = exports.se_DeleteDomainCommand = exports.se_CreateTemplateCommand = exports.se_CreateRelatedItemCommand = exports.se_CreateLayoutCommand = exports.se_CreateFieldCommand = exports.se_CreateDomainCommand = exports.se_CreateCaseCommand = exports.se_BatchPutFieldOptionsCommand = exports.se_BatchGetFieldCommand = void 0;
|
|
4
|
-
exports.de_UpdateTemplateCommand = exports.de_UpdateLayoutCommand = exports.de_UpdateFieldCommand = exports.de_UpdateCaseCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SearchRelatedItemsCommand = exports.de_SearchCasesCommand = exports.de_PutCaseEventConfigurationCommand = exports.de_ListTemplatesCommand = void 0;
|
|
5
|
-
const core_1 = require("@aws-sdk/core");
|
|
6
|
-
const core_2 = require("@smithy/core");
|
|
7
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
8
|
-
const uuid_1 = require("uuid");
|
|
9
|
-
const ConnectCasesServiceException_1 = require("../models/ConnectCasesServiceException");
|
|
10
|
-
const models_0_1 = require("../models/models_0");
|
|
11
|
-
const se_BatchGetFieldCommand = async (input, context) => {
|
|
12
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
13
|
-
const headers = {
|
|
14
|
-
"content-type": "application/json",
|
|
15
|
-
};
|
|
16
|
-
b.bp("/domains/{domainId}/fields-batch");
|
|
17
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
18
|
-
let body;
|
|
19
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
20
|
-
fields: (_) => (0, smithy_client_1._json)(_),
|
|
21
|
-
}));
|
|
22
|
-
b.m("POST").h(headers).b(body);
|
|
23
|
-
return b.build();
|
|
24
|
-
};
|
|
25
|
-
exports.se_BatchGetFieldCommand = se_BatchGetFieldCommand;
|
|
26
|
-
const se_BatchPutFieldOptionsCommand = async (input, context) => {
|
|
27
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
28
|
-
const headers = {
|
|
29
|
-
"content-type": "application/json",
|
|
30
|
-
};
|
|
31
|
-
b.bp("/domains/{domainId}/fields/{fieldId}/options");
|
|
32
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
33
|
-
b.p("fieldId", () => input.fieldId, "{fieldId}", false);
|
|
34
|
-
let body;
|
|
35
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
36
|
-
options: (_) => (0, smithy_client_1._json)(_),
|
|
37
|
-
}));
|
|
38
|
-
b.m("PUT").h(headers).b(body);
|
|
39
|
-
return b.build();
|
|
40
|
-
};
|
|
41
|
-
exports.se_BatchPutFieldOptionsCommand = se_BatchPutFieldOptionsCommand;
|
|
42
|
-
const se_CreateCaseCommand = async (input, context) => {
|
|
43
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
44
|
-
const headers = {
|
|
45
|
-
"content-type": "application/json",
|
|
46
|
-
};
|
|
47
|
-
b.bp("/domains/{domainId}/cases");
|
|
48
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
49
|
-
let body;
|
|
50
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
51
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
52
|
-
fields: (_) => se_FieldValueList(_, context),
|
|
53
|
-
templateId: [],
|
|
54
|
-
}));
|
|
55
|
-
b.m("POST").h(headers).b(body);
|
|
56
|
-
return b.build();
|
|
57
|
-
};
|
|
58
|
-
exports.se_CreateCaseCommand = se_CreateCaseCommand;
|
|
59
|
-
const se_CreateDomainCommand = async (input, context) => {
|
|
60
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
61
|
-
const headers = {
|
|
62
|
-
"content-type": "application/json",
|
|
63
|
-
};
|
|
64
|
-
b.bp("/domains");
|
|
65
|
-
let body;
|
|
66
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
67
|
-
name: [],
|
|
68
|
-
}));
|
|
69
|
-
b.m("POST").h(headers).b(body);
|
|
70
|
-
return b.build();
|
|
71
|
-
};
|
|
72
|
-
exports.se_CreateDomainCommand = se_CreateDomainCommand;
|
|
73
|
-
const se_CreateFieldCommand = async (input, context) => {
|
|
74
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
75
|
-
const headers = {
|
|
76
|
-
"content-type": "application/json",
|
|
77
|
-
};
|
|
78
|
-
b.bp("/domains/{domainId}/fields");
|
|
79
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
80
|
-
let body;
|
|
81
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
82
|
-
description: [],
|
|
83
|
-
name: [],
|
|
84
|
-
type: [],
|
|
85
|
-
}));
|
|
86
|
-
b.m("POST").h(headers).b(body);
|
|
87
|
-
return b.build();
|
|
88
|
-
};
|
|
89
|
-
exports.se_CreateFieldCommand = se_CreateFieldCommand;
|
|
90
|
-
const se_CreateLayoutCommand = async (input, context) => {
|
|
91
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
92
|
-
const headers = {
|
|
93
|
-
"content-type": "application/json",
|
|
94
|
-
};
|
|
95
|
-
b.bp("/domains/{domainId}/layouts");
|
|
96
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
97
|
-
let body;
|
|
98
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
99
|
-
content: (_) => (0, smithy_client_1._json)(_),
|
|
100
|
-
name: [],
|
|
101
|
-
}));
|
|
102
|
-
b.m("POST").h(headers).b(body);
|
|
103
|
-
return b.build();
|
|
104
|
-
};
|
|
105
|
-
exports.se_CreateLayoutCommand = se_CreateLayoutCommand;
|
|
106
|
-
const se_CreateRelatedItemCommand = async (input, context) => {
|
|
107
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
108
|
-
const headers = {
|
|
109
|
-
"content-type": "application/json",
|
|
110
|
-
};
|
|
111
|
-
b.bp("/domains/{domainId}/cases/{caseId}/related-items");
|
|
112
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
113
|
-
b.p("caseId", () => input.caseId, "{caseId}", false);
|
|
114
|
-
let body;
|
|
115
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
116
|
-
content: (_) => (0, smithy_client_1._json)(_),
|
|
117
|
-
performedBy: (_) => (0, smithy_client_1._json)(_),
|
|
118
|
-
type: [],
|
|
119
|
-
}));
|
|
120
|
-
b.m("POST").h(headers).b(body);
|
|
121
|
-
return b.build();
|
|
122
|
-
};
|
|
123
|
-
exports.se_CreateRelatedItemCommand = se_CreateRelatedItemCommand;
|
|
124
|
-
const se_CreateTemplateCommand = async (input, context) => {
|
|
125
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
126
|
-
const headers = {
|
|
127
|
-
"content-type": "application/json",
|
|
128
|
-
};
|
|
129
|
-
b.bp("/domains/{domainId}/templates");
|
|
130
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
131
|
-
let body;
|
|
132
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
133
|
-
description: [],
|
|
134
|
-
layoutConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
135
|
-
name: [],
|
|
136
|
-
requiredFields: (_) => (0, smithy_client_1._json)(_),
|
|
137
|
-
status: [],
|
|
138
|
-
}));
|
|
139
|
-
b.m("POST").h(headers).b(body);
|
|
140
|
-
return b.build();
|
|
141
|
-
};
|
|
142
|
-
exports.se_CreateTemplateCommand = se_CreateTemplateCommand;
|
|
143
|
-
const se_DeleteDomainCommand = async (input, context) => {
|
|
144
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
145
|
-
const headers = {};
|
|
146
|
-
b.bp("/domains/{domainId}");
|
|
147
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
148
|
-
let body;
|
|
149
|
-
b.m("DELETE").h(headers).b(body);
|
|
150
|
-
return b.build();
|
|
151
|
-
};
|
|
152
|
-
exports.se_DeleteDomainCommand = se_DeleteDomainCommand;
|
|
153
|
-
const se_GetCaseCommand = async (input, context) => {
|
|
154
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
155
|
-
const headers = {
|
|
156
|
-
"content-type": "application/json",
|
|
157
|
-
};
|
|
158
|
-
b.bp("/domains/{domainId}/cases/{caseId}");
|
|
159
|
-
b.p("caseId", () => input.caseId, "{caseId}", false);
|
|
160
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
161
|
-
let body;
|
|
162
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
163
|
-
fields: (_) => (0, smithy_client_1._json)(_),
|
|
164
|
-
nextToken: [],
|
|
165
|
-
}));
|
|
166
|
-
b.m("POST").h(headers).b(body);
|
|
167
|
-
return b.build();
|
|
168
|
-
};
|
|
169
|
-
exports.se_GetCaseCommand = se_GetCaseCommand;
|
|
170
|
-
const se_GetCaseEventConfigurationCommand = async (input, context) => {
|
|
171
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
172
|
-
const headers = {};
|
|
173
|
-
b.bp("/domains/{domainId}/case-event-configuration");
|
|
174
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
175
|
-
let body;
|
|
176
|
-
b.m("POST").h(headers).b(body);
|
|
177
|
-
return b.build();
|
|
178
|
-
};
|
|
179
|
-
exports.se_GetCaseEventConfigurationCommand = se_GetCaseEventConfigurationCommand;
|
|
180
|
-
const se_GetDomainCommand = async (input, context) => {
|
|
181
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
182
|
-
const headers = {};
|
|
183
|
-
b.bp("/domains/{domainId}");
|
|
184
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
185
|
-
let body;
|
|
186
|
-
b.m("POST").h(headers).b(body);
|
|
187
|
-
return b.build();
|
|
188
|
-
};
|
|
189
|
-
exports.se_GetDomainCommand = se_GetDomainCommand;
|
|
190
|
-
const se_GetLayoutCommand = async (input, context) => {
|
|
191
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
192
|
-
const headers = {};
|
|
193
|
-
b.bp("/domains/{domainId}/layouts/{layoutId}");
|
|
194
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
195
|
-
b.p("layoutId", () => input.layoutId, "{layoutId}", false);
|
|
196
|
-
let body;
|
|
197
|
-
b.m("POST").h(headers).b(body);
|
|
198
|
-
return b.build();
|
|
199
|
-
};
|
|
200
|
-
exports.se_GetLayoutCommand = se_GetLayoutCommand;
|
|
201
|
-
const se_GetTemplateCommand = async (input, context) => {
|
|
202
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
203
|
-
const headers = {};
|
|
204
|
-
b.bp("/domains/{domainId}/templates/{templateId}");
|
|
205
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
206
|
-
b.p("templateId", () => input.templateId, "{templateId}", false);
|
|
207
|
-
let body;
|
|
208
|
-
b.m("POST").h(headers).b(body);
|
|
209
|
-
return b.build();
|
|
210
|
-
};
|
|
211
|
-
exports.se_GetTemplateCommand = se_GetTemplateCommand;
|
|
212
|
-
const se_ListCasesForContactCommand = async (input, context) => {
|
|
213
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
214
|
-
const headers = {
|
|
215
|
-
"content-type": "application/json",
|
|
216
|
-
};
|
|
217
|
-
b.bp("/domains/{domainId}/list-cases-for-contact");
|
|
218
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
219
|
-
let body;
|
|
220
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
221
|
-
contactArn: [],
|
|
222
|
-
maxResults: [],
|
|
223
|
-
nextToken: [],
|
|
224
|
-
}));
|
|
225
|
-
b.m("POST").h(headers).b(body);
|
|
226
|
-
return b.build();
|
|
227
|
-
};
|
|
228
|
-
exports.se_ListCasesForContactCommand = se_ListCasesForContactCommand;
|
|
229
|
-
const se_ListDomainsCommand = async (input, context) => {
|
|
230
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
231
|
-
const headers = {};
|
|
232
|
-
b.bp("/domains-list");
|
|
233
|
-
const query = (0, smithy_client_1.map)({
|
|
234
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
235
|
-
[_nT]: [, input[_nT]],
|
|
236
|
-
});
|
|
237
|
-
let body;
|
|
238
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
239
|
-
return b.build();
|
|
240
|
-
};
|
|
241
|
-
exports.se_ListDomainsCommand = se_ListDomainsCommand;
|
|
242
|
-
const se_ListFieldOptionsCommand = async (input, context) => {
|
|
243
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
244
|
-
const headers = {};
|
|
245
|
-
b.bp("/domains/{domainId}/fields/{fieldId}/options-list");
|
|
246
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
247
|
-
b.p("fieldId", () => input.fieldId, "{fieldId}", false);
|
|
248
|
-
const query = (0, smithy_client_1.map)({
|
|
249
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
250
|
-
[_nT]: [, input[_nT]],
|
|
251
|
-
[_v]: [() => input.values !== void 0, () => (input[_v] || []).map((_entry) => _entry)],
|
|
252
|
-
});
|
|
253
|
-
let body;
|
|
254
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
255
|
-
return b.build();
|
|
256
|
-
};
|
|
257
|
-
exports.se_ListFieldOptionsCommand = se_ListFieldOptionsCommand;
|
|
258
|
-
const se_ListFieldsCommand = async (input, context) => {
|
|
259
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
260
|
-
const headers = {};
|
|
261
|
-
b.bp("/domains/{domainId}/fields-list");
|
|
262
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
263
|
-
const query = (0, smithy_client_1.map)({
|
|
264
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
265
|
-
[_nT]: [, input[_nT]],
|
|
266
|
-
});
|
|
267
|
-
let body;
|
|
268
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
269
|
-
return b.build();
|
|
270
|
-
};
|
|
271
|
-
exports.se_ListFieldsCommand = se_ListFieldsCommand;
|
|
272
|
-
const se_ListLayoutsCommand = async (input, context) => {
|
|
273
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
274
|
-
const headers = {};
|
|
275
|
-
b.bp("/domains/{domainId}/layouts-list");
|
|
276
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
277
|
-
const query = (0, smithy_client_1.map)({
|
|
278
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
279
|
-
[_nT]: [, input[_nT]],
|
|
280
|
-
});
|
|
281
|
-
let body;
|
|
282
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
283
|
-
return b.build();
|
|
284
|
-
};
|
|
285
|
-
exports.se_ListLayoutsCommand = se_ListLayoutsCommand;
|
|
286
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
287
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
288
|
-
const headers = {};
|
|
289
|
-
b.bp("/tags/{arn}");
|
|
290
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
291
|
-
let body;
|
|
292
|
-
b.m("GET").h(headers).b(body);
|
|
293
|
-
return b.build();
|
|
294
|
-
};
|
|
295
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
296
|
-
const se_ListTemplatesCommand = async (input, context) => {
|
|
297
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
298
|
-
const headers = {};
|
|
299
|
-
b.bp("/domains/{domainId}/templates-list");
|
|
300
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
301
|
-
const query = (0, smithy_client_1.map)({
|
|
302
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
303
|
-
[_nT]: [, input[_nT]],
|
|
304
|
-
[_s]: [() => input.status !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
|
|
305
|
-
});
|
|
306
|
-
let body;
|
|
307
|
-
b.m("POST").h(headers).q(query).b(body);
|
|
308
|
-
return b.build();
|
|
309
|
-
};
|
|
310
|
-
exports.se_ListTemplatesCommand = se_ListTemplatesCommand;
|
|
311
|
-
const se_PutCaseEventConfigurationCommand = async (input, context) => {
|
|
312
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
313
|
-
const headers = {
|
|
314
|
-
"content-type": "application/json",
|
|
315
|
-
};
|
|
316
|
-
b.bp("/domains/{domainId}/case-event-configuration");
|
|
317
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
318
|
-
let body;
|
|
319
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
320
|
-
eventBridge: (_) => (0, smithy_client_1._json)(_),
|
|
321
|
-
}));
|
|
322
|
-
b.m("PUT").h(headers).b(body);
|
|
323
|
-
return b.build();
|
|
324
|
-
};
|
|
325
|
-
exports.se_PutCaseEventConfigurationCommand = se_PutCaseEventConfigurationCommand;
|
|
326
|
-
const se_SearchCasesCommand = async (input, context) => {
|
|
327
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
328
|
-
const headers = {
|
|
329
|
-
"content-type": "application/json",
|
|
330
|
-
};
|
|
331
|
-
b.bp("/domains/{domainId}/cases-search");
|
|
332
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
333
|
-
let body;
|
|
334
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
335
|
-
fields: (_) => (0, smithy_client_1._json)(_),
|
|
336
|
-
filter: (_) => se_CaseFilter(_, context),
|
|
337
|
-
maxResults: [],
|
|
338
|
-
nextToken: [],
|
|
339
|
-
searchTerm: [],
|
|
340
|
-
sorts: (_) => (0, smithy_client_1._json)(_),
|
|
341
|
-
}));
|
|
342
|
-
b.m("POST").h(headers).b(body);
|
|
343
|
-
return b.build();
|
|
344
|
-
};
|
|
345
|
-
exports.se_SearchCasesCommand = se_SearchCasesCommand;
|
|
346
|
-
const se_SearchRelatedItemsCommand = async (input, context) => {
|
|
347
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
348
|
-
const headers = {
|
|
349
|
-
"content-type": "application/json",
|
|
350
|
-
};
|
|
351
|
-
b.bp("/domains/{domainId}/cases/{caseId}/related-items-search");
|
|
352
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
353
|
-
b.p("caseId", () => input.caseId, "{caseId}", false);
|
|
354
|
-
let body;
|
|
355
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
356
|
-
filters: (_) => (0, smithy_client_1._json)(_),
|
|
357
|
-
maxResults: [],
|
|
358
|
-
nextToken: [],
|
|
359
|
-
}));
|
|
360
|
-
b.m("POST").h(headers).b(body);
|
|
361
|
-
return b.build();
|
|
362
|
-
};
|
|
363
|
-
exports.se_SearchRelatedItemsCommand = se_SearchRelatedItemsCommand;
|
|
364
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
365
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
366
|
-
const headers = {
|
|
367
|
-
"content-type": "application/json",
|
|
368
|
-
};
|
|
369
|
-
b.bp("/tags/{arn}");
|
|
370
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
371
|
-
let body;
|
|
372
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
373
|
-
tags: (_) => se_Tags(_, context),
|
|
374
|
-
}));
|
|
375
|
-
b.m("POST").h(headers).b(body);
|
|
376
|
-
return b.build();
|
|
377
|
-
};
|
|
378
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
379
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
380
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
381
|
-
const headers = {};
|
|
382
|
-
b.bp("/tags/{arn}");
|
|
383
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
384
|
-
const query = (0, smithy_client_1.map)({
|
|
385
|
-
[_tK]: [
|
|
386
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
387
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
388
|
-
],
|
|
389
|
-
});
|
|
390
|
-
let body;
|
|
391
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
392
|
-
return b.build();
|
|
393
|
-
};
|
|
394
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
395
|
-
const se_UpdateCaseCommand = async (input, context) => {
|
|
396
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
397
|
-
const headers = {
|
|
398
|
-
"content-type": "application/json",
|
|
399
|
-
};
|
|
400
|
-
b.bp("/domains/{domainId}/cases/{caseId}");
|
|
401
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
402
|
-
b.p("caseId", () => input.caseId, "{caseId}", false);
|
|
403
|
-
let body;
|
|
404
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
405
|
-
fields: (_) => se_FieldValueList(_, context),
|
|
406
|
-
}));
|
|
407
|
-
b.m("PUT").h(headers).b(body);
|
|
408
|
-
return b.build();
|
|
409
|
-
};
|
|
410
|
-
exports.se_UpdateCaseCommand = se_UpdateCaseCommand;
|
|
411
|
-
const se_UpdateFieldCommand = async (input, context) => {
|
|
412
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
413
|
-
const headers = {
|
|
414
|
-
"content-type": "application/json",
|
|
415
|
-
};
|
|
416
|
-
b.bp("/domains/{domainId}/fields/{fieldId}");
|
|
417
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
418
|
-
b.p("fieldId", () => input.fieldId, "{fieldId}", false);
|
|
419
|
-
let body;
|
|
420
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
421
|
-
description: [],
|
|
422
|
-
name: [],
|
|
423
|
-
}));
|
|
424
|
-
b.m("PUT").h(headers).b(body);
|
|
425
|
-
return b.build();
|
|
426
|
-
};
|
|
427
|
-
exports.se_UpdateFieldCommand = se_UpdateFieldCommand;
|
|
428
|
-
const se_UpdateLayoutCommand = async (input, context) => {
|
|
429
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
430
|
-
const headers = {
|
|
431
|
-
"content-type": "application/json",
|
|
432
|
-
};
|
|
433
|
-
b.bp("/domains/{domainId}/layouts/{layoutId}");
|
|
434
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
435
|
-
b.p("layoutId", () => input.layoutId, "{layoutId}", false);
|
|
436
|
-
let body;
|
|
437
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
438
|
-
content: (_) => (0, smithy_client_1._json)(_),
|
|
439
|
-
name: [],
|
|
440
|
-
}));
|
|
441
|
-
b.m("PUT").h(headers).b(body);
|
|
442
|
-
return b.build();
|
|
443
|
-
};
|
|
444
|
-
exports.se_UpdateLayoutCommand = se_UpdateLayoutCommand;
|
|
445
|
-
const se_UpdateTemplateCommand = async (input, context) => {
|
|
446
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
447
|
-
const headers = {
|
|
448
|
-
"content-type": "application/json",
|
|
449
|
-
};
|
|
450
|
-
b.bp("/domains/{domainId}/templates/{templateId}");
|
|
451
|
-
b.p("domainId", () => input.domainId, "{domainId}", false);
|
|
452
|
-
b.p("templateId", () => input.templateId, "{templateId}", false);
|
|
453
|
-
let body;
|
|
454
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
455
|
-
description: [],
|
|
456
|
-
layoutConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
457
|
-
name: [],
|
|
458
|
-
requiredFields: (_) => (0, smithy_client_1._json)(_),
|
|
459
|
-
status: [],
|
|
460
|
-
}));
|
|
461
|
-
b.m("PUT").h(headers).b(body);
|
|
462
|
-
return b.build();
|
|
463
|
-
};
|
|
464
|
-
exports.se_UpdateTemplateCommand = se_UpdateTemplateCommand;
|
|
465
|
-
const de_BatchGetFieldCommand = async (output, context) => {
|
|
466
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
467
|
-
return de_BatchGetFieldCommandError(output, context);
|
|
468
|
-
}
|
|
469
|
-
const contents = (0, smithy_client_1.map)({
|
|
470
|
-
$metadata: deserializeMetadata(output),
|
|
471
|
-
});
|
|
472
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
473
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
474
|
-
errors: smithy_client_1._json,
|
|
475
|
-
fields: (_) => de_BatchGetFieldList(_, context),
|
|
476
|
-
});
|
|
477
|
-
Object.assign(contents, doc);
|
|
478
|
-
return contents;
|
|
479
|
-
};
|
|
480
|
-
exports.de_BatchGetFieldCommand = de_BatchGetFieldCommand;
|
|
481
|
-
const de_BatchGetFieldCommandError = async (output, context) => {
|
|
482
|
-
const parsedOutput = {
|
|
483
|
-
...output,
|
|
484
|
-
body: await parseErrorBody(output.body, context),
|
|
485
|
-
};
|
|
486
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
487
|
-
switch (errorCode) {
|
|
488
|
-
case "AccessDeniedException":
|
|
489
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
490
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
491
|
-
case "InternalServerException":
|
|
492
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
493
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
494
|
-
case "ResourceNotFoundException":
|
|
495
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
496
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
497
|
-
case "ThrottlingException":
|
|
498
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
499
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
500
|
-
case "ValidationException":
|
|
501
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
502
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
503
|
-
default:
|
|
504
|
-
const parsedBody = parsedOutput.body;
|
|
505
|
-
return throwDefaultError({
|
|
506
|
-
output,
|
|
507
|
-
parsedBody,
|
|
508
|
-
errorCode,
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
};
|
|
512
|
-
const de_BatchPutFieldOptionsCommand = async (output, context) => {
|
|
513
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
514
|
-
return de_BatchPutFieldOptionsCommandError(output, context);
|
|
515
|
-
}
|
|
516
|
-
const contents = (0, smithy_client_1.map)({
|
|
517
|
-
$metadata: deserializeMetadata(output),
|
|
518
|
-
});
|
|
519
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
520
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
521
|
-
errors: smithy_client_1._json,
|
|
522
|
-
});
|
|
523
|
-
Object.assign(contents, doc);
|
|
524
|
-
return contents;
|
|
525
|
-
};
|
|
526
|
-
exports.de_BatchPutFieldOptionsCommand = de_BatchPutFieldOptionsCommand;
|
|
527
|
-
const de_BatchPutFieldOptionsCommandError = async (output, context) => {
|
|
528
|
-
const parsedOutput = {
|
|
529
|
-
...output,
|
|
530
|
-
body: await parseErrorBody(output.body, context),
|
|
531
|
-
};
|
|
532
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
533
|
-
switch (errorCode) {
|
|
534
|
-
case "AccessDeniedException":
|
|
535
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
536
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
537
|
-
case "InternalServerException":
|
|
538
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
539
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
540
|
-
case "ResourceNotFoundException":
|
|
541
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
542
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
543
|
-
case "ServiceQuotaExceededException":
|
|
544
|
-
case "com.amazonaws.connectcases#ServiceQuotaExceededException":
|
|
545
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
546
|
-
case "ThrottlingException":
|
|
547
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
548
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
549
|
-
case "ValidationException":
|
|
550
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
551
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
552
|
-
default:
|
|
553
|
-
const parsedBody = parsedOutput.body;
|
|
554
|
-
return throwDefaultError({
|
|
555
|
-
output,
|
|
556
|
-
parsedBody,
|
|
557
|
-
errorCode,
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
const de_CreateCaseCommand = async (output, context) => {
|
|
562
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
563
|
-
return de_CreateCaseCommandError(output, context);
|
|
564
|
-
}
|
|
565
|
-
const contents = (0, smithy_client_1.map)({
|
|
566
|
-
$metadata: deserializeMetadata(output),
|
|
567
|
-
});
|
|
568
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
569
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
570
|
-
caseArn: smithy_client_1.expectString,
|
|
571
|
-
caseId: smithy_client_1.expectString,
|
|
572
|
-
});
|
|
573
|
-
Object.assign(contents, doc);
|
|
574
|
-
return contents;
|
|
575
|
-
};
|
|
576
|
-
exports.de_CreateCaseCommand = de_CreateCaseCommand;
|
|
577
|
-
const de_CreateCaseCommandError = async (output, context) => {
|
|
578
|
-
const parsedOutput = {
|
|
579
|
-
...output,
|
|
580
|
-
body: await parseErrorBody(output.body, context),
|
|
581
|
-
};
|
|
582
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
583
|
-
switch (errorCode) {
|
|
584
|
-
case "AccessDeniedException":
|
|
585
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
586
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
587
|
-
case "ConflictException":
|
|
588
|
-
case "com.amazonaws.connectcases#ConflictException":
|
|
589
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
590
|
-
case "InternalServerException":
|
|
591
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
592
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
593
|
-
case "ResourceNotFoundException":
|
|
594
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
595
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
596
|
-
case "ThrottlingException":
|
|
597
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
598
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
599
|
-
case "ValidationException":
|
|
600
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
601
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
602
|
-
default:
|
|
603
|
-
const parsedBody = parsedOutput.body;
|
|
604
|
-
return throwDefaultError({
|
|
605
|
-
output,
|
|
606
|
-
parsedBody,
|
|
607
|
-
errorCode,
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
};
|
|
611
|
-
const de_CreateDomainCommand = async (output, context) => {
|
|
612
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
613
|
-
return de_CreateDomainCommandError(output, context);
|
|
614
|
-
}
|
|
615
|
-
const contents = (0, smithy_client_1.map)({
|
|
616
|
-
$metadata: deserializeMetadata(output),
|
|
617
|
-
});
|
|
618
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
619
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
620
|
-
domainArn: smithy_client_1.expectString,
|
|
621
|
-
domainId: smithy_client_1.expectString,
|
|
622
|
-
domainStatus: smithy_client_1.expectString,
|
|
623
|
-
});
|
|
624
|
-
Object.assign(contents, doc);
|
|
625
|
-
return contents;
|
|
626
|
-
};
|
|
627
|
-
exports.de_CreateDomainCommand = de_CreateDomainCommand;
|
|
628
|
-
const de_CreateDomainCommandError = async (output, context) => {
|
|
629
|
-
const parsedOutput = {
|
|
630
|
-
...output,
|
|
631
|
-
body: await parseErrorBody(output.body, context),
|
|
632
|
-
};
|
|
633
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
634
|
-
switch (errorCode) {
|
|
635
|
-
case "AccessDeniedException":
|
|
636
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
637
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
638
|
-
case "ConflictException":
|
|
639
|
-
case "com.amazonaws.connectcases#ConflictException":
|
|
640
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
641
|
-
case "InternalServerException":
|
|
642
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
643
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
644
|
-
case "ServiceQuotaExceededException":
|
|
645
|
-
case "com.amazonaws.connectcases#ServiceQuotaExceededException":
|
|
646
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
647
|
-
case "ThrottlingException":
|
|
648
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
649
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
650
|
-
case "ValidationException":
|
|
651
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
652
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
653
|
-
default:
|
|
654
|
-
const parsedBody = parsedOutput.body;
|
|
655
|
-
return throwDefaultError({
|
|
656
|
-
output,
|
|
657
|
-
parsedBody,
|
|
658
|
-
errorCode,
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
};
|
|
662
|
-
const de_CreateFieldCommand = async (output, context) => {
|
|
663
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
664
|
-
return de_CreateFieldCommandError(output, context);
|
|
665
|
-
}
|
|
666
|
-
const contents = (0, smithy_client_1.map)({
|
|
667
|
-
$metadata: deserializeMetadata(output),
|
|
668
|
-
});
|
|
669
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
670
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
671
|
-
fieldArn: smithy_client_1.expectString,
|
|
672
|
-
fieldId: smithy_client_1.expectString,
|
|
673
|
-
});
|
|
674
|
-
Object.assign(contents, doc);
|
|
675
|
-
return contents;
|
|
676
|
-
};
|
|
677
|
-
exports.de_CreateFieldCommand = de_CreateFieldCommand;
|
|
678
|
-
const de_CreateFieldCommandError = async (output, context) => {
|
|
679
|
-
const parsedOutput = {
|
|
680
|
-
...output,
|
|
681
|
-
body: await parseErrorBody(output.body, context),
|
|
682
|
-
};
|
|
683
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
684
|
-
switch (errorCode) {
|
|
685
|
-
case "AccessDeniedException":
|
|
686
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
687
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
688
|
-
case "ConflictException":
|
|
689
|
-
case "com.amazonaws.connectcases#ConflictException":
|
|
690
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
691
|
-
case "InternalServerException":
|
|
692
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
693
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
694
|
-
case "ResourceNotFoundException":
|
|
695
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
696
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
697
|
-
case "ServiceQuotaExceededException":
|
|
698
|
-
case "com.amazonaws.connectcases#ServiceQuotaExceededException":
|
|
699
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
700
|
-
case "ThrottlingException":
|
|
701
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
702
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
703
|
-
case "ValidationException":
|
|
704
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
705
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
706
|
-
default:
|
|
707
|
-
const parsedBody = parsedOutput.body;
|
|
708
|
-
return throwDefaultError({
|
|
709
|
-
output,
|
|
710
|
-
parsedBody,
|
|
711
|
-
errorCode,
|
|
712
|
-
});
|
|
713
|
-
}
|
|
714
|
-
};
|
|
715
|
-
const de_CreateLayoutCommand = async (output, context) => {
|
|
716
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
717
|
-
return de_CreateLayoutCommandError(output, context);
|
|
718
|
-
}
|
|
719
|
-
const contents = (0, smithy_client_1.map)({
|
|
720
|
-
$metadata: deserializeMetadata(output),
|
|
721
|
-
});
|
|
722
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
723
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
724
|
-
layoutArn: smithy_client_1.expectString,
|
|
725
|
-
layoutId: smithy_client_1.expectString,
|
|
726
|
-
});
|
|
727
|
-
Object.assign(contents, doc);
|
|
728
|
-
return contents;
|
|
729
|
-
};
|
|
730
|
-
exports.de_CreateLayoutCommand = de_CreateLayoutCommand;
|
|
731
|
-
const de_CreateLayoutCommandError = async (output, context) => {
|
|
732
|
-
const parsedOutput = {
|
|
733
|
-
...output,
|
|
734
|
-
body: await parseErrorBody(output.body, context),
|
|
735
|
-
};
|
|
736
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
737
|
-
switch (errorCode) {
|
|
738
|
-
case "AccessDeniedException":
|
|
739
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
740
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
741
|
-
case "ConflictException":
|
|
742
|
-
case "com.amazonaws.connectcases#ConflictException":
|
|
743
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
744
|
-
case "InternalServerException":
|
|
745
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
746
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
747
|
-
case "ResourceNotFoundException":
|
|
748
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
749
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
750
|
-
case "ServiceQuotaExceededException":
|
|
751
|
-
case "com.amazonaws.connectcases#ServiceQuotaExceededException":
|
|
752
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
753
|
-
case "ThrottlingException":
|
|
754
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
755
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
756
|
-
case "ValidationException":
|
|
757
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
758
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
759
|
-
default:
|
|
760
|
-
const parsedBody = parsedOutput.body;
|
|
761
|
-
return throwDefaultError({
|
|
762
|
-
output,
|
|
763
|
-
parsedBody,
|
|
764
|
-
errorCode,
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
};
|
|
768
|
-
const de_CreateRelatedItemCommand = async (output, context) => {
|
|
769
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
770
|
-
return de_CreateRelatedItemCommandError(output, context);
|
|
771
|
-
}
|
|
772
|
-
const contents = (0, smithy_client_1.map)({
|
|
773
|
-
$metadata: deserializeMetadata(output),
|
|
774
|
-
});
|
|
775
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
776
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
777
|
-
relatedItemArn: smithy_client_1.expectString,
|
|
778
|
-
relatedItemId: smithy_client_1.expectString,
|
|
779
|
-
});
|
|
780
|
-
Object.assign(contents, doc);
|
|
781
|
-
return contents;
|
|
782
|
-
};
|
|
783
|
-
exports.de_CreateRelatedItemCommand = de_CreateRelatedItemCommand;
|
|
784
|
-
const de_CreateRelatedItemCommandError = async (output, context) => {
|
|
785
|
-
const parsedOutput = {
|
|
786
|
-
...output,
|
|
787
|
-
body: await parseErrorBody(output.body, context),
|
|
788
|
-
};
|
|
789
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
790
|
-
switch (errorCode) {
|
|
791
|
-
case "AccessDeniedException":
|
|
792
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
793
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
794
|
-
case "InternalServerException":
|
|
795
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
796
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
797
|
-
case "ResourceNotFoundException":
|
|
798
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
799
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
800
|
-
case "ServiceQuotaExceededException":
|
|
801
|
-
case "com.amazonaws.connectcases#ServiceQuotaExceededException":
|
|
802
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
803
|
-
case "ThrottlingException":
|
|
804
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
805
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
806
|
-
case "ValidationException":
|
|
807
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
808
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
809
|
-
default:
|
|
810
|
-
const parsedBody = parsedOutput.body;
|
|
811
|
-
return throwDefaultError({
|
|
812
|
-
output,
|
|
813
|
-
parsedBody,
|
|
814
|
-
errorCode,
|
|
815
|
-
});
|
|
816
|
-
}
|
|
817
|
-
};
|
|
818
|
-
const de_CreateTemplateCommand = async (output, context) => {
|
|
819
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
820
|
-
return de_CreateTemplateCommandError(output, context);
|
|
821
|
-
}
|
|
822
|
-
const contents = (0, smithy_client_1.map)({
|
|
823
|
-
$metadata: deserializeMetadata(output),
|
|
824
|
-
});
|
|
825
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
826
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
827
|
-
templateArn: smithy_client_1.expectString,
|
|
828
|
-
templateId: smithy_client_1.expectString,
|
|
829
|
-
});
|
|
830
|
-
Object.assign(contents, doc);
|
|
831
|
-
return contents;
|
|
832
|
-
};
|
|
833
|
-
exports.de_CreateTemplateCommand = de_CreateTemplateCommand;
|
|
834
|
-
const de_CreateTemplateCommandError = async (output, context) => {
|
|
835
|
-
const parsedOutput = {
|
|
836
|
-
...output,
|
|
837
|
-
body: await parseErrorBody(output.body, context),
|
|
838
|
-
};
|
|
839
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
840
|
-
switch (errorCode) {
|
|
841
|
-
case "AccessDeniedException":
|
|
842
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
843
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
844
|
-
case "ConflictException":
|
|
845
|
-
case "com.amazonaws.connectcases#ConflictException":
|
|
846
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
847
|
-
case "InternalServerException":
|
|
848
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
849
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
850
|
-
case "ResourceNotFoundException":
|
|
851
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
852
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
853
|
-
case "ServiceQuotaExceededException":
|
|
854
|
-
case "com.amazonaws.connectcases#ServiceQuotaExceededException":
|
|
855
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
856
|
-
case "ThrottlingException":
|
|
857
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
858
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
859
|
-
case "ValidationException":
|
|
860
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
861
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
862
|
-
default:
|
|
863
|
-
const parsedBody = parsedOutput.body;
|
|
864
|
-
return throwDefaultError({
|
|
865
|
-
output,
|
|
866
|
-
parsedBody,
|
|
867
|
-
errorCode,
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
};
|
|
871
|
-
const de_DeleteDomainCommand = async (output, context) => {
|
|
872
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
873
|
-
return de_DeleteDomainCommandError(output, context);
|
|
874
|
-
}
|
|
875
|
-
const contents = (0, smithy_client_1.map)({
|
|
876
|
-
$metadata: deserializeMetadata(output),
|
|
877
|
-
});
|
|
878
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
879
|
-
return contents;
|
|
880
|
-
};
|
|
881
|
-
exports.de_DeleteDomainCommand = de_DeleteDomainCommand;
|
|
882
|
-
const de_DeleteDomainCommandError = async (output, context) => {
|
|
883
|
-
const parsedOutput = {
|
|
884
|
-
...output,
|
|
885
|
-
body: await parseErrorBody(output.body, context),
|
|
886
|
-
};
|
|
887
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
888
|
-
switch (errorCode) {
|
|
889
|
-
case "AccessDeniedException":
|
|
890
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
891
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
892
|
-
case "ConflictException":
|
|
893
|
-
case "com.amazonaws.connectcases#ConflictException":
|
|
894
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
895
|
-
case "InternalServerException":
|
|
896
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
897
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
898
|
-
case "ResourceNotFoundException":
|
|
899
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
900
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
901
|
-
case "ThrottlingException":
|
|
902
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
903
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
904
|
-
case "ValidationException":
|
|
905
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
906
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
907
|
-
default:
|
|
908
|
-
const parsedBody = parsedOutput.body;
|
|
909
|
-
return throwDefaultError({
|
|
910
|
-
output,
|
|
911
|
-
parsedBody,
|
|
912
|
-
errorCode,
|
|
913
|
-
});
|
|
914
|
-
}
|
|
915
|
-
};
|
|
916
|
-
const de_GetCaseCommand = async (output, context) => {
|
|
917
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
918
|
-
return de_GetCaseCommandError(output, context);
|
|
919
|
-
}
|
|
920
|
-
const contents = (0, smithy_client_1.map)({
|
|
921
|
-
$metadata: deserializeMetadata(output),
|
|
922
|
-
});
|
|
923
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
924
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
925
|
-
fields: (_) => de_FieldValueList(_, context),
|
|
926
|
-
nextToken: smithy_client_1.expectString,
|
|
927
|
-
tags: (_) => de_Tags(_, context),
|
|
928
|
-
templateId: smithy_client_1.expectString,
|
|
929
|
-
});
|
|
930
|
-
Object.assign(contents, doc);
|
|
931
|
-
return contents;
|
|
932
|
-
};
|
|
933
|
-
exports.de_GetCaseCommand = de_GetCaseCommand;
|
|
934
|
-
const de_GetCaseCommandError = async (output, context) => {
|
|
935
|
-
const parsedOutput = {
|
|
936
|
-
...output,
|
|
937
|
-
body: await parseErrorBody(output.body, context),
|
|
938
|
-
};
|
|
939
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
940
|
-
switch (errorCode) {
|
|
941
|
-
case "AccessDeniedException":
|
|
942
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
943
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
944
|
-
case "InternalServerException":
|
|
945
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
946
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
947
|
-
case "ResourceNotFoundException":
|
|
948
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
949
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
950
|
-
case "ThrottlingException":
|
|
951
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
952
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
953
|
-
case "ValidationException":
|
|
954
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
955
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
956
|
-
default:
|
|
957
|
-
const parsedBody = parsedOutput.body;
|
|
958
|
-
return throwDefaultError({
|
|
959
|
-
output,
|
|
960
|
-
parsedBody,
|
|
961
|
-
errorCode,
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
};
|
|
965
|
-
const de_GetCaseEventConfigurationCommand = async (output, context) => {
|
|
966
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
967
|
-
return de_GetCaseEventConfigurationCommandError(output, context);
|
|
968
|
-
}
|
|
969
|
-
const contents = (0, smithy_client_1.map)({
|
|
970
|
-
$metadata: deserializeMetadata(output),
|
|
971
|
-
});
|
|
972
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
973
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
974
|
-
eventBridge: smithy_client_1._json,
|
|
975
|
-
});
|
|
976
|
-
Object.assign(contents, doc);
|
|
977
|
-
return contents;
|
|
978
|
-
};
|
|
979
|
-
exports.de_GetCaseEventConfigurationCommand = de_GetCaseEventConfigurationCommand;
|
|
980
|
-
const de_GetCaseEventConfigurationCommandError = async (output, context) => {
|
|
981
|
-
const parsedOutput = {
|
|
982
|
-
...output,
|
|
983
|
-
body: await parseErrorBody(output.body, context),
|
|
984
|
-
};
|
|
985
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
986
|
-
switch (errorCode) {
|
|
987
|
-
case "AccessDeniedException":
|
|
988
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
989
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
990
|
-
case "InternalServerException":
|
|
991
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
992
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
993
|
-
case "ResourceNotFoundException":
|
|
994
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
995
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
996
|
-
case "ThrottlingException":
|
|
997
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
998
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
999
|
-
case "ValidationException":
|
|
1000
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1001
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1002
|
-
default:
|
|
1003
|
-
const parsedBody = parsedOutput.body;
|
|
1004
|
-
return throwDefaultError({
|
|
1005
|
-
output,
|
|
1006
|
-
parsedBody,
|
|
1007
|
-
errorCode,
|
|
1008
|
-
});
|
|
1009
|
-
}
|
|
1010
|
-
};
|
|
1011
|
-
const de_GetDomainCommand = async (output, context) => {
|
|
1012
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1013
|
-
return de_GetDomainCommandError(output, context);
|
|
1014
|
-
}
|
|
1015
|
-
const contents = (0, smithy_client_1.map)({
|
|
1016
|
-
$metadata: deserializeMetadata(output),
|
|
1017
|
-
});
|
|
1018
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1019
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1020
|
-
createdTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1021
|
-
domainArn: smithy_client_1.expectString,
|
|
1022
|
-
domainId: smithy_client_1.expectString,
|
|
1023
|
-
domainStatus: smithy_client_1.expectString,
|
|
1024
|
-
name: smithy_client_1.expectString,
|
|
1025
|
-
tags: (_) => de_Tags(_, context),
|
|
1026
|
-
});
|
|
1027
|
-
Object.assign(contents, doc);
|
|
1028
|
-
return contents;
|
|
1029
|
-
};
|
|
1030
|
-
exports.de_GetDomainCommand = de_GetDomainCommand;
|
|
1031
|
-
const de_GetDomainCommandError = async (output, context) => {
|
|
1032
|
-
const parsedOutput = {
|
|
1033
|
-
...output,
|
|
1034
|
-
body: await parseErrorBody(output.body, context),
|
|
1035
|
-
};
|
|
1036
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1037
|
-
switch (errorCode) {
|
|
1038
|
-
case "AccessDeniedException":
|
|
1039
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1040
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1041
|
-
case "InternalServerException":
|
|
1042
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1043
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1044
|
-
case "ResourceNotFoundException":
|
|
1045
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1046
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1047
|
-
case "ThrottlingException":
|
|
1048
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1049
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1050
|
-
case "ValidationException":
|
|
1051
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1052
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1053
|
-
default:
|
|
1054
|
-
const parsedBody = parsedOutput.body;
|
|
1055
|
-
return throwDefaultError({
|
|
1056
|
-
output,
|
|
1057
|
-
parsedBody,
|
|
1058
|
-
errorCode,
|
|
1059
|
-
});
|
|
1060
|
-
}
|
|
1061
|
-
};
|
|
1062
|
-
const de_GetLayoutCommand = async (output, context) => {
|
|
1063
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1064
|
-
return de_GetLayoutCommandError(output, context);
|
|
1065
|
-
}
|
|
1066
|
-
const contents = (0, smithy_client_1.map)({
|
|
1067
|
-
$metadata: deserializeMetadata(output),
|
|
1068
|
-
});
|
|
1069
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1070
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1071
|
-
content: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
1072
|
-
layoutArn: smithy_client_1.expectString,
|
|
1073
|
-
layoutId: smithy_client_1.expectString,
|
|
1074
|
-
name: smithy_client_1.expectString,
|
|
1075
|
-
tags: (_) => de_Tags(_, context),
|
|
1076
|
-
});
|
|
1077
|
-
Object.assign(contents, doc);
|
|
1078
|
-
return contents;
|
|
1079
|
-
};
|
|
1080
|
-
exports.de_GetLayoutCommand = de_GetLayoutCommand;
|
|
1081
|
-
const de_GetLayoutCommandError = async (output, context) => {
|
|
1082
|
-
const parsedOutput = {
|
|
1083
|
-
...output,
|
|
1084
|
-
body: await parseErrorBody(output.body, context),
|
|
1085
|
-
};
|
|
1086
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1087
|
-
switch (errorCode) {
|
|
1088
|
-
case "AccessDeniedException":
|
|
1089
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1090
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1091
|
-
case "InternalServerException":
|
|
1092
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1093
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1094
|
-
case "ResourceNotFoundException":
|
|
1095
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1096
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1097
|
-
case "ThrottlingException":
|
|
1098
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1099
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1100
|
-
case "ValidationException":
|
|
1101
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1102
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1103
|
-
default:
|
|
1104
|
-
const parsedBody = parsedOutput.body;
|
|
1105
|
-
return throwDefaultError({
|
|
1106
|
-
output,
|
|
1107
|
-
parsedBody,
|
|
1108
|
-
errorCode,
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
};
|
|
1112
|
-
const de_GetTemplateCommand = async (output, context) => {
|
|
1113
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1114
|
-
return de_GetTemplateCommandError(output, context);
|
|
1115
|
-
}
|
|
1116
|
-
const contents = (0, smithy_client_1.map)({
|
|
1117
|
-
$metadata: deserializeMetadata(output),
|
|
1118
|
-
});
|
|
1119
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1120
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1121
|
-
description: smithy_client_1.expectString,
|
|
1122
|
-
layoutConfiguration: smithy_client_1._json,
|
|
1123
|
-
name: smithy_client_1.expectString,
|
|
1124
|
-
requiredFields: smithy_client_1._json,
|
|
1125
|
-
status: smithy_client_1.expectString,
|
|
1126
|
-
tags: (_) => de_Tags(_, context),
|
|
1127
|
-
templateArn: smithy_client_1.expectString,
|
|
1128
|
-
templateId: smithy_client_1.expectString,
|
|
1129
|
-
});
|
|
1130
|
-
Object.assign(contents, doc);
|
|
1131
|
-
return contents;
|
|
1132
|
-
};
|
|
1133
|
-
exports.de_GetTemplateCommand = de_GetTemplateCommand;
|
|
1134
|
-
const de_GetTemplateCommandError = async (output, context) => {
|
|
1135
|
-
const parsedOutput = {
|
|
1136
|
-
...output,
|
|
1137
|
-
body: await parseErrorBody(output.body, context),
|
|
1138
|
-
};
|
|
1139
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1140
|
-
switch (errorCode) {
|
|
1141
|
-
case "AccessDeniedException":
|
|
1142
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1143
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1144
|
-
case "InternalServerException":
|
|
1145
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1146
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1147
|
-
case "ResourceNotFoundException":
|
|
1148
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1149
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1150
|
-
case "ThrottlingException":
|
|
1151
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1152
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1153
|
-
case "ValidationException":
|
|
1154
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1155
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1156
|
-
default:
|
|
1157
|
-
const parsedBody = parsedOutput.body;
|
|
1158
|
-
return throwDefaultError({
|
|
1159
|
-
output,
|
|
1160
|
-
parsedBody,
|
|
1161
|
-
errorCode,
|
|
1162
|
-
});
|
|
1163
|
-
}
|
|
1164
|
-
};
|
|
1165
|
-
const de_ListCasesForContactCommand = async (output, context) => {
|
|
1166
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1167
|
-
return de_ListCasesForContactCommandError(output, context);
|
|
1168
|
-
}
|
|
1169
|
-
const contents = (0, smithy_client_1.map)({
|
|
1170
|
-
$metadata: deserializeMetadata(output),
|
|
1171
|
-
});
|
|
1172
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1173
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1174
|
-
cases: smithy_client_1._json,
|
|
1175
|
-
nextToken: smithy_client_1.expectString,
|
|
1176
|
-
});
|
|
1177
|
-
Object.assign(contents, doc);
|
|
1178
|
-
return contents;
|
|
1179
|
-
};
|
|
1180
|
-
exports.de_ListCasesForContactCommand = de_ListCasesForContactCommand;
|
|
1181
|
-
const de_ListCasesForContactCommandError = async (output, context) => {
|
|
1182
|
-
const parsedOutput = {
|
|
1183
|
-
...output,
|
|
1184
|
-
body: await parseErrorBody(output.body, context),
|
|
1185
|
-
};
|
|
1186
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1187
|
-
switch (errorCode) {
|
|
1188
|
-
case "AccessDeniedException":
|
|
1189
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1190
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1191
|
-
case "InternalServerException":
|
|
1192
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1193
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1194
|
-
case "ResourceNotFoundException":
|
|
1195
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1196
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1197
|
-
case "ThrottlingException":
|
|
1198
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1199
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1200
|
-
case "ValidationException":
|
|
1201
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1202
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1203
|
-
default:
|
|
1204
|
-
const parsedBody = parsedOutput.body;
|
|
1205
|
-
return throwDefaultError({
|
|
1206
|
-
output,
|
|
1207
|
-
parsedBody,
|
|
1208
|
-
errorCode,
|
|
1209
|
-
});
|
|
1210
|
-
}
|
|
1211
|
-
};
|
|
1212
|
-
const de_ListDomainsCommand = async (output, context) => {
|
|
1213
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1214
|
-
return de_ListDomainsCommandError(output, context);
|
|
1215
|
-
}
|
|
1216
|
-
const contents = (0, smithy_client_1.map)({
|
|
1217
|
-
$metadata: deserializeMetadata(output),
|
|
1218
|
-
});
|
|
1219
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1220
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1221
|
-
domains: smithy_client_1._json,
|
|
1222
|
-
nextToken: smithy_client_1.expectString,
|
|
1223
|
-
});
|
|
1224
|
-
Object.assign(contents, doc);
|
|
1225
|
-
return contents;
|
|
1226
|
-
};
|
|
1227
|
-
exports.de_ListDomainsCommand = de_ListDomainsCommand;
|
|
1228
|
-
const de_ListDomainsCommandError = async (output, context) => {
|
|
1229
|
-
const parsedOutput = {
|
|
1230
|
-
...output,
|
|
1231
|
-
body: await parseErrorBody(output.body, context),
|
|
1232
|
-
};
|
|
1233
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1234
|
-
switch (errorCode) {
|
|
1235
|
-
case "AccessDeniedException":
|
|
1236
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1237
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1238
|
-
case "InternalServerException":
|
|
1239
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1240
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1241
|
-
case "ThrottlingException":
|
|
1242
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1243
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1244
|
-
case "ValidationException":
|
|
1245
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1246
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1247
|
-
default:
|
|
1248
|
-
const parsedBody = parsedOutput.body;
|
|
1249
|
-
return throwDefaultError({
|
|
1250
|
-
output,
|
|
1251
|
-
parsedBody,
|
|
1252
|
-
errorCode,
|
|
1253
|
-
});
|
|
1254
|
-
}
|
|
1255
|
-
};
|
|
1256
|
-
const de_ListFieldOptionsCommand = async (output, context) => {
|
|
1257
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1258
|
-
return de_ListFieldOptionsCommandError(output, context);
|
|
1259
|
-
}
|
|
1260
|
-
const contents = (0, smithy_client_1.map)({
|
|
1261
|
-
$metadata: deserializeMetadata(output),
|
|
1262
|
-
});
|
|
1263
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1264
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1265
|
-
nextToken: smithy_client_1.expectString,
|
|
1266
|
-
options: smithy_client_1._json,
|
|
1267
|
-
});
|
|
1268
|
-
Object.assign(contents, doc);
|
|
1269
|
-
return contents;
|
|
1270
|
-
};
|
|
1271
|
-
exports.de_ListFieldOptionsCommand = de_ListFieldOptionsCommand;
|
|
1272
|
-
const de_ListFieldOptionsCommandError = async (output, context) => {
|
|
1273
|
-
const parsedOutput = {
|
|
1274
|
-
...output,
|
|
1275
|
-
body: await parseErrorBody(output.body, context),
|
|
1276
|
-
};
|
|
1277
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1278
|
-
switch (errorCode) {
|
|
1279
|
-
case "AccessDeniedException":
|
|
1280
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1281
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1282
|
-
case "InternalServerException":
|
|
1283
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1284
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1285
|
-
case "ResourceNotFoundException":
|
|
1286
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1287
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1288
|
-
case "ThrottlingException":
|
|
1289
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1290
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1291
|
-
case "ValidationException":
|
|
1292
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1293
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1294
|
-
default:
|
|
1295
|
-
const parsedBody = parsedOutput.body;
|
|
1296
|
-
return throwDefaultError({
|
|
1297
|
-
output,
|
|
1298
|
-
parsedBody,
|
|
1299
|
-
errorCode,
|
|
1300
|
-
});
|
|
1301
|
-
}
|
|
1302
|
-
};
|
|
1303
|
-
const de_ListFieldsCommand = async (output, context) => {
|
|
1304
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1305
|
-
return de_ListFieldsCommandError(output, context);
|
|
1306
|
-
}
|
|
1307
|
-
const contents = (0, smithy_client_1.map)({
|
|
1308
|
-
$metadata: deserializeMetadata(output),
|
|
1309
|
-
});
|
|
1310
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1311
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1312
|
-
fields: smithy_client_1._json,
|
|
1313
|
-
nextToken: smithy_client_1.expectString,
|
|
1314
|
-
});
|
|
1315
|
-
Object.assign(contents, doc);
|
|
1316
|
-
return contents;
|
|
1317
|
-
};
|
|
1318
|
-
exports.de_ListFieldsCommand = de_ListFieldsCommand;
|
|
1319
|
-
const de_ListFieldsCommandError = async (output, context) => {
|
|
1320
|
-
const parsedOutput = {
|
|
1321
|
-
...output,
|
|
1322
|
-
body: await parseErrorBody(output.body, context),
|
|
1323
|
-
};
|
|
1324
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1325
|
-
switch (errorCode) {
|
|
1326
|
-
case "AccessDeniedException":
|
|
1327
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1328
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1329
|
-
case "InternalServerException":
|
|
1330
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1331
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1332
|
-
case "ResourceNotFoundException":
|
|
1333
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1334
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1335
|
-
case "ThrottlingException":
|
|
1336
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1337
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1338
|
-
case "ValidationException":
|
|
1339
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1340
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1341
|
-
default:
|
|
1342
|
-
const parsedBody = parsedOutput.body;
|
|
1343
|
-
return throwDefaultError({
|
|
1344
|
-
output,
|
|
1345
|
-
parsedBody,
|
|
1346
|
-
errorCode,
|
|
1347
|
-
});
|
|
1348
|
-
}
|
|
1349
|
-
};
|
|
1350
|
-
const de_ListLayoutsCommand = async (output, context) => {
|
|
1351
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1352
|
-
return de_ListLayoutsCommandError(output, context);
|
|
1353
|
-
}
|
|
1354
|
-
const contents = (0, smithy_client_1.map)({
|
|
1355
|
-
$metadata: deserializeMetadata(output),
|
|
1356
|
-
});
|
|
1357
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1358
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1359
|
-
layouts: smithy_client_1._json,
|
|
1360
|
-
nextToken: smithy_client_1.expectString,
|
|
1361
|
-
});
|
|
1362
|
-
Object.assign(contents, doc);
|
|
1363
|
-
return contents;
|
|
1364
|
-
};
|
|
1365
|
-
exports.de_ListLayoutsCommand = de_ListLayoutsCommand;
|
|
1366
|
-
const de_ListLayoutsCommandError = async (output, context) => {
|
|
1367
|
-
const parsedOutput = {
|
|
1368
|
-
...output,
|
|
1369
|
-
body: await parseErrorBody(output.body, context),
|
|
1370
|
-
};
|
|
1371
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1372
|
-
switch (errorCode) {
|
|
1373
|
-
case "AccessDeniedException":
|
|
1374
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1375
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1376
|
-
case "InternalServerException":
|
|
1377
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1378
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1379
|
-
case "ResourceNotFoundException":
|
|
1380
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1381
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1382
|
-
case "ThrottlingException":
|
|
1383
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1384
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1385
|
-
case "ValidationException":
|
|
1386
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1387
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1388
|
-
default:
|
|
1389
|
-
const parsedBody = parsedOutput.body;
|
|
1390
|
-
return throwDefaultError({
|
|
1391
|
-
output,
|
|
1392
|
-
parsedBody,
|
|
1393
|
-
errorCode,
|
|
1394
|
-
});
|
|
1395
|
-
}
|
|
1396
|
-
};
|
|
1397
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1398
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1399
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
1400
|
-
}
|
|
1401
|
-
const contents = (0, smithy_client_1.map)({
|
|
1402
|
-
$metadata: deserializeMetadata(output),
|
|
1403
|
-
});
|
|
1404
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1405
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1406
|
-
tags: (_) => de_Tags(_, context),
|
|
1407
|
-
});
|
|
1408
|
-
Object.assign(contents, doc);
|
|
1409
|
-
return contents;
|
|
1410
|
-
};
|
|
1411
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
1412
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
1413
|
-
const parsedOutput = {
|
|
1414
|
-
...output,
|
|
1415
|
-
body: await parseErrorBody(output.body, context),
|
|
1416
|
-
};
|
|
1417
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1418
|
-
switch (errorCode) {
|
|
1419
|
-
case "AccessDeniedException":
|
|
1420
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1421
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1422
|
-
case "InternalServerException":
|
|
1423
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1424
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1425
|
-
case "ResourceNotFoundException":
|
|
1426
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1427
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1428
|
-
case "ThrottlingException":
|
|
1429
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1430
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1431
|
-
case "ValidationException":
|
|
1432
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1433
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1434
|
-
default:
|
|
1435
|
-
const parsedBody = parsedOutput.body;
|
|
1436
|
-
return throwDefaultError({
|
|
1437
|
-
output,
|
|
1438
|
-
parsedBody,
|
|
1439
|
-
errorCode,
|
|
1440
|
-
});
|
|
1441
|
-
}
|
|
1442
|
-
};
|
|
1443
|
-
const de_ListTemplatesCommand = async (output, context) => {
|
|
1444
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1445
|
-
return de_ListTemplatesCommandError(output, context);
|
|
1446
|
-
}
|
|
1447
|
-
const contents = (0, smithy_client_1.map)({
|
|
1448
|
-
$metadata: deserializeMetadata(output),
|
|
1449
|
-
});
|
|
1450
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1451
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1452
|
-
nextToken: smithy_client_1.expectString,
|
|
1453
|
-
templates: smithy_client_1._json,
|
|
1454
|
-
});
|
|
1455
|
-
Object.assign(contents, doc);
|
|
1456
|
-
return contents;
|
|
1457
|
-
};
|
|
1458
|
-
exports.de_ListTemplatesCommand = de_ListTemplatesCommand;
|
|
1459
|
-
const de_ListTemplatesCommandError = async (output, context) => {
|
|
1460
|
-
const parsedOutput = {
|
|
1461
|
-
...output,
|
|
1462
|
-
body: await parseErrorBody(output.body, context),
|
|
1463
|
-
};
|
|
1464
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1465
|
-
switch (errorCode) {
|
|
1466
|
-
case "AccessDeniedException":
|
|
1467
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1468
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1469
|
-
case "InternalServerException":
|
|
1470
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1471
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1472
|
-
case "ResourceNotFoundException":
|
|
1473
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1474
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1475
|
-
case "ThrottlingException":
|
|
1476
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1477
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1478
|
-
case "ValidationException":
|
|
1479
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1480
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1481
|
-
default:
|
|
1482
|
-
const parsedBody = parsedOutput.body;
|
|
1483
|
-
return throwDefaultError({
|
|
1484
|
-
output,
|
|
1485
|
-
parsedBody,
|
|
1486
|
-
errorCode,
|
|
1487
|
-
});
|
|
1488
|
-
}
|
|
1489
|
-
};
|
|
1490
|
-
const de_PutCaseEventConfigurationCommand = async (output, context) => {
|
|
1491
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1492
|
-
return de_PutCaseEventConfigurationCommandError(output, context);
|
|
1493
|
-
}
|
|
1494
|
-
const contents = (0, smithy_client_1.map)({
|
|
1495
|
-
$metadata: deserializeMetadata(output),
|
|
1496
|
-
});
|
|
1497
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1498
|
-
return contents;
|
|
1499
|
-
};
|
|
1500
|
-
exports.de_PutCaseEventConfigurationCommand = de_PutCaseEventConfigurationCommand;
|
|
1501
|
-
const de_PutCaseEventConfigurationCommandError = async (output, context) => {
|
|
1502
|
-
const parsedOutput = {
|
|
1503
|
-
...output,
|
|
1504
|
-
body: await parseErrorBody(output.body, context),
|
|
1505
|
-
};
|
|
1506
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1507
|
-
switch (errorCode) {
|
|
1508
|
-
case "AccessDeniedException":
|
|
1509
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1510
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1511
|
-
case "InternalServerException":
|
|
1512
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1513
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1514
|
-
case "ResourceNotFoundException":
|
|
1515
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1516
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1517
|
-
case "ThrottlingException":
|
|
1518
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1519
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1520
|
-
case "ValidationException":
|
|
1521
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1522
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1523
|
-
default:
|
|
1524
|
-
const parsedBody = parsedOutput.body;
|
|
1525
|
-
return throwDefaultError({
|
|
1526
|
-
output,
|
|
1527
|
-
parsedBody,
|
|
1528
|
-
errorCode,
|
|
1529
|
-
});
|
|
1530
|
-
}
|
|
1531
|
-
};
|
|
1532
|
-
const de_SearchCasesCommand = async (output, context) => {
|
|
1533
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1534
|
-
return de_SearchCasesCommandError(output, context);
|
|
1535
|
-
}
|
|
1536
|
-
const contents = (0, smithy_client_1.map)({
|
|
1537
|
-
$metadata: deserializeMetadata(output),
|
|
1538
|
-
});
|
|
1539
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1540
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1541
|
-
cases: (_) => de_SearchCasesResponseItemList(_, context),
|
|
1542
|
-
nextToken: smithy_client_1.expectString,
|
|
1543
|
-
});
|
|
1544
|
-
Object.assign(contents, doc);
|
|
1545
|
-
return contents;
|
|
1546
|
-
};
|
|
1547
|
-
exports.de_SearchCasesCommand = de_SearchCasesCommand;
|
|
1548
|
-
const de_SearchCasesCommandError = async (output, context) => {
|
|
1549
|
-
const parsedOutput = {
|
|
1550
|
-
...output,
|
|
1551
|
-
body: await parseErrorBody(output.body, context),
|
|
1552
|
-
};
|
|
1553
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1554
|
-
switch (errorCode) {
|
|
1555
|
-
case "AccessDeniedException":
|
|
1556
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1557
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1558
|
-
case "InternalServerException":
|
|
1559
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1560
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1561
|
-
case "ResourceNotFoundException":
|
|
1562
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1563
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1564
|
-
case "ThrottlingException":
|
|
1565
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1566
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1567
|
-
case "ValidationException":
|
|
1568
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1569
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1570
|
-
default:
|
|
1571
|
-
const parsedBody = parsedOutput.body;
|
|
1572
|
-
return throwDefaultError({
|
|
1573
|
-
output,
|
|
1574
|
-
parsedBody,
|
|
1575
|
-
errorCode,
|
|
1576
|
-
});
|
|
1577
|
-
}
|
|
1578
|
-
};
|
|
1579
|
-
const de_SearchRelatedItemsCommand = async (output, context) => {
|
|
1580
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1581
|
-
return de_SearchRelatedItemsCommandError(output, context);
|
|
1582
|
-
}
|
|
1583
|
-
const contents = (0, smithy_client_1.map)({
|
|
1584
|
-
$metadata: deserializeMetadata(output),
|
|
1585
|
-
});
|
|
1586
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1587
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1588
|
-
nextToken: smithy_client_1.expectString,
|
|
1589
|
-
relatedItems: (_) => de_SearchRelatedItemsResponseItemList(_, context),
|
|
1590
|
-
});
|
|
1591
|
-
Object.assign(contents, doc);
|
|
1592
|
-
return contents;
|
|
1593
|
-
};
|
|
1594
|
-
exports.de_SearchRelatedItemsCommand = de_SearchRelatedItemsCommand;
|
|
1595
|
-
const de_SearchRelatedItemsCommandError = async (output, context) => {
|
|
1596
|
-
const parsedOutput = {
|
|
1597
|
-
...output,
|
|
1598
|
-
body: await parseErrorBody(output.body, context),
|
|
1599
|
-
};
|
|
1600
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1601
|
-
switch (errorCode) {
|
|
1602
|
-
case "AccessDeniedException":
|
|
1603
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1604
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1605
|
-
case "InternalServerException":
|
|
1606
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1607
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1608
|
-
case "ResourceNotFoundException":
|
|
1609
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1610
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1611
|
-
case "ThrottlingException":
|
|
1612
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1613
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1614
|
-
case "ValidationException":
|
|
1615
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1616
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1617
|
-
default:
|
|
1618
|
-
const parsedBody = parsedOutput.body;
|
|
1619
|
-
return throwDefaultError({
|
|
1620
|
-
output,
|
|
1621
|
-
parsedBody,
|
|
1622
|
-
errorCode,
|
|
1623
|
-
});
|
|
1624
|
-
}
|
|
1625
|
-
};
|
|
1626
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1627
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1628
|
-
return de_TagResourceCommandError(output, context);
|
|
1629
|
-
}
|
|
1630
|
-
const contents = (0, smithy_client_1.map)({
|
|
1631
|
-
$metadata: deserializeMetadata(output),
|
|
1632
|
-
});
|
|
1633
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1634
|
-
return contents;
|
|
1635
|
-
};
|
|
1636
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1637
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1638
|
-
const parsedOutput = {
|
|
1639
|
-
...output,
|
|
1640
|
-
body: await parseErrorBody(output.body, context),
|
|
1641
|
-
};
|
|
1642
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1643
|
-
switch (errorCode) {
|
|
1644
|
-
case "AccessDeniedException":
|
|
1645
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1646
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1647
|
-
case "InternalServerException":
|
|
1648
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1649
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1650
|
-
case "ResourceNotFoundException":
|
|
1651
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1652
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1653
|
-
case "ThrottlingException":
|
|
1654
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1655
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1656
|
-
case "ValidationException":
|
|
1657
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1658
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1659
|
-
default:
|
|
1660
|
-
const parsedBody = parsedOutput.body;
|
|
1661
|
-
return throwDefaultError({
|
|
1662
|
-
output,
|
|
1663
|
-
parsedBody,
|
|
1664
|
-
errorCode,
|
|
1665
|
-
});
|
|
1666
|
-
}
|
|
1667
|
-
};
|
|
1668
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1669
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1670
|
-
return de_UntagResourceCommandError(output, context);
|
|
1671
|
-
}
|
|
1672
|
-
const contents = (0, smithy_client_1.map)({
|
|
1673
|
-
$metadata: deserializeMetadata(output),
|
|
1674
|
-
});
|
|
1675
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1676
|
-
return contents;
|
|
1677
|
-
};
|
|
1678
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1679
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1680
|
-
const parsedOutput = {
|
|
1681
|
-
...output,
|
|
1682
|
-
body: await parseErrorBody(output.body, context),
|
|
1683
|
-
};
|
|
1684
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1685
|
-
switch (errorCode) {
|
|
1686
|
-
case "AccessDeniedException":
|
|
1687
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1688
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1689
|
-
case "InternalServerException":
|
|
1690
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1691
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1692
|
-
case "ResourceNotFoundException":
|
|
1693
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1694
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1695
|
-
case "ThrottlingException":
|
|
1696
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1697
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1698
|
-
case "ValidationException":
|
|
1699
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1700
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1701
|
-
default:
|
|
1702
|
-
const parsedBody = parsedOutput.body;
|
|
1703
|
-
return throwDefaultError({
|
|
1704
|
-
output,
|
|
1705
|
-
parsedBody,
|
|
1706
|
-
errorCode,
|
|
1707
|
-
});
|
|
1708
|
-
}
|
|
1709
|
-
};
|
|
1710
|
-
const de_UpdateCaseCommand = async (output, context) => {
|
|
1711
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1712
|
-
return de_UpdateCaseCommandError(output, context);
|
|
1713
|
-
}
|
|
1714
|
-
const contents = (0, smithy_client_1.map)({
|
|
1715
|
-
$metadata: deserializeMetadata(output),
|
|
1716
|
-
});
|
|
1717
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1718
|
-
return contents;
|
|
1719
|
-
};
|
|
1720
|
-
exports.de_UpdateCaseCommand = de_UpdateCaseCommand;
|
|
1721
|
-
const de_UpdateCaseCommandError = async (output, context) => {
|
|
1722
|
-
const parsedOutput = {
|
|
1723
|
-
...output,
|
|
1724
|
-
body: await parseErrorBody(output.body, context),
|
|
1725
|
-
};
|
|
1726
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1727
|
-
switch (errorCode) {
|
|
1728
|
-
case "AccessDeniedException":
|
|
1729
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1730
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1731
|
-
case "InternalServerException":
|
|
1732
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1733
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1734
|
-
case "ResourceNotFoundException":
|
|
1735
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1736
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1737
|
-
case "ThrottlingException":
|
|
1738
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1739
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1740
|
-
case "ValidationException":
|
|
1741
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1742
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1743
|
-
default:
|
|
1744
|
-
const parsedBody = parsedOutput.body;
|
|
1745
|
-
return throwDefaultError({
|
|
1746
|
-
output,
|
|
1747
|
-
parsedBody,
|
|
1748
|
-
errorCode,
|
|
1749
|
-
});
|
|
1750
|
-
}
|
|
1751
|
-
};
|
|
1752
|
-
const de_UpdateFieldCommand = async (output, context) => {
|
|
1753
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1754
|
-
return de_UpdateFieldCommandError(output, context);
|
|
1755
|
-
}
|
|
1756
|
-
const contents = (0, smithy_client_1.map)({
|
|
1757
|
-
$metadata: deserializeMetadata(output),
|
|
1758
|
-
});
|
|
1759
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1760
|
-
return contents;
|
|
1761
|
-
};
|
|
1762
|
-
exports.de_UpdateFieldCommand = de_UpdateFieldCommand;
|
|
1763
|
-
const de_UpdateFieldCommandError = async (output, context) => {
|
|
1764
|
-
const parsedOutput = {
|
|
1765
|
-
...output,
|
|
1766
|
-
body: await parseErrorBody(output.body, context),
|
|
1767
|
-
};
|
|
1768
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1769
|
-
switch (errorCode) {
|
|
1770
|
-
case "AccessDeniedException":
|
|
1771
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1772
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1773
|
-
case "ConflictException":
|
|
1774
|
-
case "com.amazonaws.connectcases#ConflictException":
|
|
1775
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1776
|
-
case "InternalServerException":
|
|
1777
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1778
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1779
|
-
case "ResourceNotFoundException":
|
|
1780
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1781
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1782
|
-
case "ThrottlingException":
|
|
1783
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1784
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1785
|
-
case "ValidationException":
|
|
1786
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1787
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1788
|
-
default:
|
|
1789
|
-
const parsedBody = parsedOutput.body;
|
|
1790
|
-
return throwDefaultError({
|
|
1791
|
-
output,
|
|
1792
|
-
parsedBody,
|
|
1793
|
-
errorCode,
|
|
1794
|
-
});
|
|
1795
|
-
}
|
|
1796
|
-
};
|
|
1797
|
-
const de_UpdateLayoutCommand = async (output, context) => {
|
|
1798
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1799
|
-
return de_UpdateLayoutCommandError(output, context);
|
|
1800
|
-
}
|
|
1801
|
-
const contents = (0, smithy_client_1.map)({
|
|
1802
|
-
$metadata: deserializeMetadata(output),
|
|
1803
|
-
});
|
|
1804
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1805
|
-
return contents;
|
|
1806
|
-
};
|
|
1807
|
-
exports.de_UpdateLayoutCommand = de_UpdateLayoutCommand;
|
|
1808
|
-
const de_UpdateLayoutCommandError = async (output, context) => {
|
|
1809
|
-
const parsedOutput = {
|
|
1810
|
-
...output,
|
|
1811
|
-
body: await parseErrorBody(output.body, context),
|
|
1812
|
-
};
|
|
1813
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1814
|
-
switch (errorCode) {
|
|
1815
|
-
case "AccessDeniedException":
|
|
1816
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1817
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1818
|
-
case "ConflictException":
|
|
1819
|
-
case "com.amazonaws.connectcases#ConflictException":
|
|
1820
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1821
|
-
case "InternalServerException":
|
|
1822
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1823
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1824
|
-
case "ResourceNotFoundException":
|
|
1825
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1826
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1827
|
-
case "ServiceQuotaExceededException":
|
|
1828
|
-
case "com.amazonaws.connectcases#ServiceQuotaExceededException":
|
|
1829
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
1830
|
-
case "ThrottlingException":
|
|
1831
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1832
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1833
|
-
case "ValidationException":
|
|
1834
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1835
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1836
|
-
default:
|
|
1837
|
-
const parsedBody = parsedOutput.body;
|
|
1838
|
-
return throwDefaultError({
|
|
1839
|
-
output,
|
|
1840
|
-
parsedBody,
|
|
1841
|
-
errorCode,
|
|
1842
|
-
});
|
|
1843
|
-
}
|
|
1844
|
-
};
|
|
1845
|
-
const de_UpdateTemplateCommand = async (output, context) => {
|
|
1846
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1847
|
-
return de_UpdateTemplateCommandError(output, context);
|
|
1848
|
-
}
|
|
1849
|
-
const contents = (0, smithy_client_1.map)({
|
|
1850
|
-
$metadata: deserializeMetadata(output),
|
|
1851
|
-
});
|
|
1852
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1853
|
-
return contents;
|
|
1854
|
-
};
|
|
1855
|
-
exports.de_UpdateTemplateCommand = de_UpdateTemplateCommand;
|
|
1856
|
-
const de_UpdateTemplateCommandError = async (output, context) => {
|
|
1857
|
-
const parsedOutput = {
|
|
1858
|
-
...output,
|
|
1859
|
-
body: await parseErrorBody(output.body, context),
|
|
1860
|
-
};
|
|
1861
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1862
|
-
switch (errorCode) {
|
|
1863
|
-
case "AccessDeniedException":
|
|
1864
|
-
case "com.amazonaws.connectcases#AccessDeniedException":
|
|
1865
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1866
|
-
case "ConflictException":
|
|
1867
|
-
case "com.amazonaws.connectcases#ConflictException":
|
|
1868
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1869
|
-
case "InternalServerException":
|
|
1870
|
-
case "com.amazonaws.connectcases#InternalServerException":
|
|
1871
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1872
|
-
case "ResourceNotFoundException":
|
|
1873
|
-
case "com.amazonaws.connectcases#ResourceNotFoundException":
|
|
1874
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1875
|
-
case "ThrottlingException":
|
|
1876
|
-
case "com.amazonaws.connectcases#ThrottlingException":
|
|
1877
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1878
|
-
case "ValidationException":
|
|
1879
|
-
case "com.amazonaws.connectcases#ValidationException":
|
|
1880
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1881
|
-
default:
|
|
1882
|
-
const parsedBody = parsedOutput.body;
|
|
1883
|
-
return throwDefaultError({
|
|
1884
|
-
output,
|
|
1885
|
-
parsedBody,
|
|
1886
|
-
errorCode,
|
|
1887
|
-
});
|
|
1888
|
-
}
|
|
1889
|
-
};
|
|
1890
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(ConnectCasesServiceException_1.ConnectCasesServiceException);
|
|
1891
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1892
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1893
|
-
const data = parsedOutput.body;
|
|
1894
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1895
|
-
message: smithy_client_1.expectString,
|
|
1896
|
-
});
|
|
1897
|
-
Object.assign(contents, doc);
|
|
1898
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1899
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1900
|
-
...contents,
|
|
1901
|
-
});
|
|
1902
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1903
|
-
};
|
|
1904
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1905
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1906
|
-
const data = parsedOutput.body;
|
|
1907
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1908
|
-
message: smithy_client_1.expectString,
|
|
1909
|
-
});
|
|
1910
|
-
Object.assign(contents, doc);
|
|
1911
|
-
const exception = new models_0_1.ConflictException({
|
|
1912
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1913
|
-
...contents,
|
|
1914
|
-
});
|
|
1915
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1916
|
-
};
|
|
1917
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1918
|
-
const contents = (0, smithy_client_1.map)({
|
|
1919
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
1920
|
-
});
|
|
1921
|
-
const data = parsedOutput.body;
|
|
1922
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1923
|
-
message: smithy_client_1.expectString,
|
|
1924
|
-
});
|
|
1925
|
-
Object.assign(contents, doc);
|
|
1926
|
-
const exception = new models_0_1.InternalServerException({
|
|
1927
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1928
|
-
...contents,
|
|
1929
|
-
});
|
|
1930
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1931
|
-
};
|
|
1932
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1933
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1934
|
-
const data = parsedOutput.body;
|
|
1935
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1936
|
-
message: smithy_client_1.expectString,
|
|
1937
|
-
resourceId: smithy_client_1.expectString,
|
|
1938
|
-
resourceType: smithy_client_1.expectString,
|
|
1939
|
-
});
|
|
1940
|
-
Object.assign(contents, doc);
|
|
1941
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1942
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1943
|
-
...contents,
|
|
1944
|
-
});
|
|
1945
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1946
|
-
};
|
|
1947
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1948
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1949
|
-
const data = parsedOutput.body;
|
|
1950
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1951
|
-
message: smithy_client_1.expectString,
|
|
1952
|
-
});
|
|
1953
|
-
Object.assign(contents, doc);
|
|
1954
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1955
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1956
|
-
...contents,
|
|
1957
|
-
});
|
|
1958
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1959
|
-
};
|
|
1960
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1961
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1962
|
-
const data = parsedOutput.body;
|
|
1963
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1964
|
-
message: smithy_client_1.expectString,
|
|
1965
|
-
});
|
|
1966
|
-
Object.assign(contents, doc);
|
|
1967
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1968
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1969
|
-
...contents,
|
|
1970
|
-
});
|
|
1971
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1972
|
-
};
|
|
1973
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1974
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1975
|
-
const data = parsedOutput.body;
|
|
1976
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1977
|
-
message: smithy_client_1.expectString,
|
|
1978
|
-
});
|
|
1979
|
-
Object.assign(contents, doc);
|
|
1980
|
-
const exception = new models_0_1.ValidationException({
|
|
1981
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1982
|
-
...contents,
|
|
1983
|
-
});
|
|
1984
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1985
|
-
};
|
|
1986
|
-
const se_CaseFilter = (input, context) => {
|
|
1987
|
-
return models_0_1.CaseFilter.visit(input, {
|
|
1988
|
-
andAll: (value) => ({ andAll: se_CaseFilterList(value, context) }),
|
|
1989
|
-
field: (value) => ({ field: se_FieldFilter(value, context) }),
|
|
1990
|
-
not: (value) => ({ not: se_CaseFilter(value, context) }),
|
|
1991
|
-
orAll: (value) => ({ orAll: se_CaseFilterList(value, context) }),
|
|
1992
|
-
_: (name, value) => ({ name: value }),
|
|
1993
|
-
});
|
|
1994
|
-
};
|
|
1995
|
-
const se_CaseFilterList = (input, context) => {
|
|
1996
|
-
return input
|
|
1997
|
-
.filter((e) => e != null)
|
|
1998
|
-
.map((entry) => {
|
|
1999
|
-
return se_CaseFilter(entry, context);
|
|
2000
|
-
});
|
|
2001
|
-
};
|
|
2002
|
-
const se_FieldFilter = (input, context) => {
|
|
2003
|
-
return models_0_1.FieldFilter.visit(input, {
|
|
2004
|
-
contains: (value) => ({ contains: se_FieldValue(value, context) }),
|
|
2005
|
-
equalTo: (value) => ({ equalTo: se_FieldValue(value, context) }),
|
|
2006
|
-
greaterThan: (value) => ({ greaterThan: se_FieldValue(value, context) }),
|
|
2007
|
-
greaterThanOrEqualTo: (value) => ({ greaterThanOrEqualTo: se_FieldValue(value, context) }),
|
|
2008
|
-
lessThan: (value) => ({ lessThan: se_FieldValue(value, context) }),
|
|
2009
|
-
lessThanOrEqualTo: (value) => ({ lessThanOrEqualTo: se_FieldValue(value, context) }),
|
|
2010
|
-
_: (name, value) => ({ name: value }),
|
|
2011
|
-
});
|
|
2012
|
-
};
|
|
2013
|
-
const se_FieldValue = (input, context) => {
|
|
2014
|
-
return (0, smithy_client_1.take)(input, {
|
|
2015
|
-
id: [],
|
|
2016
|
-
value: (_) => se_FieldValueUnion(_, context),
|
|
2017
|
-
});
|
|
2018
|
-
};
|
|
2019
|
-
const se_FieldValueList = (input, context) => {
|
|
2020
|
-
return input
|
|
2021
|
-
.filter((e) => e != null)
|
|
2022
|
-
.map((entry) => {
|
|
2023
|
-
return se_FieldValue(entry, context);
|
|
2024
|
-
});
|
|
2025
|
-
};
|
|
2026
|
-
const se_FieldValueUnion = (input, context) => {
|
|
2027
|
-
return models_0_1.FieldValueUnion.visit(input, {
|
|
2028
|
-
booleanValue: (value) => ({ booleanValue: value }),
|
|
2029
|
-
doubleValue: (value) => ({ doubleValue: (0, smithy_client_1.serializeFloat)(value) }),
|
|
2030
|
-
emptyValue: (value) => ({ emptyValue: (0, smithy_client_1._json)(value) }),
|
|
2031
|
-
stringValue: (value) => ({ stringValue: value }),
|
|
2032
|
-
_: (name, value) => ({ name: value }),
|
|
2033
|
-
});
|
|
2034
|
-
};
|
|
2035
|
-
const se_Tags = (input, context) => {
|
|
2036
|
-
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
2037
|
-
if (value === null) {
|
|
2038
|
-
acc[key] = null;
|
|
2039
|
-
return acc;
|
|
2040
|
-
}
|
|
2041
|
-
acc[key] = value;
|
|
2042
|
-
return acc;
|
|
2043
|
-
}, {});
|
|
2044
|
-
};
|
|
2045
|
-
const de_BatchGetFieldList = (output, context) => {
|
|
2046
|
-
const retVal = (output || [])
|
|
2047
|
-
.filter((e) => e != null)
|
|
2048
|
-
.map((entry) => {
|
|
2049
|
-
return de_GetFieldResponse(entry, context);
|
|
2050
|
-
});
|
|
2051
|
-
return retVal;
|
|
2052
|
-
};
|
|
2053
|
-
const de_ContactContent = (output, context) => {
|
|
2054
|
-
return (0, smithy_client_1.take)(output, {
|
|
2055
|
-
channel: smithy_client_1.expectString,
|
|
2056
|
-
connectedToSystemTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2057
|
-
contactArn: smithy_client_1.expectString,
|
|
2058
|
-
});
|
|
2059
|
-
};
|
|
2060
|
-
const de_FieldValue = (output, context) => {
|
|
2061
|
-
return (0, smithy_client_1.take)(output, {
|
|
2062
|
-
id: smithy_client_1.expectString,
|
|
2063
|
-
value: (_) => de_FieldValueUnion((0, core_1.awsExpectUnion)(_), context),
|
|
2064
|
-
});
|
|
2065
|
-
};
|
|
2066
|
-
const de_FieldValueList = (output, context) => {
|
|
2067
|
-
const retVal = (output || [])
|
|
2068
|
-
.filter((e) => e != null)
|
|
2069
|
-
.map((entry) => {
|
|
2070
|
-
return de_FieldValue(entry, context);
|
|
2071
|
-
});
|
|
2072
|
-
return retVal;
|
|
2073
|
-
};
|
|
2074
|
-
const de_FieldValueUnion = (output, context) => {
|
|
2075
|
-
if ((0, smithy_client_1.expectBoolean)(output.booleanValue) !== undefined) {
|
|
2076
|
-
return { booleanValue: (0, smithy_client_1.expectBoolean)(output.booleanValue) };
|
|
2077
|
-
}
|
|
2078
|
-
if ((0, smithy_client_1.limitedParseDouble)(output.doubleValue) !== undefined) {
|
|
2079
|
-
return { doubleValue: (0, smithy_client_1.limitedParseDouble)(output.doubleValue) };
|
|
2080
|
-
}
|
|
2081
|
-
if (output.emptyValue != null) {
|
|
2082
|
-
return {
|
|
2083
|
-
emptyValue: (0, smithy_client_1._json)(output.emptyValue),
|
|
2084
|
-
};
|
|
2085
|
-
}
|
|
2086
|
-
if ((0, smithy_client_1.expectString)(output.stringValue) !== undefined) {
|
|
2087
|
-
return { stringValue: (0, smithy_client_1.expectString)(output.stringValue) };
|
|
2088
|
-
}
|
|
2089
|
-
return { $unknown: Object.entries(output)[0] };
|
|
2090
|
-
};
|
|
2091
|
-
const de_GetFieldResponse = (output, context) => {
|
|
2092
|
-
return (0, smithy_client_1.take)(output, {
|
|
2093
|
-
description: smithy_client_1.expectString,
|
|
2094
|
-
fieldArn: smithy_client_1.expectString,
|
|
2095
|
-
fieldId: smithy_client_1.expectString,
|
|
2096
|
-
name: smithy_client_1.expectString,
|
|
2097
|
-
namespace: smithy_client_1.expectString,
|
|
2098
|
-
tags: (_) => de_Tags(_, context),
|
|
2099
|
-
type: smithy_client_1.expectString,
|
|
2100
|
-
});
|
|
2101
|
-
};
|
|
2102
|
-
const de_RelatedItemContent = (output, context) => {
|
|
2103
|
-
if (output.comment != null) {
|
|
2104
|
-
return {
|
|
2105
|
-
comment: (0, smithy_client_1._json)(output.comment),
|
|
2106
|
-
};
|
|
2107
|
-
}
|
|
2108
|
-
if (output.contact != null) {
|
|
2109
|
-
return {
|
|
2110
|
-
contact: de_ContactContent(output.contact, context),
|
|
2111
|
-
};
|
|
2112
|
-
}
|
|
2113
|
-
return { $unknown: Object.entries(output)[0] };
|
|
2114
|
-
};
|
|
2115
|
-
const de_SearchCasesResponseItem = (output, context) => {
|
|
2116
|
-
return (0, smithy_client_1.take)(output, {
|
|
2117
|
-
caseId: smithy_client_1.expectString,
|
|
2118
|
-
fields: (_) => de_FieldValueList(_, context),
|
|
2119
|
-
tags: (_) => de_Tags(_, context),
|
|
2120
|
-
templateId: smithy_client_1.expectString,
|
|
2121
|
-
});
|
|
2122
|
-
};
|
|
2123
|
-
const de_SearchCasesResponseItemList = (output, context) => {
|
|
2124
|
-
const retVal = (output || []).map((entry) => {
|
|
2125
|
-
if (entry === null) {
|
|
2126
|
-
return null;
|
|
2127
|
-
}
|
|
2128
|
-
return de_SearchCasesResponseItem(entry, context);
|
|
2129
|
-
});
|
|
2130
|
-
return retVal;
|
|
2131
|
-
};
|
|
2132
|
-
const de_SearchRelatedItemsResponseItem = (output, context) => {
|
|
2133
|
-
return (0, smithy_client_1.take)(output, {
|
|
2134
|
-
associationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
2135
|
-
content: (_) => de_RelatedItemContent((0, core_1.awsExpectUnion)(_), context),
|
|
2136
|
-
performedBy: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
2137
|
-
relatedItemId: smithy_client_1.expectString,
|
|
2138
|
-
tags: (_) => de_Tags(_, context),
|
|
2139
|
-
type: smithy_client_1.expectString,
|
|
2140
|
-
});
|
|
2141
|
-
};
|
|
2142
|
-
const de_SearchRelatedItemsResponseItemList = (output, context) => {
|
|
2143
|
-
const retVal = (output || []).map((entry) => {
|
|
2144
|
-
if (entry === null) {
|
|
2145
|
-
return null;
|
|
2146
|
-
}
|
|
2147
|
-
return de_SearchRelatedItemsResponseItem(entry, context);
|
|
2148
|
-
});
|
|
2149
|
-
return retVal;
|
|
2150
|
-
};
|
|
2151
|
-
const de_Tags = (output, context) => {
|
|
2152
|
-
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2153
|
-
if (value === null) {
|
|
2154
|
-
acc[key] = null;
|
|
2155
|
-
return acc;
|
|
2156
|
-
}
|
|
2157
|
-
acc[key] = (0, smithy_client_1.expectString)(value);
|
|
2158
|
-
return acc;
|
|
2159
|
-
}, {});
|
|
2160
|
-
};
|
|
2161
|
-
const deserializeMetadata = (output) => ({
|
|
2162
|
-
httpStatusCode: output.statusCode,
|
|
2163
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
2164
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
2165
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
2166
|
-
});
|
|
2167
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
2168
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
2169
|
-
value !== null &&
|
|
2170
|
-
value !== "" &&
|
|
2171
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
2172
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
2173
|
-
const _mR = "maxResults";
|
|
2174
|
-
const _nT = "nextToken";
|
|
2175
|
-
const _rAS = "retryAfterSeconds";
|
|
2176
|
-
const _ra = "retry-after";
|
|
2177
|
-
const _s = "status";
|
|
2178
|
-
const _tK = "tagKeys";
|
|
2179
|
-
const _v = "values";
|
|
2180
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
2181
|
-
if (encoded.length) {
|
|
2182
|
-
return JSON.parse(encoded);
|
|
2183
|
-
}
|
|
2184
|
-
return {};
|
|
2185
|
-
});
|
|
2186
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
2187
|
-
const value = await parseBody(errorBody, context);
|
|
2188
|
-
value.message = value.message ?? value.Message;
|
|
2189
|
-
return value;
|
|
2190
|
-
};
|
|
2191
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
2192
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
2193
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
2194
|
-
let cleanValue = rawValue;
|
|
2195
|
-
if (typeof cleanValue === "number") {
|
|
2196
|
-
cleanValue = cleanValue.toString();
|
|
2197
|
-
}
|
|
2198
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
2199
|
-
cleanValue = cleanValue.split(",")[0];
|
|
2200
|
-
}
|
|
2201
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
2202
|
-
cleanValue = cleanValue.split(":")[0];
|
|
2203
|
-
}
|
|
2204
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
2205
|
-
cleanValue = cleanValue.split("#")[1];
|
|
2206
|
-
}
|
|
2207
|
-
return cleanValue;
|
|
2208
|
-
};
|
|
2209
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2210
|
-
if (headerKey !== undefined) {
|
|
2211
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2212
|
-
}
|
|
2213
|
-
if (data.code !== undefined) {
|
|
2214
|
-
return sanitizeErrorCode(data.code);
|
|
2215
|
-
}
|
|
2216
|
-
if (data["__type"] !== undefined) {
|
|
2217
|
-
return sanitizeErrorCode(data["__type"]);
|
|
2218
|
-
}
|
|
2219
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|