/** Controller with built-in frontend model resource actions. */
export default class FrontendModelController extends Controller {
    /**
     * Frontend model params.
      @type {Record<string, ?> | undefined} */
    _frontendModelParams: Record<string, unknown> | undefined;
    /**
     * Frontend model params override.
      @type {Record<string, ?> | undefined} */
    _frontendModelParamsOverride: Record<string, unknown> | undefined;
    /**
     * Frontend model ability override.
      @type {import("./authorization/ability.js").default | undefined} */
    _frontendModelAbilityOverride: import("./authorization/ability.js").default | undefined;
    /**
     * Runs frontend model params.
     * @returns {Record<string, ?>} - Decoded request params.
     */
    frontendModelParams(): Record<string, unknown>;
    /**
     * Runs with frontend model params.
     * @template T
     * @param {Record<string, ?>} params - Temporary frontend model params.
     * @param {() => Promise<T>} callback - Callback executed with temporary params.
     * @returns {Promise<T>} - Callback return value.
     */
    withFrontendModelParams<T>(params: Record<string, unknown>, callback: () => Promise<T>): Promise<T>;
    /**
     * Runs with frontend model request context.
     * @template T
     * @param {Record<string, ?>} params - Request-scoped params.
     * @param {import("./http-server/client/response.js").default} response - Response instance.
     * @param {() => Promise<T>} callback - Callback executed inside resolved tenant and ability context.
     * @returns {Promise<T>} - Callback return value.
     */
    withFrontendModelRequestContext<T>(params: Record<string, unknown>, response: import("./http-server/client/response.js").default, callback: () => Promise<T>): Promise<T>;
    /**
     * Runs frontend model class.
     * @returns {typeof import("./database/record/index.js").default} - Frontend model class for controller resource actions.
     */
    frontendModelClass(): typeof import("./database/record/index.js").default;
    /**
     * Runs frontend model resource configuration.
     * @returns {{backendProject: import("./configuration-types.js").BackendProjectConfiguration, modelName: string, resourceClass: import("./configuration-types.js").FrontendModelResourceClassType, resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration} | null} - Frontend model resource configuration for current controller.
     */
    frontendModelResourceConfiguration(): {
        backendProject: import("./configuration-types.js").BackendProjectConfiguration;
        modelName: string;
        resourceClass: import("./configuration-types.js").FrontendModelResourceClassType;
        resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration;
    } | null;
    /**
     * Runs frontend model resource configuration for backend project model name.
     * @param {object} args - Arguments.
     * @param {import("./configuration-types.js").BackendProjectConfiguration} args.backendProject - Backend project configuration.
     * @param {string} args.modelName - Model name.
     * @returns {{backendProject: import("./configuration-types.js").BackendProjectConfiguration, modelName: string, resourceClass: import("./configuration-types.js").FrontendModelResourceClassType, resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration} | null} - Frontend model resource configuration for model name.
     */
    frontendModelResourceConfigurationForBackendProjectModelName({ backendProject, modelName }: {
        backendProject: import("./configuration-types.js").BackendProjectConfiguration;
        modelName: string;
    }): {
        backendProject: import("./configuration-types.js").BackendProjectConfiguration;
        modelName: string;
        resourceClass: import("./configuration-types.js").FrontendModelResourceClassType;
        resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration;
    } | null;
    /**
     * Runs frontend model resource configuration for model class.
     * @param {typeof import("./database/record/index.js").default} modelClass - Model class.
     * @returns {{backendProject: import("./configuration-types.js").BackendProjectConfiguration, modelName: string, resourceClass: import("./configuration-types.js").FrontendModelResourceClassType, resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration} | null} - Frontend model resource configuration for model class.
     */
    frontendModelResourceConfigurationForModelClass(modelClass: typeof import("./database/record/index.js").default): {
        backendProject: import("./configuration-types.js").BackendProjectConfiguration;
        modelName: string;
        resourceClass: import("./configuration-types.js").FrontendModelResourceClassType;
        resourceConfiguration: import("./configuration-types.js").NormalizedFrontendModelResourceConfiguration;
    } | null;
    /**
     * Runs frontend model resource model class.
     * @param {{modelName: string, resourceClass: import("./configuration-types.js").FrontendModelResourceClassType}} frontendModelResource - Frontend model resource configuration.
     * @returns {typeof import("./database/record/index.js").default | null} - Backing record class, when available.
     */
    frontendModelResourceModelClass(frontendModelResource: {
        modelName: string;
        resourceClass: import("./configuration-types.js").FrontendModelResourceClassType;
    }): typeof import("./database/record/index.js").default | null;
    /**
     * Runs frontend model class from configuration.
     * @returns {typeof import("./database/record/index.js").default | null} - Frontend model class resolved from backend project configuration.
     */
    frontendModelClassFromConfiguration(): typeof import("./database/record/index.js").default | null;
    /**
     * Ensures the frontend model class and requested preload target classes are initialized.
     * This handles the case where model initialization was skipped at startup (e.g., browser tests).
     * @returns {Promise<void>} - Resolves when the model class is ready.
     */
    ensureFrontendModelClassInitialized(): Promise<void>;
    /**
     * Runs ensure frontend model record class initialized.
     * @param {typeof import("./database/record/index.js").default} modelClass - Model class to initialize.
     * @returns {Promise<void>} - Resolves when the model class is ready.
     */
    ensureFrontendModelRecordClassInitialized(modelClass: typeof import("./database/record/index.js").default): Promise<void>;
    /**
     * Runs ensure frontend model preload classes initialized.
     * @param {object} args - Arguments.
     * @param {import("./configuration-types.js").BackendProjectConfiguration} args.backendProject - Backend project configuration.
     * @param {typeof import("./database/record/index.js").default} args.modelClass - Model class whose preload tree is being resolved.
     * @param {import("./database/query/index.js").NestedPreloadRecord | null} args.preload - Normalized preload tree.
     * @returns {Promise<void>} - Resolves when preload target classes are initialized.
     */
    ensureFrontendModelPreloadClassesInitialized({ backendProject, modelClass, preload }: {
        backendProject: import("./configuration-types.js").BackendProjectConfiguration;
        modelClass: typeof import("./database/record/index.js").default;
        preload: import("./database/query/index.js").NestedPreloadRecord | null;
    }): Promise<void>;
    /**
     * Runs ensure frontend model relationship target class initialized.
     * @param {object} args - Arguments.
     * @param {import("./configuration-types.js").BackendProjectConfiguration} args.backendProject - Backend project configuration.
     * @param {import("./database/record/relationships/base.js").default} args.relationship - Relationship definition.
     * @returns {Promise<typeof import("./database/record/index.js").default | null>} - Target model class, when available.
     */
    ensureFrontendModelRelationshipTargetClassInitialized({ backendProject, relationship }: {
        backendProject: import("./configuration-types.js").BackendProjectConfiguration;
        relationship: import("./database/record/relationships/base.js").default;
    }): Promise<typeof import("./database/record/index.js").default | null>;
    /**
     * Runs frontend model relationship target model class.
     * @param {object} args - Arguments.
     * @param {import("./configuration-types.js").BackendProjectConfiguration} args.backendProject - Backend project configuration.
     * @param {import("./database/record/relationships/base.js").default} args.relationship - Relationship definition.
     * @returns {typeof import("./database/record/index.js").default | null} - Target model class, when available.
     */
    frontendModelRelationshipTargetModelClass({ backendProject, relationship }: {
        backendProject: import("./configuration-types.js").BackendProjectConfiguration;
        relationship: import("./database/record/relationships/base.js").default;
    }): typeof import("./database/record/index.js").default | null;
    /**
     * Runs frontend model resource path.
     * @param {string} modelName - Model class name.
     * @param {?} resourceDefinition - Resource definition.
     * @returns {string} - Normalized resource path.
     */
    frontendModelResourcePath(modelName: string, resourceDefinition: unknown): string;
    /**
     * Runs frontend model resource matches controller.
     * @param {object} args - Arguments.
     * @param {string} args.controllerName - Controller name from params.
     * @param {string} args.resourcePath - Resource path from configuration.
     * @returns {boolean} - Whether resource path matches current controller.
     */
    frontendModelResourceMatchesController({ controllerName, resourcePath }: {
        controllerName: string;
        resourcePath: string;
    }): boolean;
    /**
     * Runs frontend model resource instance.
     * @returns {FrontendModelBaseResource} - Backend resource instance for current frontend-model action.
     */
    frontendModelResourceInstance(): FrontendModelBaseResource;
    /**
     * Runs frontend model primary key.
     * @returns {string} - Frontend model primary key.
     */
    frontendModelPrimaryKey(): string;
    /**
     * Runs frontend model ability action.
     * @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
     * @returns {string} - Ability action configured for the frontend action.
     */
    frontendModelAbilityAction(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): string;
    /**
     * Runs frontend model authorized query.
     * @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
     * @returns {import("./database/query/model-class-query.js").default<typeof import("./database/record/index.js").default>} - Authorized query for the action.
     */
    frontendModelAuthorizedQuery(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): import("./database/query/model-class-query.js").default<typeof import("./database/record/index.js").default>;
    /**
     * Runs frontend model primary key value.
     * @param {import("./database/record/index.js").default} model - Model instance.
     * @returns {string} - Primary key value as string.
     */
    frontendModelPrimaryKeyValue(model: import("./database/record/index.js").default): string;
    /**
     * Runs frontend model filter authorized models.
     * @param {object} args - Arguments.
     * @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} args.action - Frontend action.
     * @param {import("./database/record/index.js").default[]} args.models - Candidate models.
     * @returns {Promise<import("./database/record/index.js").default[]>} - Authorized models.
     */
    frontendModelFilterAuthorizedModels({ action, models }: {
        action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url";
        models: import("./database/record/index.js").default[];
    }): Promise<import("./database/record/index.js").default[]>;
    /**
     * Runs run frontend model before action.
     * @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
     * @returns {Promise<boolean>} - Whether action should continue.
     */
    runFrontendModelBeforeAction(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): Promise<boolean>;
    /**
     * Runs frontend model find record.
     * @param {"find" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
     * @param {string | number} id - Record id.
     * @returns {Promise<import("./database/record/index.js").default | null>} - Located model record.
     */
    frontendModelFindRecord(action: "find" | "update" | "destroy" | "attach" | "download" | "url", id: string | number): Promise<import("./database/record/index.js").default | null>;
    /**
     * Runs frontend model create record.
     * @param {Record<string, ?>} attributes - Create attributes.
     * @param {Record<string, ?> | null} [nestedAttributes] - Optional nested-attribute payload for cascading writes.
     * @returns {Promise<import("./database/record/index.js").default | null>} - Created model when authorized.
     */
    frontendModelCreateRecord(attributes: Record<string, unknown>, nestedAttributes?: Record<string, unknown> | null): Promise<import("./database/record/index.js").default | null>;
    /**
     * Runs frontend model records.
     * @returns {Promise<import("./database/record/index.js").default[]>} - Frontend model records.
     */
    frontendModelRecords(): Promise<import("./database/record/index.js").default[]>;
    /**
     * Runs frontend model preload.
     * @returns {import("./database/query/index.js").NestedPreloadRecord | null} - Frontend preload data.
     */
    frontendModelPreload(): import("./database/query/index.js").NestedPreloadRecord | null;
    /**
     * Runs frontend model select.
     * @returns {Record<string, string[]> | null} - Frontend select data.
     */
    frontendModelSelect(): Record<string, string[]> | null;
    /**
     * Runs frontend model selects extra.
     * @returns {Record<string, string[]> | null} - Frontend extra-select data (defaults plus these), keyed by model name.
     */
    frontendModelSelectsExtra(): Record<string, string[]> | null;
    /**
     * Runs frontend model searches.
     * @returns {FrontendModelSearch[]} - Frontend search filters.
     */
    frontendModelSearches(): FrontendModelSearch[];
    /**
     * Runs frontend model where.
     * @returns {Record<string, ?> | null} - Frontend where filters.
     */
    frontendModelWhere(): Record<string, unknown> | null;
    /**
     * Runs frontend model ransack.
     * @returns {Record<string, ?> | null} - Frontend Ransack filters.
     */
    frontendModelRansack(): Record<string, unknown> | null;
    /**
     * Runs frontend model joins.
     * @returns {Record<string, ?> | null} - Frontend joins descriptors.
     */
    frontendModelJoins(): Record<string, unknown> | null;
    /**
     * Runs frontend model sort.
     * @returns {FrontendModelSort[]} - Frontend sort definitions.
     */
    frontendModelSort(): FrontendModelSort[];
    /**
     * Runs frontend model group.
     * @returns {FrontendModelGroup[]} - Frontend group definitions.
     */
    frontendModelGroup(): FrontendModelGroup[];
    /**
     * Runs frontend model pagination.
     * @returns {FrontendModelPagination} - Frontend pagination params.
     */
    frontendModelPagination(): FrontendModelPagination;
    /**
     * Runs frontend model distinct.
     * @returns {boolean | null} - Frontend distinct flag when provided.
     */
    frontendModelDistinct(): boolean | null;
    /**
     * Runs frontend model pluck.
     * @returns {FrontendModelPluck[]} - Frontend pluck definitions.
     */
    frontendModelPluck(): FrontendModelPluck[];
    /**
     * Runs frontend model count requested.
     * @returns {boolean} - Whether the request asks for an aggregate count.
     */
    frontendModelCountRequested(): boolean;
    /**
     * Runs frontend model with count.
     * @returns {Array<{attributeName: string, relationshipName: string, where?: Record<string, ?>}>}
     *   Frontend withCount entries. Empty array when not requested.
     */
    frontendModelWithCount(): Array<{
        attributeName: string;
        relationshipName: string;
        where?: Record<string, unknown>;
    }>;
    /**
     * Resolve an entry from the frontend-model `abilities` payload to
     * its backend model class by looking up the resource by modelName
     * across all configured backend projects. Returns null when no
     * resource matches — the spec entry is then silently ignored so a
     * caller requesting abilities for a model they cannot resolve does
     * not crash the request.
     * @param {string} modelName
     * @returns {typeof import("./database/record/index.js").default | null}
     */
    _frontendModelClassForAbilities(modelName: string): typeof import("./database/record/index.js").default | null;
    /**
     * Collect every loaded record whose `getModelName()` matches the
     * requested name, walking across the root-level slice plus any
     * preloaded relationships at any depth. Used to evaluate per-record
     * abilities against nested preloaded children with a single batched
     * query per (modelClass, action) pair.
     * @param {import("./database/record/index.js").default[]} rootModels
     * @param {string} modelName
     * @returns {import("./database/record/index.js").default[]}
     */
    _frontendModelCollectRecordsForName(rootModels: import("./database/record/index.js").default[], modelName: string): import("./database/record/index.js").default[];
    /**
     * Evaluate every ability requested via the frontend `abilities`
     * param against the loaded model cohort (plus any preloaded
     * children), attaching the results to each record via
     * `_setComputedAbility`. Runs one batched `authorized query + pluck`
     * per (modelClass, action) pair, regardless of how many records
     * were loaded.
     * @param {import("./database/record/index.js").default[]} rootModels
     * @returns {Promise<void>}
     */
    frontendModelComputeAbilities(rootModels: import("./database/record/index.js").default[]): Promise<void>;
    /**
     * Parse the frontend-model `abilities` param into a list of
     * `{modelName, actions}` entries to evaluate against loaded records.
     * Unknown entries are silently skipped — downstream code resolves
     * model names to classes when applying the check, so unresolved
     * names naturally become no-ops.
     * @returns {Array<{modelName: string, actions: string[]}>}
     */
    frontendModelAbilities(): Array<{
        modelName: string;
        actions: string[];
    }>;
    /**
     * Read the frontend-model `queryData` param. The wire format carries
     * only **names** (the keys the frontend wants attached) plus the
     * optional nested-relationship chain leading to them — the actual SQL
     * fragments live on the backend model as `Model.queryData(name, fn)`
     * registrations. Callers cannot push SQL through this endpoint.
     *
     * Returns the raw nested-record spec (shape validated by the
     * normalizer inside `Query.queryData`) or `null` when not requested.
     * @returns {import("./database/query/query-data.js").QueryDataSpec | null}
     */
    frontendModelQueryData(): import("./database/query/query-data.js").QueryDataSpec | null;
    /**
     * Runs frontend model index query.
     * @returns {import("./database/query/model-class-query.js").default} - Frontend index query with normalized params applied.
     */
    frontendModelIndexQuery(): import("./database/query/model-class-query.js").default;
    /**
     * MSSQL cannot apply DISTINCT over non-comparable text columns in table.* selects.
     * This rewrites distinct frontend-model queries to select root records by distinct PK subquery.
     * @param {object} args - Args.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query with distinct and filters.
     * @returns {import("./database/query/model-class-query.js").default} - MSSQL-safe distinct query.
     */
    frontendModelMssqlDistinctByPrimaryKeyQuery({ query }: {
        query: import("./database/query/model-class-query.js").default;
    }): import("./database/query/model-class-query.js").default;
    /**
     * Runs frontend model pluck values.
     * @param {object} args - Pluck args.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @param {FrontendModelPluck[]} args.pluck - Pluck descriptors.
     * @returns {Promise<Array<?>>} - Plucked values.
     */
    frontendModelPluckValues({ query, pluck }: {
        query: import("./database/query/model-class-query.js").default;
        pluck: FrontendModelPluck[];
    }): Promise<Array<unknown>>;
    /**
     * Runs frontend model search target model class.
     * @param {object} args - Search args.
     * @param {typeof import("./database/record/index.js").default} args.modelClass - Root model class.
     * @param {string[]} args.path - Relationship path.
     * @returns {typeof import("./database/record/index.js").default} - Target model class.
     */
    frontendModelSearchTargetModelClass({ modelClass, path }: {
        modelClass: typeof import("./database/record/index.js").default;
        path: string[];
    }): typeof import("./database/record/index.js").default;
    /**
     * Runs apply frontend model search.
     * @param {object} args - Search args.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @param {FrontendModelSearch} args.search - Search filter.
     * @returns {void}
     */
    applyFrontendModelSearch({ query, search }: {
        query: import("./database/query/model-class-query.js").default;
        search: FrontendModelSearch;
    }): void;
    /**
     * Apply array-valued equality search filters.
     * @param {object} args - Search arguments.
     * @param {string} args.columnSql - SQL for the searched column.
     * @param {string} args.emptySql - SQL predicate used when the array is empty.
     * @param {"IN" | "NOT IN"} args.operatorSql - SQL array operator.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @param {FrontendModelSearch} args.search - Search descriptor.
     * @returns {boolean} - Whether an array predicate was applied.
     */
    applyFrontendModelArraySearch({ columnSql, emptySql, operatorSql, query, search }: {
        columnSql: string;
        emptySql: string;
        operatorSql: "IN" | "NOT IN";
        query: import("./database/query/model-class-query.js").default;
        search: FrontendModelSearch;
    }): boolean;
    /**
     * Runs apply frontend model pagination.
     * @param {object} args - Pagination args.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @param {FrontendModelPagination} args.pagination - Pagination values.
     * @returns {void}
     */
    applyFrontendModelPagination({ query, pagination }: {
        query: import("./database/query/model-class-query.js").default;
        pagination: FrontendModelPagination;
    }): void;
    /**
     * Runs apply frontend model where.
     * @param {object} args - Where args.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @param {Record<string, ?>} args.where - Root-model where conditions.
     * @returns {void}
     */
    applyFrontendModelWhere({ query, where }: {
        query: import("./database/query/model-class-query.js").default;
        where: Record<string, unknown>;
    }): void;
    /**
     * Runs apply frontend model joins.
     * @param {object} args - Joins args.
     * @param {Record<string, ?>} args.joins - Relationship-object joins.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @returns {void}
     */
    applyFrontendModelJoins({ joins, query }: {
        joins: Record<string, unknown>;
        query: import("./database/query/model-class-query.js").default;
    }): void;
    /**
     * Runs apply frontend model joins for path.
     * @param {object} args - Joins args.
     * @param {Record<string, ?>} args.joins - Joins for current path.
     * @param {Set<string>} args.joinPathKeys - Joined path keys.
     * @param {typeof import("./database/record/index.js").default} args.modelClass - Model class for current path.
     * @param {string[]} args.path - Relationship path.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @returns {void}
     */
    applyFrontendModelJoinsForPath({ joins, joinPathKeys, modelClass, path, query }: {
        joins: Record<string, unknown>;
        joinPathKeys: Set<string>;
        modelClass: typeof import("./database/record/index.js").default;
        path: string[];
        query: import("./database/query/model-class-query.js").default;
    }): void;
    /**
     * Resolves a key that may be either a camelCase attribute name or a raw DB
     * column name to its canonical column name.  Returns `undefined` when the
     * key matches neither map.
     * @param {typeof import("./database/record/index.js").default} modelClass - Model class.
     * @param {string} key - Attribute name or column name to resolve.
     * @returns {string | undefined} - Resolved DB column name, or `undefined`.
     */
    resolveFrontendModelColumnName(modelClass: typeof import("./database/record/index.js").default, key: string): string | undefined;
    /**
     * Runs apply frontend model where for path.
     * @param {object} args - Where args.
     * @param {typeof import("./database/record/index.js").default} args.modelClass - Model class for current where scope.
     * @param {string[]} args.path - Relationship path from root.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @param {Record<string, ?>} args.where - Where conditions for current scope.
     * @returns {void}
     */
    applyFrontendModelWhereForPath({ modelClass, path, query, where }: {
        modelClass: typeof import("./database/record/index.js").default;
        path: string[];
        query: import("./database/query/model-class-query.js").default;
        where: Record<string, unknown>;
    }): void;
    /**
     * Runs normalize frontend model where column value.
     * @param {object} args - Args.
     * @param {typeof import("./database/record/index.js").default} args.modelClass - Model class.
     * @param {string} args.columnName - Column name.
     * @param {?} args.value - Where value.
     * @returns {? | symbol} - SQL-safe where value.
     */
    normalizeFrontendModelWhereColumnValue({ columnName, modelClass, value }: {
        modelClass: typeof import("./database/record/index.js").default;
        columnName: string;
        value: unknown;
    }): unknown | symbol;
    /**
     * Runs apply frontend model group.
     * @param {object} args - Group args.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @param {FrontendModelGroup} args.group - Group definition.
     * @returns {void}
     */
    applyFrontendModelGroup({ query, group }: {
        query: import("./database/query/model-class-query.js").default;
        group: FrontendModelGroup;
    }): void;
    /**
     * Adds root-model columns to GROUP BY so strict SQL engines accept default root-table selects.
     * @param {object} args - Args.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @returns {void}
     */
    applyFrontendModelRootGroupColumns({ query }: {
        query: import("./database/query/model-class-query.js").default;
    }): void;
    /**
     * Ensures a group-by SQL column is only appended once.
     * @param {object} args - Args.
     * @param {string} args.columnSql - Fully-qualified column SQL.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @returns {void}
     */
    ensureFrontendModelGroupColumn({ columnSql, query }: {
        columnSql: string;
        query: import("./database/query/model-class-query.js").default;
    }): void;
    /**
     * Runs apply frontend model translated attribute preloads.
     * @param {object} args - Args.
     * @param {import("./database/query/model-class-query.js").default<typeof import("./database/record/index.js").default>} args.query - Query instance.
     * @returns {import("./database/query/model-class-query.js").default<typeof import("./database/record/index.js").default>} - Query with translations preloaded if needed.
     */
    applyFrontendModelTranslatedAttributePreloads({ query }: {
        query: import("./database/query/model-class-query.js").default<typeof import("./database/record/index.js").default>;
    }): import("./database/query/model-class-query.js").default<typeof import("./database/record/index.js").default>;
    /**
     * Runs apply frontend model sort.
     * @param {object} args - Sort args.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @param {FrontendModelSort} args.sort - Sort definition.
     * @returns {void}
     */
    applyFrontendModelSort({ query, sort }: {
        query: import("./database/query/model-class-query.js").default;
        sort: FrontendModelSort;
    }): void;
    /**
     * Ensures a sort join path has been joined on query.
     * @param {object} args - Join args.
     * @param {string[]} args.path - Relationship join path.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @returns {void}
     */
    ensureFrontendModelSortJoinPath({ path, query }: {
        path: string[];
        query: import("./database/query/model-class-query.js").default;
    }): void;
    /**
     * Ensures a relationship path has exactly one SQL join.
     * @param {object} args - Join args.
     * @param {string[]} args.path - Relationship join path.
     * @param {import("./database/query/model-class-query.js").default} args.query - Query instance.
     * @returns {void}
     */
    ensureFrontendModelJoinPath({ path, query }: {
        path: string[];
        query: import("./database/query/model-class-query.js").default;
    }): void;
    /**
     * Runs frontend model selected attributes for model class.
     * @param {typeof import("./database/record/index.js").default} modelClass - Model class.
     * @returns {string[] | null} - Selected attributes for model class.
     */
    frontendModelSelectedAttributesForModelClass(modelClass: typeof import("./database/record/index.js").default): string[] | null;
    /**
     * Runs frontend model selects extra for model class.
     * @param {typeof import("./database/record/index.js").default} modelClass - Model class.
     * @returns {string[] | null} - Extra attributes (loaded in addition to the defaults) for the model class.
     */
    frontendModelSelectsExtraForModelClass(modelClass: typeof import("./database/record/index.js").default): string[] | null;
    /**
     * Resolves the final set of attribute names to serialize for a model class:
     * an explicit narrowing `select` wins; otherwise, when `selectsExtra` is given,
     * the default attributes plus the extras; otherwise null (default behavior).
     * @param {typeof import("./database/record/index.js").default} modelClass - Model class.
     * @param {string[]} fallbackAttributeNames - Attribute names to treat as the defaults when the resource declares none.
     * @returns {string[] | null} - Effective selected attribute names, or null for default serialization.
     */
    frontendModelEffectiveSelectedAttributesForModelClass(modelClass: typeof import("./database/record/index.js").default, fallbackAttributeNames: string[]): string[] | null;
    /**
     * Runs frontend model default attributes for model class.
     * @param {typeof import("./database/record/index.js").default} modelClass - Model class.
     * @returns {string[] | null} - Default frontend-model attributes declared on the resource.
     */
    frontendModelDefaultAttributesForModelClass(modelClass: typeof import("./database/record/index.js").default): string[] | null;
    /**
     * Runs frontend model non default attributes for model class.
     * @param {typeof import("./database/record/index.js").default} modelClass - Model class.
     * @returns {string[]} - Attribute names explicitly marked selectedByDefault: false.
     */
    frontendModelNonDefaultAttributesForModelClass(modelClass: typeof import("./database/record/index.js").default): string[];
    /**
     * Runs serialize frontend model attributes.
     * @param {import("./database/record/index.js").default} model - Model instance.
     * @returns {Promise<Record<string, ?>>} - Serialized attributes filtered by select map.
     */
    serializeFrontendModelAttributes(model: import("./database/record/index.js").default): Promise<Record<string, unknown>>;
    /**
     * Runs serialization resource instance for model.
     * @param {import("./database/record/index.js").default} model - Model instance.
     * @returns {import("./frontend-model-resource/base-resource.js").default | null} - Resource instance or null.
     */
    _serializationResourceInstanceForModel(model: import("./database/record/index.js").default): import("./frontend-model-resource/base-resource.js").default | null;
    /**
     * Runs frontend model filter serializable related models.
     * @param {object} args - Arguments.
     * @param {import("./database/record/index.js").default[]} args.models - Frontend model records.
     * @param {boolean} args.relationshipIsCollection - Whether relation is has-many.
     * @returns {Promise<import("./database/record/index.js").default[]>} - Serializable related models.
     */
    frontendModelFilterSerializableRelatedModels({ models, relationshipIsCollection }: {
        models: import("./database/record/index.js").default[];
        relationshipIsCollection: boolean;
    }): Promise<import("./database/record/index.js").default[]>;
    /**
     * Runs is serializable frontend model.
     * @param {?} value - Candidate preloaded value.
     * @returns {value is import("./database/record/index.js").default} - Whether value behaves like a model.
     */
    isSerializableFrontendModel(value: unknown): value is import("./database/record/index.js").default;
    /**
     * Runs serialize frontend models.
     * @param {import("./database/record/index.js").default[]} models - Models to serialize.
     * @returns {Promise<Record<string, ?>[]>} - Serialized model payloads.
     */
    serializeFrontendModels(models: import("./database/record/index.js").default[]): Promise<Record<string, unknown>[]>;
    /**
     * Runs serialize frontend model.
     * @param {import("./database/record/index.js").default} model - Frontend model record.
     * @returns {Promise<Record<string, ?>>} - Serialized frontend model payload.
     */
    serializeFrontendModel(model: import("./database/record/index.js").default): Promise<Record<string, unknown>>;
    /**
     * Runs frontend model render error.
     * @param {string} errorMessage - Error message.
     * @returns {Promise<void>} - Resolves when error has been rendered.
     */
    frontendModelRenderError(errorMessage: string): Promise<void>;
    /**
     * Runs frontend model error payload.
     * @param {string} errorMessage - Error message.
     * @returns {Record<string, ?>} - Error payload.
     */
    frontendModelErrorPayload(errorMessage: string): Record<string, unknown>;
    /**
     * Runs frontend model client safe error payload.
     * @returns {Record<string, ?>} - Client-safe error payload.
     */
    frontendModelClientSafeErrorPayload(): Record<string, unknown>;
    /**
     * Runs frontend model client error payload for error.
     * @param {?} error - Caught error.
     * @returns {Promise<Record<string, ?>>} - Client payload for the current environment.
     */
    frontendModelClientErrorPayloadForError(error: unknown): Promise<Record<string, unknown>>;
    /**
     * Runs frontend model log endpoint error.
     * @param {object} args - Error log args.
     * @param {string} args.action - Endpoint/action label.
     * @param {?} args.error - Caught error.
     * @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url" | "custom-command"} [args.commandType] - Frontend-model command type.
     * @param {string | undefined} [args.model] - Request model name when available.
     * @param {string | undefined} [args.requestId] - Batch request id when available.
     * @returns {Promise<void>} - Resolves after logging.
     */
    frontendModelLogEndpointError({ action, error, commandType, model, requestId }: {
        action: string;
        error: unknown;
        commandType?: "find" | "update" | "destroy" | "url" | "index" | "create" | "attach" | "download" | "custom-command" | undefined;
        model?: string | undefined;
        requestId?: string | undefined;
    }): Promise<void>;
    /**
     * Runs frontend model render command response.
     * @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
     * @returns {Promise<void>} - Resolves when response has been rendered.
     */
    frontendModelRenderCommandResponse(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): Promise<void>;
    /**
     * Runs frontend model command payload.
     * @param {"index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"} action - Frontend action.
     * @returns {Promise<Record<string, ?> | null>} - Response payload.
     */
    frontendModelCommandPayload(action: "index" | "find" | "create" | "update" | "destroy" | "attach" | "download" | "url"): Promise<Record<string, unknown> | null>;
    /**
     * Runs frontend api.
     * @returns {Promise<void>} - Shared frontend model API action with batch support.
     */
    frontendApi(): Promise<void>;
    /**
     * Dispatches a custom frontend-model command through the shared frontend-model API endpoint.
     * @param {object} args - Arguments.
     * @param {string} args.customPath - Custom backend route path.
     * @param {?} args.payload - Request payload.
     * @returns {Promise<Record<string, ?>>} - Parsed JSON response payload.
     */
    frontendApiCustomCommandPayload({ customPath, payload }: {
        customPath: string;
        payload: unknown;
    }): Promise<Record<string, unknown>>;
    /**
     * Runs frontend index.
     * @returns {Promise<void>} - Collection action for frontend model resources.
     */
    frontendIndex(): Promise<void>;
    /**
     * Runs frontend find.
     * @returns {Promise<void>} - Member find action for frontend model resources.
     */
    frontendFind(): Promise<void>;
    /**
     * Runs frontend update.
     * @returns {Promise<void>} - Member update action for frontend model resources.
     */
    frontendUpdate(): Promise<void>;
    /**
     * Runs frontend attach.
     * @returns {Promise<void>} - Member attach action for frontend model resources.
     */
    frontendAttach(): Promise<void>;
    /**
     * Runs frontend download.
     * @returns {Promise<void>} - Member download action for frontend model resources.
     */
    frontendDownload(): Promise<void>;
    /**
     * Runs frontend url.
     * @returns {Promise<void>} - Member URL action for frontend model resources.
     */
    frontendUrl(): Promise<void>;
    /**
     * Runs frontend create.
     * @returns {Promise<void>} - Member create action for frontend model resources.
     */
    frontendCreate(): Promise<void>;
    /**
     * Runs frontend destroy.
     * @returns {Promise<void>} - Member destroy action for frontend model resources.
     */
    frontendDestroy(): Promise<void>;
    /**
     * Runs frontend custom command.
     * @returns {Promise<void>} - Custom collection/member command action for frontend-model resources.
     */
    frontendCustomCommand(): Promise<void>;
    /**
     * Runs frontend model custom command payload.
     * @returns {Promise<Record<string, ?>>} - Response payload.
     */
    frontendModelCustomCommandPayload(): Promise<Record<string, unknown>>;
    /**
     * Walks a custom-command response payload and replaces any backend `Record`
     * instance with the resource's per-action serialized form so handlers can
     * return `{record, status: "ok"}` instead of explicitly calling
     * `await this.serialize(record, action)`. Plain objects, arrays, and
     * primitive values pass through and are later encoded by
     * `serializeFrontendModelTransportValue`.
     * @param {?} value - Payload value.
     * @param {{serialize: (model: ?, action: string) => Promise<Record<string, ?>>}} resource - Resource instance providing `serialize`.
     * @param {string} action - Custom command method name passed to `resource.serialize` for per-action authorization filtering.
     * @param {WeakSet<object>} [seen] - Recursion stack of plain-object containers currently being walked. Membership is added on entry and removed on exit so a container shared between siblings (i.e. referenced twice but not cyclically) is walked on each reference instead of being short-circuited the second time, which would let backend `Record` instances inside it bypass `resource.serialize`.
     * @returns {Promise<?>} - Payload with backend `Record` instances replaced by serialized markers.
     */
    autoSerializeFrontendModelsInPayload(value: unknown, resource: {
        serialize: (model: unknown, action: string) => Promise<Record<string, unknown>>;
    }, action: string, seen?: WeakSet<object>): Promise<unknown>;
}
/**
 * FrontendModelSearch type.
 */
export type FrontendModelSearch = {
    /**
     * - Relationship path.
     */
    path: string[];
    /**
     * - Column or attribute name.
     */
    column: string;
    /**
     * - Search operator.
     */
    operator: "eq" | "like" | "notEq" | "gt" | "gteq" | "lt" | "lteq";
    /**
     * - Search value.
     */
    value: unknown;
};
/**
 * FrontendModelSort type.
 */
export type FrontendModelSort = {
    /**
     * - Attribute name to sort by.
     */
    column: string;
    /**
     * - Sort direction.
     */
    direction: "asc" | "desc";
    /**
     * - Relationship path from root model.
     */
    path: string[];
};
/**
 * FrontendModelGroup type.
 */
export type FrontendModelGroup = {
    /**
     * - Attribute name to group by.
     */
    column: string;
    /**
     * - Relationship path from root model.
     */
    path: string[];
};
/**
 * FrontendModelPluck type.
 */
export type FrontendModelPluck = {
    /**
     * - Attribute name to pluck.
     */
    column: string;
    /**
     * - Relationship path from root model.
     */
    path: string[];
};
/**
 * FrontendModelPagination type.
 */
export type FrontendModelPagination = {
    /**
     * - Maximum number of records.
     */
    limit: number | null;
    /**
     * - Number of records to skip.
     */
    offset: number | null;
    /**
     * - 1-based page number.
     */
    page: number | null;
    /**
     * - Page size.
     */
    perPage: number | null;
};
import Controller from "./controller.js";
import FrontendModelBaseResource from "./frontend-model-resource/base-resource.js";
//# sourceMappingURL=frontend-model-controller.d.ts.map