@singi-labs/sifa-sdk 0.18.11 → 0.18.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{network-map-CMod-9od.d.ts → network-map-5WbfyFed.d.ts} +12 -3
- package/dist/{network-map-CH37aj_Q.d.cts → network-map-Cwv7SsL0.d.cts} +12 -3
- package/dist/{org-3gFPQ_pC.d.cts → org-BHz9ymjp.d.cts} +122 -4
- package/dist/{org-CTSJ5zTZ.d.ts → org-Bgz5parA.d.ts} +122 -4
- package/dist/query/fetchers/index.cjs +116 -5
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +3 -3
- package/dist/query/fetchers/index.d.ts +3 -3
- package/dist/query/fetchers/index.js +113 -6
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +152 -4
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +3 -3
- package/dist/query/hooks/index.d.ts +3 -3
- package/dist/query/hooks/index.js +150 -5
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +161 -5
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/query/index.js +155 -6
- package/dist/query/index.js.map +1 -1
- package/dist/{use-org-notification-emails-J29DcsSu.d.ts → use-org-notification-emails-C9CWyhSC.d.ts} +24 -2
- package/dist/{use-org-notification-emails-CdRgTAj4.d.cts → use-org-notification-emails-vNekuQKF.d.cts} +24 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from '../../org-
|
|
2
|
-
export { c as AccountCheckResult, d as AccountSummary, e as ActivityFeedResponse, f as ActivityItem, g as ActivityItemLinkHealth, h as ActivityTeaserResponse, i as AdminReviewQueues, j as ApiError, k as AppRegistryEntry, B as BulkHideProfileItemInput, l as CastRoadmapVoteResult, m as CheckAppAccountOptions,
|
|
3
|
-
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, N as NetworkMapEdge,
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from '../../org-BHz9ymjp.cjs';
|
|
2
|
+
export { c as AccountCheckResult, d as AccountSummary, e as ActivityFeedResponse, f as ActivityItem, g as ActivityItemLinkHealth, h as ActivityTeaserResponse, i as AdminReviewQueues, j as ApiError, k as AppRegistryEntry, B as BulkHideProfileItemInput, l as CastRoadmapVoteResult, m as CheckAppAccountOptions, cC as CompanySearchFilters, cD as CompanySearchResponse, cE as CompanySearchResult, a as ConfirmEndorsementInput, n as ConfirmationInput, o as ConfirmationSubjectInput, p as CreateExternalAccountResult, D as DeleteAccountResult, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityTeaserOptions, w as FetchConfirmationsOptions, x as FetchFollowListOptions, y as FetchFollowProfilePageOptions, z as FetchFollowingFeedOptions, G as FetchHiddenActivityItemsOptions, H as FetchHiddenAppsOptions, I as FetchInboxCountsOptions, J as FetchMyGithubPullRequestsOptions, K as FetchMyRoadmapVotesOptions, L as FetchProfileCompletenessOptions, M as FetchReactionStatusOptions, N as FetchSuggestionsOptions, O as FetchUnlinkedPositionsOptions, P as FilterOptions, Q as FollowListPage, R as FollowProfile, T as FollowProfilePageResponse, U as FollowUserResult, V as FollowingResponse, X as GetAdminReviewQueuesOptions, Y as GithubPullRequest, Z as GivenConfirmation, _ as HIDDEN_ITEM_SOURCES, $ as HIDDEN_ITEM_TYPES, a0 as HeatmapDay, a1 as HeatmapResponse, a2 as HiddenActivityItem, a3 as HiddenApp, a4 as HiddenItemSource, a5 as HiddenItemType, a6 as HideActivityItemInput, a7 as HideProfileItemInput, a8 as InboxCounts, a9 as ListFeatureAllowlistOptions, aa as MyGithubPullRequestsResponse, ab as OrgClaimBinding, ac as OrgClaimResult, ad as OrgDomainChallengeResult, ae as OrgDomainVerifyResult, af as OrgNotificationEmailAddResult, ag as OrgNotificationEmailRemoveResult, ah as OrgProfileEcho, ai as OrgProfileUpdateResult, aj as PROFILE_COMPLETENESS_SIGNALS, ak as PdsWipeOutcome, al as PendingConfirmation, am as PendingConfirmationsPage, an as ProfileCompleteness, ao as ProfileCompletenessSignal, ap as ProfileIndustryInput, aq as ProfileLocationAddress, ar as ProfileLocationInput, as as ProfileSearchResult, at as ProfileSelfLocation, au as QUOTED_POSTS_BATCH_MAX, av as QuotedPostAuthor, aw as QuotedPostImage, ax as QuotedPostResult, ay as QuotedPostView, az as ReactionError, aA as ReactionResult, aB as ReactionStatus, aC as RefreshOrcidPublicationsResult, aD as RefreshPdsResult, aE as RepoDeleteInput, aF as ResetProfileResult, aG as ResolveQuotedPostsOptions, aH as RoadmapVoteError, aI as RoadmapVoteResult, aJ as RoadmapVoter, aK as RoadmapVotesResponse, aL as SearchFilters, aM as SearchResponse, aN as SifaQueryKey, aO as SimilarProfile, aP as SkillSearchResult, aQ as StatsResponse, aS as SuggestionProfile, aT as SuggestionsResponse, aU as UnhideActivityItemInput, aV as UnlinkedPosition, aW as UnlinkedPositionsResult, aX as UpdateProfileOverrideInput, aY as UpdateProfileSelfInput, aZ as UploadAvatarResult, a_ as UploadPronunciationAudioResult, a$ as VerifyExternalAccountResult, b0 as WipePreview, b1 as addFeatureAllowlist, b2 as addOrgNotificationEmail, b3 as apiFetch, b4 as apiFetchOrNull, b5 as apiWrite, b6 as apiWriteCreate, b7 as bulkHideProfileItems, b8 as bulkHideStandardPublications, b9 as bulkUnhideProfileItems, ba as bulkUnhideStandardPublications, bb as castRoadmapVote, bc as checkAppAccount, bd as confirmEndorsement, be as createConfirmation, bf as createEndorsement, bg as createExternalAccount, bh as createProfileLocation, bi as createReaction, bj as createSkill, bk as deleteAccount, bl as deleteAvatarOverride, bm as deleteExternalAccount, bn as deleteNamePronunciationAudio, bo as deleteProfileLocation, bp as deleteReaction, bq as deleteRepoRecords, br as deleteSkill, bs as dismissConfirmation, bt as fetchAccounts, bu as fetchActivityFeed, bv as fetchActivityTeaser, bw as fetchAppsRegistry, bx as fetchExternalAccounts, by as fetchFeaturedProfile, bz as fetchFollowing, bA as fetchGivenConfirmations, bB as fetchHeatmapData, bC as fetchHiddenActivityItems, bD as fetchHiddenApps, bE as fetchInboxCounts, bF as fetchMyGithubPullRequests, bG as fetchMyRoadmapVotes, bH as fetchPendingConfirmations, bI as fetchProfileCompleteness, bJ as fetchReactionStatus, bK as fetchRepoInventory, bL as fetchRoadmapVotes, cF as fetchSearchCompanies, bM as fetchSearchFilters, bN as fetchSearchProfiles, bO as fetchSimilarProfiles, bP as fetchSkillSuggestions, bQ as fetchStats, bR as fetchSuggestionCount, bS as fetchSuggestions, bT as fetchUnlinkedPositions, bU as fetchWipePreview, bV as followUser, bW as getAdminReviewQueues, bX as getBlueskySuggestions, bY as getFollowers, bZ as getFollowing, b_ as getFollowingFeed, b$ as getMutuals, c0 as hideActivityItem, c1 as hideOrcidPublication, c2 as hideProfileItem, c3 as hideSifaPublication, c4 as hideStandardPublication, c5 as listFeatureAllowlist, c6 as refreshOrcidPublications, c7 as refreshPds, c8 as removeFeatureAllowlist, c9 as removeOrgNotificationEmail, ca as repoExportUrl, cb as requestOrgDomainChallenge, cc as resetProfile, cd as resolveQuotedPosts, ce as retractRoadmapVote, cf as revokeConfirmation, cg as searchSkills, ch as setExternalAccountPrimary, s as sifaQueryKeys, ci as submitOrgClaim, cj as switchAccount, ck as unfollowUser, cl as unhideActivityItem, cm as unhideOrcidPublication, cn as unhideProfileItem, co as unhideSifaPublication, cp as unhideStandardPublication, cq as unsetExternalAccountPrimary, cr as updateExternalAccount, cs as updateOrgProfile, ct as updateProfileLocation, cu as updateProfileOverride, cv as updateProfileSelf, cw as updateSkill, cy as uploadAvatar, cz as uploadNamePronunciationAudio, cA as verifyExternalAccount, cB as verifyOrgDomain } from '../../org-BHz9ymjp.cjs';
|
|
3
|
+
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, b as FetchPendingEndorsementsOptions, N as NetworkMapEdge, c as NetworkMapGenerationJob, d as NetworkMapGraphData, e as NetworkMapNode, f as NetworkMapPendingJob, g as NetworkMapResponse, h as PendingEndorsement, P as PendingEndorsementsPage, i as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, j as ReciprocitySkill, S as SpeakerCard, k as SpeakerDirectoryFilters, l as SpeakerGroup, m as SpeakersResponse, T as TalkEvent, n as TalkRow, o as TalkSpeaker, p as TalksResponse, q as checkNetworkMapJobStatus, r as createEducation, s as createPosition, t as createRecord, u as deleteEducation, v as deletePosition, w as deleteRecord, x as dismissEndorsement, y as fetchAtFundLink, z as fetchEndorsementCount, A as fetchEntitySearch, B as fetchGetProfileView, C as fetchNetworkMap, E as fetchNetworkStreamCount, G as fetchPendingEndorsements, H as fetchProfile, I as fetchProfileSummary, J as fetchReceivedEndorsements, K as fetchReciprocityCandidate, L as fetchSpeakers, M as fetchTalks, O as hideKeytraceClaim, Q as importSearchEntities, U as initiateNetworkMapGeneration, V as isNetworkMapResponse, W as linkSkillToPosition, Z as revealMarqueDomain, _ as selectEntity, $ as setPositionPrimary, a0 as unhideKeytraceClaim, a1 as unlinkSkillFromPosition, a2 as unrevealMarqueDomain, a3 as unsetPositionPrimary, a4 as updateEducation, a5 as updatePosition, a6 as updateRecord } from '../../network-map-Cwv7SsL0.cjs';
|
|
4
4
|
import '../../index-DIwi3bpk.cjs';
|
|
5
5
|
import '../../feed-BMm9Pkew.cjs';
|
|
6
6
|
import 'zod';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from '../../org-
|
|
2
|
-
export { c as AccountCheckResult, d as AccountSummary, e as ActivityFeedResponse, f as ActivityItem, g as ActivityItemLinkHealth, h as ActivityTeaserResponse, i as AdminReviewQueues, j as ApiError, k as AppRegistryEntry, B as BulkHideProfileItemInput, l as CastRoadmapVoteResult, m as CheckAppAccountOptions,
|
|
3
|
-
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, N as NetworkMapEdge,
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from '../../org-Bgz5parA.js';
|
|
2
|
+
export { c as AccountCheckResult, d as AccountSummary, e as ActivityFeedResponse, f as ActivityItem, g as ActivityItemLinkHealth, h as ActivityTeaserResponse, i as AdminReviewQueues, j as ApiError, k as AppRegistryEntry, B as BulkHideProfileItemInput, l as CastRoadmapVoteResult, m as CheckAppAccountOptions, cC as CompanySearchFilters, cD as CompanySearchResponse, cE as CompanySearchResult, a as ConfirmEndorsementInput, n as ConfirmationInput, o as ConfirmationSubjectInput, p as CreateExternalAccountResult, D as DeleteAccountResult, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityTeaserOptions, w as FetchConfirmationsOptions, x as FetchFollowListOptions, y as FetchFollowProfilePageOptions, z as FetchFollowingFeedOptions, G as FetchHiddenActivityItemsOptions, H as FetchHiddenAppsOptions, I as FetchInboxCountsOptions, J as FetchMyGithubPullRequestsOptions, K as FetchMyRoadmapVotesOptions, L as FetchProfileCompletenessOptions, M as FetchReactionStatusOptions, N as FetchSuggestionsOptions, O as FetchUnlinkedPositionsOptions, P as FilterOptions, Q as FollowListPage, R as FollowProfile, T as FollowProfilePageResponse, U as FollowUserResult, V as FollowingResponse, X as GetAdminReviewQueuesOptions, Y as GithubPullRequest, Z as GivenConfirmation, _ as HIDDEN_ITEM_SOURCES, $ as HIDDEN_ITEM_TYPES, a0 as HeatmapDay, a1 as HeatmapResponse, a2 as HiddenActivityItem, a3 as HiddenApp, a4 as HiddenItemSource, a5 as HiddenItemType, a6 as HideActivityItemInput, a7 as HideProfileItemInput, a8 as InboxCounts, a9 as ListFeatureAllowlistOptions, aa as MyGithubPullRequestsResponse, ab as OrgClaimBinding, ac as OrgClaimResult, ad as OrgDomainChallengeResult, ae as OrgDomainVerifyResult, af as OrgNotificationEmailAddResult, ag as OrgNotificationEmailRemoveResult, ah as OrgProfileEcho, ai as OrgProfileUpdateResult, aj as PROFILE_COMPLETENESS_SIGNALS, ak as PdsWipeOutcome, al as PendingConfirmation, am as PendingConfirmationsPage, an as ProfileCompleteness, ao as ProfileCompletenessSignal, ap as ProfileIndustryInput, aq as ProfileLocationAddress, ar as ProfileLocationInput, as as ProfileSearchResult, at as ProfileSelfLocation, au as QUOTED_POSTS_BATCH_MAX, av as QuotedPostAuthor, aw as QuotedPostImage, ax as QuotedPostResult, ay as QuotedPostView, az as ReactionError, aA as ReactionResult, aB as ReactionStatus, aC as RefreshOrcidPublicationsResult, aD as RefreshPdsResult, aE as RepoDeleteInput, aF as ResetProfileResult, aG as ResolveQuotedPostsOptions, aH as RoadmapVoteError, aI as RoadmapVoteResult, aJ as RoadmapVoter, aK as RoadmapVotesResponse, aL as SearchFilters, aM as SearchResponse, aN as SifaQueryKey, aO as SimilarProfile, aP as SkillSearchResult, aQ as StatsResponse, aS as SuggestionProfile, aT as SuggestionsResponse, aU as UnhideActivityItemInput, aV as UnlinkedPosition, aW as UnlinkedPositionsResult, aX as UpdateProfileOverrideInput, aY as UpdateProfileSelfInput, aZ as UploadAvatarResult, a_ as UploadPronunciationAudioResult, a$ as VerifyExternalAccountResult, b0 as WipePreview, b1 as addFeatureAllowlist, b2 as addOrgNotificationEmail, b3 as apiFetch, b4 as apiFetchOrNull, b5 as apiWrite, b6 as apiWriteCreate, b7 as bulkHideProfileItems, b8 as bulkHideStandardPublications, b9 as bulkUnhideProfileItems, ba as bulkUnhideStandardPublications, bb as castRoadmapVote, bc as checkAppAccount, bd as confirmEndorsement, be as createConfirmation, bf as createEndorsement, bg as createExternalAccount, bh as createProfileLocation, bi as createReaction, bj as createSkill, bk as deleteAccount, bl as deleteAvatarOverride, bm as deleteExternalAccount, bn as deleteNamePronunciationAudio, bo as deleteProfileLocation, bp as deleteReaction, bq as deleteRepoRecords, br as deleteSkill, bs as dismissConfirmation, bt as fetchAccounts, bu as fetchActivityFeed, bv as fetchActivityTeaser, bw as fetchAppsRegistry, bx as fetchExternalAccounts, by as fetchFeaturedProfile, bz as fetchFollowing, bA as fetchGivenConfirmations, bB as fetchHeatmapData, bC as fetchHiddenActivityItems, bD as fetchHiddenApps, bE as fetchInboxCounts, bF as fetchMyGithubPullRequests, bG as fetchMyRoadmapVotes, bH as fetchPendingConfirmations, bI as fetchProfileCompleteness, bJ as fetchReactionStatus, bK as fetchRepoInventory, bL as fetchRoadmapVotes, cF as fetchSearchCompanies, bM as fetchSearchFilters, bN as fetchSearchProfiles, bO as fetchSimilarProfiles, bP as fetchSkillSuggestions, bQ as fetchStats, bR as fetchSuggestionCount, bS as fetchSuggestions, bT as fetchUnlinkedPositions, bU as fetchWipePreview, bV as followUser, bW as getAdminReviewQueues, bX as getBlueskySuggestions, bY as getFollowers, bZ as getFollowing, b_ as getFollowingFeed, b$ as getMutuals, c0 as hideActivityItem, c1 as hideOrcidPublication, c2 as hideProfileItem, c3 as hideSifaPublication, c4 as hideStandardPublication, c5 as listFeatureAllowlist, c6 as refreshOrcidPublications, c7 as refreshPds, c8 as removeFeatureAllowlist, c9 as removeOrgNotificationEmail, ca as repoExportUrl, cb as requestOrgDomainChallenge, cc as resetProfile, cd as resolveQuotedPosts, ce as retractRoadmapVote, cf as revokeConfirmation, cg as searchSkills, ch as setExternalAccountPrimary, s as sifaQueryKeys, ci as submitOrgClaim, cj as switchAccount, ck as unfollowUser, cl as unhideActivityItem, cm as unhideOrcidPublication, cn as unhideProfileItem, co as unhideSifaPublication, cp as unhideStandardPublication, cq as unsetExternalAccountPrimary, cr as updateExternalAccount, cs as updateOrgProfile, ct as updateProfileLocation, cu as updateProfileOverride, cv as updateProfileSelf, cw as updateSkill, cy as uploadAvatar, cz as uploadNamePronunciationAudio, cA as verifyExternalAccount, cB as verifyOrgDomain } from '../../org-Bgz5parA.js';
|
|
3
|
+
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, b as FetchPendingEndorsementsOptions, N as NetworkMapEdge, c as NetworkMapGenerationJob, d as NetworkMapGraphData, e as NetworkMapNode, f as NetworkMapPendingJob, g as NetworkMapResponse, h as PendingEndorsement, P as PendingEndorsementsPage, i as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, j as ReciprocitySkill, S as SpeakerCard, k as SpeakerDirectoryFilters, l as SpeakerGroup, m as SpeakersResponse, T as TalkEvent, n as TalkRow, o as TalkSpeaker, p as TalksResponse, q as checkNetworkMapJobStatus, r as createEducation, s as createPosition, t as createRecord, u as deleteEducation, v as deletePosition, w as deleteRecord, x as dismissEndorsement, y as fetchAtFundLink, z as fetchEndorsementCount, A as fetchEntitySearch, B as fetchGetProfileView, C as fetchNetworkMap, E as fetchNetworkStreamCount, G as fetchPendingEndorsements, H as fetchProfile, I as fetchProfileSummary, J as fetchReceivedEndorsements, K as fetchReciprocityCandidate, L as fetchSpeakers, M as fetchTalks, O as hideKeytraceClaim, Q as importSearchEntities, U as initiateNetworkMapGeneration, V as isNetworkMapResponse, W as linkSkillToPosition, Z as revealMarqueDomain, _ as selectEntity, $ as setPositionPrimary, a0 as unhideKeytraceClaim, a1 as unlinkSkillFromPosition, a2 as unrevealMarqueDomain, a3 as unsetPositionPrimary, a4 as updateEducation, a5 as updatePosition, a6 as updateRecord } from '../../network-map-5WbfyFed.js';
|
|
4
4
|
import '../../index-DIwi3bpk.js';
|
|
5
5
|
import '../../feed-BMm9Pkew.js';
|
|
6
6
|
import 'zod';
|
|
@@ -452,12 +452,16 @@ async function fetchReciprocityCandidate(config, options = {}) {
|
|
|
452
452
|
|
|
453
453
|
// src/query/fetchers/endorsement-inbox.ts
|
|
454
454
|
async function fetchPendingEndorsements(config, options = {}) {
|
|
455
|
+
const { cookieHeader, ...rest } = options;
|
|
456
|
+
const headers = { ...rest.headers ?? {} };
|
|
457
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
455
458
|
try {
|
|
456
459
|
const data = await apiFetch(config, "/api/endorsements/pending", {
|
|
457
460
|
cache: "no-store",
|
|
458
461
|
credentials: "include",
|
|
459
462
|
timeoutMs: 5e3,
|
|
460
|
-
...
|
|
463
|
+
...rest,
|
|
464
|
+
headers
|
|
461
465
|
});
|
|
462
466
|
return { endorsements: data?.endorsements ?? [], cursor: data?.cursor };
|
|
463
467
|
} catch {
|
|
@@ -470,12 +474,16 @@ function dismissEndorsement(config, data, options = {}) {
|
|
|
470
474
|
|
|
471
475
|
// src/query/fetchers/confirmations.ts
|
|
472
476
|
async function fetchPendingConfirmations(config, options = {}) {
|
|
477
|
+
const { cookieHeader, ...rest } = options;
|
|
478
|
+
const headers = { ...rest.headers ?? {} };
|
|
479
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
473
480
|
try {
|
|
474
481
|
const data = await apiFetch(config, "/api/confirmations/pending", {
|
|
475
482
|
cache: "no-store",
|
|
476
483
|
credentials: "include",
|
|
477
484
|
timeoutMs: 5e3,
|
|
478
|
-
...
|
|
485
|
+
...rest,
|
|
486
|
+
headers
|
|
479
487
|
});
|
|
480
488
|
return { confirmations: data?.confirmations ?? [], cursor: data?.cursor };
|
|
481
489
|
} catch {
|
|
@@ -483,11 +491,14 @@ async function fetchPendingConfirmations(config, options = {}) {
|
|
|
483
491
|
}
|
|
484
492
|
}
|
|
485
493
|
async function fetchGivenConfirmations(config, options = {}) {
|
|
494
|
+
const { cookieHeader, ...rest } = options;
|
|
495
|
+
const headers = { ...rest.headers ?? {} };
|
|
496
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
486
497
|
try {
|
|
487
498
|
const data = await apiFetch(
|
|
488
499
|
config,
|
|
489
500
|
"/api/confirmations/mine",
|
|
490
|
-
{ cache: "no-store", credentials: "include", timeoutMs: 5e3, ...
|
|
501
|
+
{ cache: "no-store", credentials: "include", timeoutMs: 5e3, ...rest, headers }
|
|
491
502
|
);
|
|
492
503
|
return { confirmations: data?.confirmations ?? [] };
|
|
493
504
|
} catch {
|
|
@@ -504,6 +515,90 @@ function revokeConfirmation(config, data, options = {}) {
|
|
|
504
515
|
return apiWrite(config, "/api/confirmation/revoke", "POST", { body: data, ...options });
|
|
505
516
|
}
|
|
506
517
|
|
|
518
|
+
// src/query/fetchers/inbox.ts
|
|
519
|
+
function toCount(value) {
|
|
520
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? Math.trunc(value) : 0;
|
|
521
|
+
}
|
|
522
|
+
async function fetchInboxCounts(config, options = {}) {
|
|
523
|
+
const { cookieHeader, ...rest } = options;
|
|
524
|
+
const headers = { ...rest.headers ?? {} };
|
|
525
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
526
|
+
try {
|
|
527
|
+
const data = await apiFetch(config, "/api/inbox/counts", {
|
|
528
|
+
cache: "no-store",
|
|
529
|
+
credentials: "include",
|
|
530
|
+
timeoutMs: 5e3,
|
|
531
|
+
...rest,
|
|
532
|
+
headers
|
|
533
|
+
});
|
|
534
|
+
return {
|
|
535
|
+
tasks: toCount(data?.tasks),
|
|
536
|
+
unreadNotifications: toCount(data?.unreadNotifications)
|
|
537
|
+
};
|
|
538
|
+
} catch {
|
|
539
|
+
return { tasks: 0, unreadNotifications: 0 };
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// src/query/fetchers/unlinked-positions.ts
|
|
544
|
+
async function fetchUnlinkedPositions(config, options = {}) {
|
|
545
|
+
const { cookieHeader, ...rest } = options;
|
|
546
|
+
const headers = { ...rest.headers ?? {} };
|
|
547
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
548
|
+
try {
|
|
549
|
+
const data = await apiFetch(config, "/api/positions/unlinked", {
|
|
550
|
+
cache: "no-store",
|
|
551
|
+
credentials: "include",
|
|
552
|
+
timeoutMs: 5e3,
|
|
553
|
+
...rest,
|
|
554
|
+
headers
|
|
555
|
+
});
|
|
556
|
+
return { positions: Array.isArray(data?.positions) ? data.positions : [] };
|
|
557
|
+
} catch {
|
|
558
|
+
return { positions: [] };
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
// src/query/fetchers/profile-completeness.ts
|
|
563
|
+
var PROFILE_COMPLETENESS_SIGNALS = [
|
|
564
|
+
"headline",
|
|
565
|
+
"about",
|
|
566
|
+
"position",
|
|
567
|
+
"education",
|
|
568
|
+
"skill",
|
|
569
|
+
"certification"
|
|
570
|
+
];
|
|
571
|
+
async function fetchProfileCompleteness(config, options = {}) {
|
|
572
|
+
const { cookieHeader, ...rest } = options;
|
|
573
|
+
const headers = { ...rest.headers ?? {} };
|
|
574
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
575
|
+
const empty = {
|
|
576
|
+
complete: true,
|
|
577
|
+
score: PROFILE_COMPLETENESS_SIGNALS.length,
|
|
578
|
+
total: PROFILE_COMPLETENESS_SIGNALS.length,
|
|
579
|
+
missing: []
|
|
580
|
+
};
|
|
581
|
+
try {
|
|
582
|
+
const data = await apiFetch(config, "/api/profile/completeness", {
|
|
583
|
+
cache: "no-store",
|
|
584
|
+
credentials: "include",
|
|
585
|
+
timeoutMs: 5e3,
|
|
586
|
+
...rest,
|
|
587
|
+
headers
|
|
588
|
+
});
|
|
589
|
+
if (!data) return empty;
|
|
590
|
+
const missing = Array.isArray(data.missing) ? data.missing : [];
|
|
591
|
+
return {
|
|
592
|
+
complete: data.complete ?? missing.length === 0,
|
|
593
|
+
score: data.score ?? PROFILE_COMPLETENESS_SIGNALS.length - missing.length,
|
|
594
|
+
total: data.total ?? PROFILE_COMPLETENESS_SIGNALS.length,
|
|
595
|
+
missing
|
|
596
|
+
};
|
|
597
|
+
} catch {
|
|
598
|
+
return empty;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
|
|
507
602
|
// src/query/fetchers/keytrace-claims.ts
|
|
508
603
|
function hideKeytraceClaim(config, rkey, options = {}) {
|
|
509
604
|
return apiWrite(
|
|
@@ -1605,11 +1700,23 @@ var sifaQueryKeys = {
|
|
|
1605
1700
|
byHandle: (handleOrDid) => ["sifa", "profile", handleOrDid],
|
|
1606
1701
|
atFundLink: (did) => ["sifa", "profile", "at-fund-link", did],
|
|
1607
1702
|
view: (actor) => ["sifa", "profile", "view", actor],
|
|
1608
|
-
externalAccounts: (handleOrDid) => ["sifa", "profile", "external-accounts", handleOrDid]
|
|
1703
|
+
externalAccounts: (handleOrDid) => ["sifa", "profile", "external-accounts", handleOrDid],
|
|
1704
|
+
// Session-scoped: the AppView reads the owner from the session cookie, so
|
|
1705
|
+
// there is only ever one completeness result per client.
|
|
1706
|
+
completeness: () => ["sifa", "profile", "completeness"]
|
|
1609
1707
|
},
|
|
1610
1708
|
position: {
|
|
1611
1709
|
all: () => ["sifa", "position"],
|
|
1612
|
-
byOwner: (did) => ["sifa", "position", "by-owner", did]
|
|
1710
|
+
byOwner: (did) => ["sifa", "position", "by-owner", did],
|
|
1711
|
+
// Session-scoped: the AppView reads the owner from the session cookie.
|
|
1712
|
+
unlinked: () => ["sifa", "position", "unlinked"]
|
|
1713
|
+
},
|
|
1714
|
+
// Aggregate inbox counts for the header bell badge (session-scoped). The first
|
|
1715
|
+
// aggregate namespace: it fans in across confirmations, endorsements, drift,
|
|
1716
|
+
// unlinked positions and profile completeness on the server.
|
|
1717
|
+
inbox: {
|
|
1718
|
+
all: () => ["sifa", "inbox"],
|
|
1719
|
+
counts: () => ["sifa", "inbox", "counts"]
|
|
1613
1720
|
},
|
|
1614
1721
|
search: {
|
|
1615
1722
|
all: () => ["sifa", "search"],
|
|
@@ -1855,6 +1962,6 @@ function deleteInvestment(config, rkey, options = {}) {
|
|
|
1855
1962
|
return deleteRecord(config, PROFILE_INVESTMENT_NSID, rkey, options);
|
|
1856
1963
|
}
|
|
1857
1964
|
|
|
1858
|
-
export { ApiError, HIDDEN_ITEM_SOURCES, HIDDEN_ITEM_TYPES, QUOTED_POSTS_BATCH_MAX, addFeatureAllowlist, addOrgNotificationEmail, apiFetch, apiFetchOrNull, apiWrite, apiWriteCreate, bulkHideProfileItems, bulkHideStandardPublications, bulkUnhideProfileItems, bulkUnhideStandardPublications, castRoadmapVote, checkAppAccount, checkNetworkMapJobStatus, confirmEndorsement, createConfirmation, createEducation, createEndorsement, createExternalAccount, createInvestment, createPosition, createProfileLocation, createReaction, createRecord, createSkill, deleteAccount, deleteAvatarOverride, deleteEducation, deleteExternalAccount, deleteInvestment, deleteNamePronunciationAudio, deletePosition, deleteProfileLocation, deleteReaction, deleteRecord, deleteRepoRecords, deleteSkill, dismissConfirmation, dismissEndorsement, fetchAccounts, fetchActivityFeed, fetchActivityTeaser, fetchAppsRegistry, fetchAtFundLink, fetchEndorsementCount, fetchEntitySearch, fetchExternalAccounts, fetchFeaturedProfile, fetchFollowing, fetchGetProfileView, fetchGivenConfirmations, fetchHeatmapData, fetchHiddenActivityItems, fetchHiddenApps, fetchMyGithubPullRequests, fetchMyRoadmapVotes, fetchNetworkMap, fetchNetworkStreamCount, fetchPendingConfirmations, fetchPendingEndorsements, fetchProfile, fetchProfileSummary, fetchReactionStatus, fetchReceivedEndorsements, fetchReciprocityCandidate, fetchRepoInventory, fetchRoadmapVotes, fetchSearchCompanies, fetchSearchFilters, fetchSearchProfiles, fetchSimilarProfiles, fetchSkillSuggestions, fetchSpeakers, fetchStats, fetchSuggestionCount, fetchSuggestions, fetchTalks, fetchWipePreview, followUser, getAdminReviewQueues, getBlueskySuggestions, getFollowers, getFollowing, getFollowingFeed, getMutuals, hideActivityItem, hideKeytraceClaim, hideOrcidPublication, hideProfileItem, hideSifaPublication, hideStandardPublication, importSearchEntities, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, listFeatureAllowlist, refreshOrcidPublications, refreshPds, removeFeatureAllowlist, removeOrgNotificationEmail, repoExportUrl, requestOrgDomainChallenge, resetProfile, resolveQuotedPosts, retractRoadmapVote, revealMarqueDomain, revokeConfirmation, searchSkills, selectEntity, setExternalAccountPrimary, setPositionPrimary, sifaQueryKeys, submitOrgClaim, switchAccount, unfollowUser, unhideActivityItem, unhideKeytraceClaim, unhideOrcidPublication, unhideProfileItem, unhideSifaPublication, unhideStandardPublication, unlinkSkillFromPosition, unrevealMarqueDomain, unsetExternalAccountPrimary, unsetPositionPrimary, updateEducation, updateExternalAccount, updateInvestment, updateOrgProfile, updatePosition, updateProfileLocation, updateProfileOverride, updateProfileSelf, updateRecord, updateSkill, uploadAvatar, uploadNamePronunciationAudio, verifyExternalAccount, verifyOrgDomain };
|
|
1965
|
+
export { ApiError, HIDDEN_ITEM_SOURCES, HIDDEN_ITEM_TYPES, PROFILE_COMPLETENESS_SIGNALS, QUOTED_POSTS_BATCH_MAX, addFeatureAllowlist, addOrgNotificationEmail, apiFetch, apiFetchOrNull, apiWrite, apiWriteCreate, bulkHideProfileItems, bulkHideStandardPublications, bulkUnhideProfileItems, bulkUnhideStandardPublications, castRoadmapVote, checkAppAccount, checkNetworkMapJobStatus, confirmEndorsement, createConfirmation, createEducation, createEndorsement, createExternalAccount, createInvestment, createPosition, createProfileLocation, createReaction, createRecord, createSkill, deleteAccount, deleteAvatarOverride, deleteEducation, deleteExternalAccount, deleteInvestment, deleteNamePronunciationAudio, deletePosition, deleteProfileLocation, deleteReaction, deleteRecord, deleteRepoRecords, deleteSkill, dismissConfirmation, dismissEndorsement, fetchAccounts, fetchActivityFeed, fetchActivityTeaser, fetchAppsRegistry, fetchAtFundLink, fetchEndorsementCount, fetchEntitySearch, fetchExternalAccounts, fetchFeaturedProfile, fetchFollowing, fetchGetProfileView, fetchGivenConfirmations, fetchHeatmapData, fetchHiddenActivityItems, fetchHiddenApps, fetchInboxCounts, fetchMyGithubPullRequests, fetchMyRoadmapVotes, fetchNetworkMap, fetchNetworkStreamCount, fetchPendingConfirmations, fetchPendingEndorsements, fetchProfile, fetchProfileCompleteness, fetchProfileSummary, fetchReactionStatus, fetchReceivedEndorsements, fetchReciprocityCandidate, fetchRepoInventory, fetchRoadmapVotes, fetchSearchCompanies, fetchSearchFilters, fetchSearchProfiles, fetchSimilarProfiles, fetchSkillSuggestions, fetchSpeakers, fetchStats, fetchSuggestionCount, fetchSuggestions, fetchTalks, fetchUnlinkedPositions, fetchWipePreview, followUser, getAdminReviewQueues, getBlueskySuggestions, getFollowers, getFollowing, getFollowingFeed, getMutuals, hideActivityItem, hideKeytraceClaim, hideOrcidPublication, hideProfileItem, hideSifaPublication, hideStandardPublication, importSearchEntities, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, listFeatureAllowlist, refreshOrcidPublications, refreshPds, removeFeatureAllowlist, removeOrgNotificationEmail, repoExportUrl, requestOrgDomainChallenge, resetProfile, resolveQuotedPosts, retractRoadmapVote, revealMarqueDomain, revokeConfirmation, searchSkills, selectEntity, setExternalAccountPrimary, setPositionPrimary, sifaQueryKeys, submitOrgClaim, switchAccount, unfollowUser, unhideActivityItem, unhideKeytraceClaim, unhideOrcidPublication, unhideProfileItem, unhideSifaPublication, unhideStandardPublication, unlinkSkillFromPosition, unrevealMarqueDomain, unsetExternalAccountPrimary, unsetPositionPrimary, updateEducation, updateExternalAccount, updateInvestment, updateOrgProfile, updatePosition, updateProfileLocation, updateProfileOverride, updateProfileSelf, updateRecord, updateSkill, uploadAvatar, uploadNamePronunciationAudio, verifyExternalAccount, verifyOrgDomain };
|
|
1859
1966
|
//# sourceMappingURL=index.js.map
|
|
1860
1967
|
//# sourceMappingURL=index.js.map
|