@singi-labs/sifa-sdk 0.7.2 → 0.7.3

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,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { f as Profile } from '../index-CpM21_Oy.cjs';
3
+ import { f as Profile, o as ProfilePosition, S as SkillRef, c as ExternalAccount, t as SkillSuggestion } from '../index-CpM21_Oy.cjs';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
  import { UseQueryOptions, UseMutationOptions } from '@tanstack/react-query';
6
6
 
@@ -66,6 +66,54 @@ declare function apiFetch<T = unknown>(config: SifaApiConfig, path: string, opti
66
66
  * expected (e.g. unknown profile).
67
67
  */
68
68
  declare function apiFetchOrNull<T>(config: SifaApiConfig, path: string, options?: ApiFetchOptions): Promise<T | null>;
69
+ /**
70
+ * Result returned by record-write mutations (create / update / delete).
71
+ *
72
+ * Never throws -- writes against the user's PDS can fail in many ways
73
+ * (network, PDS unreachable, rate limit) and the UI needs structured
74
+ * results to render appropriate messages.
75
+ */
76
+ interface WriteResult {
77
+ success: boolean;
78
+ error?: string;
79
+ /**
80
+ * PDS hostname returned by sifa-api when a write failed at the user's
81
+ * Personal Data Server (issue #167). Lets the UI render
82
+ * "Your data server (eurosky.social) isn't responding" instead of a
83
+ * generic "Request failed (500)".
84
+ */
85
+ pdsHost?: string;
86
+ }
87
+ /** Result returned by create mutations. Includes the newly created `rkey`. */
88
+ interface CreateResult extends WriteResult {
89
+ rkey?: string;
90
+ }
91
+ /**
92
+ * Write mutation against the Sifa AppView. Wraps {@link apiFetch} with the
93
+ * never-throws contract used by all sifa-web mutations: returns a
94
+ * structured {@link WriteResult} on both success and failure, and
95
+ * preserves the `pdsHost` field when the AppView reports a PDS-side
96
+ * failure (issue #167).
97
+ *
98
+ * On success: returns `{ success: true, ...payload }` where `payload` is
99
+ * whatever the server returned in JSON (or `{}` for 204).
100
+ *
101
+ * On failure: returns `{ success: false, error, pdsHost? }`. Never throws.
102
+ *
103
+ * Use {@link apiWriteCreate} when you specifically need the `rkey` from a
104
+ * create response folded into the result shape.
105
+ */
106
+ declare function apiWrite<TExtra extends object = Record<never, never>>(config: SifaApiConfig, path: string, method: 'POST' | 'PUT' | 'DELETE' | 'PATCH', options?: Omit<ApiFetchOptions, 'method'>): Promise<WriteResult & TExtra>;
107
+ /**
108
+ * Write mutation that expects the server to return a record key (`rkey`)
109
+ * in its response body. Wraps {@link apiWrite} and folds the `rkey` into
110
+ * the result shape so consumers get `{ success, rkey?, error?, pdsHost? }`.
111
+ *
112
+ * If the server returns additional fields (e.g. `feedUrl` from external
113
+ * account creation), pass them via the `TExtra` generic to keep them
114
+ * typed.
115
+ */
116
+ declare function apiWriteCreate<TExtra extends object = Record<never, never>>(config: SifaApiConfig, path: string, body: unknown, options?: Omit<ApiFetchOptions, 'method' | 'body'>): Promise<CreateResult & TExtra>;
69
117
 
70
118
  interface SifaProviderProps {
71
119
  config: SifaApiConfig;
@@ -107,16 +155,78 @@ declare function fetchProfile(config: SifaApiConfig, handleOrDid: string, option
107
155
  */
108
156
  declare function fetchAtFundLink(config: SifaApiConfig, did: string, options?: ApiFetchOptions): Promise<string | null>;
109
157
 
110
- /** Result returned by record-write mutations (create / update / delete). */
111
- interface WriteResult {
112
- success: boolean;
113
- error?: string;
114
- pdsHost?: string;
158
+ /** Industry/domain entry on the profile self record. */
159
+ interface ProfileIndustryInput {
160
+ industry: string;
161
+ domain?: string;
115
162
  }
116
- /** Result returned by create mutations. Includes the newly created `rkey`. */
117
- interface CreateResult extends WriteResult {
118
- rkey?: string;
163
+ /**
164
+ * Location payload accepted by `updateProfileSelf`.
165
+ *
166
+ * Accepts both shapes during the community.lexicon.location.address
167
+ * migration. Prefer `locality` (new) over `city` (legacy) when sending.
168
+ * The API's locationSchema is a Zod union that resolves either input.
169
+ */
170
+ interface ProfileSelfLocation {
171
+ country: string;
172
+ countryCode?: string;
173
+ region?: string;
174
+ city?: string;
175
+ locality?: string;
176
+ }
177
+ /** Body accepted by {@link updateProfileSelf}. */
178
+ interface UpdateProfileSelfInput {
179
+ headline?: string;
180
+ about?: string;
181
+ industries?: ProfileIndustryInput[];
182
+ location?: ProfileSelfLocation;
183
+ website?: string;
184
+ openTo?: string[];
185
+ preferredWorkplace?: string[];
186
+ availableFromUtc?: number;
187
+ availableToUtc?: number;
188
+ }
189
+ /** Update the authenticated user's `id.sifa.profile.self` record. */
190
+ declare function updateProfileSelf(config: SifaApiConfig, data: UpdateProfileSelfInput, options?: ApiFetchOptions): Promise<WriteResult>;
191
+ /** Body accepted by {@link updateProfileOverride}. */
192
+ interface UpdateProfileOverrideInput {
193
+ headline?: string | null;
194
+ about?: string | null;
195
+ displayName?: string | null;
196
+ pronouns?: string | null;
119
197
  }
198
+ /**
199
+ * Override aggregated profile fields with sifa-specific values. `null`
200
+ * clears the override and falls back to the upstream PDS value.
201
+ */
202
+ declare function updateProfileOverride(config: SifaApiConfig, data: UpdateProfileOverrideInput, options?: ApiFetchOptions): Promise<WriteResult>;
203
+ /** Extended result for {@link refreshPds}. */
204
+ interface RefreshPdsResult extends WriteResult {
205
+ displayName?: string | null;
206
+ avatar?: string | null;
207
+ }
208
+ /**
209
+ * Re-pull the authenticated user's `app.bsky.actor.profile` from their
210
+ * PDS. Returns the freshly resolved `displayName` and `avatar` on
211
+ * success so the UI can update without a full profile refetch.
212
+ */
213
+ declare function refreshPds(config: SifaApiConfig, options?: ApiFetchOptions): Promise<RefreshPdsResult>;
214
+ /** Extended result for {@link uploadAvatar}. */
215
+ interface UploadAvatarResult extends WriteResult {
216
+ /** Publicly accessible URL of the newly uploaded avatar. */
217
+ url?: string;
218
+ }
219
+ /**
220
+ * Upload a new avatar via `multipart/form-data`. Pass either a `File`
221
+ * (browser) or any `Blob` (Expo, node). The SDK leaves `Content-Type`
222
+ * unset so the runtime can set the multipart boundary automatically.
223
+ *
224
+ * Never throws -- inspect `result.success` and `result.url`.
225
+ */
226
+ declare function uploadAvatar(config: SifaApiConfig, file: Blob, options?: ApiFetchOptions): Promise<UploadAvatarResult>;
227
+ /** Delete the authenticated user's avatar override (revert to PDS avatar). */
228
+ declare function deleteAvatarOverride(config: SifaApiConfig, options?: ApiFetchOptions): Promise<WriteResult>;
229
+
120
230
  /**
121
231
  * Create a new `id.sifa.profile.position` record on the authenticated
122
232
  * user's PDS. The AppView signs and writes via the user's OAuth session.
@@ -125,8 +235,194 @@ interface CreateResult extends WriteResult {
125
235
  * or `rkey`; the AppView fills both). Validate with
126
236
  * `ProfilePositionRecordSchema.omit({ createdAt: true })` before calling
127
237
  * if you want client-side guarantees.
238
+ *
239
+ * Never throws -- inspect `result.success` and use `result.error` /
240
+ * `result.pdsHost` for UI messaging.
128
241
  */
129
242
  declare function createPosition(config: SifaApiConfig, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<CreateResult>;
243
+ /** Update an existing position by `rkey`. */
244
+ declare function updatePosition(config: SifaApiConfig, rkey: string, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<WriteResult>;
245
+ /** Delete a position by `rkey`. */
246
+ declare function deletePosition(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
247
+ /** Mark a position as the user's primary (current) role. */
248
+ declare function setPositionPrimary(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
249
+ /** Clear the "primary" flag on a position. */
250
+ declare function unsetPositionPrimary(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
251
+ /**
252
+ * Add a skill link to a position. Idempotent: if the skill is already
253
+ * linked, resolves to `{ success: true }` without a network call.
254
+ *
255
+ * Implementation note: the AppView only exposes whole-record PUTs, so
256
+ * this helper rebuilds the position body with the new skills list.
257
+ */
258
+ declare function linkSkillToPosition(config: SifaApiConfig, position: ProfilePosition, skillRef: SkillRef, options?: ApiFetchOptions): Promise<WriteResult>;
259
+ /** Remove a skill link from a position. */
260
+ declare function unlinkSkillFromPosition(config: SifaApiConfig, position: ProfilePosition, skillRef: SkillRef, options?: ApiFetchOptions): Promise<WriteResult>;
261
+
262
+ /**
263
+ * Create a new `id.sifa.profile.education` record on the authenticated
264
+ * user's PDS.
265
+ */
266
+ declare function createEducation(config: SifaApiConfig, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<CreateResult>;
267
+ /** Update an existing education record by `rkey`. */
268
+ declare function updateEducation(config: SifaApiConfig, rkey: string, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<WriteResult>;
269
+ /** Delete an education record by `rkey`. */
270
+ declare function deleteEducation(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
271
+
272
+ /**
273
+ * Create a new `id.sifa.profile.skill` record on the authenticated
274
+ * user's PDS.
275
+ */
276
+ declare function createSkill(config: SifaApiConfig, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<CreateResult>;
277
+ /** Update an existing skill record by `rkey`. */
278
+ declare function updateSkill(config: SifaApiConfig, rkey: string, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<WriteResult>;
279
+ /** Delete a skill record by `rkey`. */
280
+ declare function deleteSkill(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
281
+
282
+ /**
283
+ * Generic record-create escape hatch. Most callers should prefer the
284
+ * dedicated section helpers (`createPosition`, `createEducation`, etc.)
285
+ * which take typed payloads and ship matching hooks. Use this when the
286
+ * lexicon doesn't yet have a dedicated endpoint (certifications,
287
+ * projects, publications, volunteering, honors, languages, courses).
288
+ *
289
+ * `collection` is a `id.sifa.profile.*` collection NSID. Routes to
290
+ * `POST /api/profile/records/<collection>`.
291
+ */
292
+ declare function createRecord(config: SifaApiConfig, collection: string, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<CreateResult>;
293
+ /** Generic record-update escape hatch. See {@link createRecord}. */
294
+ declare function updateRecord(config: SifaApiConfig, collection: string, rkey: string, data: Record<string, unknown>, options?: ApiFetchOptions): Promise<WriteResult>;
295
+ /** Generic record-delete escape hatch. See {@link createRecord}. */
296
+ declare function deleteRecord(config: SifaApiConfig, collection: string, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
297
+
298
+ /**
299
+ * Address payload accepted by `/api/profile/location` endpoints.
300
+ *
301
+ * Accepts both shapes during the community.lexicon.location.address
302
+ * migration. Prefer `country` + `locality` (new) over `countryCode` +
303
+ * `city` (legacy). The API's `locationSchema` is a Zod union that
304
+ * accepts either pair.
305
+ */
306
+ interface ProfileLocationAddress {
307
+ /** Legacy alias for `country` (alpha-2). */
308
+ countryCode?: string;
309
+ /** community.lexicon.location.address field -- prefer over `countryCode`. */
310
+ country?: string;
311
+ region?: string;
312
+ /** Legacy alias for `locality`. */
313
+ city?: string;
314
+ /** community.lexicon.location.address field -- prefer over `city`. */
315
+ locality?: string;
316
+ }
317
+ /** Body accepted by {@link createProfileLocation} / {@link updateProfileLocation}. */
318
+ interface ProfileLocationInput {
319
+ address: ProfileLocationAddress;
320
+ type: string;
321
+ label?: string;
322
+ isPrimary?: boolean;
323
+ }
324
+ /** Create a new profile location entry. */
325
+ declare function createProfileLocation(config: SifaApiConfig, data: ProfileLocationInput, options?: ApiFetchOptions): Promise<CreateResult>;
326
+ /** Update an existing profile location by `rkey`. */
327
+ declare function updateProfileLocation(config: SifaApiConfig, rkey: string, data: ProfileLocationInput, options?: ApiFetchOptions): Promise<WriteResult>;
328
+ /** Delete a profile location by `rkey`. */
329
+ declare function deleteProfileLocation(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
330
+
331
+ /** Body accepted by {@link createExternalAccount} / {@link updateExternalAccount}. */
332
+ interface ExternalAccountInput {
333
+ platform: string;
334
+ url: string;
335
+ label?: string;
336
+ feedUrl?: string;
337
+ }
338
+ /** Extended create result for {@link createExternalAccount}. */
339
+ interface CreateExternalAccountResult extends WriteResult {
340
+ rkey?: string;
341
+ feedUrl?: string | null;
342
+ }
343
+ /** Extended write result for {@link verifyExternalAccount}. */
344
+ interface VerifyExternalAccountResult extends WriteResult {
345
+ verified?: boolean;
346
+ verifiedVia?: string;
347
+ }
348
+ /** List external accounts attached to a profile. Returns `[]` on error. */
349
+ declare function fetchExternalAccounts(config: SifaApiConfig, handleOrDid: string, options?: ApiFetchOptions): Promise<ExternalAccount[]>;
350
+ /**
351
+ * Create a new external account record. Returns the newly-created `rkey`
352
+ * and the server-resolved `feedUrl` (sifa-api inspects the target for
353
+ * RSS feeds on platforms that publish them).
354
+ */
355
+ declare function createExternalAccount(config: SifaApiConfig, data: ExternalAccountInput, options?: ApiFetchOptions): Promise<CreateExternalAccountResult>;
356
+ /** Update an existing external account by `rkey`. */
357
+ declare function updateExternalAccount(config: SifaApiConfig, rkey: string, data: ExternalAccountInput, options?: ApiFetchOptions): Promise<WriteResult>;
358
+ /** Delete an external account by `rkey`. */
359
+ declare function deleteExternalAccount(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
360
+ /** Mark an external account as the user's primary. */
361
+ declare function setExternalAccountPrimary(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
362
+ /** Clear the "primary" flag on an external account. */
363
+ declare function unsetExternalAccountPrimary(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
364
+ /**
365
+ * Run server-side verification on an external account (e.g. inspect
366
+ * the target for a keytrace claim). Returns `{ verified, verifiedVia }`
367
+ * on success.
368
+ */
369
+ declare function verifyExternalAccount(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<VerifyExternalAccountResult>;
370
+
371
+ /** Body accepted by {@link createEndorsement}. */
372
+ interface EndorsementInput {
373
+ skillUri: string;
374
+ comment?: string;
375
+ }
376
+ /**
377
+ * Create an endorsement of another user's skill. The endorsed user
378
+ * must confirm before the endorsement appears on their profile (the
379
+ * endorsement record is on the endorser's PDS; a separate confirmation
380
+ * record on the endorsed user's PDS gates display).
381
+ */
382
+ declare function createEndorsement(config: SifaApiConfig, data: EndorsementInput, options?: ApiFetchOptions): Promise<CreateResult>;
383
+
384
+ /**
385
+ * Hide a keytrace claim (verified-account claim discovered on the
386
+ * user's external accounts) from the user's profile. The claim itself
387
+ * stays in the index; only its display is suppressed.
388
+ */
389
+ declare function hideKeytraceClaim(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
390
+ /** Restore a previously-hidden keytrace claim. */
391
+ declare function unhideKeytraceClaim(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
392
+
393
+ /** Extended result for {@link refreshOrcidPublications}. */
394
+ interface RefreshOrcidPublicationsResult extends WriteResult {
395
+ added?: number;
396
+ removed?: number;
397
+ }
398
+ /**
399
+ * Hide an ORCID-imported publication from the user's profile. The
400
+ * `putCode` is the ORCID-side identifier; the underlying record stays
401
+ * in the index, only its display is suppressed.
402
+ */
403
+ declare function hideOrcidPublication(config: SifaApiConfig, putCode: number, options?: ApiFetchOptions): Promise<WriteResult>;
404
+ /** Restore a previously-hidden ORCID publication. */
405
+ declare function unhideOrcidPublication(config: SifaApiConfig, putCode: number, options?: ApiFetchOptions): Promise<WriteResult>;
406
+ /** Hide a standard (auto-imported) publication by its AT URI. */
407
+ declare function hideStandardPublication(config: SifaApiConfig, uri: string, options?: ApiFetchOptions): Promise<WriteResult>;
408
+ /** Restore a previously-hidden standard publication. */
409
+ declare function unhideStandardPublication(config: SifaApiConfig, uri: string, options?: ApiFetchOptions): Promise<WriteResult>;
410
+ /** Bulk-hide standard publications by AT URI list. */
411
+ declare function bulkHideStandardPublications(config: SifaApiConfig, uris: string[], options?: ApiFetchOptions): Promise<WriteResult>;
412
+ /** Bulk-unhide standard publications by AT URI list. */
413
+ declare function bulkUnhideStandardPublications(config: SifaApiConfig, uris: string[], options?: ApiFetchOptions): Promise<WriteResult>;
414
+ /** Hide an `id.sifa.profile.publication` (user-authored publication record). */
415
+ declare function hideSifaPublication(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
416
+ /** Restore a previously-hidden Sifa publication. */
417
+ declare function unhideSifaPublication(config: SifaApiConfig, rkey: string, options?: ApiFetchOptions): Promise<WriteResult>;
418
+ /**
419
+ * Re-pull the authenticated user's ORCID publications. Returns counts
420
+ * of added and removed records. The server returns `{ error: '...' }`
421
+ * inline (not via HTTP status) on quota / linkage failures; the SDK
422
+ * folds that into `{ success: false, error }` to keep the contract
423
+ * consistent with other mutations.
424
+ */
425
+ declare function refreshOrcidPublications(config: SifaApiConfig, options?: ApiFetchOptions): Promise<RefreshOrcidPublicationsResult>;
130
426
 
131
427
  /** Public, aggregate stats shown on the homepage and similar surfaces. */
132
428
  interface StatsResponse {
@@ -251,6 +547,15 @@ declare function fetchSearchProfiles(config: SifaApiConfig, filters: SearchFilte
251
547
  declare function fetchSkillSuggestions(config: SifaApiConfig, query: string, options?: ApiFetchOptions): Promise<SkillSearchResult[]>;
252
548
  /** Available filter facets (countries, industries, apps) for search UI. */
253
549
  declare function fetchSearchFilters(config: SifaApiConfig, options?: ApiFetchOptions): Promise<FilterOptions>;
550
+ /**
551
+ * Canonical-skill search backing the position-editor and similar
552
+ * skill-pickers. Hits `/api/skills/search` (the canonical-skills DB
553
+ * lookup) which is distinct from {@link fetchSkillSuggestions}'s
554
+ * `/api/search/skills` (the profile-skill typeahead).
555
+ *
556
+ * Returns `[]` on empty input (no network call) or any error.
557
+ */
558
+ declare function searchSkills(config: SifaApiConfig, query: string, limit?: number, options?: ApiFetchOptions): Promise<SkillSuggestion[]>;
254
559
 
255
560
  /** Lightweight profile representation used by discovery endpoints. */
256
561
  interface SimilarProfile {
@@ -551,6 +856,40 @@ interface CheckAppAccountOptions extends ApiFetchOptions {
551
856
  * Returns `null` on any error.
552
857
  */
553
858
  declare function checkAppAccount(config: SifaApiConfig, appId: string, options?: CheckAppAccountOptions): Promise<AccountCheckResult | null>;
859
+ /** Result of a successful {@link createReaction}. */
860
+ interface ReactionResult {
861
+ uri: string;
862
+ rkey: string;
863
+ }
864
+ /** Structured error returned by {@link createReaction} on failure. */
865
+ interface ReactionError {
866
+ type: 'scope_insufficient' | 'error';
867
+ /** When `type === 'scope_insufficient'`, the lexicon scope the user must re-authorize for. */
868
+ requiredScope?: string;
869
+ }
870
+ /**
871
+ * Create a reaction (like / star) on a target ATproto record.
872
+ *
873
+ * Returns a discriminated-union result instead of the generic
874
+ * {@link WriteResult} shape because reactions have a distinct
875
+ * "scope insufficient" failure that callers handle differently from
876
+ * other errors (it triggers an OAuth scope-upgrade flow rather than
877
+ * an error toast).
878
+ *
879
+ * Never throws.
880
+ */
881
+ declare function createReaction(config: SifaApiConfig, targetUri: string, appId: string, targetCid?: string, options?: ApiFetchOptions): Promise<{
882
+ ok: true;
883
+ data: ReactionResult;
884
+ } | {
885
+ ok: false;
886
+ error: ReactionError;
887
+ }>;
888
+ /**
889
+ * Delete a reaction (like / star) on a target ATproto record. Returns
890
+ * `{ success: true }` on 2xx, `{ success: false, error }` on failure.
891
+ */
892
+ declare function deleteReaction(config: SifaApiConfig, targetUri: string, appId: string, options?: ApiFetchOptions): Promise<WriteResult>;
554
893
 
555
894
  /** Voter on a roadmap item. */
556
895
  interface RoadmapVoter {
@@ -579,6 +918,39 @@ interface FetchMyRoadmapVotesOptions extends ApiFetchOptions {
579
918
  * error or when the response payload is shaped unexpectedly.
580
919
  */
581
920
  declare function fetchMyRoadmapVotes(config: SifaApiConfig, options?: FetchMyRoadmapVotesOptions): Promise<string[]>;
921
+ /** Cast a vote on a roadmap item by its key. */
922
+ declare function castRoadmapVote(config: SifaApiConfig, key: string, options?: ApiFetchOptions): Promise<WriteResult>;
923
+ /** Retract a previously-cast roadmap vote. */
924
+ declare function retractRoadmapVote(config: SifaApiConfig, key: string, options?: ApiFetchOptions): Promise<WriteResult>;
925
+
926
+ /** Extended write result for {@link deleteAccount}. */
927
+ interface DeleteAccountResult extends WriteResult {
928
+ /** The deleted handle, returned by the server for confirmation UIs. */
929
+ handle?: string;
930
+ }
931
+ /**
932
+ * Reset the authenticated user's Sifa profile.
933
+ *
934
+ * `deletePdsData: true` also deletes the corresponding records on the
935
+ * user's PDS. `deletePdsData: false` only removes the AppView's
936
+ * indexed state -- the records on the PDS are left intact and could be
937
+ * re-indexed later.
938
+ *
939
+ * Destructive. Server enforces session check + attestation; the SDK
940
+ * does not gate on additional confirmation. Wrap call sites in your
941
+ * own modal if you want a UX confirmation step.
942
+ */
943
+ declare function resetProfile(config: SifaApiConfig, deletePdsData: boolean, options?: ApiFetchOptions): Promise<WriteResult>;
944
+ /**
945
+ * Delete the authenticated user's account. Returns the deleted handle
946
+ * on success (used by the post-delete confirmation screen).
947
+ *
948
+ * `deletePdsData: true` also deletes the corresponding records on the
949
+ * user's PDS; `false` leaves the PDS records intact.
950
+ *
951
+ * Destructive. Same caveat as {@link resetProfile}.
952
+ */
953
+ declare function deleteAccount(config: SifaApiConfig, deletePdsData: boolean, options?: ApiFetchOptions): Promise<DeleteAccountResult>;
582
954
 
583
955
  /**
584
956
  * Query key factory for TanStack Query.
@@ -597,6 +969,7 @@ declare const sifaQueryKeys: {
597
969
  readonly all: () => readonly ["sifa", "profile"];
598
970
  readonly byHandle: (handleOrDid: string) => readonly ["sifa", "profile", string];
599
971
  readonly atFundLink: (did: string) => readonly ["sifa", "profile", "at-fund-link", string];
972
+ readonly externalAccounts: (handleOrDid: string) => readonly ["sifa", "profile", "external-accounts", string];
600
973
  };
601
974
  readonly position: {
602
975
  readonly all: () => readonly ["sifa", "position"];
@@ -606,6 +979,7 @@ declare const sifaQueryKeys: {
606
979
  readonly all: () => readonly ["sifa", "search"];
607
980
  readonly profiles: (filters: Record<string, unknown>) => readonly ["sifa", "search", "profiles", Record<string, unknown>];
608
981
  readonly skills: (query: string) => readonly ["sifa", "search", "skills", string];
982
+ readonly canonicalSkills: (query: string, limit: number) => readonly ["sifa", "search", "canonical-skills", string, number];
609
983
  readonly filters: () => readonly ["sifa", "search", "filters"];
610
984
  };
611
985
  readonly discovery: {
@@ -653,7 +1027,7 @@ declare const sifaQueryKeys: {
653
1027
  readonly myVotes: () => readonly ["sifa", "roadmap", "my-votes"];
654
1028
  };
655
1029
  };
656
- 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>;
1030
+ type SifaQueryKey = ReturnType<typeof sifaQueryKeys.all> | ReturnType<typeof sifaQueryKeys.profile.all> | ReturnType<typeof sifaQueryKeys.profile.byHandle> | ReturnType<typeof sifaQueryKeys.profile.atFundLink> | ReturnType<typeof sifaQueryKeys.profile.externalAccounts> | ReturnType<typeof sifaQueryKeys.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | ReturnType<typeof sifaQueryKeys.search.all> | ReturnType<typeof sifaQueryKeys.search.profiles> | ReturnType<typeof sifaQueryKeys.search.canonicalSkills> | 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>;
657
1031
 
658
1032
  /**
659
1033
  * React hook that reads an aggregated profile by handle or DID via
@@ -669,6 +1043,26 @@ declare function useProfile(handleOrDid: string | undefined | null, options?: Om
669
1043
  */
670
1044
  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>;
671
1045
 
1046
+ /**
1047
+ * React hook for updating the authenticated user's profile self record.
1048
+ * On success, invalidates the owner's profile cache.
1049
+ *
1050
+ * The owner identifier (handle or DID) is required so the mutation can
1051
+ * target the right profile cache entry for invalidation.
1052
+ */
1053
+ declare function useUpdateProfileSelf(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, UpdateProfileSelfInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, UpdateProfileSelfInput, unknown>;
1054
+ /** React hook for updating the authenticated user's profile override fields. */
1055
+ declare function useUpdateProfileOverride(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, UpdateProfileOverrideInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, UpdateProfileOverrideInput, unknown>;
1056
+ /** React hook for re-pulling the authenticated user's PDS-side profile. */
1057
+ declare function useRefreshPds(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<RefreshPdsResult, Error, void>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<RefreshPdsResult, Error, void, unknown>;
1058
+ /**
1059
+ * React hook for uploading a new avatar. Pass a `File` (browser) or
1060
+ * `Blob` (Expo) as the mutation variable.
1061
+ */
1062
+ declare function useUploadAvatar(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<UploadAvatarResult, Error, Blob>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<UploadAvatarResult, Error, Blob, unknown>;
1063
+ /** React hook for deleting the avatar override (revert to PDS avatar). */
1064
+ declare function useDeleteAvatarOverride(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, void>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, void, unknown>;
1065
+
672
1066
  /**
673
1067
  * React hook for creating a new position record. On success, invalidates
674
1068
  * the owner's profile cache so the new position is reflected on the next
@@ -679,6 +1073,146 @@ declare function useAtFundLink(did: string | undefined | null, options?: Omit<Us
679
1073
  */
680
1074
  declare function useCreatePosition(ownerDid: string, options?: Omit<UseMutationOptions<CreateResult, Error, Record<string, unknown>>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CreateResult, Error, Record<string, unknown>, unknown>;
681
1075
 
1076
+ /** Variables for {@link useUpdatePosition}. */
1077
+ interface UpdatePositionVariables {
1078
+ rkey: string;
1079
+ data: Record<string, unknown>;
1080
+ }
1081
+ /** React hook for updating a position record. */
1082
+ declare function useUpdatePosition(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, UpdatePositionVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, UpdatePositionVariables, unknown>;
1083
+ /** React hook for deleting a position record. Variable: the `rkey` string. */
1084
+ declare function useDeletePosition(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1085
+ /** React hook for marking a position as primary. Variable: the `rkey` string. */
1086
+ declare function useSetPositionPrimary(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1087
+ /** React hook for clearing the primary flag on a position. */
1088
+ declare function useUnsetPositionPrimary(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1089
+ /** Variables for {@link useLinkSkillToPosition} / {@link useUnlinkSkillFromPosition}. */
1090
+ interface PositionSkillLinkVariables {
1091
+ position: ProfilePosition;
1092
+ skillRef: SkillRef;
1093
+ }
1094
+ /** React hook for linking a skill to a position. Idempotent. */
1095
+ declare function useLinkSkillToPosition(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, PositionSkillLinkVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, PositionSkillLinkVariables, unknown>;
1096
+ /** React hook for unlinking a skill from a position. */
1097
+ declare function useUnlinkSkillFromPosition(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, PositionSkillLinkVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, PositionSkillLinkVariables, unknown>;
1098
+
1099
+ /** React hook for creating an education record. */
1100
+ declare function useCreateEducation(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<CreateResult, Error, Record<string, unknown>>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CreateResult, Error, Record<string, unknown>, unknown>;
1101
+ /** Variables for {@link useUpdateEducation}. */
1102
+ interface UpdateEducationVariables {
1103
+ rkey: string;
1104
+ data: Record<string, unknown>;
1105
+ }
1106
+ /** React hook for updating an education record. */
1107
+ declare function useUpdateEducation(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, UpdateEducationVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, UpdateEducationVariables, unknown>;
1108
+ /** React hook for deleting an education record. Variable: the `rkey` string. */
1109
+ declare function useDeleteEducation(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1110
+
1111
+ /** React hook for creating a skill record. */
1112
+ declare function useCreateSkill(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<CreateResult, Error, Record<string, unknown>>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CreateResult, Error, Record<string, unknown>, unknown>;
1113
+ /** Variables for {@link useUpdateSkill}. */
1114
+ interface UpdateSkillVariables {
1115
+ rkey: string;
1116
+ data: Record<string, unknown>;
1117
+ }
1118
+ /** React hook for updating a skill record. */
1119
+ declare function useUpdateSkill(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, UpdateSkillVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, UpdateSkillVariables, unknown>;
1120
+ /** React hook for deleting a skill record. Variable: the `rkey` string. */
1121
+ declare function useDeleteSkill(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1122
+
1123
+ /** Variables for {@link useCreateRecord}. */
1124
+ interface CreateRecordVariables {
1125
+ collection: string;
1126
+ data: Record<string, unknown>;
1127
+ }
1128
+ /**
1129
+ * Generic record-create escape hatch for collections without a
1130
+ * dedicated section helper (certifications, projects, publications,
1131
+ * volunteering, honors, languages, courses). Prefer the typed helpers
1132
+ * when one exists for the section.
1133
+ */
1134
+ declare function useCreateRecord(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<CreateResult, Error, CreateRecordVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CreateResult, Error, CreateRecordVariables, unknown>;
1135
+ /** Variables for {@link useUpdateRecord}. */
1136
+ interface UpdateRecordVariables {
1137
+ collection: string;
1138
+ rkey: string;
1139
+ data: Record<string, unknown>;
1140
+ }
1141
+ /** Generic record-update escape hatch. See {@link useCreateRecord}. */
1142
+ declare function useUpdateRecord(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, UpdateRecordVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, UpdateRecordVariables, unknown>;
1143
+ /** Variables for {@link useDeleteRecord}. */
1144
+ interface DeleteRecordVariables {
1145
+ collection: string;
1146
+ rkey: string;
1147
+ }
1148
+ /** Generic record-delete escape hatch. See {@link useCreateRecord}. */
1149
+ declare function useDeleteRecord(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, DeleteRecordVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, DeleteRecordVariables, unknown>;
1150
+
1151
+ /** React hook for creating a profile location record. */
1152
+ declare function useCreateProfileLocation(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<CreateResult, Error, ProfileLocationInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CreateResult, Error, ProfileLocationInput, unknown>;
1153
+ /** Variables for {@link useUpdateProfileLocation}. */
1154
+ interface UpdateProfileLocationVariables {
1155
+ rkey: string;
1156
+ data: ProfileLocationInput;
1157
+ }
1158
+ /** React hook for updating a profile location record. */
1159
+ declare function useUpdateProfileLocation(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, UpdateProfileLocationVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, UpdateProfileLocationVariables, unknown>;
1160
+ /** React hook for deleting a profile location record. Variable: the `rkey` string. */
1161
+ declare function useDeleteProfileLocation(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1162
+
1163
+ /** React hook for reading the external-accounts list. Returns `[]` data on error. */
1164
+ declare function useExternalAccounts(handleOrDid: string | undefined | null, options?: Omit<UseQueryOptions<ExternalAccount[], Error, ExternalAccount[], ReturnType<typeof sifaQueryKeys.profile.externalAccounts>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<ExternalAccount[], Error>;
1165
+ /** React hook for creating an external account. */
1166
+ declare function useCreateExternalAccount(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<CreateExternalAccountResult, Error, ExternalAccountInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CreateExternalAccountResult, Error, ExternalAccountInput, unknown>;
1167
+ /** Variables for {@link useUpdateExternalAccount}. */
1168
+ interface UpdateExternalAccountVariables {
1169
+ rkey: string;
1170
+ data: ExternalAccountInput;
1171
+ }
1172
+ /** React hook for updating an external account. */
1173
+ declare function useUpdateExternalAccount(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, UpdateExternalAccountVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, UpdateExternalAccountVariables, unknown>;
1174
+ /** React hook for deleting an external account. Variable: the `rkey` string. */
1175
+ declare function useDeleteExternalAccount(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1176
+ /** React hook for marking an external account primary. */
1177
+ declare function useSetExternalAccountPrimary(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1178
+ /** React hook for clearing the primary flag on an external account. */
1179
+ declare function useUnsetExternalAccountPrimary(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1180
+ /** React hook for running server-side verification of an external account. */
1181
+ declare function useVerifyExternalAccount(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<VerifyExternalAccountResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<VerifyExternalAccountResult, Error, string, unknown>;
1182
+
1183
+ /**
1184
+ * React hook for creating an endorsement of another user's skill. The
1185
+ * mutation needs the endorsed user's handle/DID (not the endorser's)
1186
+ * so the endorsed profile + their endorsement count caches get
1187
+ * invalidated; pass `null` to skip endorsed-profile invalidation
1188
+ * (e.g., if you only know the skill URI).
1189
+ */
1190
+ declare function useCreateEndorsement(endorsedHandleOrDid: string | null, options?: Omit<UseMutationOptions<CreateResult, Error, EndorsementInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<CreateResult, Error, EndorsementInput, unknown>;
1191
+
1192
+ /** React hook for hiding a keytrace claim. Variable: the claim `rkey` string. */
1193
+ declare function useHideKeytraceClaim(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1194
+ /** React hook for unhiding a previously-hidden keytrace claim. */
1195
+ declare function useUnhideKeytraceClaim(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1196
+
1197
+ /** React hook for hiding an ORCID publication. Variable: the `putCode` number. */
1198
+ declare const useHideOrcidPublication: (ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, number, unknown>, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult<WriteResult, Error, number, unknown>;
1199
+ /** React hook for unhiding an ORCID publication. Variable: the `putCode` number. */
1200
+ declare const useUnhideOrcidPublication: (ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, number, unknown>, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult<WriteResult, Error, number, unknown>;
1201
+ /** React hook for hiding a standard publication. Variable: the AT URI string. */
1202
+ declare const useHideStandardPublication: (ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string, unknown>, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1203
+ /** React hook for unhiding a standard publication. Variable: the AT URI string. */
1204
+ declare const useUnhideStandardPublication: (ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string, unknown>, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1205
+ /** React hook for bulk-hiding standard publications. Variable: the URI list. */
1206
+ declare const useBulkHideStandardPublications: (ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string[], unknown>, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult<WriteResult, Error, string[], unknown>;
1207
+ /** React hook for bulk-unhiding standard publications. Variable: the URI list. */
1208
+ declare const useBulkUnhideStandardPublications: (ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string[], unknown>, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult<WriteResult, Error, string[], unknown>;
1209
+ /** React hook for hiding a Sifa-authored publication. Variable: the `rkey` string. */
1210
+ declare const useHideSifaPublication: (ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string, unknown>, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1211
+ /** React hook for unhiding a Sifa-authored publication. Variable: the `rkey` string. */
1212
+ declare const useUnhideSifaPublication: (ownerHandleOrDid: string, options?: Omit<UseMutationOptions<WriteResult, Error, string, unknown>, "mutationFn"> | undefined) => _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1213
+ /** React hook for re-pulling ORCID publications. */
1214
+ declare function useRefreshOrcidPublications(ownerHandleOrDid: string, options?: Omit<UseMutationOptions<RefreshOrcidPublicationsResult, Error, void>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<RefreshOrcidPublicationsResult, Error, void, unknown>;
1215
+
682
1216
  /**
683
1217
  * React hook for the public homepage stats. Returns `null` data on error.
684
1218
  */
@@ -694,6 +1228,13 @@ declare function useHiddenApps(options?: Omit<UseQueryOptions<HiddenApp[], Error
694
1228
 
695
1229
  declare function useSearchProfiles(filters: SearchFilters, options?: Omit<UseQueryOptions<SearchResponse, Error, SearchResponse, ReturnType<typeof sifaQueryKeys.search.profiles>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<SearchResponse, Error>;
696
1230
  declare function useSkillSuggestions(query: string, options?: Omit<UseQueryOptions<SkillSearchResult[], Error, SkillSearchResult[], ReturnType<typeof sifaQueryKeys.search.skills>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<SkillSearchResult[], Error>;
1231
+ /**
1232
+ * Canonical-skill search hook. Hits `/api/skills/search` (the
1233
+ * canonical-skills DB lookup, distinct from {@link useSkillSuggestions}'s
1234
+ * `/api/search/skills` profile-skill typeahead). Skips the network call
1235
+ * when the query is empty.
1236
+ */
1237
+ declare function useCanonicalSkillSearch(query: string, limit?: number, options?: Omit<UseQueryOptions<SkillSuggestion[], Error, SkillSuggestion[], ReturnType<typeof sifaQueryKeys.search.canonicalSkills>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<SkillSuggestion[], Error>;
697
1238
  declare function useSearchFilters(options?: Omit<UseQueryOptions<FilterOptions, Error, FilterOptions, ReturnType<typeof sifaQueryKeys.search.filters>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<FilterOptions, Error>;
698
1239
 
699
1240
  declare function useSimilarProfiles(did: string | undefined | null, opts?: {
@@ -730,9 +1271,68 @@ declare function useReactionStatus(uris: string[], options?: Omit<UseQueryOption
730
1271
  /** Check whether the authenticated viewer has an account on the given app. */
731
1272
  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>;
732
1273
 
1274
+ /** Variables for {@link useCreateReaction}. */
1275
+ interface CreateReactionVariables {
1276
+ targetUri: string;
1277
+ appId: string;
1278
+ targetCid?: string;
1279
+ }
1280
+ type CreateReactionMutationResult = {
1281
+ ok: true;
1282
+ data: ReactionResult;
1283
+ } | {
1284
+ ok: false;
1285
+ error: ReactionError;
1286
+ };
1287
+ /**
1288
+ * React hook for creating a reaction. Returns the discriminated-union
1289
+ * result so the caller can detect `scope_insufficient` and trigger an
1290
+ * OAuth scope-upgrade flow.
1291
+ *
1292
+ * Invalidates the entire `sifaQueryKeys.reactions.all()` subtree on
1293
+ * success (any cached `useReactionStatus` view that includes the new
1294
+ * URI needs a refresh).
1295
+ */
1296
+ declare function useCreateReaction(options?: Omit<UseMutationOptions<CreateReactionMutationResult, Error, CreateReactionVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<{
1297
+ ok: true;
1298
+ data: ReactionResult;
1299
+ } | {
1300
+ ok: false;
1301
+ error: ReactionError;
1302
+ }, Error, CreateReactionVariables, unknown>;
1303
+ /** Variables for {@link useDeleteReaction}. */
1304
+ interface DeleteReactionVariables {
1305
+ targetUri: string;
1306
+ appId: string;
1307
+ }
1308
+ /** React hook for deleting a reaction. */
1309
+ declare function useDeleteReaction(options?: Omit<UseMutationOptions<WriteResult, Error, DeleteReactionVariables>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, DeleteReactionVariables, unknown>;
1310
+
733
1311
  /** Public roadmap vote tallies. Returns `{}` data on error. */
734
1312
  declare function useRoadmapVotes(options?: Omit<UseQueryOptions<RoadmapVotesResponse, Error, RoadmapVotesResponse, ReturnType<typeof sifaQueryKeys.roadmap.votes>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<RoadmapVotesResponse, Error>;
735
1313
  /** Roadmap items the authenticated viewer has voted on. Returns `[]` data on error. */
736
1314
  declare function useMyRoadmapVotes(options?: Omit<UseQueryOptions<string[], Error, string[], ReturnType<typeof sifaQueryKeys.roadmap.myVotes>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<string[], Error>;
737
1315
 
738
- 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, QUOTED_POSTS_BATCH_MAX, type QuotedPostAuthor, type QuotedPostImage, type QuotedPostResult, type QuotedPostView, type ReactionStatus, type ResolveQuotedPostsOptions, 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, resolveQuotedPosts, 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 };
1316
+ /** React hook for casting a roadmap vote. Variable: the item key. */
1317
+ declare function useCastRoadmapVote(options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1318
+ /** React hook for retracting a previously-cast roadmap vote. */
1319
+ declare function useRetractRoadmapVote(options?: Omit<UseMutationOptions<WriteResult, Error, string>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, string, unknown>;
1320
+
1321
+ /**
1322
+ * React hook for resetting the authenticated user's Sifa profile.
1323
+ * Variable: `deletePdsData` boolean.
1324
+ *
1325
+ * Invalidates the entire `sifaQueryKeys.all()` subtree on success
1326
+ * (everything Sifa-related needs a refresh after a reset).
1327
+ */
1328
+ declare function useResetProfile(options?: Omit<UseMutationOptions<WriteResult, Error, boolean>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult, Error, boolean, unknown>;
1329
+ /**
1330
+ * React hook for deleting the authenticated user's account. Variable:
1331
+ * `deletePdsData` boolean. Returns the deleted handle on success.
1332
+ *
1333
+ * On success, clears the entire query cache (the user is logged out
1334
+ * and nothing they previously cached should be retained).
1335
+ */
1336
+ declare function useDeleteAccount(options?: Omit<UseMutationOptions<DeleteAccountResult, Error, boolean>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<DeleteAccountResult, Error, boolean, unknown>;
1337
+
1338
+ export { type AccountCheckResult, type ActivityFeedResponse, type ActivityItem, type ActivityTeaserResponse, ApiError, type ApiFetchOptions, type AppRegistryEntry, type CheckAppAccountOptions, type CreateExternalAccountResult, type CreateReactionVariables, type CreateRecordVariables, type CreateResult, type DeleteAccountResult, type DeleteReactionVariables, type DeleteRecordVariables, type EndorsementInput, type ExternalAccountInput, 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 PositionSkillLinkVariables, type ProfileIndustryInput, type ProfileLocationAddress, type ProfileLocationInput, type ProfileSearchResult, type ProfileSelfLocation, QUOTED_POSTS_BATCH_MAX, type QuotedPostAuthor, type QuotedPostImage, type QuotedPostResult, type QuotedPostView, type ReactionError, type ReactionResult, type ReactionStatus, type RefreshOrcidPublicationsResult, type RefreshPdsResult, type ResolveQuotedPostsOptions, 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 UpdateEducationVariables, type UpdateExternalAccountVariables, type UpdatePositionVariables, type UpdateProfileLocationVariables, type UpdateProfileOverrideInput, type UpdateProfileSelfInput, type UpdateRecordVariables, type UpdateSkillVariables, type UploadAvatarResult, type VerifyExternalAccountResult, type WriteResult, apiFetch, apiFetchOrNull, apiWrite, apiWriteCreate, bulkHideStandardPublications, bulkUnhideStandardPublications, castRoadmapVote, checkAppAccount, createEducation, createEndorsement, createExternalAccount, createPosition, createProfileLocation, createReaction, createRecord, createSkill, deleteAccount, deleteAvatarOverride, deleteEducation, deleteExternalAccount, deletePosition, deleteProfileLocation, deleteReaction, deleteRecord, deleteSkill, fetchActivityFeed, fetchActivityTeaser, fetchAppsRegistry, fetchAtFundLink, fetchEndorsementCount, fetchExternalAccounts, fetchFeaturedProfile, fetchFollowing, fetchHeatmapData, fetchHiddenApps, fetchMyRoadmapVotes, fetchNetworkStreamCount, fetchProfile, fetchReactionStatus, fetchRoadmapVotes, fetchSearchFilters, fetchSearchProfiles, fetchSimilarProfiles, fetchSkillSuggestions, fetchStats, fetchSuggestionCount, fetchSuggestions, hideKeytraceClaim, hideOrcidPublication, hideSifaPublication, hideStandardPublication, linkSkillToPosition, refreshOrcidPublications, refreshPds, resetProfile, resolveQuotedPosts, retractRoadmapVote, searchSkills, setExternalAccountPrimary, setPositionPrimary, sifaQueryKeys, unhideKeytraceClaim, unhideOrcidPublication, unhideSifaPublication, unhideStandardPublication, unlinkSkillFromPosition, unsetExternalAccountPrimary, unsetPositionPrimary, updateEducation, updateExternalAccount, updatePosition, updateProfileLocation, updateProfileOverride, updateProfileSelf, updateRecord, updateSkill, uploadAvatar, useActivityFeed, useActivityTeaser, useAppAccountCheck, useAppsRegistry, useAtFundLink, useBulkHideStandardPublications, useBulkUnhideStandardPublications, useCanonicalSkillSearch, useCastRoadmapVote, useCreateEducation, useCreateEndorsement, useCreateExternalAccount, useCreatePosition, useCreateProfileLocation, useCreateReaction, useCreateRecord, useCreateSkill, useDeleteAccount, useDeleteAvatarOverride, useDeleteEducation, useDeleteExternalAccount, useDeletePosition, useDeleteProfileLocation, useDeleteReaction, useDeleteRecord, useDeleteSkill, useEndorsementCount, useExternalAccounts, useFeaturedProfile, useFollowing, useHeatmapData, useHiddenApps, useHideKeytraceClaim, useHideOrcidPublication, useHideSifaPublication, useHideStandardPublication, useLinkSkillToPosition, useMyRoadmapVotes, useNetworkStreamCount, useProfile, useReactionStatus, useRefreshOrcidPublications, useRefreshPds, useResetProfile, useRetractRoadmapVote, useRoadmapVotes, useSearchFilters, useSearchProfiles, useSetExternalAccountPrimary, useSetPositionPrimary, useSifaConfig, useSimilarProfiles, useSkillSuggestions, useStats, useSuggestionCount, useSuggestions, useUnhideKeytraceClaim, useUnhideOrcidPublication, useUnhideSifaPublication, useUnhideStandardPublication, useUnlinkSkillFromPosition, useUnsetExternalAccountPrimary, useUnsetPositionPrimary, useUpdateEducation, useUpdateExternalAccount, useUpdatePosition, useUpdateProfileLocation, useUpdateProfileOverride, useUpdateProfileSelf, useUpdateRecord, useUpdateSkill, useUploadAvatar, useVerifyExternalAccount, verifyExternalAccount };