import type Database from 'better-sqlite3';
import type { ChangedBy, Endpoint, EndpointCreateInput, EndpointDeleteResult, EndpointDtoRelation, EndpointListQuery, EndpointUpdateInput } from '../../../shared/entities.js';
import type { TagsService } from '../../services/tags.js';
import type { VersionService } from '../../services/versions.js';
export declare class EndpointService {
    private db;
    private tags;
    private versions;
    constructor(db: Database.Database, tags: TagsService, versions: VersionService);
    create(input: EndpointCreateInput, actor: ChangedBy): Endpoint;
    list(query?: EndpointListQuery): Endpoint[];
    getBySlug(slug: string): Endpoint | null;
    getIdBySlug(slug: string): number | null;
    update(slug: string, input: EndpointUpdateInput, actor: ChangedBy): Endpoint;
    /**
     * Idempotent UPSERT used by M17 restore. Routes to create or update based on
     * existence of `slug`; preserves slug across update (no rename).
     */
    upsert(slug: string, input: EndpointCreateInput, actor: ChangedBy): {
        entity: Endpoint;
        op: 'created' | 'updated';
    };
    remove(slug: string, actor: ChangedBy): EndpointDeleteResult;
    private getByIdInternal;
    private hydrate;
    private getLinkedDtos;
    linkDto(endpointSlug: string, dtoSlug: string, relation: EndpointDtoRelation, statusCode?: number | null): Endpoint;
    unlinkDto(endpointSlug: string, dtoSlug: string, relation: EndpointDtoRelation, statusCode?: number | null): Endpoint;
    private requireMethod;
}
