import type { ApiClient } from './request';
export type AvailabilityRule = {
    id: string;
    siteId: string;
    resourceId: string;
    serviceId: string | null;
    /** 0-6 (Sunday-Saturday). */
    weekday: number;
    /** HH:MM format. */
    startTime: string;
    /** HH:MM format. */
    endTime: string;
    /** ISO timestamp. */
    createdAt: string;
    /** ISO timestamp. */
    updatedAt: string;
};
export type ListAvailabilityRulesResponse = {
    rules: AvailabilityRule[];
};
export type WeeklyAvailabilityWindowInput = {
    /** 0-6 (Sunday-Saturday). */
    weekday: number;
    /** HH:MM. */
    startTime: string;
    /** HH:MM. */
    endTime: string;
};
export type SetWeeklyAvailabilityRequest = {
    windows: WeeklyAvailabilityWindowInput[];
};
/**
 * Canonical code-set for the `fieldErrors[]` surfaced through a 400 from
 * `PUT setWeeklyAvailability` when the supplied schedule fails validation.
 * Each issue maps to a path on the `windows[]` body — the editor consumes
 * these to render per-window inline messages.
 *
 * NOT a response variant: success returns `SetWeeklyAvailabilityResponse`
 * directly; failure rides on the dashboard error envelope's `fieldErrors`
 * field with the `code` populated from `SetWeeklyAvailabilityIssue['kind']`.
 */
export type SetWeeklyAvailabilityIssue = {
    kind: 'invalid_time';
    weekday: number;
    index: number;
    field: 'startTime' | 'endTime';
} | {
    kind: 'inverted_window';
    weekday: number;
    index: number;
} | {
    kind: 'overlapping_windows';
    weekday: number;
    firstIndex: number;
    secondIndex: number;
};
/**
 * Success response from `PUT setWeeklyAvailability`. Returns the
 * (post-replace-set) list of resource-broad availability rules for the
 * resource — the same shape `GET listAvailabilityRules` returns. Service-
 * scoped rules (`service_id IS NOT NULL`) are filtered out at the service
 * layer to match the editor's mental model.
 */
export type SetWeeklyAvailabilityResponse = {
    rules: AvailabilityRule[];
};
export type AppointmentBlackout = {
    id: string;
    siteId: string;
    resourceId: string | null;
    /** ISO timestamp. */
    startsAt: string;
    /** ISO timestamp. */
    endsAt: string;
    reason: string | null;
    /** ISO timestamp. */
    createdAt: string;
};
export type CreateBlackoutRequest = {
    /** ISO timestamp. */
    startsAt: string;
    /** ISO timestamp. */
    endsAt: string;
    reason?: string | null;
};
export type ListBlackoutsResponse = {
    blackouts: AppointmentBlackout[];
};
export type CreateBlackoutResponse = {
    blackout: AppointmentBlackout;
};
export type DeleteBlackoutResponse = {
    success: boolean;
};
export type TimeSlot = {
    /** ISO timestamp. */
    startAt: string;
    /** ISO timestamp. */
    endAt: string;
    resourceId: string;
};
export type GetAvailableSlotsQuery = {
    serviceId: string;
    resourceId?: string;
    startDate: string;
    endDate: string;
    timezone?: string;
};
export type GetAvailableSlotsResponse = {
    slots: TimeSlot[];
};
export declare function listAvailabilityRulesRequest(apiClient: ApiClient, siteId: string, resourceId: string, options?: RequestInit): Promise<AvailabilityRule[]>;
export declare function setWeeklyAvailabilityRequest(apiClient: ApiClient, siteId: string, resourceId: string, payload: SetWeeklyAvailabilityRequest, options?: RequestInit): Promise<AvailabilityRule[]>;
export declare function listBlackoutsRequest(apiClient: ApiClient, siteId: string, resourceId: string, options?: RequestInit): Promise<AppointmentBlackout[]>;
export declare function createBlackoutRequest(apiClient: ApiClient, siteId: string, resourceId: string, payload: CreateBlackoutRequest, options?: RequestInit): Promise<AppointmentBlackout>;
export declare function deleteBlackoutRequest(apiClient: ApiClient, siteId: string, resourceId: string, blackoutId: string, options?: RequestInit): Promise<void>;
/**
 * Get available appointment slots for a service.
 *
 * GET filters are passed as query parameters.
 */
export declare function getAvailableSlotsRequest(apiClient: ApiClient, siteId: string, query: {
    serviceId: string;
    resourceId?: string;
    startDate: string;
    endDate: string;
    timezone?: string;
}, options?: RequestInit): Promise<TimeSlot[]>;
