import { FirestoreTextSearchControllerBuilder } from "../types"; /** * Options for building the FireCMS Search Controller */ export interface FireCMSSearchControllerOptions { /** * The Firebase region where the extension is deployed. */ region: string; /** * The extension instance ID. Defaults to "firecms-search". * Use this if you installed the extension with a custom instance ID. */ extensionInstanceId?: string; /** * Custom Typesense configuration. If provided, skips fetching from extension. * Use this if you want to connect to your own Typesense instance. */ customConfig?: { host: string; port?: number; protocol?: "http" | "https"; apiKey: string; path?: string; }; /** * Override the collections to index returned by the extension. * Use this if you want to restrict search to specific collections on the client side, * regardless of what is configured in the extension. */ collections?: string[]; } /** * Creates a text search controller that uses the FireCMS Search Extension. * * This requires the `firecms-search` extension to be installed in the user's * Firebase project. The extension automatically deploys Typesense to Cloud Run * and syncs Firestore data. * * @example * ```typescript * import { buildFireCMSSearchController } from "@firecms/firebase"; * * // Using the extension (recommended) * const textSearchControllerBuilder = buildFireCMSSearchController(); * * // Or with custom Typesense instance * const textSearchControllerBuilder = buildFireCMSSearchController({ * customConfig: { * host: "your-typesense-instance.com", * apiKey: "your-api-key" * } * }); * * * ``` * * @param options - Configuration options * @returns A FirestoreTextSearchControllerBuilder * * @group Firebase */ export declare function buildFireCMSSearchController(options?: FireCMSSearchControllerOptions): FirestoreTextSearchControllerBuilder;