/** * Copyright 2024 Google LLC. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import * as protos from '../../protos/firestore_v1_proto_api'; import api = protos.google.firestore.v1; import * as firestore from '@google-cloud/firestore'; import { ResourcePath } from '../path'; import { FilterInternal } from './filter-internal'; import { FieldOrder } from './field-order'; import { LimitType, QueryCursor } from './types'; /** * Internal class representing custom Query options. * * These options are immutable. Modified options can be created using `with()`. * @private * @internal */ export declare class QueryOptions { readonly parentPath: ResourcePath; readonly collectionId: string; readonly converter: firestore.FirestoreDataConverter; readonly allDescendants: boolean; readonly filters: FilterInternal[]; readonly fieldOrders: FieldOrder[]; readonly startAt?: QueryCursor | undefined; readonly endAt?: QueryCursor | undefined; readonly limit?: number | undefined; readonly limitType?: LimitType | undefined; readonly offset?: number | undefined; readonly projection?: api.StructuredQuery.IProjection | undefined; readonly kindless: boolean; readonly requireConsistency: boolean; constructor(parentPath: ResourcePath, collectionId: string, converter: firestore.FirestoreDataConverter, allDescendants: boolean, filters: FilterInternal[], fieldOrders: FieldOrder[], startAt?: QueryCursor | undefined, endAt?: QueryCursor | undefined, limit?: number | undefined, limitType?: LimitType | undefined, offset?: number | undefined, projection?: api.StructuredQuery.IProjection | undefined, kindless?: boolean, requireConsistency?: boolean); /** * Returns query options for a collection group query. * @private * @internal */ static forCollectionGroupQuery(collectionId: string, converter?: firestore.FirestoreDataConverter): QueryOptions; /** * Returns query options for a single-collection query. * @private * @internal */ static forCollectionQuery(collectionRef: ResourcePath, converter?: firestore.FirestoreDataConverter): QueryOptions; /** * Returns query options for a query that fetches all descendants under the * specified reference. * * @private * @internal */ static forKindlessAllDescendants(parent: ResourcePath, id: string, requireConsistency?: boolean): QueryOptions; /** * Returns the union of the current and the provided options. * @private * @internal */ with(settings: Partial, 'converter'>>): QueryOptions; withConverter(converter: firestore.FirestoreDataConverter): QueryOptions; hasFieldOrders(): boolean; isEqual(other: QueryOptions): boolean; private filtersEqual; }