Skip to main content
Glama

mcp-google-sheets

trigger-event-controller.ts1.44 kB
import { ListTriggerEventsRequest, SaveTriggerEventRequest, } from '@activepieces/shared' import { FastifyPluginAsyncTypebox } from '@fastify/type-provider-typebox' import { flowService } from '../../flows/flow/flow.service' import { triggerEventService } from './trigger-event.service' const DEFAULT_PAGE_SIZE = 10 export const triggerEventController: FastifyPluginAsyncTypebox = async (fastify) => { fastify.post('/', SaveTriggerEventRequestParams, async (request) => { return triggerEventService(request.log).saveEvent({ projectId: request.principal.projectId, flowId: request.body.flowId, payload: request.body.mockData, }) }) fastify.get('/', ListTriggerEventsRequestParams, async (request) => { const flow = await flowService(request.log).getOnePopulatedOrThrow({ id: request.query.flowId, projectId: request.principal.projectId, }) return triggerEventService(request.log).list({ projectId: request.principal.projectId, flow, cursor: request.query.cursor ?? null, limit: request.query.limit ?? DEFAULT_PAGE_SIZE, }) }, ) } const ListTriggerEventsRequestParams = { schema: { querystring: ListTriggerEventsRequest, }, } const SaveTriggerEventRequestParams = { schema: { body: SaveTriggerEventRequest, }, }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server