import { definePlay } from 'deepline';
type InboundLead = {
email: string;
company_domain?: string;
source?: string;
};
export default definePlay(
'inbound-lead',
async (_ctx, input: InboundLead) => ({
email: input.email,
company_domain: input.company_domain ?? null,
source: input.source ?? 'webhook',
}),
{
description: 'Accept an authenticated inbound lead for downstream routing.',
webhook: {
auth: {
type: 'standard-webhooks',
headerFamily: 'standard',
signingSecrets: ['INBOUND_RELAY_WEBHOOK_SECRET'],
toleranceSeconds: 300,
},
},
},
);