Skip to content

Commit 0cc4f95

Browse files
Re-run
1 parent 4280552 commit 0cc4f95

File tree

4 files changed

+336
-34
lines changed

4 files changed

+336
-34
lines changed

common/api-review/firestore-lite.api.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { DocumentData as DocumentData_2 } from '@firebase/firestore-types';
88
import { FirebaseApp } from '@firebase/app-types';
99
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
1010
import { _FirebaseService } from '@firebase/app-types';
11+
import { LogLevel } from '@firebase/logger';
12+
import { LogLevelString } from '@firebase/logger';
1113
import { Provider } from '@firebase/component';
1214
import { SetOptions as SetOptions_2 } from '@firebase/firestore-types';
1315

@@ -20,6 +22,27 @@ export function arrayRemove(...elements: unknown[]): FieldValue;
2022
// @public (undocumented)
2123
export function arrayUnion(...elements: unknown[]): FieldValue;
2224

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+
2346
// @public (undocumented)
2447
export function collection(firestore: FirebaseFirestore, path: string, ...pathComponents: string[]): CollectionReference<DocumentData>;
2548

@@ -202,6 +225,37 @@ export interface FirestoreDataConverter<T> {
202225
toFirestore(modelObject: Partial<T>, options: SetOptions): DocumentData;
203226
}
204227

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+
205259
// @public (undocumented)
206260
export function getDoc<T>(reference: DocumentReference<T>): Promise<DocumentSnapshot<T>>;
207261

@@ -223,6 +277,10 @@ export function limit(limit: number): QueryConstraint;
223277
// @public (undocumented)
224278
export function limitToLast(limit: number): QueryConstraint;
225279

280+
export { LogLevel }
281+
282+
export { LogLevelString }
283+
226284
// @public (undocumented)
227285
export function orderBy(fieldPath: string | FieldPath, directionStr?: OrderByDirection): QueryConstraint;
228286

@@ -288,6 +346,9 @@ export class QuerySnapshot<T = DocumentData> {
288346
// @public (undocumented)
289347
export function refEqual<T>(left: DocumentReference<T> | CollectionReference<T>, right: DocumentReference<T> | CollectionReference<T>): boolean;
290348

349+
// @public (undocumented)
350+
export function runTransaction<T>(firestore: FirebaseFirestore, updateFunction: (transaction: Transaction) => Promise<T>): Promise<T>;
351+
291352
// @public (undocumented)
292353
export function serverTimestamp(): FieldValue;
293354

@@ -297,6 +358,9 @@ export function setDoc<T>(reference: DocumentReference<T>, data: T): Promise<voi
297358
// @public (undocumented)
298359
export function setDoc<T>(reference: DocumentReference<T>, data: Partial<T>, options: SetOptions): Promise<void>;
299360

361+
// @public (undocumented)
362+
export function setLogLevel(newLevel: LogLevelString): void;
363+
300364
// @public (undocumented)
301365
export type SetOptions = {
302366
readonly merge?: boolean;
@@ -332,6 +396,58 @@ export function startAt(...fieldValues: unknown[]): QueryConstraint;
332396
// @public (undocumented)
333397
export function terminate(firestore: FirebaseFirestore): Promise<void>;
334398

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+
335451
// @public (undocumented)
336452
export interface UpdateData {
337453
// (undocumented)
@@ -350,6 +466,27 @@ export function where(fieldPath: string | FieldPath, opStr: WhereFilterOp, value
350466
// @public (undocumented)
351467
export type WhereFilterOp = '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'array-contains-any' | 'not-in';
352468

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+
353490

354491
// (No @packageDocumentation comment for this package)
355492

0 commit comments

Comments
 (0)