import type { PaginationParams } from "./common"; export interface AuditLog { id: number; action_type: string; user: string; workspace: string; type: string; description: string; timestamp: string; ip_address: string | null; } export interface PaginationSerializerAuditLog extends PaginationParams { count: number; next: string | null; previous: string | null; results: AuditLog[]; } export interface ListAuditLogParams extends PaginationParams { action_type?: string; from_timestamp?: string; sorts?: string; to_timestamp?: string; user_id?: number; workspace_id?: number; } export interface AuditLogActionType { id: string; value: string; } export interface ListAuditLogActionTypesParams { search?: string; workspace_id?: number; } export interface SingleAuditLogExportJobRequest { export_charset?: string; csv_column_separator?: string; csv_first_row_header?: boolean; filter_user_id?: number; filter_workspace_id?: number; filter_action_type?: string; filter_from_timestamp?: string; filter_to_timestamp?: string; exclude_columns?: string; } export interface SingleAuditLogExportJobResponse { url: string; export_charset?: string; csv_column_separator?: string; csv_first_row_header?: boolean; filter_user_id?: number; filter_workspace_id?: number; filter_action_type?: string; filter_from_timestamp?: string; filter_to_timestamp?: string; exclude_columns?: string; created_on: string; exported_file_name: string; } export interface AuditLogUser { id: number; value: string; } export interface PaginationSerializerAuditLogUser extends PaginationParams { count: number; next: string | null; previous: string | null; results: AuditLogUser[]; } export interface ListAuditLogUsersParams extends PaginationParams { search?: string; workspace_id?: number; } export interface AuditLogWorkspace { id: number; value: string; } export interface PaginationSerializerAuditLogWorkspace extends PaginationParams { count: number; next: string | null; previous: string | null; results: AuditLogWorkspace[]; } export interface ListAuditLogWorkspacesParams extends PaginationParams { search?: string; } export interface BaseAuthProviderPayload { type: string; domain?: string; enabled?: boolean; name?: string; [key: string]: any; } export interface AdminDashboardPerDay { date: string; count: number; } export interface AdminDashboard { total_users: number; total_workspaces: number; total_applications: number; new_users_last_24_hours: number; new_users_last_7_days: number; new_users_last_30_days: number; previous_new_users_last_24_hours: number; previous_new_users_last_7_days: number; previous_new_users_last_30_days: number; active_users_last_24_hours: number; active_users_last_7_days: number; active_users_last_30_days: number; previous_active_users_last_24_hours: number; previous_active_users_last_7_days: number; previous_active_users_last_30_days: number; new_users_per_day: AdminDashboardPerDay[]; active_users_per_day: AdminDashboardPerDay[]; } export interface UserAdminResponse { id: number; username: string; name: string; workspaces: { id: number; name: string; permissions: string; }[]; last_login: string | null; date_joined: string; is_active: boolean; is_staff: boolean; } export interface PaginationSerializerUserAdminResponse extends PaginationParams { count: number; next: string | null; previous: string | null; results: UserAdminResponse[]; } export interface ListAdminUsersParams extends PaginationParams { search?: string; sorts?: string; } export interface UserAdminCreate { username: string; name: string; is_active?: boolean; is_staff?: boolean; password?: string; } export interface PatchedUserAdminUpdate { username?: string; name?: string; is_active?: boolean; is_staff?: boolean; password?: string; } export interface BaserowImpersonateAuthTokenPayload { user: number; } export interface ImpersonateResponse { user: { first_name: string; username: string; language: string; }; token?: string; access_token: string; refresh_token?: string; } export interface WorkspacesAdminResponse { id: number; name: string; users: { id: number; email: string; permissions: string; }[]; application_count: number; row_count: number; storage_usage: number | null; seats_taken: number; free_users: number; created_on: string; } export interface PaginationSerializerWorkspacesAdminResponse extends PaginationParams { count: number; next: string | null; previous: string | null; results: WorkspacesAdminResponse[]; } export interface ListAdminWorkspacesParams extends PaginationParams { search?: string; sorts?: string; }