6
6
7
7
import { CompleteFn } from ' @firebase/util' ;
8
8
import { FirebaseApp } from ' @firebase/app' ;
9
+ import { FirebaseAuthInternalName } from ' @firebase/auth-interop-types' ;
9
10
import { FirebaseError } from ' @firebase/util' ;
11
+ import { _FirebaseService } from ' @firebase/app' ;
10
12
import { NextFn } from ' @firebase/util' ;
13
+ import { Provider } from ' @firebase/component' ;
11
14
import { Subscribe } from ' @firebase/util' ;
12
15
import { Unsubscribe } from ' @firebase/util' ;
13
16
14
17
// @public
15
18
export function deleteObject(ref : StorageReference ): Promise <void >;
16
19
20
+ // @internal (undocumented)
21
+ export class _FbsBlob {
22
+ constructor (data : Blob | Uint8Array | ArrayBuffer , elideCopy ? : boolean );
23
+ // (undocumented)
24
+ static getBlob(... args : Array <string | _FbsBlob >): _FbsBlob | null ;
25
+ // (undocumented)
26
+ size(): number ;
27
+ // (undocumented)
28
+ slice(startByte : number , endByte : number ): _FbsBlob | null ;
29
+ // (undocumented)
30
+ type(): string ;
31
+ // (undocumented)
32
+ uploadData(): Blob | Uint8Array ;
33
+ }
34
+
17
35
// @public
18
36
export interface FirebaseStorageError extends FirebaseError {
19
37
serverResponse: string | null ;
@@ -33,6 +51,9 @@ export interface FullMetadata extends UploadMetadata {
33
51
updated: string ;
34
52
}
35
53
54
+ // @internal (undocumented)
55
+ export function _getChild(ref : StorageReference , childPath : string ): _Reference ;
56
+
36
57
// @public
37
58
export function getDownloadURL(ref : StorageReference ): Promise <string >;
38
59
@@ -61,12 +82,50 @@ export interface ListResult {
61
82
prefixes: StorageReference [];
62
83
}
63
84
85
+ // @internal
86
+ export class _Location {
87
+ constructor (bucket : string , path : string );
88
+ // (undocumented)
89
+ readonly bucket: string ;
90
+ // (undocumented)
91
+ bucketOnlyServerUrl(): string ;
92
+ // (undocumented)
93
+ fullServerUrl(): string ;
94
+ // (undocumented)
95
+ get isRoot(): boolean ;
96
+ // (undocumented)
97
+ static makeFromBucketSpec(bucketString : string ): _Location ;
98
+ // (undocumented)
99
+ static makeFromUrl(url : string ): _Location ;
100
+ // (undocumented)
101
+ get path(): string ;
102
+ }
103
+
64
104
// @public
65
105
export function ref(storage : StorageService , url ? : string ): StorageReference ;
66
106
67
107
// @public
68
108
export function ref(storageOrRef : StorageService | StorageReference , path ? : string ): StorageReference ;
69
109
110
+ // @internal
111
+ export class _Reference {
112
+ // Warning: (ae-forgotten-export) The symbol "StorageService" needs to be exported by the entry point index.d.ts
113
+ constructor (_service : StorageService_2 , location : string | _Location );
114
+ get bucket(): string ;
115
+ get fullPath(): string ;
116
+ // (undocumented)
117
+ _location: _Location ;
118
+ get name(): string ;
119
+ // (undocumented)
120
+ protected _newRef(service : StorageService_2 , location : _Location ): _Reference ;
121
+ get parent(): _Reference | null ;
122
+ get root(): _Reference ;
123
+ get storage(): StorageService_2 ;
124
+ _throwIfRoot(name : string ): void ;
125
+ // @override
126
+ toString(): string ;
127
+ }
128
+
70
129
// @public
71
130
export interface SettableMetadata {
72
131
cacheControl? : string | undefined ;
@@ -101,7 +160,7 @@ export interface StorageReference {
101
160
}
102
161
103
162
// @public
104
- export interface StorageService {
163
+ export interface StorageService extends _FirebaseService {
105
164
readonly app: FirebaseApp ;
106
165
maxOperationRetryTime: number ;
107
166
maxUploadRetryTime: number ;
@@ -158,6 +217,32 @@ export interface UploadTask {
158
217
then(onFulfilled ? : ((snapshot : UploadTaskSnapshot ) => unknown ) | null , onRejected ? : ((error : FirebaseStorageError ) => unknown ) | null ): Promise <unknown >;
159
218
}
160
219
220
+ // @internal
221
+ export class _UploadTask {
222
+ constructor (ref : _Reference , blob : _FbsBlob , metadata ? : Metadata | null );
223
+ _blob: _FbsBlob ;
224
+ cancel(): boolean ;
225
+ catch<T >(onRejected : (p1 : FirebaseStorageError_2 ) => T | Promise <T >): Promise <T >;
226
+ // Warning: (ae-forgotten-export) The symbol "Metadata" needs to be exported by the entry point index.d.ts
227
+ _metadata: Metadata | null ;
228
+ // Warning: (ae-forgotten-export) The symbol "TaskEvent" needs to be exported by the entry point index.d.ts
229
+ // Warning: (ae-forgotten-export) The symbol "StorageObserver" needs to be exported by the entry point index.d.ts
230
+ // Warning: (ae-forgotten-export) The symbol "ErrorFn" needs to be exported by the entry point index.d.ts
231
+ // Warning: (ae-forgotten-export) The symbol "CompleteFn" needs to be exported by the entry point index.d.ts
232
+ // Warning: (ae-forgotten-export) The symbol "Unsubscribe" needs to be exported by the entry point index.d.ts
233
+ // Warning: (ae-forgotten-export) The symbol "Subscribe" needs to be exported by the entry point index.d.ts
234
+ on(type : TaskEvent_2 , nextOrObserver ? : StorageObserver_2 <UploadTaskSnapshot_2 > | ((a : UploadTaskSnapshot_2 ) => unknown ), error ? : ErrorFn , completed ? : CompleteFn_2 ): Unsubscribe_2 | Subscribe_2 <UploadTaskSnapshot_2 >;
235
+ pause(): boolean ;
236
+ resume(): boolean ;
237
+ // Warning: (ae-forgotten-export) The symbol "UploadTaskSnapshot" needs to be exported by the entry point index.d.ts
238
+ get snapshot(): UploadTaskSnapshot_2 ;
239
+ // Warning: (ae-forgotten-export) The symbol "InternalTaskState" needs to be exported by the entry point index.d.ts
240
+ _state: InternalTaskState ;
241
+ // Warning: (ae-forgotten-export) The symbol "FirebaseStorageError" needs to be exported by the entry point index.d.ts
242
+ then<U >(onFulfilled ? : ((value : UploadTaskSnapshot_2 ) => U | Promise <U >) | null , onRejected ? : ((error : FirebaseStorageError_2 ) => U | Promise <U >) | null ): Promise <U >;
243
+ _transferred: number ;
244
+ }
245
+
161
246
// @public
162
247
export interface UploadTaskSnapshot {
163
248
bytesTransferred: number ;
0 commit comments