@aws-sdk/client-identitystore 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 CHANGED
@@ -578,6 +578,7 @@ var ListUsersResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
578
578
  }), "ListUsersResponseFilterSensitiveLog");
579
579
 
580
580
  // src/protocols/Aws_json1_1.ts
581
+ var import_core2 = require("@aws-sdk/core");
581
582
 
582
583
 
583
584
  var se_CreateGroupCommand = /* @__PURE__ */ __name(async (input, context) => {
@@ -698,7 +699,7 @@ var de_CreateGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
698
699
  if (output.statusCode >= 300) {
699
700
  return de_CommandError(output, context);
700
701
  }
701
- const data = await parseBody(output.body, context);
702
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
702
703
  let contents = {};
703
704
  contents = (0, import_smithy_client._json)(data);
704
705
  const response = {
@@ -711,7 +712,7 @@ var de_CreateGroupMembershipCommand = /* @__PURE__ */ __name(async (output, cont
711
712
  if (output.statusCode >= 300) {
712
713
  return de_CommandError(output, context);
713
714
  }
714
- const data = await parseBody(output.body, context);
715
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
715
716
  let contents = {};
716
717
  contents = (0, import_smithy_client._json)(data);
717
718
  const response = {
@@ -724,7 +725,7 @@ var de_CreateUserCommand = /* @__PURE__ */ __name(async (output, context) => {
724
725
  if (output.statusCode >= 300) {
725
726
  return de_CommandError(output, context);
726
727
  }
727
- const data = await parseBody(output.body, context);
728
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
728
729
  let contents = {};
729
730
  contents = (0, import_smithy_client._json)(data);
730
731
  const response = {
@@ -737,7 +738,7 @@ var de_DeleteGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
737
738
  if (output.statusCode >= 300) {
738
739
  return de_CommandError(output, context);
739
740
  }
740
- const data = await parseBody(output.body, context);
741
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
741
742
  let contents = {};
742
743
  contents = (0, import_smithy_client._json)(data);
743
744
  const response = {
@@ -750,7 +751,7 @@ var de_DeleteGroupMembershipCommand = /* @__PURE__ */ __name(async (output, cont
750
751
  if (output.statusCode >= 300) {
751
752
  return de_CommandError(output, context);
752
753
  }
753
- const data = await parseBody(output.body, context);
754
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
754
755
  let contents = {};
755
756
  contents = (0, import_smithy_client._json)(data);
756
757
  const response = {
@@ -763,7 +764,7 @@ var de_DeleteUserCommand = /* @__PURE__ */ __name(async (output, context) => {
763
764
  if (output.statusCode >= 300) {
764
765
  return de_CommandError(output, context);
765
766
  }
766
- const data = await parseBody(output.body, context);
767
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
767
768
  let contents = {};
768
769
  contents = (0, import_smithy_client._json)(data);
769
770
  const response = {
@@ -776,7 +777,7 @@ var de_DescribeGroupCommand = /* @__PURE__ */ __name(async (output, context) =>
776
777
  if (output.statusCode >= 300) {
777
778
  return de_CommandError(output, context);
778
779
  }
779
- const data = await parseBody(output.body, context);
780
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
780
781
  let contents = {};
781
782
  contents = (0, import_smithy_client._json)(data);
782
783
  const response = {
@@ -789,7 +790,7 @@ var de_DescribeGroupMembershipCommand = /* @__PURE__ */ __name(async (output, co
789
790
  if (output.statusCode >= 300) {
790
791
  return de_CommandError(output, context);
791
792
  }
792
- const data = await parseBody(output.body, context);
793
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
793
794
  let contents = {};
794
795
  contents = (0, import_smithy_client._json)(data);
795
796
  const response = {
@@ -802,7 +803,7 @@ var de_DescribeUserCommand = /* @__PURE__ */ __name(async (output, context) => {
802
803
  if (output.statusCode >= 300) {
803
804
  return de_CommandError(output, context);
804
805
  }
805
- const data = await parseBody(output.body, context);
806
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
806
807
  let contents = {};
807
808
  contents = (0, import_smithy_client._json)(data);
808
809
  const response = {
@@ -815,7 +816,7 @@ var de_GetGroupIdCommand = /* @__PURE__ */ __name(async (output, context) => {
815
816
  if (output.statusCode >= 300) {
816
817
  return de_CommandError(output, context);
817
818
  }
818
- const data = await parseBody(output.body, context);
819
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
819
820
  let contents = {};
820
821
  contents = (0, import_smithy_client._json)(data);
821
822
  const response = {
@@ -828,7 +829,7 @@ var de_GetGroupMembershipIdCommand = /* @__PURE__ */ __name(async (output, conte
828
829
  if (output.statusCode >= 300) {
829
830
  return de_CommandError(output, context);
830
831
  }
831
- const data = await parseBody(output.body, context);
832
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
832
833
  let contents = {};
833
834
  contents = (0, import_smithy_client._json)(data);
834
835
  const response = {
@@ -841,7 +842,7 @@ var de_GetUserIdCommand = /* @__PURE__ */ __name(async (output, context) => {
841
842
  if (output.statusCode >= 300) {
842
843
  return de_CommandError(output, context);
843
844
  }
844
- const data = await parseBody(output.body, context);
845
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
845
846
  let contents = {};
846
847
  contents = (0, import_smithy_client._json)(data);
847
848
  const response = {
@@ -854,7 +855,7 @@ var de_IsMemberInGroupsCommand = /* @__PURE__ */ __name(async (output, context)
854
855
  if (output.statusCode >= 300) {
855
856
  return de_CommandError(output, context);
856
857
  }
857
- const data = await parseBody(output.body, context);
858
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
858
859
  let contents = {};
859
860
  contents = (0, import_smithy_client._json)(data);
860
861
  const response = {
@@ -867,7 +868,7 @@ var de_ListGroupMembershipsCommand = /* @__PURE__ */ __name(async (output, conte
867
868
  if (output.statusCode >= 300) {
868
869
  return de_CommandError(output, context);
869
870
  }
870
- const data = await parseBody(output.body, context);
871
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
871
872
  let contents = {};
872
873
  contents = (0, import_smithy_client._json)(data);
873
874
  const response = {
@@ -880,7 +881,7 @@ var de_ListGroupMembershipsForMemberCommand = /* @__PURE__ */ __name(async (outp
880
881
  if (output.statusCode >= 300) {
881
882
  return de_CommandError(output, context);
882
883
  }
883
- const data = await parseBody(output.body, context);
884
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
884
885
  let contents = {};
885
886
  contents = (0, import_smithy_client._json)(data);
886
887
  const response = {
@@ -893,7 +894,7 @@ var de_ListGroupsCommand = /* @__PURE__ */ __name(async (output, context) => {
893
894
  if (output.statusCode >= 300) {
894
895
  return de_CommandError(output, context);
895
896
  }
896
- const data = await parseBody(output.body, context);
897
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
897
898
  let contents = {};
898
899
  contents = (0, import_smithy_client._json)(data);
899
900
  const response = {
@@ -906,7 +907,7 @@ var de_ListUsersCommand = /* @__PURE__ */ __name(async (output, context) => {
906
907
  if (output.statusCode >= 300) {
907
908
  return de_CommandError(output, context);
908
909
  }
909
- const data = await parseBody(output.body, context);
910
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
910
911
  let contents = {};
911
912
  contents = (0, import_smithy_client._json)(data);
912
913
  const response = {
@@ -919,7 +920,7 @@ var de_UpdateGroupCommand = /* @__PURE__ */ __name(async (output, context) => {
919
920
  if (output.statusCode >= 300) {
920
921
  return de_CommandError(output, context);
921
922
  }
922
- const data = await parseBody(output.body, context);
923
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
923
924
  let contents = {};
924
925
  contents = (0, import_smithy_client._json)(data);
925
926
  const response = {
@@ -932,7 +933,7 @@ var de_UpdateUserCommand = /* @__PURE__ */ __name(async (output, context) => {
932
933
  if (output.statusCode >= 300) {
933
934
  return de_CommandError(output, context);
934
935
  }
935
- const data = await parseBody(output.body, context);
936
+ const data = await (0, import_core2.parseJsonBody)(output.body, context);
936
937
  let contents = {};
937
938
  contents = (0, import_smithy_client._json)(data);
938
939
  const response = {
@@ -944,9 +945,9 @@ var de_UpdateUserCommand = /* @__PURE__ */ __name(async (output, context) => {
944
945
  var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
945
946
  const parsedOutput = {
946
947
  ...output,
947
- body: await parseErrorBody(output.body, context)
948
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
948
949
  };
949
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
950
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
950
951
  switch (errorCode) {
951
952
  case "AccessDeniedException":
952
953
  case "com.amazonaws.identitystore#AccessDeniedException":
@@ -1100,7 +1101,6 @@ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
1100
1101
  extendedRequestId: output.headers["x-amz-id-2"],
1101
1102
  cfId: output.headers["x-amz-cf-id"]
1102
1103
  }), "deserializeMetadata");
1103
- var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
1104
1104
  var throwDefaultError = (0, import_smithy_client.withBaseException)(IdentitystoreServiceException);
1105
1105
  var buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {
1106
1106
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
@@ -1127,46 +1127,6 @@ function sharedHeaders(operation) {
1127
1127
  };
1128
1128
  }
1129
1129
  __name(sharedHeaders, "sharedHeaders");
1130
- var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1131
- if (encoded.length) {
1132
- return JSON.parse(encoded);
1133
- }
1134
- return {};
1135
- }), "parseBody");
1136
- var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
1137
- const value = await parseBody(errorBody, context);
1138
- value.message = value.message ?? value.Message;
1139
- return value;
1140
- }, "parseErrorBody");
1141
- var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
1142
- const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
1143
- const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
1144
- let cleanValue = rawValue;
1145
- if (typeof cleanValue === "number") {
1146
- cleanValue = cleanValue.toString();
1147
- }
1148
- if (cleanValue.indexOf(",") >= 0) {
1149
- cleanValue = cleanValue.split(",")[0];
1150
- }
1151
- if (cleanValue.indexOf(":") >= 0) {
1152
- cleanValue = cleanValue.split(":")[0];
1153
- }
1154
- if (cleanValue.indexOf("#") >= 0) {
1155
- cleanValue = cleanValue.split("#")[1];
1156
- }
1157
- return cleanValue;
1158
- }, "sanitizeErrorCode");
1159
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1160
- if (headerKey !== void 0) {
1161
- return sanitizeErrorCode(output.headers[headerKey]);
1162
- }
1163
- if (data.code !== void 0) {
1164
- return sanitizeErrorCode(data.code);
1165
- }
1166
- if (data["__type"] !== void 0) {
1167
- return sanitizeErrorCode(data["__type"]);
1168
- }
1169
- }, "loadRestJsonErrorCode");
1170
1130
 
1171
1131
  // src/commands/CreateGroupCommand.ts
1172
1132
  var _CreateGroupCommand = class _CreateGroupCommand extends import_smithy_client.Command.classBuilder().ep({
@@ -1,3 +1,4 @@
1
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
1
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { IdentitystoreServiceException as __BaseException } from "../models/IdentitystoreServiceException";
@@ -550,43 +551,3 @@ function sharedHeaders(operation) {
550
551
  "x-amz-target": `AWSIdentityStore.${operation}`,
551
552
  };
552
553
  }
553
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
554
- if (encoded.length) {
555
- return JSON.parse(encoded);
556
- }
557
- return {};
558
- });
559
- const parseErrorBody = async (errorBody, context) => {
560
- const value = await parseBody(errorBody, context);
561
- value.message = value.message ?? value.Message;
562
- return value;
563
- };
564
- const loadRestJsonErrorCode = (output, data) => {
565
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
566
- const sanitizeErrorCode = (rawValue) => {
567
- let cleanValue = rawValue;
568
- if (typeof cleanValue === "number") {
569
- cleanValue = cleanValue.toString();
570
- }
571
- if (cleanValue.indexOf(",") >= 0) {
572
- cleanValue = cleanValue.split(",")[0];
573
- }
574
- if (cleanValue.indexOf(":") >= 0) {
575
- cleanValue = cleanValue.split(":")[0];
576
- }
577
- if (cleanValue.indexOf("#") >= 0) {
578
- cleanValue = cleanValue.split("#")[1];
579
- }
580
- return cleanValue;
581
- };
582
- const headerKey = findKey(output.headers, "x-amzn-errortype");
583
- if (headerKey !== undefined) {
584
- return sanitizeErrorCode(output.headers[headerKey]);
585
- }
586
- if (data.code !== undefined) {
587
- return sanitizeErrorCode(data.code);
588
- }
589
- if (data["__type"] !== undefined) {
590
- return sanitizeErrorCode(data["__type"]);
591
- }
592
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-identitystore",
3
3
  "description": "AWS SDK for JavaScript Identitystore Client for Node.js, Browser and React Native",
4
- "version": "3.525.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-identitystore",
@@ -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.525.0",
24
- "@aws-sdk/core": "3.525.0",
25
- "@aws-sdk/credential-provider-node": "3.525.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",