import { z } from "zod";
import { type Indexer } from "../indexers.js";
import { Result } from "../Result.js";
export declare const indexerCreateSchema: z.ZodObject<{
    name: z.ZodOptional<z.ZodString>;
    url: z.ZodString;
    apikey: z.ZodString;
    enabled: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
export declare const indexerUpdateSchema: z.ZodObject<{
    id: z.ZodNumber;
    name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
    url: z.ZodOptional<z.ZodString>;
    apikey: z.ZodOptional<z.ZodString>;
    enabled: z.ZodOptional<z.ZodBoolean>;
}, z.core.$strip>;
export declare const indexerTestSchema: z.ZodObject<{
    url: z.ZodString;
    apikey: z.ZodString;
}, z.core.$strip>;
export type TestConnectionError = {
    code: "CONNECTION_FAILED" | "TIMEOUT" | "AUTH_FAILED" | "RATE_LIMITED";
    message: string;
};
export type IndexerNotFoundError = {
    code: "INDEXER_NOT_FOUND";
    message: string;
};
export type MergeIndexersError = {
    code: "SOURCE_NOT_FOUND";
    message: string;
} | {
    code: "TARGET_NOT_FOUND";
    message: string;
} | {
    code: "INVALID_SOURCE_STATE";
    message: string;
} | {
    code: "INVALID_TARGET_STATE";
    message: string;
} | {
    code: "SAME_INDEXER";
    message: string;
};
export declare function testIndexerConnection(url: string, apikey: string, name: string): Promise<Result<{
    success: true;
    message: string;
}, TestConnectionError>>;
export declare function createIndexer(input: z.infer<typeof indexerCreateSchema>): Promise<Indexer>;
export declare function updateIndexer(input: z.infer<typeof indexerUpdateSchema>): Promise<Result<Indexer, IndexerNotFoundError>>;
export declare function deleteIndexer(id: number): Promise<Result<{
    success: true;
    indexer: Indexer;
}, IndexerNotFoundError>>;
export declare function getIndexerById(id: number): Promise<Result<Indexer, IndexerNotFoundError>>;
export declare function listAllIndexers(): Promise<Indexer[]>;
export declare function mergeDisabledIndexer(sourceId: number, targetId: number): Promise<Result<{
    mergedCount: number;
    deleted: boolean;
}, MergeIndexersError>>;
export declare function testExistingIndexer(id: number): Promise<Result<{
    success: true;
    message: string;
}, IndexerNotFoundError | TestConnectionError>>;
export declare function testNewIndexer(input: z.infer<typeof indexerTestSchema>): Promise<Result<{
    success: true;
    message: string;
}, TestConnectionError>>;
