Skip to content

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

579 B
Raw Blame
import { FastifyBaseLogger } from 'fastify'
import { EventDestinationHooks, IsDeliveryEntitledParams } from '../../event-destinations/event-destinations-hooks'
import { platformPlanService } from '../platform/platform-plan/platform-plan.service'

export const eventDestinationEntitlementHooks = (log: FastifyBaseLogger): EventDestinationHooks => ({
    async isDeliveryEntitled({ platformId }: IsDeliveryEntitledParams): Promise<boolean> {
        const plan = await platformPlanService(log).getOrCreateForPlatform(platformId)
        return plan.eventStreamingEnabled
    },
})