import { type AstNode } from './util'; /** * JSDoc marker tag that every CRUD params interface should carry so the dbx-components manifest * extractor (`packages/dbx-cli/manifest-extract/src/lib/extract-crud.ts`) records it as an * intentionally-exposed API params type rather than an untagged one. */ export declare const DBX_MODEL_API_PARAMS_MARKER = "dbxModelApiParams"; /** * Suffix on the type alias that declares a model-group CRUD function config (e.g. * `GuestbookModelCrudFunctionsConfig`). Its referenced params interfaces are the ones the marker * tag is required on. */ export declare const DEFAULT_CRUD_FUNCTIONS_CONFIG_SUFFIX = "ModelCrudFunctionsConfig"; /** * Suffix on the type alias that declares a group's standalone function type map (e.g. * `GuestbookFunctionTypeMap`). Each entry's params type is also subject to the marker tag. */ export declare const DEFAULT_FUNCTION_TYPE_MAP_SUFFIX = "FunctionTypeMap"; /** * Options for the require-dbx-model-api-params-tag rule. */ export interface FirebaseRequireDbxModelApiParamsTagRuleOptions { /** * Suffix identifying the CRUD functions config type alias. Defaults to {@link DEFAULT_CRUD_FUNCTIONS_CONFIG_SUFFIX}. */ readonly configTypeSuffix?: string; /** * Whether to also inspect `*FunctionTypeMap` aliases for params types. Defaults to `true`. */ readonly alsoFunctionTypeMap?: boolean; /** * Marker tag name (without the leading `@`). Defaults to {@link DBX_MODEL_API_PARAMS_MARKER}. */ readonly tagName?: string; } /** * ESLint rule definition for require-dbx-model-api-params-tag. */ export interface FirebaseRequireDbxModelApiParamsTagRuleDefinition { readonly meta: { readonly type: 'suggestion'; readonly fixable: undefined; readonly docs: { readonly description: string; readonly recommended: boolean; }; readonly messages: Readonly>; readonly schema: readonly object[]; }; create(context: { options: FirebaseRequireDbxModelApiParamsTagRuleOptions[]; report: (descriptor: { node: AstNode; messageId: string; data?: Record; }) => void; sourceCode: AstNode; }): Record void>; } /** * ESLint rule that requires every params interface referenced by a `*ModelCrudFunctionsConfig` (and, * by default, `*FunctionTypeMap`) type alias and declared in the same file to carry the * `@dbxModelApiParams` JSDoc marker tag. * * The marker is the signal the dbx-components manifest extractor * (`packages/dbx-cli/manifest-extract/src/lib/extract-crud.ts`) reads to distinguish an * intentionally-exposed API params type from an untagged one — missing it produces the * `[no-api-params-tag]` build warning and the "Missing `@dbxModelApiParams` marker" hint in the * `dbx_model_api_lookup` MCP tool. This rule surfaces the same gap in-editor at lint time. * * Same-file resolution only — matching the extractor, which itself resolves params interfaces from a * single in-memory source file. Params types declared in another file (e.g. shared base params like * `TargetModelParams`) are skipped, exactly as the extractor reports them as unresolved. * * @example * ```ts * export type GuestbookModelCrudFunctionsConfig = { * guestbook: { create: CreateGuestbookParams }; * }; * * // OK * /** * * @dbxModelApiParams * *\/ * export interface CreateGuestbookParams { readonly name: string; } * * // WARN — missingApiParamsTag * export interface CreateGuestbookParams { readonly name: string; } * ``` */ export declare const FIREBASE_REQUIRE_DBX_MODEL_API_PARAMS_TAG_RULE: FirebaseRequireDbxModelApiParamsTagRuleDefinition;