@aws-sdk/client-connectcampaigns 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/ConnectCampaigns.js +1 -55
- package/dist-cjs/ConnectCampaignsClient.js +1 -43
- package/dist-cjs/commands/CreateCampaignCommand.js +1 -28
- package/dist-cjs/commands/DeleteCampaignCommand.js +1 -28
- package/dist-cjs/commands/DeleteConnectInstanceConfigCommand.js +1 -28
- package/dist-cjs/commands/DeleteInstanceOnboardingJobCommand.js +1 -28
- package/dist-cjs/commands/DescribeCampaignCommand.js +1 -28
- package/dist-cjs/commands/GetCampaignStateBatchCommand.js +1 -28
- package/dist-cjs/commands/GetCampaignStateCommand.js +1 -28
- package/dist-cjs/commands/GetConnectInstanceConfigCommand.js +1 -28
- package/dist-cjs/commands/GetInstanceOnboardingJobStatusCommand.js +1 -28
- package/dist-cjs/commands/ListCampaignsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/PauseCampaignCommand.js +1 -28
- package/dist-cjs/commands/PutDialRequestBatchCommand.js +1 -29
- package/dist-cjs/commands/ResumeCampaignCommand.js +1 -28
- package/dist-cjs/commands/StartCampaignCommand.js +1 -28
- package/dist-cjs/commands/StartInstanceOnboardingJobCommand.js +1 -28
- package/dist-cjs/commands/StopCampaignCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateCampaignDialerConfigCommand.js +1 -28
- package/dist-cjs/commands/UpdateCampaignNameCommand.js +1 -28
- package/dist-cjs/commands/UpdateCampaignOutboundCallConfigCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -25
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2413 -11
- package/dist-cjs/models/ConnectCampaignsServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -192
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListCampaignsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -5
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1555
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1555 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateCampaignOutboundCallConfigCommand = exports.de_UpdateCampaignNameCommand = exports.de_UpdateCampaignDialerConfigCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopCampaignCommand = exports.de_StartInstanceOnboardingJobCommand = exports.de_StartCampaignCommand = exports.de_ResumeCampaignCommand = exports.de_PutDialRequestBatchCommand = exports.de_PauseCampaignCommand = exports.de_ListTagsForResourceCommand = exports.de_ListCampaignsCommand = exports.de_GetInstanceOnboardingJobStatusCommand = exports.de_GetConnectInstanceConfigCommand = exports.de_GetCampaignStateBatchCommand = exports.de_GetCampaignStateCommand = exports.de_DescribeCampaignCommand = exports.de_DeleteInstanceOnboardingJobCommand = exports.de_DeleteConnectInstanceConfigCommand = exports.de_DeleteCampaignCommand = exports.de_CreateCampaignCommand = exports.se_UpdateCampaignOutboundCallConfigCommand = exports.se_UpdateCampaignNameCommand = exports.se_UpdateCampaignDialerConfigCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopCampaignCommand = exports.se_StartInstanceOnboardingJobCommand = exports.se_StartCampaignCommand = exports.se_ResumeCampaignCommand = exports.se_PutDialRequestBatchCommand = exports.se_PauseCampaignCommand = exports.se_ListTagsForResourceCommand = exports.se_ListCampaignsCommand = exports.se_GetInstanceOnboardingJobStatusCommand = exports.se_GetConnectInstanceConfigCommand = exports.se_GetCampaignStateBatchCommand = exports.se_GetCampaignStateCommand = exports.se_DescribeCampaignCommand = exports.se_DeleteInstanceOnboardingJobCommand = exports.se_DeleteConnectInstanceConfigCommand = exports.se_DeleteCampaignCommand = exports.se_CreateCampaignCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const core_2 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const ConnectCampaignsServiceException_1 = require("../models/ConnectCampaignsServiceException");
|
|
8
|
-
const models_0_1 = require("../models/models_0");
|
|
9
|
-
const se_CreateCampaignCommand = async (input, context) => {
|
|
10
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
11
|
-
const headers = {
|
|
12
|
-
"content-type": "application/json",
|
|
13
|
-
};
|
|
14
|
-
b.bp("/campaigns");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
connectInstanceId: [],
|
|
18
|
-
dialerConfig: (_) => se_DialerConfig(_, context),
|
|
19
|
-
name: [],
|
|
20
|
-
outboundCallConfig: (_) => (0, smithy_client_1._json)(_),
|
|
21
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
22
|
-
}));
|
|
23
|
-
b.m("PUT").h(headers).b(body);
|
|
24
|
-
return b.build();
|
|
25
|
-
};
|
|
26
|
-
exports.se_CreateCampaignCommand = se_CreateCampaignCommand;
|
|
27
|
-
const se_DeleteCampaignCommand = async (input, context) => {
|
|
28
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
29
|
-
const headers = {};
|
|
30
|
-
b.bp("/campaigns/{id}");
|
|
31
|
-
b.p("id", () => input.id, "{id}", false);
|
|
32
|
-
let body;
|
|
33
|
-
b.m("DELETE").h(headers).b(body);
|
|
34
|
-
return b.build();
|
|
35
|
-
};
|
|
36
|
-
exports.se_DeleteCampaignCommand = se_DeleteCampaignCommand;
|
|
37
|
-
const se_DeleteConnectInstanceConfigCommand = async (input, context) => {
|
|
38
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
39
|
-
const headers = {};
|
|
40
|
-
b.bp("/connect-instance/{connectInstanceId}/config");
|
|
41
|
-
b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
42
|
-
let body;
|
|
43
|
-
b.m("DELETE").h(headers).b(body);
|
|
44
|
-
return b.build();
|
|
45
|
-
};
|
|
46
|
-
exports.se_DeleteConnectInstanceConfigCommand = se_DeleteConnectInstanceConfigCommand;
|
|
47
|
-
const se_DeleteInstanceOnboardingJobCommand = async (input, context) => {
|
|
48
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
49
|
-
const headers = {};
|
|
50
|
-
b.bp("/connect-instance/{connectInstanceId}/onboarding");
|
|
51
|
-
b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
52
|
-
let body;
|
|
53
|
-
b.m("DELETE").h(headers).b(body);
|
|
54
|
-
return b.build();
|
|
55
|
-
};
|
|
56
|
-
exports.se_DeleteInstanceOnboardingJobCommand = se_DeleteInstanceOnboardingJobCommand;
|
|
57
|
-
const se_DescribeCampaignCommand = async (input, context) => {
|
|
58
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
59
|
-
const headers = {};
|
|
60
|
-
b.bp("/campaigns/{id}");
|
|
61
|
-
b.p("id", () => input.id, "{id}", false);
|
|
62
|
-
let body;
|
|
63
|
-
b.m("GET").h(headers).b(body);
|
|
64
|
-
return b.build();
|
|
65
|
-
};
|
|
66
|
-
exports.se_DescribeCampaignCommand = se_DescribeCampaignCommand;
|
|
67
|
-
const se_GetCampaignStateCommand = async (input, context) => {
|
|
68
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
69
|
-
const headers = {};
|
|
70
|
-
b.bp("/campaigns/{id}/state");
|
|
71
|
-
b.p("id", () => input.id, "{id}", false);
|
|
72
|
-
let body;
|
|
73
|
-
b.m("GET").h(headers).b(body);
|
|
74
|
-
return b.build();
|
|
75
|
-
};
|
|
76
|
-
exports.se_GetCampaignStateCommand = se_GetCampaignStateCommand;
|
|
77
|
-
const se_GetCampaignStateBatchCommand = async (input, context) => {
|
|
78
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
79
|
-
const headers = {
|
|
80
|
-
"content-type": "application/json",
|
|
81
|
-
};
|
|
82
|
-
b.bp("/campaigns-state");
|
|
83
|
-
let body;
|
|
84
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
85
|
-
campaignIds: (_) => (0, smithy_client_1._json)(_),
|
|
86
|
-
}));
|
|
87
|
-
b.m("POST").h(headers).b(body);
|
|
88
|
-
return b.build();
|
|
89
|
-
};
|
|
90
|
-
exports.se_GetCampaignStateBatchCommand = se_GetCampaignStateBatchCommand;
|
|
91
|
-
const se_GetConnectInstanceConfigCommand = async (input, context) => {
|
|
92
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
93
|
-
const headers = {};
|
|
94
|
-
b.bp("/connect-instance/{connectInstanceId}/config");
|
|
95
|
-
b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
96
|
-
let body;
|
|
97
|
-
b.m("GET").h(headers).b(body);
|
|
98
|
-
return b.build();
|
|
99
|
-
};
|
|
100
|
-
exports.se_GetConnectInstanceConfigCommand = se_GetConnectInstanceConfigCommand;
|
|
101
|
-
const se_GetInstanceOnboardingJobStatusCommand = async (input, context) => {
|
|
102
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
103
|
-
const headers = {};
|
|
104
|
-
b.bp("/connect-instance/{connectInstanceId}/onboarding");
|
|
105
|
-
b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
106
|
-
let body;
|
|
107
|
-
b.m("GET").h(headers).b(body);
|
|
108
|
-
return b.build();
|
|
109
|
-
};
|
|
110
|
-
exports.se_GetInstanceOnboardingJobStatusCommand = se_GetInstanceOnboardingJobStatusCommand;
|
|
111
|
-
const se_ListCampaignsCommand = async (input, context) => {
|
|
112
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
113
|
-
const headers = {
|
|
114
|
-
"content-type": "application/json",
|
|
115
|
-
};
|
|
116
|
-
b.bp("/campaigns-summary");
|
|
117
|
-
let body;
|
|
118
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
119
|
-
filters: (_) => (0, smithy_client_1._json)(_),
|
|
120
|
-
maxResults: [],
|
|
121
|
-
nextToken: [],
|
|
122
|
-
}));
|
|
123
|
-
b.m("POST").h(headers).b(body);
|
|
124
|
-
return b.build();
|
|
125
|
-
};
|
|
126
|
-
exports.se_ListCampaignsCommand = se_ListCampaignsCommand;
|
|
127
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
128
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
129
|
-
const headers = {};
|
|
130
|
-
b.bp("/tags/{arn}");
|
|
131
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
132
|
-
let body;
|
|
133
|
-
b.m("GET").h(headers).b(body);
|
|
134
|
-
return b.build();
|
|
135
|
-
};
|
|
136
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
137
|
-
const se_PauseCampaignCommand = async (input, context) => {
|
|
138
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
139
|
-
const headers = {};
|
|
140
|
-
b.bp("/campaigns/{id}/pause");
|
|
141
|
-
b.p("id", () => input.id, "{id}", false);
|
|
142
|
-
let body;
|
|
143
|
-
b.m("POST").h(headers).b(body);
|
|
144
|
-
return b.build();
|
|
145
|
-
};
|
|
146
|
-
exports.se_PauseCampaignCommand = se_PauseCampaignCommand;
|
|
147
|
-
const se_PutDialRequestBatchCommand = async (input, context) => {
|
|
148
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
149
|
-
const headers = {
|
|
150
|
-
"content-type": "application/json",
|
|
151
|
-
};
|
|
152
|
-
b.bp("/campaigns/{id}/dial-requests");
|
|
153
|
-
b.p("id", () => input.id, "{id}", false);
|
|
154
|
-
let body;
|
|
155
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
156
|
-
dialRequests: (_) => se_DialRequestList(_, context),
|
|
157
|
-
}));
|
|
158
|
-
b.m("PUT").h(headers).b(body);
|
|
159
|
-
return b.build();
|
|
160
|
-
};
|
|
161
|
-
exports.se_PutDialRequestBatchCommand = se_PutDialRequestBatchCommand;
|
|
162
|
-
const se_ResumeCampaignCommand = async (input, context) => {
|
|
163
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
164
|
-
const headers = {};
|
|
165
|
-
b.bp("/campaigns/{id}/resume");
|
|
166
|
-
b.p("id", () => input.id, "{id}", false);
|
|
167
|
-
let body;
|
|
168
|
-
b.m("POST").h(headers).b(body);
|
|
169
|
-
return b.build();
|
|
170
|
-
};
|
|
171
|
-
exports.se_ResumeCampaignCommand = se_ResumeCampaignCommand;
|
|
172
|
-
const se_StartCampaignCommand = async (input, context) => {
|
|
173
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
174
|
-
const headers = {};
|
|
175
|
-
b.bp("/campaigns/{id}/start");
|
|
176
|
-
b.p("id", () => input.id, "{id}", false);
|
|
177
|
-
let body;
|
|
178
|
-
b.m("POST").h(headers).b(body);
|
|
179
|
-
return b.build();
|
|
180
|
-
};
|
|
181
|
-
exports.se_StartCampaignCommand = se_StartCampaignCommand;
|
|
182
|
-
const se_StartInstanceOnboardingJobCommand = async (input, context) => {
|
|
183
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
184
|
-
const headers = {
|
|
185
|
-
"content-type": "application/json",
|
|
186
|
-
};
|
|
187
|
-
b.bp("/connect-instance/{connectInstanceId}/onboarding");
|
|
188
|
-
b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
|
|
189
|
-
let body;
|
|
190
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
191
|
-
encryptionConfig: (_) => (0, smithy_client_1._json)(_),
|
|
192
|
-
}));
|
|
193
|
-
b.m("PUT").h(headers).b(body);
|
|
194
|
-
return b.build();
|
|
195
|
-
};
|
|
196
|
-
exports.se_StartInstanceOnboardingJobCommand = se_StartInstanceOnboardingJobCommand;
|
|
197
|
-
const se_StopCampaignCommand = async (input, context) => {
|
|
198
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
199
|
-
const headers = {};
|
|
200
|
-
b.bp("/campaigns/{id}/stop");
|
|
201
|
-
b.p("id", () => input.id, "{id}", false);
|
|
202
|
-
let body;
|
|
203
|
-
b.m("POST").h(headers).b(body);
|
|
204
|
-
return b.build();
|
|
205
|
-
};
|
|
206
|
-
exports.se_StopCampaignCommand = se_StopCampaignCommand;
|
|
207
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
208
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
209
|
-
const headers = {
|
|
210
|
-
"content-type": "application/json",
|
|
211
|
-
};
|
|
212
|
-
b.bp("/tags/{arn}");
|
|
213
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
214
|
-
let body;
|
|
215
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
216
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
217
|
-
}));
|
|
218
|
-
b.m("POST").h(headers).b(body);
|
|
219
|
-
return b.build();
|
|
220
|
-
};
|
|
221
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
222
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
223
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
224
|
-
const headers = {};
|
|
225
|
-
b.bp("/tags/{arn}");
|
|
226
|
-
b.p("arn", () => input.arn, "{arn}", false);
|
|
227
|
-
const query = (0, smithy_client_1.map)({
|
|
228
|
-
[_tK]: [
|
|
229
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
230
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
231
|
-
],
|
|
232
|
-
});
|
|
233
|
-
let body;
|
|
234
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
235
|
-
return b.build();
|
|
236
|
-
};
|
|
237
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
238
|
-
const se_UpdateCampaignDialerConfigCommand = async (input, context) => {
|
|
239
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
240
|
-
const headers = {
|
|
241
|
-
"content-type": "application/json",
|
|
242
|
-
};
|
|
243
|
-
b.bp("/campaigns/{id}/dialer-config");
|
|
244
|
-
b.p("id", () => input.id, "{id}", false);
|
|
245
|
-
let body;
|
|
246
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
247
|
-
dialerConfig: (_) => se_DialerConfig(_, context),
|
|
248
|
-
}));
|
|
249
|
-
b.m("POST").h(headers).b(body);
|
|
250
|
-
return b.build();
|
|
251
|
-
};
|
|
252
|
-
exports.se_UpdateCampaignDialerConfigCommand = se_UpdateCampaignDialerConfigCommand;
|
|
253
|
-
const se_UpdateCampaignNameCommand = async (input, context) => {
|
|
254
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
255
|
-
const headers = {
|
|
256
|
-
"content-type": "application/json",
|
|
257
|
-
};
|
|
258
|
-
b.bp("/campaigns/{id}/name");
|
|
259
|
-
b.p("id", () => input.id, "{id}", false);
|
|
260
|
-
let body;
|
|
261
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
262
|
-
name: [],
|
|
263
|
-
}));
|
|
264
|
-
b.m("POST").h(headers).b(body);
|
|
265
|
-
return b.build();
|
|
266
|
-
};
|
|
267
|
-
exports.se_UpdateCampaignNameCommand = se_UpdateCampaignNameCommand;
|
|
268
|
-
const se_UpdateCampaignOutboundCallConfigCommand = async (input, context) => {
|
|
269
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
270
|
-
const headers = {
|
|
271
|
-
"content-type": "application/json",
|
|
272
|
-
};
|
|
273
|
-
b.bp("/campaigns/{id}/outbound-call-config");
|
|
274
|
-
b.p("id", () => input.id, "{id}", false);
|
|
275
|
-
let body;
|
|
276
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
277
|
-
answerMachineDetectionConfig: (_) => (0, smithy_client_1._json)(_),
|
|
278
|
-
connectContactFlowId: [],
|
|
279
|
-
connectSourcePhoneNumber: [],
|
|
280
|
-
}));
|
|
281
|
-
b.m("POST").h(headers).b(body);
|
|
282
|
-
return b.build();
|
|
283
|
-
};
|
|
284
|
-
exports.se_UpdateCampaignOutboundCallConfigCommand = se_UpdateCampaignOutboundCallConfigCommand;
|
|
285
|
-
const de_CreateCampaignCommand = async (output, context) => {
|
|
286
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
287
|
-
return de_CreateCampaignCommandError(output, context);
|
|
288
|
-
}
|
|
289
|
-
const contents = (0, smithy_client_1.map)({
|
|
290
|
-
$metadata: deserializeMetadata(output),
|
|
291
|
-
});
|
|
292
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
293
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
294
|
-
arn: smithy_client_1.expectString,
|
|
295
|
-
id: smithy_client_1.expectString,
|
|
296
|
-
tags: smithy_client_1._json,
|
|
297
|
-
});
|
|
298
|
-
Object.assign(contents, doc);
|
|
299
|
-
return contents;
|
|
300
|
-
};
|
|
301
|
-
exports.de_CreateCampaignCommand = de_CreateCampaignCommand;
|
|
302
|
-
const de_CreateCampaignCommandError = async (output, context) => {
|
|
303
|
-
const parsedOutput = {
|
|
304
|
-
...output,
|
|
305
|
-
body: await parseErrorBody(output.body, context),
|
|
306
|
-
};
|
|
307
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
308
|
-
switch (errorCode) {
|
|
309
|
-
case "AccessDeniedException":
|
|
310
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
311
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
312
|
-
case "ConflictException":
|
|
313
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
314
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
315
|
-
case "InternalServerException":
|
|
316
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
317
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
318
|
-
case "ResourceNotFoundException":
|
|
319
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
320
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
321
|
-
case "ServiceQuotaExceededException":
|
|
322
|
-
case "com.amazonaws.connectcampaigns#ServiceQuotaExceededException":
|
|
323
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
324
|
-
case "ThrottlingException":
|
|
325
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
326
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
327
|
-
case "ValidationException":
|
|
328
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
329
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
330
|
-
default:
|
|
331
|
-
const parsedBody = parsedOutput.body;
|
|
332
|
-
return throwDefaultError({
|
|
333
|
-
output,
|
|
334
|
-
parsedBody,
|
|
335
|
-
errorCode,
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
};
|
|
339
|
-
const de_DeleteCampaignCommand = async (output, context) => {
|
|
340
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
341
|
-
return de_DeleteCampaignCommandError(output, context);
|
|
342
|
-
}
|
|
343
|
-
const contents = (0, smithy_client_1.map)({
|
|
344
|
-
$metadata: deserializeMetadata(output),
|
|
345
|
-
});
|
|
346
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
347
|
-
return contents;
|
|
348
|
-
};
|
|
349
|
-
exports.de_DeleteCampaignCommand = de_DeleteCampaignCommand;
|
|
350
|
-
const de_DeleteCampaignCommandError = async (output, context) => {
|
|
351
|
-
const parsedOutput = {
|
|
352
|
-
...output,
|
|
353
|
-
body: await parseErrorBody(output.body, context),
|
|
354
|
-
};
|
|
355
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
356
|
-
switch (errorCode) {
|
|
357
|
-
case "AccessDeniedException":
|
|
358
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
359
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
360
|
-
case "InternalServerException":
|
|
361
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
362
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
363
|
-
case "ResourceNotFoundException":
|
|
364
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
365
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
366
|
-
case "ValidationException":
|
|
367
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
368
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
369
|
-
default:
|
|
370
|
-
const parsedBody = parsedOutput.body;
|
|
371
|
-
return throwDefaultError({
|
|
372
|
-
output,
|
|
373
|
-
parsedBody,
|
|
374
|
-
errorCode,
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
};
|
|
378
|
-
const de_DeleteConnectInstanceConfigCommand = async (output, context) => {
|
|
379
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
380
|
-
return de_DeleteConnectInstanceConfigCommandError(output, context);
|
|
381
|
-
}
|
|
382
|
-
const contents = (0, smithy_client_1.map)({
|
|
383
|
-
$metadata: deserializeMetadata(output),
|
|
384
|
-
});
|
|
385
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
386
|
-
return contents;
|
|
387
|
-
};
|
|
388
|
-
exports.de_DeleteConnectInstanceConfigCommand = de_DeleteConnectInstanceConfigCommand;
|
|
389
|
-
const de_DeleteConnectInstanceConfigCommandError = async (output, context) => {
|
|
390
|
-
const parsedOutput = {
|
|
391
|
-
...output,
|
|
392
|
-
body: await parseErrorBody(output.body, context),
|
|
393
|
-
};
|
|
394
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
395
|
-
switch (errorCode) {
|
|
396
|
-
case "AccessDeniedException":
|
|
397
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
398
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
399
|
-
case "InternalServerException":
|
|
400
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
401
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
402
|
-
case "InvalidStateException":
|
|
403
|
-
case "com.amazonaws.connectcampaigns#InvalidStateException":
|
|
404
|
-
throw await de_InvalidStateExceptionRes(parsedOutput, context);
|
|
405
|
-
case "ResourceNotFoundException":
|
|
406
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
407
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
408
|
-
case "ThrottlingException":
|
|
409
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
410
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
411
|
-
case "ValidationException":
|
|
412
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
413
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
414
|
-
default:
|
|
415
|
-
const parsedBody = parsedOutput.body;
|
|
416
|
-
return throwDefaultError({
|
|
417
|
-
output,
|
|
418
|
-
parsedBody,
|
|
419
|
-
errorCode,
|
|
420
|
-
});
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
const de_DeleteInstanceOnboardingJobCommand = async (output, context) => {
|
|
424
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
425
|
-
return de_DeleteInstanceOnboardingJobCommandError(output, context);
|
|
426
|
-
}
|
|
427
|
-
const contents = (0, smithy_client_1.map)({
|
|
428
|
-
$metadata: deserializeMetadata(output),
|
|
429
|
-
});
|
|
430
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
431
|
-
return contents;
|
|
432
|
-
};
|
|
433
|
-
exports.de_DeleteInstanceOnboardingJobCommand = de_DeleteInstanceOnboardingJobCommand;
|
|
434
|
-
const de_DeleteInstanceOnboardingJobCommandError = async (output, context) => {
|
|
435
|
-
const parsedOutput = {
|
|
436
|
-
...output,
|
|
437
|
-
body: await parseErrorBody(output.body, context),
|
|
438
|
-
};
|
|
439
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
440
|
-
switch (errorCode) {
|
|
441
|
-
case "AccessDeniedException":
|
|
442
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
443
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
444
|
-
case "InternalServerException":
|
|
445
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
446
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
447
|
-
case "InvalidStateException":
|
|
448
|
-
case "com.amazonaws.connectcampaigns#InvalidStateException":
|
|
449
|
-
throw await de_InvalidStateExceptionRes(parsedOutput, context);
|
|
450
|
-
case "ResourceNotFoundException":
|
|
451
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
452
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
453
|
-
case "ValidationException":
|
|
454
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
455
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
456
|
-
default:
|
|
457
|
-
const parsedBody = parsedOutput.body;
|
|
458
|
-
return throwDefaultError({
|
|
459
|
-
output,
|
|
460
|
-
parsedBody,
|
|
461
|
-
errorCode,
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
};
|
|
465
|
-
const de_DescribeCampaignCommand = async (output, context) => {
|
|
466
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
467
|
-
return de_DescribeCampaignCommandError(output, context);
|
|
468
|
-
}
|
|
469
|
-
const contents = (0, smithy_client_1.map)({
|
|
470
|
-
$metadata: deserializeMetadata(output),
|
|
471
|
-
});
|
|
472
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
473
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
474
|
-
campaign: (_) => de_Campaign(_, context),
|
|
475
|
-
});
|
|
476
|
-
Object.assign(contents, doc);
|
|
477
|
-
return contents;
|
|
478
|
-
};
|
|
479
|
-
exports.de_DescribeCampaignCommand = de_DescribeCampaignCommand;
|
|
480
|
-
const de_DescribeCampaignCommandError = async (output, context) => {
|
|
481
|
-
const parsedOutput = {
|
|
482
|
-
...output,
|
|
483
|
-
body: await parseErrorBody(output.body, context),
|
|
484
|
-
};
|
|
485
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
486
|
-
switch (errorCode) {
|
|
487
|
-
case "AccessDeniedException":
|
|
488
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
489
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
490
|
-
case "InternalServerException":
|
|
491
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
492
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
493
|
-
case "ResourceNotFoundException":
|
|
494
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
495
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
496
|
-
case "ValidationException":
|
|
497
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
498
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
499
|
-
default:
|
|
500
|
-
const parsedBody = parsedOutput.body;
|
|
501
|
-
return throwDefaultError({
|
|
502
|
-
output,
|
|
503
|
-
parsedBody,
|
|
504
|
-
errorCode,
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
const de_GetCampaignStateCommand = async (output, context) => {
|
|
509
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
510
|
-
return de_GetCampaignStateCommandError(output, context);
|
|
511
|
-
}
|
|
512
|
-
const contents = (0, smithy_client_1.map)({
|
|
513
|
-
$metadata: deserializeMetadata(output),
|
|
514
|
-
});
|
|
515
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
516
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
517
|
-
state: smithy_client_1.expectString,
|
|
518
|
-
});
|
|
519
|
-
Object.assign(contents, doc);
|
|
520
|
-
return contents;
|
|
521
|
-
};
|
|
522
|
-
exports.de_GetCampaignStateCommand = de_GetCampaignStateCommand;
|
|
523
|
-
const de_GetCampaignStateCommandError = async (output, context) => {
|
|
524
|
-
const parsedOutput = {
|
|
525
|
-
...output,
|
|
526
|
-
body: await parseErrorBody(output.body, context),
|
|
527
|
-
};
|
|
528
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
529
|
-
switch (errorCode) {
|
|
530
|
-
case "AccessDeniedException":
|
|
531
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
532
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
533
|
-
case "InternalServerException":
|
|
534
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
535
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
536
|
-
case "ResourceNotFoundException":
|
|
537
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
538
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
539
|
-
case "ThrottlingException":
|
|
540
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
541
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
542
|
-
case "ValidationException":
|
|
543
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
544
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
545
|
-
default:
|
|
546
|
-
const parsedBody = parsedOutput.body;
|
|
547
|
-
return throwDefaultError({
|
|
548
|
-
output,
|
|
549
|
-
parsedBody,
|
|
550
|
-
errorCode,
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
const de_GetCampaignStateBatchCommand = async (output, context) => {
|
|
555
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
556
|
-
return de_GetCampaignStateBatchCommandError(output, context);
|
|
557
|
-
}
|
|
558
|
-
const contents = (0, smithy_client_1.map)({
|
|
559
|
-
$metadata: deserializeMetadata(output),
|
|
560
|
-
});
|
|
561
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
562
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
563
|
-
failedRequests: smithy_client_1._json,
|
|
564
|
-
successfulRequests: smithy_client_1._json,
|
|
565
|
-
});
|
|
566
|
-
Object.assign(contents, doc);
|
|
567
|
-
return contents;
|
|
568
|
-
};
|
|
569
|
-
exports.de_GetCampaignStateBatchCommand = de_GetCampaignStateBatchCommand;
|
|
570
|
-
const de_GetCampaignStateBatchCommandError = async (output, context) => {
|
|
571
|
-
const parsedOutput = {
|
|
572
|
-
...output,
|
|
573
|
-
body: await parseErrorBody(output.body, context),
|
|
574
|
-
};
|
|
575
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
576
|
-
switch (errorCode) {
|
|
577
|
-
case "AccessDeniedException":
|
|
578
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
579
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
580
|
-
case "InternalServerException":
|
|
581
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
582
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
583
|
-
case "ThrottlingException":
|
|
584
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
585
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
586
|
-
case "ValidationException":
|
|
587
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
588
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
589
|
-
default:
|
|
590
|
-
const parsedBody = parsedOutput.body;
|
|
591
|
-
return throwDefaultError({
|
|
592
|
-
output,
|
|
593
|
-
parsedBody,
|
|
594
|
-
errorCode,
|
|
595
|
-
});
|
|
596
|
-
}
|
|
597
|
-
};
|
|
598
|
-
const de_GetConnectInstanceConfigCommand = async (output, context) => {
|
|
599
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
600
|
-
return de_GetConnectInstanceConfigCommandError(output, context);
|
|
601
|
-
}
|
|
602
|
-
const contents = (0, smithy_client_1.map)({
|
|
603
|
-
$metadata: deserializeMetadata(output),
|
|
604
|
-
});
|
|
605
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
606
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
607
|
-
connectInstanceConfig: smithy_client_1._json,
|
|
608
|
-
});
|
|
609
|
-
Object.assign(contents, doc);
|
|
610
|
-
return contents;
|
|
611
|
-
};
|
|
612
|
-
exports.de_GetConnectInstanceConfigCommand = de_GetConnectInstanceConfigCommand;
|
|
613
|
-
const de_GetConnectInstanceConfigCommandError = async (output, context) => {
|
|
614
|
-
const parsedOutput = {
|
|
615
|
-
...output,
|
|
616
|
-
body: await parseErrorBody(output.body, context),
|
|
617
|
-
};
|
|
618
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
619
|
-
switch (errorCode) {
|
|
620
|
-
case "AccessDeniedException":
|
|
621
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
622
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
623
|
-
case "InternalServerException":
|
|
624
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
625
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
626
|
-
case "ResourceNotFoundException":
|
|
627
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
628
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
629
|
-
case "ValidationException":
|
|
630
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
631
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
632
|
-
default:
|
|
633
|
-
const parsedBody = parsedOutput.body;
|
|
634
|
-
return throwDefaultError({
|
|
635
|
-
output,
|
|
636
|
-
parsedBody,
|
|
637
|
-
errorCode,
|
|
638
|
-
});
|
|
639
|
-
}
|
|
640
|
-
};
|
|
641
|
-
const de_GetInstanceOnboardingJobStatusCommand = async (output, context) => {
|
|
642
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
643
|
-
return de_GetInstanceOnboardingJobStatusCommandError(output, context);
|
|
644
|
-
}
|
|
645
|
-
const contents = (0, smithy_client_1.map)({
|
|
646
|
-
$metadata: deserializeMetadata(output),
|
|
647
|
-
});
|
|
648
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
649
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
650
|
-
connectInstanceOnboardingJobStatus: smithy_client_1._json,
|
|
651
|
-
});
|
|
652
|
-
Object.assign(contents, doc);
|
|
653
|
-
return contents;
|
|
654
|
-
};
|
|
655
|
-
exports.de_GetInstanceOnboardingJobStatusCommand = de_GetInstanceOnboardingJobStatusCommand;
|
|
656
|
-
const de_GetInstanceOnboardingJobStatusCommandError = async (output, context) => {
|
|
657
|
-
const parsedOutput = {
|
|
658
|
-
...output,
|
|
659
|
-
body: await parseErrorBody(output.body, context),
|
|
660
|
-
};
|
|
661
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
662
|
-
switch (errorCode) {
|
|
663
|
-
case "AccessDeniedException":
|
|
664
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
665
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
666
|
-
case "InternalServerException":
|
|
667
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
668
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
669
|
-
case "ResourceNotFoundException":
|
|
670
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
671
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
672
|
-
case "ValidationException":
|
|
673
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
674
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
675
|
-
default:
|
|
676
|
-
const parsedBody = parsedOutput.body;
|
|
677
|
-
return throwDefaultError({
|
|
678
|
-
output,
|
|
679
|
-
parsedBody,
|
|
680
|
-
errorCode,
|
|
681
|
-
});
|
|
682
|
-
}
|
|
683
|
-
};
|
|
684
|
-
const de_ListCampaignsCommand = async (output, context) => {
|
|
685
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
686
|
-
return de_ListCampaignsCommandError(output, context);
|
|
687
|
-
}
|
|
688
|
-
const contents = (0, smithy_client_1.map)({
|
|
689
|
-
$metadata: deserializeMetadata(output),
|
|
690
|
-
});
|
|
691
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
692
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
693
|
-
campaignSummaryList: smithy_client_1._json,
|
|
694
|
-
nextToken: smithy_client_1.expectString,
|
|
695
|
-
});
|
|
696
|
-
Object.assign(contents, doc);
|
|
697
|
-
return contents;
|
|
698
|
-
};
|
|
699
|
-
exports.de_ListCampaignsCommand = de_ListCampaignsCommand;
|
|
700
|
-
const de_ListCampaignsCommandError = async (output, context) => {
|
|
701
|
-
const parsedOutput = {
|
|
702
|
-
...output,
|
|
703
|
-
body: await parseErrorBody(output.body, context),
|
|
704
|
-
};
|
|
705
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
706
|
-
switch (errorCode) {
|
|
707
|
-
case "AccessDeniedException":
|
|
708
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
709
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
710
|
-
case "InternalServerException":
|
|
711
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
712
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
713
|
-
case "ValidationException":
|
|
714
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
715
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
716
|
-
default:
|
|
717
|
-
const parsedBody = parsedOutput.body;
|
|
718
|
-
return throwDefaultError({
|
|
719
|
-
output,
|
|
720
|
-
parsedBody,
|
|
721
|
-
errorCode,
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
};
|
|
725
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
726
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
727
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
728
|
-
}
|
|
729
|
-
const contents = (0, smithy_client_1.map)({
|
|
730
|
-
$metadata: deserializeMetadata(output),
|
|
731
|
-
});
|
|
732
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
733
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
734
|
-
tags: smithy_client_1._json,
|
|
735
|
-
});
|
|
736
|
-
Object.assign(contents, doc);
|
|
737
|
-
return contents;
|
|
738
|
-
};
|
|
739
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
740
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
741
|
-
const parsedOutput = {
|
|
742
|
-
...output,
|
|
743
|
-
body: await parseErrorBody(output.body, context),
|
|
744
|
-
};
|
|
745
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
746
|
-
switch (errorCode) {
|
|
747
|
-
case "AccessDeniedException":
|
|
748
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
749
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
750
|
-
case "InternalServerException":
|
|
751
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
752
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
753
|
-
case "ResourceNotFoundException":
|
|
754
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
755
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
756
|
-
case "ThrottlingException":
|
|
757
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
758
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
759
|
-
case "ValidationException":
|
|
760
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
761
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
762
|
-
default:
|
|
763
|
-
const parsedBody = parsedOutput.body;
|
|
764
|
-
return throwDefaultError({
|
|
765
|
-
output,
|
|
766
|
-
parsedBody,
|
|
767
|
-
errorCode,
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
};
|
|
771
|
-
const de_PauseCampaignCommand = async (output, context) => {
|
|
772
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
773
|
-
return de_PauseCampaignCommandError(output, context);
|
|
774
|
-
}
|
|
775
|
-
const contents = (0, smithy_client_1.map)({
|
|
776
|
-
$metadata: deserializeMetadata(output),
|
|
777
|
-
});
|
|
778
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
779
|
-
return contents;
|
|
780
|
-
};
|
|
781
|
-
exports.de_PauseCampaignCommand = de_PauseCampaignCommand;
|
|
782
|
-
const de_PauseCampaignCommandError = async (output, context) => {
|
|
783
|
-
const parsedOutput = {
|
|
784
|
-
...output,
|
|
785
|
-
body: await parseErrorBody(output.body, context),
|
|
786
|
-
};
|
|
787
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
788
|
-
switch (errorCode) {
|
|
789
|
-
case "AccessDeniedException":
|
|
790
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
791
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
792
|
-
case "ConflictException":
|
|
793
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
794
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
795
|
-
case "InternalServerException":
|
|
796
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
797
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
798
|
-
case "InvalidCampaignStateException":
|
|
799
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
800
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
801
|
-
case "ResourceNotFoundException":
|
|
802
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
803
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
804
|
-
case "ThrottlingException":
|
|
805
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
806
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
807
|
-
case "ValidationException":
|
|
808
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
809
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
810
|
-
default:
|
|
811
|
-
const parsedBody = parsedOutput.body;
|
|
812
|
-
return throwDefaultError({
|
|
813
|
-
output,
|
|
814
|
-
parsedBody,
|
|
815
|
-
errorCode,
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
};
|
|
819
|
-
const de_PutDialRequestBatchCommand = async (output, context) => {
|
|
820
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
821
|
-
return de_PutDialRequestBatchCommandError(output, context);
|
|
822
|
-
}
|
|
823
|
-
const contents = (0, smithy_client_1.map)({
|
|
824
|
-
$metadata: deserializeMetadata(output),
|
|
825
|
-
});
|
|
826
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
827
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
828
|
-
failedRequests: smithy_client_1._json,
|
|
829
|
-
successfulRequests: smithy_client_1._json,
|
|
830
|
-
});
|
|
831
|
-
Object.assign(contents, doc);
|
|
832
|
-
return contents;
|
|
833
|
-
};
|
|
834
|
-
exports.de_PutDialRequestBatchCommand = de_PutDialRequestBatchCommand;
|
|
835
|
-
const de_PutDialRequestBatchCommandError = async (output, context) => {
|
|
836
|
-
const parsedOutput = {
|
|
837
|
-
...output,
|
|
838
|
-
body: await parseErrorBody(output.body, context),
|
|
839
|
-
};
|
|
840
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
841
|
-
switch (errorCode) {
|
|
842
|
-
case "AccessDeniedException":
|
|
843
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
844
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
845
|
-
case "ConflictException":
|
|
846
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
847
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
848
|
-
case "InternalServerException":
|
|
849
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
850
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
851
|
-
case "InvalidCampaignStateException":
|
|
852
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
853
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
854
|
-
case "ResourceNotFoundException":
|
|
855
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
856
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
857
|
-
case "ThrottlingException":
|
|
858
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
859
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
860
|
-
case "ValidationException":
|
|
861
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
862
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
863
|
-
default:
|
|
864
|
-
const parsedBody = parsedOutput.body;
|
|
865
|
-
return throwDefaultError({
|
|
866
|
-
output,
|
|
867
|
-
parsedBody,
|
|
868
|
-
errorCode,
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
};
|
|
872
|
-
const de_ResumeCampaignCommand = async (output, context) => {
|
|
873
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
874
|
-
return de_ResumeCampaignCommandError(output, context);
|
|
875
|
-
}
|
|
876
|
-
const contents = (0, smithy_client_1.map)({
|
|
877
|
-
$metadata: deserializeMetadata(output),
|
|
878
|
-
});
|
|
879
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
880
|
-
return contents;
|
|
881
|
-
};
|
|
882
|
-
exports.de_ResumeCampaignCommand = de_ResumeCampaignCommand;
|
|
883
|
-
const de_ResumeCampaignCommandError = async (output, context) => {
|
|
884
|
-
const parsedOutput = {
|
|
885
|
-
...output,
|
|
886
|
-
body: await parseErrorBody(output.body, context),
|
|
887
|
-
};
|
|
888
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
889
|
-
switch (errorCode) {
|
|
890
|
-
case "AccessDeniedException":
|
|
891
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
892
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
893
|
-
case "ConflictException":
|
|
894
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
895
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
896
|
-
case "InternalServerException":
|
|
897
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
898
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
899
|
-
case "InvalidCampaignStateException":
|
|
900
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
901
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
902
|
-
case "ResourceNotFoundException":
|
|
903
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
904
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
905
|
-
case "ThrottlingException":
|
|
906
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
907
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
908
|
-
case "ValidationException":
|
|
909
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
910
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
911
|
-
default:
|
|
912
|
-
const parsedBody = parsedOutput.body;
|
|
913
|
-
return throwDefaultError({
|
|
914
|
-
output,
|
|
915
|
-
parsedBody,
|
|
916
|
-
errorCode,
|
|
917
|
-
});
|
|
918
|
-
}
|
|
919
|
-
};
|
|
920
|
-
const de_StartCampaignCommand = async (output, context) => {
|
|
921
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
922
|
-
return de_StartCampaignCommandError(output, context);
|
|
923
|
-
}
|
|
924
|
-
const contents = (0, smithy_client_1.map)({
|
|
925
|
-
$metadata: deserializeMetadata(output),
|
|
926
|
-
});
|
|
927
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
928
|
-
return contents;
|
|
929
|
-
};
|
|
930
|
-
exports.de_StartCampaignCommand = de_StartCampaignCommand;
|
|
931
|
-
const de_StartCampaignCommandError = async (output, context) => {
|
|
932
|
-
const parsedOutput = {
|
|
933
|
-
...output,
|
|
934
|
-
body: await parseErrorBody(output.body, context),
|
|
935
|
-
};
|
|
936
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
937
|
-
switch (errorCode) {
|
|
938
|
-
case "AccessDeniedException":
|
|
939
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
940
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
941
|
-
case "ConflictException":
|
|
942
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
943
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
944
|
-
case "InternalServerException":
|
|
945
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
946
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
947
|
-
case "InvalidCampaignStateException":
|
|
948
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
949
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
950
|
-
case "ResourceNotFoundException":
|
|
951
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
952
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
953
|
-
case "ThrottlingException":
|
|
954
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
955
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
956
|
-
case "ValidationException":
|
|
957
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
958
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
959
|
-
default:
|
|
960
|
-
const parsedBody = parsedOutput.body;
|
|
961
|
-
return throwDefaultError({
|
|
962
|
-
output,
|
|
963
|
-
parsedBody,
|
|
964
|
-
errorCode,
|
|
965
|
-
});
|
|
966
|
-
}
|
|
967
|
-
};
|
|
968
|
-
const de_StartInstanceOnboardingJobCommand = async (output, context) => {
|
|
969
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
970
|
-
return de_StartInstanceOnboardingJobCommandError(output, context);
|
|
971
|
-
}
|
|
972
|
-
const contents = (0, smithy_client_1.map)({
|
|
973
|
-
$metadata: deserializeMetadata(output),
|
|
974
|
-
});
|
|
975
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
976
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
977
|
-
connectInstanceOnboardingJobStatus: smithy_client_1._json,
|
|
978
|
-
});
|
|
979
|
-
Object.assign(contents, doc);
|
|
980
|
-
return contents;
|
|
981
|
-
};
|
|
982
|
-
exports.de_StartInstanceOnboardingJobCommand = de_StartInstanceOnboardingJobCommand;
|
|
983
|
-
const de_StartInstanceOnboardingJobCommandError = async (output, context) => {
|
|
984
|
-
const parsedOutput = {
|
|
985
|
-
...output,
|
|
986
|
-
body: await parseErrorBody(output.body, context),
|
|
987
|
-
};
|
|
988
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
989
|
-
switch (errorCode) {
|
|
990
|
-
case "AccessDeniedException":
|
|
991
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
992
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
993
|
-
case "ConflictException":
|
|
994
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
995
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
996
|
-
case "InternalServerException":
|
|
997
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
998
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
999
|
-
case "ResourceNotFoundException":
|
|
1000
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1001
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1002
|
-
case "ThrottlingException":
|
|
1003
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1004
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1005
|
-
case "ValidationException":
|
|
1006
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1007
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1008
|
-
default:
|
|
1009
|
-
const parsedBody = parsedOutput.body;
|
|
1010
|
-
return throwDefaultError({
|
|
1011
|
-
output,
|
|
1012
|
-
parsedBody,
|
|
1013
|
-
errorCode,
|
|
1014
|
-
});
|
|
1015
|
-
}
|
|
1016
|
-
};
|
|
1017
|
-
const de_StopCampaignCommand = async (output, context) => {
|
|
1018
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1019
|
-
return de_StopCampaignCommandError(output, context);
|
|
1020
|
-
}
|
|
1021
|
-
const contents = (0, smithy_client_1.map)({
|
|
1022
|
-
$metadata: deserializeMetadata(output),
|
|
1023
|
-
});
|
|
1024
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1025
|
-
return contents;
|
|
1026
|
-
};
|
|
1027
|
-
exports.de_StopCampaignCommand = de_StopCampaignCommand;
|
|
1028
|
-
const de_StopCampaignCommandError = async (output, context) => {
|
|
1029
|
-
const parsedOutput = {
|
|
1030
|
-
...output,
|
|
1031
|
-
body: await parseErrorBody(output.body, context),
|
|
1032
|
-
};
|
|
1033
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1034
|
-
switch (errorCode) {
|
|
1035
|
-
case "AccessDeniedException":
|
|
1036
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1037
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1038
|
-
case "ConflictException":
|
|
1039
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1040
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1041
|
-
case "InternalServerException":
|
|
1042
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1043
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1044
|
-
case "InvalidCampaignStateException":
|
|
1045
|
-
case "com.amazonaws.connectcampaigns#InvalidCampaignStateException":
|
|
1046
|
-
throw await de_InvalidCampaignStateExceptionRes(parsedOutput, context);
|
|
1047
|
-
case "ResourceNotFoundException":
|
|
1048
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1049
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1050
|
-
case "ThrottlingException":
|
|
1051
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1052
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1053
|
-
case "ValidationException":
|
|
1054
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1055
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1056
|
-
default:
|
|
1057
|
-
const parsedBody = parsedOutput.body;
|
|
1058
|
-
return throwDefaultError({
|
|
1059
|
-
output,
|
|
1060
|
-
parsedBody,
|
|
1061
|
-
errorCode,
|
|
1062
|
-
});
|
|
1063
|
-
}
|
|
1064
|
-
};
|
|
1065
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1066
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1067
|
-
return de_TagResourceCommandError(output, context);
|
|
1068
|
-
}
|
|
1069
|
-
const contents = (0, smithy_client_1.map)({
|
|
1070
|
-
$metadata: deserializeMetadata(output),
|
|
1071
|
-
});
|
|
1072
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1073
|
-
return contents;
|
|
1074
|
-
};
|
|
1075
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1076
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1077
|
-
const parsedOutput = {
|
|
1078
|
-
...output,
|
|
1079
|
-
body: await parseErrorBody(output.body, context),
|
|
1080
|
-
};
|
|
1081
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1082
|
-
switch (errorCode) {
|
|
1083
|
-
case "AccessDeniedException":
|
|
1084
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1085
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1086
|
-
case "InternalServerException":
|
|
1087
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1088
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1089
|
-
case "ResourceNotFoundException":
|
|
1090
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1091
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1092
|
-
case "ThrottlingException":
|
|
1093
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1094
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1095
|
-
case "ValidationException":
|
|
1096
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1097
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1098
|
-
default:
|
|
1099
|
-
const parsedBody = parsedOutput.body;
|
|
1100
|
-
return throwDefaultError({
|
|
1101
|
-
output,
|
|
1102
|
-
parsedBody,
|
|
1103
|
-
errorCode,
|
|
1104
|
-
});
|
|
1105
|
-
}
|
|
1106
|
-
};
|
|
1107
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1108
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1109
|
-
return de_UntagResourceCommandError(output, context);
|
|
1110
|
-
}
|
|
1111
|
-
const contents = (0, smithy_client_1.map)({
|
|
1112
|
-
$metadata: deserializeMetadata(output),
|
|
1113
|
-
});
|
|
1114
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1115
|
-
return contents;
|
|
1116
|
-
};
|
|
1117
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1118
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1119
|
-
const parsedOutput = {
|
|
1120
|
-
...output,
|
|
1121
|
-
body: await parseErrorBody(output.body, context),
|
|
1122
|
-
};
|
|
1123
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1124
|
-
switch (errorCode) {
|
|
1125
|
-
case "AccessDeniedException":
|
|
1126
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1127
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1128
|
-
case "InternalServerException":
|
|
1129
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1130
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1131
|
-
case "ResourceNotFoundException":
|
|
1132
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1133
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1134
|
-
case "ThrottlingException":
|
|
1135
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1136
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1137
|
-
case "ValidationException":
|
|
1138
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1139
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1140
|
-
default:
|
|
1141
|
-
const parsedBody = parsedOutput.body;
|
|
1142
|
-
return throwDefaultError({
|
|
1143
|
-
output,
|
|
1144
|
-
parsedBody,
|
|
1145
|
-
errorCode,
|
|
1146
|
-
});
|
|
1147
|
-
}
|
|
1148
|
-
};
|
|
1149
|
-
const de_UpdateCampaignDialerConfigCommand = async (output, context) => {
|
|
1150
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1151
|
-
return de_UpdateCampaignDialerConfigCommandError(output, context);
|
|
1152
|
-
}
|
|
1153
|
-
const contents = (0, smithy_client_1.map)({
|
|
1154
|
-
$metadata: deserializeMetadata(output),
|
|
1155
|
-
});
|
|
1156
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1157
|
-
return contents;
|
|
1158
|
-
};
|
|
1159
|
-
exports.de_UpdateCampaignDialerConfigCommand = de_UpdateCampaignDialerConfigCommand;
|
|
1160
|
-
const de_UpdateCampaignDialerConfigCommandError = async (output, context) => {
|
|
1161
|
-
const parsedOutput = {
|
|
1162
|
-
...output,
|
|
1163
|
-
body: await parseErrorBody(output.body, context),
|
|
1164
|
-
};
|
|
1165
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1166
|
-
switch (errorCode) {
|
|
1167
|
-
case "AccessDeniedException":
|
|
1168
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1169
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1170
|
-
case "ConflictException":
|
|
1171
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1172
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1173
|
-
case "InternalServerException":
|
|
1174
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1175
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1176
|
-
case "ResourceNotFoundException":
|
|
1177
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1178
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1179
|
-
case "ValidationException":
|
|
1180
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1181
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1182
|
-
default:
|
|
1183
|
-
const parsedBody = parsedOutput.body;
|
|
1184
|
-
return throwDefaultError({
|
|
1185
|
-
output,
|
|
1186
|
-
parsedBody,
|
|
1187
|
-
errorCode,
|
|
1188
|
-
});
|
|
1189
|
-
}
|
|
1190
|
-
};
|
|
1191
|
-
const de_UpdateCampaignNameCommand = async (output, context) => {
|
|
1192
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1193
|
-
return de_UpdateCampaignNameCommandError(output, context);
|
|
1194
|
-
}
|
|
1195
|
-
const contents = (0, smithy_client_1.map)({
|
|
1196
|
-
$metadata: deserializeMetadata(output),
|
|
1197
|
-
});
|
|
1198
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1199
|
-
return contents;
|
|
1200
|
-
};
|
|
1201
|
-
exports.de_UpdateCampaignNameCommand = de_UpdateCampaignNameCommand;
|
|
1202
|
-
const de_UpdateCampaignNameCommandError = async (output, context) => {
|
|
1203
|
-
const parsedOutput = {
|
|
1204
|
-
...output,
|
|
1205
|
-
body: await parseErrorBody(output.body, context),
|
|
1206
|
-
};
|
|
1207
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1208
|
-
switch (errorCode) {
|
|
1209
|
-
case "AccessDeniedException":
|
|
1210
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1211
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1212
|
-
case "ConflictException":
|
|
1213
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1214
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1215
|
-
case "InternalServerException":
|
|
1216
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1217
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1218
|
-
case "ResourceNotFoundException":
|
|
1219
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1220
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1221
|
-
case "ValidationException":
|
|
1222
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1223
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1224
|
-
default:
|
|
1225
|
-
const parsedBody = parsedOutput.body;
|
|
1226
|
-
return throwDefaultError({
|
|
1227
|
-
output,
|
|
1228
|
-
parsedBody,
|
|
1229
|
-
errorCode,
|
|
1230
|
-
});
|
|
1231
|
-
}
|
|
1232
|
-
};
|
|
1233
|
-
const de_UpdateCampaignOutboundCallConfigCommand = async (output, context) => {
|
|
1234
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1235
|
-
return de_UpdateCampaignOutboundCallConfigCommandError(output, context);
|
|
1236
|
-
}
|
|
1237
|
-
const contents = (0, smithy_client_1.map)({
|
|
1238
|
-
$metadata: deserializeMetadata(output),
|
|
1239
|
-
});
|
|
1240
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1241
|
-
return contents;
|
|
1242
|
-
};
|
|
1243
|
-
exports.de_UpdateCampaignOutboundCallConfigCommand = de_UpdateCampaignOutboundCallConfigCommand;
|
|
1244
|
-
const de_UpdateCampaignOutboundCallConfigCommandError = async (output, context) => {
|
|
1245
|
-
const parsedOutput = {
|
|
1246
|
-
...output,
|
|
1247
|
-
body: await parseErrorBody(output.body, context),
|
|
1248
|
-
};
|
|
1249
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1250
|
-
switch (errorCode) {
|
|
1251
|
-
case "AccessDeniedException":
|
|
1252
|
-
case "com.amazonaws.connectcampaigns#AccessDeniedException":
|
|
1253
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1254
|
-
case "ConflictException":
|
|
1255
|
-
case "com.amazonaws.connectcampaigns#ConflictException":
|
|
1256
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1257
|
-
case "InternalServerException":
|
|
1258
|
-
case "com.amazonaws.connectcampaigns#InternalServerException":
|
|
1259
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1260
|
-
case "ResourceNotFoundException":
|
|
1261
|
-
case "com.amazonaws.connectcampaigns#ResourceNotFoundException":
|
|
1262
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1263
|
-
case "ThrottlingException":
|
|
1264
|
-
case "com.amazonaws.connectcampaigns#ThrottlingException":
|
|
1265
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
1266
|
-
case "ValidationException":
|
|
1267
|
-
case "com.amazonaws.connectcampaigns#ValidationException":
|
|
1268
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1269
|
-
default:
|
|
1270
|
-
const parsedBody = parsedOutput.body;
|
|
1271
|
-
return throwDefaultError({
|
|
1272
|
-
output,
|
|
1273
|
-
parsedBody,
|
|
1274
|
-
errorCode,
|
|
1275
|
-
});
|
|
1276
|
-
}
|
|
1277
|
-
};
|
|
1278
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(ConnectCampaignsServiceException_1.ConnectCampaignsServiceException);
|
|
1279
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
1280
|
-
const contents = (0, smithy_client_1.map)({
|
|
1281
|
-
[_xAET]: [, parsedOutput.headers[_xae]],
|
|
1282
|
-
});
|
|
1283
|
-
const data = parsedOutput.body;
|
|
1284
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1285
|
-
message: smithy_client_1.expectString,
|
|
1286
|
-
});
|
|
1287
|
-
Object.assign(contents, doc);
|
|
1288
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
1289
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1290
|
-
...contents,
|
|
1291
|
-
});
|
|
1292
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1293
|
-
};
|
|
1294
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1295
|
-
const contents = (0, smithy_client_1.map)({
|
|
1296
|
-
[_xAET]: [, parsedOutput.headers[_xae]],
|
|
1297
|
-
});
|
|
1298
|
-
const data = parsedOutput.body;
|
|
1299
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1300
|
-
message: smithy_client_1.expectString,
|
|
1301
|
-
});
|
|
1302
|
-
Object.assign(contents, doc);
|
|
1303
|
-
const exception = new models_0_1.ConflictException({
|
|
1304
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1305
|
-
...contents,
|
|
1306
|
-
});
|
|
1307
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1308
|
-
};
|
|
1309
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1310
|
-
const contents = (0, smithy_client_1.map)({
|
|
1311
|
-
[_xAET]: [, parsedOutput.headers[_xae]],
|
|
1312
|
-
});
|
|
1313
|
-
const data = parsedOutput.body;
|
|
1314
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1315
|
-
message: smithy_client_1.expectString,
|
|
1316
|
-
});
|
|
1317
|
-
Object.assign(contents, doc);
|
|
1318
|
-
const exception = new models_0_1.InternalServerException({
|
|
1319
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1320
|
-
...contents,
|
|
1321
|
-
});
|
|
1322
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1323
|
-
};
|
|
1324
|
-
const de_InvalidCampaignStateExceptionRes = async (parsedOutput, context) => {
|
|
1325
|
-
const contents = (0, smithy_client_1.map)({
|
|
1326
|
-
[_xAET]: [, parsedOutput.headers[_xae]],
|
|
1327
|
-
});
|
|
1328
|
-
const data = parsedOutput.body;
|
|
1329
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1330
|
-
message: smithy_client_1.expectString,
|
|
1331
|
-
state: smithy_client_1.expectString,
|
|
1332
|
-
});
|
|
1333
|
-
Object.assign(contents, doc);
|
|
1334
|
-
const exception = new models_0_1.InvalidCampaignStateException({
|
|
1335
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1336
|
-
...contents,
|
|
1337
|
-
});
|
|
1338
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1339
|
-
};
|
|
1340
|
-
const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
|
|
1341
|
-
const contents = (0, smithy_client_1.map)({
|
|
1342
|
-
[_xAET]: [, parsedOutput.headers[_xae]],
|
|
1343
|
-
});
|
|
1344
|
-
const data = parsedOutput.body;
|
|
1345
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1346
|
-
message: smithy_client_1.expectString,
|
|
1347
|
-
});
|
|
1348
|
-
Object.assign(contents, doc);
|
|
1349
|
-
const exception = new models_0_1.InvalidStateException({
|
|
1350
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1351
|
-
...contents,
|
|
1352
|
-
});
|
|
1353
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1354
|
-
};
|
|
1355
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1356
|
-
const contents = (0, smithy_client_1.map)({
|
|
1357
|
-
[_xAET]: [, parsedOutput.headers[_xae]],
|
|
1358
|
-
});
|
|
1359
|
-
const data = parsedOutput.body;
|
|
1360
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1361
|
-
message: smithy_client_1.expectString,
|
|
1362
|
-
});
|
|
1363
|
-
Object.assign(contents, doc);
|
|
1364
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1365
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1366
|
-
...contents,
|
|
1367
|
-
});
|
|
1368
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1369
|
-
};
|
|
1370
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1371
|
-
const contents = (0, smithy_client_1.map)({
|
|
1372
|
-
[_xAET]: [, parsedOutput.headers[_xae]],
|
|
1373
|
-
});
|
|
1374
|
-
const data = parsedOutput.body;
|
|
1375
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1376
|
-
message: smithy_client_1.expectString,
|
|
1377
|
-
});
|
|
1378
|
-
Object.assign(contents, doc);
|
|
1379
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1380
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1381
|
-
...contents,
|
|
1382
|
-
});
|
|
1383
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1384
|
-
};
|
|
1385
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1386
|
-
const contents = (0, smithy_client_1.map)({
|
|
1387
|
-
[_xAET]: [, parsedOutput.headers[_xae]],
|
|
1388
|
-
});
|
|
1389
|
-
const data = parsedOutput.body;
|
|
1390
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1391
|
-
message: smithy_client_1.expectString,
|
|
1392
|
-
});
|
|
1393
|
-
Object.assign(contents, doc);
|
|
1394
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1395
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1396
|
-
...contents,
|
|
1397
|
-
});
|
|
1398
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1399
|
-
};
|
|
1400
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1401
|
-
const contents = (0, smithy_client_1.map)({
|
|
1402
|
-
[_xAET]: [, parsedOutput.headers[_xae]],
|
|
1403
|
-
});
|
|
1404
|
-
const data = parsedOutput.body;
|
|
1405
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1406
|
-
message: smithy_client_1.expectString,
|
|
1407
|
-
});
|
|
1408
|
-
Object.assign(contents, doc);
|
|
1409
|
-
const exception = new models_0_1.ValidationException({
|
|
1410
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1411
|
-
...contents,
|
|
1412
|
-
});
|
|
1413
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1414
|
-
};
|
|
1415
|
-
const se_AgentlessDialerConfig = (input, context) => {
|
|
1416
|
-
return (0, smithy_client_1.take)(input, {
|
|
1417
|
-
dialingCapacity: smithy_client_1.serializeFloat,
|
|
1418
|
-
});
|
|
1419
|
-
};
|
|
1420
|
-
const se_DialerConfig = (input, context) => {
|
|
1421
|
-
return models_0_1.DialerConfig.visit(input, {
|
|
1422
|
-
agentlessDialerConfig: (value) => ({ agentlessDialerConfig: se_AgentlessDialerConfig(value, context) }),
|
|
1423
|
-
predictiveDialerConfig: (value) => ({ predictiveDialerConfig: se_PredictiveDialerConfig(value, context) }),
|
|
1424
|
-
progressiveDialerConfig: (value) => ({ progressiveDialerConfig: se_ProgressiveDialerConfig(value, context) }),
|
|
1425
|
-
_: (name, value) => ({ name: value }),
|
|
1426
|
-
});
|
|
1427
|
-
};
|
|
1428
|
-
const se_DialRequest = (input, context) => {
|
|
1429
|
-
return (0, smithy_client_1.take)(input, {
|
|
1430
|
-
attributes: smithy_client_1._json,
|
|
1431
|
-
clientToken: [],
|
|
1432
|
-
expirationTime: (_) => _.toISOString().split(".")[0] + "Z",
|
|
1433
|
-
phoneNumber: [],
|
|
1434
|
-
});
|
|
1435
|
-
};
|
|
1436
|
-
const se_DialRequestList = (input, context) => {
|
|
1437
|
-
return input
|
|
1438
|
-
.filter((e) => e != null)
|
|
1439
|
-
.map((entry) => {
|
|
1440
|
-
return se_DialRequest(entry, context);
|
|
1441
|
-
});
|
|
1442
|
-
};
|
|
1443
|
-
const se_PredictiveDialerConfig = (input, context) => {
|
|
1444
|
-
return (0, smithy_client_1.take)(input, {
|
|
1445
|
-
bandwidthAllocation: smithy_client_1.serializeFloat,
|
|
1446
|
-
dialingCapacity: smithy_client_1.serializeFloat,
|
|
1447
|
-
});
|
|
1448
|
-
};
|
|
1449
|
-
const se_ProgressiveDialerConfig = (input, context) => {
|
|
1450
|
-
return (0, smithy_client_1.take)(input, {
|
|
1451
|
-
bandwidthAllocation: smithy_client_1.serializeFloat,
|
|
1452
|
-
dialingCapacity: smithy_client_1.serializeFloat,
|
|
1453
|
-
});
|
|
1454
|
-
};
|
|
1455
|
-
const de_AgentlessDialerConfig = (output, context) => {
|
|
1456
|
-
return (0, smithy_client_1.take)(output, {
|
|
1457
|
-
dialingCapacity: smithy_client_1.limitedParseDouble,
|
|
1458
|
-
});
|
|
1459
|
-
};
|
|
1460
|
-
const de_Campaign = (output, context) => {
|
|
1461
|
-
return (0, smithy_client_1.take)(output, {
|
|
1462
|
-
arn: smithy_client_1.expectString,
|
|
1463
|
-
connectInstanceId: smithy_client_1.expectString,
|
|
1464
|
-
dialerConfig: (_) => de_DialerConfig((0, core_1.awsExpectUnion)(_), context),
|
|
1465
|
-
id: smithy_client_1.expectString,
|
|
1466
|
-
name: smithy_client_1.expectString,
|
|
1467
|
-
outboundCallConfig: smithy_client_1._json,
|
|
1468
|
-
tags: smithy_client_1._json,
|
|
1469
|
-
});
|
|
1470
|
-
};
|
|
1471
|
-
const de_DialerConfig = (output, context) => {
|
|
1472
|
-
if (output.agentlessDialerConfig != null) {
|
|
1473
|
-
return {
|
|
1474
|
-
agentlessDialerConfig: de_AgentlessDialerConfig(output.agentlessDialerConfig, context),
|
|
1475
|
-
};
|
|
1476
|
-
}
|
|
1477
|
-
if (output.predictiveDialerConfig != null) {
|
|
1478
|
-
return {
|
|
1479
|
-
predictiveDialerConfig: de_PredictiveDialerConfig(output.predictiveDialerConfig, context),
|
|
1480
|
-
};
|
|
1481
|
-
}
|
|
1482
|
-
if (output.progressiveDialerConfig != null) {
|
|
1483
|
-
return {
|
|
1484
|
-
progressiveDialerConfig: de_ProgressiveDialerConfig(output.progressiveDialerConfig, context),
|
|
1485
|
-
};
|
|
1486
|
-
}
|
|
1487
|
-
return { $unknown: Object.entries(output)[0] };
|
|
1488
|
-
};
|
|
1489
|
-
const de_PredictiveDialerConfig = (output, context) => {
|
|
1490
|
-
return (0, smithy_client_1.take)(output, {
|
|
1491
|
-
bandwidthAllocation: smithy_client_1.limitedParseDouble,
|
|
1492
|
-
dialingCapacity: smithy_client_1.limitedParseDouble,
|
|
1493
|
-
});
|
|
1494
|
-
};
|
|
1495
|
-
const de_ProgressiveDialerConfig = (output, context) => {
|
|
1496
|
-
return (0, smithy_client_1.take)(output, {
|
|
1497
|
-
bandwidthAllocation: smithy_client_1.limitedParseDouble,
|
|
1498
|
-
dialingCapacity: smithy_client_1.limitedParseDouble,
|
|
1499
|
-
});
|
|
1500
|
-
};
|
|
1501
|
-
const deserializeMetadata = (output) => ({
|
|
1502
|
-
httpStatusCode: output.statusCode,
|
|
1503
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1504
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1505
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1506
|
-
});
|
|
1507
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1508
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1509
|
-
value !== null &&
|
|
1510
|
-
value !== "" &&
|
|
1511
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1512
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1513
|
-
const _tK = "tagKeys";
|
|
1514
|
-
const _xAET = "xAmzErrorType";
|
|
1515
|
-
const _xae = "x-amzn-errortype";
|
|
1516
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1517
|
-
if (encoded.length) {
|
|
1518
|
-
return JSON.parse(encoded);
|
|
1519
|
-
}
|
|
1520
|
-
return {};
|
|
1521
|
-
});
|
|
1522
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1523
|
-
const value = await parseBody(errorBody, context);
|
|
1524
|
-
value.message = value.message ?? value.Message;
|
|
1525
|
-
return value;
|
|
1526
|
-
};
|
|
1527
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1528
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1529
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1530
|
-
let cleanValue = rawValue;
|
|
1531
|
-
if (typeof cleanValue === "number") {
|
|
1532
|
-
cleanValue = cleanValue.toString();
|
|
1533
|
-
}
|
|
1534
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1535
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1536
|
-
}
|
|
1537
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1538
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1539
|
-
}
|
|
1540
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1541
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1542
|
-
}
|
|
1543
|
-
return cleanValue;
|
|
1544
|
-
};
|
|
1545
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1546
|
-
if (headerKey !== undefined) {
|
|
1547
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1548
|
-
}
|
|
1549
|
-
if (data.code !== undefined) {
|
|
1550
|
-
return sanitizeErrorCode(data.code);
|
|
1551
|
-
}
|
|
1552
|
-
if (data["__type"] !== undefined) {
|
|
1553
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1554
|
-
}
|
|
1555
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|