Initial AI manga platform

This commit is contained in:
www
2026-06-15 17:45:28 +08:00
commit 7a8191650f
267 changed files with 105987 additions and 0 deletions
@@ -0,0 +1,154 @@
import { Body, Controller, Get, Inject, Param, Post, Query, UseGuards } from '@nestjs/common';
import { CurrentUser } from '../auth/current-user.decorator';
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
import type { AuthRequestUser } from '../auth/auth.types';
import {
LiveActionAttachKeyframeDto,
LiveActionCostEstimateQueryDto,
LiveActionGenerateDto,
LiveActionManualReviewDto,
LiveActionPreflightQueryDto,
LiveActionQualityCheckDto
} from './live-action.dto';
import { LiveActionService } from './live-action.service';
@Controller()
@UseGuards(JwtAuthGuard)
export class LiveActionController {
constructor(@Inject(LiveActionService) private readonly liveActionService: LiveActionService) {}
@Get('projects/:projectId/live-action/actor-profiles')
listActorProfiles(@CurrentUser() user: AuthRequestUser, @Param('projectId') projectId: string) {
return this.liveActionService.listActorProfiles(user, projectId);
}
@Post('projects/:projectId/live-action/actor-profiles/generate')
generateActorProfiles(
@CurrentUser() user: AuthRequestUser,
@Param('projectId') projectId: string,
@Body() dto: LiveActionGenerateDto
) {
return this.liveActionService.generateActorProfiles(user, projectId, dto);
}
@Get('episodes/:episodeId/live-action/shots')
listLiveActionShots(@CurrentUser() user: AuthRequestUser, @Param('episodeId') episodeId: string) {
return this.liveActionService.listLiveActionShots(user, episodeId);
}
@Post('episodes/:episodeId/live-action/shots/prepare')
prepareLiveActionShots(
@CurrentUser() user: AuthRequestUser,
@Param('episodeId') episodeId: string,
@Body() dto: LiveActionGenerateDto
) {
return this.liveActionService.prepareLiveActionShots(user, episodeId, dto);
}
@Post('episodes/:episodeId/live-action/keyframes/generate')
generateKeyframes(
@CurrentUser() user: AuthRequestUser,
@Param('episodeId') episodeId: string,
@Body() dto: LiveActionGenerateDto
) {
return this.liveActionService.generateKeyframes(user, episodeId, dto);
}
@Get('episodes/:episodeId/live-action/video-clips')
listVideoClips(@CurrentUser() user: AuthRequestUser, @Param('episodeId') episodeId: string) {
return this.liveActionService.listVideoClips(user, episodeId);
}
@Get('live-action/video-providers')
listVideoProviders(@CurrentUser() user: AuthRequestUser) {
return this.liveActionService.listVideoProviders(user);
}
@Get('episodes/:episodeId/live-action/video-clips/cost-estimate')
estimateVideoClipCost(
@CurrentUser() user: AuthRequestUser,
@Param('episodeId') episodeId: string,
@Query() query: LiveActionCostEstimateQueryDto
) {
return this.liveActionService.estimateVideoClipCost(user, episodeId, query.provider_code);
}
@Get('episodes/:episodeId/live-action/video-clips/preflight')
preflightVideoClips(
@CurrentUser() user: AuthRequestUser,
@Param('episodeId') episodeId: string,
@Query() query: LiveActionPreflightQueryDto
) {
return this.liveActionService.preflightVideoClips(user, episodeId, query);
}
@Post('episodes/:episodeId/live-action/shots/:shotId/keyframe')
attachShotKeyframe(
@CurrentUser() user: AuthRequestUser,
@Param('episodeId') episodeId: string,
@Param('shotId') shotId: string,
@Body() dto: LiveActionAttachKeyframeDto
) {
return this.liveActionService.attachShotKeyframe(user, episodeId, shotId, dto);
}
@Post('episodes/:episodeId/live-action/shots/:shotId/video-clip/generate')
generateShotVideoClip(
@CurrentUser() user: AuthRequestUser,
@Param('episodeId') episodeId: string,
@Param('shotId') shotId: string,
@Body() dto: LiveActionGenerateDto
) {
return this.liveActionService.generateShotVideoClip(user, episodeId, shotId, dto);
}
@Post('episodes/:episodeId/live-action/video-clips/generate')
generateVideoClips(
@CurrentUser() user: AuthRequestUser,
@Param('episodeId') episodeId: string,
@Body() dto: LiveActionGenerateDto
) {
return this.liveActionService.generateVideoClips(user, episodeId, dto);
}
@Post('live-action/video-clips/:clipId/retry')
retryVideoClip(
@CurrentUser() user: AuthRequestUser,
@Param('clipId') clipId: string,
@Body() dto: LiveActionGenerateDto
) {
return this.liveActionService.retryVideoClip(user, clipId, dto);
}
@Post('live-action/video-clips/:clipId/quality-check')
checkVideoClipQuality(
@CurrentUser() user: AuthRequestUser,
@Param('clipId') clipId: string,
@Body() dto: LiveActionQualityCheckDto
) {
return this.liveActionService.checkVideoClipQuality(user, clipId, dto);
}
@Post('live-action/video-clips/:clipId/manual-review')
manualReviewVideoClip(
@CurrentUser() user: AuthRequestUser,
@Param('clipId') clipId: string,
@Body() dto: LiveActionManualReviewDto
) {
return this.liveActionService.manualReviewVideoClip(user, clipId, dto);
}
@Post('live-action/video-clips/:clipId/select-candidate')
selectVideoClipCandidate(@CurrentUser() user: AuthRequestUser, @Param('clipId') clipId: string) {
return this.liveActionService.selectVideoClipCandidate(user, clipId);
}
@Post('episodes/:episodeId/live-action/render')
renderLiveActionEpisode(
@CurrentUser() user: AuthRequestUser,
@Param('episodeId') episodeId: string,
@Body() dto: LiveActionGenerateDto
) {
return this.liveActionService.renderLiveActionEpisode(user, episodeId, dto);
}
}