Init: First Commit
一个初始的版本
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
declare namespace API {
|
||||
interface Response<D> {
|
||||
status: "Success" | "Failed";
|
||||
msg: string;
|
||||
data: D;
|
||||
}
|
||||
|
||||
interface PageResponse<D> extends Response<D> {
|
||||
count: number;
|
||||
}
|
||||
}
|
||||
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
declare namespace API {
|
||||
namespace Gallery {
|
||||
export interface ICateData {
|
||||
id: number
|
||||
name: string
|
||||
slug: string
|
||||
url: string
|
||||
description: string
|
||||
hidden: boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
declare namespace API {
|
||||
namespace Media {
|
||||
// 数据库本来的数据
|
||||
export interface IMediaBaseData {
|
||||
title: string
|
||||
origin_name: string
|
||||
content: string
|
||||
cate: number
|
||||
key: string
|
||||
hidden: boolean
|
||||
hidden_ref: boolean
|
||||
is_sensitive: boolean
|
||||
take_time: string
|
||||
modified: number | string // 文件修改时间
|
||||
photo?: File
|
||||
}
|
||||
|
||||
// 后端加的数据
|
||||
export interface IMediaExtraData extends IMediaBaseData {
|
||||
file_name: string
|
||||
type: string
|
||||
meta: unknown
|
||||
path: string
|
||||
|
||||
likes: number
|
||||
created_at: string
|
||||
updated_at: string
|
||||
|
||||
url: string
|
||||
thumb_url: string
|
||||
}
|
||||
|
||||
export interface IMediaData extends IMediaExtraData {
|
||||
id: number
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+69
@@ -0,0 +1,69 @@
|
||||
declare namespace API {
|
||||
namespace Note {
|
||||
enum NoteType {
|
||||
Private,
|
||||
Friends,
|
||||
Limited,
|
||||
Public,
|
||||
}
|
||||
|
||||
interface INoteMusic {
|
||||
id: number;
|
||||
type?: "netease";
|
||||
title: string;
|
||||
artist: string;
|
||||
album: string;
|
||||
cover: string;
|
||||
}
|
||||
|
||||
interface INoteQuery {
|
||||
page: number;
|
||||
year?: number;
|
||||
month?: number;
|
||||
search?: string;
|
||||
}
|
||||
|
||||
interface INoteDetailQuery {
|
||||
id: number;
|
||||
year?: number;
|
||||
}
|
||||
|
||||
// 旧数据兼容
|
||||
interface INotePhotoData {
|
||||
year: number | string;
|
||||
name: string;
|
||||
type: string;
|
||||
url: string;
|
||||
}
|
||||
|
||||
interface INoteData {
|
||||
id: number;
|
||||
title: string;
|
||||
content: string;
|
||||
except: string;
|
||||
content_html: string;
|
||||
|
||||
date: string;
|
||||
mood: number;
|
||||
weather: number;
|
||||
status: number;
|
||||
type: NoteType;
|
||||
time_spent: number;
|
||||
music?: INoteMusic;
|
||||
starred: boolean;
|
||||
unlocked?: boolean;
|
||||
|
||||
media: any[];
|
||||
photo?: INotePhotoData[];
|
||||
|
||||
year?: string;
|
||||
|
||||
time: number;
|
||||
|
||||
likes: number;
|
||||
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user