mirror of
https://github.com/blossom-editor/blossom
synced 2024-11-17 22:48:03 +08:00
补充API
This commit is contained in:
parent
3b11031966
commit
887f4c6a7a
@ -15,9 +15,12 @@ export const userinfoApi = (params?: object): Promise<R<any>> => {
|
||||
* @param params
|
||||
* @returns
|
||||
*/
|
||||
export const docTreeApi = (params?: object): Promise<R<any>> => {
|
||||
export const docTreeOpenApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/doc/trees/open', { params })
|
||||
}
|
||||
export const docTreeApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/doc/trees', { params })
|
||||
}
|
||||
|
||||
/**
|
||||
* 专题列表
|
||||
@ -56,3 +59,7 @@ export const articleWordLineApi = (params?: object): Promise<R<any>> => {
|
||||
export const articleInfoOpenApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/article/open/info', { params })
|
||||
}
|
||||
|
||||
export const articleInfoApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/article/info', { params })
|
||||
}
|
||||
|
22
blossom-web/src/api/plan.ts
Normal file
22
blossom-web/src/api/plan.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { defaultRequest as rq } from "./request";
|
||||
import type { R } from "./request";
|
||||
|
||||
export const planListDayApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>("/plan/list/day", { params });
|
||||
}
|
||||
|
||||
export const planListDailyApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>("/plan/list/daily", { params });
|
||||
}
|
||||
|
||||
export const planAddDailyApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>("/plan/add/daily", data);
|
||||
}
|
||||
|
||||
export const planAddDayApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>("/plan/add/day", data);
|
||||
}
|
||||
|
||||
export const planDelApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>("/plan/del", data);
|
||||
}
|
138
blossom-web/src/api/todo.ts
Normal file
138
blossom-web/src/api/todo.ts
Normal file
@ -0,0 +1,138 @@
|
||||
import { defaultRequest as rq } from './request'
|
||||
import type { R } from './request'
|
||||
|
||||
/**
|
||||
* 任务统计
|
||||
*/
|
||||
export const taskStatApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/todo/task/stat', { params })
|
||||
}
|
||||
|
||||
/**
|
||||
* 事项统计
|
||||
*/
|
||||
export const todoStatApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/todo/stat', { params })
|
||||
}
|
||||
|
||||
//#region ---------------------------------------- todo ----------------------------------------
|
||||
|
||||
/**
|
||||
* 事项列表
|
||||
*/
|
||||
export const todosApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/todo/list', { params })
|
||||
}
|
||||
|
||||
/**
|
||||
* 事项列表
|
||||
*/
|
||||
export const countTaskApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/todo/task/count', { params })
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增阶段性事项
|
||||
*/
|
||||
export const addPhasedApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/add/phased', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改阶段性事项的名称
|
||||
*/
|
||||
export const updTodoNameApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/upd/name', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成阶段性事项
|
||||
*/
|
||||
export const openTodoApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/open', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成阶段性事项
|
||||
*/
|
||||
export const completedTodoApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/completed', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成阶段性事项
|
||||
*/
|
||||
export const exportTodoApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/todo/export', { params })
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region ---------------------------------------- task ----------------------------------------
|
||||
/**
|
||||
* 某天或某个事项的任务列表
|
||||
*/
|
||||
export const tasksApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/todo/task/list', { params })
|
||||
}
|
||||
|
||||
/**
|
||||
* 某天或某个事项的任务列表
|
||||
*/
|
||||
export const taskInfoApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/todo/task/info', { params })
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
*/
|
||||
export const addTaskApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/task/add', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务的主要信息
|
||||
*/
|
||||
export const updTaskApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/task/upd', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 移动到 waiting
|
||||
*/
|
||||
export const toWaitingApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/task/waiting', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 移动到 processing
|
||||
*/
|
||||
export const toProcessingApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/task/processing', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 移动到 completed
|
||||
*/
|
||||
export const toCompletedApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/task/completed', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除节点
|
||||
*/
|
||||
export const delTaskApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/task/del', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签集合
|
||||
*/
|
||||
export const taskTagsApi = (params?: object): Promise<R<any>> => {
|
||||
return rq.get<R<any>>('/todo/task/tags', { params })
|
||||
}
|
||||
|
||||
export const taskTransferApi = (data?: object): Promise<R<any>> => {
|
||||
return rq.post<R<any>>('/todo/task/transfer', data)
|
||||
}
|
||||
//#endregion
|
Loading…
Reference in New Issue
Block a user