/* * Copyright (C) 2026 Fluxer Contributors * * This file is part of Fluxer. * * Fluxer is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Fluxer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Fluxer. If not, see . */ import type {UserID} from '@fluxer/api/src/BrandedTypes'; import type {AdminAuditLogRow} from '@fluxer/api/src/database/types/AdminArchiveTypes'; export interface AdminAuditLog { logId: bigint; adminUserId: UserID; targetType: string; targetId: bigint; action: string; auditLogReason: string | null; metadata: Map; createdAt: Date; } export abstract class IAdminRepository { abstract createAuditLog(log: AdminAuditLogRow): Promise; abstract getAuditLog(logId: bigint): Promise; abstract listAuditLogsByIds(logIds: Array): Promise>; abstract listAllAuditLogsPaginated(limit: number, lastLogId?: bigint): Promise>; abstract isIpBanned(ip: string): Promise; abstract banIp(ip: string): Promise; abstract unbanIp(ip: string): Promise; abstract listBannedIps(limit?: number): Promise>; abstract isEmailBanned(email: string): Promise; abstract banEmail(email: string): Promise; abstract unbanEmail(email: string): Promise; abstract listBannedEmails(limit?: number): Promise>; abstract isPhoneBanned(phone: string): Promise; abstract banPhone(phone: string): Promise; abstract unbanPhone(phone: string): Promise; abstract listBannedPhones(limit?: number): Promise>; abstract loadAllBannedIps(): Promise>; }