@aws-sdk/client-connectcampaigns 3.121.0 → 3.130.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,30 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.130.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.129.0...v3.130.0) (2022-07-14)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-connectcampaigns
9
+
10
+
11
+
12
+
13
+
14
+ # [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-connectcampaigns
17
+
18
+
19
+
20
+
21
+
22
+ # [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
23
+
24
+ **Note:** Version bump only for package @aws-sdk/client-connectcampaigns
25
+
26
+
27
+
28
+
29
+
6
30
  # [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
7
31
 
8
32
 
@@ -13,16 +13,15 @@ const serializeAws_restJson1CreateCampaignCommand = async (input, context) => {
13
13
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns";
14
14
  let body;
15
15
  body = JSON.stringify({
16
- ...(input.connectInstanceId !== undefined &&
17
- input.connectInstanceId !== null && { connectInstanceId: input.connectInstanceId }),
18
- ...(input.dialerConfig !== undefined &&
19
- input.dialerConfig !== null && { dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context) }),
20
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
21
- ...(input.outboundCallConfig !== undefined &&
22
- input.outboundCallConfig !== null && {
16
+ ...(input.connectInstanceId != null && { connectInstanceId: input.connectInstanceId }),
17
+ ...(input.dialerConfig != null && {
18
+ dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context),
19
+ }),
20
+ ...(input.name != null && { name: input.name }),
21
+ ...(input.outboundCallConfig != null && {
23
22
  outboundCallConfig: serializeAws_restJson1OutboundCallConfig(input.outboundCallConfig, context),
24
23
  }),
25
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
24
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
26
25
  });
27
26
  return new protocol_http_1.HttpRequest({
28
27
  protocol,
@@ -175,8 +174,7 @@ const serializeAws_restJson1GetCampaignStateBatchCommand = async (input, context
175
174
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-state";
176
175
  let body;
177
176
  body = JSON.stringify({
178
- ...(input.campaignIds !== undefined &&
179
- input.campaignIds !== null && { campaignIds: serializeAws_restJson1CampaignIdList(input.campaignIds, context) }),
177
+ ...(input.campaignIds != null && { campaignIds: serializeAws_restJson1CampaignIdList(input.campaignIds, context) }),
180
178
  });
181
179
  return new protocol_http_1.HttpRequest({
182
180
  protocol,
@@ -251,10 +249,9 @@ const serializeAws_restJson1ListCampaignsCommand = async (input, context) => {
251
249
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/campaigns-summary";
252
250
  let body;
253
251
  body = JSON.stringify({
254
- ...(input.filters !== undefined &&
255
- input.filters !== null && { filters: serializeAws_restJson1CampaignFilters(input.filters, context) }),
256
- ...(input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults }),
257
- ...(input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken }),
252
+ ...(input.filters != null && { filters: serializeAws_restJson1CampaignFilters(input.filters, context) }),
253
+ ...(input.maxResults != null && { maxResults: input.maxResults }),
254
+ ...(input.nextToken != null && { nextToken: input.nextToken }),
258
255
  });
259
256
  return new protocol_http_1.HttpRequest({
260
257
  protocol,
@@ -337,8 +334,7 @@ const serializeAws_restJson1PutDialRequestBatchCommand = async (input, context)
337
334
  }
338
335
  let body;
339
336
  body = JSON.stringify({
340
- ...(input.dialRequests !== undefined &&
341
- input.dialRequests !== null && {
337
+ ...(input.dialRequests != null && {
342
338
  dialRequests: serializeAws_restJson1DialRequestList(input.dialRequests, context),
343
339
  }),
344
340
  });
@@ -424,8 +420,7 @@ const serializeAws_restJson1StartInstanceOnboardingJobCommand = async (input, co
424
420
  }
425
421
  let body;
426
422
  body = JSON.stringify({
427
- ...(input.encryptionConfig !== undefined &&
428
- input.encryptionConfig !== null && {
423
+ ...(input.encryptionConfig != null && {
429
424
  encryptionConfig: serializeAws_restJson1EncryptionConfig(input.encryptionConfig, context),
430
425
  }),
431
426
  });
@@ -484,7 +479,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
484
479
  }
485
480
  let body;
486
481
  body = JSON.stringify({
487
- ...(input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
482
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
488
483
  });
489
484
  return new protocol_http_1.HttpRequest({
490
485
  protocol,
@@ -545,8 +540,9 @@ const serializeAws_restJson1UpdateCampaignDialerConfigCommand = async (input, co
545
540
  }
546
541
  let body;
547
542
  body = JSON.stringify({
548
- ...(input.dialerConfig !== undefined &&
549
- input.dialerConfig !== null && { dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context) }),
543
+ ...(input.dialerConfig != null && {
544
+ dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context),
545
+ }),
550
546
  });
551
547
  return new protocol_http_1.HttpRequest({
552
548
  protocol,
@@ -577,7 +573,7 @@ const serializeAws_restJson1UpdateCampaignNameCommand = async (input, context) =
577
573
  }
578
574
  let body;
579
575
  body = JSON.stringify({
580
- ...(input.name !== undefined && input.name !== null && { name: input.name }),
576
+ ...(input.name != null && { name: input.name }),
581
577
  });
582
578
  return new protocol_http_1.HttpRequest({
583
579
  protocol,
@@ -608,14 +604,11 @@ const serializeAws_restJson1UpdateCampaignOutboundCallConfigCommand = async (inp
608
604
  }
609
605
  let body;
610
606
  body = JSON.stringify({
611
- ...(input.answerMachineDetectionConfig !== undefined &&
612
- input.answerMachineDetectionConfig !== null && {
607
+ ...(input.answerMachineDetectionConfig != null && {
613
608
  answerMachineDetectionConfig: serializeAws_restJson1AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context),
614
609
  }),
615
- ...(input.connectContactFlowId !== undefined &&
616
- input.connectContactFlowId !== null && { connectContactFlowId: input.connectContactFlowId }),
617
- ...(input.connectSourcePhoneNumber !== undefined &&
618
- input.connectSourcePhoneNumber !== null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }),
610
+ ...(input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId }),
611
+ ...(input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }),
619
612
  });
620
613
  return new protocol_http_1.HttpRequest({
621
614
  protocol,
@@ -1849,8 +1842,7 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
1849
1842
  };
1850
1843
  const serializeAws_restJson1AnswerMachineDetectionConfig = (input, context) => {
1851
1844
  return {
1852
- ...(input.enableAnswerMachineDetection !== undefined &&
1853
- input.enableAnswerMachineDetection !== null && {
1845
+ ...(input.enableAnswerMachineDetection != null && {
1854
1846
  enableAnswerMachineDetection: input.enableAnswerMachineDetection,
1855
1847
  }),
1856
1848
  };
@@ -1868,8 +1860,7 @@ const serializeAws_restJson1Attributes = (input, context) => {
1868
1860
  };
1869
1861
  const serializeAws_restJson1CampaignFilters = (input, context) => {
1870
1862
  return {
1871
- ...(input.instanceIdFilter !== undefined &&
1872
- input.instanceIdFilter !== null && {
1863
+ ...(input.instanceIdFilter != null && {
1873
1864
  instanceIdFilter: serializeAws_restJson1InstanceIdFilter(input.instanceIdFilter, context),
1874
1865
  }),
1875
1866
  };
@@ -1897,12 +1888,10 @@ const serializeAws_restJson1DialerConfig = (input, context) => {
1897
1888
  };
1898
1889
  const serializeAws_restJson1DialRequest = (input, context) => {
1899
1890
  return {
1900
- ...(input.attributes !== undefined &&
1901
- input.attributes !== null && { attributes: serializeAws_restJson1Attributes(input.attributes, context) }),
1902
- ...(input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken }),
1903
- ...(input.expirationTime !== undefined &&
1904
- input.expirationTime !== null && { expirationTime: input.expirationTime.toISOString().split(".")[0] + "Z" }),
1905
- ...(input.phoneNumber !== undefined && input.phoneNumber !== null && { phoneNumber: input.phoneNumber }),
1891
+ ...(input.attributes != null && { attributes: serializeAws_restJson1Attributes(input.attributes, context) }),
1892
+ ...(input.clientToken != null && { clientToken: input.clientToken }),
1893
+ ...(input.expirationTime != null && { expirationTime: input.expirationTime.toISOString().split(".")[0] + "Z" }),
1894
+ ...(input.phoneNumber != null && { phoneNumber: input.phoneNumber }),
1906
1895
  };
1907
1896
  };
1908
1897
  const serializeAws_restJson1DialRequestList = (input, context) => {
@@ -1917,42 +1906,35 @@ const serializeAws_restJson1DialRequestList = (input, context) => {
1917
1906
  };
1918
1907
  const serializeAws_restJson1EncryptionConfig = (input, context) => {
1919
1908
  return {
1920
- ...(input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled }),
1921
- ...(input.encryptionType !== undefined &&
1922
- input.encryptionType !== null && { encryptionType: input.encryptionType }),
1923
- ...(input.keyArn !== undefined && input.keyArn !== null && { keyArn: input.keyArn }),
1909
+ ...(input.enabled != null && { enabled: input.enabled }),
1910
+ ...(input.encryptionType != null && { encryptionType: input.encryptionType }),
1911
+ ...(input.keyArn != null && { keyArn: input.keyArn }),
1924
1912
  };
1925
1913
  };
1926
1914
  const serializeAws_restJson1InstanceIdFilter = (input, context) => {
1927
1915
  return {
1928
- ...(input.operator !== undefined && input.operator !== null && { operator: input.operator }),
1929
- ...(input.value !== undefined && input.value !== null && { value: input.value }),
1916
+ ...(input.operator != null && { operator: input.operator }),
1917
+ ...(input.value != null && { value: input.value }),
1930
1918
  };
1931
1919
  };
1932
1920
  const serializeAws_restJson1OutboundCallConfig = (input, context) => {
1933
1921
  return {
1934
- ...(input.answerMachineDetectionConfig !== undefined &&
1935
- input.answerMachineDetectionConfig !== null && {
1922
+ ...(input.answerMachineDetectionConfig != null && {
1936
1923
  answerMachineDetectionConfig: serializeAws_restJson1AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context),
1937
1924
  }),
1938
- ...(input.connectContactFlowId !== undefined &&
1939
- input.connectContactFlowId !== null && { connectContactFlowId: input.connectContactFlowId }),
1940
- ...(input.connectQueueId !== undefined &&
1941
- input.connectQueueId !== null && { connectQueueId: input.connectQueueId }),
1942
- ...(input.connectSourcePhoneNumber !== undefined &&
1943
- input.connectSourcePhoneNumber !== null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }),
1925
+ ...(input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId }),
1926
+ ...(input.connectQueueId != null && { connectQueueId: input.connectQueueId }),
1927
+ ...(input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }),
1944
1928
  };
1945
1929
  };
1946
1930
  const serializeAws_restJson1PredictiveDialerConfig = (input, context) => {
1947
1931
  return {
1948
- ...(input.bandwidthAllocation !== undefined &&
1949
- input.bandwidthAllocation !== null && { bandwidthAllocation: (0, smithy_client_1.serializeFloat)(input.bandwidthAllocation) }),
1932
+ ...(input.bandwidthAllocation != null && { bandwidthAllocation: (0, smithy_client_1.serializeFloat)(input.bandwidthAllocation) }),
1950
1933
  };
1951
1934
  };
1952
1935
  const serializeAws_restJson1ProgressiveDialerConfig = (input, context) => {
1953
1936
  return {
1954
- ...(input.bandwidthAllocation !== undefined &&
1955
- input.bandwidthAllocation !== null && { bandwidthAllocation: (0, smithy_client_1.serializeFloat)(input.bandwidthAllocation) }),
1937
+ ...(input.bandwidthAllocation != null && { bandwidthAllocation: (0, smithy_client_1.serializeFloat)(input.bandwidthAllocation) }),
1956
1938
  };
1957
1939
  };
1958
1940
  const serializeAws_restJson1TagMap = (input, context) => {
@@ -1975,17 +1957,15 @@ const deserializeAws_restJson1Campaign = (output, context) => {
1975
1957
  return {
1976
1958
  arn: (0, smithy_client_1.expectString)(output.arn),
1977
1959
  connectInstanceId: (0, smithy_client_1.expectString)(output.connectInstanceId),
1978
- dialerConfig: output.dialerConfig !== undefined && output.dialerConfig !== null
1960
+ dialerConfig: output.dialerConfig != null
1979
1961
  ? deserializeAws_restJson1DialerConfig((0, smithy_client_1.expectUnion)(output.dialerConfig), context)
1980
1962
  : undefined,
1981
1963
  id: (0, smithy_client_1.expectString)(output.id),
1982
1964
  name: (0, smithy_client_1.expectString)(output.name),
1983
- outboundCallConfig: output.outboundCallConfig !== undefined && output.outboundCallConfig !== null
1965
+ outboundCallConfig: output.outboundCallConfig != null
1984
1966
  ? deserializeAws_restJson1OutboundCallConfig(output.outboundCallConfig, context)
1985
1967
  : undefined,
1986
- tags: output.tags !== undefined && output.tags !== null
1987
- ? deserializeAws_restJson1TagMap(output.tags, context)
1988
- : undefined,
1968
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1989
1969
  };
1990
1970
  };
1991
1971
  const deserializeAws_restJson1CampaignSummary = (output, context) => {
@@ -2065,7 +2045,7 @@ const deserializeAws_restJson1FailedRequestList = (output, context) => {
2065
2045
  const deserializeAws_restJson1InstanceConfig = (output, context) => {
2066
2046
  return {
2067
2047
  connectInstanceId: (0, smithy_client_1.expectString)(output.connectInstanceId),
2068
- encryptionConfig: output.encryptionConfig !== undefined && output.encryptionConfig !== null
2048
+ encryptionConfig: output.encryptionConfig != null
2069
2049
  ? deserializeAws_restJson1EncryptionConfig(output.encryptionConfig, context)
2070
2050
  : undefined,
2071
2051
  serviceLinkedRoleArn: (0, smithy_client_1.expectString)(output.serviceLinkedRoleArn),
@@ -2080,7 +2060,7 @@ const deserializeAws_restJson1InstanceOnboardingJobStatus = (output, context) =>
2080
2060
  };
2081
2061
  const deserializeAws_restJson1OutboundCallConfig = (output, context) => {
2082
2062
  return {
2083
- answerMachineDetectionConfig: output.answerMachineDetectionConfig !== undefined && output.answerMachineDetectionConfig !== null
2063
+ answerMachineDetectionConfig: output.answerMachineDetectionConfig != null
2084
2064
  ? deserializeAws_restJson1AnswerMachineDetectionConfig(output.answerMachineDetectionConfig, context)
2085
2065
  : undefined,
2086
2066
  connectContactFlowId: (0, smithy_client_1.expectString)(output.connectContactFlowId),
@@ -2174,6 +2154,9 @@ const loadRestJsonErrorCode = (output, data) => {
2174
2154
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2175
2155
  const sanitizeErrorCode = (rawValue) => {
2176
2156
  let cleanValue = rawValue;
2157
+ if (typeof cleanValue === "number") {
2158
+ cleanValue = cleanValue.toString();
2159
+ }
2177
2160
  if (cleanValue.indexOf(":") >= 0) {
2178
2161
  cleanValue = cleanValue.split(":")[0];
2179
2162
  }
@@ -14,12 +14,11 @@ export var serializeAws_restJson1CreateCampaignCommand = function (input, contex
14
14
  "content-type": "application/json",
15
15
  };
16
16
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns";
17
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.connectInstanceId !== undefined &&
18
- input.connectInstanceId !== null && { connectInstanceId: input.connectInstanceId })), (input.dialerConfig !== undefined &&
19
- input.dialerConfig !== null && { dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context) })), (input.name !== undefined && input.name !== null && { name: input.name })), (input.outboundCallConfig !== undefined &&
20
- input.outboundCallConfig !== null && {
17
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.connectInstanceId != null && { connectInstanceId: input.connectInstanceId })), (input.dialerConfig != null && {
18
+ dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context),
19
+ })), (input.name != null && { name: input.name })), (input.outboundCallConfig != null && {
21
20
  outboundCallConfig: serializeAws_restJson1OutboundCallConfig(input.outboundCallConfig, context),
22
- })), (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
21
+ })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
23
22
  return [2, new __HttpRequest({
24
23
  protocol: protocol,
25
24
  hostname: hostname,
@@ -200,8 +199,7 @@ export var serializeAws_restJson1GetCampaignStateBatchCommand = function (input,
200
199
  "content-type": "application/json",
201
200
  };
202
201
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns-state";
203
- body = JSON.stringify(__assign({}, (input.campaignIds !== undefined &&
204
- input.campaignIds !== null && { campaignIds: serializeAws_restJson1CampaignIdList(input.campaignIds, context) })));
202
+ body = JSON.stringify(__assign({}, (input.campaignIds != null && { campaignIds: serializeAws_restJson1CampaignIdList(input.campaignIds, context) })));
205
203
  return [2, new __HttpRequest({
206
204
  protocol: protocol,
207
205
  hostname: hostname,
@@ -289,8 +287,7 @@ export var serializeAws_restJson1ListCampaignsCommand = function (input, context
289
287
  "content-type": "application/json",
290
288
  };
291
289
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/campaigns-summary";
292
- body = JSON.stringify(__assign(__assign(__assign({}, (input.filters !== undefined &&
293
- input.filters !== null && { filters: serializeAws_restJson1CampaignFilters(input.filters, context) })), (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })));
290
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.filters != null && { filters: serializeAws_restJson1CampaignFilters(input.filters, context) })), (input.maxResults != null && { maxResults: input.maxResults })), (input.nextToken != null && { nextToken: input.nextToken })));
294
291
  return [2, new __HttpRequest({
295
292
  protocol: protocol,
296
293
  hostname: hostname,
@@ -386,8 +383,7 @@ export var serializeAws_restJson1PutDialRequestBatchCommand = function (input, c
386
383
  else {
387
384
  throw new Error("No value provided for input HTTP label: id.");
388
385
  }
389
- body = JSON.stringify(__assign({}, (input.dialRequests !== undefined &&
390
- input.dialRequests !== null && {
386
+ body = JSON.stringify(__assign({}, (input.dialRequests != null && {
391
387
  dialRequests: serializeAws_restJson1DialRequestList(input.dialRequests, context),
392
388
  })));
393
389
  return [2, new __HttpRequest({
@@ -486,8 +482,7 @@ export var serializeAws_restJson1StartInstanceOnboardingJobCommand = function (i
486
482
  else {
487
483
  throw new Error("No value provided for input HTTP label: connectInstanceId.");
488
484
  }
489
- body = JSON.stringify(__assign({}, (input.encryptionConfig !== undefined &&
490
- input.encryptionConfig !== null && {
485
+ body = JSON.stringify(__assign({}, (input.encryptionConfig != null && {
491
486
  encryptionConfig: serializeAws_restJson1EncryptionConfig(input.encryptionConfig, context),
492
487
  })));
493
488
  return [2, new __HttpRequest({
@@ -554,7 +549,7 @@ export var serializeAws_restJson1TagResourceCommand = function (input, context)
554
549
  else {
555
550
  throw new Error("No value provided for input HTTP label: arn.");
556
551
  }
557
- body = JSON.stringify(__assign({}, (input.tags !== undefined && input.tags !== null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
552
+ body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
558
553
  return [2, new __HttpRequest({
559
554
  protocol: protocol,
560
555
  hostname: hostname,
@@ -621,8 +616,9 @@ export var serializeAws_restJson1UpdateCampaignDialerConfigCommand = function (i
621
616
  else {
622
617
  throw new Error("No value provided for input HTTP label: id.");
623
618
  }
624
- body = JSON.stringify(__assign({}, (input.dialerConfig !== undefined &&
625
- input.dialerConfig !== null && { dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context) })));
619
+ body = JSON.stringify(__assign({}, (input.dialerConfig != null && {
620
+ dialerConfig: serializeAws_restJson1DialerConfig(input.dialerConfig, context),
621
+ })));
626
622
  return [2, new __HttpRequest({
627
623
  protocol: protocol,
628
624
  hostname: hostname,
@@ -656,7 +652,7 @@ export var serializeAws_restJson1UpdateCampaignNameCommand = function (input, co
656
652
  else {
657
653
  throw new Error("No value provided for input HTTP label: id.");
658
654
  }
659
- body = JSON.stringify(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })));
655
+ body = JSON.stringify(__assign({}, (input.name != null && { name: input.name })));
660
656
  return [2, new __HttpRequest({
661
657
  protocol: protocol,
662
658
  hostname: hostname,
@@ -690,12 +686,9 @@ export var serializeAws_restJson1UpdateCampaignOutboundCallConfigCommand = funct
690
686
  else {
691
687
  throw new Error("No value provided for input HTTP label: id.");
692
688
  }
693
- body = JSON.stringify(__assign(__assign(__assign({}, (input.answerMachineDetectionConfig !== undefined &&
694
- input.answerMachineDetectionConfig !== null && {
689
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.answerMachineDetectionConfig != null && {
695
690
  answerMachineDetectionConfig: serializeAws_restJson1AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context),
696
- })), (input.connectContactFlowId !== undefined &&
697
- input.connectContactFlowId !== null && { connectContactFlowId: input.connectContactFlowId })), (input.connectSourcePhoneNumber !== undefined &&
698
- input.connectSourcePhoneNumber !== null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber })));
691
+ })), (input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId })), (input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber })));
699
692
  return [2, new __HttpRequest({
700
693
  protocol: protocol,
701
694
  hostname: hostname,
@@ -2413,8 +2406,7 @@ var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput
2413
2406
  });
2414
2407
  }); };
2415
2408
  var serializeAws_restJson1AnswerMachineDetectionConfig = function (input, context) {
2416
- return __assign({}, (input.enableAnswerMachineDetection !== undefined &&
2417
- input.enableAnswerMachineDetection !== null && {
2409
+ return __assign({}, (input.enableAnswerMachineDetection != null && {
2418
2410
  enableAnswerMachineDetection: input.enableAnswerMachineDetection,
2419
2411
  }));
2420
2412
  };
@@ -2429,8 +2421,7 @@ var serializeAws_restJson1Attributes = function (input, context) {
2429
2421
  }, {});
2430
2422
  };
2431
2423
  var serializeAws_restJson1CampaignFilters = function (input, context) {
2432
- return __assign({}, (input.instanceIdFilter !== undefined &&
2433
- input.instanceIdFilter !== null && {
2424
+ return __assign({}, (input.instanceIdFilter != null && {
2434
2425
  instanceIdFilter: serializeAws_restJson1InstanceIdFilter(input.instanceIdFilter, context),
2435
2426
  }));
2436
2427
  };
@@ -2456,9 +2447,7 @@ var serializeAws_restJson1DialerConfig = function (input, context) {
2456
2447
  });
2457
2448
  };
2458
2449
  var serializeAws_restJson1DialRequest = function (input, context) {
2459
- return __assign(__assign(__assign(__assign({}, (input.attributes !== undefined &&
2460
- input.attributes !== null && { attributes: serializeAws_restJson1Attributes(input.attributes, context) })), (input.clientToken !== undefined && input.clientToken !== null && { clientToken: input.clientToken })), (input.expirationTime !== undefined &&
2461
- input.expirationTime !== null && { expirationTime: input.expirationTime.toISOString().split(".")[0] + "Z" })), (input.phoneNumber !== undefined && input.phoneNumber !== null && { phoneNumber: input.phoneNumber }));
2450
+ return __assign(__assign(__assign(__assign({}, (input.attributes != null && { attributes: serializeAws_restJson1Attributes(input.attributes, context) })), (input.clientToken != null && { clientToken: input.clientToken })), (input.expirationTime != null && { expirationTime: input.expirationTime.toISOString().split(".")[0] + "Z" })), (input.phoneNumber != null && { phoneNumber: input.phoneNumber }));
2462
2451
  };
2463
2452
  var serializeAws_restJson1DialRequestList = function (input, context) {
2464
2453
  return input
@@ -2471,28 +2460,21 @@ var serializeAws_restJson1DialRequestList = function (input, context) {
2471
2460
  });
2472
2461
  };
2473
2462
  var serializeAws_restJson1EncryptionConfig = function (input, context) {
2474
- return __assign(__assign(__assign({}, (input.enabled !== undefined && input.enabled !== null && { enabled: input.enabled })), (input.encryptionType !== undefined &&
2475
- input.encryptionType !== null && { encryptionType: input.encryptionType })), (input.keyArn !== undefined && input.keyArn !== null && { keyArn: input.keyArn }));
2463
+ return __assign(__assign(__assign({}, (input.enabled != null && { enabled: input.enabled })), (input.encryptionType != null && { encryptionType: input.encryptionType })), (input.keyArn != null && { keyArn: input.keyArn }));
2476
2464
  };
2477
2465
  var serializeAws_restJson1InstanceIdFilter = function (input, context) {
2478
- return __assign(__assign({}, (input.operator !== undefined && input.operator !== null && { operator: input.operator })), (input.value !== undefined && input.value !== null && { value: input.value }));
2466
+ return __assign(__assign({}, (input.operator != null && { operator: input.operator })), (input.value != null && { value: input.value }));
2479
2467
  };
2480
2468
  var serializeAws_restJson1OutboundCallConfig = function (input, context) {
2481
- return __assign(__assign(__assign(__assign({}, (input.answerMachineDetectionConfig !== undefined &&
2482
- input.answerMachineDetectionConfig !== null && {
2469
+ return __assign(__assign(__assign(__assign({}, (input.answerMachineDetectionConfig != null && {
2483
2470
  answerMachineDetectionConfig: serializeAws_restJson1AnswerMachineDetectionConfig(input.answerMachineDetectionConfig, context),
2484
- })), (input.connectContactFlowId !== undefined &&
2485
- input.connectContactFlowId !== null && { connectContactFlowId: input.connectContactFlowId })), (input.connectQueueId !== undefined &&
2486
- input.connectQueueId !== null && { connectQueueId: input.connectQueueId })), (input.connectSourcePhoneNumber !== undefined &&
2487
- input.connectSourcePhoneNumber !== null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }));
2471
+ })), (input.connectContactFlowId != null && { connectContactFlowId: input.connectContactFlowId })), (input.connectQueueId != null && { connectQueueId: input.connectQueueId })), (input.connectSourcePhoneNumber != null && { connectSourcePhoneNumber: input.connectSourcePhoneNumber }));
2488
2472
  };
2489
2473
  var serializeAws_restJson1PredictiveDialerConfig = function (input, context) {
2490
- return __assign({}, (input.bandwidthAllocation !== undefined &&
2491
- input.bandwidthAllocation !== null && { bandwidthAllocation: __serializeFloat(input.bandwidthAllocation) }));
2474
+ return __assign({}, (input.bandwidthAllocation != null && { bandwidthAllocation: __serializeFloat(input.bandwidthAllocation) }));
2492
2475
  };
2493
2476
  var serializeAws_restJson1ProgressiveDialerConfig = function (input, context) {
2494
- return __assign({}, (input.bandwidthAllocation !== undefined &&
2495
- input.bandwidthAllocation !== null && { bandwidthAllocation: __serializeFloat(input.bandwidthAllocation) }));
2477
+ return __assign({}, (input.bandwidthAllocation != null && { bandwidthAllocation: __serializeFloat(input.bandwidthAllocation) }));
2496
2478
  };
2497
2479
  var serializeAws_restJson1TagMap = function (input, context) {
2498
2480
  return Object.entries(input).reduce(function (acc, _a) {
@@ -2513,17 +2495,15 @@ var deserializeAws_restJson1Campaign = function (output, context) {
2513
2495
  return {
2514
2496
  arn: __expectString(output.arn),
2515
2497
  connectInstanceId: __expectString(output.connectInstanceId),
2516
- dialerConfig: output.dialerConfig !== undefined && output.dialerConfig !== null
2498
+ dialerConfig: output.dialerConfig != null
2517
2499
  ? deserializeAws_restJson1DialerConfig(__expectUnion(output.dialerConfig), context)
2518
2500
  : undefined,
2519
2501
  id: __expectString(output.id),
2520
2502
  name: __expectString(output.name),
2521
- outboundCallConfig: output.outboundCallConfig !== undefined && output.outboundCallConfig !== null
2503
+ outboundCallConfig: output.outboundCallConfig != null
2522
2504
  ? deserializeAws_restJson1OutboundCallConfig(output.outboundCallConfig, context)
2523
2505
  : undefined,
2524
- tags: output.tags !== undefined && output.tags !== null
2525
- ? deserializeAws_restJson1TagMap(output.tags, context)
2526
- : undefined,
2506
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
2527
2507
  };
2528
2508
  };
2529
2509
  var deserializeAws_restJson1CampaignSummary = function (output, context) {
@@ -2603,7 +2583,7 @@ var deserializeAws_restJson1FailedRequestList = function (output, context) {
2603
2583
  var deserializeAws_restJson1InstanceConfig = function (output, context) {
2604
2584
  return {
2605
2585
  connectInstanceId: __expectString(output.connectInstanceId),
2606
- encryptionConfig: output.encryptionConfig !== undefined && output.encryptionConfig !== null
2586
+ encryptionConfig: output.encryptionConfig != null
2607
2587
  ? deserializeAws_restJson1EncryptionConfig(output.encryptionConfig, context)
2608
2588
  : undefined,
2609
2589
  serviceLinkedRoleArn: __expectString(output.serviceLinkedRoleArn),
@@ -2618,7 +2598,7 @@ var deserializeAws_restJson1InstanceOnboardingJobStatus = function (output, cont
2618
2598
  };
2619
2599
  var deserializeAws_restJson1OutboundCallConfig = function (output, context) {
2620
2600
  return {
2621
- answerMachineDetectionConfig: output.answerMachineDetectionConfig !== undefined && output.answerMachineDetectionConfig !== null
2601
+ answerMachineDetectionConfig: output.answerMachineDetectionConfig != null
2622
2602
  ? deserializeAws_restJson1AnswerMachineDetectionConfig(output.answerMachineDetectionConfig, context)
2623
2603
  : undefined,
2624
2604
  connectContactFlowId: __expectString(output.connectContactFlowId),
@@ -2718,6 +2698,9 @@ var loadRestJsonErrorCode = function (output, data) {
2718
2698
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
2719
2699
  var sanitizeErrorCode = function (rawValue) {
2720
2700
  var cleanValue = rawValue;
2701
+ if (typeof cleanValue === "number") {
2702
+ cleanValue = cleanValue.toString();
2703
+ }
2721
2704
  if (cleanValue.indexOf(":") >= 0) {
2722
2705
  cleanValue = cleanValue.split(":")[0];
2723
2706
  }
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.121.0",
4
+ "version": "3.130.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",
@@ -18,35 +18,35 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.121.0",
22
- "@aws-sdk/config-resolver": "3.110.0",
23
- "@aws-sdk/credential-provider-node": "3.121.0",
24
- "@aws-sdk/fetch-http-handler": "3.110.0",
25
- "@aws-sdk/hash-node": "3.110.0",
26
- "@aws-sdk/invalid-dependency": "3.110.0",
27
- "@aws-sdk/middleware-content-length": "3.110.0",
28
- "@aws-sdk/middleware-host-header": "3.110.0",
29
- "@aws-sdk/middleware-logger": "3.110.0",
30
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
31
- "@aws-sdk/middleware-retry": "3.118.1",
32
- "@aws-sdk/middleware-serde": "3.110.0",
33
- "@aws-sdk/middleware-signing": "3.110.0",
34
- "@aws-sdk/middleware-stack": "3.110.0",
35
- "@aws-sdk/middleware-user-agent": "3.110.0",
36
- "@aws-sdk/node-config-provider": "3.110.0",
37
- "@aws-sdk/node-http-handler": "3.118.1",
38
- "@aws-sdk/protocol-http": "3.110.0",
39
- "@aws-sdk/smithy-client": "3.110.0",
40
- "@aws-sdk/types": "3.110.0",
41
- "@aws-sdk/url-parser": "3.110.0",
21
+ "@aws-sdk/client-sts": "3.130.0",
22
+ "@aws-sdk/config-resolver": "3.130.0",
23
+ "@aws-sdk/credential-provider-node": "3.130.0",
24
+ "@aws-sdk/fetch-http-handler": "3.127.0",
25
+ "@aws-sdk/hash-node": "3.127.0",
26
+ "@aws-sdk/invalid-dependency": "3.127.0",
27
+ "@aws-sdk/middleware-content-length": "3.127.0",
28
+ "@aws-sdk/middleware-host-header": "3.127.0",
29
+ "@aws-sdk/middleware-logger": "3.127.0",
30
+ "@aws-sdk/middleware-recursion-detection": "3.127.0",
31
+ "@aws-sdk/middleware-retry": "3.127.0",
32
+ "@aws-sdk/middleware-serde": "3.127.0",
33
+ "@aws-sdk/middleware-signing": "3.130.0",
34
+ "@aws-sdk/middleware-stack": "3.127.0",
35
+ "@aws-sdk/middleware-user-agent": "3.127.0",
36
+ "@aws-sdk/node-config-provider": "3.127.0",
37
+ "@aws-sdk/node-http-handler": "3.127.0",
38
+ "@aws-sdk/protocol-http": "3.127.0",
39
+ "@aws-sdk/smithy-client": "3.127.0",
40
+ "@aws-sdk/types": "3.127.0",
41
+ "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
48
- "@aws-sdk/util-user-agent-browser": "3.110.0",
49
- "@aws-sdk/util-user-agent-node": "3.118.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.127.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.130.0",
48
+ "@aws-sdk/util-user-agent-browser": "3.127.0",
49
+ "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",
51
51
  "@aws-sdk/util-utf8-node": "3.109.0",
52
52
  "tslib": "^2.3.1"