feat: add extraction deletion functionality with confirmation dialog and update extraction list on deletion
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user