feat: implement project relational data platform

This commit is contained in:
xuelong committed 2026-07-30 11:51:46 +08:00
1 parent 506621966e
commit ada281862e
12 files changed
+2534 -189

No files matched your search

+42
View File
@@ -115,6 +115,48 @@ export const listGraphReleases = (projectId: string) =>
api.get(`/projects/${encodeURIComponent(projectId)}/graph-releases`);
export const createGraphRelease = (projectId: string, data: unknown) =>
api.post(`/projects/${encodeURIComponent(projectId)}/graph-releases`, data);
// ── Project relational data platform ──
export const listProjectDatabases = () =>
api.get("/data-platform/databases");
export const listProjectDataTables = (projectId: string) =>
api.get(`/data-platform/databases/${encodeURIComponent(projectId)}/tables`);
export const listProjectTableRecords = (
projectId: string,
tableCode: string,
params?: Record<string, unknown>,
) =>
api.get(
`/data-platform/databases/${encodeURIComponent(projectId)}/tables/${encodeURIComponent(tableCode)}/records`,
{ params },
);
export const createProjectTableRecord = (
projectId: string,
tableCode: string,
data: unknown,
) =>
api.post(
`/data-platform/databases/${encodeURIComponent(projectId)}/tables/${encodeURIComponent(tableCode)}/records`,
data,
);
export const updateProjectTableRecord = (
projectId: string,
tableCode: string,
recordId: string,
data: unknown,
) =>
api.patch(
`/data-platform/databases/${encodeURIComponent(projectId)}/tables/${encodeURIComponent(tableCode)}/records/${encodeURIComponent(recordId)}`,
data,
);
export const deleteProjectTableRecord = (
projectId: string,
tableCode: string,
recordId: string,
) =>
api.delete(
`/data-platform/databases/${encodeURIComponent(projectId)}/tables/${encodeURIComponent(tableCode)}/records/${encodeURIComponent(recordId)}`,
);
export const listOntologySchemas = () => api.get("/ontology-schemas");
export const getCurrentOntologySchema = () => api.get("/ontology-schemas/current");
export const getOntologySchema = (schemaId: string | number) =>