9298216ce0
- PROJ-40: /api/health mit Version+Uptime, /metrics Prometheus-Format (mails_last_60min/24h/7d/30d, mails_total, storage_bytes, tenants_total, users_total, uptime_seconds) — Token-Schutz optional konfigurierbar - PROJ-41: GET /api/admin/stats/timeseries (30-Tage tagesgenau, Tenant-scoped) + SVG-Balkendiagramm im Dashboard (Mail-Eingang letzte 30 Tage) - storage.DBQueryRow() Helper für Metrics-Queries ohne Pool-Exposition - config.MetricsConfig (enabled, token) in config.go Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
159 lines
2.8 KiB
TypeScript
159 lines
2.8 KiB
TypeScript
// Re-export everything from domain modules so that existing imports
|
|
// from "@/lib/api" continue to work without modification.
|
|
|
|
export { API_BASE, request } from "./core";
|
|
|
|
export type {
|
|
LoginResponse,
|
|
User,
|
|
MeResponse,
|
|
CreateUserRequest,
|
|
UpdateUserRequest,
|
|
} from "./users";
|
|
export {
|
|
login,
|
|
getMe,
|
|
logout,
|
|
changePassword,
|
|
changeEmail,
|
|
getUsers,
|
|
createUser,
|
|
updateUser,
|
|
deleteUser,
|
|
getTOTPSetup,
|
|
confirmTOTPSetup,
|
|
disableTOTP,
|
|
} from "./users";
|
|
|
|
export type {
|
|
LDAPGroupMapping,
|
|
LDAPConfig,
|
|
LDAPTestUser,
|
|
LDAPTestResult,
|
|
LDAPFilterSuggestion,
|
|
} from "./ldap";
|
|
export {
|
|
getLDAPConfig,
|
|
saveLDAPConfig,
|
|
deleteLDAPConfig,
|
|
testLDAPConfig,
|
|
} from "./ldap";
|
|
|
|
export type {
|
|
Tenant,
|
|
TenantDomain,
|
|
TenantDefaultUser,
|
|
CreateTenantResponse,
|
|
TenantLDAPConfig,
|
|
LDAPSyncResult,
|
|
TenantUsageEntry,
|
|
} from "./tenants";
|
|
export {
|
|
getTenants,
|
|
getTenantUsers,
|
|
createTenant,
|
|
updateTenant,
|
|
deleteTenant,
|
|
getTenantDomains,
|
|
addTenantDomain,
|
|
removeTenantDomain,
|
|
getTenantLogoUrl,
|
|
uploadTenantLogo,
|
|
deleteTenantLogo,
|
|
uploadMyTenantLogo,
|
|
deleteMyTenantLogo,
|
|
getTenantLDAPConfig,
|
|
saveTenantLDAPConfig,
|
|
deleteTenantLDAPConfig,
|
|
testTenantLDAPConfig,
|
|
getAdminTenantLDAPConfig,
|
|
saveAdminTenantLDAPConfig,
|
|
deleteAdminTenantLDAPConfig,
|
|
testAdminTenantLDAPConfig,
|
|
syncAdminTenantLDAP,
|
|
getAllTenantUsage,
|
|
setTenantQuota,
|
|
} from "./tenants";
|
|
|
|
export type {
|
|
SearchHit,
|
|
SearchResponse,
|
|
ThreadMail,
|
|
ThreadResponse,
|
|
MailAttachment,
|
|
MailDetail,
|
|
ImapFolder,
|
|
ImapAccount,
|
|
ImapTestResult,
|
|
Pop3Account,
|
|
Pop3TestResult,
|
|
UploadJob,
|
|
} from "./mail";
|
|
export {
|
|
searchEmails,
|
|
getMail,
|
|
getThread,
|
|
downloadMailAttachment,
|
|
downloadMailRaw,
|
|
getImapAccounts,
|
|
createImapAccount,
|
|
deleteImapAccount,
|
|
testImapConnection,
|
|
startImapImport,
|
|
getImapProgress,
|
|
triggerImapSync,
|
|
updateImapInterval,
|
|
updateImapAccount,
|
|
getPop3Accounts,
|
|
createPop3Account,
|
|
deletePop3Account,
|
|
testPop3Connection,
|
|
startPop3Import,
|
|
getPop3Progress,
|
|
exportMailPDF,
|
|
exportMailsZIP,
|
|
uploadMailFiles,
|
|
getUploadProgress,
|
|
uploadMailFilesUser,
|
|
getUploadProgressUser,
|
|
exportEDiscovery,
|
|
} from "./mail";
|
|
|
|
export type {
|
|
HealthResponse,
|
|
SMTPStatus,
|
|
StorageStats,
|
|
ServiceStatus,
|
|
AuditEntry,
|
|
AuditResponse,
|
|
SystemStatsCPU,
|
|
SystemStatsRAM,
|
|
SystemStatsDisk,
|
|
SystemStatsMailInfo,
|
|
SystemStatsActivity,
|
|
SystemStatsEstimate,
|
|
SystemStats,
|
|
TimeseriesPoint,
|
|
SecurityCheck,
|
|
SecurityAuditResult,
|
|
CertInfo,
|
|
SelfSignedRequest,
|
|
ACMERequest,
|
|
} from "./system";
|
|
export {
|
|
getHealth,
|
|
getSMTPStatus,
|
|
getStorageStats,
|
|
getSystemStats,
|
|
getMailTimeseries,
|
|
getServices,
|
|
serviceAction,
|
|
getAuditLog,
|
|
getSecurityAudit,
|
|
fixSecurityIssue,
|
|
getCertInfo,
|
|
uploadCert,
|
|
generateSelfSignedCert,
|
|
requestACMECert,
|
|
} from "./system";
|