@aws-sdk/client-connectcampaigns 3.525.0 → 3.529.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +12 -53
- package/dist-es/protocols/Aws_restJson1.js +1 -41
- package/package.json +4 -4
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
4
|
+
"version": "3.529.1",
|
|
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,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.
|
|
24
|
-
"@aws-sdk/core": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.529.1",
|
|
24
|
+
"@aws-sdk/core": "3.529.1",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.529.1",
|
|
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",
|