@crvouga/mockingbird-service-resend 2.1.0 → 2.3.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/CHANGELOG.md +34 -4
- package/README.md +2 -0
- package/SUPPORT.md +5 -3
- package/dist/{chunk-FT6SKLHQ.js → chunk-45EAUQ3N.js} +2 -2
- package/dist/chunk-7JT35SJS.js +4494 -0
- package/dist/chunk-7JT35SJS.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +144 -137
- package/dist/index.js +1 -1
- package/dist/server.d.ts +263 -252
- package/dist/server.js +2 -2
- package/openapi.yaml +232 -0
- package/package.json +2 -2
- package/dist/chunk-JNTBSBDY.js +0 -4307
- package/dist/chunk-JNTBSBDY.js.map +0 -7
- /package/dist/{chunk-FT6SKLHQ.js.map → chunk-45EAUQ3N.js.map} +0 -0
package/openapi.yaml
CHANGED
|
@@ -19,6 +19,70 @@ security:
|
|
|
19
19
|
- bearerAuth: []
|
|
20
20
|
paths:
|
|
21
21
|
/emails:
|
|
22
|
+
get:
|
|
23
|
+
operationId: ListEmails
|
|
24
|
+
x-mockingbird:
|
|
25
|
+
supported: true
|
|
26
|
+
parity:
|
|
27
|
+
enabled: true
|
|
28
|
+
safe: true
|
|
29
|
+
parameters:
|
|
30
|
+
- name: limit
|
|
31
|
+
in: query
|
|
32
|
+
schema:
|
|
33
|
+
type: integer
|
|
34
|
+
minimum: 1
|
|
35
|
+
maximum: 100
|
|
36
|
+
- name: after
|
|
37
|
+
in: query
|
|
38
|
+
schema:
|
|
39
|
+
type: string
|
|
40
|
+
- name: before
|
|
41
|
+
in: query
|
|
42
|
+
schema:
|
|
43
|
+
type: string
|
|
44
|
+
responses:
|
|
45
|
+
"200":
|
|
46
|
+
description: Newest-first email metadata
|
|
47
|
+
content:
|
|
48
|
+
application/json:
|
|
49
|
+
schema:
|
|
50
|
+
type: object
|
|
51
|
+
required: [object, has_more, data]
|
|
52
|
+
properties:
|
|
53
|
+
object:
|
|
54
|
+
type: string
|
|
55
|
+
enum: [list]
|
|
56
|
+
has_more:
|
|
57
|
+
type: boolean
|
|
58
|
+
data:
|
|
59
|
+
type: array
|
|
60
|
+
items:
|
|
61
|
+
$ref: "#/components/schemas/SentEmailMetadata"
|
|
62
|
+
"401":
|
|
63
|
+
description: Request rejected
|
|
64
|
+
content:
|
|
65
|
+
application/json:
|
|
66
|
+
schema:
|
|
67
|
+
$ref: "#/components/schemas/Error"
|
|
68
|
+
"422":
|
|
69
|
+
description: Request rejected
|
|
70
|
+
content:
|
|
71
|
+
application/json:
|
|
72
|
+
schema:
|
|
73
|
+
$ref: "#/components/schemas/Error"
|
|
74
|
+
"429":
|
|
75
|
+
description: Request rejected
|
|
76
|
+
content:
|
|
77
|
+
application/json:
|
|
78
|
+
schema:
|
|
79
|
+
$ref: "#/components/schemas/Error"
|
|
80
|
+
"500":
|
|
81
|
+
description: Request rejected
|
|
82
|
+
content:
|
|
83
|
+
application/json:
|
|
84
|
+
schema:
|
|
85
|
+
$ref: "#/components/schemas/Error"
|
|
22
86
|
post:
|
|
23
87
|
operationId: SendEmail
|
|
24
88
|
x-mockingbird:
|
|
@@ -115,6 +179,71 @@ paths:
|
|
|
115
179
|
application/json:
|
|
116
180
|
schema:
|
|
117
181
|
$ref: "#/components/schemas/Error"
|
|
182
|
+
/emails/receiving:
|
|
183
|
+
get:
|
|
184
|
+
operationId: ListReceivedEmails
|
|
185
|
+
x-mockingbird:
|
|
186
|
+
supported: true
|
|
187
|
+
parity:
|
|
188
|
+
enabled: true
|
|
189
|
+
safe: true
|
|
190
|
+
parameters:
|
|
191
|
+
- name: limit
|
|
192
|
+
in: query
|
|
193
|
+
schema:
|
|
194
|
+
type: integer
|
|
195
|
+
minimum: 1
|
|
196
|
+
maximum: 100
|
|
197
|
+
- name: after
|
|
198
|
+
in: query
|
|
199
|
+
schema:
|
|
200
|
+
type: string
|
|
201
|
+
- name: before
|
|
202
|
+
in: query
|
|
203
|
+
schema:
|
|
204
|
+
type: string
|
|
205
|
+
responses:
|
|
206
|
+
"200":
|
|
207
|
+
description: Newest-first email metadata
|
|
208
|
+
content:
|
|
209
|
+
application/json:
|
|
210
|
+
schema:
|
|
211
|
+
type: object
|
|
212
|
+
required: [object, has_more, data]
|
|
213
|
+
properties:
|
|
214
|
+
object:
|
|
215
|
+
type: string
|
|
216
|
+
enum: [list]
|
|
217
|
+
has_more:
|
|
218
|
+
type: boolean
|
|
219
|
+
data:
|
|
220
|
+
type: array
|
|
221
|
+
items:
|
|
222
|
+
$ref: "#/components/schemas/ReceivedEmailMetadata"
|
|
223
|
+
"401":
|
|
224
|
+
description: Request rejected
|
|
225
|
+
content:
|
|
226
|
+
application/json:
|
|
227
|
+
schema:
|
|
228
|
+
$ref: "#/components/schemas/Error"
|
|
229
|
+
"422":
|
|
230
|
+
description: Request rejected
|
|
231
|
+
content:
|
|
232
|
+
application/json:
|
|
233
|
+
schema:
|
|
234
|
+
$ref: "#/components/schemas/Error"
|
|
235
|
+
"429":
|
|
236
|
+
description: Request rejected
|
|
237
|
+
content:
|
|
238
|
+
application/json:
|
|
239
|
+
schema:
|
|
240
|
+
$ref: "#/components/schemas/Error"
|
|
241
|
+
"500":
|
|
242
|
+
description: Request rejected
|
|
243
|
+
content:
|
|
244
|
+
application/json:
|
|
245
|
+
schema:
|
|
246
|
+
$ref: "#/components/schemas/Error"
|
|
118
247
|
/emails/receiving/{email_id}:
|
|
119
248
|
parameters:
|
|
120
249
|
- $ref: "#/components/parameters/ReceivedEmailId"
|
|
@@ -331,6 +460,109 @@ components:
|
|
|
331
460
|
inline_content_id:
|
|
332
461
|
type: string
|
|
333
462
|
maxLength: 100
|
|
463
|
+
SentEmailMetadata:
|
|
464
|
+
type: object
|
|
465
|
+
required: [id, to, from, created_at, subject, bcc, cc, reply_to, message_id, last_event, scheduled_at]
|
|
466
|
+
properties:
|
|
467
|
+
id:
|
|
468
|
+
type: string
|
|
469
|
+
x-mockingbird-resource:
|
|
470
|
+
type: email
|
|
471
|
+
identity: true
|
|
472
|
+
x-mockingbird-volatile:
|
|
473
|
+
kind: id
|
|
474
|
+
to:
|
|
475
|
+
type: array
|
|
476
|
+
items:
|
|
477
|
+
type: string
|
|
478
|
+
from:
|
|
479
|
+
type: string
|
|
480
|
+
created_at:
|
|
481
|
+
type: string
|
|
482
|
+
x-mockingbird-volatile:
|
|
483
|
+
kind: timestamp
|
|
484
|
+
subject:
|
|
485
|
+
type: string
|
|
486
|
+
message_id:
|
|
487
|
+
type: string
|
|
488
|
+
x-mockingbird-volatile:
|
|
489
|
+
kind: id
|
|
490
|
+
bcc:
|
|
491
|
+
type: ["array", "null"]
|
|
492
|
+
items:
|
|
493
|
+
type: string
|
|
494
|
+
cc:
|
|
495
|
+
type: ["array", "null"]
|
|
496
|
+
items:
|
|
497
|
+
type: string
|
|
498
|
+
reply_to:
|
|
499
|
+
type: ["array", "null"]
|
|
500
|
+
items:
|
|
501
|
+
type: string
|
|
502
|
+
last_event:
|
|
503
|
+
type: string
|
|
504
|
+
enum: [delivered, scheduled]
|
|
505
|
+
scheduled_at:
|
|
506
|
+
type: ["string", "null"]
|
|
507
|
+
ReceivedEmailMetadata:
|
|
508
|
+
type: object
|
|
509
|
+
required: [id, to, from, created_at, subject, bcc, cc, reply_to, message_id, attachments]
|
|
510
|
+
properties:
|
|
511
|
+
id:
|
|
512
|
+
type: string
|
|
513
|
+
x-mockingbird-resource:
|
|
514
|
+
type: received_email
|
|
515
|
+
identity: true
|
|
516
|
+
x-mockingbird-volatile:
|
|
517
|
+
kind: id
|
|
518
|
+
to:
|
|
519
|
+
type: array
|
|
520
|
+
items:
|
|
521
|
+
type: string
|
|
522
|
+
from:
|
|
523
|
+
type: string
|
|
524
|
+
created_at:
|
|
525
|
+
type: string
|
|
526
|
+
x-mockingbird-volatile:
|
|
527
|
+
kind: timestamp
|
|
528
|
+
subject:
|
|
529
|
+
type: ["string", "null"]
|
|
530
|
+
message_id:
|
|
531
|
+
type: string
|
|
532
|
+
x-mockingbird-volatile:
|
|
533
|
+
kind: id
|
|
534
|
+
bcc:
|
|
535
|
+
type: array
|
|
536
|
+
items:
|
|
537
|
+
type: string
|
|
538
|
+
cc:
|
|
539
|
+
type: array
|
|
540
|
+
items:
|
|
541
|
+
type: string
|
|
542
|
+
reply_to:
|
|
543
|
+
type: array
|
|
544
|
+
items:
|
|
545
|
+
type: string
|
|
546
|
+
attachments:
|
|
547
|
+
type: array
|
|
548
|
+
items:
|
|
549
|
+
type: object
|
|
550
|
+
required: [id, filename, content_type, content_id, content_disposition, size]
|
|
551
|
+
properties:
|
|
552
|
+
id:
|
|
553
|
+
type: string
|
|
554
|
+
x-mockingbird-volatile:
|
|
555
|
+
kind: id
|
|
556
|
+
filename:
|
|
557
|
+
type: string
|
|
558
|
+
content_type:
|
|
559
|
+
type: string
|
|
560
|
+
content_id:
|
|
561
|
+
type: ["string", "null"]
|
|
562
|
+
content_disposition:
|
|
563
|
+
type: ["string", "null"]
|
|
564
|
+
size:
|
|
565
|
+
type: integer
|
|
334
566
|
Email:
|
|
335
567
|
type: object
|
|
336
568
|
required: [object, id, to, from, created_at, subject, html, text, bcc, cc, reply_to, last_event]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crvouga/mockingbird-service-resend",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Stateful mock of the Resend email API (send with idempotency, received emails, attachments) with an outbox and Svix-signed inbound webhooks (Mockingbird service contract).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"pack:check": "bun ../../../scripts/pack-check.ts"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@crvouga/mockingbird-service-sqlite": "2.1.
|
|
101
|
+
"@crvouga/mockingbird-service-sqlite": "2.1.1",
|
|
102
102
|
"hono": "4.11.9"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|