feat(mcp): support serial invoice workflows

This commit is contained in:
2026-09-09 14:30:42 +02:00
parent d0bc8a5e0f
commit 2ec162c0e7
5 changed files with 172 additions and 22 deletions

View File

@@ -296,15 +296,14 @@ export default async function functionRoutes(server: FastifyInstance) {
})
server.post('/functions/serial/start', async (req, reply) => {
console.log(req.body)
const {executionDate,templateIds,tenantId} = req.body as {executionDate:string,templateIds:Number[],tenantId:Number}
await executeManualGeneration(server,executionDate,templateIds,tenantId,req.user.user_id)
const {executionDate, templateIds} = req.body as {executionDate:string, templateIds:number[]}
return executeManualGeneration(server, executionDate, templateIds, req.user.tenant_id, req.user.user_id)
})
server.post('/functions/serial/finish/:execution_id', async (req, reply) => {
const {execution_id} = req.params as { execution_id: string }
//@ts-ignore
await finishManualGeneration(server,execution_id)
return finishManualGeneration(server, execution_id, req.user.tenant_id)
})
server.post('/functions/services/bankstatementsync', async (req, reply) => {