jotae-mcp 1.0.3 → 1.0.5
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/dist/index.js +7 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -139,8 +139,7 @@ const TOOLS = [
|
|
|
139
139
|
channel: { type: 'string', enum: ['whatsapp', 'email'] },
|
|
140
140
|
trigger: { type: 'string', enum: ['registration', 'event_start', 'event_end', 'attended', 'no_show', 'watched_pitch', 'clicked_cta', 'purchased', 'scheduled'] },
|
|
141
141
|
delay_minutes: { type: 'number', description: 'Minutos após o gatilho (negativo = antes)' },
|
|
142
|
-
template_id: { type: 'string', description: 'ID do template WhatsApp' },
|
|
143
|
-
broadcast_template_id: { type: 'string', description: 'ID do template de e-mail' },
|
|
142
|
+
template_id: { type: 'string', description: 'ID do template (WhatsApp ou e-mail — mesmo campo para ambos os canais)' },
|
|
144
143
|
send_time: { type: 'string', description: 'Ancora horário HH:MM (ex: "08:00")' },
|
|
145
144
|
scheduled_at: { type: 'string', description: 'Data/hora absoluta ISO 8601 (para trigger=scheduled)' },
|
|
146
145
|
audience_list_id: { type: 'string', description: 'ID da lista de destinatários' },
|
|
@@ -364,9 +363,13 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (req) => {
|
|
|
364
363
|
case 'list_automations':
|
|
365
364
|
result = await api('GET', `/automations${a.event_id ? `?event_id=${a.event_id}` : ''}`);
|
|
366
365
|
break;
|
|
367
|
-
case 'create_automation':
|
|
368
|
-
|
|
366
|
+
case 'create_automation': {
|
|
367
|
+
// broadcast_template_id não existe na tabela — remover se vier por engano
|
|
368
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
369
|
+
const { broadcast_template_id: _btid, ...autoBody } = a;
|
|
370
|
+
result = await api('POST', '/automations', autoBody);
|
|
369
371
|
break;
|
|
372
|
+
}
|
|
370
373
|
case 'update_automation': {
|
|
371
374
|
const { automation_id, ...patch } = a;
|
|
372
375
|
result = await api('PATCH', `/automations/${automation_id}`, patch);
|