@mailkite/mcp 0.3.0 → 0.5.0

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/spec/cases.json CHANGED
@@ -5,29 +5,94 @@
5
5
  {
6
6
  "name": "send_minimal",
7
7
  "method": "send",
8
- "args": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "subject": "Hi", "text": "It works." },
8
+ "args": {
9
+ "from": "hello@app.mailkite.dev",
10
+ "to": "ada@example.com",
11
+ "subject": "Hi",
12
+ "text": "It works."
13
+ },
9
14
  "request": {
10
15
  "method": "POST",
11
16
  "path": "/v1/send",
12
17
  "bodySchema": "send-request",
13
- "body": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "subject": "Hi", "text": "It works." }
18
+ "body": {
19
+ "from": "hello@app.mailkite.dev",
20
+ "to": "ada@example.com",
21
+ "subject": "Hi",
22
+ "text": "It works."
23
+ }
24
+ },
25
+ "response": {
26
+ "status": 202,
27
+ "body": {
28
+ "id": "msg_minimal",
29
+ "status": "queued"
30
+ }
14
31
  },
15
- "response": { "status": 202, "body": { "id": "msg_minimal", "status": "queued" } },
16
- "result": { "id": "msg_minimal", "status": "queued" }
32
+ "result": {
33
+ "id": "msg_minimal",
34
+ "status": "queued"
35
+ }
36
+ },
37
+ {
38
+ "name": "upload_attachment",
39
+ "method": "uploadAttachment",
40
+ "args": {
41
+ "filename": "po.pdf",
42
+ "content": "JVBERi0xLjQK",
43
+ "contentType": "application/pdf"
44
+ },
45
+ "request": {
46
+ "method": "POST",
47
+ "path": "/v1/attachments",
48
+ "bodySchema": "upload-attachment-request",
49
+ "body": {
50
+ "filename": "po.pdf",
51
+ "content": "JVBERi0xLjQK",
52
+ "contentType": "application/pdf"
53
+ }
54
+ },
55
+ "response": {
56
+ "status": 201,
57
+ "body": {
58
+ "id": "7d/usr_demo/0a1b2c3d/po.pdf",
59
+ "url": "https://api.mailkite.dev/up/7d/usr_demo/0a1b2c3d/po.pdf?exp=1799999999&sig=deadbeef",
60
+ "filename": "po.pdf",
61
+ "contentType": "application/pdf",
62
+ "size": 9,
63
+ "expiresAt": "2026-07-02T00:00:00.000Z"
64
+ }
65
+ },
66
+ "result": {
67
+ "id": "7d/usr_demo/0a1b2c3d/po.pdf",
68
+ "url": "https://api.mailkite.dev/up/7d/usr_demo/0a1b2c3d/po.pdf?exp=1799999999&sig=deadbeef",
69
+ "filename": "po.pdf",
70
+ "contentType": "application/pdf",
71
+ "size": 9,
72
+ "expiresAt": "2026-07-02T00:00:00.000Z"
73
+ }
17
74
  },
18
75
  {
19
76
  "name": "send_full",
20
77
  "method": "send",
21
78
  "args": {
22
79
  "from": "hello@app.mailkite.dev",
23
- "to": ["ada@example.com", "grace@example.com"],
80
+ "to": [
81
+ "ada@example.com",
82
+ "grace@example.com"
83
+ ],
24
84
  "cc": "cc@example.com",
25
85
  "subject": "Your invoice #1042",
26
86
  "html": "<p>Thanks!</p>",
27
87
  "text": "Thanks!",
28
88
  "replyTo": "support@app.mailkite.dev",
29
89
  "inReplyTo": "<a1b2@mail.example.com>",
30
- "attachments": [{ "filename": "receipt.pdf", "url": "https://files.app.com/receipt.pdf" }]
90
+ "attachments": [
91
+ {
92
+ "filename": "receipt.pdf",
93
+ "url": "https://files.app.com/receipt.pdf"
94
+ }
95
+ ]
31
96
  },
32
97
  "request": {
33
98
  "method": "POST",
@@ -35,98 +100,233 @@
35
100
  "bodySchema": "send-request",
36
101
  "body": {
37
102
  "from": "hello@app.mailkite.dev",
38
- "to": ["ada@example.com", "grace@example.com"],
103
+ "to": [
104
+ "ada@example.com",
105
+ "grace@example.com"
106
+ ],
39
107
  "cc": "cc@example.com",
40
108
  "subject": "Your invoice #1042",
41
109
  "html": "<p>Thanks!</p>",
42
110
  "text": "Thanks!",
43
111
  "replyTo": "support@app.mailkite.dev",
44
112
  "inReplyTo": "<a1b2@mail.example.com>",
45
- "attachments": [{ "filename": "receipt.pdf", "url": "https://files.app.com/receipt.pdf" }]
113
+ "attachments": [
114
+ {
115
+ "filename": "receipt.pdf",
116
+ "url": "https://files.app.com/receipt.pdf"
117
+ }
118
+ ]
46
119
  }
47
120
  },
48
- "response": { "status": 202, "body": { "id": "msg_full", "status": "queued" } },
49
- "result": { "id": "msg_full", "status": "queued" }
121
+ "response": {
122
+ "status": 202,
123
+ "body": {
124
+ "id": "msg_full",
125
+ "status": "queued"
126
+ }
127
+ },
128
+ "result": {
129
+ "id": "msg_full",
130
+ "status": "queued"
131
+ }
50
132
  },
51
133
  {
52
134
  "name": "list_domains",
53
135
  "method": "listDomains",
54
136
  "args": {},
55
- "request": { "method": "GET", "path": "/api/domains" },
56
- "response": { "status": 200, "body": [{ "id": "dom_1", "domain": "app.mailkite.dev" }] },
57
- "result": [{ "id": "dom_1", "domain": "app.mailkite.dev" }]
137
+ "request": {
138
+ "method": "GET",
139
+ "path": "/api/domains"
140
+ },
141
+ "response": {
142
+ "status": 200,
143
+ "body": [
144
+ {
145
+ "id": "dom_1",
146
+ "domain": "app.mailkite.dev"
147
+ }
148
+ ]
149
+ },
150
+ "result": [
151
+ {
152
+ "id": "dom_1",
153
+ "domain": "app.mailkite.dev"
154
+ }
155
+ ]
58
156
  },
59
157
  {
60
158
  "name": "create_domain",
61
159
  "method": "createDomain",
62
- "args": { "domain": "app.mailkite.dev" },
160
+ "args": {
161
+ "domain": "app.mailkite.dev"
162
+ },
63
163
  "request": {
64
164
  "method": "POST",
65
165
  "path": "/api/domains",
66
166
  "bodySchema": "create-domain-request",
67
- "body": { "domain": "app.mailkite.dev" }
167
+ "body": {
168
+ "domain": "app.mailkite.dev"
169
+ }
170
+ },
171
+ "response": {
172
+ "status": 200,
173
+ "body": {
174
+ "domain": {
175
+ "id": "dom_1",
176
+ "status": "pending"
177
+ },
178
+ "dns": []
179
+ }
68
180
  },
69
- "response": { "status": 200, "body": { "domain": { "id": "dom_1", "status": "pending" }, "dns": [] } },
70
- "result": { "domain": { "id": "dom_1", "status": "pending" }, "dns": [] }
181
+ "result": {
182
+ "domain": {
183
+ "id": "dom_1",
184
+ "status": "pending"
185
+ },
186
+ "dns": []
187
+ }
71
188
  },
72
189
  {
73
190
  "name": "get_domain",
74
191
  "method": "getDomain",
75
- "args": { "id": "dom_1" },
76
- "request": { "method": "GET", "path": "/api/domains/dom_1" },
77
- "response": { "status": 200, "body": { "id": "dom_1", "domain": "app.mailkite.dev" } },
78
- "result": { "id": "dom_1", "domain": "app.mailkite.dev" }
192
+ "args": {
193
+ "id": "dom_1"
194
+ },
195
+ "request": {
196
+ "method": "GET",
197
+ "path": "/api/domains/dom_1"
198
+ },
199
+ "response": {
200
+ "status": 200,
201
+ "body": {
202
+ "id": "dom_1",
203
+ "domain": "app.mailkite.dev"
204
+ }
205
+ },
206
+ "result": {
207
+ "id": "dom_1",
208
+ "domain": "app.mailkite.dev"
209
+ }
79
210
  },
80
211
  {
81
212
  "name": "delete_domain",
82
213
  "method": "deleteDomain",
83
- "args": { "id": "dom_1" },
84
- "request": { "method": "DELETE", "path": "/api/domains/dom_1" },
85
- "response": { "status": 200, "body": { "ok": true } },
86
- "result": { "ok": true }
214
+ "args": {
215
+ "id": "dom_1"
216
+ },
217
+ "request": {
218
+ "method": "DELETE",
219
+ "path": "/api/domains/dom_1"
220
+ },
221
+ "response": {
222
+ "status": 200,
223
+ "body": {
224
+ "ok": true
225
+ }
226
+ },
227
+ "result": {
228
+ "ok": true
229
+ }
87
230
  },
88
231
  {
89
232
  "name": "verify_domain",
90
233
  "method": "verifyDomain",
91
- "args": { "id": "dom_1" },
92
- "request": { "method": "POST", "path": "/api/domains/dom_1/verify" },
93
- "response": { "status": 200, "body": { "id": "dom_1", "status": "verified" } },
94
- "result": { "id": "dom_1", "status": "verified" }
234
+ "args": {
235
+ "id": "dom_1"
236
+ },
237
+ "request": {
238
+ "method": "POST",
239
+ "path": "/api/domains/dom_1/verify"
240
+ },
241
+ "response": {
242
+ "status": 200,
243
+ "body": {
244
+ "id": "dom_1",
245
+ "status": "verified"
246
+ }
247
+ },
248
+ "result": {
249
+ "id": "dom_1",
250
+ "status": "verified"
251
+ }
95
252
  },
96
253
  {
97
254
  "name": "set_webhook",
98
255
  "method": "setWebhook",
99
- "args": { "id": "dom_1", "url": "https://app.com/hooks/mailkite" },
256
+ "args": {
257
+ "id": "dom_1",
258
+ "url": "https://app.com/hooks/mailkite"
259
+ },
100
260
  "request": {
101
261
  "method": "PUT",
102
262
  "path": "/api/domains/dom_1/webhook",
103
263
  "bodySchema": "set-webhook-request",
104
- "body": { "url": "https://app.com/hooks/mailkite" }
264
+ "body": {
265
+ "url": "https://app.com/hooks/mailkite"
266
+ }
267
+ },
268
+ "response": {
269
+ "status": 200,
270
+ "body": {
271
+ "ok": true,
272
+ "url": "https://app.com/hooks/mailkite"
273
+ }
105
274
  },
106
- "response": { "status": 200, "body": { "ok": true, "url": "https://app.com/hooks/mailkite" } },
107
- "result": { "ok": true, "url": "https://app.com/hooks/mailkite" }
275
+ "result": {
276
+ "ok": true,
277
+ "url": "https://app.com/hooks/mailkite"
278
+ }
108
279
  },
109
280
  {
110
281
  "name": "delete_webhook",
111
282
  "method": "deleteWebhook",
112
- "args": { "id": "dom_1" },
113
- "request": { "method": "DELETE", "path": "/api/domains/dom_1/webhook" },
114
- "response": { "status": 200, "body": { "ok": true } },
115
- "result": { "ok": true }
283
+ "args": {
284
+ "id": "dom_1"
285
+ },
286
+ "request": {
287
+ "method": "DELETE",
288
+ "path": "/api/domains/dom_1/webhook"
289
+ },
290
+ "response": {
291
+ "status": 200,
292
+ "body": {
293
+ "ok": true
294
+ }
295
+ },
296
+ "result": {
297
+ "ok": true
298
+ }
116
299
  },
117
300
  {
118
301
  "name": "test_webhook",
119
302
  "method": "testWebhook",
120
- "args": { "id": "dom_1" },
121
- "request": { "method": "POST", "path": "/api/domains/dom_1/webhook/test" },
122
- "response": { "status": 200, "body": { "ok": true } },
123
- "result": { "ok": true }
303
+ "args": {
304
+ "id": "dom_1"
305
+ },
306
+ "request": {
307
+ "method": "POST",
308
+ "path": "/api/domains/dom_1/webhook/test"
309
+ },
310
+ "response": {
311
+ "status": 200,
312
+ "body": {
313
+ "ok": true
314
+ }
315
+ },
316
+ "result": {
317
+ "ok": true
318
+ }
124
319
  },
125
320
  {
126
321
  "name": "check_domain_availability",
127
322
  "method": "checkDomainAvailability",
128
- "args": { "domain": "acme.com" },
129
- "request": { "method": "GET", "path": "/api/domains/register/check" },
323
+ "args": {
324
+ "domain": "acme.com"
325
+ },
326
+ "request": {
327
+ "method": "GET",
328
+ "path": "/api/domains/register/check"
329
+ },
130
330
  "response": {
131
331
  "status": 200,
132
332
  "body": {
@@ -134,7 +334,12 @@
134
334
  "domain": "acme.com",
135
335
  "available": true,
136
336
  "premium": false,
137
- "price": { "amount": 12.99, "currency": "USD", "period": 1, "periodUnit": "y" }
337
+ "price": {
338
+ "amount": 12.99,
339
+ "currency": "USD",
340
+ "period": 1,
341
+ "periodUnit": "y"
342
+ }
138
343
  }
139
344
  },
140
345
  "result": {
@@ -142,7 +347,12 @@
142
347
  "domain": "acme.com",
143
348
  "available": true,
144
349
  "premium": false,
145
- "price": { "amount": 12.99, "currency": "USD", "period": 1, "periodUnit": "y" }
350
+ "price": {
351
+ "amount": 12.99,
352
+ "currency": "USD",
353
+ "period": 1,
354
+ "periodUnit": "y"
355
+ }
146
356
  }
147
357
  },
148
358
  {
@@ -184,16 +394,30 @@
184
394
  "response": {
185
395
  "status": 201,
186
396
  "body": {
187
- "domain": { "id": "dom_1", "domain": "acme.com", "status": "verified" },
397
+ "domain": {
398
+ "id": "dom_1",
399
+ "domain": "acme.com",
400
+ "status": "verified"
401
+ },
188
402
  "dns": [],
189
- "registration": { "status": "registered", "reference": "ref_1" },
403
+ "registration": {
404
+ "status": "registered",
405
+ "reference": "ref_1"
406
+ },
190
407
  "dnsProvisioned": true
191
408
  }
192
409
  },
193
410
  "result": {
194
- "domain": { "id": "dom_1", "domain": "acme.com", "status": "verified" },
411
+ "domain": {
412
+ "id": "dom_1",
413
+ "domain": "acme.com",
414
+ "status": "verified"
415
+ },
195
416
  "dns": [],
196
- "registration": { "status": "registered", "reference": "ref_1" },
417
+ "registration": {
418
+ "status": "registered",
419
+ "reference": "ref_1"
420
+ },
197
421
  "dnsProvisioned": true
198
422
  }
199
423
  },
@@ -201,169 +425,435 @@
201
425
  "name": "list_routes",
202
426
  "method": "listRoutes",
203
427
  "args": {},
204
- "request": { "method": "GET", "path": "/api/routes" },
205
- "response": { "status": 200, "body": [] },
428
+ "request": {
429
+ "method": "GET",
430
+ "path": "/api/routes"
431
+ },
432
+ "response": {
433
+ "status": 200,
434
+ "body": []
435
+ },
206
436
  "result": []
207
437
  },
208
438
  {
209
439
  "name": "create_route",
210
440
  "method": "createRoute",
211
- "args": { "match": "*@app.mailkite.dev", "action": "webhook", "destination": "https://app.com/hooks" },
441
+ "args": {
442
+ "match": "*@app.mailkite.dev",
443
+ "action": "webhook",
444
+ "destination": "https://app.com/hooks"
445
+ },
212
446
  "request": {
213
447
  "method": "POST",
214
448
  "path": "/api/routes",
215
449
  "bodySchema": "create-route-request",
216
- "body": { "match": "*@app.mailkite.dev", "action": "webhook", "destination": "https://app.com/hooks" }
450
+ "body": {
451
+ "match": "*@app.mailkite.dev",
452
+ "action": "webhook",
453
+ "destination": "https://app.com/hooks"
454
+ }
455
+ },
456
+ "response": {
457
+ "status": 200,
458
+ "body": {
459
+ "id": "rte_1"
460
+ }
217
461
  },
218
- "response": { "status": 200, "body": { "id": "rte_1" } },
219
- "result": { "id": "rte_1" }
462
+ "result": {
463
+ "id": "rte_1"
464
+ }
220
465
  },
221
466
  {
222
467
  "name": "agent_default",
223
468
  "method": "agent",
224
- "args": { "text": "What's my current balance?" },
469
+ "args": {
470
+ "text": "What's my current balance?"
471
+ },
225
472
  "request": {
226
473
  "method": "POST",
227
474
  "path": "/v1/agent",
228
475
  "bodySchema": "agent-request",
229
- "body": { "text": "What's my current balance?" }
476
+ "body": {
477
+ "text": "What's my current balance?"
478
+ }
479
+ },
480
+ "response": {
481
+ "status": 200,
482
+ "body": {
483
+ "ok": true,
484
+ "text": "Your balance is $0.00.",
485
+ "messageId": "msg_agent"
486
+ }
230
487
  },
231
- "response": { "status": 200, "body": { "ok": true, "text": "Your balance is $0.00.", "messageId": "msg_agent" } },
232
- "result": { "ok": true, "text": "Your balance is $0.00.", "messageId": "msg_agent" }
488
+ "result": {
489
+ "ok": true,
490
+ "text": "Your balance is $0.00.",
491
+ "messageId": "msg_agent"
492
+ }
233
493
  },
234
494
  {
235
495
  "name": "agent_by_route",
236
496
  "method": "agent",
237
- "args": { "text": "ping", "routeId": "rte_1", "model": "claude-sonnet-4-6" },
497
+ "args": {
498
+ "text": "ping",
499
+ "routeId": "rte_1",
500
+ "model": "claude-sonnet-4-6"
501
+ },
238
502
  "request": {
239
503
  "method": "POST",
240
504
  "path": "/v1/agent",
241
505
  "bodySchema": "agent-request",
242
- "body": { "text": "ping", "routeId": "rte_1", "model": "claude-sonnet-4-6" }
506
+ "body": {
507
+ "text": "ping",
508
+ "routeId": "rte_1",
509
+ "model": "claude-sonnet-4-6"
510
+ }
511
+ },
512
+ "response": {
513
+ "status": 200,
514
+ "body": {
515
+ "ok": true,
516
+ "text": "pong",
517
+ "messageId": "msg_agent2"
518
+ }
243
519
  },
244
- "response": { "status": 200, "body": { "ok": true, "text": "pong", "messageId": "msg_agent2" } },
245
- "result": { "ok": true, "text": "pong", "messageId": "msg_agent2" }
520
+ "result": {
521
+ "ok": true,
522
+ "text": "pong",
523
+ "messageId": "msg_agent2"
524
+ }
246
525
  },
247
526
  {
248
527
  "name": "route_by_id",
249
528
  "method": "route",
250
- "args": { "routeId": "rte_1", "from": "ops@example.com", "subject": "Process this", "text": "Please handle." },
529
+ "args": {
530
+ "routeId": "rte_1",
531
+ "from": "ops@example.com",
532
+ "subject": "Process this",
533
+ "text": "Please handle."
534
+ },
251
535
  "request": {
252
536
  "method": "POST",
253
537
  "path": "/v1/route",
254
538
  "bodySchema": "route-message-request",
255
- "body": { "routeId": "rte_1", "from": "ops@example.com", "subject": "Process this", "text": "Please handle." }
539
+ "body": {
540
+ "routeId": "rte_1",
541
+ "from": "ops@example.com",
542
+ "subject": "Process this",
543
+ "text": "Please handle."
544
+ }
256
545
  },
257
- "response": { "status": 202, "body": { "id": "msg_r1", "routed": true, "action": "webhook" } },
258
- "result": { "id": "msg_r1", "routed": true, "action": "webhook" }
546
+ "response": {
547
+ "status": 202,
548
+ "body": {
549
+ "id": "msg_r1",
550
+ "routed": true,
551
+ "action": "webhook"
552
+ }
553
+ },
554
+ "result": {
555
+ "id": "msg_r1",
556
+ "routed": true,
557
+ "action": "webhook"
558
+ }
259
559
  },
260
560
  {
261
561
  "name": "route_by_address",
262
562
  "method": "route",
263
- "args": { "address": "support@app.mailkite.dev", "from": "ops@example.com", "text": "hey there" },
563
+ "args": {
564
+ "address": "support@app.mailkite.dev",
565
+ "from": "ops@example.com",
566
+ "text": "hey there"
567
+ },
264
568
  "request": {
265
569
  "method": "POST",
266
570
  "path": "/v1/route",
267
571
  "bodySchema": "route-message-request",
268
- "body": { "address": "support@app.mailkite.dev", "from": "ops@example.com", "text": "hey there" }
572
+ "body": {
573
+ "address": "support@app.mailkite.dev",
574
+ "from": "ops@example.com",
575
+ "text": "hey there"
576
+ }
269
577
  },
270
- "response": { "status": 202, "body": { "id": "msg_r2", "routed": true, "action": "agent" } },
271
- "result": { "id": "msg_r2", "routed": true, "action": "agent" }
578
+ "response": {
579
+ "status": 202,
580
+ "body": {
581
+ "id": "msg_r2",
582
+ "routed": true,
583
+ "action": "agent"
584
+ }
585
+ },
586
+ "result": {
587
+ "id": "msg_r2",
588
+ "routed": true,
589
+ "action": "agent"
590
+ }
272
591
  },
273
592
  {
274
593
  "name": "list_messages",
275
594
  "method": "listMessages",
276
595
  "args": {},
277
- "request": { "method": "GET", "path": "/api/messages" },
278
- "response": { "status": 200, "body": [{ "id": "msg_1" }] },
279
- "result": [{ "id": "msg_1" }]
596
+ "request": {
597
+ "method": "GET",
598
+ "path": "/api/messages"
599
+ },
600
+ "response": {
601
+ "status": 200,
602
+ "body": [
603
+ {
604
+ "id": "msg_1"
605
+ }
606
+ ]
607
+ },
608
+ "result": [
609
+ {
610
+ "id": "msg_1"
611
+ }
612
+ ]
280
613
  },
281
614
  {
282
615
  "name": "get_message",
283
616
  "method": "getMessage",
284
- "args": { "id": "msg_1" },
285
- "request": { "method": "GET", "path": "/api/messages/msg_1" },
286
- "response": { "status": 200, "body": { "id": "msg_1", "deliveries": [], "attachments": [] } },
287
- "result": { "id": "msg_1", "deliveries": [], "attachments": [] }
617
+ "args": {
618
+ "id": "msg_1"
619
+ },
620
+ "request": {
621
+ "method": "GET",
622
+ "path": "/api/messages/msg_1"
623
+ },
624
+ "response": {
625
+ "status": 200,
626
+ "body": {
627
+ "id": "msg_1",
628
+ "deliveries": [],
629
+ "attachments": []
630
+ }
631
+ },
632
+ "result": {
633
+ "id": "msg_1",
634
+ "deliveries": [],
635
+ "attachments": []
636
+ }
288
637
  },
289
638
  {
290
639
  "name": "retry_delivery",
291
640
  "method": "retryDelivery",
292
- "args": { "id": "dlv_1" },
293
- "request": { "method": "POST", "path": "/api/deliveries/dlv_1/retry" },
294
- "response": { "status": 200, "body": { "ok": true } },
295
- "result": { "ok": true }
641
+ "args": {
642
+ "id": "dlv_1"
643
+ },
644
+ "request": {
645
+ "method": "POST",
646
+ "path": "/api/deliveries/dlv_1/retry"
647
+ },
648
+ "response": {
649
+ "status": 200,
650
+ "body": {
651
+ "ok": true
652
+ }
653
+ },
654
+ "result": {
655
+ "ok": true
656
+ }
296
657
  },
297
658
  {
298
659
  "name": "send_with_template",
299
660
  "method": "send",
300
- "args": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "templateId": "base_welcome-dark", "templateData": { "name": "Ada" } },
661
+ "args": {
662
+ "from": "hello@app.mailkite.dev",
663
+ "to": "ada@example.com",
664
+ "templateId": "base_welcome-dark",
665
+ "templateData": {
666
+ "name": "Ada"
667
+ }
668
+ },
301
669
  "request": {
302
670
  "method": "POST",
303
671
  "path": "/v1/send",
304
672
  "bodySchema": "send-request",
305
- "body": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "templateId": "base_welcome-dark", "templateData": { "name": "Ada" } }
673
+ "body": {
674
+ "from": "hello@app.mailkite.dev",
675
+ "to": "ada@example.com",
676
+ "templateId": "base_welcome-dark",
677
+ "templateData": {
678
+ "name": "Ada"
679
+ }
680
+ }
306
681
  },
307
- "response": { "status": 202, "body": { "id": "msg_tpl", "status": "queued" } },
308
- "result": { "id": "msg_tpl", "status": "queued" }
682
+ "response": {
683
+ "status": 202,
684
+ "body": {
685
+ "id": "msg_tpl",
686
+ "status": "queued"
687
+ }
688
+ },
689
+ "result": {
690
+ "id": "msg_tpl",
691
+ "status": "queued"
692
+ }
309
693
  },
310
694
  {
311
695
  "name": "list_templates",
312
696
  "method": "listTemplates",
313
697
  "args": {},
314
- "request": { "method": "GET", "path": "/api/templates" },
315
- "response": { "status": 200, "body": [{ "id": "tpl_1", "name": "Welcome", "category": "", "subject": "Hi", "is_base": 0 }] },
316
- "result": [{ "id": "tpl_1", "name": "Welcome", "category": "", "subject": "Hi", "is_base": 0 }]
698
+ "request": {
699
+ "method": "GET",
700
+ "path": "/api/templates"
701
+ },
702
+ "response": {
703
+ "status": 200,
704
+ "body": [
705
+ {
706
+ "id": "tpl_1",
707
+ "name": "Welcome",
708
+ "category": "",
709
+ "subject": "Hi",
710
+ "is_base": 0
711
+ }
712
+ ]
713
+ },
714
+ "result": [
715
+ {
716
+ "id": "tpl_1",
717
+ "name": "Welcome",
718
+ "category": "",
719
+ "subject": "Hi",
720
+ "is_base": 0
721
+ }
722
+ ]
317
723
  },
318
724
  {
319
725
  "name": "list_base_templates",
320
726
  "method": "listBaseTemplates",
321
727
  "args": {},
322
- "request": { "method": "GET", "path": "/api/templates/base" },
323
- "response": { "status": 200, "body": [{ "id": "base_welcome-dark", "name": "Welcome — Dark", "category": "Welcome", "subject": "Welcome to MailKite", "is_base": 1 }] },
324
- "result": [{ "id": "base_welcome-dark", "name": "Welcome — Dark", "category": "Welcome", "subject": "Welcome to MailKite", "is_base": 1 }]
728
+ "request": {
729
+ "method": "GET",
730
+ "path": "/api/templates/base"
731
+ },
732
+ "response": {
733
+ "status": 200,
734
+ "body": [
735
+ {
736
+ "id": "base_welcome-dark",
737
+ "name": "Welcome — Dark",
738
+ "category": "Welcome",
739
+ "subject": "Welcome to MailKite",
740
+ "is_base": 1
741
+ }
742
+ ]
743
+ },
744
+ "result": [
745
+ {
746
+ "id": "base_welcome-dark",
747
+ "name": "Welcome — Dark",
748
+ "category": "Welcome",
749
+ "subject": "Welcome to MailKite",
750
+ "is_base": 1
751
+ }
752
+ ]
325
753
  },
326
754
  {
327
755
  "name": "get_template",
328
756
  "method": "getTemplate",
329
- "args": { "id": "tpl_1" },
330
- "request": { "method": "GET", "path": "/api/templates/tpl_1" },
331
- "response": { "status": 200, "body": { "id": "tpl_1", "name": "Welcome", "html": "<p>hi</p>" } },
332
- "result": { "id": "tpl_1", "name": "Welcome", "html": "<p>hi</p>" }
757
+ "args": {
758
+ "id": "tpl_1"
759
+ },
760
+ "request": {
761
+ "method": "GET",
762
+ "path": "/api/templates/tpl_1"
763
+ },
764
+ "response": {
765
+ "status": 200,
766
+ "body": {
767
+ "id": "tpl_1",
768
+ "name": "Welcome",
769
+ "html": "<p>hi</p>"
770
+ }
771
+ },
772
+ "result": {
773
+ "id": "tpl_1",
774
+ "name": "Welcome",
775
+ "html": "<p>hi</p>"
776
+ }
333
777
  },
334
778
  {
335
779
  "name": "create_template",
336
780
  "method": "createTemplate",
337
- "args": { "baseId": "base_welcome-dark", "name": "My Welcome" },
781
+ "args": {
782
+ "baseId": "base_welcome-dark",
783
+ "name": "My Welcome"
784
+ },
338
785
  "request": {
339
786
  "method": "POST",
340
787
  "path": "/api/templates",
341
788
  "bodySchema": "create-template-request",
342
- "body": { "baseId": "base_welcome-dark", "name": "My Welcome" }
789
+ "body": {
790
+ "baseId": "base_welcome-dark",
791
+ "name": "My Welcome"
792
+ }
793
+ },
794
+ "response": {
795
+ "status": 201,
796
+ "body": {
797
+ "id": "tpl_2",
798
+ "name": "My Welcome"
799
+ }
343
800
  },
344
- "response": { "status": 201, "body": { "id": "tpl_2", "name": "My Welcome" } },
345
- "result": { "id": "tpl_2", "name": "My Welcome" }
801
+ "result": {
802
+ "id": "tpl_2",
803
+ "name": "My Welcome"
804
+ }
346
805
  },
347
806
  {
348
807
  "name": "get_message_not_found",
349
808
  "method": "getMessage",
350
- "args": { "id": "msg_missing" },
351
- "request": { "method": "GET", "path": "/api/messages/msg_missing" },
352
- "response": { "status": 404, "body": { "error": "not found" } },
353
- "error": { "status": 404, "message": "not found" }
809
+ "args": {
810
+ "id": "msg_missing"
811
+ },
812
+ "request": {
813
+ "method": "GET",
814
+ "path": "/api/messages/msg_missing"
815
+ },
816
+ "response": {
817
+ "status": 404,
818
+ "body": {
819
+ "error": "not found"
820
+ }
821
+ },
822
+ "error": {
823
+ "status": 404,
824
+ "message": "not found"
825
+ }
354
826
  },
355
827
  {
356
828
  "name": "send_upstream_error",
357
829
  "method": "send",
358
- "args": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "subject": "Hi", "text": "x" },
830
+ "args": {
831
+ "from": "hello@app.mailkite.dev",
832
+ "to": "ada@example.com",
833
+ "subject": "Hi",
834
+ "text": "x"
835
+ },
359
836
  "request": {
360
837
  "method": "POST",
361
838
  "path": "/v1/send",
362
839
  "bodySchema": "send-request",
363
- "body": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "subject": "Hi", "text": "x" }
840
+ "body": {
841
+ "from": "hello@app.mailkite.dev",
842
+ "to": "ada@example.com",
843
+ "subject": "Hi",
844
+ "text": "x"
845
+ }
364
846
  },
365
- "response": { "status": 502, "body": { "error": "an upstream send failed" } },
366
- "error": { "status": 502, "message": "an upstream send failed" }
847
+ "response": {
848
+ "status": 502,
849
+ "body": {
850
+ "error": "an upstream send failed"
851
+ }
852
+ },
853
+ "error": {
854
+ "status": 502,
855
+ "message": "an upstream send failed"
856
+ }
367
857
  },
368
858
  {
369
859
  "name": "verify_webhook_valid",
@@ -416,6 +906,56 @@
416
906
  "toleranceMs": 0
417
907
  },
418
908
  "result": false
909
+ },
910
+ {
911
+ "name": "reply_ok",
912
+ "method": "replyOk",
913
+ "local": true,
914
+ "args": {},
915
+ "result": "{\"status\":\"ok\"}"
916
+ },
917
+ {
918
+ "name": "reply_spam",
919
+ "method": "replySpam",
920
+ "local": true,
921
+ "args": {},
922
+ "result": "{\"status\":\"spam\"}"
923
+ },
924
+ {
925
+ "name": "reply_drop",
926
+ "method": "replyDrop",
927
+ "local": true,
928
+ "args": {},
929
+ "result": "{\"status\":\"drop\"}"
930
+ },
931
+ {
932
+ "name": "reply_block_sender",
933
+ "method": "replyBlockSender",
934
+ "local": true,
935
+ "args": {},
936
+ "result": "{\"status\":\"ok\",\"actions\":[{\"type\":\"block-sender\"}]}"
937
+ },
938
+ {
939
+ "name": "decrypt_envelope",
940
+ "method": "decrypt",
941
+ "local": true,
942
+ "argsSchema": "decrypt-request",
943
+ "args": {
944
+ "envelope": "{\"v\":1,\"keyAlg\":\"RSA-OAEP-256\",\"fp\":\"c3be15f1703b8841e3be563d41970eae6431124e84f9ed1748b4e5af372e099c\",\"enc\":\"A256GCM\",\"iv\":\"OHxFNxJU/ySQhl4l\",\"wrappedKey\":\"lwrH9IiLjJIq1+jvCMpBJ+63vP6jMotJ1eB4OrdShQ4ZGv/jlP+eUkVxa/hK9Xnp9Jez0yLASkKoO2vCxPy5CWKLk1rsOSdkc3G1Kg8A301cgg3+DNuM5SeaTkWRcjNIcZvKF0CBt/EB5pzqekVATwf3LojjzFenXZdCFzF2L/XSi0fmChvTj3RbFNRQczMPW2PVp4nhULylbVP9HUv1MNVH8Y42+kqUPzAelolM7l4hDgB1ujqcXGwAQ0w+xViyzt1mLsj+jcYZv2xbcsPS7/LG6bW+24DTnh61Tpd3jr9VAlqUF/vWtJ7Vxa3bh17AeQzl2x6chwDx+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wKBgQDO0E+PMmshHWbWDEE7Fjoe0dZtPx7CSG0B\nKXj5G+njHltUxPxodAYb95dUHQl/sFy3JpNcyBk8P+qlc/fhqojR/fE3+qK+EHjw\nKW/Ka4vEegtwdTXIeG4WgpTtFOjY7qsGHSFk2rFFjDrYtCMq6IBIClqk+dueCg52\nQsEHXQRwWQKBgQDBDNQa3xr5wswCaUhhdlImxsnnMU1UJcODwp0rc2d9ykuJ3wYL\n0sguXVO/pGMKFJk3Smu6zBH0wzT8y5g9SS7A6xwgQJoxVAZ3+gfUzLl/rwBnGNrn\nSj1mzJiNHXOj6jz+z8v6x9DgolkcW/lmB3E6jwjFrm3D62iHCKFkBIFsFQKBgAGq\ni/mLXnGV2w4+awge1bkJ18BpkcXe74Hi46aeIvRBelrke2QcCzCOfhmfYkQ1F4oi\nNW257vodSbariIO47AFFGnxo+Iave0n0C4KF+0pJ8W2mhBhpX/muc6S1VmrpAVe7\nRFmbqXH1/0NfsCjYVrA95R0PJkXPru4k+4kjprWBAoGAHtU/VXiOqSagIo3J/Bm5\nyUcJdbbguV/T9PPVu/Lq8SypCd5vqmwgYRmG+mIJEd/VYRkCZn3gbqNCn5OfbJh5\nG4Xatr7aofxyz2Qon/nix8Ut1+s1Npg1ugkz/atr4CZ4QArk8JmwsCReWJXCjKLX\n2WObKEWjGhgwths3MrC/CDw=\n-----END PRIVATE KEY-----"
946
+ },
947
+ "result": "Hello from MailKite — encrypted at rest. 🔒"
948
+ },
949
+ {
950
+ "name": "encrypt_roundtrip",
951
+ "method": "encryptRoundtrip",
952
+ "local": true,
953
+ "args": {
954
+ "plaintext": "Hello from MailKite — encrypted at rest. 🔒",
955
+ "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvRNpZfCvRN9eJoz3xZAw\nZiJihcr56gSZ6h7pHALXqrPfZCuUEsecJoOz1MP/U4vx0zq9lepYF8unfl22Zd14\nwmhZJoE4ChfWc/E7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un7fq\n2piRrFVr8NRVrFQwLmA8/3lcjXhCC80FG+SdSaZBJPD7EFDT3xePl/OnQmSHSnpR\nD+vklHVPAO4n3aMa/HKFgpxasxpUqRddzL6bBFNHpBgQR9Wv6hPiDP42SS7//uQF\nkrduS20kKsnrpGogy48zJQLfYwKBgQDO0E+PMmshHWbWDEE7Fjoe0dZtPx7CSG0B\nKXj5G+njHltUxPxodAYb95dUHQl/sFy3JpNcyBk8P+qlc/fhqojR/fE3+qK+EHjw\nKW/Ka4vEegtwdTXIeG4WgpTtFOjY7qsGHSFk2rFFjDrYtCMq6IBIClqk+dueCg52\nQsEHXQRwWQKBgQDBDNQa3xr5wswCaUhhdlImxsnnMU1UJcODwp0rc2d9ykuJ3wYL\n0sguXVO/pGMKFJk3Smu6zBH0wzT8y5g9SS7A6xwgQJoxVAZ3+gfUzLl/rwBnGNrn\nSj1mzJiNHXOj6jz+z8v6x9DgolkcW/lmB3E6jwjFrm3D62iHCKFkBIFsFQKBgAGq\ni/mLXnGV2w4+awge1bkJ18BpkcXe74Hi46aeIvRBelrke2QcCzCOfhmfYkQ1F4oi\nNW257vodSbariIO47AFFGnxo+Iave0n0C4KF+0pJ8W2mhBhpX/muc6S1VmrpAVe7\nRFmbqXH1/0NfsCjYVrA95R0PJkXPru4k+4kjprWBAoGAHtU/VXiOqSagIo3J/Bm5\nyUcJdbbguV/T9PPVu/Lq8SypCd5vqmwgYRmG+mIJEd/VYRkCZn3gbqNCn5OfbJh5\nG4Xatr7aofxyz2Qon/nix8Ut1+s1Npg1ugkz/atr4CZ4QArk8JmwsCReWJXCjKLX\n2WObKEWjGhgwths3MrC/CDw=\n-----END PRIVATE KEY-----"
957
+ },
958
+ "result": "Hello from MailKite — encrypted at rest. 🔒"
419
959
  }
420
960
  ]
421
961
  }