feat: allow scaffolder tasks pagination in the backend

Still requires the UI to take use of this. Relates to #25856

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2024-08-30 12:39:31 +03:00
parent f094dfd54a
commit 3ec4e6d891
13 changed files with 486 additions and 53 deletions
+16 -1
View File
@@ -181,7 +181,22 @@ export interface TaskBroker {
get(taskId: string): Promise<SerializedTask>;
list?(options?: {
filters?: {
createdBy?: string | string[];
status?: TaskStatus | TaskStatus[];
};
pagination?: {
limit?: number;
offset?: number;
};
order?: { order: 'asc' | 'desc'; field: string }[];
}): Promise<{ tasks: SerializedTask[]; totalTasks?: number }>;
/**
* @deprecated Make sure to pass `createdBy` and `status` in the `filters` parameter instead
*/
list?(options: {
createdBy?: string;
status?: TaskStatus;
}): Promise<{ tasks: SerializedTask[] }>;
}): Promise<{ tasks: SerializedTask[]; totalTasks?: number }>;
}