@@ -10,9 +10,9 @@ import {
1010 Hash ,
1111 Box ,
1212 Zap ,
13- Lock ,
1413 Mail ,
15- Settings
14+ Settings ,
15+ Gauge
1616} from 'lucide-react' ;
1717
1818export const metadata : Metadata = {
@@ -24,6 +24,7 @@ const apiCategories = [
2424 {
2525 title : 'Core Classes' ,
2626 icon : Box ,
27+ namespace : 'Zetian.Server' ,
2728 items : [
2829 {
2930 name : 'SmtpServer' ,
@@ -75,7 +76,14 @@ const apiCategories = [
7576 'Build()'
7677 ] ,
7778 events : [ ]
78- } ,
79+ }
80+ ]
81+ } ,
82+ {
83+ title : 'Configuration' ,
84+ icon : Settings ,
85+ namespace : 'Zetian.Configuration' ,
86+ items : [
7987 {
8088 name : 'SmtpServerConfiguration' ,
8189 description : 'Configuration settings for SMTP server' ,
@@ -116,6 +124,7 @@ const apiCategories = [
116124 {
117125 title : 'Core Interfaces' ,
118126 icon : FileCode ,
127+ namespace : 'Zetian.Abstractions' ,
119128 items : [
120129 {
121130 name : 'ISmtpMessage' ,
@@ -186,12 +195,24 @@ const apiCategories = [
186195 'CanDeliverToAsync(ISmtpSession, string, string, CancellationToken)'
187196 ] ,
188197 events : [ ]
198+ } ,
199+ {
200+ name : 'IStatisticsCollector' ,
201+ description : 'Interface for statistics collection' ,
202+ properties : [ 'TotalSessions' , 'TotalMessages' , 'TotalErrors' , 'TotalBytes' ] ,
203+ methods : [
204+ 'RecordSession()' ,
205+ 'RecordMessage(ISmtpMessage)' ,
206+ 'RecordError(Exception)'
207+ ] ,
208+ events : [ ]
189209 }
190210 ]
191211 } ,
192212 {
193213 title : 'Authentication' ,
194214 icon : Shield ,
215+ namespace : 'Zetian.Authentication & Zetian.Models' ,
195216 items : [
196217 {
197218 name : 'IAuthenticator' ,
@@ -226,6 +247,7 @@ const apiCategories = [
226247 {
227248 title : 'Storage' ,
228249 icon : Database ,
250+ namespace : 'Zetian.Storage' ,
229251 items : [
230252 {
231253 name : 'FileMessageStore' ,
@@ -246,6 +268,7 @@ const apiCategories = [
246268 {
247269 title : 'Filtering' ,
248270 icon : Filter ,
271+ namespace : 'Zetian.Storage' ,
249272 items : [
250273 {
251274 name : 'DomainMailboxFilter' ,
@@ -273,6 +296,7 @@ const apiCategories = [
273296 {
274297 title : 'Event Arguments' ,
275298 icon : Zap ,
299+ namespace : 'Zetian.Models.EventArgs' ,
276300 items : [
277301 {
278302 name : 'MessageEventArgs' ,
@@ -307,6 +331,7 @@ const apiCategories = [
307331 {
308332 title : 'Protocol' ,
309333 icon : Mail ,
334+ namespace : 'Zetian.Protocol' ,
310335 items : [
311336 {
312337 name : 'SmtpResponse' ,
@@ -340,6 +365,7 @@ const apiCategories = [
340365 {
341366 title : 'Extensions' ,
342367 icon : Zap ,
368+ namespace : 'Zetian.Extensions & Zetian.Models' ,
343369 items : [
344370 {
345371 name : 'SmtpServerExtensions' ,
@@ -384,15 +410,60 @@ const apiCategories = [
384410 'GetRemainingAsync(key)'
385411 ] ,
386412 events : [ ]
387- } ,
413+ }
414+ ]
415+ } ,
416+ {
417+ title : 'Rate Limiting' ,
418+ icon : Gauge ,
419+ namespace : 'Zetian.RateLimiting & Zetian.Abstractions' ,
420+ items : [
388421 {
389422 name : 'InMemoryRateLimiter' ,
390423 description : 'In-memory rate limiter implementation' ,
391424 properties : [ 'Configuration' ] ,
392- methods : [ ] ,
425+ methods : [ 'IsAllowedAsync(key)' , 'IsAllowedAsync(IPAddress)' , 'RecordRequestAsync(key)' , 'RecordRequestAsync(IPAddress)' , 'ResetAsync(key)' , 'GetRemainingAsync(key)' ] ,
393426 events : [ ]
394427 }
395428 ]
429+ } ,
430+ {
431+ title : 'Delegates' ,
432+ icon : Code2 ,
433+ namespace : 'Zetian.Delegates' ,
434+ items : [
435+ {
436+ name : 'AuthenticationHandler' ,
437+ description : 'Delegate for handling authentication' ,
438+ properties : [ ] ,
439+ methods : [ ] ,
440+ events : [ ] ,
441+ signature : 'Task<AuthenticationResult> AuthenticationHandler(string? username, string? password)'
442+ }
443+ ]
444+ } ,
445+ {
446+ title : 'Enums' ,
447+ icon : Hash ,
448+ namespace : 'Zetian.Enums' ,
449+ items : [
450+ {
451+ name : 'CompositeMode' ,
452+ description : 'Composite filter mode for combining multiple filters' ,
453+ properties : [ ] ,
454+ methods : [ ] ,
455+ events : [ ] ,
456+ values : [ 'All (AND logic)' , 'Any (OR logic)' ]
457+ } ,
458+ {
459+ name : 'SmtpSessionState' ,
460+ description : 'SMTP session state enumeration' ,
461+ properties : [ ] ,
462+ methods : [ ] ,
463+ events : [ ] ,
464+ values : [ 'Connected' , 'AwaitingCommand' , 'ReceivingData' , 'Closing' ]
465+ }
466+ ]
396467 }
397468] ;
398469
@@ -438,13 +509,20 @@ export default function ApiReferencePage() {
438509 className = "scroll-mt-20"
439510 >
440511 { /* Category Header */ }
441- < div className = "flex items-center gap-3 mb-6" >
442- < div className = "p-2 bg-primary-100 dark:bg-primary-900/30 rounded-lg" >
443- < Icon className = "h-5 w-5 text-primary-600 dark:text-primary-400" />
512+ < div className = "mb-6" >
513+ < div className = "flex items-center gap-3 mb-2" >
514+ < div className = "p-2 bg-primary-100 dark:bg-primary-900/30 rounded-lg" >
515+ < Icon className = "h-5 w-5 text-primary-600 dark:text-primary-400" />
516+ </ div >
517+ < h2 className = "text-2xl font-bold text-gray-900 dark:text-white" >
518+ { category . title }
519+ </ h2 >
444520 </ div >
445- < h2 className = "text-2xl font-bold text-gray-900 dark:text-white" >
446- { category . title }
447- </ h2 >
521+ { 'namespace' in category && category . namespace && (
522+ < p className = "text-sm text-gray-600 dark:text-gray-400 ml-12" >
523+ Namespace: < code className = "bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded text-primary-600 dark:text-primary-400" > { category . namespace } </ code >
524+ </ p >
525+ ) }
448526 </ div >
449527
450528 { /* Items */ }
@@ -551,6 +629,42 @@ export default function ApiReferencePage() {
551629 </ div >
552630 </ div >
553631 ) }
632+
633+ { /* Delegate Signature */ }
634+ { 'signature' in item && item . signature && (
635+ < div >
636+ < h4 className = "text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2 uppercase tracking-wider" >
637+ Signature
638+ </ h4 >
639+ < div className = "bg-gray-100 dark:bg-gray-800 p-3 rounded" >
640+ < code className = "text-sm text-blue-600 dark:text-blue-400" >
641+ { item . signature }
642+ </ code >
643+ </ div >
644+ </ div >
645+ ) }
646+
647+ { /* Enum Values */ }
648+ { 'values' in item && item . values && item . values . length > 0 && (
649+ < div >
650+ < h4 className = "text-sm font-semibold text-gray-700 dark:text-gray-300 mb-2 uppercase tracking-wider" >
651+ Values
652+ </ h4 >
653+ < div className = "space-y-2" >
654+ { item . values . map ( ( value : string ) => (
655+ < div
656+ key = { value }
657+ className = "flex items-center gap-2 text-sm"
658+ >
659+ < Hash className = "h-3 w-3 text-gray-400" />
660+ < code className = "bg-gray-100 dark:bg-gray-800 px-2 py-1 rounded text-orange-600 dark:text-orange-400" >
661+ { value }
662+ </ code >
663+ </ div >
664+ ) ) }
665+ </ div >
666+ </ div >
667+ ) }
554668 </ div >
555669 ) ) }
556670 </ div >
0 commit comments