import type { EntityBase } from "./Entity"; import type { User } from "./User"; export type GlobalSettings = EntityBase<"GlobalSettings"> & { systemSettings: SystemSettings; notificationSettings: NotificationSettings; restSettings: RestCorsSettings; appearanceSettings: AppearanceSettings; localeSettings: LocaleSettings; license: License; }; export type SystemSettings = EntityBase<"SystemSettings"> & { baseUrl: string | null; maxUploadFileSize: number; maxExportItems: number; administratorEmail: string | null; allowStatisticsCollection: boolean; isApplicationReadOnly: boolean; }; export type NotificationSettings = EntityBase<"NotificationSettings"> & { emailSettings: EmailSettings; }; export type EmailSettings = EntityBase<"EmailSettings"> & { isEnabled: boolean; host: string | null; port: number; mailProtocol: "SMTP" | "SMTPS" | "SMTP_TLS"; anonymous: boolean; login: string | null; sslKey: StorageEntry | null; from: string; replyTo: string | null; }; export type StorageEntry = EntityBase<"StorageEntry"> & { name: string | null; }; export type RestCorsSettings = EntityBase<"RestCorsSettings"> & { allowedOrigins: string[]; allowAllOrigins: boolean; }; export type AppearanceSettings = EntityBase<"AppearanceSettings"> & { timeZone: TimeZoneDescriptor; dateFieldFormat: DateFormatDescriptor; logo: Logo; }; export type DateFormatDescriptor = EntityBase<"DateFormatDescriptor"> & { presentation: string; pattern: string; datePattern: string; }; export type Logo = EntityBase<"Logo"> & { url: string; }; export type TimeZoneDescriptor = EntityBase<"TimeZoneDescriptor"> & { presentation: string; offset: number; }; export type LocaleSettings = EntityBase<"LocaleSettings"> & { locale: LocaleDescriptor; isRTL: boolean; }; export type LocaleDescriptor = EntityBase<"LocaleDescriptor"> & { locale: string | null; language: string | null; community: boolean; name: string | null; }; export type License = EntityBase<"License"> & { username: string | null; license: string | null; error: string | null; }; export type Telemetry = EntityBase<"Telemetry"> & { installationFolder: string | null; databaseLocation: string | null; logsLocation: string | null; availableProcessors: number | null; availableMemory: string | null; allocatedMemory: string | null; usedMemory: string | null; uptime: string; startedTime: number; databaseBackgroundThreads: number; pendingAsyncJobs: number; cachedResultsCountInDBQueriesCache: number; databaseQueriesCacheHitRate: string; blobStringsCacheHitRate: string; totalTransactions: number; transactionsPerSecond: string; requestsPerSecond: string; databaseSize: string; fullDatabaseSize: string; textIndexSize: string; onlineUsers: OnlineUsers; reportCalculatorThreads: number; notificationAnalyzerThreads: number; }; export type OnlineUsers = EntityBase<"OnlineUsers"> & { users: number; }; export type BackupFile = EntityBase<"BackupFile"> & { name: string; size: number; creationDate: number; link: string; }; export type DatabaseBackupSettings = EntityBase<"DatabaseBackupSettings"> & { location: string | null; filesToKeep: number; cronExpression: string | null; archiveFormat: "TAR_GZ" | "ZIP"; isOn: boolean; availableDiskSpace: number; notifiedUsers: User[]; backupStatus: BackupStatus; }; export type BackupStatus = EntityBase<"BackupStatus"> & { backupInProgress: boolean; backupCancelled: boolean; backupError: BackupError | null; }; export type BackupError = EntityBase<"BackupError"> & { date: number | null; errorMessage: string | null; };