import client from './client' export interface TenantItem { id: string username: string nickname: string email: string phone?: string type: 'MAIN' | 'SUB' status: 'ACTIVE' | 'DISABLED' | 'PENDING_EMAIL' parentId?: string createdAt: string } export interface TenantPage { content: TenantItem[] total: number totalPages: number } export interface Statistics { totalTenants: number todayNew: number activeApps: number onlineUsers: number } export const opsApi = { listTenants: (keyword = '', page = 0, size = 20) => client.get<{ data: TenantPage }>('/ops/tenants', { params: { keyword, page, size } }), toggleStatus: (id: string) => client.post(`/ops/tenants/${id}/toggle-status`), statistics: () => client.get<{ data: Statistics }>('/ops/statistics'), }