Skip to content

Commit

Permalink
chore: address feedbacks
Browse files Browse the repository at this point in the history
Co-authored-by: Jim Blanchard <jim.l.blanchard@gmail.com>
  • Loading branch information
AllanZhengYP and jimblanc committed Oct 1, 2024
1 parent e3c517a commit 0c367c0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
2 changes: 2 additions & 0 deletions packages/storage/src/internals/apis/getProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { GetPropertiesOutput } from '../types/outputs';
* Gets the properties of a file. The properties include S3 system metadata and
* the user metadata that was provided when uploading the file.
*
* @internal

Check failure on line 14 in packages/storage/src/internals/apis/getProperties.ts

View workflow job for this annotation

GitHub Actions / unit-tests / Unit Test - @aws-amplify/storage

Trailing spaces not allowed

Check failure on line 14 in packages/storage/src/internals/apis/getProperties.ts

View workflow job for this annotation

GitHub Actions / unit-tests / Unit Test - @aws-amplify/storage

Delete `·`
*
* @param input - The `GetPropertiesWithPathInput` object.
* @returns Requested object properties.
* @throws An `S3Exception` when the underlying S3 service returned error.
Expand Down
1 change: 0 additions & 1 deletion packages/storage/src/internals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export { Permission } from './types/common';
Internal APIs
*/
export {
ExtendInputWithAdvancedOptions,
GetDataAccessInput,
ListCallerAccessGrantsInput,
GetPropertiesInput,
Expand Down
4 changes: 2 additions & 2 deletions packages/storage/src/internals/types/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export type GetPropertiesInput = ExtendInputWithAdvancedOptions<
>;

/**
* Generic types that extend the public API input type with extended options. By default the
* extended options are locationCredentialsProvider.
* Generic types that extend the public API input type with extended options.
* This is a temporary solution to support advanced options from internal APIs.
*
* @internal
*/
Expand Down
6 changes: 3 additions & 3 deletions packages/storage/src/providers/s3/apis/internal/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import { assertValidationError } from '../../../../errors/utils/assertValidation
import { copyObject } from '../../utils/client/s3data';
import { getStorageUserAgentValue } from '../../utils/userAgent';
import { logger } from '../../../../utils';
/** FIXME: remove this interface when we move to public advanced APIs */
import { ExtendInputWithAdvancedOptions } from '../../../../internals';
// TODO: Remove this interface when we move to public advanced APIs.
import { ExtendInputWithAdvancedOptions } from '../../../../internals/types/inputs';

/** FIXME: change this interface back to CopyWithPathInput when we move to public advanced APIs */
// TODO: Change this interface back to CopyWithPathInput when we move to public advanced APIs.
type InputWithPathAndAdvancedOptions = ExtendInputWithAdvancedOptions<
CopyWithPathInput,
{
Expand Down
18 changes: 9 additions & 9 deletions packages/storage/src/providers/s3/apis/internal/getProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ import { headObject } from '../../utils/client/s3data';
import { getStorageUserAgentValue } from '../../utils/userAgent';
import { logger } from '../../../../utils';
import { STORAGE_INPUT_KEY } from '../../utils/constants';
/** FIXME: remove this interface when we move to public advanced APIs */
// TODO: Remove this interface when we move to public advanced APIs.
import { ExtendInputWithAdvancedOptions } from '../../../../internals/types/inputs';
import { LocationCredentialsProvider } from '../../types/options';

type InputWithPathAndAdvancedOptions = ExtendInputWithAdvancedOptions<
GetPropertiesWithPathInput,
{
locationCredentialsProvider?: LocationCredentialsProvider;
}
>;

export const getProperties = async (
amplify: AmplifyClassV6,
input:
| GetPropertiesInput
| ExtendInputWithAdvancedOptions<
GetPropertiesWithPathInput,
{
locationCredentialsProvider?: LocationCredentialsProvider;
}
>,
input: GetPropertiesInput | InputWithPathAndAdvancedOptions,
action?: StorageAction,
): Promise<GetPropertiesOutput | GetPropertiesWithPathOutput> => {
const { s3Config, bucket, keyPrefix, identityId } =
Expand Down

0 comments on commit 0c367c0

Please sign in to comment.