@aws-amplify/storage 6.8.4-unstable.3413250.0 → 6.8.4-unstable.893d9cf.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/providers/s3/utils/client/s3data/deleteObject.js +1 -5
- package/dist/cjs/providers/s3/utils/client/s3data/deleteObject.js.map +1 -1
- package/dist/cjs/providers/s3/utils/client/s3data/listObjectsV2.js +3 -4
- package/dist/cjs/providers/s3/utils/client/s3data/listObjectsV2.js.map +1 -1
- package/dist/cjs/providers/s3/utils/client/utils/deserializeHelpers.js +1 -15
- package/dist/cjs/providers/s3/utils/client/utils/deserializeHelpers.js.map +1 -1
- package/dist/esm/providers/s3/utils/client/s3data/createMultipartUpload.d.ts +1 -1
- package/dist/esm/providers/s3/utils/client/s3data/deleteObject.mjs +2 -5
- package/dist/esm/providers/s3/utils/client/s3data/deleteObject.mjs.map +1 -1
- package/dist/esm/providers/s3/utils/client/s3data/listObjectsV2.d.ts +1 -1
- package/dist/esm/providers/s3/utils/client/s3data/listObjectsV2.mjs +4 -4
- package/dist/esm/providers/s3/utils/client/s3data/listObjectsV2.mjs.map +1 -1
- package/dist/esm/providers/s3/utils/client/s3data/types.d.ts +908 -3474
- package/dist/esm/providers/s3/utils/client/utils/deserializeHelpers.d.ts +2 -15
- package/dist/esm/providers/s3/utils/client/utils/deserializeHelpers.mjs +1 -14
- package/dist/esm/providers/s3/utils/client/utils/deserializeHelpers.mjs.map +1 -1
- package/package.json +7 -7
- package/s3/package.json +1 -1
- package/src/providers/s3/apis/internal/list.ts +1 -1
- package/src/providers/s3/utils/client/s3data/deleteObject.ts +1 -6
- package/src/providers/s3/utils/client/s3data/listObjectsV2.ts +3 -6
- package/src/providers/s3/utils/client/s3data/types.ts +909 -3471
- package/src/providers/s3/utils/client/utils/deserializeHelpers.ts +2 -17
|
@@ -69,9 +69,6 @@ export declare const deserializeTimestamp: (value: string) => Date | undefined;
|
|
|
69
69
|
* Create a function deserializing a string to an enum value. If the string is not a valid enum value, it throws a
|
|
70
70
|
* StorageError.
|
|
71
71
|
*
|
|
72
|
-
* This utility is ONLY preferred if the enum value is critical. Since the enum values are hard-coded, new enum values
|
|
73
|
-
* returned from service would break the library.
|
|
74
|
-
*
|
|
75
72
|
* @example
|
|
76
73
|
* ```typescript
|
|
77
74
|
* const deserializeStringEnum = createStringEnumDeserializer(['a', 'b', 'c'] as const, 'FieldName');
|
|
@@ -84,17 +81,7 @@ export declare const deserializeTimestamp: (value: string) => Date | undefined;
|
|
|
84
81
|
*
|
|
85
82
|
* @internal
|
|
86
83
|
*/
|
|
87
|
-
export declare const createStringEnumDeserializer: <T extends readonly string[]>(enumValues: T, fieldName: string) => (value: any) => T extends
|
|
88
|
-
/**
|
|
89
|
-
* Deserializes a string to a string tag type. The function simply casts the parsed string into a given string tag type.
|
|
90
|
-
* It does NOT validate the string value against the string tag. This behavior is the same to AWS SDK parsing logic of
|
|
91
|
-
* string tag types.
|
|
92
|
-
*
|
|
93
|
-
* If you need to verify the string value, you must use {@link createStringEnumDeserializer} instead.
|
|
94
|
-
*
|
|
95
|
-
* @internal
|
|
96
|
-
*/
|
|
97
|
-
export declare const deserializeStringTag: <T extends string>(value: any) => T;
|
|
84
|
+
export declare const createStringEnumDeserializer: <T extends readonly string[]>(enumValues: T, fieldName: string) => (value: any) => T extends (infer E)[] ? E : never;
|
|
98
85
|
/**
|
|
99
86
|
* Function that makes sure the deserializer receives non-empty array.
|
|
100
87
|
*
|
|
@@ -104,7 +91,7 @@ export declare const emptyArrayGuard: <T extends any[]>(value: any, deserializer
|
|
|
104
91
|
/**
|
|
105
92
|
* @internal
|
|
106
93
|
*/
|
|
107
|
-
export declare const deserializeMetadata: (headers: Headers) => Record<string, string
|
|
94
|
+
export declare const deserializeMetadata: (headers: Headers) => Record<string, string>;
|
|
108
95
|
export type ParsedError = Awaited<ReturnType<ErrorParser>> & {};
|
|
109
96
|
/**
|
|
110
97
|
* Internal-only method to create a new StorageError from a service error with AWS SDK-compatible interfaces
|
|
@@ -83,9 +83,6 @@ const deserializeTimestamp = (value) => {
|
|
|
83
83
|
* Create a function deserializing a string to an enum value. If the string is not a valid enum value, it throws a
|
|
84
84
|
* StorageError.
|
|
85
85
|
*
|
|
86
|
-
* This utility is ONLY preferred if the enum value is critical. Since the enum values are hard-coded, new enum values
|
|
87
|
-
* returned from service would break the library.
|
|
88
|
-
*
|
|
89
86
|
* @example
|
|
90
87
|
* ```typescript
|
|
91
88
|
* const deserializeStringEnum = createStringEnumDeserializer(['a', 'b', 'c'] as const, 'FieldName');
|
|
@@ -114,16 +111,6 @@ const createStringEnumDeserializer = (enumValues, fieldName) => {
|
|
|
114
111
|
};
|
|
115
112
|
return deserializeStringEnum;
|
|
116
113
|
};
|
|
117
|
-
/**
|
|
118
|
-
* Deserializes a string to a string tag type. The function simply casts the parsed string into a given string tag type.
|
|
119
|
-
* It does NOT validate the string value against the string tag. This behavior is the same to AWS SDK parsing logic of
|
|
120
|
-
* string tag types.
|
|
121
|
-
*
|
|
122
|
-
* If you need to verify the string value, you must use {@link createStringEnumDeserializer} instead.
|
|
123
|
-
*
|
|
124
|
-
* @internal
|
|
125
|
-
*/
|
|
126
|
-
const deserializeStringTag = (value) => String(value);
|
|
127
114
|
/**
|
|
128
115
|
* Function that makes sure the deserializer receives non-empty array.
|
|
129
116
|
*
|
|
@@ -172,5 +159,5 @@ const deserializeCompletedPartList = (input) => input.map(item => map(item, {
|
|
|
172
159
|
ChecksumCRC32: 'ChecksumCRC32',
|
|
173
160
|
}));
|
|
174
161
|
|
|
175
|
-
export { buildStorageServiceError, createStringEnumDeserializer, deserializeBoolean, deserializeCompletedPartList, deserializeMetadata, deserializeNumber,
|
|
162
|
+
export { buildStorageServiceError, createStringEnumDeserializer, deserializeBoolean, deserializeCompletedPartList, deserializeMetadata, deserializeNumber, deserializeTimestamp, emptyArrayGuard, map };
|
|
176
163
|
//# sourceMappingURL=deserializeHelpers.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserializeHelpers.mjs","sources":["../../../../../../../src/providers/s3/utils/client/utils/deserializeHelpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { StorageError } from '../../../../../errors/StorageError';\n/**\n * Maps an object to a new object using the provided instructions.\n * The instructions are a map of the returning mapped object's property names to a single instruction of how to map the\n * value from the original object to the new object. There are two types of instructions:\n *\n * 1. A string representing the property name of the original object to map to the new object. The value mapped from\n * the original object will be the same as the value in the new object, and it can ONLY be string.\n *\n * 2. An array of two elements. The first element is the property name of the original object to map to the new object.\n * The second element is a function that takes the value from the original object and returns the value to be mapped to\n * the new object. The function can return any type.\n *\n * Example:\n * ```typescript\n * const input = {\n * Foo: 'foo',\n * BarList: [{value: 'bar1'}, {value: 'bar2'}]\n * }\n * const output = map(input, {\n * someFoo: 'Foo',\n * bar: ['BarList', (barList) => barList.map(bar => bar.value)]\n * baz: 'Baz' // Baz does not exist in input, so it will not be in the output.\n * });\n * // output = { someFoo: 'foo', bar: ['bar1', 'bar2'] }\n * ```\n *\n * @param obj The object containing the data to compose mapped object.\n * @param instructions The instructions mapping the object values to the new object.\n * @returns A new object with the mapped values.\n *\n * @internal\n */\nexport const map = (obj, instructions) => {\n const result = {};\n for (const [key, instruction] of Object.entries(instructions)) {\n const [accessor, deserializer] = Array.isArray(instruction)\n ? instruction\n : [instruction];\n if (Object.prototype.hasOwnProperty.call(obj, accessor)) {\n result[key] = deserializer\n ? deserializer(obj[accessor])\n : String(obj[accessor]);\n }\n }\n return result;\n};\n/**\n * Deserializes a string to a number. Returns undefined if input is undefined.\n *\n * @internal\n */\nexport const deserializeNumber = (value) => value ? Number(value) : undefined;\n/**\n * Deserializes a string to a boolean. Returns undefined if input is undefined. Returns true if input is 'true',\n * otherwise false.\n *\n * @internal\n */\nexport const deserializeBoolean = (value) => {\n return value ? value === 'true' : undefined;\n};\n/**\n * Deserializes a string to a Date. Returns undefined if input is undefined.\n * It supports epoch timestamp; rfc3339(cannot have a UTC, fractional precision supported); rfc7231(section 7.1.1.1)\n *\n * @see https://www.epoch101.com/\n * @see https://datatracker.ietf.org/doc/html/rfc3339.html#section-5.6\n * @see https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1\n *\n * @note For bundle size consideration, we use Date constructor to parse the timestamp string. There might be slight\n * difference among browsers.\n *\n * @internal\n */\nexport const deserializeTimestamp = (value) => {\n return value ? new Date(value) : undefined;\n};\n/**\n * Create a function deserializing a string to an enum value. If the string is not a valid enum value, it throws a\n * StorageError.\n *\n *
|
|
1
|
+
{"version":3,"file":"deserializeHelpers.mjs","sources":["../../../../../../../src/providers/s3/utils/client/utils/deserializeHelpers.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { StorageError } from '../../../../../errors/StorageError';\n/**\n * Maps an object to a new object using the provided instructions.\n * The instructions are a map of the returning mapped object's property names to a single instruction of how to map the\n * value from the original object to the new object. There are two types of instructions:\n *\n * 1. A string representing the property name of the original object to map to the new object. The value mapped from\n * the original object will be the same as the value in the new object, and it can ONLY be string.\n *\n * 2. An array of two elements. The first element is the property name of the original object to map to the new object.\n * The second element is a function that takes the value from the original object and returns the value to be mapped to\n * the new object. The function can return any type.\n *\n * Example:\n * ```typescript\n * const input = {\n * Foo: 'foo',\n * BarList: [{value: 'bar1'}, {value: 'bar2'}]\n * }\n * const output = map(input, {\n * someFoo: 'Foo',\n * bar: ['BarList', (barList) => barList.map(bar => bar.value)]\n * baz: 'Baz' // Baz does not exist in input, so it will not be in the output.\n * });\n * // output = { someFoo: 'foo', bar: ['bar1', 'bar2'] }\n * ```\n *\n * @param obj The object containing the data to compose mapped object.\n * @param instructions The instructions mapping the object values to the new object.\n * @returns A new object with the mapped values.\n *\n * @internal\n */\nexport const map = (obj, instructions) => {\n const result = {};\n for (const [key, instruction] of Object.entries(instructions)) {\n const [accessor, deserializer] = Array.isArray(instruction)\n ? instruction\n : [instruction];\n if (Object.prototype.hasOwnProperty.call(obj, accessor)) {\n result[key] = deserializer\n ? deserializer(obj[accessor])\n : String(obj[accessor]);\n }\n }\n return result;\n};\n/**\n * Deserializes a string to a number. Returns undefined if input is undefined.\n *\n * @internal\n */\nexport const deserializeNumber = (value) => value ? Number(value) : undefined;\n/**\n * Deserializes a string to a boolean. Returns undefined if input is undefined. Returns true if input is 'true',\n * otherwise false.\n *\n * @internal\n */\nexport const deserializeBoolean = (value) => {\n return value ? value === 'true' : undefined;\n};\n/**\n * Deserializes a string to a Date. Returns undefined if input is undefined.\n * It supports epoch timestamp; rfc3339(cannot have a UTC, fractional precision supported); rfc7231(section 7.1.1.1)\n *\n * @see https://www.epoch101.com/\n * @see https://datatracker.ietf.org/doc/html/rfc3339.html#section-5.6\n * @see https://datatracker.ietf.org/doc/html/rfc7231.html#section-7.1.1.1\n *\n * @note For bundle size consideration, we use Date constructor to parse the timestamp string. There might be slight\n * difference among browsers.\n *\n * @internal\n */\nexport const deserializeTimestamp = (value) => {\n return value ? new Date(value) : undefined;\n};\n/**\n * Create a function deserializing a string to an enum value. If the string is not a valid enum value, it throws a\n * StorageError.\n *\n * @example\n * ```typescript\n * const deserializeStringEnum = createStringEnumDeserializer(['a', 'b', 'c'] as const, 'FieldName');\n * const deserializedArray = ['a', 'b', 'c'].map(deserializeStringEnum);\n * // deserializedArray = ['a', 'b', 'c']\n *\n * const invalidValue = deserializeStringEnum('d');\n * // Throws InvalidFieldName: Invalid FieldName: d\n * ```\n *\n * @internal\n */\nexport const createStringEnumDeserializer = (enumValues, fieldName) => {\n const deserializeStringEnum = (value) => {\n const parsedEnumValue = value\n ? enumValues.find(enumValue => enumValue === value)\n : undefined;\n if (!parsedEnumValue) {\n throw new StorageError({\n name: `Invalid${fieldName}`,\n message: `Invalid ${fieldName}: ${value}`,\n recoverySuggestion: 'This is likely to be a bug. Please reach out to library authors.',\n });\n }\n return parsedEnumValue;\n };\n return deserializeStringEnum;\n};\n/**\n * Function that makes sure the deserializer receives non-empty array.\n *\n * @internal\n */\nexport const emptyArrayGuard = (value, deserializer) => {\n if (value === '') {\n return [];\n }\n const valueArray = (Array.isArray(value) ? value : [value]).filter(e => e != null);\n return deserializer(valueArray);\n};\n/**\n * @internal\n */\nexport const deserializeMetadata = (headers) => {\n const objectMetadataHeaderPrefix = 'x-amz-meta-';\n const deserialized = Object.keys(headers)\n .filter(header => header.startsWith(objectMetadataHeaderPrefix))\n .reduce((acc, header) => {\n acc[header.replace(objectMetadataHeaderPrefix, '')] = headers[header];\n return acc;\n }, {});\n return Object.keys(deserialized).length > 0 ? deserialized : undefined;\n};\n/**\n * Internal-only method to create a new StorageError from a service error with AWS SDK-compatible interfaces\n * @param error - The output of a service error parser, with AWS SDK-compatible interface(e.g. $metadata)\n * @returns A new StorageError.\n *\n * @internal\n */\nexport const buildStorageServiceError = (error) => new StorageError({\n name: error.name,\n message: error.message,\n metadata: error.$metadata,\n});\n/**\n * Internal-only method used for deserializing the parts of a multipart upload.\n *\n * @internal\n */\nexport const deserializeCompletedPartList = (input) => input.map(item => map(item, {\n PartNumber: ['PartNumber', deserializeNumber],\n ETag: 'ETag',\n ChecksumCRC32: 'ChecksumCRC32',\n}));\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,GAAG,EAAE,YAAY,KAAK;AAC1C,IAAI,MAAM,MAAM,GAAG,EAAE;AACrB,IAAI,KAAK,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACnE,QAAQ,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,KAAK,CA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AC;AACpE,IAAI,IAAI,EAAE,KAAK,CAAC,IAAI;AACpB,IAAI,OAAO,EAAE,KAAK,CAAC,OAAO;AAC1B,IAAI,QAAQ,EAAE,KAAK,CAAC,SAAS;AAC7B,CAAC;AACD;AACA;AACA;AACA;AACA;AACY,MAAC,4BAA4B,GAAG,CAAC,KAAK,KAAK,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,EAAE;AACnF,IAAI,UAAU,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;AACjD,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,aAAa,EAAE,eAAe;AAClC,CAAC,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/storage",
|
|
3
|
-
"version": "6.8.4-unstable.
|
|
3
|
+
"version": "6.8.4-unstable.893d9cf.0+893d9cf",
|
|
4
4
|
"description": "Storage category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"exports": {
|
|
81
81
|
".": {
|
|
82
|
-
"react-native": "./
|
|
82
|
+
"react-native": "./src/index.ts",
|
|
83
83
|
"types": "./dist/esm/index.d.ts",
|
|
84
84
|
"import": "./dist/esm/index.mjs",
|
|
85
85
|
"require": "./dist/cjs/index.js"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"require": "./dist/cjs/server.js"
|
|
96
96
|
},
|
|
97
97
|
"./s3": {
|
|
98
|
-
"react-native": "./
|
|
98
|
+
"react-native": "./src/providers/s3/index.ts",
|
|
99
99
|
"types": "./dist/esm/providers/s3/index.d.ts",
|
|
100
100
|
"import": "./dist/esm/providers/s3/index.mjs",
|
|
101
101
|
"require": "./dist/cjs/providers/s3/index.js"
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
"./package.json": "./package.json"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
|
-
"@aws-amplify/core": "6.11.4-unstable.
|
|
111
|
+
"@aws-amplify/core": "6.11.4-unstable.893d9cf.0+893d9cf"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@aws-amplify/core": "6.11.4-unstable.
|
|
115
|
-
"@aws-amplify/react-native": "1.1.9-unstable.
|
|
114
|
+
"@aws-amplify/core": "6.11.4-unstable.893d9cf.0+893d9cf",
|
|
115
|
+
"@aws-amplify/react-native": "1.1.9-unstable.893d9cf.0+893d9cf",
|
|
116
116
|
"@types/node": "20.14.12",
|
|
117
117
|
"typescript": "5.0.2"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "893d9cf04bf1bb349e1d1a7094cf6507d413d713"
|
|
120
120
|
}
|
package/s3/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/storage/s3",
|
|
3
3
|
"main": "../dist/cjs/providers/s3/index.js",
|
|
4
|
-
"react-native": "../
|
|
4
|
+
"react-native": "../src/providers/s3/index.ts",
|
|
5
5
|
"browser": "../dist/esm/providers/s3/index.mjs",
|
|
6
6
|
"module": "../dist/esm/providers/s3/index.mjs",
|
|
7
7
|
"typings": "../dist/esm/providers/s3/index.d.ts"
|
|
@@ -86,7 +86,7 @@ export const list = async (
|
|
|
86
86
|
ContinuationToken: options?.listAll ? undefined : options?.nextToken,
|
|
87
87
|
Delimiter: getDelimiter(options),
|
|
88
88
|
ExpectedBucketOwner: options?.expectedBucketOwner,
|
|
89
|
-
EncodingType: 'url'
|
|
89
|
+
EncodingType: 'url',
|
|
90
90
|
};
|
|
91
91
|
logger.debug(`listing items from "${listParams.Prefix}"`);
|
|
92
92
|
|
|
@@ -23,12 +23,10 @@ import {
|
|
|
23
23
|
validateS3RequiredParameter,
|
|
24
24
|
} from '../utils';
|
|
25
25
|
import { validateObjectUrl } from '../../validateObjectUrl';
|
|
26
|
-
import { deserializeStringTag } from '../utils/deserializeHelpers';
|
|
27
26
|
|
|
28
27
|
import type {
|
|
29
28
|
DeleteObjectCommandInput,
|
|
30
29
|
DeleteObjectCommandOutput,
|
|
31
|
-
RequestPayer,
|
|
32
30
|
} from './types';
|
|
33
31
|
import { defaultConfig, parseXmlError } from './base';
|
|
34
32
|
|
|
@@ -75,10 +73,7 @@ const deleteObjectDeserializer = async (
|
|
|
75
73
|
const content = map(response.headers, {
|
|
76
74
|
DeleteMarker: ['x-amz-delete-marker', deserializeBoolean],
|
|
77
75
|
VersionId: 'x-amz-version-id',
|
|
78
|
-
RequestCharged:
|
|
79
|
-
'x-amz-request-charged',
|
|
80
|
-
deserializeStringTag<RequestPayer>,
|
|
81
|
-
],
|
|
76
|
+
RequestCharged: 'x-amz-request-charged',
|
|
82
77
|
});
|
|
83
78
|
|
|
84
79
|
return {
|
|
@@ -25,13 +25,10 @@ import {
|
|
|
25
25
|
s3TransferHandler,
|
|
26
26
|
} from '../utils';
|
|
27
27
|
import { IntegrityError } from '../../../../../errors/IntegrityError';
|
|
28
|
-
import { deserializeStringTag } from '../utils/deserializeHelpers';
|
|
29
28
|
|
|
30
29
|
import type {
|
|
31
|
-
ChecksumAlgorithm,
|
|
32
30
|
ListObjectsV2CommandInput,
|
|
33
31
|
ListObjectsV2CommandOutput,
|
|
34
|
-
StorageClass,
|
|
35
32
|
} from './types';
|
|
36
33
|
import { defaultConfig, parseXmlError } from './base';
|
|
37
34
|
|
|
@@ -86,7 +83,7 @@ const listObjectsV2Deserializer = async (
|
|
|
86
83
|
],
|
|
87
84
|
ContinuationToken: 'ContinuationToken',
|
|
88
85
|
Delimiter: 'Delimiter',
|
|
89
|
-
EncodingType:
|
|
86
|
+
EncodingType: 'EncodingType',
|
|
90
87
|
IsTruncated: ['IsTruncated', deserializeBoolean],
|
|
91
88
|
KeyCount: ['KeyCount', deserializeNumber],
|
|
92
89
|
MaxKeys: ['MaxKeys', deserializeNumber],
|
|
@@ -127,12 +124,12 @@ const deserializeObject = (output: any) =>
|
|
|
127
124
|
value => emptyArrayGuard(value, deserializeChecksumAlgorithmList),
|
|
128
125
|
],
|
|
129
126
|
Size: ['Size', deserializeNumber],
|
|
130
|
-
StorageClass:
|
|
127
|
+
StorageClass: 'StorageClass',
|
|
131
128
|
Owner: ['Owner', deserializeOwner],
|
|
132
129
|
});
|
|
133
130
|
|
|
134
131
|
const deserializeChecksumAlgorithmList = (output: any[]) =>
|
|
135
|
-
output.map(
|
|
132
|
+
output.map(entry => String(entry));
|
|
136
133
|
|
|
137
134
|
const deserializeOwner = (output: any) =>
|
|
138
135
|
map(output, { DisplayName: 'DisplayName', ID: 'ID' });
|