import * as react from 'react';
import { ReactNode } from 'react';
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, as as RefreshPdsResult, aJ as UpdateProfileOverrideInput, aK as UpdateProfileSelfInput, aL as UploadAvatarResult, aM as UploadPronunciationAudioResult, C as CreateResult, aG as SubCategoryBulkResult, ag as ProfileLocationInput, q as ExternalAccountInput, p as CreateExternalAccountResult, aN as VerifyExternalAccountResult, E as EndorsementInput, n as ConfirmationInput, o as ConfirmationSubjectInput, T as GivenConfirmation, ad as PendingConfirmationsPage, ar as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, a0 as HideProfileItemInput, aF as StatsResponse, k as AppRegistryEntry, Z as HiddenApp, d as AccountSummary, K as FilterOptions, aA as SearchFilters, aB as SearchResponse, aE as SkillSearchResult, ci as CompanySearchFilters, cj as CompanySearchResponse, r as FeaturedProfile, aD as SimilarProfile, J as FetchSuggestionsOptions, aI as SuggestionsResponse, O as FollowUserResult, w as FetchFollowListOptions, L as FollowListPage, P as FollowingResponse, y as FetchFollowingFeedOptions, x as FetchFollowProfilePageOptions, N as FollowProfilePageResponse, F as FeatureAllowlistResponse, i as AdminReviewQueues, u as FetchActivityFeedOptions, e as ActivityFeedResponse, h as ActivityTeaserResponse, Y as HeatmapResponse, a2 as MyGithubPullRequestsResponse, c as AccountCheckResult, aq as ReactionStatus, ap as ReactionResult, ao as ReactionError, az as RoadmapVotesResponse, l as CastRoadmapVoteResult, D as DeleteAccountResult, au as ResetProfileResult, aO as WipePreview, at as RepoDeleteInput, a4 as OrgClaimResult, aa as OrgProfileUpdateResult, a5 as OrgDomainChallengeResult, a6 as OrgDomainVerifyResult, a7 as OrgNotificationEmailAddResult, a8 as OrgNotificationEmailRemoveResult } from './org-h8nhEeAJ.js';
import * as _tanstack_react_query from '@tanstack/react-query';
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
import { c as Profile, d as ProfilePosition, S as SkillRef, p as ExternalAccount, Q as SkillSuggestion, s as OrgFloorVerdict } from './index-CTzpbW81.js';
import { n as ProfileView, t as RepoDeleteResult, w as RepoInventory } from './types-zjv3qDWz.js';
import { j as EntitySearchResponse, E as EntitySearchResult, d as EntityMintDomainResponse, h as EntityResolveDomainResponse, o as EntitySelectResponse, m as EntitySelectRequest, y as FollowFeedPage, s as FeatureFlag } from './feed-BMm9Pkew.js';
import { O as OrgClaimRequestInput, a as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, c as OrgDomainVerifyRequestInput, d as OrgNotificationEmailRequestInput } from './org-settings-CZ_tmAYl.js';
interface SifaProviderProps {
config: SifaApiConfig;
children: ReactNode;
}
/**
* Provides the {@link SifaApiConfig} that hooks under it can read via
* {@link useSifaConfig}. Wrap the React tree once; hooks consume it.
*
* @example
* ```tsx
*
*
*
*
*
* ```
*/
declare function SifaProvider({ config, children }: SifaProviderProps): react.JSX.Element;
/**
* Read the SDK's {@link SifaApiConfig} from context. Throws if no
* {@link SifaProvider} is mounted above.
*/
declare function useSifaConfig(): SifaApiConfig;
/**
* React hook that reads an aggregated profile by handle or DID via
* TanStack Query. Returns `null` data when the profile does not exist.
*
* Pass `{ enabled: false }` (or an empty `handleOrDid`) to defer the
* fetch.
*/
declare function useProfile(handleOrDid: string | undefined | null, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* React hook for a profile's AT Fund link. Returns `null` data on error
* or when the profile has no link configured.
*/
declare function useAtFundLink(did: string | undefined | null, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult;
/**
* React hook that reads the aggregated public profile view via the
* `id.sifa.getProfileView` XRPC query. Returns `null` data when the profile
* does not exist.
*
* Pass `{ enabled: false }` (or an empty `actor`) to defer the fetch.
*/
declare function useGetProfileView(actor: string | undefined | null, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* React hook for updating the authenticated user's profile self record.
* On success, invalidates the owner's profile cache.
*
* The owner identifier (handle or DID) is required so the mutation can
* target the right profile cache entry for invalidation.
*/
declare function useUpdateProfileSelf(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for updating the authenticated user's profile override fields. */
declare function useUpdateProfileOverride(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for re-pulling the authenticated user's PDS-side profile. */
declare function useRefreshPds(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* React hook for uploading a new avatar. Pass a `File` (browser) or
* `Blob` (Expo) as the mutation variable.
*/
declare function useUploadAvatar(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for deleting the avatar override (revert to PDS avatar). */
declare function useDeleteAvatarOverride(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* React hook for uploading a name-pronunciation audio clip. Pass a `File`
* (browser) or `Blob` (Expo) as the mutation variable.
*/
declare function useUploadNamePronunciationAudio(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for deleting the name-pronunciation audio clip. */
declare function useDeleteNamePronunciationAudio(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* React hook for creating a new position record. On success, invalidates
* the owner's profile cache so the new position is reflected on the next
* read.
*
* The owner DID is required so the mutation can target the correct
* profile cache entry for invalidation.
*/
declare function useCreatePosition(ownerDid: string, options?: Omit>, 'mutationFn'>): _tanstack_react_query.UseMutationResult, unknown>;
/** Variables for {@link useUpdatePosition}. */
interface UpdatePositionVariables {
rkey: string;
data: Record;
}
/** React hook for updating a position record. */
declare function useUpdatePosition(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for deleting a position record. Variable: the `rkey` string. */
declare function useDeletePosition(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for marking a position as primary. Variable: the `rkey` string. */
declare function useSetPositionPrimary(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for clearing the primary flag on a position. */
declare function useUnsetPositionPrimary(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Variables for {@link useLinkSkillToPosition} / {@link useUnlinkSkillFromPosition}. */
interface PositionSkillLinkVariables {
position: ProfilePosition;
skillRef: SkillRef;
}
/** React hook for linking a skill to a position. Idempotent. */
declare function useLinkSkillToPosition(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for unlinking a skill from a position. */
declare function useUnlinkSkillFromPosition(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for creating an education record. */
declare function useCreateEducation(ownerHandleOrDid: string, options?: Omit>, 'mutationFn'>): _tanstack_react_query.UseMutationResult, unknown>;
/** Variables for {@link useUpdateEducation}. */
interface UpdateEducationVariables {
rkey: string;
data: Record;
}
/** React hook for updating an education record. */
declare function useUpdateEducation(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for deleting an education record. Variable: the `rkey` string. */
declare function useDeleteEducation(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for creating a skill record. */
declare function useCreateSkill(ownerHandleOrDid: string, options?: Omit>, 'mutationFn'>): _tanstack_react_query.UseMutationResult, unknown>;
/** Variables for {@link useUpdateSkill}. */
interface UpdateSkillVariables {
rkey: string;
data: Record;
}
/** React hook for updating a skill record. */
declare function useUpdateSkill(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Variables for {@link useUpdateSkillSubCategories}. */
interface UpdateSkillSubCategoriesVariables {
rkeys: string[];
subCategory: string;
}
/**
* React hook for setting (or clearing) the sub-category on many skills in a
* single request. An empty `subCategory` clears the field.
*/
declare function useUpdateSkillSubCategories(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for deleting a skill record. Variable: the `rkey` string. */
declare function useDeleteSkill(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Variables for {@link useCreateRecord}. */
interface CreateRecordVariables {
collection: string;
data: Record;
}
/**
* Generic record-create escape hatch for collections without a
* dedicated section helper (certifications, projects, publications,
* volunteering, honors, languages, courses). Prefer the typed helpers
* when one exists for the section.
*/
declare function useCreateRecord(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Variables for {@link useUpdateRecord}. */
interface UpdateRecordVariables {
collection: string;
rkey: string;
data: Record;
}
/** Generic record-update escape hatch. See {@link useCreateRecord}. */
declare function useUpdateRecord(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Variables for {@link useDeleteRecord}. */
interface DeleteRecordVariables {
collection: string;
rkey: string;
}
/** Generic record-delete escape hatch. See {@link useCreateRecord}. */
declare function useDeleteRecord(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for creating a profile location record. */
declare function useCreateProfileLocation(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Variables for {@link useUpdateProfileLocation}. */
interface UpdateProfileLocationVariables {
rkey: string;
data: ProfileLocationInput;
}
/** React hook for updating a profile location record. */
declare function useUpdateProfileLocation(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for deleting a profile location record. Variable: the `rkey` string. */
declare function useDeleteProfileLocation(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for reading the external-accounts list. Returns `[]` data on error. */
declare function useExternalAccounts(handleOrDid: string | undefined | null, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/** React hook for creating an external account. */
declare function useCreateExternalAccount(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Variables for {@link useUpdateExternalAccount}. */
interface UpdateExternalAccountVariables {
rkey: string;
data: ExternalAccountInput;
}
/** React hook for updating an external account. */
declare function useUpdateExternalAccount(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for deleting an external account. Variable: the `rkey` string. */
declare function useDeleteExternalAccount(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for marking an external account primary. */
declare function useSetExternalAccountPrimary(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for clearing the primary flag on an external account. */
declare function useUnsetExternalAccountPrimary(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for running server-side verification of an external account. */
declare function useVerifyExternalAccount(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* React hook for creating an endorsement of another user's skill. The
* mutation needs the endorsed user's handle/DID (not the endorser's)
* so the endorsed profile + their endorsement count caches get
* invalidated; pass `null` to skip endorsed-profile invalidation
* (e.g., if you only know the skill URI).
*/
declare function useCreateEndorsement(endorsedHandleOrDid: string | null, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* Claims naming the signed-in user that await their decision. Returns an empty
* page when signed out or on error, so callers can render "nothing pending"
* without special-casing either.
*/
declare function usePendingConfirmations(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* Confirmations the signed-in user has already given, with whether each has
* drifted since. Returns an empty list when signed out or on error.
*/
declare function useGivenConfirmations(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* Affirm a claim naming you. On success it leaves the inbox and starts
* rendering with your name and avatar on the claimer's profile, so both the
* inbox and the claimer's profile cache are invalidated.
*
* `claimerHandleOrDid` is whose profile the claim displays on; pass `null` to
* skip profile invalidation. Note this is the claimer, not the confirming
* user: confirming changes what renders on *their* profile, not yours.
*/
declare function useCreateConfirmation(claimerHandleOrDid: string | null, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* Dismiss a claim naming you. Only the inbox is invalidated -- a dismissal
* changes nothing that displays anywhere, so no profile cache is affected.
*/
declare function useDismissConfirmation(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* Withdraw a confirmation you previously gave. Unlike a dismissal this does
* change what displays, so the claimer's profile cache is invalidated too.
*/
declare function useRevokeConfirmation(claimerHandleOrDid: string | null, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for hiding a keytrace claim. Variable: the claim `rkey` string. */
declare function useHideKeytraceClaim(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for unhiding a previously-hidden keytrace claim. */
declare function useUnhideKeytraceClaim(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for revealing (making public) a Marque domain. Variable: the domain string. */
declare function useRevealMarqueDomain(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for hiding a previously-revealed Marque domain again. */
declare function useUnrevealMarqueDomain(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for hiding an ORCID publication. Variable: the `putCode` number. */
declare const useHideOrcidPublication: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** React hook for unhiding an ORCID publication. Variable: the `putCode` number. */
declare const useUnhideOrcidPublication: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** React hook for hiding a standard publication. Variable: the AT URI string. */
declare const useHideStandardPublication: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** React hook for unhiding a standard publication. Variable: the AT URI string. */
declare const useUnhideStandardPublication: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** React hook for bulk-hiding standard publications. Variable: the URI list. */
declare const useBulkHideStandardPublications: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** React hook for bulk-unhiding standard publications. Variable: the URI list. */
declare const useBulkUnhideStandardPublications: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** React hook for hiding a Sifa-authored publication. Variable: the `rkey` string. */
declare const useHideSifaPublication: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** React hook for unhiding a Sifa-authored publication. Variable: the `rkey` string. */
declare const useUnhideSifaPublication: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** React hook for re-pulling ORCID publications. */
declare function useRefreshOrcidPublications(ownerHandleOrDid: string, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* Hide one profile item across any supported section. The underlying
* record stays on the user's PDS; only its display on sifa.id is
* suppressed.
*/
declare const useHideProfileItem: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** Restore a previously-hidden profile item. */
declare const useUnhideProfileItem: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** Bulk-hide profile items sharing the same `itemType` + `source`. */
declare const useBulkHideProfileItems: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/** Bulk-unhide profile items sharing the same `itemType` + `source`. */
declare const useBulkUnhideProfileItems: (ownerHandleOrDid: string, options?: Omit, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult;
/**
* React hook for the public homepage stats. Returns `null` data on error.
*/
declare function useStats(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/** React hook for the public app registry. */
declare function useAppsRegistry(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* React hook for the authenticated user's hidden-apps list. Requires a
* client-side session (relies on `credentials: 'include'`).
*/
declare function useHiddenApps(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* React hook for the accounts attached to this browser (the account switcher).
* Requires a client-side session (relies on `credentials: 'include'`).
* Returns `[]` when unauthenticated.
*/
declare function useAccounts(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
declare function useSearchProfiles(filters: SearchFilters, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
declare function useSkillSuggestions(query: string, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* Canonical-skill search hook. Hits `/api/skills/search` (the
* canonical-skills DB lookup, distinct from {@link useSkillSuggestions}'s
* `/api/search/skills` profile-skill typeahead). Skips the network call
* when the query is empty.
*/
declare function useCanonicalSkillSearch(query: string, limit?: number, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
declare function useSearchFilters(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* Company search (workspace#299). Separate hook from `useSearchProfiles` so a
* blended results page can render each category as it resolves instead of
* waiting for the slowest.
*/
declare function useSearchCompanies(filters: CompanySearchFilters, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/** Debounce a rapidly-changing value (e.g. a typeahead input). */
declare function useDebouncedValue(value: T, delayMs?: number): T;
interface UseEntitySearchOptions {
/** Max rows to request (default 5). */
limit?: number;
/** Debounce delay in ms (default 250). */
debounceMs?: number;
enabled?: boolean;
}
/**
* Debounced organization typeahead. The query is debounced internally, so
* consumers can pass the raw input value on every keystroke. Skips the network
* call while the (trimmed, debounced) query is empty.
*/
declare function useEntitySearch(query: string, opts?: UseEntitySearchOptions, queryOptions?: Omit>, 'queryKey' | 'queryFn' | 'enabled'>): _tanstack_react_query.UseQueryResult, Error>;
/** Mutation: record a selection (promote a PDL row or bump an entity). */
declare function useSelectEntity(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult<{
entityId: number;
slug: string;
kind: string;
canonicalName: string;
domain: string | null;
website: string | null;
websiteTier: "org" | "curated" | null;
entityRef: string | null;
}, Error, {
entityId?: number | undefined;
pdlId?: string | undefined;
}, unknown>;
/** Mutation: grow-on-demand Wikidata import for a typeahead miss. */
declare function useImportSearchEntities(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult<({
kind: string;
name: string;
domain: string | null;
country: string | null;
logoUrl: string | null;
parentName: string | null;
source: "entity";
entityId: number;
} | {
kind: string;
name: string;
domain: string | null;
country: string | null;
logoUrl: string | null;
parentName: string | null;
source: "pdl";
pdlId: string;
})[], Error, string, unknown>;
/**
* Mutation: grow-on-demand by domain, Branch 1. Resolve a domain-shaped
* typeahead miss to any notable company (Wikidata reverse P856). The response's
* `canMint` flag drives the "Add " affordance.
*/
declare function useResolveEntityDomain(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult<{
results: ({
kind: string;
name: string;
domain: string | null;
country: string | null;
logoUrl: string | null;
parentName: string | null;
source: "entity";
entityId: number;
} | {
kind: string;
name: string;
domain: string | null;
country: string | null;
logoUrl: string | null;
parentName: string | null;
source: "pdl";
pdlId: string;
})[];
canMint: boolean;
}, Error, string, unknown>;
/**
* Mutation: grow-on-demand by domain, Branch 2 (user-initiated). Mint a
* crawled-tier entity from the domain's homepage. Rejects when the domain is not
* mintable or the site yields nothing usable.
*/
declare function useMintEntityDomain(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult<{
result: {
kind: string;
name: string;
domain: string | null;
country: string | null;
logoUrl: string | null;
parentName: string | null;
source: "entity";
entityId: number;
} | {
kind: string;
name: string;
domain: string | null;
country: string | null;
logoUrl: string | null;
parentName: string | null;
source: "pdl";
pdlId: string;
};
pending: boolean;
}, Error, string, unknown>;
declare function useSimilarProfiles(did: string | undefined | null, opts?: {
limit?: number;
}, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
declare function useSuggestions(opts?: Omit>, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
declare function useSuggestionCount(since?: string, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult;
declare function useFeaturedProfile(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* Legacy "people I follow" query. Kept as-is for back-compat with sifa-web
* call sites that pre-date the V5 feed work. New code should use
* {@link useFollowingList} (paginated per-profile) or
* {@link useFollowingFeed} (V5 feed).
*/
declare function useFollowing(opts?: {
source?: string;
cursor?: string;
limit?: number;
}, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/** Variables for {@link useFollow}. */
interface FollowVariables {
handle: string;
/** Server-resolved DID of the subject, when known. Used for optimistic cache writes. */
subjectDid?: string;
/** Optional Sifa-only "why I followed" note (max 200 graphemes). */
note?: string;
}
/** Variables for {@link useUnfollow}. */
interface UnfollowVariables {
handle: string;
}
/**
* Mutation hook for following a handle. Optimistically marks the
* follow-state cache as `true` and rolls back on failure (per
* sifa-api#673 TR8 / iter-1 plan TR8). Invalidates the followers /
* following lists and the V5 feed on success so they refetch.
*
* Optimistic cache entry: `sifaQueryKeys.follow.followers(handle)`
* receives the viewer prepended to the list shape; the optimistic update
* is intentionally conservative — it only flips per-handle state and
* doesn't try to invent rich `FollowProfile` fields.
*/
declare function useFollow(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* Mutation hook for unfollowing a handle. Optimistic + rollback mirror
* of {@link useFollow}.
*/
declare function useUnfollow(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Infinite-query hook for `handle`'s followers list. */
declare function useFollowers(handle: string, opts?: Omit, options?: Omit, ReturnType, string | undefined>, 'queryKey' | 'queryFn' | 'initialPageParam' | 'getNextPageParam'>): _tanstack_react_query.UseInfiniteQueryResult, Error>;
/** Infinite-query hook for who `handle` follows. */
declare function useFollowingList(handle: string, opts?: Omit, options?: Omit, ReturnType, string | undefined>, 'queryKey' | 'queryFn' | 'initialPageParam' | 'getNextPageParam'>): _tanstack_react_query.UseInfiniteQueryResult, Error>;
/**
* Infinite-query hook for the V5 home feed (authenticated viewer).
*
* @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
* Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
* Stream are two distinct surfaces with different data paths (Barazo API
* for Timeline, live PDS reads + Valkey for Stream). This hook is no
* longer consumed. Scheduled for removal in next major bump.
*/
declare function useFollowingFeed(opts?: Omit, options?: Omit, ReturnType, string | undefined>, 'queryKey' | 'queryFn' | 'initialPageParam' | 'getNextPageParam'>): _tanstack_react_query.UseInfiniteQueryResult;
appId?: "sifa" | undefined;
} | {
id: string;
actor: {
did: string;
handle: string;
displayName?: string | undefined;
avatarUrl?: string | undefined;
};
indexedAt: string;
eventType: string;
source: "atmosphere";
appId: string;
payload: Record;
uri?: string | undefined;
cid?: string | undefined;
})[];
cursor: string | null;
}, unknown>, Error>;
/**
* Infinite-query hook for the mutuals list of `handleOrDid`. Backed by
* {@link getMutuals} (`GET /api/profile/{handleOrDid}/mutuals`). Disabled
* when `handleOrDid` is empty so component-mount with a lazy handle doesn't
* fire a wasted request.
*/
declare function useMutuals(handleOrDid: string, opts?: Omit, options?: Omit, ReturnType, string | undefined>, 'queryKey' | 'queryFn' | 'initialPageParam' | 'getNextPageParam'>): _tanstack_react_query.UseInfiniteQueryResult, Error>;
/**
* Infinite-query hook for the authenticated viewer's Bluesky-follow
* suggestions (people the viewer follows on Bluesky but not Sifa).
* Backed by {@link getBlueskySuggestions}.
*/
declare function useBlueskySuggestions(opts?: Omit, options?: Omit, ReturnType, string | undefined>, 'queryKey' | 'queryFn' | 'initialPageParam' | 'getNextPageParam'>): _tanstack_react_query.UseInfiniteQueryResult, Error>;
/**
* Read hook for the admin allowlist of a given feature flag. Admin-gated on
* the server; non-admins get an empty list (the fetcher swallows 403).
*/
declare function useFeatureAllowlist(flag: FeatureFlag, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/** Snapshot of the previous cache entry; returned from `onMutate` for rollback. */
interface AllowlistMutationContext {
previous: FeatureAllowlistResponse | undefined;
}
/** Variables for {@link useAddFeatureAllowlist}. */
interface AddFeatureAllowlistVariables {
did: string;
note?: string;
}
/**
* Mutation hook to add (or upsert) a DID on the given flag's allowlist.
* Optimistically prepends a synthesized entry to the cache so admin UIs feel
* instant; rolls back if the server reports failure.
*/
declare function useAddFeatureAllowlist(flag: FeatureFlag, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Variables for {@link useRemoveFeatureAllowlist}. */
interface RemoveFeatureAllowlistVariables {
did: string;
}
/**
* Mutation hook to remove a DID from the given flag's allowlist.
* Optimistically removes the row from the cache; rolls back if the server
* reports failure.
*/
declare function useRemoveFeatureAllowlist(flag: FeatureFlag, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* Read hook for the open counts of the three admin review queues. Shared by
* the admin nav pill and the review-queues page so both render one number
* from one request.
*
* Admin-gated on the server; non-admins get an error rather than zeroes.
*/
declare function useAdminReviewQueues(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
declare function useHeatmapData(handleOrDid: string | undefined | null, days: number, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
declare function useActivityTeaser(handleOrDid: string | undefined | null, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
declare function useActivityFeed(handleOrDid: string | undefined | null, opts?: Pick, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
interface UseMyGithubPullRequestsParams {
limit?: number;
offset?: number;
}
/**
* The authenticated viewer's own ingested merged PRs (newest first). Auth-scoped
* via the session cookie. Backs the sifa-web GitHub importer (issue #302).
*/
declare function useMyGithubPullRequests(params?: UseMyGithubPullRequestsParams, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/** Count of confirmed endorsements for a DID. Returns 0 on error. */
declare function useEndorsementCount(did: string | undefined | null, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult;
/**
* Count of items in the authenticated user's network stream digest.
* Returns 0 on error (including when the endpoint isn't yet shipped).
*/
declare function useNetworkStreamCount(did: string | undefined | null, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult;
/**
* Batch-look up reaction status for multiple URIs. Skips the network call
* when `uris` is empty.
*/
declare function useReactionStatus(uris: string[], options?: Omit | null, Error, Record | null, ReturnType>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult | null>, Error>;
/** Check whether the authenticated viewer has an account on the given app. */
declare function useAppAccountCheck(appId: string | undefined | null, options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/** Variables for {@link useCreateReaction}. */
interface CreateReactionVariables {
targetUri: string;
appId: string;
targetCid?: string;
}
type CreateReactionMutationResult = {
ok: true;
data: ReactionResult;
} | {
ok: false;
error: ReactionError;
};
/**
* React hook for creating a reaction. Returns the discriminated-union
* result so the caller can detect `scope_insufficient` and trigger an
* OAuth scope-upgrade flow.
*
* Invalidates the entire `sifaQueryKeys.reactions.all()` subtree on
* success (any cached `useReactionStatus` view that includes the new
* URI needs a refresh).
*/
declare function useCreateReaction(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult<{
ok: true;
data: ReactionResult;
} | {
ok: false;
error: ReactionError;
}, Error, CreateReactionVariables, unknown>;
/** Variables for {@link useDeleteReaction}. */
interface DeleteReactionVariables {
targetUri: string;
appId: string;
}
/** React hook for deleting a reaction. */
declare function useDeleteReaction(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** Public roadmap vote tallies. Returns `{}` data on error. */
declare function useRoadmapVotes(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/** Roadmap items the authenticated viewer has voted on. Returns `[]` data on error. */
declare function useMyRoadmapVotes(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* React hook for casting a roadmap vote. Variable: the item key.
*
* Returns the discriminated-union result so callers can detect
* `scope_insufficient` and trigger an OAuth scope-upgrade flow
* (see {@link castRoadmapVote}).
*/
declare function useCastRoadmapVote(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/** React hook for retracting a previously-cast roadmap vote. */
declare function useRetractRoadmapVote(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* Read which id.sifa.* collections the current grant cannot delete, so a
* delete-account UI can ask for the missing scope BEFORE the destructive step.
*
* Not cached: the whole point is to reflect the grant as it stands right now,
* and the grant changes underneath this hook when the user returns from the
* consent screen. A stale "no gaps" here is the failure this exists to prevent.
*/
declare function useWipePreview(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* React hook for resetting the authenticated user's Sifa profile.
* Variable: `deletePdsData` boolean.
*
* Invalidates the entire `sifaQueryKeys.all()` subtree on success
* (everything Sifa-related needs a refresh after a reset).
*/
declare function useResetProfile(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* React hook for deleting the authenticated user's account. Variable:
* `deletePdsData` boolean. Returns the deleted handle on success.
*
* On success, clears the entire query cache (the user is logged out
* and nothing they previously cached should be retained).
*/
declare function useDeleteAccount(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* Read the id.sifa.* records in the authenticated user's repo.
*
* Not cached client-side: this is a page about what exists right now, and a
* user who deletes a record, navigates away and comes back must not be shown
* it again from cache. The server caches the PDS read briefly, which is where
* that cost belongs.
*/
declare function useRepoInventory(options?: Omit>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult, Error>;
/**
* Delete records from the authenticated user's repo.
*
* Invalidates the whole Sifa key subtree, not just the inventory: the records
* being removed are the ones the profile is built from, so anything showing
* profile content is stale the moment this succeeds.
*/
declare function useDeleteRepoRecords(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult;
/**
* Read the server-computed org rendering-floor verdict for a handle or DID.
*
* The verdict rides the profile resolve (`GET /api/profile/:handleOrDid`), so
* this hook reuses the `profile.byHandle` query key -- it shares the cache with
* {@link useProfile} and never triggers a second round-trip. Returns
* `OrgFloorVerdict | null` (`null` when the profile is missing or predates the
* `org` field).
*/
declare function useOrgProfile(handleOrDid: string | undefined | null, options?: Omit>, 'queryKey' | 'queryFn' | 'select'>): _tanstack_react_query.UseQueryResult, Error>;
type OrgClaimMutationResult = WriteResult & Partial;
/**
* Finalize an org profile claim (`POST /api/org/claim`). Pass the org's
* handle/DID so the profile cache (which carries the org floor verdict) is
* invalidated on success; pass `null` to skip invalidation.
*/
declare function useOrgClaim(handleOrDid: string | null, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult, Error, {
name: string;
entityRefs: string[];
authorityAck: true;
description?: string | undefined;
website?: string | undefined;
contact?: string | undefined;
personalProfileVisible?: boolean | undefined;
}, unknown>;
type OrgProfileUpdateMutationResult = WriteResult & Partial;
/**
* Edit the org record (`PUT /api/org/profile`). Pass the org's handle/DID to
* invalidate the profile cache (org floor verdict + fields) on success.
*/
declare function useUpdateOrgProfile(handleOrDid: string | null, options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult, Error, {
name: string;
entityRefs: string[];
description?: string | undefined;
website?: string | undefined;
contact?: string | undefined;
logo?: {
$type: "blob";
ref: {
$link: string;
};
mimeType: string;
size: number;
} | undefined;
personalProfileVisible?: boolean | undefined;
}, unknown>;
type OrgDomainChallengeMutationResult = WriteResult & Partial;
type OrgDomainVerifyMutationResult = WriteResult & Partial;
/**
* Issue a one-time DNS TXT domain challenge (`POST /api/org/domains/challenge`).
* The result carries the TXT record name + value for the org to publish.
*/
declare function useOrgDomainChallenge(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult, Error, {
domain: string;
}, unknown>;
/**
* Verify a DNS TXT domain challenge (`POST /api/org/domains/verify`). On success
* `status` is `verified` or `pending`; other outcomes surface as
* `{ success: false }`.
*/
declare function useOrgDomainVerify(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult, Error, {
token: string;
}, unknown>;
type OrgNotificationEmailAddMutationResult = WriteResult & Partial;
type OrgNotificationEmailRemoveMutationResult = WriteResult & Partial;
/**
* Add an org notification email (`POST /api/org/notification-emails`). The
* address must use a domain the org controls (checked server-side). Sending is
* gated behind the dormant email pipeline until activated.
*/
declare function useAddOrgNotificationEmail(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult, Error, {
email: string;
}, unknown>;
/**
* Remove an org notification email (`DELETE /api/org/notification-emails`).
*/
declare function useRemoveOrgNotificationEmail(options?: Omit, 'mutationFn'>): _tanstack_react_query.UseMutationResult