@lensjs/core 2.5.0 → 2.6.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.
Files changed (129) hide show
  1. package/dist/abstracts/adapter.d.cts +1 -0
  2. package/dist/abstracts/adapter.d.ts +1 -0
  3. package/dist/abstracts/store.cjs +3 -0
  4. package/dist/abstracts/store.d.cts +2 -0
  5. package/dist/abstracts/store.d.ts +2 -0
  6. package/dist/abstracts/store.js +3 -0
  7. package/dist/context/container.d.cts +1 -0
  8. package/dist/context/container.d.ts +1 -0
  9. package/dist/context/context.d.cts +1 -0
  10. package/dist/context/context.d.ts +1 -0
  11. package/dist/core/api_controller.cjs +19 -1
  12. package/dist/core/api_controller.d.cts +3 -0
  13. package/dist/core/api_controller.d.ts +3 -0
  14. package/dist/core/api_controller.js +19 -1
  15. package/dist/core/lens.cjs +36 -1
  16. package/dist/core/lens.d.cts +1 -0
  17. package/dist/core/lens.d.ts +1 -0
  18. package/dist/core/lens.js +36 -1
  19. package/dist/core/watcher.d.cts +1 -0
  20. package/dist/core/watcher.d.ts +1 -0
  21. package/dist/index.cjs +60 -3
  22. package/dist/index.d.cts +3 -1
  23. package/dist/index.d.ts +3 -1
  24. package/dist/index.js +59 -3
  25. package/dist/mixins/queued_store.d.cts +1 -0
  26. package/dist/mixins/queued_store.d.ts +1 -0
  27. package/dist/stores/better_sqlite.cjs +6 -0
  28. package/dist/stores/better_sqlite.d.cts +9 -0
  29. package/dist/stores/better_sqlite.d.ts +9 -0
  30. package/dist/stores/better_sqlite.js +6 -0
  31. package/dist/stores/index.cjs +6 -0
  32. package/dist/stores/index.d.cts +1 -0
  33. package/dist/stores/index.d.ts +1 -0
  34. package/dist/stores/index.js +6 -0
  35. package/dist/stores/queued_sqlite.cjs +6 -0
  36. package/dist/stores/queued_sqlite.d.cts +1 -0
  37. package/dist/stores/queued_sqlite.d.ts +1 -0
  38. package/dist/stores/queued_sqlite.js +6 -0
  39. package/dist/types/index.cjs +1 -0
  40. package/dist/types/index.d.cts +4 -9
  41. package/dist/types/index.d.ts +4 -9
  42. package/dist/types/index.js +1 -0
  43. package/dist/types/mail.cjs +18 -0
  44. package/dist/types/mail.d.cts +235 -0
  45. package/dist/types/mail.d.ts +235 -0
  46. package/dist/types/mail.js +0 -0
  47. package/dist/ui/assets/CacheActionBadge-BjZ4pc-P.js +1 -0
  48. package/dist/ui/assets/CacheEntriesTable-CrVfGRQp.js +1 -0
  49. package/dist/ui/assets/CacheEntryContainer-C3VFggtA.js +2 -0
  50. package/dist/ui/assets/{CacheEntryDetails-CBADpZbF.js → CacheEntryDetails-DeBbBbPE.js} +1 -1
  51. package/dist/ui/assets/CacheEntryDetailsContainer-C91cW6AU.js +2 -0
  52. package/dist/ui/assets/ExceptionContainer-CfMuOCmH.js +2 -0
  53. package/dist/ui/assets/{ExceptionDetails-Ck4wRqzO.js → ExceptionDetails-D2OCJVfz.js} +1 -1
  54. package/dist/ui/assets/ExceptionDetailsContainer-CR-lxRD2.js +2 -0
  55. package/dist/ui/assets/{ExceptionTable-DB3Qj-dz.js → ExceptionTable-CpkppRjX.js} +1 -1
  56. package/dist/ui/assets/{JsonViewer-DWH4jnOr.js → JsonViewer-ATo_F1hS.js} +1 -1
  57. package/dist/ui/assets/{LoadMore-DzhiQWZs.js → LoadMore-BN7PRRRi.js} +1 -1
  58. package/dist/ui/assets/MailContainer-CT2lVazH.js +2 -0
  59. package/dist/ui/assets/MailDetails-B653XXBL.js +25 -0
  60. package/dist/ui/assets/MailDetailsContainer-87DOHjt8.js +2 -0
  61. package/dist/ui/assets/MailTable-DKB1K8iz.js +1 -0
  62. package/dist/ui/assets/QueriesContainer-Bk2r-ERW.js +2 -0
  63. package/dist/ui/assets/{QueryDetailsContainer-DskbLiCu.js → QueryDetailsContainer-SuM5VQhc.js} +7 -7
  64. package/dist/ui/assets/{QueryTable-D6F5vd_0.js → QueryTable-C2io_PkC.js} +1 -1
  65. package/dist/ui/assets/RequestDetails-CpThVPU7.js +1 -0
  66. package/dist/ui/assets/RequestDetailsContainer-BXIDvHw4.js +2 -0
  67. package/dist/ui/assets/RequestsContainer-CrgOytwQ.js +2 -0
  68. package/dist/ui/assets/{RequetsTable-BZFI1zdc.js → RequetsTable-DQwdUFOa.js} +1 -1
  69. package/dist/ui/assets/SearchInput-_Uf26G0_.js +6 -0
  70. package/dist/ui/assets/StatusCode-BmJMJ27T.js +1 -0
  71. package/dist/ui/assets/TabbedDataViewer-CSqO-90o.js +2 -0
  72. package/dist/ui/assets/Table-DHM1Nl4B.js +6 -0
  73. package/dist/ui/assets/columns-2NwKukUf.js +1 -0
  74. package/dist/ui/assets/{columns-BrzDipRl.js → columns-B3JsHnVe.js} +1 -1
  75. package/dist/ui/assets/{columns-BlLxfkXy.js → columns-D2emfeN1.js} +1 -1
  76. package/dist/ui/assets/{columns-D_gRck3K.js → columns-DbVoTM0z.js} +1 -1
  77. package/dist/ui/assets/{copy-BtL5cknV.js → copy-DkbKgCsc.js} +1 -1
  78. package/dist/ui/assets/index-DuJe0XlW.js +129 -0
  79. package/dist/ui/assets/index-DyMy6gzm.css +1 -0
  80. package/dist/ui/assets/{useCacheEntries-6yS-HoM5.js → useCacheEntries-ClCDpOYz.js} +1 -1
  81. package/dist/ui/assets/{useExceptions-CGpZVTaG.js → useExceptions-DeHzgA7U.js} +1 -1
  82. package/dist/ui/assets/useLensApi-SUqoFD39.js +1 -0
  83. package/dist/ui/assets/{useLoadMore-99QUZoHk.js → useLoadMore-DdSLuDVd.js} +1 -1
  84. package/dist/ui/assets/{useQueries-DWLdKE1b.js → useQueries-DeAAkcnt.js} +1 -1
  85. package/dist/ui/assets/useTanstackApi-DiA8BdmO.js +1 -0
  86. package/dist/ui/index.html +2 -2
  87. package/dist/utils/async_context.d.cts +1 -0
  88. package/dist/utils/async_context.d.ts +1 -0
  89. package/dist/utils/compose.d.cts +1 -0
  90. package/dist/utils/compose.d.ts +1 -0
  91. package/dist/utils/event_emitter.d.cts +2 -0
  92. package/dist/utils/event_emitter.d.ts +2 -0
  93. package/dist/utils/exception.d.cts +1 -0
  94. package/dist/utils/exception.d.ts +1 -0
  95. package/dist/utils/index.d.cts +1 -0
  96. package/dist/utils/index.d.ts +1 -0
  97. package/dist/watchers/cache_watcher.d.cts +1 -0
  98. package/dist/watchers/cache_watcher.d.ts +1 -0
  99. package/dist/watchers/exception_watcher.d.cts +1 -0
  100. package/dist/watchers/exception_watcher.d.ts +1 -0
  101. package/dist/watchers/index.cjs +21 -0
  102. package/dist/watchers/index.d.cts +2 -0
  103. package/dist/watchers/index.d.ts +2 -0
  104. package/dist/watchers/index.js +20 -0
  105. package/dist/watchers/mail_watcher.cjs +88 -0
  106. package/dist/watchers/mail_watcher.d.cts +11 -0
  107. package/dist/watchers/mail_watcher.d.ts +11 -0
  108. package/dist/watchers/mail_watcher.js +67 -0
  109. package/dist/watchers/query_watcher.d.cts +1 -0
  110. package/dist/watchers/query_watcher.d.ts +1 -0
  111. package/dist/watchers/request_watcher.d.cts +1 -0
  112. package/dist/watchers/request_watcher.d.ts +1 -0
  113. package/package.json +2 -2
  114. package/dist/ui/assets/CacheActionBadge-DU2ybwlp.js +0 -1
  115. package/dist/ui/assets/CacheEntriesTable-B5KvEEDm.js +0 -1
  116. package/dist/ui/assets/CacheEntryContainer-Br3Tvn8k.js +0 -2
  117. package/dist/ui/assets/CacheEntryDetailsContainer-hj1KrI3J.js +0 -2
  118. package/dist/ui/assets/ExceptionContainer-5Ov2El_x.js +0 -2
  119. package/dist/ui/assets/ExceptionDetailsContainer-CwZGYiSC.js +0 -2
  120. package/dist/ui/assets/QueriesContainer-DL-W0hBH.js +0 -2
  121. package/dist/ui/assets/RequestDetails-9ePMJXrH.js +0 -1
  122. package/dist/ui/assets/RequestDetailsContainer-BuhVtYb1.js +0 -2
  123. package/dist/ui/assets/RequestsContainer-CrLF7ZpJ.js +0 -7
  124. package/dist/ui/assets/StatusCode-CKfRhO8c.js +0 -1
  125. package/dist/ui/assets/TabbedDataViewer-DoV369_f.js +0 -2
  126. package/dist/ui/assets/Table-D3lFs2Tc.js +0 -6
  127. package/dist/ui/assets/index-CbdHkrK8.js +0 -124
  128. package/dist/ui/assets/index-DC5vZ53Q.css +0 -1
  129. package/dist/ui/assets/useLensApi-Bp8UnZ0w.js +0 -1
@@ -0,0 +1,235 @@
1
+ /**
2
+ * LensJS — Mail Watcher Contract
3
+ *
4
+ * Driver-agnostic. Works with Nodemailer, Resend, SES, SendGrid, SMTP, etc.
5
+ * Contains everything needed to reconstruct a valid RFC 5322 .eml file
6
+ */
7
+ /**
8
+ * A single email address with an optional display name.
9
+ * Serializes to: "Display Name <user@example.com>" or "user@example.com"
10
+ */
11
+ interface Mailbox {
12
+ address: string;
13
+ name?: string;
14
+ }
15
+ /**
16
+ * A single RFC 5322 header field.
17
+ *
18
+ * Using a structured type (vs Record<string, string>) preserves:
19
+ * - Header ordering (critical for DKIM, Received chains, etc.)
20
+ * - Duplicate headers (e.g. multiple "Received:" lines)
21
+ * - Original casing (RFC 5322 is case-insensitive but real-world parsers vary)
22
+ */
23
+ interface MailHeader {
24
+ name: string;
25
+ value: string;
26
+ raw?: string;
27
+ }
28
+ /**
29
+ * SMTP envelope — separate from message headers.
30
+ * These are the MAIL FROM / RCPT TO values negotiated at the SMTP level,
31
+ * which may differ from the From:/To: headers in the message itself.
32
+ */
33
+ interface MailEnvelope {
34
+ mailFrom?: string;
35
+ rcptTo?: string[];
36
+ }
37
+ /**
38
+ * A single node in the MIME tree.
39
+ *
40
+ * Leaf nodes (text/plain, text/html, image/png, etc.) carry a `body`.
41
+ * Multipart nodes (multipart/mixed, multipart/alternative, etc.) carry `parts`.
42
+ *
43
+ * Typical tree shapes:
44
+ *
45
+ * Plain text only:
46
+ * text/plain
47
+ *
48
+ * HTML + plain fallback:
49
+ * multipart/alternative
50
+ * text/plain
51
+ * text/html
52
+ *
53
+ * HTML + inline images:
54
+ * multipart/related
55
+ * multipart/alternative
56
+ * text/plain
57
+ * text/html
58
+ * image/png (Content-ID: <cid@domain>)
59
+ *
60
+ * With attachments:
61
+ * multipart/mixed
62
+ * multipart/related
63
+ * multipart/alternative
64
+ * text/plain
65
+ * text/html
66
+ * image/png
67
+ * application/pdf (Content-Disposition: attachment)
68
+ */
69
+ interface MimePart {
70
+ /** Full MIME content-type, e.g. "multipart/alternative", "text/html" */
71
+ contentType: string;
72
+ /** Content-Disposition value for this part */
73
+ contentDisposition?: "inline" | "attachment";
74
+ /** Charset parameter, e.g. "UTF-8" (leaf text parts) */
75
+ charset?: string;
76
+ /** Content-Transfer-Encoding, e.g. "base64", "quoted-printable", "7bit" */
77
+ transferEncoding?: string;
78
+ /** Attachment/inline filename (Content-Disposition filename param) */
79
+ filename?: string;
80
+ /**
81
+ * Content-ID for CID-embedded inline content.
82
+ * Format: "<unique-id@domain>"
83
+ * Referenced in HTML as: src="cid:unique-id@domain"
84
+ */
85
+ contentId?: string;
86
+ /**
87
+ * Decoded body for leaf nodes. Undefined on multipart nodes.
88
+ * If transferEncoding is "base64", this string is base64 encoded.
89
+ */
90
+ body?: string;
91
+ /** Size in bytes of the decoded body */
92
+ size?: number;
93
+ /** Headers belonging to this specific MIME part */
94
+ headers: MailHeader[];
95
+ /** Child parts — populated only for multipart/* content types */
96
+ parts?: MimePart[];
97
+ }
98
+ /**
99
+ * Structured content container for the raw EML source.
100
+ */
101
+ interface MailRawSource {
102
+ /** The actual EML content string */
103
+ body: string;
104
+ /** Encoding of the body string (e.g., "base64" if binary, or undefined/empty for plain text) */
105
+ transferEncoding?: string;
106
+ }
107
+ /**
108
+ * LensJS-specific runtime metadata about how and when a message was sent.
109
+ * Entirely separate from RFC headers — never serialized into .eml.
110
+ */
111
+ interface MailMeta {
112
+ /** The driver that sent the message: "nodemailer" | "resend" | "ses" | "sendgrid" | etc. */
113
+ driver: string;
114
+ /**
115
+ * The transport mechanism used by the driver.
116
+ * "smtp" | "api" | "sendmail" | "queue" | "stream"
117
+ */
118
+ transport?: string;
119
+ /** Delivery state */
120
+ status: "pending" | "sent" | "failed";
121
+ /** Failure reason — populated when status is "failed" */
122
+ error?: string;
123
+ /**
124
+ * ISO 8601 timestamp of when the driver accepted/sent the message.
125
+ * Distinct from the RFC 5322 "Date:" header, which is composition time.
126
+ */
127
+ sentAt?: string;
128
+ /**
129
+ * How long the send operation took, in milliseconds.
130
+ * Useful for spotting slow SMTP servers or API latency in the Lens UI.
131
+ */
132
+ durationMs?: number;
133
+ /**
134
+ * Raw response from the driver (shape varies per driver).
135
+ * e.g. Nodemailer's SentMessageInfo, Resend's CreateEmailResponse
136
+ */
137
+ driverResponse?: unknown;
138
+ /**
139
+ * App-defined tags for Lens UI filtering and grouping.
140
+ * e.g. ["transactional", "welcome", "order-confirm"]
141
+ */
142
+ tags?: string[];
143
+ }
144
+ /**
145
+ * The complete, stored mail record in LensJS.
146
+ *
147
+ * Contains everything needed to:
148
+ * - Reconstruct a valid RFC 5322 .eml file
149
+ * - Display a rich mail detail view in the Lens UI
150
+ * - Filter, search, and audit sent mail
151
+ */
152
+ interface MailEntry {
153
+ /** LensJS internal UUID for this requet id */
154
+ requestId: string;
155
+ /** "From:" header — who composed the message */
156
+ from: Mailbox[];
157
+ /**
158
+ * "Sender:" header — the actual submitting agent.
159
+ * Required by RFC 5322 §3.6.2 when `from` contains multiple addresses.
160
+ */
161
+ sender?: Mailbox;
162
+ /** "To:" header — primary recipients */
163
+ to: Mailbox[];
164
+ /** "Cc:" header — carbon copy recipients */
165
+ cc?: Mailbox[];
166
+ /**
167
+ * "Bcc:" header — blind carbon copy recipients.
168
+ *
169
+ * ⚠️ MUST NOT be serialized into the .eml header block.
170
+ * Stored here for LensJS audit/display purposes only.
171
+ */
172
+ bcc?: Mailbox[];
173
+ /** "Reply-To:" header — where replies should be directed */
174
+ replyTo?: Mailbox[];
175
+ /**
176
+ * "Message-ID:" header.
177
+ * Format: "<local-part@domain>"
178
+ * Generated by the driver or LensJS if absent.
179
+ */
180
+ messageId?: string;
181
+ /**
182
+ * "In-Reply-To:" header.
183
+ * Message-ID of the message being replied to.
184
+ */
185
+ inReplyTo?: string;
186
+ /**
187
+ * "References:" header.
188
+ * Ordered list of Message-IDs forming the thread chain.
189
+ * Serializes as a single space-separated string.
190
+ */
191
+ references?: string | string[];
192
+ /** "Subject:" header */
193
+ subject?: string;
194
+ /**
195
+ * "Date:" header — when the message was composed/submitted.
196
+ * ISO 8601 string. Serializes to RFC 2822 format: "Tue, 17 Feb 2026 10:30:00 +0000"
197
+ */
198
+ date?: string;
199
+ /**
200
+ * Message priority.
201
+ * Maps to both "X-Priority" (1=high, 3=normal, 5=low) and "Importance:" headers.
202
+ */
203
+ priority?: "high" | "normal" | "low";
204
+ /**
205
+ * All message-level headers, in order, including duplicates.
206
+ * Preserves casing and ordering — essential for DKIM validation
207
+ * and faithful .eml reconstruction.
208
+ *
209
+ * The typed fields above (subject, date, messageId, etc.) are
210
+ * derived from these for convenience. This array is the source of truth.
211
+ */
212
+ headers: MailHeader[];
213
+ /**
214
+ * The full MIME tree of the message.
215
+ * The root part's contentType drives the overall message structure
216
+ * (text/plain, multipart/alternative, multipart/mixed, etc.).
217
+ */
218
+ mime: MimePart;
219
+ /**
220
+ * SMTP-level envelope (MAIL FROM / RCPT TO).
221
+ * May differ from the From:/To: message headers.
222
+ * Populated by the driver after handoff.
223
+ */
224
+ envelope?: MailEnvelope;
225
+ /**
226
+ * The full RFC 822 raw message source, if available.
227
+ * Having this means you can always serve a byte-perfect .eml download
228
+ * without needing to re-serialize from the parsed fields.
229
+ */
230
+ raw?: MailRawSource;
231
+ /** LensJS watcher metadata — never serialized into .eml */
232
+ meta: MailMeta;
233
+ }
234
+
235
+ export type { MailEntry, MailEnvelope, MailHeader, MailMeta, MailRawSource, Mailbox, MimePart };
@@ -0,0 +1,235 @@
1
+ /**
2
+ * LensJS — Mail Watcher Contract
3
+ *
4
+ * Driver-agnostic. Works with Nodemailer, Resend, SES, SendGrid, SMTP, etc.
5
+ * Contains everything needed to reconstruct a valid RFC 5322 .eml file
6
+ */
7
+ /**
8
+ * A single email address with an optional display name.
9
+ * Serializes to: "Display Name <user@example.com>" or "user@example.com"
10
+ */
11
+ interface Mailbox {
12
+ address: string;
13
+ name?: string;
14
+ }
15
+ /**
16
+ * A single RFC 5322 header field.
17
+ *
18
+ * Using a structured type (vs Record<string, string>) preserves:
19
+ * - Header ordering (critical for DKIM, Received chains, etc.)
20
+ * - Duplicate headers (e.g. multiple "Received:" lines)
21
+ * - Original casing (RFC 5322 is case-insensitive but real-world parsers vary)
22
+ */
23
+ interface MailHeader {
24
+ name: string;
25
+ value: string;
26
+ raw?: string;
27
+ }
28
+ /**
29
+ * SMTP envelope — separate from message headers.
30
+ * These are the MAIL FROM / RCPT TO values negotiated at the SMTP level,
31
+ * which may differ from the From:/To: headers in the message itself.
32
+ */
33
+ interface MailEnvelope {
34
+ mailFrom?: string;
35
+ rcptTo?: string[];
36
+ }
37
+ /**
38
+ * A single node in the MIME tree.
39
+ *
40
+ * Leaf nodes (text/plain, text/html, image/png, etc.) carry a `body`.
41
+ * Multipart nodes (multipart/mixed, multipart/alternative, etc.) carry `parts`.
42
+ *
43
+ * Typical tree shapes:
44
+ *
45
+ * Plain text only:
46
+ * text/plain
47
+ *
48
+ * HTML + plain fallback:
49
+ * multipart/alternative
50
+ * text/plain
51
+ * text/html
52
+ *
53
+ * HTML + inline images:
54
+ * multipart/related
55
+ * multipart/alternative
56
+ * text/plain
57
+ * text/html
58
+ * image/png (Content-ID: <cid@domain>)
59
+ *
60
+ * With attachments:
61
+ * multipart/mixed
62
+ * multipart/related
63
+ * multipart/alternative
64
+ * text/plain
65
+ * text/html
66
+ * image/png
67
+ * application/pdf (Content-Disposition: attachment)
68
+ */
69
+ interface MimePart {
70
+ /** Full MIME content-type, e.g. "multipart/alternative", "text/html" */
71
+ contentType: string;
72
+ /** Content-Disposition value for this part */
73
+ contentDisposition?: "inline" | "attachment";
74
+ /** Charset parameter, e.g. "UTF-8" (leaf text parts) */
75
+ charset?: string;
76
+ /** Content-Transfer-Encoding, e.g. "base64", "quoted-printable", "7bit" */
77
+ transferEncoding?: string;
78
+ /** Attachment/inline filename (Content-Disposition filename param) */
79
+ filename?: string;
80
+ /**
81
+ * Content-ID for CID-embedded inline content.
82
+ * Format: "<unique-id@domain>"
83
+ * Referenced in HTML as: src="cid:unique-id@domain"
84
+ */
85
+ contentId?: string;
86
+ /**
87
+ * Decoded body for leaf nodes. Undefined on multipart nodes.
88
+ * If transferEncoding is "base64", this string is base64 encoded.
89
+ */
90
+ body?: string;
91
+ /** Size in bytes of the decoded body */
92
+ size?: number;
93
+ /** Headers belonging to this specific MIME part */
94
+ headers: MailHeader[];
95
+ /** Child parts — populated only for multipart/* content types */
96
+ parts?: MimePart[];
97
+ }
98
+ /**
99
+ * Structured content container for the raw EML source.
100
+ */
101
+ interface MailRawSource {
102
+ /** The actual EML content string */
103
+ body: string;
104
+ /** Encoding of the body string (e.g., "base64" if binary, or undefined/empty for plain text) */
105
+ transferEncoding?: string;
106
+ }
107
+ /**
108
+ * LensJS-specific runtime metadata about how and when a message was sent.
109
+ * Entirely separate from RFC headers — never serialized into .eml.
110
+ */
111
+ interface MailMeta {
112
+ /** The driver that sent the message: "nodemailer" | "resend" | "ses" | "sendgrid" | etc. */
113
+ driver: string;
114
+ /**
115
+ * The transport mechanism used by the driver.
116
+ * "smtp" | "api" | "sendmail" | "queue" | "stream"
117
+ */
118
+ transport?: string;
119
+ /** Delivery state */
120
+ status: "pending" | "sent" | "failed";
121
+ /** Failure reason — populated when status is "failed" */
122
+ error?: string;
123
+ /**
124
+ * ISO 8601 timestamp of when the driver accepted/sent the message.
125
+ * Distinct from the RFC 5322 "Date:" header, which is composition time.
126
+ */
127
+ sentAt?: string;
128
+ /**
129
+ * How long the send operation took, in milliseconds.
130
+ * Useful for spotting slow SMTP servers or API latency in the Lens UI.
131
+ */
132
+ durationMs?: number;
133
+ /**
134
+ * Raw response from the driver (shape varies per driver).
135
+ * e.g. Nodemailer's SentMessageInfo, Resend's CreateEmailResponse
136
+ */
137
+ driverResponse?: unknown;
138
+ /**
139
+ * App-defined tags for Lens UI filtering and grouping.
140
+ * e.g. ["transactional", "welcome", "order-confirm"]
141
+ */
142
+ tags?: string[];
143
+ }
144
+ /**
145
+ * The complete, stored mail record in LensJS.
146
+ *
147
+ * Contains everything needed to:
148
+ * - Reconstruct a valid RFC 5322 .eml file
149
+ * - Display a rich mail detail view in the Lens UI
150
+ * - Filter, search, and audit sent mail
151
+ */
152
+ interface MailEntry {
153
+ /** LensJS internal UUID for this requet id */
154
+ requestId: string;
155
+ /** "From:" header — who composed the message */
156
+ from: Mailbox[];
157
+ /**
158
+ * "Sender:" header — the actual submitting agent.
159
+ * Required by RFC 5322 §3.6.2 when `from` contains multiple addresses.
160
+ */
161
+ sender?: Mailbox;
162
+ /** "To:" header — primary recipients */
163
+ to: Mailbox[];
164
+ /** "Cc:" header — carbon copy recipients */
165
+ cc?: Mailbox[];
166
+ /**
167
+ * "Bcc:" header — blind carbon copy recipients.
168
+ *
169
+ * ⚠️ MUST NOT be serialized into the .eml header block.
170
+ * Stored here for LensJS audit/display purposes only.
171
+ */
172
+ bcc?: Mailbox[];
173
+ /** "Reply-To:" header — where replies should be directed */
174
+ replyTo?: Mailbox[];
175
+ /**
176
+ * "Message-ID:" header.
177
+ * Format: "<local-part@domain>"
178
+ * Generated by the driver or LensJS if absent.
179
+ */
180
+ messageId?: string;
181
+ /**
182
+ * "In-Reply-To:" header.
183
+ * Message-ID of the message being replied to.
184
+ */
185
+ inReplyTo?: string;
186
+ /**
187
+ * "References:" header.
188
+ * Ordered list of Message-IDs forming the thread chain.
189
+ * Serializes as a single space-separated string.
190
+ */
191
+ references?: string | string[];
192
+ /** "Subject:" header */
193
+ subject?: string;
194
+ /**
195
+ * "Date:" header — when the message was composed/submitted.
196
+ * ISO 8601 string. Serializes to RFC 2822 format: "Tue, 17 Feb 2026 10:30:00 +0000"
197
+ */
198
+ date?: string;
199
+ /**
200
+ * Message priority.
201
+ * Maps to both "X-Priority" (1=high, 3=normal, 5=low) and "Importance:" headers.
202
+ */
203
+ priority?: "high" | "normal" | "low";
204
+ /**
205
+ * All message-level headers, in order, including duplicates.
206
+ * Preserves casing and ordering — essential for DKIM validation
207
+ * and faithful .eml reconstruction.
208
+ *
209
+ * The typed fields above (subject, date, messageId, etc.) are
210
+ * derived from these for convenience. This array is the source of truth.
211
+ */
212
+ headers: MailHeader[];
213
+ /**
214
+ * The full MIME tree of the message.
215
+ * The root part's contentType drives the overall message structure
216
+ * (text/plain, multipart/alternative, multipart/mixed, etc.).
217
+ */
218
+ mime: MimePart;
219
+ /**
220
+ * SMTP-level envelope (MAIL FROM / RCPT TO).
221
+ * May differ from the From:/To: message headers.
222
+ * Populated by the driver after handoff.
223
+ */
224
+ envelope?: MailEnvelope;
225
+ /**
226
+ * The full RFC 822 raw message source, if available.
227
+ * Having this means you can always serve a byte-perfect .eml download
228
+ * without needing to re-serialize from the parsed fields.
229
+ */
230
+ raw?: MailRawSource;
231
+ /** LensJS watcher metadata — never serialized into .eml */
232
+ meta: MailMeta;
233
+ }
234
+
235
+ export type { MailEntry, MailEnvelope, MailHeader, MailMeta, MailRawSource, Mailbox, MimePart };
File without changes
@@ -0,0 +1 @@
1
+ import{j as t}from"./index-DuJe0XlW.js";const o=({action:e})=>{const r={hit:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",miss:"bg-amber-500/10 text-amber-400 border-amber-500/20",write:"bg-sky-500/10 text-sky-400 border-sky-500/20",delete:"bg-rose-500/10 text-rose-400 border-rose-500/20",clear:"bg-slate-500/10 text-slate-400 border-slate-500/20"};return t.jsx("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-bold border uppercase tracking-wider ${r[e]||r.clear}`,children:e})};export{o as C};
@@ -0,0 +1 @@
1
+ import{j as a}from"./index-DuJe0XlW.js";import{L as s}from"./LoadMore-BN7PRRRi.js";import{T as t}from"./Table-DHM1Nl4B.js";import{g as r}from"./columns-DbVoTM0z.js";import"./index-BRRKsoNv.js";import"./CacheActionBadge-BjZ4pc-P.js";const p=({hasMoreObject:o})=>a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsx(t,{columns:r(),data:o.data})}),a.jsx(s,{paginatedPage:o})]});export{p as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CacheEntriesTable-CrVfGRQp.js","./index-DuJe0XlW.js","./index-DyMy6gzm.css","./LoadMore-BN7PRRRi.js","./Table-DHM1Nl4B.js","./columns-DbVoTM0z.js","./index-BRRKsoNv.js","./CacheActionBadge-BjZ4pc-P.js"])))=>i.map(i=>d[i]);
2
+ import{r as t,j as a,_ as s}from"./index-DuJe0XlW.js";import{u as i}from"./useLoadMore-DdSLuDVd.js";import{u as m}from"./useCacheEntries-ClCDpOYz.js";import"./useLensApi-SUqoFD39.js";const n=t.lazy(()=>s(()=>import("./CacheEntriesTable-CrVfGRQp.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)),_=()=>{const{loadMoreItems:e,getItems:r}=m(),o=i({paginatedPage:e});return t.useEffect(()=>{r()},[]),a.jsx(n,{hasMoreObject:o})};export{_ as default};
@@ -1 +1 @@
1
- import{j as a,L as s,v as r,l as i}from"./index-CbdHkrK8.js";import{D as o,T as n}from"./TabbedDataViewer-DoV369_f.js";import{C as u}from"./CacheActionBadge-DU2ybwlp.js";import d from"./JsonViewer-DWH4jnOr.js";import"./copy-BtL5cknV.js";function v({data:e}){const t=[e.lens_entry_id?{label:"Request",value:a.jsx(s,{to:`${r(i()).REQUESTS}/${e.lens_entry_id}`,className:"text-blue-600 hover:underline font-semibold",children:"View Request"}),className:"text-gray-900 dark:text-gray-100"}:null,{label:"Operation",value:a.jsx(u,{action:e.data.action}),className:"text-gray-900 dark:text-gray-100"},e.data.data.key?{label:"Key",value:e.data.data.key??"__",className:"text-gray-900 dark:text-gray-100"}:null].filter(l=>!!l);return a.jsxs("div",{className:"flex flex-col gap-4",children:[a.jsx(o,{title:"Details",items:t}),a.jsx(n,{tabs:[{id:"value",label:"Value",shouldShow:!!e.data.data.value,content:a.jsx(d,{data:e.data.data.value})}],defaultActiveTab:"value"})]})}export{v as default};
1
+ import{j as a,L as s,a as r,b as i}from"./index-DuJe0XlW.js";import{D as o,T as n}from"./TabbedDataViewer-CSqO-90o.js";import{C as u}from"./CacheActionBadge-BjZ4pc-P.js";import d from"./JsonViewer-ATo_F1hS.js";import"./copy-DkbKgCsc.js";function b({data:e}){const t=[e.lens_entry_id?{label:"Request",value:a.jsx(s,{to:`${r(i()).REQUESTS}/${e.lens_entry_id}`,className:"text-blue-600 hover:underline font-semibold",children:"View Request"}),className:"text-gray-900 dark:text-gray-100"}:null,{label:"Operation",value:a.jsx(u,{action:e.data.action}),className:"text-gray-900 dark:text-gray-100"},e.data.data.key?{label:"Key",value:e.data.data.key??"__",className:"text-gray-900 dark:text-gray-100"}:null].filter(l=>!!l);return a.jsxs("div",{className:"flex flex-col gap-4",children:[a.jsx(o,{title:"Details",items:t}),a.jsx(n,{tabs:[{id:"value",label:"Value",shouldShow:!!e.data.data.value,content:a.jsx(d,{data:e.data.data.value})}],defaultActiveTab:"value"})]})}export{b as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CacheEntryDetails-DeBbBbPE.js","./index-DuJe0XlW.js","./index-DyMy6gzm.css","./TabbedDataViewer-CSqO-90o.js","./CacheActionBadge-BjZ4pc-P.js","./JsonViewer-ATo_F1hS.js","./copy-DkbKgCsc.js"])))=>i.map(i=>d[i]);
2
+ import{u as o,r as s,j as r,_ as i}from"./index-DuJe0XlW.js";import{u as m}from"./useCacheEntries-ClCDpOYz.js";import"./useLensApi-SUqoFD39.js";const n=s.lazy(()=>i(()=>import("./CacheEntryDetails-DeBbBbPE.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),E=()=>{const{item:e,getItem:a}=m(),{id:t}=o();return s.useEffect(()=>{t&&a(t)},[t]),r.jsx("div",{children:e&&r.jsx(n,{data:e})})};export{E as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ExceptionTable-CpkppRjX.js","./index-DuJe0XlW.js","./index-DyMy6gzm.css","./LoadMore-BN7PRRRi.js","./Table-DHM1Nl4B.js","./columns-B3JsHnVe.js","./index-BRRKsoNv.js"])))=>i.map(i=>d[i]);
2
+ import{r as t,j as s,_ as a}from"./index-DuJe0XlW.js";import{u as i}from"./useLoadMore-DdSLuDVd.js";import{u as m}from"./useExceptions-DeHzgA7U.js";import"./useLensApi-SUqoFD39.js";const n=t.lazy(()=>a(()=>import("./ExceptionTable-CpkppRjX.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),_=()=>{const{loadMoreItems:e,getItems:o}=m(),r=i({paginatedPage:e});return t.useEffect(()=>{o()},[]),s.jsx(n,{hasMoreObject:r})};export{_ as default};
@@ -1,4 +1,4 @@
1
- import{c as g,j as e,L as j,v as N,l as v}from"./index-CbdHkrK8.js";import{D as w,T as S}from"./TabbedDataViewer-DoV369_f.js";/**
1
+ import{c as g,j as e,L as j,a as N,b as v}from"./index-DuJe0XlW.js";import{D as w,T as S}from"./TabbedDataViewer-CSqO-90o.js";/**
2
2
  * @license lucide-react v0.542.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ExceptionDetails-D2OCJVfz.js","./index-DuJe0XlW.js","./index-DyMy6gzm.css","./TabbedDataViewer-CSqO-90o.js"])))=>i.map(i=>d[i]);
2
+ import{u as a,r as s,j as r,_ as i}from"./index-DuJe0XlW.js";import{u as m}from"./useExceptions-DeHzgA7U.js";import"./useLensApi-SUqoFD39.js";const n=s.lazy(()=>i(()=>import("./ExceptionDetails-D2OCJVfz.js"),__vite__mapDeps([0,1,2,3]),import.meta.url)),x=()=>{const{item:e,getItem:o}=m(),{id:t}=a();return s.useEffect(()=>{t&&o(t)},[t]),r.jsx("div",{children:e&&r.jsx(n,{data:e})})};export{x as default};
@@ -1 +1 @@
1
- import{j as a}from"./index-CbdHkrK8.js";import{L as s}from"./LoadMore-DzhiQWZs.js";import{T as t}from"./Table-D3lFs2Tc.js";import{g as r}from"./columns-BrzDipRl.js";import"./index-BRRKsoNv.js";const d=({hasMoreObject:o})=>a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsx(t,{columns:r(),data:o.data})}),a.jsx(s,{paginatedPage:o})]});export{d as default};
1
+ import{j as a}from"./index-DuJe0XlW.js";import{L as s}from"./LoadMore-BN7PRRRi.js";import{T as t}from"./Table-DHM1Nl4B.js";import{g as r}from"./columns-B3JsHnVe.js";import"./index-BRRKsoNv.js";const d=({hasMoreObject:o})=>a.jsxs("div",{className:"w-full",children:[a.jsx("div",{className:"overflow-x-auto",children:a.jsx(t,{columns:r(),data:o.data})}),a.jsx(s,{paginatedPage:o})]});export{d as default};