import type { AdminTeamsParams } from '../../lib/teams/types'; /** * Options for useAdminTeams hook */ export interface UseAdminTeamsOptions extends AdminTeamsParams { /** Whether the query should run (default: true) */ enabled?: boolean; } /** * Hook for fetching all teams (admin only) * * Requires superadmin or developer role. * Supports search, type filtering, and pagination. * * For user's own teams, use useUserTeams instead. * For optimized dropdown search, use useTeamSearch instead. * * @param options - Query parameters and options * * @example * ```tsx * // Superadmin teams management page * function TeamsManagement() { * const [search, setSearch] = useState('') * const [type, setType] = useState<'user' | 'system'>('user') * const [page, setPage] = useState(1) * * const { teams, counts, pagination, isLoading } = useAdminTeams({ * search, * type, * page, * limit: 20, * }) * * return ( *
* * * User Teams ({counts?.user}) * System ({counts?.system}) * * * *
* ) * } * ``` */ export declare function useAdminTeams(options?: UseAdminTeamsOptions): { /** List of teams */ teams: import(".").TeamWithOwner[]; /** Team counts by type */ counts: { total: number; user: number; system: number; }; /** Pagination info */ pagination: { page: number; limit: number; total: number; totalPages: number; hasMore: boolean; }; /** Request metadata */ metadata: { requestedBy: string; requestedAt: string; source: string; }; /** Loading state */ isLoading: boolean; /** Fetching state (for refetches) */ isFetching: boolean; /** Error if any */ error: Error; /** Refetch teams */ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise>; }; export type UseAdminTeamsReturn = ReturnType; //# sourceMappingURL=useAdminTeams.d.ts.map