/**
 * OAP admin's `/ui-management/templates*` REST surface.
 *
 * OAP stores each dashboard / page-setup blob keyed by a server-allocated
 * UUID; the *meaning* of the blob is opaque to OAP. Horizon names its
 * templates with a reserved prefix (`horizon.overview.*`, `horizon.layer.*`,
 * `horizon.alert.*`) inside the `configuration` JSON so multiple UIs can
 * share an OAP without colliding. Identity for sync purposes is that
 * inner `name` field — not the OAP UUID, which is a storage detail.
 *
 * No DELETE endpoint exists upstream; soft-deletion is `POST .../{id}/disable`.
 */
export type FetchLike = (input: string | URL, init?: RequestInit) => Promise<Response>;
export interface UITemplateClientOptions {
    adminUrl: string;
    fetch?: FetchLike;
    headers?: Record<string, string>;
    timeoutMs?: number;
}
/** One row as returned by OAP. `configuration` is an opaque JSON string —
 *  callers must `JSON.parse` it to read the inner `name`. */
export interface UITemplateRow {
    id: string;
    configuration: string;
    disabled: boolean;
}
/** Reply to add/update/disable mutations. `id` is the OAP UUID. */
export interface TemplateChangeStatus {
    id: string;
    status: boolean;
    message: string;
}
export declare class UITemplateApiError extends Error {
    readonly status: number;
    readonly url: string;
    readonly body?: string;
    constructor(status: number, url: string, body?: string);
}
export declare class UITemplateClient {
    private readonly fetchImpl;
    private readonly base;
    private readonly defaultHeaders;
    private readonly timeoutMs;
    constructor(options: UITemplateClientOptions);
    /** `GET /ui-management/templates?includingDisabled=true`. We always pass
     *  the flag so the sync orchestrator can see disabled rows and surface
     *  them in the admin UI. */
    list(): Promise<UITemplateRow[]>;
    /** `POST /ui-management/templates` — server allocates the UUID. Body
     *  carries the configuration JSON-as-string. */
    create(configuration: string): Promise<TemplateChangeStatus>;
    /** `PUT /ui-management/templates` — replaces by id. */
    update(id: string, configuration: string): Promise<TemplateChangeStatus>;
    /** `POST /ui-management/templates/{id}/disable` — soft-delete. */
    disable(id: string): Promise<TemplateChangeStatus>;
    private json;
}
//# sourceMappingURL=ui-template.d.ts.map