@aws-amplify/storage 6.8.4 → 6.8.5-local-stack.00864ae.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/cjs/errors/types/validation.js +1 -1
  2. package/dist/cjs/errors/types/validation.js.map +1 -1
  3. package/dist/cjs/errors/utils/assertValidationError.js +1 -2
  4. package/dist/cjs/errors/utils/assertValidationError.js.map +1 -1
  5. package/dist/cjs/internals/apis/list.js +1 -2
  6. package/dist/cjs/internals/apis/list.js.map +1 -1
  7. package/dist/cjs/providers/s3/apis/copy.js +1 -2
  8. package/dist/cjs/providers/s3/apis/copy.js.map +1 -1
  9. package/dist/cjs/providers/s3/apis/downloadData.js +1 -2
  10. package/dist/cjs/providers/s3/apis/downloadData.js.map +1 -1
  11. package/dist/cjs/providers/s3/apis/getProperties.js +1 -2
  12. package/dist/cjs/providers/s3/apis/getProperties.js.map +1 -1
  13. package/dist/cjs/providers/s3/apis/getUrl.js +1 -2
  14. package/dist/cjs/providers/s3/apis/getUrl.js.map +1 -1
  15. package/dist/cjs/providers/s3/apis/internal/copy.js +1 -1
  16. package/dist/cjs/providers/s3/apis/internal/copy.js.map +1 -1
  17. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/uploadCache.js +1 -1
  18. package/dist/cjs/providers/s3/apis/internal/uploadData/multipart/uploadCache.js.map +1 -1
  19. package/dist/cjs/providers/s3/apis/list.js +1 -2
  20. package/dist/cjs/providers/s3/apis/list.js.map +1 -1
  21. package/dist/cjs/providers/s3/apis/remove.js +1 -2
  22. package/dist/cjs/providers/s3/apis/remove.js.map +1 -1
  23. package/dist/cjs/providers/s3/apis/server/copy.js +1 -2
  24. package/dist/cjs/providers/s3/apis/server/copy.js.map +1 -1
  25. package/dist/cjs/providers/s3/apis/server/getProperties.js +1 -2
  26. package/dist/cjs/providers/s3/apis/server/getProperties.js.map +1 -1
  27. package/dist/cjs/providers/s3/apis/server/getUrl.js +1 -2
  28. package/dist/cjs/providers/s3/apis/server/getUrl.js.map +1 -1
  29. package/dist/cjs/providers/s3/apis/server/list.js +1 -2
  30. package/dist/cjs/providers/s3/apis/server/list.js.map +1 -1
  31. package/dist/cjs/providers/s3/apis/server/remove.js +1 -2
  32. package/dist/cjs/providers/s3/apis/server/remove.js.map +1 -1
  33. package/dist/cjs/providers/s3/apis/uploadData.js +1 -2
  34. package/dist/cjs/providers/s3/apis/uploadData.js.map +1 -1
  35. package/dist/cjs/providers/s3/utils/client/runtime/base64/index.browser.js +1 -2
  36. package/dist/cjs/providers/s3/utils/client/runtime/base64/index.browser.js.map +1 -1
  37. package/dist/cjs/providers/s3/utils/client/runtime/base64/index.native.js +1 -2
  38. package/dist/cjs/providers/s3/utils/client/runtime/base64/index.native.js.map +1 -1
  39. package/dist/cjs/providers/s3/utils/client/utils/serializeHelpers.js +2 -2
  40. package/dist/cjs/providers/s3/utils/client/utils/serializeHelpers.js.map +1 -1
  41. package/dist/cjs/providers/s3/utils/userAgent.js +1 -2
  42. package/dist/cjs/providers/s3/utils/userAgent.js.map +1 -1
  43. package/dist/cjs/providers/s3/utils/validateMultipartUploadXML.js +1 -2
  44. package/dist/cjs/providers/s3/utils/validateMultipartUploadXML.js.map +1 -1
  45. package/dist/cjs/providers/s3/utils/validateObjectUrl.js +1 -2
  46. package/dist/cjs/providers/s3/utils/validateObjectUrl.js.map +1 -1
  47. package/dist/esm/internals/apis/copy.d.ts +2 -1
  48. package/dist/esm/internals/apis/getUrl.d.ts +2 -1
  49. package/dist/esm/internals/apis/listPaths/resolveLocationsForCurrentSession.d.ts +2 -2
  50. package/dist/esm/internals/apis/uploadData.d.ts +2 -1
  51. package/dist/esm/providers/s3/apis/internal/copy.mjs +1 -1
  52. package/dist/esm/providers/s3/apis/internal/copy.mjs.map +1 -1
  53. package/dist/esm/providers/s3/apis/internal/downloadData.d.ts +1 -1
  54. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadCache.d.ts +2 -2
  55. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadCache.mjs +1 -1
  56. package/dist/esm/providers/s3/apis/internal/uploadData/multipart/uploadCache.mjs.map +1 -1
  57. package/dist/esm/providers/s3/utils/client/s3control/getDataAccess.d.ts +2 -2
  58. package/dist/esm/providers/s3/utils/client/s3control/listCallerAccessGrants.d.ts +2 -2
  59. package/dist/esm/providers/s3/utils/client/s3data/abortMultipartUpload.d.ts +4 -4
  60. package/dist/esm/providers/s3/utils/client/s3data/completeMultipartUpload.d.ts +4 -4
  61. package/dist/esm/providers/s3/utils/client/s3data/copyObject.d.ts +4 -4
  62. package/dist/esm/providers/s3/utils/client/s3data/createMultipartUpload.d.ts +4 -4
  63. package/dist/esm/providers/s3/utils/client/s3data/deleteObject.d.ts +4 -4
  64. package/dist/esm/providers/s3/utils/client/s3data/getObject.d.ts +4 -4
  65. package/dist/esm/providers/s3/utils/client/s3data/headObject.d.ts +4 -4
  66. package/dist/esm/providers/s3/utils/client/s3data/listObjectsV2.d.ts +4 -4
  67. package/dist/esm/providers/s3/utils/client/s3data/listParts.d.ts +4 -4
  68. package/dist/esm/providers/s3/utils/client/s3data/putObject.d.ts +4 -4
  69. package/dist/esm/providers/s3/utils/client/s3data/uploadPart.d.ts +4 -4
  70. package/dist/esm/providers/s3/utils/client/utils/deserializeHelpers.d.ts +1 -1
  71. package/dist/esm/providers/s3/utils/client/utils/integrityHelpers.d.ts +2 -2
  72. package/dist/esm/providers/s3/utils/client/utils/parsePayload.d.ts +1 -1
  73. package/dist/esm/providers/s3/utils/hexUtils.d.ts +2 -2
  74. package/package.json +117 -118
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.validateS3RequiredParameter = exports.serializePathnameObjectKey = exports.serializeObjectConfigsToHeaders = exports.assignStringVariables = void 0;
4
+ exports.serializePathnameObjectKey = exports.serializeObjectConfigsToHeaders = exports.assignStringVariables = void 0;
5
+ exports.validateS3RequiredParameter = validateS3RequiredParameter;
5
6
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6
7
  // SPDX-License-Identifier: Apache-2.0
7
8
  const aws_client_utils_1 = require("@aws-amplify/core/internals/aws-client-utils");
@@ -65,5 +66,4 @@ function validateS3RequiredParameter(assertion, paramName) {
65
66
  });
66
67
  }
67
68
  }
68
- exports.validateS3RequiredParameter = validateS3RequiredParameter;
69
69
  //# sourceMappingURL=serializeHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"serializeHelpers.js","sources":["../../../../../../../src/providers/s3/utils/client/utils/serializeHelpers.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateS3RequiredParameter = exports.serializePathnameObjectKey = exports.serializeObjectConfigsToHeaders = exports.assignStringVariables = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst StorageError_1 = require(\"../../../../../errors/StorageError\");\n/**\n * @internal\n */\nconst assignStringVariables = (values) => {\n const queryParams = {};\n for (const [key, value] of Object.entries(values)) {\n if (value != null) {\n queryParams[key] = value.toString();\n }\n }\n return queryParams;\n};\nexports.assignStringVariables = assignStringVariables;\n/**\n * Serailize the parameters for configuring the S3 object. Currently used by\n * `putObject` and `createMultipartUpload` API.\n *\n * @internal\n */\nconst serializeObjectConfigsToHeaders = async (input) => ({\n ...(0, exports.assignStringVariables)({\n 'x-amz-acl': input.ACL,\n 'cache-control': input.CacheControl,\n 'content-disposition': input.ContentDisposition,\n 'content-language': input.ContentLanguage,\n 'content-encoding': input.ContentEncoding,\n 'content-type': input.ContentType,\n expires: input.Expires?.toUTCString(),\n 'x-amz-tagging': input.Tagging,\n ...serializeMetadata(input.Metadata),\n }),\n});\nexports.serializeObjectConfigsToHeaders = serializeObjectConfigsToHeaders;\nconst serializeMetadata = (metadata = {}) => Object.keys(metadata).reduce((acc, suffix) => {\n acc[`x-amz-meta-${suffix.toLowerCase()}`] = metadata[suffix];\n return acc;\n}, {});\n/**\n * Serialize the object key to a URL pathname.\n * @see https://github.com/aws/aws-sdk-js-v3/blob/7ed7101dcc4e81038b6c7f581162b959e6b33a04/clients/client-s3/src/protocols/Aws_restXml.ts#L1108\n *\n * @internal\n */\nconst serializePathnameObjectKey = (url, key) => {\n return (url.pathname.replace(/\\/$/, '') +\n `/${key.split('/').map(aws_client_utils_1.extendedEncodeURIComponent).join('/')}`);\n};\nexports.serializePathnameObjectKey = serializePathnameObjectKey;\nfunction validateS3RequiredParameter(assertion, paramName) {\n if (!assertion) {\n throw new StorageError_1.StorageError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: new TypeError(`Expected a non-null value for S3 parameter ${paramName}`),\n recoverySuggestion: 'This is likely to be a bug. Please reach out to library authors.',\n });\n }\n}\nexports.validateS3RequiredParameter = validateS3RequiredParameter;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,+BAA+B,GAAG,OAAO,CAAC,qBAAqB,GAAG,MAAM;AAC3J;AACA;AACA,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC;AAClF,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,MAAM,cAAc,GAAG,OAAO,CAAC,oCAAoC,CAAC;AACpE;AACA;AACA;AACA,MAAM,qBAAqB,GAAG,CAAC,MAAM,KAAK;AAC1C,IAAI,MAAM,WAAW,GAAG,EAAE;AAC1B,IAAI,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM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AE,GAAG,KAAK;AACjD,IAAI,QAAQ,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;AAC3C,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACzF,CAAC;AACD,OAAO,CAAC,0BAA0B,GAAG,0BAA0B;AAC/D,SAAS,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE;AAC3D,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC;AAC9C,YAAY,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAClD,YAAY,OAAO,EAAE,gCAAgC;AACrD,YAAY,eAAe,EAAE,IAAI,SAAS,CAAC,CAAC,2CAA2C,EAAE,SAAS,CAAC,CAAC,CAAC;AACrG,YAAY,kBAAkB,EAAE,kEAAkE;AAClG,SAAS,CAAC;AACV;AACA;AACA,OAAO,CAAC,2BAA2B,GAAG,2BAA2B;;"}
1
+ {"version":3,"file":"serializeHelpers.js","sources":["../../../../../../../src/providers/s3/utils/client/utils/serializeHelpers.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializePathnameObjectKey = exports.serializeObjectConfigsToHeaders = exports.assignStringVariables = void 0;\nexports.validateS3RequiredParameter = validateS3RequiredParameter;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst StorageError_1 = require(\"../../../../../errors/StorageError\");\n/**\n * @internal\n */\nconst assignStringVariables = (values) => {\n const queryParams = {};\n for (const [key, value] of Object.entries(values)) {\n if (value != null) {\n queryParams[key] = value.toString();\n }\n }\n return queryParams;\n};\nexports.assignStringVariables = assignStringVariables;\n/**\n * Serailize the parameters for configuring the S3 object. Currently used by\n * `putObject` and `createMultipartUpload` API.\n *\n * @internal\n */\nconst serializeObjectConfigsToHeaders = async (input) => ({\n ...(0, exports.assignStringVariables)({\n 'x-amz-acl': input.ACL,\n 'cache-control': input.CacheControl,\n 'content-disposition': input.ContentDisposition,\n 'content-language': input.ContentLanguage,\n 'content-encoding': input.ContentEncoding,\n 'content-type': input.ContentType,\n expires: input.Expires?.toUTCString(),\n 'x-amz-tagging': input.Tagging,\n ...serializeMetadata(input.Metadata),\n }),\n});\nexports.serializeObjectConfigsToHeaders = serializeObjectConfigsToHeaders;\nconst serializeMetadata = (metadata = {}) => Object.keys(metadata).reduce((acc, suffix) => {\n acc[`x-amz-meta-${suffix.toLowerCase()}`] = metadata[suffix];\n return acc;\n}, {});\n/**\n * Serialize the object key to a URL pathname.\n * @see https://github.com/aws/aws-sdk-js-v3/blob/7ed7101dcc4e81038b6c7f581162b959e6b33a04/clients/client-s3/src/protocols/Aws_restXml.ts#L1108\n *\n * @internal\n */\nconst serializePathnameObjectKey = (url, key) => {\n return (url.pathname.replace(/\\/$/, '') +\n `/${key.split('/').map(aws_client_utils_1.extendedEncodeURIComponent).join('/')}`);\n};\nexports.serializePathnameObjectKey = serializePathnameObjectKey;\nfunction validateS3RequiredParameter(assertion, paramName) {\n if (!assertion) {\n throw new StorageError_1.StorageError({\n name: utils_1.AmplifyErrorCode.Unknown,\n message: 'An unknown error has occurred.',\n underlyingError: new TypeError(`Expected a non-null value for S3 parameter ${paramName}`),\n recoverySuggestion: 'This is likely to be a bug. Please reach out to library authors.',\n });\n }\n}\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,+BAA+B,GAAG,OAAO,CA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OAAO,CAAC,+BAA+B,GAAG,+BAA+B;AACzE,MAAM,iBAAiB,GAAG,CAAC,QAAQ,GAAG,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,KAAK;AAC3F,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC;AAChE,IAAI,OAAO,GAAG;AACd,CAAC,EAAE,EAAE,CAAC;AACN;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,0BAA0B,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK;AACjD,IAAI,QAAQ,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;AAC3C,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACzF,CAAC;AACD,OAAO,CAAC,0BAA0B,GAAG,0BAA0B;AAC/D,SAAS,2BAA2B,CAAC,SAAS,EAAE,SAAS,EAAE;AAC3D,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC;AAC9C,YAAY,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,OAAO;AAClD,YAAY,OAAO,EAAE,gCAAgC;AACrD,YAAY,eAAe,EAAE,IAAI,SAAS,CAAC,CAAC,2CAA2C,EAAE,SAAS,CAAC,CAAC,CAAC;AACrG,YAAY,kBAAkB,EAAE,kEAAkE;AAClG,SAAS,CAAC;AACV;AACA;;"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.getStorageUserAgentValue = void 0;
4
+ exports.getStorageUserAgentValue = getStorageUserAgentValue;
5
5
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6
6
  // SPDX-License-Identifier: Apache-2.0
7
7
  const utils_1 = require("@aws-amplify/core/internals/utils");
@@ -11,5 +11,4 @@ function getStorageUserAgentValue(action) {
11
11
  action,
12
12
  });
13
13
  }
14
- exports.getStorageUserAgentValue = getStorageUserAgentValue;
15
14
  //# sourceMappingURL=userAgent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"userAgent.js","sources":["../../../../../src/providers/s3/utils/userAgent.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getStorageUserAgentValue = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nfunction getStorageUserAgentValue(action) {\n return (0, utils_1.getAmplifyUserAgent)({\n category: utils_1.Category.Storage,\n action,\n });\n}\nexports.getStorageUserAgentValue = getStorageUserAgentValue;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,MAAM;AACzC;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,SAAS,wBAAwB,CAAC,MAAM,EAAE;AAC1C,IAAI,OAAO,IAAI,OAAO,CAAC,mBAAmB,EAAE;AAC5C,QAAQ,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,OAAO;AAC1C,QAAQ,MAAM;AACd,KAAK,CAAC;AACN;AACA,OAAO,CAAC,wBAAwB,GAAG,wBAAwB;;"}
1
+ {"version":3,"file":"userAgent.js","sources":["../../../../../src/providers/s3/utils/userAgent.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getStorageUserAgentValue = getStorageUserAgentValue;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nfunction getStorageUserAgentValue(action) {\n return (0, utils_1.getAmplifyUserAgent)({\n category: utils_1.Category.Storage,\n action,\n });\n}\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,wBAAwB,GAAG,wBAAwB;AAC3D;AACA;AACA,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC;AAC5D,SAAS,wBAAwB,CAAC,MAAM,EAAE;AAC1C,IAAI,OAAO,IAAI,OAAO,CAAC,mBAAmB,EAAE;AAC5C,QAAQ,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,OAAO;AAC1C,QAAQ,MAAM;AACd,KAAK,CAAC;AACN;;"}
@@ -3,7 +3,7 @@
3
3
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateMultipartUploadXML = void 0;
6
+ exports.validateMultipartUploadXML = validateMultipartUploadXML;
7
7
  const IntegrityError_1 = require("../../../errors/IntegrityError");
8
8
  const runtime_1 = require("./client/runtime");
9
9
  const utils_1 = require("./client/utils");
@@ -23,5 +23,4 @@ function validateMultipartUploadXML(input, xml) {
23
23
  throw new IntegrityError_1.IntegrityError();
24
24
  }
25
25
  }
26
- exports.validateMultipartUploadXML = validateMultipartUploadXML;
27
26
  //# sourceMappingURL=validateMultipartUploadXML.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validateMultipartUploadXML.js","sources":["../../../../../src/providers/s3/utils/validateMultipartUploadXML.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateMultipartUploadXML = void 0;\nconst IntegrityError_1 = require(\"../../../errors/IntegrityError\");\nconst runtime_1 = require(\"./client/runtime\");\nconst utils_1 = require(\"./client/utils\");\nconst integrityHelpers_1 = require(\"./client/utils/integrityHelpers\");\nfunction validateMultipartUploadXML(input, xml) {\n if (!input.Parts) {\n throw new IntegrityError_1.IntegrityError();\n }\n const parsedXML = runtime_1.parser.parse(xml);\n const mappedCompletedMultipartUpload = (0, utils_1.map)(parsedXML, {\n Parts: [\n 'Part',\n value => (0, utils_1.emptyArrayGuard)(value, utils_1.deserializeCompletedPartList),\n ],\n });\n if (!(0, integrityHelpers_1.isEqual)(input, mappedCompletedMultipartUpload)) {\n throw new IntegrityError_1.IntegrityError();\n }\n}\nexports.validateMultipartUploadXML = validateMultipartUploadXML;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,0BAA0B,GAAG,MAAM;AAC3C,MAAM,gBAAgB,GAAG,OAAO,CAAC,gCAAgC,CAAC;AAClE,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,kBAAkB,GAAG,OAAO,CAAC,iCAAiC,CAAC;AACrE,SAAS,0BAA0B,CAAC,KAAK,EAAE,GAAG,EAAE;AAChD,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;AACtB,QAAQ,MAAM,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACnD;AACA,IAAI,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;AACjD,IAAI,MAAM,8BAA8B,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE;AACvE,QAAQ,KAAK,EAAE;AACf,YAAY,MAAM;AAClB,YAAY,KAAK,IAAI,IAAI,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,4BAA4B,CAAC;AAC9F,SAAS;AACT,KAAK,CAAC;AACN,IAAI,IAAI,CAAC,IAAI,kBAAkB,CAAC,OAAO,EAAE,KAAK,EAAE,8BAA8B,CAAC,EAAE;AACjF,QAAQ,MAAM,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACnD;AACA;AACA,OAAO,CAAC,0BAA0B,GAAG,0BAA0B;;"}
1
+ {"version":3,"file":"validateMultipartUploadXML.js","sources":["../../../../../src/providers/s3/utils/validateMultipartUploadXML.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateMultipartUploadXML = validateMultipartUploadXML;\nconst IntegrityError_1 = require(\"../../../errors/IntegrityError\");\nconst runtime_1 = require(\"./client/runtime\");\nconst utils_1 = require(\"./client/utils\");\nconst integrityHelpers_1 = require(\"./client/utils/integrityHelpers\");\nfunction validateMultipartUploadXML(input, xml) {\n if (!input.Parts) {\n throw new IntegrityError_1.IntegrityError();\n }\n const parsedXML = runtime_1.parser.parse(xml);\n const mappedCompletedMultipartUpload = (0, utils_1.map)(parsedXML, {\n Parts: [\n 'Part',\n value => (0, utils_1.emptyArrayGuard)(value, utils_1.deserializeCompletedPartList),\n ],\n });\n if (!(0, integrityHelpers_1.isEqual)(input, mappedCompletedMultipartUpload)) {\n throw new IntegrityError_1.IntegrityError();\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,0BAA0B,GAAG,0BAA0B;AAC/D,MAAM,gBAAgB,GAAG,OAAO,CAAC,gCAAgC,CAAC;AAClE,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;AAC7C,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;AACzC,MAAM,kBAAkB,GAAG,OAAO,CAAC,iCAAiC,CAAC;AACrE,SAAS,0BAA0B,CAAC,KAAK,EAAE,GAAG,EAAE;AAChD,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;AACtB,QAAQ,MAAM,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACnD;AACA,IAAI,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;AACjD,IAAI,MAAM,8BAA8B,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE;AACvE,QAAQ,KAAK,EAAE;AACf,YAAY,MAAM;AAClB,YAAY,KAAK,IAAI,IAAI,OAAO,CAAC,eAAe,EAAE,KAAK,EAAE,OAAO,CAAC,4BAA4B,CAAC;AAC9F,SAAS;AACT,KAAK,CAAC;AACN,IAAI,IAAI,CAAC,IAAI,kBAAkB,CAAC,OAAO,EAAE,KAAK,EAAE,8BAA8B,CAAC,EAAE;AACjF,QAAQ,MAAM,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACnD;AACA;;"}
@@ -3,7 +3,7 @@
3
3
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateObjectUrl = void 0;
6
+ exports.validateObjectUrl = validateObjectUrl;
7
7
  const aws_client_utils_1 = require("@aws-amplify/core/internals/aws-client-utils");
8
8
  const IntegrityError_1 = require("../../../errors/IntegrityError");
9
9
  function validateObjectUrl({ bucketName, key, objectURL, }) {
@@ -20,5 +20,4 @@ function validateObjectUrl({ bucketName, key, objectURL, }) {
20
20
  throw new IntegrityError_1.IntegrityError();
21
21
  }
22
22
  }
23
- exports.validateObjectUrl = validateObjectUrl;
24
23
  //# sourceMappingURL=validateObjectUrl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validateObjectUrl.js","sources":["../../../../../src/providers/s3/utils/validateObjectUrl.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateObjectUrl = void 0;\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst IntegrityError_1 = require(\"../../../errors/IntegrityError\");\nfunction validateObjectUrl({ bucketName, key, objectURL, }) {\n if (!bucketName || !key || !objectURL) {\n throw new IntegrityError_1.IntegrityError();\n }\n const bucketWithDots = bucketName.includes('.');\n const encodedBucketName = (0, aws_client_utils_1.extendedEncodeURIComponent)(bucketName);\n const encodedKey = key.split('/').map(aws_client_utils_1.extendedEncodeURIComponent).join('/');\n const isPathStyleUrl = objectURL.pathname === `/${encodedBucketName}/${encodedKey}`;\n const isSubdomainUrl = objectURL.hostname.startsWith(`${encodedBucketName}.`) &&\n objectURL.pathname === `/${encodedKey}`;\n if (!(isPathStyleUrl || (!bucketWithDots && isSubdomainUrl))) {\n throw new IntegrityError_1.IntegrityError();\n }\n}\nexports.validateObjectUrl = validateObjectUrl;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,MAAM;AAClC,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC;AAClF,MAAM,gBAAgB,GAAG,OAAO,CAAC,gCAAgC,CAAC;AAClE,SAAS,iBAAiB,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,SAAS,GAAG,EAAE;AAC5D,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE;AAC3C,QAAQ,MAAM,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACnD;AACA,IAAI,MAAM,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;AACnD,IAAI,MAAM,iBAAiB,GAAG,IAAI,kBAAkB,CAAC,0BAA0B,EAAE,UAAU,CAAC;AAC5F,IAAI,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAClG,IAAI,MAAM,cAAc,GAAG,SAAS,CAAC,QAAQ,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AACvF,IAAI,MAAM,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;AACjF,QAAQ,SAAS,CAAC,QAAQ,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,IAAI,EAAE,cAAc,KAAK,CAAC,cAAc,IAAI,cAAc,CAAC,CAAC,EAAE;AAClE,QAAQ,MAAM,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACnD;AACA;AACA,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;;"}
1
+ {"version":3,"file":"validateObjectUrl.js","sources":["../../../../../src/providers/s3/utils/validateObjectUrl.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateObjectUrl = validateObjectUrl;\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst IntegrityError_1 = require(\"../../../errors/IntegrityError\");\nfunction validateObjectUrl({ bucketName, key, objectURL, }) {\n if (!bucketName || !key || !objectURL) {\n throw new IntegrityError_1.IntegrityError();\n }\n const bucketWithDots = bucketName.includes('.');\n const encodedBucketName = (0, aws_client_utils_1.extendedEncodeURIComponent)(bucketName);\n const encodedKey = key.split('/').map(aws_client_utils_1.extendedEncodeURIComponent).join('/');\n const isPathStyleUrl = objectURL.pathname === `/${encodedBucketName}/${encodedKey}`;\n const isSubdomainUrl = objectURL.hostname.startsWith(`${encodedBucketName}.`) &&\n objectURL.pathname === `/${encodedKey}`;\n if (!(isPathStyleUrl || (!bucketWithDots && isSubdomainUrl))) {\n throw new IntegrityError_1.IntegrityError();\n }\n}\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC7D,OAAO,CAAC,iBAAiB,GAAG,iBAAiB;AAC7C,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC;AAClF,MAAM,gBAAgB,GAAG,OAAO,CAAC,gCAAgC,CAAC;AAClE,SAAS,iBAAiB,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,SAAS,GAAG,EAAE;AAC5D,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE;AAC3C,QAAQ,MAAM,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACnD;AACA,IAAI,MAAM,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;AACnD,IAAI,MAAM,iBAAiB,GAAG,IAAI,kBAAkB,CAAC,0BAA0B,EAAE,UAAU,CAAC;AAC5F,IAAI,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAClG,IAAI,MAAM,cAAc,GAAG,SAAS,CAAC,QAAQ,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AACvF,IAAI,MAAM,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;AACjF,QAAQ,SAAS,CAAC,QAAQ,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;AAC/C,IAAI,IAAI,EAAE,cAAc,KAAK,CAAC,cAAc,IAAI,cAAc,CAAC,CAAC,EAAE;AAClE,QAAQ,MAAM,IAAI,gBAAgB,CAAC,cAAc,EAAE;AACnD;AACA;;"}
@@ -1,5 +1,6 @@
1
1
  import { CopyInput } from '../types/inputs';
2
+ import { CopyOutput } from '../types/outputs';
2
3
  /**
3
4
  * @internal
4
5
  */
5
- export declare const copy: (input: CopyInput) => Promise<import("../..").CopyWithPathOutput>;
6
+ export declare const copy: (input: CopyInput) => Promise<CopyOutput>;
@@ -1,5 +1,6 @@
1
1
  import { GetUrlInput } from '../types/inputs';
2
+ import { GetUrlOutput } from '../types/outputs';
2
3
  /**
3
4
  * @internal
4
5
  */
5
- export declare const getUrl: (input: GetUrlInput) => Promise<import("../../types").StorageGetUrlOutput>;
6
+ export declare const getUrl: (input: GetUrlInput) => Promise<GetUrlOutput>;
@@ -3,6 +3,6 @@ import { BucketInfo } from '../../../providers/s3/types/options';
3
3
  export declare const resolveLocationsForCurrentSession: ({ buckets, isAuthenticated, identityId, userGroup, }: {
4
4
  buckets: Record<string, BucketInfo>;
5
5
  isAuthenticated: boolean;
6
- identityId?: string | undefined;
7
- userGroup?: string | undefined;
6
+ identityId?: string;
7
+ userGroup?: string;
8
8
  }) => PathAccess[];
@@ -1,5 +1,6 @@
1
1
  import { UploadDataInput } from '../types/inputs';
2
+ import { UploadDataOutput } from '../types/outputs';
2
3
  /**
3
4
  * @internal
4
5
  */
5
- export declare const uploadData: (input: UploadDataInput) => import("../..").UploadDataWithPathOutput;
6
+ export declare const uploadData: (input: UploadDataInput) => UploadDataOutput;
@@ -139,7 +139,7 @@ const serviceCopy = async ({ source, destination, bucket, s3Config, notModifiedS
139
139
  Bucket: bucket,
140
140
  CopySource: source,
141
141
  Key: destination,
142
- MetadataDirective: 'COPY',
142
+ MetadataDirective: 'COPY', // Copies over metadata like contentType as well
143
143
  CopySourceIfMatch: eTag,
144
144
  CopySourceIfUnmodifiedSince: notModifiedSince,
145
145
  ExpectedSourceBucketOwner: expectedSourceBucketOwner,
@@ -1 +1 @@
1
- {"version":3,"file":"copy.mjs","sources":["../../../../../../src/providers/s3/apis/internal/copy.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { StorageAction } from '@aws-amplify/core/internals/utils';\nimport { isInputWithPath, resolveS3ConfigAndInput, validateBucketOwnerID, validateStorageOperationInput, } from '../../utils';\nimport { StorageValidationErrorCode } from '../../../../errors/types/validation';\nimport { assertValidationError } from '../../../../errors/utils/assertValidationError';\nimport { copyObject } from '../../utils/client/s3data';\nimport { getStorageUserAgentValue } from '../../utils/userAgent';\nimport { logger } from '../../../../utils';\nconst isCopyInputWithPath = (input) => isInputWithPath(input.source);\nconst storageBucketAssertion = (sourceBucket, destBucket) => {\n /** For multi-bucket, both source and destination bucket needs to be passed in\n * or both can be undefined and we fallback to singleton's default value\n */\n assertValidationError(\n // Both src & dest bucket option is present is acceptable\n (sourceBucket !== undefined && destBucket !== undefined) ||\n // or both are undefined is also acceptable\n (!destBucket && !sourceBucket), StorageValidationErrorCode.InvalidCopyOperationStorageBucket);\n};\nexport const copy = async (amplify, input) => {\n return isCopyInputWithPath(input)\n ? copyWithPath(amplify, input)\n : copyWithKey(amplify, input);\n};\nconst copyWithPath = async (amplify, input) => {\n const { source, destination } = input;\n storageBucketAssertion(source.bucket, destination.bucket);\n const { bucket: sourceBucket } = await resolveS3ConfigAndInput(amplify, {\n path: input.source.path,\n options: {\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.source,\n },\n });\n // The bucket, region, credentials of s3 client are resolved from destination.\n // Whereas the source bucket and path are a input parameter of S3 copy operation.\n const { s3Config, bucket: destBucket, identityId, } = await resolveS3ConfigAndInput(amplify, {\n path: input.destination.path,\n options: {\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n customEndpoint: input.options?.customEndpoint,\n ...input.destination,\n },\n }); // resolveS3ConfigAndInput does not make extra API calls or storage access if called repeatedly.\n assertValidationError(!!source.path, StorageValidationErrorCode.NoSourcePath);\n assertValidationError(!!destination.path, StorageValidationErrorCode.NoDestinationPath);\n const { objectKey: sourcePath } = validateStorageOperationInput(source, identityId);\n const { objectKey: destinationPath } = validateStorageOperationInput(destination, identityId);\n validateBucketOwnerID(source.expectedBucketOwner);\n validateBucketOwnerID(destination.expectedBucketOwner);\n const finalCopySource = `${sourceBucket}/${sourcePath}`;\n const finalCopyDestination = destinationPath;\n logger.debug(`copying \"${finalCopySource}\" to \"${finalCopyDestination}\".`);\n await serviceCopy({\n source: finalCopySource,\n destination: finalCopyDestination,\n bucket: destBucket,\n s3Config,\n notModifiedSince: input.source.notModifiedSince,\n eTag: input.source.eTag,\n expectedSourceBucketOwner: input.source?.expectedBucketOwner,\n expectedBucketOwner: input.destination?.expectedBucketOwner,\n });\n return { path: finalCopyDestination };\n};\n/** @deprecated Use {@link copyWithPath} instead. */\nexport const copyWithKey = async (amplify, input) => {\n const { source, destination } = input;\n storageBucketAssertion(source.bucket, destination.bucket);\n assertValidationError(!!source.key, StorageValidationErrorCode.NoSourceKey);\n assertValidationError(!!destination.key, StorageValidationErrorCode.NoDestinationKey);\n validateBucketOwnerID(source.expectedBucketOwner);\n validateBucketOwnerID(destination.expectedBucketOwner);\n const { bucket: sourceBucket, keyPrefix: sourceKeyPrefix } = await resolveS3ConfigAndInput(amplify, {\n ...input,\n options: {\n // @ts-expect-error: 'options' does not exist on type 'CopyInput'. In case of JS users set the location\n // credentials provider option, resolveS3ConfigAndInput will throw validation error.\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.source,\n },\n });\n // The bucket, region, credentials of s3 client are resolved from destination.\n // Whereas the source bucket and path are a input parameter of S3 copy operation.\n const { s3Config, bucket: destBucket, keyPrefix: destinationKeyPrefix, } = await resolveS3ConfigAndInput(amplify, {\n ...input,\n options: {\n // @ts-expect-error: 'options' does not exist on type 'CopyInput'. In case of JS users set the location\n // credentials provider option, resolveS3ConfigAndInput will throw validation error.\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.destination,\n },\n }); // resolveS3ConfigAndInput does not make extra API calls or storage access if called repeatedly.\n // TODO(ashwinkumar6) V6-logger: warn `You may copy files from another user if the source level is \"protected\", currently it's ${srcLevel}`\n const finalCopySource = `${sourceBucket}/${sourceKeyPrefix}${source.key}`;\n const finalCopyDestination = `${destinationKeyPrefix}${destination.key}`;\n logger.debug(`copying \"${finalCopySource}\" to \"${finalCopyDestination}\".`);\n await serviceCopy({\n source: finalCopySource,\n destination: finalCopyDestination,\n bucket: destBucket,\n s3Config,\n notModifiedSince: input.source.notModifiedSince,\n eTag: input.source.eTag,\n expectedSourceBucketOwner: input.source?.expectedBucketOwner,\n expectedBucketOwner: input.destination?.expectedBucketOwner,\n });\n return {\n key: destination.key,\n };\n};\nconst serviceCopy = async ({ source, destination, bucket, s3Config, notModifiedSince, eTag, expectedSourceBucketOwner, expectedBucketOwner, }) => {\n await copyObject({\n ...s3Config,\n userAgentValue: getStorageUserAgentValue(StorageAction.Copy),\n }, {\n Bucket: bucket,\n CopySource: source,\n Key: destination,\n MetadataDirective: 'COPY',\n CopySourceIfMatch: eTag,\n CopySourceIfUnmodifiedSince: notModifiedSince,\n ExpectedSourceBucketOwner: expectedSourceBucketOwner,\n ExpectedBucketOwner: expectedBucketOwner,\n });\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAQA,MAAM,mBAAmB,GAAG,CAAC,KAAK,KAAK,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC;AACpE,MAAM,sBAAsB,GAAG,CAAC,YAAY,EAAE,UAAU,KAAK;AAC7D;AACA;AACA;AACA,IAAI,qBAAqB;AACzB;AACA,IAAI,C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/s3/apis/internal/copy.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { StorageAction } from '@aws-amplify/core/internals/utils';\nimport { isInputWithPath, resolveS3ConfigAndInput, validateBucketOwnerID, validateStorageOperationInput, } from '../../utils';\nimport { StorageValidationErrorCode } from '../../../../errors/types/validation';\nimport { assertValidationError } from '../../../../errors/utils/assertValidationError';\nimport { copyObject } from '../../utils/client/s3data';\nimport { getStorageUserAgentValue } from '../../utils/userAgent';\nimport { logger } from '../../../../utils';\nconst isCopyInputWithPath = (input) => isInputWithPath(input.source);\nconst storageBucketAssertion = (sourceBucket, destBucket) => {\n /** For multi-bucket, both source and destination bucket needs to be passed in\n * or both can be undefined and we fallback to singleton's default value\n */\n assertValidationError(\n // Both src & dest bucket option is present is acceptable\n (sourceBucket !== undefined && destBucket !== undefined) ||\n // or both are undefined is also acceptable\n (!destBucket && !sourceBucket), StorageValidationErrorCode.InvalidCopyOperationStorageBucket);\n};\nexport const copy = async (amplify, input) => {\n return isCopyInputWithPath(input)\n ? copyWithPath(amplify, input)\n : copyWithKey(amplify, input);\n};\nconst copyWithPath = async (amplify, input) => {\n const { source, destination } = input;\n storageBucketAssertion(source.bucket, destination.bucket);\n const { bucket: sourceBucket } = await resolveS3ConfigAndInput(amplify, {\n path: input.source.path,\n options: {\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.source,\n },\n });\n // The bucket, region, credentials of s3 client are resolved from destination.\n // Whereas the source bucket and path are a input parameter of S3 copy operation.\n const { s3Config, bucket: destBucket, identityId, } = await resolveS3ConfigAndInput(amplify, {\n path: input.destination.path,\n options: {\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n customEndpoint: input.options?.customEndpoint,\n ...input.destination,\n },\n }); // resolveS3ConfigAndInput does not make extra API calls or storage access if called repeatedly.\n assertValidationError(!!source.path, StorageValidationErrorCode.NoSourcePath);\n assertValidationError(!!destination.path, StorageValidationErrorCode.NoDestinationPath);\n const { objectKey: sourcePath } = validateStorageOperationInput(source, identityId);\n const { objectKey: destinationPath } = validateStorageOperationInput(destination, identityId);\n validateBucketOwnerID(source.expectedBucketOwner);\n validateBucketOwnerID(destination.expectedBucketOwner);\n const finalCopySource = `${sourceBucket}/${sourcePath}`;\n const finalCopyDestination = destinationPath;\n logger.debug(`copying \"${finalCopySource}\" to \"${finalCopyDestination}\".`);\n await serviceCopy({\n source: finalCopySource,\n destination: finalCopyDestination,\n bucket: destBucket,\n s3Config,\n notModifiedSince: input.source.notModifiedSince,\n eTag: input.source.eTag,\n expectedSourceBucketOwner: input.source?.expectedBucketOwner,\n expectedBucketOwner: input.destination?.expectedBucketOwner,\n });\n return { path: finalCopyDestination };\n};\n/** @deprecated Use {@link copyWithPath} instead. */\nexport const copyWithKey = async (amplify, input) => {\n const { source, destination } = input;\n storageBucketAssertion(source.bucket, destination.bucket);\n assertValidationError(!!source.key, StorageValidationErrorCode.NoSourceKey);\n assertValidationError(!!destination.key, StorageValidationErrorCode.NoDestinationKey);\n validateBucketOwnerID(source.expectedBucketOwner);\n validateBucketOwnerID(destination.expectedBucketOwner);\n const { bucket: sourceBucket, keyPrefix: sourceKeyPrefix } = await resolveS3ConfigAndInput(amplify, {\n ...input,\n options: {\n // @ts-expect-error: 'options' does not exist on type 'CopyInput'. In case of JS users set the location\n // credentials provider option, resolveS3ConfigAndInput will throw validation error.\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.source,\n },\n });\n // The bucket, region, credentials of s3 client are resolved from destination.\n // Whereas the source bucket and path are a input parameter of S3 copy operation.\n const { s3Config, bucket: destBucket, keyPrefix: destinationKeyPrefix, } = await resolveS3ConfigAndInput(amplify, {\n ...input,\n options: {\n // @ts-expect-error: 'options' does not exist on type 'CopyInput'. In case of JS users set the location\n // credentials provider option, resolveS3ConfigAndInput will throw validation error.\n locationCredentialsProvider: input.options?.locationCredentialsProvider,\n ...input.destination,\n },\n }); // resolveS3ConfigAndInput does not make extra API calls or storage access if called repeatedly.\n // TODO(ashwinkumar6) V6-logger: warn `You may copy files from another user if the source level is \"protected\", currently it's ${srcLevel}`\n const finalCopySource = `${sourceBucket}/${sourceKeyPrefix}${source.key}`;\n const finalCopyDestination = `${destinationKeyPrefix}${destination.key}`;\n logger.debug(`copying \"${finalCopySource}\" to \"${finalCopyDestination}\".`);\n await serviceCopy({\n source: finalCopySource,\n destination: finalCopyDestination,\n bucket: destBucket,\n s3Config,\n notModifiedSince: input.source.notModifiedSince,\n eTag: input.source.eTag,\n expectedSourceBucketOwner: input.source?.expectedBucketOwner,\n expectedBucketOwner: input.destination?.expectedBucketOwner,\n });\n return {\n key: destination.key,\n };\n};\nconst serviceCopy = async ({ source, destination, bucket, s3Config, notModifiedSince, eTag, expectedSourceBucketOwner, expectedBucketOwner, }) => {\n await copyObject({\n ...s3Config,\n userAgentValue: getStorageUserAgentValue(StorageAction.Copy),\n }, {\n Bucket: bucket,\n CopySource: source,\n Key: destination,\n MetadataDirective: 'COPY', // Copies over metadata like contentType as well\n CopySourceIfMatch: eTag,\n CopySourceIfUnmodifiedSince: notModifiedSince,\n ExpectedSourceBucketOwner: expectedSourceBucketOwner,\n ExpectedBucketOwner: expectedBucketOwner,\n });\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAQA,MAAM,mBAAmB,GAAG,CAAC,KAAK,KAAK,eAAe,CAAC,KAAK,CAAC,MAAM,CAAC;AACpE,MAAM,sBAAsB,GAAG,CAAC,YAAY,EAAE,UAAU,KAAK;AAC7D;AACA;AACA;AACA,IAAI,qBAAqB;AACzB;AACA,IAAI,CAAC,YAAY,KAAK,SAAS,IAAI,UAAU,KAAK,SAAS;AAC3D;AACA,SAAS,CAAC,UAAU,IAAI,CAAC,YAAY,CAAC,EAAE,0BAA0B,CAAC,iCAAiC,CAAC;AACrG,CAAC;AACW,MAAC,IAAI,GAAG,OAAO,OAAO,EAAE,KAAK,KAAK;AAC9C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AoB;AACzC,QAAQ,MAAM,EAAE,UAAU;AAC1B,QAAQ,QAAQ;AAChB,QAAQ,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB;AACvD,QAAQ,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI;AAC/B,QAAQ,yBAAyB,EAAE,KAAK,CAAC,MAAM,EAAE,mBAAmB;AACpE,QAAQ,mBAAmB,EAAE,KAAK,CAAC,WAAW,EAAE,mBAAmB;AACnE,KAAK,CAAC;AACN,IAAI,OAAO;AACX,QAAQ,GAAG,EAAE,WAAW,CAAC,GAAG;AAC5B,KAAK;AACL;AACA,MAAM,WAAW,GAAG,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,yBAAyB,EAAE,mBAAmB,GAAG,KAAK;AAClJ,IAAI,MAAM,UAAU,CAAC;AACrB,QAAQ,GAAG,QAAQ;AACnB,QAAQ,cAAc,EAAE,wBAAwB,CAAC,aAAa,CAAC,IAAI,CAAC;AACpE,KAAK,EAAE;AACP,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,UAAU,EAAE,MAAM;AAC1B,QAAQ,GAAG,EAAE,WAAW;AACxB,QAAQ,iBAAiB,EAAE,MAAM;AACjC,QAAQ,iBAAiB,EAAE,IAAI;AAC/B,QAAQ,2BAA2B,EAAE,gBAAgB;AACrD,QAAQ,yBAAyB,EAAE,yBAAyB;AAC5D,QAAQ,mBAAmB,EAAE,mBAAmB;AAChD,KAAK,CAAC;AACN,CAAC;;;;"}
@@ -2,7 +2,7 @@ import { DownloadDataInput } from '../../types';
2
2
  import { StorageDownloadDataOutput, StorageItemWithKey, StorageItemWithPath } from '../../../../types';
3
3
  import { DownloadDataInput as DownloadDataWithPathInputWithAdvancedOptions } from '../../../../internals/types/inputs';
4
4
  export declare const downloadData: (input: DownloadDataInput | DownloadDataWithPathInputWithAdvancedOptions) => {
5
- cancel: (message?: string | undefined) => void;
5
+ cancel: (message?: string) => void;
6
6
  readonly state: import("../../../../types").TransferTaskState;
7
7
  result: Promise<StorageDownloadDataOutput<StorageItemWithKey | StorageItemWithPath>>;
8
8
  };
@@ -29,7 +29,7 @@ interface FileMetadata {
29
29
  /**
30
30
  * Serialize the uploadData API options to string so it can be hashed.
31
31
  */
32
- export declare const serializeUploadOptions: (options?: UploadDataWithPathInputWithAdvancedOptions['options'] & {
32
+ export declare const serializeUploadOptions: (options?: UploadDataWithPathInputWithAdvancedOptions["options"] & {
33
33
  resumableUploadsCache?: KeyValueStorageInterface;
34
34
  }) => string;
35
35
  interface UploadsCacheKeyOptions {
@@ -47,6 +47,6 @@ interface UploadsCacheKeyOptions {
47
47
  * So the library always created a new multipart upload if the file is modified.
48
48
  */
49
49
  export declare const getUploadsCacheKey: ({ file, size, contentType, bucket, accessLevel, key, optionsHash, }: UploadsCacheKeyOptions) => string;
50
- export declare const cacheMultipartUpload: (resumableUploadsCache: KeyValueStorageInterface, cacheKey: string, fileMetadata: Omit<FileMetadata, 'lastTouched'>) => Promise<void>;
50
+ export declare const cacheMultipartUpload: (resumableUploadsCache: KeyValueStorageInterface, cacheKey: string, fileMetadata: Omit<FileMetadata, "lastTouched">) => Promise<void>;
51
51
  export declare const removeCachedUpload: (resumableUploadsCache: KeyValueStorageInterface, cacheKey: string) => Promise<void>;
52
52
  export {};
@@ -65,7 +65,7 @@ const listCachedUploadTasks = async (resumableUploadsCache) => {
65
65
  const serializeUploadOptions = (options = {}) => {
66
66
  const unserializableOptionProperties = [
67
67
  'onProgress',
68
- 'resumableUploadsCache',
68
+ 'resumableUploadsCache', // Internally injected implementation not set by customers
69
69
  'locationCredentialsProvider', // Internally injected implementation not set by customers
70
70
  ];
71
71
  const serializableOptions = Object.fromEntries(Object.entries(options).filter(([key]) => !unserializableOptionProperties.includes(key)));
@@ -1 +1 @@
1
- {"version":3,"file":"uploadCache.mjs","sources":["../../../../../../../../src/providers/s3/apis/internal/uploadData/multipart/uploadCache.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { UPLOADS_STORAGE_KEY } from '../../../../utils/constants';\nimport { listParts } from '../../../../utils/client/s3data';\nimport { logger } from '../../../../../../utils';\nconst ONE_HOUR = 1000 * 60 * 60;\n/**\n * Find the cached multipart upload id and get the parts that have been uploaded\n * with ListParts API. If the cached upload is expired(1 hour), return null.\n */\nexport const findCachedUploadParts = async ({ resumableUploadsCache, cacheKey, s3Config, bucket, finalKey, }) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n if (!cachedUploads[cacheKey] ||\n cachedUploads[cacheKey].lastTouched < Date.now() - ONE_HOUR // Uploads are cached for 1 hour\n ) {\n return null;\n }\n const cachedUpload = cachedUploads[cacheKey];\n cachedUpload.lastTouched = Date.now();\n await resumableUploadsCache.setItem(UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n try {\n const { Parts = [] } = await listParts(s3Config, {\n Bucket: bucket,\n Key: finalKey,\n UploadId: cachedUpload.uploadId,\n });\n return {\n parts: Parts,\n uploadId: cachedUpload.uploadId,\n finalCrc32: cachedUpload.finalCrc32,\n };\n }\n catch (e) {\n logger.debug('failed to list cached parts, removing cached upload.');\n await removeCachedUpload(resumableUploadsCache, cacheKey);\n return null;\n }\n};\nconst listCachedUploadTasks = async (resumableUploadsCache) => {\n try {\n return JSON.parse((await resumableUploadsCache.getItem(UPLOADS_STORAGE_KEY)) ?? '{}');\n }\n catch (e) {\n logger.debug('failed to parse cached uploads record.');\n return {};\n }\n};\n/**\n * Serialize the uploadData API options to string so it can be hashed.\n */\nexport const serializeUploadOptions = (options = {}) => {\n const unserializableOptionProperties = [\n 'onProgress',\n 'resumableUploadsCache',\n 'locationCredentialsProvider', // Internally injected implementation not set by customers\n ];\n const serializableOptions = Object.fromEntries(Object.entries(options).filter(([key]) => !unserializableOptionProperties.includes(key)));\n return JSON.stringify(serializableOptions);\n};\n/**\n * Get the cache key of a multipart upload. Data source cached by different: size, content type, bucket, access level,\n * key. If the data source is a File instance, the upload is additionally indexed by file name and last modified time.\n * So the library always created a new multipart upload if the file is modified.\n */\nexport const getUploadsCacheKey = ({ file, size, contentType, bucket, accessLevel, key, optionsHash, }) => {\n let levelStr;\n const resolvedContentType = contentType ?? file?.type ?? 'application/octet-stream';\n // If no access level is defined, we're using custom gen2 access rules\n if (accessLevel === undefined) {\n levelStr = 'custom';\n }\n else {\n levelStr = accessLevel === 'guest' ? 'public' : accessLevel;\n }\n const baseId = `${optionsHash}_${size}_${resolvedContentType}_${bucket}_${levelStr}_${key}`;\n if (file) {\n return `${file.name}_${file.lastModified}_${baseId}`;\n }\n else {\n return baseId;\n }\n};\nexport const cacheMultipartUpload = async (resumableUploadsCache, cacheKey, fileMetadata) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n cachedUploads[cacheKey] = {\n ...fileMetadata,\n lastTouched: Date.now(),\n };\n await resumableUploadsCache.setItem(UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n};\nexport const removeCachedUpload = async (resumableUploadsCache, cacheKey) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n delete cachedUploads[cacheKey];\n await resumableUploadsCache.setItem(UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AAIA,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE;AAC/B;AACA;AACA;AACA;AACY,MAAC,qBAAqB,GAAG,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,KAAK;AACjH,IAAI,MAAM,aAAa,GAAG,MAAM,qBAAqB,CAAC,qBAAqB,CAAC;AAC5E,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;AAChC,QAAQ,aAAa,CAAC,QAAQ,CAAC,CAAC,WAAW,GAAG,IA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,QAAQ,EAAE,YAAY,KAAK;AAC7F,IAAI,MAAM,aAAa,GAAG,MAAM,qBAAqB,CAAC,qBAAqB,CAAC;AAC5E,IAAI,aAAa,CAAC,QAAQ,CAAC,GAAG;AAC9B,QAAQ,GAAG,YAAY;AACvB,QAAQ,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE;AAC/B,KAAK;AACL,IAAI,MAAM,qBAAqB,CAAC,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AAC3F;AACY,MAAC,kBAAkB,GAAG,OAAO,qBAAqB,EAAE,QAAQ,KAAK;AAC7E,IAAI,MAAM,aAAa,GAAG,MAAM,qBAAqB,CAAC,qBAAqB,CAAC;AAC5E,IAAI,OAAO,aAAa,CAAC,QAAQ,CAAC;AAClC,IAAI,MAAM,qBAAqB,CAAC,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AAC3F;;;;"}
1
+ {"version":3,"file":"uploadCache.mjs","sources":["../../../../../../../../src/providers/s3/apis/internal/uploadData/multipart/uploadCache.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { UPLOADS_STORAGE_KEY } from '../../../../utils/constants';\nimport { listParts } from '../../../../utils/client/s3data';\nimport { logger } from '../../../../../../utils';\nconst ONE_HOUR = 1000 * 60 * 60;\n/**\n * Find the cached multipart upload id and get the parts that have been uploaded\n * with ListParts API. If the cached upload is expired(1 hour), return null.\n */\nexport const findCachedUploadParts = async ({ resumableUploadsCache, cacheKey, s3Config, bucket, finalKey, }) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n if (!cachedUploads[cacheKey] ||\n cachedUploads[cacheKey].lastTouched < Date.now() - ONE_HOUR // Uploads are cached for 1 hour\n ) {\n return null;\n }\n const cachedUpload = cachedUploads[cacheKey];\n cachedUpload.lastTouched = Date.now();\n await resumableUploadsCache.setItem(UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n try {\n const { Parts = [] } = await listParts(s3Config, {\n Bucket: bucket,\n Key: finalKey,\n UploadId: cachedUpload.uploadId,\n });\n return {\n parts: Parts,\n uploadId: cachedUpload.uploadId,\n finalCrc32: cachedUpload.finalCrc32,\n };\n }\n catch (e) {\n logger.debug('failed to list cached parts, removing cached upload.');\n await removeCachedUpload(resumableUploadsCache, cacheKey);\n return null;\n }\n};\nconst listCachedUploadTasks = async (resumableUploadsCache) => {\n try {\n return JSON.parse((await resumableUploadsCache.getItem(UPLOADS_STORAGE_KEY)) ?? '{}');\n }\n catch (e) {\n logger.debug('failed to parse cached uploads record.');\n return {};\n }\n};\n/**\n * Serialize the uploadData API options to string so it can be hashed.\n */\nexport const serializeUploadOptions = (options = {}) => {\n const unserializableOptionProperties = [\n 'onProgress',\n 'resumableUploadsCache', // Internally injected implementation not set by customers\n 'locationCredentialsProvider', // Internally injected implementation not set by customers\n ];\n const serializableOptions = Object.fromEntries(Object.entries(options).filter(([key]) => !unserializableOptionProperties.includes(key)));\n return JSON.stringify(serializableOptions);\n};\n/**\n * Get the cache key of a multipart upload. Data source cached by different: size, content type, bucket, access level,\n * key. If the data source is a File instance, the upload is additionally indexed by file name and last modified time.\n * So the library always created a new multipart upload if the file is modified.\n */\nexport const getUploadsCacheKey = ({ file, size, contentType, bucket, accessLevel, key, optionsHash, }) => {\n let levelStr;\n const resolvedContentType = contentType ?? file?.type ?? 'application/octet-stream';\n // If no access level is defined, we're using custom gen2 access rules\n if (accessLevel === undefined) {\n levelStr = 'custom';\n }\n else {\n levelStr = accessLevel === 'guest' ? 'public' : accessLevel;\n }\n const baseId = `${optionsHash}_${size}_${resolvedContentType}_${bucket}_${levelStr}_${key}`;\n if (file) {\n return `${file.name}_${file.lastModified}_${baseId}`;\n }\n else {\n return baseId;\n }\n};\nexport const cacheMultipartUpload = async (resumableUploadsCache, cacheKey, fileMetadata) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n cachedUploads[cacheKey] = {\n ...fileMetadata,\n lastTouched: Date.now(),\n };\n await resumableUploadsCache.setItem(UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n};\nexport const removeCachedUpload = async (resumableUploadsCache, cacheKey) => {\n const cachedUploads = await listCachedUploadTasks(resumableUploadsCache);\n delete cachedUploads[cacheKey];\n await resumableUploadsCache.setItem(UPLOADS_STORAGE_KEY, JSON.stringify(cachedUploads));\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;AACA;AAIA,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE;AAC/B;AACA;AACA;AACA;AACY,MAAC,qBAAqB,GAAG,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,KAAK;AACjH,IAAI,MAAM,aAAa,GAAG,MAAM,qBAAqB,CAAC,qBAAqB,CAAC;AAC5E,IAAI,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;AAChC,QAAQ,aAAa,CAAC,QAAQ,CAAC,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ;AACnE,MAAM;AACN,QAAQ,OAAO,IAAI;AACnB;AACA,IAAI,MAAM,YAAY,GAAG,aAAa,CAAC,QAAQ,CAAC;AAChD,IAAI,YAAY,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE;AACzC,IAAI,MAAM,qBAAqB,CAAC,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AAC3F,IAAI,IAAI;AACR,QAAQ,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,MAAM,SAAS,CAAC,QAAQ,EAAE;AACzD,YAAY,MAAM,EAAE,MAAM;AAC1B,YAAY,GAAG,EAAE,QAAQ;AACzB,YAAY,QAAQ,EAAE,YAAY,CAAC,QAAQ;AAC3C,SAAS,CA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,qBAAqB,CAAC,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AAC3F;;;;"}
@@ -10,12 +10,12 @@ export declare const getDataAccess: (config: {
10
10
  }) => {
11
11
  url: URL;
12
12
  })) | undefined;
13
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
13
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
14
  computeDelay?: ((attempt: number) => number) | undefined;
15
15
  userAgentValue?: string | undefined;
16
16
  uriEscapePath?: boolean | undefined;
17
17
  } & {
18
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
18
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
19
19
  region: string;
20
20
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
21
21
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -10,12 +10,12 @@ export declare const listCallerAccessGrants: (config: {
10
10
  }) => {
11
11
  url: URL;
12
12
  })) | undefined;
13
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
13
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
14
  computeDelay?: ((attempt: number) => number) | undefined;
15
15
  userAgentValue?: string | undefined;
16
16
  uriEscapePath?: boolean | undefined;
17
17
  } & {
18
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
18
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
19
19
  region: string;
20
20
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
21
21
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -7,17 +7,17 @@ export declare const abortMultipartUpload: (config: {
7
7
  responseType?: "blob" | "text" | undefined;
8
8
  service?: string | undefined;
9
9
  endpointResolver?: (((options: import("@aws-amplify/core/internals/aws-client-utils").EndpointResolverOptions, input?: any) => Endpoint) & ((options: import("./base").S3EndpointResolverOptions, apiInput?: {
10
- Bucket?: string | undefined;
11
- } | undefined) => {
10
+ Bucket?: string;
11
+ }) => {
12
12
  url: URL;
13
13
  })) | undefined;
14
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
15
15
  computeDelay?: ((attempt: number) => number) | undefined;
16
16
  userAgentValue?: string | undefined;
17
17
  useAccelerateEndpoint?: boolean | undefined;
18
18
  uriEscapePath?: boolean | undefined;
19
19
  } & {
20
- credentials: import("@aws-sdk/types").AwsCredentialIdentity | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>);
20
+ credentials: import("@aws-sdk/types").AwsCredentialIdentity | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-sdk/types").AwsCredentialIdentity>);
21
21
  region: string;
22
22
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
23
23
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -4,11 +4,11 @@ export type CompleteMultipartUploadInput = Pick<CompleteMultipartUploadCommandIn
4
4
  export type CompleteMultipartUploadOutput = Pick<CompleteMultipartUploadCommandOutput, '$metadata' | 'Key' | 'ETag' | 'Location'>;
5
5
  export declare const completeMultipartUpload: (config: {
6
6
  responseType?: "blob" | "text" | undefined;
7
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: MiddlewareContext | undefined) => Promise<RetryDeciderOutput>) & ((response?: HttpResponse, error?: unknown, middlewareContext?: MiddlewareContext) => Promise<RetryDeciderOutput>)) | undefined;
7
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: MiddlewareContext) => Promise<RetryDeciderOutput>) & ((response?: HttpResponse, error?: unknown, middlewareContext?: MiddlewareContext) => Promise<RetryDeciderOutput>)) | undefined;
8
8
  service?: string | undefined;
9
9
  endpointResolver?: (((options: import("@aws-amplify/core/internals/aws-client-utils").EndpointResolverOptions, input?: any) => Endpoint) & ((options: import("./base").S3EndpointResolverOptions, apiInput?: {
10
- Bucket?: string | undefined;
11
- } | undefined) => {
10
+ Bucket?: string;
11
+ }) => {
12
12
  url: URL;
13
13
  })) | undefined;
14
14
  computeDelay?: ((attempt: number) => number) | undefined;
@@ -16,7 +16,7 @@ export declare const completeMultipartUpload: (config: {
16
16
  useAccelerateEndpoint?: boolean | undefined;
17
17
  uriEscapePath?: boolean | undefined;
18
18
  } & {
19
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
19
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
20
20
  region: string;
21
21
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
22
22
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -7,17 +7,17 @@ export declare const copyObject: (config: {
7
7
  responseType?: "blob" | "text" | undefined;
8
8
  service?: string | undefined;
9
9
  endpointResolver?: (((options: import("@aws-amplify/core/internals/aws-client-utils").EndpointResolverOptions, input?: any) => Endpoint) & ((options: import("./base").S3EndpointResolverOptions, apiInput?: {
10
- Bucket?: string | undefined;
11
- } | undefined) => {
10
+ Bucket?: string;
11
+ }) => {
12
12
  url: URL;
13
13
  })) | undefined;
14
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
15
15
  computeDelay?: ((attempt: number) => number) | undefined;
16
16
  userAgentValue?: string | undefined;
17
17
  useAccelerateEndpoint?: boolean | undefined;
18
18
  uriEscapePath?: boolean | undefined;
19
19
  } & {
20
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
20
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
21
21
  region: string;
22
22
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
23
23
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -7,17 +7,17 @@ export declare const createMultipartUpload: (config: {
7
7
  responseType?: "blob" | "text" | undefined;
8
8
  service?: string | undefined;
9
9
  endpointResolver?: (((options: import("@aws-amplify/core/internals/aws-client-utils").EndpointResolverOptions, input?: any) => Endpoint) & ((options: import("./base").S3EndpointResolverOptions, apiInput?: {
10
- Bucket?: string | undefined;
11
- } | undefined) => {
10
+ Bucket?: string;
11
+ }) => {
12
12
  url: URL;
13
13
  })) | undefined;
14
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
15
15
  computeDelay?: ((attempt: number) => number) | undefined;
16
16
  userAgentValue?: string | undefined;
17
17
  useAccelerateEndpoint?: boolean | undefined;
18
18
  uriEscapePath?: boolean | undefined;
19
19
  } & {
20
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
20
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
21
21
  region: string;
22
22
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
23
23
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -6,17 +6,17 @@ export declare const deleteObject: (config: {
6
6
  responseType?: "blob" | "text" | undefined;
7
7
  service?: string | undefined;
8
8
  endpointResolver?: (((options: import("@aws-amplify/core/internals/aws-client-utils").EndpointResolverOptions, input?: any) => Endpoint) & ((options: import("./base").S3EndpointResolverOptions, apiInput?: {
9
- Bucket?: string | undefined;
10
- } | undefined) => {
9
+ Bucket?: string;
10
+ }) => {
11
11
  url: URL;
12
12
  })) | undefined;
13
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
13
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
14
  computeDelay?: ((attempt: number) => number) | undefined;
15
15
  userAgentValue?: string | undefined;
16
16
  useAccelerateEndpoint?: boolean | undefined;
17
17
  uriEscapePath?: boolean | undefined;
18
18
  } & {
19
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
19
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
20
20
  region: string;
21
21
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
22
22
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -7,17 +7,17 @@ export declare const getObject: (config: {
7
7
  responseType?: "blob" | "text" | undefined;
8
8
  service?: string | undefined;
9
9
  endpointResolver?: (((options: import("@aws-amplify/core/internals/aws-client-utils").EndpointResolverOptions, input?: any) => Endpoint) & ((options: S3EndpointResolverOptions, apiInput?: {
10
- Bucket?: string | undefined;
11
- } | undefined) => {
10
+ Bucket?: string;
11
+ }) => {
12
12
  url: URL;
13
13
  })) | undefined;
14
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
15
15
  computeDelay?: ((attempt: number) => number) | undefined;
16
16
  userAgentValue?: string | undefined;
17
17
  useAccelerateEndpoint?: boolean | undefined;
18
18
  uriEscapePath?: boolean | undefined;
19
19
  } & {
20
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
20
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
21
21
  region: string;
22
22
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
23
23
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -6,17 +6,17 @@ export declare const headObject: (config: {
6
6
  responseType?: "blob" | "text" | undefined;
7
7
  service?: string | undefined;
8
8
  endpointResolver?: (((options: import("@aws-amplify/core/internals/aws-client-utils").EndpointResolverOptions, input?: any) => Endpoint) & ((options: import("./base").S3EndpointResolverOptions, apiInput?: {
9
- Bucket?: string | undefined;
10
- } | undefined) => {
9
+ Bucket?: string;
10
+ }) => {
11
11
  url: URL;
12
12
  })) | undefined;
13
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
13
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
14
  computeDelay?: ((attempt: number) => number) | undefined;
15
15
  userAgentValue?: string | undefined;
16
16
  useAccelerateEndpoint?: boolean | undefined;
17
17
  uriEscapePath?: boolean | undefined;
18
18
  } & {
19
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
19
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
20
20
  region: string;
21
21
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
22
22
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -6,17 +6,17 @@ export declare const listObjectsV2: (config: {
6
6
  responseType?: "blob" | "text" | undefined;
7
7
  service?: string | undefined;
8
8
  endpointResolver?: (((options: import("@aws-amplify/core/internals/aws-client-utils").EndpointResolverOptions, input?: any) => Endpoint) & ((options: import("./base").S3EndpointResolverOptions, apiInput?: {
9
- Bucket?: string | undefined;
10
- } | undefined) => {
9
+ Bucket?: string;
10
+ }) => {
11
11
  url: URL;
12
12
  })) | undefined;
13
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
13
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
14
  computeDelay?: ((attempt: number) => number) | undefined;
15
15
  userAgentValue?: string | undefined;
16
16
  useAccelerateEndpoint?: boolean | undefined;
17
17
  uriEscapePath?: boolean | undefined;
18
18
  } & {
19
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
19
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
20
20
  region: string;
21
21
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
22
22
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
@@ -6,17 +6,17 @@ export declare const listParts: (config: {
6
6
  responseType?: "blob" | "text" | undefined;
7
7
  service?: string | undefined;
8
8
  endpointResolver?: (((options: import("@aws-amplify/core/internals/aws-client-utils").EndpointResolverOptions, input?: any) => Endpoint) & ((options: import("./base").S3EndpointResolverOptions, apiInput?: {
9
- Bucket?: string | undefined;
10
- } | undefined) => {
9
+ Bucket?: string;
10
+ }) => {
11
11
  url: URL;
12
12
  })) | undefined;
13
- retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
13
+ retryDecider?: (((response?: HttpResponse | undefined, error?: unknown, middlewareContext?: import("@aws-amplify/core/internals/aws-client-utils").MiddlewareContext) => Promise<import("@aws-amplify/core/internals/aws-client-utils").RetryDeciderOutput>) & import("../utils/createRetryDecider").RetryDecider) | undefined;
14
14
  computeDelay?: ((attempt: number) => number) | undefined;
15
15
  userAgentValue?: string | undefined;
16
16
  useAccelerateEndpoint?: boolean | undefined;
17
17
  uriEscapePath?: boolean | undefined;
18
18
  } & {
19
- credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions | undefined) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
19
+ credentials: import("@aws-amplify/core/internals/aws-client-utils").Credentials | ((options?: import("@aws-amplify/core/internals/aws-client-utils").CredentialsProviderOptions) => Promise<import("@aws-amplify/core/internals/aws-client-utils").Credentials>);
20
20
  region: string;
21
21
  onDownloadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;
22
22
  onUploadProgress?: ((event: import("../../../../..").TransferProgressEvent) => void) | undefined;