@@ -8,6 +8,8 @@ import { DocumentData as DocumentData_2 } from '@firebase/firestore-types';
8
8
import { FirebaseApp } from ' @firebase/app-types' ;
9
9
import { FirebaseAuthInternalName } from ' @firebase/auth-interop-types' ;
10
10
import { _FirebaseService } from ' @firebase/app-types' ;
11
+ import { LogLevel } from ' @firebase/logger' ;
12
+ import { LogLevelString } from ' @firebase/logger' ;
11
13
import { Provider } from ' @firebase/component' ;
12
14
import { SetOptions as SetOptions_2 } from ' @firebase/firestore-types' ;
13
15
@@ -20,6 +22,27 @@ export function arrayRemove(...elements: unknown[]): FieldValue;
20
22
// @public (undocumented)
21
23
export function arrayUnion(... elements : unknown []): FieldValue ;
22
24
25
+ // @public
26
+ export class Bytes {
27
+ constructor (byteString : ByteString );
28
+ // Warning: (ae-forgotten-export) The symbol "ByteString" needs to be exported by the entry point index.d.ts
29
+ //
30
+ // (undocumented)
31
+ _byteString: ByteString ;
32
+ // (undocumented)
33
+ static fromBase64String(base64 : string ): Bytes ;
34
+ // (undocumented)
35
+ static fromUint8Array(array : Uint8Array ): Bytes ;
36
+ // (undocumented)
37
+ isEqual(other : Bytes ): boolean ;
38
+ // (undocumented)
39
+ toBase64(): string ;
40
+ // (undocumented)
41
+ toString(): string ;
42
+ // (undocumented)
43
+ toUint8Array(): Uint8Array ;
44
+ }
45
+
23
46
// @public (undocumented)
24
47
export function collection(firestore : FirebaseFirestore , path : string , ... pathComponents : string []): CollectionReference <DocumentData >;
25
48
@@ -202,6 +225,37 @@ export interface FirestoreDataConverter<T> {
202
225
toFirestore(modelObject : Partial <T >, options : SetOptions ): DocumentData ;
203
226
}
204
227
228
+ // @public
229
+ export class FirestoreError extends Error {
230
+ constructor (code : FirestoreErrorCode , message : string );
231
+ // (undocumented)
232
+ readonly code: FirestoreErrorCode ;
233
+ // (undocumented)
234
+ readonly message: string ;
235
+ // (undocumented)
236
+ readonly name: string ;
237
+ // (undocumented)
238
+ readonly stack? : string ;
239
+ }
240
+
241
+ // @public
242
+ export type FirestoreErrorCode = ' cancelled' | ' unknown' | ' invalid-argument' | ' deadline-exceeded' | ' not-found' | ' already-exists' | ' permission-denied' | ' resource-exhausted' | ' failed-precondition' | ' aborted' | ' out-of-range' | ' unimplemented' | ' internal' | ' unavailable' | ' data-loss' | ' unauthenticated' ;
243
+
244
+ // @public
245
+ export class GeoPoint {
246
+ constructor (latitude : number , longitude : number );
247
+ _compareTo(other : GeoPoint ): number ;
248
+ // (undocumented)
249
+ isEqual(other : GeoPoint ): boolean ;
250
+ get latitude(): number ;
251
+ get longitude(): number ;
252
+ // (undocumented)
253
+ toJSON(): {
254
+ latitude: number ;
255
+ longitude: number ;
256
+ };
257
+ }
258
+
205
259
// @public (undocumented)
206
260
export function getDoc<T >(reference : DocumentReference <T >): Promise <DocumentSnapshot <T >>;
207
261
@@ -223,6 +277,10 @@ export function limit(limit: number): QueryConstraint;
223
277
// @public (undocumented)
224
278
export function limitToLast(limit : number ): QueryConstraint ;
225
279
280
+ export { LogLevel }
281
+
282
+ export { LogLevelString }
283
+
226
284
// @public (undocumented)
227
285
export function orderBy(fieldPath : string | FieldPath , directionStr ? : OrderByDirection ): QueryConstraint ;
228
286
@@ -288,6 +346,9 @@ export class QuerySnapshot<T = DocumentData> {
288
346
// @public (undocumented)
289
347
export function refEqual<T >(left : DocumentReference <T > | CollectionReference <T >, right : DocumentReference <T > | CollectionReference <T >): boolean ;
290
348
349
+ // @public (undocumented)
350
+ export function runTransaction<T >(firestore : FirebaseFirestore , updateFunction : (transaction : Transaction ) => Promise <T >): Promise <T >;
351
+
291
352
// @public (undocumented)
292
353
export function serverTimestamp(): FieldValue ;
293
354
@@ -297,6 +358,9 @@ export function setDoc<T>(reference: DocumentReference<T>, data: T): Promise<voi
297
358
// @public (undocumented)
298
359
export function setDoc<T >(reference : DocumentReference <T >, data : Partial <T >, options : SetOptions ): Promise <void >;
299
360
361
+ // @public (undocumented)
362
+ export function setLogLevel(newLevel : LogLevelString ): void ;
363
+
300
364
// @public (undocumented)
301
365
export type SetOptions = {
302
366
readonly merge? : boolean ;
@@ -332,6 +396,58 @@ export function startAt(...fieldValues: unknown[]): QueryConstraint;
332
396
// @public (undocumented)
333
397
export function terminate(firestore : FirebaseFirestore ): Promise <void >;
334
398
399
+ // @public
400
+ export class Timestamp {
401
+ constructor (seconds : number , nanoseconds : number );
402
+ // (undocumented)
403
+ _compareTo(other : Timestamp ): number ;
404
+ // (undocumented)
405
+ static fromDate(date : Date ): Timestamp ;
406
+ // (undocumented)
407
+ static fromMillis(milliseconds : number ): Timestamp ;
408
+ // (undocumented)
409
+ isEqual(other : Timestamp ): boolean ;
410
+ // (undocumented)
411
+ readonly nanoseconds: number ;
412
+ // (undocumented)
413
+ static now(): Timestamp ;
414
+ // (undocumented)
415
+ readonly seconds: number ;
416
+ // (undocumented)
417
+ toDate(): Date ;
418
+ // (undocumented)
419
+ toJSON(): {
420
+ seconds: number ;
421
+ nanoseconds: number ;
422
+ };
423
+ // (undocumented)
424
+ toMillis(): number ;
425
+ // (undocumented)
426
+ toString(): string ;
427
+ // (undocumented)
428
+ valueOf(): string ;
429
+ }
430
+
431
+ // @public (undocumented)
432
+ export class Transaction {
433
+ // Warning: (ae-forgotten-export) The symbol "Transaction" needs to be exported by the entry point index.d.ts
434
+ constructor (_firestore : FirebaseFirestore , _transaction : Transaction_2 );
435
+ // (undocumented)
436
+ delete(documentRef : DocumentReference <unknown >): this ;
437
+ // (undocumented)
438
+ protected readonly _firestore: FirebaseFirestore ;
439
+ // (undocumented)
440
+ get<T >(documentRef : DocumentReference <T >): Promise <DocumentSnapshot <T >>;
441
+ // (undocumented)
442
+ set<T >(documentRef : DocumentReference <T >, data : T ): this ;
443
+ // (undocumented)
444
+ set<T >(documentRef : DocumentReference <T >, data : Partial <T >, options : SetOptions ): this ;
445
+ // (undocumented)
446
+ update(documentRef : DocumentReference <unknown >, data : UpdateData ): this ;
447
+ // (undocumented)
448
+ update(documentRef : DocumentReference <unknown >, field : string | FieldPath , data : unknown , ... moreFieldsAndValues : unknown []): this ;
449
+ }
450
+
335
451
// @public (undocumented)
336
452
export interface UpdateData {
337
453
// (undocumented)
@@ -350,6 +466,27 @@ export function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value
350
466
// @public (undocumented)
351
467
export type WhereFilterOp = ' <' | ' <=' | ' ==' | ' !=' | ' >=' | ' >' | ' array-contains' | ' in' | ' array-contains-any' | ' not-in' ;
352
468
469
+ // @public (undocumented)
470
+ export class WriteBatch {
471
+ // Warning: (ae-forgotten-export) The symbol "Mutation" needs to be exported by the entry point index.d.ts
472
+ constructor (_firestore : FirebaseFirestore , _commitHandler : (m : Mutation []) => Promise <void >);
473
+ // (undocumented)
474
+ commit(): Promise <void >;
475
+ // (undocumented)
476
+ delete(documentRef : DocumentReference <unknown >): WriteBatch ;
477
+ // (undocumented)
478
+ set<T >(documentRef : DocumentReference <T >, data : T ): WriteBatch ;
479
+ // (undocumented)
480
+ set<T >(documentRef : DocumentReference <T >, data : Partial <T >, options : SetOptions ): WriteBatch ;
481
+ // (undocumented)
482
+ update(documentRef : DocumentReference <unknown >, data : UpdateData ): WriteBatch ;
483
+ // (undocumented)
484
+ update(documentRef : DocumentReference <unknown >, field : string | FieldPath , data : unknown , ... moreFieldsAndValues : unknown []): WriteBatch ;
485
+ }
486
+
487
+ // @public (undocumented)
488
+ export function writeBatch(firestore : FirebaseFirestore ): WriteBatch ;
489
+
353
490
354
491
// (No @packageDocumentation comment for this package)
355
492
0 commit comments