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 { RoleType } from '@activepieces/core-utils'
import { DefaultProjectRole, rolePermissions } from '@activepieces/shared'
import { repoFactory } from '../../core/db/repo-factory'
import { ProjectRoleEntity } from '../../ee/projects/project-role/project-role.entity'
import { system } from '../../helper/system/system'
import { DataSeed } from './data-seed'
const projectMemberRoleRepo = repoFactory(ProjectRoleEntity)
// DO NOT CHANGE THESE IDS OR SHUFFLE THEM
const roleIds: Record<DefaultProjectRole, string> = {
[DefaultProjectRole.ADMIN]: '461ueYHzMykyk5dIL8HzQ',
[DefaultProjectRole.EDITOR]: 'sjWe85TwaFYxyhn2AgOha',
[DefaultProjectRole.VIEWER]: 'aJVBSSJ3YqZ7r1laFjM0a',
}
export const rolesSeed: DataSeed = {
run: async () => {
system.globalLogger().info({ name: 'rolesSeed' }, 'Seeding roles')
for (const role of Object.values(DefaultProjectRole)) {
const permissions = rolePermissions[role]
await projectMemberRoleRepo().upsert({
name: role,
permissions,
type: RoleType.DEFAULT,
id: roleIds[role],
}, ['id'])
}
},
}