fileserver/dto/responses/fs.ts

31 lines
674 B
TypeScript

import { BaseResponse, SuccessResponse } from './base';
export type UploadFileResponse = SuccessResponse;
export type DeleteResponse = SuccessResponse;
export type CreateFileResponse = CreateFolderResponse;
export interface GetRootResponse extends BaseResponse {
statusCode: 200;
rootId: number;
}
export interface GetNodeResponse extends BaseResponse {
statusCode: 200;
id: number;
name: string;
isFile: boolean;
parent: number | null;
children?: number[];
size?: number;
}
export interface GetPathResponse extends BaseResponse {
statusCode: 200;
path: string;
}
export interface CreateFolderResponse extends BaseResponse {
statusCode: 200;
id: number;
}