export type BoardWidgetPosition = {
    x?: number;
    y?: number;
    w?: number;
    h?: number;
    minW?: number;
    maxW?: number;
    minH?: number;
    maxH?: number;
};
/** Payload item for saving board widget layout (shape for board_widgets_mapping insert). */
export type SaveBoardWidgetItem = {
    /** When present, identifies an existing mapping row to update; omit for new widgets. */
    id?: string;
    widgetId: string;
    position: BoardWidgetPosition;
    name: string;
    description?: string;
    parameters?: Record<string, unknown>;
    type: string;
    chartType: string;
    title: string;
    items?: unknown[];
    metadata?: Record<string, unknown>;
};
/** Shape matching board_widgets_mapping for listing; used for dummy widgets until DB is wired. */
export type BoardWidgetListingItem = {
    id: string;
    boardId: string;
    workspaceId: string;
    projectId: string;
    applicationId: string | null;
    widgetId: string;
    position: BoardWidgetPosition;
    name: string;
    description: string;
    parameters: Record<string, unknown>;
    type: string;
    chartType: string;
    title: string;
    items: unknown[];
    metadata: Record<string, unknown>;
    createdAt: Date;
    updatedAt: Date;
};
export declare const BOARD_STATUS: {
    readonly DRAFT: 0;
    readonly ACTIVE: 1;
    readonly ARCHIVED: 2;
};
export type CreateBoardInput = {
    name: string;
    description?: string;
    applicationId?: string;
    projectId: string;
    workspaceId: string;
    createdBy: string;
};
export type BoardListQuery = {
    projectId: string;
    workspaceId: string;
    userId: string;
    includeArchived?: boolean;
    page?: number;
    limit?: number;
};
export declare class BoardsService {
    private TAG_MAP;
    create(input: CreateBoardInput): Promise<{
        status: number;
        id: string;
        applicationId: string | null;
        name: string;
        description: string | null;
        workspaceId: string;
        projectId: string;
        createdAt: Date;
        updatedAt: Date;
        createdBy: string | null;
    }>;
    isUserMemberOfBoard(boardId: string, userId: string): Promise<boolean>;
    getBoardMembers(boardId: string, projectId: string, workspaceId: string, requestedByUserId: string): Promise<Record<string, any>[]>;
    getList(query: BoardListQuery): Promise<{
        boards: {
            id: string;
            name: string;
            description: string | null;
            status: number;
            applicationId: string | null;
            projectId: string;
            workspaceId: string;
            createdBy: string | null;
            createdAt: Date;
            updatedAt: Date;
            applicationName: string | null;
            othersCount: number;
        }[];
        total: number;
        page: number;
        limit: number;
    }>;
    getById(boardId: string, projectId: string, workspaceId: string): Promise<{
        widgets: BoardWidgetListingItem[];
        positions: {
            id: string;
            x: number;
            y: number;
            w: number;
            h: number;
            minW: number | undefined;
            maxW: number | undefined;
            minH: number | undefined;
            maxH: number | undefined;
        }[];
        id: string;
        name: string;
        description: string | null;
        status: number;
        applicationId: string | null;
        projectId: string;
        workspaceId: string;
        createdBy: string | null;
        createdAt: Date;
        updatedAt: Date;
        applicationName: string | null;
    } | null>;
    /**
     * Save board widget layout using reconciliation: fetch existing mappings, then compute
     * toModify / toInsert / toDelete from incoming widget list and apply only the changes.
     */
    saveBoardWidgets(boardId: string, projectId: string, workspaceId: string, userId: string, widgets: SaveBoardWidgetItem[]): Promise<boolean>;
    /**
     * "Delete" = set status to ARCHIVED (soft delete).
     * Returns null if user is not a member (unauthorized) or board not found.
     */
    archive(boardId: string, projectId: string, workspaceId: string, userId: string): Promise<{
        id: string;
    } | null>;
    addMembership(boardId: string, projectId: string, workspaceId: string, requestedByUserId: string, members: {
        userId: string;
        email: string;
    }[]): Promise<{
        added: number;
        boardName: string | null;
    }>;
    /**
     * Remove a user from a board. Only the board creator may remove members.
     */
    removeMembership(boardId: string, projectId: string, workspaceId: string, requestedByUserId: string, removedUserId: string): Promise<boolean>;
    /**
     * Get unique widget groups from board_widgets table; each group is used as the category (label).
     */
    getWidgetCategories(): Promise<{
        id: string;
        label: string;
        description?: string;
        status: string;
        iconKey: string;
    }[]>;
    /**
     * Get available widgets for a widget group from board_widgets table (group = category label).
     *
     * Widget metadata may include:
     * - isAgentic: boolean — for observability category, widget is enabled only when application isAgentic is true.
     * - metricRequired: string — for monitoring category, widget is enabled only when pulse monitoring has this metric.
     * - isRag: boolean — reserved for future use (RAG/VectorDB widget gating).
     */
    getWidgetsByCategory(groupId: string, applicationId: string, projectId: string, workspaceId: string): Promise<Record<string, any>[]>;
}
export declare const boardsService: BoardsService;
//# sourceMappingURL=boardsService.d.ts.map