@firebase/firestore-compat 0.3.12 → 0.3.13-20230706224113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
12
  var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
13
13
 
14
14
  const name = "@firebase/firestore-compat";
15
- const version = "0.3.12";
15
+ const version = "0.3.13-20230706224113";
16
16
 
17
17
  /**
18
18
  * @license
@@ -4,7 +4,7 @@ import { getModularInstance } from '@firebase/util';
4
4
  import { Component } from '@firebase/component';
5
5
 
6
6
  const name = "@firebase/firestore-compat";
7
- const version = "0.3.12";
7
+ const version = "0.3.13-20230706224113";
8
8
 
9
9
  /**
10
10
  * @license
@@ -5,7 +5,7 @@ import { getModularInstance } from '@firebase/util';
5
5
  import { Component } from '@firebase/component';
6
6
 
7
7
  const name = "@firebase/firestore-compat";
8
- const version = "0.3.12";
8
+ const version = "0.3.13-20230706224113";
9
9
 
10
10
  /**
11
11
  * @license
@@ -12,7 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
12
  var firebase__default = /*#__PURE__*/_interopDefaultLegacy(firebase);
13
13
 
14
14
  const name = "@firebase/firestore-compat";
15
- const version = "0.3.12";
15
+ const version = "0.3.13-20230706224113";
16
16
 
17
17
  /**
18
18
  * @license
package/dist/index.rn.js CHANGED
@@ -4,7 +4,7 @@ import { getModularInstance } from '@firebase/util';
4
4
  import { Component } from '@firebase/component';
5
5
 
6
6
  const name = "@firebase/firestore-compat";
7
- const version = "0.3.12";
7
+ const version = "0.3.13-20230706224113";
8
8
 
9
9
  /**
10
10
  * @license
@@ -4,7 +4,7 @@ import { getModularInstance } from '@firebase/util';
4
4
  import { Component } from '@firebase/component';
5
5
 
6
6
  const name = "@firebase/firestore-compat";
7
- const version = "0.3.12";
7
+ const version = "0.3.13-20230706224113";
8
8
 
9
9
  /**
10
10
  * @license
@@ -49,80 +49,80 @@ declare module '@firebase/app-compat' {
49
49
  }
50
50
 
51
51
  import { FirebaseApp as FirebaseAppCompat } from "@firebase/app-compat";
52
- import { type WithFieldValue, type DocumentReference, type CollectionReference, type DocumentData, type Query, type EmulatorMockTokenOptions, type PersistenceSettings, type AggregateQuerySnapshot, type AggregateField, type DocumentSnapshot, type QuerySnapshot, type Firestore, type FirestoreSettings, type LoadBundleTask, type FirestoreError, type Unsubscribe, type SnapshotListenOptions, type QueryCompositeFilterConstraint, type QueryNonFilterConstraint, type QueryConstraint, type Transaction, type TransactionOptions, type PartialWithFieldValue, type SetOptions, type IndexConfiguration, type UpdateData, type FieldPath, type WriteBatch } from "@firebase/firestore";
52
+ import { type DocumentData, type WithFieldValue, type DocumentReference, type CollectionReference, type Query, type EmulatorMockTokenOptions, type PersistenceSettings, type AggregateQuerySnapshot, type AggregateField, type DocumentSnapshot, type QuerySnapshot, type Firestore, type FirestoreSettings, type LoadBundleTask, type FirestoreError, type Unsubscribe, type SnapshotListenOptions, type QueryCompositeFilterConstraint, type QueryNonFilterConstraint, type QueryConstraint, type Transaction, type TransactionOptions, type PartialWithFieldValue, type SetOptions, type IndexConfiguration, type UpdateData, type FieldPath, type WriteBatch } from "@firebase/firestore";
53
53
  declare module "@firebase/firestore" {
54
- function addDoc<T>(reference: types.CollectionReference<T>, data: WithFieldValue<T>): Promise<DocumentReference<T>>;
54
+ function addDoc<AppModelType, DbModelType extends DocumentData>(reference: types.CollectionReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): Promise<DocumentReference<AppModelType, DbModelType>>;
55
55
  function clearIndexedDbPersistence(firestore: types.FirebaseFirestore): Promise<void>;
56
- function collection(firestore: types.FirebaseFirestore, path: string, ...pathSegments: string[]): CollectionReference<DocumentData>;
57
- function collection(reference: types.CollectionReference<unknown>, path: string, ...pathSegments: string[]): CollectionReference<DocumentData>;
58
- function collection(reference: types.DocumentReference, path: string, ...pathSegments: string[]): CollectionReference<DocumentData>;
59
- function collectionGroup(firestore: types.FirebaseFirestore, collectionId: string): Query<DocumentData>;
56
+ function collection(firestore: types.FirebaseFirestore, path: string, ...pathSegments: string[]): CollectionReference<DocumentData, DocumentData>;
57
+ function collection<AppModelType, DbModelType extends DocumentData>(reference: types.CollectionReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): CollectionReference<DocumentData, DocumentData>;
58
+ function collection<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): CollectionReference<DocumentData, DocumentData>;
59
+ function collectionGroup(firestore: types.FirebaseFirestore, collectionId: string): Query<DocumentData, DocumentData>;
60
60
  function connectFirestoreEmulator(firestore: types.FirebaseFirestore, host: string, port: number, options?: {
61
61
  mockUserToken?: EmulatorMockTokenOptions | string;
62
62
  }): void;
63
- function deleteDoc(reference: types.DocumentReference<unknown>): Promise<void>;
63
+ function deleteDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>): Promise<void>;
64
64
  function disableNetwork(firestore: types.FirebaseFirestore): Promise<void>;
65
- function doc(firestore: types.FirebaseFirestore, path: string, ...pathSegments: string[]): DocumentReference<DocumentData>;
66
- function doc<T>(reference: types.CollectionReference<T>, path?: string, ...pathSegments: string[]): DocumentReference<T>;
67
- function doc(reference: types.DocumentReference<unknown>, path: string, ...pathSegments: string[]): DocumentReference<DocumentData>;
65
+ function doc(firestore: types.FirebaseFirestore, path: string, ...pathSegments: string[]): DocumentReference<DocumentData, DocumentData>;
66
+ function doc<AppModelType, DbModelType extends DocumentData>(reference: types.CollectionReference<AppModelType, DbModelType>, path?: string, ...pathSegments: string[]): DocumentReference<AppModelType, DbModelType>;
67
+ function doc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, path: string, ...pathSegments: string[]): DocumentReference<DocumentData, DocumentData>;
68
68
  function enableIndexedDbPersistence(firestore: types.FirebaseFirestore, persistenceSettings?: PersistenceSettings): Promise<void>;
69
69
  function enableMultiTabIndexedDbPersistence(firestore: types.FirebaseFirestore): Promise<void>;
70
70
  function enableNetwork(firestore: types.FirebaseFirestore): Promise<void>;
71
- function getCountFromServer(query: types.Query<unknown>): Promise<AggregateQuerySnapshot<{
71
+ function getCountFromServer<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>): Promise<AggregateQuerySnapshot<{
72
72
  count: AggregateField<number>;
73
- }>>;
74
- function getDoc<T>(reference: types.DocumentReference<T>): Promise<DocumentSnapshot<T>>;
75
- function getDocFromCache<T>(reference: types.DocumentReference<T>): Promise<DocumentSnapshot<T>>;
76
- function getDocFromServer<T>(reference: types.DocumentReference<T>): Promise<DocumentSnapshot<T>>;
77
- function getDocs<T>(query: types.Query<T>): Promise<QuerySnapshot<T>>;
78
- function getDocsFromCache<T>(query: types.Query<T>): Promise<QuerySnapshot<T>>;
79
- function getDocsFromServer<T>(query: types.Query<T>): Promise<QuerySnapshot<T>>;
73
+ }, AppModelType, DbModelType>>;
74
+ function getDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>): Promise<DocumentSnapshot<AppModelType, DbModelType>>;
75
+ function getDocFromCache<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>): Promise<DocumentSnapshot<AppModelType, DbModelType>>;
76
+ function getDocFromServer<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>): Promise<DocumentSnapshot<AppModelType, DbModelType>>;
77
+ function getDocs<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>;
78
+ function getDocsFromCache<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>;
79
+ function getDocsFromServer<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>;
80
80
  function getFirestore(app: FirebaseAppCompat): Firestore;
81
81
  function getFirestore(app: FirebaseAppCompat, databaseId: string): Firestore;
82
82
  function initializeFirestore(app: FirebaseAppCompat, settings: FirestoreSettings, databaseId?: string): Firestore;
83
83
  function loadBundle(firestore: types.FirebaseFirestore, bundleData: ReadableStream<Uint8Array> | ArrayBuffer | string): LoadBundleTask;
84
84
  function namedQuery(firestore: types.FirebaseFirestore, name: string): Promise<Query | null>;
85
- function onSnapshot<T>(reference: types.DocumentReference<T>, observer: {
86
- next?: (snapshot: DocumentSnapshot<T>) => void;
85
+ function onSnapshot<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, observer: {
86
+ next?: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void;
87
87
  error?: (error: FirestoreError) => void;
88
88
  complete?: () => void;
89
89
  }): Unsubscribe;
90
- function onSnapshot<T>(reference: types.DocumentReference<T>, options: SnapshotListenOptions, observer: {
91
- next?: (snapshot: DocumentSnapshot<T>) => void;
90
+ function onSnapshot<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, options: SnapshotListenOptions, observer: {
91
+ next?: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void;
92
92
  error?: (error: FirestoreError) => void;
93
93
  complete?: () => void;
94
94
  }): Unsubscribe;
95
- function onSnapshot<T>(reference: types.DocumentReference<T>, onNext: (snapshot: DocumentSnapshot<T>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
96
- function onSnapshot<T>(reference: types.DocumentReference<T>, options: SnapshotListenOptions, onNext: (snapshot: DocumentSnapshot<T>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
97
- function onSnapshot<T>(query: types.Query<T>, observer: {
98
- next?: (snapshot: QuerySnapshot<T>) => void;
95
+ function onSnapshot<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
96
+ function onSnapshot<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, options: SnapshotListenOptions, onNext: (snapshot: DocumentSnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
97
+ function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, observer: {
98
+ next?: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void;
99
99
  error?: (error: FirestoreError) => void;
100
100
  complete?: () => void;
101
101
  }): Unsubscribe;
102
- function onSnapshot<T>(query: types.Query<T>, options: SnapshotListenOptions, observer: {
103
- next?: (snapshot: QuerySnapshot<T>) => void;
102
+ function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, options: SnapshotListenOptions, observer: {
103
+ next?: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void;
104
104
  error?: (error: FirestoreError) => void;
105
105
  complete?: () => void;
106
106
  }): Unsubscribe;
107
- function onSnapshot<T>(query: types.Query<T>, onNext: (snapshot: QuerySnapshot<T>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
108
- function onSnapshot<T>(query: types.Query<T>, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot<T>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
107
+ function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
108
+ function onSnapshot<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, options: SnapshotListenOptions, onNext: (snapshot: QuerySnapshot<AppModelType, DbModelType>) => void, onError?: (error: FirestoreError) => void, onCompletion?: () => void): Unsubscribe;
109
109
  function onSnapshotsInSync(firestore: types.FirebaseFirestore, observer: {
110
110
  next?: (value: void) => void;
111
111
  error?: (error: FirestoreError) => void;
112
112
  complete?: () => void;
113
113
  }): Unsubscribe;
114
114
  function onSnapshotsInSync(firestore: types.FirebaseFirestore, onSync: () => void): Unsubscribe;
115
- function query<T>(query: types.Query<T>, compositeFilter: QueryCompositeFilterConstraint, ...queryConstraints: QueryNonFilterConstraint[]): Query<T>;
116
- function query<T>(query: types.Query<T>, ...queryConstraints: QueryConstraint[]): Query<T>;
117
- function queryEqual<T>(left: types.Query<T>, right: types.Query<T>): boolean;
115
+ function query<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, compositeFilter: QueryCompositeFilterConstraint, ...queryConstraints: QueryNonFilterConstraint[]): Query<AppModelType, DbModelType>;
116
+ function query<AppModelType, DbModelType extends DocumentData>(query: types.Query<AppModelType, DbModelType>, ...queryConstraints: QueryConstraint[]): Query<AppModelType, DbModelType>;
117
+ function queryEqual<AppModelType, DbModelType extends DocumentData>(left: types.Query<AppModelType, DbModelType>, right: types.Query<AppModelType, DbModelType>): boolean;
118
118
  function runTransaction<T>(firestore: types.FirebaseFirestore, updateFunction: (transaction: Transaction) => Promise<T>, options?: TransactionOptions): Promise<T>;
119
- function setDoc<T>(reference: types.DocumentReference<T>, data: WithFieldValue<T>): Promise<void>;
120
- function setDoc<T>(reference: types.DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
119
+ function setDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, data: WithFieldValue<AppModelType>): Promise<void>;
120
+ function setDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions): Promise<void>;
121
121
  function setIndexConfiguration(firestore: types.FirebaseFirestore, configuration: IndexConfiguration): Promise<void>;
122
122
  function setIndexConfiguration(firestore: types.FirebaseFirestore, json: string): Promise<void>;
123
123
  function terminate(firestore: types.FirebaseFirestore): Promise<void>;
124
- function updateDoc<T>(reference: types.DocumentReference<T>, data: UpdateData<T>): Promise<void>;
125
- function updateDoc(reference: types.DocumentReference<unknown>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise<void>;
124
+ function updateDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, data: UpdateData<DbModelType>): Promise<void>;
125
+ function updateDoc<AppModelType, DbModelType extends DocumentData>(reference: types.DocumentReference<AppModelType, DbModelType>, field: string | FieldPath, value: unknown, ...moreFieldsAndValues: unknown[]): Promise<void>;
126
126
  function waitForPendingWrites(firestore: types.FirebaseFirestore): Promise<void>;
127
127
  function writeBatch(firestore: types.FirebaseFirestore): WriteBatch;
128
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/firestore-compat",
3
- "version": "0.3.12",
3
+ "version": "0.3.13-20230706224113",
4
4
  "description": "The Cloud Firestore component of the Firebase JS SDK.",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "main": "dist/index.node.cjs.js",
@@ -48,9 +48,9 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@firebase/component": "0.6.4",
51
- "@firebase/firestore": "3.13.0",
51
+ "@firebase/firestore": "4.0.0-20230706224113",
52
52
  "@firebase/util": "1.9.3",
53
- "@firebase/firestore-types": "2.5.1",
53
+ "@firebase/firestore-types": "3.0.0-20230706224113",
54
54
  "tslib": "^2.1.0"
55
55
  },
56
56
  "devDependencies": {