import { StrictUnion } from '@aws-amplify/core/internals/utils'; import { CopyWithPathDestinationOptions, CopyWithPathSourceOptions } from '../providers/s3/types/options'; import { StorageListAllOptions, StorageListPaginateOptions, StorageOptions } from './options'; export type StorageOperationInput = StrictUnion; export type StorageOperationInputWithPrefixPath = StrictUnion; /** @deprecated Use {@link StorageOperationInputWithPath} instead. */ export interface StorageOperationInputWithKey { /** @deprecated Use `path` instead. */ key: string; } export interface StorageOperationInputWithPath { path: string | (({ identityId }: { identityId?: string; }) => string); } /** @deprecated Use {@link StorageOperationInputWithPath} instead. */ export interface StorageOperationInputWithPrefix { /** @deprecated Use `path` instead. */ prefix?: string; } export interface StorageOperationOptionsInput { options?: Options; } /** @deprecated Use {@link StorageDownloadDataInputWithPath} instead. */ export type StorageDownloadDataInputWithKey = StorageOperationInputWithKey & StorageOperationOptionsInput; export type StorageDownloadDataInputWithPath = StorageOperationInputWithPath & StorageOperationOptionsInput; /** @deprecated Use {@link StorageGetPropertiesInputWithPath} instead. */ export type StorageGetPropertiesInputWithKey = StorageOperationInputWithKey & StorageOperationOptionsInput; export type StorageGetPropertiesInputWithPath = StorageOperationInputWithPath & StorageOperationOptionsInput; export type StorageRemoveInputWithKey = StorageOperationInputWithKey & StorageOperationOptionsInput; export type StorageRemoveInputWithPath = StorageOperationInputWithPath & StorageOperationOptionsInput; /** @deprecated Use {@link StorageListInputWithPath} instead. */ export type StorageListInputWithPrefix = StorageOperationInputWithPrefix & StorageOperationOptionsInput; export type StorageListInputWithPath = StorageOperationInputWithPath & StorageOperationOptionsInput; /** @deprecated Use {@link StorageGetUrlInputWithPath} instead. */ export type StorageGetUrlInputWithKey = StorageOperationInputWithKey & StorageOperationOptionsInput; export type StorageGetUrlInputWithPath = StorageOperationInputWithPath & StorageOperationOptionsInput; /** @deprecated Use {@link StorageUploadDataInputWithPath} instead. */ export type StorageUploadDataInputWithKey = StorageOperationInputWithKey & StorageOperationOptionsInput & StorageUploadDataInputPayload; export type StorageUploadDataInputWithPath = StorageOperationInputWithPath & StorageOperationOptionsInput & StorageUploadDataInputPayload; /** @deprecated Use {@link StorageCopyInputWithPath} instead. */ export interface StorageCopyInputWithKey { source: SourceOptions; destination: DestinationOptions; } export interface StorageCopyInputWithPath { source: StorageOperationInputWithPath & CopyWithPathSourceOptions; destination: StorageOperationInputWithPath & CopyWithPathDestinationOptions; } /** * The data payload type for upload operation. */ export type StorageUploadDataPayload = Blob | ArrayBufferView | ArrayBuffer | string; export interface StorageUploadDataInputPayload { data: StorageUploadDataPayload; }