2026-03-10 18:30:18 +09:00
|
|
|
import { apiClient } from "./client";
|
2025-09-26 17:12:03 +09:00
|
|
|
|
|
|
|
|
export interface ScreenFileInfo {
|
|
|
|
|
objid: string;
|
|
|
|
|
savedFileName: string;
|
|
|
|
|
realFileName: string;
|
|
|
|
|
fileSize: number;
|
|
|
|
|
fileExt: string;
|
|
|
|
|
filePath: string;
|
|
|
|
|
docType: string;
|
|
|
|
|
docTypeName: string;
|
|
|
|
|
targetObjid: string;
|
|
|
|
|
parentTargetObjid?: string;
|
|
|
|
|
writer: string;
|
|
|
|
|
regdate: string;
|
|
|
|
|
status: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ScreenComponentFilesResponse {
|
|
|
|
|
success: boolean;
|
|
|
|
|
componentFiles: { [componentId: string]: ScreenFileInfo[] };
|
|
|
|
|
totalFiles: number;
|
|
|
|
|
componentCount: number;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ComponentFilesResponse {
|
|
|
|
|
success: boolean;
|
|
|
|
|
files: ScreenFileInfo[];
|
|
|
|
|
componentId: string;
|
|
|
|
|
screenId: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const ScreenFileAPI = {
|
|
|
|
|
/**
|
|
|
|
|
* 화면의 모든 컴포넌트별 파일 정보 조회
|
|
|
|
|
*/
|
|
|
|
|
async getScreenComponentFiles(screenId: number): Promise<ScreenComponentFilesResponse> {
|
|
|
|
|
const response = await apiClient.get(`/screen-files/screens/${screenId}/components/files`);
|
|
|
|
|
return response.data;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 특정 컴포넌트의 파일 목록 조회
|
|
|
|
|
*/
|
|
|
|
|
async getComponentFiles(screenId: number, componentId: string): Promise<ComponentFilesResponse> {
|
|
|
|
|
const response = await apiClient.get(`/screen-files/screens/${screenId}/components/${componentId}/files`);
|
|
|
|
|
return response.data;
|
2026-03-10 18:30:18 +09:00
|
|
|
},
|
2025-09-26 17:12:03 +09:00
|
|
|
};
|