This commit is contained in:
@@ -77,5 +77,5 @@ export class EnqueueMigrationDto {
|
||||
|
||||
@IsArray()
|
||||
@IsOptional()
|
||||
ai_issues?: any[];
|
||||
ai_issues?: Record<string, unknown>[];
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export class ImportCorrespondenceDto {
|
||||
ai_confidence?: number;
|
||||
|
||||
@IsOptional()
|
||||
ai_issues?: any;
|
||||
ai_issues?: Record<string, unknown>[];
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@@ -44,7 +44,7 @@ export class ImportCorrespondenceDto {
|
||||
|
||||
@IsObject()
|
||||
@IsOptional()
|
||||
details?: Record<string, any>;
|
||||
details?: Record<string, unknown>;
|
||||
|
||||
@IsNumber()
|
||||
@IsNotEmpty()
|
||||
|
||||
@@ -41,7 +41,7 @@ export class MigrationReviewQueue {
|
||||
aiConfidence?: number;
|
||||
|
||||
@Column({ name: 'ai_issues', type: 'json', nullable: true })
|
||||
aiIssues?: any;
|
||||
aiIssues?: Record<string, unknown>[];
|
||||
|
||||
@Column({ name: 'review_reason', length: 255, nullable: true })
|
||||
reviewReason?: string;
|
||||
@@ -81,7 +81,7 @@ export class MigrationReviewQueue {
|
||||
aiSummary?: string;
|
||||
|
||||
@Column({ name: 'extracted_tags', type: 'json', nullable: true })
|
||||
extractedTags?: any;
|
||||
extractedTags?: Record<string, string>[];
|
||||
|
||||
@Column({ name: 'temp_attachment_id', type: 'int', nullable: true })
|
||||
tempAttachmentId?: number;
|
||||
|
||||
@@ -17,6 +17,7 @@ import { CommitBatchDto } from './dto/commit-batch.dto';
|
||||
import { CreateMigrationErrorDto } from './dto/create-migration-error.dto';
|
||||
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
|
||||
import { CurrentUser } from '../../common/decorators/current-user.decorator';
|
||||
import { User } from '../user/entities/user.entity';
|
||||
import {
|
||||
ApiTags,
|
||||
ApiOperation,
|
||||
@@ -48,9 +49,9 @@ export class MigrationController {
|
||||
async importCorrespondence(
|
||||
@Body() dto: ImportCorrespondenceDto,
|
||||
@Headers('idempotency-key') idempotencyKey: string,
|
||||
@CurrentUser() user: any
|
||||
@CurrentUser() user: User
|
||||
) {
|
||||
const userId = user?.id || user?.userId || 5;
|
||||
const userId = user?.user_id || 5;
|
||||
return this.migrationService.importCorrespondence(
|
||||
dto,
|
||||
idempotencyKey,
|
||||
@@ -72,9 +73,9 @@ export class MigrationController {
|
||||
async commitBatch(
|
||||
@Body() dto: CommitBatchDto,
|
||||
@Headers('idempotency-key') idempotencyKey: string,
|
||||
@CurrentUser() user: any
|
||||
@CurrentUser() user: User
|
||||
) {
|
||||
const userId = user?.id || user?.userId || 5;
|
||||
const userId = user?.user_id || 5;
|
||||
return this.migrationService.commitBatch(dto, idempotencyKey, userId);
|
||||
}
|
||||
|
||||
@@ -135,9 +136,9 @@ export class MigrationController {
|
||||
@Param('id', ParseIntPipe) id: number,
|
||||
@Body() dto: ImportCorrespondenceDto,
|
||||
@Headers('idempotency-key') idempotencyKey: string,
|
||||
@CurrentUser() user: any
|
||||
@CurrentUser() user: User
|
||||
) {
|
||||
const userId = user?.id || user?.userId || 5;
|
||||
const userId = user?.user_id || 5;
|
||||
return this.migrationService.approveQueueItem(
|
||||
id,
|
||||
dto,
|
||||
@@ -152,9 +153,9 @@ export class MigrationController {
|
||||
@ApiParam({ name: 'id', type: Number })
|
||||
async rejectQueueItem(
|
||||
@Param('id', ParseIntPipe) id: number,
|
||||
@CurrentUser() user: any
|
||||
@CurrentUser() user: User
|
||||
) {
|
||||
const userId = user?.id || user?.userId || 5;
|
||||
const userId = user?.user_id || 5;
|
||||
return this.migrationService.rejectQueueItem(id, userId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user