@aws-sdk/client-support-app 3.181.0 → 3.183.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/CHANGELOG.md +8 -0
- package/dist-es/SupportApp.js +38 -45
- package/dist-es/SupportAppClient.js +22 -28
- package/dist-es/commands/CreateSlackChannelConfigurationCommand.js +21 -28
- package/dist-es/commands/DeleteAccountAliasCommand.js +21 -28
- package/dist-es/commands/DeleteSlackChannelConfigurationCommand.js +21 -28
- package/dist-es/commands/DeleteSlackWorkspaceConfigurationCommand.js +21 -28
- package/dist-es/commands/GetAccountAliasCommand.js +21 -28
- package/dist-es/commands/ListSlackChannelConfigurationsCommand.js +21 -28
- package/dist-es/commands/ListSlackWorkspaceConfigurationsCommand.js +21 -28
- package/dist-es/commands/PutAccountAliasCommand.js +21 -28
- package/dist-es/commands/UpdateSlackChannelConfigurationCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/SupportAppServiceException.js +5 -10
- package/dist-es/models/models_0.js +126 -87
- package/dist-es/pagination/ListSlackChannelConfigurationsPaginator.js +24 -67
- package/dist-es/pagination/ListSlackWorkspaceConfigurationsPaginator.js +24 -67
- package/dist-es/protocols/Aws_restJson1.js +663 -926
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,902 +1,657 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
5
4
|
import { SupportAppServiceException as __BaseException } from "../models/SupportAppServiceException";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
35
|
-
return __generator(this, function (_c) {
|
|
36
|
-
switch (_c.label) {
|
|
37
|
-
case 0: return [4, context.endpoint()];
|
|
38
|
-
case 1:
|
|
39
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
40
|
-
headers = {
|
|
41
|
-
"content-type": "application/json",
|
|
42
|
-
};
|
|
43
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/control/delete-account-alias";
|
|
44
|
-
body = "";
|
|
45
|
-
return [2, new __HttpRequest({
|
|
46
|
-
protocol: protocol,
|
|
47
|
-
hostname: hostname,
|
|
48
|
-
port: port,
|
|
49
|
-
method: "POST",
|
|
50
|
-
headers: headers,
|
|
51
|
-
path: resolvedPath,
|
|
52
|
-
body: body,
|
|
53
|
-
})];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}); };
|
|
57
|
-
export var serializeAws_restJson1DeleteSlackChannelConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
59
|
-
return __generator(this, function (_c) {
|
|
60
|
-
switch (_c.label) {
|
|
61
|
-
case 0: return [4, context.endpoint()];
|
|
62
|
-
case 1:
|
|
63
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
64
|
-
headers = {
|
|
65
|
-
"content-type": "application/json",
|
|
66
|
-
};
|
|
67
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
68
|
-
"/control/delete-slack-channel-configuration";
|
|
69
|
-
body = JSON.stringify(__assign(__assign({}, (input.channelId != null && { channelId: input.channelId })), (input.teamId != null && { teamId: input.teamId })));
|
|
70
|
-
return [2, new __HttpRequest({
|
|
71
|
-
protocol: protocol,
|
|
72
|
-
hostname: hostname,
|
|
73
|
-
port: port,
|
|
74
|
-
method: "POST",
|
|
75
|
-
headers: headers,
|
|
76
|
-
path: resolvedPath,
|
|
77
|
-
body: body,
|
|
78
|
-
})];
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}); };
|
|
82
|
-
export var serializeAws_restJson1DeleteSlackWorkspaceConfigurationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
83
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
84
|
-
return __generator(this, function (_c) {
|
|
85
|
-
switch (_c.label) {
|
|
86
|
-
case 0: return [4, context.endpoint()];
|
|
87
|
-
case 1:
|
|
88
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
89
|
-
headers = {
|
|
90
|
-
"content-type": "application/json",
|
|
91
|
-
};
|
|
92
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
93
|
-
"/control/delete-slack-workspace-configuration";
|
|
94
|
-
body = JSON.stringify(__assign({}, (input.teamId != null && { teamId: input.teamId })));
|
|
95
|
-
return [2, new __HttpRequest({
|
|
96
|
-
protocol: protocol,
|
|
97
|
-
hostname: hostname,
|
|
98
|
-
port: port,
|
|
99
|
-
method: "POST",
|
|
100
|
-
headers: headers,
|
|
101
|
-
path: resolvedPath,
|
|
102
|
-
body: body,
|
|
103
|
-
})];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
}); };
|
|
107
|
-
export var serializeAws_restJson1GetAccountAliasCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
108
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
109
|
-
return __generator(this, function (_c) {
|
|
110
|
-
switch (_c.label) {
|
|
111
|
-
case 0: return [4, context.endpoint()];
|
|
112
|
-
case 1:
|
|
113
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
114
|
-
headers = {
|
|
115
|
-
"content-type": "application/json",
|
|
116
|
-
};
|
|
117
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/control/get-account-alias";
|
|
118
|
-
body = "";
|
|
119
|
-
return [2, new __HttpRequest({
|
|
120
|
-
protocol: protocol,
|
|
121
|
-
hostname: hostname,
|
|
122
|
-
port: port,
|
|
123
|
-
method: "POST",
|
|
124
|
-
headers: headers,
|
|
125
|
-
path: resolvedPath,
|
|
126
|
-
body: body,
|
|
127
|
-
})];
|
|
128
|
-
}
|
|
5
|
+
export const serializeAws_restJson1CreateSlackChannelConfigurationCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/json",
|
|
9
|
+
};
|
|
10
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
11
|
+
"/control/create-slack-channel-configuration";
|
|
12
|
+
let body;
|
|
13
|
+
body = JSON.stringify({
|
|
14
|
+
...(input.channelId != null && { channelId: input.channelId }),
|
|
15
|
+
...(input.channelName != null && { channelName: input.channelName }),
|
|
16
|
+
...(input.channelRoleArn != null && { channelRoleArn: input.channelRoleArn }),
|
|
17
|
+
...(input.notifyOnAddCorrespondenceToCase != null && {
|
|
18
|
+
notifyOnAddCorrespondenceToCase: input.notifyOnAddCorrespondenceToCase,
|
|
19
|
+
}),
|
|
20
|
+
...(input.notifyOnCaseSeverity != null && { notifyOnCaseSeverity: input.notifyOnCaseSeverity }),
|
|
21
|
+
...(input.notifyOnCreateOrReopenCase != null && { notifyOnCreateOrReopenCase: input.notifyOnCreateOrReopenCase }),
|
|
22
|
+
...(input.notifyOnResolveCase != null && { notifyOnResolveCase: input.notifyOnResolveCase }),
|
|
23
|
+
...(input.teamId != null && { teamId: input.teamId }),
|
|
24
|
+
});
|
|
25
|
+
return new __HttpRequest({
|
|
26
|
+
protocol,
|
|
27
|
+
hostname,
|
|
28
|
+
port,
|
|
29
|
+
method: "POST",
|
|
30
|
+
headers,
|
|
31
|
+
path: resolvedPath,
|
|
32
|
+
body,
|
|
129
33
|
});
|
|
130
|
-
}
|
|
131
|
-
export
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
port: port,
|
|
148
|
-
method: "POST",
|
|
149
|
-
headers: headers,
|
|
150
|
-
path: resolvedPath,
|
|
151
|
-
body: body,
|
|
152
|
-
})];
|
|
153
|
-
}
|
|
34
|
+
};
|
|
35
|
+
export const serializeAws_restJson1DeleteAccountAliasCommand = async (input, context) => {
|
|
36
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
37
|
+
const headers = {
|
|
38
|
+
"content-type": "application/json",
|
|
39
|
+
};
|
|
40
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/delete-account-alias";
|
|
41
|
+
let body;
|
|
42
|
+
body = "";
|
|
43
|
+
return new __HttpRequest({
|
|
44
|
+
protocol,
|
|
45
|
+
hostname,
|
|
46
|
+
port,
|
|
47
|
+
method: "POST",
|
|
48
|
+
headers,
|
|
49
|
+
path: resolvedPath,
|
|
50
|
+
body,
|
|
154
51
|
});
|
|
155
|
-
}
|
|
156
|
-
export
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
body: body,
|
|
177
|
-
})];
|
|
178
|
-
}
|
|
52
|
+
};
|
|
53
|
+
export const serializeAws_restJson1DeleteSlackChannelConfigurationCommand = async (input, context) => {
|
|
54
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
55
|
+
const headers = {
|
|
56
|
+
"content-type": "application/json",
|
|
57
|
+
};
|
|
58
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
59
|
+
"/control/delete-slack-channel-configuration";
|
|
60
|
+
let body;
|
|
61
|
+
body = JSON.stringify({
|
|
62
|
+
...(input.channelId != null && { channelId: input.channelId }),
|
|
63
|
+
...(input.teamId != null && { teamId: input.teamId }),
|
|
64
|
+
});
|
|
65
|
+
return new __HttpRequest({
|
|
66
|
+
protocol,
|
|
67
|
+
hostname,
|
|
68
|
+
port,
|
|
69
|
+
method: "POST",
|
|
70
|
+
headers,
|
|
71
|
+
path: resolvedPath,
|
|
72
|
+
body,
|
|
179
73
|
});
|
|
180
|
-
}
|
|
181
|
-
export
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
body: body,
|
|
201
|
-
})];
|
|
202
|
-
}
|
|
74
|
+
};
|
|
75
|
+
export const serializeAws_restJson1DeleteSlackWorkspaceConfigurationCommand = async (input, context) => {
|
|
76
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
77
|
+
const headers = {
|
|
78
|
+
"content-type": "application/json",
|
|
79
|
+
};
|
|
80
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
81
|
+
"/control/delete-slack-workspace-configuration";
|
|
82
|
+
let body;
|
|
83
|
+
body = JSON.stringify({
|
|
84
|
+
...(input.teamId != null && { teamId: input.teamId }),
|
|
85
|
+
});
|
|
86
|
+
return new __HttpRequest({
|
|
87
|
+
protocol,
|
|
88
|
+
hostname,
|
|
89
|
+
port,
|
|
90
|
+
method: "POST",
|
|
91
|
+
headers,
|
|
92
|
+
path: resolvedPath,
|
|
93
|
+
body,
|
|
203
94
|
});
|
|
204
|
-
}
|
|
205
|
-
export
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
protocol: protocol,
|
|
222
|
-
hostname: hostname,
|
|
223
|
-
port: port,
|
|
224
|
-
method: "POST",
|
|
225
|
-
headers: headers,
|
|
226
|
-
path: resolvedPath,
|
|
227
|
-
body: body,
|
|
228
|
-
})];
|
|
229
|
-
}
|
|
95
|
+
};
|
|
96
|
+
export const serializeAws_restJson1GetAccountAliasCommand = async (input, context) => {
|
|
97
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
98
|
+
const headers = {
|
|
99
|
+
"content-type": "application/json",
|
|
100
|
+
};
|
|
101
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/get-account-alias";
|
|
102
|
+
let body;
|
|
103
|
+
body = "";
|
|
104
|
+
return new __HttpRequest({
|
|
105
|
+
protocol,
|
|
106
|
+
hostname,
|
|
107
|
+
port,
|
|
108
|
+
method: "POST",
|
|
109
|
+
headers,
|
|
110
|
+
path: resolvedPath,
|
|
111
|
+
body,
|
|
230
112
|
});
|
|
231
|
-
}
|
|
232
|
-
export
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
113
|
+
};
|
|
114
|
+
export const serializeAws_restJson1ListSlackChannelConfigurationsCommand = async (input, context) => {
|
|
115
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
116
|
+
const headers = {
|
|
117
|
+
"content-type": "application/json",
|
|
118
|
+
};
|
|
119
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
120
|
+
"/control/list-slack-channel-configurations";
|
|
121
|
+
let body;
|
|
122
|
+
body = JSON.stringify({
|
|
123
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
124
|
+
});
|
|
125
|
+
return new __HttpRequest({
|
|
126
|
+
protocol,
|
|
127
|
+
hostname,
|
|
128
|
+
port,
|
|
129
|
+
method: "POST",
|
|
130
|
+
headers,
|
|
131
|
+
path: resolvedPath,
|
|
132
|
+
body,
|
|
248
133
|
});
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
case "com.amazonaws.supportapp#InternalServerException": return [3, 6];
|
|
270
|
-
case "ServiceQuotaExceededException": return [3, 8];
|
|
271
|
-
case "com.amazonaws.supportapp#ServiceQuotaExceededException": return [3, 8];
|
|
272
|
-
case "ValidationException": return [3, 10];
|
|
273
|
-
case "com.amazonaws.supportapp#ValidationException": return [3, 10];
|
|
274
|
-
}
|
|
275
|
-
return [3, 12];
|
|
276
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
277
|
-
case 3: throw _d.sent();
|
|
278
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
279
|
-
case 5: throw _d.sent();
|
|
280
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
281
|
-
case 7: throw _d.sent();
|
|
282
|
-
case 8: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
283
|
-
case 9: throw _d.sent();
|
|
284
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
285
|
-
case 11: throw _d.sent();
|
|
286
|
-
case 12:
|
|
287
|
-
parsedBody = parsedOutput.body;
|
|
288
|
-
throwDefaultError({
|
|
289
|
-
output: output,
|
|
290
|
-
parsedBody: parsedBody,
|
|
291
|
-
exceptionCtor: __BaseException,
|
|
292
|
-
errorCode: errorCode,
|
|
293
|
-
});
|
|
294
|
-
_d.label = 13;
|
|
295
|
-
case 13: return [2];
|
|
296
|
-
}
|
|
134
|
+
};
|
|
135
|
+
export const serializeAws_restJson1ListSlackWorkspaceConfigurationsCommand = async (input, context) => {
|
|
136
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
137
|
+
const headers = {
|
|
138
|
+
"content-type": "application/json",
|
|
139
|
+
};
|
|
140
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
141
|
+
"/control/list-slack-workspace-configurations";
|
|
142
|
+
let body;
|
|
143
|
+
body = JSON.stringify({
|
|
144
|
+
...(input.nextToken != null && { nextToken: input.nextToken }),
|
|
145
|
+
});
|
|
146
|
+
return new __HttpRequest({
|
|
147
|
+
protocol,
|
|
148
|
+
hostname,
|
|
149
|
+
port,
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers,
|
|
152
|
+
path: resolvedPath,
|
|
153
|
+
body,
|
|
297
154
|
});
|
|
298
|
-
}
|
|
299
|
-
export
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
155
|
+
};
|
|
156
|
+
export const serializeAws_restJson1PutAccountAliasCommand = async (input, context) => {
|
|
157
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
158
|
+
const headers = {
|
|
159
|
+
"content-type": "application/json",
|
|
160
|
+
};
|
|
161
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/control/put-account-alias";
|
|
162
|
+
let body;
|
|
163
|
+
body = JSON.stringify({
|
|
164
|
+
...(input.accountAlias != null && { accountAlias: input.accountAlias }),
|
|
165
|
+
});
|
|
166
|
+
return new __HttpRequest({
|
|
167
|
+
protocol,
|
|
168
|
+
hostname,
|
|
169
|
+
port,
|
|
170
|
+
method: "POST",
|
|
171
|
+
headers,
|
|
172
|
+
path: resolvedPath,
|
|
173
|
+
body,
|
|
315
174
|
});
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
case 8:
|
|
346
|
-
parsedBody = parsedOutput.body;
|
|
347
|
-
throwDefaultError({
|
|
348
|
-
output: output,
|
|
349
|
-
parsedBody: parsedBody,
|
|
350
|
-
exceptionCtor: __BaseException,
|
|
351
|
-
errorCode: errorCode,
|
|
352
|
-
});
|
|
353
|
-
_d.label = 9;
|
|
354
|
-
case 9: return [2];
|
|
355
|
-
}
|
|
175
|
+
};
|
|
176
|
+
export const serializeAws_restJson1UpdateSlackChannelConfigurationCommand = async (input, context) => {
|
|
177
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
178
|
+
const headers = {
|
|
179
|
+
"content-type": "application/json",
|
|
180
|
+
};
|
|
181
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
182
|
+
"/control/update-slack-channel-configuration";
|
|
183
|
+
let body;
|
|
184
|
+
body = JSON.stringify({
|
|
185
|
+
...(input.channelId != null && { channelId: input.channelId }),
|
|
186
|
+
...(input.channelName != null && { channelName: input.channelName }),
|
|
187
|
+
...(input.channelRoleArn != null && { channelRoleArn: input.channelRoleArn }),
|
|
188
|
+
...(input.notifyOnAddCorrespondenceToCase != null && {
|
|
189
|
+
notifyOnAddCorrespondenceToCase: input.notifyOnAddCorrespondenceToCase,
|
|
190
|
+
}),
|
|
191
|
+
...(input.notifyOnCaseSeverity != null && { notifyOnCaseSeverity: input.notifyOnCaseSeverity }),
|
|
192
|
+
...(input.notifyOnCreateOrReopenCase != null && { notifyOnCreateOrReopenCase: input.notifyOnCreateOrReopenCase }),
|
|
193
|
+
...(input.notifyOnResolveCase != null && { notifyOnResolveCase: input.notifyOnResolveCase }),
|
|
194
|
+
...(input.teamId != null && { teamId: input.teamId }),
|
|
195
|
+
});
|
|
196
|
+
return new __HttpRequest({
|
|
197
|
+
protocol,
|
|
198
|
+
hostname,
|
|
199
|
+
port,
|
|
200
|
+
method: "POST",
|
|
201
|
+
headers,
|
|
202
|
+
path: resolvedPath,
|
|
203
|
+
body,
|
|
356
204
|
});
|
|
357
|
-
}
|
|
358
|
-
export
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
return [2, deserializeAws_restJson1DeleteSlackChannelConfigurationCommandError(output, context)];
|
|
365
|
-
}
|
|
366
|
-
contents = map({
|
|
367
|
-
$metadata: deserializeMetadata(output),
|
|
368
|
-
});
|
|
369
|
-
return [4, collectBody(output.body, context)];
|
|
370
|
-
case 1:
|
|
371
|
-
_a.sent();
|
|
372
|
-
return [2, contents];
|
|
373
|
-
}
|
|
205
|
+
};
|
|
206
|
+
export const deserializeAws_restJson1CreateSlackChannelConfigurationCommand = async (output, context) => {
|
|
207
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
208
|
+
return deserializeAws_restJson1CreateSlackChannelConfigurationCommandError(output, context);
|
|
209
|
+
}
|
|
210
|
+
const contents = map({
|
|
211
|
+
$metadata: deserializeMetadata(output),
|
|
374
212
|
});
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
parsedBody: parsedBody,
|
|
417
|
-
exceptionCtor: __BaseException,
|
|
418
|
-
errorCode: errorCode,
|
|
419
|
-
});
|
|
420
|
-
_d.label = 13;
|
|
421
|
-
case 13: return [2];
|
|
422
|
-
}
|
|
213
|
+
await collectBody(output.body, context);
|
|
214
|
+
return contents;
|
|
215
|
+
};
|
|
216
|
+
const deserializeAws_restJson1CreateSlackChannelConfigurationCommandError = async (output, context) => {
|
|
217
|
+
const parsedOutput = {
|
|
218
|
+
...output,
|
|
219
|
+
body: await parseErrorBody(output.body, context),
|
|
220
|
+
};
|
|
221
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
222
|
+
switch (errorCode) {
|
|
223
|
+
case "AccessDeniedException":
|
|
224
|
+
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
225
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
226
|
+
case "ConflictException":
|
|
227
|
+
case "com.amazonaws.supportapp#ConflictException":
|
|
228
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
229
|
+
case "InternalServerException":
|
|
230
|
+
case "com.amazonaws.supportapp#InternalServerException":
|
|
231
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
232
|
+
case "ServiceQuotaExceededException":
|
|
233
|
+
case "com.amazonaws.supportapp#ServiceQuotaExceededException":
|
|
234
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
235
|
+
case "ValidationException":
|
|
236
|
+
case "com.amazonaws.supportapp#ValidationException":
|
|
237
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
238
|
+
default:
|
|
239
|
+
const parsedBody = parsedOutput.body;
|
|
240
|
+
throwDefaultError({
|
|
241
|
+
output,
|
|
242
|
+
parsedBody,
|
|
243
|
+
exceptionCtor: __BaseException,
|
|
244
|
+
errorCode,
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
export const deserializeAws_restJson1DeleteAccountAliasCommand = async (output, context) => {
|
|
249
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
250
|
+
return deserializeAws_restJson1DeleteAccountAliasCommandError(output, context);
|
|
251
|
+
}
|
|
252
|
+
const contents = map({
|
|
253
|
+
$metadata: deserializeMetadata(output),
|
|
423
254
|
});
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
255
|
+
await collectBody(output.body, context);
|
|
256
|
+
return contents;
|
|
257
|
+
};
|
|
258
|
+
const deserializeAws_restJson1DeleteAccountAliasCommandError = async (output, context) => {
|
|
259
|
+
const parsedOutput = {
|
|
260
|
+
...output,
|
|
261
|
+
body: await parseErrorBody(output.body, context),
|
|
262
|
+
};
|
|
263
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
264
|
+
switch (errorCode) {
|
|
265
|
+
case "AccessDeniedException":
|
|
266
|
+
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
267
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
268
|
+
case "InternalServerException":
|
|
269
|
+
case "com.amazonaws.supportapp#InternalServerException":
|
|
270
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
271
|
+
case "ResourceNotFoundException":
|
|
272
|
+
case "com.amazonaws.supportapp#ResourceNotFoundException":
|
|
273
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
274
|
+
default:
|
|
275
|
+
const parsedBody = parsedOutput.body;
|
|
276
|
+
throwDefaultError({
|
|
277
|
+
output,
|
|
278
|
+
parsedBody,
|
|
279
|
+
exceptionCtor: __BaseException,
|
|
280
|
+
errorCode,
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
export const deserializeAws_restJson1DeleteSlackChannelConfigurationCommand = async (output, context) => {
|
|
285
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
286
|
+
return deserializeAws_restJson1DeleteSlackChannelConfigurationCommandError(output, context);
|
|
287
|
+
}
|
|
288
|
+
const contents = map({
|
|
289
|
+
$metadata: deserializeMetadata(output),
|
|
441
290
|
});
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
parsedBody: parsedBody,
|
|
484
|
-
exceptionCtor: __BaseException,
|
|
485
|
-
errorCode: errorCode,
|
|
486
|
-
});
|
|
487
|
-
_d.label = 13;
|
|
488
|
-
case 13: return [2];
|
|
489
|
-
}
|
|
291
|
+
await collectBody(output.body, context);
|
|
292
|
+
return contents;
|
|
293
|
+
};
|
|
294
|
+
const deserializeAws_restJson1DeleteSlackChannelConfigurationCommandError = async (output, context) => {
|
|
295
|
+
const parsedOutput = {
|
|
296
|
+
...output,
|
|
297
|
+
body: await parseErrorBody(output.body, context),
|
|
298
|
+
};
|
|
299
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
300
|
+
switch (errorCode) {
|
|
301
|
+
case "AccessDeniedException":
|
|
302
|
+
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
303
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
304
|
+
case "ConflictException":
|
|
305
|
+
case "com.amazonaws.supportapp#ConflictException":
|
|
306
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
307
|
+
case "InternalServerException":
|
|
308
|
+
case "com.amazonaws.supportapp#InternalServerException":
|
|
309
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
310
|
+
case "ResourceNotFoundException":
|
|
311
|
+
case "com.amazonaws.supportapp#ResourceNotFoundException":
|
|
312
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
313
|
+
case "ValidationException":
|
|
314
|
+
case "com.amazonaws.supportapp#ValidationException":
|
|
315
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
316
|
+
default:
|
|
317
|
+
const parsedBody = parsedOutput.body;
|
|
318
|
+
throwDefaultError({
|
|
319
|
+
output,
|
|
320
|
+
parsedBody,
|
|
321
|
+
exceptionCtor: __BaseException,
|
|
322
|
+
errorCode,
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
export const deserializeAws_restJson1DeleteSlackWorkspaceConfigurationCommand = async (output, context) => {
|
|
327
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
328
|
+
return deserializeAws_restJson1DeleteSlackWorkspaceConfigurationCommandError(output, context);
|
|
329
|
+
}
|
|
330
|
+
const contents = map({
|
|
331
|
+
$metadata: deserializeMetadata(output),
|
|
490
332
|
});
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
333
|
+
await collectBody(output.body, context);
|
|
334
|
+
return contents;
|
|
335
|
+
};
|
|
336
|
+
const deserializeAws_restJson1DeleteSlackWorkspaceConfigurationCommandError = async (output, context) => {
|
|
337
|
+
const parsedOutput = {
|
|
338
|
+
...output,
|
|
339
|
+
body: await parseErrorBody(output.body, context),
|
|
340
|
+
};
|
|
341
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
342
|
+
switch (errorCode) {
|
|
343
|
+
case "AccessDeniedException":
|
|
344
|
+
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
345
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
346
|
+
case "ConflictException":
|
|
347
|
+
case "com.amazonaws.supportapp#ConflictException":
|
|
348
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
349
|
+
case "InternalServerException":
|
|
350
|
+
case "com.amazonaws.supportapp#InternalServerException":
|
|
351
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
352
|
+
case "ResourceNotFoundException":
|
|
353
|
+
case "com.amazonaws.supportapp#ResourceNotFoundException":
|
|
354
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
355
|
+
case "ValidationException":
|
|
356
|
+
case "com.amazonaws.supportapp#ValidationException":
|
|
357
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
358
|
+
default:
|
|
359
|
+
const parsedBody = parsedOutput.body;
|
|
360
|
+
throwDefaultError({
|
|
361
|
+
output,
|
|
362
|
+
parsedBody,
|
|
363
|
+
exceptionCtor: __BaseException,
|
|
364
|
+
errorCode,
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
export const deserializeAws_restJson1GetAccountAliasCommand = async (output, context) => {
|
|
369
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
370
|
+
return deserializeAws_restJson1GetAccountAliasCommandError(output, context);
|
|
371
|
+
}
|
|
372
|
+
const contents = map({
|
|
373
|
+
$metadata: deserializeMetadata(output),
|
|
513
374
|
});
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
return
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
375
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
376
|
+
if (data.accountAlias != null) {
|
|
377
|
+
contents.accountAlias = __expectString(data.accountAlias);
|
|
378
|
+
}
|
|
379
|
+
return contents;
|
|
380
|
+
};
|
|
381
|
+
const deserializeAws_restJson1GetAccountAliasCommandError = async (output, context) => {
|
|
382
|
+
const parsedOutput = {
|
|
383
|
+
...output,
|
|
384
|
+
body: await parseErrorBody(output.body, context),
|
|
385
|
+
};
|
|
386
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
387
|
+
switch (errorCode) {
|
|
388
|
+
case "InternalServerException":
|
|
389
|
+
case "com.amazonaws.supportapp#InternalServerException":
|
|
390
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
391
|
+
default:
|
|
392
|
+
const parsedBody = parsedOutput.body;
|
|
393
|
+
throwDefaultError({
|
|
394
|
+
output,
|
|
395
|
+
parsedBody,
|
|
396
|
+
exceptionCtor: __BaseException,
|
|
397
|
+
errorCode,
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
export const deserializeAws_restJson1ListSlackChannelConfigurationsCommand = async (output, context) => {
|
|
402
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
403
|
+
return deserializeAws_restJson1ListSlackChannelConfigurationsCommandError(output, context);
|
|
404
|
+
}
|
|
405
|
+
const contents = map({
|
|
406
|
+
$metadata: deserializeMetadata(output),
|
|
546
407
|
});
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
408
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
409
|
+
if (data.nextToken != null) {
|
|
410
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
411
|
+
}
|
|
412
|
+
if (data.slackChannelConfigurations != null) {
|
|
413
|
+
contents.slackChannelConfigurations = deserializeAws_restJson1slackChannelConfigurationList(data.slackChannelConfigurations, context);
|
|
414
|
+
}
|
|
415
|
+
return contents;
|
|
416
|
+
};
|
|
417
|
+
const deserializeAws_restJson1ListSlackChannelConfigurationsCommandError = async (output, context) => {
|
|
418
|
+
const parsedOutput = {
|
|
419
|
+
...output,
|
|
420
|
+
body: await parseErrorBody(output.body, context),
|
|
421
|
+
};
|
|
422
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
423
|
+
switch (errorCode) {
|
|
424
|
+
case "AccessDeniedException":
|
|
425
|
+
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
426
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
427
|
+
case "InternalServerException":
|
|
428
|
+
case "com.amazonaws.supportapp#InternalServerException":
|
|
429
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
430
|
+
default:
|
|
431
|
+
const parsedBody = parsedOutput.body;
|
|
432
|
+
throwDefaultError({
|
|
433
|
+
output,
|
|
434
|
+
parsedBody,
|
|
435
|
+
exceptionCtor: __BaseException,
|
|
436
|
+
errorCode,
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
export const deserializeAws_restJson1ListSlackWorkspaceConfigurationsCommand = async (output, context) => {
|
|
441
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
442
|
+
return deserializeAws_restJson1ListSlackWorkspaceConfigurationsCommandError(output, context);
|
|
443
|
+
}
|
|
444
|
+
const contents = map({
|
|
445
|
+
$metadata: deserializeMetadata(output),
|
|
572
446
|
});
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
parsedBody
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
447
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
448
|
+
if (data.nextToken != null) {
|
|
449
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
450
|
+
}
|
|
451
|
+
if (data.slackWorkspaceConfigurations != null) {
|
|
452
|
+
contents.slackWorkspaceConfigurations = deserializeAws_restJson1SlackWorkspaceConfigurationList(data.slackWorkspaceConfigurations, context);
|
|
453
|
+
}
|
|
454
|
+
return contents;
|
|
455
|
+
};
|
|
456
|
+
const deserializeAws_restJson1ListSlackWorkspaceConfigurationsCommandError = async (output, context) => {
|
|
457
|
+
const parsedOutput = {
|
|
458
|
+
...output,
|
|
459
|
+
body: await parseErrorBody(output.body, context),
|
|
460
|
+
};
|
|
461
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
462
|
+
switch (errorCode) {
|
|
463
|
+
case "AccessDeniedException":
|
|
464
|
+
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
465
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
466
|
+
case "InternalServerException":
|
|
467
|
+
case "com.amazonaws.supportapp#InternalServerException":
|
|
468
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
469
|
+
default:
|
|
470
|
+
const parsedBody = parsedOutput.body;
|
|
471
|
+
throwDefaultError({
|
|
472
|
+
output,
|
|
473
|
+
parsedBody,
|
|
474
|
+
exceptionCtor: __BaseException,
|
|
475
|
+
errorCode,
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
export const deserializeAws_restJson1PutAccountAliasCommand = async (output, context) => {
|
|
480
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
481
|
+
return deserializeAws_restJson1PutAccountAliasCommandError(output, context);
|
|
482
|
+
}
|
|
483
|
+
const contents = map({
|
|
484
|
+
$metadata: deserializeMetadata(output),
|
|
609
485
|
});
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
486
|
+
await collectBody(output.body, context);
|
|
487
|
+
return contents;
|
|
488
|
+
};
|
|
489
|
+
const deserializeAws_restJson1PutAccountAliasCommandError = async (output, context) => {
|
|
490
|
+
const parsedOutput = {
|
|
491
|
+
...output,
|
|
492
|
+
body: await parseErrorBody(output.body, context),
|
|
493
|
+
};
|
|
494
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
495
|
+
switch (errorCode) {
|
|
496
|
+
case "AccessDeniedException":
|
|
497
|
+
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
498
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
499
|
+
case "InternalServerException":
|
|
500
|
+
case "com.amazonaws.supportapp#InternalServerException":
|
|
501
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
502
|
+
case "ValidationException":
|
|
503
|
+
case "com.amazonaws.supportapp#ValidationException":
|
|
504
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
505
|
+
default:
|
|
506
|
+
const parsedBody = parsedOutput.body;
|
|
507
|
+
throwDefaultError({
|
|
508
|
+
output,
|
|
509
|
+
parsedBody,
|
|
510
|
+
exceptionCtor: __BaseException,
|
|
511
|
+
errorCode,
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
};
|
|
515
|
+
export const deserializeAws_restJson1UpdateSlackChannelConfigurationCommand = async (output, context) => {
|
|
516
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
517
|
+
return deserializeAws_restJson1UpdateSlackChannelConfigurationCommandError(output, context);
|
|
518
|
+
}
|
|
519
|
+
const contents = map({
|
|
520
|
+
$metadata: deserializeMetadata(output),
|
|
635
521
|
});
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
522
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
523
|
+
if (data.channelId != null) {
|
|
524
|
+
contents.channelId = __expectString(data.channelId);
|
|
525
|
+
}
|
|
526
|
+
if (data.channelName != null) {
|
|
527
|
+
contents.channelName = __expectString(data.channelName);
|
|
528
|
+
}
|
|
529
|
+
if (data.channelRoleArn != null) {
|
|
530
|
+
contents.channelRoleArn = __expectString(data.channelRoleArn);
|
|
531
|
+
}
|
|
532
|
+
if (data.notifyOnAddCorrespondenceToCase != null) {
|
|
533
|
+
contents.notifyOnAddCorrespondenceToCase = __expectBoolean(data.notifyOnAddCorrespondenceToCase);
|
|
534
|
+
}
|
|
535
|
+
if (data.notifyOnCaseSeverity != null) {
|
|
536
|
+
contents.notifyOnCaseSeverity = __expectString(data.notifyOnCaseSeverity);
|
|
537
|
+
}
|
|
538
|
+
if (data.notifyOnCreateOrReopenCase != null) {
|
|
539
|
+
contents.notifyOnCreateOrReopenCase = __expectBoolean(data.notifyOnCreateOrReopenCase);
|
|
540
|
+
}
|
|
541
|
+
if (data.notifyOnResolveCase != null) {
|
|
542
|
+
contents.notifyOnResolveCase = __expectBoolean(data.notifyOnResolveCase);
|
|
543
|
+
}
|
|
544
|
+
if (data.teamId != null) {
|
|
545
|
+
contents.teamId = __expectString(data.teamId);
|
|
546
|
+
}
|
|
547
|
+
return contents;
|
|
548
|
+
};
|
|
549
|
+
const deserializeAws_restJson1UpdateSlackChannelConfigurationCommandError = async (output, context) => {
|
|
550
|
+
const parsedOutput = {
|
|
551
|
+
...output,
|
|
552
|
+
body: await parseErrorBody(output.body, context),
|
|
553
|
+
};
|
|
554
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
555
|
+
switch (errorCode) {
|
|
556
|
+
case "AccessDeniedException":
|
|
557
|
+
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
558
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
559
|
+
case "ConflictException":
|
|
560
|
+
case "com.amazonaws.supportapp#ConflictException":
|
|
561
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
562
|
+
case "InternalServerException":
|
|
563
|
+
case "com.amazonaws.supportapp#InternalServerException":
|
|
564
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
565
|
+
case "ResourceNotFoundException":
|
|
566
|
+
case "com.amazonaws.supportapp#ResourceNotFoundException":
|
|
567
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
568
|
+
case "ValidationException":
|
|
569
|
+
case "com.amazonaws.supportapp#ValidationException":
|
|
570
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
571
|
+
default:
|
|
572
|
+
const parsedBody = parsedOutput.body;
|
|
573
|
+
throwDefaultError({
|
|
574
|
+
output,
|
|
575
|
+
parsedBody,
|
|
576
|
+
exceptionCtor: __BaseException,
|
|
577
|
+
errorCode,
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
const map = __map;
|
|
582
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
583
|
+
const contents = map({});
|
|
584
|
+
const data = parsedOutput.body;
|
|
585
|
+
if (data.message != null) {
|
|
586
|
+
contents.message = __expectString(data.message);
|
|
587
|
+
}
|
|
588
|
+
const exception = new AccessDeniedException({
|
|
589
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
590
|
+
...contents,
|
|
672
591
|
});
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
});
|
|
685
|
-
return [4, collectBody(output.body, context)];
|
|
686
|
-
case 1:
|
|
687
|
-
_a.sent();
|
|
688
|
-
return [2, contents];
|
|
689
|
-
}
|
|
592
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
593
|
+
};
|
|
594
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
595
|
+
const contents = map({});
|
|
596
|
+
const data = parsedOutput.body;
|
|
597
|
+
if (data.message != null) {
|
|
598
|
+
contents.message = __expectString(data.message);
|
|
599
|
+
}
|
|
600
|
+
const exception = new ConflictException({
|
|
601
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
602
|
+
...contents,
|
|
690
603
|
});
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
703
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
704
|
-
_b = errorCode;
|
|
705
|
-
switch (_b) {
|
|
706
|
-
case "AccessDeniedException": return [3, 2];
|
|
707
|
-
case "com.amazonaws.supportapp#AccessDeniedException": return [3, 2];
|
|
708
|
-
case "InternalServerException": return [3, 4];
|
|
709
|
-
case "com.amazonaws.supportapp#InternalServerException": return [3, 4];
|
|
710
|
-
case "ValidationException": return [3, 6];
|
|
711
|
-
case "com.amazonaws.supportapp#ValidationException": return [3, 6];
|
|
712
|
-
}
|
|
713
|
-
return [3, 8];
|
|
714
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
715
|
-
case 3: throw _d.sent();
|
|
716
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
717
|
-
case 5: throw _d.sent();
|
|
718
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
719
|
-
case 7: throw _d.sent();
|
|
720
|
-
case 8:
|
|
721
|
-
parsedBody = parsedOutput.body;
|
|
722
|
-
throwDefaultError({
|
|
723
|
-
output: output,
|
|
724
|
-
parsedBody: parsedBody,
|
|
725
|
-
exceptionCtor: __BaseException,
|
|
726
|
-
errorCode: errorCode,
|
|
727
|
-
});
|
|
728
|
-
_d.label = 9;
|
|
729
|
-
case 9: return [2];
|
|
730
|
-
}
|
|
604
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
605
|
+
};
|
|
606
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
607
|
+
const contents = map({});
|
|
608
|
+
const data = parsedOutput.body;
|
|
609
|
+
if (data.message != null) {
|
|
610
|
+
contents.message = __expectString(data.message);
|
|
611
|
+
}
|
|
612
|
+
const exception = new InternalServerException({
|
|
613
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
614
|
+
...contents,
|
|
731
615
|
});
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
});
|
|
744
|
-
_a = __expectNonNull;
|
|
745
|
-
_b = __expectObject;
|
|
746
|
-
return [4, parseBody(output.body, context)];
|
|
747
|
-
case 1:
|
|
748
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
749
|
-
if (data.channelId != null) {
|
|
750
|
-
contents.channelId = __expectString(data.channelId);
|
|
751
|
-
}
|
|
752
|
-
if (data.channelName != null) {
|
|
753
|
-
contents.channelName = __expectString(data.channelName);
|
|
754
|
-
}
|
|
755
|
-
if (data.channelRoleArn != null) {
|
|
756
|
-
contents.channelRoleArn = __expectString(data.channelRoleArn);
|
|
757
|
-
}
|
|
758
|
-
if (data.notifyOnAddCorrespondenceToCase != null) {
|
|
759
|
-
contents.notifyOnAddCorrespondenceToCase = __expectBoolean(data.notifyOnAddCorrespondenceToCase);
|
|
760
|
-
}
|
|
761
|
-
if (data.notifyOnCaseSeverity != null) {
|
|
762
|
-
contents.notifyOnCaseSeverity = __expectString(data.notifyOnCaseSeverity);
|
|
763
|
-
}
|
|
764
|
-
if (data.notifyOnCreateOrReopenCase != null) {
|
|
765
|
-
contents.notifyOnCreateOrReopenCase = __expectBoolean(data.notifyOnCreateOrReopenCase);
|
|
766
|
-
}
|
|
767
|
-
if (data.notifyOnResolveCase != null) {
|
|
768
|
-
contents.notifyOnResolveCase = __expectBoolean(data.notifyOnResolveCase);
|
|
769
|
-
}
|
|
770
|
-
if (data.teamId != null) {
|
|
771
|
-
contents.teamId = __expectString(data.teamId);
|
|
772
|
-
}
|
|
773
|
-
return [2, contents];
|
|
774
|
-
}
|
|
616
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
617
|
+
};
|
|
618
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
619
|
+
const contents = map({});
|
|
620
|
+
const data = parsedOutput.body;
|
|
621
|
+
if (data.message != null) {
|
|
622
|
+
contents.message = __expectString(data.message);
|
|
623
|
+
}
|
|
624
|
+
const exception = new ResourceNotFoundException({
|
|
625
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
626
|
+
...contents,
|
|
775
627
|
});
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
788
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
789
|
-
_b = errorCode;
|
|
790
|
-
switch (_b) {
|
|
791
|
-
case "AccessDeniedException": return [3, 2];
|
|
792
|
-
case "com.amazonaws.supportapp#AccessDeniedException": return [3, 2];
|
|
793
|
-
case "ConflictException": return [3, 4];
|
|
794
|
-
case "com.amazonaws.supportapp#ConflictException": return [3, 4];
|
|
795
|
-
case "InternalServerException": return [3, 6];
|
|
796
|
-
case "com.amazonaws.supportapp#InternalServerException": return [3, 6];
|
|
797
|
-
case "ResourceNotFoundException": return [3, 8];
|
|
798
|
-
case "com.amazonaws.supportapp#ResourceNotFoundException": return [3, 8];
|
|
799
|
-
case "ValidationException": return [3, 10];
|
|
800
|
-
case "com.amazonaws.supportapp#ValidationException": return [3, 10];
|
|
801
|
-
}
|
|
802
|
-
return [3, 12];
|
|
803
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
804
|
-
case 3: throw _d.sent();
|
|
805
|
-
case 4: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
806
|
-
case 5: throw _d.sent();
|
|
807
|
-
case 6: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
808
|
-
case 7: throw _d.sent();
|
|
809
|
-
case 8: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
810
|
-
case 9: throw _d.sent();
|
|
811
|
-
case 10: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
812
|
-
case 11: throw _d.sent();
|
|
813
|
-
case 12:
|
|
814
|
-
parsedBody = parsedOutput.body;
|
|
815
|
-
throwDefaultError({
|
|
816
|
-
output: output,
|
|
817
|
-
parsedBody: parsedBody,
|
|
818
|
-
exceptionCtor: __BaseException,
|
|
819
|
-
errorCode: errorCode,
|
|
820
|
-
});
|
|
821
|
-
_d.label = 13;
|
|
822
|
-
case 13: return [2];
|
|
823
|
-
}
|
|
628
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
629
|
+
};
|
|
630
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
631
|
+
const contents = map({});
|
|
632
|
+
const data = parsedOutput.body;
|
|
633
|
+
if (data.message != null) {
|
|
634
|
+
contents.message = __expectString(data.message);
|
|
635
|
+
}
|
|
636
|
+
const exception = new ServiceQuotaExceededException({
|
|
637
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
638
|
+
...contents,
|
|
824
639
|
});
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
837
|
-
});
|
|
838
|
-
}); };
|
|
839
|
-
var deserializeAws_restJson1ConflictExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
840
|
-
var contents, data, exception;
|
|
841
|
-
return __generator(this, function (_a) {
|
|
842
|
-
contents = map({});
|
|
843
|
-
data = parsedOutput.body;
|
|
844
|
-
if (data.message != null) {
|
|
845
|
-
contents.message = __expectString(data.message);
|
|
846
|
-
}
|
|
847
|
-
exception = new ConflictException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
848
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
849
|
-
});
|
|
850
|
-
}); };
|
|
851
|
-
var deserializeAws_restJson1InternalServerExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
852
|
-
var contents, data, exception;
|
|
853
|
-
return __generator(this, function (_a) {
|
|
854
|
-
contents = map({});
|
|
855
|
-
data = parsedOutput.body;
|
|
856
|
-
if (data.message != null) {
|
|
857
|
-
contents.message = __expectString(data.message);
|
|
858
|
-
}
|
|
859
|
-
exception = new InternalServerException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
860
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
861
|
-
});
|
|
862
|
-
}); };
|
|
863
|
-
var deserializeAws_restJson1ResourceNotFoundExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
864
|
-
var contents, data, exception;
|
|
865
|
-
return __generator(this, function (_a) {
|
|
866
|
-
contents = map({});
|
|
867
|
-
data = parsedOutput.body;
|
|
868
|
-
if (data.message != null) {
|
|
869
|
-
contents.message = __expectString(data.message);
|
|
870
|
-
}
|
|
871
|
-
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
872
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
873
|
-
});
|
|
874
|
-
}); };
|
|
875
|
-
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
876
|
-
var contents, data, exception;
|
|
877
|
-
return __generator(this, function (_a) {
|
|
878
|
-
contents = map({});
|
|
879
|
-
data = parsedOutput.body;
|
|
880
|
-
if (data.message != null) {
|
|
881
|
-
contents.message = __expectString(data.message);
|
|
882
|
-
}
|
|
883
|
-
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
884
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
885
|
-
});
|
|
886
|
-
}); };
|
|
887
|
-
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
888
|
-
var contents, data, exception;
|
|
889
|
-
return __generator(this, function (_a) {
|
|
890
|
-
contents = map({});
|
|
891
|
-
data = parsedOutput.body;
|
|
892
|
-
if (data.message != null) {
|
|
893
|
-
contents.message = __expectString(data.message);
|
|
894
|
-
}
|
|
895
|
-
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
896
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
640
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
641
|
+
};
|
|
642
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
643
|
+
const contents = map({});
|
|
644
|
+
const data = parsedOutput.body;
|
|
645
|
+
if (data.message != null) {
|
|
646
|
+
contents.message = __expectString(data.message);
|
|
647
|
+
}
|
|
648
|
+
const exception = new ValidationException({
|
|
649
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
650
|
+
...contents,
|
|
897
651
|
});
|
|
898
|
-
|
|
899
|
-
|
|
652
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
653
|
+
};
|
|
654
|
+
const deserializeAws_restJson1SlackChannelConfiguration = (output, context) => {
|
|
900
655
|
return {
|
|
901
656
|
channelId: __expectString(output.channelId),
|
|
902
657
|
channelName: __expectString(output.channelName),
|
|
@@ -908,10 +663,10 @@ var deserializeAws_restJson1SlackChannelConfiguration = function (output, contex
|
|
|
908
663
|
teamId: __expectString(output.teamId),
|
|
909
664
|
};
|
|
910
665
|
};
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
.filter(
|
|
914
|
-
.map(
|
|
666
|
+
const deserializeAws_restJson1slackChannelConfigurationList = (output, context) => {
|
|
667
|
+
const retVal = (output || [])
|
|
668
|
+
.filter((e) => e != null)
|
|
669
|
+
.map((entry) => {
|
|
915
670
|
if (entry === null) {
|
|
916
671
|
return null;
|
|
917
672
|
}
|
|
@@ -919,15 +674,15 @@ var deserializeAws_restJson1slackChannelConfigurationList = function (output, co
|
|
|
919
674
|
});
|
|
920
675
|
return retVal;
|
|
921
676
|
};
|
|
922
|
-
|
|
677
|
+
const deserializeAws_restJson1SlackWorkspaceConfiguration = (output, context) => {
|
|
923
678
|
return {
|
|
924
679
|
teamId: __expectString(output.teamId),
|
|
925
680
|
};
|
|
926
681
|
};
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
.filter(
|
|
930
|
-
.map(
|
|
682
|
+
const deserializeAws_restJson1SlackWorkspaceConfigurationList = (output, context) => {
|
|
683
|
+
const retVal = (output || [])
|
|
684
|
+
.filter((e) => e != null)
|
|
685
|
+
.map((entry) => {
|
|
931
686
|
if (entry === null) {
|
|
932
687
|
return null;
|
|
933
688
|
}
|
|
@@ -935,57 +690,39 @@ var deserializeAws_restJson1SlackWorkspaceConfigurationList = function (output,
|
|
|
935
690
|
});
|
|
936
691
|
return retVal;
|
|
937
692
|
};
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
});
|
|
946
|
-
};
|
|
947
|
-
var collectBody = function (streamBody, context) {
|
|
948
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
693
|
+
const deserializeMetadata = (output) => ({
|
|
694
|
+
httpStatusCode: output.statusCode,
|
|
695
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
696
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
697
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
698
|
+
});
|
|
699
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
949
700
|
if (streamBody instanceof Uint8Array) {
|
|
950
701
|
return Promise.resolve(streamBody);
|
|
951
702
|
}
|
|
952
703
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
953
704
|
};
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
705
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
706
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
707
|
+
value !== null &&
|
|
708
|
+
value !== "" &&
|
|
709
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
710
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
711
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
712
|
+
if (encoded.length) {
|
|
713
|
+
return JSON.parse(encoded);
|
|
714
|
+
}
|
|
715
|
+
return {};
|
|
716
|
+
});
|
|
717
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
718
|
+
const value = await parseBody(errorBody, context);
|
|
719
|
+
value.message = value.message ?? value.Message;
|
|
720
|
+
return value;
|
|
963
721
|
};
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
}
|
|
969
|
-
return {};
|
|
970
|
-
});
|
|
971
|
-
};
|
|
972
|
-
var parseErrorBody = function (errorBody, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
973
|
-
var value;
|
|
974
|
-
var _a;
|
|
975
|
-
return __generator(this, function (_b) {
|
|
976
|
-
switch (_b.label) {
|
|
977
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
978
|
-
case 1:
|
|
979
|
-
value = _b.sent();
|
|
980
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
981
|
-
return [2, value];
|
|
982
|
-
}
|
|
983
|
-
});
|
|
984
|
-
}); };
|
|
985
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
986
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
987
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
988
|
-
var cleanValue = rawValue;
|
|
722
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
723
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
724
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
725
|
+
let cleanValue = rawValue;
|
|
989
726
|
if (typeof cleanValue === "number") {
|
|
990
727
|
cleanValue = cleanValue.toString();
|
|
991
728
|
}
|
|
@@ -1000,7 +737,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1000
737
|
}
|
|
1001
738
|
return cleanValue;
|
|
1002
739
|
};
|
|
1003
|
-
|
|
740
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1004
741
|
if (headerKey !== undefined) {
|
|
1005
742
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1006
743
|
}
|