@singi-labs/sifa-sdk 0.7.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.
- package/dist/{index-IDRpze8y.d.cts → index-CpM21_Oy.d.cts} +1 -1
- package/dist/{index-IDRpze8y.d.ts → index-CpM21_Oy.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/query/index.cjs +386 -1
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +303 -3
- package/dist/query/index.d.ts +303 -3
- package/dist/query/index.js +361 -2
- package/dist/query/index.js.map +1 -1
- package/package.json +1 -1
package/dist/query/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { f as Profile } from '../index-CpM21_Oy.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions } from '@tanstack/react-query';
|
|
6
6
|
|
|
@@ -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,6 +128,59 @@ 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
|
+
}
|
|
141
|
+
/**
|
|
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
|
+
|
|
125
184
|
/** Profile entry returned by the search endpoint. */
|
|
126
185
|
interface ProfileSearchResult {
|
|
127
186
|
did?: string;
|
|
@@ -298,6 +357,169 @@ declare function fetchFollowing(config: SifaApiConfig, opts?: {
|
|
|
298
357
|
limit?: number;
|
|
299
358
|
} & ApiFetchOptions): Promise<FollowingResponse>;
|
|
300
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.
|
|
437
|
+
*
|
|
438
|
+
* Public endpoint -- no credentials needed.
|
|
439
|
+
*/
|
|
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[]>;
|
|
522
|
+
|
|
301
523
|
/**
|
|
302
524
|
* Query key factory for TanStack Query.
|
|
303
525
|
*
|
|
@@ -314,6 +536,7 @@ declare const sifaQueryKeys: {
|
|
|
314
536
|
readonly profile: {
|
|
315
537
|
readonly all: () => readonly ["sifa", "profile"];
|
|
316
538
|
readonly byHandle: (handleOrDid: string) => readonly ["sifa", "profile", string];
|
|
539
|
+
readonly atFundLink: (did: string) => readonly ["sifa", "profile", "at-fund-link", string];
|
|
317
540
|
};
|
|
318
541
|
readonly position: {
|
|
319
542
|
readonly all: () => readonly ["sifa", "position"];
|
|
@@ -336,8 +559,41 @@ declare const sifaQueryKeys: {
|
|
|
336
559
|
readonly all: () => readonly ["sifa", "follow"];
|
|
337
560
|
readonly following: (opts: Record<string, unknown>) => readonly ["sifa", "follow", "following", Record<string, unknown>];
|
|
338
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
|
+
};
|
|
339
595
|
};
|
|
340
|
-
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> | 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>;
|
|
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>;
|
|
341
597
|
|
|
342
598
|
/**
|
|
343
599
|
* React hook that reads an aggregated profile by handle or DID via
|
|
@@ -347,6 +603,11 @@ type SifaQueryKey = ReturnType<typeof sifaQueryKeys.all> | ReturnType<typeof sif
|
|
|
347
603
|
* fetch.
|
|
348
604
|
*/
|
|
349
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>;
|
|
350
611
|
|
|
351
612
|
/**
|
|
352
613
|
* React hook for creating a new position record. On success, invalidates
|
|
@@ -358,6 +619,19 @@ declare function useProfile(handleOrDid: string | undefined | null, options?: Om
|
|
|
358
619
|
*/
|
|
359
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>;
|
|
360
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
|
+
|
|
361
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>;
|
|
362
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>;
|
|
363
637
|
declare function useSearchFilters(options?: Omit<UseQueryOptions<FilterOptions, Error, FilterOptions, ReturnType<typeof sifaQueryKeys.search.filters>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<FilterOptions, Error>;
|
|
@@ -375,4 +649,30 @@ declare function useFollowing(opts?: {
|
|
|
375
649
|
limit?: number;
|
|
376
650
|
}, options?: Omit<UseQueryOptions<FollowingResponse, Error, FollowingResponse, ReturnType<typeof sifaQueryKeys.follow.following>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<FollowingResponse, Error>;
|
|
377
651
|
|
|
378
|
-
|
|
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>;
|
|
677
|
+
|
|
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 };
|