feat: add extraction deletion functionality with confirmation dialog and update extraction list on deletion
Some checks failed
Frontend CI / lint (push) Failing after 18s
Frontend CI / build (push) Has been skipped

This commit is contained in:
JSC
2025-08-25 21:40:47 +02:00
parent 4a973e5044
commit 6a40311a82
4 changed files with 135 additions and 4 deletions

View File

@@ -41,6 +41,10 @@ export interface GetExtractionsParams {
limit?: number
}
export interface DeleteExtractionResponse {
message: string
}
export class ExtractionsService {
/**
* Create a new extraction job
@@ -135,6 +139,16 @@ export class ExtractionsService {
)
return response
}
/**
* Delete an extraction
*/
async deleteExtraction(extractionId: number): Promise<DeleteExtractionResponse> {
const response = await apiClient.delete<DeleteExtractionResponse>(
`/api/v1/extractions/${extractionId}`
)
return response
}
}
export const extractionsService = new ExtractionsService()