Files
Power BI Dev 88c7c653c2 first init
2026-08-17 10:52:09 +07:00

74 lines
2.7 KiB
TypeScript

import { Priority, TicketPayload, ColumnPayload, Subtask, ActivityLogPayload } from '../types/index.js';
export declare class KanbanService {
/**
* Create a new column in a board.
*/
static createColumn(boardId: string, title: string, maxWipLimit?: number, autoStaleHours?: number): Promise<ColumnPayload>;
/**
* Update a column (title, maxWipLimit, autoStaleHours).
*/
static updateColumn(columnId: string, updates: {
title?: string;
maxWipLimit?: number;
autoStaleHours?: number;
}): Promise<ColumnPayload>;
/**
* Delete a column and its tickets.
*/
static deleteColumn(columnId: string): Promise<string>;
/**
* Create a new ticket in a column and record activity log.
*/
static createTicket(columnId: string, title: string, description?: string, priority?: Priority, tags?: string[], assignee?: string, dueDate?: string, subtasks?: Subtask[], isBlocked?: boolean, blockedReason?: string, userName?: string): Promise<{
ticket: TicketPayload;
activity?: ActivityLogPayload;
}>;
/**
* Update ticket fields.
*/
static updateTicket(ticketId: string, updates: {
title?: string;
description?: string;
priority?: Priority;
tags?: string[];
subtasks?: Subtask[];
dueDate?: string | null;
isBlocked?: boolean;
blockedReason?: string | null;
assignee?: string | null;
}, userName?: string): Promise<{
ticket: TicketPayload;
activity?: ActivityLogPayload;
}>;
/**
* Delete a ticket.
*/
static deleteTicket(ticketId: string, userName?: string): Promise<{
boardId: string;
activity?: ActivityLogPayload;
}>;
/**
* Move ticket: changes column and/or reorders within a column.
* Updates orders in batch transaction, resets movedAt timestamp, and records movement log in DB.
*/
static moveTicket(ticketId: string, targetColumnId: string, newOrder: number, ticketIdsInTargetColumn: string[], movedBy?: string): Promise<ActivityLogPayload | null>;
/**
* Get recent activity logs for a board.
*/
static getBoardActivityLogs(boardId: string, limit?: number): Promise<ActivityLogPayload[]>;
/**
* Get activity logs for a specific ticket.
*/
static getTicketActivityLogs(ticketId: string, limit?: number): Promise<ActivityLogPayload[]>;
/**
* Reorder columns in a board.
*/
static reorderColumns(boardId: string, columnIdsInOrder: string[]): Promise<void>;
/**
* Check for stale tickets in active columns and auto-move them to Backlog if enabled.
*/
static processStaleTickets(boardId: string): Promise<{
movedTicketIds: string[];
}>;
}