@sendinel/mcp-server 1.0.5 → 1.0.6
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/data.js +20 -4
- package/package.json +1 -1
package/build/tools/data.js
CHANGED
|
@@ -138,9 +138,10 @@ function createCampaignMigrationTotals(options) {
|
|
|
138
138
|
},
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
function createPlatformMigrationTotals(artifactTypes) {
|
|
141
|
+
function createPlatformMigrationTotals(artifactTypes, platform) {
|
|
142
142
|
const requested = artifactTypes?.length ? new Set(artifactTypes) : null;
|
|
143
|
-
const
|
|
143
|
+
const customerIoOnly = new Set(['newsletters', 'broadcasts', 'transactional', 'snippets', 'collections', 'messages']);
|
|
144
|
+
const enabled = (key) => (!customerIoOnly.has(key) || platform === 'customerio') && (!requested || requested.has(key));
|
|
144
145
|
return {
|
|
145
146
|
contacts: { total: enabled('contacts') ? 1 : 0, processed: 0 },
|
|
146
147
|
templates: { total: enabled('templates') ? 1 : 0, processed: 0 },
|
|
@@ -148,6 +149,12 @@ function createPlatformMigrationTotals(artifactTypes) {
|
|
|
148
149
|
suppressions: { total: enabled('suppressions') ? 1 : 0, processed: 0 },
|
|
149
150
|
segments: { total: enabled('segments') ? 1 : 0, processed: 0 },
|
|
150
151
|
enrollments: { total: enabled('enrollments') ? 1 : 0, processed: 0 },
|
|
152
|
+
newsletters: { total: enabled('newsletters') ? 1 : 0, processed: 0 },
|
|
153
|
+
broadcasts: { total: enabled('broadcasts') ? 1 : 0, processed: 0 },
|
|
154
|
+
transactional: { total: enabled('transactional') ? 1 : 0, processed: 0 },
|
|
155
|
+
snippets: { total: enabled('snippets') ? 1 : 0, processed: 0 },
|
|
156
|
+
collections: { total: enabled('collections') ? 1 : 0, processed: 0 },
|
|
157
|
+
messages: { total: enabled('messages') ? 1 : 0, processed: 0 },
|
|
151
158
|
processed: 0,
|
|
152
159
|
errors: 0,
|
|
153
160
|
account_name: 'Platform migration',
|
|
@@ -158,6 +165,12 @@ function createPlatformMigrationTotals(artifactTypes) {
|
|
|
158
165
|
import_suppressions: enabled('suppressions'),
|
|
159
166
|
import_segments: enabled('segments'),
|
|
160
167
|
import_enrollments: enabled('enrollments'),
|
|
168
|
+
import_newsletters: enabled('newsletters'),
|
|
169
|
+
import_broadcasts: enabled('broadcasts'),
|
|
170
|
+
import_transactional: enabled('transactional'),
|
|
171
|
+
import_snippets: enabled('snippets'),
|
|
172
|
+
import_collections: enabled('collections'),
|
|
173
|
+
import_messages: enabled('messages'),
|
|
161
174
|
migration_entry_point: 'mcp_connection',
|
|
162
175
|
},
|
|
163
176
|
};
|
|
@@ -637,7 +650,10 @@ export function registerDataTools(server) {
|
|
|
637
650
|
description: 'Start a migration from a stored external platform connection into Sendinel. Returns a job_id for status polling.',
|
|
638
651
|
inputSchema: {
|
|
639
652
|
connection_id: z.string().uuid(),
|
|
640
|
-
artifact_types: z.array(z.enum([
|
|
653
|
+
artifact_types: z.array(z.enum([
|
|
654
|
+
'contacts', 'templates', 'campaigns', 'suppressions', 'segments', 'enrollments',
|
|
655
|
+
'newsletters', 'broadcasts', 'transactional', 'snippets', 'collections', 'messages',
|
|
656
|
+
])).optional(),
|
|
641
657
|
dry_run: z.boolean().optional().default(false),
|
|
642
658
|
},
|
|
643
659
|
}, async ({ connection_id, artifact_types, dry_run = false }) => {
|
|
@@ -669,7 +685,7 @@ export function registerDataTools(server) {
|
|
|
669
685
|
provider: connection.platform,
|
|
670
686
|
status: 'pending',
|
|
671
687
|
progress_pct: 0,
|
|
672
|
-
totals: createPlatformMigrationTotals(artifact_types),
|
|
688
|
+
totals: createPlatformMigrationTotals(artifact_types, connection.platform),
|
|
673
689
|
errors: [],
|
|
674
690
|
credentials_enc: encrypt(JSON.stringify(credentials)),
|
|
675
691
|
field_mapping: null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendinel/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
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",
|