@aws-sdk/client-support-app 3.489.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/SupportApp.js +1 -31
- package/dist-cjs/SupportAppClient.js +1 -43
- package/dist-cjs/commands/CreateSlackChannelConfigurationCommand.js +1 -28
- package/dist-cjs/commands/DeleteAccountAliasCommand.js +1 -28
- package/dist-cjs/commands/DeleteSlackChannelConfigurationCommand.js +1 -28
- package/dist-cjs/commands/DeleteSlackWorkspaceConfigurationCommand.js +1 -28
- package/dist-cjs/commands/GetAccountAliasCommand.js +1 -28
- package/dist-cjs/commands/ListSlackChannelConfigurationsCommand.js +1 -28
- package/dist-cjs/commands/ListSlackWorkspaceConfigurationsCommand.js +1 -28
- package/dist-cjs/commands/PutAccountAliasCommand.js +1 -28
- package/dist-cjs/commands/RegisterSlackWorkspaceForOrganizationCommand.js +1 -28
- package/dist-cjs/commands/UpdateSlackChannelConfigurationCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -13
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1180 -11
- package/dist-cjs/models/SupportAppServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -91
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListSlackChannelConfigurationsPaginator.js +1 -7
- package/dist-cjs/pagination/ListSlackWorkspaceConfigurationsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -6
- package/dist-cjs/protocols/Aws_restJson1.js +1 -698
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,698 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateSlackChannelConfigurationCommand = exports.de_RegisterSlackWorkspaceForOrganizationCommand = exports.de_PutAccountAliasCommand = exports.de_ListSlackWorkspaceConfigurationsCommand = exports.de_ListSlackChannelConfigurationsCommand = exports.de_GetAccountAliasCommand = exports.de_DeleteSlackWorkspaceConfigurationCommand = exports.de_DeleteSlackChannelConfigurationCommand = exports.de_DeleteAccountAliasCommand = exports.de_CreateSlackChannelConfigurationCommand = exports.se_UpdateSlackChannelConfigurationCommand = exports.se_RegisterSlackWorkspaceForOrganizationCommand = exports.se_PutAccountAliasCommand = exports.se_ListSlackWorkspaceConfigurationsCommand = exports.se_ListSlackChannelConfigurationsCommand = exports.se_GetAccountAliasCommand = exports.se_DeleteSlackWorkspaceConfigurationCommand = exports.se_DeleteSlackChannelConfigurationCommand = exports.se_DeleteAccountAliasCommand = exports.se_CreateSlackChannelConfigurationCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const models_0_1 = require("../models/models_0");
|
|
7
|
-
const SupportAppServiceException_1 = require("../models/SupportAppServiceException");
|
|
8
|
-
const se_CreateSlackChannelConfigurationCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/control/create-slack-channel-configuration");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
channelId: [],
|
|
17
|
-
channelName: [],
|
|
18
|
-
channelRoleArn: [],
|
|
19
|
-
notifyOnAddCorrespondenceToCase: [],
|
|
20
|
-
notifyOnCaseSeverity: [],
|
|
21
|
-
notifyOnCreateOrReopenCase: [],
|
|
22
|
-
notifyOnResolveCase: [],
|
|
23
|
-
teamId: [],
|
|
24
|
-
}));
|
|
25
|
-
b.m("POST").h(headers).b(body);
|
|
26
|
-
return b.build();
|
|
27
|
-
};
|
|
28
|
-
exports.se_CreateSlackChannelConfigurationCommand = se_CreateSlackChannelConfigurationCommand;
|
|
29
|
-
const se_DeleteAccountAliasCommand = async (input, context) => {
|
|
30
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
31
|
-
const headers = {
|
|
32
|
-
"content-type": "application/json",
|
|
33
|
-
};
|
|
34
|
-
b.bp("/control/delete-account-alias");
|
|
35
|
-
let body;
|
|
36
|
-
body = "";
|
|
37
|
-
b.m("POST").h(headers).b(body);
|
|
38
|
-
return b.build();
|
|
39
|
-
};
|
|
40
|
-
exports.se_DeleteAccountAliasCommand = se_DeleteAccountAliasCommand;
|
|
41
|
-
const se_DeleteSlackChannelConfigurationCommand = async (input, context) => {
|
|
42
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
43
|
-
const headers = {
|
|
44
|
-
"content-type": "application/json",
|
|
45
|
-
};
|
|
46
|
-
b.bp("/control/delete-slack-channel-configuration");
|
|
47
|
-
let body;
|
|
48
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
49
|
-
channelId: [],
|
|
50
|
-
teamId: [],
|
|
51
|
-
}));
|
|
52
|
-
b.m("POST").h(headers).b(body);
|
|
53
|
-
return b.build();
|
|
54
|
-
};
|
|
55
|
-
exports.se_DeleteSlackChannelConfigurationCommand = se_DeleteSlackChannelConfigurationCommand;
|
|
56
|
-
const se_DeleteSlackWorkspaceConfigurationCommand = async (input, context) => {
|
|
57
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
58
|
-
const headers = {
|
|
59
|
-
"content-type": "application/json",
|
|
60
|
-
};
|
|
61
|
-
b.bp("/control/delete-slack-workspace-configuration");
|
|
62
|
-
let body;
|
|
63
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
64
|
-
teamId: [],
|
|
65
|
-
}));
|
|
66
|
-
b.m("POST").h(headers).b(body);
|
|
67
|
-
return b.build();
|
|
68
|
-
};
|
|
69
|
-
exports.se_DeleteSlackWorkspaceConfigurationCommand = se_DeleteSlackWorkspaceConfigurationCommand;
|
|
70
|
-
const se_GetAccountAliasCommand = async (input, context) => {
|
|
71
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
72
|
-
const headers = {
|
|
73
|
-
"content-type": "application/json",
|
|
74
|
-
};
|
|
75
|
-
b.bp("/control/get-account-alias");
|
|
76
|
-
let body;
|
|
77
|
-
body = "";
|
|
78
|
-
b.m("POST").h(headers).b(body);
|
|
79
|
-
return b.build();
|
|
80
|
-
};
|
|
81
|
-
exports.se_GetAccountAliasCommand = se_GetAccountAliasCommand;
|
|
82
|
-
const se_ListSlackChannelConfigurationsCommand = async (input, context) => {
|
|
83
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
84
|
-
const headers = {
|
|
85
|
-
"content-type": "application/json",
|
|
86
|
-
};
|
|
87
|
-
b.bp("/control/list-slack-channel-configurations");
|
|
88
|
-
let body;
|
|
89
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
90
|
-
nextToken: [],
|
|
91
|
-
}));
|
|
92
|
-
b.m("POST").h(headers).b(body);
|
|
93
|
-
return b.build();
|
|
94
|
-
};
|
|
95
|
-
exports.se_ListSlackChannelConfigurationsCommand = se_ListSlackChannelConfigurationsCommand;
|
|
96
|
-
const se_ListSlackWorkspaceConfigurationsCommand = async (input, context) => {
|
|
97
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
98
|
-
const headers = {
|
|
99
|
-
"content-type": "application/json",
|
|
100
|
-
};
|
|
101
|
-
b.bp("/control/list-slack-workspace-configurations");
|
|
102
|
-
let body;
|
|
103
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
104
|
-
nextToken: [],
|
|
105
|
-
}));
|
|
106
|
-
b.m("POST").h(headers).b(body);
|
|
107
|
-
return b.build();
|
|
108
|
-
};
|
|
109
|
-
exports.se_ListSlackWorkspaceConfigurationsCommand = se_ListSlackWorkspaceConfigurationsCommand;
|
|
110
|
-
const se_PutAccountAliasCommand = async (input, context) => {
|
|
111
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
112
|
-
const headers = {
|
|
113
|
-
"content-type": "application/json",
|
|
114
|
-
};
|
|
115
|
-
b.bp("/control/put-account-alias");
|
|
116
|
-
let body;
|
|
117
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
118
|
-
accountAlias: [],
|
|
119
|
-
}));
|
|
120
|
-
b.m("POST").h(headers).b(body);
|
|
121
|
-
return b.build();
|
|
122
|
-
};
|
|
123
|
-
exports.se_PutAccountAliasCommand = se_PutAccountAliasCommand;
|
|
124
|
-
const se_RegisterSlackWorkspaceForOrganizationCommand = async (input, context) => {
|
|
125
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
126
|
-
const headers = {
|
|
127
|
-
"content-type": "application/json",
|
|
128
|
-
};
|
|
129
|
-
b.bp("/control/register-slack-workspace-for-organization");
|
|
130
|
-
let body;
|
|
131
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
132
|
-
teamId: [],
|
|
133
|
-
}));
|
|
134
|
-
b.m("POST").h(headers).b(body);
|
|
135
|
-
return b.build();
|
|
136
|
-
};
|
|
137
|
-
exports.se_RegisterSlackWorkspaceForOrganizationCommand = se_RegisterSlackWorkspaceForOrganizationCommand;
|
|
138
|
-
const se_UpdateSlackChannelConfigurationCommand = async (input, context) => {
|
|
139
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
140
|
-
const headers = {
|
|
141
|
-
"content-type": "application/json",
|
|
142
|
-
};
|
|
143
|
-
b.bp("/control/update-slack-channel-configuration");
|
|
144
|
-
let body;
|
|
145
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
146
|
-
channelId: [],
|
|
147
|
-
channelName: [],
|
|
148
|
-
channelRoleArn: [],
|
|
149
|
-
notifyOnAddCorrespondenceToCase: [],
|
|
150
|
-
notifyOnCaseSeverity: [],
|
|
151
|
-
notifyOnCreateOrReopenCase: [],
|
|
152
|
-
notifyOnResolveCase: [],
|
|
153
|
-
teamId: [],
|
|
154
|
-
}));
|
|
155
|
-
b.m("POST").h(headers).b(body);
|
|
156
|
-
return b.build();
|
|
157
|
-
};
|
|
158
|
-
exports.se_UpdateSlackChannelConfigurationCommand = se_UpdateSlackChannelConfigurationCommand;
|
|
159
|
-
const de_CreateSlackChannelConfigurationCommand = async (output, context) => {
|
|
160
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
161
|
-
return de_CreateSlackChannelConfigurationCommandError(output, context);
|
|
162
|
-
}
|
|
163
|
-
const contents = (0, smithy_client_1.map)({
|
|
164
|
-
$metadata: deserializeMetadata(output),
|
|
165
|
-
});
|
|
166
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
167
|
-
return contents;
|
|
168
|
-
};
|
|
169
|
-
exports.de_CreateSlackChannelConfigurationCommand = de_CreateSlackChannelConfigurationCommand;
|
|
170
|
-
const de_CreateSlackChannelConfigurationCommandError = async (output, context) => {
|
|
171
|
-
const parsedOutput = {
|
|
172
|
-
...output,
|
|
173
|
-
body: await parseErrorBody(output.body, context),
|
|
174
|
-
};
|
|
175
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
176
|
-
switch (errorCode) {
|
|
177
|
-
case "AccessDeniedException":
|
|
178
|
-
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
179
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
180
|
-
case "ConflictException":
|
|
181
|
-
case "com.amazonaws.supportapp#ConflictException":
|
|
182
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
183
|
-
case "InternalServerException":
|
|
184
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
185
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
186
|
-
case "ServiceQuotaExceededException":
|
|
187
|
-
case "com.amazonaws.supportapp#ServiceQuotaExceededException":
|
|
188
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
189
|
-
case "ValidationException":
|
|
190
|
-
case "com.amazonaws.supportapp#ValidationException":
|
|
191
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
192
|
-
default:
|
|
193
|
-
const parsedBody = parsedOutput.body;
|
|
194
|
-
return throwDefaultError({
|
|
195
|
-
output,
|
|
196
|
-
parsedBody,
|
|
197
|
-
errorCode,
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
const de_DeleteAccountAliasCommand = async (output, context) => {
|
|
202
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
203
|
-
return de_DeleteAccountAliasCommandError(output, context);
|
|
204
|
-
}
|
|
205
|
-
const contents = (0, smithy_client_1.map)({
|
|
206
|
-
$metadata: deserializeMetadata(output),
|
|
207
|
-
});
|
|
208
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
209
|
-
return contents;
|
|
210
|
-
};
|
|
211
|
-
exports.de_DeleteAccountAliasCommand = de_DeleteAccountAliasCommand;
|
|
212
|
-
const de_DeleteAccountAliasCommandError = async (output, context) => {
|
|
213
|
-
const parsedOutput = {
|
|
214
|
-
...output,
|
|
215
|
-
body: await parseErrorBody(output.body, context),
|
|
216
|
-
};
|
|
217
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
218
|
-
switch (errorCode) {
|
|
219
|
-
case "AccessDeniedException":
|
|
220
|
-
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
221
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
222
|
-
case "InternalServerException":
|
|
223
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
224
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
225
|
-
case "ResourceNotFoundException":
|
|
226
|
-
case "com.amazonaws.supportapp#ResourceNotFoundException":
|
|
227
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
228
|
-
default:
|
|
229
|
-
const parsedBody = parsedOutput.body;
|
|
230
|
-
return throwDefaultError({
|
|
231
|
-
output,
|
|
232
|
-
parsedBody,
|
|
233
|
-
errorCode,
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
const de_DeleteSlackChannelConfigurationCommand = async (output, context) => {
|
|
238
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
239
|
-
return de_DeleteSlackChannelConfigurationCommandError(output, context);
|
|
240
|
-
}
|
|
241
|
-
const contents = (0, smithy_client_1.map)({
|
|
242
|
-
$metadata: deserializeMetadata(output),
|
|
243
|
-
});
|
|
244
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
245
|
-
return contents;
|
|
246
|
-
};
|
|
247
|
-
exports.de_DeleteSlackChannelConfigurationCommand = de_DeleteSlackChannelConfigurationCommand;
|
|
248
|
-
const de_DeleteSlackChannelConfigurationCommandError = async (output, context) => {
|
|
249
|
-
const parsedOutput = {
|
|
250
|
-
...output,
|
|
251
|
-
body: await parseErrorBody(output.body, context),
|
|
252
|
-
};
|
|
253
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
254
|
-
switch (errorCode) {
|
|
255
|
-
case "AccessDeniedException":
|
|
256
|
-
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
257
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
258
|
-
case "ConflictException":
|
|
259
|
-
case "com.amazonaws.supportapp#ConflictException":
|
|
260
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
261
|
-
case "InternalServerException":
|
|
262
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
263
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
264
|
-
case "ResourceNotFoundException":
|
|
265
|
-
case "com.amazonaws.supportapp#ResourceNotFoundException":
|
|
266
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
267
|
-
case "ValidationException":
|
|
268
|
-
case "com.amazonaws.supportapp#ValidationException":
|
|
269
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
270
|
-
default:
|
|
271
|
-
const parsedBody = parsedOutput.body;
|
|
272
|
-
return throwDefaultError({
|
|
273
|
-
output,
|
|
274
|
-
parsedBody,
|
|
275
|
-
errorCode,
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
const de_DeleteSlackWorkspaceConfigurationCommand = async (output, context) => {
|
|
280
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
281
|
-
return de_DeleteSlackWorkspaceConfigurationCommandError(output, context);
|
|
282
|
-
}
|
|
283
|
-
const contents = (0, smithy_client_1.map)({
|
|
284
|
-
$metadata: deserializeMetadata(output),
|
|
285
|
-
});
|
|
286
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
287
|
-
return contents;
|
|
288
|
-
};
|
|
289
|
-
exports.de_DeleteSlackWorkspaceConfigurationCommand = de_DeleteSlackWorkspaceConfigurationCommand;
|
|
290
|
-
const de_DeleteSlackWorkspaceConfigurationCommandError = async (output, context) => {
|
|
291
|
-
const parsedOutput = {
|
|
292
|
-
...output,
|
|
293
|
-
body: await parseErrorBody(output.body, context),
|
|
294
|
-
};
|
|
295
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
296
|
-
switch (errorCode) {
|
|
297
|
-
case "AccessDeniedException":
|
|
298
|
-
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
299
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
300
|
-
case "ConflictException":
|
|
301
|
-
case "com.amazonaws.supportapp#ConflictException":
|
|
302
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
303
|
-
case "InternalServerException":
|
|
304
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
305
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
306
|
-
case "ResourceNotFoundException":
|
|
307
|
-
case "com.amazonaws.supportapp#ResourceNotFoundException":
|
|
308
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
309
|
-
case "ValidationException":
|
|
310
|
-
case "com.amazonaws.supportapp#ValidationException":
|
|
311
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
312
|
-
default:
|
|
313
|
-
const parsedBody = parsedOutput.body;
|
|
314
|
-
return throwDefaultError({
|
|
315
|
-
output,
|
|
316
|
-
parsedBody,
|
|
317
|
-
errorCode,
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
const de_GetAccountAliasCommand = async (output, context) => {
|
|
322
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
323
|
-
return de_GetAccountAliasCommandError(output, context);
|
|
324
|
-
}
|
|
325
|
-
const contents = (0, smithy_client_1.map)({
|
|
326
|
-
$metadata: deserializeMetadata(output),
|
|
327
|
-
});
|
|
328
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
329
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
330
|
-
accountAlias: smithy_client_1.expectString,
|
|
331
|
-
});
|
|
332
|
-
Object.assign(contents, doc);
|
|
333
|
-
return contents;
|
|
334
|
-
};
|
|
335
|
-
exports.de_GetAccountAliasCommand = de_GetAccountAliasCommand;
|
|
336
|
-
const de_GetAccountAliasCommandError = 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 "InternalServerException":
|
|
344
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
345
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
346
|
-
default:
|
|
347
|
-
const parsedBody = parsedOutput.body;
|
|
348
|
-
return throwDefaultError({
|
|
349
|
-
output,
|
|
350
|
-
parsedBody,
|
|
351
|
-
errorCode,
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
const de_ListSlackChannelConfigurationsCommand = async (output, context) => {
|
|
356
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
357
|
-
return de_ListSlackChannelConfigurationsCommandError(output, context);
|
|
358
|
-
}
|
|
359
|
-
const contents = (0, smithy_client_1.map)({
|
|
360
|
-
$metadata: deserializeMetadata(output),
|
|
361
|
-
});
|
|
362
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
363
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
364
|
-
nextToken: smithy_client_1.expectString,
|
|
365
|
-
slackChannelConfigurations: smithy_client_1._json,
|
|
366
|
-
});
|
|
367
|
-
Object.assign(contents, doc);
|
|
368
|
-
return contents;
|
|
369
|
-
};
|
|
370
|
-
exports.de_ListSlackChannelConfigurationsCommand = de_ListSlackChannelConfigurationsCommand;
|
|
371
|
-
const de_ListSlackChannelConfigurationsCommandError = async (output, context) => {
|
|
372
|
-
const parsedOutput = {
|
|
373
|
-
...output,
|
|
374
|
-
body: await parseErrorBody(output.body, context),
|
|
375
|
-
};
|
|
376
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
377
|
-
switch (errorCode) {
|
|
378
|
-
case "AccessDeniedException":
|
|
379
|
-
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
380
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
381
|
-
case "InternalServerException":
|
|
382
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
383
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
384
|
-
default:
|
|
385
|
-
const parsedBody = parsedOutput.body;
|
|
386
|
-
return throwDefaultError({
|
|
387
|
-
output,
|
|
388
|
-
parsedBody,
|
|
389
|
-
errorCode,
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
const de_ListSlackWorkspaceConfigurationsCommand = async (output, context) => {
|
|
394
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
395
|
-
return de_ListSlackWorkspaceConfigurationsCommandError(output, context);
|
|
396
|
-
}
|
|
397
|
-
const contents = (0, smithy_client_1.map)({
|
|
398
|
-
$metadata: deserializeMetadata(output),
|
|
399
|
-
});
|
|
400
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
401
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
402
|
-
nextToken: smithy_client_1.expectString,
|
|
403
|
-
slackWorkspaceConfigurations: smithy_client_1._json,
|
|
404
|
-
});
|
|
405
|
-
Object.assign(contents, doc);
|
|
406
|
-
return contents;
|
|
407
|
-
};
|
|
408
|
-
exports.de_ListSlackWorkspaceConfigurationsCommand = de_ListSlackWorkspaceConfigurationsCommand;
|
|
409
|
-
const de_ListSlackWorkspaceConfigurationsCommandError = async (output, context) => {
|
|
410
|
-
const parsedOutput = {
|
|
411
|
-
...output,
|
|
412
|
-
body: await parseErrorBody(output.body, context),
|
|
413
|
-
};
|
|
414
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
415
|
-
switch (errorCode) {
|
|
416
|
-
case "AccessDeniedException":
|
|
417
|
-
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
418
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
419
|
-
case "InternalServerException":
|
|
420
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
421
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
422
|
-
default:
|
|
423
|
-
const parsedBody = parsedOutput.body;
|
|
424
|
-
return throwDefaultError({
|
|
425
|
-
output,
|
|
426
|
-
parsedBody,
|
|
427
|
-
errorCode,
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
const de_PutAccountAliasCommand = async (output, context) => {
|
|
432
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
433
|
-
return de_PutAccountAliasCommandError(output, context);
|
|
434
|
-
}
|
|
435
|
-
const contents = (0, smithy_client_1.map)({
|
|
436
|
-
$metadata: deserializeMetadata(output),
|
|
437
|
-
});
|
|
438
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
439
|
-
return contents;
|
|
440
|
-
};
|
|
441
|
-
exports.de_PutAccountAliasCommand = de_PutAccountAliasCommand;
|
|
442
|
-
const de_PutAccountAliasCommandError = async (output, context) => {
|
|
443
|
-
const parsedOutput = {
|
|
444
|
-
...output,
|
|
445
|
-
body: await parseErrorBody(output.body, context),
|
|
446
|
-
};
|
|
447
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
448
|
-
switch (errorCode) {
|
|
449
|
-
case "AccessDeniedException":
|
|
450
|
-
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
451
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
452
|
-
case "InternalServerException":
|
|
453
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
454
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
455
|
-
case "ValidationException":
|
|
456
|
-
case "com.amazonaws.supportapp#ValidationException":
|
|
457
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
458
|
-
default:
|
|
459
|
-
const parsedBody = parsedOutput.body;
|
|
460
|
-
return throwDefaultError({
|
|
461
|
-
output,
|
|
462
|
-
parsedBody,
|
|
463
|
-
errorCode,
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
};
|
|
467
|
-
const de_RegisterSlackWorkspaceForOrganizationCommand = async (output, context) => {
|
|
468
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
469
|
-
return de_RegisterSlackWorkspaceForOrganizationCommandError(output, context);
|
|
470
|
-
}
|
|
471
|
-
const contents = (0, smithy_client_1.map)({
|
|
472
|
-
$metadata: deserializeMetadata(output),
|
|
473
|
-
});
|
|
474
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
475
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
476
|
-
accountType: smithy_client_1.expectString,
|
|
477
|
-
teamId: smithy_client_1.expectString,
|
|
478
|
-
teamName: smithy_client_1.expectString,
|
|
479
|
-
});
|
|
480
|
-
Object.assign(contents, doc);
|
|
481
|
-
return contents;
|
|
482
|
-
};
|
|
483
|
-
exports.de_RegisterSlackWorkspaceForOrganizationCommand = de_RegisterSlackWorkspaceForOrganizationCommand;
|
|
484
|
-
const de_RegisterSlackWorkspaceForOrganizationCommandError = async (output, context) => {
|
|
485
|
-
const parsedOutput = {
|
|
486
|
-
...output,
|
|
487
|
-
body: await parseErrorBody(output.body, context),
|
|
488
|
-
};
|
|
489
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
490
|
-
switch (errorCode) {
|
|
491
|
-
case "AccessDeniedException":
|
|
492
|
-
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
493
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
494
|
-
case "ConflictException":
|
|
495
|
-
case "com.amazonaws.supportapp#ConflictException":
|
|
496
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
497
|
-
case "InternalServerException":
|
|
498
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
499
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
500
|
-
case "ResourceNotFoundException":
|
|
501
|
-
case "com.amazonaws.supportapp#ResourceNotFoundException":
|
|
502
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
503
|
-
case "ValidationException":
|
|
504
|
-
case "com.amazonaws.supportapp#ValidationException":
|
|
505
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
506
|
-
default:
|
|
507
|
-
const parsedBody = parsedOutput.body;
|
|
508
|
-
return throwDefaultError({
|
|
509
|
-
output,
|
|
510
|
-
parsedBody,
|
|
511
|
-
errorCode,
|
|
512
|
-
});
|
|
513
|
-
}
|
|
514
|
-
};
|
|
515
|
-
const de_UpdateSlackChannelConfigurationCommand = async (output, context) => {
|
|
516
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
517
|
-
return de_UpdateSlackChannelConfigurationCommandError(output, context);
|
|
518
|
-
}
|
|
519
|
-
const contents = (0, smithy_client_1.map)({
|
|
520
|
-
$metadata: deserializeMetadata(output),
|
|
521
|
-
});
|
|
522
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
523
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
524
|
-
channelId: smithy_client_1.expectString,
|
|
525
|
-
channelName: smithy_client_1.expectString,
|
|
526
|
-
channelRoleArn: smithy_client_1.expectString,
|
|
527
|
-
notifyOnAddCorrespondenceToCase: smithy_client_1.expectBoolean,
|
|
528
|
-
notifyOnCaseSeverity: smithy_client_1.expectString,
|
|
529
|
-
notifyOnCreateOrReopenCase: smithy_client_1.expectBoolean,
|
|
530
|
-
notifyOnResolveCase: smithy_client_1.expectBoolean,
|
|
531
|
-
teamId: smithy_client_1.expectString,
|
|
532
|
-
});
|
|
533
|
-
Object.assign(contents, doc);
|
|
534
|
-
return contents;
|
|
535
|
-
};
|
|
536
|
-
exports.de_UpdateSlackChannelConfigurationCommand = de_UpdateSlackChannelConfigurationCommand;
|
|
537
|
-
const de_UpdateSlackChannelConfigurationCommandError = async (output, context) => {
|
|
538
|
-
const parsedOutput = {
|
|
539
|
-
...output,
|
|
540
|
-
body: await parseErrorBody(output.body, context),
|
|
541
|
-
};
|
|
542
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
543
|
-
switch (errorCode) {
|
|
544
|
-
case "AccessDeniedException":
|
|
545
|
-
case "com.amazonaws.supportapp#AccessDeniedException":
|
|
546
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
547
|
-
case "ConflictException":
|
|
548
|
-
case "com.amazonaws.supportapp#ConflictException":
|
|
549
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
550
|
-
case "InternalServerException":
|
|
551
|
-
case "com.amazonaws.supportapp#InternalServerException":
|
|
552
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
553
|
-
case "ResourceNotFoundException":
|
|
554
|
-
case "com.amazonaws.supportapp#ResourceNotFoundException":
|
|
555
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
556
|
-
case "ValidationException":
|
|
557
|
-
case "com.amazonaws.supportapp#ValidationException":
|
|
558
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
559
|
-
default:
|
|
560
|
-
const parsedBody = parsedOutput.body;
|
|
561
|
-
return throwDefaultError({
|
|
562
|
-
output,
|
|
563
|
-
parsedBody,
|
|
564
|
-
errorCode,
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(SupportAppServiceException_1.SupportAppServiceException);
|
|
569
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
570
|
-
const contents = (0, smithy_client_1.map)({});
|
|
571
|
-
const data = parsedOutput.body;
|
|
572
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
573
|
-
message: smithy_client_1.expectString,
|
|
574
|
-
});
|
|
575
|
-
Object.assign(contents, doc);
|
|
576
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
577
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
578
|
-
...contents,
|
|
579
|
-
});
|
|
580
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
581
|
-
};
|
|
582
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
583
|
-
const contents = (0, smithy_client_1.map)({});
|
|
584
|
-
const data = parsedOutput.body;
|
|
585
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
586
|
-
message: smithy_client_1.expectString,
|
|
587
|
-
});
|
|
588
|
-
Object.assign(contents, doc);
|
|
589
|
-
const exception = new models_0_1.ConflictException({
|
|
590
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
591
|
-
...contents,
|
|
592
|
-
});
|
|
593
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
594
|
-
};
|
|
595
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
596
|
-
const contents = (0, smithy_client_1.map)({});
|
|
597
|
-
const data = parsedOutput.body;
|
|
598
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
599
|
-
message: smithy_client_1.expectString,
|
|
600
|
-
});
|
|
601
|
-
Object.assign(contents, doc);
|
|
602
|
-
const exception = new models_0_1.InternalServerException({
|
|
603
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
604
|
-
...contents,
|
|
605
|
-
});
|
|
606
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
607
|
-
};
|
|
608
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
609
|
-
const contents = (0, smithy_client_1.map)({});
|
|
610
|
-
const data = parsedOutput.body;
|
|
611
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
612
|
-
message: smithy_client_1.expectString,
|
|
613
|
-
});
|
|
614
|
-
Object.assign(contents, doc);
|
|
615
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
616
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
617
|
-
...contents,
|
|
618
|
-
});
|
|
619
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
620
|
-
};
|
|
621
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
622
|
-
const contents = (0, smithy_client_1.map)({});
|
|
623
|
-
const data = parsedOutput.body;
|
|
624
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
625
|
-
message: smithy_client_1.expectString,
|
|
626
|
-
});
|
|
627
|
-
Object.assign(contents, doc);
|
|
628
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
629
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
630
|
-
...contents,
|
|
631
|
-
});
|
|
632
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
633
|
-
};
|
|
634
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
635
|
-
const contents = (0, smithy_client_1.map)({});
|
|
636
|
-
const data = parsedOutput.body;
|
|
637
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
638
|
-
message: smithy_client_1.expectString,
|
|
639
|
-
});
|
|
640
|
-
Object.assign(contents, doc);
|
|
641
|
-
const exception = new models_0_1.ValidationException({
|
|
642
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
643
|
-
...contents,
|
|
644
|
-
});
|
|
645
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
646
|
-
};
|
|
647
|
-
const deserializeMetadata = (output) => ({
|
|
648
|
-
httpStatusCode: output.statusCode,
|
|
649
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
650
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
651
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
652
|
-
});
|
|
653
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
654
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
655
|
-
value !== null &&
|
|
656
|
-
value !== "" &&
|
|
657
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
658
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
659
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
660
|
-
if (encoded.length) {
|
|
661
|
-
return JSON.parse(encoded);
|
|
662
|
-
}
|
|
663
|
-
return {};
|
|
664
|
-
});
|
|
665
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
666
|
-
const value = await parseBody(errorBody, context);
|
|
667
|
-
value.message = value.message ?? value.Message;
|
|
668
|
-
return value;
|
|
669
|
-
};
|
|
670
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
671
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
672
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
673
|
-
let cleanValue = rawValue;
|
|
674
|
-
if (typeof cleanValue === "number") {
|
|
675
|
-
cleanValue = cleanValue.toString();
|
|
676
|
-
}
|
|
677
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
678
|
-
cleanValue = cleanValue.split(",")[0];
|
|
679
|
-
}
|
|
680
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
681
|
-
cleanValue = cleanValue.split(":")[0];
|
|
682
|
-
}
|
|
683
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
684
|
-
cleanValue = cleanValue.split("#")[1];
|
|
685
|
-
}
|
|
686
|
-
return cleanValue;
|
|
687
|
-
};
|
|
688
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
689
|
-
if (headerKey !== undefined) {
|
|
690
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
691
|
-
}
|
|
692
|
-
if (data.code !== undefined) {
|
|
693
|
-
return sanitizeErrorCode(data.code);
|
|
694
|
-
}
|
|
695
|
-
if (data["__type"] !== undefined) {
|
|
696
|
-
return sanitizeErrorCode(data["__type"]);
|
|
697
|
-
}
|
|
698
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|