UNPKG

@oxyhq/services

Version:

Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀

62 lines • 2.15 kB
export declare const useFollow: (userId?: string | string[]) => { isFollowing: boolean; isLoading: boolean; error: string | null; toggleFollow: () => Promise<void>; setFollowStatus: (following: boolean) => void; fetchStatus: () => Promise<void>; clearError: () => void; followerCount: number | null; followingCount: number | null; isLoadingCounts: boolean; fetchUserCounts: () => Promise<void>; setFollowerCount: (count: number) => void; setFollowingCount: (count: number) => void; followData?: undefined; toggleFollowForUser?: undefined; setFollowStatusForUser?: undefined; fetchStatusForUser?: undefined; fetchAllStatuses?: undefined; clearErrorForUser?: undefined; isAnyLoading?: undefined; hasAnyError?: undefined; allFollowing?: undefined; allNotFollowing?: undefined; } | { followData: Record<string, { isFollowing: boolean; isLoading: boolean; error: string | null; }>; toggleFollowForUser: (targetUserId: string) => Promise<void>; setFollowStatusForUser: (targetUserId: string, following: boolean) => void; fetchStatusForUser: (targetUserId: string) => Promise<void>; fetchAllStatuses: () => Promise<void>; clearErrorForUser: (targetUserId: string) => void; isAnyLoading: boolean; hasAnyError: boolean; allFollowing: boolean; allNotFollowing: boolean; isFollowing?: undefined; isLoading?: undefined; error?: undefined; toggleFollow?: undefined; setFollowStatus?: undefined; fetchStatus?: undefined; clearError?: undefined; followerCount?: undefined; followingCount?: undefined; isLoadingCounts?: undefined; fetchUserCounts?: undefined; setFollowerCount?: undefined; setFollowingCount?: undefined; }; export declare const useFollowerCounts: (userId: string) => { followerCount: number; followingCount: number; isLoadingCounts: boolean; fetchUserCounts: () => Promise<void>; setFollowerCount: (count: number) => void; setFollowingCount: (count: number) => void; }; //# sourceMappingURL=useFollow.d.ts.map