AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
import { PersonalProjectsSummary, PrincipalType } from '@activepieces/shared'
import { FastifyPluginAsyncZod } from 'fastify-type-provider-zod'
import { StatusCodes } from 'http-status-codes'
import { z } from 'zod'
import { securityAccess } from '../../../core/security/authorization/fastify-security'
import { platformMustHaveFeatureEnabled } from '../../authentication/ee-authorization'
import { personalProjectsService } from './personal-projects.service'
export const personalProjectsModule: FastifyPluginAsyncZod = async (app) => {
await app.register(personalProjectsController, { prefix: '/v1/personal-projects' })
}
const personalProjectsController: FastifyPluginAsyncZod = async (app) => {
app.get('/summary', SummaryRequest, async (request, reply) => {
await platformMustHaveFeatureEnabled((platform) => platform.plan.projectRolesEnabled).call(app, request, reply)
return personalProjectsService(request.log).summary({ platformId: request.principal.platform.id })
})
app.post('/create-missing', CreateMissingRequest, async (request, reply) => {
await platformMustHaveFeatureEnabled((platform) => platform.plan.projectRolesEnabled).call(app, request, reply)
await personalProjectsService(request.log).turnOnAndCreateMissing({ platformId: request.principal.platform.id })
await reply.status(StatusCodes.ACCEPTED).send()
})
}
const SummaryRequest = {
config: {
security: securityAccess.platformAdminOnly([PrincipalType.USER]),
},
schema: {
response: {
[StatusCodes.OK]: PersonalProjectsSummary,
},
},
}
const CreateMissingRequest = {
config: {
security: securityAccess.platformAdminOnly([PrincipalType.USER]),
},
schema: {
response: {
[StatusCodes.ACCEPTED]: z.never(),
},
},
}