@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
|
@@ -1518,34 +1518,12 @@ interface RoadmapVoter {
|
|
|
1518
1518
|
did: string;
|
|
1519
1519
|
avatarUrl?: string;
|
|
1520
1520
|
}
|
|
1521
|
-
/**
|
|
1522
|
-
type RoadmapVotesResponse = Record<string, {
|
|
1523
|
-
count: number;
|
|
1524
|
-
voters: RoadmapVoter[];
|
|
1525
|
-
}>;
|
|
1526
|
-
/**
|
|
1527
|
-
* Public roadmap vote tallies, keyed by item. Returns `{}` on any error.
|
|
1528
|
-
*/
|
|
1529
|
-
declare function fetchRoadmapVotes(config: SifaApiConfig, options?: ApiFetchOptions): Promise<RoadmapVotesResponse>;
|
|
1530
|
-
interface FetchMyRoadmapVotesOptions extends ApiFetchOptions {
|
|
1531
|
-
/**
|
|
1532
|
-
* Pass the caller's `Cookie` header on Next.js RSC server-side calls.
|
|
1533
|
-
* Required for authenticated server fetches because `credentials: 'include'`
|
|
1534
|
-
* does not propagate browser cookies in RSC.
|
|
1535
|
-
*/
|
|
1536
|
-
cookieHeader?: string;
|
|
1537
|
-
}
|
|
1538
|
-
/**
|
|
1539
|
-
* Roadmap items the authenticated user has voted on. Returns `[]` on any
|
|
1540
|
-
* error or when the response payload is shaped unexpectedly.
|
|
1541
|
-
*/
|
|
1542
|
-
declare function fetchMyRoadmapVotes(config: SifaApiConfig, options?: FetchMyRoadmapVotesOptions): Promise<string[]>;
|
|
1543
|
-
/** Result of a successful {@link castRoadmapVote} -- the created upvote record. */
|
|
1521
|
+
/** Result of a successful roadmap vote -- the created upvote record. */
|
|
1544
1522
|
interface RoadmapVoteResult {
|
|
1545
1523
|
uri: string;
|
|
1546
1524
|
rkey: string;
|
|
1547
1525
|
}
|
|
1548
|
-
/** Structured error returned by {@link
|
|
1526
|
+
/** Structured error returned by {@link castRoadmapItemVote} on failure. */
|
|
1549
1527
|
interface RoadmapVoteError {
|
|
1550
1528
|
type: 'scope_insufficient' | 'error';
|
|
1551
1529
|
/**
|
|
@@ -1556,8 +1534,8 @@ interface RoadmapVoteError {
|
|
|
1556
1534
|
requiredScope?: string;
|
|
1557
1535
|
}
|
|
1558
1536
|
/**
|
|
1559
|
-
* Discriminated-union result of {@link
|
|
1560
|
-
* `
|
|
1537
|
+
* Discriminated-union result of {@link castRoadmapItemVote}. Exported so the
|
|
1538
|
+
* `useCastRoadmapItemVote` hook and SDK consumers can type mutation handlers
|
|
1561
1539
|
* against a single source of truth.
|
|
1562
1540
|
*/
|
|
1563
1541
|
type CastRoadmapVoteResult = {
|
|
@@ -1567,21 +1545,6 @@ type CastRoadmapVoteResult = {
|
|
|
1567
1545
|
ok: false;
|
|
1568
1546
|
error: RoadmapVoteError;
|
|
1569
1547
|
};
|
|
1570
|
-
/**
|
|
1571
|
-
* Cast a vote on a roadmap item by its key.
|
|
1572
|
-
*
|
|
1573
|
-
* Writes an `app.userinput.upvote` record into the viewer's PDS (server-side,
|
|
1574
|
-
* via their OAuth session). Returns a discriminated-union result rather than
|
|
1575
|
-
* the generic {@link WriteResult} because a first-time voter's PDS grant may
|
|
1576
|
-
* not yet include the `app.userinput.upvote` collection: the AppView responds
|
|
1577
|
-
* 403 `ScopeInsufficient`, which the caller handles by triggering an OAuth
|
|
1578
|
-
* scope upgrade rather than showing an error. Mirrors {@link createReaction}.
|
|
1579
|
-
*
|
|
1580
|
-
* Never throws.
|
|
1581
|
-
*/
|
|
1582
|
-
declare function castRoadmapVote(config: SifaApiConfig, key: string, options?: ApiFetchOptions): Promise<CastRoadmapVoteResult>;
|
|
1583
|
-
/** Retract a previously-cast roadmap vote. */
|
|
1584
|
-
declare function retractRoadmapVote(config: SifaApiConfig, key: string, options?: ApiFetchOptions): Promise<WriteResult>;
|
|
1585
1548
|
/** Roadmap group of a board item (sifa-api `GET /api/roadmap`). */
|
|
1586
1549
|
type RoadmapBoardStatus = 'done' | 'in-progress' | 'planned' | 'later' | 'under-review';
|
|
1587
1550
|
type RoadmapBoardSize = 'small' | 'medium' | 'epic';
|
|
@@ -1627,8 +1590,16 @@ interface FetchRoadmapOptions extends ApiFetchOptions {
|
|
|
1627
1590
|
*/
|
|
1628
1591
|
declare function fetchRoadmap(config: SifaApiConfig, options?: FetchRoadmapOptions): Promise<RoadmapBoardItem[] | null>;
|
|
1629
1592
|
/**
|
|
1630
|
-
* Vote on a roadmap board item
|
|
1631
|
-
*
|
|
1593
|
+
* Vote on a roadmap board item, identified by its `{ did, rkey }`.
|
|
1594
|
+
*
|
|
1595
|
+
* Writes an `app.userinput.upvote` record into the viewer's PDS (server-side,
|
|
1596
|
+
* via their OAuth session). Returns a discriminated-union result rather than
|
|
1597
|
+
* the generic {@link WriteResult} because a first-time voter's PDS grant may
|
|
1598
|
+
* not yet include the `app.userinput.upvote` collection: the AppView responds
|
|
1599
|
+
* 403 `ScopeInsufficient`, which the caller handles by triggering an OAuth
|
|
1600
|
+
* scope upgrade rather than showing an error. Mirrors {@link createReaction}.
|
|
1601
|
+
*
|
|
1602
|
+
* Never throws.
|
|
1632
1603
|
*/
|
|
1633
1604
|
declare function castRoadmapItemVote(config: SifaApiConfig, item: RoadmapItemRef, options?: ApiFetchOptions): Promise<CastRoadmapVoteResult>;
|
|
1634
1605
|
/** Retract a vote on a roadmap board item. */
|
|
@@ -1901,11 +1872,6 @@ declare const sifaQueryKeys: {
|
|
|
1901
1872
|
readonly status: (uris: string[]) => readonly ["sifa", "reactions", "status", string[]];
|
|
1902
1873
|
readonly accountCheck: (appId: string) => readonly ["sifa", "reactions", "account-check", string];
|
|
1903
1874
|
};
|
|
1904
|
-
readonly roadmap: {
|
|
1905
|
-
readonly all: () => readonly ["sifa", "roadmap"];
|
|
1906
|
-
readonly votes: () => readonly ["sifa", "roadmap", "votes"];
|
|
1907
|
-
readonly myVotes: () => readonly ["sifa", "roadmap", "my-votes"];
|
|
1908
|
-
};
|
|
1909
1875
|
readonly bskyPreferences: {
|
|
1910
1876
|
readonly all: () => readonly ["sifa", "bsky-preferences"];
|
|
1911
1877
|
readonly contentLabels: () => readonly ["sifa", "bsky-preferences", "content-labels"];
|
|
@@ -1922,7 +1888,7 @@ declare const sifaQueryKeys: {
|
|
|
1922
1888
|
readonly wipePreview: () => readonly ["sifa", "destructive", "wipe-preview"];
|
|
1923
1889
|
};
|
|
1924
1890
|
};
|
|
1925
|
-
type SifaQueryKey = ReturnType<typeof sifaQueryKeys.all> | ReturnType<typeof sifaQueryKeys.profile.all> | ReturnType<typeof sifaQueryKeys.profile.byHandle> | ReturnType<typeof sifaQueryKeys.profile.atFundLink> | ReturnType<typeof sifaQueryKeys.profile.externalAccounts> | ReturnType<typeof sifaQueryKeys.profile.completeness> | ReturnType<typeof sifaQueryKeys.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | ReturnType<typeof sifaQueryKeys.position.unlinked> | ReturnType<typeof sifaQueryKeys.inbox.all> | ReturnType<typeof sifaQueryKeys.inbox.counts> | ReturnType<typeof sifaQueryKeys.rpg.all> | ReturnType<typeof sifaQueryKeys.rpg.claimable> | ReturnType<typeof sifaQueryKeys.rpg.status> | ReturnType<typeof sifaQueryKeys.search.all> | ReturnType<typeof sifaQueryKeys.search.profiles> | ReturnType<typeof sifaQueryKeys.search.canonicalSkills> | ReturnType<typeof sifaQueryKeys.search.skills> | ReturnType<typeof sifaQueryKeys.search.filters> | ReturnType<typeof sifaQueryKeys.entity.all> | ReturnType<typeof sifaQueryKeys.entity.search> | ReturnType<typeof sifaQueryKeys.discovery.all> | ReturnType<typeof sifaQueryKeys.discovery.similar> | ReturnType<typeof sifaQueryKeys.discovery.suggestions> | ReturnType<typeof sifaQueryKeys.discovery.suggestionCount> | ReturnType<typeof sifaQueryKeys.discovery.featured> | ReturnType<typeof sifaQueryKeys.follow.all> | ReturnType<typeof sifaQueryKeys.follow.following> | ReturnType<typeof sifaQueryKeys.follow.followers> | ReturnType<typeof sifaQueryKeys.follow.followingOf> | ReturnType<typeof sifaQueryKeys.follow.feed> | ReturnType<typeof sifaQueryKeys.follow.mutuals> | ReturnType<typeof sifaQueryKeys.follow.blueskySuggestions> | ReturnType<typeof sifaQueryKeys.admin.all> | ReturnType<typeof sifaQueryKeys.admin.featureAllowlist> | ReturnType<typeof sifaQueryKeys.admin.reviewQueues> | ReturnType<typeof sifaQueryKeys.stats.all> | ReturnType<typeof sifaQueryKeys.stats.homepage> | ReturnType<typeof sifaQueryKeys.apps.all> | ReturnType<typeof sifaQueryKeys.apps.registry> | ReturnType<typeof sifaQueryKeys.apps.hidden> | ReturnType<typeof sifaQueryKeys.activity.all> | ReturnType<typeof sifaQueryKeys.activity.heatmap> | ReturnType<typeof sifaQueryKeys.activity.teaser> | ReturnType<typeof sifaQueryKeys.activity.feed> | ReturnType<typeof sifaQueryKeys.activity.hiddenItems> | ReturnType<typeof sifaQueryKeys.activity.preferences> | ReturnType<typeof sifaQueryKeys.activity.sitePreset> | ReturnType<typeof sifaQueryKeys.endorsement.all> | ReturnType<typeof sifaQueryKeys.endorsement.count> | ReturnType<typeof sifaQueryKeys.endorsement.pending> | ReturnType<typeof sifaQueryKeys.endorsement.reciprocity> | ReturnType<typeof sifaQueryKeys.endorsement.received> | ReturnType<typeof sifaQueryKeys.confirmation.all> | ReturnType<typeof sifaQueryKeys.confirmation.pending> | ReturnType<typeof sifaQueryKeys.confirmation.given> | ReturnType<typeof sifaQueryKeys.stream.all> | ReturnType<typeof sifaQueryKeys.stream.networkCount> | ReturnType<typeof sifaQueryKeys.reactions.all> | ReturnType<typeof sifaQueryKeys.reactions.status> | ReturnType<typeof sifaQueryKeys.reactions.accountCheck> | ReturnType<typeof sifaQueryKeys.
|
|
1891
|
+
type SifaQueryKey = ReturnType<typeof sifaQueryKeys.all> | ReturnType<typeof sifaQueryKeys.profile.all> | ReturnType<typeof sifaQueryKeys.profile.byHandle> | ReturnType<typeof sifaQueryKeys.profile.atFundLink> | ReturnType<typeof sifaQueryKeys.profile.externalAccounts> | ReturnType<typeof sifaQueryKeys.profile.completeness> | ReturnType<typeof sifaQueryKeys.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | ReturnType<typeof sifaQueryKeys.position.unlinked> | ReturnType<typeof sifaQueryKeys.inbox.all> | ReturnType<typeof sifaQueryKeys.inbox.counts> | ReturnType<typeof sifaQueryKeys.rpg.all> | ReturnType<typeof sifaQueryKeys.rpg.claimable> | ReturnType<typeof sifaQueryKeys.rpg.status> | ReturnType<typeof sifaQueryKeys.search.all> | ReturnType<typeof sifaQueryKeys.search.profiles> | ReturnType<typeof sifaQueryKeys.search.canonicalSkills> | ReturnType<typeof sifaQueryKeys.search.skills> | ReturnType<typeof sifaQueryKeys.search.filters> | ReturnType<typeof sifaQueryKeys.entity.all> | ReturnType<typeof sifaQueryKeys.entity.search> | ReturnType<typeof sifaQueryKeys.discovery.all> | ReturnType<typeof sifaQueryKeys.discovery.similar> | ReturnType<typeof sifaQueryKeys.discovery.suggestions> | ReturnType<typeof sifaQueryKeys.discovery.suggestionCount> | ReturnType<typeof sifaQueryKeys.discovery.featured> | ReturnType<typeof sifaQueryKeys.follow.all> | ReturnType<typeof sifaQueryKeys.follow.following> | ReturnType<typeof sifaQueryKeys.follow.followers> | ReturnType<typeof sifaQueryKeys.follow.followingOf> | ReturnType<typeof sifaQueryKeys.follow.feed> | ReturnType<typeof sifaQueryKeys.follow.mutuals> | ReturnType<typeof sifaQueryKeys.follow.blueskySuggestions> | ReturnType<typeof sifaQueryKeys.admin.all> | ReturnType<typeof sifaQueryKeys.admin.featureAllowlist> | ReturnType<typeof sifaQueryKeys.admin.reviewQueues> | ReturnType<typeof sifaQueryKeys.stats.all> | ReturnType<typeof sifaQueryKeys.stats.homepage> | ReturnType<typeof sifaQueryKeys.apps.all> | ReturnType<typeof sifaQueryKeys.apps.registry> | ReturnType<typeof sifaQueryKeys.apps.hidden> | ReturnType<typeof sifaQueryKeys.activity.all> | ReturnType<typeof sifaQueryKeys.activity.heatmap> | ReturnType<typeof sifaQueryKeys.activity.teaser> | ReturnType<typeof sifaQueryKeys.activity.feed> | ReturnType<typeof sifaQueryKeys.activity.hiddenItems> | ReturnType<typeof sifaQueryKeys.activity.preferences> | ReturnType<typeof sifaQueryKeys.activity.sitePreset> | ReturnType<typeof sifaQueryKeys.endorsement.all> | ReturnType<typeof sifaQueryKeys.endorsement.count> | ReturnType<typeof sifaQueryKeys.endorsement.pending> | ReturnType<typeof sifaQueryKeys.endorsement.reciprocity> | ReturnType<typeof sifaQueryKeys.endorsement.received> | ReturnType<typeof sifaQueryKeys.confirmation.all> | ReturnType<typeof sifaQueryKeys.confirmation.pending> | ReturnType<typeof sifaQueryKeys.confirmation.given> | ReturnType<typeof sifaQueryKeys.stream.all> | ReturnType<typeof sifaQueryKeys.stream.networkCount> | ReturnType<typeof sifaQueryKeys.reactions.all> | ReturnType<typeof sifaQueryKeys.reactions.status> | ReturnType<typeof sifaQueryKeys.reactions.accountCheck> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels> | ReturnType<typeof sifaQueryKeys.userSettings.all> | ReturnType<typeof sifaQueryKeys.destructive.all> | ReturnType<typeof sifaQueryKeys.destructive.wipePreview> | ReturnType<typeof sifaQueryKeys.repoInventory.all> | ReturnType<typeof sifaQueryKeys.repoInventory.list>;
|
|
1926
1892
|
|
|
1927
1893
|
/** How a single entity binding was resolved during a claim. */
|
|
1928
1894
|
interface OrgClaimBinding {
|
|
@@ -2037,4 +2003,4 @@ declare function fetchUserSettings(config: SifaApiConfig, options?: FetchUserSet
|
|
|
2037
2003
|
/** Save the given preferences. Returns the stored settings, or `null` on failure. */
|
|
2038
2004
|
declare function updateUserSettings(config: SifaApiConfig, patch: UserSettingsPatch): Promise<UserSettings | null>;
|
|
2039
2005
|
|
|
2040
|
-
export { type
|
|
2006
|
+
export { type FollowingFeedVersion as $, type AccountCheckResult as A, type BulkHideProfileItemInput as B, type ConfirmEndorsementInput as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FetchFollowingFeedOptions as G, type FetchHiddenActivityItemsOptions as H, type FetchHiddenAppsOptions as I, type FetchInboxCountsOptions as J, type FetchMyGithubPullRequestsOptions as K, type FetchProfileCompletenessOptions as L, type FetchReactionStatusOptions as M, type FetchRoadmapOptions as N, type FetchRpgClaimableOptions as O, type FetchRpgStatusOptions as P, type FetchSuggestionsOptions as Q, type FetchUnlinkedPositionsOptions as R, type FetchUserSettingsOptions as S, type FollowListPage as T, type FollowProfile as U, type FollowProfilePageResponse as V, type FollowUserResult as W, type FollowingFeedApp as X, type FollowingFeedBuild as Y, type FollowingFeedEmptyReason as Z, type FollowingFeedResponse as _, type ConfirmEndorsementResult as a, type SimilarProfile as a$, type FollowingResponse as a0, type GetAdminReviewQueuesOptions as a1, type GithubPullRequest as a2, type GivenConfirmation as a3, HIDDEN_ITEM_SOURCES as a4, HIDDEN_ITEM_TYPES as a5, type HeatmapDay as a6, type HeatmapResponse as a7, type HiddenActivityItem as a8, type HiddenApp as a9, QUOTED_POSTS_BATCH_MAX as aA, type QuotedPostAuthor as aB, type QuotedPostImage as aC, type QuotedPostResult as aD, type QuotedPostView as aE, type ReactionError as aF, type ReactionResult as aG, type ReactionStatus as aH, type RefreshOrcidPublicationsResult as aI, type RefreshPdsResult as aJ, type RepoDeleteInput as aK, type ResetProfileResult as aL, type ResolveQuotedPostsOptions as aM, type RoadmapBoardItem as aN, type RoadmapBoardSize as aO, type RoadmapBoardStatus as aP, type RoadmapItemRef as aQ, type RoadmapVoteError as aR, type RoadmapVoteResult as aS, type RoadmapVoter as aT, type RpgClaimableResponse as aU, RpgClaimableResponseSchema as aV, type RpgItemStatus as aW, RpgItemStatusSchema as aX, type RpgStatusResponse as aY, RpgStatusResponseSchema as aZ, type SifaQueryKey as a_, type HiddenItemSource as aa, type HiddenItemType as ab, type HideActivityItemInput as ac, type HideProfileItemInput as ad, type InboxCounts as ae, type ListFeatureAllowlistOptions as af, type MyGithubPullRequestsResponse as ag, type OrgClaimBinding as ah, type OrgClaimResult as ai, type OrgDomainChallengeResult as aj, type OrgDomainVerifyResult as ak, type OrgNotificationEmailAddResult as al, type OrgNotificationEmailRemoveResult as am, type OrgProfileEcho as an, type OrgProfileUpdateResult as ao, PROFILE_COMPLETENESS_SIGNALS as ap, type PdsWipeOutcome as aq, type PendingConfirmation as ar, type PendingConfirmationsPage as as, type PrimarySection as at, type ProfileCompleteness as au, type ProfileCompletenessSignal as av, type ProfileIndustryInput as aw, type ProfileLocationAddress as ax, type ProfileLocationInput as ay, type ProfileSelfLocation as az, type AccountSummary as b, fetchReactionStatus as b$, type SiteActivityPresetResponse as b0, type StatsResponse as b1, type SubCategoryBulkResult as b2, type SuggestionProfile as b3, type SuggestionsResponse as b4, type UnhideActivityItemInput as b5, type UnlinkedPosition as b6, type UnlinkedPositionsResult as b7, type UpdateActivityPreferencesInput as b8, type UpdateProfileOverrideInput as b9, deleteExternalAccount as bA, deleteNamePronunciationAudio as bB, deleteProfileLocation as bC, deleteReaction as bD, deleteRepoRecords as bE, deleteSkill as bF, dismissCompletenessSignal as bG, dismissConfirmation as bH, dismissUnlinkedPosition as bI, fetchAccounts as bJ, fetchActivityFeed as bK, fetchActivityPreferences as bL, fetchActivityTeaser as bM, fetchAppsRegistry as bN, fetchExternalAccounts as bO, fetchFeaturedProfile as bP, fetchFollowing as bQ, fetchFollowingFeed as bR, fetchFollowingFeedVersion as bS, fetchGivenConfirmations as bT, fetchHeatmapData as bU, fetchHiddenActivityItems as bV, fetchHiddenApps as bW, fetchInboxCounts as bX, fetchMyGithubPullRequests as bY, fetchPendingConfirmations as bZ, fetchProfileCompleteness as b_, type UpdateProfileSelfInput as ba, type UploadAvatarResult as bb, type UploadPronunciationAudioResult as bc, type UserSettings as bd, type UserSettingsPatch as be, UserSettingsSchema as bf, type VerifyExternalAccountResult as bg, type WipePreview as bh, addFeatureAllowlist as bi, addOrgNotificationEmail as bj, bulkHideProfileItems as bk, bulkHideStandardPublications as bl, bulkUnhideProfileItems as bm, bulkUnhideStandardPublications as bn, castRoadmapItemVote as bo, checkAppAccount as bp, clearCompletenessDismissals as bq, confirmEndorsement as br, createConfirmation as bs, createEndorsement as bt, createExternalAccount as bu, createProfileLocation as bv, createReaction as bw, createSkill as bx, deleteAccount as by, deleteAvatarOverride as bz, type ActivityFeedResponse as c, fetchRepoInventory as c0, fetchRoadmap as c1, fetchRpgClaimable as c2, fetchRpgStatus as c3, fetchSimilarProfiles as c4, fetchSiteActivityPreset as c5, fetchStats as c6, fetchSuggestionCount as c7, fetchSuggestions as c8, fetchUnlinkedPositions as c9, setExternalAccountPrimary as cA, setSectionPrimary as cB, submitOrgClaim as cC, switchAccount as cD, unfollowUser as cE, unhideActivityItem as cF, unhideOrcidPublication as cG, unhideProfileItem as cH, unhideSifaPublication as cI, unhideStandardPublication as cJ, unsetExternalAccountPrimary as cK, unsetSectionPrimary as cL, updateActivityPreferences as cM, updateExternalAccount as cN, updateOrgProfile as cO, updateProfileLocation as cP, updateProfileOverride as cQ, updateProfileSelf as cR, updateSkill as cS, updateSkillSubCategories as cT, updateUserSettings as cU, uploadAvatar as cV, uploadNamePronunciationAudio as cW, verifyExternalAccount as cX, verifyOrgDomain as cY, fetchUserSettings as ca, fetchViewerPositionConfirmations as cb, fetchWipePreview as cc, followUser as cd, getAdminReviewQueues as ce, getBlueskySuggestions as cf, getFollowers as cg, getFollowing as ch, getMutuals as ci, hideActivityItem as cj, hideOrcidPublication as ck, hideProfileItem as cl, hideSifaPublication as cm, hideStandardPublication as cn, isNewerFollowingFeed as co, listFeatureAllowlist as cp, refreshOrcidPublications as cq, refreshPds as cr, removeFeatureAllowlist as cs, removeOrgNotificationEmail as ct, repoExportUrl as cu, requestOrgDomainChallenge as cv, resetProfile as cw, resolveQuotedPosts as cx, retractRoadmapItemVote as cy, revokeConfirmation as cz, type ActivityItem as d, type ActivityItemLinkHealth as e, type ActivityPreferences as f, type ActivityTeaserResponse as g, type AdminReviewQueues as h, type AppRegistryEntry as i, type CastRoadmapVoteResult as j, type CheckAppAccountOptions as k, type ConfirmationInput as l, type ConfirmationSubjectInput as m, type CreateExternalAccountResult as n, type DismissCompletenessSignalInput as o, type DismissUnlinkedPositionInput as p, type ExternalAccountInput as q, type FeaturedProfile as r, sifaQueryKeys as s, type FetchAccountsOptions as t, type FetchActivityFeedOptions as u, type FetchActivityPreferencesOptions as v, type FetchActivityTeaserOptions as w, type FetchConfirmationsOptions as x, type FetchFollowListOptions as y, type FetchFollowProfilePageOptions as z };
|
|
@@ -1518,34 +1518,12 @@ interface RoadmapVoter {
|
|
|
1518
1518
|
did: string;
|
|
1519
1519
|
avatarUrl?: string;
|
|
1520
1520
|
}
|
|
1521
|
-
/**
|
|
1522
|
-
type RoadmapVotesResponse = Record<string, {
|
|
1523
|
-
count: number;
|
|
1524
|
-
voters: RoadmapVoter[];
|
|
1525
|
-
}>;
|
|
1526
|
-
/**
|
|
1527
|
-
* Public roadmap vote tallies, keyed by item. Returns `{}` on any error.
|
|
1528
|
-
*/
|
|
1529
|
-
declare function fetchRoadmapVotes(config: SifaApiConfig, options?: ApiFetchOptions): Promise<RoadmapVotesResponse>;
|
|
1530
|
-
interface FetchMyRoadmapVotesOptions extends ApiFetchOptions {
|
|
1531
|
-
/**
|
|
1532
|
-
* Pass the caller's `Cookie` header on Next.js RSC server-side calls.
|
|
1533
|
-
* Required for authenticated server fetches because `credentials: 'include'`
|
|
1534
|
-
* does not propagate browser cookies in RSC.
|
|
1535
|
-
*/
|
|
1536
|
-
cookieHeader?: string;
|
|
1537
|
-
}
|
|
1538
|
-
/**
|
|
1539
|
-
* Roadmap items the authenticated user has voted on. Returns `[]` on any
|
|
1540
|
-
* error or when the response payload is shaped unexpectedly.
|
|
1541
|
-
*/
|
|
1542
|
-
declare function fetchMyRoadmapVotes(config: SifaApiConfig, options?: FetchMyRoadmapVotesOptions): Promise<string[]>;
|
|
1543
|
-
/** Result of a successful {@link castRoadmapVote} -- the created upvote record. */
|
|
1521
|
+
/** Result of a successful roadmap vote -- the created upvote record. */
|
|
1544
1522
|
interface RoadmapVoteResult {
|
|
1545
1523
|
uri: string;
|
|
1546
1524
|
rkey: string;
|
|
1547
1525
|
}
|
|
1548
|
-
/** Structured error returned by {@link
|
|
1526
|
+
/** Structured error returned by {@link castRoadmapItemVote} on failure. */
|
|
1549
1527
|
interface RoadmapVoteError {
|
|
1550
1528
|
type: 'scope_insufficient' | 'error';
|
|
1551
1529
|
/**
|
|
@@ -1556,8 +1534,8 @@ interface RoadmapVoteError {
|
|
|
1556
1534
|
requiredScope?: string;
|
|
1557
1535
|
}
|
|
1558
1536
|
/**
|
|
1559
|
-
* Discriminated-union result of {@link
|
|
1560
|
-
* `
|
|
1537
|
+
* Discriminated-union result of {@link castRoadmapItemVote}. Exported so the
|
|
1538
|
+
* `useCastRoadmapItemVote` hook and SDK consumers can type mutation handlers
|
|
1561
1539
|
* against a single source of truth.
|
|
1562
1540
|
*/
|
|
1563
1541
|
type CastRoadmapVoteResult = {
|
|
@@ -1567,21 +1545,6 @@ type CastRoadmapVoteResult = {
|
|
|
1567
1545
|
ok: false;
|
|
1568
1546
|
error: RoadmapVoteError;
|
|
1569
1547
|
};
|
|
1570
|
-
/**
|
|
1571
|
-
* Cast a vote on a roadmap item by its key.
|
|
1572
|
-
*
|
|
1573
|
-
* Writes an `app.userinput.upvote` record into the viewer's PDS (server-side,
|
|
1574
|
-
* via their OAuth session). Returns a discriminated-union result rather than
|
|
1575
|
-
* the generic {@link WriteResult} because a first-time voter's PDS grant may
|
|
1576
|
-
* not yet include the `app.userinput.upvote` collection: the AppView responds
|
|
1577
|
-
* 403 `ScopeInsufficient`, which the caller handles by triggering an OAuth
|
|
1578
|
-
* scope upgrade rather than showing an error. Mirrors {@link createReaction}.
|
|
1579
|
-
*
|
|
1580
|
-
* Never throws.
|
|
1581
|
-
*/
|
|
1582
|
-
declare function castRoadmapVote(config: SifaApiConfig, key: string, options?: ApiFetchOptions): Promise<CastRoadmapVoteResult>;
|
|
1583
|
-
/** Retract a previously-cast roadmap vote. */
|
|
1584
|
-
declare function retractRoadmapVote(config: SifaApiConfig, key: string, options?: ApiFetchOptions): Promise<WriteResult>;
|
|
1585
1548
|
/** Roadmap group of a board item (sifa-api `GET /api/roadmap`). */
|
|
1586
1549
|
type RoadmapBoardStatus = 'done' | 'in-progress' | 'planned' | 'later' | 'under-review';
|
|
1587
1550
|
type RoadmapBoardSize = 'small' | 'medium' | 'epic';
|
|
@@ -1627,8 +1590,16 @@ interface FetchRoadmapOptions extends ApiFetchOptions {
|
|
|
1627
1590
|
*/
|
|
1628
1591
|
declare function fetchRoadmap(config: SifaApiConfig, options?: FetchRoadmapOptions): Promise<RoadmapBoardItem[] | null>;
|
|
1629
1592
|
/**
|
|
1630
|
-
* Vote on a roadmap board item
|
|
1631
|
-
*
|
|
1593
|
+
* Vote on a roadmap board item, identified by its `{ did, rkey }`.
|
|
1594
|
+
*
|
|
1595
|
+
* Writes an `app.userinput.upvote` record into the viewer's PDS (server-side,
|
|
1596
|
+
* via their OAuth session). Returns a discriminated-union result rather than
|
|
1597
|
+
* the generic {@link WriteResult} because a first-time voter's PDS grant may
|
|
1598
|
+
* not yet include the `app.userinput.upvote` collection: the AppView responds
|
|
1599
|
+
* 403 `ScopeInsufficient`, which the caller handles by triggering an OAuth
|
|
1600
|
+
* scope upgrade rather than showing an error. Mirrors {@link createReaction}.
|
|
1601
|
+
*
|
|
1602
|
+
* Never throws.
|
|
1632
1603
|
*/
|
|
1633
1604
|
declare function castRoadmapItemVote(config: SifaApiConfig, item: RoadmapItemRef, options?: ApiFetchOptions): Promise<CastRoadmapVoteResult>;
|
|
1634
1605
|
/** Retract a vote on a roadmap board item. */
|
|
@@ -1901,11 +1872,6 @@ declare const sifaQueryKeys: {
|
|
|
1901
1872
|
readonly status: (uris: string[]) => readonly ["sifa", "reactions", "status", string[]];
|
|
1902
1873
|
readonly accountCheck: (appId: string) => readonly ["sifa", "reactions", "account-check", string];
|
|
1903
1874
|
};
|
|
1904
|
-
readonly roadmap: {
|
|
1905
|
-
readonly all: () => readonly ["sifa", "roadmap"];
|
|
1906
|
-
readonly votes: () => readonly ["sifa", "roadmap", "votes"];
|
|
1907
|
-
readonly myVotes: () => readonly ["sifa", "roadmap", "my-votes"];
|
|
1908
|
-
};
|
|
1909
1875
|
readonly bskyPreferences: {
|
|
1910
1876
|
readonly all: () => readonly ["sifa", "bsky-preferences"];
|
|
1911
1877
|
readonly contentLabels: () => readonly ["sifa", "bsky-preferences", "content-labels"];
|
|
@@ -1922,7 +1888,7 @@ declare const sifaQueryKeys: {
|
|
|
1922
1888
|
readonly wipePreview: () => readonly ["sifa", "destructive", "wipe-preview"];
|
|
1923
1889
|
};
|
|
1924
1890
|
};
|
|
1925
|
-
type SifaQueryKey = ReturnType<typeof sifaQueryKeys.all> | ReturnType<typeof sifaQueryKeys.profile.all> | ReturnType<typeof sifaQueryKeys.profile.byHandle> | ReturnType<typeof sifaQueryKeys.profile.atFundLink> | ReturnType<typeof sifaQueryKeys.profile.externalAccounts> | ReturnType<typeof sifaQueryKeys.profile.completeness> | ReturnType<typeof sifaQueryKeys.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | ReturnType<typeof sifaQueryKeys.position.unlinked> | ReturnType<typeof sifaQueryKeys.inbox.all> | ReturnType<typeof sifaQueryKeys.inbox.counts> | ReturnType<typeof sifaQueryKeys.rpg.all> | ReturnType<typeof sifaQueryKeys.rpg.claimable> | ReturnType<typeof sifaQueryKeys.rpg.status> | ReturnType<typeof sifaQueryKeys.search.all> | ReturnType<typeof sifaQueryKeys.search.profiles> | ReturnType<typeof sifaQueryKeys.search.canonicalSkills> | ReturnType<typeof sifaQueryKeys.search.skills> | ReturnType<typeof sifaQueryKeys.search.filters> | ReturnType<typeof sifaQueryKeys.entity.all> | ReturnType<typeof sifaQueryKeys.entity.search> | ReturnType<typeof sifaQueryKeys.discovery.all> | ReturnType<typeof sifaQueryKeys.discovery.similar> | ReturnType<typeof sifaQueryKeys.discovery.suggestions> | ReturnType<typeof sifaQueryKeys.discovery.suggestionCount> | ReturnType<typeof sifaQueryKeys.discovery.featured> | ReturnType<typeof sifaQueryKeys.follow.all> | ReturnType<typeof sifaQueryKeys.follow.following> | ReturnType<typeof sifaQueryKeys.follow.followers> | ReturnType<typeof sifaQueryKeys.follow.followingOf> | ReturnType<typeof sifaQueryKeys.follow.feed> | ReturnType<typeof sifaQueryKeys.follow.mutuals> | ReturnType<typeof sifaQueryKeys.follow.blueskySuggestions> | ReturnType<typeof sifaQueryKeys.admin.all> | ReturnType<typeof sifaQueryKeys.admin.featureAllowlist> | ReturnType<typeof sifaQueryKeys.admin.reviewQueues> | ReturnType<typeof sifaQueryKeys.stats.all> | ReturnType<typeof sifaQueryKeys.stats.homepage> | ReturnType<typeof sifaQueryKeys.apps.all> | ReturnType<typeof sifaQueryKeys.apps.registry> | ReturnType<typeof sifaQueryKeys.apps.hidden> | ReturnType<typeof sifaQueryKeys.activity.all> | ReturnType<typeof sifaQueryKeys.activity.heatmap> | ReturnType<typeof sifaQueryKeys.activity.teaser> | ReturnType<typeof sifaQueryKeys.activity.feed> | ReturnType<typeof sifaQueryKeys.activity.hiddenItems> | ReturnType<typeof sifaQueryKeys.activity.preferences> | ReturnType<typeof sifaQueryKeys.activity.sitePreset> | ReturnType<typeof sifaQueryKeys.endorsement.all> | ReturnType<typeof sifaQueryKeys.endorsement.count> | ReturnType<typeof sifaQueryKeys.endorsement.pending> | ReturnType<typeof sifaQueryKeys.endorsement.reciprocity> | ReturnType<typeof sifaQueryKeys.endorsement.received> | ReturnType<typeof sifaQueryKeys.confirmation.all> | ReturnType<typeof sifaQueryKeys.confirmation.pending> | ReturnType<typeof sifaQueryKeys.confirmation.given> | ReturnType<typeof sifaQueryKeys.stream.all> | ReturnType<typeof sifaQueryKeys.stream.networkCount> | ReturnType<typeof sifaQueryKeys.reactions.all> | ReturnType<typeof sifaQueryKeys.reactions.status> | ReturnType<typeof sifaQueryKeys.reactions.accountCheck> | ReturnType<typeof sifaQueryKeys.
|
|
1891
|
+
type SifaQueryKey = ReturnType<typeof sifaQueryKeys.all> | ReturnType<typeof sifaQueryKeys.profile.all> | ReturnType<typeof sifaQueryKeys.profile.byHandle> | ReturnType<typeof sifaQueryKeys.profile.atFundLink> | ReturnType<typeof sifaQueryKeys.profile.externalAccounts> | ReturnType<typeof sifaQueryKeys.profile.completeness> | ReturnType<typeof sifaQueryKeys.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | ReturnType<typeof sifaQueryKeys.position.unlinked> | ReturnType<typeof sifaQueryKeys.inbox.all> | ReturnType<typeof sifaQueryKeys.inbox.counts> | ReturnType<typeof sifaQueryKeys.rpg.all> | ReturnType<typeof sifaQueryKeys.rpg.claimable> | ReturnType<typeof sifaQueryKeys.rpg.status> | ReturnType<typeof sifaQueryKeys.search.all> | ReturnType<typeof sifaQueryKeys.search.profiles> | ReturnType<typeof sifaQueryKeys.search.canonicalSkills> | ReturnType<typeof sifaQueryKeys.search.skills> | ReturnType<typeof sifaQueryKeys.search.filters> | ReturnType<typeof sifaQueryKeys.entity.all> | ReturnType<typeof sifaQueryKeys.entity.search> | ReturnType<typeof sifaQueryKeys.discovery.all> | ReturnType<typeof sifaQueryKeys.discovery.similar> | ReturnType<typeof sifaQueryKeys.discovery.suggestions> | ReturnType<typeof sifaQueryKeys.discovery.suggestionCount> | ReturnType<typeof sifaQueryKeys.discovery.featured> | ReturnType<typeof sifaQueryKeys.follow.all> | ReturnType<typeof sifaQueryKeys.follow.following> | ReturnType<typeof sifaQueryKeys.follow.followers> | ReturnType<typeof sifaQueryKeys.follow.followingOf> | ReturnType<typeof sifaQueryKeys.follow.feed> | ReturnType<typeof sifaQueryKeys.follow.mutuals> | ReturnType<typeof sifaQueryKeys.follow.blueskySuggestions> | ReturnType<typeof sifaQueryKeys.admin.all> | ReturnType<typeof sifaQueryKeys.admin.featureAllowlist> | ReturnType<typeof sifaQueryKeys.admin.reviewQueues> | ReturnType<typeof sifaQueryKeys.stats.all> | ReturnType<typeof sifaQueryKeys.stats.homepage> | ReturnType<typeof sifaQueryKeys.apps.all> | ReturnType<typeof sifaQueryKeys.apps.registry> | ReturnType<typeof sifaQueryKeys.apps.hidden> | ReturnType<typeof sifaQueryKeys.activity.all> | ReturnType<typeof sifaQueryKeys.activity.heatmap> | ReturnType<typeof sifaQueryKeys.activity.teaser> | ReturnType<typeof sifaQueryKeys.activity.feed> | ReturnType<typeof sifaQueryKeys.activity.hiddenItems> | ReturnType<typeof sifaQueryKeys.activity.preferences> | ReturnType<typeof sifaQueryKeys.activity.sitePreset> | ReturnType<typeof sifaQueryKeys.endorsement.all> | ReturnType<typeof sifaQueryKeys.endorsement.count> | ReturnType<typeof sifaQueryKeys.endorsement.pending> | ReturnType<typeof sifaQueryKeys.endorsement.reciprocity> | ReturnType<typeof sifaQueryKeys.endorsement.received> | ReturnType<typeof sifaQueryKeys.confirmation.all> | ReturnType<typeof sifaQueryKeys.confirmation.pending> | ReturnType<typeof sifaQueryKeys.confirmation.given> | ReturnType<typeof sifaQueryKeys.stream.all> | ReturnType<typeof sifaQueryKeys.stream.networkCount> | ReturnType<typeof sifaQueryKeys.reactions.all> | ReturnType<typeof sifaQueryKeys.reactions.status> | ReturnType<typeof sifaQueryKeys.reactions.accountCheck> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels> | ReturnType<typeof sifaQueryKeys.userSettings.all> | ReturnType<typeof sifaQueryKeys.destructive.all> | ReturnType<typeof sifaQueryKeys.destructive.wipePreview> | ReturnType<typeof sifaQueryKeys.repoInventory.all> | ReturnType<typeof sifaQueryKeys.repoInventory.list>;
|
|
1926
1892
|
|
|
1927
1893
|
/** How a single entity binding was resolved during a claim. */
|
|
1928
1894
|
interface OrgClaimBinding {
|
|
@@ -2037,4 +2003,4 @@ declare function fetchUserSettings(config: SifaApiConfig, options?: FetchUserSet
|
|
|
2037
2003
|
/** Save the given preferences. Returns the stored settings, or `null` on failure. */
|
|
2038
2004
|
declare function updateUserSettings(config: SifaApiConfig, patch: UserSettingsPatch): Promise<UserSettings | null>;
|
|
2039
2005
|
|
|
2040
|
-
export { type
|
|
2006
|
+
export { type FollowingFeedVersion as $, type AccountCheckResult as A, type BulkHideProfileItemInput as B, type ConfirmEndorsementInput as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FetchFollowingFeedOptions as G, type FetchHiddenActivityItemsOptions as H, type FetchHiddenAppsOptions as I, type FetchInboxCountsOptions as J, type FetchMyGithubPullRequestsOptions as K, type FetchProfileCompletenessOptions as L, type FetchReactionStatusOptions as M, type FetchRoadmapOptions as N, type FetchRpgClaimableOptions as O, type FetchRpgStatusOptions as P, type FetchSuggestionsOptions as Q, type FetchUnlinkedPositionsOptions as R, type FetchUserSettingsOptions as S, type FollowListPage as T, type FollowProfile as U, type FollowProfilePageResponse as V, type FollowUserResult as W, type FollowingFeedApp as X, type FollowingFeedBuild as Y, type FollowingFeedEmptyReason as Z, type FollowingFeedResponse as _, type ConfirmEndorsementResult as a, type SimilarProfile as a$, type FollowingResponse as a0, type GetAdminReviewQueuesOptions as a1, type GithubPullRequest as a2, type GivenConfirmation as a3, HIDDEN_ITEM_SOURCES as a4, HIDDEN_ITEM_TYPES as a5, type HeatmapDay as a6, type HeatmapResponse as a7, type HiddenActivityItem as a8, type HiddenApp as a9, QUOTED_POSTS_BATCH_MAX as aA, type QuotedPostAuthor as aB, type QuotedPostImage as aC, type QuotedPostResult as aD, type QuotedPostView as aE, type ReactionError as aF, type ReactionResult as aG, type ReactionStatus as aH, type RefreshOrcidPublicationsResult as aI, type RefreshPdsResult as aJ, type RepoDeleteInput as aK, type ResetProfileResult as aL, type ResolveQuotedPostsOptions as aM, type RoadmapBoardItem as aN, type RoadmapBoardSize as aO, type RoadmapBoardStatus as aP, type RoadmapItemRef as aQ, type RoadmapVoteError as aR, type RoadmapVoteResult as aS, type RoadmapVoter as aT, type RpgClaimableResponse as aU, RpgClaimableResponseSchema as aV, type RpgItemStatus as aW, RpgItemStatusSchema as aX, type RpgStatusResponse as aY, RpgStatusResponseSchema as aZ, type SifaQueryKey as a_, type HiddenItemSource as aa, type HiddenItemType as ab, type HideActivityItemInput as ac, type HideProfileItemInput as ad, type InboxCounts as ae, type ListFeatureAllowlistOptions as af, type MyGithubPullRequestsResponse as ag, type OrgClaimBinding as ah, type OrgClaimResult as ai, type OrgDomainChallengeResult as aj, type OrgDomainVerifyResult as ak, type OrgNotificationEmailAddResult as al, type OrgNotificationEmailRemoveResult as am, type OrgProfileEcho as an, type OrgProfileUpdateResult as ao, PROFILE_COMPLETENESS_SIGNALS as ap, type PdsWipeOutcome as aq, type PendingConfirmation as ar, type PendingConfirmationsPage as as, type PrimarySection as at, type ProfileCompleteness as au, type ProfileCompletenessSignal as av, type ProfileIndustryInput as aw, type ProfileLocationAddress as ax, type ProfileLocationInput as ay, type ProfileSelfLocation as az, type AccountSummary as b, fetchReactionStatus as b$, type SiteActivityPresetResponse as b0, type StatsResponse as b1, type SubCategoryBulkResult as b2, type SuggestionProfile as b3, type SuggestionsResponse as b4, type UnhideActivityItemInput as b5, type UnlinkedPosition as b6, type UnlinkedPositionsResult as b7, type UpdateActivityPreferencesInput as b8, type UpdateProfileOverrideInput as b9, deleteExternalAccount as bA, deleteNamePronunciationAudio as bB, deleteProfileLocation as bC, deleteReaction as bD, deleteRepoRecords as bE, deleteSkill as bF, dismissCompletenessSignal as bG, dismissConfirmation as bH, dismissUnlinkedPosition as bI, fetchAccounts as bJ, fetchActivityFeed as bK, fetchActivityPreferences as bL, fetchActivityTeaser as bM, fetchAppsRegistry as bN, fetchExternalAccounts as bO, fetchFeaturedProfile as bP, fetchFollowing as bQ, fetchFollowingFeed as bR, fetchFollowingFeedVersion as bS, fetchGivenConfirmations as bT, fetchHeatmapData as bU, fetchHiddenActivityItems as bV, fetchHiddenApps as bW, fetchInboxCounts as bX, fetchMyGithubPullRequests as bY, fetchPendingConfirmations as bZ, fetchProfileCompleteness as b_, type UpdateProfileSelfInput as ba, type UploadAvatarResult as bb, type UploadPronunciationAudioResult as bc, type UserSettings as bd, type UserSettingsPatch as be, UserSettingsSchema as bf, type VerifyExternalAccountResult as bg, type WipePreview as bh, addFeatureAllowlist as bi, addOrgNotificationEmail as bj, bulkHideProfileItems as bk, bulkHideStandardPublications as bl, bulkUnhideProfileItems as bm, bulkUnhideStandardPublications as bn, castRoadmapItemVote as bo, checkAppAccount as bp, clearCompletenessDismissals as bq, confirmEndorsement as br, createConfirmation as bs, createEndorsement as bt, createExternalAccount as bu, createProfileLocation as bv, createReaction as bw, createSkill as bx, deleteAccount as by, deleteAvatarOverride as bz, type ActivityFeedResponse as c, fetchRepoInventory as c0, fetchRoadmap as c1, fetchRpgClaimable as c2, fetchRpgStatus as c3, fetchSimilarProfiles as c4, fetchSiteActivityPreset as c5, fetchStats as c6, fetchSuggestionCount as c7, fetchSuggestions as c8, fetchUnlinkedPositions as c9, setExternalAccountPrimary as cA, setSectionPrimary as cB, submitOrgClaim as cC, switchAccount as cD, unfollowUser as cE, unhideActivityItem as cF, unhideOrcidPublication as cG, unhideProfileItem as cH, unhideSifaPublication as cI, unhideStandardPublication as cJ, unsetExternalAccountPrimary as cK, unsetSectionPrimary as cL, updateActivityPreferences as cM, updateExternalAccount as cN, updateOrgProfile as cO, updateProfileLocation as cP, updateProfileOverride as cQ, updateProfileSelf as cR, updateSkill as cS, updateSkillSubCategories as cT, updateUserSettings as cU, uploadAvatar as cV, uploadNamePronunciationAudio as cW, verifyExternalAccount as cX, verifyOrgDomain as cY, fetchUserSettings as ca, fetchViewerPositionConfirmations as cb, fetchWipePreview as cc, followUser as cd, getAdminReviewQueues as ce, getBlueskySuggestions as cf, getFollowers as cg, getFollowing as ch, getMutuals as ci, hideActivityItem as cj, hideOrcidPublication as ck, hideProfileItem as cl, hideSifaPublication as cm, hideStandardPublication as cn, isNewerFollowingFeed as co, listFeatureAllowlist as cp, refreshOrcidPublications as cq, refreshPds as cr, removeFeatureAllowlist as cs, removeOrgNotificationEmail as ct, repoExportUrl as cu, requestOrgDomainChallenge as cv, resetProfile as cw, resolveQuotedPosts as cx, retractRoadmapItemVote as cy, revokeConfirmation as cz, type ActivityItem as d, type ActivityItemLinkHealth as e, type ActivityPreferences as f, type ActivityTeaserResponse as g, type AdminReviewQueues as h, type AppRegistryEntry as i, type CastRoadmapVoteResult as j, type CheckAppAccountOptions as k, type ConfirmationInput as l, type ConfirmationSubjectInput as m, type CreateExternalAccountResult as n, type DismissCompletenessSignalInput as o, type DismissUnlinkedPositionInput as p, type ExternalAccountInput as q, type FeaturedProfile as r, sifaQueryKeys as s, type FetchAccountsOptions as t, type FetchActivityFeedOptions as u, type FetchActivityPreferencesOptions as v, type FetchActivityTeaserOptions as w, type FetchConfirmationsOptions as x, type FetchFollowListOptions as y, type FetchFollowProfilePageOptions as z };
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// src/query/hooks/use-roadmap.ts
|
|
4
|
-
import { useQuery } from "@tanstack/react-query";
|
|
5
|
-
import { useSifaConfig } from "../config.js";
|
|
6
|
-
import {
|
|
7
|
-
fetchMyRoadmapVotes,
|
|
8
|
-
fetchRoadmapVotes
|
|
9
|
-
} from "../fetchers/roadmap.js";
|
|
10
|
-
import { sifaQueryKeys } from "../keys.js";
|
|
11
|
-
function useRoadmapVotes(options) {
|
|
12
|
-
const config = useSifaConfig();
|
|
13
|
-
return useQuery({
|
|
14
|
-
queryKey: sifaQueryKeys.roadmap.votes(),
|
|
15
|
-
queryFn: () => fetchRoadmapVotes(config),
|
|
16
|
-
...options
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
function useMyRoadmapVotes(options) {
|
|
20
|
-
const config = useSifaConfig();
|
|
21
|
-
return useQuery({
|
|
22
|
-
queryKey: sifaQueryKeys.roadmap.myVotes(),
|
|
23
|
-
queryFn: () => fetchMyRoadmapVotes(config),
|
|
24
|
-
...options
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
useMyRoadmapVotes,
|
|
29
|
-
useRoadmapVotes
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=use-roadmap.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/query/hooks/use-roadmap.ts"],"sourcesContent":["'use client';\n\nimport { useQuery, type UseQueryOptions } from '@tanstack/react-query';\n\nimport { useSifaConfig } from '../config.js';\nimport {\n fetchMyRoadmapVotes,\n fetchRoadmapVotes,\n type RoadmapVotesResponse,\n} from '../fetchers/roadmap.js';\nimport { sifaQueryKeys } from '../keys.js';\n\n/** Public roadmap vote tallies. Returns `{}` data on error. */\nexport function useRoadmapVotes(\n options?: Omit<\n UseQueryOptions<\n RoadmapVotesResponse,\n Error,\n RoadmapVotesResponse,\n ReturnType<typeof sifaQueryKeys.roadmap.votes>\n >,\n 'queryKey' | 'queryFn'\n >,\n) {\n const config = useSifaConfig();\n return useQuery({\n queryKey: sifaQueryKeys.roadmap.votes(),\n queryFn: () => fetchRoadmapVotes(config),\n ...options,\n });\n}\n\n/** Roadmap items the authenticated viewer has voted on. Returns `[]` data on error. */\nexport function useMyRoadmapVotes(\n options?: Omit<\n UseQueryOptions<string[], Error, string[], ReturnType<typeof sifaQueryKeys.roadmap.myVotes>>,\n 'queryKey' | 'queryFn'\n >,\n) {\n const config = useSifaConfig();\n return useQuery({\n queryKey: sifaQueryKeys.roadmap.myVotes(),\n queryFn: () => fetchMyRoadmapVotes(config),\n ...options,\n });\n}\n"],"mappings":";;;AAEA,SAAS,gBAAsC;AAE/C,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,OAEK;AACP,SAAS,qBAAqB;AAGvB,SAAS,gBACd,SASA;AACA,QAAM,SAAS,cAAc;AAC7B,SAAO,SAAS;AAAA,IACd,UAAU,cAAc,QAAQ,MAAM;AAAA,IACtC,SAAS,MAAM,kBAAkB,MAAM;AAAA,IACvC,GAAG;AAAA,EACL,CAAC;AACH;AAGO,SAAS,kBACd,SAIA;AACA,QAAM,SAAS,cAAc;AAC7B,SAAO,SAAS;AAAA,IACd,UAAU,cAAc,QAAQ,QAAQ;AAAA,IACxC,SAAS,MAAM,oBAAoB,MAAM;AAAA,IACzC,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
|