@mailkite/mcp 0.3.0 → 0.4.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,56 @@
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
+ }
17
36
  },
18
37
  {
19
38
  "name": "send_full",
20
39
  "method": "send",
21
40
  "args": {
22
41
  "from": "hello@app.mailkite.dev",
23
- "to": ["ada@example.com", "grace@example.com"],
42
+ "to": [
43
+ "ada@example.com",
44
+ "grace@example.com"
45
+ ],
24
46
  "cc": "cc@example.com",
25
47
  "subject": "Your invoice #1042",
26
48
  "html": "<p>Thanks!</p>",
27
49
  "text": "Thanks!",
28
50
  "replyTo": "support@app.mailkite.dev",
29
51
  "inReplyTo": "<a1b2@mail.example.com>",
30
- "attachments": [{ "filename": "receipt.pdf", "url": "https://files.app.com/receipt.pdf" }]
52
+ "attachments": [
53
+ {
54
+ "filename": "receipt.pdf",
55
+ "url": "https://files.app.com/receipt.pdf"
56
+ }
57
+ ]
31
58
  },
32
59
  "request": {
33
60
  "method": "POST",
@@ -35,98 +62,233 @@
35
62
  "bodySchema": "send-request",
36
63
  "body": {
37
64
  "from": "hello@app.mailkite.dev",
38
- "to": ["ada@example.com", "grace@example.com"],
65
+ "to": [
66
+ "ada@example.com",
67
+ "grace@example.com"
68
+ ],
39
69
  "cc": "cc@example.com",
40
70
  "subject": "Your invoice #1042",
41
71
  "html": "<p>Thanks!</p>",
42
72
  "text": "Thanks!",
43
73
  "replyTo": "support@app.mailkite.dev",
44
74
  "inReplyTo": "<a1b2@mail.example.com>",
45
- "attachments": [{ "filename": "receipt.pdf", "url": "https://files.app.com/receipt.pdf" }]
75
+ "attachments": [
76
+ {
77
+ "filename": "receipt.pdf",
78
+ "url": "https://files.app.com/receipt.pdf"
79
+ }
80
+ ]
46
81
  }
47
82
  },
48
- "response": { "status": 202, "body": { "id": "msg_full", "status": "queued" } },
49
- "result": { "id": "msg_full", "status": "queued" }
83
+ "response": {
84
+ "status": 202,
85
+ "body": {
86
+ "id": "msg_full",
87
+ "status": "queued"
88
+ }
89
+ },
90
+ "result": {
91
+ "id": "msg_full",
92
+ "status": "queued"
93
+ }
50
94
  },
51
95
  {
52
96
  "name": "list_domains",
53
97
  "method": "listDomains",
54
98
  "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" }]
99
+ "request": {
100
+ "method": "GET",
101
+ "path": "/api/domains"
102
+ },
103
+ "response": {
104
+ "status": 200,
105
+ "body": [
106
+ {
107
+ "id": "dom_1",
108
+ "domain": "app.mailkite.dev"
109
+ }
110
+ ]
111
+ },
112
+ "result": [
113
+ {
114
+ "id": "dom_1",
115
+ "domain": "app.mailkite.dev"
116
+ }
117
+ ]
58
118
  },
59
119
  {
60
120
  "name": "create_domain",
61
121
  "method": "createDomain",
62
- "args": { "domain": "app.mailkite.dev" },
122
+ "args": {
123
+ "domain": "app.mailkite.dev"
124
+ },
63
125
  "request": {
64
126
  "method": "POST",
65
127
  "path": "/api/domains",
66
128
  "bodySchema": "create-domain-request",
67
- "body": { "domain": "app.mailkite.dev" }
129
+ "body": {
130
+ "domain": "app.mailkite.dev"
131
+ }
68
132
  },
69
- "response": { "status": 200, "body": { "domain": { "id": "dom_1", "status": "pending" }, "dns": [] } },
70
- "result": { "domain": { "id": "dom_1", "status": "pending" }, "dns": [] }
133
+ "response": {
134
+ "status": 200,
135
+ "body": {
136
+ "domain": {
137
+ "id": "dom_1",
138
+ "status": "pending"
139
+ },
140
+ "dns": []
141
+ }
142
+ },
143
+ "result": {
144
+ "domain": {
145
+ "id": "dom_1",
146
+ "status": "pending"
147
+ },
148
+ "dns": []
149
+ }
71
150
  },
72
151
  {
73
152
  "name": "get_domain",
74
153
  "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" }
154
+ "args": {
155
+ "id": "dom_1"
156
+ },
157
+ "request": {
158
+ "method": "GET",
159
+ "path": "/api/domains/dom_1"
160
+ },
161
+ "response": {
162
+ "status": 200,
163
+ "body": {
164
+ "id": "dom_1",
165
+ "domain": "app.mailkite.dev"
166
+ }
167
+ },
168
+ "result": {
169
+ "id": "dom_1",
170
+ "domain": "app.mailkite.dev"
171
+ }
79
172
  },
80
173
  {
81
174
  "name": "delete_domain",
82
175
  "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 }
176
+ "args": {
177
+ "id": "dom_1"
178
+ },
179
+ "request": {
180
+ "method": "DELETE",
181
+ "path": "/api/domains/dom_1"
182
+ },
183
+ "response": {
184
+ "status": 200,
185
+ "body": {
186
+ "ok": true
187
+ }
188
+ },
189
+ "result": {
190
+ "ok": true
191
+ }
87
192
  },
88
193
  {
89
194
  "name": "verify_domain",
90
195
  "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" }
196
+ "args": {
197
+ "id": "dom_1"
198
+ },
199
+ "request": {
200
+ "method": "POST",
201
+ "path": "/api/domains/dom_1/verify"
202
+ },
203
+ "response": {
204
+ "status": 200,
205
+ "body": {
206
+ "id": "dom_1",
207
+ "status": "verified"
208
+ }
209
+ },
210
+ "result": {
211
+ "id": "dom_1",
212
+ "status": "verified"
213
+ }
95
214
  },
96
215
  {
97
216
  "name": "set_webhook",
98
217
  "method": "setWebhook",
99
- "args": { "id": "dom_1", "url": "https://app.com/hooks/mailkite" },
218
+ "args": {
219
+ "id": "dom_1",
220
+ "url": "https://app.com/hooks/mailkite"
221
+ },
100
222
  "request": {
101
223
  "method": "PUT",
102
224
  "path": "/api/domains/dom_1/webhook",
103
225
  "bodySchema": "set-webhook-request",
104
- "body": { "url": "https://app.com/hooks/mailkite" }
226
+ "body": {
227
+ "url": "https://app.com/hooks/mailkite"
228
+ }
229
+ },
230
+ "response": {
231
+ "status": 200,
232
+ "body": {
233
+ "ok": true,
234
+ "url": "https://app.com/hooks/mailkite"
235
+ }
105
236
  },
106
- "response": { "status": 200, "body": { "ok": true, "url": "https://app.com/hooks/mailkite" } },
107
- "result": { "ok": true, "url": "https://app.com/hooks/mailkite" }
237
+ "result": {
238
+ "ok": true,
239
+ "url": "https://app.com/hooks/mailkite"
240
+ }
108
241
  },
109
242
  {
110
243
  "name": "delete_webhook",
111
244
  "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 }
245
+ "args": {
246
+ "id": "dom_1"
247
+ },
248
+ "request": {
249
+ "method": "DELETE",
250
+ "path": "/api/domains/dom_1/webhook"
251
+ },
252
+ "response": {
253
+ "status": 200,
254
+ "body": {
255
+ "ok": true
256
+ }
257
+ },
258
+ "result": {
259
+ "ok": true
260
+ }
116
261
  },
117
262
  {
118
263
  "name": "test_webhook",
119
264
  "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 }
265
+ "args": {
266
+ "id": "dom_1"
267
+ },
268
+ "request": {
269
+ "method": "POST",
270
+ "path": "/api/domains/dom_1/webhook/test"
271
+ },
272
+ "response": {
273
+ "status": 200,
274
+ "body": {
275
+ "ok": true
276
+ }
277
+ },
278
+ "result": {
279
+ "ok": true
280
+ }
124
281
  },
125
282
  {
126
283
  "name": "check_domain_availability",
127
284
  "method": "checkDomainAvailability",
128
- "args": { "domain": "acme.com" },
129
- "request": { "method": "GET", "path": "/api/domains/register/check" },
285
+ "args": {
286
+ "domain": "acme.com"
287
+ },
288
+ "request": {
289
+ "method": "GET",
290
+ "path": "/api/domains/register/check"
291
+ },
130
292
  "response": {
131
293
  "status": 200,
132
294
  "body": {
@@ -134,7 +296,12 @@
134
296
  "domain": "acme.com",
135
297
  "available": true,
136
298
  "premium": false,
137
- "price": { "amount": 12.99, "currency": "USD", "period": 1, "periodUnit": "y" }
299
+ "price": {
300
+ "amount": 12.99,
301
+ "currency": "USD",
302
+ "period": 1,
303
+ "periodUnit": "y"
304
+ }
138
305
  }
139
306
  },
140
307
  "result": {
@@ -142,7 +309,12 @@
142
309
  "domain": "acme.com",
143
310
  "available": true,
144
311
  "premium": false,
145
- "price": { "amount": 12.99, "currency": "USD", "period": 1, "periodUnit": "y" }
312
+ "price": {
313
+ "amount": 12.99,
314
+ "currency": "USD",
315
+ "period": 1,
316
+ "periodUnit": "y"
317
+ }
146
318
  }
147
319
  },
148
320
  {
@@ -184,16 +356,30 @@
184
356
  "response": {
185
357
  "status": 201,
186
358
  "body": {
187
- "domain": { "id": "dom_1", "domain": "acme.com", "status": "verified" },
359
+ "domain": {
360
+ "id": "dom_1",
361
+ "domain": "acme.com",
362
+ "status": "verified"
363
+ },
188
364
  "dns": [],
189
- "registration": { "status": "registered", "reference": "ref_1" },
365
+ "registration": {
366
+ "status": "registered",
367
+ "reference": "ref_1"
368
+ },
190
369
  "dnsProvisioned": true
191
370
  }
192
371
  },
193
372
  "result": {
194
- "domain": { "id": "dom_1", "domain": "acme.com", "status": "verified" },
373
+ "domain": {
374
+ "id": "dom_1",
375
+ "domain": "acme.com",
376
+ "status": "verified"
377
+ },
195
378
  "dns": [],
196
- "registration": { "status": "registered", "reference": "ref_1" },
379
+ "registration": {
380
+ "status": "registered",
381
+ "reference": "ref_1"
382
+ },
197
383
  "dnsProvisioned": true
198
384
  }
199
385
  },
@@ -201,169 +387,435 @@
201
387
  "name": "list_routes",
202
388
  "method": "listRoutes",
203
389
  "args": {},
204
- "request": { "method": "GET", "path": "/api/routes" },
205
- "response": { "status": 200, "body": [] },
390
+ "request": {
391
+ "method": "GET",
392
+ "path": "/api/routes"
393
+ },
394
+ "response": {
395
+ "status": 200,
396
+ "body": []
397
+ },
206
398
  "result": []
207
399
  },
208
400
  {
209
401
  "name": "create_route",
210
402
  "method": "createRoute",
211
- "args": { "match": "*@app.mailkite.dev", "action": "webhook", "destination": "https://app.com/hooks" },
403
+ "args": {
404
+ "match": "*@app.mailkite.dev",
405
+ "action": "webhook",
406
+ "destination": "https://app.com/hooks"
407
+ },
212
408
  "request": {
213
409
  "method": "POST",
214
410
  "path": "/api/routes",
215
411
  "bodySchema": "create-route-request",
216
- "body": { "match": "*@app.mailkite.dev", "action": "webhook", "destination": "https://app.com/hooks" }
412
+ "body": {
413
+ "match": "*@app.mailkite.dev",
414
+ "action": "webhook",
415
+ "destination": "https://app.com/hooks"
416
+ }
217
417
  },
218
- "response": { "status": 200, "body": { "id": "rte_1" } },
219
- "result": { "id": "rte_1" }
418
+ "response": {
419
+ "status": 200,
420
+ "body": {
421
+ "id": "rte_1"
422
+ }
423
+ },
424
+ "result": {
425
+ "id": "rte_1"
426
+ }
220
427
  },
221
428
  {
222
429
  "name": "agent_default",
223
430
  "method": "agent",
224
- "args": { "text": "What's my current balance?" },
431
+ "args": {
432
+ "text": "What's my current balance?"
433
+ },
225
434
  "request": {
226
435
  "method": "POST",
227
436
  "path": "/v1/agent",
228
437
  "bodySchema": "agent-request",
229
- "body": { "text": "What's my current balance?" }
438
+ "body": {
439
+ "text": "What's my current balance?"
440
+ }
441
+ },
442
+ "response": {
443
+ "status": 200,
444
+ "body": {
445
+ "ok": true,
446
+ "text": "Your balance is $0.00.",
447
+ "messageId": "msg_agent"
448
+ }
230
449
  },
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" }
450
+ "result": {
451
+ "ok": true,
452
+ "text": "Your balance is $0.00.",
453
+ "messageId": "msg_agent"
454
+ }
233
455
  },
234
456
  {
235
457
  "name": "agent_by_route",
236
458
  "method": "agent",
237
- "args": { "text": "ping", "routeId": "rte_1", "model": "claude-sonnet-4-6" },
459
+ "args": {
460
+ "text": "ping",
461
+ "routeId": "rte_1",
462
+ "model": "claude-sonnet-4-6"
463
+ },
238
464
  "request": {
239
465
  "method": "POST",
240
466
  "path": "/v1/agent",
241
467
  "bodySchema": "agent-request",
242
- "body": { "text": "ping", "routeId": "rte_1", "model": "claude-sonnet-4-6" }
468
+ "body": {
469
+ "text": "ping",
470
+ "routeId": "rte_1",
471
+ "model": "claude-sonnet-4-6"
472
+ }
473
+ },
474
+ "response": {
475
+ "status": 200,
476
+ "body": {
477
+ "ok": true,
478
+ "text": "pong",
479
+ "messageId": "msg_agent2"
480
+ }
243
481
  },
244
- "response": { "status": 200, "body": { "ok": true, "text": "pong", "messageId": "msg_agent2" } },
245
- "result": { "ok": true, "text": "pong", "messageId": "msg_agent2" }
482
+ "result": {
483
+ "ok": true,
484
+ "text": "pong",
485
+ "messageId": "msg_agent2"
486
+ }
246
487
  },
247
488
  {
248
489
  "name": "route_by_id",
249
490
  "method": "route",
250
- "args": { "routeId": "rte_1", "from": "ops@example.com", "subject": "Process this", "text": "Please handle." },
491
+ "args": {
492
+ "routeId": "rte_1",
493
+ "from": "ops@example.com",
494
+ "subject": "Process this",
495
+ "text": "Please handle."
496
+ },
251
497
  "request": {
252
498
  "method": "POST",
253
499
  "path": "/v1/route",
254
500
  "bodySchema": "route-message-request",
255
- "body": { "routeId": "rte_1", "from": "ops@example.com", "subject": "Process this", "text": "Please handle." }
501
+ "body": {
502
+ "routeId": "rte_1",
503
+ "from": "ops@example.com",
504
+ "subject": "Process this",
505
+ "text": "Please handle."
506
+ }
507
+ },
508
+ "response": {
509
+ "status": 202,
510
+ "body": {
511
+ "id": "msg_r1",
512
+ "routed": true,
513
+ "action": "webhook"
514
+ }
256
515
  },
257
- "response": { "status": 202, "body": { "id": "msg_r1", "routed": true, "action": "webhook" } },
258
- "result": { "id": "msg_r1", "routed": true, "action": "webhook" }
516
+ "result": {
517
+ "id": "msg_r1",
518
+ "routed": true,
519
+ "action": "webhook"
520
+ }
259
521
  },
260
522
  {
261
523
  "name": "route_by_address",
262
524
  "method": "route",
263
- "args": { "address": "support@app.mailkite.dev", "from": "ops@example.com", "text": "hey there" },
525
+ "args": {
526
+ "address": "support@app.mailkite.dev",
527
+ "from": "ops@example.com",
528
+ "text": "hey there"
529
+ },
264
530
  "request": {
265
531
  "method": "POST",
266
532
  "path": "/v1/route",
267
533
  "bodySchema": "route-message-request",
268
- "body": { "address": "support@app.mailkite.dev", "from": "ops@example.com", "text": "hey there" }
534
+ "body": {
535
+ "address": "support@app.mailkite.dev",
536
+ "from": "ops@example.com",
537
+ "text": "hey there"
538
+ }
539
+ },
540
+ "response": {
541
+ "status": 202,
542
+ "body": {
543
+ "id": "msg_r2",
544
+ "routed": true,
545
+ "action": "agent"
546
+ }
269
547
  },
270
- "response": { "status": 202, "body": { "id": "msg_r2", "routed": true, "action": "agent" } },
271
- "result": { "id": "msg_r2", "routed": true, "action": "agent" }
548
+ "result": {
549
+ "id": "msg_r2",
550
+ "routed": true,
551
+ "action": "agent"
552
+ }
272
553
  },
273
554
  {
274
555
  "name": "list_messages",
275
556
  "method": "listMessages",
276
557
  "args": {},
277
- "request": { "method": "GET", "path": "/api/messages" },
278
- "response": { "status": 200, "body": [{ "id": "msg_1" }] },
279
- "result": [{ "id": "msg_1" }]
558
+ "request": {
559
+ "method": "GET",
560
+ "path": "/api/messages"
561
+ },
562
+ "response": {
563
+ "status": 200,
564
+ "body": [
565
+ {
566
+ "id": "msg_1"
567
+ }
568
+ ]
569
+ },
570
+ "result": [
571
+ {
572
+ "id": "msg_1"
573
+ }
574
+ ]
280
575
  },
281
576
  {
282
577
  "name": "get_message",
283
578
  "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": [] }
579
+ "args": {
580
+ "id": "msg_1"
581
+ },
582
+ "request": {
583
+ "method": "GET",
584
+ "path": "/api/messages/msg_1"
585
+ },
586
+ "response": {
587
+ "status": 200,
588
+ "body": {
589
+ "id": "msg_1",
590
+ "deliveries": [],
591
+ "attachments": []
592
+ }
593
+ },
594
+ "result": {
595
+ "id": "msg_1",
596
+ "deliveries": [],
597
+ "attachments": []
598
+ }
288
599
  },
289
600
  {
290
601
  "name": "retry_delivery",
291
602
  "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 }
603
+ "args": {
604
+ "id": "dlv_1"
605
+ },
606
+ "request": {
607
+ "method": "POST",
608
+ "path": "/api/deliveries/dlv_1/retry"
609
+ },
610
+ "response": {
611
+ "status": 200,
612
+ "body": {
613
+ "ok": true
614
+ }
615
+ },
616
+ "result": {
617
+ "ok": true
618
+ }
296
619
  },
297
620
  {
298
621
  "name": "send_with_template",
299
622
  "method": "send",
300
- "args": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "templateId": "base_welcome-dark", "templateData": { "name": "Ada" } },
623
+ "args": {
624
+ "from": "hello@app.mailkite.dev",
625
+ "to": "ada@example.com",
626
+ "templateId": "base_welcome-dark",
627
+ "templateData": {
628
+ "name": "Ada"
629
+ }
630
+ },
301
631
  "request": {
302
632
  "method": "POST",
303
633
  "path": "/v1/send",
304
634
  "bodySchema": "send-request",
305
- "body": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "templateId": "base_welcome-dark", "templateData": { "name": "Ada" } }
635
+ "body": {
636
+ "from": "hello@app.mailkite.dev",
637
+ "to": "ada@example.com",
638
+ "templateId": "base_welcome-dark",
639
+ "templateData": {
640
+ "name": "Ada"
641
+ }
642
+ }
643
+ },
644
+ "response": {
645
+ "status": 202,
646
+ "body": {
647
+ "id": "msg_tpl",
648
+ "status": "queued"
649
+ }
306
650
  },
307
- "response": { "status": 202, "body": { "id": "msg_tpl", "status": "queued" } },
308
- "result": { "id": "msg_tpl", "status": "queued" }
651
+ "result": {
652
+ "id": "msg_tpl",
653
+ "status": "queued"
654
+ }
309
655
  },
310
656
  {
311
657
  "name": "list_templates",
312
658
  "method": "listTemplates",
313
659
  "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 }]
660
+ "request": {
661
+ "method": "GET",
662
+ "path": "/api/templates"
663
+ },
664
+ "response": {
665
+ "status": 200,
666
+ "body": [
667
+ {
668
+ "id": "tpl_1",
669
+ "name": "Welcome",
670
+ "category": "",
671
+ "subject": "Hi",
672
+ "is_base": 0
673
+ }
674
+ ]
675
+ },
676
+ "result": [
677
+ {
678
+ "id": "tpl_1",
679
+ "name": "Welcome",
680
+ "category": "",
681
+ "subject": "Hi",
682
+ "is_base": 0
683
+ }
684
+ ]
317
685
  },
318
686
  {
319
687
  "name": "list_base_templates",
320
688
  "method": "listBaseTemplates",
321
689
  "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 }]
690
+ "request": {
691
+ "method": "GET",
692
+ "path": "/api/templates/base"
693
+ },
694
+ "response": {
695
+ "status": 200,
696
+ "body": [
697
+ {
698
+ "id": "base_welcome-dark",
699
+ "name": "Welcome — Dark",
700
+ "category": "Welcome",
701
+ "subject": "Welcome to MailKite",
702
+ "is_base": 1
703
+ }
704
+ ]
705
+ },
706
+ "result": [
707
+ {
708
+ "id": "base_welcome-dark",
709
+ "name": "Welcome — Dark",
710
+ "category": "Welcome",
711
+ "subject": "Welcome to MailKite",
712
+ "is_base": 1
713
+ }
714
+ ]
325
715
  },
326
716
  {
327
717
  "name": "get_template",
328
718
  "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>" }
719
+ "args": {
720
+ "id": "tpl_1"
721
+ },
722
+ "request": {
723
+ "method": "GET",
724
+ "path": "/api/templates/tpl_1"
725
+ },
726
+ "response": {
727
+ "status": 200,
728
+ "body": {
729
+ "id": "tpl_1",
730
+ "name": "Welcome",
731
+ "html": "<p>hi</p>"
732
+ }
733
+ },
734
+ "result": {
735
+ "id": "tpl_1",
736
+ "name": "Welcome",
737
+ "html": "<p>hi</p>"
738
+ }
333
739
  },
334
740
  {
335
741
  "name": "create_template",
336
742
  "method": "createTemplate",
337
- "args": { "baseId": "base_welcome-dark", "name": "My Welcome" },
743
+ "args": {
744
+ "baseId": "base_welcome-dark",
745
+ "name": "My Welcome"
746
+ },
338
747
  "request": {
339
748
  "method": "POST",
340
749
  "path": "/api/templates",
341
750
  "bodySchema": "create-template-request",
342
- "body": { "baseId": "base_welcome-dark", "name": "My Welcome" }
751
+ "body": {
752
+ "baseId": "base_welcome-dark",
753
+ "name": "My Welcome"
754
+ }
755
+ },
756
+ "response": {
757
+ "status": 201,
758
+ "body": {
759
+ "id": "tpl_2",
760
+ "name": "My Welcome"
761
+ }
343
762
  },
344
- "response": { "status": 201, "body": { "id": "tpl_2", "name": "My Welcome" } },
345
- "result": { "id": "tpl_2", "name": "My Welcome" }
763
+ "result": {
764
+ "id": "tpl_2",
765
+ "name": "My Welcome"
766
+ }
346
767
  },
347
768
  {
348
769
  "name": "get_message_not_found",
349
770
  "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" }
771
+ "args": {
772
+ "id": "msg_missing"
773
+ },
774
+ "request": {
775
+ "method": "GET",
776
+ "path": "/api/messages/msg_missing"
777
+ },
778
+ "response": {
779
+ "status": 404,
780
+ "body": {
781
+ "error": "not found"
782
+ }
783
+ },
784
+ "error": {
785
+ "status": 404,
786
+ "message": "not found"
787
+ }
354
788
  },
355
789
  {
356
790
  "name": "send_upstream_error",
357
791
  "method": "send",
358
- "args": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "subject": "Hi", "text": "x" },
792
+ "args": {
793
+ "from": "hello@app.mailkite.dev",
794
+ "to": "ada@example.com",
795
+ "subject": "Hi",
796
+ "text": "x"
797
+ },
359
798
  "request": {
360
799
  "method": "POST",
361
800
  "path": "/v1/send",
362
801
  "bodySchema": "send-request",
363
- "body": { "from": "hello@app.mailkite.dev", "to": "ada@example.com", "subject": "Hi", "text": "x" }
802
+ "body": {
803
+ "from": "hello@app.mailkite.dev",
804
+ "to": "ada@example.com",
805
+ "subject": "Hi",
806
+ "text": "x"
807
+ }
364
808
  },
365
- "response": { "status": 502, "body": { "error": "an upstream send failed" } },
366
- "error": { "status": 502, "message": "an upstream send failed" }
809
+ "response": {
810
+ "status": 502,
811
+ "body": {
812
+ "error": "an upstream send failed"
813
+ }
814
+ },
815
+ "error": {
816
+ "status": 502,
817
+ "message": "an upstream send failed"
818
+ }
367
819
  },
368
820
  {
369
821
  "name": "verify_webhook_valid",
@@ -416,6 +868,35 @@
416
868
  "toleranceMs": 0
417
869
  },
418
870
  "result": false
871
+ },
872
+ {
873
+ "name": "reply_ok",
874
+ "method": "replyOk",
875
+ "local": true,
876
+ "args": {},
877
+ "result": "{\"status\":\"ok\"}"
878
+ },
879
+ {
880
+ "name": "decrypt_envelope",
881
+ "method": "decrypt",
882
+ "local": true,
883
+ "argsSchema": "decrypt-request",
884
+ "args": {
885
+ "envelope": "{\"v\":1,\"keyAlg\":\"RSA-OAEP-256\",\"fp\":\"c3be15f1703b8841e3be563d41970eae6431124e84f9ed1748b4e5af372e099c\",\"enc\":\"A256GCM\",\"iv\":\"OHxFNxJU/ySQhl4l\",\"wrappedKey\":\"lwrH9IiLjJIq1+jvCMpBJ+63vP6jMotJ1eB4OrdShQ4ZGv/jlP+eUkVxa/hK9Xnp9Jez0yLASkKoO2vCxPy5CWKLk1rsOSdkc3G1Kg8A301cgg3+DNuM5SeaTkWRcjNIcZvKF0CBt/EB5pzqekVATwf3LojjzFenXZdCFzF2L/XSi0fmChvTj3RbFNRQczMPW2PVp4nhULylbVP9HUv1MNVH8Y42+kqUPzAelolM7l4h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/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-----"
887
+ },
888
+ "result": "Hello from MailKite — encrypted at rest. 🔒"
889
+ },
890
+ {
891
+ "name": "encrypt_roundtrip",
892
+ "method": "encryptRoundtrip",
893
+ "local": true,
894
+ "args": {
895
+ "plaintext": "Hello from MailKite — encrypted at rest. 🔒",
896
+ "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvR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FH6e9o8p+yJja4J966wP+B7j2dqmFr/09gBa3djHv\nEy+nhTYpfTrfYKnnE2pcXpFHWhd1iyRls93+Mb/RwQKBgQDqCyTLa8hjeeAun7fq\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-----"
898
+ },
899
+ "result": "Hello from MailKite — encrypted at rest. 🔒"
419
900
  }
420
901
  ]
421
902
  }