@singi-labs/sifa-sdk 0.20.2 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -16
- package/dist/index.d.ts +3 -16
- package/dist/index.js +2 -7
- package/dist/index.js.map +1 -1
- package/dist/query/fetchers/index.cjs +33 -75
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +1 -1
- package/dist/query/fetchers/index.d.ts +1 -1
- package/dist/query/fetchers/index.js +1 -9
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/fetchers/roadmap.js +34 -71
- package/dist/query/fetchers/roadmap.js.map +1 -1
- package/dist/query/hooks/index.cjs +24 -135
- 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 +1 -11
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/hooks/use-roadmap-mutations.js +5 -63
- package/dist/query/hooks/use-roadmap-mutations.js.map +1 -1
- package/dist/query/index.cjs +35 -150
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +2 -17
- package/dist/query/index.js.map +1 -1
- package/dist/query/keys.js +0 -5
- package/dist/query/keys.js.map +1 -1
- package/dist/roadmap/index.js +0 -91
- package/dist/roadmap/index.js.map +1 -1
- package/dist/schemas/write/certification.js +3 -3
- package/dist/schemas/write/certification.js.map +1 -1
- package/dist/schemas/write/course.js +5 -10
- package/dist/schemas/write/course.js.map +1 -1
- package/dist/schemas/write/education.js +3 -3
- package/dist/schemas/write/education.js.map +1 -1
- package/dist/schemas/write/honor.js +2 -2
- package/dist/schemas/write/honor.js.map +1 -1
- package/dist/schemas/write/index.cjs +25 -26
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +19 -19
- package/dist/schemas/write/index.d.ts +19 -19
- package/dist/schemas/write/investment.js +3 -3
- package/dist/schemas/write/investment.js.map +1 -1
- package/dist/schemas/write/involvement.js +3 -3
- package/dist/schemas/write/involvement.js.map +1 -1
- package/dist/schemas/write/position.js +8 -3
- package/dist/schemas/write/position.js.map +1 -1
- package/dist/schemas/write/project.js +3 -3
- package/dist/schemas/write/project.js.map +1 -1
- package/dist/schemas/write/publication.js +2 -2
- package/dist/schemas/write/publication.js.map +1 -1
- package/dist/schemas/write/shared.js +6 -0
- package/dist/schemas/write/shared.js.map +1 -1
- package/dist/schemas/write/volunteering.js +3 -3
- package/dist/schemas/write/volunteering.js.map +1 -1
- package/dist/{use-user-settings-Cq_AHkkM.d.cts → use-user-settings-Bn6g8bgr.d.cts} +7 -22
- package/dist/{use-user-settings-DoNP3tNl.d.ts → use-user-settings-DQ6Dyby7.d.ts} +7 -22
- package/dist/{user-settings-CBtacio1.d.ts → user-settings-BdNrDa9O.d.ts} +16 -50
- package/dist/{user-settings-DDP76dZH.d.cts → user-settings-C8JUD4DM.d.cts} +16 -50
- package/package.json +1 -1
- package/dist/query/hooks/use-roadmap.js +0 -31
- package/dist/query/hooks/use-roadmap.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a1 as SifaApiConfig, a0 as ApiFetchOptions, a3 as CreateResult, a2 as WriteResult } from '../../types-JydVIhN5.cjs';
|
|
2
2
|
export { a4 as ApiError, ai as CompanySearchFilters, aj as CompanySearchResponse, ak as CompanySearchResult, a5 as FilterOptions, a6 as ProfileSearchResult, a7 as ProfileSearchSuggestion, S as SearchFilters, a8 as SearchResponse, a9 as SkillSearchResult, aa as apiFetch, ab as apiFetchOrNull, ac as apiWrite, ad as apiWriteCreate, al as fetchSearchCompanies, ae as fetchSearchFilters, af as fetchSearchProfiles, ag as fetchSkillSuggestions, ah as searchSkills } from '../../types-JydVIhN5.cjs';
|
|
3
3
|
export { D as DismissEndorsementInput, F as FetchGermMessageLinkOptions, b as FetchNetworkStreamCountOptions, c as FetchPendingEndorsementsOptions, G as GermMessageLink, N as NetworkMapEdge, d as NetworkMapGenerationJob, e as NetworkMapGraphData, f as NetworkMapNode, g as NetworkMapPendingJob, h as NetworkMapResponse, i as PendingEndorsement, P as PendingEndorsementsPage, j as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, k as ReciprocitySkill, S as SpeakerCard, l as SpeakerDirectoryFilters, m as SpeakerGroup, n as SpeakersResponse, T as TalkEvent, o as TalkRow, p as TalkSpeaker, q as TalksResponse, r as checkNetworkMapJobStatus, s as createEducation, t as createPosition, u as createRecord, v as deleteEducation, w as deletePosition, x as deleteRecord, y as dismissEndorsement, z as fetchAtFundLink, A as fetchEndorsementCount, B as fetchEntitySearch, C as fetchGermMessageLink, E as fetchGetProfileView, H as fetchNetworkMap, I as fetchNetworkStreamCount, J as fetchPendingEndorsements, K as fetchProfile, L as fetchProfileSummary, M as fetchReceivedEndorsements, O as fetchReciprocityCandidate, Q as fetchSpeakers, U as fetchTalks, V as germRedirectPath, W as hideKeytraceClaim, X as importSearchEntities, Y as initiateNetworkMapGeneration, Z as isNetworkMapResponse, _ as linkSkillToPosition, a1 as revealMarqueDomain, a2 as selectEntity, a3 as setPositionPrimary, a4 as unhideKeytraceClaim, a5 as unlinkSkillFromPosition, a6 as unrevealMarqueDomain, a7 as unsetPositionPrimary, a8 as updateEducation, a9 as updatePosition, aa as updateRecord } from '../../network-map-DJonNOl0.cjs';
|
|
4
|
-
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityPreferences, g as ActivityTeaserResponse, h as AdminReviewQueues, i as AppRegistryEntry, B as BulkHideProfileItemInput, j as CastRoadmapVoteResult, k as CheckAppAccountOptions, C as ConfirmEndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, n as CreateExternalAccountResult, D as DeleteAccountResult, o as DismissCompletenessSignalInput, p as DismissUnlinkedPositionInput, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityPreferencesOptions, w as FetchActivityTeaserOptions, x as FetchConfirmationsOptions, y as FetchFollowListOptions, z as FetchFollowProfilePageOptions, G as FetchFollowingFeedOptions, H as FetchHiddenActivityItemsOptions, I as FetchHiddenAppsOptions, J as FetchInboxCountsOptions, K as FetchMyGithubPullRequestsOptions, L as
|
|
4
|
+
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityPreferences, g as ActivityTeaserResponse, h as AdminReviewQueues, i as AppRegistryEntry, B as BulkHideProfileItemInput, j as CastRoadmapVoteResult, k as CheckAppAccountOptions, C as ConfirmEndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, n as CreateExternalAccountResult, D as DeleteAccountResult, o as DismissCompletenessSignalInput, p as DismissUnlinkedPositionInput, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityPreferencesOptions, w as FetchActivityTeaserOptions, x as FetchConfirmationsOptions, y as FetchFollowListOptions, z as FetchFollowProfilePageOptions, G as FetchFollowingFeedOptions, H as FetchHiddenActivityItemsOptions, I as FetchHiddenAppsOptions, J as FetchInboxCountsOptions, K as FetchMyGithubPullRequestsOptions, L as FetchProfileCompletenessOptions, M as FetchReactionStatusOptions, N as FetchRoadmapOptions, O as FetchRpgClaimableOptions, P as FetchRpgStatusOptions, Q as FetchSuggestionsOptions, R as FetchUnlinkedPositionsOptions, S as FetchUserSettingsOptions, T as FollowListPage, U as FollowProfile, V as FollowProfilePageResponse, W as FollowUserResult, X as FollowingFeedApp, Y as FollowingFeedBuild, Z as FollowingFeedEmptyReason, _ as FollowingFeedResponse, $ as FollowingFeedVersion, a0 as FollowingResponse, a1 as GetAdminReviewQueuesOptions, a2 as GithubPullRequest, a3 as GivenConfirmation, a4 as HIDDEN_ITEM_SOURCES, a5 as HIDDEN_ITEM_TYPES, a6 as HeatmapDay, a7 as HeatmapResponse, a8 as HiddenActivityItem, a9 as HiddenApp, aa as HiddenItemSource, ab as HiddenItemType, ac as HideActivityItemInput, ad as HideProfileItemInput, ae as InboxCounts, af as ListFeatureAllowlistOptions, ag as MyGithubPullRequestsResponse, ah as OrgClaimBinding, ai as OrgClaimResult, aj as OrgDomainChallengeResult, ak as OrgDomainVerifyResult, al as OrgNotificationEmailAddResult, am as OrgNotificationEmailRemoveResult, an as OrgProfileEcho, ao as OrgProfileUpdateResult, ap as PROFILE_COMPLETENESS_SIGNALS, aq as PdsWipeOutcome, ar as PendingConfirmation, as as PendingConfirmationsPage, at as PrimarySection, au as ProfileCompleteness, av as ProfileCompletenessSignal, aw as ProfileIndustryInput, ax as ProfileLocationAddress, ay as ProfileLocationInput, az as ProfileSelfLocation, aA as QUOTED_POSTS_BATCH_MAX, aB as QuotedPostAuthor, aC as QuotedPostImage, aD as QuotedPostResult, aE as QuotedPostView, aF as ReactionError, aG as ReactionResult, aH as ReactionStatus, aI as RefreshOrcidPublicationsResult, aJ as RefreshPdsResult, aK as RepoDeleteInput, aL as ResetProfileResult, aM as ResolveQuotedPostsOptions, aN as RoadmapBoardItem, aO as RoadmapBoardSize, aP as RoadmapBoardStatus, aQ as RoadmapItemRef, aR as RoadmapVoteError, aS as RoadmapVoteResult, aT as RoadmapVoter, aU as RpgClaimableResponse, aV as RpgClaimableResponseSchema, aW as RpgItemStatus, aX as RpgItemStatusSchema, aY as RpgStatusResponse, aZ as RpgStatusResponseSchema, a_ as SifaQueryKey, a$ as SimilarProfile, b0 as SiteActivityPresetResponse, b1 as StatsResponse, b3 as SuggestionProfile, b4 as SuggestionsResponse, b5 as UnhideActivityItemInput, b6 as UnlinkedPosition, b7 as UnlinkedPositionsResult, b8 as UpdateActivityPreferencesInput, b9 as UpdateProfileOverrideInput, ba as UpdateProfileSelfInput, bb as UploadAvatarResult, bc as UploadPronunciationAudioResult, bd as UserSettings, be as UserSettingsPatch, bf as UserSettingsSchema, bg as VerifyExternalAccountResult, bh as WipePreview, bi as addFeatureAllowlist, bj as addOrgNotificationEmail, bk as bulkHideProfileItems, bl as bulkHideStandardPublications, bm as bulkUnhideProfileItems, bn as bulkUnhideStandardPublications, bo as castRoadmapItemVote, bp as checkAppAccount, bq as clearCompletenessDismissals, br as confirmEndorsement, bs as createConfirmation, bt as createEndorsement, bu as createExternalAccount, bv as createProfileLocation, bw as createReaction, bx as createSkill, by as deleteAccount, bz as deleteAvatarOverride, bA as deleteExternalAccount, bB as deleteNamePronunciationAudio, bC as deleteProfileLocation, bD as deleteReaction, bE as deleteRepoRecords, bF as deleteSkill, bG as dismissCompletenessSignal, bH as dismissConfirmation, bI as dismissUnlinkedPosition, bJ as fetchAccounts, bK as fetchActivityFeed, bL as fetchActivityPreferences, bM as fetchActivityTeaser, bN as fetchAppsRegistry, bO as fetchExternalAccounts, bP as fetchFeaturedProfile, bQ as fetchFollowing, bR as fetchFollowingFeed, bS as fetchFollowingFeedVersion, bT as fetchGivenConfirmations, bU as fetchHeatmapData, bV as fetchHiddenActivityItems, bW as fetchHiddenApps, bX as fetchInboxCounts, bY as fetchMyGithubPullRequests, bZ as fetchPendingConfirmations, b_ as fetchProfileCompleteness, b$ as fetchReactionStatus, c0 as fetchRepoInventory, c1 as fetchRoadmap, c2 as fetchRpgClaimable, c3 as fetchRpgStatus, c4 as fetchSimilarProfiles, c5 as fetchSiteActivityPreset, c6 as fetchStats, c7 as fetchSuggestionCount, c8 as fetchSuggestions, c9 as fetchUnlinkedPositions, ca as fetchUserSettings, cb as fetchViewerPositionConfirmations, cc as fetchWipePreview, cd as followUser, ce as getAdminReviewQueues, cf as getBlueskySuggestions, cg as getFollowers, ch as getFollowing, ci as getMutuals, cj as hideActivityItem, ck as hideOrcidPublication, cl as hideProfileItem, cm as hideSifaPublication, cn as hideStandardPublication, co as isNewerFollowingFeed, cp as listFeatureAllowlist, cq as refreshOrcidPublications, cr as refreshPds, cs as removeFeatureAllowlist, ct as removeOrgNotificationEmail, cu as repoExportUrl, cv as requestOrgDomainChallenge, cw as resetProfile, cx as resolveQuotedPosts, cy as retractRoadmapItemVote, cz as revokeConfirmation, cA as setExternalAccountPrimary, cB as setSectionPrimary, s as sifaQueryKeys, cC as submitOrgClaim, cD as switchAccount, cE as unfollowUser, cF as unhideActivityItem, cG as unhideOrcidPublication, cH as unhideProfileItem, cI as unhideSifaPublication, cJ as unhideStandardPublication, cK as unsetExternalAccountPrimary, cL as unsetSectionPrimary, cM as updateActivityPreferences, cN as updateExternalAccount, cO as updateOrgProfile, cP as updateProfileLocation, cQ as updateProfileOverride, cR as updateProfileSelf, cS as updateSkill, cU as updateUserSettings, cV as uploadAvatar, cW as uploadNamePronunciationAudio, cX as verifyExternalAccount, cY as verifyOrgDomain } from '../../user-settings-C8JUD4DM.cjs';
|
|
5
5
|
import '../../index-BQAKeEoj.cjs';
|
|
6
6
|
import '../../verification-providers-DeyGqaoC.cjs';
|
|
7
7
|
import 'zod';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a1 as SifaApiConfig, a0 as ApiFetchOptions, a3 as CreateResult, a2 as WriteResult } from '../../types-CkomzDlY.js';
|
|
2
2
|
export { a4 as ApiError, ai as CompanySearchFilters, aj as CompanySearchResponse, ak as CompanySearchResult, a5 as FilterOptions, a6 as ProfileSearchResult, a7 as ProfileSearchSuggestion, S as SearchFilters, a8 as SearchResponse, a9 as SkillSearchResult, aa as apiFetch, ab as apiFetchOrNull, ac as apiWrite, ad as apiWriteCreate, al as fetchSearchCompanies, ae as fetchSearchFilters, af as fetchSearchProfiles, ag as fetchSkillSuggestions, ah as searchSkills } from '../../types-CkomzDlY.js';
|
|
3
3
|
export { D as DismissEndorsementInput, F as FetchGermMessageLinkOptions, b as FetchNetworkStreamCountOptions, c as FetchPendingEndorsementsOptions, G as GermMessageLink, N as NetworkMapEdge, d as NetworkMapGenerationJob, e as NetworkMapGraphData, f as NetworkMapNode, g as NetworkMapPendingJob, h as NetworkMapResponse, i as PendingEndorsement, P as PendingEndorsementsPage, j as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, k as ReciprocitySkill, S as SpeakerCard, l as SpeakerDirectoryFilters, m as SpeakerGroup, n as SpeakersResponse, T as TalkEvent, o as TalkRow, p as TalkSpeaker, q as TalksResponse, r as checkNetworkMapJobStatus, s as createEducation, t as createPosition, u as createRecord, v as deleteEducation, w as deletePosition, x as deleteRecord, y as dismissEndorsement, z as fetchAtFundLink, A as fetchEndorsementCount, B as fetchEntitySearch, C as fetchGermMessageLink, E as fetchGetProfileView, H as fetchNetworkMap, I as fetchNetworkStreamCount, J as fetchPendingEndorsements, K as fetchProfile, L as fetchProfileSummary, M as fetchReceivedEndorsements, O as fetchReciprocityCandidate, Q as fetchSpeakers, U as fetchTalks, V as germRedirectPath, W as hideKeytraceClaim, X as importSearchEntities, Y as initiateNetworkMapGeneration, Z as isNetworkMapResponse, _ as linkSkillToPosition, a1 as revealMarqueDomain, a2 as selectEntity, a3 as setPositionPrimary, a4 as unhideKeytraceClaim, a5 as unlinkSkillFromPosition, a6 as unrevealMarqueDomain, a7 as unsetPositionPrimary, a8 as updateEducation, a9 as updatePosition, aa as updateRecord } from '../../network-map-2OKh3wSB.js';
|
|
4
|
-
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityPreferences, g as ActivityTeaserResponse, h as AdminReviewQueues, i as AppRegistryEntry, B as BulkHideProfileItemInput, j as CastRoadmapVoteResult, k as CheckAppAccountOptions, C as ConfirmEndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, n as CreateExternalAccountResult, D as DeleteAccountResult, o as DismissCompletenessSignalInput, p as DismissUnlinkedPositionInput, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityPreferencesOptions, w as FetchActivityTeaserOptions, x as FetchConfirmationsOptions, y as FetchFollowListOptions, z as FetchFollowProfilePageOptions, G as FetchFollowingFeedOptions, H as FetchHiddenActivityItemsOptions, I as FetchHiddenAppsOptions, J as FetchInboxCountsOptions, K as FetchMyGithubPullRequestsOptions, L as
|
|
4
|
+
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityPreferences, g as ActivityTeaserResponse, h as AdminReviewQueues, i as AppRegistryEntry, B as BulkHideProfileItemInput, j as CastRoadmapVoteResult, k as CheckAppAccountOptions, C as ConfirmEndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, n as CreateExternalAccountResult, D as DeleteAccountResult, o as DismissCompletenessSignalInput, p as DismissUnlinkedPositionInput, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityPreferencesOptions, w as FetchActivityTeaserOptions, x as FetchConfirmationsOptions, y as FetchFollowListOptions, z as FetchFollowProfilePageOptions, G as FetchFollowingFeedOptions, H as FetchHiddenActivityItemsOptions, I as FetchHiddenAppsOptions, J as FetchInboxCountsOptions, K as FetchMyGithubPullRequestsOptions, L as FetchProfileCompletenessOptions, M as FetchReactionStatusOptions, N as FetchRoadmapOptions, O as FetchRpgClaimableOptions, P as FetchRpgStatusOptions, Q as FetchSuggestionsOptions, R as FetchUnlinkedPositionsOptions, S as FetchUserSettingsOptions, T as FollowListPage, U as FollowProfile, V as FollowProfilePageResponse, W as FollowUserResult, X as FollowingFeedApp, Y as FollowingFeedBuild, Z as FollowingFeedEmptyReason, _ as FollowingFeedResponse, $ as FollowingFeedVersion, a0 as FollowingResponse, a1 as GetAdminReviewQueuesOptions, a2 as GithubPullRequest, a3 as GivenConfirmation, a4 as HIDDEN_ITEM_SOURCES, a5 as HIDDEN_ITEM_TYPES, a6 as HeatmapDay, a7 as HeatmapResponse, a8 as HiddenActivityItem, a9 as HiddenApp, aa as HiddenItemSource, ab as HiddenItemType, ac as HideActivityItemInput, ad as HideProfileItemInput, ae as InboxCounts, af as ListFeatureAllowlistOptions, ag as MyGithubPullRequestsResponse, ah as OrgClaimBinding, ai as OrgClaimResult, aj as OrgDomainChallengeResult, ak as OrgDomainVerifyResult, al as OrgNotificationEmailAddResult, am as OrgNotificationEmailRemoveResult, an as OrgProfileEcho, ao as OrgProfileUpdateResult, ap as PROFILE_COMPLETENESS_SIGNALS, aq as PdsWipeOutcome, ar as PendingConfirmation, as as PendingConfirmationsPage, at as PrimarySection, au as ProfileCompleteness, av as ProfileCompletenessSignal, aw as ProfileIndustryInput, ax as ProfileLocationAddress, ay as ProfileLocationInput, az as ProfileSelfLocation, aA as QUOTED_POSTS_BATCH_MAX, aB as QuotedPostAuthor, aC as QuotedPostImage, aD as QuotedPostResult, aE as QuotedPostView, aF as ReactionError, aG as ReactionResult, aH as ReactionStatus, aI as RefreshOrcidPublicationsResult, aJ as RefreshPdsResult, aK as RepoDeleteInput, aL as ResetProfileResult, aM as ResolveQuotedPostsOptions, aN as RoadmapBoardItem, aO as RoadmapBoardSize, aP as RoadmapBoardStatus, aQ as RoadmapItemRef, aR as RoadmapVoteError, aS as RoadmapVoteResult, aT as RoadmapVoter, aU as RpgClaimableResponse, aV as RpgClaimableResponseSchema, aW as RpgItemStatus, aX as RpgItemStatusSchema, aY as RpgStatusResponse, aZ as RpgStatusResponseSchema, a_ as SifaQueryKey, a$ as SimilarProfile, b0 as SiteActivityPresetResponse, b1 as StatsResponse, b3 as SuggestionProfile, b4 as SuggestionsResponse, b5 as UnhideActivityItemInput, b6 as UnlinkedPosition, b7 as UnlinkedPositionsResult, b8 as UpdateActivityPreferencesInput, b9 as UpdateProfileOverrideInput, ba as UpdateProfileSelfInput, bb as UploadAvatarResult, bc as UploadPronunciationAudioResult, bd as UserSettings, be as UserSettingsPatch, bf as UserSettingsSchema, bg as VerifyExternalAccountResult, bh as WipePreview, bi as addFeatureAllowlist, bj as addOrgNotificationEmail, bk as bulkHideProfileItems, bl as bulkHideStandardPublications, bm as bulkUnhideProfileItems, bn as bulkUnhideStandardPublications, bo as castRoadmapItemVote, bp as checkAppAccount, bq as clearCompletenessDismissals, br as confirmEndorsement, bs as createConfirmation, bt as createEndorsement, bu as createExternalAccount, bv as createProfileLocation, bw as createReaction, bx as createSkill, by as deleteAccount, bz as deleteAvatarOverride, bA as deleteExternalAccount, bB as deleteNamePronunciationAudio, bC as deleteProfileLocation, bD as deleteReaction, bE as deleteRepoRecords, bF as deleteSkill, bG as dismissCompletenessSignal, bH as dismissConfirmation, bI as dismissUnlinkedPosition, bJ as fetchAccounts, bK as fetchActivityFeed, bL as fetchActivityPreferences, bM as fetchActivityTeaser, bN as fetchAppsRegistry, bO as fetchExternalAccounts, bP as fetchFeaturedProfile, bQ as fetchFollowing, bR as fetchFollowingFeed, bS as fetchFollowingFeedVersion, bT as fetchGivenConfirmations, bU as fetchHeatmapData, bV as fetchHiddenActivityItems, bW as fetchHiddenApps, bX as fetchInboxCounts, bY as fetchMyGithubPullRequests, bZ as fetchPendingConfirmations, b_ as fetchProfileCompleteness, b$ as fetchReactionStatus, c0 as fetchRepoInventory, c1 as fetchRoadmap, c2 as fetchRpgClaimable, c3 as fetchRpgStatus, c4 as fetchSimilarProfiles, c5 as fetchSiteActivityPreset, c6 as fetchStats, c7 as fetchSuggestionCount, c8 as fetchSuggestions, c9 as fetchUnlinkedPositions, ca as fetchUserSettings, cb as fetchViewerPositionConfirmations, cc as fetchWipePreview, cd as followUser, ce as getAdminReviewQueues, cf as getBlueskySuggestions, cg as getFollowers, ch as getFollowing, ci as getMutuals, cj as hideActivityItem, ck as hideOrcidPublication, cl as hideProfileItem, cm as hideSifaPublication, cn as hideStandardPublication, co as isNewerFollowingFeed, cp as listFeatureAllowlist, cq as refreshOrcidPublications, cr as refreshPds, cs as removeFeatureAllowlist, ct as removeOrgNotificationEmail, cu as repoExportUrl, cv as requestOrgDomainChallenge, cw as resetProfile, cx as resolveQuotedPosts, cy as retractRoadmapItemVote, cz as revokeConfirmation, cA as setExternalAccountPrimary, cB as setSectionPrimary, s as sifaQueryKeys, cC as submitOrgClaim, cD as switchAccount, cE as unfollowUser, cF as unhideActivityItem, cG as unhideOrcidPublication, cH as unhideProfileItem, cI as unhideSifaPublication, cJ as unhideStandardPublication, cK as unsetExternalAccountPrimary, cL as unsetSectionPrimary, cM as updateActivityPreferences, cN as updateExternalAccount, cO as updateOrgProfile, cP as updateProfileLocation, cQ as updateProfileOverride, cR as updateProfileSelf, cS as updateSkill, cU as updateUserSettings, cV as uploadAvatar, cW as uploadNamePronunciationAudio, cX as verifyExternalAccount, cY as verifyOrgDomain } from '../../user-settings-BdNrDa9O.js';
|
|
5
5
|
import '../../index-DDh2RLvx.js';
|
|
6
6
|
import '../../verification-providers-DeyGqaoC.js';
|
|
7
7
|
import 'zod';
|
|
@@ -189,12 +189,8 @@ import {
|
|
|
189
189
|
} from "./quoted-posts.js";
|
|
190
190
|
import {
|
|
191
191
|
castRoadmapItemVote,
|
|
192
|
-
castRoadmapVote,
|
|
193
|
-
fetchMyRoadmapVotes,
|
|
194
192
|
fetchRoadmap,
|
|
195
|
-
|
|
196
|
-
retractRoadmapItemVote,
|
|
197
|
-
retractRoadmapVote
|
|
193
|
+
retractRoadmapItemVote
|
|
198
194
|
} from "./roadmap.js";
|
|
199
195
|
import {
|
|
200
196
|
deleteAccount,
|
|
@@ -250,7 +246,6 @@ export {
|
|
|
250
246
|
bulkUnhideProfileItems,
|
|
251
247
|
bulkUnhideStandardPublications,
|
|
252
248
|
castRoadmapItemVote,
|
|
253
|
-
castRoadmapVote,
|
|
254
249
|
checkAppAccount,
|
|
255
250
|
checkNetworkMapJobStatus,
|
|
256
251
|
clearCompletenessDismissals,
|
|
@@ -302,7 +297,6 @@ export {
|
|
|
302
297
|
fetchHiddenApps,
|
|
303
298
|
fetchInboxCounts,
|
|
304
299
|
fetchMyGithubPullRequests,
|
|
305
|
-
fetchMyRoadmapVotes,
|
|
306
300
|
fetchNetworkMap,
|
|
307
301
|
fetchNetworkStreamCount,
|
|
308
302
|
fetchPendingConfirmations,
|
|
@@ -315,7 +309,6 @@ export {
|
|
|
315
309
|
fetchReciprocityCandidate,
|
|
316
310
|
fetchRepoInventory,
|
|
317
311
|
fetchRoadmap,
|
|
318
|
-
fetchRoadmapVotes,
|
|
319
312
|
fetchRpgClaimable,
|
|
320
313
|
fetchRpgStatus,
|
|
321
314
|
fetchSearchCompanies,
|
|
@@ -361,7 +354,6 @@ export {
|
|
|
361
354
|
resetProfile,
|
|
362
355
|
resolveQuotedPosts,
|
|
363
356
|
retractRoadmapItemVote,
|
|
364
|
-
retractRoadmapVote,
|
|
365
357
|
revealMarqueDomain,
|
|
366
358
|
revokeConfirmation,
|
|
367
359
|
searchSkills,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/query/fetchers/index.ts"],"sourcesContent":["/**\n * Fetcher-only barrel for `@singi-labs/sifa-sdk/query/fetchers`.\n *\n * Pure, no React imports. Safe to import from Next.js React Server\n * Components, edge runtimes, and any other context where React hooks\n * are unavailable. Client components should import from\n * `@singi-labs/sifa-sdk/query` to get hooks + Provider too.\n *\n * Keep in sync with `../index.ts`: every fetcher exported there should\n * also be exported here. Hooks and the Provider live only in the\n * `/query` barrel.\n */\n\nexport {\n ApiError,\n apiFetch,\n apiFetchOrNull,\n apiWrite,\n apiWriteCreate,\n type ApiFetchOptions,\n type CreateResult,\n type SifaApiConfig,\n type WriteResult,\n} from '../client.js';\n\nexport { fetchAtFundLink, fetchProfile } from './profile.js';\nexport {\n fetchGermMessageLink,\n germRedirectPath,\n type FetchGermMessageLinkOptions,\n type GermMessageLink,\n} from './germ.js';\nexport { fetchGetProfileView } from './get-profile-view.js';\nexport {\n deleteAvatarOverride,\n deleteNamePronunciationAudio,\n refreshPds,\n updateProfileOverride,\n updateProfileSelf,\n uploadAvatar,\n uploadNamePronunciationAudio,\n type ProfileIndustryInput,\n type ProfileSelfLocation,\n type RefreshPdsResult,\n type UpdateProfileOverrideInput,\n type UpdateProfileSelfInput,\n type UploadAvatarResult,\n type UploadPronunciationAudioResult,\n} from './profile-mutations.js';\nexport {\n createPosition,\n deletePosition,\n linkSkillToPosition,\n setPositionPrimary,\n unlinkSkillFromPosition,\n unsetPositionPrimary,\n updatePosition,\n} from './positions.js';\nexport { createEducation, deleteEducation, updateEducation } from './education.js';\nexport { setSectionPrimary, unsetSectionPrimary, type PrimarySection } from './section-primary.js';\nexport { createSkill, deleteSkill, updateSkill } from './skills.js';\nexport { createRecord, deleteRecord, updateRecord } from './records.js';\nexport {\n createProfileLocation,\n deleteProfileLocation,\n updateProfileLocation,\n type ProfileLocationAddress,\n type ProfileLocationInput,\n} from './profile-locations.js';\nexport {\n createExternalAccount,\n deleteExternalAccount,\n fetchExternalAccounts,\n setExternalAccountPrimary,\n unsetExternalAccountPrimary,\n updateExternalAccount,\n verifyExternalAccount,\n type CreateExternalAccountResult,\n type ExternalAccountInput,\n type VerifyExternalAccountResult,\n} from './external-accounts.js';\nexport {\n createEndorsement,\n confirmEndorsement,\n type EndorsementInput,\n type ConfirmEndorsementInput,\n} from './endorsements.js';\nexport {\n fetchReceivedEndorsements,\n type ReceivedEndorsement,\n type ReceivedEndorsementsPage,\n} from './received-endorsements.js';\nexport {\n fetchReciprocityCandidate,\n type ReciprocityCandidate,\n type ReciprocitySkill,\n} from './reciprocity.js';\nexport {\n fetchPendingEndorsements,\n dismissEndorsement,\n type PendingEndorsement,\n type PendingEndorsementsPage,\n type DismissEndorsementInput,\n type FetchPendingEndorsementsOptions,\n} from './endorsement-inbox.js';\nexport {\n fetchPendingConfirmations,\n fetchGivenConfirmations,\n fetchViewerPositionConfirmations,\n createConfirmation,\n dismissConfirmation,\n revokeConfirmation,\n type PendingConfirmation,\n type PendingConfirmationsPage,\n type GivenConfirmation,\n type ConfirmationInput,\n type ConfirmationSubjectInput,\n type FetchConfirmationsOptions,\n} from './confirmations.js';\nexport { fetchInboxCounts, type InboxCounts, type FetchInboxCountsOptions } from './inbox.js';\nexport {\n fetchUnlinkedPositions,\n dismissUnlinkedPosition,\n type UnlinkedPosition,\n type UnlinkedPositionsResult,\n type FetchUnlinkedPositionsOptions,\n type DismissUnlinkedPositionInput,\n} from './unlinked-positions.js';\nexport {\n fetchProfileCompleteness,\n dismissCompletenessSignal,\n clearCompletenessDismissals,\n PROFILE_COMPLETENESS_SIGNALS,\n type ProfileCompleteness,\n type ProfileCompletenessSignal,\n type FetchProfileCompletenessOptions,\n type DismissCompletenessSignalInput,\n} from './profile-completeness.js';\nexport { hideKeytraceClaim, unhideKeytraceClaim } from './keytrace-claims.js';\nexport { revealMarqueDomain, unrevealMarqueDomain } from './marque-domains.js';\nexport {\n bulkHideStandardPublications,\n bulkUnhideStandardPublications,\n hideOrcidPublication,\n hideSifaPublication,\n hideStandardPublication,\n refreshOrcidPublications,\n unhideOrcidPublication,\n unhideSifaPublication,\n unhideStandardPublication,\n type RefreshOrcidPublicationsResult,\n} from './publications.js';\nexport {\n bulkHideProfileItems,\n bulkUnhideProfileItems,\n hideProfileItem,\n unhideProfileItem,\n HIDDEN_ITEM_SOURCES,\n HIDDEN_ITEM_TYPES,\n type BulkHideProfileItemInput,\n type HiddenItemSource,\n type HiddenItemType,\n type HideProfileItemInput,\n} from './profile-items-hide.js';\nexport {\n fetchHiddenActivityItems,\n hideActivityItem,\n unhideActivityItem,\n type FetchHiddenActivityItemsOptions,\n type HiddenActivityItem,\n type HideActivityItemInput,\n type UnhideActivityItemInput,\n} from './activity-items-hide.js';\nexport {\n fetchActivityPreferences,\n fetchSiteActivityPreset,\n updateActivityPreferences,\n type ActivityPreferences,\n type FetchActivityPreferencesOptions,\n type SiteActivityPresetResponse,\n type UpdateActivityPreferencesInput,\n} from './activity-preferences.js';\nexport { fetchStats, type StatsResponse } from './stats.js';\nexport {\n fetchAppsRegistry,\n fetchHiddenApps,\n type AppRegistryEntry,\n type FetchHiddenAppsOptions,\n type HiddenApp,\n} from './apps.js';\nexport {\n fetchAccounts,\n switchAccount,\n type AccountSummary,\n type FetchAccountsOptions,\n} from './accounts.js';\nexport {\n fetchSearchCompanies,\n fetchSearchFilters,\n fetchSearchProfiles,\n fetchSkillSuggestions,\n searchSkills,\n type CompanySearchFilters,\n type CompanySearchResponse,\n type CompanySearchResult,\n type FilterOptions,\n type ProfileSearchResult,\n type ProfileSearchSuggestion,\n type SearchFilters,\n type SearchResponse,\n type SkillSearchResult,\n} from './search.js';\nexport {\n fetchSpeakers,\n fetchTalks,\n type SpeakerCard,\n type SpeakerGroup,\n type SpeakerDirectoryFilters,\n type SpeakersResponse,\n type TalkEvent,\n type TalkRow,\n type TalkSpeaker,\n type TalksResponse,\n} from './speakers.js';\nexport {\n fetchFeaturedProfile,\n fetchSimilarProfiles,\n fetchSuggestionCount,\n fetchSuggestions,\n type FeaturedProfile,\n type FetchSuggestionsOptions,\n type SimilarProfile,\n type SuggestionProfile,\n type SuggestionsResponse,\n} from './discovery.js';\nexport {\n fetchFollowing,\n followUser,\n getFollowers,\n getFollowing,\n fetchFollowingFeed,\n fetchFollowingFeedVersion,\n isNewerFollowingFeed,\n type FollowingFeedVersion,\n type FollowingFeedBuild,\n unfollowUser,\n type FetchFollowListOptions,\n type FetchFollowingFeedOptions,\n type FollowingFeedApp,\n type FollowingFeedEmptyReason,\n type FollowingFeedResponse,\n type FollowListPage,\n type FollowProfile,\n type FollowUserResult,\n type FollowingResponse,\n} from './follow.js';\nexport {\n getBlueskySuggestions,\n getMutuals,\n type FetchFollowProfilePageOptions,\n type FollowProfilePageResponse,\n} from './follow-extras.js';\nexport {\n addFeatureAllowlist,\n listFeatureAllowlist,\n removeFeatureAllowlist,\n type FeatureAllowlistResponse,\n type ListFeatureAllowlistOptions,\n} from './admin-feature-allowlists.js';\nexport {\n getAdminReviewQueues,\n type AdminReviewQueues,\n type GetAdminReviewQueuesOptions,\n} from './admin-review-queues.js';\nexport {\n fetchActivityFeed,\n fetchActivityTeaser,\n fetchHeatmapData,\n type ActivityFeedResponse,\n type ActivityItem,\n type ActivityItemLinkHealth,\n type ActivityTeaserResponse,\n type FetchActivityFeedOptions,\n type FetchActivityTeaserOptions,\n type HeatmapDay,\n type HeatmapResponse,\n} from './activity.js';\nexport {\n fetchMyGithubPullRequests,\n type GithubPullRequest,\n type MyGithubPullRequestsResponse,\n type FetchMyGithubPullRequestsOptions,\n} from './github-prs.js';\nexport {\n fetchRpgStatus,\n fetchRpgClaimable,\n RpgItemStatusSchema,\n RpgStatusResponseSchema,\n RpgClaimableResponseSchema,\n type RpgItemStatus,\n type RpgStatusResponse,\n type FetchRpgStatusOptions,\n type RpgClaimableResponse,\n type FetchRpgClaimableOptions,\n} from './rpg.js';\nexport { fetchEndorsementCount } from './endorsement.js';\nexport { fetchNetworkStreamCount, type FetchNetworkStreamCountOptions } from './stream.js';\nexport {\n checkAppAccount,\n createReaction,\n deleteReaction,\n fetchReactionStatus,\n type AccountCheckResult,\n type CheckAppAccountOptions,\n type FetchReactionStatusOptions,\n type ReactionError,\n type ReactionResult,\n type ReactionStatus,\n} from './reactions.js';\nexport {\n QUOTED_POSTS_BATCH_MAX,\n resolveQuotedPosts,\n type QuotedPostAuthor,\n type QuotedPostImage,\n type QuotedPostResult,\n type QuotedPostView,\n type ResolveQuotedPostsOptions,\n} from './quoted-posts.js';\nexport {\n castRoadmapItemVote,\n castRoadmapVote,\n fetchMyRoadmapVotes,\n fetchRoadmap,\n fetchRoadmapVotes,\n retractRoadmapItemVote,\n retractRoadmapVote,\n type CastRoadmapVoteResult,\n type FetchMyRoadmapVotesOptions,\n type FetchRoadmapOptions,\n type RoadmapBoardItem,\n type RoadmapBoardSize,\n type RoadmapBoardStatus,\n type RoadmapItemRef,\n type RoadmapVoteError,\n type RoadmapVoteResult,\n type RoadmapVoter,\n type RoadmapVotesResponse,\n} from './roadmap.js';\nexport {\n deleteAccount,\n fetchWipePreview,\n resetProfile,\n type DeleteAccountResult,\n type ResetProfileResult,\n type PdsWipeOutcome,\n type WipePreview,\n} from './destructive.js';\nexport {\n deleteRepoRecords,\n fetchRepoInventory,\n repoExportUrl,\n type RepoDeleteInput,\n} from './repo-inventory.js';\nexport {\n checkNetworkMapJobStatus,\n fetchNetworkMap,\n initiateNetworkMapGeneration,\n isNetworkMapResponse,\n type NetworkMapEdge,\n type NetworkMapGenerationJob,\n type NetworkMapGraphData,\n type NetworkMapNode,\n type NetworkMapPendingJob,\n type NetworkMapResponse,\n} from './network-map.js';\n\nexport { fetchEntitySearch, selectEntity, importSearchEntities } from './entities.js';\n\nexport {\n submitOrgClaim,\n updateOrgProfile,\n requestOrgDomainChallenge,\n verifyOrgDomain,\n addOrgNotificationEmail,\n removeOrgNotificationEmail,\n type OrgClaimBinding,\n type OrgProfileEcho,\n type OrgClaimResult,\n type OrgProfileUpdateResult,\n type OrgDomainChallengeResult,\n type OrgDomainVerifyResult,\n type OrgNotificationEmailAddResult,\n type OrgNotificationEmailRemoveResult,\n} from './org.js';\n\nexport { fetchProfileSummary } from './profile-summary.js';\n\nexport {\n fetchUserSettings,\n updateUserSettings,\n UserSettingsSchema,\n type FetchUserSettingsOptions,\n type UserSettings,\n type UserSettingsPatch,\n} from './user-settings.js';\n\nexport { sifaQueryKeys, type SifaQueryKey } from '../keys.js';\nexport { createInvestment, updateInvestment, deleteInvestment } from './investments.js';\n"],"mappings":";AAaA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAEP,SAAS,iBAAiB,oBAAoB;AAC9C;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAQK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,OAUK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OASK;AACP;AAAA,EACE;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,6BAA6B;AACtC,SAAS,+BAAoE;AAC7E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAMK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAYK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AAEP,SAAS,mBAAmB,cAAc,4BAA4B;AAEtE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OASK;AAEP,SAAS,2BAA2B;AAEpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP,SAAS,qBAAwC;AACjD,SAAS,kBAAkB,kBAAkB,wBAAwB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/query/fetchers/index.ts"],"sourcesContent":["/**\n * Fetcher-only barrel for `@singi-labs/sifa-sdk/query/fetchers`.\n *\n * Pure, no React imports. Safe to import from Next.js React Server\n * Components, edge runtimes, and any other context where React hooks\n * are unavailable. Client components should import from\n * `@singi-labs/sifa-sdk/query` to get hooks + Provider too.\n *\n * Keep in sync with `../index.ts`: every fetcher exported there should\n * also be exported here. Hooks and the Provider live only in the\n * `/query` barrel.\n */\n\nexport {\n ApiError,\n apiFetch,\n apiFetchOrNull,\n apiWrite,\n apiWriteCreate,\n type ApiFetchOptions,\n type CreateResult,\n type SifaApiConfig,\n type WriteResult,\n} from '../client.js';\n\nexport { fetchAtFundLink, fetchProfile } from './profile.js';\nexport {\n fetchGermMessageLink,\n germRedirectPath,\n type FetchGermMessageLinkOptions,\n type GermMessageLink,\n} from './germ.js';\nexport { fetchGetProfileView } from './get-profile-view.js';\nexport {\n deleteAvatarOverride,\n deleteNamePronunciationAudio,\n refreshPds,\n updateProfileOverride,\n updateProfileSelf,\n uploadAvatar,\n uploadNamePronunciationAudio,\n type ProfileIndustryInput,\n type ProfileSelfLocation,\n type RefreshPdsResult,\n type UpdateProfileOverrideInput,\n type UpdateProfileSelfInput,\n type UploadAvatarResult,\n type UploadPronunciationAudioResult,\n} from './profile-mutations.js';\nexport {\n createPosition,\n deletePosition,\n linkSkillToPosition,\n setPositionPrimary,\n unlinkSkillFromPosition,\n unsetPositionPrimary,\n updatePosition,\n} from './positions.js';\nexport { createEducation, deleteEducation, updateEducation } from './education.js';\nexport { setSectionPrimary, unsetSectionPrimary, type PrimarySection } from './section-primary.js';\nexport { createSkill, deleteSkill, updateSkill } from './skills.js';\nexport { createRecord, deleteRecord, updateRecord } from './records.js';\nexport {\n createProfileLocation,\n deleteProfileLocation,\n updateProfileLocation,\n type ProfileLocationAddress,\n type ProfileLocationInput,\n} from './profile-locations.js';\nexport {\n createExternalAccount,\n deleteExternalAccount,\n fetchExternalAccounts,\n setExternalAccountPrimary,\n unsetExternalAccountPrimary,\n updateExternalAccount,\n verifyExternalAccount,\n type CreateExternalAccountResult,\n type ExternalAccountInput,\n type VerifyExternalAccountResult,\n} from './external-accounts.js';\nexport {\n createEndorsement,\n confirmEndorsement,\n type EndorsementInput,\n type ConfirmEndorsementInput,\n} from './endorsements.js';\nexport {\n fetchReceivedEndorsements,\n type ReceivedEndorsement,\n type ReceivedEndorsementsPage,\n} from './received-endorsements.js';\nexport {\n fetchReciprocityCandidate,\n type ReciprocityCandidate,\n type ReciprocitySkill,\n} from './reciprocity.js';\nexport {\n fetchPendingEndorsements,\n dismissEndorsement,\n type PendingEndorsement,\n type PendingEndorsementsPage,\n type DismissEndorsementInput,\n type FetchPendingEndorsementsOptions,\n} from './endorsement-inbox.js';\nexport {\n fetchPendingConfirmations,\n fetchGivenConfirmations,\n fetchViewerPositionConfirmations,\n createConfirmation,\n dismissConfirmation,\n revokeConfirmation,\n type PendingConfirmation,\n type PendingConfirmationsPage,\n type GivenConfirmation,\n type ConfirmationInput,\n type ConfirmationSubjectInput,\n type FetchConfirmationsOptions,\n} from './confirmations.js';\nexport { fetchInboxCounts, type InboxCounts, type FetchInboxCountsOptions } from './inbox.js';\nexport {\n fetchUnlinkedPositions,\n dismissUnlinkedPosition,\n type UnlinkedPosition,\n type UnlinkedPositionsResult,\n type FetchUnlinkedPositionsOptions,\n type DismissUnlinkedPositionInput,\n} from './unlinked-positions.js';\nexport {\n fetchProfileCompleteness,\n dismissCompletenessSignal,\n clearCompletenessDismissals,\n PROFILE_COMPLETENESS_SIGNALS,\n type ProfileCompleteness,\n type ProfileCompletenessSignal,\n type FetchProfileCompletenessOptions,\n type DismissCompletenessSignalInput,\n} from './profile-completeness.js';\nexport { hideKeytraceClaim, unhideKeytraceClaim } from './keytrace-claims.js';\nexport { revealMarqueDomain, unrevealMarqueDomain } from './marque-domains.js';\nexport {\n bulkHideStandardPublications,\n bulkUnhideStandardPublications,\n hideOrcidPublication,\n hideSifaPublication,\n hideStandardPublication,\n refreshOrcidPublications,\n unhideOrcidPublication,\n unhideSifaPublication,\n unhideStandardPublication,\n type RefreshOrcidPublicationsResult,\n} from './publications.js';\nexport {\n bulkHideProfileItems,\n bulkUnhideProfileItems,\n hideProfileItem,\n unhideProfileItem,\n HIDDEN_ITEM_SOURCES,\n HIDDEN_ITEM_TYPES,\n type BulkHideProfileItemInput,\n type HiddenItemSource,\n type HiddenItemType,\n type HideProfileItemInput,\n} from './profile-items-hide.js';\nexport {\n fetchHiddenActivityItems,\n hideActivityItem,\n unhideActivityItem,\n type FetchHiddenActivityItemsOptions,\n type HiddenActivityItem,\n type HideActivityItemInput,\n type UnhideActivityItemInput,\n} from './activity-items-hide.js';\nexport {\n fetchActivityPreferences,\n fetchSiteActivityPreset,\n updateActivityPreferences,\n type ActivityPreferences,\n type FetchActivityPreferencesOptions,\n type SiteActivityPresetResponse,\n type UpdateActivityPreferencesInput,\n} from './activity-preferences.js';\nexport { fetchStats, type StatsResponse } from './stats.js';\nexport {\n fetchAppsRegistry,\n fetchHiddenApps,\n type AppRegistryEntry,\n type FetchHiddenAppsOptions,\n type HiddenApp,\n} from './apps.js';\nexport {\n fetchAccounts,\n switchAccount,\n type AccountSummary,\n type FetchAccountsOptions,\n} from './accounts.js';\nexport {\n fetchSearchCompanies,\n fetchSearchFilters,\n fetchSearchProfiles,\n fetchSkillSuggestions,\n searchSkills,\n type CompanySearchFilters,\n type CompanySearchResponse,\n type CompanySearchResult,\n type FilterOptions,\n type ProfileSearchResult,\n type ProfileSearchSuggestion,\n type SearchFilters,\n type SearchResponse,\n type SkillSearchResult,\n} from './search.js';\nexport {\n fetchSpeakers,\n fetchTalks,\n type SpeakerCard,\n type SpeakerGroup,\n type SpeakerDirectoryFilters,\n type SpeakersResponse,\n type TalkEvent,\n type TalkRow,\n type TalkSpeaker,\n type TalksResponse,\n} from './speakers.js';\nexport {\n fetchFeaturedProfile,\n fetchSimilarProfiles,\n fetchSuggestionCount,\n fetchSuggestions,\n type FeaturedProfile,\n type FetchSuggestionsOptions,\n type SimilarProfile,\n type SuggestionProfile,\n type SuggestionsResponse,\n} from './discovery.js';\nexport {\n fetchFollowing,\n followUser,\n getFollowers,\n getFollowing,\n fetchFollowingFeed,\n fetchFollowingFeedVersion,\n isNewerFollowingFeed,\n type FollowingFeedVersion,\n type FollowingFeedBuild,\n unfollowUser,\n type FetchFollowListOptions,\n type FetchFollowingFeedOptions,\n type FollowingFeedApp,\n type FollowingFeedEmptyReason,\n type FollowingFeedResponse,\n type FollowListPage,\n type FollowProfile,\n type FollowUserResult,\n type FollowingResponse,\n} from './follow.js';\nexport {\n getBlueskySuggestions,\n getMutuals,\n type FetchFollowProfilePageOptions,\n type FollowProfilePageResponse,\n} from './follow-extras.js';\nexport {\n addFeatureAllowlist,\n listFeatureAllowlist,\n removeFeatureAllowlist,\n type FeatureAllowlistResponse,\n type ListFeatureAllowlistOptions,\n} from './admin-feature-allowlists.js';\nexport {\n getAdminReviewQueues,\n type AdminReviewQueues,\n type GetAdminReviewQueuesOptions,\n} from './admin-review-queues.js';\nexport {\n fetchActivityFeed,\n fetchActivityTeaser,\n fetchHeatmapData,\n type ActivityFeedResponse,\n type ActivityItem,\n type ActivityItemLinkHealth,\n type ActivityTeaserResponse,\n type FetchActivityFeedOptions,\n type FetchActivityTeaserOptions,\n type HeatmapDay,\n type HeatmapResponse,\n} from './activity.js';\nexport {\n fetchMyGithubPullRequests,\n type GithubPullRequest,\n type MyGithubPullRequestsResponse,\n type FetchMyGithubPullRequestsOptions,\n} from './github-prs.js';\nexport {\n fetchRpgStatus,\n fetchRpgClaimable,\n RpgItemStatusSchema,\n RpgStatusResponseSchema,\n RpgClaimableResponseSchema,\n type RpgItemStatus,\n type RpgStatusResponse,\n type FetchRpgStatusOptions,\n type RpgClaimableResponse,\n type FetchRpgClaimableOptions,\n} from './rpg.js';\nexport { fetchEndorsementCount } from './endorsement.js';\nexport { fetchNetworkStreamCount, type FetchNetworkStreamCountOptions } from './stream.js';\nexport {\n checkAppAccount,\n createReaction,\n deleteReaction,\n fetchReactionStatus,\n type AccountCheckResult,\n type CheckAppAccountOptions,\n type FetchReactionStatusOptions,\n type ReactionError,\n type ReactionResult,\n type ReactionStatus,\n} from './reactions.js';\nexport {\n QUOTED_POSTS_BATCH_MAX,\n resolveQuotedPosts,\n type QuotedPostAuthor,\n type QuotedPostImage,\n type QuotedPostResult,\n type QuotedPostView,\n type ResolveQuotedPostsOptions,\n} from './quoted-posts.js';\nexport {\n castRoadmapItemVote,\n fetchRoadmap,\n retractRoadmapItemVote,\n type CastRoadmapVoteResult,\n type FetchRoadmapOptions,\n type RoadmapBoardItem,\n type RoadmapBoardSize,\n type RoadmapBoardStatus,\n type RoadmapItemRef,\n type RoadmapVoteError,\n type RoadmapVoteResult,\n type RoadmapVoter,\n} from './roadmap.js';\nexport {\n deleteAccount,\n fetchWipePreview,\n resetProfile,\n type DeleteAccountResult,\n type ResetProfileResult,\n type PdsWipeOutcome,\n type WipePreview,\n} from './destructive.js';\nexport {\n deleteRepoRecords,\n fetchRepoInventory,\n repoExportUrl,\n type RepoDeleteInput,\n} from './repo-inventory.js';\nexport {\n checkNetworkMapJobStatus,\n fetchNetworkMap,\n initiateNetworkMapGeneration,\n isNetworkMapResponse,\n type NetworkMapEdge,\n type NetworkMapGenerationJob,\n type NetworkMapGraphData,\n type NetworkMapNode,\n type NetworkMapPendingJob,\n type NetworkMapResponse,\n} from './network-map.js';\n\nexport { fetchEntitySearch, selectEntity, importSearchEntities } from './entities.js';\n\nexport {\n submitOrgClaim,\n updateOrgProfile,\n requestOrgDomainChallenge,\n verifyOrgDomain,\n addOrgNotificationEmail,\n removeOrgNotificationEmail,\n type OrgClaimBinding,\n type OrgProfileEcho,\n type OrgClaimResult,\n type OrgProfileUpdateResult,\n type OrgDomainChallengeResult,\n type OrgDomainVerifyResult,\n type OrgNotificationEmailAddResult,\n type OrgNotificationEmailRemoveResult,\n} from './org.js';\n\nexport { fetchProfileSummary } from './profile-summary.js';\n\nexport {\n fetchUserSettings,\n updateUserSettings,\n UserSettingsSchema,\n type FetchUserSettingsOptions,\n type UserSettings,\n type UserSettingsPatch,\n} from './user-settings.js';\n\nexport { sifaQueryKeys, type SifaQueryKey } from '../keys.js';\nexport { createInvestment, updateInvestment, deleteInvestment } from './investments.js';\n"],"mappings":";AAaA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAEP,SAAS,iBAAiB,oBAAoB;AAC9C;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAQK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB,iBAAiB,uBAAuB;AAClE,SAAS,mBAAmB,2BAAgD;AAC5E,SAAS,aAAa,aAAa,mBAAmB;AACtD,SAAS,cAAc,cAAc,oBAAoB;AACzD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP,SAAS,wBAAwE;AACjF;AAAA,EACE;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,mBAAmB,2BAA2B;AACvD,SAAS,oBAAoB,4BAA4B;AACzD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,O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AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP,SAAS,qBAAwC;AACjD,SAAS,kBAAkB,kBAAkB,wBAAwB;","names":[]}
|
|
@@ -4,70 +4,6 @@ import {
|
|
|
4
4
|
apiFetch,
|
|
5
5
|
apiWrite
|
|
6
6
|
} from "../client.js";
|
|
7
|
-
async function fetchRoadmapVotes(config, options = {}) {
|
|
8
|
-
try {
|
|
9
|
-
return await apiFetch(config, "/api/roadmap/votes", {
|
|
10
|
-
cache: "no-store",
|
|
11
|
-
...options
|
|
12
|
-
});
|
|
13
|
-
} catch {
|
|
14
|
-
return {};
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
async function fetchMyRoadmapVotes(config, options = {}) {
|
|
18
|
-
const headers = { ...options.headers ?? {} };
|
|
19
|
-
if (options.cookieHeader) headers.cookie = options.cookieHeader;
|
|
20
|
-
try {
|
|
21
|
-
const data = await apiFetch(config, "/api/roadmap/votes/me", {
|
|
22
|
-
credentials: "include",
|
|
23
|
-
...options,
|
|
24
|
-
headers
|
|
25
|
-
});
|
|
26
|
-
return data.voted ?? [];
|
|
27
|
-
} catch {
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function castRoadmapVote(config, key, options = {}) {
|
|
32
|
-
return castUpvote(config, `/api/roadmap/votes/${encodeURIComponent(key)}`, options);
|
|
33
|
-
}
|
|
34
|
-
async function castUpvote(config, path, options) {
|
|
35
|
-
const fetchFn = config.fetch ?? globalThis.fetch;
|
|
36
|
-
const url = `${config.baseUrl}${path}`;
|
|
37
|
-
try {
|
|
38
|
-
const res = await fetchFn(url, {
|
|
39
|
-
method: "POST",
|
|
40
|
-
// No body: the item is in the URL. Do NOT declare a JSON content-type
|
|
41
|
-
// for an empty body — Fastify rejects that with a 400 before the handler
|
|
42
|
-
// runs. Only forward caller-provided headers.
|
|
43
|
-
...options.headers ? { headers: options.headers } : {},
|
|
44
|
-
credentials: options.credentials ?? "include",
|
|
45
|
-
signal: options.signal ?? AbortSignal.timeout(options.timeoutMs ?? 1e4)
|
|
46
|
-
});
|
|
47
|
-
if (!res.ok) {
|
|
48
|
-
if (res.status === 403) {
|
|
49
|
-
try {
|
|
50
|
-
const body = await res.json();
|
|
51
|
-
if (body.error === "ScopeInsufficient") {
|
|
52
|
-
return {
|
|
53
|
-
ok: false,
|
|
54
|
-
error: { type: "scope_insufficient", requiredScope: body.requiredScope }
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
} catch {
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return { ok: false, error: { type: "error" } };
|
|
61
|
-
}
|
|
62
|
-
const data = await res.json();
|
|
63
|
-
return { ok: true, data };
|
|
64
|
-
} catch {
|
|
65
|
-
return { ok: false, error: { type: "error" } };
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function retractRoadmapVote(config, key, options = {}) {
|
|
69
|
-
return apiWrite(config, `/api/roadmap/votes/${encodeURIComponent(key)}`, "DELETE", options);
|
|
70
|
-
}
|
|
71
7
|
var roadmapBoardItemSchema = z.object({
|
|
72
8
|
uri: z.string(),
|
|
73
9
|
did: z.string(),
|
|
@@ -108,19 +44,46 @@ async function fetchRoadmap(config, options = {}) {
|
|
|
108
44
|
function itemVotePath(item) {
|
|
109
45
|
return `/api/roadmap/items/${encodeURIComponent(item.did)}/${encodeURIComponent(item.rkey)}/vote`;
|
|
110
46
|
}
|
|
111
|
-
function castRoadmapItemVote(config, item, options = {}) {
|
|
112
|
-
|
|
47
|
+
async function castRoadmapItemVote(config, item, options = {}) {
|
|
48
|
+
const fetchFn = config.fetch ?? globalThis.fetch;
|
|
49
|
+
const url = `${config.baseUrl}${itemVotePath(item)}`;
|
|
50
|
+
try {
|
|
51
|
+
const res = await fetchFn(url, {
|
|
52
|
+
method: "POST",
|
|
53
|
+
// No body: the item is in the URL. Do NOT declare a JSON content-type
|
|
54
|
+
// for an empty body — Fastify rejects that with a 400 before the handler
|
|
55
|
+
// runs. Only forward caller-provided headers.
|
|
56
|
+
...options.headers ? { headers: options.headers } : {},
|
|
57
|
+
credentials: options.credentials ?? "include",
|
|
58
|
+
signal: options.signal ?? AbortSignal.timeout(options.timeoutMs ?? 1e4)
|
|
59
|
+
});
|
|
60
|
+
if (!res.ok) {
|
|
61
|
+
if (res.status === 403) {
|
|
62
|
+
try {
|
|
63
|
+
const body = await res.json();
|
|
64
|
+
if (body.error === "ScopeInsufficient") {
|
|
65
|
+
return {
|
|
66
|
+
ok: false,
|
|
67
|
+
error: { type: "scope_insufficient", requiredScope: body.requiredScope }
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
} catch {
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return { ok: false, error: { type: "error" } };
|
|
74
|
+
}
|
|
75
|
+
const data = await res.json();
|
|
76
|
+
return { ok: true, data };
|
|
77
|
+
} catch {
|
|
78
|
+
return { ok: false, error: { type: "error" } };
|
|
79
|
+
}
|
|
113
80
|
}
|
|
114
81
|
function retractRoadmapItemVote(config, item, options = {}) {
|
|
115
82
|
return apiWrite(config, itemVotePath(item), "DELETE", options);
|
|
116
83
|
}
|
|
117
84
|
export {
|
|
118
85
|
castRoadmapItemVote,
|
|
119
|
-
castRoadmapVote,
|
|
120
|
-
fetchMyRoadmapVotes,
|
|
121
86
|
fetchRoadmap,
|
|
122
|
-
|
|
123
|
-
retractRoadmapItemVote,
|
|
124
|
-
retractRoadmapVote
|
|
87
|
+
retractRoadmapItemVote
|
|
125
88
|
};
|
|
126
89
|
//# sourceMappingURL=roadmap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/query/fetchers/roadmap.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport {\n apiFetch,\n apiWrite,\n type ApiFetchOptions,\n type SifaApiConfig,\n type WriteResult,\n} from '../client.js';\n\n/** Voter on a roadmap item. */\nexport interface RoadmapVoter {\n did: string;\n avatarUrl?: string;\n}\n\n/** Map of item key -> vote tally and voter list. */\nexport type RoadmapVotesResponse = Record<string, { count: number; voters: RoadmapVoter[] }>;\n\n/**\n * Public roadmap vote tallies, keyed by item. Returns `{}` on any error.\n */\nexport async function fetchRoadmapVotes(\n config: SifaApiConfig,\n options: ApiFetchOptions = {},\n): Promise<RoadmapVotesResponse> {\n try {\n return await apiFetch<RoadmapVotesResponse>(config, '/api/roadmap/votes', {\n cache: 'no-store',\n ...options,\n });\n } catch {\n return {};\n }\n}\n\nexport interface FetchMyRoadmapVotesOptions extends ApiFetchOptions {\n /**\n * Pass the caller's `Cookie` header on Next.js RSC server-side calls.\n * Required for authenticated server fetches because `credentials: 'include'`\n * does not propagate browser cookies in RSC.\n */\n cookieHeader?: string;\n}\n\n/**\n * Roadmap items the authenticated user has voted on. Returns `[]` on any\n * error or when the response payload is shaped unexpectedly.\n */\nexport async function fetchMyRoadmapVotes(\n config: SifaApiConfig,\n options: FetchMyRoadmapVotesOptions = {},\n): Promise<string[]> {\n const headers: Record<string, string> = { ...(options.headers ?? {}) };\n if (options.cookieHeader) headers.cookie = options.cookieHeader;\n\n try {\n const data = await apiFetch<{ voted?: string[] }>(config, '/api/roadmap/votes/me', {\n credentials: 'include',\n ...options,\n headers,\n });\n return data.voted ?? [];\n } catch {\n return [];\n }\n}\n\n/** Result of a successful {@link castRoadmapVote} -- the created upvote record. */\nexport interface RoadmapVoteResult {\n uri: string;\n rkey: string;\n}\n\n/** Structured error returned by {@link castRoadmapVote} on failure. */\nexport interface RoadmapVoteError {\n type: 'scope_insufficient' | 'error';\n /**\n * When `type === 'scope_insufficient'`, the lexicon collection the user must\n * re-authorize for (e.g. `app.userinput.upvote`). sifa-web maps this to an\n * OAuth scope-upgrade flow (`/oauth/reauth?scope=repo:<collection>`).\n */\n requiredScope?: string;\n}\n\n/**\n * Discriminated-union result of {@link castRoadmapVote}. Exported so the\n * `useCastRoadmapVote` hook and SDK consumers can type mutation handlers\n * against a single source of truth.\n */\nexport type CastRoadmapVoteResult =\n { ok: true; data: RoadmapVoteResult } | { ok: false; error: RoadmapVoteError };\n\n/**\n * Cast a vote on a roadmap item by its key.\n *\n * Writes an `app.userinput.upvote` record into the viewer's PDS (server-side,\n * via their OAuth session). Returns a discriminated-union result rather than\n * the generic {@link WriteResult} because a first-time voter's PDS grant may\n * not yet include the `app.userinput.upvote` collection: the AppView responds\n * 403 `ScopeInsufficient`, which the caller handles by triggering an OAuth\n * scope upgrade rather than showing an error. Mirrors {@link createReaction}.\n *\n * Never throws.\n */\nexport function castRoadmapVote(\n config: SifaApiConfig,\n key: string,\n options: ApiFetchOptions = {},\n): Promise<CastRoadmapVoteResult> {\n return castUpvote(config, `/api/roadmap/votes/${encodeURIComponent(key)}`, options);\n}\n\nasync function castUpvote(\n config: SifaApiConfig,\n path: string,\n options: ApiFetchOptions,\n): Promise<CastRoadmapVoteResult> {\n const fetchFn = config.fetch ?? globalThis.fetch;\n const url = `${config.baseUrl}${path}`;\n\n try {\n const res = await fetchFn(url, {\n method: 'POST',\n // No body: the item is in the URL. Do NOT declare a JSON content-type\n // for an empty body — Fastify rejects that with a 400 before the handler\n // runs. Only forward caller-provided headers.\n ...(options.headers ? { headers: options.headers } : {}),\n credentials: options.credentials ?? 'include',\n signal: options.signal ?? AbortSignal.timeout(options.timeoutMs ?? 10_000),\n });\n\n if (!res.ok) {\n if (res.status === 403) {\n try {\n const body = (await res.json()) as { error?: string; requiredScope?: string };\n if (body.error === 'ScopeInsufficient') {\n return {\n ok: false,\n error: { type: 'scope_insufficient', requiredScope: body.requiredScope },\n };\n }\n } catch {\n // Fall through to generic error.\n }\n }\n return { ok: false, error: { type: 'error' } };\n }\n\n const data = (await res.json()) as RoadmapVoteResult;\n return { ok: true, data };\n } catch {\n return { ok: false, error: { type: 'error' } };\n }\n}\n\n/** Retract a previously-cast roadmap vote. */\nexport function retractRoadmapVote(\n config: SifaApiConfig,\n key: string,\n options: ApiFetchOptions = {},\n): Promise<WriteResult> {\n return apiWrite(config, `/api/roadmap/votes/${encodeURIComponent(key)}`, 'DELETE', options);\n}\n\n/** Roadmap group of a board item (sifa-api `GET /api/roadmap`). */\nexport type RoadmapBoardStatus = 'done' | 'in-progress' | 'planned' | 'later' | 'under-review';\n\nexport type RoadmapBoardSize = 'small' | 'medium' | 'epic';\n\n/** One item on the roadmap, read from Sifa's userinput.app board. */\nexport interface RoadmapBoardItem {\n /** The `app.userinput.discussion` record URI. */\n uri: string;\n /** Author of the discussion (sifa.id or anyone who posted an idea). */\n did: string;\n rkey: string;\n title: string;\n /** Free text from the record. Render as plain text. */\n body: string | null;\n /** Tags without the size tag. */\n tags: string[];\n size: RoadmapBoardSize | null;\n status: RoadmapBoardStatus;\n votable: boolean;\n votes: { count: number; voters: RoadmapVoter[] };\n createdAt: string;\n /** Whether the signed-in viewer voted. False without a session. */\n viewerVoted: boolean;\n}\n\n/** Identifies a board item for voting. */\nexport interface RoadmapItemRef {\n did: string;\n rkey: string;\n}\n\nconst roadmapBoardItemSchema: z.ZodType<RoadmapBoardItem> = z.object({\n uri: z.string(),\n did: z.string(),\n rkey: z.string(),\n title: z.string(),\n body: z.string().nullable(),\n tags: z.array(z.string()),\n size: z.enum(['small', 'medium', 'epic']).nullable(),\n status: z.enum(['done', 'in-progress', 'planned', 'later', 'under-review']),\n votable: z.boolean(),\n votes: z.object({\n count: z.number(),\n voters: z.array(z.object({ did: z.string(), avatarUrl: z.string().optional() })),\n }),\n createdAt: z.string(),\n viewerVoted: z.boolean(),\n});\n\nexport interface FetchRoadmapOptions extends ApiFetchOptions {\n /**\n * Pass the caller's `Cookie` header on Next.js RSC server-side calls so\n * `viewerVoted` reflects the viewer.\n */\n cookieHeader?: string;\n}\n\n/**\n * The roadmap as built from Sifa's userinput.app board, grouped and ordered\n * by the API. Returns `null` on any error, so callers can tell an outage from\n * an empty roadmap.\n */\nexport async function fetchRoadmap(\n config: SifaApiConfig,\n options: FetchRoadmapOptions = {},\n): Promise<RoadmapBoardItem[] | null> {\n const { cookieHeader, ...rest } = options;\n const headers: Record<string, string> = { ...(rest.headers ?? {}) };\n if (cookieHeader) headers.cookie = cookieHeader;\n\n try {\n const data = await apiFetch<{ items?: unknown }>(config, '/api/roadmap', {\n cache: 'no-store',\n credentials: 'include',\n ...rest,\n headers,\n });\n if (!Array.isArray(data.items)) return null;\n // Drop items with an unexpected shape rather than failing the whole roadmap.\n return data.items.flatMap((raw) => {\n const parsed = roadmapBoardItemSchema.safeParse(raw);\n return parsed.success ? [parsed.data] : [];\n });\n } catch {\n return null;\n }\n}\n\nfunction itemVotePath(item: RoadmapItemRef): string {\n return `/api/roadmap/items/${encodeURIComponent(item.did)}/${encodeURIComponent(item.rkey)}/vote`;\n}\n\n/**\n * Vote on a roadmap board item. Same result shape and scope handling as\n * {@link castRoadmapVote}. Never throws.\n */\nexport function castRoadmapItemVote(\n config: SifaApiConfig,\n item: RoadmapItemRef,\n options: ApiFetchOptions = {},\n): Promise<CastRoadmapVoteResult> {\n return castUpvote(config, itemVotePath(item), options);\n}\n\n/** Retract a vote on a roadmap board item. */\nexport function retractRoadmapItemVote(\n config: SifaApiConfig,\n item: RoadmapItemRef,\n options: ApiFetchOptions = {},\n): Promise<WriteResult> {\n return apiWrite(config, itemVotePath(item), 'DELETE', options);\n}\n"],"mappings":";AAAA,SAAS,SAAS;AAElB;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AAcP,eAAsB,kBACpB,QACA,UAA2B,CAAC,GACG;AAC/B,MAAI;AACF,WAAO,MAAM,SAA+B,QAAQ,sBAAsB;AAAA,MACxE,OAAO;AAAA,MACP,GAAG;AAAA,IACL,CAAC;AAAA,EACH,QAAQ;AACN,WAAO,CAAC;AAAA,EACV;AACF;AAeA,eAAsB,oBACpB,QACA,UAAsC,CAAC,GACpB;AACnB,QAAM,UAAkC,EAAE,GAAI,QAAQ,WAAW,CAAC,EAAG;AACrE,MAAI,QAAQ,aAAc,SAAQ,SAAS,QAAQ;AAEnD,MAAI;AACF,UAAM,OAAO,MAAM,SAA+B,QAAQ,yBAAyB;A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,OAAO,UAAU,CAAC,OAAO,IAAI,IAAI,CAAC;AAAA,IAC3C,CAAC;AAAA,EACH,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,aAAa,MAA8B;AAClD,SAAO,sBAAsB,mBAAmB,KAAK,GAAG,CAAC,IAAI,mBAAmB,KAAK,IAAI,CAAC;AAC5F;AAMO,SAAS,oBACd,QACA,MACA,UAA2B,CAAC,GACI;AAChC,SAAO,WAAW,QAAQ,aAAa,IAAI,GAAG,OAAO;AACvD;AAGO,SAAS,uBACd,QACA,MACA,UAA2B,CAAC,GACN;AACtB,SAAO,SAAS,QAAQ,aAAa,IAAI,GAAG,UAAU,OAAO;AAC/D;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/query/fetchers/roadmap.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport {\n apiFetch,\n apiWrite,\n type ApiFetchOptions,\n type SifaApiConfig,\n type WriteResult,\n} from '../client.js';\n\n/** Voter on a roadmap item. */\nexport interface RoadmapVoter {\n did: string;\n avatarUrl?: string;\n}\n\n/** Result of a successful roadmap vote -- the created upvote record. */\nexport interface RoadmapVoteResult {\n uri: string;\n rkey: string;\n}\n\n/** Structured error returned by {@link castRoadmapItemVote} on failure. */\nexport interface RoadmapVoteError {\n type: 'scope_insufficient' | 'error';\n /**\n * When `type === 'scope_insufficient'`, the lexicon collection the user must\n * re-authorize for (e.g. `app.userinput.upvote`). sifa-web maps this to an\n * OAuth scope-upgrade flow (`/oauth/reauth?scope=repo:<collection>`).\n */\n requiredScope?: string;\n}\n\n/**\n * Discriminated-union result of {@link castRoadmapItemVote}. Exported so the\n * `useCastRoadmapItemVote` hook and SDK consumers can type mutation handlers\n * against a single source of truth.\n */\nexport type CastRoadmapVoteResult =\n { ok: true; data: RoadmapVoteResult } | { ok: false; error: RoadmapVoteError };\n\n/** Roadmap group of a board item (sifa-api `GET /api/roadmap`). */\nexport type RoadmapBoardStatus = 'done' | 'in-progress' | 'planned' | 'later' | 'under-review';\n\nexport type RoadmapBoardSize = 'small' | 'medium' | 'epic';\n\n/** One item on the roadmap, read from Sifa's userinput.app board. */\nexport interface RoadmapBoardItem {\n /** The `app.userinput.discussion` record URI. */\n uri: string;\n /** Author of the discussion (sifa.id or anyone who posted an idea). */\n did: string;\n rkey: string;\n title: string;\n /** Free text from the record. Render as plain text. */\n body: string | null;\n /** Tags without the size tag. */\n tags: string[];\n size: RoadmapBoardSize | null;\n status: RoadmapBoardStatus;\n votable: boolean;\n votes: { count: number; voters: RoadmapVoter[] };\n createdAt: string;\n /** Whether the signed-in viewer voted. False without a session. */\n viewerVoted: boolean;\n}\n\n/** Identifies a board item for voting. */\nexport interface RoadmapItemRef {\n did: string;\n rkey: string;\n}\n\nconst roadmapBoardItemSchema: z.ZodType<RoadmapBoardItem> = z.object({\n uri: z.string(),\n did: z.string(),\n rkey: z.string(),\n title: z.string(),\n body: z.string().nullable(),\n tags: z.array(z.string()),\n size: z.enum(['small', 'medium', 'epic']).nullable(),\n status: z.enum(['done', 'in-progress', 'planned', 'later', 'under-review']),\n votable: z.boolean(),\n votes: z.object({\n count: z.number(),\n voters: z.array(z.object({ did: z.string(), avatarUrl: z.string().optional() })),\n }),\n createdAt: z.string(),\n viewerVoted: z.boolean(),\n});\n\nexport interface FetchRoadmapOptions extends ApiFetchOptions {\n /**\n * Pass the caller's `Cookie` header on Next.js RSC server-side calls so\n * `viewerVoted` reflects the viewer.\n */\n cookieHeader?: string;\n}\n\n/**\n * The roadmap as built from Sifa's userinput.app board, grouped and ordered\n * by the API. Returns `null` on any error, so callers can tell an outage from\n * an empty roadmap.\n */\nexport async function fetchRoadmap(\n config: SifaApiConfig,\n options: FetchRoadmapOptions = {},\n): Promise<RoadmapBoardItem[] | null> {\n const { cookieHeader, ...rest } = options;\n const headers: Record<string, string> = { ...(rest.headers ?? {}) };\n if (cookieHeader) headers.cookie = cookieHeader;\n\n try {\n const data = await apiFetch<{ items?: unknown }>(config, '/api/roadmap', {\n cache: 'no-store',\n credentials: 'include',\n ...rest,\n headers,\n });\n if (!Array.isArray(data.items)) return null;\n // Drop items with an unexpected shape rather than failing the whole roadmap.\n return data.items.flatMap((raw) => {\n const parsed = roadmapBoardItemSchema.safeParse(raw);\n return parsed.success ? [parsed.data] : [];\n });\n } catch {\n return null;\n }\n}\n\nfunction itemVotePath(item: RoadmapItemRef): string {\n return `/api/roadmap/items/${encodeURIComponent(item.did)}/${encodeURIComponent(item.rkey)}/vote`;\n}\n\n/**\n * Vote on a roadmap board item, identified by its `{ did, rkey }`.\n *\n * Writes an `app.userinput.upvote` record into the viewer's PDS (server-side,\n * via their OAuth session). Returns a discriminated-union result rather than\n * the generic {@link WriteResult} because a first-time voter's PDS grant may\n * not yet include the `app.userinput.upvote` collection: the AppView responds\n * 403 `ScopeInsufficient`, which the caller handles by triggering an OAuth\n * scope upgrade rather than showing an error. Mirrors {@link createReaction}.\n *\n * Never throws.\n */\nexport async function castRoadmapItemVote(\n config: SifaApiConfig,\n item: RoadmapItemRef,\n options: ApiFetchOptions = {},\n): Promise<CastRoadmapVoteResult> {\n const fetchFn = config.fetch ?? globalThis.fetch;\n const url = `${config.baseUrl}${itemVotePath(item)}`;\n\n try {\n const res = await fetchFn(url, {\n method: 'POST',\n // No body: the item is in the URL. Do NOT declare a JSON content-type\n // for an empty body — Fastify rejects that with a 400 before the handler\n // runs. Only forward caller-provided headers.\n ...(options.headers ? { headers: options.headers } : {}),\n credentials: options.credentials ?? 'include',\n signal: options.signal ?? AbortSignal.timeout(options.timeoutMs ?? 10_000),\n });\n\n if (!res.ok) {\n if (res.status === 403) {\n try {\n const body = (await res.json()) as { error?: string; requiredScope?: string };\n if (body.error === 'ScopeInsufficient') {\n return {\n ok: false,\n error: { type: 'scope_insufficient', requiredScope: body.requiredScope },\n };\n }\n } catch {\n // Fall through to generic error.\n }\n }\n return { ok: false, error: { type: 'error' } };\n }\n\n const data = (await res.json()) as RoadmapVoteResult;\n return { ok: true, data };\n } catch {\n return { ok: false, error: { type: 'error' } };\n }\n}\n\n/** Retract a vote on a roadmap board item. */\nexport function retractRoadmapItemVote(\n config: SifaApiConfig,\n item: RoadmapItemRef,\n options: ApiFetchOptions = {},\n): Promise<WriteResult> {\n return apiWrite(config, itemVotePath(item), 'DELETE', options);\n}\n"],"mappings":";AAAA,SAAS,SAAS;AAElB;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AAiEP,IAAM,yBAAsD,EAAE,OAAO;AAAA,EACnE,KAAK,EAAE,OAAO;AAAA,EACd,KAAK,EAAE,OAAO;AAAA,EACd,MAAM,EAAE,OAAO;AAAA,EACf,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC;AAAA,EACxB,MAAM,EAAE,KAAK,CAAC,SAAS,UAAU,MAAM,CAAC,EAAE,SAAS;AAAA,EACnD,QAAQ,EAAE,KAAK,CAAC,QAAQ,eAAe,WAAW,SAAS,cAAc,CAAC;AAAA,EAC1E,SAAS,EAAE,QAAQ;AAAA,EACnB,OAAO,EAAE,OAAO;AAAA,IACd,OAAO,EAAE,OAAO;AAAA,IAChB,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC;AAAA,EACjF,CAAC;AAAA,EACD,WAAW,EAAE,OAAO;AAAA,EACpB,aAAa,EAAE,QAAQ;AACzB,CAAC;AAeD,eAAsB,aACpB,QACA,UAA+B,CAAC,GACI;AACpC,QAAM,EAAE,cAAc,GAAG,KAAK,IAAI;AAClC,QAAM,UAAkC,EAAE,GAAI,KAAK,WAAW,CAAC,EAAG;AAClE,MAAI,aAAc,SAAQ,SAAS;AAEnC,MAAI;AACF,UAAM,OAAO,MAAM,SAA8B,QAAQ,gBAAgB;AAAA,MACvE,OAAO;AAAA,MACP,aAAa;AAAA,MACb,GAAG;AAAA,MACH;AAAA,IACF,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AA,EAC1B,QAAQ;AACN,WAAO,EAAE,IAAI,OAAO,OAAO,EAAE,MAAM,QAAQ,EAAE;AAAA,EAC/C;AACF;AAGO,SAAS,uBACd,QACA,MACA,UAA2B,CAAC,GACN;AACtB,SAAO,SAAS,QAAQ,aAAa,IAAI,GAAG,UAAU,OAAO;AAC/D;","names":[]}
|
|
@@ -318,11 +318,6 @@ var sifaQueryKeys = {
|
|
|
318
318
|
status: (uris) => ["sifa", "reactions", "status", uris],
|
|
319
319
|
accountCheck: (appId) => ["sifa", "reactions", "account-check", appId]
|
|
320
320
|
},
|
|
321
|
-
roadmap: {
|
|
322
|
-
all: () => ["sifa", "roadmap"],
|
|
323
|
-
votes: () => ["sifa", "roadmap", "votes"],
|
|
324
|
-
myVotes: () => ["sifa", "roadmap", "my-votes"]
|
|
325
|
-
},
|
|
326
321
|
bskyPreferences: {
|
|
327
322
|
all: () => ["sifa", "bsky-preferences"],
|
|
328
323
|
contentLabels: () => ["sifa", "bsky-preferences", "content-labels"]
|
|
@@ -3504,36 +3499,29 @@ function useDeleteReaction(options) {
|
|
|
3504
3499
|
}
|
|
3505
3500
|
});
|
|
3506
3501
|
}
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
return data.voted ?? [];
|
|
3527
|
-
} catch {
|
|
3528
|
-
return [];
|
|
3529
|
-
}
|
|
3530
|
-
}
|
|
3531
|
-
function castRoadmapVote(config, key, options = {}) {
|
|
3532
|
-
return castUpvote(config, `/api/roadmap/votes/${encodeURIComponent(key)}`, options);
|
|
3502
|
+
zod.z.object({
|
|
3503
|
+
uri: zod.z.string(),
|
|
3504
|
+
did: zod.z.string(),
|
|
3505
|
+
rkey: zod.z.string(),
|
|
3506
|
+
title: zod.z.string(),
|
|
3507
|
+
body: zod.z.string().nullable(),
|
|
3508
|
+
tags: zod.z.array(zod.z.string()),
|
|
3509
|
+
size: zod.z.enum(["small", "medium", "epic"]).nullable(),
|
|
3510
|
+
status: zod.z.enum(["done", "in-progress", "planned", "later", "under-review"]),
|
|
3511
|
+
votable: zod.z.boolean(),
|
|
3512
|
+
votes: zod.z.object({
|
|
3513
|
+
count: zod.z.number(),
|
|
3514
|
+
voters: zod.z.array(zod.z.object({ did: zod.z.string(), avatarUrl: zod.z.string().optional() }))
|
|
3515
|
+
}),
|
|
3516
|
+
createdAt: zod.z.string(),
|
|
3517
|
+
viewerVoted: zod.z.boolean()
|
|
3518
|
+
});
|
|
3519
|
+
function itemVotePath(item) {
|
|
3520
|
+
return `/api/roadmap/items/${encodeURIComponent(item.did)}/${encodeURIComponent(item.rkey)}/vote`;
|
|
3533
3521
|
}
|
|
3534
|
-
async function
|
|
3522
|
+
async function castRoadmapItemVote(config, item, options = {}) {
|
|
3535
3523
|
const fetchFn = config.fetch ?? globalThis.fetch;
|
|
3536
|
-
const url = `${config.baseUrl}${
|
|
3524
|
+
const url = `${config.baseUrl}${itemVotePath(item)}`;
|
|
3537
3525
|
try {
|
|
3538
3526
|
const res = await fetchFn(url, {
|
|
3539
3527
|
method: "POST",
|
|
@@ -3565,118 +3553,23 @@ async function castUpvote(config, path, options) {
|
|
|
3565
3553
|
return { ok: false, error: { type: "error" } };
|
|
3566
3554
|
}
|
|
3567
3555
|
}
|
|
3568
|
-
function retractRoadmapVote(config, key, options = {}) {
|
|
3569
|
-
return apiWrite(config, `/api/roadmap/votes/${encodeURIComponent(key)}`, "DELETE", options);
|
|
3570
|
-
}
|
|
3571
|
-
zod.z.object({
|
|
3572
|
-
uri: zod.z.string(),
|
|
3573
|
-
did: zod.z.string(),
|
|
3574
|
-
rkey: zod.z.string(),
|
|
3575
|
-
title: zod.z.string(),
|
|
3576
|
-
body: zod.z.string().nullable(),
|
|
3577
|
-
tags: zod.z.array(zod.z.string()),
|
|
3578
|
-
size: zod.z.enum(["small", "medium", "epic"]).nullable(),
|
|
3579
|
-
status: zod.z.enum(["done", "in-progress", "planned", "later", "under-review"]),
|
|
3580
|
-
votable: zod.z.boolean(),
|
|
3581
|
-
votes: zod.z.object({
|
|
3582
|
-
count: zod.z.number(),
|
|
3583
|
-
voters: zod.z.array(zod.z.object({ did: zod.z.string(), avatarUrl: zod.z.string().optional() }))
|
|
3584
|
-
}),
|
|
3585
|
-
createdAt: zod.z.string(),
|
|
3586
|
-
viewerVoted: zod.z.boolean()
|
|
3587
|
-
});
|
|
3588
|
-
function itemVotePath(item) {
|
|
3589
|
-
return `/api/roadmap/items/${encodeURIComponent(item.did)}/${encodeURIComponent(item.rkey)}/vote`;
|
|
3590
|
-
}
|
|
3591
|
-
function castRoadmapItemVote(config, item, options = {}) {
|
|
3592
|
-
return castUpvote(config, itemVotePath(item), options);
|
|
3593
|
-
}
|
|
3594
3556
|
function retractRoadmapItemVote(config, item, options = {}) {
|
|
3595
3557
|
return apiWrite(config, itemVotePath(item), "DELETE", options);
|
|
3596
3558
|
}
|
|
3597
3559
|
|
|
3598
|
-
// src/query/hooks/use-roadmap.ts
|
|
3599
|
-
function useRoadmapVotes(options) {
|
|
3600
|
-
const config = useSifaConfig();
|
|
3601
|
-
return reactQuery.useQuery({
|
|
3602
|
-
queryKey: sifaQueryKeys.roadmap.votes(),
|
|
3603
|
-
queryFn: () => fetchRoadmapVotes(config),
|
|
3604
|
-
...options
|
|
3605
|
-
});
|
|
3606
|
-
}
|
|
3607
|
-
function useMyRoadmapVotes(options) {
|
|
3608
|
-
const config = useSifaConfig();
|
|
3609
|
-
return reactQuery.useQuery({
|
|
3610
|
-
queryKey: sifaQueryKeys.roadmap.myVotes(),
|
|
3611
|
-
queryFn: () => fetchMyRoadmapVotes(config),
|
|
3612
|
-
...options
|
|
3613
|
-
});
|
|
3614
|
-
}
|
|
3615
|
-
async function invalidateRoadmap(queryClient) {
|
|
3616
|
-
await queryClient.invalidateQueries({ queryKey: sifaQueryKeys.roadmap.all() });
|
|
3617
|
-
}
|
|
3618
|
-
function useCastRoadmapVote(options) {
|
|
3619
|
-
const config = useSifaConfig();
|
|
3620
|
-
const queryClient = reactQuery.useQueryClient();
|
|
3621
|
-
return reactQuery.useMutation({
|
|
3622
|
-
// Spread first: a consumer-supplied onSuccess would otherwise replace the
|
|
3623
|
-
// handler below and silently drop cache invalidation (#453).
|
|
3624
|
-
...options,
|
|
3625
|
-
mutationFn: (key) => castRoadmapVote(config, key),
|
|
3626
|
-
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
3627
|
-
if (result.ok) {
|
|
3628
|
-
await invalidateRoadmap(queryClient);
|
|
3629
|
-
}
|
|
3630
|
-
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
3631
|
-
}
|
|
3632
|
-
});
|
|
3633
|
-
}
|
|
3634
|
-
function useRetractRoadmapVote(options) {
|
|
3635
|
-
const config = useSifaConfig();
|
|
3636
|
-
const queryClient = reactQuery.useQueryClient();
|
|
3637
|
-
return reactQuery.useMutation({
|
|
3638
|
-
// Spread first: a consumer-supplied onSuccess would otherwise replace the
|
|
3639
|
-
// handler below and silently drop cache invalidation (#453).
|
|
3640
|
-
...options,
|
|
3641
|
-
mutationFn: (key) => retractRoadmapVote(config, key),
|
|
3642
|
-
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
3643
|
-
if (result.success) {
|
|
3644
|
-
await invalidateRoadmap(queryClient);
|
|
3645
|
-
}
|
|
3646
|
-
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
3647
|
-
}
|
|
3648
|
-
});
|
|
3649
|
-
}
|
|
3560
|
+
// src/query/hooks/use-roadmap-mutations.ts
|
|
3650
3561
|
function useCastRoadmapItemVote(options) {
|
|
3651
3562
|
const config = useSifaConfig();
|
|
3652
|
-
const queryClient = reactQuery.useQueryClient();
|
|
3653
3563
|
return reactQuery.useMutation({
|
|
3654
|
-
// Spread first: a consumer-supplied onSuccess would otherwise replace the
|
|
3655
|
-
// handler below and silently drop cache invalidation (#453).
|
|
3656
3564
|
...options,
|
|
3657
|
-
mutationFn: (item) => castRoadmapItemVote(config, item)
|
|
3658
|
-
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
3659
|
-
if (result.ok) {
|
|
3660
|
-
await invalidateRoadmap(queryClient);
|
|
3661
|
-
}
|
|
3662
|
-
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
3663
|
-
}
|
|
3565
|
+
mutationFn: (item) => castRoadmapItemVote(config, item)
|
|
3664
3566
|
});
|
|
3665
3567
|
}
|
|
3666
3568
|
function useRetractRoadmapItemVote(options) {
|
|
3667
3569
|
const config = useSifaConfig();
|
|
3668
|
-
const queryClient = reactQuery.useQueryClient();
|
|
3669
3570
|
return reactQuery.useMutation({
|
|
3670
|
-
// Spread first: a consumer-supplied onSuccess would otherwise replace the
|
|
3671
|
-
// handler below and silently drop cache invalidation (#453).
|
|
3672
3571
|
...options,
|
|
3673
|
-
mutationFn: (item) => retractRoadmapItemVote(config, item)
|
|
3674
|
-
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
3675
|
-
if (result.success) {
|
|
3676
|
-
await invalidateRoadmap(queryClient);
|
|
3677
|
-
}
|
|
3678
|
-
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
3679
|
-
}
|
|
3572
|
+
mutationFn: (item) => retractRoadmapItemVote(config, item)
|
|
3680
3573
|
});
|
|
3681
3574
|
}
|
|
3682
3575
|
|
|
@@ -4307,7 +4200,6 @@ exports.useBulkUnhideProfileItems = useBulkUnhideProfileItems;
|
|
|
4307
4200
|
exports.useBulkUnhideStandardPublications = useBulkUnhideStandardPublications;
|
|
4308
4201
|
exports.useCanonicalSkillSearch = useCanonicalSkillSearch;
|
|
4309
4202
|
exports.useCastRoadmapItemVote = useCastRoadmapItemVote;
|
|
4310
|
-
exports.useCastRoadmapVote = useCastRoadmapVote;
|
|
4311
4203
|
exports.useClearCompletenessDismissals = useClearCompletenessDismissals;
|
|
4312
4204
|
exports.useCreateConfirmation = useCreateConfirmation;
|
|
4313
4205
|
exports.useCreateEducation = useCreateEducation;
|
|
@@ -4363,7 +4255,6 @@ exports.useInboxCounts = useInboxCounts;
|
|
|
4363
4255
|
exports.useLinkSkillToPosition = useLinkSkillToPosition;
|
|
4364
4256
|
exports.useMutuals = useMutuals;
|
|
4365
4257
|
exports.useMyGithubPullRequests = useMyGithubPullRequests;
|
|
4366
|
-
exports.useMyRoadmapVotes = useMyRoadmapVotes;
|
|
4367
4258
|
exports.useNetworkStreamCount = useNetworkStreamCount;
|
|
4368
4259
|
exports.useOffboardOrgAttestation = useOffboardOrgAttestation;
|
|
4369
4260
|
exports.useOrgAttestations = useOrgAttestations;
|
|
@@ -4387,11 +4278,9 @@ exports.useRequestEmploymentConfirmation = useRequestEmploymentConfirmation;
|
|
|
4387
4278
|
exports.useResendProfileEmailVerification = useResendProfileEmailVerification;
|
|
4388
4279
|
exports.useResetProfile = useResetProfile;
|
|
4389
4280
|
exports.useRetractRoadmapItemVote = useRetractRoadmapItemVote;
|
|
4390
|
-
exports.useRetractRoadmapVote = useRetractRoadmapVote;
|
|
4391
4281
|
exports.useRevealMarqueDomain = useRevealMarqueDomain;
|
|
4392
4282
|
exports.useRevokeConfirmation = useRevokeConfirmation;
|
|
4393
4283
|
exports.useRevokeOrgAttestation = useRevokeOrgAttestation;
|
|
4394
|
-
exports.useRoadmapVotes = useRoadmapVotes;
|
|
4395
4284
|
exports.useRpgClaimable = useRpgClaimable;
|
|
4396
4285
|
exports.useRpgStatus = useRpgStatus;
|
|
4397
4286
|
exports.useSearchCompanies = useSearchCompanies;
|