@aws-sdk/client-ivschat 3.525.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.
- package/dist-cjs/index.js +14 -55
- package/dist-es/protocols/Aws_restJson1.js +1 -41
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -732,7 +732,7 @@ var de_CreateChatTokenCommand = /* @__PURE__ */ __name(async (output, context) =
|
|
|
732
732
|
const contents = (0, import_smithy_client.map)({
|
|
733
733
|
$metadata: deserializeMetadata(output)
|
|
734
734
|
});
|
|
735
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
735
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
736
736
|
const doc = (0, import_smithy_client.take)(data, {
|
|
737
737
|
sessionExpirationTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
738
738
|
token: import_smithy_client.expectString,
|
|
@@ -748,7 +748,7 @@ var de_CreateLoggingConfigurationCommand = /* @__PURE__ */ __name(async (output,
|
|
|
748
748
|
const contents = (0, import_smithy_client.map)({
|
|
749
749
|
$metadata: deserializeMetadata(output)
|
|
750
750
|
});
|
|
751
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
751
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
752
752
|
const doc = (0, import_smithy_client.take)(data, {
|
|
753
753
|
arn: import_smithy_client.expectString,
|
|
754
754
|
createTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
@@ -769,7 +769,7 @@ var de_CreateRoomCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
769
769
|
const contents = (0, import_smithy_client.map)({
|
|
770
770
|
$metadata: deserializeMetadata(output)
|
|
771
771
|
});
|
|
772
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
772
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
773
773
|
const doc = (0, import_smithy_client.take)(data, {
|
|
774
774
|
arn: import_smithy_client.expectString,
|
|
775
775
|
createTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
@@ -802,7 +802,7 @@ var de_DeleteMessageCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
802
802
|
const contents = (0, import_smithy_client.map)({
|
|
803
803
|
$metadata: deserializeMetadata(output)
|
|
804
804
|
});
|
|
805
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
805
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
806
806
|
const doc = (0, import_smithy_client.take)(data, {
|
|
807
807
|
id: import_smithy_client.expectString
|
|
808
808
|
});
|
|
@@ -836,7 +836,7 @@ var de_GetLoggingConfigurationCommand = /* @__PURE__ */ __name(async (output, co
|
|
|
836
836
|
const contents = (0, import_smithy_client.map)({
|
|
837
837
|
$metadata: deserializeMetadata(output)
|
|
838
838
|
});
|
|
839
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
839
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
840
840
|
const doc = (0, import_smithy_client.take)(data, {
|
|
841
841
|
arn: import_smithy_client.expectString,
|
|
842
842
|
createTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
@@ -857,7 +857,7 @@ var de_GetRoomCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
857
857
|
const contents = (0, import_smithy_client.map)({
|
|
858
858
|
$metadata: deserializeMetadata(output)
|
|
859
859
|
});
|
|
860
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
860
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
861
861
|
const doc = (0, import_smithy_client.take)(data, {
|
|
862
862
|
arn: import_smithy_client.expectString,
|
|
863
863
|
createTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
@@ -880,7 +880,7 @@ var de_ListLoggingConfigurationsCommand = /* @__PURE__ */ __name(async (output,
|
|
|
880
880
|
const contents = (0, import_smithy_client.map)({
|
|
881
881
|
$metadata: deserializeMetadata(output)
|
|
882
882
|
});
|
|
883
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
883
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
884
884
|
const doc = (0, import_smithy_client.take)(data, {
|
|
885
885
|
loggingConfigurations: (_) => de_LoggingConfigurationList(_, context),
|
|
886
886
|
nextToken: import_smithy_client.expectString
|
|
@@ -895,7 +895,7 @@ var de_ListRoomsCommand = /* @__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
|
nextToken: import_smithy_client.expectString,
|
|
901
901
|
rooms: (_) => de_RoomList(_, context)
|
|
@@ -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
|
});
|
|
@@ -924,7 +924,7 @@ var de_SendEventCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
924
924
|
const contents = (0, import_smithy_client.map)({
|
|
925
925
|
$metadata: deserializeMetadata(output)
|
|
926
926
|
});
|
|
927
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
927
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
928
928
|
const doc = (0, import_smithy_client.take)(data, {
|
|
929
929
|
id: import_smithy_client.expectString
|
|
930
930
|
});
|
|
@@ -958,7 +958,7 @@ var de_UpdateLoggingConfigurationCommand = /* @__PURE__ */ __name(async (output,
|
|
|
958
958
|
const contents = (0, import_smithy_client.map)({
|
|
959
959
|
$metadata: deserializeMetadata(output)
|
|
960
960
|
});
|
|
961
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
961
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
962
962
|
const doc = (0, import_smithy_client.take)(data, {
|
|
963
963
|
arn: import_smithy_client.expectString,
|
|
964
964
|
createTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
@@ -979,7 +979,7 @@ var de_UpdateRoomCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
979
979
|
const contents = (0, import_smithy_client.map)({
|
|
980
980
|
$metadata: deserializeMetadata(output)
|
|
981
981
|
});
|
|
982
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await
|
|
982
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
|
|
983
983
|
const doc = (0, import_smithy_client.take)(data, {
|
|
984
984
|
arn: import_smithy_client.expectString,
|
|
985
985
|
createTime: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
|
|
@@ -998,9 +998,9 @@ var de_UpdateRoomCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
998
998
|
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
999
999
|
const parsedOutput = {
|
|
1000
1000
|
...output,
|
|
1001
|
-
body: await
|
|
1001
|
+
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
1002
1002
|
};
|
|
1003
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1003
|
+
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
1004
1004
|
switch (errorCode) {
|
|
1005
1005
|
case "AccessDeniedException":
|
|
1006
1006
|
case "com.amazonaws.ivschat#AccessDeniedException":
|
|
@@ -1194,48 +1194,7 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
|
1194
1194
|
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1195
1195
|
cfId: output.headers["x-amz-cf-id"]
|
|
1196
1196
|
}), "deserializeMetadata");
|
|
1197
|
-
var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
|
|
1198
1197
|
var _tK = "tagKeys";
|
|
1199
|
-
var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1200
|
-
if (encoded.length) {
|
|
1201
|
-
return JSON.parse(encoded);
|
|
1202
|
-
}
|
|
1203
|
-
return {};
|
|
1204
|
-
}), "parseBody");
|
|
1205
|
-
var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
|
|
1206
|
-
const value = await parseBody(errorBody, context);
|
|
1207
|
-
value.message = value.message ?? value.Message;
|
|
1208
|
-
return value;
|
|
1209
|
-
}, "parseErrorBody");
|
|
1210
|
-
var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
|
|
1211
|
-
const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
|
|
1212
|
-
const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
|
|
1213
|
-
let cleanValue = rawValue;
|
|
1214
|
-
if (typeof cleanValue === "number") {
|
|
1215
|
-
cleanValue = cleanValue.toString();
|
|
1216
|
-
}
|
|
1217
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1218
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1219
|
-
}
|
|
1220
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1221
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1222
|
-
}
|
|
1223
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1224
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1225
|
-
}
|
|
1226
|
-
return cleanValue;
|
|
1227
|
-
}, "sanitizeErrorCode");
|
|
1228
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1229
|
-
if (headerKey !== void 0) {
|
|
1230
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1231
|
-
}
|
|
1232
|
-
if (data.code !== void 0) {
|
|
1233
|
-
return sanitizeErrorCode(data.code);
|
|
1234
|
-
}
|
|
1235
|
-
if (data["__type"] !== void 0) {
|
|
1236
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1237
|
-
}
|
|
1238
|
-
}, "loadRestJsonErrorCode");
|
|
1239
1198
|
|
|
1240
1199
|
// src/commands/CreateChatTokenCommand.ts
|
|
1241
1200
|
var _CreateChatTokenCommand = class _CreateChatTokenCommand 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, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
4
|
import { IvschatServiceException as __BaseException } from "../models/IvschatServiceException";
|
|
@@ -732,43 +732,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
732
732
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
733
733
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
734
734
|
const _tK = "tagKeys";
|
|
735
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
736
|
-
if (encoded.length) {
|
|
737
|
-
return JSON.parse(encoded);
|
|
738
|
-
}
|
|
739
|
-
return {};
|
|
740
|
-
});
|
|
741
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
742
|
-
const value = await parseBody(errorBody, context);
|
|
743
|
-
value.message = value.message ?? value.Message;
|
|
744
|
-
return value;
|
|
745
|
-
};
|
|
746
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
747
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
748
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
749
|
-
let cleanValue = rawValue;
|
|
750
|
-
if (typeof cleanValue === "number") {
|
|
751
|
-
cleanValue = cleanValue.toString();
|
|
752
|
-
}
|
|
753
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
754
|
-
cleanValue = cleanValue.split(",")[0];
|
|
755
|
-
}
|
|
756
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
757
|
-
cleanValue = cleanValue.split(":")[0];
|
|
758
|
-
}
|
|
759
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
760
|
-
cleanValue = cleanValue.split("#")[1];
|
|
761
|
-
}
|
|
762
|
-
return cleanValue;
|
|
763
|
-
};
|
|
764
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
765
|
-
if (headerKey !== undefined) {
|
|
766
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
767
|
-
}
|
|
768
|
-
if (data.code !== undefined) {
|
|
769
|
-
return sanitizeErrorCode(data.code);
|
|
770
|
-
}
|
|
771
|
-
if (data["__type"] !== undefined) {
|
|
772
|
-
return sanitizeErrorCode(data["__type"]);
|
|
773
|
-
}
|
|
774
|
-
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-ivschat",
|
|
3
3
|
"description": "AWS SDK for JavaScript Ivschat Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
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-ivschat",
|
|
@@ -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.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",
|