import { Profile, ProfileRequest, UnspecifiedError } from '@lens-protocol/api-bindings'; import { OneOf } from '@lens-protocol/shared-kernel'; import { NotFoundError } from "../NotFoundError.js"; import { ReadResult } from "../helpers/reads.js"; import { SuspenseEnabled, SuspenseResultWithError } from "../helpers/suspense.js"; export type { ProfileRequest }; /** * {@link useProfile} hook arguments */ export type UseProfileArgs = OneOf; /** * {@link useProfile} hook arguments with Suspense support * * @experimental This API can change without notice */ export type UseSuspenseProfileArgs = SuspenseEnabled; export type UseProfileResult = ReadResult | SuspenseResultWithError; /** * Fetches a Profile by either its full handle or id. * * ```ts * const { data, error, loading } = useProfile({ * forHandle: 'lens/stani', * // OR * forProfileId: '0x04', * }); * * if (loading) { * return ; * } * * if (error) { * return ; * } * * return ; * ``` * * @category Profiles * @group Hooks * @param args - {@link UseProfileArgs} */ export declare function useProfile({ forHandle, forProfileId, }: UseProfileArgs): ReadResult; /** * Fetches a Profile by either its full handle or id. * * This signature supports [React Suspense](https://react.dev/reference/react/Suspense). * * ```ts * const { data } = useProfile({ * forHandle: 'lens/stani', * suspense: true, * }); * * console.log(data.id); * ``` * * @experimental This API can change without notice * @category Profiles * @group Hooks */ export declare function useProfile(args: UseSuspenseProfileArgs): SuspenseResultWithError;