@firebase/firestore 3.4.13-canary.f5426a512 → 3.4.14-canary.2b2079d86
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/CHANGELOG.md +8 -0
- package/dist/firestore/src/api/credentials.d.ts +13 -3
- package/dist/firestore/src/api/index_configuration.d.ts +5 -8
- package/dist/firestore/src/api.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm2017.js +1650 -1640
- 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 +37 -19
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +37 -19
- package/dist/index.node.mjs.map +1 -1
- package/dist/index.rn.js +1650 -1640
- package/dist/index.rn.js.map +1 -1
- package/dist/internal.d.ts +13 -13
- package/dist/lite/firestore/src/api/credentials.d.ts +13 -3
- package/dist/lite/firestore/src/api/index_configuration.d.ts +5 -8
- package/dist/lite/firestore/src/api.d.ts +1 -1
- 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 -8
- package/dist/lite/packages/firestore/src/api.d.ts +1 -1
- package/dist/lite/private.d.ts +3 -0
- package/dist/packages/firestore/dist/index.esm2017.d.ts +67 -67
- package/dist/packages/firestore/src/api/credentials.d.ts +13 -3
- package/dist/packages/firestore/src/api/index_configuration.d.ts +5 -8
- package/dist/packages/firestore/src/api.d.ts +1 -1
- package/dist/private.d.ts +4 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @firebase/firestore
|
|
2
2
|
|
|
3
|
+
## 3.4.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f5426a512`](https://github.com/firebase/firebase-js-sdk/commit/f5426a51275bb611a5d9a6df3200d0fe5095afa2) [#6403](https://github.com/firebase/firebase-js-sdk/pull/6403) - Add internal implementation of setIndexConfiguration
|
|
8
|
+
|
|
9
|
+
* [`10765511f`](https://github.com/firebase/firebase-js-sdk/commit/10765511f7ba33293f7a15af1f98d69a261c019d) [#6496](https://github.com/firebase/firebase-js-sdk/pull/6496) - Expose client side indexing feature with `setIndexConfiguration`.
|
|
10
|
+
|
|
3
11
|
## 3.4.13
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -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,8 +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
|
-
*
|
|
23
|
-
* @internal
|
|
22
|
+
* @beta
|
|
24
23
|
*/
|
|
25
24
|
export interface IndexField {
|
|
26
25
|
/** The field path to index. */
|
|
@@ -43,8 +42,7 @@ export interface IndexField {
|
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
45
44
|
* The SDK definition of a Firestore index.
|
|
46
|
-
*
|
|
47
|
-
* @internal
|
|
45
|
+
* @beta
|
|
48
46
|
*/
|
|
49
47
|
export interface Index {
|
|
50
48
|
/** The ID of the collection to index. */
|
|
@@ -58,8 +56,7 @@ export interface Index {
|
|
|
58
56
|
*
|
|
59
57
|
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
|
|
60
58
|
* for a description of the format of the index definition.
|
|
61
|
-
*
|
|
62
|
-
* @internal
|
|
59
|
+
* @beta
|
|
63
60
|
*/
|
|
64
61
|
export interface IndexConfiguration {
|
|
65
62
|
/** A list of all Firestore indexes. */
|
|
@@ -81,12 +78,12 @@ export interface IndexConfiguration {
|
|
|
81
78
|
* before setting an index configuration. If IndexedDb is not enabled, any
|
|
82
79
|
* index configuration is ignored.
|
|
83
80
|
*
|
|
84
|
-
* @internal
|
|
85
81
|
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
86
82
|
* @param configuration -The index definition.
|
|
87
83
|
* @throws FirestoreError if the JSON format is invalid.
|
|
88
84
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
89
85
|
* configured.
|
|
86
|
+
* @beta
|
|
90
87
|
*/
|
|
91
88
|
export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
|
|
92
89
|
/**
|
|
@@ -108,12 +105,12 @@ export declare function setIndexConfiguration(firestore: Firestore, configuratio
|
|
|
108
105
|
* firestore:indexes`). If the JSON format is invalid, this method throws an
|
|
109
106
|
* error.
|
|
110
107
|
*
|
|
111
|
-
* @internal
|
|
112
108
|
* @param firestore - The {@link Firestore} instance to configure indexes for.
|
|
113
109
|
* @param json -The JSON format exported by the Firebase CLI.
|
|
114
110
|
* @throws FirestoreError if the JSON format is invalid.
|
|
115
111
|
* @returns A `Promise` that resolves once all indices are successfully
|
|
116
112
|
* configured.
|
|
113
|
+
* @beta
|
|
117
114
|
*/
|
|
118
115
|
export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
|
|
119
116
|
export declare function parseIndexes(jsonOrConfiguration: string | IndexConfiguration): FieldIndex[];
|
|
@@ -36,6 +36,7 @@ export { CACHE_SIZE_UNLIMITED } from './api/database';
|
|
|
36
36
|
export { FirestoreErrorCode, FirestoreError } from './util/error';
|
|
37
37
|
export { AbstractUserDataWriter } from './lite-api/user_data_writer';
|
|
38
38
|
export { Primitive, NestedUpdateFields, ChildUpdateFields, AddPrefixToKeys, UnionToIntersection } from '../src/lite-api/types';
|
|
39
|
+
export { setIndexConfiguration, Index, IndexConfiguration, IndexField } from './api/index_configuration';
|
|
39
40
|
/**
|
|
40
41
|
* Internal exports
|
|
41
42
|
*/
|
|
@@ -50,4 +51,3 @@ export type { ByteString as _ByteString } from './util/byte_string';
|
|
|
50
51
|
export { logWarn as _logWarn } from './util/log';
|
|
51
52
|
export { EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider } from './api/credentials';
|
|
52
53
|
export { EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider } from './api/credentials';
|
|
53
|
-
export { setIndexConfiguration as _setIndexConfiguration } from './api/index_configuration';
|
package/dist/index.d.ts
CHANGED
|
@@ -1471,7 +1471,7 @@ export declare function setDoc<T>(reference: DocumentReference<T>, data: WithFie
|
|
|
1471
1471
|
* to the backend (note that it won't resolve while you're offline).
|
|
1472
1472
|
*/
|
|
1473
1473
|
export declare function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
|
|
1474
|
-
/* Excluded from this release type:
|
|
1474
|
+
/* Excluded from this release type: setIndexConfiguration */
|
|
1475
1475
|
/**
|
|
1476
1476
|
* Sets the verbosity of Cloud Firestore logs (debug, error, or silent).
|
|
1477
1477
|
*
|