import type { ModelConfig, ModelRelationFieldConfig, ModelScalarFieldConfig, ProjectDefinition } from '#src/schema/index.js'; declare function byId(projectDefinition: ProjectDefinition, id: string): ModelConfig | undefined; declare function byIdOrThrow(projectDefinition: ProjectDefinition, id: string): ModelConfig; declare function byName(projectDefinition: ProjectDefinition, name: string): ModelConfig | undefined; declare function byNameOrThrow(projectDefinition: ProjectDefinition, name: string): ModelConfig; declare function getScalarFieldById(model: ModelConfig, id: string): ModelScalarFieldConfig; declare function getRelationsToModel(projectDefinition: ProjectDefinition, modelId: string): { model: ModelConfig; relation: ModelRelationFieldConfig; }[]; declare function getModelsForFeature(projectDefinition: ProjectDefinition, featureId: string): ModelConfig[]; declare function getModelIdFields(model: ModelConfig): string[]; declare function hasService(model: ModelConfig): boolean; declare function validateModelName(name: string): boolean; /** * Returns the ID of a model by name, or the name if no model is found. * @param projectDefinition - The project definition. * @param name - The name of the model. * @returns The ID of the model, or the name if no model is found. */ declare function getModelIdByNameOrDefault(projectDefinition: ProjectDefinition, name: string): string; declare function getPrimaryKeyFields(model: ModelConfig): ModelScalarFieldConfig[]; export declare const ModelUtils: { byId: typeof byId; byIdOrThrow: typeof byIdOrThrow; byName: typeof byName; byNameOrThrow: typeof byNameOrThrow; getScalarFieldById: typeof getScalarFieldById; getRelationsToModel: typeof getRelationsToModel; getModelsForFeature: typeof getModelsForFeature; getModelIdFields: typeof getModelIdFields; hasService: typeof hasService; validateModelName: typeof validateModelName; getModelIdByNameOrDefault: typeof getModelIdByNameOrDefault; getPrimaryKeyFields: typeof getPrimaryKeyFields; }; export {}; //# sourceMappingURL=model-utils.d.ts.map