@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.
Files changed (36) hide show
  1. package/dist/firestore/src/api/credentials.d.ts +13 -3
  2. package/dist/firestore/src/api/index_configuration.d.ts +5 -0
  3. package/dist/index.d.ts +1 -91
  4. package/dist/index.esm2017.js +1649 -1639
  5. package/dist/index.esm2017.js.map +1 -1
  6. package/dist/index.esm5.js +2295 -2279
  7. package/dist/index.esm5.js.map +1 -1
  8. package/dist/index.node.cjs.js +36 -18
  9. package/dist/index.node.cjs.js.map +1 -1
  10. package/dist/index.node.mjs +36 -18
  11. package/dist/index.node.mjs.map +1 -1
  12. package/dist/index.rn.js +1649 -1639
  13. package/dist/index.rn.js.map +1 -1
  14. package/dist/internal.d.ts +8 -0
  15. package/dist/lite/firestore/src/api/credentials.d.ts +13 -3
  16. package/dist/lite/firestore/src/api/index_configuration.d.ts +5 -0
  17. package/dist/lite/index.browser.esm2017.js +232 -222
  18. package/dist/lite/index.browser.esm2017.js.map +1 -1
  19. package/dist/lite/index.browser.esm5.js +485 -469
  20. package/dist/lite/index.browser.esm5.js.map +1 -1
  21. package/dist/lite/index.node.cjs.js +36 -18
  22. package/dist/lite/index.node.cjs.js.map +1 -1
  23. package/dist/lite/index.node.mjs +36 -18
  24. package/dist/lite/index.node.mjs.map +1 -1
  25. package/dist/lite/index.rn.esm2017.js +232 -222
  26. package/dist/lite/index.rn.esm2017.js.map +1 -1
  27. package/dist/lite/internal.d.ts +3 -0
  28. package/dist/lite/packages/firestore/dist/lite/index.browser.esm2017.d.ts +23 -23
  29. package/dist/lite/packages/firestore/src/api/credentials.d.ts +13 -3
  30. package/dist/lite/packages/firestore/src/api/index_configuration.d.ts +5 -0
  31. package/dist/lite/private.d.ts +3 -0
  32. package/dist/packages/firestore/dist/index.esm2017.d.ts +50 -50
  33. package/dist/packages/firestore/src/api/credentials.d.ts +13 -3
  34. package/dist/packages/firestore/src/api/index_configuration.d.ts +5 -0
  35. package/dist/private.d.ts +7 -92
  36. package/package.json +9 -9
@@ -140,6 +140,8 @@ declare interface AsyncQueue {
140
140
  verifyOperationInProgress(): void;
141
141
  }
142
142
 
143
+ declare type AuthTokenFactory = () => string;
144
+
143
145
  /**
144
146
  * Path represents an ordered sequence of string segments.
145
147
  */
@@ -1460,6 +1462,7 @@ declare interface FirstPartyCredentialsSettings {
1460
1462
  ['client']: unknown;
1461
1463
  ['sessionIndex']: string;
1462
1464
  ['iamToken']: string | null;
1465
+ ['authTokenFactory']: AuthTokenFactory | null;
1463
1466
  }
1464
1467
 
1465
1468
  /**
@@ -978,18 +978,18 @@ import { FirebaseError as c } from "@firebase/util/dist/src/errors";
978
978
  constructor(t: any, e: any, n: any);
979
979
  databaseId: any;
980
980
  ignoreUndefinedProperties: any;
981
- q: any;
982
- /** Creates a new top-level parse context. */ ht(t: any, e: any, n: any, r?: boolean): $n;
981
+ C: any;
982
+ /** Creates a new top-level parse context. */ dt(t: any, e: any, n: any, r?: boolean): $n;
983
983
  }
984
984
  declare class Ln extends An {
985
985
  constructor(t: any, e: any);
986
- lt: any;
986
+ wt: any;
987
987
  _toFieldTransform(t: any): Ae;
988
988
  isEqual(t: any): boolean;
989
989
  }
990
990
  declare class Cn extends An {
991
991
  constructor(t: any, e: any);
992
- lt: any;
992
+ wt: any;
993
993
  _toFieldTransform(t: any): Ae;
994
994
  isEqual(t: any): boolean;
995
995
  }
@@ -1000,27 +1000,27 @@ declare class qn extends An {
1000
1000
  declare class pr extends sr {
1001
1001
  constructor(t: any, e: any, n: any);
1002
1002
  type: any;
1003
- bt: any;
1004
- Et: any;
1003
+ It: any;
1004
+ At: any;
1005
1005
  _apply(t: any): mn;
1006
1006
  }
1007
1007
  declare class Mn extends An {
1008
1008
  constructor(t: any, e: any);
1009
- ft: any;
1009
+ yt: any;
1010
1010
  _toFieldTransform(t: any): Ae;
1011
1011
  isEqual(t: any): boolean;
1012
1012
  }
1013
1013
  declare class hr extends sr {
1014
1014
  constructor(t: any, e: any, n: any);
1015
1015
  type: any;
1016
- gt: any;
1017
- vt: any;
1016
+ Et: any;
1017
+ Tt: any;
1018
1018
  _apply(t: any): mn;
1019
1019
  }
1020
1020
  declare class cr extends sr {
1021
1021
  constructor(t: any, e: any);
1022
- dt: any;
1023
1022
  _t: any;
1023
+ bt: any;
1024
1024
  type: string;
1025
1025
  _apply(t: any): mn;
1026
1026
  }
@@ -1031,15 +1031,15 @@ declare class kn extends An {
1031
1031
  declare class dr extends sr {
1032
1032
  constructor(t: any, e: any, n: any);
1033
1033
  type: any;
1034
- bt: any;
1035
- Et: any;
1034
+ It: any;
1035
+ At: any;
1036
1036
  _apply(t: any): mn;
1037
1037
  }
1038
1038
  declare class or extends sr {
1039
1039
  constructor(t: any, e: any, n: any);
1040
- dt: any;
1041
- wt: any;
1042
- yt: any;
1040
+ _t: any;
1041
+ gt: any;
1042
+ vt: any;
1043
1043
  type: string;
1044
1044
  _apply(t: any): mn;
1045
1045
  }
@@ -1105,20 +1105,20 @@ declare class J {
1105
1105
  constructor(t: any, e: any, n: any, r: any, s: any, i: any);
1106
1106
  settings: any;
1107
1107
  databaseId: any;
1108
- q: any;
1108
+ C: any;
1109
1109
  ignoreUndefinedProperties: any;
1110
1110
  fieldTransforms: any;
1111
1111
  fieldMask: any;
1112
1112
  get path(): any;
1113
- get tt(): any;
1114
- /** Returns a new context with the specified settings overwritten. */ et(t: any): $n;
1115
- nt(t: any): $n;
1113
+ get rt(): any;
1114
+ /** Returns a new context with the specified settings overwritten. */ st(t: any): $n;
1116
1115
  it(t: any): $n;
1117
- ot(t: any): $n;
1118
- ut(t: any): L;
1116
+ ct(t: any): $n;
1117
+ at(t: any): $n;
1118
+ ht(t: any): L;
1119
1119
  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ contains(t: any): boolean;
1120
- Z(): void;
1121
- st(t: any): void;
1120
+ nt(): void;
1121
+ ut(t: any): void;
1122
1122
  }
1123
1123
  /**
1124
1124
  * @license
@@ -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
- headers: Map<any, any>;
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
- constructor(gapi: Gapi, sessionIndex: string, iamToken: string | null);
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[];
@@ -123,6 +123,8 @@ declare interface AsyncQueue {
123
123
  verifyOperationInProgress(): void;
124
124
  }
125
125
 
126
+ declare type AuthTokenFactory = () => string;
127
+
126
128
  /**
127
129
  * Path represents an ordered sequence of string segments.
128
130
  */
@@ -1337,6 +1339,7 @@ declare interface FirstPartyCredentialsSettings {
1337
1339
  ['client']: unknown;
1338
1340
  ['sessionIndex']: string;
1339
1341
  ['iamToken']: string | null;
1342
+ ['authTokenFactory']: AuthTokenFactory | null;
1340
1343
  }
1341
1344
 
1342
1345
  /**
@@ -1420,16 +1420,16 @@ declare function Tl(t: any, e: any, n: any, ...s: any[]): Promise<any>;
1420
1420
  * See the License for the specific language governing permissions and
1421
1421
  * limitations under the License.
1422
1422
  */ declare class Ma {
1423
- Mc: Promise<void>;
1424
- Oc: any[];
1425
- Fc: boolean;
1426
- $c: any[];
1427
- Bc: any;
1423
+ $c: Promise<void>;
1424
+ Bc: any[];
1428
1425
  Lc: boolean;
1429
- Uc: boolean;
1430
- qc: any[];
1431
- So: ru;
1432
- Kc: () => void;
1426
+ Uc: any[];
1427
+ qc: any;
1428
+ Kc: boolean;
1429
+ Gc: boolean;
1430
+ Qc: any[];
1431
+ xo: ru;
1432
+ jc: () => void;
1433
1433
  get isShuttingDown(): boolean;
1434
1434
  /**
1435
1435
  * Adds a new operation to the queue without waiting for it to complete (i.e.
@@ -1442,30 +1442,30 @@ declare function Tl(t: any, e: any, n: any, ...s: any[]): Promise<any>;
1442
1442
  /**
1443
1443
  * Runs the next operation from the retryable queue. If the operation fails,
1444
1444
  * reschedules with backoff.
1445
- */ jc(): Promise<void>;
1446
- Qc(t: any): Promise<any>;
1445
+ */ Hc(): Promise<void>;
1446
+ zc(t: any): Promise<any>;
1447
1447
  enqueueAfterDelay(t: any, e: any, n: any): Lu;
1448
- Gc(): void;
1448
+ Wc(): void;
1449
1449
  verifyOperationInProgress(): void;
1450
1450
  /**
1451
1451
  * Waits until all currently queued tasks are finished executing. Delayed
1452
1452
  * operations are not run.
1453
- */ zc(): Promise<void>;
1453
+ */ Yc(): Promise<void>;
1454
1454
  /**
1455
1455
  * For Tests: Determine if a delayed operation with a particular TimerId
1456
1456
  * exists.
1457
- */ Hc(t: any): boolean;
1457
+ */ Xc(t: any): boolean;
1458
1458
  /**
1459
1459
  * For Tests: Runs some or all delayed operations early.
1460
1460
  *
1461
1461
  * @param lastTimerId - Delayed operations up to and including this TimerId
1462
1462
  * will be drained. Pass TimerId.All to run all delayed operations.
1463
1463
  * @returns a Promise that resolves once all operations have been run.
1464
- */ Jc(t: any): Promise<void>;
1464
+ */ Zc(t: any): Promise<void>;
1465
1465
  /**
1466
1466
  * For Tests: Skip all subsequent delays for a timer id.
1467
- */ Yc(t: any): void;
1468
- /** Called once a DelayedOperation is run or canceled. */ Wc(t: any): void;
1467
+ */ ta(t: any): void;
1468
+ /** Called once a DelayedOperation is run or canceled. */ Jc(t: any): void;
1469
1469
  }
1470
1470
  import { FirebaseError as c } from "@firebase/util/dist/src/errors";
1471
1471
  /**
@@ -1495,8 +1495,8 @@ import { FirebaseError as c } from "@firebase/util/dist/src/errors";
1495
1495
  constructor(t: any, e: any, n: any);
1496
1496
  databaseId: any;
1497
1497
  ignoreUndefinedProperties: any;
1498
- wt: any;
1499
- /** Creates a new top-level parse context. */ aa(t: any, e: any, n: any, s?: boolean): hh;
1498
+ It: any;
1499
+ /** Creates a new top-level parse context. */ fa(t: any, e: any, n: any, s?: boolean): hh;
1500
1500
  }
1501
1501
  declare class Z {
1502
1502
  constructor(t: any);
@@ -1546,13 +1546,13 @@ declare class at {
1546
1546
  }
1547
1547
  declare class yh extends ih {
1548
1548
  constructor(t: any, e: any);
1549
- ha: any;
1549
+ da: any;
1550
1550
  _toFieldTransform(t: any): Fn;
1551
1551
  isEqual(t: any): boolean;
1552
1552
  }
1553
1553
  declare class gh extends ih {
1554
1554
  constructor(t: any, e: any);
1555
- ha: any;
1555
+ da: any;
1556
1556
  _toFieldTransform(t: any): Fn;
1557
1557
  isEqual(t: any): boolean;
1558
1558
  }
@@ -1563,27 +1563,27 @@ declare class _h extends ih {
1563
1563
  declare class tl extends qh {
1564
1564
  constructor(t: any, e: any, n: any);
1565
1565
  type: any;
1566
- ya: any;
1567
- pa: any;
1566
+ Ta: any;
1567
+ Ea: any;
1568
1568
  _apply(t: any): Va;
1569
1569
  }
1570
1570
  declare class ph extends ih {
1571
1571
  constructor(t: any, e: any);
1572
- la: any;
1572
+ _a: any;
1573
1573
  _toFieldTransform(t: any): Fn;
1574
1574
  isEqual(t: any): boolean;
1575
1575
  }
1576
1576
  declare class zh extends qh {
1577
1577
  constructor(t: any, e: any, n: any);
1578
1578
  type: any;
1579
- ma: any;
1580
- ga: any;
1579
+ pa: any;
1580
+ Ia: any;
1581
1581
  _apply(t: any): Va;
1582
1582
  }
1583
1583
  declare class jh extends qh {
1584
1584
  constructor(t: any, e: any);
1585
- fa: any;
1586
1585
  wa: any;
1586
+ ya: any;
1587
1587
  type: string;
1588
1588
  _apply(t: any): Va;
1589
1589
  }
@@ -1594,15 +1594,15 @@ declare class mh extends ih {
1594
1594
  declare class Yh extends qh {
1595
1595
  constructor(t: any, e: any, n: any);
1596
1596
  type: any;
1597
- ya: any;
1598
- pa: any;
1597
+ Ta: any;
1598
+ Ea: any;
1599
1599
  _apply(t: any): Va;
1600
1600
  }
1601
1601
  declare class Gh extends qh {
1602
1602
  constructor(t: any, e: any, n: any);
1603
- fa: any;
1604
- da: any;
1605
- _a: any;
1603
+ wa: any;
1604
+ ma: any;
1605
+ ga: any;
1606
1606
  type: string;
1607
1607
  _apply(t: any): Va;
1608
1608
  }
@@ -1653,15 +1653,15 @@ declare class Ra {
1653
1653
  */
1654
1654
  declare class ru {
1655
1655
  constructor(t: any, e: any, n?: number, s?: number, i?: number);
1656
- js: any;
1656
+ Hs: any;
1657
1657
  timerId: any;
1658
- lo: number;
1659
- fo: number;
1660
- _o: number;
1661
1658
  wo: number;
1662
- mo: any;
1663
- /** The last backoff attempt, as epoch milliseconds. */
1659
+ mo: number;
1664
1660
  yo: number;
1661
+ po: number;
1662
+ Io: any;
1663
+ /** The last backoff attempt, as epoch milliseconds. */
1664
+ To: number;
1665
1665
  /**
1666
1666
  * Resets the backoff delay.
1667
1667
  *
@@ -1672,15 +1672,15 @@ declare class ru {
1672
1672
  /**
1673
1673
  * Resets the backoff delay to the maximum delay (e.g. for use after a
1674
1674
  * RESOURCE_EXHAUSTED error).
1675
- */ po(): void;
1675
+ */ Eo(): void;
1676
1676
  /**
1677
1677
  * Returns a promise that resolves after currentDelayMs, and increases the
1678
1678
  * delay for any subsequent attempts. If there was a pending backoff operation
1679
1679
  * already, it will be canceled.
1680
- */ Io(t: any): void;
1681
- Eo(): void;
1680
+ */ Ao(t: any): void;
1681
+ bo(): void;
1682
1682
  cancel(): void;
1683
- /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */ To(): number;
1683
+ /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */ Ro(): number;
1684
1684
  }
1685
1685
  /**
1686
1686
  * @license
@@ -1773,20 +1773,20 @@ declare class Lu {
1773
1773
  constructor(t: any, e: any, n: any, s: any, i: any, r: any);
1774
1774
  settings: any;
1775
1775
  databaseId: any;
1776
- wt: any;
1776
+ It: any;
1777
1777
  ignoreUndefinedProperties: any;
1778
1778
  fieldTransforms: any;
1779
1779
  fieldMask: any;
1780
1780
  get path(): any;
1781
- get Zc(): any;
1782
- /** Returns a new context with the specified settings overwritten. */ ta(t: any): hh;
1783
- ea(t: any): hh;
1781
+ get na(): any;
1782
+ /** Returns a new context with the specified settings overwritten. */ sa(t: any): hh;
1784
1783
  ia(t: any): hh;
1785
- ra(t: any): hh;
1786
- oa(t: any): Q;
1784
+ ua(t: any): hh;
1785
+ ca(t: any): hh;
1786
+ aa(t: any): Q;
1787
1787
  /** Returns 'true' if 'fieldPath' was traversed when creating this context. */ contains(t: any): boolean;
1788
- Xc(): void;
1789
- sa(t: any): void;
1788
+ ea(): void;
1789
+ oa(t: any): void;
1790
1790
  }
1791
1791
  /**
1792
1792
  * @license
@@ -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
- headers: Map<any, any>;
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
- constructor(gapi: Gapi, sessionIndex: string, iamToken: string | null);
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/private.d.ts CHANGED
@@ -121,6 +121,8 @@ declare interface AsyncQueue {
121
121
  verifyOperationInProgress(): void;
122
122
  }
123
123
 
124
+ declare type AuthTokenFactory = () => string;
125
+
124
126
  /**
125
127
  * Path represents an ordered sequence of string segments.
126
128
  */
@@ -2065,6 +2067,7 @@ declare interface FirstPartyCredentialsSettings {
2065
2067
  ['client']: unknown;
2066
2068
  ['sessionIndex']: string;
2067
2069
  ['iamToken']: string | null;
2070
+ ['authTokenFactory']: AuthTokenFactory | null;
2068
2071
  }
2069
2072
 
2070
2073
  /**
@@ -2237,51 +2240,11 @@ export declare function getFirestore(app?: FirebaseApp): Firestore;
2237
2240
  */
2238
2241
  export declare function increment(n: number): FieldValue;
2239
2242
 
2240
- /**
2241
- * The SDK definition of a Firestore index.
2242
- */
2243
- export declare interface Index {
2244
- /** The ID of the collection to index. */
2245
- readonly collectionGroup: string;
2246
- /** A list of fields to index. */
2247
- readonly fields?: IndexField[];
2248
- [key: string]: unknown;
2249
- }
2243
+ /* Excluded from this release type: Index */
2250
2244
 
2251
- /**
2252
- * A list of Firestore indexes to speed up local query execution.
2253
- *
2254
- * See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
2255
- * for a description of the format of the index definition.
2256
- */
2257
- export declare interface IndexConfiguration {
2258
- /** A list of all Firestore indexes. */
2259
- readonly indexes?: Index[];
2260
- [key: string]: unknown;
2261
- }
2245
+ /* Excluded from this release type: IndexConfiguration */
2262
2246
 
2263
- /**
2264
- * A single field element in an index configuration.
2265
- */
2266
- export declare interface IndexField {
2267
- /** The field path to index. */
2268
- readonly fieldPath: string;
2269
- /**
2270
- * What type of array index to create. Set to `CONTAINS` for `array-contains`
2271
- * and `array-contains-any` indexes.
2272
- *
2273
- * Only one of `arrayConfig` or `order` should be set;
2274
- */
2275
- readonly arrayConfig?: 'CONTAINS';
2276
- /**
2277
- * What type of array index to create. Set to `ASCENDING` or 'DESCENDING` for
2278
- * `==`, `!=`, `<=`, `<=`, `in` and `not-in` filters.
2279
- *
2280
- * Only one of `arrayConfig` or `order` should be set.
2281
- */
2282
- readonly order?: 'ASCENDING' | 'DESCENDING';
2283
- [key: string]: unknown;
2284
- }
2247
+ /* Excluded from this release type: IndexField */
2285
2248
 
2286
2249
  declare type IndexFieldMode = 'MODE_UNSPECIFIED' | 'ASCENDING' | 'DESCENDING';
2287
2250
 
@@ -4525,55 +4488,7 @@ export declare function setDoc<T>(reference: DocumentReference<T>, data: WithFie
4525
4488
  */
4526
4489
  export declare function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;
4527
4490
 
4528
- /**
4529
- * Configures indexing for local query execution. Any previous index
4530
- * configuration is overridden. The `Promise` resolves once the index
4531
- * configuration has been persisted.
4532
- *
4533
- * The index entries themselves are created asynchronously. You can continue to
4534
- * use queries that require indexing even if the indices are not yet available.
4535
- * Query execution will automatically start using the index once the index
4536
- * entries have been written.
4537
- *
4538
- * Indexes are only supported with IndexedDb persistence. Invoke either
4539
- * `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
4540
- * before setting an index configuration. If IndexedDb is not enabled, any
4541
- * index configuration is ignored.
4542
- *
4543
- * @param firestore - The {@link Firestore} instance to configure indexes for.
4544
- * @param configuration -The index definition.
4545
- * @throws FirestoreError if the JSON format is invalid.
4546
- * @returns A `Promise` that resolves once all indices are successfully
4547
- * configured.
4548
- */
4549
- export declare function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
4550
-
4551
- /**
4552
- * Configures indexing for local query execution. Any previous index
4553
- * configuration is overridden. The `Promise` resolves once the index
4554
- * configuration has been persisted.
4555
- *
4556
- * The index entries themselves are created asynchronously. You can continue to
4557
- * use queries that require indexing even if the indices are not yet available.
4558
- * Query execution will automatically start using the index once the index
4559
- * entries have been written.
4560
- *
4561
- * Indexes are only supported with IndexedDb persistence. Invoke either
4562
- * `enableIndexedDbPersistence()` or `enableMultiTabIndexedDbPersistence()`
4563
- * before setting an index configuration. If IndexedDb is not enabled, any
4564
- * index configuration is ignored.
4565
- *
4566
- * The method accepts the JSON format exported by the Firebase CLI (`firebase
4567
- * firestore:indexes`). If the JSON format is invalid, this method throws an
4568
- * error.
4569
- *
4570
- * @param firestore - The {@link Firestore} instance to configure indexes for.
4571
- * @param json -The JSON format exported by the Firebase CLI.
4572
- * @throws FirestoreError if the JSON format is invalid.
4573
- * @returns A `Promise` that resolves once all indices are successfully
4574
- * configured.
4575
- */
4576
- export declare function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
4491
+ /* Excluded from this release type: setIndexConfiguration */
4577
4492
 
4578
4493
  /**
4579
4494
  * Sets the verbosity of Cloud Firestore logs (debug, error, or silent).