Skip to content

Make index beta #6510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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