55 lines
1.0 KiB
TypeScript
55 lines
1.0 KiB
TypeScript
|
|
/**
|
||
|
|
* Document API Models
|
||
|
|
* Models for document management
|
||
|
|
*/
|
||
|
|
|
||
|
|
export type DocumentType =
|
||
|
|
| 'FIRE_SAFETY_CERTIFICATE'
|
||
|
|
| 'BUILDING_PLAN'
|
||
|
|
| 'PROPERTY_OWNERSHIP'
|
||
|
|
| 'INSPECTION_REPORT'
|
||
|
|
| 'POLLUTION_CERTIFICATE'
|
||
|
|
| 'ELECTRICAL_SAFETY_CERTIFICATE'
|
||
|
|
| 'STRUCTURAL_STABILITY_CERTIFICATE'
|
||
|
|
| 'IDENTITY_PROOF'
|
||
|
|
| 'ADDRESS_PROOF'
|
||
|
|
| 'OTHER';
|
||
|
|
|
||
|
|
export interface UploadDocumentDto {
|
||
|
|
docType: DocumentType;
|
||
|
|
description?: string;
|
||
|
|
file?: File;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface DocumentResponseDto {
|
||
|
|
id: string;
|
||
|
|
requestId: string;
|
||
|
|
docType: string;
|
||
|
|
originalFilename: string;
|
||
|
|
currentVersion: number;
|
||
|
|
currentHash: string;
|
||
|
|
minioBucket: string;
|
||
|
|
isActive: boolean;
|
||
|
|
createdAt: string;
|
||
|
|
updatedAt: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface DocumentVersionResponseDto {
|
||
|
|
id: string;
|
||
|
|
documentId: string;
|
||
|
|
version: number;
|
||
|
|
hash: string;
|
||
|
|
minioPath: string;
|
||
|
|
fileSize: string;
|
||
|
|
mimeType: string;
|
||
|
|
uploadedBy: string;
|
||
|
|
blockchainTxHash?: string;
|
||
|
|
createdAt: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface DownloadUrlResponseDto {
|
||
|
|
url: string;
|
||
|
|
expiresAt: string;
|
||
|
|
expiresIn: number;
|
||
|
|
}
|