@singi-labs/sifa-sdk 0.6.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { P as Profile } from '../index-IDRpze8y.js';
3
+ import { f as Profile } from '../index-CpM21_Oy.js';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
- import { UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
5
+ import { UseQueryOptions, UseMutationOptions } from '@tanstack/react-query';
6
6
 
7
7
  /**
8
8
  * Foundation HTTP client for talking to the Sifa AppView.
@@ -100,6 +100,12 @@ declare function useSifaConfig(): SifaApiConfig;
100
100
  * Server-callable (Next.js RSC) and client-callable (Expo, browser).
101
101
  */
102
102
  declare function fetchProfile(config: SifaApiConfig, handleOrDid: string, options?: ApiFetchOptions): Promise<Profile | null>;
103
+ /**
104
+ * Public AT Fund link for a profile, if one is configured. Returns `null`
105
+ * on any error or when the response payload's `url` field is missing or
106
+ * non-string.
107
+ */
108
+ declare function fetchAtFundLink(config: SifaApiConfig, did: string, options?: ApiFetchOptions): Promise<string | null>;
103
109
 
104
110
  /** Result returned by record-write mutations (create / update / delete). */
105
111
  interface WriteResult {
@@ -122,15 +128,397 @@ interface CreateResult extends WriteResult {
122
128
  */
123
129
  declare function createPosition(config: SifaApiConfig, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<CreateResult>;
124
130
 
131
+ /** Public, aggregate stats shown on the homepage and similar surfaces. */
132
+ interface StatsResponse {
133
+ profileCount: number;
134
+ avatars: string[];
135
+ atproto: {
136
+ userCount: number;
137
+ growthPerSecond: number;
138
+ timestamp: number;
139
+ } | null;
140
+ }
125
141
  /**
126
- * React hook for creating a new position record. On success, invalidates
127
- * the owner's profile cache so the new position is reflected on the next
128
- * read.
142
+ * Homepage stats (profile count, avatar samples, ATproto growth). Public
143
+ * endpoint -- safe to cache. Returns `null` on any error so callers can
144
+ * render a graceful empty state.
145
+ */
146
+ declare function fetchStats(config: SifaApiConfig, options?: ApiFetchOptions): Promise<StatsResponse | null>;
147
+
148
+ /** Catalog entry describing an ATproto app that Sifa surfaces activity for. */
149
+ interface AppRegistryEntry {
150
+ id: string;
151
+ name: string;
152
+ category: string;
153
+ collectionPrefixes: string[];
154
+ scanCollections: string[];
155
+ urlPattern?: string;
156
+ color: string;
157
+ }
158
+ /** Compact app representation returned by the hidden-apps endpoint. */
159
+ interface HiddenApp {
160
+ id: string;
161
+ name: string;
162
+ category: string;
163
+ }
164
+ interface FetchHiddenAppsOptions extends ApiFetchOptions {
165
+ /**
166
+ * Pass the caller's `Cookie` header on Next.js RSC server-side calls.
167
+ * `credentials: 'include'` does NOT propagate browser cookies in RSC,
168
+ * so authenticated server fetches must forward the header explicitly.
169
+ */
170
+ cookieHeader?: string;
171
+ }
172
+ /**
173
+ * Public app registry shown across discovery surfaces. Heavily cached.
174
+ * Returns `[]` on any error.
175
+ */
176
+ declare function fetchAppsRegistry(config: SifaApiConfig, options?: ApiFetchOptions): Promise<AppRegistryEntry[]>;
177
+ /**
178
+ * Apps the authenticated user has chosen to hide from their activity feed.
179
+ * Requires an authenticated session. Returns `[]` on any error (including
180
+ * the unauthenticated case).
181
+ */
182
+ declare function fetchHiddenApps(config: SifaApiConfig, options?: FetchHiddenAppsOptions): Promise<HiddenApp[]>;
183
+
184
+ /** Profile entry returned by the search endpoint. */
185
+ interface ProfileSearchResult {
186
+ did?: string;
187
+ handle: string;
188
+ displayName?: string;
189
+ headline?: string;
190
+ avatar?: string;
191
+ about?: string;
192
+ currentRole?: string;
193
+ currentCompany?: string;
194
+ industry?: string;
195
+ domain?: string;
196
+ countryCode?: string;
197
+ locationCountry?: string;
198
+ preferredWorkplace?: string[];
199
+ claimed?: boolean;
200
+ blueskyVerified?: boolean;
201
+ blueskyVerifiedAt?: string | null;
202
+ }
203
+ interface SearchFilters {
204
+ q?: string;
205
+ skill?: string;
206
+ country?: string;
207
+ industry?: string;
208
+ domain?: string;
209
+ workplace?: string;
210
+ app?: string;
211
+ limit?: number;
212
+ }
213
+ interface SearchResponse {
214
+ profiles: ProfileSearchResult[];
215
+ total: number;
216
+ limit: number;
217
+ offset: number;
218
+ }
219
+ /** Skill typeahead suggestion. */
220
+ interface SkillSearchResult {
221
+ name: string;
222
+ slug: string;
223
+ category: string;
224
+ userCount: number;
225
+ }
226
+ interface FilterOptions {
227
+ countries: {
228
+ countryCode: string;
229
+ country: string;
230
+ count: number;
231
+ }[];
232
+ industries: {
233
+ industry: string;
234
+ count: number;
235
+ }[];
236
+ apps: {
237
+ appId: string;
238
+ count: number;
239
+ }[];
240
+ }
241
+ /**
242
+ * Search profiles by free-text query and optional filters. Returns an
243
+ * empty result set when no filters are provided (matching sifa-web's
244
+ * "no input, no fetch" behavior).
245
+ */
246
+ declare function fetchSearchProfiles(config: SifaApiConfig, filters: SearchFilters, options?: ApiFetchOptions): Promise<SearchResponse>;
247
+ /**
248
+ * Skill typeahead. Returns up to 8 matches for the given prefix. Empty
249
+ * input returns an empty array without hitting the server.
250
+ */
251
+ declare function fetchSkillSuggestions(config: SifaApiConfig, query: string, options?: ApiFetchOptions): Promise<SkillSearchResult[]>;
252
+ /** Available filter facets (countries, industries, apps) for search UI. */
253
+ declare function fetchSearchFilters(config: SifaApiConfig, options?: ApiFetchOptions): Promise<FilterOptions>;
254
+
255
+ /** Lightweight profile representation used by discovery endpoints. */
256
+ interface SimilarProfile {
257
+ did: string;
258
+ handle: string;
259
+ displayName?: string | null;
260
+ avatar?: string | null;
261
+ headline?: string | null;
262
+ currentRole?: string | null;
263
+ currentCompany?: string | null;
264
+ industry?: string | null;
265
+ domain?: string | null;
266
+ }
267
+ interface SuggestionProfile {
268
+ did: string;
269
+ handle: string;
270
+ displayName?: string;
271
+ headline?: string;
272
+ avatarUrl?: string;
273
+ source: string;
274
+ dismissed: boolean;
275
+ blueskyVerified?: boolean;
276
+ }
277
+ interface SuggestionsResponse {
278
+ onSifa: SuggestionProfile[];
279
+ notOnSifa: SuggestionProfile[];
280
+ cursor?: string;
281
+ }
282
+ interface FeaturedProfile {
283
+ did: string;
284
+ handle: string;
285
+ displayName?: string;
286
+ avatar?: string;
287
+ pronouns?: string;
288
+ headline?: string;
289
+ about?: string;
290
+ currentRole?: string;
291
+ currentCompany?: string;
292
+ locationCountry?: string;
293
+ locationRegion?: string;
294
+ /** Legacy alias for `locationLocality`; emitted by sifa-api during the additive response window. */
295
+ locationCity?: string;
296
+ /** community.lexicon.location.address field name -- prefer over `locationCity`. */
297
+ locationLocality?: string;
298
+ countryCode?: string;
299
+ location?: string;
300
+ website?: string;
301
+ openTo?: string[];
302
+ preferredWorkplace?: string[];
303
+ availableFromUtc?: number;
304
+ availableToUtc?: number;
305
+ followersCount?: number;
306
+ atprotoFollowersCount?: number;
307
+ pdsProvider?: {
308
+ name: string;
309
+ host: string;
310
+ } | null;
311
+ claimed: boolean;
312
+ featuredDate: string;
313
+ }
314
+ /** Profiles similar to the given DID (matchmaking). Returns `[]` on error. */
315
+ declare function fetchSimilarProfiles(config: SifaApiConfig, did: string, opts?: {
316
+ limit?: number;
317
+ } & ApiFetchOptions): Promise<SimilarProfile[]>;
318
+ interface FetchSuggestionsOptions extends ApiFetchOptions {
319
+ source?: string;
320
+ includeDismissed?: boolean;
321
+ cursor?: string;
322
+ limit?: number;
323
+ /**
324
+ * Pass the caller's `Cookie` header on Next.js RSC server-side calls.
325
+ * `credentials: 'include'` does NOT propagate browser cookies in RSC,
326
+ * so authenticated server fetches must forward the header explicitly.
327
+ */
328
+ cookieHeader?: string;
329
+ }
330
+ /** Discovery suggestions feed. Resolves to empty arrays on error. */
331
+ declare function fetchSuggestions(config: SifaApiConfig, opts?: FetchSuggestionsOptions): Promise<SuggestionsResponse>;
332
+ /** Count of pending suggestions since an optional timestamp. */
333
+ declare function fetchSuggestionCount(config: SifaApiConfig, since?: string, options?: ApiFetchOptions): Promise<number>;
334
+ /** Featured profile (rotated by sifa-api). Returns `null` when none. */
335
+ declare function fetchFeaturedProfile(config: SifaApiConfig, options?: ApiFetchOptions): Promise<FeaturedProfile | null>;
336
+
337
+ interface FollowProfile {
338
+ did: string;
339
+ handle: string;
340
+ displayName?: string;
341
+ headline?: string;
342
+ avatarUrl?: string;
343
+ source: string;
344
+ claimed: boolean;
345
+ followedAt: string;
346
+ blueskyVerified?: boolean;
347
+ blueskyVerifiedAt?: string | null;
348
+ }
349
+ interface FollowingResponse {
350
+ follows: FollowProfile[];
351
+ cursor?: string;
352
+ }
353
+ /** People the authenticated user follows. Empty on error. */
354
+ declare function fetchFollowing(config: SifaApiConfig, opts?: {
355
+ source?: string;
356
+ cursor?: string;
357
+ limit?: number;
358
+ } & ApiFetchOptions): Promise<FollowingResponse>;
359
+
360
+ interface HeatmapDay {
361
+ date: string;
362
+ total: number;
363
+ apps: {
364
+ appId: string;
365
+ count: number;
366
+ }[];
367
+ }
368
+ interface HeatmapResponse {
369
+ days: HeatmapDay[];
370
+ appTotals: {
371
+ appId: string;
372
+ appName: string;
373
+ total: number;
374
+ }[];
375
+ thresholds: [number, number, number, number];
376
+ }
377
+ interface ActivityItem {
378
+ uri: string;
379
+ cid: string;
380
+ collection: string;
381
+ rkey: string;
382
+ record: Record<string, unknown>;
383
+ appId: string;
384
+ appName: string;
385
+ category: string;
386
+ indexedAt: string;
387
+ }
388
+ interface ActivityTeaserResponse {
389
+ items: ActivityItem[];
390
+ blueskyGated?: boolean;
391
+ backfillPending?: boolean;
392
+ failedApps?: string[];
393
+ }
394
+ interface ActivityFeedResponse {
395
+ items: ActivityItem[];
396
+ cursor: string | null;
397
+ hasMore: boolean;
398
+ availableCategories?: string[];
399
+ blueskyGated?: boolean;
400
+ failedApps?: string[];
401
+ }
402
+ /**
403
+ * Per-day activity counts for a profile across all ATproto apps. Returns
404
+ * `null` on any error so callers can render a graceful empty state.
405
+ */
406
+ declare function fetchHeatmapData(config: SifaApiConfig, handleOrDid: string, days: number, options?: ApiFetchOptions): Promise<HeatmapResponse | null>;
407
+ interface FetchActivityTeaserOptions extends ApiFetchOptions {
408
+ /**
409
+ * Pass the caller's `Cookie` header on Next.js RSC server-side calls.
410
+ * Required for authenticated server fetches because `credentials: 'include'`
411
+ * does not propagate browser cookies in RSC.
412
+ */
413
+ cookieHeader?: string;
414
+ }
415
+ /**
416
+ * Recent activity teaser for a profile (homepage-sized slice). Caps the
417
+ * upstream wait so the SSR path cannot hang. Returns `null` on any error.
418
+ */
419
+ declare function fetchActivityTeaser(config: SifaApiConfig, handleOrDid: string, options?: FetchActivityTeaserOptions): Promise<ActivityTeaserResponse | null>;
420
+ interface FetchActivityFeedOptions extends ApiFetchOptions {
421
+ category?: string;
422
+ limit?: number;
423
+ cursor?: string;
424
+ cookieHeader?: string;
425
+ }
426
+ /**
427
+ * Paginated activity feed for a profile. Always fresh (`cache: 'no-store'`).
428
+ * Returns `null` on any error.
429
+ */
430
+ declare function fetchActivityFeed(config: SifaApiConfig, handleOrDid: string, options?: FetchActivityFeedOptions): Promise<ActivityFeedResponse | null>;
431
+
432
+ /**
433
+ * Counts confirmed endorsements received by a DID. The backend's
434
+ * `GET /api/endorsement/:did` already returns only confirmed endorsements
435
+ * (via inner join with `endorsementConfirmations`), so this helper just
436
+ * returns the array length. Failures return 0 so callers can route safely.
129
437
  *
130
- * The owner DID is required so the mutation can target the correct
131
- * profile cache entry for invalidation.
438
+ * Public endpoint -- no credentials needed.
132
439
  */
133
- declare function useCreatePosition(ownerDid: string, options?: Omit<UseMutationOptions<CreateResult, Error, Record<string, unknown>>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CreateResult, Error, Record<string, unknown>, unknown>;
440
+ declare function fetchEndorsementCount(config: SifaApiConfig, did: string, options?: ApiFetchOptions): Promise<number>;
441
+
442
+ interface FetchNetworkStreamCountOptions extends ApiFetchOptions {
443
+ /**
444
+ * Pass the caller's `Cookie` header on Next.js RSC server-side calls.
445
+ * Required for authenticated server fetches because `credentials: 'include'`
446
+ * does not propagate browser cookies in RSC.
447
+ *
448
+ * When omitted, the request falls back to `credentials: 'include'` so
449
+ * client-side calls work without extra plumbing.
450
+ */
451
+ cookieHeader?: string;
452
+ }
453
+ /**
454
+ * Counts items in the authenticated user's network stream digest. The
455
+ * underlying `GET /api/stream/network` endpoint may 404 while the feature
456
+ * is in development; in that case (and on any other error) this returns
457
+ * 0 so callers can route safely to a fallback experience.
458
+ */
459
+ declare function fetchNetworkStreamCount(config: SifaApiConfig, did: string, options?: FetchNetworkStreamCountOptions): Promise<number>;
460
+
461
+ /** Per-URI reaction state for the authenticated viewer. */
462
+ interface ReactionStatus {
463
+ reacted: boolean;
464
+ rkey?: string;
465
+ collection?: string;
466
+ }
467
+ /** Result of checking whether the authenticated viewer has an account on a given app. */
468
+ interface AccountCheckResult {
469
+ hasAccount: boolean;
470
+ appName: string;
471
+ appUrl: string;
472
+ }
473
+ interface FetchReactionStatusOptions extends ApiFetchOptions {
474
+ /**
475
+ * Pass the caller's `Cookie` header on Next.js RSC server-side calls.
476
+ * Required for authenticated server fetches because `credentials: 'include'`
477
+ * does not propagate browser cookies in RSC.
478
+ */
479
+ cookieHeader?: string;
480
+ }
481
+ /**
482
+ * Batch-look up reaction status for multiple URIs. Returns `{}` for an
483
+ * empty input list (no network call) and `null` on any error.
484
+ */
485
+ declare function fetchReactionStatus(config: SifaApiConfig, uris: string[], options?: FetchReactionStatusOptions): Promise<Record<string, ReactionStatus> | null>;
486
+ interface CheckAppAccountOptions extends ApiFetchOptions {
487
+ cookieHeader?: string;
488
+ }
489
+ /**
490
+ * Check whether the authenticated viewer has an account on a given app.
491
+ * Returns `null` on any error.
492
+ */
493
+ declare function checkAppAccount(config: SifaApiConfig, appId: string, options?: CheckAppAccountOptions): Promise<AccountCheckResult | null>;
494
+
495
+ /** Voter on a roadmap item. */
496
+ interface RoadmapVoter {
497
+ did: string;
498
+ avatarUrl?: string;
499
+ }
500
+ /** Map of item key -> vote tally and voter list. */
501
+ type RoadmapVotesResponse = Record<string, {
502
+ count: number;
503
+ voters: RoadmapVoter[];
504
+ }>;
505
+ /**
506
+ * Public roadmap vote tallies, keyed by item. Returns `{}` on any error.
507
+ */
508
+ declare function fetchRoadmapVotes(config: SifaApiConfig, options?: ApiFetchOptions): Promise<RoadmapVotesResponse>;
509
+ interface FetchMyRoadmapVotesOptions extends ApiFetchOptions {
510
+ /**
511
+ * Pass the caller's `Cookie` header on Next.js RSC server-side calls.
512
+ * Required for authenticated server fetches because `credentials: 'include'`
513
+ * does not propagate browser cookies in RSC.
514
+ */
515
+ cookieHeader?: string;
516
+ }
517
+ /**
518
+ * Roadmap items the authenticated user has voted on. Returns `[]` on any
519
+ * error or when the response payload is shaped unexpectedly.
520
+ */
521
+ declare function fetchMyRoadmapVotes(config: SifaApiConfig, options?: FetchMyRoadmapVotesOptions): Promise<string[]>;
134
522
 
135
523
  /**
136
524
  * Query key factory for TanStack Query.
@@ -148,13 +536,64 @@ declare const sifaQueryKeys: {
148
536
  readonly profile: {
149
537
  readonly all: () => readonly ["sifa", "profile"];
150
538
  readonly byHandle: (handleOrDid: string) => readonly ["sifa", "profile", string];
539
+ readonly atFundLink: (did: string) => readonly ["sifa", "profile", "at-fund-link", string];
151
540
  };
152
541
  readonly position: {
153
542
  readonly all: () => readonly ["sifa", "position"];
154
543
  readonly byOwner: (did: string) => readonly ["sifa", "position", "by-owner", string];
155
544
  };
545
+ readonly search: {
546
+ readonly all: () => readonly ["sifa", "search"];
547
+ readonly profiles: (filters: Record<string, unknown>) => readonly ["sifa", "search", "profiles", Record<string, unknown>];
548
+ readonly skills: (query: string) => readonly ["sifa", "search", "skills", string];
549
+ readonly filters: () => readonly ["sifa", "search", "filters"];
550
+ };
551
+ readonly discovery: {
552
+ readonly all: () => readonly ["sifa", "discovery"];
553
+ readonly similar: (did: string, limit: number) => readonly ["sifa", "discovery", "similar", string, number];
554
+ readonly suggestions: (opts: Record<string, unknown>) => readonly ["sifa", "discovery", "suggestions", Record<string, unknown>];
555
+ readonly suggestionCount: (since: string | undefined) => readonly ["sifa", "discovery", "suggestion-count", string | null];
556
+ readonly featured: () => readonly ["sifa", "discovery", "featured"];
557
+ };
558
+ readonly follow: {
559
+ readonly all: () => readonly ["sifa", "follow"];
560
+ readonly following: (opts: Record<string, unknown>) => readonly ["sifa", "follow", "following", Record<string, unknown>];
561
+ };
562
+ readonly stats: {
563
+ readonly all: () => readonly ["sifa", "stats"];
564
+ readonly homepage: () => readonly ["sifa", "stats", "homepage"];
565
+ };
566
+ readonly apps: {
567
+ readonly all: () => readonly ["sifa", "apps"];
568
+ readonly registry: () => readonly ["sifa", "apps", "registry"];
569
+ readonly hidden: () => readonly ["sifa", "apps", "hidden"];
570
+ };
571
+ readonly activity: {
572
+ readonly all: () => readonly ["sifa", "activity"];
573
+ readonly heatmap: (handleOrDid: string, days: number) => readonly ["sifa", "activity", "heatmap", string, number];
574
+ readonly teaser: (handleOrDid: string) => readonly ["sifa", "activity", "teaser", string];
575
+ readonly feed: (handleOrDid: string, opts: Record<string, unknown>) => readonly ["sifa", "activity", "feed", string, Record<string, unknown>];
576
+ };
577
+ readonly endorsement: {
578
+ readonly all: () => readonly ["sifa", "endorsement"];
579
+ readonly count: (did: string) => readonly ["sifa", "endorsement", "count", string];
580
+ };
581
+ readonly stream: {
582
+ readonly all: () => readonly ["sifa", "stream"];
583
+ readonly networkCount: (did: string) => readonly ["sifa", "stream", "network-count", string];
584
+ };
585
+ readonly reactions: {
586
+ readonly all: () => readonly ["sifa", "reactions"];
587
+ readonly status: (uris: string[]) => readonly ["sifa", "reactions", "status", string[]];
588
+ readonly accountCheck: (appId: string) => readonly ["sifa", "reactions", "account-check", string];
589
+ };
590
+ readonly roadmap: {
591
+ readonly all: () => readonly ["sifa", "roadmap"];
592
+ readonly votes: () => readonly ["sifa", "roadmap", "votes"];
593
+ readonly myVotes: () => readonly ["sifa", "roadmap", "my-votes"];
594
+ };
156
595
  };
157
- type SifaQueryKey = ReturnType<typeof sifaQueryKeys.all> | ReturnType<typeof sifaQueryKeys.profile.all> | ReturnType<typeof sifaQueryKeys.profile.byHandle> | ReturnType<typeof sifaQueryKeys.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner>;
596
+ type SifaQueryKey = ReturnType<typeof sifaQueryKeys.all> | ReturnType<typeof sifaQueryKeys.profile.all> | ReturnType<typeof sifaQueryKeys.profile.byHandle> | ReturnType<typeof sifaQueryKeys.profile.atFundLink> | ReturnType<typeof sifaQueryKeys.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | ReturnType<typeof sifaQueryKeys.search.all> | ReturnType<typeof sifaQueryKeys.search.profiles> | ReturnType<typeof sifaQueryKeys.search.skills> | ReturnType<typeof sifaQueryKeys.search.filters> | ReturnType<typeof sifaQueryKeys.discovery.all> | ReturnType<typeof sifaQueryKeys.discovery.similar> | ReturnType<typeof sifaQueryKeys.discovery.suggestions> | ReturnType<typeof sifaQueryKeys.discovery.suggestionCount> | ReturnType<typeof sifaQueryKeys.discovery.featured> | ReturnType<typeof sifaQueryKeys.follow.all> | ReturnType<typeof sifaQueryKeys.follow.following> | ReturnType<typeof sifaQueryKeys.stats.all> | ReturnType<typeof sifaQueryKeys.stats.homepage> | ReturnType<typeof sifaQueryKeys.apps.all> | ReturnType<typeof sifaQueryKeys.apps.registry> | ReturnType<typeof sifaQueryKeys.apps.hidden> | ReturnType<typeof sifaQueryKeys.activity.all> | ReturnType<typeof sifaQueryKeys.activity.heatmap> | ReturnType<typeof sifaQueryKeys.activity.teaser> | ReturnType<typeof sifaQueryKeys.activity.feed> | ReturnType<typeof sifaQueryKeys.endorsement.all> | ReturnType<typeof sifaQueryKeys.endorsement.count> | ReturnType<typeof sifaQueryKeys.stream.all> | ReturnType<typeof sifaQueryKeys.stream.networkCount> | ReturnType<typeof sifaQueryKeys.reactions.all> | ReturnType<typeof sifaQueryKeys.reactions.status> | ReturnType<typeof sifaQueryKeys.reactions.accountCheck> | ReturnType<typeof sifaQueryKeys.roadmap.all> | ReturnType<typeof sifaQueryKeys.roadmap.votes> | ReturnType<typeof sifaQueryKeys.roadmap.myVotes>;
158
597
 
159
598
  /**
160
599
  * React hook that reads an aggregated profile by handle or DID via
@@ -164,5 +603,76 @@ type SifaQueryKey = ReturnType<typeof sifaQueryKeys.all> | ReturnType<typeof sif
164
603
  * fetch.
165
604
  */
166
605
  declare function useProfile(handleOrDid: string | undefined | null, options?: Omit<UseQueryOptions<Profile | null, Error, Profile | null, ReturnType<typeof sifaQueryKeys.profile.byHandle>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<Profile | null, Error>;
606
+ /**
607
+ * React hook for a profile's AT Fund link. Returns `null` data on error
608
+ * or when the profile has no link configured.
609
+ */
610
+ declare function useAtFundLink(did: string | undefined | null, options?: Omit<UseQueryOptions<string | null, Error, string | null, ReturnType<typeof sifaQueryKeys.profile.atFundLink>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<string | null, Error>;
611
+
612
+ /**
613
+ * React hook for creating a new position record. On success, invalidates
614
+ * the owner's profile cache so the new position is reflected on the next
615
+ * read.
616
+ *
617
+ * The owner DID is required so the mutation can target the correct
618
+ * profile cache entry for invalidation.
619
+ */
620
+ declare function useCreatePosition(ownerDid: string, options?: Omit<UseMutationOptions<CreateResult, Error, Record<string, unknown>>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CreateResult, Error, Record<string, unknown>, unknown>;
621
+
622
+ /**
623
+ * React hook for the public homepage stats. Returns `null` data on error.
624
+ */
625
+ declare function useStats(options?: Omit<UseQueryOptions<StatsResponse | null, Error, StatsResponse | null, ReturnType<typeof sifaQueryKeys.stats.homepage>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<StatsResponse | null, Error>;
626
+
627
+ /** React hook for the public app registry. */
628
+ declare function useAppsRegistry(options?: Omit<UseQueryOptions<AppRegistryEntry[], Error, AppRegistryEntry[], ReturnType<typeof sifaQueryKeys.apps.registry>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<AppRegistryEntry[], Error>;
629
+ /**
630
+ * React hook for the authenticated user's hidden-apps list. Requires a
631
+ * client-side session (relies on `credentials: 'include'`).
632
+ */
633
+ declare function useHiddenApps(options?: Omit<UseQueryOptions<HiddenApp[], Error, HiddenApp[], ReturnType<typeof sifaQueryKeys.apps.hidden>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<HiddenApp[], Error>;
634
+
635
+ declare function useSearchProfiles(filters: SearchFilters, options?: Omit<UseQueryOptions<SearchResponse, Error, SearchResponse, ReturnType<typeof sifaQueryKeys.search.profiles>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<SearchResponse, Error>;
636
+ declare function useSkillSuggestions(query: string, options?: Omit<UseQueryOptions<SkillSearchResult[], Error, SkillSearchResult[], ReturnType<typeof sifaQueryKeys.search.skills>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<SkillSearchResult[], Error>;
637
+ declare function useSearchFilters(options?: Omit<UseQueryOptions<FilterOptions, Error, FilterOptions, ReturnType<typeof sifaQueryKeys.search.filters>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<FilterOptions, Error>;
638
+
639
+ declare function useSimilarProfiles(did: string | undefined | null, opts?: {
640
+ limit?: number;
641
+ }, options?: Omit<UseQueryOptions<SimilarProfile[], Error, SimilarProfile[], ReturnType<typeof sifaQueryKeys.discovery.similar>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<SimilarProfile[], Error>;
642
+ declare function useSuggestions(opts?: Omit<FetchSuggestionsOptions, keyof Omit<FetchSuggestionsOptions, 'source' | 'includeDismissed' | 'cursor' | 'limit'>>, options?: Omit<UseQueryOptions<SuggestionsResponse, Error, SuggestionsResponse, ReturnType<typeof sifaQueryKeys.discovery.suggestions>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<SuggestionsResponse, Error>;
643
+ declare function useSuggestionCount(since?: string, options?: Omit<UseQueryOptions<number, Error, number, ReturnType<typeof sifaQueryKeys.discovery.suggestionCount>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<number, Error>;
644
+ declare function useFeaturedProfile(options?: Omit<UseQueryOptions<FeaturedProfile | null, Error, FeaturedProfile | null, ReturnType<typeof sifaQueryKeys.discovery.featured>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<FeaturedProfile | null, Error>;
645
+
646
+ declare function useFollowing(opts?: {
647
+ source?: string;
648
+ cursor?: string;
649
+ limit?: number;
650
+ }, options?: Omit<UseQueryOptions<FollowingResponse, Error, FollowingResponse, ReturnType<typeof sifaQueryKeys.follow.following>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<FollowingResponse, Error>;
651
+
652
+ declare function useHeatmapData(handleOrDid: string | undefined | null, days: number, options?: Omit<UseQueryOptions<HeatmapResponse | null, Error, HeatmapResponse | null, ReturnType<typeof sifaQueryKeys.activity.heatmap>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<HeatmapResponse | null, Error>;
653
+ declare function useActivityTeaser(handleOrDid: string | undefined | null, options?: Omit<UseQueryOptions<ActivityTeaserResponse | null, Error, ActivityTeaserResponse | null, ReturnType<typeof sifaQueryKeys.activity.teaser>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<ActivityTeaserResponse | null, Error>;
654
+ declare function useActivityFeed(handleOrDid: string | undefined | null, opts?: Pick<FetchActivityFeedOptions, 'category' | 'limit' | 'cursor'>, options?: Omit<UseQueryOptions<ActivityFeedResponse | null, Error, ActivityFeedResponse | null, ReturnType<typeof sifaQueryKeys.activity.feed>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<ActivityFeedResponse | null, Error>;
655
+
656
+ /** Count of confirmed endorsements for a DID. Returns 0 on error. */
657
+ declare function useEndorsementCount(did: string | undefined | null, options?: Omit<UseQueryOptions<number, Error, number, ReturnType<typeof sifaQueryKeys.endorsement.count>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<number, Error>;
658
+
659
+ /**
660
+ * Count of items in the authenticated user's network stream digest.
661
+ * Returns 0 on error (including when the endpoint isn't yet shipped).
662
+ */
663
+ declare function useNetworkStreamCount(did: string | undefined | null, options?: Omit<UseQueryOptions<number, Error, number, ReturnType<typeof sifaQueryKeys.stream.networkCount>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<number, Error>;
664
+
665
+ /**
666
+ * Batch-look up reaction status for multiple URIs. Skips the network call
667
+ * when `uris` is empty.
668
+ */
669
+ declare function useReactionStatus(uris: string[], options?: Omit<UseQueryOptions<Record<string, ReactionStatus> | null, Error, Record<string, ReactionStatus> | null, ReturnType<typeof sifaQueryKeys.reactions.status>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<Record<string, ReactionStatus> | null, Error>;
670
+ /** Check whether the authenticated viewer has an account on the given app. */
671
+ declare function useAppAccountCheck(appId: string | undefined | null, options?: Omit<UseQueryOptions<AccountCheckResult | null, Error, AccountCheckResult | null, ReturnType<typeof sifaQueryKeys.reactions.accountCheck>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<AccountCheckResult | null, Error>;
672
+
673
+ /** Public roadmap vote tallies. Returns `{}` data on error. */
674
+ declare function useRoadmapVotes(options?: Omit<UseQueryOptions<RoadmapVotesResponse, Error, RoadmapVotesResponse, ReturnType<typeof sifaQueryKeys.roadmap.votes>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<RoadmapVotesResponse, Error>;
675
+ /** Roadmap items the authenticated viewer has voted on. Returns `[]` data on error. */
676
+ declare function useMyRoadmapVotes(options?: Omit<UseQueryOptions<string[], Error, string[], ReturnType<typeof sifaQueryKeys.roadmap.myVotes>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<string[], Error>;
167
677
 
168
- export { ApiError, type ApiFetchOptions, type CreateResult, type SifaApiConfig, SifaProvider, type SifaProviderProps, type SifaQueryKey, type WriteResult, apiFetch, apiFetchOrNull, createPosition, fetchProfile, sifaQueryKeys, useCreatePosition, useProfile, useSifaConfig };
678
+ export { type AccountCheckResult, type ActivityFeedResponse, type ActivityItem, type ActivityTeaserResponse, ApiError, type ApiFetchOptions, type AppRegistryEntry, type CheckAppAccountOptions, type CreateResult, type FeaturedProfile, type FetchActivityFeedOptions, type FetchActivityTeaserOptions, type FetchHiddenAppsOptions, type FetchMyRoadmapVotesOptions, type FetchNetworkStreamCountOptions, type FetchReactionStatusOptions, type FetchSuggestionsOptions, type FilterOptions, type FollowProfile, type FollowingResponse, type HeatmapDay, type HeatmapResponse, type HiddenApp, type ProfileSearchResult, type ReactionStatus, type RoadmapVoter, type RoadmapVotesResponse, type SearchFilters, type SearchResponse, type SifaApiConfig, SifaProvider, type SifaProviderProps, type SifaQueryKey, type SimilarProfile, type SkillSearchResult, type StatsResponse, type SuggestionProfile, type SuggestionsResponse, type WriteResult, apiFetch, apiFetchOrNull, checkAppAccount, createPosition, fetchActivityFeed, fetchActivityTeaser, fetchAppsRegistry, fetchAtFundLink, fetchEndorsementCount, fetchFeaturedProfile, fetchFollowing, fetchHeatmapData, fetchHiddenApps, fetchMyRoadmapVotes, fetchNetworkStreamCount, fetchProfile, fetchReactionStatus, fetchRoadmapVotes, fetchSearchFilters, fetchSearchProfiles, fetchSimilarProfiles, fetchSkillSuggestions, fetchStats, fetchSuggestionCount, fetchSuggestions, sifaQueryKeys, useActivityFeed, useActivityTeaser, useAppAccountCheck, useAppsRegistry, useAtFundLink, useCreatePosition, useEndorsementCount, useFeaturedProfile, useFollowing, useHeatmapData, useHiddenApps, useMyRoadmapVotes, useNetworkStreamCount, useProfile, useReactionStatus, useRoadmapVotes, useSearchFilters, useSearchProfiles, useSifaConfig, useSimilarProfiles, useSkillSuggestions, useStats, useSuggestionCount, useSuggestions };