@sendinel/mcp-server 1.0.50 → 1.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/tools/campaigns.js +6 -4
- package/package.json +1 -1
package/build/tools/campaigns.js
CHANGED
|
@@ -714,8 +714,9 @@ export function registerCampaignTools(server) {
|
|
|
714
714
|
variant_label: z.string().optional().default('A').describe('Variant label for A/B testing (default: A). Use B, C, etc. for additional variants.'),
|
|
715
715
|
survey_id: z.string().uuid().optional(),
|
|
716
716
|
brand_asset_ids: z.array(z.string().uuid()).optional().describe('Stable brand_media_assets ids explicitly referenced by this step.'),
|
|
717
|
+
skip_if_event: z.string().trim().min(1).optional().describe('Skip this step at send time if the contact already has an event with this name; the journey continues.'),
|
|
717
718
|
},
|
|
718
|
-
}, async ({ campaign_id, step_order, subject, body_html, body_text, blocks, delay_days, delay_hours, variant_label, survey_id, brand_asset_ids }) => {
|
|
719
|
+
}, async ({ campaign_id, step_order, subject, body_html, body_text, blocks, delay_days, delay_hours, variant_label, survey_id, brand_asset_ids, skip_if_event }) => {
|
|
719
720
|
const renderVars = {};
|
|
720
721
|
if (survey_id) {
|
|
721
722
|
const surveyLink = await resolveSurveyShortLink(db(), getProjectId(), survey_id);
|
|
@@ -730,7 +731,7 @@ export function registerCampaignTools(server) {
|
|
|
730
731
|
const renderedText = body_text !== undefined && survey_id ? renderTemplateVars(body_text, renderVars) : body_text;
|
|
731
732
|
const { data, error } = await db()
|
|
732
733
|
.from('campaign_steps')
|
|
733
|
-
.insert({ campaign_id, step_order, subject: renderedSubject, body_html: renderedHtml, body_text: renderedText ?? (normalizedBlocks?.length ? blocksToText(normalizedBlocks) : undefined), blocks: normalizedBlocks ?? null, delay_days, delay_hours, variant_label: variant_label ?? 'A' })
|
|
734
|
+
.insert({ campaign_id, step_order, subject: renderedSubject, body_html: renderedHtml, body_text: renderedText ?? (normalizedBlocks?.length ? blocksToText(normalizedBlocks) : undefined), blocks: normalizedBlocks ?? null, delay_days, delay_hours, variant_label: variant_label ?? 'A', skip_if_event: skip_if_event ?? null })
|
|
734
735
|
.select()
|
|
735
736
|
.single();
|
|
736
737
|
if (error)
|
|
@@ -3039,7 +3040,7 @@ Return ONLY valid JSON with this exact shape:
|
|
|
3039
3040
|
return j({ error: campaignErr?.message ?? 'Campaign not found', code: 'NOT_FOUND' });
|
|
3040
3041
|
const { data, error } = await db()
|
|
3041
3042
|
.from('campaign_steps')
|
|
3042
|
-
.select('id, step_order, subject, body_html, body_text, blocks, delay_days, delay_hours, created_at, updated_at')
|
|
3043
|
+
.select('id, step_order, subject, body_html, body_text, blocks, delay_days, delay_hours, skip_if_event, created_at, updated_at')
|
|
3043
3044
|
.eq('campaign_id', campaign_id)
|
|
3044
3045
|
.order('step_order', { ascending: true });
|
|
3045
3046
|
if (error)
|
|
@@ -3065,6 +3066,7 @@ Return ONLY valid JSON with this exact shape:
|
|
|
3065
3066
|
delay_hours: z.number().int().min(0).optional(),
|
|
3066
3067
|
step_order: z.number().int().min(0).optional(),
|
|
3067
3068
|
survey_id: z.string().uuid().optional(),
|
|
3069
|
+
skip_if_event: z.string().trim().min(1).nullable().optional().describe('Event name that skips this step at send time; null clears the rule.'),
|
|
3068
3070
|
},
|
|
3069
3071
|
}, async ({ step_id, ...updates }) => {
|
|
3070
3072
|
const projectId = getProjectId();
|
|
@@ -3105,7 +3107,7 @@ Return ONLY valid JSON with this exact shape:
|
|
|
3105
3107
|
.from('campaign_steps')
|
|
3106
3108
|
.update({ ...renderedUpdates, updated_at: new Date().toISOString() })
|
|
3107
3109
|
.eq('id', step_id)
|
|
3108
|
-
.select('id, step_order, subject, delay_days, delay_hours, updated_at')
|
|
3110
|
+
.select('id, step_order, subject, delay_days, delay_hours, skip_if_event, updated_at')
|
|
3109
3111
|
.single();
|
|
3110
3112
|
if (error)
|
|
3111
3113
|
return j({ error: error.message });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendinel/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.51",
|
|
4
4
|
"description": "AI-controlled email operations control plane for campaigns, contacts, segments, analytics, and multi-provider sending via MCP.",
|
|
5
5
|
"mcpName": "ai.sendinel/mcp-server",
|
|
6
6
|
"type": "module",
|