mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 16:25:33 +01:00
- Backend API: - Added DeletionRequestSerializer and DeletionRequestActionSerializer - Added DeletionRequestViewSet with approve/reject/pending_count actions - Added /api/deletion_requests/ route - Frontend: - Created deletion-request data model - Created deletion-request.service.ts with full CRUD operations - Created DeletionRequestsComponent with status filtering (pending/approved/rejected/completed) - Created DeletionRequestDetailComponent with impact analysis display - Added /deletion-requests route with permissions guard - Implemented approve/reject modals with confirmation - Added status badges and pending request counter - All code linted and built successfully Co-authored-by: dawnsystem <42047891+dawnsystem@users.noreply.github.com>
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
import { ObjectWithId } from './object-with-id'
|
|
|
|
export interface DeletionRequestDocument {
|
|
id: number
|
|
title: string
|
|
created: string
|
|
correspondent?: string
|
|
document_type?: string
|
|
tags: string[]
|
|
}
|
|
|
|
export interface DeletionRequestImpactSummary {
|
|
document_count: number
|
|
documents: DeletionRequestDocument[]
|
|
affected_tags: string[]
|
|
affected_correspondents: string[]
|
|
affected_types: string[]
|
|
date_range?: {
|
|
earliest: string
|
|
latest: string
|
|
}
|
|
}
|
|
|
|
export enum DeletionRequestStatus {
|
|
Pending = 'pending',
|
|
Approved = 'approved',
|
|
Rejected = 'rejected',
|
|
Cancelled = 'cancelled',
|
|
Completed = 'completed',
|
|
}
|
|
|
|
export interface DeletionRequest extends ObjectWithId {
|
|
created_at: string
|
|
updated_at: string
|
|
requested_by_ai: boolean
|
|
ai_reason: string
|
|
user: number
|
|
user_username: string
|
|
status: DeletionRequestStatus
|
|
documents: number[]
|
|
documents_detail: DeletionRequestDocument[]
|
|
document_count: number
|
|
impact_summary: DeletionRequestImpactSummary
|
|
reviewed_at?: string
|
|
reviewed_by?: number
|
|
reviewed_by_username?: string
|
|
review_comment?: string
|
|
completed_at?: string
|
|
completion_details?: any
|
|
}
|