@firebase/firestore 3.4.14-canary.a80e29cbb → 3.4.14-canary.fcd4b8ac3
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/firestore/src/api/credentials.d.ts +13 -3
- package/dist/firestore/src/api/index_configuration.d.ts +5 -0
- package/dist/index.d.ts +1 -91
- package/dist/index.esm2017.js +1649 -1639
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm5.js +2295 -2279
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +36 -18
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +36 -18
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +1649 -1639
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +8 -0
- package/dist/lite/firestore/src/api/credentials.d.ts +13 -3
- package/dist/lite/firestore/src/api/index_configuration.d.ts +5 -0
- package/dist/lite/index.browser.esm2017.js +232 -222
- package/dist/lite/index.browser.esm2017.js.map +1 -1
- package/dist/lite/index.browser.esm5.js +485 -469
- package/dist/lite/index.browser.esm5.js.map +1 -1
- package/dist/lite/index.node.cjs.js +36 -18
- package/dist/lite/index.node.cjs.js.map +1 -1
- package/dist/lite/index.node.mjs +36 -18
- package/dist/lite/index.node.mjs.map +1 -1
- package/dist/lite/index.rn.esm2017.js +232 -222
- package/dist/lite/index.rn.esm2017.js.map +1 -1
- package/dist/lite/internal.d.ts +3 -0
- package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +23 -23
- package/dist/lite/packages/firestore/src/api/credentials.d.ts +13 -3
- package/dist/lite/packages/firestore/src/api/index_configuration.d.ts +5 -0
- package/dist/lite/private.d.ts +3 -0
- package/dist/packages/firestore/dist/index.esm2017.d.ts +50 -50
- package/dist/packages/firestore/src/api/credentials.d.ts +13 -3
- package/dist/packages/firestore/src/api/index_configuration.d.ts +5 -0
- package/dist/private.d.ts +7 -92
- package/package.json +9 -9
|
@@ -19,11 +19,13 @@ import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
|
|
|
19
19
|
import { Provider } from '@firebase/component';
|
|
20
20
|
import { User } from '../auth/user';
|
|
21
21
|
import { AsyncQueue } from '../util/async_queue';
|
|
22
|
+
export declare type AuthTokenFactory = () => string;
|
|
22
23
|
export interface FirstPartyCredentialsSettings {
|
|
23
24
|
['type']: 'gapi';
|
|
24
25
|
['client']: unknown;
|
|
25
26
|
['sessionIndex']: string;
|
|
26
27
|
['iamToken']: string | null;
|
|
28
|
+
['authTokenFactory']: AuthTokenFactory | null;
|
|
27
29
|
}
|
|
28
30
|
export interface ProviderCredentialsSettings {
|
|
29
31
|
['type']: 'provider';
|
|
@@ -146,16 +148,24 @@ interface Gapi {
|
|
|
146
148
|
};
|
|
147
149
|
}
|
|
148
150
|
export declare class FirstPartyToken implements Token {
|
|
151
|
+
private readonly gapi;
|
|
152
|
+
private readonly sessionIndex;
|
|
153
|
+
private readonly iamToken;
|
|
154
|
+
private readonly authTokenFactory;
|
|
149
155
|
type: TokenType;
|
|
150
156
|
user: User;
|
|
151
|
-
|
|
152
|
-
constructor(gapi: Gapi, sessionIndex: string, iamToken: string | null);
|
|
157
|
+
private _headers;
|
|
158
|
+
constructor(gapi: Gapi | null, sessionIndex: string, iamToken: string | null, authTokenFactory: AuthTokenFactory | null);
|
|
159
|
+
/** Gets an authorization token, using a provided factory function, or falling back to First Party GAPI. */
|
|
160
|
+
private getAuthToken;
|
|
161
|
+
get headers(): Map<string, string>;
|
|
153
162
|
}
|
|
154
163
|
export declare class FirstPartyAuthCredentialsProvider implements CredentialsProvider<User> {
|
|
155
164
|
private gapi;
|
|
156
165
|
private sessionIndex;
|
|
157
166
|
private iamToken;
|
|
158
|
-
|
|
167
|
+
private authTokenFactory;
|
|
168
|
+
constructor(gapi: Gapi | null, sessionIndex: string, iamToken: string | null, authTokenFactory: AuthTokenFactory | null);
|
|
159
169
|
getToken(): Promise<Token | null>;
|
|
160
170
|
start(asyncQueue: AsyncQueue, changeListener: CredentialChangeListener<User>): void;
|
|
161
171
|
shutdown(): void;
|
|
@@ -19,6 +19,7 @@ import { Firestore } from './database';
|
|
|
19
19
|
export { connectFirestoreEmulator, EmulatorMockTokenOptions } from '../lite-api/database';
|
|
20
20
|
/**
|
|
21
21
|
* A single field element in an index configuration.
|
|
22
|
+
* @beta
|
|
22
23
|
*/
|
|
23
24
|
export interface IndexField {
|
|
24
25
|
/** The field path to index. */
|
|
@@ -41,6 +42,7 @@ export interface IndexField {
|
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
44
|
* The SDK definition of a Firestore index.
|
|
45
|
+
* @beta
|
|
44
46
|
*/
|
|
45
47
|
export interface Index {
|
|
46
48
|
/** The ID of the collection to index. */
|
|
@@ -54,6 +56,7 @@ export interface Index {
|
|
|
54
56
|
*
|
|
55
57
|
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
56
58
|
* for a description of the format of the index definition.
|
|
59
|
+
* @beta
|
|
57
60
|
*/
|
|
58
61
|
export interface IndexConfiguration {
|
|
59
62
|
/** A list of all Firestore indexes. */
|
|
@@ -80,6 +83,7 @@ export interface IndexConfiguration {
|
|
|
80
83
|
* @throws FirestoreError if the JSON format is invalid.
|
|
81
84
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
82
85
|
* configured.
|
|
86
|
+
* @beta
|
|
83
87
|
*/
|
|
84
88
|
export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
85
89
|
/**
|
|
@@ -106,6 +110,7 @@ export declare function setIndexConfiguration(firestore: Firestore, configuratio
|
|
|
106
110
|
* @throws FirestoreError if the JSON format is invalid.
|
|
107
111
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
108
112
|
* configured.
|
|
113
|
+
* @beta
|
|
109
114
|
*/
|
|
110
115
|
export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
111
116
|
export declare function parseIndexes(jsonOrConfiguration: string | IndexConfiguration): FieldIndex[];
|
package/dist/index.d.ts
CHANGED
|
@@ -929,49 +929,6 @@ export declare function getFirestore(app?: FirebaseApp): Firestore;
|
|
|
929
929
|
* `updateDoc()`
|
|
930
930
|
*/
|
|
931
931
|
export declare function increment(n: number): FieldValue;
|
|
932
|
-
/**
|
|
933
|
-
* The SDK definition of a Firestore index.
|
|
934
|
-
*/
|
|
935
|
-
export declare interface Index {
|
|
936
|
-
/** The ID of the collection to index. */
|
|
937
|
-
readonly collectionGroup: string;
|
|
938
|
-
/** A list of fields to index. */
|
|
939
|
-
readonly fields?: IndexField[];
|
|
940
|
-
[key: string]: unknown;
|
|
941
|
-
}
|
|
942
|
-
/**
|
|
943
|
-
* A list of Firestore indexes to speed up local query execution.
|
|
944
|
-
*
|
|
945
|
-
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
946
|
-
* for a description of the format of the index definition.
|
|
947
|
-
*/
|
|
948
|
-
export declare interface IndexConfiguration {
|
|
949
|
-
/** A list of all Firestore indexes. */
|
|
950
|
-
readonly indexes?: Index[];
|
|
951
|
-
[key: string]: unknown;
|
|
952
|
-
}
|
|
953
|
-
/**
|
|
954
|
-
* A single field element in an index configuration.
|
|
955
|
-
*/
|
|
956
|
-
export declare interface IndexField {
|
|
957
|
-
/** The field path to index. */
|
|
958
|
-
readonly fieldPath: string;
|
|
959
|
-
/**
|
|
960
|
-
* What type of array index to create. Set to `CONTAINS` for `array-contains`
|
|
961
|
-
* and `array-contains-any` indexes.
|
|
962
|
-
*
|
|
963
|
-
* Only one of `arrayConfig` or `order` should be set;
|
|
964
|
-
*/
|
|
965
|
-
readonly arrayConfig?: 'CONTAINS';
|
|
966
|
-
/**
|
|
967
|
-
* What type of array index to create. Set to `ASCENDING` or 'DESCENDING` for
|
|
968
|
-
* `==`, `!=`, `<=`, `<=`, `in` and `not-in` filters.
|
|
969
|
-
*
|
|
970
|
-
* Only one of `arrayConfig` or `order` should be set.
|
|
971
|
-
*/
|
|
972
|
-
readonly order?: 'ASCENDING' | 'DESCENDING';
|
|
973
|
-
[key: string]: unknown;
|
|
974
|
-
}
|
|
975
932
|
/**
|
|
976
933
|
* Initializes a new instance of {@link Firestore} with the provided settings.
|
|
977
934
|
* Can only be called before any other function, including
|
|
@@ -1514,54 +1471,7 @@ export declare function setDoc<T>(reference: DocumentReference<T>, data: WithFie
|
|
|
1514
1471
|
* to the backend (note that it won't resolve while you're offline).
|
|
1515
1472
|
*/
|
|
1516
1473
|
export declare function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
|
|
1517
|
-
|
|
1518
|
-
* Configures indexing for local query execution. Any previous index
|
|
1519
|
-
* configuration is overridden. The `Promise` resolves once the index
|
|
1520
|
-
* configuration has been persisted.
|
|
1521
|
-
*
|
|
1522
|
-
* The index entries themselves are created asynchronously. You can continue to
|
|
1523
|
-
* use queries that require indexing even if the indices are not yet available.
|
|
1524
|
-
* Query execution will automatically start using the index once the index
|
|
1525
|
-
* entries have been written.
|
|
1526
|
-
*
|
|
1527
|
-
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
1528
|
-
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
1529
|
-
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
1530
|
-
* index configuration is ignored.
|
|
1531
|
-
*
|
|
1532
|
-
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
1533
|
-
* @param configuration -The index definition.
|
|
1534
|
-
* @throws FirestoreError if the JSON format is invalid.
|
|
1535
|
-
* @returns A `Promise` that resolves once all indices are successfully
|
|
1536
|
-
* configured.
|
|
1537
|
-
*/
|
|
1538
|
-
export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
1539
|
-
/**
|
|
1540
|
-
* Configures indexing for local query execution. Any previous index
|
|
1541
|
-
* configuration is overridden. The `Promise` resolves once the index
|
|
1542
|
-
* configuration has been persisted.
|
|
1543
|
-
*
|
|
1544
|
-
* The index entries themselves are created asynchronously. You can continue to
|
|
1545
|
-
* use queries that require indexing even if the indices are not yet available.
|
|
1546
|
-
* Query execution will automatically start using the index once the index
|
|
1547
|
-
* entries have been written.
|
|
1548
|
-
*
|
|
1549
|
-
* Indexes are only supported with IndexedDb persistence. Invoke either
|
|
1550
|
-
* `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
|
|
1551
|
-
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
1552
|
-
* index configuration is ignored.
|
|
1553
|
-
*
|
|
1554
|
-
* The method accepts the JSON format exported by the Firebase CLI (`firebase
|
|
1555
|
-
* firestore:indexes`). If the JSON format is invalid, this method throws an
|
|
1556
|
-
* error.
|
|
1557
|
-
*
|
|
1558
|
-
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
1559
|
-
* @param json -The JSON format exported by the Firebase CLI.
|
|
1560
|
-
* @throws FirestoreError if the JSON format is invalid.
|
|
1561
|
-
* @returns A `Promise` that resolves once all indices are successfully
|
|
1562
|
-
* configured.
|
|
1563
|
-
*/
|
|
1564
|
-
export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
1474
|
+
/* Excluded from this release type: setIndexConfiguration */
|
|
1565
1475
|
/**
|
|
1566
1476
|
* Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
|
|
1567
1477
|
*
|