You've already forked obsidian-visualiser
Refactoring search, navigation, canvas and others to fit the new data model
This commit is contained in:
39
types/api.ts
Normal file
39
types/api.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
export interface Project {
|
||||
id: number;
|
||||
name: string;
|
||||
owner: number;
|
||||
home: string;
|
||||
}
|
||||
export interface Navigation {
|
||||
title: string;
|
||||
path: string;
|
||||
type: string;
|
||||
order: number
|
||||
children?: Navigation[];
|
||||
}
|
||||
export interface File {
|
||||
id: number;
|
||||
project: number;
|
||||
path: string;
|
||||
title: string;
|
||||
type: 'Markdown' | 'Canvas' | 'File' | 'Folder';
|
||||
content: string;
|
||||
owner: number;
|
||||
}
|
||||
export interface Comment {
|
||||
file: number;
|
||||
user_id: number;
|
||||
sequence: number;
|
||||
position: number;
|
||||
length: number;
|
||||
content: string;
|
||||
}
|
||||
export interface User {
|
||||
id: number;
|
||||
username: string;
|
||||
}
|
||||
export interface Search {
|
||||
projects: Project[];
|
||||
files: File[];
|
||||
users: User[];
|
||||
}
|
||||
@@ -1,8 +1,3 @@
|
||||
export interface Canvas {
|
||||
_id: string;
|
||||
_type: string;
|
||||
body: CanvasContent
|
||||
}
|
||||
export interface CanvasContent {
|
||||
nodes: CanvasNode[];
|
||||
edges: CanvasEdge[];
|
||||
|
||||
Reference in New Issue
Block a user