Frontend: - Add runtime configuration service for deployment-time API URL injection - Create docker-entrypoint.sh to generate config.json from environment variables - Update ApiService, ApprovalService, and DocumentViewer to use RuntimeConfigService - Add APP_INITIALIZER to load runtime config before app starts Backend: - Fix init-blockchain.js to properly quote mnemonic phrases in .env file - Improve docker-entrypoint.sh with health checks and better error handling Docker: - Add API_BASE_URL environment variable to frontend container - Update docker-compose.yml with clear documentation for remote deployment - Reorganize .env.example with clear categories (REQUIRED FOR REMOTE, PRODUCTION, AUTO-GENERATED) Workflow fixes: - Fix DepartmentApproval interface to match backend schema - Fix stage transformation for 0-indexed stageOrder - Fix workflow list to show correct stage count from definition.stages Cleanup: - Move development artifacts to .trash directory - Remove root-level package.json (was only for utility scripts) - Add .trash/ to .gitignore
58 lines
1.0 KiB
TypeScript
58 lines
1.0 KiB
TypeScript
/**
|
|
* Document API Models
|
|
* Models for document management
|
|
*/
|
|
|
|
export type DocumentType =
|
|
| 'FLOOR_PLAN'
|
|
| 'PHOTOGRAPH'
|
|
| 'ID_PROOF'
|
|
| 'ADDRESS_PROOF'
|
|
| 'NOC'
|
|
| 'LICENSE_COPY'
|
|
| 'OTHER'
|
|
| 'FIRE_SAFETY'
|
|
| 'HEALTH_CERT'
|
|
| 'TAX_CLEARANCE'
|
|
| 'SITE_PLAN'
|
|
| 'BUILDING_PERMIT'
|
|
| 'BUSINESS_LICENSE';
|
|
|
|
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;
|
|
}
|