@aws-sdk/client-connectcampaigns 3.476.0 → 3.477.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.
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
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
4
  const core_1 = require("@aws-sdk/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_2 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const ConnectCampaignsServiceException_1 = require("../models/ConnectCampaignsServiceException");
8
8
  const models_0_1 = require("../models/models_0");
9
9
  const se_CreateCampaignCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_2.requestBuilder)(input, context);
11
11
  const headers = {
12
12
  "content-type": "application/json",
13
13
  };
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns";
14
+ b.bp("/campaigns");
15
15
  let body;
16
16
  body = JSON.stringify((0, smithy_client_1.take)(input, {
17
17
  connectInstanceId: [],
@@ -20,426 +20,266 @@ const se_CreateCampaignCommand = async (input, context) => {
20
20
  outboundCallConfig: (_) => (0, smithy_client_1._json)(_),
21
21
  tags: (_) => (0, smithy_client_1._json)(_),
22
22
  }));
23
- return new protocol_http_1.HttpRequest({
24
- protocol,
25
- hostname,
26
- port,
27
- method: "PUT",
28
- headers,
29
- path: resolvedPath,
30
- body,
31
- });
23
+ b.m("PUT").h(headers).b(body);
24
+ return b.build();
32
25
  };
33
26
  exports.se_CreateCampaignCommand = se_CreateCampaignCommand;
34
27
  const se_DeleteCampaignCommand = async (input, context) => {
35
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28
+ const b = (0, core_2.requestBuilder)(input, context);
36
29
  const headers = {};
37
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}";
38
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
30
+ b.bp("/campaigns/{id}");
31
+ b.p("id", () => input.id, "{id}", false);
39
32
  let body;
40
- return new protocol_http_1.HttpRequest({
41
- protocol,
42
- hostname,
43
- port,
44
- method: "DELETE",
45
- headers,
46
- path: resolvedPath,
47
- body,
48
- });
33
+ b.m("DELETE").h(headers).b(body);
34
+ return b.build();
49
35
  };
50
36
  exports.se_DeleteCampaignCommand = se_DeleteCampaignCommand;
51
37
  const se_DeleteConnectInstanceConfigCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
38
+ const b = (0, core_2.requestBuilder)(input, context);
53
39
  const headers = {};
54
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
55
- "/connect-instance/{connectInstanceId}/config";
56
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
40
+ b.bp("/connect-instance/{connectInstanceId}/config");
41
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
57
42
  let body;
58
- return new protocol_http_1.HttpRequest({
59
- protocol,
60
- hostname,
61
- port,
62
- method: "DELETE",
63
- headers,
64
- path: resolvedPath,
65
- body,
66
- });
43
+ b.m("DELETE").h(headers).b(body);
44
+ return b.build();
67
45
  };
68
46
  exports.se_DeleteConnectInstanceConfigCommand = se_DeleteConnectInstanceConfigCommand;
69
47
  const se_DeleteInstanceOnboardingJobCommand = async (input, context) => {
70
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
48
+ const b = (0, core_2.requestBuilder)(input, context);
71
49
  const headers = {};
72
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
73
- "/connect-instance/{connectInstanceId}/onboarding";
74
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
50
+ b.bp("/connect-instance/{connectInstanceId}/onboarding");
51
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
75
52
  let body;
76
- return new protocol_http_1.HttpRequest({
77
- protocol,
78
- hostname,
79
- port,
80
- method: "DELETE",
81
- headers,
82
- path: resolvedPath,
83
- body,
84
- });
53
+ b.m("DELETE").h(headers).b(body);
54
+ return b.build();
85
55
  };
86
56
  exports.se_DeleteInstanceOnboardingJobCommand = se_DeleteInstanceOnboardingJobCommand;
87
57
  const se_DescribeCampaignCommand = async (input, context) => {
88
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
58
+ const b = (0, core_2.requestBuilder)(input, context);
89
59
  const headers = {};
90
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}";
91
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
60
+ b.bp("/campaigns/{id}");
61
+ b.p("id", () => input.id, "{id}", false);
92
62
  let body;
93
- return new protocol_http_1.HttpRequest({
94
- protocol,
95
- hostname,
96
- port,
97
- method: "GET",
98
- headers,
99
- path: resolvedPath,
100
- body,
101
- });
63
+ b.m("GET").h(headers).b(body);
64
+ return b.build();
102
65
  };
103
66
  exports.se_DescribeCampaignCommand = se_DescribeCampaignCommand;
104
67
  const se_GetCampaignStateCommand = async (input, context) => {
105
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
68
+ const b = (0, core_2.requestBuilder)(input, context);
106
69
  const headers = {};
107
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/state";
108
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
70
+ b.bp("/campaigns/{id}/state");
71
+ b.p("id", () => input.id, "{id}", false);
109
72
  let body;
110
- return new protocol_http_1.HttpRequest({
111
- protocol,
112
- hostname,
113
- port,
114
- method: "GET",
115
- headers,
116
- path: resolvedPath,
117
- body,
118
- });
73
+ b.m("GET").h(headers).b(body);
74
+ return b.build();
119
75
  };
120
76
  exports.se_GetCampaignStateCommand = se_GetCampaignStateCommand;
121
77
  const se_GetCampaignStateBatchCommand = async (input, context) => {
122
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
78
+ const b = (0, core_2.requestBuilder)(input, context);
123
79
  const headers = {
124
80
  "content-type": "application/json",
125
81
  };
126
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-state";
82
+ b.bp("/campaigns-state");
127
83
  let body;
128
84
  body = JSON.stringify((0, smithy_client_1.take)(input, {
129
85
  campaignIds: (_) => (0, smithy_client_1._json)(_),
130
86
  }));
131
- return new protocol_http_1.HttpRequest({
132
- protocol,
133
- hostname,
134
- port,
135
- method: "POST",
136
- headers,
137
- path: resolvedPath,
138
- body,
139
- });
87
+ b.m("POST").h(headers).b(body);
88
+ return b.build();
140
89
  };
141
90
  exports.se_GetCampaignStateBatchCommand = se_GetCampaignStateBatchCommand;
142
91
  const se_GetConnectInstanceConfigCommand = async (input, context) => {
143
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
92
+ const b = (0, core_2.requestBuilder)(input, context);
144
93
  const headers = {};
145
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
146
- "/connect-instance/{connectInstanceId}/config";
147
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
94
+ b.bp("/connect-instance/{connectInstanceId}/config");
95
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
148
96
  let body;
149
- return new protocol_http_1.HttpRequest({
150
- protocol,
151
- hostname,
152
- port,
153
- method: "GET",
154
- headers,
155
- path: resolvedPath,
156
- body,
157
- });
97
+ b.m("GET").h(headers).b(body);
98
+ return b.build();
158
99
  };
159
100
  exports.se_GetConnectInstanceConfigCommand = se_GetConnectInstanceConfigCommand;
160
101
  const se_GetInstanceOnboardingJobStatusCommand = async (input, context) => {
161
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
102
+ const b = (0, core_2.requestBuilder)(input, context);
162
103
  const headers = {};
163
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
164
- "/connect-instance/{connectInstanceId}/onboarding";
165
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
104
+ b.bp("/connect-instance/{connectInstanceId}/onboarding");
105
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
166
106
  let body;
167
- return new protocol_http_1.HttpRequest({
168
- protocol,
169
- hostname,
170
- port,
171
- method: "GET",
172
- headers,
173
- path: resolvedPath,
174
- body,
175
- });
107
+ b.m("GET").h(headers).b(body);
108
+ return b.build();
176
109
  };
177
110
  exports.se_GetInstanceOnboardingJobStatusCommand = se_GetInstanceOnboardingJobStatusCommand;
178
111
  const se_ListCampaignsCommand = async (input, context) => {
179
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
112
+ const b = (0, core_2.requestBuilder)(input, context);
180
113
  const headers = {
181
114
  "content-type": "application/json",
182
115
  };
183
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-summary";
116
+ b.bp("/campaigns-summary");
184
117
  let body;
185
118
  body = JSON.stringify((0, smithy_client_1.take)(input, {
186
119
  filters: (_) => (0, smithy_client_1._json)(_),
187
120
  maxResults: [],
188
121
  nextToken: [],
189
122
  }));
190
- return new protocol_http_1.HttpRequest({
191
- protocol,
192
- hostname,
193
- port,
194
- method: "POST",
195
- headers,
196
- path: resolvedPath,
197
- body,
198
- });
123
+ b.m("POST").h(headers).b(body);
124
+ return b.build();
199
125
  };
200
126
  exports.se_ListCampaignsCommand = se_ListCampaignsCommand;
201
127
  const se_ListTagsForResourceCommand = async (input, context) => {
202
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
128
+ const b = (0, core_2.requestBuilder)(input, context);
203
129
  const headers = {};
204
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
205
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
130
+ b.bp("/tags/{arn}");
131
+ b.p("arn", () => input.arn, "{arn}", false);
206
132
  let body;
207
- return new protocol_http_1.HttpRequest({
208
- protocol,
209
- hostname,
210
- port,
211
- method: "GET",
212
- headers,
213
- path: resolvedPath,
214
- body,
215
- });
133
+ b.m("GET").h(headers).b(body);
134
+ return b.build();
216
135
  };
217
136
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
218
137
  const se_PauseCampaignCommand = async (input, context) => {
219
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const b = (0, core_2.requestBuilder)(input, context);
220
139
  const headers = {};
221
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/pause";
222
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
140
+ b.bp("/campaigns/{id}/pause");
141
+ b.p("id", () => input.id, "{id}", false);
223
142
  let body;
224
- return new protocol_http_1.HttpRequest({
225
- protocol,
226
- hostname,
227
- port,
228
- method: "POST",
229
- headers,
230
- path: resolvedPath,
231
- body,
232
- });
143
+ b.m("POST").h(headers).b(body);
144
+ return b.build();
233
145
  };
234
146
  exports.se_PauseCampaignCommand = se_PauseCampaignCommand;
235
147
  const se_PutDialRequestBatchCommand = async (input, context) => {
236
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
148
+ const b = (0, core_2.requestBuilder)(input, context);
237
149
  const headers = {
238
150
  "content-type": "application/json",
239
151
  };
240
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dial-requests";
241
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
152
+ b.bp("/campaigns/{id}/dial-requests");
153
+ b.p("id", () => input.id, "{id}", false);
242
154
  let body;
243
155
  body = JSON.stringify((0, smithy_client_1.take)(input, {
244
156
  dialRequests: (_) => se_DialRequestList(_, context),
245
157
  }));
246
- return new protocol_http_1.HttpRequest({
247
- protocol,
248
- hostname,
249
- port,
250
- method: "PUT",
251
- headers,
252
- path: resolvedPath,
253
- body,
254
- });
158
+ b.m("PUT").h(headers).b(body);
159
+ return b.build();
255
160
  };
256
161
  exports.se_PutDialRequestBatchCommand = se_PutDialRequestBatchCommand;
257
162
  const se_ResumeCampaignCommand = async (input, context) => {
258
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
163
+ const b = (0, core_2.requestBuilder)(input, context);
259
164
  const headers = {};
260
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/resume";
261
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
165
+ b.bp("/campaigns/{id}/resume");
166
+ b.p("id", () => input.id, "{id}", false);
262
167
  let body;
263
- return new protocol_http_1.HttpRequest({
264
- protocol,
265
- hostname,
266
- port,
267
- method: "POST",
268
- headers,
269
- path: resolvedPath,
270
- body,
271
- });
168
+ b.m("POST").h(headers).b(body);
169
+ return b.build();
272
170
  };
273
171
  exports.se_ResumeCampaignCommand = se_ResumeCampaignCommand;
274
172
  const se_StartCampaignCommand = async (input, context) => {
275
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
173
+ const b = (0, core_2.requestBuilder)(input, context);
276
174
  const headers = {};
277
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/start";
278
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
175
+ b.bp("/campaigns/{id}/start");
176
+ b.p("id", () => input.id, "{id}", false);
279
177
  let body;
280
- return new protocol_http_1.HttpRequest({
281
- protocol,
282
- hostname,
283
- port,
284
- method: "POST",
285
- headers,
286
- path: resolvedPath,
287
- body,
288
- });
178
+ b.m("POST").h(headers).b(body);
179
+ return b.build();
289
180
  };
290
181
  exports.se_StartCampaignCommand = se_StartCampaignCommand;
291
182
  const se_StartInstanceOnboardingJobCommand = async (input, context) => {
292
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
183
+ const b = (0, core_2.requestBuilder)(input, context);
293
184
  const headers = {
294
185
  "content-type": "application/json",
295
186
  };
296
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
297
- "/connect-instance/{connectInstanceId}/onboarding";
298
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
187
+ b.bp("/connect-instance/{connectInstanceId}/onboarding");
188
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
299
189
  let body;
300
190
  body = JSON.stringify((0, smithy_client_1.take)(input, {
301
191
  encryptionConfig: (_) => (0, smithy_client_1._json)(_),
302
192
  }));
303
- return new protocol_http_1.HttpRequest({
304
- protocol,
305
- hostname,
306
- port,
307
- method: "PUT",
308
- headers,
309
- path: resolvedPath,
310
- body,
311
- });
193
+ b.m("PUT").h(headers).b(body);
194
+ return b.build();
312
195
  };
313
196
  exports.se_StartInstanceOnboardingJobCommand = se_StartInstanceOnboardingJobCommand;
314
197
  const se_StopCampaignCommand = async (input, context) => {
315
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
198
+ const b = (0, core_2.requestBuilder)(input, context);
316
199
  const headers = {};
317
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/stop";
318
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
200
+ b.bp("/campaigns/{id}/stop");
201
+ b.p("id", () => input.id, "{id}", false);
319
202
  let body;
320
- return new protocol_http_1.HttpRequest({
321
- protocol,
322
- hostname,
323
- port,
324
- method: "POST",
325
- headers,
326
- path: resolvedPath,
327
- body,
328
- });
203
+ b.m("POST").h(headers).b(body);
204
+ return b.build();
329
205
  };
330
206
  exports.se_StopCampaignCommand = se_StopCampaignCommand;
331
207
  const se_TagResourceCommand = async (input, context) => {
332
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
208
+ const b = (0, core_2.requestBuilder)(input, context);
333
209
  const headers = {
334
210
  "content-type": "application/json",
335
211
  };
336
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
337
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
212
+ b.bp("/tags/{arn}");
213
+ b.p("arn", () => input.arn, "{arn}", false);
338
214
  let body;
339
215
  body = JSON.stringify((0, smithy_client_1.take)(input, {
340
216
  tags: (_) => (0, smithy_client_1._json)(_),
341
217
  }));
342
- return new protocol_http_1.HttpRequest({
343
- protocol,
344
- hostname,
345
- port,
346
- method: "POST",
347
- headers,
348
- path: resolvedPath,
349
- body,
350
- });
218
+ b.m("POST").h(headers).b(body);
219
+ return b.build();
351
220
  };
352
221
  exports.se_TagResourceCommand = se_TagResourceCommand;
353
222
  const se_UntagResourceCommand = async (input, context) => {
354
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
223
+ const b = (0, core_2.requestBuilder)(input, context);
355
224
  const headers = {};
356
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
357
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
225
+ b.bp("/tags/{arn}");
226
+ b.p("arn", () => input.arn, "{arn}", false);
358
227
  const query = (0, smithy_client_1.map)({
359
- tagKeys: [
228
+ [_tK]: [
360
229
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
361
- () => (input.tagKeys || []).map((_entry) => _entry),
230
+ () => (input[_tK] || []).map((_entry) => _entry),
362
231
  ],
363
232
  });
364
233
  let body;
365
- return new protocol_http_1.HttpRequest({
366
- protocol,
367
- hostname,
368
- port,
369
- method: "DELETE",
370
- headers,
371
- path: resolvedPath,
372
- query,
373
- body,
374
- });
234
+ b.m("DELETE").h(headers).q(query).b(body);
235
+ return b.build();
375
236
  };
376
237
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
377
238
  const se_UpdateCampaignDialerConfigCommand = async (input, context) => {
378
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
239
+ const b = (0, core_2.requestBuilder)(input, context);
379
240
  const headers = {
380
241
  "content-type": "application/json",
381
242
  };
382
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dialer-config";
383
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
243
+ b.bp("/campaigns/{id}/dialer-config");
244
+ b.p("id", () => input.id, "{id}", false);
384
245
  let body;
385
246
  body = JSON.stringify((0, smithy_client_1.take)(input, {
386
247
  dialerConfig: (_) => se_DialerConfig(_, context),
387
248
  }));
388
- return new protocol_http_1.HttpRequest({
389
- protocol,
390
- hostname,
391
- port,
392
- method: "POST",
393
- headers,
394
- path: resolvedPath,
395
- body,
396
- });
249
+ b.m("POST").h(headers).b(body);
250
+ return b.build();
397
251
  };
398
252
  exports.se_UpdateCampaignDialerConfigCommand = se_UpdateCampaignDialerConfigCommand;
399
253
  const se_UpdateCampaignNameCommand = async (input, context) => {
400
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
254
+ const b = (0, core_2.requestBuilder)(input, context);
401
255
  const headers = {
402
256
  "content-type": "application/json",
403
257
  };
404
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/name";
405
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
258
+ b.bp("/campaigns/{id}/name");
259
+ b.p("id", () => input.id, "{id}", false);
406
260
  let body;
407
261
  body = JSON.stringify((0, smithy_client_1.take)(input, {
408
262
  name: [],
409
263
  }));
410
- return new protocol_http_1.HttpRequest({
411
- protocol,
412
- hostname,
413
- port,
414
- method: "POST",
415
- headers,
416
- path: resolvedPath,
417
- body,
418
- });
264
+ b.m("POST").h(headers).b(body);
265
+ return b.build();
419
266
  };
420
267
  exports.se_UpdateCampaignNameCommand = se_UpdateCampaignNameCommand;
421
268
  const se_UpdateCampaignOutboundCallConfigCommand = async (input, context) => {
422
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
269
+ const b = (0, core_2.requestBuilder)(input, context);
423
270
  const headers = {
424
271
  "content-type": "application/json",
425
272
  };
426
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/outbound-call-config";
427
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "id", () => input.id, "{id}", false);
273
+ b.bp("/campaigns/{id}/outbound-call-config");
274
+ b.p("id", () => input.id, "{id}", false);
428
275
  let body;
429
276
  body = JSON.stringify((0, smithy_client_1.take)(input, {
430
277
  answerMachineDetectionConfig: (_) => (0, smithy_client_1._json)(_),
431
278
  connectContactFlowId: [],
432
279
  connectSourcePhoneNumber: [],
433
280
  }));
434
- return new protocol_http_1.HttpRequest({
435
- protocol,
436
- hostname,
437
- port,
438
- method: "POST",
439
- headers,
440
- path: resolvedPath,
441
- body,
442
- });
281
+ b.m("POST").h(headers).b(body);
282
+ return b.build();
443
283
  };
444
284
  exports.se_UpdateCampaignOutboundCallConfigCommand = se_UpdateCampaignOutboundCallConfigCommand;
445
285
  const de_CreateCampaignCommand = async (output, context) => {
@@ -1438,7 +1278,7 @@ const de_UpdateCampaignOutboundCallConfigCommandError = async (output, context)
1438
1278
  const throwDefaultError = (0, smithy_client_1.withBaseException)(ConnectCampaignsServiceException_1.ConnectCampaignsServiceException);
1439
1279
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1440
1280
  const contents = (0, smithy_client_1.map)({
1441
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1281
+ [_xAET]: [, parsedOutput.headers[_xae]],
1442
1282
  });
1443
1283
  const data = parsedOutput.body;
1444
1284
  const doc = (0, smithy_client_1.take)(data, {
@@ -1453,7 +1293,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1453
1293
  };
1454
1294
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1455
1295
  const contents = (0, smithy_client_1.map)({
1456
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1296
+ [_xAET]: [, parsedOutput.headers[_xae]],
1457
1297
  });
1458
1298
  const data = parsedOutput.body;
1459
1299
  const doc = (0, smithy_client_1.take)(data, {
@@ -1468,7 +1308,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1468
1308
  };
1469
1309
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1470
1310
  const contents = (0, smithy_client_1.map)({
1471
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1311
+ [_xAET]: [, parsedOutput.headers[_xae]],
1472
1312
  });
1473
1313
  const data = parsedOutput.body;
1474
1314
  const doc = (0, smithy_client_1.take)(data, {
@@ -1483,7 +1323,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1483
1323
  };
1484
1324
  const de_InvalidCampaignStateExceptionRes = async (parsedOutput, context) => {
1485
1325
  const contents = (0, smithy_client_1.map)({
1486
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1326
+ [_xAET]: [, parsedOutput.headers[_xae]],
1487
1327
  });
1488
1328
  const data = parsedOutput.body;
1489
1329
  const doc = (0, smithy_client_1.take)(data, {
@@ -1499,7 +1339,7 @@ const de_InvalidCampaignStateExceptionRes = async (parsedOutput, context) => {
1499
1339
  };
1500
1340
  const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
1501
1341
  const contents = (0, smithy_client_1.map)({
1502
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1342
+ [_xAET]: [, parsedOutput.headers[_xae]],
1503
1343
  });
1504
1344
  const data = parsedOutput.body;
1505
1345
  const doc = (0, smithy_client_1.take)(data, {
@@ -1514,7 +1354,7 @@ const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
1514
1354
  };
1515
1355
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1516
1356
  const contents = (0, smithy_client_1.map)({
1517
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1357
+ [_xAET]: [, parsedOutput.headers[_xae]],
1518
1358
  });
1519
1359
  const data = parsedOutput.body;
1520
1360
  const doc = (0, smithy_client_1.take)(data, {
@@ -1529,7 +1369,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1529
1369
  };
1530
1370
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1531
1371
  const contents = (0, smithy_client_1.map)({
1532
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1372
+ [_xAET]: [, parsedOutput.headers[_xae]],
1533
1373
  });
1534
1374
  const data = parsedOutput.body;
1535
1375
  const doc = (0, smithy_client_1.take)(data, {
@@ -1544,7 +1384,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1544
1384
  };
1545
1385
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1546
1386
  const contents = (0, smithy_client_1.map)({
1547
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1387
+ [_xAET]: [, parsedOutput.headers[_xae]],
1548
1388
  });
1549
1389
  const data = parsedOutput.body;
1550
1390
  const doc = (0, smithy_client_1.take)(data, {
@@ -1559,7 +1399,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1559
1399
  };
1560
1400
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1561
1401
  const contents = (0, smithy_client_1.map)({
1562
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1402
+ [_xAET]: [, parsedOutput.headers[_xae]],
1563
1403
  });
1564
1404
  const data = parsedOutput.body;
1565
1405
  const doc = (0, smithy_client_1.take)(data, {
@@ -1670,6 +1510,9 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1670
1510
  value !== "" &&
1671
1511
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1672
1512
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1513
+ const _tK = "tagKeys";
1514
+ const _xAET = "xAmzErrorType";
1515
+ const _xae = "x-amzn-errortype";
1673
1516
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1674
1517
  if (encoded.length) {
1675
1518
  return JSON.parse(encoded);
@@ -1,14 +1,14 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { ConnectCampaignsServiceException as __BaseException } from "../models/ConnectCampaignsServiceException";
5
5
  import { AccessDeniedException, ConflictException, DialerConfig, InternalServerException, InvalidCampaignStateException, InvalidStateException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
6
  export const se_CreateCampaignCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {
9
9
  "content-type": "application/json",
10
10
  };
11
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns";
11
+ b.bp("/campaigns");
12
12
  let body;
13
13
  body = JSON.stringify(take(input, {
14
14
  connectInstanceId: [],
@@ -17,405 +17,245 @@ export const se_CreateCampaignCommand = async (input, context) => {
17
17
  outboundCallConfig: (_) => _json(_),
18
18
  tags: (_) => _json(_),
19
19
  }));
20
- return new __HttpRequest({
21
- protocol,
22
- hostname,
23
- port,
24
- method: "PUT",
25
- headers,
26
- path: resolvedPath,
27
- body,
28
- });
20
+ b.m("PUT").h(headers).b(body);
21
+ return b.build();
29
22
  };
30
23
  export const se_DeleteCampaignCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = rb(input, context);
32
25
  const headers = {};
33
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}";
34
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
26
+ b.bp("/campaigns/{id}");
27
+ b.p("id", () => input.id, "{id}", false);
35
28
  let body;
36
- return new __HttpRequest({
37
- protocol,
38
- hostname,
39
- port,
40
- method: "DELETE",
41
- headers,
42
- path: resolvedPath,
43
- body,
44
- });
29
+ b.m("DELETE").h(headers).b(body);
30
+ return b.build();
45
31
  };
46
32
  export const se_DeleteConnectInstanceConfigCommand = async (input, context) => {
47
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
+ const b = rb(input, context);
48
34
  const headers = {};
49
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
50
- "/connect-instance/{connectInstanceId}/config";
51
- resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
35
+ b.bp("/connect-instance/{connectInstanceId}/config");
36
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
52
37
  let body;
53
- return new __HttpRequest({
54
- protocol,
55
- hostname,
56
- port,
57
- method: "DELETE",
58
- headers,
59
- path: resolvedPath,
60
- body,
61
- });
38
+ b.m("DELETE").h(headers).b(body);
39
+ return b.build();
62
40
  };
63
41
  export const se_DeleteInstanceOnboardingJobCommand = async (input, context) => {
64
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
42
+ const b = rb(input, context);
65
43
  const headers = {};
66
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
67
- "/connect-instance/{connectInstanceId}/onboarding";
68
- resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
44
+ b.bp("/connect-instance/{connectInstanceId}/onboarding");
45
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
69
46
  let body;
70
- return new __HttpRequest({
71
- protocol,
72
- hostname,
73
- port,
74
- method: "DELETE",
75
- headers,
76
- path: resolvedPath,
77
- body,
78
- });
47
+ b.m("DELETE").h(headers).b(body);
48
+ return b.build();
79
49
  };
80
50
  export const se_DescribeCampaignCommand = async (input, context) => {
81
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
51
+ const b = rb(input, context);
82
52
  const headers = {};
83
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}";
84
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
53
+ b.bp("/campaigns/{id}");
54
+ b.p("id", () => input.id, "{id}", false);
85
55
  let body;
86
- return new __HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "GET",
91
- headers,
92
- path: resolvedPath,
93
- body,
94
- });
56
+ b.m("GET").h(headers).b(body);
57
+ return b.build();
95
58
  };
96
59
  export const se_GetCampaignStateCommand = async (input, context) => {
97
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
60
+ const b = rb(input, context);
98
61
  const headers = {};
99
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/state";
100
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
62
+ b.bp("/campaigns/{id}/state");
63
+ b.p("id", () => input.id, "{id}", false);
101
64
  let body;
102
- return new __HttpRequest({
103
- protocol,
104
- hostname,
105
- port,
106
- method: "GET",
107
- headers,
108
- path: resolvedPath,
109
- body,
110
- });
65
+ b.m("GET").h(headers).b(body);
66
+ return b.build();
111
67
  };
112
68
  export const se_GetCampaignStateBatchCommand = async (input, context) => {
113
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const b = rb(input, context);
114
70
  const headers = {
115
71
  "content-type": "application/json",
116
72
  };
117
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-state";
73
+ b.bp("/campaigns-state");
118
74
  let body;
119
75
  body = JSON.stringify(take(input, {
120
76
  campaignIds: (_) => _json(_),
121
77
  }));
122
- return new __HttpRequest({
123
- protocol,
124
- hostname,
125
- port,
126
- method: "POST",
127
- headers,
128
- path: resolvedPath,
129
- body,
130
- });
78
+ b.m("POST").h(headers).b(body);
79
+ return b.build();
131
80
  };
132
81
  export const se_GetConnectInstanceConfigCommand = async (input, context) => {
133
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
+ const b = rb(input, context);
134
83
  const headers = {};
135
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
136
- "/connect-instance/{connectInstanceId}/config";
137
- resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
84
+ b.bp("/connect-instance/{connectInstanceId}/config");
85
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
138
86
  let body;
139
- return new __HttpRequest({
140
- protocol,
141
- hostname,
142
- port,
143
- method: "GET",
144
- headers,
145
- path: resolvedPath,
146
- body,
147
- });
87
+ b.m("GET").h(headers).b(body);
88
+ return b.build();
148
89
  };
149
90
  export const se_GetInstanceOnboardingJobStatusCommand = async (input, context) => {
150
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
91
+ const b = rb(input, context);
151
92
  const headers = {};
152
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
153
- "/connect-instance/{connectInstanceId}/onboarding";
154
- resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
93
+ b.bp("/connect-instance/{connectInstanceId}/onboarding");
94
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
155
95
  let body;
156
- return new __HttpRequest({
157
- protocol,
158
- hostname,
159
- port,
160
- method: "GET",
161
- headers,
162
- path: resolvedPath,
163
- body,
164
- });
96
+ b.m("GET").h(headers).b(body);
97
+ return b.build();
165
98
  };
166
99
  export const se_ListCampaignsCommand = async (input, context) => {
167
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
100
+ const b = rb(input, context);
168
101
  const headers = {
169
102
  "content-type": "application/json",
170
103
  };
171
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-summary";
104
+ b.bp("/campaigns-summary");
172
105
  let body;
173
106
  body = JSON.stringify(take(input, {
174
107
  filters: (_) => _json(_),
175
108
  maxResults: [],
176
109
  nextToken: [],
177
110
  }));
178
- return new __HttpRequest({
179
- protocol,
180
- hostname,
181
- port,
182
- method: "POST",
183
- headers,
184
- path: resolvedPath,
185
- body,
186
- });
111
+ b.m("POST").h(headers).b(body);
112
+ return b.build();
187
113
  };
188
114
  export const se_ListTagsForResourceCommand = async (input, context) => {
189
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
115
+ const b = rb(input, context);
190
116
  const headers = {};
191
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
192
- resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
117
+ b.bp("/tags/{arn}");
118
+ b.p("arn", () => input.arn, "{arn}", false);
193
119
  let body;
194
- return new __HttpRequest({
195
- protocol,
196
- hostname,
197
- port,
198
- method: "GET",
199
- headers,
200
- path: resolvedPath,
201
- body,
202
- });
120
+ b.m("GET").h(headers).b(body);
121
+ return b.build();
203
122
  };
204
123
  export const se_PauseCampaignCommand = async (input, context) => {
205
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
124
+ const b = rb(input, context);
206
125
  const headers = {};
207
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/pause";
208
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
126
+ b.bp("/campaigns/{id}/pause");
127
+ b.p("id", () => input.id, "{id}", false);
209
128
  let body;
210
- return new __HttpRequest({
211
- protocol,
212
- hostname,
213
- port,
214
- method: "POST",
215
- headers,
216
- path: resolvedPath,
217
- body,
218
- });
129
+ b.m("POST").h(headers).b(body);
130
+ return b.build();
219
131
  };
220
132
  export const se_PutDialRequestBatchCommand = async (input, context) => {
221
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
133
+ const b = rb(input, context);
222
134
  const headers = {
223
135
  "content-type": "application/json",
224
136
  };
225
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dial-requests";
226
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
137
+ b.bp("/campaigns/{id}/dial-requests");
138
+ b.p("id", () => input.id, "{id}", false);
227
139
  let body;
228
140
  body = JSON.stringify(take(input, {
229
141
  dialRequests: (_) => se_DialRequestList(_, context),
230
142
  }));
231
- return new __HttpRequest({
232
- protocol,
233
- hostname,
234
- port,
235
- method: "PUT",
236
- headers,
237
- path: resolvedPath,
238
- body,
239
- });
143
+ b.m("PUT").h(headers).b(body);
144
+ return b.build();
240
145
  };
241
146
  export const se_ResumeCampaignCommand = async (input, context) => {
242
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
147
+ const b = rb(input, context);
243
148
  const headers = {};
244
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/resume";
245
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
149
+ b.bp("/campaigns/{id}/resume");
150
+ b.p("id", () => input.id, "{id}", false);
246
151
  let body;
247
- return new __HttpRequest({
248
- protocol,
249
- hostname,
250
- port,
251
- method: "POST",
252
- headers,
253
- path: resolvedPath,
254
- body,
255
- });
152
+ b.m("POST").h(headers).b(body);
153
+ return b.build();
256
154
  };
257
155
  export const se_StartCampaignCommand = async (input, context) => {
258
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
156
+ const b = rb(input, context);
259
157
  const headers = {};
260
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/start";
261
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
158
+ b.bp("/campaigns/{id}/start");
159
+ b.p("id", () => input.id, "{id}", false);
262
160
  let body;
263
- return new __HttpRequest({
264
- protocol,
265
- hostname,
266
- port,
267
- method: "POST",
268
- headers,
269
- path: resolvedPath,
270
- body,
271
- });
161
+ b.m("POST").h(headers).b(body);
162
+ return b.build();
272
163
  };
273
164
  export const se_StartInstanceOnboardingJobCommand = async (input, context) => {
274
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
165
+ const b = rb(input, context);
275
166
  const headers = {
276
167
  "content-type": "application/json",
277
168
  };
278
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
279
- "/connect-instance/{connectInstanceId}/onboarding";
280
- resolvedPath = __resolvedPath(resolvedPath, input, "connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
169
+ b.bp("/connect-instance/{connectInstanceId}/onboarding");
170
+ b.p("connectInstanceId", () => input.connectInstanceId, "{connectInstanceId}", false);
281
171
  let body;
282
172
  body = JSON.stringify(take(input, {
283
173
  encryptionConfig: (_) => _json(_),
284
174
  }));
285
- return new __HttpRequest({
286
- protocol,
287
- hostname,
288
- port,
289
- method: "PUT",
290
- headers,
291
- path: resolvedPath,
292
- body,
293
- });
175
+ b.m("PUT").h(headers).b(body);
176
+ return b.build();
294
177
  };
295
178
  export const se_StopCampaignCommand = async (input, context) => {
296
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
179
+ const b = rb(input, context);
297
180
  const headers = {};
298
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/stop";
299
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
181
+ b.bp("/campaigns/{id}/stop");
182
+ b.p("id", () => input.id, "{id}", false);
300
183
  let body;
301
- return new __HttpRequest({
302
- protocol,
303
- hostname,
304
- port,
305
- method: "POST",
306
- headers,
307
- path: resolvedPath,
308
- body,
309
- });
184
+ b.m("POST").h(headers).b(body);
185
+ return b.build();
310
186
  };
311
187
  export const se_TagResourceCommand = async (input, context) => {
312
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
188
+ const b = rb(input, context);
313
189
  const headers = {
314
190
  "content-type": "application/json",
315
191
  };
316
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
317
- resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
192
+ b.bp("/tags/{arn}");
193
+ b.p("arn", () => input.arn, "{arn}", false);
318
194
  let body;
319
195
  body = JSON.stringify(take(input, {
320
196
  tags: (_) => _json(_),
321
197
  }));
322
- return new __HttpRequest({
323
- protocol,
324
- hostname,
325
- port,
326
- method: "POST",
327
- headers,
328
- path: resolvedPath,
329
- body,
330
- });
198
+ b.m("POST").h(headers).b(body);
199
+ return b.build();
331
200
  };
332
201
  export const se_UntagResourceCommand = async (input, context) => {
333
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
202
+ const b = rb(input, context);
334
203
  const headers = {};
335
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{arn}";
336
- resolvedPath = __resolvedPath(resolvedPath, input, "arn", () => input.arn, "{arn}", false);
204
+ b.bp("/tags/{arn}");
205
+ b.p("arn", () => input.arn, "{arn}", false);
337
206
  const query = map({
338
- tagKeys: [
207
+ [_tK]: [
339
208
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
340
- () => (input.tagKeys || []).map((_entry) => _entry),
209
+ () => (input[_tK] || []).map((_entry) => _entry),
341
210
  ],
342
211
  });
343
212
  let body;
344
- return new __HttpRequest({
345
- protocol,
346
- hostname,
347
- port,
348
- method: "DELETE",
349
- headers,
350
- path: resolvedPath,
351
- query,
352
- body,
353
- });
213
+ b.m("DELETE").h(headers).q(query).b(body);
214
+ return b.build();
354
215
  };
355
216
  export const se_UpdateCampaignDialerConfigCommand = async (input, context) => {
356
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
217
+ const b = rb(input, context);
357
218
  const headers = {
358
219
  "content-type": "application/json",
359
220
  };
360
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/dialer-config";
361
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
221
+ b.bp("/campaigns/{id}/dialer-config");
222
+ b.p("id", () => input.id, "{id}", false);
362
223
  let body;
363
224
  body = JSON.stringify(take(input, {
364
225
  dialerConfig: (_) => se_DialerConfig(_, context),
365
226
  }));
366
- return new __HttpRequest({
367
- protocol,
368
- hostname,
369
- port,
370
- method: "POST",
371
- headers,
372
- path: resolvedPath,
373
- body,
374
- });
227
+ b.m("POST").h(headers).b(body);
228
+ return b.build();
375
229
  };
376
230
  export const se_UpdateCampaignNameCommand = async (input, context) => {
377
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
231
+ const b = rb(input, context);
378
232
  const headers = {
379
233
  "content-type": "application/json",
380
234
  };
381
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/name";
382
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
235
+ b.bp("/campaigns/{id}/name");
236
+ b.p("id", () => input.id, "{id}", false);
383
237
  let body;
384
238
  body = JSON.stringify(take(input, {
385
239
  name: [],
386
240
  }));
387
- return new __HttpRequest({
388
- protocol,
389
- hostname,
390
- port,
391
- method: "POST",
392
- headers,
393
- path: resolvedPath,
394
- body,
395
- });
241
+ b.m("POST").h(headers).b(body);
242
+ return b.build();
396
243
  };
397
244
  export const se_UpdateCampaignOutboundCallConfigCommand = async (input, context) => {
398
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
245
+ const b = rb(input, context);
399
246
  const headers = {
400
247
  "content-type": "application/json",
401
248
  };
402
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns/{id}/outbound-call-config";
403
- resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
249
+ b.bp("/campaigns/{id}/outbound-call-config");
250
+ b.p("id", () => input.id, "{id}", false);
404
251
  let body;
405
252
  body = JSON.stringify(take(input, {
406
253
  answerMachineDetectionConfig: (_) => _json(_),
407
254
  connectContactFlowId: [],
408
255
  connectSourcePhoneNumber: [],
409
256
  }));
410
- return new __HttpRequest({
411
- protocol,
412
- hostname,
413
- port,
414
- method: "POST",
415
- headers,
416
- path: resolvedPath,
417
- body,
418
- });
257
+ b.m("POST").h(headers).b(body);
258
+ return b.build();
419
259
  };
420
260
  export const de_CreateCampaignCommand = async (output, context) => {
421
261
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1391,7 +1231,7 @@ const de_UpdateCampaignOutboundCallConfigCommandError = async (output, context)
1391
1231
  const throwDefaultError = withBaseException(__BaseException);
1392
1232
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1393
1233
  const contents = map({
1394
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1234
+ [_xAET]: [, parsedOutput.headers[_xae]],
1395
1235
  });
1396
1236
  const data = parsedOutput.body;
1397
1237
  const doc = take(data, {
@@ -1406,7 +1246,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1406
1246
  };
1407
1247
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
1408
1248
  const contents = map({
1409
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1249
+ [_xAET]: [, parsedOutput.headers[_xae]],
1410
1250
  });
1411
1251
  const data = parsedOutput.body;
1412
1252
  const doc = take(data, {
@@ -1421,7 +1261,7 @@ const de_ConflictExceptionRes = async (parsedOutput, context) => {
1421
1261
  };
1422
1262
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1423
1263
  const contents = map({
1424
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1264
+ [_xAET]: [, parsedOutput.headers[_xae]],
1425
1265
  });
1426
1266
  const data = parsedOutput.body;
1427
1267
  const doc = take(data, {
@@ -1436,7 +1276,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1436
1276
  };
1437
1277
  const de_InvalidCampaignStateExceptionRes = async (parsedOutput, context) => {
1438
1278
  const contents = map({
1439
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1279
+ [_xAET]: [, parsedOutput.headers[_xae]],
1440
1280
  });
1441
1281
  const data = parsedOutput.body;
1442
1282
  const doc = take(data, {
@@ -1452,7 +1292,7 @@ const de_InvalidCampaignStateExceptionRes = async (parsedOutput, context) => {
1452
1292
  };
1453
1293
  const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
1454
1294
  const contents = map({
1455
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1295
+ [_xAET]: [, parsedOutput.headers[_xae]],
1456
1296
  });
1457
1297
  const data = parsedOutput.body;
1458
1298
  const doc = take(data, {
@@ -1467,7 +1307,7 @@ const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
1467
1307
  };
1468
1308
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1469
1309
  const contents = map({
1470
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1310
+ [_xAET]: [, parsedOutput.headers[_xae]],
1471
1311
  });
1472
1312
  const data = parsedOutput.body;
1473
1313
  const doc = take(data, {
@@ -1482,7 +1322,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1482
1322
  };
1483
1323
  const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1484
1324
  const contents = map({
1485
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1325
+ [_xAET]: [, parsedOutput.headers[_xae]],
1486
1326
  });
1487
1327
  const data = parsedOutput.body;
1488
1328
  const doc = take(data, {
@@ -1497,7 +1337,7 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
1497
1337
  };
1498
1338
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1499
1339
  const contents = map({
1500
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1340
+ [_xAET]: [, parsedOutput.headers[_xae]],
1501
1341
  });
1502
1342
  const data = parsedOutput.body;
1503
1343
  const doc = take(data, {
@@ -1512,7 +1352,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
1512
1352
  };
1513
1353
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1514
1354
  const contents = map({
1515
- xAmzErrorType: [, parsedOutput.headers["x-amzn-errortype"]],
1355
+ [_xAET]: [, parsedOutput.headers[_xae]],
1516
1356
  });
1517
1357
  const data = parsedOutput.body;
1518
1358
  const doc = take(data, {
@@ -1623,6 +1463,9 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1623
1463
  value !== "" &&
1624
1464
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1625
1465
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1466
+ const _tK = "tagKeys";
1467
+ const _xAET = "xAmzErrorType";
1468
+ const _xae = "x-amzn-errortype";
1626
1469
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1627
1470
  if (encoded.length) {
1628
1471
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-connectcampaigns",
3
3
  "description": "AWS SDK for JavaScript Connectcampaigns Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",