Skip to content

Commit 9973906

Browse files
committed
Add project manager core
2 parents e0e15f9 + d9c7f0f commit 9973906

21 files changed

Lines changed: 5891 additions & 0 deletions

client/src/api.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,62 @@ export async function getModelArchitectures() {
471471
return makeApiRequest("pytc/architectures", "get");
472472
}
473473

474+
// ── Project Manager persistence ───────────────────────────────────────────────
475+
476+
export async function getPMData() {
477+
try {
478+
const res = await apiClient.get("/api/pm/data");
479+
return res.data;
480+
} catch (error) {
481+
handleError(error);
482+
}
483+
}
484+
485+
export async function getPMConfig() {
486+
try {
487+
const res = await apiClient.get("/api/pm/config");
488+
return res.data;
489+
} catch (error) {
490+
handleError(error);
491+
}
492+
}
493+
494+
export async function getPMSchema() {
495+
try {
496+
const res = await apiClient.get("/api/pm/schema");
497+
return res.data;
498+
} catch (error) {
499+
handleError(error);
500+
}
501+
}
502+
503+
export async function updatePMConfig(patch) {
504+
try {
505+
const res = await apiClient.post("/api/pm/config", patch);
506+
return res.data;
507+
} catch (error) {
508+
handleError(error);
509+
}
510+
}
511+
512+
export async function savePMData(state) {
513+
try {
514+
const res = await apiClient.post("/api/pm/data", state);
515+
return res.data;
516+
} catch (error) {
517+
handleError(error);
518+
}
519+
}
520+
521+
export async function resetPMData() {
522+
try {
523+
const res = await apiClient.post("/api/pm/data/reset");
524+
return res.data;
525+
} catch (error) {
526+
handleError(error);
527+
}
528+
}
529+
474530
// ── Workflow spine ───────────────────────────────────────────────────────────
475531

476532
export async function getCurrentWorkflow() {

0 commit comments

Comments
 (0)