Skip to content

Commit

Permalink
Make index beta (#6510)
Browse files Browse the repository at this point in the history
* Make index beta

* Update API reports

* Add missing one.

* Update API reports

* Fix format

Co-authored-by: wu-hui <[email protected]>
  • Loading branch information
wu-hui and wu-hui authored Aug 6, 2022
1 parent 79df09b commit ac578e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 32 deletions.
30 changes: 0 additions & 30 deletions common/api-review/firestore.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,30 +233,6 @@ export function getFirestore(app?: FirebaseApp): Firestore;
// @public
export function increment(n: number): FieldValue;

// @public
export interface Index {
// (undocumented)
[key: string]: unknown;
readonly collectionGroup: string;
readonly fields?: IndexField[];
}

// @public
export interface IndexConfiguration {
// (undocumented)
[key: string]: unknown;
readonly indexes?: Index[];
}

// @public
export interface IndexField {
// (undocumented)
[key: string]: unknown;
readonly arrayConfig?: 'CONTAINS';
readonly fieldPath: string;
readonly order?: 'ASCENDING' | 'DESCENDING';
}

// @public
export function initializeFirestore(app: FirebaseApp, settings: FirestoreSettings): Firestore;

Expand Down Expand Up @@ -420,12 +396,6 @@ export function setDoc<T>(reference: DocumentReference<T>, data: WithFieldValue<
// @public
export function setDoc<T>(reference: DocumentReference<T>, data: PartialWithFieldValue<T>, options: SetOptions): Promise<void>;

// @public
export function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;

// @public
export function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;

// @public
export function setLogLevel(logLevel: LogLevel): void;

Expand Down
7 changes: 5 additions & 2 deletions packages/firestore/src/api/index_configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ export {
EmulatorMockTokenOptions
} from '../lite-api/database';

// TODO(indexing): Remove "@internal" from the API.

/**
* A single field element in an index configuration.
* @beta
*/
export interface IndexField {
/** The field path to index. */
Expand All @@ -63,6 +62,7 @@ export interface IndexField {

/**
* The SDK definition of a Firestore index.
* @beta
*/
export interface Index {
/** The ID of the collection to index. */
Expand All @@ -78,6 +78,7 @@ export interface Index {
*
* See {@link https://firebase.google.com/docs/reference/firestore/indexes/#json_format | JSON Format}
* for a description of the format of the index definition.
* @beta
*/
export interface IndexConfiguration {
/** A list of all Firestore indexes. */
Expand Down Expand Up @@ -106,6 +107,7 @@ export interface IndexConfiguration {
* @throws FirestoreError if the JSON format is invalid.
* @returns A `Promise` that resolves once all indices are successfully
* configured.
* @beta
*/
export function setIndexConfiguration(
firestore: Firestore,
Expand Down Expand Up @@ -136,6 +138,7 @@ export function setIndexConfiguration(
* @throws FirestoreError if the JSON format is invalid.
* @returns A `Promise` that resolves once all indices are successfully
* configured.
* @beta
*/
export function setIndexConfiguration(
firestore: Firestore,
Expand Down

0 comments on commit ac578e9

Please sign in to comment.