@aws-sdk/client-connectcampaigns 3.523.0 → 3.529.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.
Files changed (39) hide show
  1. package/dist-cjs/index.js +12 -53
  2. package/dist-es/protocols/Aws_restJson1.js +1 -41
  3. package/package.json +17 -17
  4. package/dist-cjs/ConnectCampaigns.js +0 -1
  5. package/dist-cjs/ConnectCampaignsClient.js +0 -1
  6. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +0 -1
  7. package/dist-cjs/commands/CreateCampaignCommand.js +0 -1
  8. package/dist-cjs/commands/DeleteCampaignCommand.js +0 -1
  9. package/dist-cjs/commands/DeleteConnectInstanceConfigCommand.js +0 -1
  10. package/dist-cjs/commands/DeleteInstanceOnboardingJobCommand.js +0 -1
  11. package/dist-cjs/commands/DescribeCampaignCommand.js +0 -1
  12. package/dist-cjs/commands/GetCampaignStateBatchCommand.js +0 -1
  13. package/dist-cjs/commands/GetCampaignStateCommand.js +0 -1
  14. package/dist-cjs/commands/GetConnectInstanceConfigCommand.js +0 -1
  15. package/dist-cjs/commands/GetInstanceOnboardingJobStatusCommand.js +0 -1
  16. package/dist-cjs/commands/ListCampaignsCommand.js +0 -1
  17. package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
  18. package/dist-cjs/commands/PauseCampaignCommand.js +0 -1
  19. package/dist-cjs/commands/PutDialRequestBatchCommand.js +0 -1
  20. package/dist-cjs/commands/ResumeCampaignCommand.js +0 -1
  21. package/dist-cjs/commands/StartCampaignCommand.js +0 -1
  22. package/dist-cjs/commands/StartInstanceOnboardingJobCommand.js +0 -1
  23. package/dist-cjs/commands/StopCampaignCommand.js +0 -1
  24. package/dist-cjs/commands/TagResourceCommand.js +0 -1
  25. package/dist-cjs/commands/UntagResourceCommand.js +0 -1
  26. package/dist-cjs/commands/UpdateCampaignDialerConfigCommand.js +0 -1
  27. package/dist-cjs/commands/UpdateCampaignNameCommand.js +0 -1
  28. package/dist-cjs/commands/UpdateCampaignOutboundCallConfigCommand.js +0 -1
  29. package/dist-cjs/commands/index.js +0 -1
  30. package/dist-cjs/endpoint/EndpointParameters.js +0 -1
  31. package/dist-cjs/extensionConfiguration.js +0 -1
  32. package/dist-cjs/models/ConnectCampaignsServiceException.js +0 -1
  33. package/dist-cjs/models/index.js +0 -1
  34. package/dist-cjs/models/models_0.js +0 -1
  35. package/dist-cjs/pagination/Interfaces.js +0 -1
  36. package/dist-cjs/pagination/ListCampaignsPaginator.js +0 -1
  37. package/dist-cjs/pagination/index.js +0 -1
  38. package/dist-cjs/protocols/Aws_restJson1.js +0 -1
  39. package/dist-cjs/runtimeExtensions.js +0 -1
package/dist-cjs/index.js CHANGED
@@ -778,7 +778,7 @@ var de_CreateCampaignCommand = /* @__PURE__ */ __name(async (output, context) =>
778
778
  const contents = (0, import_smithy_client.map)({
779
779
  $metadata: deserializeMetadata(output)
780
780
  });
781
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
781
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
782
782
  const doc = (0, import_smithy_client.take)(data, {
783
783
  arn: import_smithy_client.expectString,
784
784
  id: import_smithy_client.expectString,
@@ -824,7 +824,7 @@ var de_DescribeCampaignCommand = /* @__PURE__ */ __name(async (output, context)
824
824
  const contents = (0, import_smithy_client.map)({
825
825
  $metadata: deserializeMetadata(output)
826
826
  });
827
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
827
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
828
828
  const doc = (0, import_smithy_client.take)(data, {
829
829
  campaign: (_) => de_Campaign(_, context)
830
830
  });
@@ -838,7 +838,7 @@ var de_GetCampaignStateCommand = /* @__PURE__ */ __name(async (output, context)
838
838
  const contents = (0, import_smithy_client.map)({
839
839
  $metadata: deserializeMetadata(output)
840
840
  });
841
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
841
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
842
842
  const doc = (0, import_smithy_client.take)(data, {
843
843
  state: import_smithy_client.expectString
844
844
  });
@@ -852,7 +852,7 @@ var de_GetCampaignStateBatchCommand = /* @__PURE__ */ __name(async (output, cont
852
852
  const contents = (0, import_smithy_client.map)({
853
853
  $metadata: deserializeMetadata(output)
854
854
  });
855
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
855
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
856
856
  const doc = (0, import_smithy_client.take)(data, {
857
857
  failedRequests: import_smithy_client._json,
858
858
  successfulRequests: import_smithy_client._json
@@ -867,7 +867,7 @@ var de_GetConnectInstanceConfigCommand = /* @__PURE__ */ __name(async (output, c
867
867
  const contents = (0, import_smithy_client.map)({
868
868
  $metadata: deserializeMetadata(output)
869
869
  });
870
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
870
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
871
871
  const doc = (0, import_smithy_client.take)(data, {
872
872
  connectInstanceConfig: import_smithy_client._json
873
873
  });
@@ -881,7 +881,7 @@ var de_GetInstanceOnboardingJobStatusCommand = /* @__PURE__ */ __name(async (out
881
881
  const contents = (0, import_smithy_client.map)({
882
882
  $metadata: deserializeMetadata(output)
883
883
  });
884
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
884
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
885
885
  const doc = (0, import_smithy_client.take)(data, {
886
886
  connectInstanceOnboardingJobStatus: import_smithy_client._json
887
887
  });
@@ -895,7 +895,7 @@ var de_ListCampaignsCommand = /* @__PURE__ */ __name(async (output, context) =>
895
895
  const contents = (0, import_smithy_client.map)({
896
896
  $metadata: deserializeMetadata(output)
897
897
  });
898
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
898
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
899
899
  const doc = (0, import_smithy_client.take)(data, {
900
900
  campaignSummaryList: import_smithy_client._json,
901
901
  nextToken: import_smithy_client.expectString
@@ -910,7 +910,7 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
910
910
  const contents = (0, import_smithy_client.map)({
911
911
  $metadata: deserializeMetadata(output)
912
912
  });
913
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
913
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
914
914
  const doc = (0, import_smithy_client.take)(data, {
915
915
  tags: import_smithy_client._json
916
916
  });
@@ -934,7 +934,7 @@ var de_PutDialRequestBatchCommand = /* @__PURE__ */ __name(async (output, contex
934
934
  const contents = (0, import_smithy_client.map)({
935
935
  $metadata: deserializeMetadata(output)
936
936
  });
937
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
937
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
938
938
  const doc = (0, import_smithy_client.take)(data, {
939
939
  failedRequests: import_smithy_client._json,
940
940
  successfulRequests: import_smithy_client._json
@@ -969,7 +969,7 @@ var de_StartInstanceOnboardingJobCommand = /* @__PURE__ */ __name(async (output,
969
969
  const contents = (0, import_smithy_client.map)({
970
970
  $metadata: deserializeMetadata(output)
971
971
  });
972
- const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
972
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
973
973
  const doc = (0, import_smithy_client.take)(data, {
974
974
  connectInstanceOnboardingJobStatus: import_smithy_client._json
975
975
  });
@@ -1039,9 +1039,9 @@ var de_UpdateCampaignOutboundCallConfigCommand = /* @__PURE__ */ __name(async (o
1039
1039
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1040
1040
  const parsedOutput = {
1041
1041
  ...output,
1042
- body: await parseErrorBody(output.body, context)
1042
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
1043
1043
  };
1044
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1044
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
1045
1045
  switch (errorCode) {
1046
1046
  case "AccessDeniedException":
1047
1047
  case "com.amazonaws.connectcampaigns#AccessDeniedException":
@@ -1306,50 +1306,9 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1306
1306
  extendedRequestId: output.headers["x-amz-id-2"],
1307
1307
  cfId: output.headers["x-amz-cf-id"]
1308
1308
  }), "deserializeMetadata");
1309
- var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
1310
1309
  var _tK = "tagKeys";
1311
1310
  var _xAET = "xAmzErrorType";
1312
1311
  var _xae = "x-amzn-errortype";
1313
- var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1314
- if (encoded.length) {
1315
- return JSON.parse(encoded);
1316
- }
1317
- return {};
1318
- }), "parseBody");
1319
- var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
1320
- const value = await parseBody(errorBody, context);
1321
- value.message = value.message ?? value.Message;
1322
- return value;
1323
- }, "parseErrorBody");
1324
- var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
1325
- const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
1326
- const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
1327
- let cleanValue = rawValue;
1328
- if (typeof cleanValue === "number") {
1329
- cleanValue = cleanValue.toString();
1330
- }
1331
- if (cleanValue.indexOf(",") >= 0) {
1332
- cleanValue = cleanValue.split(",")[0];
1333
- }
1334
- if (cleanValue.indexOf(":") >= 0) {
1335
- cleanValue = cleanValue.split(":")[0];
1336
- }
1337
- if (cleanValue.indexOf("#") >= 0) {
1338
- cleanValue = cleanValue.split("#")[1];
1339
- }
1340
- return cleanValue;
1341
- }, "sanitizeErrorCode");
1342
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1343
- if (headerKey !== void 0) {
1344
- return sanitizeErrorCode(output.headers[headerKey]);
1345
- }
1346
- if (data.code !== void 0) {
1347
- return sanitizeErrorCode(data.code);
1348
- }
1349
- if (data["__type"] !== void 0) {
1350
- return sanitizeErrorCode(data["__type"]);
1351
- }
1352
- }, "loadRestJsonErrorCode");
1353
1312
 
1354
1313
  // src/commands/CreateCampaignCommand.ts
1355
1314
  var _CreateCampaignCommand = class _CreateCampaignCommand extends import_smithy_client.Command.classBuilder().ep({
@@ -1,4 +1,4 @@
1
- import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
1
+ import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
2
  import { requestBuilder as rb } from "@smithy/core";
3
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";
@@ -803,43 +803,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
803
803
  const _tK = "tagKeys";
804
804
  const _xAET = "xAmzErrorType";
805
805
  const _xae = "x-amzn-errortype";
806
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
807
- if (encoded.length) {
808
- return JSON.parse(encoded);
809
- }
810
- return {};
811
- });
812
- const parseErrorBody = async (errorBody, context) => {
813
- const value = await parseBody(errorBody, context);
814
- value.message = value.message ?? value.Message;
815
- return value;
816
- };
817
- const loadRestJsonErrorCode = (output, data) => {
818
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
819
- const sanitizeErrorCode = (rawValue) => {
820
- let cleanValue = rawValue;
821
- if (typeof cleanValue === "number") {
822
- cleanValue = cleanValue.toString();
823
- }
824
- if (cleanValue.indexOf(",") >= 0) {
825
- cleanValue = cleanValue.split(",")[0];
826
- }
827
- if (cleanValue.indexOf(":") >= 0) {
828
- cleanValue = cleanValue.split(":")[0];
829
- }
830
- if (cleanValue.indexOf("#") >= 0) {
831
- cleanValue = cleanValue.split("#")[1];
832
- }
833
- return cleanValue;
834
- };
835
- const headerKey = findKey(output.headers, "x-amzn-errortype");
836
- if (headerKey !== undefined) {
837
- return sanitizeErrorCode(output.headers[headerKey]);
838
- }
839
- if (data.code !== undefined) {
840
- return sanitizeErrorCode(data.code);
841
- }
842
- if (data["__type"] !== undefined) {
843
- return sanitizeErrorCode(data["__type"]);
844
- }
845
- };
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.523.0",
4
+ "version": "3.529.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-connectcampaigns",
@@ -20,40 +20,40 @@
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.523.0",
24
- "@aws-sdk/core": "3.523.0",
25
- "@aws-sdk/credential-provider-node": "3.523.0",
23
+ "@aws-sdk/client-sts": "3.529.0",
24
+ "@aws-sdk/core": "3.529.0",
25
+ "@aws-sdk/credential-provider-node": "3.529.0",
26
26
  "@aws-sdk/middleware-host-header": "3.523.0",
27
27
  "@aws-sdk/middleware-logger": "3.523.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.523.0",
29
- "@aws-sdk/middleware-user-agent": "3.523.0",
30
- "@aws-sdk/region-config-resolver": "3.523.0",
29
+ "@aws-sdk/middleware-user-agent": "3.525.0",
30
+ "@aws-sdk/region-config-resolver": "3.525.0",
31
31
  "@aws-sdk/types": "3.523.0",
32
- "@aws-sdk/util-endpoints": "3.523.0",
32
+ "@aws-sdk/util-endpoints": "3.525.0",
33
33
  "@aws-sdk/util-user-agent-browser": "3.523.0",
34
- "@aws-sdk/util-user-agent-node": "3.523.0",
35
- "@smithy/config-resolver": "^2.1.3",
36
- "@smithy/core": "^1.3.4",
34
+ "@aws-sdk/util-user-agent-node": "3.525.0",
35
+ "@smithy/config-resolver": "^2.1.4",
36
+ "@smithy/core": "^1.3.5",
37
37
  "@smithy/fetch-http-handler": "^2.4.3",
38
38
  "@smithy/hash-node": "^2.1.3",
39
39
  "@smithy/invalid-dependency": "^2.1.3",
40
40
  "@smithy/middleware-content-length": "^2.1.3",
41
- "@smithy/middleware-endpoint": "^2.4.3",
42
- "@smithy/middleware-retry": "^2.1.3",
41
+ "@smithy/middleware-endpoint": "^2.4.4",
42
+ "@smithy/middleware-retry": "^2.1.4",
43
43
  "@smithy/middleware-serde": "^2.1.3",
44
44
  "@smithy/middleware-stack": "^2.1.3",
45
- "@smithy/node-config-provider": "^2.2.3",
45
+ "@smithy/node-config-provider": "^2.2.4",
46
46
  "@smithy/node-http-handler": "^2.4.1",
47
47
  "@smithy/protocol-http": "^3.2.1",
48
- "@smithy/smithy-client": "^2.4.1",
48
+ "@smithy/smithy-client": "^2.4.2",
49
49
  "@smithy/types": "^2.10.1",
50
50
  "@smithy/url-parser": "^2.1.3",
51
51
  "@smithy/util-base64": "^2.1.1",
52
52
  "@smithy/util-body-length-browser": "^2.1.1",
53
53
  "@smithy/util-body-length-node": "^2.2.1",
54
- "@smithy/util-defaults-mode-browser": "^2.1.3",
55
- "@smithy/util-defaults-mode-node": "^2.2.2",
56
- "@smithy/util-endpoints": "^1.1.3",
54
+ "@smithy/util-defaults-mode-browser": "^2.1.4",
55
+ "@smithy/util-defaults-mode-node": "^2.2.3",
56
+ "@smithy/util-endpoints": "^1.1.4",
57
57
  "@smithy/util-middleware": "^2.1.3",
58
58
  "@smithy/util-retry": "^2.1.3",
59
59
  "@smithy/util-utf8": "^2.1.1",
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("../index.js");
@@ -1 +0,0 @@
1
- module.exports = require("./index.js");