### What problem does this PR solve? Allow member view agent # Canvas editor  # List agent  # Setting  _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe): --------- Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
88 lines
1.4 KiB
TypeScript
88 lines
1.4 KiB
TypeScript
import api from '@/utils/api';
|
|
import registerServer from '@/utils/register-server';
|
|
import request from '@/utils/request';
|
|
|
|
const {
|
|
getCanvas,
|
|
getCanvasSSE,
|
|
setCanvas,
|
|
getListVersion,
|
|
getVersion,
|
|
listCanvas,
|
|
resetCanvas,
|
|
removeCanvas,
|
|
runCanvas,
|
|
listTemplates,
|
|
testDbConnect,
|
|
getInputElements,
|
|
debug,
|
|
listCanvasTeam,
|
|
settingCanvas,
|
|
} = api;
|
|
|
|
const methods = {
|
|
getCanvas: {
|
|
url: getCanvas,
|
|
method: 'get',
|
|
},
|
|
getCanvasSSE: {
|
|
url: getCanvasSSE,
|
|
method: 'get',
|
|
},
|
|
setCanvas: {
|
|
url: setCanvas,
|
|
method: 'post',
|
|
},
|
|
getListVersion: {
|
|
url: getListVersion,
|
|
method: 'get',
|
|
},
|
|
getVersion: {
|
|
url: getVersion,
|
|
method: 'get',
|
|
},
|
|
listCanvas: {
|
|
url: listCanvas,
|
|
method: 'get',
|
|
},
|
|
resetCanvas: {
|
|
url: resetCanvas,
|
|
method: 'post',
|
|
},
|
|
removeCanvas: {
|
|
url: removeCanvas,
|
|
method: 'post',
|
|
},
|
|
runCanvas: {
|
|
url: runCanvas,
|
|
method: 'post',
|
|
},
|
|
listTemplates: {
|
|
url: listTemplates,
|
|
method: 'get',
|
|
},
|
|
testDbConnect: {
|
|
url: testDbConnect,
|
|
method: 'post',
|
|
},
|
|
getInputElements: {
|
|
url: getInputElements,
|
|
method: 'get',
|
|
},
|
|
debugSingle: {
|
|
url: debug,
|
|
method: 'post',
|
|
},
|
|
listCanvasTeam: {
|
|
url: listCanvasTeam,
|
|
method: 'get',
|
|
},
|
|
settingCanvas: {
|
|
url: settingCanvas,
|
|
method: 'post',
|
|
},
|
|
} as const;
|
|
|
|
const flowService = registerServer<keyof typeof methods>(methods, request);
|
|
|
|
export default flowService;
|