feat(tickets): tri de la liste de tickets côté backend (#21)

Ajoute le paramètre de tri dans TicketListQuery et l'expose via
ticket_list (surface app-tauri + MCP). Ports et adaptateur mock
frontend alignés sur le contrat de tri. La partie UI (contrôle de tri
dans TicketFacetsBar) suivra dans un commit frontend dédié.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 11:45:59 +02:00
parent 2f8467e2dd
commit e523f44425
4 changed files with 184 additions and 5 deletions

View File

@ -713,6 +713,7 @@ export interface ConversationGateway {
* Status and priority are **multi-select**: `statuses`/`priorities` are sets of
* accepted values with OR semantics *within* a facet and AND *across* facets. An
* empty or absent array means "no constraint on this facet" (all values pass).
* `sort` is optional; when absent, the backend preserves its historical order.
*/
export interface TicketListQuery {
statuses?: TicketStatus[];
@ -720,10 +721,20 @@ export interface TicketListQuery {
assignedAgentId?: string;
/** Free-text match over title/description. */
text?: string;
sort?: TicketListSort;
limit?: number;
cursor?: string;
}
export type TicketListSortField = "number" | "priority" | "status" | "title";
export type TicketListSortDirection = "asc" | "desc";
export interface TicketListSort {
field: TicketListSortField;
direction: TicketListSortDirection;
}
/** Input for {@link TicketGateway.create}. */
export interface CreateTicketInput {
title: string;