44 lines
1.2 KiB
TypeScript
44 lines
1.2 KiB
TypeScript
![]() |
import * as plugins from '../plugins.js';
|
||
|
import * as authInterfaces from '../data/auth.js';
|
||
|
import * as statsInterfaces from '../data/stats.js';
|
||
|
|
||
|
// Get Recent Logs
|
||
|
export interface IReq_GetRecentLogs extends plugins.typedrequestInterfaces.implementsTR<
|
||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||
|
IReq_GetRecentLogs
|
||
|
> {
|
||
|
method: 'getRecentLogs';
|
||
|
request: {
|
||
|
identity?: authInterfaces.IIdentity;
|
||
|
level?: 'debug' | 'info' | 'warn' | 'error';
|
||
|
category?: 'smtp' | 'dns' | 'security' | 'system' | 'email';
|
||
|
limit?: number;
|
||
|
offset?: number;
|
||
|
search?: string;
|
||
|
timeRange?: '1h' | '6h' | '24h' | '7d' | '30d';
|
||
|
};
|
||
|
response: {
|
||
|
logs: statsInterfaces.ILogEntry[];
|
||
|
total: number;
|
||
|
hasMore: boolean;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
// Get Log Stream
|
||
|
export interface IReq_GetLogStream extends plugins.typedrequestInterfaces.implementsTR<
|
||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||
|
IReq_GetLogStream
|
||
|
> {
|
||
|
method: 'getLogStream';
|
||
|
request: {
|
||
|
identity?: authInterfaces.IIdentity;
|
||
|
follow?: boolean;
|
||
|
filters?: {
|
||
|
level?: string[];
|
||
|
category?: string[];
|
||
|
};
|
||
|
};
|
||
|
response: {
|
||
|
logStream: plugins.typedrequestInterfaces.IVirtualStream;
|
||
|
};
|
||
|
}
|