@firebase/storage-types
- Version 0.8.2
- Published
- 6.41 kB
- No dependencies
- Apache-2.0 license
Install
npm i @firebase/storage-types
yarn add @firebase/storage-types
pnpm add @firebase/storage-types
Overview
@firebase/storage Types
Index
Classes
Interfaces
Enums
StorageErrorCode
- APP_DELETED
- BUCKET_NOT_FOUND
- CANCELED
- CANNOT_SLICE_BLOB
- INTERNAL_ERROR
- INVALID_ARGUMENT
- INVALID_ARGUMENT_COUNT
- INVALID_CHECKSUM
- INVALID_DEFAULT_BUCKET
- INVALID_EVENT_NAME
- INVALID_FORMAT
- INVALID_ROOT_OPERATION
- INVALID_URL
- NO_DEFAULT_BUCKET
- NO_DOWNLOAD_URL
- OBJECT_NOT_FOUND
- PROJECT_NOT_FOUND
- QUOTA_EXCEEDED
- RETRY_LIMIT_EXCEEDED
- SERVER_FILE_WRONG_SIZE
- UNAUTHENTICATED
- UNAUTHORIZED
- UNAUTHORIZED_APP
- UNKNOWN
- UNSUPPORTED_ENVIRONMENT
Type Aliases
Classes
class FirebaseStorage
class FirebaseStorage {}
property app
app: FirebaseApp;
property maxOperationRetryTime
maxOperationRetryTime: number;
property maxUploadRetryTime
maxUploadRetryTime: number;
method ref
ref: (path?: string) => Reference;
method refFromURL
refFromURL: (url: string) => Reference;
method setMaxOperationRetryTime
setMaxOperationRetryTime: (time: number) => void;
method setMaxUploadRetryTime
setMaxUploadRetryTime: (time: number) => void;
method useEmulator
useEmulator: ( host: string, port: number, options?: { mockUserToken?: EmulatorMockTokenOptions | string }) => void;
Interfaces
interface FirebaseStorageError
interface FirebaseStorageError extends FirebaseError {}
property customData
customData: { serverResponse: string | null;};
Stores custom error data unique to the
StorageError
.
index signature
get status(): number;
index signature
set status(status: number);
index signature
get serverResponse(): null | string;
Optional response message that was added by the server.
index signature
set serverResponse(serverResponse: string | null);
interface FullMetadata
interface FullMetadata extends UploadMetadata {}
property bucket
bucket: string;
property fullPath
fullPath: string;
property generation
generation: string;
property metageneration
metageneration: string;
property name
name: string;
property size
size: number;
property timeCreated
timeCreated: string;
property updated
updated: string;
interface ListOptions
interface ListOptions {}
property maxResults
maxResults?: number | null;
property pageToken
pageToken?: string | null;
interface ListResult
interface ListResult {}
property items
items: Reference[];
property nextPageToken
nextPageToken: string | null;
property prefixes
prefixes: Reference[];
interface Reference
interface Reference {}
property bucket
bucket: string;
property fullPath
fullPath: string;
property name
name: string;
property parent
parent: Reference | null;
property root
root: Reference;
property storage
storage: FirebaseStorage;
method child
child: (path: string) => Reference;
method delete
delete: () => Promise<void>;
method getDownloadURL
getDownloadURL: () => Promise<string>;
method getMetadata
getMetadata: () => Promise<FullMetadata>;
method list
list: (options?: ListOptions) => Promise<ListResult>;
method listAll
listAll: () => Promise<ListResult>;
method put
put: ( data: Blob | Uint8Array | ArrayBuffer, metadata?: UploadMetadata) => UploadTask;
method putString
putString: ( data: string, format?: StringFormat, metadata?: UploadMetadata) => UploadTask;
method toString
toString: () => string;
method updateMetadata
updateMetadata: (metadata: SettableMetadata) => Promise<FullMetadata>;
interface SettableMetadata
interface SettableMetadata {}
property cacheControl
cacheControl?: string | null;
property contentDisposition
contentDisposition?: string | null;
property contentEncoding
contentEncoding?: string | null;
property contentLanguage
contentLanguage?: string | null;
property contentType
contentType?: string | null;
property customMetadata
customMetadata?: { [/* warning: coerced from ? */ key: string]: string;} | null;
interface StorageObserver
interface StorageObserver<T> {}
interface UploadMetadata
interface UploadMetadata extends SettableMetadata {}
property md5Hash
md5Hash?: string | null;
interface UploadTask
interface UploadTask {}
property snapshot
snapshot: UploadTaskSnapshot;
method cancel
cancel: () => boolean;
method catch
catch: (onRejected: (error: FirebaseStorageError) => any) => Promise<any>;
method on
on: ( event: TaskEvent, nextOrObserver?: | StorageObserver<UploadTaskSnapshot> | ((snapshot: UploadTaskSnapshot) => any), error?: (a: FirebaseStorageError) => any, complete?: Unsubscribe | null) => Function;
method pause
pause: () => boolean;
method resume
resume: () => boolean;
method then
then: ( onFulfilled?: (snapshot: UploadTaskSnapshot) => any, onRejected?: (error: FirebaseStorageError) => any) => Promise<any>;
interface UploadTaskSnapshot
interface UploadTaskSnapshot {}
property bytesTransferred
bytesTransferred: number;
property metadata
metadata: FullMetadata;
property ref
ref: Reference;
property state
state: TaskState;
property task
task: UploadTask;
property totalBytes
totalBytes: number;
Enums
enum StorageErrorCode
enum StorageErrorCode { UNKNOWN = 'unknown', OBJECT_NOT_FOUND = 'object-not-found', BUCKET_NOT_FOUND = 'bucket-not-found', PROJECT_NOT_FOUND = 'project-not-found', QUOTA_EXCEEDED = 'quota-exceeded', UNAUTHENTICATED = 'unauthenticated', UNAUTHORIZED = 'unauthorized', UNAUTHORIZED_APP = 'unauthorized-app', RETRY_LIMIT_EXCEEDED = 'retry-limit-exceeded', INVALID_CHECKSUM = 'invalid-checksum', CANCELED = 'canceled', INVALID_EVENT_NAME = 'invalid-event-name', INVALID_URL = 'invalid-url', INVALID_DEFAULT_BUCKET = 'invalid-default-bucket', NO_DEFAULT_BUCKET = 'no-default-bucket', CANNOT_SLICE_BLOB = 'cannot-slice-blob', SERVER_FILE_WRONG_SIZE = 'server-file-wrong-size', NO_DOWNLOAD_URL = 'no-download-url', INVALID_ARGUMENT = 'invalid-argument', INVALID_ARGUMENT_COUNT = 'invalid-argument-count', APP_DELETED = 'app-deleted', INVALID_ROOT_OPERATION = 'invalid-root-operation', INVALID_FORMAT = 'invalid-format', INTERNAL_ERROR = 'internal-error', UNSUPPORTED_ENVIRONMENT = 'unsupported-environment',}
member APP_DELETED
APP_DELETED = 'app-deleted'
member BUCKET_NOT_FOUND
BUCKET_NOT_FOUND = 'bucket-not-found'
member CANCELED
CANCELED = 'canceled'
member CANNOT_SLICE_BLOB
CANNOT_SLICE_BLOB = 'cannot-slice-blob'
member INTERNAL_ERROR
INTERNAL_ERROR = 'internal-error'
member INVALID_ARGUMENT
INVALID_ARGUMENT = 'invalid-argument'
member INVALID_ARGUMENT_COUNT
INVALID_ARGUMENT_COUNT = 'invalid-argument-count'
member INVALID_CHECKSUM
INVALID_CHECKSUM = 'invalid-checksum'
member INVALID_DEFAULT_BUCKET
INVALID_DEFAULT_BUCKET = 'invalid-default-bucket'
member INVALID_EVENT_NAME
INVALID_EVENT_NAME = 'invalid-event-name'
member INVALID_FORMAT
INVALID_FORMAT = 'invalid-format'
member INVALID_ROOT_OPERATION
INVALID_ROOT_OPERATION = 'invalid-root-operation'
member INVALID_URL
INVALID_URL = 'invalid-url'
member NO_DEFAULT_BUCKET
NO_DEFAULT_BUCKET = 'no-default-bucket'
member NO_DOWNLOAD_URL
NO_DOWNLOAD_URL = 'no-download-url'
member OBJECT_NOT_FOUND
OBJECT_NOT_FOUND = 'object-not-found'
member PROJECT_NOT_FOUND
PROJECT_NOT_FOUND = 'project-not-found'
member QUOTA_EXCEEDED
QUOTA_EXCEEDED = 'quota-exceeded'
member RETRY_LIMIT_EXCEEDED
RETRY_LIMIT_EXCEEDED = 'retry-limit-exceeded'
member SERVER_FILE_WRONG_SIZE
SERVER_FILE_WRONG_SIZE = 'server-file-wrong-size'
member UNAUTHENTICATED
UNAUTHENTICATED = 'unauthenticated'
member UNAUTHORIZED
UNAUTHORIZED = 'unauthorized'
member UNAUTHORIZED_APP
UNAUTHORIZED_APP = 'unauthorized-app'
member UNKNOWN
UNKNOWN = 'unknown'
member UNSUPPORTED_ENVIRONMENT
UNSUPPORTED_ENVIRONMENT = 'unsupported-environment'
Type Aliases
type StringFormat
type StringFormat = string;
type TaskEvent
type TaskEvent = string;
type TaskState
type TaskState = string;
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (1)
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@firebase/storage-types
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@firebase/storage-types)
- HTML<a href="https://www.jsdocs.io/package/@firebase/storage-types"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3212 ms. - Missing or incorrect documentation? Open an issue for this package.