@singi-labs/sifa-sdk 0.5.0 → 0.7.0
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 +253 -0
- package/dist/index-IDRpze8y.d.ts +253 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -253
- package/dist/index.d.ts +3 -253
- package/dist/index.js +1 -1
- package/dist/query/index.cjs +378 -0
- package/dist/query/index.cjs.map +1 -0
- package/dist/query/index.d.cts +378 -0
- package/dist/query/index.d.ts +378 -0
- package/dist/query/index.js +351 -0
- package/dist/query/index.js.map +1 -0
- package/package.json +35 -7
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { P as Profile } from '../index-IDRpze8y.js';
|
|
4
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
|
+
import { UseQueryOptions, UseMutationOptions } from '@tanstack/react-query';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Foundation HTTP client for talking to the Sifa AppView.
|
|
9
|
+
*
|
|
10
|
+
* Stateless. Consumers supply a {@link SifaApiConfig} per call (the React
|
|
11
|
+
* hooks read it from context; non-React consumers pass it explicitly). No
|
|
12
|
+
* singletons, no module-level state.
|
|
13
|
+
*/
|
|
14
|
+
/** Configuration passed to every fetcher. */
|
|
15
|
+
interface SifaApiConfig {
|
|
16
|
+
/** Base URL of the sifa-api AppView, e.g. `https://api.sifa.id`. No trailing slash. */
|
|
17
|
+
baseUrl: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional fetch implementation. Defaults to {@link globalThis.fetch}.
|
|
20
|
+
* Lets Next.js consumers pass their cache-enhanced fetch; node/Expo
|
|
21
|
+
* consumers can leave this unset.
|
|
22
|
+
*/
|
|
23
|
+
fetch?: typeof fetch;
|
|
24
|
+
}
|
|
25
|
+
/** Options accepted by {@link apiFetch}. */
|
|
26
|
+
interface ApiFetchOptions {
|
|
27
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
28
|
+
/** Request body. Serialized to JSON automatically. */
|
|
29
|
+
body?: unknown;
|
|
30
|
+
/** AbortSignal. Defaults to `AbortSignal.timeout(timeoutMs)` if `timeoutMs` is set. */
|
|
31
|
+
signal?: AbortSignal;
|
|
32
|
+
/** Per-call timeout in milliseconds. Default: 10_000. Ignored if `signal` is provided. */
|
|
33
|
+
timeoutMs?: number;
|
|
34
|
+
/** Retry on HTTP 429 up to 3 times with the server's `Retry-After` delay (capped at 3s). */
|
|
35
|
+
retryOn429?: boolean;
|
|
36
|
+
/** Additional headers. `Content-Type: application/json` is set automatically when `body` is present. */
|
|
37
|
+
headers?: Record<string, string>;
|
|
38
|
+
credentials?: RequestCredentials;
|
|
39
|
+
cache?: RequestCache;
|
|
40
|
+
/**
|
|
41
|
+
* Next.js-specific cache hints. Ignored on non-Next runtimes. Passed
|
|
42
|
+
* through transparently as part of {@link RequestInit}.
|
|
43
|
+
*/
|
|
44
|
+
next?: {
|
|
45
|
+
revalidate?: number | false;
|
|
46
|
+
tags?: string[];
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** Error thrown by {@link apiFetch} on non-2xx responses. */
|
|
50
|
+
declare class ApiError extends Error {
|
|
51
|
+
readonly status: number;
|
|
52
|
+
readonly body: unknown;
|
|
53
|
+
constructor(message: string, status: number, body?: unknown);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Generic fetcher used by all SDK query and mutation functions.
|
|
57
|
+
*
|
|
58
|
+
* Returns parsed JSON typed as `T`. Throws {@link ApiError} on non-2xx
|
|
59
|
+
* responses. Use {@link apiFetchOrNull} when 404 should resolve to `null`
|
|
60
|
+
* instead.
|
|
61
|
+
*/
|
|
62
|
+
declare function apiFetch<T = unknown>(config: SifaApiConfig, path: string, options?: ApiFetchOptions): Promise<T>;
|
|
63
|
+
/**
|
|
64
|
+
* Variant of {@link apiFetch} that resolves to `null` on HTTP 404 instead
|
|
65
|
+
* of throwing. Useful for "fetch by handle" reads where missing is
|
|
66
|
+
* expected (e.g. unknown profile).
|
|
67
|
+
*/
|
|
68
|
+
declare function apiFetchOrNull<T>(config: SifaApiConfig, path: string, options?: ApiFetchOptions): Promise<T | null>;
|
|
69
|
+
|
|
70
|
+
interface SifaProviderProps {
|
|
71
|
+
config: SifaApiConfig;
|
|
72
|
+
children: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Provides the {@link SifaApiConfig} that hooks under it can read via
|
|
76
|
+
* {@link useSifaConfig}. Wrap the React tree once; hooks consume it.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```tsx
|
|
80
|
+
* <QueryClientProvider client={queryClient}>
|
|
81
|
+
* <SifaProvider config={{ baseUrl: process.env.NEXT_PUBLIC_API_URL! }}>
|
|
82
|
+
* <App />
|
|
83
|
+
* </SifaProvider>
|
|
84
|
+
* </QueryClientProvider>
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
declare function SifaProvider({ config, children }: SifaProviderProps): react_jsx_runtime.JSX.Element;
|
|
88
|
+
/**
|
|
89
|
+
* Read the SDK's {@link SifaApiConfig} from context. Throws if no
|
|
90
|
+
* {@link SifaProvider} is mounted above.
|
|
91
|
+
*/
|
|
92
|
+
declare function useSifaConfig(): SifaApiConfig;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Read the aggregated profile for a handle or DID.
|
|
96
|
+
*
|
|
97
|
+
* Returns `null` when the AppView has no profile for the given identifier
|
|
98
|
+
* (HTTP 404). Throws {@link ApiError} on other non-2xx responses.
|
|
99
|
+
*
|
|
100
|
+
* Server-callable (Next.js RSC) and client-callable (Expo, browser).
|
|
101
|
+
*/
|
|
102
|
+
declare function fetchProfile(config: SifaApiConfig, handleOrDid: string, options?: ApiFetchOptions): Promise<Profile | null>;
|
|
103
|
+
|
|
104
|
+
/** Result returned by record-write mutations (create / update / delete). */
|
|
105
|
+
interface WriteResult {
|
|
106
|
+
success: boolean;
|
|
107
|
+
error?: string;
|
|
108
|
+
pdsHost?: string;
|
|
109
|
+
}
|
|
110
|
+
/** Result returned by create mutations. Includes the newly created `rkey`. */
|
|
111
|
+
interface CreateResult extends WriteResult {
|
|
112
|
+
rkey?: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Create a new `id.sifa.profile.position` record on the authenticated
|
|
116
|
+
* user's PDS. The AppView signs and writes via the user's OAuth session.
|
|
117
|
+
*
|
|
118
|
+
* `data` should be a lexicon-shaped position record (without `createdAt`
|
|
119
|
+
* or `rkey`; the AppView fills both). Validate with
|
|
120
|
+
* `ProfilePositionRecordSchema.omit({ createdAt: true })` before calling
|
|
121
|
+
* if you want client-side guarantees.
|
|
122
|
+
*/
|
|
123
|
+
declare function createPosition(config: SifaApiConfig, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<CreateResult>;
|
|
124
|
+
|
|
125
|
+
/** Profile entry returned by the search endpoint. */
|
|
126
|
+
interface ProfileSearchResult {
|
|
127
|
+
did?: string;
|
|
128
|
+
handle: string;
|
|
129
|
+
displayName?: string;
|
|
130
|
+
headline?: string;
|
|
131
|
+
avatar?: string;
|
|
132
|
+
about?: string;
|
|
133
|
+
currentRole?: string;
|
|
134
|
+
currentCompany?: string;
|
|
135
|
+
industry?: string;
|
|
136
|
+
domain?: string;
|
|
137
|
+
countryCode?: string;
|
|
138
|
+
locationCountry?: string;
|
|
139
|
+
preferredWorkplace?: string[];
|
|
140
|
+
claimed?: boolean;
|
|
141
|
+
blueskyVerified?: boolean;
|
|
142
|
+
blueskyVerifiedAt?: string | null;
|
|
143
|
+
}
|
|
144
|
+
interface SearchFilters {
|
|
145
|
+
q?: string;
|
|
146
|
+
skill?: string;
|
|
147
|
+
country?: string;
|
|
148
|
+
industry?: string;
|
|
149
|
+
domain?: string;
|
|
150
|
+
workplace?: string;
|
|
151
|
+
app?: string;
|
|
152
|
+
limit?: number;
|
|
153
|
+
}
|
|
154
|
+
interface SearchResponse {
|
|
155
|
+
profiles: ProfileSearchResult[];
|
|
156
|
+
total: number;
|
|
157
|
+
limit: number;
|
|
158
|
+
offset: number;
|
|
159
|
+
}
|
|
160
|
+
/** Skill typeahead suggestion. */
|
|
161
|
+
interface SkillSearchResult {
|
|
162
|
+
name: string;
|
|
163
|
+
slug: string;
|
|
164
|
+
category: string;
|
|
165
|
+
userCount: number;
|
|
166
|
+
}
|
|
167
|
+
interface FilterOptions {
|
|
168
|
+
countries: {
|
|
169
|
+
countryCode: string;
|
|
170
|
+
country: string;
|
|
171
|
+
count: number;
|
|
172
|
+
}[];
|
|
173
|
+
industries: {
|
|
174
|
+
industry: string;
|
|
175
|
+
count: number;
|
|
176
|
+
}[];
|
|
177
|
+
apps: {
|
|
178
|
+
appId: string;
|
|
179
|
+
count: number;
|
|
180
|
+
}[];
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Search profiles by free-text query and optional filters. Returns an
|
|
184
|
+
* empty result set when no filters are provided (matching sifa-web's
|
|
185
|
+
* "no input, no fetch" behavior).
|
|
186
|
+
*/
|
|
187
|
+
declare function fetchSearchProfiles(config: SifaApiConfig, filters: SearchFilters, options?: ApiFetchOptions): Promise<SearchResponse>;
|
|
188
|
+
/**
|
|
189
|
+
* Skill typeahead. Returns up to 8 matches for the given prefix. Empty
|
|
190
|
+
* input returns an empty array without hitting the server.
|
|
191
|
+
*/
|
|
192
|
+
declare function fetchSkillSuggestions(config: SifaApiConfig, query: string, options?: ApiFetchOptions): Promise<SkillSearchResult[]>;
|
|
193
|
+
/** Available filter facets (countries, industries, apps) for search UI. */
|
|
194
|
+
declare function fetchSearchFilters(config: SifaApiConfig, options?: ApiFetchOptions): Promise<FilterOptions>;
|
|
195
|
+
|
|
196
|
+
/** Lightweight profile representation used by discovery endpoints. */
|
|
197
|
+
interface SimilarProfile {
|
|
198
|
+
did: string;
|
|
199
|
+
handle: string;
|
|
200
|
+
displayName?: string | null;
|
|
201
|
+
avatar?: string | null;
|
|
202
|
+
headline?: string | null;
|
|
203
|
+
currentRole?: string | null;
|
|
204
|
+
currentCompany?: string | null;
|
|
205
|
+
industry?: string | null;
|
|
206
|
+
domain?: string | null;
|
|
207
|
+
}
|
|
208
|
+
interface SuggestionProfile {
|
|
209
|
+
did: string;
|
|
210
|
+
handle: string;
|
|
211
|
+
displayName?: string;
|
|
212
|
+
headline?: string;
|
|
213
|
+
avatarUrl?: string;
|
|
214
|
+
source: string;
|
|
215
|
+
dismissed: boolean;
|
|
216
|
+
blueskyVerified?: boolean;
|
|
217
|
+
}
|
|
218
|
+
interface SuggestionsResponse {
|
|
219
|
+
onSifa: SuggestionProfile[];
|
|
220
|
+
notOnSifa: SuggestionProfile[];
|
|
221
|
+
cursor?: string;
|
|
222
|
+
}
|
|
223
|
+
interface FeaturedProfile {
|
|
224
|
+
did: string;
|
|
225
|
+
handle: string;
|
|
226
|
+
displayName?: string;
|
|
227
|
+
avatar?: string;
|
|
228
|
+
pronouns?: string;
|
|
229
|
+
headline?: string;
|
|
230
|
+
about?: string;
|
|
231
|
+
currentRole?: string;
|
|
232
|
+
currentCompany?: string;
|
|
233
|
+
locationCountry?: string;
|
|
234
|
+
locationRegion?: string;
|
|
235
|
+
/** Legacy alias for `locationLocality`; emitted by sifa-api during the additive response window. */
|
|
236
|
+
locationCity?: string;
|
|
237
|
+
/** community.lexicon.location.address field name -- prefer over `locationCity`. */
|
|
238
|
+
locationLocality?: string;
|
|
239
|
+
countryCode?: string;
|
|
240
|
+
location?: string;
|
|
241
|
+
website?: string;
|
|
242
|
+
openTo?: string[];
|
|
243
|
+
preferredWorkplace?: string[];
|
|
244
|
+
availableFromUtc?: number;
|
|
245
|
+
availableToUtc?: number;
|
|
246
|
+
followersCount?: number;
|
|
247
|
+
atprotoFollowersCount?: number;
|
|
248
|
+
pdsProvider?: {
|
|
249
|
+
name: string;
|
|
250
|
+
host: string;
|
|
251
|
+
} | null;
|
|
252
|
+
claimed: boolean;
|
|
253
|
+
featuredDate: string;
|
|
254
|
+
}
|
|
255
|
+
/** Profiles similar to the given DID (matchmaking). Returns `[]` on error. */
|
|
256
|
+
declare function fetchSimilarProfiles(config: SifaApiConfig, did: string, opts?: {
|
|
257
|
+
limit?: number;
|
|
258
|
+
} & ApiFetchOptions): Promise<SimilarProfile[]>;
|
|
259
|
+
interface FetchSuggestionsOptions extends ApiFetchOptions {
|
|
260
|
+
source?: string;
|
|
261
|
+
includeDismissed?: boolean;
|
|
262
|
+
cursor?: string;
|
|
263
|
+
limit?: number;
|
|
264
|
+
/**
|
|
265
|
+
* Pass the caller's `Cookie` header on Next.js RSC server-side calls.
|
|
266
|
+
* `credentials: 'include'` does NOT propagate browser cookies in RSC,
|
|
267
|
+
* so authenticated server fetches must forward the header explicitly.
|
|
268
|
+
*/
|
|
269
|
+
cookieHeader?: string;
|
|
270
|
+
}
|
|
271
|
+
/** Discovery suggestions feed. Resolves to empty arrays on error. */
|
|
272
|
+
declare function fetchSuggestions(config: SifaApiConfig, opts?: FetchSuggestionsOptions): Promise<SuggestionsResponse>;
|
|
273
|
+
/** Count of pending suggestions since an optional timestamp. */
|
|
274
|
+
declare function fetchSuggestionCount(config: SifaApiConfig, since?: string, options?: ApiFetchOptions): Promise<number>;
|
|
275
|
+
/** Featured profile (rotated by sifa-api). Returns `null` when none. */
|
|
276
|
+
declare function fetchFeaturedProfile(config: SifaApiConfig, options?: ApiFetchOptions): Promise<FeaturedProfile | null>;
|
|
277
|
+
|
|
278
|
+
interface FollowProfile {
|
|
279
|
+
did: string;
|
|
280
|
+
handle: string;
|
|
281
|
+
displayName?: string;
|
|
282
|
+
headline?: string;
|
|
283
|
+
avatarUrl?: string;
|
|
284
|
+
source: string;
|
|
285
|
+
claimed: boolean;
|
|
286
|
+
followedAt: string;
|
|
287
|
+
blueskyVerified?: boolean;
|
|
288
|
+
blueskyVerifiedAt?: string | null;
|
|
289
|
+
}
|
|
290
|
+
interface FollowingResponse {
|
|
291
|
+
follows: FollowProfile[];
|
|
292
|
+
cursor?: string;
|
|
293
|
+
}
|
|
294
|
+
/** People the authenticated user follows. Empty on error. */
|
|
295
|
+
declare function fetchFollowing(config: SifaApiConfig, opts?: {
|
|
296
|
+
source?: string;
|
|
297
|
+
cursor?: string;
|
|
298
|
+
limit?: number;
|
|
299
|
+
} & ApiFetchOptions): Promise<FollowingResponse>;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Query key factory for TanStack Query.
|
|
303
|
+
*
|
|
304
|
+
* Keys are read-only tuples; the hierarchy matches the SDK's fetcher
|
|
305
|
+
* grouping. Use these instead of inline arrays so consumers can target
|
|
306
|
+
* `queryClient.invalidateQueries({ queryKey: keys.profile.all() })` and
|
|
307
|
+
* similar patterns without typos.
|
|
308
|
+
*
|
|
309
|
+
* Convention: every leaf key starts with the namespace ('sifa') so
|
|
310
|
+
* consumers can invalidate everything Sifa-related in one call.
|
|
311
|
+
*/
|
|
312
|
+
declare const sifaQueryKeys: {
|
|
313
|
+
readonly all: () => readonly ["sifa"];
|
|
314
|
+
readonly profile: {
|
|
315
|
+
readonly all: () => readonly ["sifa", "profile"];
|
|
316
|
+
readonly byHandle: (handleOrDid: string) => readonly ["sifa", "profile", string];
|
|
317
|
+
};
|
|
318
|
+
readonly position: {
|
|
319
|
+
readonly all: () => readonly ["sifa", "position"];
|
|
320
|
+
readonly byOwner: (did: string) => readonly ["sifa", "position", "by-owner", string];
|
|
321
|
+
};
|
|
322
|
+
readonly search: {
|
|
323
|
+
readonly all: () => readonly ["sifa", "search"];
|
|
324
|
+
readonly profiles: (filters: Record<string, unknown>) => readonly ["sifa", "search", "profiles", Record<string, unknown>];
|
|
325
|
+
readonly skills: (query: string) => readonly ["sifa", "search", "skills", string];
|
|
326
|
+
readonly filters: () => readonly ["sifa", "search", "filters"];
|
|
327
|
+
};
|
|
328
|
+
readonly discovery: {
|
|
329
|
+
readonly all: () => readonly ["sifa", "discovery"];
|
|
330
|
+
readonly similar: (did: string, limit: number) => readonly ["sifa", "discovery", "similar", string, number];
|
|
331
|
+
readonly suggestions: (opts: Record<string, unknown>) => readonly ["sifa", "discovery", "suggestions", Record<string, unknown>];
|
|
332
|
+
readonly suggestionCount: (since: string | undefined) => readonly ["sifa", "discovery", "suggestion-count", string | null];
|
|
333
|
+
readonly featured: () => readonly ["sifa", "discovery", "featured"];
|
|
334
|
+
};
|
|
335
|
+
readonly follow: {
|
|
336
|
+
readonly all: () => readonly ["sifa", "follow"];
|
|
337
|
+
readonly following: (opts: Record<string, unknown>) => readonly ["sifa", "follow", "following", Record<string, unknown>];
|
|
338
|
+
};
|
|
339
|
+
};
|
|
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>;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* React hook that reads an aggregated profile by handle or DID via
|
|
344
|
+
* TanStack Query. Returns `null` data when the profile does not exist.
|
|
345
|
+
*
|
|
346
|
+
* Pass `{ enabled: false }` (or an empty `handleOrDid`) to defer the
|
|
347
|
+
* fetch.
|
|
348
|
+
*/
|
|
349
|
+
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>;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* React hook for creating a new position record. On success, invalidates
|
|
353
|
+
* the owner's profile cache so the new position is reflected on the next
|
|
354
|
+
* read.
|
|
355
|
+
*
|
|
356
|
+
* The owner DID is required so the mutation can target the correct
|
|
357
|
+
* profile cache entry for invalidation.
|
|
358
|
+
*/
|
|
359
|
+
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
|
+
|
|
361
|
+
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
|
+
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
|
+
declare function useSearchFilters(options?: Omit<UseQueryOptions<FilterOptions, Error, FilterOptions, ReturnType<typeof sifaQueryKeys.search.filters>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<FilterOptions, Error>;
|
|
364
|
+
|
|
365
|
+
declare function useSimilarProfiles(did: string | undefined | null, opts?: {
|
|
366
|
+
limit?: number;
|
|
367
|
+
}, options?: Omit<UseQueryOptions<SimilarProfile[], Error, SimilarProfile[], ReturnType<typeof sifaQueryKeys.discovery.similar>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<SimilarProfile[], Error>;
|
|
368
|
+
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>;
|
|
369
|
+
declare function useSuggestionCount(since?: string, options?: Omit<UseQueryOptions<number, Error, number, ReturnType<typeof sifaQueryKeys.discovery.suggestionCount>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<number, Error>;
|
|
370
|
+
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>;
|
|
371
|
+
|
|
372
|
+
declare function useFollowing(opts?: {
|
|
373
|
+
source?: string;
|
|
374
|
+
cursor?: string;
|
|
375
|
+
limit?: number;
|
|
376
|
+
}, options?: Omit<UseQueryOptions<FollowingResponse, Error, FollowingResponse, ReturnType<typeof sifaQueryKeys.follow.following>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<FollowingResponse, Error>;
|
|
377
|
+
|
|
378
|
+
export { ApiError, type ApiFetchOptions, type CreateResult, type FeaturedProfile, type FetchSuggestionsOptions, type FilterOptions, type FollowProfile, type FollowingResponse, type ProfileSearchResult, type SearchFilters, type SearchResponse, type SifaApiConfig, SifaProvider, type SifaProviderProps, type SifaQueryKey, type SimilarProfile, type SkillSearchResult, type SuggestionProfile, type SuggestionsResponse, type WriteResult, apiFetch, apiFetchOrNull, createPosition, fetchFeaturedProfile, fetchFollowing, fetchProfile, fetchSearchFilters, fetchSearchProfiles, fetchSimilarProfiles, fetchSkillSuggestions, fetchSuggestionCount, fetchSuggestions, sifaQueryKeys, useCreatePosition, useFeaturedProfile, useFollowing, useProfile, useSearchFilters, useSearchProfiles, useSifaConfig, useSimilarProfiles, useSkillSuggestions, useSuggestionCount, useSuggestions };
|