UNPKG

1.24 kBTypeScriptView Raw
1import { StorageOptions, StorageListAllOptions, StorageListPaginateOptions } from './options';
2export type StorageOperationInput<Options extends StorageOptions> = {
3 key: string;
4 options?: Options;
5};
6export type StorageGetPropertiesInput<Options extends StorageOptions> = StorageOperationInput<Options>;
7export type StorageRemoveInput<Options extends StorageOptions> = {
8 key: string;
9 options?: Options;
10};
11export type StorageListInput<Options extends StorageListAllOptions | StorageListPaginateOptions> = {
12 prefix?: string;
13 options?: Options;
14};
15export type StorageGetUrlInput<Options extends StorageOptions> = StorageOperationInput<Options>;
16export type StorageDownloadDataInput<Options extends StorageOptions> = StorageOperationInput<Options>;
17export type StorageUploadDataInput<Options extends StorageOptions> = StorageOperationInput<Options> & {
18 data: StorageUploadDataPayload;
19};
20export type StorageCopyInput<SourceOptions extends StorageOptions, DestinationOptions extends StorageOptions> = {
21 source: SourceOptions;
22 destination: DestinationOptions;
23};
24/**
25 * The data payload type for upload operation.
26 */
27export type StorageUploadDataPayload = Blob | ArrayBufferView | ArrayBuffer | string;