@@ -134,13 +134,11 @@ export function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStora
134134// @public
135135export function getStream(ref : StorageReference , maxDownloadSizeBytes ? : number ): NodeJS .ReadableStream ;
136136
137- // Warning: (ae-forgotten-export) The symbol "StorageError" needs to be exported by the entry point index.d.ts
138- //
139137// @internal (undocumented)
140- export function _invalidArgument(message : string ): StorageError_2 ;
138+ export function _invalidArgument(message : string ): StorageError ;
141139
142140// @internal (undocumented)
143- export function _invalidRootOperation(name : string ): StorageError_2 ;
141+ export function _invalidRootOperation(name : string ): StorageError ;
144142
145143// @public
146144export function list(ref : StorageReference , options ? : ListOptions ): Promise <ListResult >;
@@ -217,8 +215,71 @@ export interface SettableMetadata {
217215}
218216
219217// @public
220- export interface StorageError extends FirebaseError {
221- serverResponse: string | null ;
218+ export class StorageError extends FirebaseError {
219+ constructor (code : StorageErrorCode , message : string , status_ ? : number );
220+ _codeEquals(code : StorageErrorCode ): boolean ;
221+ customData: {
222+ serverResponse: string | null ;
223+ };
224+ get serverResponse(): null | string ;
225+ set serverResponse(serverResponse : string | null );
226+ // (undocumented)
227+ get status(): number ;
228+ set status(status : number );
229+ }
230+
231+ // @public
232+ export enum StorageErrorCode {
233+ // (undocumented)
234+ APP_DELETED = " app-deleted" ,
235+ // (undocumented)
236+ BUCKET_NOT_FOUND = " bucket-not-found" ,
237+ // (undocumented)
238+ CANCELED = " canceled" ,
239+ // (undocumented)
240+ CANNOT_SLICE_BLOB = " cannot-slice-blob" ,
241+ // (undocumented)
242+ INTERNAL_ERROR = " internal-error" ,
243+ // (undocumented)
244+ INVALID_ARGUMENT = " invalid-argument" ,
245+ // (undocumented)
246+ INVALID_ARGUMENT_COUNT = " invalid-argument-count" ,
247+ // (undocumented)
248+ INVALID_CHECKSUM = " invalid-checksum" ,
249+ // (undocumented)
250+ INVALID_DEFAULT_BUCKET = " invalid-default-bucket" ,
251+ // (undocumented)
252+ INVALID_EVENT_NAME = " invalid-event-name" ,
253+ // (undocumented)
254+ INVALID_FORMAT = " invalid-format" ,
255+ // (undocumented)
256+ INVALID_ROOT_OPERATION = " invalid-root-operation" ,
257+ // (undocumented)
258+ INVALID_URL = " invalid-url" ,
259+ // (undocumented)
260+ NO_DEFAULT_BUCKET = " no-default-bucket" ,
261+ // (undocumented)
262+ NO_DOWNLOAD_URL = " no-download-url" ,
263+ // (undocumented)
264+ OBJECT_NOT_FOUND = " object-not-found" ,
265+ // (undocumented)
266+ PROJECT_NOT_FOUND = " project-not-found" ,
267+ // (undocumented)
268+ QUOTA_EXCEEDED = " quota-exceeded" ,
269+ // (undocumented)
270+ RETRY_LIMIT_EXCEEDED = " retry-limit-exceeded" ,
271+ // (undocumented)
272+ SERVER_FILE_WRONG_SIZE = " server-file-wrong-size" ,
273+ // (undocumented)
274+ UNAUTHENTICATED = " unauthenticated" ,
275+ // (undocumented)
276+ UNAUTHORIZED = " unauthorized" ,
277+ // (undocumented)
278+ UNAUTHORIZED_APP = " unauthorized-app" ,
279+ // (undocumented)
280+ UNKNOWN = " unknown" ,
281+ // (undocumented)
282+ UNSUPPORTED_ENVIRONMENT = " unsupported-environment"
222283}
223284
224285// @public
@@ -318,20 +379,20 @@ export class _UploadTask {
318379 constructor (ref : _Reference , blob : _FbsBlob , metadata ? : Metadata | null );
319380 _blob: _FbsBlob ;
320381 cancel(): boolean ;
321- catch<T >(onRejected : (p1 : StorageError_2 ) => T | Promise <T >): Promise <T >;
382+ catch<T >(onRejected : (p1 : StorageError ) => T | Promise <T >): Promise <T >;
322383 // (undocumented)
323384 isExponentialBackoffExpired(): boolean ;
324385 // Warning: (ae-forgotten-export) The symbol "Metadata" needs to be exported by the entry point index.d.ts
325386 _metadata: Metadata | null ;
326387 // Warning: (ae-forgotten-export) The symbol "Unsubscribe" needs to be exported by the entry point index.d.ts
327388 // Warning: (ae-forgotten-export) The symbol "Subscribe" needs to be exported by the entry point index.d.ts
328- on(type : _TaskEvent , nextOrObserver ? : StorageObserver <UploadTaskSnapshot > | null | ((snapshot : UploadTaskSnapshot ) => unknown ), error ? : ((a : StorageError_2 ) => unknown ) | null , completed ? : CompleteFn | null ): Unsubscribe_2 | Subscribe_2 <UploadTaskSnapshot >;
389+ on(type : _TaskEvent , nextOrObserver ? : StorageObserver <UploadTaskSnapshot > | null | ((snapshot : UploadTaskSnapshot ) => unknown ), error ? : ((a : StorageError ) => unknown ) | null , completed ? : CompleteFn | null ): Unsubscribe_2 | Subscribe_2 <UploadTaskSnapshot >;
329390 pause(): boolean ;
330391 resume(): boolean ;
331392 get snapshot(): UploadTaskSnapshot ;
332393 // Warning: (ae-forgotten-export) The symbol "InternalTaskState" needs to be exported by the entry point index.d.ts
333394 _state: InternalTaskState ;
334- then<U >(onFulfilled ? : ((value : UploadTaskSnapshot ) => U | Promise <U >) | null , onRejected ? : ((error : StorageError_2 ) => U | Promise <U >) | null ): Promise <U >;
395+ then<U >(onFulfilled ? : ((value : UploadTaskSnapshot ) => U | Promise <U >) | null , onRejected ? : ((error : StorageError ) => U | Promise <U >) | null ): Promise <U >;
335396 _transferred: number ;
336397 }
337398
0 commit comments