UNPKG

3.22 kBTypeScriptView Raw
1import { AmplifyServer } from '@aws-amplify/core/internals/adapter-core';
2import { ListAllInput, ListAllOutput, ListAllWithPathInput, ListAllWithPathOutput, ListPaginateInput, ListPaginateOutput, ListPaginateWithPathInput, ListPaginateWithPathOutput } from '../../types';
3/**
4 * List files in pages with the given `path`.
5 * `pageSize` is defaulted to 1000. Additionally, the result will include a `nextToken` if there are more items to retrieve.
6 * @param input - The `ListPaginateWithPathInput` object.
7 * @param contextSpec - The context spec used to get the Amplify server context.
8 * @returns A list of objects with path and metadata
9 * @throws service: `S3Exception` - S3 service errors thrown when checking for existence of bucket
10 * @throws validation: `StorageValidationErrorCode` - thrown when there are issues with credentials
11 */
12export declare function list(contextSpec: AmplifyServer.ContextSpec, input: ListPaginateWithPathInput): Promise<ListPaginateWithPathOutput>;
13/**
14 * List all files from S3 for a given `path`. You can set `listAll` to true in `options` to get all the files from S3.
15 * @param input - The `ListAllWithPathInput` object.
16 * @param contextSpec - The context spec used to get the Amplify server context.
17 * @returns A list of all objects with path and metadata
18 * @throws service: `S3Exception` - S3 service errors thrown when checking for existence of bucket
19 * @throws validation: `StorageValidationErrorCode` - thrown when there are issues with credentials
20 */
21export declare function list(contextSpec: AmplifyServer.ContextSpec, input: ListAllWithPathInput): Promise<ListAllWithPathOutput>;
22/**
23 * @deprecated The `prefix` and `accessLevel` parameters are deprecated and may be removed in the next major version.
24 * Please use {@link https://docs.amplify.aws/react/build-a-backend/storage/list | path} instead.
25 * List files in pages with the given `prefix`.
26 * `pageSize` is defaulted to 1000. Additionally, the result will include a `nextToken` if there are more items to retrieve.
27 * @param input - The `ListPaginateInput` object.
28 * @returns A list of objects with key and metadata
29 * @throws service: `S3Exception` - S3 service errors thrown when checking for existence of bucket
30 * @throws validation: `StorageValidationErrorCode` - thrown when there are issues with credentials
31 */
32export declare function list(contextSpec: AmplifyServer.ContextSpec, input?: ListPaginateInput): Promise<ListPaginateOutput>;
33/**
34 * @deprecated The `prefix` and `accessLevel` parameters are deprecated and may be removed in the next major version.
35 * Please use {@link https://docs.amplify.aws/react/build-a-backend/storage/list | path} instead.
36 * List all files from S3 for a given `prefix`. You can set `listAll` to true in `options` to get all the files from S3.
37 * @param input - The `ListAllInput` object.
38 * @returns A list of all objects with key and metadata
39 * @throws service: `S3Exception` - S3 service errors thrown when checking for existence of bucket
40 * @throws validation: `StorageValidationErrorCode` - thrown when there are issues with credentials
41 */
42export declare function list(contextSpec: AmplifyServer.ContextSpec, input?: ListAllInput): Promise<ListAllOutput>;