@netsendo/mcp-client 1.5.1 → 1.6.1

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.
Files changed (71) hide show
  1. package/README.md +127 -2
  2. package/dist/api-client.d.ts +19 -1
  3. package/dist/api-client.d.ts.map +1 -1
  4. package/dist/api-client.js +27 -2
  5. package/dist/api-client.js.map +1 -1
  6. package/dist/bridge.d.ts +23 -0
  7. package/dist/bridge.d.ts.map +1 -0
  8. package/dist/bridge.js +152 -0
  9. package/dist/bridge.js.map +1 -0
  10. package/dist/config.d.ts +1 -9
  11. package/dist/config.d.ts.map +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/tools/annotations.d.ts +18 -0
  14. package/dist/tools/annotations.d.ts.map +1 -0
  15. package/dist/tools/annotations.js +28 -0
  16. package/dist/tools/annotations.js.map +1 -0
  17. package/dist/tools/automations.d.ts +12 -0
  18. package/dist/tools/automations.d.ts.map +1 -0
  19. package/dist/tools/automations.js +184 -0
  20. package/dist/tools/automations.js.map +1 -0
  21. package/dist/tools/campaign-extras.d.ts +175 -0
  22. package/dist/tools/campaign-extras.d.ts.map +1 -0
  23. package/dist/tools/campaign-extras.js +283 -0
  24. package/dist/tools/campaign-extras.js.map +1 -0
  25. package/dist/tools/campaigns.d.ts.map +1 -1
  26. package/dist/tools/campaigns.js +82 -93
  27. package/dist/tools/campaigns.js.map +1 -1
  28. package/dist/tools/custom-fields.d.ts +12 -0
  29. package/dist/tools/custom-fields.d.ts.map +1 -0
  30. package/dist/tools/custom-fields.js +94 -0
  31. package/dist/tools/custom-fields.js.map +1 -0
  32. package/dist/tools/forms.d.ts +10 -0
  33. package/dist/tools/forms.d.ts.map +1 -0
  34. package/dist/tools/forms.js +163 -0
  35. package/dist/tools/forms.js.map +1 -0
  36. package/dist/tools/funnels.js +3 -3
  37. package/dist/tools/funnels.js.map +1 -1
  38. package/dist/tools/index.d.ts.map +1 -1
  39. package/dist/tools/index.js +16 -0
  40. package/dist/tools/index.js.map +1 -1
  41. package/dist/tools/list-import.js +4 -4
  42. package/dist/tools/list-import.js.map +1 -1
  43. package/dist/tools/lists.d.ts.map +1 -1
  44. package/dist/tools/lists.js +208 -97
  45. package/dist/tools/lists.js.map +1 -1
  46. package/dist/tools/messaging.d.ts.map +1 -1
  47. package/dist/tools/messaging.js +2 -1
  48. package/dist/tools/messaging.js.map +1 -1
  49. package/dist/tools/notifications.js +1 -1
  50. package/dist/tools/notifications.js.map +1 -1
  51. package/dist/tools/subscribers.js +2 -2
  52. package/dist/tools/subscribers.js.map +1 -1
  53. package/dist/tools/system-content.d.ts +12 -0
  54. package/dist/tools/system-content.d.ts.map +1 -0
  55. package/dist/tools/system-content.js +150 -0
  56. package/dist/tools/system-content.js.map +1 -0
  57. package/dist/tools/tags.d.ts +11 -0
  58. package/dist/tools/tags.d.ts.map +1 -0
  59. package/dist/tools/tags.js +61 -0
  60. package/dist/tools/tags.js.map +1 -0
  61. package/dist/tools/templates.d.ts +10 -0
  62. package/dist/tools/templates.d.ts.map +1 -0
  63. package/dist/tools/templates.js +294 -0
  64. package/dist/tools/templates.js.map +1 -0
  65. package/dist/tools/webhooks.d.ts +11 -0
  66. package/dist/tools/webhooks.d.ts.map +1 -0
  67. package/dist/tools/webhooks.js +130 -0
  68. package/dist/tools/webhooks.js.map +1 -0
  69. package/dist/types.d.ts +2 -1
  70. package/dist/types.d.ts.map +1 -1
  71. package/package.json +3 -3
@@ -0,0 +1,18 @@
1
+ /**
2
+ * NetSendo MCP Server - Tool annotations
3
+ *
4
+ * Hints for MCP hosts about what a tool does, derived from the tool name so
5
+ * every tool is covered without a per-tool table. Hosts use them to decide
6
+ * which calls need a confirmation from the user:
7
+ * - read-only tools only read data,
8
+ * - destructive tools delete or irreversibly change data.
9
+ * They are hints, not access control: the API enforces permissions.
10
+ */
11
+ export interface ToolAnnotations {
12
+ title: string;
13
+ readOnlyHint: boolean;
14
+ destructiveHint: boolean;
15
+ openWorldHint: boolean;
16
+ }
17
+ export declare function toolAnnotations(name: string): ToolAnnotations;
18
+ //# sourceMappingURL=annotations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../src/tools/annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;CACxB;AAUD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAY7D"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * NetSendo MCP Server - Tool annotations
3
+ *
4
+ * Hints for MCP hosts about what a tool does, derived from the tool name so
5
+ * every tool is covered without a per-tool table. Hosts use them to decide
6
+ * which calls need a confirmation from the user:
7
+ * - read-only tools only read data,
8
+ * - destructive tools delete or irreversibly change data.
9
+ * They are hints, not access control: the API enforces permissions.
10
+ */
11
+ const READ_ONLY_PREFIXES = ['get_', 'list_', 'preview_', 'analyze_'];
12
+ const READ_ONLY_NAMES = new Set(['test_connection', 'export_list']);
13
+ const DESTRUCTIVE_PREFIXES = ['delete_', 'remove_', 'clean_', 'dedupe_', 'reset_', 'regenerate_', 'end_'];
14
+ /** Tools that send something to people outside the account. */
15
+ const OPEN_WORLD_PREFIXES = ['send_', 'schedule_', 'resend_', 'test_webhook'];
16
+ export function toolAnnotations(name) {
17
+ const readOnly = READ_ONLY_NAMES.has(name) || READ_ONLY_PREFIXES.some((prefix) => name.startsWith(prefix));
18
+ return {
19
+ title: name
20
+ .split('_')
21
+ .map((word, index) => (index === 0 ? word.charAt(0).toUpperCase() + word.slice(1) : word))
22
+ .join(' '),
23
+ readOnlyHint: readOnly,
24
+ destructiveHint: !readOnly && DESTRUCTIVE_PREFIXES.some((prefix) => name.startsWith(prefix)),
25
+ openWorldHint: !readOnly && OPEN_WORLD_PREFIXES.some((prefix) => name.startsWith(prefix)),
26
+ };
27
+ }
28
+ //# sourceMappingURL=annotations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../src/tools/annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AACrE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC,CAAC;AAEpE,MAAM,oBAAoB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;AAE1G,+DAA+D;AAC/D,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;AAE9E,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IAE3G,OAAO;QACL,KAAK,EAAE,IAAI;aACR,KAAK,CAAC,GAAG,CAAC;aACV,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aACzF,IAAI,CAAC,GAAG,CAAC;QACZ,YAAY,EAAE,QAAQ;QACtB,eAAe,EAAE,CAAC,QAAQ,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5F,aAAa,EAAE,CAAC,QAAQ,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;KAC1F,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * NetSendo MCP Server - Automation Rule Tools
3
+ *
4
+ * Automation rules: "when <trigger event> happens, if <conditions> pass, run
5
+ * <actions>". They complement funnels (multi-step sequences): a rule reacts
6
+ * to a single event, e.g. tag everyone who joins a list or email the owner
7
+ * when a deal is won.
8
+ */
9
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
10
+ import type { NetSendoApiClient } from '../api-client.js';
11
+ export declare function registerAutomationTools(server: McpServer, api: NetSendoApiClient): void;
12
+ //# sourceMappingURL=automations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automations.d.ts","sourceRoot":"","sources":["../../src/tools/automations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AA8F1D,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,iBAAiB,QAqKhF"}
@@ -0,0 +1,184 @@
1
+ /**
2
+ * NetSendo MCP Server - Automation Rule Tools
3
+ *
4
+ * Automation rules: "when <trigger event> happens, if <conditions> pass, run
5
+ * <actions>". They complement funnels (multi-step sequences): a rule reacts
6
+ * to a single event, e.g. tag everyone who joins a list or email the owner
7
+ * when a deal is won.
8
+ */
9
+ import { z } from 'zod';
10
+ import { compact, fail, ok } from './helpers.js';
11
+ const EXAMPLE = `{
12
+ "name": "Welcome new newsletter readers",
13
+ "trigger_event": "subscriber_signup",
14
+ "trigger_config": { "list_id": 12 },
15
+ "conditions": [{ "type": "field_contains", "field": "email", "value": "@acme.com" }],
16
+ "condition_logic": "all",
17
+ "actions": [
18
+ { "type": "add_tag", "config": { "tag_name": "acme-lead" } },
19
+ { "type": "send_email", "config": { "message_id": 345 } }
20
+ ],
21
+ "is_active": true
22
+ }`;
23
+ const condition = z.object({
24
+ type: z.string().describe('Condition type key from get_automation_options (conditions[].key), e.g. tag_exists, field_equals, list_is'),
25
+ field: z.string().optional().describe('field_* conditions only: a standard field (email, first_name, ...) or a custom field name'),
26
+ value: z.union([z.string(), z.number()]).optional()
27
+ .describe('What to compare with: a tag/list/message id for tag_*, list_*, email_*_message; text for field_*; days for subscribed_days_ago. Omit for field_is_empty / field_is_not_empty'),
28
+ });
29
+ const action = z.object({
30
+ type: z.string().describe('Action type key from get_automation_options (actions[].key), e.g. add_tag, send_email, move_to_list, start_funnel, call_webhook, notify_admin'),
31
+ config: z.record(z.string(), z.unknown()).optional()
32
+ .describe('Settings of the action type (actions[].config in get_automation_options), e.g. add_tag {tag_id} or {tag_name}; send_email {message_id}; copy_to_list {list_id}; start_funnel {funnel_id}; call_webhook {url, method?, headers?}'),
33
+ });
34
+ const ruleFields = {
35
+ name: z.string().max(255).describe('Rule name'),
36
+ description: z.string().max(1000).nullable().optional().describe('Optional description'),
37
+ trigger_event: z.string()
38
+ .describe('Trigger event key from get_automation_options (triggers[].key with available: true), e.g. subscriber_signup, tag_added, email_clicked, form_submitted, purchase, crm_deal_won'),
39
+ trigger_config: z.record(z.string(), z.unknown()).optional()
40
+ .describe('Filters of the trigger (triggers[].config), e.g. subscriber_signup {list_id, form_id}; tag_added {tag_id}; email_opened {message_id, list_id}; date_reached {date: "YYYY-MM-DD"} (required). {} = every event of that type in the account. Keys the trigger does not use are rejected'),
41
+ conditions: z.array(condition).optional().describe('Extra checks on the subscriber/event; [] or omitted for none'),
42
+ condition_logic: z.enum(['all', 'any']).optional().describe('all = every condition must pass (default), any = at least one'),
43
+ actions: z.array(action).min(1).describe('Actions run in order (at least one)'),
44
+ is_active: z.boolean().optional().describe('Whether the rule runs (default true)'),
45
+ limit_per_subscriber: z.boolean().optional().describe('Limit how often the rule runs for one subscriber'),
46
+ limit_count: z.number().int().min(1).nullable().optional().describe('With limit_per_subscriber: successful runs allowed per subscriber in limit_period'),
47
+ limit_period: z.enum(['hour', 'day', 'week', 'month', 'ever']).nullable().optional().describe('With limit_per_subscriber: the period limit_count applies to'),
48
+ };
49
+ const READ_ONLY_HINT = 'This rule is read-only here. Rules with read_only: true are kept in sync with a message (autoresponder) trigger and are overwritten whenever that message is saved: change the message instead, or use duplicate_automation for an editable copy.';
50
+ function summarize(rule) {
51
+ return {
52
+ id: rule.id,
53
+ name: rule.name,
54
+ trigger_event: rule.trigger_event,
55
+ trigger_config: rule.trigger_config,
56
+ conditions: rule.conditions.length,
57
+ actions: rule.actions.map((a) => a.type),
58
+ is_active: rule.is_active,
59
+ execution_count: rule.execution_count,
60
+ last_executed_at: rule.last_executed_at,
61
+ is_system: rule.is_system,
62
+ read_only: rule.read_only,
63
+ };
64
+ }
65
+ export function registerAutomationTools(server, api) {
66
+ server.tool('get_automation_options', 'Get the catalogue for building automation rules: every trigger event (key, label, available, description, and the trigger_config keys it accepts), every condition type (value_spec / field_spec) and every action type (config keys, one_of_required). Each field spec gives type (integer|number|string|boolean|date|enum|url|email|object), required, description, example, enum values, and ref — the kind of id it takes (list, tag, message, funnel, form, crm_pipeline, crm_stage, crm_company, user, field), which must belong to this account. Also returns an example rule. Call this before create_automation or update_automation. Triggers and conditions with available: false are rejected because they would never run.', {}, async () => {
67
+ try {
68
+ const result = await api.request('get', '/automations/options');
69
+ return ok(result.data);
70
+ }
71
+ catch (error) {
72
+ return fail(error);
73
+ }
74
+ });
75
+ server.tool('list_automations', 'List the account\'s automation rules (newest first) with trigger, action types, active state and run counts. read_only: true marks rules synced from a message trigger; is_system marks NetSendo\'s default automations.', {
76
+ trigger_event: z.string().optional().describe('Only rules with this trigger event'),
77
+ is_active: z.boolean().optional().describe('Only active (true) or inactive (false) rules'),
78
+ search: z.string().optional().describe('Search in rule names'),
79
+ page: z.number().int().min(1).optional().describe('Page (default 1)'),
80
+ per_page: z.number().int().min(1).max(100).optional().describe('Rules per page (default 25)'),
81
+ }, async ({ trigger_event, is_active, search, page, per_page }) => {
82
+ try {
83
+ const result = await api.request('get', '/automations', {
84
+ params: compact({ trigger_event, is_active: is_active === undefined ? undefined : (is_active ? 1 : 0), search, page, per_page }),
85
+ });
86
+ return ok({ automations: result.data.map(summarize), meta: result.meta });
87
+ }
88
+ catch (error) {
89
+ return fail(error);
90
+ }
91
+ });
92
+ server.tool('get_automation', 'Get one automation rule in full: trigger_event, trigger_config, conditions, actions with their config, limits, run counts, 7-day stats, and managed_by/read_only (rules synced from a message trigger cannot be changed here).', {
93
+ automation_id: z.number().describe('Automation rule ID'),
94
+ }, async ({ automation_id }) => {
95
+ try {
96
+ const result = await api.request('get', `/automations/${automation_id}`);
97
+ return ok(result.data);
98
+ }
99
+ catch (error) {
100
+ return fail(error);
101
+ }
102
+ });
103
+ server.tool('create_automation', `Create an automation rule: when trigger_event happens (optionally filtered by trigger_config), and the conditions pass, run the actions in order. Call get_automation_options first to pick valid trigger, condition and action keys and their config fields. Ids (list, tag, message, funnel, form, CRM pipeline/stage, user) must belong to this account — look them up with list_contact_lists, list_tags, list_campaigns, list_funnels, list_custom_fields. send_email needs a message that is not a draft; add_tag can create a tag by tag_name. The rule is active unless is_active: false. Example payload:\n${EXAMPLE}`, ruleFields, async (input) => {
104
+ try {
105
+ const result = await api.request('post', '/automations', { data: compact(input) });
106
+ return ok({ message: `Automation "${result.data.name}" created (id ${result.data.id})`, automation: result.data });
107
+ }
108
+ catch (error) {
109
+ return fail(error);
110
+ }
111
+ });
112
+ server.tool('update_automation', `Change an automation rule. Only the fields you send change; the rest keep their values. conditions and actions are replaced as a whole when sent (get_automation shows the current ones). Changing trigger_event re-checks the stored trigger_config against the new trigger, so send a matching trigger_config with it. Call get_automation_options first for valid keys. Rules with read_only: true (synced from a message trigger) cannot be changed (409). Example: {"automation_id": 7, "trigger_config": {"list_id": 12}, "actions": [{"type": "add_tag", "config": {"tag_id": 5}}]}`, {
113
+ automation_id: z.number().describe('Automation rule ID'),
114
+ ...ruleFields,
115
+ name: ruleFields.name.optional(),
116
+ trigger_event: ruleFields.trigger_event.optional(),
117
+ actions: ruleFields.actions.optional(),
118
+ }, async ({ automation_id, ...fields }) => {
119
+ try {
120
+ const result = await api.request('put', `/automations/${automation_id}`, { data: compact(fields) });
121
+ return ok({ message: `Automation ${automation_id} updated`, automation: result.data });
122
+ }
123
+ catch (error) {
124
+ return fail(error, READ_ONLY_HINT);
125
+ }
126
+ });
127
+ server.tool('set_automation_active', 'Activate or deactivate an automation rule (is_active), or flip it when is_active is omitted. Deactivating is the safe way to stop a rule without losing it. Not possible for read_only rules (synced from a message trigger).', {
128
+ automation_id: z.number().describe('Automation rule ID'),
129
+ is_active: z.boolean().optional().describe('true = run the rule, false = pause it; omit to flip the current state'),
130
+ }, async ({ automation_id, is_active }) => {
131
+ try {
132
+ const result = await api.request('post', `/automations/${automation_id}/toggle`, {
133
+ data: compact({ is_active }),
134
+ });
135
+ return ok({
136
+ message: `Automation ${automation_id} is now ${result.data.is_active ? 'active' : 'inactive'}`,
137
+ automation: summarize(result.data),
138
+ });
139
+ }
140
+ catch (error) {
141
+ return fail(error, READ_ONLY_HINT);
142
+ }
143
+ });
144
+ server.tool('duplicate_automation', 'Copy an automation rule. The copy is named "[KOPIA] <name>", starts inactive, and is an ordinary editable rule (also when the original is a default or message-synced rule). Activate it with set_automation_active after reviewing it.', {
145
+ automation_id: z.number().describe('Automation rule ID to copy'),
146
+ }, async ({ automation_id }) => {
147
+ try {
148
+ const result = await api.request('post', `/automations/${automation_id}/duplicate`);
149
+ return ok({ message: `Automation copied as id ${result.data.id} (inactive)`, automation: result.data });
150
+ }
151
+ catch (error) {
152
+ return fail(error);
153
+ }
154
+ });
155
+ server.tool('delete_automation', 'Delete an automation rule permanently, with its execution log. Consider set_automation_active(false) instead. NetSendo default automations (is_system) need confirm=true once the user has approved; read_only rules (synced from a message trigger) cannot be deleted here.', {
156
+ automation_id: z.number().describe('Automation rule ID'),
157
+ confirm: z.boolean().optional().describe('Required (true) to delete a default automation (is_system: true)'),
158
+ }, async ({ automation_id, confirm }) => {
159
+ try {
160
+ await api.request('delete', `/automations/${automation_id}`, { params: compact({ confirm: confirm ? 1 : undefined }) });
161
+ return ok({ message: `Automation ${automation_id} deleted` });
162
+ }
163
+ catch (error) {
164
+ return fail(error, 'This is a NetSendo default automation (or a message-synced rule). For a default automation, re-run with confirm=true once the user has approved — or deactivate it instead. A message-synced rule cannot be deleted here: change the message\'s trigger.');
165
+ }
166
+ });
167
+ server.tool('get_automation_logs', 'Get the execution log of an automation rule, newest first: status (success | partial | failed | skipped — skipped means the per-subscriber limit was reached), subscriber, each action\'s result or error, the event data, and totals per status. Use it to check that a rule fires and to debug failing actions.', {
168
+ automation_id: z.number().describe('Automation rule ID'),
169
+ status: z.enum(['success', 'partial', 'failed', 'skipped']).optional().describe('Only runs with this status'),
170
+ page: z.number().int().min(1).optional().describe('Page (default 1)'),
171
+ per_page: z.number().int().min(1).max(100).optional().describe('Runs per page (default 20)'),
172
+ }, async ({ automation_id, status, page, per_page }) => {
173
+ try {
174
+ const result = await api.request('get', `/automations/${automation_id}/logs`, {
175
+ params: compact({ status, page, per_page }),
176
+ });
177
+ return ok({ logs: result.data, meta: result.meta });
178
+ }
179
+ catch (error) {
180
+ return fail(error);
181
+ }
182
+ });
183
+ }
184
+ //# sourceMappingURL=automations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"automations.js","sourceRoot":"","sources":["../../src/tools/automations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAgCjD,MAAM,OAAO,GAAG;;;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AC;QACxD,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;QAC7G,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACrE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;KAC7F,EACD,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;QAClD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,OAAO,CAAqB,KAAK,EAAE,gBAAgB,aAAa,OAAO,EAAE;gBAChG,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;aAC5C,CAAC,CAAC;YACH,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,175 @@
1
+ /**
2
+ * NetSendo MCP Server - Campaign editor extras
3
+ *
4
+ * The editor fields shared by create_campaign / update_campaign (trigger,
5
+ * tags, translations, tracked links, CRM contacts, audience field filters,
6
+ * A/B config) and the campaign actions: test send, preview, duplicate,
7
+ * activation, recipient count, re-sending failed / missed recipients.
8
+ */
9
+ import { z } from 'zod';
10
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
11
+ import type { NetSendoApiClient } from '../api-client.js';
12
+ export declare const TRIGGER_TYPES: readonly ["signup", "anniversary", "birthday", "inactivity", "page_visit", "custom", "recent_subscribers", "opened_message", "not_opened_message"];
13
+ /**
14
+ * Optional editor fields accepted by POST/PUT /messages. Every key is
15
+ * optional; on update an omitted key leaves the stored value untouched and an
16
+ * empty array clears it.
17
+ */
18
+ export declare const campaignEditorShape: {
19
+ template_id: z.ZodOptional<z.ZodNumber>;
20
+ send_in_subscriber_timezone: z.ZodOptional<z.ZodBoolean>;
21
+ trigger_type: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
22
+ signup: "signup";
23
+ page_visit: "page_visit";
24
+ custom: "custom";
25
+ anniversary: "anniversary";
26
+ birthday: "birthday";
27
+ inactivity: "inactivity";
28
+ recent_subscribers: "recent_subscribers";
29
+ opened_message: "opened_message";
30
+ not_opened_message: "not_opened_message";
31
+ }>>>;
32
+ trigger_config: z.ZodOptional<z.ZodNullable<z.ZodObject<{
33
+ list_id: z.ZodOptional<z.ZodNumber>;
34
+ message_id: z.ZodOptional<z.ZodNumber>;
35
+ tag_id: z.ZodOptional<z.ZodNumber>;
36
+ inactive_days: z.ZodOptional<z.ZodNumber>;
37
+ recent_days: z.ZodOptional<z.ZodNumber>;
38
+ url_pattern: z.ZodOptional<z.ZodString>;
39
+ }, z.core.$strip>>>;
40
+ tag_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
41
+ translations: z.ZodOptional<z.ZodArray<z.ZodObject<{
42
+ language: z.ZodString;
43
+ subject: z.ZodString;
44
+ preheader: z.ZodOptional<z.ZodString>;
45
+ content: z.ZodOptional<z.ZodString>;
46
+ }, z.core.$strip>>>;
47
+ tracked_links: z.ZodOptional<z.ZodArray<z.ZodObject<{
48
+ url: z.ZodString;
49
+ tracking_enabled: z.ZodOptional<z.ZodBoolean>;
50
+ share_data_enabled: z.ZodOptional<z.ZodBoolean>;
51
+ shared_fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
+ subscribe_to_list_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
53
+ unsubscribe_from_list_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
54
+ }, z.core.$strip>>>;
55
+ crm_contact_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
56
+ excluded_crm_contact_ids: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
57
+ include_field_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
+ custom_field_id: z.ZodNumber;
59
+ operator: z.ZodEnum<{
60
+ any_of: "any_of";
61
+ none_of: "none_of";
62
+ contains: "contains";
63
+ not_contains: "not_contains";
64
+ starts_with: "starts_with";
65
+ ends_with: "ends_with";
66
+ is_set: "is_set";
67
+ is_empty: "is_empty";
68
+ gt: "gt";
69
+ gte: "gte";
70
+ lt: "lt";
71
+ lte: "lte";
72
+ between: "between";
73
+ }>;
74
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
75
+ }, z.core.$strip>>>;
76
+ include_field_filter_match: z.ZodOptional<z.ZodEnum<{
77
+ all: "all";
78
+ any: "any";
79
+ }>>;
80
+ exclude_field_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
+ custom_field_id: z.ZodNumber;
82
+ operator: z.ZodEnum<{
83
+ any_of: "any_of";
84
+ none_of: "none_of";
85
+ contains: "contains";
86
+ not_contains: "not_contains";
87
+ starts_with: "starts_with";
88
+ ends_with: "ends_with";
89
+ is_set: "is_set";
90
+ is_empty: "is_empty";
91
+ gt: "gt";
92
+ gte: "gte";
93
+ lt: "lt";
94
+ lte: "lte";
95
+ between: "between";
96
+ }>;
97
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
98
+ }, z.core.$strip>>>;
99
+ exclude_field_filter_match: z.ZodOptional<z.ZodEnum<{
100
+ all: "all";
101
+ any: "any";
102
+ }>>;
103
+ ab_test_config: z.ZodOptional<z.ZodObject<{
104
+ enabled: z.ZodBoolean;
105
+ test_type: z.ZodOptional<z.ZodEnum<{
106
+ subject: "subject";
107
+ content: "content";
108
+ sender: "sender";
109
+ send_time: "send_time";
110
+ full: "full";
111
+ }>>;
112
+ winning_metric: z.ZodOptional<z.ZodEnum<{
113
+ open_rate: "open_rate";
114
+ click_rate: "click_rate";
115
+ conversion_rate: "conversion_rate";
116
+ }>>;
117
+ sample_percentage: z.ZodOptional<z.ZodNumber>;
118
+ test_duration_hours: z.ZodOptional<z.ZodNumber>;
119
+ auto_select_winner: z.ZodOptional<z.ZodBoolean>;
120
+ confidence_threshold: z.ZodOptional<z.ZodNumber>;
121
+ variants: z.ZodOptional<z.ZodArray<z.ZodObject<{
122
+ variant_letter: z.ZodString;
123
+ subject: z.ZodOptional<z.ZodString>;
124
+ preheader: z.ZodOptional<z.ZodString>;
125
+ is_control: z.ZodOptional<z.ZodBoolean>;
126
+ }, z.core.$strip>>>;
127
+ }, z.core.$strip>>;
128
+ };
129
+ /** Compact, agent-oriented view of a campaign returned by the API. */
130
+ export declare function summarizeCampaign(c: Record<string, unknown>, contentChars?: number): {
131
+ id: unknown;
132
+ subject: unknown;
133
+ preheader: unknown;
134
+ channel: unknown;
135
+ type: unknown;
136
+ status: unknown;
137
+ is_active: unknown;
138
+ mailbox_id: unknown;
139
+ template_id: unknown;
140
+ day: unknown;
141
+ time_of_day: unknown;
142
+ timezone: unknown;
143
+ send_in_subscriber_timezone: unknown;
144
+ scheduled_at: unknown;
145
+ trigger_type: unknown;
146
+ trigger_config: unknown;
147
+ automation_rule: unknown;
148
+ contact_lists: {
149
+ id: number;
150
+ name: string;
151
+ }[];
152
+ excluded_lists: {
153
+ id: number;
154
+ name: string;
155
+ }[];
156
+ crm_contact_ids: unknown;
157
+ excluded_crm_contact_ids: unknown;
158
+ field_filters: unknown;
159
+ include_field_filter_match: unknown;
160
+ exclude_field_filter_match: unknown;
161
+ tag_ids: unknown;
162
+ translations: {
163
+ language: unknown;
164
+ subject: unknown;
165
+ preheader: unknown;
166
+ }[];
167
+ tracked_links: unknown;
168
+ ab_test_config: unknown;
169
+ sent_count: unknown;
170
+ planned_recipients: unknown;
171
+ content_length: number;
172
+ content: string;
173
+ };
174
+ export declare function registerCampaignExtraTools(server: McpServer, api: NetSendoApiClient): void;
175
+ //# sourceMappingURL=campaign-extras.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-extras.d.ts","sourceRoot":"","sources":["../../src/tools/campaign-extras.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAK1D,eAAO,MAAM,aAAa,oJAUhB,CAAC;AAgBX;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoG/B,CAAC;AAEF,sEAAsE;AACtE,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,SAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwC/E;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,iBAAiB,QAqJnF"}