mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
added types
This commit is contained in:
parent
cb8ca5248d
commit
56d714d655
1 changed files with 56 additions and 4 deletions
|
@ -32,8 +32,60 @@ export interface IDialogProps {
|
||||||
onDialogChange: (dialog: ValueOf<typeof DIALOGS>) => void;
|
onDialogChange: (dialog: ValueOf<typeof DIALOGS>) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IResultWithStatus<T> {
|
export interface IApiErrorResult {
|
||||||
status: number;
|
detail?: string;
|
||||||
data: T;
|
code?: string;
|
||||||
error?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IResultWithStatus<T> {
|
||||||
|
status: any;
|
||||||
|
data?: Partial<T> & IApiErrorResult;
|
||||||
|
error?: string;
|
||||||
|
debug?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type UUID = string;
|
||||||
|
|
||||||
|
export interface IFile {
|
||||||
|
id: UUID;
|
||||||
|
user_id: UUID;
|
||||||
|
node_id: UUID;
|
||||||
|
|
||||||
|
name: string;
|
||||||
|
path: string;
|
||||||
|
full_path: string;
|
||||||
|
size: number;
|
||||||
|
|
||||||
|
type: 'image' | 'text' | 'audio' | 'video';
|
||||||
|
mime: MimeType;
|
||||||
|
|
||||||
|
createdAt: string;
|
||||||
|
updatedAt: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface INode {
|
||||||
|
id?: UUID;
|
||||||
|
user_id: UUID;
|
||||||
|
|
||||||
|
files: IFile[];
|
||||||
|
|
||||||
|
cover: IFile['id'];
|
||||||
|
type: 'image';
|
||||||
|
|
||||||
|
brief?: {
|
||||||
|
thumbnail?: string;
|
||||||
|
description?: string;
|
||||||
|
owner?: string;
|
||||||
|
comments?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
options: {
|
||||||
|
flow: {
|
||||||
|
display: 'single' | 'double' | 'quadro';
|
||||||
|
has_description: boolean;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
createdAt?: string;
|
||||||
|
updatedAt?: string;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue