smartlead-mcp-server
Version:
MCP server for Smartlead campaign management integration. Features include creating campaigns, updating campaign settings, and managing campaign sequences.
173 lines • 6.07 kB
JavaScript
// Type definitions for SmartDelivery functionality
// Type guards
export function isGetRegionWiseProvidersParams(args) {
// Since this tool doesn't require specific parameters, any object is valid
return typeof args === 'object' && args !== null;
}
export function isCreateManualPlacementTestParams(args) {
if (typeof args !== 'object' || args === null)
return false;
const params = args;
return (typeof params.test_name === 'string' &&
Array.isArray(params.spam_filters) &&
typeof params.link_checker === 'boolean' &&
typeof params.campaign_id === 'number' &&
typeof params.sequence_mapping_id === 'number' &&
Array.isArray(params.provider_ids) &&
Array.isArray(params.sender_accounts) &&
typeof params.all_email_sent_without_time_gap === 'boolean' &&
typeof params.min_time_btwn_emails === 'number' &&
typeof params.min_time_unit === 'string' &&
typeof params.is_warmup === 'boolean');
}
export function isCreateAutomatedPlacementTestParams(args) {
if (!isCreateManualPlacementTestParams(args))
return false;
const params = args;
return (typeof params.schedule_start_time === 'string' &&
typeof params.test_end_date === 'string' &&
typeof params.every_days === 'number' &&
typeof params.tz === 'string' &&
Array.isArray(params.days));
}
export function isGetSpamTestDetailsParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isDeleteSmartDeliveryTestsParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spamTestIds' in args &&
Array.isArray(args.spamTestIds) &&
args.spamTestIds.every(id => typeof id === 'number'));
}
export function isStopAutomatedTestParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isListAllTestsParams(args) {
if (typeof args !== 'object' || args === null)
return false;
const params = args;
return (params.testType === 'manual' || params.testType === 'auto');
}
export function isProviderWiseReportParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isGroupWiseReportParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isSenderAccountWiseReportParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isSpamFilterDetailsParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isDkimDetailsParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isSpfDetailsParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isRdnsDetailsParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isSenderAccountsParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isBlacklistParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isEmailContentParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isIpAnalyticsParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isEmailHeadersParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number' &&
'reply_id' in args &&
typeof args.reply_id === 'number');
}
export function isScheduleHistoryParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number');
}
export function isIpDetailsParams(args) {
return (typeof args === 'object' &&
args !== null &&
'spam_test_id' in args &&
typeof args.spam_test_id === 'number' &&
'reply_id' in args &&
typeof args.reply_id === 'number');
}
export function isMailboxSummaryParams(args) {
return typeof args === 'object' && args !== null;
}
export function isMailboxCountParams(args) {
return typeof args === 'object' && args !== null;
}
export function isGetAllFoldersParams(args) {
return typeof args === 'object' && args !== null;
}
export function isCreateFolderParams(args) {
return (typeof args === 'object' &&
args !== null &&
'name' in args &&
typeof args.name === 'string');
}
export function isGetFolderByIdParams(args) {
return (typeof args === 'object' &&
args !== null &&
'folder_id' in args &&
typeof args.folder_id === 'number');
}
export function isDeleteFolderParams(args) {
return (typeof args === 'object' &&
args !== null &&
'folder_id' in args &&
typeof args.folder_id === 'number');
}
//# sourceMappingURL=smartDelivery.js.map