@singi-labs/sifa-sdk 0.12.38 → 0.12.39
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/badge/index.cjs +3 -0
- package/dist/badge/index.cjs.map +1 -1
- package/dist/badge/index.js +3 -0
- package/dist/badge/index.js.map +1 -1
- package/dist/{index-G5HiA-nk.d.cts → index-BPImvVQq.d.cts} +44 -2
- package/dist/{index-N0-ctbY1.d.ts → index-C1szgnQc.d.ts} +44 -2
- package/dist/{index-C-TwdQWh.d.cts → index-CO3z2uAZ.d.cts} +1 -1
- package/dist/{index-DzjbfKwZ.d.ts → index-DyffAaPT.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{org-OPyzh-oe.d.cts → org-DPfmXSYv.d.cts} +24 -2
- package/dist/{org-BFi9g37U.d.ts → org-dEe3TbBJ.d.ts} +24 -2
- package/dist/query/fetchers/index.cjs +32 -2
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +2 -2
- package/dist/query/fetchers/index.d.ts +2 -2
- package/dist/query/fetchers/index.js +30 -3
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +8 -2
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +2 -2
- package/dist/query/hooks/index.d.ts +2 -2
- package/dist/query/hooks/index.js +8 -2
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +83 -2
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +28 -6
- package/dist/query/index.d.ts +28 -6
- package/dist/query/index.js +78 -3
- package/dist/query/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -292,9 +292,24 @@ declare function verifyExternalAccount(config: SifaApiConfig, rkey: string, opti
|
|
|
292
292
|
|
|
293
293
|
/** Body accepted by {@link createEndorsement}. */
|
|
294
294
|
interface EndorsementInput {
|
|
295
|
+
/** DID of the person being endorsed. */
|
|
296
|
+
subjectDid: string;
|
|
297
|
+
/** AT-URI of the subject's `id.sifa.profile.skill` record. */
|
|
295
298
|
skillUri: string;
|
|
299
|
+
/** CID of that skill record, pinning the endorsement to the version endorsed. */
|
|
300
|
+
skillCid: string;
|
|
301
|
+
/**
|
|
302
|
+
* Snapshot of the skill's name at endorsement time. Acts as the validity
|
|
303
|
+
* anchor: if the subject later renames the skill, the mismatch is detectable.
|
|
304
|
+
*/
|
|
305
|
+
skillName: string;
|
|
296
306
|
comment?: string;
|
|
297
307
|
}
|
|
308
|
+
/** Body accepted by {@link confirmEndorsement}. */
|
|
309
|
+
interface ConfirmEndorsementInput {
|
|
310
|
+
endorsementUri: string;
|
|
311
|
+
endorsementCid: string;
|
|
312
|
+
}
|
|
298
313
|
/**
|
|
299
314
|
* Create an endorsement of another user's skill. The endorsed user
|
|
300
315
|
* must confirm before the endorsement appears on their profile (the
|
|
@@ -302,6 +317,12 @@ interface EndorsementInput {
|
|
|
302
317
|
* record on the endorsed user's PDS gates display).
|
|
303
318
|
*/
|
|
304
319
|
declare function createEndorsement(config: SifaApiConfig, data: EndorsementInput, options?: ApiFetchOptions): Promise<CreateResult>;
|
|
320
|
+
/**
|
|
321
|
+
* Confirm a received endorsement, writing a confirmation record to the
|
|
322
|
+
* signed-in user's PDS. This is what makes the endorsement public: until the
|
|
323
|
+
* confirmation exists, the endorsement is indexed but displays nowhere.
|
|
324
|
+
*/
|
|
325
|
+
declare function confirmEndorsement(config: SifaApiConfig, data: ConfirmEndorsementInput, options?: ApiFetchOptions): Promise<CreateResult>;
|
|
305
326
|
|
|
306
327
|
/** Extended result for {@link refreshOrcidPublications}. */
|
|
307
328
|
interface RefreshOrcidPublicationsResult extends WriteResult {
|
|
@@ -1271,6 +1292,7 @@ declare const sifaQueryKeys: {
|
|
|
1271
1292
|
readonly endorsement: {
|
|
1272
1293
|
readonly all: () => readonly ["sifa", "endorsement"];
|
|
1273
1294
|
readonly count: (did: string) => readonly ["sifa", "endorsement", "count", string];
|
|
1295
|
+
readonly pending: () => readonly ["sifa", "endorsement", "pending"];
|
|
1274
1296
|
};
|
|
1275
1297
|
readonly stream: {
|
|
1276
1298
|
readonly all: () => readonly ["sifa", "stream"];
|
|
@@ -1295,7 +1317,7 @@ declare const sifaQueryKeys: {
|
|
|
1295
1317
|
readonly wipePreview: () => readonly ["sifa", "destructive", "wipe-preview"];
|
|
1296
1318
|
};
|
|
1297
1319
|
};
|
|
1298
|
-
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.entity.all> | ReturnType<typeof sifaQueryKeys.entity.search> | 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.follow.followers> | ReturnType<typeof sifaQueryKeys.follow.followingOf> | ReturnType<typeof sifaQueryKeys.follow.feed> | ReturnType<typeof sifaQueryKeys.follow.mutuals> | ReturnType<typeof sifaQueryKeys.follow.blueskySuggestions> | ReturnType<typeof sifaQueryKeys.admin.all> | ReturnType<typeof sifaQueryKeys.admin.featureAllowlist> | 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> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels> | ReturnType<typeof sifaQueryKeys.destructive.all> | ReturnType<typeof sifaQueryKeys.destructive.wipePreview>;
|
|
1320
|
+
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.entity.all> | ReturnType<typeof sifaQueryKeys.entity.search> | 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.follow.followers> | ReturnType<typeof sifaQueryKeys.follow.followingOf> | ReturnType<typeof sifaQueryKeys.follow.feed> | ReturnType<typeof sifaQueryKeys.follow.mutuals> | ReturnType<typeof sifaQueryKeys.follow.blueskySuggestions> | ReturnType<typeof sifaQueryKeys.admin.all> | ReturnType<typeof sifaQueryKeys.admin.featureAllowlist> | 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.endorsement.pending> | 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> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels> | ReturnType<typeof sifaQueryKeys.destructive.all> | ReturnType<typeof sifaQueryKeys.destructive.wipePreview>;
|
|
1299
1321
|
|
|
1300
1322
|
/** How a single entity binding was resolved during a claim. */
|
|
1301
1323
|
interface OrgClaimBinding {
|
|
@@ -1382,4 +1404,4 @@ declare function addOrgNotificationEmail(config: SifaApiConfig, body: OrgNotific
|
|
|
1382
1404
|
*/
|
|
1383
1405
|
declare function removeOrgNotificationEmail(config: SifaApiConfig, body: OrgNotificationEmailRequestInput, options?: Omit<ApiFetchOptions, 'method' | 'body'>): Promise<WriteResult & Partial<OrgNotificationEmailRemoveResult>>;
|
|
1384
1406
|
|
|
1385
|
-
export { type
|
|
1407
|
+
export { type OrgNotificationEmailAddResult as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CreateResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FollowProfile as G, type FollowProfilePageResponse as H, type FollowUserResult as I, type FollowingResponse as J, type GithubPullRequest as K, HIDDEN_ITEM_SOURCES as L, HIDDEN_ITEM_TYPES as M, type HeatmapDay as N, type HeatmapResponse as O, type HiddenApp as P, type HiddenItemSource as Q, type HiddenItemType as R, type SifaApiConfig as S, type HideProfileItemInput as T, type ListFeatureAllowlistOptions as U, type MyGithubPullRequestsResponse as V, type WriteResult as W, type OrgClaimBinding as X, type OrgClaimResult as Y, type OrgDomainChallengeResult as Z, type OrgDomainVerifyResult as _, type ConfirmEndorsementInput as a, fetchActivityFeed as a$, type OrgNotificationEmailRemoveResult as a0, type OrgProfileEcho as a1, type OrgProfileUpdateResult as a2, type PdsWipeOutcome as a3, type ProfileIndustryInput as a4, type ProfileLocationAddress as a5, type ProfileLocationInput as a6, type ProfileSearchResult as a7, type ProfileSelfLocation as a8, QUOTED_POSTS_BATCH_MAX as a9, type UploadAvatarResult as aA, type VerifyExternalAccountResult as aB, type WipePreview as aC, addFeatureAllowlist as aD, addOrgNotificationEmail as aE, apiFetch as aF, apiFetchOrNull as aG, apiWrite as aH, apiWriteCreate as aI, bulkHideProfileItems as aJ, bulkHideStandardPublications as aK, bulkUnhideProfileItems as aL, bulkUnhideStandardPublications as aM, castRoadmapVote as aN, checkAppAccount as aO, confirmEndorsement as aP, createEndorsement as aQ, createExternalAccount as aR, createProfileLocation as aS, createReaction as aT, createSkill as aU, deleteAccount as aV, deleteAvatarOverride as aW, deleteExternalAccount as aX, deleteProfileLocation as aY, deleteReaction as aZ, deleteSkill as a_, type QuotedPostAuthor as aa, type QuotedPostImage as ab, type QuotedPostResult as ac, type QuotedPostView as ad, type ReactionError as ae, type ReactionResult as af, type ReactionStatus as ag, type RefreshOrcidPublicationsResult as ah, type RefreshPdsResult as ai, type ResetProfileResult as aj, type ResolveQuotedPostsOptions as ak, type RoadmapVoteError as al, type RoadmapVoteResult as am, type RoadmapVoter as an, type RoadmapVotesResponse as ao, type SearchFilters as ap, type SearchResponse as aq, type SifaQueryKey as ar, type SimilarProfile as as, type SkillSearchResult as at, type StatsResponse as au, type SubCategoryBulkResult as av, type SuggestionProfile as aw, type SuggestionsResponse as ax, type UpdateProfileOverrideInput as ay, type UpdateProfileSelfInput as az, type AccountCheckResult as b, fetchActivityTeaser as b0, fetchAppsRegistry as b1, fetchExternalAccounts as b2, fetchFeaturedProfile as b3, fetchFollowing as b4, fetchHeatmapData as b5, fetchHiddenApps as b6, fetchMyGithubPullRequests as b7, fetchMyRoadmapVotes as b8, fetchReactionStatus as b9, resolveQuotedPosts as bA, retractRoadmapVote as bB, searchSkills as bC, setExternalAccountPrimary as bD, submitOrgClaim as bE, unfollowUser as bF, unhideOrcidPublication as bG, unhideProfileItem as bH, unhideSifaPublication as bI, unhideStandardPublication as bJ, unsetExternalAccountPrimary as bK, updateExternalAccount as bL, updateOrgProfile as bM, updateProfileLocation as bN, updateProfileOverride as bO, updateProfileSelf as bP, updateSkill as bQ, updateSkillSubCategories as bR, uploadAvatar as bS, verifyExternalAccount as bT, verifyOrgDomain as bU, fetchRoadmapVotes as ba, fetchSearchFilters as bb, fetchSearchProfiles as bc, fetchSimilarProfiles as bd, fetchSkillSuggestions as be, fetchStats as bf, fetchSuggestionCount as bg, fetchSuggestions as bh, fetchWipePreview as bi, followUser as bj, getBlueskySuggestions as bk, getFollowers as bl, getFollowing as bm, getFollowingFeed as bn, getMutuals as bo, hideOrcidPublication as bp, hideProfileItem as bq, hideSifaPublication as br, hideStandardPublication as bs, listFeatureAllowlist as bt, refreshOrcidPublications as bu, refreshPds as bv, removeFeatureAllowlist as bw, removeOrgNotificationEmail as bx, requestOrgDomainChallenge as by, resetProfile as bz, type ActivityFeedResponse as c, type ActivityItem as d, type ActivityItemLinkHealth as e, type ActivityTeaserResponse as f, ApiError as g, type AppRegistryEntry as h, type CastRoadmapVoteResult as i, type CheckAppAccountOptions as j, type CreateExternalAccountResult as k, type ExternalAccountInput as l, type FeaturedProfile as m, type FetchActivityFeedOptions as n, type FetchActivityTeaserOptions as o, type FetchFollowListOptions as p, type FetchFollowProfilePageOptions as q, type FetchFollowingFeedOptions as r, sifaQueryKeys as s, type FetchHiddenAppsOptions as t, type FetchMyGithubPullRequestsOptions as u, type FetchMyRoadmapVotesOptions as v, type FetchReactionStatusOptions as w, type FetchSuggestionsOptions as x, type FilterOptions as y, type FollowListPage as z };
|
|
@@ -292,9 +292,24 @@ declare function verifyExternalAccount(config: SifaApiConfig, rkey: string, opti
|
|
|
292
292
|
|
|
293
293
|
/** Body accepted by {@link createEndorsement}. */
|
|
294
294
|
interface EndorsementInput {
|
|
295
|
+
/** DID of the person being endorsed. */
|
|
296
|
+
subjectDid: string;
|
|
297
|
+
/** AT-URI of the subject's `id.sifa.profile.skill` record. */
|
|
295
298
|
skillUri: string;
|
|
299
|
+
/** CID of that skill record, pinning the endorsement to the version endorsed. */
|
|
300
|
+
skillCid: string;
|
|
301
|
+
/**
|
|
302
|
+
* Snapshot of the skill's name at endorsement time. Acts as the validity
|
|
303
|
+
* anchor: if the subject later renames the skill, the mismatch is detectable.
|
|
304
|
+
*/
|
|
305
|
+
skillName: string;
|
|
296
306
|
comment?: string;
|
|
297
307
|
}
|
|
308
|
+
/** Body accepted by {@link confirmEndorsement}. */
|
|
309
|
+
interface ConfirmEndorsementInput {
|
|
310
|
+
endorsementUri: string;
|
|
311
|
+
endorsementCid: string;
|
|
312
|
+
}
|
|
298
313
|
/**
|
|
299
314
|
* Create an endorsement of another user's skill. The endorsed user
|
|
300
315
|
* must confirm before the endorsement appears on their profile (the
|
|
@@ -302,6 +317,12 @@ interface EndorsementInput {
|
|
|
302
317
|
* record on the endorsed user's PDS gates display).
|
|
303
318
|
*/
|
|
304
319
|
declare function createEndorsement(config: SifaApiConfig, data: EndorsementInput, options?: ApiFetchOptions): Promise<CreateResult>;
|
|
320
|
+
/**
|
|
321
|
+
* Confirm a received endorsement, writing a confirmation record to the
|
|
322
|
+
* signed-in user's PDS. This is what makes the endorsement public: until the
|
|
323
|
+
* confirmation exists, the endorsement is indexed but displays nowhere.
|
|
324
|
+
*/
|
|
325
|
+
declare function confirmEndorsement(config: SifaApiConfig, data: ConfirmEndorsementInput, options?: ApiFetchOptions): Promise<CreateResult>;
|
|
305
326
|
|
|
306
327
|
/** Extended result for {@link refreshOrcidPublications}. */
|
|
307
328
|
interface RefreshOrcidPublicationsResult extends WriteResult {
|
|
@@ -1271,6 +1292,7 @@ declare const sifaQueryKeys: {
|
|
|
1271
1292
|
readonly endorsement: {
|
|
1272
1293
|
readonly all: () => readonly ["sifa", "endorsement"];
|
|
1273
1294
|
readonly count: (did: string) => readonly ["sifa", "endorsement", "count", string];
|
|
1295
|
+
readonly pending: () => readonly ["sifa", "endorsement", "pending"];
|
|
1274
1296
|
};
|
|
1275
1297
|
readonly stream: {
|
|
1276
1298
|
readonly all: () => readonly ["sifa", "stream"];
|
|
@@ -1295,7 +1317,7 @@ declare const sifaQueryKeys: {
|
|
|
1295
1317
|
readonly wipePreview: () => readonly ["sifa", "destructive", "wipe-preview"];
|
|
1296
1318
|
};
|
|
1297
1319
|
};
|
|
1298
|
-
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.entity.all> | ReturnType<typeof sifaQueryKeys.entity.search> | 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.follow.followers> | ReturnType<typeof sifaQueryKeys.follow.followingOf> | ReturnType<typeof sifaQueryKeys.follow.feed> | ReturnType<typeof sifaQueryKeys.follow.mutuals> | ReturnType<typeof sifaQueryKeys.follow.blueskySuggestions> | ReturnType<typeof sifaQueryKeys.admin.all> | ReturnType<typeof sifaQueryKeys.admin.featureAllowlist> | 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> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels> | ReturnType<typeof sifaQueryKeys.destructive.all> | ReturnType<typeof sifaQueryKeys.destructive.wipePreview>;
|
|
1320
|
+
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.entity.all> | ReturnType<typeof sifaQueryKeys.entity.search> | 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.follow.followers> | ReturnType<typeof sifaQueryKeys.follow.followingOf> | ReturnType<typeof sifaQueryKeys.follow.feed> | ReturnType<typeof sifaQueryKeys.follow.mutuals> | ReturnType<typeof sifaQueryKeys.follow.blueskySuggestions> | ReturnType<typeof sifaQueryKeys.admin.all> | ReturnType<typeof sifaQueryKeys.admin.featureAllowlist> | 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.endorsement.pending> | 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> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels> | ReturnType<typeof sifaQueryKeys.destructive.all> | ReturnType<typeof sifaQueryKeys.destructive.wipePreview>;
|
|
1299
1321
|
|
|
1300
1322
|
/** How a single entity binding was resolved during a claim. */
|
|
1301
1323
|
interface OrgClaimBinding {
|
|
@@ -1382,4 +1404,4 @@ declare function addOrgNotificationEmail(config: SifaApiConfig, body: OrgNotific
|
|
|
1382
1404
|
*/
|
|
1383
1405
|
declare function removeOrgNotificationEmail(config: SifaApiConfig, body: OrgNotificationEmailRequestInput, options?: Omit<ApiFetchOptions, 'method' | 'body'>): Promise<WriteResult & Partial<OrgNotificationEmailRemoveResult>>;
|
|
1384
1406
|
|
|
1385
|
-
export { type
|
|
1407
|
+
export { type OrgNotificationEmailAddResult as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CreateResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FollowProfile as G, type FollowProfilePageResponse as H, type FollowUserResult as I, type FollowingResponse as J, type GithubPullRequest as K, HIDDEN_ITEM_SOURCES as L, HIDDEN_ITEM_TYPES as M, type HeatmapDay as N, type HeatmapResponse as O, type HiddenApp as P, type HiddenItemSource as Q, type HiddenItemType as R, type SifaApiConfig as S, type HideProfileItemInput as T, type ListFeatureAllowlistOptions as U, type MyGithubPullRequestsResponse as V, type WriteResult as W, type OrgClaimBinding as X, type OrgClaimResult as Y, type OrgDomainChallengeResult as Z, type OrgDomainVerifyResult as _, type ConfirmEndorsementInput as a, fetchActivityFeed as a$, type OrgNotificationEmailRemoveResult as a0, type OrgProfileEcho as a1, type OrgProfileUpdateResult as a2, type PdsWipeOutcome as a3, type ProfileIndustryInput as a4, type ProfileLocationAddress as a5, type ProfileLocationInput as a6, type ProfileSearchResult as a7, type ProfileSelfLocation as a8, QUOTED_POSTS_BATCH_MAX as a9, type UploadAvatarResult as aA, type VerifyExternalAccountResult as aB, type WipePreview as aC, addFeatureAllowlist as aD, addOrgNotificationEmail as aE, apiFetch as aF, apiFetchOrNull as aG, apiWrite as aH, apiWriteCreate as aI, bulkHideProfileItems as aJ, bulkHideStandardPublications as aK, bulkUnhideProfileItems as aL, bulkUnhideStandardPublications as aM, castRoadmapVote as aN, checkAppAccount as aO, confirmEndorsement as aP, createEndorsement as aQ, createExternalAccount as aR, createProfileLocation as aS, createReaction as aT, createSkill as aU, deleteAccount as aV, deleteAvatarOverride as aW, deleteExternalAccount as aX, deleteProfileLocation as aY, deleteReaction as aZ, deleteSkill as a_, type QuotedPostAuthor as aa, type QuotedPostImage as ab, type QuotedPostResult as ac, type QuotedPostView as ad, type ReactionError as ae, type ReactionResult as af, type ReactionStatus as ag, type RefreshOrcidPublicationsResult as ah, type RefreshPdsResult as ai, type ResetProfileResult as aj, type ResolveQuotedPostsOptions as ak, type RoadmapVoteError as al, type RoadmapVoteResult as am, type RoadmapVoter as an, type RoadmapVotesResponse as ao, type SearchFilters as ap, type SearchResponse as aq, type SifaQueryKey as ar, type SimilarProfile as as, type SkillSearchResult as at, type StatsResponse as au, type SubCategoryBulkResult as av, type SuggestionProfile as aw, type SuggestionsResponse as ax, type UpdateProfileOverrideInput as ay, type UpdateProfileSelfInput as az, type AccountCheckResult as b, fetchActivityTeaser as b0, fetchAppsRegistry as b1, fetchExternalAccounts as b2, fetchFeaturedProfile as b3, fetchFollowing as b4, fetchHeatmapData as b5, fetchHiddenApps as b6, fetchMyGithubPullRequests as b7, fetchMyRoadmapVotes as b8, fetchReactionStatus as b9, resolveQuotedPosts as bA, retractRoadmapVote as bB, searchSkills as bC, setExternalAccountPrimary as bD, submitOrgClaim as bE, unfollowUser as bF, unhideOrcidPublication as bG, unhideProfileItem as bH, unhideSifaPublication as bI, unhideStandardPublication as bJ, unsetExternalAccountPrimary as bK, updateExternalAccount as bL, updateOrgProfile as bM, updateProfileLocation as bN, updateProfileOverride as bO, updateProfileSelf as bP, updateSkill as bQ, updateSkillSubCategories as bR, uploadAvatar as bS, verifyExternalAccount as bT, verifyOrgDomain as bU, fetchRoadmapVotes as ba, fetchSearchFilters as bb, fetchSearchProfiles as bc, fetchSimilarProfiles as bd, fetchSkillSuggestions as be, fetchStats as bf, fetchSuggestionCount as bg, fetchSuggestions as bh, fetchWipePreview as bi, followUser as bj, getBlueskySuggestions as bk, getFollowers as bl, getFollowing as bm, getFollowingFeed as bn, getMutuals as bo, hideOrcidPublication as bp, hideProfileItem as bq, hideSifaPublication as br, hideStandardPublication as bs, listFeatureAllowlist as bt, refreshOrcidPublications as bu, refreshPds as bv, removeFeatureAllowlist as bw, removeOrgNotificationEmail as bx, requestOrgDomainChallenge as by, resetProfile as bz, type ActivityFeedResponse as c, type ActivityItem as d, type ActivityItemLinkHealth as e, type ActivityTeaserResponse as f, ApiError as g, type AppRegistryEntry as h, type CastRoadmapVoteResult as i, type CheckAppAccountOptions as j, type CreateExternalAccountResult as k, type ExternalAccountInput as l, type FeaturedProfile as m, type FetchActivityFeedOptions as n, type FetchActivityTeaserOptions as o, type FetchFollowListOptions as p, type FetchFollowProfilePageOptions as q, type FetchFollowingFeedOptions as r, sifaQueryKeys as s, type FetchHiddenAppsOptions as t, type FetchMyGithubPullRequestsOptions as u, type FetchMyRoadmapVotesOptions as v, type FetchReactionStatusOptions as w, type FetchSuggestionsOptions as x, type FilterOptions as y, type FollowListPage as z };
|
|
@@ -69,6 +69,9 @@ async function apiFetch(config, path, options = {}) {
|
|
|
69
69
|
}
|
|
70
70
|
throw new ApiError(`Sifa API ${res.status} on ${path}`, res.status, errBody);
|
|
71
71
|
}
|
|
72
|
+
if (res.status === 204 || res.status === 205) {
|
|
73
|
+
return void 0;
|
|
74
|
+
}
|
|
72
75
|
return await res.json();
|
|
73
76
|
}
|
|
74
77
|
throw new ApiError(`Sifa API exhausted retries on ${path}`, 429);
|
|
@@ -375,7 +378,28 @@ function verifyExternalAccount(config, rkey, options = {}) {
|
|
|
375
378
|
|
|
376
379
|
// src/query/fetchers/endorsements.ts
|
|
377
380
|
function createEndorsement(config, data, options = {}) {
|
|
378
|
-
return apiWriteCreate(config, "/api/
|
|
381
|
+
return apiWriteCreate(config, "/api/endorsement", data, options);
|
|
382
|
+
}
|
|
383
|
+
function confirmEndorsement(config, data, options = {}) {
|
|
384
|
+
return apiWriteCreate(config, "/api/endorsement/confirm", data, options);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// src/query/fetchers/endorsement-inbox.ts
|
|
388
|
+
async function fetchPendingEndorsements(config, options = {}) {
|
|
389
|
+
try {
|
|
390
|
+
const data = await apiFetch(config, "/api/endorsements/pending", {
|
|
391
|
+
cache: "no-store",
|
|
392
|
+
credentials: "include",
|
|
393
|
+
timeoutMs: 5e3,
|
|
394
|
+
...options
|
|
395
|
+
});
|
|
396
|
+
return { endorsements: data?.endorsements ?? [], cursor: data?.cursor };
|
|
397
|
+
} catch {
|
|
398
|
+
return { endorsements: [] };
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
function dismissEndorsement(config, data, options = {}) {
|
|
402
|
+
return apiWrite(config, "/api/endorsement/dismiss", "POST", { body: data, ...options });
|
|
379
403
|
}
|
|
380
404
|
|
|
381
405
|
// src/query/fetchers/keytrace-claims.ts
|
|
@@ -1400,7 +1424,10 @@ var sifaQueryKeys = {
|
|
|
1400
1424
|
},
|
|
1401
1425
|
endorsement: {
|
|
1402
1426
|
all: () => ["sifa", "endorsement"],
|
|
1403
|
-
count: (did) => ["sifa", "endorsement", "count", did]
|
|
1427
|
+
count: (did) => ["sifa", "endorsement", "count", did],
|
|
1428
|
+
// Scoped to the session rather than a DID -- the AppView reads the subject
|
|
1429
|
+
// from the session cookie, so there is only ever one inbox per client.
|
|
1430
|
+
pending: () => ["sifa", "endorsement", "pending"]
|
|
1404
1431
|
},
|
|
1405
1432
|
stream: {
|
|
1406
1433
|
all: () => ["sifa", "stream"],
|
|
@@ -1443,6 +1470,7 @@ exports.bulkUnhideStandardPublications = bulkUnhideStandardPublications;
|
|
|
1443
1470
|
exports.castRoadmapVote = castRoadmapVote;
|
|
1444
1471
|
exports.checkAppAccount = checkAppAccount;
|
|
1445
1472
|
exports.checkNetworkMapJobStatus = checkNetworkMapJobStatus;
|
|
1473
|
+
exports.confirmEndorsement = confirmEndorsement;
|
|
1446
1474
|
exports.createEducation = createEducation;
|
|
1447
1475
|
exports.createEndorsement = createEndorsement;
|
|
1448
1476
|
exports.createExternalAccount = createExternalAccount;
|
|
@@ -1460,6 +1488,7 @@ exports.deleteProfileLocation = deleteProfileLocation;
|
|
|
1460
1488
|
exports.deleteReaction = deleteReaction;
|
|
1461
1489
|
exports.deleteRecord = deleteRecord;
|
|
1462
1490
|
exports.deleteSkill = deleteSkill;
|
|
1491
|
+
exports.dismissEndorsement = dismissEndorsement;
|
|
1463
1492
|
exports.fetchActivityFeed = fetchActivityFeed;
|
|
1464
1493
|
exports.fetchActivityTeaser = fetchActivityTeaser;
|
|
1465
1494
|
exports.fetchAppsRegistry = fetchAppsRegistry;
|
|
@@ -1476,6 +1505,7 @@ exports.fetchMyGithubPullRequests = fetchMyGithubPullRequests;
|
|
|
1476
1505
|
exports.fetchMyRoadmapVotes = fetchMyRoadmapVotes;
|
|
1477
1506
|
exports.fetchNetworkMap = fetchNetworkMap;
|
|
1478
1507
|
exports.fetchNetworkStreamCount = fetchNetworkStreamCount;
|
|
1508
|
+
exports.fetchPendingEndorsements = fetchPendingEndorsements;
|
|
1479
1509
|
exports.fetchProfile = fetchProfile;
|
|
1480
1510
|
exports.fetchProfileSummary = fetchProfileSummary;
|
|
1481
1511
|
exports.fetchReactionStatus = fetchReactionStatus;
|