@squiz/db-lib 1.2.1-alpha.98 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/lib/AbstractRepository.d.ts +14 -4
  3. package/lib/index.d.ts +1 -7
  4. package/lib/index.js +1345 -1354
  5. package/lib/index.js.map +4 -4
  6. package/package.json +9 -11
  7. package/src/AbstractRepository.ts +81 -6
  8. package/src/index.ts +1 -10
  9. package/tsconfig.tsbuildinfo +1 -1
  10. package/lib/assertions/assertAssign.d.ts +0 -4
  11. package/lib/assertions/assertAssign.spec.d.ts +0 -1
  12. package/lib/assertions/assertAssignWithDefaultUndefinedValue.d.ts +0 -4
  13. package/lib/assertions/assertAssignWithDefaultUndefinedValue.spec.d.ts +0 -1
  14. package/lib/assertions/assertIsDefined.d.ts +0 -1
  15. package/lib/assertions/assertIsDefined.spec.d.ts +0 -1
  16. package/lib/assertions/assertIsMapOfStringString.d.ts +0 -3
  17. package/lib/assertions/assertIsMapOfStringString.spec.d.ts +0 -1
  18. package/lib/assertions/assertIsNotAnEmptyString.d.ts +0 -1
  19. package/lib/assertions/assertIsNotAnEmptyString.spec.d.ts +0 -1
  20. package/lib/assertions/assertIsObject.d.ts +0 -1
  21. package/lib/assertions/assertIsObject.spec.d.ts +0 -1
  22. package/lib/assertions/assertIsString.d.ts +0 -1
  23. package/lib/assertions/assertIsString.spec.d.ts +0 -1
  24. package/src/assertions/assertAssign.spec.ts +0 -18
  25. package/src/assertions/assertAssign.ts +0 -22
  26. package/src/assertions/assertAssignWithDefaultUndefinedValue.spec.ts +0 -31
  27. package/src/assertions/assertAssignWithDefaultUndefinedValue.ts +0 -17
  28. package/src/assertions/assertIsDefined.spec.ts +0 -19
  29. package/src/assertions/assertIsDefined.ts +0 -7
  30. package/src/assertions/assertIsMapOfStringString.spec.ts +0 -23
  31. package/src/assertions/assertIsMapOfStringString.ts +0 -29
  32. package/src/assertions/assertIsNotAnEmptyString.spec.ts +0 -25
  33. package/src/assertions/assertIsNotAnEmptyString.ts +0 -17
  34. package/src/assertions/assertIsObject.spec.ts +0 -17
  35. package/src/assertions/assertIsObject.ts +0 -11
  36. package/src/assertions/assertIsString.spec.ts +0 -16
  37. package/src/assertions/assertIsString.ts +0 -11
package/lib/index.js CHANGED
@@ -3626,7 +3626,7 @@ var require_pg_pool = __commonJS({
3626
3626
  pool.emit("error", err, client);
3627
3627
  };
3628
3628
  }
3629
- var Pool2 = class extends EventEmitter {
3629
+ var Pool3 = class extends EventEmitter {
3630
3630
  constructor(options, Client) {
3631
3631
  super();
3632
3632
  this.options = Object.assign({}, options);
@@ -3939,7 +3939,7 @@ var require_pg_pool = __commonJS({
3939
3939
  return this._clients.length;
3940
3940
  }
3941
3941
  };
3942
- module2.exports = Pool2;
3942
+ module2.exports = Pool3;
3943
3943
  }
3944
3944
  });
3945
3945
 
@@ -4395,10 +4395,10 @@ var require_lib2 = __commonJS({
4395
4395
  var Client = require_client();
4396
4396
  var defaults = require_defaults();
4397
4397
  var Connection = require_connection();
4398
- var Pool2 = require_pg_pool();
4398
+ var Pool3 = require_pg_pool();
4399
4399
  var { DatabaseError } = require_dist();
4400
4400
  var poolFactory = (Client2) => {
4401
- return class BoundPool extends Pool2 {
4401
+ return class BoundPool extends Pool3 {
4402
4402
  constructor(options) {
4403
4403
  super(options, Client2);
4404
4404
  }
@@ -7079,7 +7079,7 @@ var require_package2 = __commonJS({
7079
7079
  module2.exports = {
7080
7080
  name: "winston",
7081
7081
  description: "A logger for just about everything.",
7082
- version: "3.8.1",
7082
+ version: "3.8.2",
7083
7083
  author: "Charlie Robbins <charlie.robbins@gmail.com>",
7084
7084
  maintainers: [
7085
7085
  "David Hyde <dabh@alumni.stanford.edu>"
@@ -7103,6 +7103,7 @@ var require_package2 = __commonJS({
7103
7103
  ],
7104
7104
  dependencies: {
7105
7105
  "@dabh/diagnostics": "^2.0.2",
7106
+ "@colors/colors": "1.5.0",
7106
7107
  async: "^3.2.3",
7107
7108
  "is-stream": "^2.0.0",
7108
7109
  logform: "^2.4.0",
@@ -7117,7 +7118,6 @@ var require_package2 = __commonJS({
7117
7118
  "@babel/cli": "^7.17.0",
7118
7119
  "@babel/core": "^7.17.2",
7119
7120
  "@babel/preset-env": "^7.16.7",
7120
- "@colors/colors": "1.5.0",
7121
7121
  "@dabh/eslint-config-populist": "^5.0.0",
7122
7122
  "@types/node": "^18.0.0",
7123
7123
  "abstract-winston-transport": "^0.5.1",
@@ -7133,7 +7133,7 @@ var require_package2 = __commonJS({
7133
7133
  through2: "^4.0.2",
7134
7134
  "winston-compat": "^0.1.5"
7135
7135
  },
7136
- main: "./lib/winston",
7136
+ main: "./lib/winston.js",
7137
7137
  browser: "./dist/winston",
7138
7138
  types: "./index.d.ts",
7139
7139
  scripts: {
@@ -14845,6 +14845,31 @@ var require_winston = __commonJS({
14845
14845
  }
14846
14846
  });
14847
14847
 
14848
+ // ../dx-logger-lib/lib/formatters.js
14849
+ var require_formatters = __commonJS({
14850
+ "../dx-logger-lib/lib/formatters.js"(exports) {
14851
+ "use strict";
14852
+ var __importDefault = exports && exports.__importDefault || function(mod) {
14853
+ return mod && mod.__esModule ? mod : { "default": mod };
14854
+ };
14855
+ Object.defineProperty(exports, "__esModule", { value: true });
14856
+ exports.getHumanFormat = exports.errorFormatting = exports.getJsonFormat = void 0;
14857
+ var winston_1 = __importDefault(require_winston());
14858
+ function getJsonFormat() {
14859
+ return winston_1.default.format.combine(winston_1.default.format.errors(), winston_1.default.format.json(), winston_1.default.format.timestamp({ alias: "time" }));
14860
+ }
14861
+ exports.getJsonFormat = getJsonFormat;
14862
+ exports.errorFormatting = winston_1.default.format.printf((info) => {
14863
+ let message = `${info.timestamp} ${info.level}: ${info.stack || info.message}`;
14864
+ return message;
14865
+ });
14866
+ function getHumanFormat() {
14867
+ return winston_1.default.format.combine(winston_1.default.format.colorize(), winston_1.default.format.timestamp(), winston_1.default.format.errors({ stack: true }), exports.errorFormatting);
14868
+ }
14869
+ exports.getHumanFormat = getHumanFormat;
14870
+ }
14871
+ });
14872
+
14848
14873
  // ../dx-logger-lib/lib/index.js
14849
14874
  var require_lib3 = __commonJS({
14850
14875
  "../dx-logger-lib/lib/index.js"(exports) {
@@ -14855,28 +14880,23 @@ var require_lib3 = __commonJS({
14855
14880
  Object.defineProperty(exports, "__esModule", { value: true });
14856
14881
  exports.getLogger = exports.Logger = void 0;
14857
14882
  var winston_1 = __importDefault(require_winston());
14883
+ var formatters_1 = require_formatters();
14858
14884
  var winston_2 = require_winston();
14859
14885
  Object.defineProperty(exports, "Logger", { enumerable: true, get: function() {
14860
14886
  return winston_2.Logger;
14861
14887
  } });
14862
14888
  function getLogger2(options) {
14863
- const formatter = options.format === "human" ? getHumanFormat() : getJsonFormat();
14889
+ const formatter = options.format === "human" ? (0, formatters_1.getHumanFormat)() : (0, formatters_1.getJsonFormat)();
14864
14890
  return winston_1.default.createLogger({
14865
14891
  defaultMeta: {
14866
14892
  ...options.meta,
14867
14893
  name: options.name
14868
14894
  },
14869
14895
  format: formatter,
14870
- transports: [new winston_1.default.transports.Console()]
14896
+ transports: [new winston_1.default.transports.Console({ silent: options.silent })]
14871
14897
  });
14872
14898
  }
14873
14899
  exports.getLogger = getLogger2;
14874
- function getJsonFormat() {
14875
- return winston_1.default.format.combine(winston_1.default.format.json(), winston_1.default.format.timestamp({ alias: "time" }));
14876
- }
14877
- function getHumanFormat() {
14878
- return winston_1.default.format.combine(winston_1.default.format.timestamp(), winston_1.default.format.cli());
14879
- }
14880
14900
  }
14881
14901
  });
14882
14902
 
@@ -15693,7 +15713,7 @@ var require_parse_utils = __commonJS({
15693
15713
  "node_modules/@aws-sdk/smithy-client/dist-cjs/parse-utils.js"(exports) {
15694
15714
  "use strict";
15695
15715
  Object.defineProperty(exports, "__esModule", { value: true });
15696
- exports.strictParseByte = exports.strictParseShort = exports.strictParseInt32 = exports.strictParseInt = exports.strictParseLong = exports.limitedParseFloat32 = exports.limitedParseFloat = exports.handleFloat = exports.limitedParseDouble = exports.strictParseFloat32 = exports.strictParseFloat = exports.strictParseDouble = exports.expectUnion = exports.expectString = exports.expectObject = exports.expectNonNull = exports.expectByte = exports.expectShort = exports.expectInt32 = exports.expectInt = exports.expectLong = exports.expectFloat32 = exports.expectNumber = exports.expectBoolean = exports.parseBoolean = void 0;
15716
+ exports.logger = exports.strictParseByte = exports.strictParseShort = exports.strictParseInt32 = exports.strictParseInt = exports.strictParseLong = exports.limitedParseFloat32 = exports.limitedParseFloat = exports.handleFloat = exports.limitedParseDouble = exports.strictParseFloat32 = exports.strictParseFloat = exports.strictParseDouble = exports.expectUnion = exports.expectString = exports.expectObject = exports.expectNonNull = exports.expectByte = exports.expectShort = exports.expectInt32 = exports.expectInt = exports.expectLong = exports.expectFloat32 = exports.expectNumber = exports.expectBoolean = exports.parseBoolean = void 0;
15697
15717
  var parseBoolean = (value) => {
15698
15718
  switch (value) {
15699
15719
  case "true":
@@ -15709,20 +15729,52 @@ var require_parse_utils = __commonJS({
15709
15729
  if (value === null || value === void 0) {
15710
15730
  return void 0;
15711
15731
  }
15732
+ if (typeof value === "number") {
15733
+ if (value === 0 || value === 1) {
15734
+ exports.logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
15735
+ }
15736
+ if (value === 0) {
15737
+ return false;
15738
+ }
15739
+ if (value === 1) {
15740
+ return true;
15741
+ }
15742
+ }
15743
+ if (typeof value === "string") {
15744
+ const lower = value.toLowerCase();
15745
+ if (lower === "false" || lower === "true") {
15746
+ exports.logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
15747
+ }
15748
+ if (lower === "false") {
15749
+ return false;
15750
+ }
15751
+ if (lower === "true") {
15752
+ return true;
15753
+ }
15754
+ }
15712
15755
  if (typeof value === "boolean") {
15713
15756
  return value;
15714
15757
  }
15715
- throw new TypeError(`Expected boolean, got ${typeof value}`);
15758
+ throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);
15716
15759
  };
15717
15760
  exports.expectBoolean = expectBoolean;
15718
15761
  var expectNumber = (value) => {
15719
15762
  if (value === null || value === void 0) {
15720
15763
  return void 0;
15721
15764
  }
15765
+ if (typeof value === "string") {
15766
+ const parsed = parseFloat(value);
15767
+ if (!Number.isNaN(parsed)) {
15768
+ if (String(parsed) !== String(value)) {
15769
+ exports.logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
15770
+ }
15771
+ return parsed;
15772
+ }
15773
+ }
15722
15774
  if (typeof value === "number") {
15723
15775
  return value;
15724
15776
  }
15725
- throw new TypeError(`Expected number, got ${typeof value}`);
15777
+ throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
15726
15778
  };
15727
15779
  exports.expectNumber = expectNumber;
15728
15780
  var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
@@ -15743,7 +15795,7 @@ var require_parse_utils = __commonJS({
15743
15795
  if (Number.isInteger(value) && !Number.isNaN(value)) {
15744
15796
  return value;
15745
15797
  }
15746
- throw new TypeError(`Expected integer, got ${typeof value}`);
15798
+ throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
15747
15799
  };
15748
15800
  exports.expectLong = expectLong;
15749
15801
  exports.expectInt = exports.expectLong;
@@ -15787,7 +15839,8 @@ var require_parse_utils = __commonJS({
15787
15839
  if (typeof value === "object" && !Array.isArray(value)) {
15788
15840
  return value;
15789
15841
  }
15790
- throw new TypeError(`Expected object, got ${typeof value}`);
15842
+ const receivedType = Array.isArray(value) ? "array" : typeof value;
15843
+ throw new TypeError(`Expected object, got ${receivedType}: ${value}`);
15791
15844
  };
15792
15845
  exports.expectObject = expectObject;
15793
15846
  var expectString = (value) => {
@@ -15797,7 +15850,11 @@ var require_parse_utils = __commonJS({
15797
15850
  if (typeof value === "string") {
15798
15851
  return value;
15799
15852
  }
15800
- throw new TypeError(`Expected string, got ${typeof value}`);
15853
+ if (["boolean", "number", "bigint"].includes(typeof value)) {
15854
+ exports.logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));
15855
+ return String(value);
15856
+ }
15857
+ throw new TypeError(`Expected string, got ${typeof value}: ${value}`);
15801
15858
  };
15802
15859
  exports.expectString = expectString;
15803
15860
  var expectUnion = (value) => {
@@ -15805,9 +15862,9 @@ var require_parse_utils = __commonJS({
15805
15862
  return void 0;
15806
15863
  }
15807
15864
  const asObject = (0, exports.expectObject)(value);
15808
- const setKeys = Object.entries(asObject).filter(([_, v]) => v !== null && v !== void 0).map(([k, _]) => k);
15865
+ const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k);
15809
15866
  if (setKeys.length === 0) {
15810
- throw new TypeError(`Unions must have exactly one non-null member`);
15867
+ throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
15811
15868
  }
15812
15869
  if (setKeys.length > 1) {
15813
15870
  throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);
@@ -15895,6 +15952,12 @@ var require_parse_utils = __commonJS({
15895
15952
  return (0, exports.expectByte)(value);
15896
15953
  };
15897
15954
  exports.strictParseByte = strictParseByte;
15955
+ var stackTraceWarning = (message) => {
15956
+ return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n");
15957
+ };
15958
+ exports.logger = {
15959
+ warn: console.warn
15960
+ };
15898
15961
  }
15899
15962
  });
15900
15963
 
@@ -15941,9 +16004,9 @@ var require_date_utils = __commonJS({
15941
16004
  return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });
15942
16005
  };
15943
16006
  exports.parseRfc3339DateTime = parseRfc3339DateTime;
15944
- var IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
15945
- var RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
15946
- var ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);
16007
+ var IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
16008
+ var RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
16009
+ var ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);
15947
16010
  var parseRfc7231DateTime = (value) => {
15948
16011
  if (value === null || value === void 0) {
15949
16012
  return void 0;
@@ -16058,6 +16121,67 @@ var require_date_utils = __commonJS({
16058
16121
  }
16059
16122
  });
16060
16123
 
16124
+ // node_modules/@aws-sdk/smithy-client/dist-cjs/exceptions.js
16125
+ var require_exceptions = __commonJS({
16126
+ "node_modules/@aws-sdk/smithy-client/dist-cjs/exceptions.js"(exports) {
16127
+ "use strict";
16128
+ Object.defineProperty(exports, "__esModule", { value: true });
16129
+ exports.decorateServiceException = exports.ServiceException = void 0;
16130
+ var ServiceException = class extends Error {
16131
+ constructor(options) {
16132
+ super(options.message);
16133
+ Object.setPrototypeOf(this, ServiceException.prototype);
16134
+ this.name = options.name;
16135
+ this.$fault = options.$fault;
16136
+ this.$metadata = options.$metadata;
16137
+ }
16138
+ };
16139
+ exports.ServiceException = ServiceException;
16140
+ var decorateServiceException = (exception, additions = {}) => {
16141
+ Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => {
16142
+ if (exception[k] == void 0 || exception[k] === "") {
16143
+ exception[k] = v;
16144
+ }
16145
+ });
16146
+ const message = exception.message || exception.Message || "UnknownError";
16147
+ exception.message = message;
16148
+ delete exception.Message;
16149
+ return exception;
16150
+ };
16151
+ exports.decorateServiceException = decorateServiceException;
16152
+ }
16153
+ });
16154
+
16155
+ // node_modules/@aws-sdk/smithy-client/dist-cjs/default-error-handler.js
16156
+ var require_default_error_handler = __commonJS({
16157
+ "node_modules/@aws-sdk/smithy-client/dist-cjs/default-error-handler.js"(exports) {
16158
+ "use strict";
16159
+ Object.defineProperty(exports, "__esModule", { value: true });
16160
+ exports.throwDefaultError = void 0;
16161
+ var exceptions_1 = require_exceptions();
16162
+ var throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => {
16163
+ const $metadata = deserializeMetadata(output);
16164
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
16165
+ const response = new exceptionCtor({
16166
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
16167
+ $fault: "client",
16168
+ $metadata
16169
+ });
16170
+ throw (0, exceptions_1.decorateServiceException)(response, parsedBody);
16171
+ };
16172
+ exports.throwDefaultError = throwDefaultError;
16173
+ var deserializeMetadata = (output) => {
16174
+ var _a;
16175
+ return {
16176
+ httpStatusCode: output.statusCode,
16177
+ requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
16178
+ extendedRequestId: output.headers["x-amz-id-2"],
16179
+ cfId: output.headers["x-amz-cf-id"]
16180
+ };
16181
+ };
16182
+ }
16183
+ });
16184
+
16061
16185
  // node_modules/@aws-sdk/smithy-client/dist-cjs/defaults-mode.js
16062
16186
  var require_defaults_mode = __commonJS({
16063
16187
  "node_modules/@aws-sdk/smithy-client/dist-cjs/defaults-mode.js"(exports) {
@@ -16117,37 +16241,6 @@ For details, please refer our blog post: https://a.co/48dbdYz`, `NodeDeprecation
16117
16241
  }
16118
16242
  });
16119
16243
 
16120
- // node_modules/@aws-sdk/smithy-client/dist-cjs/exceptions.js
16121
- var require_exceptions = __commonJS({
16122
- "node_modules/@aws-sdk/smithy-client/dist-cjs/exceptions.js"(exports) {
16123
- "use strict";
16124
- Object.defineProperty(exports, "__esModule", { value: true });
16125
- exports.decorateServiceException = exports.ServiceException = void 0;
16126
- var ServiceException = class extends Error {
16127
- constructor(options) {
16128
- super(options.message);
16129
- Object.setPrototypeOf(this, ServiceException.prototype);
16130
- this.name = options.name;
16131
- this.$fault = options.$fault;
16132
- this.$metadata = options.$metadata;
16133
- }
16134
- };
16135
- exports.ServiceException = ServiceException;
16136
- var decorateServiceException = (exception, additions = {}) => {
16137
- Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => {
16138
- if (exception[k] == void 0 || exception[k] === "") {
16139
- exception[k] = v;
16140
- }
16141
- });
16142
- const message = exception.message || exception.Message || "UnknownError";
16143
- exception.message = message;
16144
- delete exception.Message;
16145
- return exception;
16146
- };
16147
- exports.decorateServiceException = decorateServiceException;
16148
- }
16149
- });
16150
-
16151
16244
  // node_modules/@aws-sdk/smithy-client/dist-cjs/extended-encode-uri-component.js
16152
16245
  var require_extended_encode_uri_component = __commonJS({
16153
16246
  "node_modules/@aws-sdk/smithy-client/dist-cjs/extended-encode-uri-component.js"(exports) {
@@ -16238,6 +16331,103 @@ var require_lazy_json = __commonJS({
16238
16331
  }
16239
16332
  });
16240
16333
 
16334
+ // node_modules/@aws-sdk/smithy-client/dist-cjs/object-mapping.js
16335
+ var require_object_mapping = __commonJS({
16336
+ "node_modules/@aws-sdk/smithy-client/dist-cjs/object-mapping.js"(exports) {
16337
+ "use strict";
16338
+ Object.defineProperty(exports, "__esModule", { value: true });
16339
+ exports.convertMap = exports.map = void 0;
16340
+ function map(arg0, arg1, arg2) {
16341
+ let target;
16342
+ let filter;
16343
+ let instructions;
16344
+ if (typeof arg1 === "undefined" && typeof arg2 === "undefined") {
16345
+ target = {};
16346
+ instructions = arg0;
16347
+ } else {
16348
+ target = arg0;
16349
+ if (typeof arg1 === "function") {
16350
+ filter = arg1;
16351
+ instructions = arg2;
16352
+ return mapWithFilter(target, filter, instructions);
16353
+ } else {
16354
+ instructions = arg1;
16355
+ }
16356
+ }
16357
+ for (const key of Object.keys(instructions)) {
16358
+ if (!Array.isArray(instructions[key])) {
16359
+ target[key] = instructions[key];
16360
+ continue;
16361
+ }
16362
+ let [filter2, value] = instructions[key];
16363
+ if (typeof value === "function") {
16364
+ let _value;
16365
+ const defaultFilterPassed = filter2 === void 0 && (_value = value()) != null;
16366
+ const customFilterPassed = typeof filter2 === "function" && !!filter2(void 0) || typeof filter2 !== "function" && !!filter2;
16367
+ if (defaultFilterPassed) {
16368
+ target[key] = _value;
16369
+ } else if (customFilterPassed) {
16370
+ target[key] = value();
16371
+ }
16372
+ } else {
16373
+ const defaultFilterPassed = filter2 === void 0 && value != null;
16374
+ const customFilterPassed = typeof filter2 === "function" && !!filter2(value) || typeof filter2 !== "function" && !!filter2;
16375
+ if (defaultFilterPassed || customFilterPassed) {
16376
+ target[key] = value;
16377
+ }
16378
+ }
16379
+ }
16380
+ return target;
16381
+ }
16382
+ exports.map = map;
16383
+ var convertMap = (target) => {
16384
+ const output = {};
16385
+ for (const [k, v] of Object.entries(target || {})) {
16386
+ output[k] = [, v];
16387
+ }
16388
+ return output;
16389
+ };
16390
+ exports.convertMap = convertMap;
16391
+ var mapWithFilter = (target, filter, instructions) => {
16392
+ return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => {
16393
+ if (Array.isArray(value)) {
16394
+ _instructions[key] = value;
16395
+ } else {
16396
+ if (typeof value === "function") {
16397
+ _instructions[key] = [filter, value()];
16398
+ } else {
16399
+ _instructions[key] = [filter, value];
16400
+ }
16401
+ }
16402
+ return _instructions;
16403
+ }, {}));
16404
+ };
16405
+ }
16406
+ });
16407
+
16408
+ // node_modules/@aws-sdk/smithy-client/dist-cjs/resolve-path.js
16409
+ var require_resolve_path = __commonJS({
16410
+ "node_modules/@aws-sdk/smithy-client/dist-cjs/resolve-path.js"(exports) {
16411
+ "use strict";
16412
+ Object.defineProperty(exports, "__esModule", { value: true });
16413
+ exports.resolvedPath = void 0;
16414
+ var extended_encode_uri_component_1 = require_extended_encode_uri_component();
16415
+ var resolvedPath = (resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {
16416
+ if (input != null && input[memberName] !== void 0) {
16417
+ const labelValue = labelValueProvider();
16418
+ if (labelValue.length <= 0) {
16419
+ throw new Error("Empty value provided for input HTTP label: " + memberName + ".");
16420
+ }
16421
+ resolvedPath2 = resolvedPath2.replace(uriLabel, isGreedyLabel ? labelValue.split("/").map((segment) => (0, extended_encode_uri_component_1.extendedEncodeURIComponent)(segment)).join("/") : (0, extended_encode_uri_component_1.extendedEncodeURIComponent)(labelValue));
16422
+ } else {
16423
+ throw new Error("No value provided for input HTTP label: " + memberName + ".");
16424
+ }
16425
+ return resolvedPath2;
16426
+ };
16427
+ exports.resolvedPath = resolvedPath;
16428
+ }
16429
+ });
16430
+
16241
16431
  // node_modules/@aws-sdk/smithy-client/dist-cjs/ser-utils.js
16242
16432
  var require_ser_utils = __commonJS({
16243
16433
  "node_modules/@aws-sdk/smithy-client/dist-cjs/ser-utils.js"(exports) {
@@ -16307,6 +16497,7 @@ var require_dist_cjs3 = __commonJS({
16307
16497
  tslib_1.__exportStar(require_command(), exports);
16308
16498
  tslib_1.__exportStar(require_constants(), exports);
16309
16499
  tslib_1.__exportStar(require_date_utils(), exports);
16500
+ tslib_1.__exportStar(require_default_error_handler(), exports);
16310
16501
  tslib_1.__exportStar(require_defaults_mode(), exports);
16311
16502
  tslib_1.__exportStar(require_emitWarningIfUnsupportedVersion(), exports);
16312
16503
  tslib_1.__exportStar(require_exceptions(), exports);
@@ -16314,7 +16505,9 @@ var require_dist_cjs3 = __commonJS({
16314
16505
  tslib_1.__exportStar(require_get_array_if_single_item(), exports);
16315
16506
  tslib_1.__exportStar(require_get_value_from_text_node(), exports);
16316
16507
  tslib_1.__exportStar(require_lazy_json(), exports);
16508
+ tslib_1.__exportStar(require_object_mapping(), exports);
16317
16509
  tslib_1.__exportStar(require_parse_utils(), exports);
16510
+ tslib_1.__exportStar(require_resolve_path(), exports);
16318
16511
  tslib_1.__exportStar(require_ser_utils(), exports);
16319
16512
  tslib_1.__exportStar(require_split_every(), exports);
16320
16513
  }
@@ -16342,28 +16535,10 @@ var require_models_0 = __commonJS({
16342
16535
  "node_modules/@aws-sdk/client-secrets-manager/dist-cjs/models/models_0.js"(exports) {
16343
16536
  "use strict";
16344
16537
  Object.defineProperty(exports, "__esModule", { value: true });
16345
- exports.RestoreSecretRequest = exports.ReplicateSecretToRegionsResponse = exports.ReplicateSecretToRegionsRequest = exports.RemoveRegionsFromReplicationResponse = exports.RemoveRegionsFromReplicationRequest = exports.PutSecretValueResponse = exports.PutSecretValueRequest = exports.PutResourcePolicyResponse = exports.PutResourcePolicyRequest = exports.PublicPolicyException = exports.ListSecretVersionIdsResponse = exports.SecretVersionsListEntry = exports.ListSecretVersionIdsRequest = exports.ListSecretsResponse = exports.SecretListEntry = exports.ListSecretsRequest = exports.SortOrderType = exports.InvalidNextTokenException = exports.GetSecretValueResponse = exports.GetSecretValueRequest = exports.GetResourcePolicyResponse = exports.GetResourcePolicyRequest = exports.GetRandomPasswordResponse = exports.GetRandomPasswordRequest = exports.Filter = exports.DescribeSecretResponse = exports.RotationRulesType = exports.DescribeSecretRequest = exports.DeleteSecretResponse = exports.DeleteSecretRequest = exports.DeleteResourcePolicyResponse = exports.DeleteResourcePolicyRequest = exports.ResourceExistsException = exports.PreconditionNotMetException = exports.MalformedPolicyDocumentException = exports.LimitExceededException = exports.EncryptionFailure = exports.DecryptionFailure = exports.CreateSecretResponse = exports.ReplicationStatusType = exports.StatusType = exports.CreateSecretRequest = exports.Tag = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.InvalidParameterException = exports.InternalServiceError = exports.CancelRotateSecretResponse = exports.CancelRotateSecretRequest = exports.ReplicaRegionType = void 0;
16346
- exports.ValidateResourcePolicyResponse = exports.ValidationErrorsEntry = exports.ValidateResourcePolicyRequest = exports.UpdateSecretVersionStageResponse = exports.UpdateSecretVersionStageRequest = exports.UpdateSecretResponse = exports.UpdateSecretRequest = exports.UntagResourceRequest = exports.TagResourceRequest = exports.StopReplicationToReplicaResponse = exports.StopReplicationToReplicaRequest = exports.RotateSecretResponse = exports.RotateSecretRequest = exports.RestoreSecretResponse = void 0;
16538
+ exports.RestoreSecretRequestFilterSensitiveLog = exports.ReplicateSecretToRegionsResponseFilterSensitiveLog = exports.ReplicateSecretToRegionsRequestFilterSensitiveLog = exports.RemoveRegionsFromReplicationResponseFilterSensitiveLog = exports.RemoveRegionsFromReplicationRequestFilterSensitiveLog = exports.PutSecretValueResponseFilterSensitiveLog = exports.PutSecretValueRequestFilterSensitiveLog = exports.PutResourcePolicyResponseFilterSensitiveLog = exports.PutResourcePolicyRequestFilterSensitiveLog = exports.ListSecretVersionIdsResponseFilterSensitiveLog = exports.SecretVersionsListEntryFilterSensitiveLog = exports.ListSecretVersionIdsRequestFilterSensitiveLog = exports.ListSecretsResponseFilterSensitiveLog = exports.SecretListEntryFilterSensitiveLog = exports.ListSecretsRequestFilterSensitiveLog = exports.GetSecretValueResponseFilterSensitiveLog = exports.GetSecretValueRequestFilterSensitiveLog = exports.GetResourcePolicyResponseFilterSensitiveLog = exports.GetResourcePolicyRequestFilterSensitiveLog = exports.GetRandomPasswordResponseFilterSensitiveLog = exports.GetRandomPasswordRequestFilterSensitiveLog = exports.FilterFilterSensitiveLog = exports.DescribeSecretResponseFilterSensitiveLog = exports.RotationRulesTypeFilterSensitiveLog = exports.DescribeSecretRequestFilterSensitiveLog = exports.DeleteSecretResponseFilterSensitiveLog = exports.DeleteSecretRequestFilterSensitiveLog = exports.DeleteResourcePolicyResponseFilterSensitiveLog = exports.DeleteResourcePolicyRequestFilterSensitiveLog = exports.CreateSecretResponseFilterSensitiveLog = exports.ReplicationStatusTypeFilterSensitiveLog = exports.CreateSecretRequestFilterSensitiveLog = exports.TagFilterSensitiveLog = exports.CancelRotateSecretResponseFilterSensitiveLog = exports.CancelRotateSecretRequestFilterSensitiveLog = exports.ReplicaRegionTypeFilterSensitiveLog = exports.PublicPolicyException = exports.SortOrderType = exports.InvalidNextTokenException = exports.ResourceExistsException = exports.PreconditionNotMetException = exports.MalformedPolicyDocumentException = exports.LimitExceededException = exports.EncryptionFailure = exports.DecryptionFailure = exports.StatusType = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.InvalidParameterException = exports.InternalServiceError = void 0;
16539
+ exports.ValidateResourcePolicyResponseFilterSensitiveLog = exports.ValidationErrorsEntryFilterSensitiveLog = exports.ValidateResourcePolicyRequestFilterSensitiveLog = exports.UpdateSecretVersionStageResponseFilterSensitiveLog = exports.UpdateSecretVersionStageRequestFilterSensitiveLog = exports.UpdateSecretResponseFilterSensitiveLog = exports.UpdateSecretRequestFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.StopReplicationToReplicaResponseFilterSensitiveLog = exports.StopReplicationToReplicaRequestFilterSensitiveLog = exports.RotateSecretResponseFilterSensitiveLog = exports.RotateSecretRequestFilterSensitiveLog = exports.RestoreSecretResponseFilterSensitiveLog = void 0;
16347
16540
  var smithy_client_1 = require_dist_cjs3();
16348
16541
  var SecretsManagerServiceException_1 = require_SecretsManagerServiceException();
16349
- var ReplicaRegionType;
16350
- (function(ReplicaRegionType2) {
16351
- ReplicaRegionType2.filterSensitiveLog = (obj) => ({
16352
- ...obj
16353
- });
16354
- })(ReplicaRegionType = exports.ReplicaRegionType || (exports.ReplicaRegionType = {}));
16355
- var CancelRotateSecretRequest;
16356
- (function(CancelRotateSecretRequest2) {
16357
- CancelRotateSecretRequest2.filterSensitiveLog = (obj) => ({
16358
- ...obj
16359
- });
16360
- })(CancelRotateSecretRequest = exports.CancelRotateSecretRequest || (exports.CancelRotateSecretRequest = {}));
16361
- var CancelRotateSecretResponse;
16362
- (function(CancelRotateSecretResponse2) {
16363
- CancelRotateSecretResponse2.filterSensitiveLog = (obj) => ({
16364
- ...obj
16365
- });
16366
- })(CancelRotateSecretResponse = exports.CancelRotateSecretResponse || (exports.CancelRotateSecretResponse = {}));
16367
16542
  var InternalServiceError = class extends SecretsManagerServiceException_1.SecretsManagerServiceException {
16368
16543
  constructor(opts) {
16369
16544
  super({
@@ -16420,38 +16595,12 @@ var require_models_0 = __commonJS({
16420
16595
  }
16421
16596
  };
16422
16597
  exports.ResourceNotFoundException = ResourceNotFoundException;
16423
- var Tag;
16424
- (function(Tag2) {
16425
- Tag2.filterSensitiveLog = (obj) => ({
16426
- ...obj
16427
- });
16428
- })(Tag = exports.Tag || (exports.Tag = {}));
16429
- var CreateSecretRequest;
16430
- (function(CreateSecretRequest2) {
16431
- CreateSecretRequest2.filterSensitiveLog = (obj) => ({
16432
- ...obj,
16433
- ...obj.SecretBinary && { SecretBinary: smithy_client_1.SENSITIVE_STRING },
16434
- ...obj.SecretString && { SecretString: smithy_client_1.SENSITIVE_STRING }
16435
- });
16436
- })(CreateSecretRequest = exports.CreateSecretRequest || (exports.CreateSecretRequest = {}));
16437
16598
  var StatusType;
16438
16599
  (function(StatusType2) {
16439
16600
  StatusType2["Failed"] = "Failed";
16440
16601
  StatusType2["InProgress"] = "InProgress";
16441
16602
  StatusType2["InSync"] = "InSync";
16442
16603
  })(StatusType = exports.StatusType || (exports.StatusType = {}));
16443
- var ReplicationStatusType;
16444
- (function(ReplicationStatusType2) {
16445
- ReplicationStatusType2.filterSensitiveLog = (obj) => ({
16446
- ...obj
16447
- });
16448
- })(ReplicationStatusType = exports.ReplicationStatusType || (exports.ReplicationStatusType = {}));
16449
- var CreateSecretResponse;
16450
- (function(CreateSecretResponse2) {
16451
- CreateSecretResponse2.filterSensitiveLog = (obj) => ({
16452
- ...obj
16453
- });
16454
- })(CreateSecretResponse = exports.CreateSecretResponse || (exports.CreateSecretResponse = {}));
16455
16604
  var DecryptionFailure = class extends SecretsManagerServiceException_1.SecretsManagerServiceException {
16456
16605
  constructor(opts) {
16457
16606
  super({
@@ -16536,93 +16685,6 @@ var require_models_0 = __commonJS({
16536
16685
  }
16537
16686
  };
16538
16687
  exports.ResourceExistsException = ResourceExistsException;
16539
- var DeleteResourcePolicyRequest;
16540
- (function(DeleteResourcePolicyRequest2) {
16541
- DeleteResourcePolicyRequest2.filterSensitiveLog = (obj) => ({
16542
- ...obj
16543
- });
16544
- })(DeleteResourcePolicyRequest = exports.DeleteResourcePolicyRequest || (exports.DeleteResourcePolicyRequest = {}));
16545
- var DeleteResourcePolicyResponse;
16546
- (function(DeleteResourcePolicyResponse2) {
16547
- DeleteResourcePolicyResponse2.filterSensitiveLog = (obj) => ({
16548
- ...obj
16549
- });
16550
- })(DeleteResourcePolicyResponse = exports.DeleteResourcePolicyResponse || (exports.DeleteResourcePolicyResponse = {}));
16551
- var DeleteSecretRequest;
16552
- (function(DeleteSecretRequest2) {
16553
- DeleteSecretRequest2.filterSensitiveLog = (obj) => ({
16554
- ...obj
16555
- });
16556
- })(DeleteSecretRequest = exports.DeleteSecretRequest || (exports.DeleteSecretRequest = {}));
16557
- var DeleteSecretResponse;
16558
- (function(DeleteSecretResponse2) {
16559
- DeleteSecretResponse2.filterSensitiveLog = (obj) => ({
16560
- ...obj
16561
- });
16562
- })(DeleteSecretResponse = exports.DeleteSecretResponse || (exports.DeleteSecretResponse = {}));
16563
- var DescribeSecretRequest;
16564
- (function(DescribeSecretRequest2) {
16565
- DescribeSecretRequest2.filterSensitiveLog = (obj) => ({
16566
- ...obj
16567
- });
16568
- })(DescribeSecretRequest = exports.DescribeSecretRequest || (exports.DescribeSecretRequest = {}));
16569
- var RotationRulesType;
16570
- (function(RotationRulesType2) {
16571
- RotationRulesType2.filterSensitiveLog = (obj) => ({
16572
- ...obj
16573
- });
16574
- })(RotationRulesType = exports.RotationRulesType || (exports.RotationRulesType = {}));
16575
- var DescribeSecretResponse;
16576
- (function(DescribeSecretResponse2) {
16577
- DescribeSecretResponse2.filterSensitiveLog = (obj) => ({
16578
- ...obj
16579
- });
16580
- })(DescribeSecretResponse = exports.DescribeSecretResponse || (exports.DescribeSecretResponse = {}));
16581
- var Filter;
16582
- (function(Filter2) {
16583
- Filter2.filterSensitiveLog = (obj) => ({
16584
- ...obj
16585
- });
16586
- })(Filter = exports.Filter || (exports.Filter = {}));
16587
- var GetRandomPasswordRequest;
16588
- (function(GetRandomPasswordRequest2) {
16589
- GetRandomPasswordRequest2.filterSensitiveLog = (obj) => ({
16590
- ...obj
16591
- });
16592
- })(GetRandomPasswordRequest = exports.GetRandomPasswordRequest || (exports.GetRandomPasswordRequest = {}));
16593
- var GetRandomPasswordResponse;
16594
- (function(GetRandomPasswordResponse2) {
16595
- GetRandomPasswordResponse2.filterSensitiveLog = (obj) => ({
16596
- ...obj,
16597
- ...obj.RandomPassword && { RandomPassword: smithy_client_1.SENSITIVE_STRING }
16598
- });
16599
- })(GetRandomPasswordResponse = exports.GetRandomPasswordResponse || (exports.GetRandomPasswordResponse = {}));
16600
- var GetResourcePolicyRequest;
16601
- (function(GetResourcePolicyRequest2) {
16602
- GetResourcePolicyRequest2.filterSensitiveLog = (obj) => ({
16603
- ...obj
16604
- });
16605
- })(GetResourcePolicyRequest = exports.GetResourcePolicyRequest || (exports.GetResourcePolicyRequest = {}));
16606
- var GetResourcePolicyResponse;
16607
- (function(GetResourcePolicyResponse2) {
16608
- GetResourcePolicyResponse2.filterSensitiveLog = (obj) => ({
16609
- ...obj
16610
- });
16611
- })(GetResourcePolicyResponse = exports.GetResourcePolicyResponse || (exports.GetResourcePolicyResponse = {}));
16612
- var GetSecretValueRequest;
16613
- (function(GetSecretValueRequest2) {
16614
- GetSecretValueRequest2.filterSensitiveLog = (obj) => ({
16615
- ...obj
16616
- });
16617
- })(GetSecretValueRequest = exports.GetSecretValueRequest || (exports.GetSecretValueRequest = {}));
16618
- var GetSecretValueResponse;
16619
- (function(GetSecretValueResponse2) {
16620
- GetSecretValueResponse2.filterSensitiveLog = (obj) => ({
16621
- ...obj,
16622
- ...obj.SecretBinary && { SecretBinary: smithy_client_1.SENSITIVE_STRING },
16623
- ...obj.SecretString && { SecretString: smithy_client_1.SENSITIVE_STRING }
16624
- });
16625
- })(GetSecretValueResponse = exports.GetSecretValueResponse || (exports.GetSecretValueResponse = {}));
16626
16688
  var InvalidNextTokenException = class extends SecretsManagerServiceException_1.SecretsManagerServiceException {
16627
16689
  constructor(opts) {
16628
16690
  super({
@@ -16642,42 +16704,6 @@ var require_models_0 = __commonJS({
16642
16704
  SortOrderType2["asc"] = "asc";
16643
16705
  SortOrderType2["desc"] = "desc";
16644
16706
  })(SortOrderType = exports.SortOrderType || (exports.SortOrderType = {}));
16645
- var ListSecretsRequest;
16646
- (function(ListSecretsRequest2) {
16647
- ListSecretsRequest2.filterSensitiveLog = (obj) => ({
16648
- ...obj
16649
- });
16650
- })(ListSecretsRequest = exports.ListSecretsRequest || (exports.ListSecretsRequest = {}));
16651
- var SecretListEntry;
16652
- (function(SecretListEntry2) {
16653
- SecretListEntry2.filterSensitiveLog = (obj) => ({
16654
- ...obj
16655
- });
16656
- })(SecretListEntry = exports.SecretListEntry || (exports.SecretListEntry = {}));
16657
- var ListSecretsResponse;
16658
- (function(ListSecretsResponse2) {
16659
- ListSecretsResponse2.filterSensitiveLog = (obj) => ({
16660
- ...obj
16661
- });
16662
- })(ListSecretsResponse = exports.ListSecretsResponse || (exports.ListSecretsResponse = {}));
16663
- var ListSecretVersionIdsRequest;
16664
- (function(ListSecretVersionIdsRequest2) {
16665
- ListSecretVersionIdsRequest2.filterSensitiveLog = (obj) => ({
16666
- ...obj
16667
- });
16668
- })(ListSecretVersionIdsRequest = exports.ListSecretVersionIdsRequest || (exports.ListSecretVersionIdsRequest = {}));
16669
- var SecretVersionsListEntry;
16670
- (function(SecretVersionsListEntry2) {
16671
- SecretVersionsListEntry2.filterSensitiveLog = (obj) => ({
16672
- ...obj
16673
- });
16674
- })(SecretVersionsListEntry = exports.SecretVersionsListEntry || (exports.SecretVersionsListEntry = {}));
16675
- var ListSecretVersionIdsResponse;
16676
- (function(ListSecretVersionIdsResponse2) {
16677
- ListSecretVersionIdsResponse2.filterSensitiveLog = (obj) => ({
16678
- ...obj
16679
- });
16680
- })(ListSecretVersionIdsResponse = exports.ListSecretVersionIdsResponse || (exports.ListSecretVersionIdsResponse = {}));
16681
16707
  var PublicPolicyException = class extends SecretsManagerServiceException_1.SecretsManagerServiceException {
16682
16708
  constructor(opts) {
16683
16709
  super({
@@ -16692,148 +16718,215 @@ var require_models_0 = __commonJS({
16692
16718
  }
16693
16719
  };
16694
16720
  exports.PublicPolicyException = PublicPolicyException;
16695
- var PutResourcePolicyRequest;
16696
- (function(PutResourcePolicyRequest2) {
16697
- PutResourcePolicyRequest2.filterSensitiveLog = (obj) => ({
16698
- ...obj
16699
- });
16700
- })(PutResourcePolicyRequest = exports.PutResourcePolicyRequest || (exports.PutResourcePolicyRequest = {}));
16701
- var PutResourcePolicyResponse;
16702
- (function(PutResourcePolicyResponse2) {
16703
- PutResourcePolicyResponse2.filterSensitiveLog = (obj) => ({
16704
- ...obj
16705
- });
16706
- })(PutResourcePolicyResponse = exports.PutResourcePolicyResponse || (exports.PutResourcePolicyResponse = {}));
16707
- var PutSecretValueRequest;
16708
- (function(PutSecretValueRequest2) {
16709
- PutSecretValueRequest2.filterSensitiveLog = (obj) => ({
16710
- ...obj,
16711
- ...obj.SecretBinary && { SecretBinary: smithy_client_1.SENSITIVE_STRING },
16712
- ...obj.SecretString && { SecretString: smithy_client_1.SENSITIVE_STRING }
16713
- });
16714
- })(PutSecretValueRequest = exports.PutSecretValueRequest || (exports.PutSecretValueRequest = {}));
16715
- var PutSecretValueResponse;
16716
- (function(PutSecretValueResponse2) {
16717
- PutSecretValueResponse2.filterSensitiveLog = (obj) => ({
16718
- ...obj
16719
- });
16720
- })(PutSecretValueResponse = exports.PutSecretValueResponse || (exports.PutSecretValueResponse = {}));
16721
- var RemoveRegionsFromReplicationRequest;
16722
- (function(RemoveRegionsFromReplicationRequest2) {
16723
- RemoveRegionsFromReplicationRequest2.filterSensitiveLog = (obj) => ({
16724
- ...obj
16725
- });
16726
- })(RemoveRegionsFromReplicationRequest = exports.RemoveRegionsFromReplicationRequest || (exports.RemoveRegionsFromReplicationRequest = {}));
16727
- var RemoveRegionsFromReplicationResponse;
16728
- (function(RemoveRegionsFromReplicationResponse2) {
16729
- RemoveRegionsFromReplicationResponse2.filterSensitiveLog = (obj) => ({
16730
- ...obj
16731
- });
16732
- })(RemoveRegionsFromReplicationResponse = exports.RemoveRegionsFromReplicationResponse || (exports.RemoveRegionsFromReplicationResponse = {}));
16733
- var ReplicateSecretToRegionsRequest;
16734
- (function(ReplicateSecretToRegionsRequest2) {
16735
- ReplicateSecretToRegionsRequest2.filterSensitiveLog = (obj) => ({
16736
- ...obj
16737
- });
16738
- })(ReplicateSecretToRegionsRequest = exports.ReplicateSecretToRegionsRequest || (exports.ReplicateSecretToRegionsRequest = {}));
16739
- var ReplicateSecretToRegionsResponse;
16740
- (function(ReplicateSecretToRegionsResponse2) {
16741
- ReplicateSecretToRegionsResponse2.filterSensitiveLog = (obj) => ({
16742
- ...obj
16743
- });
16744
- })(ReplicateSecretToRegionsResponse = exports.ReplicateSecretToRegionsResponse || (exports.ReplicateSecretToRegionsResponse = {}));
16745
- var RestoreSecretRequest;
16746
- (function(RestoreSecretRequest2) {
16747
- RestoreSecretRequest2.filterSensitiveLog = (obj) => ({
16748
- ...obj
16749
- });
16750
- })(RestoreSecretRequest = exports.RestoreSecretRequest || (exports.RestoreSecretRequest = {}));
16751
- var RestoreSecretResponse;
16752
- (function(RestoreSecretResponse2) {
16753
- RestoreSecretResponse2.filterSensitiveLog = (obj) => ({
16754
- ...obj
16755
- });
16756
- })(RestoreSecretResponse = exports.RestoreSecretResponse || (exports.RestoreSecretResponse = {}));
16757
- var RotateSecretRequest;
16758
- (function(RotateSecretRequest2) {
16759
- RotateSecretRequest2.filterSensitiveLog = (obj) => ({
16760
- ...obj
16761
- });
16762
- })(RotateSecretRequest = exports.RotateSecretRequest || (exports.RotateSecretRequest = {}));
16763
- var RotateSecretResponse;
16764
- (function(RotateSecretResponse2) {
16765
- RotateSecretResponse2.filterSensitiveLog = (obj) => ({
16766
- ...obj
16767
- });
16768
- })(RotateSecretResponse = exports.RotateSecretResponse || (exports.RotateSecretResponse = {}));
16769
- var StopReplicationToReplicaRequest;
16770
- (function(StopReplicationToReplicaRequest2) {
16771
- StopReplicationToReplicaRequest2.filterSensitiveLog = (obj) => ({
16772
- ...obj
16773
- });
16774
- })(StopReplicationToReplicaRequest = exports.StopReplicationToReplicaRequest || (exports.StopReplicationToReplicaRequest = {}));
16775
- var StopReplicationToReplicaResponse;
16776
- (function(StopReplicationToReplicaResponse2) {
16777
- StopReplicationToReplicaResponse2.filterSensitiveLog = (obj) => ({
16778
- ...obj
16779
- });
16780
- })(StopReplicationToReplicaResponse = exports.StopReplicationToReplicaResponse || (exports.StopReplicationToReplicaResponse = {}));
16781
- var TagResourceRequest;
16782
- (function(TagResourceRequest2) {
16783
- TagResourceRequest2.filterSensitiveLog = (obj) => ({
16784
- ...obj
16785
- });
16786
- })(TagResourceRequest = exports.TagResourceRequest || (exports.TagResourceRequest = {}));
16787
- var UntagResourceRequest;
16788
- (function(UntagResourceRequest2) {
16789
- UntagResourceRequest2.filterSensitiveLog = (obj) => ({
16790
- ...obj
16791
- });
16792
- })(UntagResourceRequest = exports.UntagResourceRequest || (exports.UntagResourceRequest = {}));
16793
- var UpdateSecretRequest;
16794
- (function(UpdateSecretRequest2) {
16795
- UpdateSecretRequest2.filterSensitiveLog = (obj) => ({
16796
- ...obj,
16797
- ...obj.SecretBinary && { SecretBinary: smithy_client_1.SENSITIVE_STRING },
16798
- ...obj.SecretString && { SecretString: smithy_client_1.SENSITIVE_STRING }
16799
- });
16800
- })(UpdateSecretRequest = exports.UpdateSecretRequest || (exports.UpdateSecretRequest = {}));
16801
- var UpdateSecretResponse;
16802
- (function(UpdateSecretResponse2) {
16803
- UpdateSecretResponse2.filterSensitiveLog = (obj) => ({
16804
- ...obj
16805
- });
16806
- })(UpdateSecretResponse = exports.UpdateSecretResponse || (exports.UpdateSecretResponse = {}));
16807
- var UpdateSecretVersionStageRequest;
16808
- (function(UpdateSecretVersionStageRequest2) {
16809
- UpdateSecretVersionStageRequest2.filterSensitiveLog = (obj) => ({
16810
- ...obj
16811
- });
16812
- })(UpdateSecretVersionStageRequest = exports.UpdateSecretVersionStageRequest || (exports.UpdateSecretVersionStageRequest = {}));
16813
- var UpdateSecretVersionStageResponse;
16814
- (function(UpdateSecretVersionStageResponse2) {
16815
- UpdateSecretVersionStageResponse2.filterSensitiveLog = (obj) => ({
16816
- ...obj
16817
- });
16818
- })(UpdateSecretVersionStageResponse = exports.UpdateSecretVersionStageResponse || (exports.UpdateSecretVersionStageResponse = {}));
16819
- var ValidateResourcePolicyRequest;
16820
- (function(ValidateResourcePolicyRequest2) {
16821
- ValidateResourcePolicyRequest2.filterSensitiveLog = (obj) => ({
16822
- ...obj
16823
- });
16824
- })(ValidateResourcePolicyRequest = exports.ValidateResourcePolicyRequest || (exports.ValidateResourcePolicyRequest = {}));
16825
- var ValidationErrorsEntry;
16826
- (function(ValidationErrorsEntry2) {
16827
- ValidationErrorsEntry2.filterSensitiveLog = (obj) => ({
16828
- ...obj
16829
- });
16830
- })(ValidationErrorsEntry = exports.ValidationErrorsEntry || (exports.ValidationErrorsEntry = {}));
16831
- var ValidateResourcePolicyResponse;
16832
- (function(ValidateResourcePolicyResponse2) {
16833
- ValidateResourcePolicyResponse2.filterSensitiveLog = (obj) => ({
16834
- ...obj
16835
- });
16836
- })(ValidateResourcePolicyResponse = exports.ValidateResourcePolicyResponse || (exports.ValidateResourcePolicyResponse = {}));
16721
+ var ReplicaRegionTypeFilterSensitiveLog = (obj) => ({
16722
+ ...obj
16723
+ });
16724
+ exports.ReplicaRegionTypeFilterSensitiveLog = ReplicaRegionTypeFilterSensitiveLog;
16725
+ var CancelRotateSecretRequestFilterSensitiveLog = (obj) => ({
16726
+ ...obj
16727
+ });
16728
+ exports.CancelRotateSecretRequestFilterSensitiveLog = CancelRotateSecretRequestFilterSensitiveLog;
16729
+ var CancelRotateSecretResponseFilterSensitiveLog = (obj) => ({
16730
+ ...obj
16731
+ });
16732
+ exports.CancelRotateSecretResponseFilterSensitiveLog = CancelRotateSecretResponseFilterSensitiveLog;
16733
+ var TagFilterSensitiveLog = (obj) => ({
16734
+ ...obj
16735
+ });
16736
+ exports.TagFilterSensitiveLog = TagFilterSensitiveLog;
16737
+ var CreateSecretRequestFilterSensitiveLog = (obj) => ({
16738
+ ...obj,
16739
+ ...obj.SecretBinary && { SecretBinary: smithy_client_1.SENSITIVE_STRING },
16740
+ ...obj.SecretString && { SecretString: smithy_client_1.SENSITIVE_STRING }
16741
+ });
16742
+ exports.CreateSecretRequestFilterSensitiveLog = CreateSecretRequestFilterSensitiveLog;
16743
+ var ReplicationStatusTypeFilterSensitiveLog = (obj) => ({
16744
+ ...obj
16745
+ });
16746
+ exports.ReplicationStatusTypeFilterSensitiveLog = ReplicationStatusTypeFilterSensitiveLog;
16747
+ var CreateSecretResponseFilterSensitiveLog = (obj) => ({
16748
+ ...obj
16749
+ });
16750
+ exports.CreateSecretResponseFilterSensitiveLog = CreateSecretResponseFilterSensitiveLog;
16751
+ var DeleteResourcePolicyRequestFilterSensitiveLog = (obj) => ({
16752
+ ...obj
16753
+ });
16754
+ exports.DeleteResourcePolicyRequestFilterSensitiveLog = DeleteResourcePolicyRequestFilterSensitiveLog;
16755
+ var DeleteResourcePolicyResponseFilterSensitiveLog = (obj) => ({
16756
+ ...obj
16757
+ });
16758
+ exports.DeleteResourcePolicyResponseFilterSensitiveLog = DeleteResourcePolicyResponseFilterSensitiveLog;
16759
+ var DeleteSecretRequestFilterSensitiveLog = (obj) => ({
16760
+ ...obj
16761
+ });
16762
+ exports.DeleteSecretRequestFilterSensitiveLog = DeleteSecretRequestFilterSensitiveLog;
16763
+ var DeleteSecretResponseFilterSensitiveLog = (obj) => ({
16764
+ ...obj
16765
+ });
16766
+ exports.DeleteSecretResponseFilterSensitiveLog = DeleteSecretResponseFilterSensitiveLog;
16767
+ var DescribeSecretRequestFilterSensitiveLog = (obj) => ({
16768
+ ...obj
16769
+ });
16770
+ exports.DescribeSecretRequestFilterSensitiveLog = DescribeSecretRequestFilterSensitiveLog;
16771
+ var RotationRulesTypeFilterSensitiveLog = (obj) => ({
16772
+ ...obj
16773
+ });
16774
+ exports.RotationRulesTypeFilterSensitiveLog = RotationRulesTypeFilterSensitiveLog;
16775
+ var DescribeSecretResponseFilterSensitiveLog = (obj) => ({
16776
+ ...obj
16777
+ });
16778
+ exports.DescribeSecretResponseFilterSensitiveLog = DescribeSecretResponseFilterSensitiveLog;
16779
+ var FilterFilterSensitiveLog = (obj) => ({
16780
+ ...obj
16781
+ });
16782
+ exports.FilterFilterSensitiveLog = FilterFilterSensitiveLog;
16783
+ var GetRandomPasswordRequestFilterSensitiveLog = (obj) => ({
16784
+ ...obj
16785
+ });
16786
+ exports.GetRandomPasswordRequestFilterSensitiveLog = GetRandomPasswordRequestFilterSensitiveLog;
16787
+ var GetRandomPasswordResponseFilterSensitiveLog = (obj) => ({
16788
+ ...obj,
16789
+ ...obj.RandomPassword && { RandomPassword: smithy_client_1.SENSITIVE_STRING }
16790
+ });
16791
+ exports.GetRandomPasswordResponseFilterSensitiveLog = GetRandomPasswordResponseFilterSensitiveLog;
16792
+ var GetResourcePolicyRequestFilterSensitiveLog = (obj) => ({
16793
+ ...obj
16794
+ });
16795
+ exports.GetResourcePolicyRequestFilterSensitiveLog = GetResourcePolicyRequestFilterSensitiveLog;
16796
+ var GetResourcePolicyResponseFilterSensitiveLog = (obj) => ({
16797
+ ...obj
16798
+ });
16799
+ exports.GetResourcePolicyResponseFilterSensitiveLog = GetResourcePolicyResponseFilterSensitiveLog;
16800
+ var GetSecretValueRequestFilterSensitiveLog = (obj) => ({
16801
+ ...obj
16802
+ });
16803
+ exports.GetSecretValueRequestFilterSensitiveLog = GetSecretValueRequestFilterSensitiveLog;
16804
+ var GetSecretValueResponseFilterSensitiveLog = (obj) => ({
16805
+ ...obj,
16806
+ ...obj.SecretBinary && { SecretBinary: smithy_client_1.SENSITIVE_STRING },
16807
+ ...obj.SecretString && { SecretString: smithy_client_1.SENSITIVE_STRING }
16808
+ });
16809
+ exports.GetSecretValueResponseFilterSensitiveLog = GetSecretValueResponseFilterSensitiveLog;
16810
+ var ListSecretsRequestFilterSensitiveLog = (obj) => ({
16811
+ ...obj
16812
+ });
16813
+ exports.ListSecretsRequestFilterSensitiveLog = ListSecretsRequestFilterSensitiveLog;
16814
+ var SecretListEntryFilterSensitiveLog = (obj) => ({
16815
+ ...obj
16816
+ });
16817
+ exports.SecretListEntryFilterSensitiveLog = SecretListEntryFilterSensitiveLog;
16818
+ var ListSecretsResponseFilterSensitiveLog = (obj) => ({
16819
+ ...obj
16820
+ });
16821
+ exports.ListSecretsResponseFilterSensitiveLog = ListSecretsResponseFilterSensitiveLog;
16822
+ var ListSecretVersionIdsRequestFilterSensitiveLog = (obj) => ({
16823
+ ...obj
16824
+ });
16825
+ exports.ListSecretVersionIdsRequestFilterSensitiveLog = ListSecretVersionIdsRequestFilterSensitiveLog;
16826
+ var SecretVersionsListEntryFilterSensitiveLog = (obj) => ({
16827
+ ...obj
16828
+ });
16829
+ exports.SecretVersionsListEntryFilterSensitiveLog = SecretVersionsListEntryFilterSensitiveLog;
16830
+ var ListSecretVersionIdsResponseFilterSensitiveLog = (obj) => ({
16831
+ ...obj
16832
+ });
16833
+ exports.ListSecretVersionIdsResponseFilterSensitiveLog = ListSecretVersionIdsResponseFilterSensitiveLog;
16834
+ var PutResourcePolicyRequestFilterSensitiveLog = (obj) => ({
16835
+ ...obj
16836
+ });
16837
+ exports.PutResourcePolicyRequestFilterSensitiveLog = PutResourcePolicyRequestFilterSensitiveLog;
16838
+ var PutResourcePolicyResponseFilterSensitiveLog = (obj) => ({
16839
+ ...obj
16840
+ });
16841
+ exports.PutResourcePolicyResponseFilterSensitiveLog = PutResourcePolicyResponseFilterSensitiveLog;
16842
+ var PutSecretValueRequestFilterSensitiveLog = (obj) => ({
16843
+ ...obj,
16844
+ ...obj.SecretBinary && { SecretBinary: smithy_client_1.SENSITIVE_STRING },
16845
+ ...obj.SecretString && { SecretString: smithy_client_1.SENSITIVE_STRING }
16846
+ });
16847
+ exports.PutSecretValueRequestFilterSensitiveLog = PutSecretValueRequestFilterSensitiveLog;
16848
+ var PutSecretValueResponseFilterSensitiveLog = (obj) => ({
16849
+ ...obj
16850
+ });
16851
+ exports.PutSecretValueResponseFilterSensitiveLog = PutSecretValueResponseFilterSensitiveLog;
16852
+ var RemoveRegionsFromReplicationRequestFilterSensitiveLog = (obj) => ({
16853
+ ...obj
16854
+ });
16855
+ exports.RemoveRegionsFromReplicationRequestFilterSensitiveLog = RemoveRegionsFromReplicationRequestFilterSensitiveLog;
16856
+ var RemoveRegionsFromReplicationResponseFilterSensitiveLog = (obj) => ({
16857
+ ...obj
16858
+ });
16859
+ exports.RemoveRegionsFromReplicationResponseFilterSensitiveLog = RemoveRegionsFromReplicationResponseFilterSensitiveLog;
16860
+ var ReplicateSecretToRegionsRequestFilterSensitiveLog = (obj) => ({
16861
+ ...obj
16862
+ });
16863
+ exports.ReplicateSecretToRegionsRequestFilterSensitiveLog = ReplicateSecretToRegionsRequestFilterSensitiveLog;
16864
+ var ReplicateSecretToRegionsResponseFilterSensitiveLog = (obj) => ({
16865
+ ...obj
16866
+ });
16867
+ exports.ReplicateSecretToRegionsResponseFilterSensitiveLog = ReplicateSecretToRegionsResponseFilterSensitiveLog;
16868
+ var RestoreSecretRequestFilterSensitiveLog = (obj) => ({
16869
+ ...obj
16870
+ });
16871
+ exports.RestoreSecretRequestFilterSensitiveLog = RestoreSecretRequestFilterSensitiveLog;
16872
+ var RestoreSecretResponseFilterSensitiveLog = (obj) => ({
16873
+ ...obj
16874
+ });
16875
+ exports.RestoreSecretResponseFilterSensitiveLog = RestoreSecretResponseFilterSensitiveLog;
16876
+ var RotateSecretRequestFilterSensitiveLog = (obj) => ({
16877
+ ...obj
16878
+ });
16879
+ exports.RotateSecretRequestFilterSensitiveLog = RotateSecretRequestFilterSensitiveLog;
16880
+ var RotateSecretResponseFilterSensitiveLog = (obj) => ({
16881
+ ...obj
16882
+ });
16883
+ exports.RotateSecretResponseFilterSensitiveLog = RotateSecretResponseFilterSensitiveLog;
16884
+ var StopReplicationToReplicaRequestFilterSensitiveLog = (obj) => ({
16885
+ ...obj
16886
+ });
16887
+ exports.StopReplicationToReplicaRequestFilterSensitiveLog = StopReplicationToReplicaRequestFilterSensitiveLog;
16888
+ var StopReplicationToReplicaResponseFilterSensitiveLog = (obj) => ({
16889
+ ...obj
16890
+ });
16891
+ exports.StopReplicationToReplicaResponseFilterSensitiveLog = StopReplicationToReplicaResponseFilterSensitiveLog;
16892
+ var TagResourceRequestFilterSensitiveLog = (obj) => ({
16893
+ ...obj
16894
+ });
16895
+ exports.TagResourceRequestFilterSensitiveLog = TagResourceRequestFilterSensitiveLog;
16896
+ var UntagResourceRequestFilterSensitiveLog = (obj) => ({
16897
+ ...obj
16898
+ });
16899
+ exports.UntagResourceRequestFilterSensitiveLog = UntagResourceRequestFilterSensitiveLog;
16900
+ var UpdateSecretRequestFilterSensitiveLog = (obj) => ({
16901
+ ...obj,
16902
+ ...obj.SecretBinary && { SecretBinary: smithy_client_1.SENSITIVE_STRING },
16903
+ ...obj.SecretString && { SecretString: smithy_client_1.SENSITIVE_STRING }
16904
+ });
16905
+ exports.UpdateSecretRequestFilterSensitiveLog = UpdateSecretRequestFilterSensitiveLog;
16906
+ var UpdateSecretResponseFilterSensitiveLog = (obj) => ({
16907
+ ...obj
16908
+ });
16909
+ exports.UpdateSecretResponseFilterSensitiveLog = UpdateSecretResponseFilterSensitiveLog;
16910
+ var UpdateSecretVersionStageRequestFilterSensitiveLog = (obj) => ({
16911
+ ...obj
16912
+ });
16913
+ exports.UpdateSecretVersionStageRequestFilterSensitiveLog = UpdateSecretVersionStageRequestFilterSensitiveLog;
16914
+ var UpdateSecretVersionStageResponseFilterSensitiveLog = (obj) => ({
16915
+ ...obj
16916
+ });
16917
+ exports.UpdateSecretVersionStageResponseFilterSensitiveLog = UpdateSecretVersionStageResponseFilterSensitiveLog;
16918
+ var ValidateResourcePolicyRequestFilterSensitiveLog = (obj) => ({
16919
+ ...obj
16920
+ });
16921
+ exports.ValidateResourcePolicyRequestFilterSensitiveLog = ValidateResourcePolicyRequestFilterSensitiveLog;
16922
+ var ValidationErrorsEntryFilterSensitiveLog = (obj) => ({
16923
+ ...obj
16924
+ });
16925
+ exports.ValidationErrorsEntryFilterSensitiveLog = ValidationErrorsEntryFilterSensitiveLog;
16926
+ var ValidateResourcePolicyResponseFilterSensitiveLog = (obj) => ({
16927
+ ...obj
16928
+ });
16929
+ exports.ValidateResourcePolicyResponseFilterSensitiveLog = ValidateResourcePolicyResponseFilterSensitiveLog;
16837
16930
  }
16838
16931
  });
16839
16932
 
@@ -17682,7 +17775,6 @@ var require_Aws_json1_1 = __commonJS({
17682
17775
  ...output,
17683
17776
  body: await parseBody(output.body, context)
17684
17777
  };
17685
- let response;
17686
17778
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17687
17779
  switch (errorCode) {
17688
17780
  case "InternalServiceError":
@@ -17699,14 +17791,12 @@ var require_Aws_json1_1 = __commonJS({
17699
17791
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
17700
17792
  default:
17701
17793
  const parsedBody = parsedOutput.body;
17702
- const $metadata = deserializeMetadata(output);
17703
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
17704
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
17705
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
17706
- $fault: "client",
17707
- $metadata
17794
+ (0, smithy_client_1.throwDefaultError)({
17795
+ output,
17796
+ parsedBody,
17797
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
17798
+ errorCode
17708
17799
  });
17709
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
17710
17800
  }
17711
17801
  };
17712
17802
  var deserializeAws_json1_1CreateSecretCommand = async (output, context) => {
@@ -17728,7 +17818,6 @@ var require_Aws_json1_1 = __commonJS({
17728
17818
  ...output,
17729
17819
  body: await parseBody(output.body, context)
17730
17820
  };
17731
- let response;
17732
17821
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17733
17822
  switch (errorCode) {
17734
17823
  case "DecryptionFailure":
@@ -17763,14 +17852,12 @@ var require_Aws_json1_1 = __commonJS({
17763
17852
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
17764
17853
  default:
17765
17854
  const parsedBody = parsedOutput.body;
17766
- const $metadata = deserializeMetadata(output);
17767
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
17768
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
17769
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
17770
- $fault: "client",
17771
- $metadata
17855
+ (0, smithy_client_1.throwDefaultError)({
17856
+ output,
17857
+ parsedBody,
17858
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
17859
+ errorCode
17772
17860
  });
17773
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
17774
17861
  }
17775
17862
  };
17776
17863
  var deserializeAws_json1_1DeleteResourcePolicyCommand = async (output, context) => {
@@ -17792,7 +17879,6 @@ var require_Aws_json1_1 = __commonJS({
17792
17879
  ...output,
17793
17880
  body: await parseBody(output.body, context)
17794
17881
  };
17795
- let response;
17796
17882
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17797
17883
  switch (errorCode) {
17798
17884
  case "InternalServiceError":
@@ -17809,14 +17895,12 @@ var require_Aws_json1_1 = __commonJS({
17809
17895
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
17810
17896
  default:
17811
17897
  const parsedBody = parsedOutput.body;
17812
- const $metadata = deserializeMetadata(output);
17813
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
17814
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
17815
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
17816
- $fault: "client",
17817
- $metadata
17898
+ (0, smithy_client_1.throwDefaultError)({
17899
+ output,
17900
+ parsedBody,
17901
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
17902
+ errorCode
17818
17903
  });
17819
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
17820
17904
  }
17821
17905
  };
17822
17906
  var deserializeAws_json1_1DeleteSecretCommand = async (output, context) => {
@@ -17838,7 +17922,6 @@ var require_Aws_json1_1 = __commonJS({
17838
17922
  ...output,
17839
17923
  body: await parseBody(output.body, context)
17840
17924
  };
17841
- let response;
17842
17925
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17843
17926
  switch (errorCode) {
17844
17927
  case "InternalServiceError":
@@ -17855,14 +17938,12 @@ var require_Aws_json1_1 = __commonJS({
17855
17938
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
17856
17939
  default:
17857
17940
  const parsedBody = parsedOutput.body;
17858
- const $metadata = deserializeMetadata(output);
17859
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
17860
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
17861
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
17862
- $fault: "client",
17863
- $metadata
17941
+ (0, smithy_client_1.throwDefaultError)({
17942
+ output,
17943
+ parsedBody,
17944
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
17945
+ errorCode
17864
17946
  });
17865
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
17866
17947
  }
17867
17948
  };
17868
17949
  var deserializeAws_json1_1DescribeSecretCommand = async (output, context) => {
@@ -17884,7 +17965,6 @@ var require_Aws_json1_1 = __commonJS({
17884
17965
  ...output,
17885
17966
  body: await parseBody(output.body, context)
17886
17967
  };
17887
- let response;
17888
17968
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17889
17969
  switch (errorCode) {
17890
17970
  case "InternalServiceError":
@@ -17898,14 +17978,12 @@ var require_Aws_json1_1 = __commonJS({
17898
17978
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
17899
17979
  default:
17900
17980
  const parsedBody = parsedOutput.body;
17901
- const $metadata = deserializeMetadata(output);
17902
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
17903
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
17904
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
17905
- $fault: "client",
17906
- $metadata
17981
+ (0, smithy_client_1.throwDefaultError)({
17982
+ output,
17983
+ parsedBody,
17984
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
17985
+ errorCode
17907
17986
  });
17908
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
17909
17987
  }
17910
17988
  };
17911
17989
  var deserializeAws_json1_1GetRandomPasswordCommand = async (output, context) => {
@@ -17927,7 +18005,6 @@ var require_Aws_json1_1 = __commonJS({
17927
18005
  ...output,
17928
18006
  body: await parseBody(output.body, context)
17929
18007
  };
17930
- let response;
17931
18008
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17932
18009
  switch (errorCode) {
17933
18010
  case "InternalServiceError":
@@ -17941,14 +18018,12 @@ var require_Aws_json1_1 = __commonJS({
17941
18018
  throw await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context);
17942
18019
  default:
17943
18020
  const parsedBody = parsedOutput.body;
17944
- const $metadata = deserializeMetadata(output);
17945
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
17946
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
17947
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
17948
- $fault: "client",
17949
- $metadata
18021
+ (0, smithy_client_1.throwDefaultError)({
18022
+ output,
18023
+ parsedBody,
18024
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18025
+ errorCode
17950
18026
  });
17951
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
17952
18027
  }
17953
18028
  };
17954
18029
  var deserializeAws_json1_1GetResourcePolicyCommand = async (output, context) => {
@@ -17970,7 +18045,6 @@ var require_Aws_json1_1 = __commonJS({
17970
18045
  ...output,
17971
18046
  body: await parseBody(output.body, context)
17972
18047
  };
17973
- let response;
17974
18048
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
17975
18049
  switch (errorCode) {
17976
18050
  case "InternalServiceError":
@@ -17987,14 +18061,12 @@ var require_Aws_json1_1 = __commonJS({
17987
18061
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
17988
18062
  default:
17989
18063
  const parsedBody = parsedOutput.body;
17990
- const $metadata = deserializeMetadata(output);
17991
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
17992
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
17993
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
17994
- $fault: "client",
17995
- $metadata
18064
+ (0, smithy_client_1.throwDefaultError)({
18065
+ output,
18066
+ parsedBody,
18067
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18068
+ errorCode
17996
18069
  });
17997
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
17998
18070
  }
17999
18071
  };
18000
18072
  var deserializeAws_json1_1GetSecretValueCommand = async (output, context) => {
@@ -18016,7 +18088,6 @@ var require_Aws_json1_1 = __commonJS({
18016
18088
  ...output,
18017
18089
  body: await parseBody(output.body, context)
18018
18090
  };
18019
- let response;
18020
18091
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18021
18092
  switch (errorCode) {
18022
18093
  case "DecryptionFailure":
@@ -18036,14 +18107,12 @@ var require_Aws_json1_1 = __commonJS({
18036
18107
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18037
18108
  default:
18038
18109
  const parsedBody = parsedOutput.body;
18039
- const $metadata = deserializeMetadata(output);
18040
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18041
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18042
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18043
- $fault: "client",
18044
- $metadata
18110
+ (0, smithy_client_1.throwDefaultError)({
18111
+ output,
18112
+ parsedBody,
18113
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18114
+ errorCode
18045
18115
  });
18046
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18047
18116
  }
18048
18117
  };
18049
18118
  var deserializeAws_json1_1ListSecretsCommand = async (output, context) => {
@@ -18065,7 +18134,6 @@ var require_Aws_json1_1 = __commonJS({
18065
18134
  ...output,
18066
18135
  body: await parseBody(output.body, context)
18067
18136
  };
18068
- let response;
18069
18137
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18070
18138
  switch (errorCode) {
18071
18139
  case "InternalServiceError":
@@ -18079,14 +18147,12 @@ var require_Aws_json1_1 = __commonJS({
18079
18147
  throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
18080
18148
  default:
18081
18149
  const parsedBody = parsedOutput.body;
18082
- const $metadata = deserializeMetadata(output);
18083
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18084
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18085
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18086
- $fault: "client",
18087
- $metadata
18150
+ (0, smithy_client_1.throwDefaultError)({
18151
+ output,
18152
+ parsedBody,
18153
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18154
+ errorCode
18088
18155
  });
18089
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18090
18156
  }
18091
18157
  };
18092
18158
  var deserializeAws_json1_1ListSecretVersionIdsCommand = async (output, context) => {
@@ -18108,7 +18174,6 @@ var require_Aws_json1_1 = __commonJS({
18108
18174
  ...output,
18109
18175
  body: await parseBody(output.body, context)
18110
18176
  };
18111
- let response;
18112
18177
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18113
18178
  switch (errorCode) {
18114
18179
  case "InternalServiceError":
@@ -18125,14 +18190,12 @@ var require_Aws_json1_1 = __commonJS({
18125
18190
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18126
18191
  default:
18127
18192
  const parsedBody = parsedOutput.body;
18128
- const $metadata = deserializeMetadata(output);
18129
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18130
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18131
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18132
- $fault: "client",
18133
- $metadata
18193
+ (0, smithy_client_1.throwDefaultError)({
18194
+ output,
18195
+ parsedBody,
18196
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18197
+ errorCode
18134
18198
  });
18135
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18136
18199
  }
18137
18200
  };
18138
18201
  var deserializeAws_json1_1PutResourcePolicyCommand = async (output, context) => {
@@ -18154,7 +18217,6 @@ var require_Aws_json1_1 = __commonJS({
18154
18217
  ...output,
18155
18218
  body: await parseBody(output.body, context)
18156
18219
  };
18157
- let response;
18158
18220
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18159
18221
  switch (errorCode) {
18160
18222
  case "InternalServiceError":
@@ -18177,14 +18239,12 @@ var require_Aws_json1_1 = __commonJS({
18177
18239
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18178
18240
  default:
18179
18241
  const parsedBody = parsedOutput.body;
18180
- const $metadata = deserializeMetadata(output);
18181
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18182
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18183
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18184
- $fault: "client",
18185
- $metadata
18242
+ (0, smithy_client_1.throwDefaultError)({
18243
+ output,
18244
+ parsedBody,
18245
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18246
+ errorCode
18186
18247
  });
18187
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18188
18248
  }
18189
18249
  };
18190
18250
  var deserializeAws_json1_1PutSecretValueCommand = async (output, context) => {
@@ -18206,7 +18266,6 @@ var require_Aws_json1_1 = __commonJS({
18206
18266
  ...output,
18207
18267
  body: await parseBody(output.body, context)
18208
18268
  };
18209
- let response;
18210
18269
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18211
18270
  switch (errorCode) {
18212
18271
  case "DecryptionFailure":
@@ -18235,14 +18294,12 @@ var require_Aws_json1_1 = __commonJS({
18235
18294
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18236
18295
  default:
18237
18296
  const parsedBody = parsedOutput.body;
18238
- const $metadata = deserializeMetadata(output);
18239
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18240
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18241
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18242
- $fault: "client",
18243
- $metadata
18297
+ (0, smithy_client_1.throwDefaultError)({
18298
+ output,
18299
+ parsedBody,
18300
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18301
+ errorCode
18244
18302
  });
18245
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18246
18303
  }
18247
18304
  };
18248
18305
  var deserializeAws_json1_1RemoveRegionsFromReplicationCommand = async (output, context) => {
@@ -18264,7 +18321,6 @@ var require_Aws_json1_1 = __commonJS({
18264
18321
  ...output,
18265
18322
  body: await parseBody(output.body, context)
18266
18323
  };
18267
- let response;
18268
18324
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18269
18325
  switch (errorCode) {
18270
18326
  case "InternalServiceError":
@@ -18281,14 +18337,12 @@ var require_Aws_json1_1 = __commonJS({
18281
18337
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18282
18338
  default:
18283
18339
  const parsedBody = parsedOutput.body;
18284
- const $metadata = deserializeMetadata(output);
18285
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18286
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18287
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18288
- $fault: "client",
18289
- $metadata
18340
+ (0, smithy_client_1.throwDefaultError)({
18341
+ output,
18342
+ parsedBody,
18343
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18344
+ errorCode
18290
18345
  });
18291
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18292
18346
  }
18293
18347
  };
18294
18348
  var deserializeAws_json1_1ReplicateSecretToRegionsCommand = async (output, context) => {
@@ -18310,7 +18364,6 @@ var require_Aws_json1_1 = __commonJS({
18310
18364
  ...output,
18311
18365
  body: await parseBody(output.body, context)
18312
18366
  };
18313
- let response;
18314
18367
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18315
18368
  switch (errorCode) {
18316
18369
  case "InternalServiceError":
@@ -18327,14 +18380,12 @@ var require_Aws_json1_1 = __commonJS({
18327
18380
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18328
18381
  default:
18329
18382
  const parsedBody = parsedOutput.body;
18330
- const $metadata = deserializeMetadata(output);
18331
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18332
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18333
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18334
- $fault: "client",
18335
- $metadata
18383
+ (0, smithy_client_1.throwDefaultError)({
18384
+ output,
18385
+ parsedBody,
18386
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18387
+ errorCode
18336
18388
  });
18337
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18338
18389
  }
18339
18390
  };
18340
18391
  var deserializeAws_json1_1RestoreSecretCommand = async (output, context) => {
@@ -18356,7 +18407,6 @@ var require_Aws_json1_1 = __commonJS({
18356
18407
  ...output,
18357
18408
  body: await parseBody(output.body, context)
18358
18409
  };
18359
- let response;
18360
18410
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18361
18411
  switch (errorCode) {
18362
18412
  case "InternalServiceError":
@@ -18373,14 +18423,12 @@ var require_Aws_json1_1 = __commonJS({
18373
18423
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18374
18424
  default:
18375
18425
  const parsedBody = parsedOutput.body;
18376
- const $metadata = deserializeMetadata(output);
18377
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18378
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18379
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18380
- $fault: "client",
18381
- $metadata
18426
+ (0, smithy_client_1.throwDefaultError)({
18427
+ output,
18428
+ parsedBody,
18429
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18430
+ errorCode
18382
18431
  });
18383
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18384
18432
  }
18385
18433
  };
18386
18434
  var deserializeAws_json1_1RotateSecretCommand = async (output, context) => {
@@ -18402,7 +18450,6 @@ var require_Aws_json1_1 = __commonJS({
18402
18450
  ...output,
18403
18451
  body: await parseBody(output.body, context)
18404
18452
  };
18405
- let response;
18406
18453
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18407
18454
  switch (errorCode) {
18408
18455
  case "InternalServiceError":
@@ -18419,14 +18466,12 @@ var require_Aws_json1_1 = __commonJS({
18419
18466
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18420
18467
  default:
18421
18468
  const parsedBody = parsedOutput.body;
18422
- const $metadata = deserializeMetadata(output);
18423
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18424
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18425
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18426
- $fault: "client",
18427
- $metadata
18469
+ (0, smithy_client_1.throwDefaultError)({
18470
+ output,
18471
+ parsedBody,
18472
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18473
+ errorCode
18428
18474
  });
18429
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18430
18475
  }
18431
18476
  };
18432
18477
  var deserializeAws_json1_1StopReplicationToReplicaCommand = async (output, context) => {
@@ -18448,7 +18493,6 @@ var require_Aws_json1_1 = __commonJS({
18448
18493
  ...output,
18449
18494
  body: await parseBody(output.body, context)
18450
18495
  };
18451
- let response;
18452
18496
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18453
18497
  switch (errorCode) {
18454
18498
  case "InternalServiceError":
@@ -18465,14 +18509,12 @@ var require_Aws_json1_1 = __commonJS({
18465
18509
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18466
18510
  default:
18467
18511
  const parsedBody = parsedOutput.body;
18468
- const $metadata = deserializeMetadata(output);
18469
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18470
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18471
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18472
- $fault: "client",
18473
- $metadata
18512
+ (0, smithy_client_1.throwDefaultError)({
18513
+ output,
18514
+ parsedBody,
18515
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18516
+ errorCode
18474
18517
  });
18475
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18476
18518
  }
18477
18519
  };
18478
18520
  var deserializeAws_json1_1TagResourceCommand = async (output, context) => {
@@ -18491,7 +18533,6 @@ var require_Aws_json1_1 = __commonJS({
18491
18533
  ...output,
18492
18534
  body: await parseBody(output.body, context)
18493
18535
  };
18494
- let response;
18495
18536
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18496
18537
  switch (errorCode) {
18497
18538
  case "InternalServiceError":
@@ -18508,14 +18549,12 @@ var require_Aws_json1_1 = __commonJS({
18508
18549
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18509
18550
  default:
18510
18551
  const parsedBody = parsedOutput.body;
18511
- const $metadata = deserializeMetadata(output);
18512
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18513
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18514
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18515
- $fault: "client",
18516
- $metadata
18552
+ (0, smithy_client_1.throwDefaultError)({
18553
+ output,
18554
+ parsedBody,
18555
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18556
+ errorCode
18517
18557
  });
18518
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18519
18558
  }
18520
18559
  };
18521
18560
  var deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
@@ -18534,7 +18573,6 @@ var require_Aws_json1_1 = __commonJS({
18534
18573
  ...output,
18535
18574
  body: await parseBody(output.body, context)
18536
18575
  };
18537
- let response;
18538
18576
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18539
18577
  switch (errorCode) {
18540
18578
  case "InternalServiceError":
@@ -18551,14 +18589,12 @@ var require_Aws_json1_1 = __commonJS({
18551
18589
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18552
18590
  default:
18553
18591
  const parsedBody = parsedOutput.body;
18554
- const $metadata = deserializeMetadata(output);
18555
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18556
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18557
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18558
- $fault: "client",
18559
- $metadata
18592
+ (0, smithy_client_1.throwDefaultError)({
18593
+ output,
18594
+ parsedBody,
18595
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18596
+ errorCode
18560
18597
  });
18561
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18562
18598
  }
18563
18599
  };
18564
18600
  var deserializeAws_json1_1UpdateSecretCommand = async (output, context) => {
@@ -18580,7 +18616,6 @@ var require_Aws_json1_1 = __commonJS({
18580
18616
  ...output,
18581
18617
  body: await parseBody(output.body, context)
18582
18618
  };
18583
- let response;
18584
18619
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18585
18620
  switch (errorCode) {
18586
18621
  case "DecryptionFailure":
@@ -18615,14 +18650,12 @@ var require_Aws_json1_1 = __commonJS({
18615
18650
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18616
18651
  default:
18617
18652
  const parsedBody = parsedOutput.body;
18618
- const $metadata = deserializeMetadata(output);
18619
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18620
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18621
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18622
- $fault: "client",
18623
- $metadata
18653
+ (0, smithy_client_1.throwDefaultError)({
18654
+ output,
18655
+ parsedBody,
18656
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18657
+ errorCode
18624
18658
  });
18625
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18626
18659
  }
18627
18660
  };
18628
18661
  var deserializeAws_json1_1UpdateSecretVersionStageCommand = async (output, context) => {
@@ -18644,7 +18677,6 @@ var require_Aws_json1_1 = __commonJS({
18644
18677
  ...output,
18645
18678
  body: await parseBody(output.body, context)
18646
18679
  };
18647
- let response;
18648
18680
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18649
18681
  switch (errorCode) {
18650
18682
  case "InternalServiceError":
@@ -18664,14 +18696,12 @@ var require_Aws_json1_1 = __commonJS({
18664
18696
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18665
18697
  default:
18666
18698
  const parsedBody = parsedOutput.body;
18667
- const $metadata = deserializeMetadata(output);
18668
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18669
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18670
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18671
- $fault: "client",
18672
- $metadata
18699
+ (0, smithy_client_1.throwDefaultError)({
18700
+ output,
18701
+ parsedBody,
18702
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18703
+ errorCode
18673
18704
  });
18674
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18675
18705
  }
18676
18706
  };
18677
18707
  var deserializeAws_json1_1ValidateResourcePolicyCommand = async (output, context) => {
@@ -18693,7 +18723,6 @@ var require_Aws_json1_1 = __commonJS({
18693
18723
  ...output,
18694
18724
  body: await parseBody(output.body, context)
18695
18725
  };
18696
- let response;
18697
18726
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
18698
18727
  switch (errorCode) {
18699
18728
  case "InternalServiceError":
@@ -18713,14 +18742,12 @@ var require_Aws_json1_1 = __commonJS({
18713
18742
  throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
18714
18743
  default:
18715
18744
  const parsedBody = parsedOutput.body;
18716
- const $metadata = deserializeMetadata(output);
18717
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
18718
- response = new SecretsManagerServiceException_1.SecretsManagerServiceException({
18719
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
18720
- $fault: "client",
18721
- $metadata
18745
+ (0, smithy_client_1.throwDefaultError)({
18746
+ output,
18747
+ parsedBody,
18748
+ exceptionCtor: SecretsManagerServiceException_1.SecretsManagerServiceException,
18749
+ errorCode
18722
18750
  });
18723
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
18724
18751
  }
18725
18752
  };
18726
18753
  var deserializeAws_json1_1DecryptionFailureResponse = async (parsedOutput, context) => {
@@ -18833,256 +18860,239 @@ var require_Aws_json1_1 = __commonJS({
18833
18860
  };
18834
18861
  var serializeAws_json1_1AddReplicaRegionListType = (input, context) => {
18835
18862
  return input.filter((e) => e != null).map((entry) => {
18836
- if (entry === null) {
18837
- return null;
18838
- }
18839
18863
  return serializeAws_json1_1ReplicaRegionType(entry, context);
18840
18864
  });
18841
18865
  };
18842
18866
  var serializeAws_json1_1CancelRotateSecretRequest = (input, context) => {
18843
18867
  return {
18844
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
18868
+ ...input.SecretId != null && { SecretId: input.SecretId }
18845
18869
  };
18846
18870
  };
18847
18871
  var serializeAws_json1_1CreateSecretRequest = (input, context) => {
18848
18872
  var _a;
18849
18873
  return {
18850
- ...input.AddReplicaRegions !== void 0 && input.AddReplicaRegions !== null && {
18874
+ ...input.AddReplicaRegions != null && {
18851
18875
  AddReplicaRegions: serializeAws_json1_1AddReplicaRegionListType(input.AddReplicaRegions, context)
18852
18876
  },
18853
18877
  ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
18854
- ...input.Description !== void 0 && input.Description !== null && { Description: input.Description },
18855
- ...input.ForceOverwriteReplicaSecret !== void 0 && input.ForceOverwriteReplicaSecret !== null && { ForceOverwriteReplicaSecret: input.ForceOverwriteReplicaSecret },
18856
- ...input.KmsKeyId !== void 0 && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId },
18857
- ...input.Name !== void 0 && input.Name !== null && { Name: input.Name },
18858
- ...input.SecretBinary !== void 0 && input.SecretBinary !== null && { SecretBinary: context.base64Encoder(input.SecretBinary) },
18859
- ...input.SecretString !== void 0 && input.SecretString !== null && { SecretString: input.SecretString },
18860
- ...input.Tags !== void 0 && input.Tags !== null && { Tags: serializeAws_json1_1TagListType(input.Tags, context) }
18878
+ ...input.Description != null && { Description: input.Description },
18879
+ ...input.ForceOverwriteReplicaSecret != null && {
18880
+ ForceOverwriteReplicaSecret: input.ForceOverwriteReplicaSecret
18881
+ },
18882
+ ...input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId },
18883
+ ...input.Name != null && { Name: input.Name },
18884
+ ...input.SecretBinary != null && { SecretBinary: context.base64Encoder(input.SecretBinary) },
18885
+ ...input.SecretString != null && { SecretString: input.SecretString },
18886
+ ...input.Tags != null && { Tags: serializeAws_json1_1TagListType(input.Tags, context) }
18861
18887
  };
18862
18888
  };
18863
18889
  var serializeAws_json1_1DeleteResourcePolicyRequest = (input, context) => {
18864
18890
  return {
18865
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
18891
+ ...input.SecretId != null && { SecretId: input.SecretId }
18866
18892
  };
18867
18893
  };
18868
18894
  var serializeAws_json1_1DeleteSecretRequest = (input, context) => {
18869
18895
  return {
18870
- ...input.ForceDeleteWithoutRecovery !== void 0 && input.ForceDeleteWithoutRecovery !== null && { ForceDeleteWithoutRecovery: input.ForceDeleteWithoutRecovery },
18871
- ...input.RecoveryWindowInDays !== void 0 && input.RecoveryWindowInDays !== null && { RecoveryWindowInDays: input.RecoveryWindowInDays },
18872
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
18896
+ ...input.ForceDeleteWithoutRecovery != null && { ForceDeleteWithoutRecovery: input.ForceDeleteWithoutRecovery },
18897
+ ...input.RecoveryWindowInDays != null && { RecoveryWindowInDays: input.RecoveryWindowInDays },
18898
+ ...input.SecretId != null && { SecretId: input.SecretId }
18873
18899
  };
18874
18900
  };
18875
18901
  var serializeAws_json1_1DescribeSecretRequest = (input, context) => {
18876
18902
  return {
18877
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
18903
+ ...input.SecretId != null && { SecretId: input.SecretId }
18878
18904
  };
18879
18905
  };
18880
18906
  var serializeAws_json1_1Filter = (input, context) => {
18881
18907
  return {
18882
- ...input.Key !== void 0 && input.Key !== null && { Key: input.Key },
18883
- ...input.Values !== void 0 && input.Values !== null && { Values: serializeAws_json1_1FilterValuesStringList(input.Values, context) }
18908
+ ...input.Key != null && { Key: input.Key },
18909
+ ...input.Values != null && { Values: serializeAws_json1_1FilterValuesStringList(input.Values, context) }
18884
18910
  };
18885
18911
  };
18886
18912
  var serializeAws_json1_1FiltersListType = (input, context) => {
18887
18913
  return input.filter((e) => e != null).map((entry) => {
18888
- if (entry === null) {
18889
- return null;
18890
- }
18891
18914
  return serializeAws_json1_1Filter(entry, context);
18892
18915
  });
18893
18916
  };
18894
18917
  var serializeAws_json1_1FilterValuesStringList = (input, context) => {
18895
18918
  return input.filter((e) => e != null).map((entry) => {
18896
- if (entry === null) {
18897
- return null;
18898
- }
18899
18919
  return entry;
18900
18920
  });
18901
18921
  };
18902
18922
  var serializeAws_json1_1GetRandomPasswordRequest = (input, context) => {
18903
18923
  return {
18904
- ...input.ExcludeCharacters !== void 0 && input.ExcludeCharacters !== null && { ExcludeCharacters: input.ExcludeCharacters },
18905
- ...input.ExcludeLowercase !== void 0 && input.ExcludeLowercase !== null && { ExcludeLowercase: input.ExcludeLowercase },
18906
- ...input.ExcludeNumbers !== void 0 && input.ExcludeNumbers !== null && { ExcludeNumbers: input.ExcludeNumbers },
18907
- ...input.ExcludePunctuation !== void 0 && input.ExcludePunctuation !== null && { ExcludePunctuation: input.ExcludePunctuation },
18908
- ...input.ExcludeUppercase !== void 0 && input.ExcludeUppercase !== null && { ExcludeUppercase: input.ExcludeUppercase },
18909
- ...input.IncludeSpace !== void 0 && input.IncludeSpace !== null && { IncludeSpace: input.IncludeSpace },
18910
- ...input.PasswordLength !== void 0 && input.PasswordLength !== null && { PasswordLength: input.PasswordLength },
18911
- ...input.RequireEachIncludedType !== void 0 && input.RequireEachIncludedType !== null && { RequireEachIncludedType: input.RequireEachIncludedType }
18924
+ ...input.ExcludeCharacters != null && { ExcludeCharacters: input.ExcludeCharacters },
18925
+ ...input.ExcludeLowercase != null && { ExcludeLowercase: input.ExcludeLowercase },
18926
+ ...input.ExcludeNumbers != null && { ExcludeNumbers: input.ExcludeNumbers },
18927
+ ...input.ExcludePunctuation != null && { ExcludePunctuation: input.ExcludePunctuation },
18928
+ ...input.ExcludeUppercase != null && { ExcludeUppercase: input.ExcludeUppercase },
18929
+ ...input.IncludeSpace != null && { IncludeSpace: input.IncludeSpace },
18930
+ ...input.PasswordLength != null && { PasswordLength: input.PasswordLength },
18931
+ ...input.RequireEachIncludedType != null && { RequireEachIncludedType: input.RequireEachIncludedType }
18912
18932
  };
18913
18933
  };
18914
18934
  var serializeAws_json1_1GetResourcePolicyRequest = (input, context) => {
18915
18935
  return {
18916
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
18936
+ ...input.SecretId != null && { SecretId: input.SecretId }
18917
18937
  };
18918
18938
  };
18919
18939
  var serializeAws_json1_1GetSecretValueRequest = (input, context) => {
18920
18940
  return {
18921
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId },
18922
- ...input.VersionId !== void 0 && input.VersionId !== null && { VersionId: input.VersionId },
18923
- ...input.VersionStage !== void 0 && input.VersionStage !== null && { VersionStage: input.VersionStage }
18941
+ ...input.SecretId != null && { SecretId: input.SecretId },
18942
+ ...input.VersionId != null && { VersionId: input.VersionId },
18943
+ ...input.VersionStage != null && { VersionStage: input.VersionStage }
18924
18944
  };
18925
18945
  };
18926
18946
  var serializeAws_json1_1ListSecretsRequest = (input, context) => {
18927
18947
  return {
18928
- ...input.Filters !== void 0 && input.Filters !== null && { Filters: serializeAws_json1_1FiltersListType(input.Filters, context) },
18929
- ...input.MaxResults !== void 0 && input.MaxResults !== null && { MaxResults: input.MaxResults },
18930
- ...input.NextToken !== void 0 && input.NextToken !== null && { NextToken: input.NextToken },
18931
- ...input.SortOrder !== void 0 && input.SortOrder !== null && { SortOrder: input.SortOrder }
18948
+ ...input.Filters != null && { Filters: serializeAws_json1_1FiltersListType(input.Filters, context) },
18949
+ ...input.MaxResults != null && { MaxResults: input.MaxResults },
18950
+ ...input.NextToken != null && { NextToken: input.NextToken },
18951
+ ...input.SortOrder != null && { SortOrder: input.SortOrder }
18932
18952
  };
18933
18953
  };
18934
18954
  var serializeAws_json1_1ListSecretVersionIdsRequest = (input, context) => {
18935
18955
  return {
18936
- ...input.IncludeDeprecated !== void 0 && input.IncludeDeprecated !== null && { IncludeDeprecated: input.IncludeDeprecated },
18937
- ...input.MaxResults !== void 0 && input.MaxResults !== null && { MaxResults: input.MaxResults },
18938
- ...input.NextToken !== void 0 && input.NextToken !== null && { NextToken: input.NextToken },
18939
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
18956
+ ...input.IncludeDeprecated != null && { IncludeDeprecated: input.IncludeDeprecated },
18957
+ ...input.MaxResults != null && { MaxResults: input.MaxResults },
18958
+ ...input.NextToken != null && { NextToken: input.NextToken },
18959
+ ...input.SecretId != null && { SecretId: input.SecretId }
18940
18960
  };
18941
18961
  };
18942
18962
  var serializeAws_json1_1PutResourcePolicyRequest = (input, context) => {
18943
18963
  return {
18944
- ...input.BlockPublicPolicy !== void 0 && input.BlockPublicPolicy !== null && { BlockPublicPolicy: input.BlockPublicPolicy },
18945
- ...input.ResourcePolicy !== void 0 && input.ResourcePolicy !== null && { ResourcePolicy: input.ResourcePolicy },
18946
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
18964
+ ...input.BlockPublicPolicy != null && { BlockPublicPolicy: input.BlockPublicPolicy },
18965
+ ...input.ResourcePolicy != null && { ResourcePolicy: input.ResourcePolicy },
18966
+ ...input.SecretId != null && { SecretId: input.SecretId }
18947
18967
  };
18948
18968
  };
18949
18969
  var serializeAws_json1_1PutSecretValueRequest = (input, context) => {
18950
18970
  var _a;
18951
18971
  return {
18952
18972
  ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
18953
- ...input.SecretBinary !== void 0 && input.SecretBinary !== null && { SecretBinary: context.base64Encoder(input.SecretBinary) },
18954
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId },
18955
- ...input.SecretString !== void 0 && input.SecretString !== null && { SecretString: input.SecretString },
18956
- ...input.VersionStages !== void 0 && input.VersionStages !== null && {
18973
+ ...input.SecretBinary != null && { SecretBinary: context.base64Encoder(input.SecretBinary) },
18974
+ ...input.SecretId != null && { SecretId: input.SecretId },
18975
+ ...input.SecretString != null && { SecretString: input.SecretString },
18976
+ ...input.VersionStages != null && {
18957
18977
  VersionStages: serializeAws_json1_1SecretVersionStagesType(input.VersionStages, context)
18958
18978
  }
18959
18979
  };
18960
18980
  };
18961
18981
  var serializeAws_json1_1RemoveRegionsFromReplicationRequest = (input, context) => {
18962
18982
  return {
18963
- ...input.RemoveReplicaRegions !== void 0 && input.RemoveReplicaRegions !== null && {
18983
+ ...input.RemoveReplicaRegions != null && {
18964
18984
  RemoveReplicaRegions: serializeAws_json1_1RemoveReplicaRegionListType(input.RemoveReplicaRegions, context)
18965
18985
  },
18966
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
18986
+ ...input.SecretId != null && { SecretId: input.SecretId }
18967
18987
  };
18968
18988
  };
18969
18989
  var serializeAws_json1_1RemoveReplicaRegionListType = (input, context) => {
18970
18990
  return input.filter((e) => e != null).map((entry) => {
18971
- if (entry === null) {
18972
- return null;
18973
- }
18974
18991
  return entry;
18975
18992
  });
18976
18993
  };
18977
18994
  var serializeAws_json1_1ReplicaRegionType = (input, context) => {
18978
18995
  return {
18979
- ...input.KmsKeyId !== void 0 && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId },
18980
- ...input.Region !== void 0 && input.Region !== null && { Region: input.Region }
18996
+ ...input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId },
18997
+ ...input.Region != null && { Region: input.Region }
18981
18998
  };
18982
18999
  };
18983
19000
  var serializeAws_json1_1ReplicateSecretToRegionsRequest = (input, context) => {
18984
19001
  return {
18985
- ...input.AddReplicaRegions !== void 0 && input.AddReplicaRegions !== null && {
19002
+ ...input.AddReplicaRegions != null && {
18986
19003
  AddReplicaRegions: serializeAws_json1_1AddReplicaRegionListType(input.AddReplicaRegions, context)
18987
19004
  },
18988
- ...input.ForceOverwriteReplicaSecret !== void 0 && input.ForceOverwriteReplicaSecret !== null && { ForceOverwriteReplicaSecret: input.ForceOverwriteReplicaSecret },
18989
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
19005
+ ...input.ForceOverwriteReplicaSecret != null && {
19006
+ ForceOverwriteReplicaSecret: input.ForceOverwriteReplicaSecret
19007
+ },
19008
+ ...input.SecretId != null && { SecretId: input.SecretId }
18990
19009
  };
18991
19010
  };
18992
19011
  var serializeAws_json1_1RestoreSecretRequest = (input, context) => {
18993
19012
  return {
18994
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
19013
+ ...input.SecretId != null && { SecretId: input.SecretId }
18995
19014
  };
18996
19015
  };
18997
19016
  var serializeAws_json1_1RotateSecretRequest = (input, context) => {
18998
19017
  var _a;
18999
19018
  return {
19000
19019
  ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
19001
- ...input.RotateImmediately !== void 0 && input.RotateImmediately !== null && { RotateImmediately: input.RotateImmediately },
19002
- ...input.RotationLambdaARN !== void 0 && input.RotationLambdaARN !== null && { RotationLambdaARN: input.RotationLambdaARN },
19003
- ...input.RotationRules !== void 0 && input.RotationRules !== null && {
19020
+ ...input.RotateImmediately != null && { RotateImmediately: input.RotateImmediately },
19021
+ ...input.RotationLambdaARN != null && { RotationLambdaARN: input.RotationLambdaARN },
19022
+ ...input.RotationRules != null && {
19004
19023
  RotationRules: serializeAws_json1_1RotationRulesType(input.RotationRules, context)
19005
19024
  },
19006
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
19025
+ ...input.SecretId != null && { SecretId: input.SecretId }
19007
19026
  };
19008
19027
  };
19009
19028
  var serializeAws_json1_1RotationRulesType = (input, context) => {
19010
19029
  return {
19011
- ...input.AutomaticallyAfterDays !== void 0 && input.AutomaticallyAfterDays !== null && { AutomaticallyAfterDays: input.AutomaticallyAfterDays },
19012
- ...input.Duration !== void 0 && input.Duration !== null && { Duration: input.Duration },
19013
- ...input.ScheduleExpression !== void 0 && input.ScheduleExpression !== null && { ScheduleExpression: input.ScheduleExpression }
19030
+ ...input.AutomaticallyAfterDays != null && { AutomaticallyAfterDays: input.AutomaticallyAfterDays },
19031
+ ...input.Duration != null && { Duration: input.Duration },
19032
+ ...input.ScheduleExpression != null && { ScheduleExpression: input.ScheduleExpression }
19014
19033
  };
19015
19034
  };
19016
19035
  var serializeAws_json1_1SecretVersionStagesType = (input, context) => {
19017
19036
  return input.filter((e) => e != null).map((entry) => {
19018
- if (entry === null) {
19019
- return null;
19020
- }
19021
19037
  return entry;
19022
19038
  });
19023
19039
  };
19024
19040
  var serializeAws_json1_1StopReplicationToReplicaRequest = (input, context) => {
19025
19041
  return {
19026
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
19042
+ ...input.SecretId != null && { SecretId: input.SecretId }
19027
19043
  };
19028
19044
  };
19029
19045
  var serializeAws_json1_1Tag = (input, context) => {
19030
19046
  return {
19031
- ...input.Key !== void 0 && input.Key !== null && { Key: input.Key },
19032
- ...input.Value !== void 0 && input.Value !== null && { Value: input.Value }
19047
+ ...input.Key != null && { Key: input.Key },
19048
+ ...input.Value != null && { Value: input.Value }
19033
19049
  };
19034
19050
  };
19035
19051
  var serializeAws_json1_1TagKeyListType = (input, context) => {
19036
19052
  return input.filter((e) => e != null).map((entry) => {
19037
- if (entry === null) {
19038
- return null;
19039
- }
19040
19053
  return entry;
19041
19054
  });
19042
19055
  };
19043
19056
  var serializeAws_json1_1TagListType = (input, context) => {
19044
19057
  return input.filter((e) => e != null).map((entry) => {
19045
- if (entry === null) {
19046
- return null;
19047
- }
19048
19058
  return serializeAws_json1_1Tag(entry, context);
19049
19059
  });
19050
19060
  };
19051
19061
  var serializeAws_json1_1TagResourceRequest = (input, context) => {
19052
19062
  return {
19053
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId },
19054
- ...input.Tags !== void 0 && input.Tags !== null && { Tags: serializeAws_json1_1TagListType(input.Tags, context) }
19063
+ ...input.SecretId != null && { SecretId: input.SecretId },
19064
+ ...input.Tags != null && { Tags: serializeAws_json1_1TagListType(input.Tags, context) }
19055
19065
  };
19056
19066
  };
19057
19067
  var serializeAws_json1_1UntagResourceRequest = (input, context) => {
19058
19068
  return {
19059
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId },
19060
- ...input.TagKeys !== void 0 && input.TagKeys !== null && { TagKeys: serializeAws_json1_1TagKeyListType(input.TagKeys, context) }
19069
+ ...input.SecretId != null && { SecretId: input.SecretId },
19070
+ ...input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyListType(input.TagKeys, context) }
19061
19071
  };
19062
19072
  };
19063
19073
  var serializeAws_json1_1UpdateSecretRequest = (input, context) => {
19064
19074
  var _a;
19065
19075
  return {
19066
19076
  ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
19067
- ...input.Description !== void 0 && input.Description !== null && { Description: input.Description },
19068
- ...input.KmsKeyId !== void 0 && input.KmsKeyId !== null && { KmsKeyId: input.KmsKeyId },
19069
- ...input.SecretBinary !== void 0 && input.SecretBinary !== null && { SecretBinary: context.base64Encoder(input.SecretBinary) },
19070
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId },
19071
- ...input.SecretString !== void 0 && input.SecretString !== null && { SecretString: input.SecretString }
19077
+ ...input.Description != null && { Description: input.Description },
19078
+ ...input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId },
19079
+ ...input.SecretBinary != null && { SecretBinary: context.base64Encoder(input.SecretBinary) },
19080
+ ...input.SecretId != null && { SecretId: input.SecretId },
19081
+ ...input.SecretString != null && { SecretString: input.SecretString }
19072
19082
  };
19073
19083
  };
19074
19084
  var serializeAws_json1_1UpdateSecretVersionStageRequest = (input, context) => {
19075
19085
  return {
19076
- ...input.MoveToVersionId !== void 0 && input.MoveToVersionId !== null && { MoveToVersionId: input.MoveToVersionId },
19077
- ...input.RemoveFromVersionId !== void 0 && input.RemoveFromVersionId !== null && { RemoveFromVersionId: input.RemoveFromVersionId },
19078
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId },
19079
- ...input.VersionStage !== void 0 && input.VersionStage !== null && { VersionStage: input.VersionStage }
19086
+ ...input.MoveToVersionId != null && { MoveToVersionId: input.MoveToVersionId },
19087
+ ...input.RemoveFromVersionId != null && { RemoveFromVersionId: input.RemoveFromVersionId },
19088
+ ...input.SecretId != null && { SecretId: input.SecretId },
19089
+ ...input.VersionStage != null && { VersionStage: input.VersionStage }
19080
19090
  };
19081
19091
  };
19082
19092
  var serializeAws_json1_1ValidateResourcePolicyRequest = (input, context) => {
19083
19093
  return {
19084
- ...input.ResourcePolicy !== void 0 && input.ResourcePolicy !== null && { ResourcePolicy: input.ResourcePolicy },
19085
- ...input.SecretId !== void 0 && input.SecretId !== null && { SecretId: input.SecretId }
19094
+ ...input.ResourcePolicy != null && { ResourcePolicy: input.ResourcePolicy },
19095
+ ...input.SecretId != null && { SecretId: input.SecretId }
19086
19096
  };
19087
19097
  };
19088
19098
  var deserializeAws_json1_1CancelRotateSecretResponse = (output, context) => {
@@ -19096,7 +19106,7 @@ var require_Aws_json1_1 = __commonJS({
19096
19106
  return {
19097
19107
  ARN: (0, smithy_client_1.expectString)(output.ARN),
19098
19108
  Name: (0, smithy_client_1.expectString)(output.Name),
19099
- ReplicationStatus: output.ReplicationStatus !== void 0 && output.ReplicationStatus !== null ? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context) : void 0,
19109
+ ReplicationStatus: output.ReplicationStatus != null ? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context) : void 0,
19100
19110
  VersionId: (0, smithy_client_1.expectString)(output.VersionId)
19101
19111
  };
19102
19112
  };
@@ -19114,29 +19124,29 @@ var require_Aws_json1_1 = __commonJS({
19114
19124
  var deserializeAws_json1_1DeleteSecretResponse = (output, context) => {
19115
19125
  return {
19116
19126
  ARN: (0, smithy_client_1.expectString)(output.ARN),
19117
- DeletionDate: output.DeletionDate !== void 0 && output.DeletionDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DeletionDate))) : void 0,
19127
+ DeletionDate: output.DeletionDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DeletionDate))) : void 0,
19118
19128
  Name: (0, smithy_client_1.expectString)(output.Name)
19119
19129
  };
19120
19130
  };
19121
19131
  var deserializeAws_json1_1DescribeSecretResponse = (output, context) => {
19122
19132
  return {
19123
19133
  ARN: (0, smithy_client_1.expectString)(output.ARN),
19124
- CreatedDate: output.CreatedDate !== void 0 && output.CreatedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedDate))) : void 0,
19125
- DeletedDate: output.DeletedDate !== void 0 && output.DeletedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DeletedDate))) : void 0,
19134
+ CreatedDate: output.CreatedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedDate))) : void 0,
19135
+ DeletedDate: output.DeletedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DeletedDate))) : void 0,
19126
19136
  Description: (0, smithy_client_1.expectString)(output.Description),
19127
19137
  KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
19128
- LastAccessedDate: output.LastAccessedDate !== void 0 && output.LastAccessedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastAccessedDate))) : void 0,
19129
- LastChangedDate: output.LastChangedDate !== void 0 && output.LastChangedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastChangedDate))) : void 0,
19130
- LastRotatedDate: output.LastRotatedDate !== void 0 && output.LastRotatedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastRotatedDate))) : void 0,
19138
+ LastAccessedDate: output.LastAccessedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastAccessedDate))) : void 0,
19139
+ LastChangedDate: output.LastChangedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastChangedDate))) : void 0,
19140
+ LastRotatedDate: output.LastRotatedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastRotatedDate))) : void 0,
19131
19141
  Name: (0, smithy_client_1.expectString)(output.Name),
19132
19142
  OwningService: (0, smithy_client_1.expectString)(output.OwningService),
19133
19143
  PrimaryRegion: (0, smithy_client_1.expectString)(output.PrimaryRegion),
19134
- ReplicationStatus: output.ReplicationStatus !== void 0 && output.ReplicationStatus !== null ? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context) : void 0,
19144
+ ReplicationStatus: output.ReplicationStatus != null ? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context) : void 0,
19135
19145
  RotationEnabled: (0, smithy_client_1.expectBoolean)(output.RotationEnabled),
19136
19146
  RotationLambdaARN: (0, smithy_client_1.expectString)(output.RotationLambdaARN),
19137
- RotationRules: output.RotationRules !== void 0 && output.RotationRules !== null ? deserializeAws_json1_1RotationRulesType(output.RotationRules, context) : void 0,
19138
- Tags: output.Tags !== void 0 && output.Tags !== null ? deserializeAws_json1_1TagListType(output.Tags, context) : void 0,
19139
- VersionIdsToStages: output.VersionIdsToStages !== void 0 && output.VersionIdsToStages !== null ? deserializeAws_json1_1SecretVersionsToStagesMapType(output.VersionIdsToStages, context) : void 0
19147
+ RotationRules: output.RotationRules != null ? deserializeAws_json1_1RotationRulesType(output.RotationRules, context) : void 0,
19148
+ Tags: output.Tags != null ? deserializeAws_json1_1TagListType(output.Tags, context) : void 0,
19149
+ VersionIdsToStages: output.VersionIdsToStages != null ? deserializeAws_json1_1SecretVersionsToStagesMapType(output.VersionIdsToStages, context) : void 0
19140
19150
  };
19141
19151
  };
19142
19152
  var deserializeAws_json1_1EncryptionFailure = (output, context) => {
@@ -19159,12 +19169,12 @@ var require_Aws_json1_1 = __commonJS({
19159
19169
  var deserializeAws_json1_1GetSecretValueResponse = (output, context) => {
19160
19170
  return {
19161
19171
  ARN: (0, smithy_client_1.expectString)(output.ARN),
19162
- CreatedDate: output.CreatedDate !== void 0 && output.CreatedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedDate))) : void 0,
19172
+ CreatedDate: output.CreatedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedDate))) : void 0,
19163
19173
  Name: (0, smithy_client_1.expectString)(output.Name),
19164
- SecretBinary: output.SecretBinary !== void 0 && output.SecretBinary !== null ? context.base64Decoder(output.SecretBinary) : void 0,
19174
+ SecretBinary: output.SecretBinary != null ? context.base64Decoder(output.SecretBinary) : void 0,
19165
19175
  SecretString: (0, smithy_client_1.expectString)(output.SecretString),
19166
19176
  VersionId: (0, smithy_client_1.expectString)(output.VersionId),
19167
- VersionStages: output.VersionStages !== void 0 && output.VersionStages !== null ? deserializeAws_json1_1SecretVersionStagesType(output.VersionStages, context) : void 0
19177
+ VersionStages: output.VersionStages != null ? deserializeAws_json1_1SecretVersionStagesType(output.VersionStages, context) : void 0
19168
19178
  };
19169
19179
  };
19170
19180
  var deserializeAws_json1_1InternalServiceError = (output, context) => {
@@ -19204,7 +19214,7 @@ var require_Aws_json1_1 = __commonJS({
19204
19214
  var deserializeAws_json1_1ListSecretsResponse = (output, context) => {
19205
19215
  return {
19206
19216
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
19207
- SecretList: output.SecretList !== void 0 && output.SecretList !== null ? deserializeAws_json1_1SecretListType(output.SecretList, context) : void 0
19217
+ SecretList: output.SecretList != null ? deserializeAws_json1_1SecretListType(output.SecretList, context) : void 0
19208
19218
  };
19209
19219
  };
19210
19220
  var deserializeAws_json1_1ListSecretVersionIdsResponse = (output, context) => {
@@ -19212,7 +19222,7 @@ var require_Aws_json1_1 = __commonJS({
19212
19222
  ARN: (0, smithy_client_1.expectString)(output.ARN),
19213
19223
  Name: (0, smithy_client_1.expectString)(output.Name),
19214
19224
  NextToken: (0, smithy_client_1.expectString)(output.NextToken),
19215
- Versions: output.Versions !== void 0 && output.Versions !== null ? deserializeAws_json1_1SecretVersionsListType(output.Versions, context) : void 0
19225
+ Versions: output.Versions != null ? deserializeAws_json1_1SecretVersionsListType(output.Versions, context) : void 0
19216
19226
  };
19217
19227
  };
19218
19228
  var deserializeAws_json1_1MalformedPolicyDocumentException = (output, context) => {
@@ -19241,19 +19251,19 @@ var require_Aws_json1_1 = __commonJS({
19241
19251
  ARN: (0, smithy_client_1.expectString)(output.ARN),
19242
19252
  Name: (0, smithy_client_1.expectString)(output.Name),
19243
19253
  VersionId: (0, smithy_client_1.expectString)(output.VersionId),
19244
- VersionStages: output.VersionStages !== void 0 && output.VersionStages !== null ? deserializeAws_json1_1SecretVersionStagesType(output.VersionStages, context) : void 0
19254
+ VersionStages: output.VersionStages != null ? deserializeAws_json1_1SecretVersionStagesType(output.VersionStages, context) : void 0
19245
19255
  };
19246
19256
  };
19247
19257
  var deserializeAws_json1_1RemoveRegionsFromReplicationResponse = (output, context) => {
19248
19258
  return {
19249
19259
  ARN: (0, smithy_client_1.expectString)(output.ARN),
19250
- ReplicationStatus: output.ReplicationStatus !== void 0 && output.ReplicationStatus !== null ? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context) : void 0
19260
+ ReplicationStatus: output.ReplicationStatus != null ? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context) : void 0
19251
19261
  };
19252
19262
  };
19253
19263
  var deserializeAws_json1_1ReplicateSecretToRegionsResponse = (output, context) => {
19254
19264
  return {
19255
19265
  ARN: (0, smithy_client_1.expectString)(output.ARN),
19256
- ReplicationStatus: output.ReplicationStatus !== void 0 && output.ReplicationStatus !== null ? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context) : void 0
19266
+ ReplicationStatus: output.ReplicationStatus != null ? deserializeAws_json1_1ReplicationStatusListType(output.ReplicationStatus, context) : void 0
19257
19267
  };
19258
19268
  };
19259
19269
  var deserializeAws_json1_1ReplicationStatusListType = (output, context) => {
@@ -19268,7 +19278,7 @@ var require_Aws_json1_1 = __commonJS({
19268
19278
  var deserializeAws_json1_1ReplicationStatusType = (output, context) => {
19269
19279
  return {
19270
19280
  KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
19271
- LastAccessedDate: output.LastAccessedDate !== void 0 && output.LastAccessedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastAccessedDate))) : void 0,
19281
+ LastAccessedDate: output.LastAccessedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastAccessedDate))) : void 0,
19272
19282
  Region: (0, smithy_client_1.expectString)(output.Region),
19273
19283
  Status: (0, smithy_client_1.expectString)(output.Status),
19274
19284
  StatusMessage: (0, smithy_client_1.expectString)(output.StatusMessage)
@@ -19307,21 +19317,21 @@ var require_Aws_json1_1 = __commonJS({
19307
19317
  var deserializeAws_json1_1SecretListEntry = (output, context) => {
19308
19318
  return {
19309
19319
  ARN: (0, smithy_client_1.expectString)(output.ARN),
19310
- CreatedDate: output.CreatedDate !== void 0 && output.CreatedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedDate))) : void 0,
19311
- DeletedDate: output.DeletedDate !== void 0 && output.DeletedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DeletedDate))) : void 0,
19320
+ CreatedDate: output.CreatedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedDate))) : void 0,
19321
+ DeletedDate: output.DeletedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DeletedDate))) : void 0,
19312
19322
  Description: (0, smithy_client_1.expectString)(output.Description),
19313
19323
  KmsKeyId: (0, smithy_client_1.expectString)(output.KmsKeyId),
19314
- LastAccessedDate: output.LastAccessedDate !== void 0 && output.LastAccessedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastAccessedDate))) : void 0,
19315
- LastChangedDate: output.LastChangedDate !== void 0 && output.LastChangedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastChangedDate))) : void 0,
19316
- LastRotatedDate: output.LastRotatedDate !== void 0 && output.LastRotatedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastRotatedDate))) : void 0,
19324
+ LastAccessedDate: output.LastAccessedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastAccessedDate))) : void 0,
19325
+ LastChangedDate: output.LastChangedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastChangedDate))) : void 0,
19326
+ LastRotatedDate: output.LastRotatedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastRotatedDate))) : void 0,
19317
19327
  Name: (0, smithy_client_1.expectString)(output.Name),
19318
19328
  OwningService: (0, smithy_client_1.expectString)(output.OwningService),
19319
19329
  PrimaryRegion: (0, smithy_client_1.expectString)(output.PrimaryRegion),
19320
19330
  RotationEnabled: (0, smithy_client_1.expectBoolean)(output.RotationEnabled),
19321
19331
  RotationLambdaARN: (0, smithy_client_1.expectString)(output.RotationLambdaARN),
19322
- RotationRules: output.RotationRules !== void 0 && output.RotationRules !== null ? deserializeAws_json1_1RotationRulesType(output.RotationRules, context) : void 0,
19323
- SecretVersionsToStages: output.SecretVersionsToStages !== void 0 && output.SecretVersionsToStages !== null ? deserializeAws_json1_1SecretVersionsToStagesMapType(output.SecretVersionsToStages, context) : void 0,
19324
- Tags: output.Tags !== void 0 && output.Tags !== null ? deserializeAws_json1_1TagListType(output.Tags, context) : void 0
19332
+ RotationRules: output.RotationRules != null ? deserializeAws_json1_1RotationRulesType(output.RotationRules, context) : void 0,
19333
+ SecretVersionsToStages: output.SecretVersionsToStages != null ? deserializeAws_json1_1SecretVersionsToStagesMapType(output.SecretVersionsToStages, context) : void 0,
19334
+ Tags: output.Tags != null ? deserializeAws_json1_1TagListType(output.Tags, context) : void 0
19325
19335
  };
19326
19336
  };
19327
19337
  var deserializeAws_json1_1SecretListType = (output, context) => {
@@ -19335,11 +19345,11 @@ var require_Aws_json1_1 = __commonJS({
19335
19345
  };
19336
19346
  var deserializeAws_json1_1SecretVersionsListEntry = (output, context) => {
19337
19347
  return {
19338
- CreatedDate: output.CreatedDate !== void 0 && output.CreatedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedDate))) : void 0,
19339
- KmsKeyIds: output.KmsKeyIds !== void 0 && output.KmsKeyIds !== null ? deserializeAws_json1_1KmsKeyIdListType(output.KmsKeyIds, context) : void 0,
19340
- LastAccessedDate: output.LastAccessedDate !== void 0 && output.LastAccessedDate !== null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastAccessedDate))) : void 0,
19348
+ CreatedDate: output.CreatedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedDate))) : void 0,
19349
+ KmsKeyIds: output.KmsKeyIds != null ? deserializeAws_json1_1KmsKeyIdListType(output.KmsKeyIds, context) : void 0,
19350
+ LastAccessedDate: output.LastAccessedDate != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastAccessedDate))) : void 0,
19341
19351
  VersionId: (0, smithy_client_1.expectString)(output.VersionId),
19342
- VersionStages: output.VersionStages !== void 0 && output.VersionStages !== null ? deserializeAws_json1_1SecretVersionStagesType(output.VersionStages, context) : void 0
19352
+ VersionStages: output.VersionStages != null ? deserializeAws_json1_1SecretVersionStagesType(output.VersionStages, context) : void 0
19343
19353
  };
19344
19354
  };
19345
19355
  var deserializeAws_json1_1SecretVersionsListType = (output, context) => {
@@ -19407,7 +19417,7 @@ var require_Aws_json1_1 = __commonJS({
19407
19417
  var deserializeAws_json1_1ValidateResourcePolicyResponse = (output, context) => {
19408
19418
  return {
19409
19419
  PolicyValidationPassed: (0, smithy_client_1.expectBoolean)(output.PolicyValidationPassed),
19410
- ValidationErrors: output.ValidationErrors !== void 0 && output.ValidationErrors !== null ? deserializeAws_json1_1ValidationErrorsType(output.ValidationErrors, context) : void 0
19420
+ ValidationErrors: output.ValidationErrors != null ? deserializeAws_json1_1ValidationErrorsType(output.ValidationErrors, context) : void 0
19411
19421
  };
19412
19422
  };
19413
19423
  var deserializeAws_json1_1ValidationErrorsEntry = (output, context) => {
@@ -19469,6 +19479,12 @@ var require_Aws_json1_1 = __commonJS({
19469
19479
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
19470
19480
  const sanitizeErrorCode = (rawValue) => {
19471
19481
  let cleanValue = rawValue;
19482
+ if (typeof cleanValue === "number") {
19483
+ cleanValue = cleanValue.toString();
19484
+ }
19485
+ if (cleanValue.indexOf(",") >= 0) {
19486
+ cleanValue = cleanValue.split(",")[0];
19487
+ }
19472
19488
  if (cleanValue.indexOf(":") >= 0) {
19473
19489
  cleanValue = cleanValue.split(":")[0];
19474
19490
  }
@@ -19516,8 +19532,8 @@ var require_CancelRotateSecretCommand = __commonJS({
19516
19532
  logger: logger2,
19517
19533
  clientName,
19518
19534
  commandName,
19519
- inputFilterSensitiveLog: models_0_1.CancelRotateSecretRequest.filterSensitiveLog,
19520
- outputFilterSensitiveLog: models_0_1.CancelRotateSecretResponse.filterSensitiveLog
19535
+ inputFilterSensitiveLog: models_0_1.CancelRotateSecretRequestFilterSensitiveLog,
19536
+ outputFilterSensitiveLog: models_0_1.CancelRotateSecretResponseFilterSensitiveLog
19521
19537
  };
19522
19538
  const { requestHandler } = configuration;
19523
19539
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19558,8 +19574,8 @@ var require_CreateSecretCommand = __commonJS({
19558
19574
  logger: logger2,
19559
19575
  clientName,
19560
19576
  commandName,
19561
- inputFilterSensitiveLog: models_0_1.CreateSecretRequest.filterSensitiveLog,
19562
- outputFilterSensitiveLog: models_0_1.CreateSecretResponse.filterSensitiveLog
19577
+ inputFilterSensitiveLog: models_0_1.CreateSecretRequestFilterSensitiveLog,
19578
+ outputFilterSensitiveLog: models_0_1.CreateSecretResponseFilterSensitiveLog
19563
19579
  };
19564
19580
  const { requestHandler } = configuration;
19565
19581
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19600,8 +19616,8 @@ var require_DeleteResourcePolicyCommand = __commonJS({
19600
19616
  logger: logger2,
19601
19617
  clientName,
19602
19618
  commandName,
19603
- inputFilterSensitiveLog: models_0_1.DeleteResourcePolicyRequest.filterSensitiveLog,
19604
- outputFilterSensitiveLog: models_0_1.DeleteResourcePolicyResponse.filterSensitiveLog
19619
+ inputFilterSensitiveLog: models_0_1.DeleteResourcePolicyRequestFilterSensitiveLog,
19620
+ outputFilterSensitiveLog: models_0_1.DeleteResourcePolicyResponseFilterSensitiveLog
19605
19621
  };
19606
19622
  const { requestHandler } = configuration;
19607
19623
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19642,8 +19658,8 @@ var require_DeleteSecretCommand = __commonJS({
19642
19658
  logger: logger2,
19643
19659
  clientName,
19644
19660
  commandName,
19645
- inputFilterSensitiveLog: models_0_1.DeleteSecretRequest.filterSensitiveLog,
19646
- outputFilterSensitiveLog: models_0_1.DeleteSecretResponse.filterSensitiveLog
19661
+ inputFilterSensitiveLog: models_0_1.DeleteSecretRequestFilterSensitiveLog,
19662
+ outputFilterSensitiveLog: models_0_1.DeleteSecretResponseFilterSensitiveLog
19647
19663
  };
19648
19664
  const { requestHandler } = configuration;
19649
19665
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19684,8 +19700,8 @@ var require_DescribeSecretCommand = __commonJS({
19684
19700
  logger: logger2,
19685
19701
  clientName,
19686
19702
  commandName,
19687
- inputFilterSensitiveLog: models_0_1.DescribeSecretRequest.filterSensitiveLog,
19688
- outputFilterSensitiveLog: models_0_1.DescribeSecretResponse.filterSensitiveLog
19703
+ inputFilterSensitiveLog: models_0_1.DescribeSecretRequestFilterSensitiveLog,
19704
+ outputFilterSensitiveLog: models_0_1.DescribeSecretResponseFilterSensitiveLog
19689
19705
  };
19690
19706
  const { requestHandler } = configuration;
19691
19707
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19726,8 +19742,8 @@ var require_GetRandomPasswordCommand = __commonJS({
19726
19742
  logger: logger2,
19727
19743
  clientName,
19728
19744
  commandName,
19729
- inputFilterSensitiveLog: models_0_1.GetRandomPasswordRequest.filterSensitiveLog,
19730
- outputFilterSensitiveLog: models_0_1.GetRandomPasswordResponse.filterSensitiveLog
19745
+ inputFilterSensitiveLog: models_0_1.GetRandomPasswordRequestFilterSensitiveLog,
19746
+ outputFilterSensitiveLog: models_0_1.GetRandomPasswordResponseFilterSensitiveLog
19731
19747
  };
19732
19748
  const { requestHandler } = configuration;
19733
19749
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19768,8 +19784,8 @@ var require_GetResourcePolicyCommand = __commonJS({
19768
19784
  logger: logger2,
19769
19785
  clientName,
19770
19786
  commandName,
19771
- inputFilterSensitiveLog: models_0_1.GetResourcePolicyRequest.filterSensitiveLog,
19772
- outputFilterSensitiveLog: models_0_1.GetResourcePolicyResponse.filterSensitiveLog
19787
+ inputFilterSensitiveLog: models_0_1.GetResourcePolicyRequestFilterSensitiveLog,
19788
+ outputFilterSensitiveLog: models_0_1.GetResourcePolicyResponseFilterSensitiveLog
19773
19789
  };
19774
19790
  const { requestHandler } = configuration;
19775
19791
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19810,8 +19826,8 @@ var require_GetSecretValueCommand = __commonJS({
19810
19826
  logger: logger2,
19811
19827
  clientName,
19812
19828
  commandName,
19813
- inputFilterSensitiveLog: models_0_1.GetSecretValueRequest.filterSensitiveLog,
19814
- outputFilterSensitiveLog: models_0_1.GetSecretValueResponse.filterSensitiveLog
19829
+ inputFilterSensitiveLog: models_0_1.GetSecretValueRequestFilterSensitiveLog,
19830
+ outputFilterSensitiveLog: models_0_1.GetSecretValueResponseFilterSensitiveLog
19815
19831
  };
19816
19832
  const { requestHandler } = configuration;
19817
19833
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19852,8 +19868,8 @@ var require_ListSecretsCommand = __commonJS({
19852
19868
  logger: logger2,
19853
19869
  clientName,
19854
19870
  commandName,
19855
- inputFilterSensitiveLog: models_0_1.ListSecretsRequest.filterSensitiveLog,
19856
- outputFilterSensitiveLog: models_0_1.ListSecretsResponse.filterSensitiveLog
19871
+ inputFilterSensitiveLog: models_0_1.ListSecretsRequestFilterSensitiveLog,
19872
+ outputFilterSensitiveLog: models_0_1.ListSecretsResponseFilterSensitiveLog
19857
19873
  };
19858
19874
  const { requestHandler } = configuration;
19859
19875
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19894,8 +19910,8 @@ var require_ListSecretVersionIdsCommand = __commonJS({
19894
19910
  logger: logger2,
19895
19911
  clientName,
19896
19912
  commandName,
19897
- inputFilterSensitiveLog: models_0_1.ListSecretVersionIdsRequest.filterSensitiveLog,
19898
- outputFilterSensitiveLog: models_0_1.ListSecretVersionIdsResponse.filterSensitiveLog
19913
+ inputFilterSensitiveLog: models_0_1.ListSecretVersionIdsRequestFilterSensitiveLog,
19914
+ outputFilterSensitiveLog: models_0_1.ListSecretVersionIdsResponseFilterSensitiveLog
19899
19915
  };
19900
19916
  const { requestHandler } = configuration;
19901
19917
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19936,8 +19952,8 @@ var require_PutResourcePolicyCommand = __commonJS({
19936
19952
  logger: logger2,
19937
19953
  clientName,
19938
19954
  commandName,
19939
- inputFilterSensitiveLog: models_0_1.PutResourcePolicyRequest.filterSensitiveLog,
19940
- outputFilterSensitiveLog: models_0_1.PutResourcePolicyResponse.filterSensitiveLog
19955
+ inputFilterSensitiveLog: models_0_1.PutResourcePolicyRequestFilterSensitiveLog,
19956
+ outputFilterSensitiveLog: models_0_1.PutResourcePolicyResponseFilterSensitiveLog
19941
19957
  };
19942
19958
  const { requestHandler } = configuration;
19943
19959
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -19978,8 +19994,8 @@ var require_PutSecretValueCommand = __commonJS({
19978
19994
  logger: logger2,
19979
19995
  clientName,
19980
19996
  commandName,
19981
- inputFilterSensitiveLog: models_0_1.PutSecretValueRequest.filterSensitiveLog,
19982
- outputFilterSensitiveLog: models_0_1.PutSecretValueResponse.filterSensitiveLog
19997
+ inputFilterSensitiveLog: models_0_1.PutSecretValueRequestFilterSensitiveLog,
19998
+ outputFilterSensitiveLog: models_0_1.PutSecretValueResponseFilterSensitiveLog
19983
19999
  };
19984
20000
  const { requestHandler } = configuration;
19985
20001
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20020,8 +20036,8 @@ var require_RemoveRegionsFromReplicationCommand = __commonJS({
20020
20036
  logger: logger2,
20021
20037
  clientName,
20022
20038
  commandName,
20023
- inputFilterSensitiveLog: models_0_1.RemoveRegionsFromReplicationRequest.filterSensitiveLog,
20024
- outputFilterSensitiveLog: models_0_1.RemoveRegionsFromReplicationResponse.filterSensitiveLog
20039
+ inputFilterSensitiveLog: models_0_1.RemoveRegionsFromReplicationRequestFilterSensitiveLog,
20040
+ outputFilterSensitiveLog: models_0_1.RemoveRegionsFromReplicationResponseFilterSensitiveLog
20025
20041
  };
20026
20042
  const { requestHandler } = configuration;
20027
20043
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20062,8 +20078,8 @@ var require_ReplicateSecretToRegionsCommand = __commonJS({
20062
20078
  logger: logger2,
20063
20079
  clientName,
20064
20080
  commandName,
20065
- inputFilterSensitiveLog: models_0_1.ReplicateSecretToRegionsRequest.filterSensitiveLog,
20066
- outputFilterSensitiveLog: models_0_1.ReplicateSecretToRegionsResponse.filterSensitiveLog
20081
+ inputFilterSensitiveLog: models_0_1.ReplicateSecretToRegionsRequestFilterSensitiveLog,
20082
+ outputFilterSensitiveLog: models_0_1.ReplicateSecretToRegionsResponseFilterSensitiveLog
20067
20083
  };
20068
20084
  const { requestHandler } = configuration;
20069
20085
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20104,8 +20120,8 @@ var require_RestoreSecretCommand = __commonJS({
20104
20120
  logger: logger2,
20105
20121
  clientName,
20106
20122
  commandName,
20107
- inputFilterSensitiveLog: models_0_1.RestoreSecretRequest.filterSensitiveLog,
20108
- outputFilterSensitiveLog: models_0_1.RestoreSecretResponse.filterSensitiveLog
20123
+ inputFilterSensitiveLog: models_0_1.RestoreSecretRequestFilterSensitiveLog,
20124
+ outputFilterSensitiveLog: models_0_1.RestoreSecretResponseFilterSensitiveLog
20109
20125
  };
20110
20126
  const { requestHandler } = configuration;
20111
20127
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20146,8 +20162,8 @@ var require_RotateSecretCommand = __commonJS({
20146
20162
  logger: logger2,
20147
20163
  clientName,
20148
20164
  commandName,
20149
- inputFilterSensitiveLog: models_0_1.RotateSecretRequest.filterSensitiveLog,
20150
- outputFilterSensitiveLog: models_0_1.RotateSecretResponse.filterSensitiveLog
20165
+ inputFilterSensitiveLog: models_0_1.RotateSecretRequestFilterSensitiveLog,
20166
+ outputFilterSensitiveLog: models_0_1.RotateSecretResponseFilterSensitiveLog
20151
20167
  };
20152
20168
  const { requestHandler } = configuration;
20153
20169
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20188,8 +20204,8 @@ var require_StopReplicationToReplicaCommand = __commonJS({
20188
20204
  logger: logger2,
20189
20205
  clientName,
20190
20206
  commandName,
20191
- inputFilterSensitiveLog: models_0_1.StopReplicationToReplicaRequest.filterSensitiveLog,
20192
- outputFilterSensitiveLog: models_0_1.StopReplicationToReplicaResponse.filterSensitiveLog
20207
+ inputFilterSensitiveLog: models_0_1.StopReplicationToReplicaRequestFilterSensitiveLog,
20208
+ outputFilterSensitiveLog: models_0_1.StopReplicationToReplicaResponseFilterSensitiveLog
20193
20209
  };
20194
20210
  const { requestHandler } = configuration;
20195
20211
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20230,7 +20246,7 @@ var require_TagResourceCommand = __commonJS({
20230
20246
  logger: logger2,
20231
20247
  clientName,
20232
20248
  commandName,
20233
- inputFilterSensitiveLog: models_0_1.TagResourceRequest.filterSensitiveLog,
20249
+ inputFilterSensitiveLog: models_0_1.TagResourceRequestFilterSensitiveLog,
20234
20250
  outputFilterSensitiveLog: (output) => output
20235
20251
  };
20236
20252
  const { requestHandler } = configuration;
@@ -20272,7 +20288,7 @@ var require_UntagResourceCommand = __commonJS({
20272
20288
  logger: logger2,
20273
20289
  clientName,
20274
20290
  commandName,
20275
- inputFilterSensitiveLog: models_0_1.UntagResourceRequest.filterSensitiveLog,
20291
+ inputFilterSensitiveLog: models_0_1.UntagResourceRequestFilterSensitiveLog,
20276
20292
  outputFilterSensitiveLog: (output) => output
20277
20293
  };
20278
20294
  const { requestHandler } = configuration;
@@ -20314,8 +20330,8 @@ var require_UpdateSecretCommand = __commonJS({
20314
20330
  logger: logger2,
20315
20331
  clientName,
20316
20332
  commandName,
20317
- inputFilterSensitiveLog: models_0_1.UpdateSecretRequest.filterSensitiveLog,
20318
- outputFilterSensitiveLog: models_0_1.UpdateSecretResponse.filterSensitiveLog
20333
+ inputFilterSensitiveLog: models_0_1.UpdateSecretRequestFilterSensitiveLog,
20334
+ outputFilterSensitiveLog: models_0_1.UpdateSecretResponseFilterSensitiveLog
20319
20335
  };
20320
20336
  const { requestHandler } = configuration;
20321
20337
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20356,8 +20372,8 @@ var require_UpdateSecretVersionStageCommand = __commonJS({
20356
20372
  logger: logger2,
20357
20373
  clientName,
20358
20374
  commandName,
20359
- inputFilterSensitiveLog: models_0_1.UpdateSecretVersionStageRequest.filterSensitiveLog,
20360
- outputFilterSensitiveLog: models_0_1.UpdateSecretVersionStageResponse.filterSensitiveLog
20375
+ inputFilterSensitiveLog: models_0_1.UpdateSecretVersionStageRequestFilterSensitiveLog,
20376
+ outputFilterSensitiveLog: models_0_1.UpdateSecretVersionStageResponseFilterSensitiveLog
20361
20377
  };
20362
20378
  const { requestHandler } = configuration;
20363
20379
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20398,8 +20414,8 @@ var require_ValidateResourcePolicyCommand = __commonJS({
20398
20414
  logger: logger2,
20399
20415
  clientName,
20400
20416
  commandName,
20401
- inputFilterSensitiveLog: models_0_1.ValidateResourcePolicyRequest.filterSensitiveLog,
20402
- outputFilterSensitiveLog: models_0_1.ValidateResourcePolicyResponse.filterSensitiveLog
20417
+ inputFilterSensitiveLog: models_0_1.ValidateResourcePolicyRequestFilterSensitiveLog,
20418
+ outputFilterSensitiveLog: models_0_1.ValidateResourcePolicyResponseFilterSensitiveLog
20403
20419
  };
20404
20420
  const { requestHandler } = configuration;
20405
20421
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -21340,7 +21356,9 @@ var require_StandardRetryStrategy = __commonJS({
21340
21356
  attempts++;
21341
21357
  if (this.shouldRetry(err, attempts, maxAttempts)) {
21342
21358
  retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);
21343
- const delay = this.delayDecider((0, service_error_classification_1.isThrottlingError)(err) ? constants_1.THROTTLING_RETRY_DELAY_BASE : constants_1.DEFAULT_RETRY_DELAY_BASE, attempts);
21359
+ const delayFromDecider = this.delayDecider((0, service_error_classification_1.isThrottlingError)(err) ? constants_1.THROTTLING_RETRY_DELAY_BASE : constants_1.DEFAULT_RETRY_DELAY_BASE, attempts);
21360
+ const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
21361
+ const delay = Math.max(delayFromResponse || 0, delayFromDecider);
21344
21362
  totalDelay += delay;
21345
21363
  await new Promise((resolve) => setTimeout(resolve, delay));
21346
21364
  continue;
@@ -21356,6 +21374,19 @@ var require_StandardRetryStrategy = __commonJS({
21356
21374
  }
21357
21375
  };
21358
21376
  exports.StandardRetryStrategy = StandardRetryStrategy;
21377
+ var getDelayFromRetryAfterHeader = (response) => {
21378
+ if (!protocol_http_1.HttpResponse.isInstance(response))
21379
+ return;
21380
+ const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
21381
+ if (!retryAfterHeaderName)
21382
+ return;
21383
+ const retryAfter = response.headers[retryAfterHeaderName];
21384
+ const retryAfterSeconds = Number(retryAfter);
21385
+ if (!Number.isNaN(retryAfterSeconds))
21386
+ return retryAfterSeconds * 1e3;
21387
+ const retryAfterDate = new Date(retryAfter);
21388
+ return retryAfterDate.getTime() - Date.now();
21389
+ };
21359
21390
  var asSdkError = (error) => {
21360
21391
  if (error instanceof Error)
21361
21392
  return error;
@@ -21592,6 +21623,25 @@ var require_CredentialsProviderError = __commonJS({
21592
21623
  }
21593
21624
  });
21594
21625
 
21626
+ // node_modules/@aws-sdk/property-provider/dist-cjs/TokenProviderError.js
21627
+ var require_TokenProviderError = __commonJS({
21628
+ "node_modules/@aws-sdk/property-provider/dist-cjs/TokenProviderError.js"(exports) {
21629
+ "use strict";
21630
+ Object.defineProperty(exports, "__esModule", { value: true });
21631
+ exports.TokenProviderError = void 0;
21632
+ var ProviderError_1 = require_ProviderError();
21633
+ var TokenProviderError = class extends ProviderError_1.ProviderError {
21634
+ constructor(message, tryNextLink = true) {
21635
+ super(message, tryNextLink);
21636
+ this.tryNextLink = tryNextLink;
21637
+ this.name = "TokenProviderError";
21638
+ Object.setPrototypeOf(this, TokenProviderError.prototype);
21639
+ }
21640
+ };
21641
+ exports.TokenProviderError = TokenProviderError;
21642
+ }
21643
+ });
21644
+
21595
21645
  // node_modules/@aws-sdk/property-provider/dist-cjs/chain.js
21596
21646
  var require_chain = __commonJS({
21597
21647
  "node_modules/@aws-sdk/property-provider/dist-cjs/chain.js"(exports) {
@@ -21690,6 +21740,7 @@ var require_dist_cjs14 = __commonJS({
21690
21740
  var tslib_1 = require_tslib();
21691
21741
  tslib_1.__exportStar(require_CredentialsProviderError(), exports);
21692
21742
  tslib_1.__exportStar(require_ProviderError(), exports);
21743
+ tslib_1.__exportStar(require_TokenProviderError(), exports);
21693
21744
  tslib_1.__exportStar(require_chain(), exports);
21694
21745
  tslib_1.__exportStar(require_fromStatic(), exports);
21695
21746
  tslib_1.__exportStar(require_memoize(), exports);
@@ -21845,6 +21896,9 @@ var require_getCanonicalHeaders = __commonJS({
21845
21896
  var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
21846
21897
  const canonical = {};
21847
21898
  for (const headerName of Object.keys(headers).sort()) {
21899
+ if (headers[headerName] == void 0) {
21900
+ continue;
21901
+ }
21848
21902
  const canonicalHeaderName = headerName.toLowerCase();
21849
21903
  if (canonicalHeaderName in constants_1.ALWAYS_UNSIGNABLE_HEADERS || (unsignableHeaders === null || unsignableHeaders === void 0 ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || constants_1.PROXY_HEADER_PATTERN.test(canonicalHeaderName) || constants_1.SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
21850
21904
  if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {
@@ -22124,6 +22178,7 @@ var require_SignatureV4 = __commonJS({
22124
22178
  async presign(originalRequest, options = {}) {
22125
22179
  const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, signingRegion, signingService } = options;
22126
22180
  const credentials = await this.credentialProvider();
22181
+ this.validateResolvedCredentials(credentials);
22127
22182
  const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : await this.regionProvider();
22128
22183
  const { longDate, shortDate } = formatDate(signingDate);
22129
22184
  if (expiresIn > constants_1.MAX_PRESIGNED_TTL) {
@@ -22172,6 +22227,7 @@ var require_SignatureV4 = __commonJS({
22172
22227
  }
22173
22228
  async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) {
22174
22229
  const credentials = await this.credentialProvider();
22230
+ this.validateResolvedCredentials(credentials);
22175
22231
  const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : await this.regionProvider();
22176
22232
  const { shortDate } = formatDate(signingDate);
22177
22233
  const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
@@ -22180,6 +22236,7 @@ var require_SignatureV4 = __commonJS({
22180
22236
  }
22181
22237
  async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
22182
22238
  const credentials = await this.credentialProvider();
22239
+ this.validateResolvedCredentials(credentials);
22183
22240
  const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : await this.regionProvider();
22184
22241
  const request = (0, prepareRequest_1.prepareRequest)(requestToSign);
22185
22242
  const { longDate, shortDate } = formatDate(signingDate);
@@ -22245,6 +22302,11 @@ ${(0, util_hex_encoding_1.toHex)(hashedRequest)}`;
22245
22302
  getSigningKey(credentials, region, shortDate, service) {
22246
22303
  return (0, credentialDerivation_1.getSigningKey)(this.sha256, credentials, shortDate, region, service || this.service);
22247
22304
  }
22305
+ validateResolvedCredentials(credentials) {
22306
+ if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
22307
+ throw new Error("Resolved credential object is not valid");
22308
+ }
22309
+ }
22248
22310
  };
22249
22311
  exports.SignatureV4 = SignatureV4;
22250
22312
  var formatDate = (now) => {
@@ -22592,12 +22654,13 @@ var require_package3 = __commonJS({
22592
22654
  module2.exports = {
22593
22655
  name: "@aws-sdk/client-secrets-manager",
22594
22656
  description: "AWS SDK for JavaScript Secrets Manager Client for Node.js, Browser and React Native",
22595
- version: "3.121.0",
22657
+ version: "3.171.0",
22596
22658
  scripts: {
22597
22659
  build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
22598
22660
  "build:cjs": "tsc -p tsconfig.cjs.json",
22599
22661
  "build:docs": "typedoc",
22600
22662
  "build:es": "tsc -p tsconfig.es.json",
22663
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
22601
22664
  "build:types": "tsc -p tsconfig.types.json",
22602
22665
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
22603
22666
  clean: "rimraf ./dist-* && rimraf *.tsbuildinfo"
@@ -22609,51 +22672,56 @@ var require_package3 = __commonJS({
22609
22672
  dependencies: {
22610
22673
  "@aws-crypto/sha256-browser": "2.0.0",
22611
22674
  "@aws-crypto/sha256-js": "2.0.0",
22612
- "@aws-sdk/client-sts": "3.121.0",
22613
- "@aws-sdk/config-resolver": "3.110.0",
22614
- "@aws-sdk/credential-provider-node": "3.121.0",
22615
- "@aws-sdk/fetch-http-handler": "3.110.0",
22616
- "@aws-sdk/hash-node": "3.110.0",
22617
- "@aws-sdk/invalid-dependency": "3.110.0",
22618
- "@aws-sdk/middleware-content-length": "3.110.0",
22619
- "@aws-sdk/middleware-host-header": "3.110.0",
22620
- "@aws-sdk/middleware-logger": "3.110.0",
22621
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
22622
- "@aws-sdk/middleware-retry": "3.118.1",
22623
- "@aws-sdk/middleware-serde": "3.110.0",
22624
- "@aws-sdk/middleware-signing": "3.110.0",
22625
- "@aws-sdk/middleware-stack": "3.110.0",
22626
- "@aws-sdk/middleware-user-agent": "3.110.0",
22627
- "@aws-sdk/node-config-provider": "3.110.0",
22628
- "@aws-sdk/node-http-handler": "3.118.1",
22629
- "@aws-sdk/protocol-http": "3.110.0",
22630
- "@aws-sdk/smithy-client": "3.110.0",
22631
- "@aws-sdk/types": "3.110.0",
22632
- "@aws-sdk/url-parser": "3.110.0",
22633
- "@aws-sdk/util-base64-browser": "3.109.0",
22634
- "@aws-sdk/util-base64-node": "3.55.0",
22635
- "@aws-sdk/util-body-length-browser": "3.55.0",
22636
- "@aws-sdk/util-body-length-node": "3.55.0",
22637
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
22638
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
22639
- "@aws-sdk/util-user-agent-browser": "3.110.0",
22640
- "@aws-sdk/util-user-agent-node": "3.118.0",
22641
- "@aws-sdk/util-utf8-browser": "3.109.0",
22642
- "@aws-sdk/util-utf8-node": "3.109.0",
22675
+ "@aws-sdk/client-sts": "3.171.0",
22676
+ "@aws-sdk/config-resolver": "3.171.0",
22677
+ "@aws-sdk/credential-provider-node": "3.171.0",
22678
+ "@aws-sdk/fetch-http-handler": "3.171.0",
22679
+ "@aws-sdk/hash-node": "3.171.0",
22680
+ "@aws-sdk/invalid-dependency": "3.171.0",
22681
+ "@aws-sdk/middleware-content-length": "3.171.0",
22682
+ "@aws-sdk/middleware-host-header": "3.171.0",
22683
+ "@aws-sdk/middleware-logger": "3.171.0",
22684
+ "@aws-sdk/middleware-recursion-detection": "3.171.0",
22685
+ "@aws-sdk/middleware-retry": "3.171.0",
22686
+ "@aws-sdk/middleware-serde": "3.171.0",
22687
+ "@aws-sdk/middleware-signing": "3.171.0",
22688
+ "@aws-sdk/middleware-stack": "3.171.0",
22689
+ "@aws-sdk/middleware-user-agent": "3.171.0",
22690
+ "@aws-sdk/node-config-provider": "3.171.0",
22691
+ "@aws-sdk/node-http-handler": "3.171.0",
22692
+ "@aws-sdk/protocol-http": "3.171.0",
22693
+ "@aws-sdk/smithy-client": "3.171.0",
22694
+ "@aws-sdk/types": "3.171.0",
22695
+ "@aws-sdk/url-parser": "3.171.0",
22696
+ "@aws-sdk/util-base64-browser": "3.170.0",
22697
+ "@aws-sdk/util-base64-node": "3.170.0",
22698
+ "@aws-sdk/util-body-length-browser": "3.170.0",
22699
+ "@aws-sdk/util-body-length-node": "3.170.0",
22700
+ "@aws-sdk/util-defaults-mode-browser": "3.171.0",
22701
+ "@aws-sdk/util-defaults-mode-node": "3.171.0",
22702
+ "@aws-sdk/util-user-agent-browser": "3.171.0",
22703
+ "@aws-sdk/util-user-agent-node": "3.171.0",
22704
+ "@aws-sdk/util-utf8-browser": "3.170.0",
22705
+ "@aws-sdk/util-utf8-node": "3.170.0",
22643
22706
  tslib: "^2.3.1",
22644
22707
  uuid: "^8.3.2"
22645
22708
  },
22646
22709
  devDependencies: {
22647
- "@aws-sdk/service-client-documentation-generator": "3.58.0",
22710
+ "@aws-sdk/service-client-documentation-generator": "3.170.0",
22648
22711
  "@tsconfig/recommended": "1.0.1",
22649
22712
  "@types/node": "^12.7.5",
22650
22713
  "@types/uuid": "^8.3.0",
22651
22714
  concurrently: "7.0.0",
22652
- "downlevel-dts": "0.7.0",
22715
+ "downlevel-dts": "0.10.1",
22653
22716
  rimraf: "3.0.2",
22654
22717
  typedoc: "0.19.2",
22655
22718
  typescript: "~4.6.2"
22656
22719
  },
22720
+ overrides: {
22721
+ typedoc: {
22722
+ typescript: "~4.6.2"
22723
+ }
22724
+ },
22657
22725
  engines: {
22658
22726
  node: ">=12.0.0"
22659
22727
  },
@@ -22710,44 +22778,8 @@ var require_models_02 = __commonJS({
22710
22778
  "node_modules/@aws-sdk/client-sts/dist-cjs/models/models_0.js"(exports) {
22711
22779
  "use strict";
22712
22780
  Object.defineProperty(exports, "__esModule", { value: true });
22713
- exports.GetSessionTokenResponse = exports.GetSessionTokenRequest = exports.GetFederationTokenResponse = exports.FederatedUser = exports.GetFederationTokenRequest = exports.GetCallerIdentityResponse = exports.GetCallerIdentityRequest = exports.GetAccessKeyInfoResponse = exports.GetAccessKeyInfoRequest = exports.InvalidAuthorizationMessageException = exports.DecodeAuthorizationMessageResponse = exports.DecodeAuthorizationMessageRequest = exports.IDPCommunicationErrorException = exports.AssumeRoleWithWebIdentityResponse = exports.AssumeRoleWithWebIdentityRequest = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.AssumeRoleWithSAMLResponse = exports.AssumeRoleWithSAMLRequest = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = exports.AssumeRoleResponse = exports.Credentials = exports.AssumeRoleRequest = exports.Tag = exports.PolicyDescriptorType = exports.AssumedRoleUser = void 0;
22781
+ exports.GetSessionTokenResponseFilterSensitiveLog = exports.GetSessionTokenRequestFilterSensitiveLog = exports.GetFederationTokenResponseFilterSensitiveLog = exports.FederatedUserFilterSensitiveLog = exports.GetFederationTokenRequestFilterSensitiveLog = exports.GetCallerIdentityResponseFilterSensitiveLog = exports.GetCallerIdentityRequestFilterSensitiveLog = exports.GetAccessKeyInfoResponseFilterSensitiveLog = exports.GetAccessKeyInfoRequestFilterSensitiveLog = exports.DecodeAuthorizationMessageResponseFilterSensitiveLog = exports.DecodeAuthorizationMessageRequestFilterSensitiveLog = exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = exports.AssumeRoleResponseFilterSensitiveLog = exports.CredentialsFilterSensitiveLog = exports.AssumeRoleRequestFilterSensitiveLog = exports.TagFilterSensitiveLog = exports.PolicyDescriptorTypeFilterSensitiveLog = exports.AssumedRoleUserFilterSensitiveLog = exports.InvalidAuthorizationMessageException = exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0;
22714
22782
  var STSServiceException_1 = require_STSServiceException();
22715
- var AssumedRoleUser;
22716
- (function(AssumedRoleUser2) {
22717
- AssumedRoleUser2.filterSensitiveLog = (obj) => ({
22718
- ...obj
22719
- });
22720
- })(AssumedRoleUser = exports.AssumedRoleUser || (exports.AssumedRoleUser = {}));
22721
- var PolicyDescriptorType;
22722
- (function(PolicyDescriptorType2) {
22723
- PolicyDescriptorType2.filterSensitiveLog = (obj) => ({
22724
- ...obj
22725
- });
22726
- })(PolicyDescriptorType = exports.PolicyDescriptorType || (exports.PolicyDescriptorType = {}));
22727
- var Tag;
22728
- (function(Tag2) {
22729
- Tag2.filterSensitiveLog = (obj) => ({
22730
- ...obj
22731
- });
22732
- })(Tag = exports.Tag || (exports.Tag = {}));
22733
- var AssumeRoleRequest;
22734
- (function(AssumeRoleRequest2) {
22735
- AssumeRoleRequest2.filterSensitiveLog = (obj) => ({
22736
- ...obj
22737
- });
22738
- })(AssumeRoleRequest = exports.AssumeRoleRequest || (exports.AssumeRoleRequest = {}));
22739
- var Credentials;
22740
- (function(Credentials2) {
22741
- Credentials2.filterSensitiveLog = (obj) => ({
22742
- ...obj
22743
- });
22744
- })(Credentials = exports.Credentials || (exports.Credentials = {}));
22745
- var AssumeRoleResponse;
22746
- (function(AssumeRoleResponse2) {
22747
- AssumeRoleResponse2.filterSensitiveLog = (obj) => ({
22748
- ...obj
22749
- });
22750
- })(AssumeRoleResponse = exports.AssumeRoleResponse || (exports.AssumeRoleResponse = {}));
22751
22783
  var ExpiredTokenException = class extends STSServiceException_1.STSServiceException {
22752
22784
  constructor(opts) {
22753
22785
  super({
@@ -22800,18 +22832,6 @@ var require_models_02 = __commonJS({
22800
22832
  }
22801
22833
  };
22802
22834
  exports.RegionDisabledException = RegionDisabledException;
22803
- var AssumeRoleWithSAMLRequest;
22804
- (function(AssumeRoleWithSAMLRequest2) {
22805
- AssumeRoleWithSAMLRequest2.filterSensitiveLog = (obj) => ({
22806
- ...obj
22807
- });
22808
- })(AssumeRoleWithSAMLRequest = exports.AssumeRoleWithSAMLRequest || (exports.AssumeRoleWithSAMLRequest = {}));
22809
- var AssumeRoleWithSAMLResponse;
22810
- (function(AssumeRoleWithSAMLResponse2) {
22811
- AssumeRoleWithSAMLResponse2.filterSensitiveLog = (obj) => ({
22812
- ...obj
22813
- });
22814
- })(AssumeRoleWithSAMLResponse = exports.AssumeRoleWithSAMLResponse || (exports.AssumeRoleWithSAMLResponse = {}));
22815
22835
  var IDPRejectedClaimException = class extends STSServiceException_1.STSServiceException {
22816
22836
  constructor(opts) {
22817
22837
  super({
@@ -22838,18 +22858,6 @@ var require_models_02 = __commonJS({
22838
22858
  }
22839
22859
  };
22840
22860
  exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
22841
- var AssumeRoleWithWebIdentityRequest;
22842
- (function(AssumeRoleWithWebIdentityRequest2) {
22843
- AssumeRoleWithWebIdentityRequest2.filterSensitiveLog = (obj) => ({
22844
- ...obj
22845
- });
22846
- })(AssumeRoleWithWebIdentityRequest = exports.AssumeRoleWithWebIdentityRequest || (exports.AssumeRoleWithWebIdentityRequest = {}));
22847
- var AssumeRoleWithWebIdentityResponse;
22848
- (function(AssumeRoleWithWebIdentityResponse2) {
22849
- AssumeRoleWithWebIdentityResponse2.filterSensitiveLog = (obj) => ({
22850
- ...obj
22851
- });
22852
- })(AssumeRoleWithWebIdentityResponse = exports.AssumeRoleWithWebIdentityResponse || (exports.AssumeRoleWithWebIdentityResponse = {}));
22853
22861
  var IDPCommunicationErrorException = class extends STSServiceException_1.STSServiceException {
22854
22862
  constructor(opts) {
22855
22863
  super({
@@ -22863,18 +22871,6 @@ var require_models_02 = __commonJS({
22863
22871
  }
22864
22872
  };
22865
22873
  exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
22866
- var DecodeAuthorizationMessageRequest;
22867
- (function(DecodeAuthorizationMessageRequest2) {
22868
- DecodeAuthorizationMessageRequest2.filterSensitiveLog = (obj) => ({
22869
- ...obj
22870
- });
22871
- })(DecodeAuthorizationMessageRequest = exports.DecodeAuthorizationMessageRequest || (exports.DecodeAuthorizationMessageRequest = {}));
22872
- var DecodeAuthorizationMessageResponse;
22873
- (function(DecodeAuthorizationMessageResponse2) {
22874
- DecodeAuthorizationMessageResponse2.filterSensitiveLog = (obj) => ({
22875
- ...obj
22876
- });
22877
- })(DecodeAuthorizationMessageResponse = exports.DecodeAuthorizationMessageResponse || (exports.DecodeAuthorizationMessageResponse = {}));
22878
22874
  var InvalidAuthorizationMessageException = class extends STSServiceException_1.STSServiceException {
22879
22875
  constructor(opts) {
22880
22876
  super({
@@ -22888,60 +22884,90 @@ var require_models_02 = __commonJS({
22888
22884
  }
22889
22885
  };
22890
22886
  exports.InvalidAuthorizationMessageException = InvalidAuthorizationMessageException;
22891
- var GetAccessKeyInfoRequest;
22892
- (function(GetAccessKeyInfoRequest2) {
22893
- GetAccessKeyInfoRequest2.filterSensitiveLog = (obj) => ({
22894
- ...obj
22895
- });
22896
- })(GetAccessKeyInfoRequest = exports.GetAccessKeyInfoRequest || (exports.GetAccessKeyInfoRequest = {}));
22897
- var GetAccessKeyInfoResponse;
22898
- (function(GetAccessKeyInfoResponse2) {
22899
- GetAccessKeyInfoResponse2.filterSensitiveLog = (obj) => ({
22900
- ...obj
22901
- });
22902
- })(GetAccessKeyInfoResponse = exports.GetAccessKeyInfoResponse || (exports.GetAccessKeyInfoResponse = {}));
22903
- var GetCallerIdentityRequest;
22904
- (function(GetCallerIdentityRequest2) {
22905
- GetCallerIdentityRequest2.filterSensitiveLog = (obj) => ({
22906
- ...obj
22907
- });
22908
- })(GetCallerIdentityRequest = exports.GetCallerIdentityRequest || (exports.GetCallerIdentityRequest = {}));
22909
- var GetCallerIdentityResponse;
22910
- (function(GetCallerIdentityResponse2) {
22911
- GetCallerIdentityResponse2.filterSensitiveLog = (obj) => ({
22912
- ...obj
22913
- });
22914
- })(GetCallerIdentityResponse = exports.GetCallerIdentityResponse || (exports.GetCallerIdentityResponse = {}));
22915
- var GetFederationTokenRequest;
22916
- (function(GetFederationTokenRequest2) {
22917
- GetFederationTokenRequest2.filterSensitiveLog = (obj) => ({
22918
- ...obj
22919
- });
22920
- })(GetFederationTokenRequest = exports.GetFederationTokenRequest || (exports.GetFederationTokenRequest = {}));
22921
- var FederatedUser;
22922
- (function(FederatedUser2) {
22923
- FederatedUser2.filterSensitiveLog = (obj) => ({
22924
- ...obj
22925
- });
22926
- })(FederatedUser = exports.FederatedUser || (exports.FederatedUser = {}));
22927
- var GetFederationTokenResponse;
22928
- (function(GetFederationTokenResponse2) {
22929
- GetFederationTokenResponse2.filterSensitiveLog = (obj) => ({
22930
- ...obj
22931
- });
22932
- })(GetFederationTokenResponse = exports.GetFederationTokenResponse || (exports.GetFederationTokenResponse = {}));
22933
- var GetSessionTokenRequest;
22934
- (function(GetSessionTokenRequest2) {
22935
- GetSessionTokenRequest2.filterSensitiveLog = (obj) => ({
22936
- ...obj
22937
- });
22938
- })(GetSessionTokenRequest = exports.GetSessionTokenRequest || (exports.GetSessionTokenRequest = {}));
22939
- var GetSessionTokenResponse;
22940
- (function(GetSessionTokenResponse2) {
22941
- GetSessionTokenResponse2.filterSensitiveLog = (obj) => ({
22942
- ...obj
22943
- });
22944
- })(GetSessionTokenResponse = exports.GetSessionTokenResponse || (exports.GetSessionTokenResponse = {}));
22887
+ var AssumedRoleUserFilterSensitiveLog = (obj) => ({
22888
+ ...obj
22889
+ });
22890
+ exports.AssumedRoleUserFilterSensitiveLog = AssumedRoleUserFilterSensitiveLog;
22891
+ var PolicyDescriptorTypeFilterSensitiveLog = (obj) => ({
22892
+ ...obj
22893
+ });
22894
+ exports.PolicyDescriptorTypeFilterSensitiveLog = PolicyDescriptorTypeFilterSensitiveLog;
22895
+ var TagFilterSensitiveLog = (obj) => ({
22896
+ ...obj
22897
+ });
22898
+ exports.TagFilterSensitiveLog = TagFilterSensitiveLog;
22899
+ var AssumeRoleRequestFilterSensitiveLog = (obj) => ({
22900
+ ...obj
22901
+ });
22902
+ exports.AssumeRoleRequestFilterSensitiveLog = AssumeRoleRequestFilterSensitiveLog;
22903
+ var CredentialsFilterSensitiveLog = (obj) => ({
22904
+ ...obj
22905
+ });
22906
+ exports.CredentialsFilterSensitiveLog = CredentialsFilterSensitiveLog;
22907
+ var AssumeRoleResponseFilterSensitiveLog = (obj) => ({
22908
+ ...obj
22909
+ });
22910
+ exports.AssumeRoleResponseFilterSensitiveLog = AssumeRoleResponseFilterSensitiveLog;
22911
+ var AssumeRoleWithSAMLRequestFilterSensitiveLog = (obj) => ({
22912
+ ...obj
22913
+ });
22914
+ exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = AssumeRoleWithSAMLRequestFilterSensitiveLog;
22915
+ var AssumeRoleWithSAMLResponseFilterSensitiveLog = (obj) => ({
22916
+ ...obj
22917
+ });
22918
+ exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = AssumeRoleWithSAMLResponseFilterSensitiveLog;
22919
+ var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({
22920
+ ...obj
22921
+ });
22922
+ exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = AssumeRoleWithWebIdentityRequestFilterSensitiveLog;
22923
+ var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({
22924
+ ...obj
22925
+ });
22926
+ exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = AssumeRoleWithWebIdentityResponseFilterSensitiveLog;
22927
+ var DecodeAuthorizationMessageRequestFilterSensitiveLog = (obj) => ({
22928
+ ...obj
22929
+ });
22930
+ exports.DecodeAuthorizationMessageRequestFilterSensitiveLog = DecodeAuthorizationMessageRequestFilterSensitiveLog;
22931
+ var DecodeAuthorizationMessageResponseFilterSensitiveLog = (obj) => ({
22932
+ ...obj
22933
+ });
22934
+ exports.DecodeAuthorizationMessageResponseFilterSensitiveLog = DecodeAuthorizationMessageResponseFilterSensitiveLog;
22935
+ var GetAccessKeyInfoRequestFilterSensitiveLog = (obj) => ({
22936
+ ...obj
22937
+ });
22938
+ exports.GetAccessKeyInfoRequestFilterSensitiveLog = GetAccessKeyInfoRequestFilterSensitiveLog;
22939
+ var GetAccessKeyInfoResponseFilterSensitiveLog = (obj) => ({
22940
+ ...obj
22941
+ });
22942
+ exports.GetAccessKeyInfoResponseFilterSensitiveLog = GetAccessKeyInfoResponseFilterSensitiveLog;
22943
+ var GetCallerIdentityRequestFilterSensitiveLog = (obj) => ({
22944
+ ...obj
22945
+ });
22946
+ exports.GetCallerIdentityRequestFilterSensitiveLog = GetCallerIdentityRequestFilterSensitiveLog;
22947
+ var GetCallerIdentityResponseFilterSensitiveLog = (obj) => ({
22948
+ ...obj
22949
+ });
22950
+ exports.GetCallerIdentityResponseFilterSensitiveLog = GetCallerIdentityResponseFilterSensitiveLog;
22951
+ var GetFederationTokenRequestFilterSensitiveLog = (obj) => ({
22952
+ ...obj
22953
+ });
22954
+ exports.GetFederationTokenRequestFilterSensitiveLog = GetFederationTokenRequestFilterSensitiveLog;
22955
+ var FederatedUserFilterSensitiveLog = (obj) => ({
22956
+ ...obj
22957
+ });
22958
+ exports.FederatedUserFilterSensitiveLog = FederatedUserFilterSensitiveLog;
22959
+ var GetFederationTokenResponseFilterSensitiveLog = (obj) => ({
22960
+ ...obj
22961
+ });
22962
+ exports.GetFederationTokenResponseFilterSensitiveLog = GetFederationTokenResponseFilterSensitiveLog;
22963
+ var GetSessionTokenRequestFilterSensitiveLog = (obj) => ({
22964
+ ...obj
22965
+ });
22966
+ exports.GetSessionTokenRequestFilterSensitiveLog = GetSessionTokenRequestFilterSensitiveLog;
22967
+ var GetSessionTokenResponseFilterSensitiveLog = (obj) => ({
22968
+ ...obj
22969
+ });
22970
+ exports.GetSessionTokenResponseFilterSensitiveLog = GetSessionTokenResponseFilterSensitiveLog;
22945
22971
  }
22946
22972
  });
22947
22973
 
@@ -24498,7 +24524,6 @@ var require_Aws_query = __commonJS({
24498
24524
  ...output,
24499
24525
  body: await parseBody(output.body, context)
24500
24526
  };
24501
- let response;
24502
24527
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
24503
24528
  switch (errorCode) {
24504
24529
  case "ExpiredTokenException":
@@ -24515,14 +24540,12 @@ var require_Aws_query = __commonJS({
24515
24540
  throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
24516
24541
  default:
24517
24542
  const parsedBody = parsedOutput.body;
24518
- const $metadata = deserializeMetadata(output);
24519
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
24520
- response = new STSServiceException_1.STSServiceException({
24521
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
24522
- $fault: "client",
24523
- $metadata
24543
+ (0, smithy_client_1.throwDefaultError)({
24544
+ output,
24545
+ parsedBody: parsedBody.Error,
24546
+ exceptionCtor: STSServiceException_1.STSServiceException,
24547
+ errorCode
24524
24548
  });
24525
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
24526
24549
  }
24527
24550
  };
24528
24551
  var deserializeAws_queryAssumeRoleWithSAMLCommand = async (output, context) => {
@@ -24544,7 +24567,6 @@ var require_Aws_query = __commonJS({
24544
24567
  ...output,
24545
24568
  body: await parseBody(output.body, context)
24546
24569
  };
24547
- let response;
24548
24570
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
24549
24571
  switch (errorCode) {
24550
24572
  case "ExpiredTokenException":
@@ -24567,14 +24589,12 @@ var require_Aws_query = __commonJS({
24567
24589
  throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
24568
24590
  default:
24569
24591
  const parsedBody = parsedOutput.body;
24570
- const $metadata = deserializeMetadata(output);
24571
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
24572
- response = new STSServiceException_1.STSServiceException({
24573
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
24574
- $fault: "client",
24575
- $metadata
24592
+ (0, smithy_client_1.throwDefaultError)({
24593
+ output,
24594
+ parsedBody: parsedBody.Error,
24595
+ exceptionCtor: STSServiceException_1.STSServiceException,
24596
+ errorCode
24576
24597
  });
24577
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
24578
24598
  }
24579
24599
  };
24580
24600
  var deserializeAws_queryAssumeRoleWithWebIdentityCommand = async (output, context) => {
@@ -24596,7 +24616,6 @@ var require_Aws_query = __commonJS({
24596
24616
  ...output,
24597
24617
  body: await parseBody(output.body, context)
24598
24618
  };
24599
- let response;
24600
24619
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
24601
24620
  switch (errorCode) {
24602
24621
  case "ExpiredTokenException":
@@ -24622,14 +24641,12 @@ var require_Aws_query = __commonJS({
24622
24641
  throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
24623
24642
  default:
24624
24643
  const parsedBody = parsedOutput.body;
24625
- const $metadata = deserializeMetadata(output);
24626
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
24627
- response = new STSServiceException_1.STSServiceException({
24628
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
24629
- $fault: "client",
24630
- $metadata
24644
+ (0, smithy_client_1.throwDefaultError)({
24645
+ output,
24646
+ parsedBody: parsedBody.Error,
24647
+ exceptionCtor: STSServiceException_1.STSServiceException,
24648
+ errorCode
24631
24649
  });
24632
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
24633
24650
  }
24634
24651
  };
24635
24652
  var deserializeAws_queryDecodeAuthorizationMessageCommand = async (output, context) => {
@@ -24651,7 +24668,6 @@ var require_Aws_query = __commonJS({
24651
24668
  ...output,
24652
24669
  body: await parseBody(output.body, context)
24653
24670
  };
24654
- let response;
24655
24671
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
24656
24672
  switch (errorCode) {
24657
24673
  case "InvalidAuthorizationMessageException":
@@ -24659,14 +24675,12 @@ var require_Aws_query = __commonJS({
24659
24675
  throw await deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context);
24660
24676
  default:
24661
24677
  const parsedBody = parsedOutput.body;
24662
- const $metadata = deserializeMetadata(output);
24663
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
24664
- response = new STSServiceException_1.STSServiceException({
24665
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
24666
- $fault: "client",
24667
- $metadata
24678
+ (0, smithy_client_1.throwDefaultError)({
24679
+ output,
24680
+ parsedBody: parsedBody.Error,
24681
+ exceptionCtor: STSServiceException_1.STSServiceException,
24682
+ errorCode
24668
24683
  });
24669
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
24670
24684
  }
24671
24685
  };
24672
24686
  var deserializeAws_queryGetAccessKeyInfoCommand = async (output, context) => {
@@ -24688,20 +24702,14 @@ var require_Aws_query = __commonJS({
24688
24702
  ...output,
24689
24703
  body: await parseBody(output.body, context)
24690
24704
  };
24691
- let response;
24692
24705
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
24693
- switch (errorCode) {
24694
- default:
24695
- const parsedBody = parsedOutput.body;
24696
- const $metadata = deserializeMetadata(output);
24697
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
24698
- response = new STSServiceException_1.STSServiceException({
24699
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
24700
- $fault: "client",
24701
- $metadata
24702
- });
24703
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
24704
- }
24706
+ const parsedBody = parsedOutput.body;
24707
+ (0, smithy_client_1.throwDefaultError)({
24708
+ output,
24709
+ parsedBody: parsedBody.Error,
24710
+ exceptionCtor: STSServiceException_1.STSServiceException,
24711
+ errorCode
24712
+ });
24705
24713
  };
24706
24714
  var deserializeAws_queryGetCallerIdentityCommand = async (output, context) => {
24707
24715
  if (output.statusCode >= 300) {
@@ -24722,20 +24730,14 @@ var require_Aws_query = __commonJS({
24722
24730
  ...output,
24723
24731
  body: await parseBody(output.body, context)
24724
24732
  };
24725
- let response;
24726
24733
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
24727
- switch (errorCode) {
24728
- default:
24729
- const parsedBody = parsedOutput.body;
24730
- const $metadata = deserializeMetadata(output);
24731
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
24732
- response = new STSServiceException_1.STSServiceException({
24733
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
24734
- $fault: "client",
24735
- $metadata
24736
- });
24737
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
24738
- }
24734
+ const parsedBody = parsedOutput.body;
24735
+ (0, smithy_client_1.throwDefaultError)({
24736
+ output,
24737
+ parsedBody: parsedBody.Error,
24738
+ exceptionCtor: STSServiceException_1.STSServiceException,
24739
+ errorCode
24740
+ });
24739
24741
  };
24740
24742
  var deserializeAws_queryGetFederationTokenCommand = async (output, context) => {
24741
24743
  if (output.statusCode >= 300) {
@@ -24756,7 +24758,6 @@ var require_Aws_query = __commonJS({
24756
24758
  ...output,
24757
24759
  body: await parseBody(output.body, context)
24758
24760
  };
24759
- let response;
24760
24761
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
24761
24762
  switch (errorCode) {
24762
24763
  case "MalformedPolicyDocumentException":
@@ -24770,14 +24771,12 @@ var require_Aws_query = __commonJS({
24770
24771
  throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
24771
24772
  default:
24772
24773
  const parsedBody = parsedOutput.body;
24773
- const $metadata = deserializeMetadata(output);
24774
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
24775
- response = new STSServiceException_1.STSServiceException({
24776
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
24777
- $fault: "client",
24778
- $metadata
24774
+ (0, smithy_client_1.throwDefaultError)({
24775
+ output,
24776
+ parsedBody: parsedBody.Error,
24777
+ exceptionCtor: STSServiceException_1.STSServiceException,
24778
+ errorCode
24779
24779
  });
24780
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
24781
24780
  }
24782
24781
  };
24783
24782
  var deserializeAws_queryGetSessionTokenCommand = async (output, context) => {
@@ -24799,7 +24798,6 @@ var require_Aws_query = __commonJS({
24799
24798
  ...output,
24800
24799
  body: await parseBody(output.body, context)
24801
24800
  };
24802
- let response;
24803
24801
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
24804
24802
  switch (errorCode) {
24805
24803
  case "RegionDisabledException":
@@ -24807,14 +24805,12 @@ var require_Aws_query = __commonJS({
24807
24805
  throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context);
24808
24806
  default:
24809
24807
  const parsedBody = parsedOutput.body;
24810
- const $metadata = deserializeMetadata(output);
24811
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
24812
- response = new STSServiceException_1.STSServiceException({
24813
- name: parsedBody.Error.code || parsedBody.Error.Code || errorCode || statusCode || "UnknowError",
24814
- $fault: "client",
24815
- $metadata
24808
+ (0, smithy_client_1.throwDefaultError)({
24809
+ output,
24810
+ parsedBody: parsedBody.Error,
24811
+ exceptionCtor: STSServiceException_1.STSServiceException,
24812
+ errorCode
24816
24813
  });
24817
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody.Error);
24818
24814
  }
24819
24815
  };
24820
24816
  var deserializeAws_queryExpiredTokenExceptionResponse = async (parsedOutput, context) => {
@@ -24891,118 +24887,118 @@ var require_Aws_query = __commonJS({
24891
24887
  };
24892
24888
  var serializeAws_queryAssumeRoleRequest = (input, context) => {
24893
24889
  const entries = {};
24894
- if (input.RoleArn !== void 0 && input.RoleArn !== null) {
24890
+ if (input.RoleArn != null) {
24895
24891
  entries["RoleArn"] = input.RoleArn;
24896
24892
  }
24897
- if (input.RoleSessionName !== void 0 && input.RoleSessionName !== null) {
24893
+ if (input.RoleSessionName != null) {
24898
24894
  entries["RoleSessionName"] = input.RoleSessionName;
24899
24895
  }
24900
- if (input.PolicyArns !== void 0 && input.PolicyArns !== null) {
24896
+ if (input.PolicyArns != null) {
24901
24897
  const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
24902
24898
  Object.entries(memberEntries).forEach(([key, value]) => {
24903
24899
  const loc = `PolicyArns.${key}`;
24904
24900
  entries[loc] = value;
24905
24901
  });
24906
24902
  }
24907
- if (input.Policy !== void 0 && input.Policy !== null) {
24903
+ if (input.Policy != null) {
24908
24904
  entries["Policy"] = input.Policy;
24909
24905
  }
24910
- if (input.DurationSeconds !== void 0 && input.DurationSeconds !== null) {
24906
+ if (input.DurationSeconds != null) {
24911
24907
  entries["DurationSeconds"] = input.DurationSeconds;
24912
24908
  }
24913
- if (input.Tags !== void 0 && input.Tags !== null) {
24909
+ if (input.Tags != null) {
24914
24910
  const memberEntries = serializeAws_querytagListType(input.Tags, context);
24915
24911
  Object.entries(memberEntries).forEach(([key, value]) => {
24916
24912
  const loc = `Tags.${key}`;
24917
24913
  entries[loc] = value;
24918
24914
  });
24919
24915
  }
24920
- if (input.TransitiveTagKeys !== void 0 && input.TransitiveTagKeys !== null) {
24916
+ if (input.TransitiveTagKeys != null) {
24921
24917
  const memberEntries = serializeAws_querytagKeyListType(input.TransitiveTagKeys, context);
24922
24918
  Object.entries(memberEntries).forEach(([key, value]) => {
24923
24919
  const loc = `TransitiveTagKeys.${key}`;
24924
24920
  entries[loc] = value;
24925
24921
  });
24926
24922
  }
24927
- if (input.ExternalId !== void 0 && input.ExternalId !== null) {
24923
+ if (input.ExternalId != null) {
24928
24924
  entries["ExternalId"] = input.ExternalId;
24929
24925
  }
24930
- if (input.SerialNumber !== void 0 && input.SerialNumber !== null) {
24926
+ if (input.SerialNumber != null) {
24931
24927
  entries["SerialNumber"] = input.SerialNumber;
24932
24928
  }
24933
- if (input.TokenCode !== void 0 && input.TokenCode !== null) {
24929
+ if (input.TokenCode != null) {
24934
24930
  entries["TokenCode"] = input.TokenCode;
24935
24931
  }
24936
- if (input.SourceIdentity !== void 0 && input.SourceIdentity !== null) {
24932
+ if (input.SourceIdentity != null) {
24937
24933
  entries["SourceIdentity"] = input.SourceIdentity;
24938
24934
  }
24939
24935
  return entries;
24940
24936
  };
24941
24937
  var serializeAws_queryAssumeRoleWithSAMLRequest = (input, context) => {
24942
24938
  const entries = {};
24943
- if (input.RoleArn !== void 0 && input.RoleArn !== null) {
24939
+ if (input.RoleArn != null) {
24944
24940
  entries["RoleArn"] = input.RoleArn;
24945
24941
  }
24946
- if (input.PrincipalArn !== void 0 && input.PrincipalArn !== null) {
24942
+ if (input.PrincipalArn != null) {
24947
24943
  entries["PrincipalArn"] = input.PrincipalArn;
24948
24944
  }
24949
- if (input.SAMLAssertion !== void 0 && input.SAMLAssertion !== null) {
24945
+ if (input.SAMLAssertion != null) {
24950
24946
  entries["SAMLAssertion"] = input.SAMLAssertion;
24951
24947
  }
24952
- if (input.PolicyArns !== void 0 && input.PolicyArns !== null) {
24948
+ if (input.PolicyArns != null) {
24953
24949
  const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
24954
24950
  Object.entries(memberEntries).forEach(([key, value]) => {
24955
24951
  const loc = `PolicyArns.${key}`;
24956
24952
  entries[loc] = value;
24957
24953
  });
24958
24954
  }
24959
- if (input.Policy !== void 0 && input.Policy !== null) {
24955
+ if (input.Policy != null) {
24960
24956
  entries["Policy"] = input.Policy;
24961
24957
  }
24962
- if (input.DurationSeconds !== void 0 && input.DurationSeconds !== null) {
24958
+ if (input.DurationSeconds != null) {
24963
24959
  entries["DurationSeconds"] = input.DurationSeconds;
24964
24960
  }
24965
24961
  return entries;
24966
24962
  };
24967
24963
  var serializeAws_queryAssumeRoleWithWebIdentityRequest = (input, context) => {
24968
24964
  const entries = {};
24969
- if (input.RoleArn !== void 0 && input.RoleArn !== null) {
24965
+ if (input.RoleArn != null) {
24970
24966
  entries["RoleArn"] = input.RoleArn;
24971
24967
  }
24972
- if (input.RoleSessionName !== void 0 && input.RoleSessionName !== null) {
24968
+ if (input.RoleSessionName != null) {
24973
24969
  entries["RoleSessionName"] = input.RoleSessionName;
24974
24970
  }
24975
- if (input.WebIdentityToken !== void 0 && input.WebIdentityToken !== null) {
24971
+ if (input.WebIdentityToken != null) {
24976
24972
  entries["WebIdentityToken"] = input.WebIdentityToken;
24977
24973
  }
24978
- if (input.ProviderId !== void 0 && input.ProviderId !== null) {
24974
+ if (input.ProviderId != null) {
24979
24975
  entries["ProviderId"] = input.ProviderId;
24980
24976
  }
24981
- if (input.PolicyArns !== void 0 && input.PolicyArns !== null) {
24977
+ if (input.PolicyArns != null) {
24982
24978
  const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
24983
24979
  Object.entries(memberEntries).forEach(([key, value]) => {
24984
24980
  const loc = `PolicyArns.${key}`;
24985
24981
  entries[loc] = value;
24986
24982
  });
24987
24983
  }
24988
- if (input.Policy !== void 0 && input.Policy !== null) {
24984
+ if (input.Policy != null) {
24989
24985
  entries["Policy"] = input.Policy;
24990
24986
  }
24991
- if (input.DurationSeconds !== void 0 && input.DurationSeconds !== null) {
24987
+ if (input.DurationSeconds != null) {
24992
24988
  entries["DurationSeconds"] = input.DurationSeconds;
24993
24989
  }
24994
24990
  return entries;
24995
24991
  };
24996
24992
  var serializeAws_queryDecodeAuthorizationMessageRequest = (input, context) => {
24997
24993
  const entries = {};
24998
- if (input.EncodedMessage !== void 0 && input.EncodedMessage !== null) {
24994
+ if (input.EncodedMessage != null) {
24999
24995
  entries["EncodedMessage"] = input.EncodedMessage;
25000
24996
  }
25001
24997
  return entries;
25002
24998
  };
25003
24999
  var serializeAws_queryGetAccessKeyInfoRequest = (input, context) => {
25004
25000
  const entries = {};
25005
- if (input.AccessKeyId !== void 0 && input.AccessKeyId !== null) {
25001
+ if (input.AccessKeyId != null) {
25006
25002
  entries["AccessKeyId"] = input.AccessKeyId;
25007
25003
  }
25008
25004
  return entries;
@@ -25013,23 +25009,23 @@ var require_Aws_query = __commonJS({
25013
25009
  };
25014
25010
  var serializeAws_queryGetFederationTokenRequest = (input, context) => {
25015
25011
  const entries = {};
25016
- if (input.Name !== void 0 && input.Name !== null) {
25012
+ if (input.Name != null) {
25017
25013
  entries["Name"] = input.Name;
25018
25014
  }
25019
- if (input.Policy !== void 0 && input.Policy !== null) {
25015
+ if (input.Policy != null) {
25020
25016
  entries["Policy"] = input.Policy;
25021
25017
  }
25022
- if (input.PolicyArns !== void 0 && input.PolicyArns !== null) {
25018
+ if (input.PolicyArns != null) {
25023
25019
  const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context);
25024
25020
  Object.entries(memberEntries).forEach(([key, value]) => {
25025
25021
  const loc = `PolicyArns.${key}`;
25026
25022
  entries[loc] = value;
25027
25023
  });
25028
25024
  }
25029
- if (input.DurationSeconds !== void 0 && input.DurationSeconds !== null) {
25025
+ if (input.DurationSeconds != null) {
25030
25026
  entries["DurationSeconds"] = input.DurationSeconds;
25031
25027
  }
25032
- if (input.Tags !== void 0 && input.Tags !== null) {
25028
+ if (input.Tags != null) {
25033
25029
  const memberEntries = serializeAws_querytagListType(input.Tags, context);
25034
25030
  Object.entries(memberEntries).forEach(([key, value]) => {
25035
25031
  const loc = `Tags.${key}`;
@@ -25040,13 +25036,13 @@ var require_Aws_query = __commonJS({
25040
25036
  };
25041
25037
  var serializeAws_queryGetSessionTokenRequest = (input, context) => {
25042
25038
  const entries = {};
25043
- if (input.DurationSeconds !== void 0 && input.DurationSeconds !== null) {
25039
+ if (input.DurationSeconds != null) {
25044
25040
  entries["DurationSeconds"] = input.DurationSeconds;
25045
25041
  }
25046
- if (input.SerialNumber !== void 0 && input.SerialNumber !== null) {
25042
+ if (input.SerialNumber != null) {
25047
25043
  entries["SerialNumber"] = input.SerialNumber;
25048
25044
  }
25049
- if (input.TokenCode !== void 0 && input.TokenCode !== null) {
25045
+ if (input.TokenCode != null) {
25050
25046
  entries["TokenCode"] = input.TokenCode;
25051
25047
  }
25052
25048
  return entries;
@@ -25068,17 +25064,17 @@ var require_Aws_query = __commonJS({
25068
25064
  };
25069
25065
  var serializeAws_queryPolicyDescriptorType = (input, context) => {
25070
25066
  const entries = {};
25071
- if (input.arn !== void 0 && input.arn !== null) {
25067
+ if (input.arn != null) {
25072
25068
  entries["arn"] = input.arn;
25073
25069
  }
25074
25070
  return entries;
25075
25071
  };
25076
25072
  var serializeAws_queryTag = (input, context) => {
25077
25073
  const entries = {};
25078
- if (input.Key !== void 0 && input.Key !== null) {
25074
+ if (input.Key != null) {
25079
25075
  entries["Key"] = input.Key;
25080
25076
  }
25081
- if (input.Value !== void 0 && input.Value !== null) {
25077
+ if (input.Value != null) {
25082
25078
  entries["Value"] = input.Value;
25083
25079
  }
25084
25080
  return entries;
@@ -25478,8 +25474,8 @@ var require_AssumeRoleCommand = __commonJS({
25478
25474
  logger: logger2,
25479
25475
  clientName,
25480
25476
  commandName,
25481
- inputFilterSensitiveLog: models_0_1.AssumeRoleRequest.filterSensitiveLog,
25482
- outputFilterSensitiveLog: models_0_1.AssumeRoleResponse.filterSensitiveLog
25477
+ inputFilterSensitiveLog: models_0_1.AssumeRoleRequestFilterSensitiveLog,
25478
+ outputFilterSensitiveLog: models_0_1.AssumeRoleResponseFilterSensitiveLog
25483
25479
  };
25484
25480
  const { requestHandler } = configuration;
25485
25481
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -25520,8 +25516,8 @@ var require_AssumeRoleWithSAMLCommand = __commonJS({
25520
25516
  logger: logger2,
25521
25517
  clientName,
25522
25518
  commandName,
25523
- inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequest.filterSensitiveLog,
25524
- outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponse.filterSensitiveLog
25519
+ inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequestFilterSensitiveLog,
25520
+ outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponseFilterSensitiveLog
25525
25521
  };
25526
25522
  const { requestHandler } = configuration;
25527
25523
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -25562,8 +25558,8 @@ var require_AssumeRoleWithWebIdentityCommand = __commonJS({
25562
25558
  logger: logger2,
25563
25559
  clientName,
25564
25560
  commandName,
25565
- inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequest.filterSensitiveLog,
25566
- outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponse.filterSensitiveLog
25561
+ inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequestFilterSensitiveLog,
25562
+ outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponseFilterSensitiveLog
25567
25563
  };
25568
25564
  const { requestHandler } = configuration;
25569
25565
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -25606,8 +25602,8 @@ var require_DecodeAuthorizationMessageCommand = __commonJS({
25606
25602
  logger: logger2,
25607
25603
  clientName,
25608
25604
  commandName,
25609
- inputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageRequest.filterSensitiveLog,
25610
- outputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageResponse.filterSensitiveLog
25605
+ inputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageRequestFilterSensitiveLog,
25606
+ outputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageResponseFilterSensitiveLog
25611
25607
  };
25612
25608
  const { requestHandler } = configuration;
25613
25609
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -25650,8 +25646,8 @@ var require_GetAccessKeyInfoCommand = __commonJS({
25650
25646
  logger: logger2,
25651
25647
  clientName,
25652
25648
  commandName,
25653
- inputFilterSensitiveLog: models_0_1.GetAccessKeyInfoRequest.filterSensitiveLog,
25654
- outputFilterSensitiveLog: models_0_1.GetAccessKeyInfoResponse.filterSensitiveLog
25649
+ inputFilterSensitiveLog: models_0_1.GetAccessKeyInfoRequestFilterSensitiveLog,
25650
+ outputFilterSensitiveLog: models_0_1.GetAccessKeyInfoResponseFilterSensitiveLog
25655
25651
  };
25656
25652
  const { requestHandler } = configuration;
25657
25653
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -25694,8 +25690,8 @@ var require_GetCallerIdentityCommand = __commonJS({
25694
25690
  logger: logger2,
25695
25691
  clientName,
25696
25692
  commandName,
25697
- inputFilterSensitiveLog: models_0_1.GetCallerIdentityRequest.filterSensitiveLog,
25698
- outputFilterSensitiveLog: models_0_1.GetCallerIdentityResponse.filterSensitiveLog
25693
+ inputFilterSensitiveLog: models_0_1.GetCallerIdentityRequestFilterSensitiveLog,
25694
+ outputFilterSensitiveLog: models_0_1.GetCallerIdentityResponseFilterSensitiveLog
25699
25695
  };
25700
25696
  const { requestHandler } = configuration;
25701
25697
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -25738,8 +25734,8 @@ var require_GetFederationTokenCommand = __commonJS({
25738
25734
  logger: logger2,
25739
25735
  clientName,
25740
25736
  commandName,
25741
- inputFilterSensitiveLog: models_0_1.GetFederationTokenRequest.filterSensitiveLog,
25742
- outputFilterSensitiveLog: models_0_1.GetFederationTokenResponse.filterSensitiveLog
25737
+ inputFilterSensitiveLog: models_0_1.GetFederationTokenRequestFilterSensitiveLog,
25738
+ outputFilterSensitiveLog: models_0_1.GetFederationTokenResponseFilterSensitiveLog
25743
25739
  };
25744
25740
  const { requestHandler } = configuration;
25745
25741
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -25782,8 +25778,8 @@ var require_GetSessionTokenCommand = __commonJS({
25782
25778
  logger: logger2,
25783
25779
  clientName,
25784
25780
  commandName,
25785
- inputFilterSensitiveLog: models_0_1.GetSessionTokenRequest.filterSensitiveLog,
25786
- outputFilterSensitiveLog: models_0_1.GetSessionTokenResponse.filterSensitiveLog
25781
+ inputFilterSensitiveLog: models_0_1.GetSessionTokenRequestFilterSensitiveLog,
25782
+ outputFilterSensitiveLog: models_0_1.GetSessionTokenResponseFilterSensitiveLog
25787
25783
  };
25788
25784
  const { requestHandler } = configuration;
25789
25785
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -25820,15 +25816,18 @@ var require_package4 = __commonJS({
25820
25816
  module2.exports = {
25821
25817
  name: "@aws-sdk/client-sts",
25822
25818
  description: "AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",
25823
- version: "3.121.0",
25819
+ version: "3.171.0",
25824
25820
  scripts: {
25825
25821
  build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
25826
25822
  "build:cjs": "tsc -p tsconfig.cjs.json",
25827
25823
  "build:docs": "typedoc",
25828
25824
  "build:es": "tsc -p tsconfig.es.json",
25825
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
25829
25826
  "build:types": "tsc -p tsconfig.types.json",
25830
25827
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
25831
- clean: "rimraf ./dist-* && rimraf *.tsbuildinfo"
25828
+ clean: "rimraf ./dist-* && rimraf *.tsbuildinfo",
25829
+ test: "yarn test:unit",
25830
+ "test:unit": "jest"
25832
25831
  },
25833
25832
  main: "./dist-cjs/index.js",
25834
25833
  types: "./dist-types/index.d.ts",
@@ -25837,51 +25836,56 @@ var require_package4 = __commonJS({
25837
25836
  dependencies: {
25838
25837
  "@aws-crypto/sha256-browser": "2.0.0",
25839
25838
  "@aws-crypto/sha256-js": "2.0.0",
25840
- "@aws-sdk/config-resolver": "3.110.0",
25841
- "@aws-sdk/credential-provider-node": "3.121.0",
25842
- "@aws-sdk/fetch-http-handler": "3.110.0",
25843
- "@aws-sdk/hash-node": "3.110.0",
25844
- "@aws-sdk/invalid-dependency": "3.110.0",
25845
- "@aws-sdk/middleware-content-length": "3.110.0",
25846
- "@aws-sdk/middleware-host-header": "3.110.0",
25847
- "@aws-sdk/middleware-logger": "3.110.0",
25848
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
25849
- "@aws-sdk/middleware-retry": "3.118.1",
25850
- "@aws-sdk/middleware-sdk-sts": "3.110.0",
25851
- "@aws-sdk/middleware-serde": "3.110.0",
25852
- "@aws-sdk/middleware-signing": "3.110.0",
25853
- "@aws-sdk/middleware-stack": "3.110.0",
25854
- "@aws-sdk/middleware-user-agent": "3.110.0",
25855
- "@aws-sdk/node-config-provider": "3.110.0",
25856
- "@aws-sdk/node-http-handler": "3.118.1",
25857
- "@aws-sdk/protocol-http": "3.110.0",
25858
- "@aws-sdk/smithy-client": "3.110.0",
25859
- "@aws-sdk/types": "3.110.0",
25860
- "@aws-sdk/url-parser": "3.110.0",
25861
- "@aws-sdk/util-base64-browser": "3.109.0",
25862
- "@aws-sdk/util-base64-node": "3.55.0",
25863
- "@aws-sdk/util-body-length-browser": "3.55.0",
25864
- "@aws-sdk/util-body-length-node": "3.55.0",
25865
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
25866
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
25867
- "@aws-sdk/util-user-agent-browser": "3.110.0",
25868
- "@aws-sdk/util-user-agent-node": "3.118.0",
25869
- "@aws-sdk/util-utf8-browser": "3.109.0",
25870
- "@aws-sdk/util-utf8-node": "3.109.0",
25839
+ "@aws-sdk/config-resolver": "3.171.0",
25840
+ "@aws-sdk/credential-provider-node": "3.171.0",
25841
+ "@aws-sdk/fetch-http-handler": "3.171.0",
25842
+ "@aws-sdk/hash-node": "3.171.0",
25843
+ "@aws-sdk/invalid-dependency": "3.171.0",
25844
+ "@aws-sdk/middleware-content-length": "3.171.0",
25845
+ "@aws-sdk/middleware-host-header": "3.171.0",
25846
+ "@aws-sdk/middleware-logger": "3.171.0",
25847
+ "@aws-sdk/middleware-recursion-detection": "3.171.0",
25848
+ "@aws-sdk/middleware-retry": "3.171.0",
25849
+ "@aws-sdk/middleware-sdk-sts": "3.171.0",
25850
+ "@aws-sdk/middleware-serde": "3.171.0",
25851
+ "@aws-sdk/middleware-signing": "3.171.0",
25852
+ "@aws-sdk/middleware-stack": "3.171.0",
25853
+ "@aws-sdk/middleware-user-agent": "3.171.0",
25854
+ "@aws-sdk/node-config-provider": "3.171.0",
25855
+ "@aws-sdk/node-http-handler": "3.171.0",
25856
+ "@aws-sdk/protocol-http": "3.171.0",
25857
+ "@aws-sdk/smithy-client": "3.171.0",
25858
+ "@aws-sdk/types": "3.171.0",
25859
+ "@aws-sdk/url-parser": "3.171.0",
25860
+ "@aws-sdk/util-base64-browser": "3.170.0",
25861
+ "@aws-sdk/util-base64-node": "3.170.0",
25862
+ "@aws-sdk/util-body-length-browser": "3.170.0",
25863
+ "@aws-sdk/util-body-length-node": "3.170.0",
25864
+ "@aws-sdk/util-defaults-mode-browser": "3.171.0",
25865
+ "@aws-sdk/util-defaults-mode-node": "3.171.0",
25866
+ "@aws-sdk/util-user-agent-browser": "3.171.0",
25867
+ "@aws-sdk/util-user-agent-node": "3.171.0",
25868
+ "@aws-sdk/util-utf8-browser": "3.170.0",
25869
+ "@aws-sdk/util-utf8-node": "3.170.0",
25871
25870
  entities: "2.2.0",
25872
25871
  "fast-xml-parser": "3.19.0",
25873
25872
  tslib: "^2.3.1"
25874
25873
  },
25875
25874
  devDependencies: {
25876
- "@aws-sdk/service-client-documentation-generator": "3.58.0",
25875
+ "@aws-sdk/service-client-documentation-generator": "3.170.0",
25877
25876
  "@tsconfig/recommended": "1.0.1",
25878
25877
  "@types/node": "^12.7.5",
25879
25878
  concurrently: "7.0.0",
25880
- "downlevel-dts": "0.7.0",
25879
+ "downlevel-dts": "0.10.1",
25881
25880
  rimraf: "3.0.2",
25882
25881
  typedoc: "0.19.2",
25883
25882
  typescript: "~4.6.2"
25884
25883
  },
25884
+ overrides: {
25885
+ typedoc: {
25886
+ typescript: "~4.6.2"
25887
+ }
25888
+ },
25885
25889
  engines: {
25886
25890
  node: ">=12.0.0"
25887
25891
  },
@@ -26235,6 +26239,37 @@ var require_loadSharedConfigFiles = __commonJS({
26235
26239
  }
26236
26240
  });
26237
26241
 
26242
+ // node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/getSsoSessionData.js
26243
+ var require_getSsoSessionData = __commonJS({
26244
+ "node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/getSsoSessionData.js"(exports) {
26245
+ "use strict";
26246
+ Object.defineProperty(exports, "__esModule", { value: true });
26247
+ exports.getSsoSessionData = void 0;
26248
+ var ssoSessionKeyRegex = /^sso-session\s(["'])?([^\1]+)\1$/;
26249
+ var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => ssoSessionKeyRegex.test(key)).reduce((acc, [key, value]) => ({ ...acc, [ssoSessionKeyRegex.exec(key)[2]]: value }), {});
26250
+ exports.getSsoSessionData = getSsoSessionData;
26251
+ }
26252
+ });
26253
+
26254
+ // node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js
26255
+ var require_loadSsoSessionData = __commonJS({
26256
+ "node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js"(exports) {
26257
+ "use strict";
26258
+ Object.defineProperty(exports, "__esModule", { value: true });
26259
+ exports.loadSsoSessionData = void 0;
26260
+ var getConfigFilepath_1 = require_getConfigFilepath();
26261
+ var getSsoSessionData_1 = require_getSsoSessionData();
26262
+ var parseIni_1 = require_parseIni();
26263
+ var slurpFile_1 = require_slurpFile();
26264
+ var swallowError = () => ({});
26265
+ var loadSsoSessionData = async (init = {}) => {
26266
+ var _a;
26267
+ return (0, slurpFile_1.slurpFile)((_a = init.configFilepath) !== null && _a !== void 0 ? _a : (0, getConfigFilepath_1.getConfigFilepath)()).then(parseIni_1.parseIni).then(getSsoSessionData_1.getSsoSessionData).catch(swallowError);
26268
+ };
26269
+ exports.loadSsoSessionData = loadSsoSessionData;
26270
+ }
26271
+ });
26272
+
26238
26273
  // node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/parseKnownFiles.js
26239
26274
  var require_parseKnownFiles = __commonJS({
26240
26275
  "node_modules/@aws-sdk/shared-ini-file-loader/dist-cjs/parseKnownFiles.js"(exports) {
@@ -26272,6 +26307,7 @@ var require_dist_cjs23 = __commonJS({
26272
26307
  tslib_1.__exportStar(require_getSSOTokenFilepath(), exports);
26273
26308
  tslib_1.__exportStar(require_getSSOTokenFromFile(), exports);
26274
26309
  tslib_1.__exportStar(require_loadSharedConfigFiles(), exports);
26310
+ tslib_1.__exportStar(require_loadSsoSessionData(), exports);
26275
26311
  tslib_1.__exportStar(require_parseKnownFiles(), exports);
26276
26312
  tslib_1.__exportStar(require_types2(), exports);
26277
26313
  }
@@ -26573,7 +26609,10 @@ var require_dist_cjs26 = __commonJS({
26573
26609
  exports.parseUrl = void 0;
26574
26610
  var querystring_parser_1 = require_dist_cjs25();
26575
26611
  var parseUrl = (url) => {
26576
- const { hostname, pathname, port, protocol, search } = new URL(url);
26612
+ if (typeof url === "string") {
26613
+ return (0, exports.parseUrl)(new URL(url));
26614
+ }
26615
+ const { hostname, pathname, port, protocol, search } = url;
26577
26616
  let query;
26578
26617
  if (search) {
26579
26618
  query = (0, querystring_parser_1.parseQueryString)(search);
@@ -26969,37 +27008,9 @@ var require_models_03 = __commonJS({
26969
27008
  "node_modules/@aws-sdk/client-sso/dist-cjs/models/models_0.js"(exports) {
26970
27009
  "use strict";
26971
27010
  Object.defineProperty(exports, "__esModule", { value: true });
26972
- exports.LogoutRequest = exports.ListAccountsResponse = exports.ListAccountsRequest = exports.ListAccountRolesResponse = exports.RoleInfo = exports.ListAccountRolesRequest = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = exports.GetRoleCredentialsResponse = exports.RoleCredentials = exports.GetRoleCredentialsRequest = exports.AccountInfo = void 0;
27011
+ exports.LogoutRequestFilterSensitiveLog = exports.ListAccountsResponseFilterSensitiveLog = exports.ListAccountsRequestFilterSensitiveLog = exports.ListAccountRolesResponseFilterSensitiveLog = exports.RoleInfoFilterSensitiveLog = exports.ListAccountRolesRequestFilterSensitiveLog = exports.GetRoleCredentialsResponseFilterSensitiveLog = exports.RoleCredentialsFilterSensitiveLog = exports.GetRoleCredentialsRequestFilterSensitiveLog = exports.AccountInfoFilterSensitiveLog = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0;
26973
27012
  var smithy_client_1 = require_dist_cjs3();
26974
27013
  var SSOServiceException_1 = require_SSOServiceException();
26975
- var AccountInfo;
26976
- (function(AccountInfo2) {
26977
- AccountInfo2.filterSensitiveLog = (obj) => ({
26978
- ...obj
26979
- });
26980
- })(AccountInfo = exports.AccountInfo || (exports.AccountInfo = {}));
26981
- var GetRoleCredentialsRequest;
26982
- (function(GetRoleCredentialsRequest2) {
26983
- GetRoleCredentialsRequest2.filterSensitiveLog = (obj) => ({
26984
- ...obj,
26985
- ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }
26986
- });
26987
- })(GetRoleCredentialsRequest = exports.GetRoleCredentialsRequest || (exports.GetRoleCredentialsRequest = {}));
26988
- var RoleCredentials;
26989
- (function(RoleCredentials2) {
26990
- RoleCredentials2.filterSensitiveLog = (obj) => ({
26991
- ...obj,
26992
- ...obj.secretAccessKey && { secretAccessKey: smithy_client_1.SENSITIVE_STRING },
26993
- ...obj.sessionToken && { sessionToken: smithy_client_1.SENSITIVE_STRING }
26994
- });
26995
- })(RoleCredentials = exports.RoleCredentials || (exports.RoleCredentials = {}));
26996
- var GetRoleCredentialsResponse;
26997
- (function(GetRoleCredentialsResponse2) {
26998
- GetRoleCredentialsResponse2.filterSensitiveLog = (obj) => ({
26999
- ...obj,
27000
- ...obj.roleCredentials && { roleCredentials: RoleCredentials.filterSensitiveLog(obj.roleCredentials) }
27001
- });
27002
- })(GetRoleCredentialsResponse = exports.GetRoleCredentialsResponse || (exports.GetRoleCredentialsResponse = {}));
27003
27014
  var InvalidRequestException = class extends SSOServiceException_1.SSOServiceException {
27004
27015
  constructor(opts) {
27005
27016
  super({
@@ -27052,45 +27063,53 @@ var require_models_03 = __commonJS({
27052
27063
  }
27053
27064
  };
27054
27065
  exports.UnauthorizedException = UnauthorizedException;
27055
- var ListAccountRolesRequest;
27056
- (function(ListAccountRolesRequest2) {
27057
- ListAccountRolesRequest2.filterSensitiveLog = (obj) => ({
27058
- ...obj,
27059
- ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }
27060
- });
27061
- })(ListAccountRolesRequest = exports.ListAccountRolesRequest || (exports.ListAccountRolesRequest = {}));
27062
- var RoleInfo;
27063
- (function(RoleInfo2) {
27064
- RoleInfo2.filterSensitiveLog = (obj) => ({
27065
- ...obj
27066
- });
27067
- })(RoleInfo = exports.RoleInfo || (exports.RoleInfo = {}));
27068
- var ListAccountRolesResponse;
27069
- (function(ListAccountRolesResponse2) {
27070
- ListAccountRolesResponse2.filterSensitiveLog = (obj) => ({
27071
- ...obj
27072
- });
27073
- })(ListAccountRolesResponse = exports.ListAccountRolesResponse || (exports.ListAccountRolesResponse = {}));
27074
- var ListAccountsRequest;
27075
- (function(ListAccountsRequest2) {
27076
- ListAccountsRequest2.filterSensitiveLog = (obj) => ({
27077
- ...obj,
27078
- ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }
27079
- });
27080
- })(ListAccountsRequest = exports.ListAccountsRequest || (exports.ListAccountsRequest = {}));
27081
- var ListAccountsResponse;
27082
- (function(ListAccountsResponse2) {
27083
- ListAccountsResponse2.filterSensitiveLog = (obj) => ({
27084
- ...obj
27085
- });
27086
- })(ListAccountsResponse = exports.ListAccountsResponse || (exports.ListAccountsResponse = {}));
27087
- var LogoutRequest;
27088
- (function(LogoutRequest2) {
27089
- LogoutRequest2.filterSensitiveLog = (obj) => ({
27090
- ...obj,
27091
- ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }
27092
- });
27093
- })(LogoutRequest = exports.LogoutRequest || (exports.LogoutRequest = {}));
27066
+ var AccountInfoFilterSensitiveLog = (obj) => ({
27067
+ ...obj
27068
+ });
27069
+ exports.AccountInfoFilterSensitiveLog = AccountInfoFilterSensitiveLog;
27070
+ var GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({
27071
+ ...obj,
27072
+ ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }
27073
+ });
27074
+ exports.GetRoleCredentialsRequestFilterSensitiveLog = GetRoleCredentialsRequestFilterSensitiveLog;
27075
+ var RoleCredentialsFilterSensitiveLog = (obj) => ({
27076
+ ...obj,
27077
+ ...obj.secretAccessKey && { secretAccessKey: smithy_client_1.SENSITIVE_STRING },
27078
+ ...obj.sessionToken && { sessionToken: smithy_client_1.SENSITIVE_STRING }
27079
+ });
27080
+ exports.RoleCredentialsFilterSensitiveLog = RoleCredentialsFilterSensitiveLog;
27081
+ var GetRoleCredentialsResponseFilterSensitiveLog = (obj) => ({
27082
+ ...obj,
27083
+ ...obj.roleCredentials && { roleCredentials: (0, exports.RoleCredentialsFilterSensitiveLog)(obj.roleCredentials) }
27084
+ });
27085
+ exports.GetRoleCredentialsResponseFilterSensitiveLog = GetRoleCredentialsResponseFilterSensitiveLog;
27086
+ var ListAccountRolesRequestFilterSensitiveLog = (obj) => ({
27087
+ ...obj,
27088
+ ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }
27089
+ });
27090
+ exports.ListAccountRolesRequestFilterSensitiveLog = ListAccountRolesRequestFilterSensitiveLog;
27091
+ var RoleInfoFilterSensitiveLog = (obj) => ({
27092
+ ...obj
27093
+ });
27094
+ exports.RoleInfoFilterSensitiveLog = RoleInfoFilterSensitiveLog;
27095
+ var ListAccountRolesResponseFilterSensitiveLog = (obj) => ({
27096
+ ...obj
27097
+ });
27098
+ exports.ListAccountRolesResponseFilterSensitiveLog = ListAccountRolesResponseFilterSensitiveLog;
27099
+ var ListAccountsRequestFilterSensitiveLog = (obj) => ({
27100
+ ...obj,
27101
+ ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }
27102
+ });
27103
+ exports.ListAccountsRequestFilterSensitiveLog = ListAccountsRequestFilterSensitiveLog;
27104
+ var ListAccountsResponseFilterSensitiveLog = (obj) => ({
27105
+ ...obj
27106
+ });
27107
+ exports.ListAccountsResponseFilterSensitiveLog = ListAccountsResponseFilterSensitiveLog;
27108
+ var LogoutRequestFilterSensitiveLog = (obj) => ({
27109
+ ...obj,
27110
+ ...obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }
27111
+ });
27112
+ exports.LogoutRequestFilterSensitiveLog = LogoutRequestFilterSensitiveLog;
27094
27113
  }
27095
27114
  });
27096
27115
 
@@ -27106,14 +27125,14 @@ var require_Aws_restJson1 = __commonJS({
27106
27125
  var SSOServiceException_1 = require_SSOServiceException();
27107
27126
  var serializeAws_restJson1GetRoleCredentialsCommand = async (input, context) => {
27108
27127
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
27109
- const headers = {
27110
- ...isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }
27111
- };
27128
+ const headers = map({}, isSerializableHeaderValue, {
27129
+ "x-amz-sso_bearer_token": input.accessToken
27130
+ });
27112
27131
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/federation/credentials`;
27113
- const query = {
27114
- ...input.roleName !== void 0 && { role_name: input.roleName },
27115
- ...input.accountId !== void 0 && { account_id: input.accountId }
27116
- };
27132
+ const query = map({
27133
+ role_name: [, input.roleName],
27134
+ account_id: [, input.accountId]
27135
+ });
27117
27136
  let body;
27118
27137
  return new protocol_http_1.HttpRequest({
27119
27138
  protocol,
@@ -27129,15 +27148,15 @@ var require_Aws_restJson1 = __commonJS({
27129
27148
  exports.serializeAws_restJson1GetRoleCredentialsCommand = serializeAws_restJson1GetRoleCredentialsCommand;
27130
27149
  var serializeAws_restJson1ListAccountRolesCommand = async (input, context) => {
27131
27150
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
27132
- const headers = {
27133
- ...isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }
27134
- };
27151
+ const headers = map({}, isSerializableHeaderValue, {
27152
+ "x-amz-sso_bearer_token": input.accessToken
27153
+ });
27135
27154
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/assignment/roles`;
27136
- const query = {
27137
- ...input.nextToken !== void 0 && { next_token: input.nextToken },
27138
- ...input.maxResults !== void 0 && { max_result: input.maxResults.toString() },
27139
- ...input.accountId !== void 0 && { account_id: input.accountId }
27140
- };
27155
+ const query = map({
27156
+ next_token: [, input.nextToken],
27157
+ max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
27158
+ account_id: [, input.accountId]
27159
+ });
27141
27160
  let body;
27142
27161
  return new protocol_http_1.HttpRequest({
27143
27162
  protocol,
@@ -27153,14 +27172,14 @@ var require_Aws_restJson1 = __commonJS({
27153
27172
  exports.serializeAws_restJson1ListAccountRolesCommand = serializeAws_restJson1ListAccountRolesCommand;
27154
27173
  var serializeAws_restJson1ListAccountsCommand = async (input, context) => {
27155
27174
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
27156
- const headers = {
27157
- ...isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }
27158
- };
27175
+ const headers = map({}, isSerializableHeaderValue, {
27176
+ "x-amz-sso_bearer_token": input.accessToken
27177
+ });
27159
27178
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/assignment/accounts`;
27160
- const query = {
27161
- ...input.nextToken !== void 0 && { next_token: input.nextToken },
27162
- ...input.maxResults !== void 0 && { max_result: input.maxResults.toString() }
27163
- };
27179
+ const query = map({
27180
+ next_token: [, input.nextToken],
27181
+ max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()]
27182
+ });
27164
27183
  let body;
27165
27184
  return new protocol_http_1.HttpRequest({
27166
27185
  protocol,
@@ -27176,9 +27195,9 @@ var require_Aws_restJson1 = __commonJS({
27176
27195
  exports.serializeAws_restJson1ListAccountsCommand = serializeAws_restJson1ListAccountsCommand;
27177
27196
  var serializeAws_restJson1LogoutCommand = async (input, context) => {
27178
27197
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
27179
- const headers = {
27180
- ...isSerializableHeaderValue(input.accessToken) && { "x-amz-sso_bearer_token": input.accessToken }
27181
- };
27198
+ const headers = map({}, isSerializableHeaderValue, {
27199
+ "x-amz-sso_bearer_token": input.accessToken
27200
+ });
27182
27201
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/logout`;
27183
27202
  let body;
27184
27203
  return new protocol_http_1.HttpRequest({
@@ -27196,15 +27215,14 @@ var require_Aws_restJson1 = __commonJS({
27196
27215
  if (output.statusCode !== 200 && output.statusCode >= 300) {
27197
27216
  return deserializeAws_restJson1GetRoleCredentialsCommandError(output, context);
27198
27217
  }
27199
- const contents = {
27200
- $metadata: deserializeMetadata(output),
27201
- roleCredentials: void 0
27202
- };
27218
+ const contents = map({
27219
+ $metadata: deserializeMetadata(output)
27220
+ });
27203
27221
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
27204
- if (data.roleCredentials !== void 0 && data.roleCredentials !== null) {
27222
+ if (data.roleCredentials != null) {
27205
27223
  contents.roleCredentials = deserializeAws_restJson1RoleCredentials(data.roleCredentials, context);
27206
27224
  }
27207
- return Promise.resolve(contents);
27225
+ return contents;
27208
27226
  };
27209
27227
  exports.deserializeAws_restJson1GetRoleCredentialsCommand = deserializeAws_restJson1GetRoleCredentialsCommand;
27210
27228
  var deserializeAws_restJson1GetRoleCredentialsCommandError = async (output, context) => {
@@ -27212,7 +27230,6 @@ var require_Aws_restJson1 = __commonJS({
27212
27230
  ...output,
27213
27231
  body: await parseBody(output.body, context)
27214
27232
  };
27215
- let response;
27216
27233
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
27217
27234
  switch (errorCode) {
27218
27235
  case "InvalidRequestException":
@@ -27229,33 +27246,29 @@ var require_Aws_restJson1 = __commonJS({
27229
27246
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
27230
27247
  default:
27231
27248
  const parsedBody = parsedOutput.body;
27232
- const $metadata = deserializeMetadata(output);
27233
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
27234
- response = new SSOServiceException_1.SSOServiceException({
27235
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
27236
- $fault: "client",
27237
- $metadata
27249
+ (0, smithy_client_1.throwDefaultError)({
27250
+ output,
27251
+ parsedBody,
27252
+ exceptionCtor: SSOServiceException_1.SSOServiceException,
27253
+ errorCode
27238
27254
  });
27239
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
27240
27255
  }
27241
27256
  };
27242
27257
  var deserializeAws_restJson1ListAccountRolesCommand = async (output, context) => {
27243
27258
  if (output.statusCode !== 200 && output.statusCode >= 300) {
27244
27259
  return deserializeAws_restJson1ListAccountRolesCommandError(output, context);
27245
27260
  }
27246
- const contents = {
27247
- $metadata: deserializeMetadata(output),
27248
- nextToken: void 0,
27249
- roleList: void 0
27250
- };
27261
+ const contents = map({
27262
+ $metadata: deserializeMetadata(output)
27263
+ });
27251
27264
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
27252
- if (data.nextToken !== void 0 && data.nextToken !== null) {
27265
+ if (data.nextToken != null) {
27253
27266
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
27254
27267
  }
27255
- if (data.roleList !== void 0 && data.roleList !== null) {
27268
+ if (data.roleList != null) {
27256
27269
  contents.roleList = deserializeAws_restJson1RoleListType(data.roleList, context);
27257
27270
  }
27258
- return Promise.resolve(contents);
27271
+ return contents;
27259
27272
  };
27260
27273
  exports.deserializeAws_restJson1ListAccountRolesCommand = deserializeAws_restJson1ListAccountRolesCommand;
27261
27274
  var deserializeAws_restJson1ListAccountRolesCommandError = async (output, context) => {
@@ -27263,7 +27276,6 @@ var require_Aws_restJson1 = __commonJS({
27263
27276
  ...output,
27264
27277
  body: await parseBody(output.body, context)
27265
27278
  };
27266
- let response;
27267
27279
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
27268
27280
  switch (errorCode) {
27269
27281
  case "InvalidRequestException":
@@ -27280,33 +27292,29 @@ var require_Aws_restJson1 = __commonJS({
27280
27292
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
27281
27293
  default:
27282
27294
  const parsedBody = parsedOutput.body;
27283
- const $metadata = deserializeMetadata(output);
27284
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
27285
- response = new SSOServiceException_1.SSOServiceException({
27286
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
27287
- $fault: "client",
27288
- $metadata
27295
+ (0, smithy_client_1.throwDefaultError)({
27296
+ output,
27297
+ parsedBody,
27298
+ exceptionCtor: SSOServiceException_1.SSOServiceException,
27299
+ errorCode
27289
27300
  });
27290
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
27291
27301
  }
27292
27302
  };
27293
27303
  var deserializeAws_restJson1ListAccountsCommand = async (output, context) => {
27294
27304
  if (output.statusCode !== 200 && output.statusCode >= 300) {
27295
27305
  return deserializeAws_restJson1ListAccountsCommandError(output, context);
27296
27306
  }
27297
- const contents = {
27298
- $metadata: deserializeMetadata(output),
27299
- accountList: void 0,
27300
- nextToken: void 0
27301
- };
27307
+ const contents = map({
27308
+ $metadata: deserializeMetadata(output)
27309
+ });
27302
27310
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
27303
- if (data.accountList !== void 0 && data.accountList !== null) {
27311
+ if (data.accountList != null) {
27304
27312
  contents.accountList = deserializeAws_restJson1AccountListType(data.accountList, context);
27305
27313
  }
27306
- if (data.nextToken !== void 0 && data.nextToken !== null) {
27314
+ if (data.nextToken != null) {
27307
27315
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
27308
27316
  }
27309
- return Promise.resolve(contents);
27317
+ return contents;
27310
27318
  };
27311
27319
  exports.deserializeAws_restJson1ListAccountsCommand = deserializeAws_restJson1ListAccountsCommand;
27312
27320
  var deserializeAws_restJson1ListAccountsCommandError = async (output, context) => {
@@ -27314,7 +27322,6 @@ var require_Aws_restJson1 = __commonJS({
27314
27322
  ...output,
27315
27323
  body: await parseBody(output.body, context)
27316
27324
  };
27317
- let response;
27318
27325
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
27319
27326
  switch (errorCode) {
27320
27327
  case "InvalidRequestException":
@@ -27331,25 +27338,23 @@ var require_Aws_restJson1 = __commonJS({
27331
27338
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
27332
27339
  default:
27333
27340
  const parsedBody = parsedOutput.body;
27334
- const $metadata = deserializeMetadata(output);
27335
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
27336
- response = new SSOServiceException_1.SSOServiceException({
27337
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
27338
- $fault: "client",
27339
- $metadata
27341
+ (0, smithy_client_1.throwDefaultError)({
27342
+ output,
27343
+ parsedBody,
27344
+ exceptionCtor: SSOServiceException_1.SSOServiceException,
27345
+ errorCode
27340
27346
  });
27341
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
27342
27347
  }
27343
27348
  };
27344
27349
  var deserializeAws_restJson1LogoutCommand = async (output, context) => {
27345
27350
  if (output.statusCode !== 200 && output.statusCode >= 300) {
27346
27351
  return deserializeAws_restJson1LogoutCommandError(output, context);
27347
27352
  }
27348
- const contents = {
27353
+ const contents = map({
27349
27354
  $metadata: deserializeMetadata(output)
27350
- };
27355
+ });
27351
27356
  await collectBody(output.body, context);
27352
- return Promise.resolve(contents);
27357
+ return contents;
27353
27358
  };
27354
27359
  exports.deserializeAws_restJson1LogoutCommand = deserializeAws_restJson1LogoutCommand;
27355
27360
  var deserializeAws_restJson1LogoutCommandError = async (output, context) => {
@@ -27357,7 +27362,6 @@ var require_Aws_restJson1 = __commonJS({
27357
27362
  ...output,
27358
27363
  body: await parseBody(output.body, context)
27359
27364
  };
27360
- let response;
27361
27365
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
27362
27366
  switch (errorCode) {
27363
27367
  case "InvalidRequestException":
@@ -27371,20 +27375,19 @@ var require_Aws_restJson1 = __commonJS({
27371
27375
  throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context);
27372
27376
  default:
27373
27377
  const parsedBody = parsedOutput.body;
27374
- const $metadata = deserializeMetadata(output);
27375
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : void 0;
27376
- response = new SSOServiceException_1.SSOServiceException({
27377
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
27378
- $fault: "client",
27379
- $metadata
27378
+ (0, smithy_client_1.throwDefaultError)({
27379
+ output,
27380
+ parsedBody,
27381
+ exceptionCtor: SSOServiceException_1.SSOServiceException,
27382
+ errorCode
27380
27383
  });
27381
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
27382
27384
  }
27383
27385
  };
27386
+ var map = smithy_client_1.map;
27384
27387
  var deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
27385
- const contents = {};
27388
+ const contents = map({});
27386
27389
  const data = parsedOutput.body;
27387
- if (data.message !== void 0 && data.message !== null) {
27390
+ if (data.message != null) {
27388
27391
  contents.message = (0, smithy_client_1.expectString)(data.message);
27389
27392
  }
27390
27393
  const exception = new models_0_1.InvalidRequestException({
@@ -27394,9 +27397,9 @@ var require_Aws_restJson1 = __commonJS({
27394
27397
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
27395
27398
  };
27396
27399
  var deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
27397
- const contents = {};
27400
+ const contents = map({});
27398
27401
  const data = parsedOutput.body;
27399
- if (data.message !== void 0 && data.message !== null) {
27402
+ if (data.message != null) {
27400
27403
  contents.message = (0, smithy_client_1.expectString)(data.message);
27401
27404
  }
27402
27405
  const exception = new models_0_1.ResourceNotFoundException({
@@ -27406,9 +27409,9 @@ var require_Aws_restJson1 = __commonJS({
27406
27409
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
27407
27410
  };
27408
27411
  var deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
27409
- const contents = {};
27412
+ const contents = map({});
27410
27413
  const data = parsedOutput.body;
27411
- if (data.message !== void 0 && data.message !== null) {
27414
+ if (data.message != null) {
27412
27415
  contents.message = (0, smithy_client_1.expectString)(data.message);
27413
27416
  }
27414
27417
  const exception = new models_0_1.TooManyRequestsException({
@@ -27418,9 +27421,9 @@ var require_Aws_restJson1 = __commonJS({
27418
27421
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
27419
27422
  };
27420
27423
  var deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => {
27421
- const contents = {};
27424
+ const contents = map({});
27422
27425
  const data = parsedOutput.body;
27423
- if (data.message !== void 0 && data.message !== null) {
27426
+ if (data.message != null) {
27424
27427
  contents.message = (0, smithy_client_1.expectString)(data.message);
27425
27428
  }
27426
27429
  const exception = new models_0_1.UnauthorizedException({
@@ -27495,6 +27498,12 @@ var require_Aws_restJson1 = __commonJS({
27495
27498
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
27496
27499
  const sanitizeErrorCode = (rawValue) => {
27497
27500
  let cleanValue = rawValue;
27501
+ if (typeof cleanValue === "number") {
27502
+ cleanValue = cleanValue.toString();
27503
+ }
27504
+ if (cleanValue.indexOf(",") >= 0) {
27505
+ cleanValue = cleanValue.split(",")[0];
27506
+ }
27498
27507
  if (cleanValue.indexOf(":") >= 0) {
27499
27508
  cleanValue = cleanValue.split(":")[0];
27500
27509
  }
@@ -27542,8 +27551,8 @@ var require_GetRoleCredentialsCommand = __commonJS({
27542
27551
  logger: logger2,
27543
27552
  clientName,
27544
27553
  commandName,
27545
- inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequest.filterSensitiveLog,
27546
- outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponse.filterSensitiveLog
27554
+ inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequestFilterSensitiveLog,
27555
+ outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponseFilterSensitiveLog
27547
27556
  };
27548
27557
  const { requestHandler } = configuration;
27549
27558
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -27584,8 +27593,8 @@ var require_ListAccountRolesCommand = __commonJS({
27584
27593
  logger: logger2,
27585
27594
  clientName,
27586
27595
  commandName,
27587
- inputFilterSensitiveLog: models_0_1.ListAccountRolesRequest.filterSensitiveLog,
27588
- outputFilterSensitiveLog: models_0_1.ListAccountRolesResponse.filterSensitiveLog
27596
+ inputFilterSensitiveLog: models_0_1.ListAccountRolesRequestFilterSensitiveLog,
27597
+ outputFilterSensitiveLog: models_0_1.ListAccountRolesResponseFilterSensitiveLog
27589
27598
  };
27590
27599
  const { requestHandler } = configuration;
27591
27600
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -27626,8 +27635,8 @@ var require_ListAccountsCommand = __commonJS({
27626
27635
  logger: logger2,
27627
27636
  clientName,
27628
27637
  commandName,
27629
- inputFilterSensitiveLog: models_0_1.ListAccountsRequest.filterSensitiveLog,
27630
- outputFilterSensitiveLog: models_0_1.ListAccountsResponse.filterSensitiveLog
27638
+ inputFilterSensitiveLog: models_0_1.ListAccountsRequestFilterSensitiveLog,
27639
+ outputFilterSensitiveLog: models_0_1.ListAccountsResponseFilterSensitiveLog
27631
27640
  };
27632
27641
  const { requestHandler } = configuration;
27633
27642
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -27668,7 +27677,7 @@ var require_LogoutCommand = __commonJS({
27668
27677
  logger: logger2,
27669
27678
  clientName,
27670
27679
  commandName,
27671
- inputFilterSensitiveLog: models_0_1.LogoutRequest.filterSensitiveLog,
27680
+ inputFilterSensitiveLog: models_0_1.LogoutRequestFilterSensitiveLog,
27672
27681
  outputFilterSensitiveLog: (output) => output
27673
27682
  };
27674
27683
  const { requestHandler } = configuration;
@@ -27691,12 +27700,13 @@ var require_package5 = __commonJS({
27691
27700
  module2.exports = {
27692
27701
  name: "@aws-sdk/client-sso",
27693
27702
  description: "AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",
27694
- version: "3.121.0",
27703
+ version: "3.171.0",
27695
27704
  scripts: {
27696
27705
  build: "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
27697
27706
  "build:cjs": "tsc -p tsconfig.cjs.json",
27698
27707
  "build:docs": "typedoc",
27699
27708
  "build:es": "tsc -p tsconfig.es.json",
27709
+ "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
27700
27710
  "build:types": "tsc -p tsconfig.types.json",
27701
27711
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
27702
27712
  clean: "rimraf ./dist-* && rimraf *.tsbuildinfo"
@@ -27708,46 +27718,51 @@ var require_package5 = __commonJS({
27708
27718
  dependencies: {
27709
27719
  "@aws-crypto/sha256-browser": "2.0.0",
27710
27720
  "@aws-crypto/sha256-js": "2.0.0",
27711
- "@aws-sdk/config-resolver": "3.110.0",
27712
- "@aws-sdk/fetch-http-handler": "3.110.0",
27713
- "@aws-sdk/hash-node": "3.110.0",
27714
- "@aws-sdk/invalid-dependency": "3.110.0",
27715
- "@aws-sdk/middleware-content-length": "3.110.0",
27716
- "@aws-sdk/middleware-host-header": "3.110.0",
27717
- "@aws-sdk/middleware-logger": "3.110.0",
27718
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
27719
- "@aws-sdk/middleware-retry": "3.118.1",
27720
- "@aws-sdk/middleware-serde": "3.110.0",
27721
- "@aws-sdk/middleware-stack": "3.110.0",
27722
- "@aws-sdk/middleware-user-agent": "3.110.0",
27723
- "@aws-sdk/node-config-provider": "3.110.0",
27724
- "@aws-sdk/node-http-handler": "3.118.1",
27725
- "@aws-sdk/protocol-http": "3.110.0",
27726
- "@aws-sdk/smithy-client": "3.110.0",
27727
- "@aws-sdk/types": "3.110.0",
27728
- "@aws-sdk/url-parser": "3.110.0",
27729
- "@aws-sdk/util-base64-browser": "3.109.0",
27730
- "@aws-sdk/util-base64-node": "3.55.0",
27731
- "@aws-sdk/util-body-length-browser": "3.55.0",
27732
- "@aws-sdk/util-body-length-node": "3.55.0",
27733
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
27734
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
27735
- "@aws-sdk/util-user-agent-browser": "3.110.0",
27736
- "@aws-sdk/util-user-agent-node": "3.118.0",
27737
- "@aws-sdk/util-utf8-browser": "3.109.0",
27738
- "@aws-sdk/util-utf8-node": "3.109.0",
27721
+ "@aws-sdk/config-resolver": "3.171.0",
27722
+ "@aws-sdk/fetch-http-handler": "3.171.0",
27723
+ "@aws-sdk/hash-node": "3.171.0",
27724
+ "@aws-sdk/invalid-dependency": "3.171.0",
27725
+ "@aws-sdk/middleware-content-length": "3.171.0",
27726
+ "@aws-sdk/middleware-host-header": "3.171.0",
27727
+ "@aws-sdk/middleware-logger": "3.171.0",
27728
+ "@aws-sdk/middleware-recursion-detection": "3.171.0",
27729
+ "@aws-sdk/middleware-retry": "3.171.0",
27730
+ "@aws-sdk/middleware-serde": "3.171.0",
27731
+ "@aws-sdk/middleware-stack": "3.171.0",
27732
+ "@aws-sdk/middleware-user-agent": "3.171.0",
27733
+ "@aws-sdk/node-config-provider": "3.171.0",
27734
+ "@aws-sdk/node-http-handler": "3.171.0",
27735
+ "@aws-sdk/protocol-http": "3.171.0",
27736
+ "@aws-sdk/smithy-client": "3.171.0",
27737
+ "@aws-sdk/types": "3.171.0",
27738
+ "@aws-sdk/url-parser": "3.171.0",
27739
+ "@aws-sdk/util-base64-browser": "3.170.0",
27740
+ "@aws-sdk/util-base64-node": "3.170.0",
27741
+ "@aws-sdk/util-body-length-browser": "3.170.0",
27742
+ "@aws-sdk/util-body-length-node": "3.170.0",
27743
+ "@aws-sdk/util-defaults-mode-browser": "3.171.0",
27744
+ "@aws-sdk/util-defaults-mode-node": "3.171.0",
27745
+ "@aws-sdk/util-user-agent-browser": "3.171.0",
27746
+ "@aws-sdk/util-user-agent-node": "3.171.0",
27747
+ "@aws-sdk/util-utf8-browser": "3.170.0",
27748
+ "@aws-sdk/util-utf8-node": "3.170.0",
27739
27749
  tslib: "^2.3.1"
27740
27750
  },
27741
27751
  devDependencies: {
27742
- "@aws-sdk/service-client-documentation-generator": "3.58.0",
27752
+ "@aws-sdk/service-client-documentation-generator": "3.170.0",
27743
27753
  "@tsconfig/recommended": "1.0.1",
27744
27754
  "@types/node": "^12.7.5",
27745
27755
  concurrently: "7.0.0",
27746
- "downlevel-dts": "0.7.0",
27756
+ "downlevel-dts": "0.10.1",
27747
27757
  rimraf: "3.0.2",
27748
27758
  typedoc: "0.19.2",
27749
27759
  typescript: "~4.6.2"
27750
27760
  },
27761
+ overrides: {
27762
+ typedoc: {
27763
+ typescript: "~4.6.2"
27764
+ }
27765
+ },
27751
27766
  engines: {
27752
27767
  node: ">=12.0.0"
27753
27768
  },
@@ -28440,6 +28455,15 @@ var require_endpoints = __commonJS({
28440
28455
  exports.defaultRegionInfoProvider = void 0;
28441
28456
  var config_resolver_1 = require_dist_cjs7();
28442
28457
  var regionHash = {
28458
+ "ap-east-1": {
28459
+ variants: [
28460
+ {
28461
+ hostname: "portal.sso.ap-east-1.amazonaws.com",
28462
+ tags: []
28463
+ }
28464
+ ],
28465
+ signingRegion: "ap-east-1"
28466
+ },
28443
28467
  "ap-northeast-1": {
28444
28468
  variants: [
28445
28469
  {
@@ -28557,6 +28581,15 @@ var require_endpoints = __commonJS({
28557
28581
  ],
28558
28582
  signingRegion: "eu-west-3"
28559
28583
  },
28584
+ "me-south-1": {
28585
+ variants: [
28586
+ {
28587
+ hostname: "portal.sso.me-south-1.amazonaws.com",
28588
+ tags: []
28589
+ }
28590
+ ],
28591
+ signingRegion: "me-south-1"
28592
+ },
28560
28593
  "sa-east-1": {
28561
28594
  variants: [
28562
28595
  {
@@ -28631,6 +28664,7 @@ var require_endpoints = __commonJS({
28631
28664
  "eu-west-1",
28632
28665
  "eu-west-2",
28633
28666
  "eu-west-3",
28667
+ "me-central-1",
28634
28668
  "me-south-1",
28635
28669
  "sa-east-1",
28636
28670
  "us-east-1",
@@ -29722,6 +29756,7 @@ var require_endpoints2 = __commonJS({
29722
29756
  "eu-west-1",
29723
29757
  "eu-west-2",
29724
29758
  "eu-west-3",
29759
+ "me-central-1",
29725
29760
  "me-south-1",
29726
29761
  "sa-east-1",
29727
29762
  "us-east-1",
@@ -30101,9 +30136,22 @@ var require_defaultRoleAssumers = __commonJS({
30101
30136
  exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0;
30102
30137
  var defaultStsRoleAssumers_1 = require_defaultStsRoleAssumers();
30103
30138
  var STSClient_1 = require_STSClient();
30104
- var getDefaultRoleAssumer = (stsOptions = {}) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumer)(stsOptions, STSClient_1.STSClient);
30139
+ var getCustomizableStsClientCtor = (baseCtor, customizations) => {
30140
+ if (!customizations)
30141
+ return baseCtor;
30142
+ else
30143
+ return class CustomizableSTSClient extends baseCtor {
30144
+ constructor(config) {
30145
+ super(config);
30146
+ for (const customization of customizations) {
30147
+ this.middlewareStack.use(customization);
30148
+ }
30149
+ }
30150
+ };
30151
+ };
30152
+ var getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumer)(stsOptions, getCustomizableStsClientCtor(STSClient_1.STSClient, stsPlugins));
30105
30153
  exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
30106
- var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity)(stsOptions, STSClient_1.STSClient);
30154
+ var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity)(stsOptions, getCustomizableStsClientCtor(STSClient_1.STSClient, stsPlugins));
30107
30155
  exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
30108
30156
  var decorateDefaultCredentialProvider = (provider) => (input) => provider({
30109
30157
  roleAssumer: (0, exports.getDefaultRoleAssumer)(input),
@@ -30228,6 +30276,7 @@ var require_endpoints3 = __commonJS({
30228
30276
  "eu-west-1",
30229
30277
  "eu-west-2",
30230
30278
  "eu-west-3",
30279
+ "me-central-1",
30231
30280
  "me-south-1",
30232
30281
  "sa-east-1",
30233
30282
  "us-east-1",
@@ -30930,20 +30979,16 @@ var src_exports = {};
30930
30979
  __export(src_exports, {
30931
30980
  AbstractRepository: () => AbstractRepository,
30932
30981
  ConnectionManager: () => ConnectionManager,
30982
+ DEFAULT_PAGE_SIZE: () => DEFAULT_PAGE_SIZE,
30933
30983
  Migrator: () => Migrator,
30984
+ Pool: () => import_pg2.Pool,
30934
30985
  PostgresErrorCode: () => PostgresErrorCode,
30935
- assertAssign: () => assertAssign,
30936
- assertAssignWithDefaultUndefinedValue: () => assertAssignWithDefaultUndefinedValue,
30937
- assertIsDefined: () => assertIsDefined,
30938
- assertIsMapOfStringString: () => assertIsMapOfStringString,
30939
- assertIsNotAnEmptyString: () => assertIsNotAnEmptyString,
30940
- assertIsObject: () => assertIsObject,
30941
- assertIsString: () => assertIsString,
30942
30986
  getConnectionInfo: () => getConnectionInfo
30943
30987
  });
30944
30988
  module.exports = __toCommonJS(src_exports);
30945
30989
 
30946
30990
  // src/AbstractRepository.ts
30991
+ var DEFAULT_PAGE_SIZE = 20;
30947
30992
  var AbstractRepository = class {
30948
30993
  constructor(repositories, pool, tableName, mapping, classRef) {
30949
30994
  this.repositories = repositories;
@@ -31008,17 +31053,21 @@ var AbstractRepository = class {
31008
31053
  }, "");
31009
31054
  return sql;
31010
31055
  }
31011
- async executeQuery(query, values, transactionClient = null) {
31056
+ async executeQueryRaw(query, values, transactionClient = null) {
31012
31057
  const client = transactionClient ?? await this.getConnection();
31013
31058
  try {
31014
31059
  const result = await client.query(query, values);
31015
- return result.rows.map((a) => this.createAndHydrateModel(a));
31060
+ return result.rows;
31016
31061
  } finally {
31017
31062
  if (client && !transactionClient) {
31018
31063
  client.release();
31019
31064
  }
31020
31065
  }
31021
31066
  }
31067
+ async executeQuery(query, values, transactionClient = null) {
31068
+ const rows = await this.executeQueryRaw(query, values, transactionClient);
31069
+ return rows.map((a) => this.createAndHydrateModel(a));
31070
+ }
31022
31071
  createAndHydrateModel(row) {
31023
31072
  const inputData = {};
31024
31073
  for (const key of Object.keys(row)) {
@@ -31054,6 +31103,50 @@ var AbstractRepository = class {
31054
31103
  );
31055
31104
  return result;
31056
31105
  }
31106
+ async getCount(item = null) {
31107
+ let whereClause = "";
31108
+ if (item) {
31109
+ whereClause = `WHERE ${this.createWhereStringFromPartialModel(item)}`;
31110
+ }
31111
+ const result = await this.executeQueryRaw(
31112
+ `SELECT count(*)
31113
+ FROM ${this.tableName} ${whereClause}`,
31114
+ item ? Object.values(item) : []
31115
+ );
31116
+ return parseInt(result[0].count);
31117
+ }
31118
+ async getPage(pageNumber, sortBy = [], direction = "asc", pageSize = null, item = null) {
31119
+ if (pageSize === null) {
31120
+ pageSize = DEFAULT_PAGE_SIZE;
31121
+ }
31122
+ if (pageNumber <= 0) {
31123
+ throw new Error(`Page number value cannot be less than 1`);
31124
+ }
31125
+ if (pageSize <= 0) {
31126
+ throw new Error(`Page size value cannot be less than 1`);
31127
+ }
31128
+ let whereClause = "";
31129
+ if (item) {
31130
+ whereClause = `WHERE ${this.createWhereStringFromPartialModel(item)}`;
31131
+ }
31132
+ let orderByClause = "";
31133
+ if (sortBy.length) {
31134
+ orderByClause = `ORDER BY ${sortBy.map((a) => this.modelPropertyToSqlColumn[a]).join(",")} ${direction}`;
31135
+ }
31136
+ const offset = (pageNumber - 1) * pageSize;
31137
+ const items = await this.executeQuery(
31138
+ `SELECT *
31139
+ FROM ${this.tableName} ${whereClause} ${orderByClause}
31140
+ OFFSET ${offset}
31141
+ LIMIT ${pageSize}`,
31142
+ item ? Object.values(item) : []
31143
+ );
31144
+ return {
31145
+ items,
31146
+ totalCount: await this.getCount(item),
31147
+ pageSize
31148
+ };
31149
+ }
31057
31150
  };
31058
31151
 
31059
31152
  // src/ConnectionManager.ts
@@ -31520,118 +31613,16 @@ var PostgresErrorCode = /* @__PURE__ */ ((PostgresErrorCode2) => {
31520
31613
  return PostgresErrorCode2;
31521
31614
  })(PostgresErrorCode || {});
31522
31615
 
31523
- // src/assertions/assertIsString.ts
31524
- var import_assert = require("assert");
31525
- function assertIsString(val) {
31526
- if (typeof val !== "string") {
31527
- throw new import_assert.AssertionError({
31528
- actual: val,
31529
- expected: "string",
31530
- message: "value is not a string"
31531
- });
31532
- }
31533
- }
31534
-
31535
- // src/assertions/assertIsDefined.ts
31536
- var import_assert2 = require("assert");
31537
- function assertIsDefined(value) {
31538
- if (value === void 0 || value === null) {
31539
- throw new import_assert2.AssertionError({ message: `Expected 'val' to be defined, but received ${value}` });
31540
- }
31541
- }
31542
-
31543
- // src/assertions/assertIsMapOfStringString.ts
31544
- var import_assert3 = require("assert");
31545
- function assertIsMapOfStringString(value) {
31546
- if (!value) {
31547
- throw new import_assert3.AssertionError({
31548
- actual: value,
31549
- expected: "not null",
31550
- message: "value cannot be null or undefined"
31551
- });
31552
- }
31553
- if (typeof value !== "object") {
31554
- throw new import_assert3.AssertionError({
31555
- actual: value,
31556
- expected: "string",
31557
- message: "value is not a string"
31558
- });
31559
- }
31560
- for (const [key, propValue] of Object.entries(value)) {
31561
- if (typeof propValue !== "string") {
31562
- throw new import_assert3.AssertionError({
31563
- actual: typeof propValue,
31564
- expected: "string",
31565
- message: `property ${key} is not type of string`
31566
- });
31567
- }
31568
- }
31569
- }
31570
-
31571
- // src/assertions/assertIsObject.ts
31572
- var import_assert4 = require("assert");
31573
- function assertIsObject(val) {
31574
- if (Object.prototype.toString.call(val) !== "[object Object]") {
31575
- throw new import_assert4.AssertionError({
31576
- actual: Object.prototype.toString.call(val),
31577
- expected: "object",
31578
- message: "value is not an object"
31579
- });
31580
- }
31581
- }
31582
-
31583
- // src/assertions/assertIsNotAnEmptyString.ts
31584
- var import_assert5 = require("assert");
31585
- function assertIsNotAnEmptyString(val) {
31586
- if (typeof val !== "string") {
31587
- throw new import_assert5.AssertionError({
31588
- actual: typeof val,
31589
- expected: "string",
31590
- message: "value is not a string"
31591
- });
31592
- }
31593
- if (val.trim().length === 0) {
31594
- throw new import_assert5.AssertionError({
31595
- message: "string cannot be empty"
31596
- });
31597
- }
31598
- }
31599
-
31600
- // src/assertions/assertAssign.ts
31601
- var import_assert6 = require("assert");
31602
- function assertAssign(value, assertionFunc, errorMessage) {
31603
- try {
31604
- assertionFunc(value);
31605
- } catch (e) {
31606
- if (errorMessage) {
31607
- throw new import_assert6.AssertionError({ message: errorMessage });
31608
- } else {
31609
- throw e;
31610
- }
31611
- }
31612
- return value;
31613
- }
31614
-
31615
- // src/assertions/assertAssignWithDefaultUndefinedValue.ts
31616
- function assertAssignWithDefaultUndefinedValue(value, assertionFunc, defaultValue, errorMessage) {
31617
- if (value === void 0 || value === null) {
31618
- return defaultValue;
31619
- }
31620
- return assertAssign(value, assertionFunc, errorMessage);
31621
- }
31616
+ // src/index.ts
31617
+ var import_pg2 = __toESM(require_lib2());
31622
31618
  // Annotate the CommonJS export names for ESM import in node:
31623
31619
  0 && (module.exports = {
31624
31620
  AbstractRepository,
31625
31621
  ConnectionManager,
31622
+ DEFAULT_PAGE_SIZE,
31626
31623
  Migrator,
31624
+ Pool,
31627
31625
  PostgresErrorCode,
31628
- assertAssign,
31629
- assertAssignWithDefaultUndefinedValue,
31630
- assertIsDefined,
31631
- assertIsMapOfStringString,
31632
- assertIsNotAnEmptyString,
31633
- assertIsObject,
31634
- assertIsString,
31635
31626
  getConnectionInfo
31636
31627
  });
31637
31628
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */