devtools: Add cancel task operation to scheduled tasks
Renames useTriggerScheduledTask to useScheduledTasksOperations and adds cancelTask alongside triggerTask, with shared isLoading/error state. Adds CancelScheduledTask type to devtools-common and cancelScheduledTask to the DevToolsApi interface and client, hitting the existing scheduler cancel endpoint. The ScheduledTasksContent UI now shows both trigger and cancel buttons per task row. Signed-off-by: Fredrik Adelöw <freben@spotify.com> Made-with: Cursor
This commit is contained in:
@@ -18,6 +18,7 @@ export {
|
||||
devToolsTaskSchedulerCreatePermission,
|
||||
} from './permissions';
|
||||
export type {
|
||||
CancelScheduledTask,
|
||||
ScheduledTasks,
|
||||
TaskApiTasksResponse,
|
||||
TriggerScheduledTask,
|
||||
|
||||
@@ -133,3 +133,8 @@ export type ScheduledTasks = {
|
||||
export type TriggerScheduledTask = {
|
||||
error?: string;
|
||||
};
|
||||
|
||||
/** @alpha */
|
||||
export type CancelScheduledTask = {
|
||||
error?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user