import { BaserowClient } from "./baserow-client"; import type { AuditLogActionType, SingleAuditLogExportJobRequest, SingleAuditLogExportJobResponse, PatchedUserAdminUpdate, UserAdminResponse, BaserowImpersonateAuthTokenPayload, ImpersonateResponse, PaginationSerializerWorkspacesAdminResponse, ListAdminWorkspacesParams, ListAuditLogActionTypesParams, ListAuditLogParams, ListAuditLogUsersParams, ListAuditLogWorkspacesParams, PaginationSerializerAuditLog, PaginationSerializerAuditLogUser, PaginationSerializerAuditLogWorkspace, BaseAuthProviderPayload, AdminDashboard, ListAdminUsersParams, PaginationSerializerUserAdminResponse, UserAdminCreate } from '../types/admin'; /** * Operations for Baserow administration. */ export declare class AdminOperations { private client; constructor(client: BaserowClient); /** * Lists audit log entries. (Enterprise feature) * @param params - Optional parameters for filtering, sorting, and pagination. * @returns Paginated list of audit log entries. * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/audit_log_list * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/audit_log_list_2 */ listAuditLog(params?: ListAuditLogParams): Promise; /** * Lists distinct action types found in the audit log. (Enterprise feature) * @param params - Optional parameters for searching and filtering by workspace. * @returns Array of distinct audit log action types. * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/audit_log_action_types * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/audit_log_action_types_2 */ listAuditLogActionTypes(params?: ListAuditLogActionTypesParams): Promise; /** * Starts an asynchronous job to export audit log entries to a CSV file. (Enterprise feature) * @param payload - Export options and filters. * @param options - Optional request parameters like ClientSessionId. * @returns Details of the created export job. * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/async_audit_log_export * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/async_audit_log_export_2 */ exportAuditLog(payload: SingleAuditLogExportJobRequest, options?: { clientSessionId?: string; }): Promise; /** * Lists users who have entries in the audit log. (Enterprise feature) * @param params - Optional parameters for searching, pagination, and filtering by workspace. * @returns Paginated list of users from the audit log. * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/audit_log_users * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/audit_log_users_2 */ listAuditLogUsers(params?: ListAuditLogUsersParams): Promise; /** * Lists distinct workspaces found in the audit log. (Enterprise feature) * @param params - Optional parameters for searching and pagination. * @returns Paginated list of workspaces from the audit log. * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/audit_log_workspaces * @see https://api.baserow.io/api/redoc/#tag/Audit-log/operation/audit_log_workspaces_2 */ listAuditLogWorkspaces(params?: ListAuditLogWorkspacesParams): Promise; /** * Lists all available authentication providers configured in the admin panel. * @returns An array of authentication provider configurations. * @see https://api.baserow.io/api/redoc/#tag/Auth/operation/list_auth_providers */ listAuthProviders(): Promise; /** * Creates a new authentication provider. Requires staff/admin privileges. * @param payload - The configuration for the new auth provider. * @returns The created authentication provider configuration. * @see https://api.baserow.io/api/redoc/#tag/Auth/operation/create_auth_provider */ createAuthProvider(payload: BaseAuthProviderPayload): Promise; /** * Retrieves a specific authentication provider by its ID. * @param authProviderId - The ID of the authentication provider. * @returns The authentication provider configuration. * @see https://api.baserow.io/api/redoc/#tag/Auth/operation/get_auth_provider */ getAuthProvider(authProviderId: number): Promise; /** * Updates an existing authentication provider. Requires staff/admin privileges. * @param authProviderId - The ID of the provider to update. * @param payload - The partial configuration updates. * @returns The updated authentication provider configuration. * @see https://api.baserow.io/api/redoc/#tag/Auth/operation/update_auth_provider */ updateAuthProvider(authProviderId: number, payload: Partial): Promise; /** * Deletes an authentication provider. Requires staff/admin privileges. * @param authProviderId - The ID of the provider to delete. * @see https://api.baserow.io/api/redoc/#tag/Auth/operation/delete_auth_provider */ deleteAuthProvider(authProviderId: number): Promise; /** * Gets statistics for the admin dashboard. Requires staff/admin privileges. * @returns Dashboard statistics object. * @see https://api.baserow.io/api/redoc/#tag/Admin/operation/admin_dashboard */ getDashboardStats(): Promise; /** * Lists all users in the Baserow instance. Requires staff/admin privileges. * @param params - Optional parameters for pagination, searching, and sorting. * @returns Paginated list of admin user representations. * @see https://api.baserow.io/api/redoc/#tag/Admin/operation/admin_list_users */ listUsers(params?: ListAdminUsersParams): Promise; /** * Creates a new user. Requires staff/admin privileges. * @param payload - User details (name, email, password, active/staff status). * @returns The created user details. * @see https://api.baserow.io/api/redoc/#tag/Admin/operation/admin_create_user */ createUser(payload: UserAdminCreate): Promise; /** * Updates an existing user. Requires staff/admin privileges. * @param userId - The ID of the user to update. * @param payload - The user attributes to update. * @returns The updated user details. * @see https://api.baserow.io/api/redoc/#tag/Admin/operation/admin_edit_user */ updateUser(userId: number, payload: PatchedUserAdminUpdate): Promise; /** * Deletes a user. Requires staff/admin privileges. Cannot delete self. * @param userId - The ID of the user to delete. * @returns void - Returns 200 OK on success (spec says 200, not 204). * @see https://api.baserow.io/api/redoc/#tag/Admin/operation/admin_delete_user */ deleteUser(userId: number): Promise; /** * Allows a staff user to impersonate another non-staff/non-superuser. * @param payload - Object containing the user ID to impersonate. * @returns Authentication tokens and user details for the impersonated session. * @see https://api.baserow.io/api/redoc/#tag/Admin/operation/admin_impersonate_user */ impersonateUser(payload: BaserowImpersonateAuthTokenPayload): Promise; /** * Lists all workspaces in the instance. Requires staff/admin privileges. * @param params - Optional parameters for pagination, searching, and sorting. * @returns Paginated list of admin workspace representations. * @see https://api.baserow.io/api/redoc/#tag/Admin/operation/admin_list_workspaces */ listWorkspaces(params?: ListAdminWorkspacesParams): Promise; /** * Deletes a workspace as an admin. Requires staff/admin privileges. * @param workspaceId - The ID of the workspace to delete. * @see https://api.baserow.io/api/redoc/#tag/Admin/operation/admin_delete_workspace */ deleteWorkspace(workspaceId: number): Promise; }