@@ -10,7 +10,7 @@ import { EmulatorMockTokenOptions } from '@firebase/util';
10
10
import { FirebaseApp } from ' @firebase/app' ;
11
11
import { FirebaseAuthInternalName } from ' @firebase/auth-interop-types' ;
12
12
import { FirebaseError } from ' @firebase/util' ;
13
- import { _FirebaseService } from ' @firebase/app' ;
13
+ import { _FirebaseService } from ' @firebase/app-exp ' ;
14
14
import { NextFn } from ' @firebase/util' ;
15
15
import { Provider } from ' @firebase/component' ;
16
16
import { Subscribe } from ' @firebase/util' ;
@@ -21,6 +21,11 @@ export function connectStorageEmulator(storage: FirebaseStorage, host: string, p
21
21
mockUserToken? : EmulatorMockTokenOptions | string ;
22
22
}): void ;
23
23
24
+ // Warning: (ae-forgotten-export) The symbol "StringData" needs to be exported by the entry point index.d.ts
25
+ //
26
+ // @internal (undocumented)
27
+ export function _dataFromString(format : StringFormat , stringData : string ): StringData ;
28
+
24
29
// @public
25
30
export function deleteObject(ref : StorageReference ): Promise <void >;
26
31
@@ -51,6 +56,55 @@ export interface FirebaseStorageError extends FirebaseError {
51
56
serverResponse: string | null ;
52
57
}
53
58
59
+ // @public
60
+ export class _FirebaseStorageImpl implements FirebaseStorage {
61
+ constructor (
62
+ app : FirebaseApp , _authProvider : Provider <FirebaseAuthInternalName >,
63
+ _appCheckProvider : Provider <AppCheckInternalComponentName >,
64
+ _pool : ConnectionPool , _url ? : string | undefined , _firebaseVersion ? : string | undefined );
65
+ readonly app: FirebaseApp ;
66
+ // @internal (undocumented)
67
+ readonly _appCheckProvider: Provider <AppCheckInternalComponentName >;
68
+ // (undocumented)
69
+ protected readonly _appId: string | null ;
70
+ // (undocumented)
71
+ readonly _authProvider: Provider <FirebaseAuthInternalName >;
72
+ // Warning: (ae-incompatible-release-tags) The symbol "_bucket" is marked as @public, but its signature references "Location" which is marked as @internal
73
+ //
74
+ // (undocumented)
75
+ _bucket: _Location | null ;
76
+ _delete(): Promise <void >;
77
+ // (undocumented)
78
+ readonly _firebaseVersion? : string | undefined ;
79
+ // (undocumented)
80
+ _getAppCheckToken(): Promise <string | null >;
81
+ // (undocumented)
82
+ _getAuthToken(): Promise <string | null >;
83
+ // (undocumented)
84
+ get host(): string ;
85
+ set host(host : string );
86
+ // Warning: (ae-forgotten-export) The symbol "RequestInfo" needs to be exported by the entry point index.d.ts
87
+ // Warning: (ae-forgotten-export) The symbol "Request" needs to be exported by the entry point index.d.ts
88
+ //
89
+ // (undocumented)
90
+ _makeRequest<T >(requestInfo : RequestInfo_2 <T >, authToken : string | null , appCheckToken : string | null ): Request_2 <T >;
91
+ // (undocumented)
92
+ makeRequestWithTokens<T >(requestInfo : RequestInfo_2 <T >): Promise <Request_2 <T >>;
93
+ // Warning: (ae-incompatible-release-tags) The symbol "_makeStorageReference" is marked as @public, but its signature references "Location" which is marked as @internal
94
+ // Warning: (ae-incompatible-release-tags) The symbol "_makeStorageReference" is marked as @public, but its signature references "Reference" which is marked as @internal
95
+ _makeStorageReference(loc : _Location ): _Reference ;
96
+ get maxOperationRetryTime(): number ;
97
+ set maxOperationRetryTime(time : number );
98
+ get maxUploadRetryTime(): number ;
99
+ set maxUploadRetryTime(time : number );
100
+ // Warning: (ae-forgotten-export) The symbol "ConnectionPool" needs to be exported by the entry point index.d.ts
101
+ //
102
+ // @internal (undocumented)
103
+ readonly _pool: ConnectionPool ;
104
+ // (undocumented)
105
+ readonly _url? : string | undefined ;
106
+ }
107
+
54
108
// @public
55
109
export interface FullMetadata extends UploadMetadata {
56
110
bucket: string ;
@@ -77,6 +131,14 @@ export function getMetadata(ref: StorageReference): Promise<FullMetadata>;
77
131
// @public
78
132
export function getStorage(app ? : FirebaseApp , bucketUrl ? : string ): FirebaseStorage ;
79
133
134
+ // Warning: (ae-forgotten-export) The symbol "FirebaseStorageError" needs to be exported by the entry point index.d.ts
135
+ //
136
+ // @internal (undocumented)
137
+ export function _invalidArgument(message : string ): FirebaseStorageError_2 ;
138
+
139
+ // @internal (undocumented)
140
+ export function _invalidRootOperation(name : string ): FirebaseStorageError_2 ;
141
+
80
142
// @public
81
143
export function list(ref : StorageReference , options ? : ListOptions ): Promise <ListResult >;
82
144
@@ -123,18 +185,17 @@ export function ref(storageOrRef: FirebaseStorage | StorageReference, path?: str
123
185
124
186
// @internal
125
187
export class _Reference {
126
- // Warning: (ae-forgotten-export) The symbol "FirebaseStorageImpl" needs to be exported by the entry point index.d.ts
127
- constructor (_service : FirebaseStorageImpl , location : string | _Location );
188
+ constructor (_service : _FirebaseStorageImpl , location : string | _Location );
128
189
get bucket(): string ;
129
190
get fullPath(): string ;
130
191
// (undocumented)
131
192
_location: _Location ;
132
193
get name(): string ;
133
194
// (undocumented)
134
- protected _newRef(service : FirebaseStorageImpl , location : _Location ): _Reference ;
195
+ protected _newRef(service : _FirebaseStorageImpl , location : _Location ): _Reference ;
135
196
get parent(): _Reference | null ;
136
197
get root(): _Reference ;
137
- get storage(): FirebaseStorageImpl ;
198
+ get storage(): _FirebaseStorageImpl ;
138
199
_throwIfRoot(name : string ): void ;
139
200
// @override
140
201
toString(): string ;
@@ -187,9 +248,29 @@ export const StringFormat: {
187
248
// @public
188
249
export type TaskEvent = ' state_changed' ;
189
250
251
+ // @public
252
+ export type _TaskEvent = string ;
253
+
254
+ // @public
255
+ export const _TaskEvent: {
256
+ STATE_CHANGED: string ;
257
+ };
258
+
190
259
// @public
191
260
export type TaskState = ' running' | ' paused' | ' success' | ' canceled' | ' error' ;
192
261
262
+ // @public
263
+ export type _TaskState = typeof _TaskState [keyof typeof _TaskState ];
264
+
265
+ // @public
266
+ export const _TaskState: {
267
+ readonly RUNNING: " running" ;
268
+ readonly PAUSED: " paused" ;
269
+ readonly SUCCESS: " success" ;
270
+ readonly CANCELED: " canceled" ;
271
+ readonly ERROR: " error" ;
272
+ };
273
+
193
274
// @public
194
275
export function updateMetadata(ref : StorageReference , metadata : SettableMetadata ): Promise <FullMetadata >;
195
276
@@ -232,21 +313,15 @@ export class _UploadTask {
232
313
catch<T >(onRejected : (p1 : FirebaseStorageError_2 ) => T | Promise <T >): Promise <T >;
233
314
// Warning: (ae-forgotten-export) The symbol "Metadata" needs to be exported by the entry point index.d.ts
234
315
_metadata: Metadata | null ;
235
- // Warning: (ae-forgotten-export) The symbol "TaskEvent" needs to be exported by the entry point index.d.ts
236
- // Warning: (ae-forgotten-export) The symbol "StorageObserver" needs to be exported by the entry point index.d.ts
237
- // Warning: (ae-forgotten-export) The symbol "ErrorFn" needs to be exported by the entry point index.d.ts
238
- // Warning: (ae-forgotten-export) The symbol "CompleteFn" needs to be exported by the entry point index.d.ts
239
316
// Warning: (ae-forgotten-export) The symbol "Unsubscribe" needs to be exported by the entry point index.d.ts
240
317
// Warning: (ae-forgotten-export) The symbol "Subscribe" needs to be exported by the entry point index.d.ts
241
- on(type : TaskEvent_2 , nextOrObserver ? : StorageObserver_2 < UploadTaskSnapshot_2 > | (( a : UploadTaskSnapshot_2 ) => unknown ), error ? : ErrorFn , completed ? : CompleteFn_2 ): Unsubscribe_2 | Subscribe_2 <UploadTaskSnapshot_2 >;
318
+ on(type : _TaskEvent , nextOrObserver ? : StorageObserver < UploadTaskSnapshot > | null | (( snapshot : UploadTaskSnapshot ) => unknown ), error ? : (( a : FirebaseStorageError_2 ) => unknown ) | null , completed ? : Unsubscribe_2 | null ): Unsubscribe_2 | Subscribe_2 <UploadTaskSnapshot >;
242
319
pause(): boolean ;
243
320
resume(): boolean ;
244
- // Warning: (ae-forgotten-export) The symbol "UploadTaskSnapshot" needs to be exported by the entry point index.d.ts
245
- get snapshot(): UploadTaskSnapshot_2 ;
321
+ get snapshot(): UploadTaskSnapshot ;
246
322
// Warning: (ae-forgotten-export) The symbol "InternalTaskState" needs to be exported by the entry point index.d.ts
247
323
_state: InternalTaskState ;
248
- // Warning: (ae-forgotten-export) The symbol "FirebaseStorageError" needs to be exported by the entry point index.d.ts
249
- then<U >(onFulfilled ? : ((value : UploadTaskSnapshot_2 ) => U | Promise <U >) | null , onRejected ? : ((error : FirebaseStorageError_2 ) => U | Promise <U >) | null ): Promise <U >;
324
+ then<U >(onFulfilled ? : ((value : UploadTaskSnapshot ) => U | Promise <U >) | null , onRejected ? : ((error : FirebaseStorageError_2 ) => U | Promise <U >) | null ): Promise <U >;
250
325
_transferred: number ;
251
326
}
252
327
0 commit comments