UNPKG

smartlead-mcp-server

Version:

MCP server for Smartlead campaign management integration. Features include creating campaigns, updating campaign settings, and managing campaign sequences.

57 lines 2.43 kB
// Type definitions for Webhooks functionality // Webhook event types export var WebhookEventType; (function (WebhookEventType) { WebhookEventType["EMAIL_SENT"] = "EMAIL_SENT"; WebhookEventType["EMAIL_OPEN"] = "EMAIL_OPEN"; WebhookEventType["EMAIL_LINK_CLICK"] = "EMAIL_LINK_CLICK"; WebhookEventType["EMAIL_REPLY"] = "EMAIL_REPLY"; WebhookEventType["LEAD_UNSUBSCRIBED"] = "LEAD_UNSUBSCRIBED"; WebhookEventType["LEAD_CATEGORY_UPDATED"] = "LEAD_CATEGORY_UPDATED"; })(WebhookEventType || (WebhookEventType = {})); // Type guards export function isFetchWebhooksByCampaignParams(args) { return (typeof args === 'object' && args !== null && 'campaign_id' in args && typeof args.campaign_id === 'string'); } export function isUpsertCampaignWebhookParams(args) { if (typeof args !== 'object' || args === null) return false; const params = args; return (typeof params.campaign_id === 'string' && typeof params.name === 'string' && typeof params.webhook_url === 'string' && Array.isArray(params.event_types) && params.event_types.every(type => Object.values(WebhookEventType).includes(type)) && (params.categories === undefined || (Array.isArray(params.categories) && params.categories.every(category => typeof category === 'string'))) && (params.id === undefined || params.id === null || typeof params.id === 'number')); } export function isDeleteCampaignWebhookParams(args) { return (typeof args === 'object' && args !== null && 'campaign_id' in args && typeof args.campaign_id === 'string' && 'id' in args && typeof args.id === 'number'); } export function isGetWebhooksPublishSummaryParams(args) { if (typeof args !== 'object' || args === null) return false; const params = args; return (typeof params.campaign_id === 'string' && (params.fromTime === undefined || typeof params.fromTime === 'string') && (params.toTime === undefined || typeof params.toTime === 'string')); } export function isRetriggerFailedEventsParams(args) { if (typeof args !== 'object' || args === null) return false; const params = args; return (typeof params.campaign_id === 'string' && typeof params.fromTime === 'string' && typeof params.toTime === 'string'); } //# sourceMappingURL=webhooks.js.map