mirror of
https://github.com/docmost/docmost.git
synced 2026-08-30 02:25:01 +08:00
feat: kanban view
This commit is contained in:
@@ -23,8 +23,6 @@ import {
|
||||
FilterNode,
|
||||
SearchSpec,
|
||||
ViewSortConfig,
|
||||
CountRowsInput,
|
||||
CountRowsResult,
|
||||
RowReferences,
|
||||
} from "@/ee/base/types/base.types";
|
||||
import { IPagination } from "@/lib/types";
|
||||
@@ -33,8 +31,6 @@ export type IBaseRowsPage = IPagination<IBaseRow> & {
|
||||
references?: RowReferences;
|
||||
};
|
||||
|
||||
// --- Bases ---
|
||||
|
||||
export async function createBase(data: CreateBaseInput): Promise<IBase> {
|
||||
const req = await api.post<IBase>("/bases/create", data);
|
||||
return req.data;
|
||||
@@ -54,8 +50,11 @@ export async function deleteBase(pageId: string): Promise<void> {
|
||||
await api.post("/bases/delete", { pageId });
|
||||
}
|
||||
|
||||
export async function convertPageToBase(pageId: string): Promise<IBase> {
|
||||
const req = await api.post<IBase>("/bases/convert", { pageId });
|
||||
export async function convertPageToBase(
|
||||
pageId: string,
|
||||
template?: "kanban",
|
||||
): Promise<IBase> {
|
||||
const req = await api.post<IBase>("/bases/convert", { pageId, template });
|
||||
return req.data;
|
||||
}
|
||||
|
||||
@@ -87,8 +86,6 @@ export async function listBases(
|
||||
return req.data;
|
||||
}
|
||||
|
||||
// --- Properties ---
|
||||
|
||||
export async function createProperty(
|
||||
data: CreatePropertyInput,
|
||||
): Promise<IBaseProperty> {
|
||||
@@ -116,8 +113,6 @@ export async function reorderProperty(
|
||||
await api.post("/bases/properties/reorder", data);
|
||||
}
|
||||
|
||||
// --- Rows ---
|
||||
|
||||
export async function createRow(data: CreateRowInput): Promise<IBaseRow> {
|
||||
const req = await api.post<IBaseRow>("/bases/rows/create", data);
|
||||
return req.data;
|
||||
@@ -162,13 +157,6 @@ export async function reorderRow(data: ReorderRowInput): Promise<void> {
|
||||
await api.post("/bases/rows/reorder", data);
|
||||
}
|
||||
|
||||
export async function countRows(
|
||||
data: CountRowsInput,
|
||||
): Promise<CountRowsResult> {
|
||||
const req = await api.post<CountRowsResult>("/bases/rows/count", data);
|
||||
return req.data;
|
||||
}
|
||||
|
||||
// --- Views ---
|
||||
|
||||
export async function createView(data: CreateViewInput): Promise<IBaseView> {
|
||||
|
||||
Reference in New Issue
Block a user