## API Report File for "@firebase/storage"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { CompleteFn } from '@firebase/util';
import { FirebaseApp } from '@firebase/app';
import { FirebaseError } from '@firebase/util';
import { NextFn } from '@firebase/util';
import { Subscribe } from '@firebase/util';
import { Unsubscribe } from '@firebase/util';

// @public
export function deleteObject(ref: StorageReference): Promise<void>;

// @public
export interface FirebaseStorageError extends FirebaseError {
    serverResponse: string | null;
}

// @public
export interface FullMetadata extends UploadMetadata {
    bucket: string;
    downloadTokens: string[] | undefined;
    fullPath: string;
    generation: string;
    metageneration: string;
    name: string;
    ref?: StorageReference | undefined;
    size: number;
    timeCreated: string;
    updated: string;
}

// @public
export function getDownloadURL(ref: StorageReference): Promise<string>;

// @public
export function getMetadata(ref: StorageReference): Promise<FullMetadata>;

// @public
export function getStorage(app: FirebaseApp, bucketUrl?: string): StorageService;

// @public
export function list(ref: StorageReference, options?: ListOptions): Promise<ListResult>;

// @public
export function listAll(ref: StorageReference): Promise<ListResult>;

// @public
export interface ListOptions {
    maxResults?: number | null;
    pageToken?: string | null;
}

// @public
export interface ListResult {
    items: StorageReference[];
    nextPageToken?: string;
    prefixes: StorageReference[];
}

// @public
export function ref(storage: StorageService, url?: string): StorageReference;

// @public
export function ref(storageOrRef: StorageService | StorageReference, path?: string): StorageReference;

// @public
export interface SettableMetadata {
    cacheControl?: string | undefined;
    contentDisposition?: string | undefined;
    contentEncoding?: string | undefined;
    contentLanguage?: string | undefined;
    contentType?: string | undefined;
    customMetadata?: {
        [key: string]: string;
    } | undefined;
}

// @public
export interface StorageObserver<T> {
    // (undocumented)
    complete?: CompleteFn | null;
    // (undocumented)
    error?: (error: FirebaseStorageError) => void | null;
    // (undocumented)
    next?: NextFn<T> | null;
}

// @public
export interface StorageReference {
    bucket: string;
    fullPath: string;
    name: string;
    parent: StorageReference | null;
    root: StorageReference;
    storage: StorageService;
    toString(): string;
}

// @public
export interface StorageService {
    readonly app: FirebaseApp;
    maxOperationRetryTime: number;
    maxUploadRetryTime: number;
}

// @public
export type StringFormat = string;

// @public
export const StringFormat: {
    RAW: string;
    BASE64: string;
    BASE64URL: string;
    DATA_URL: string;
};

// @public
export type TaskEvent = 'state_changed';

// @public
export type TaskState = 'running' | 'paused' | 'success' | 'canceled' | 'error';

// @public
export function updateMetadata(ref: StorageReference, metadata: SettableMetadata): Promise<FullMetadata>;

// @public
export function uploadBytes(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): Promise<UploadResult>;

// @public
export function uploadBytesResumable(ref: StorageReference, data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata): UploadTask;

// @public
export interface UploadMetadata extends SettableMetadata {
    md5Hash?: string | undefined;
}

// @public
export interface UploadResult {
    readonly metadata: FullMetadata;
    readonly ref: StorageReference;
}

// @public
export function uploadString(ref: StorageReference, value: string, format?: string, metadata?: UploadMetadata): Promise<UploadResult>;

// @public
export interface UploadTask {
    cancel(): boolean;
    catch(onRejected: (error: FirebaseStorageError) => unknown): Promise<unknown>;
    on(event: TaskEvent, nextOrObserver?: StorageObserver<UploadTaskSnapshot> | null | ((snapshot: UploadTaskSnapshot) => unknown), error?: ((a: FirebaseStorageError) => unknown) | null, complete?: Unsubscribe | null): Unsubscribe | Subscribe<UploadTaskSnapshot>;
    pause(): boolean;
    resume(): boolean;
    snapshot: UploadTaskSnapshot;
    then(onFulfilled?: ((snapshot: UploadTaskSnapshot) => unknown) | null, onRejected?: ((error: FirebaseStorageError) => unknown) | null): Promise<unknown>;
}

// @public
export interface UploadTaskSnapshot {
    bytesTransferred: number;
    metadata: FullMetadata;
    ref: StorageReference;
    state: TaskState;
    task: UploadTask;
    totalBytes: number;
}


// (No @packageDocumentation comment for this package)

```
