@singi-labs/sifa-sdk 0.10.18 → 0.11.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 +1 -1
- package/dist/index.js +1 -1
- package/dist/{keys-CMaEcp0g.d.cts → keys-BDzlCEo1.d.cts} +41 -3
- package/dist/{keys-B_Z735bY.d.ts → keys-D1qvOp5Q.d.ts} +41 -3
- package/dist/query/fetchers/index.cjs +30 -2
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +2 -2
- package/dist/query/fetchers/index.d.ts +2 -2
- package/dist/query/fetchers/index.js +30 -2
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +31 -3
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +10 -4
- package/dist/query/hooks/index.d.ts +10 -4
- package/dist/query/hooks/index.js +31 -3
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +31 -3
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/query/index.js +31 -3
- package/dist/query/index.js.map +1 -1
- package/package.json +1 -1
package/dist/query/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, W as WriteResult, s as sifaQueryKeys } from '../keys-
|
|
2
|
-
export { a as AccountCheckResult, b as ActivityFeedResponse, c as ActivityItem, d as ActivityItemLinkHealth, e as ActivityTeaserResponse, f as ApiError, g as AppRegistryEntry, B as BulkHideProfileItemInput, C as
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, W as WriteResult, s as sifaQueryKeys } from '../keys-BDzlCEo1.cjs';
|
|
2
|
+
export { a as AccountCheckResult, b as ActivityFeedResponse, c as ActivityItem, d as ActivityItemLinkHealth, e as ActivityTeaserResponse, f as ApiError, g as AppRegistryEntry, B as BulkHideProfileItemInput, C as CastRoadmapVoteResult, h as CheckAppAccountOptions, i as CreateExternalAccountResult, j as CreateResult, D as DeleteAccountResult, E as EndorsementInput, k as ExternalAccountInput, F as FeatureAllowlistResponse, l as FeaturedProfile, m as FetchActivityFeedOptions, n as FetchActivityTeaserOptions, o as FetchFollowListOptions, p as FetchFollowProfilePageOptions, q as FetchFollowingFeedOptions, r as FetchHiddenAppsOptions, t as FetchMyRoadmapVotesOptions, u as FetchReactionStatusOptions, v as FetchSuggestionsOptions, w as FilterOptions, x as FollowListPage, y as FollowProfile, z as FollowProfilePageResponse, G as FollowUserResult, H as FollowingResponse, I as HIDDEN_ITEM_SOURCES, J as HIDDEN_ITEM_TYPES, K as HeatmapDay, L as HeatmapResponse, M as HiddenApp, N as HiddenItemSource, O as HiddenItemType, P as HideProfileItemInput, Q as ListFeatureAllowlistOptions, R as ProfileIndustryInput, T as ProfileLocationAddress, U as ProfileLocationInput, V as ProfileSearchResult, X as ProfileSelfLocation, Y as QUOTED_POSTS_BATCH_MAX, Z as QuotedPostAuthor, _ as QuotedPostImage, $ as QuotedPostResult, a0 as QuotedPostView, a1 as ReactionError, a2 as ReactionResult, a3 as ReactionStatus, a4 as RefreshOrcidPublicationsResult, a5 as RefreshPdsResult, a6 as ResolveQuotedPostsOptions, a7 as RoadmapVoteError, a8 as RoadmapVoteResult, a9 as RoadmapVoter, aa as RoadmapVotesResponse, ab as SearchFilters, ac as SearchResponse, ad as SifaQueryKey, ae as SimilarProfile, af as SkillSearchResult, ag as StatsResponse, ah as SuggestionProfile, ai as SuggestionsResponse, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, am as VerifyExternalAccountResult, an as addFeatureAllowlist, ao as apiFetch, ap as apiFetchOrNull, aq as apiWrite, ar as apiWriteCreate, as as bulkHideProfileItems, at as bulkHideStandardPublications, au as bulkUnhideProfileItems, av as bulkUnhideStandardPublications, aw as castRoadmapVote, ax as checkAppAccount, ay as createEndorsement, az as createExternalAccount, aA as createProfileLocation, aB as createReaction, aC as deleteAccount, aD as deleteAvatarOverride, aE as deleteExternalAccount, aF as deleteProfileLocation, aG as deleteReaction, aH as fetchActivityFeed, aI as fetchActivityTeaser, aJ as fetchAppsRegistry, aK as fetchExternalAccounts, aL as fetchFeaturedProfile, aM as fetchFollowing, aN as fetchHeatmapData, aO as fetchHiddenApps, aP as fetchMyRoadmapVotes, aQ as fetchReactionStatus, aR as fetchRoadmapVotes, aS as fetchSearchFilters, aT as fetchSearchProfiles, aU as fetchSimilarProfiles, aV as fetchSkillSuggestions, aW as fetchStats, aX as fetchSuggestionCount, aY as fetchSuggestions, aZ as followUser, a_ as getBlueskySuggestions, a$ as getFollowers, b0 as getFollowing, b1 as getFollowingFeed, b2 as getMutuals, b3 as hideOrcidPublication, b4 as hideProfileItem, b5 as hideSifaPublication, b6 as hideStandardPublication, b7 as listFeatureAllowlist, b8 as refreshOrcidPublications, b9 as refreshPds, ba as removeFeatureAllowlist, bb as resetProfile, bc as resolveQuotedPosts, bd as retractRoadmapVote, be as searchSkills, bf as setExternalAccountPrimary, bg as unfollowUser, bh as unhideOrcidPublication, bi as unhideProfileItem, bj as unhideSifaPublication, bk as unhideStandardPublication, bl as unsetExternalAccountPrimary, bm as updateExternalAccount, bn as updateProfileLocation, bo as updateProfileOverride, bp as updateProfileSelf, bq as uploadAvatar, br as verifyExternalAccount } from '../keys-BDzlCEo1.cjs';
|
|
3
3
|
export { AddFeatureAllowlistVariables, CreateReactionVariables, CreateRecordVariables, DeleteReactionVariables, DeleteRecordVariables, FollowVariables, PositionSkillLinkVariables, RemoveFeatureAllowlistVariables, SifaProvider, SifaProviderProps, UnfollowVariables, UpdateEducationVariables, UpdateExternalAccountVariables, UpdatePositionVariables, UpdateProfileLocationVariables, UpdateRecordVariables, UpdateSkillVariables, useActivityFeed, useActivityTeaser, useAddFeatureAllowlist, useAppAccountCheck, useAppsRegistry, useAtFundLink, useBlueskySuggestions, useBulkHideProfileItems, useBulkHideStandardPublications, useBulkUnhideProfileItems, useBulkUnhideStandardPublications, useCanonicalSkillSearch, useCastRoadmapVote, useCreateEducation, useCreateEndorsement, useCreateExternalAccount, useCreatePosition, useCreateProfileLocation, useCreateReaction, useCreateRecord, useCreateSkill, useDeleteAccount, useDeleteAvatarOverride, useDeleteEducation, useDeleteExternalAccount, useDeletePosition, useDeleteProfileLocation, useDeleteReaction, useDeleteRecord, useDeleteSkill, useEndorsementCount, useExternalAccounts, useFeatureAllowlist, useFeaturedProfile, useFollow, useFollowers, useFollowing, useFollowingFeed, useFollowingList, useHeatmapData, useHiddenApps, useHideKeytraceClaim, useHideOrcidPublication, useHideProfileItem, useHideSifaPublication, useHideStandardPublication, useLinkSkillToPosition, useMutuals, useMyRoadmapVotes, useNetworkStreamCount, useProfile, useReactionStatus, useRefreshOrcidPublications, useRefreshPds, useRemoveFeatureAllowlist, useResetProfile, useRetractRoadmapVote, useRevealMarqueDomain, useRoadmapVotes, useSearchFilters, useSearchProfiles, useSetExternalAccountPrimary, useSetPositionPrimary, useSifaConfig, useSimilarProfiles, useSkillSuggestions, useStats, useSuggestionCount, useSuggestions, useUnfollow, useUnhideKeytraceClaim, useUnhideOrcidPublication, useUnhideProfileItem, useUnhideSifaPublication, useUnhideStandardPublication, useUnlinkSkillFromPosition, useUnrevealMarqueDomain, useUnsetExternalAccountPrimary, useUnsetPositionPrimary, useUpdateEducation, useUpdateExternalAccount, useUpdatePosition, useUpdateProfileLocation, useUpdateProfileOverride, useUpdateProfileSelf, useUpdateRecord, useUpdateSkill, useUploadAvatar, useVerifyExternalAccount } from './hooks/index.cjs';
|
|
4
4
|
export { FetchNetworkStreamCountOptions, NetworkMapEdge, NetworkMapGenerationJob, NetworkMapGraphData, NetworkMapNode, NetworkMapPendingJob, NetworkMapResponse, checkNetworkMapJobStatus, createEducation, createPosition, createRecord, createSkill, deleteEducation, deletePosition, deleteRecord, deleteSkill, fetchAtFundLink, fetchEndorsementCount, fetchNetworkMap, fetchNetworkStreamCount, fetchProfile, hideKeytraceClaim, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, revealMarqueDomain, setPositionPrimary, unhideKeytraceClaim, unlinkSkillFromPosition, unrevealMarqueDomain, unsetPositionPrimary, updateEducation, updatePosition, updateRecord, updateSkill } from './fetchers/index.cjs';
|
|
5
5
|
import { A as AdultContentLabel } from '../adult-content-o0BxhFzc.cjs';
|
package/dist/query/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, W as WriteResult, s as sifaQueryKeys } from '../keys-
|
|
2
|
-
export { a as AccountCheckResult, b as ActivityFeedResponse, c as ActivityItem, d as ActivityItemLinkHealth, e as ActivityTeaserResponse, f as ApiError, g as AppRegistryEntry, B as BulkHideProfileItemInput, C as
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, W as WriteResult, s as sifaQueryKeys } from '../keys-D1qvOp5Q.js';
|
|
2
|
+
export { a as AccountCheckResult, b as ActivityFeedResponse, c as ActivityItem, d as ActivityItemLinkHealth, e as ActivityTeaserResponse, f as ApiError, g as AppRegistryEntry, B as BulkHideProfileItemInput, C as CastRoadmapVoteResult, h as CheckAppAccountOptions, i as CreateExternalAccountResult, j as CreateResult, D as DeleteAccountResult, E as EndorsementInput, k as ExternalAccountInput, F as FeatureAllowlistResponse, l as FeaturedProfile, m as FetchActivityFeedOptions, n as FetchActivityTeaserOptions, o as FetchFollowListOptions, p as FetchFollowProfilePageOptions, q as FetchFollowingFeedOptions, r as FetchHiddenAppsOptions, t as FetchMyRoadmapVotesOptions, u as FetchReactionStatusOptions, v as FetchSuggestionsOptions, w as FilterOptions, x as FollowListPage, y as FollowProfile, z as FollowProfilePageResponse, G as FollowUserResult, H as FollowingResponse, I as HIDDEN_ITEM_SOURCES, J as HIDDEN_ITEM_TYPES, K as HeatmapDay, L as HeatmapResponse, M as HiddenApp, N as HiddenItemSource, O as HiddenItemType, P as HideProfileItemInput, Q as ListFeatureAllowlistOptions, R as ProfileIndustryInput, T as ProfileLocationAddress, U as ProfileLocationInput, V as ProfileSearchResult, X as ProfileSelfLocation, Y as QUOTED_POSTS_BATCH_MAX, Z as QuotedPostAuthor, _ as QuotedPostImage, $ as QuotedPostResult, a0 as QuotedPostView, a1 as ReactionError, a2 as ReactionResult, a3 as ReactionStatus, a4 as RefreshOrcidPublicationsResult, a5 as RefreshPdsResult, a6 as ResolveQuotedPostsOptions, a7 as RoadmapVoteError, a8 as RoadmapVoteResult, a9 as RoadmapVoter, aa as RoadmapVotesResponse, ab as SearchFilters, ac as SearchResponse, ad as SifaQueryKey, ae as SimilarProfile, af as SkillSearchResult, ag as StatsResponse, ah as SuggestionProfile, ai as SuggestionsResponse, aj as UpdateProfileOverrideInput, ak as UpdateProfileSelfInput, al as UploadAvatarResult, am as VerifyExternalAccountResult, an as addFeatureAllowlist, ao as apiFetch, ap as apiFetchOrNull, aq as apiWrite, ar as apiWriteCreate, as as bulkHideProfileItems, at as bulkHideStandardPublications, au as bulkUnhideProfileItems, av as bulkUnhideStandardPublications, aw as castRoadmapVote, ax as checkAppAccount, ay as createEndorsement, az as createExternalAccount, aA as createProfileLocation, aB as createReaction, aC as deleteAccount, aD as deleteAvatarOverride, aE as deleteExternalAccount, aF as deleteProfileLocation, aG as deleteReaction, aH as fetchActivityFeed, aI as fetchActivityTeaser, aJ as fetchAppsRegistry, aK as fetchExternalAccounts, aL as fetchFeaturedProfile, aM as fetchFollowing, aN as fetchHeatmapData, aO as fetchHiddenApps, aP as fetchMyRoadmapVotes, aQ as fetchReactionStatus, aR as fetchRoadmapVotes, aS as fetchSearchFilters, aT as fetchSearchProfiles, aU as fetchSimilarProfiles, aV as fetchSkillSuggestions, aW as fetchStats, aX as fetchSuggestionCount, aY as fetchSuggestions, aZ as followUser, a_ as getBlueskySuggestions, a$ as getFollowers, b0 as getFollowing, b1 as getFollowingFeed, b2 as getMutuals, b3 as hideOrcidPublication, b4 as hideProfileItem, b5 as hideSifaPublication, b6 as hideStandardPublication, b7 as listFeatureAllowlist, b8 as refreshOrcidPublications, b9 as refreshPds, ba as removeFeatureAllowlist, bb as resetProfile, bc as resolveQuotedPosts, bd as retractRoadmapVote, be as searchSkills, bf as setExternalAccountPrimary, bg as unfollowUser, bh as unhideOrcidPublication, bi as unhideProfileItem, bj as unhideSifaPublication, bk as unhideStandardPublication, bl as unsetExternalAccountPrimary, bm as updateExternalAccount, bn as updateProfileLocation, bo as updateProfileOverride, bp as updateProfileSelf, bq as uploadAvatar, br as verifyExternalAccount } from '../keys-D1qvOp5Q.js';
|
|
3
3
|
export { AddFeatureAllowlistVariables, CreateReactionVariables, CreateRecordVariables, DeleteReactionVariables, DeleteRecordVariables, FollowVariables, PositionSkillLinkVariables, RemoveFeatureAllowlistVariables, SifaProvider, SifaProviderProps, UnfollowVariables, UpdateEducationVariables, UpdateExternalAccountVariables, UpdatePositionVariables, UpdateProfileLocationVariables, UpdateRecordVariables, UpdateSkillVariables, useActivityFeed, useActivityTeaser, useAddFeatureAllowlist, useAppAccountCheck, useAppsRegistry, useAtFundLink, useBlueskySuggestions, useBulkHideProfileItems, useBulkHideStandardPublications, useBulkUnhideProfileItems, useBulkUnhideStandardPublications, useCanonicalSkillSearch, useCastRoadmapVote, useCreateEducation, useCreateEndorsement, useCreateExternalAccount, useCreatePosition, useCreateProfileLocation, useCreateReaction, useCreateRecord, useCreateSkill, useDeleteAccount, useDeleteAvatarOverride, useDeleteEducation, useDeleteExternalAccount, useDeletePosition, useDeleteProfileLocation, useDeleteReaction, useDeleteRecord, useDeleteSkill, useEndorsementCount, useExternalAccounts, useFeatureAllowlist, useFeaturedProfile, useFollow, useFollowers, useFollowing, useFollowingFeed, useFollowingList, useHeatmapData, useHiddenApps, useHideKeytraceClaim, useHideOrcidPublication, useHideProfileItem, useHideSifaPublication, useHideStandardPublication, useLinkSkillToPosition, useMutuals, useMyRoadmapVotes, useNetworkStreamCount, useProfile, useReactionStatus, useRefreshOrcidPublications, useRefreshPds, useRemoveFeatureAllowlist, useResetProfile, useRetractRoadmapVote, useRevealMarqueDomain, useRoadmapVotes, useSearchFilters, useSearchProfiles, useSetExternalAccountPrimary, useSetPositionPrimary, useSifaConfig, useSimilarProfiles, useSkillSuggestions, useStats, useSuggestionCount, useSuggestions, useUnfollow, useUnhideKeytraceClaim, useUnhideOrcidPublication, useUnhideProfileItem, useUnhideSifaPublication, useUnhideStandardPublication, useUnlinkSkillFromPosition, useUnrevealMarqueDomain, useUnsetExternalAccountPrimary, useUnsetPositionPrimary, useUpdateEducation, useUpdateExternalAccount, useUpdatePosition, useUpdateProfileLocation, useUpdateProfileOverride, useUpdateProfileSelf, useUpdateRecord, useUpdateSkill, useUploadAvatar, useVerifyExternalAccount } from './hooks/index.js';
|
|
4
4
|
export { FetchNetworkStreamCountOptions, NetworkMapEdge, NetworkMapGenerationJob, NetworkMapGraphData, NetworkMapNode, NetworkMapPendingJob, NetworkMapResponse, checkNetworkMapJobStatus, createEducation, createPosition, createRecord, createSkill, deleteEducation, deletePosition, deleteRecord, deleteSkill, fetchAtFundLink, fetchEndorsementCount, fetchNetworkMap, fetchNetworkStreamCount, fetchProfile, hideKeytraceClaim, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, revealMarqueDomain, setPositionPrimary, unhideKeytraceClaim, unlinkSkillFromPosition, unrevealMarqueDomain, unsetPositionPrimary, updateEducation, updatePosition, updateRecord, updateSkill } from './fetchers/index.js';
|
|
5
5
|
import { A as AdultContentLabel } from '../adult-content-o0BxhFzc.js';
|
package/dist/query/index.js
CHANGED
|
@@ -1031,8 +1031,36 @@ async function fetchMyRoadmapVotes(config, options = {}) {
|
|
|
1031
1031
|
return [];
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
|
-
function castRoadmapVote(config, key, options = {}) {
|
|
1035
|
-
|
|
1034
|
+
async function castRoadmapVote(config, key, options = {}) {
|
|
1035
|
+
const fetchFn = config.fetch ?? globalThis.fetch;
|
|
1036
|
+
const url = `${config.baseUrl}/api/roadmap/votes/${encodeURIComponent(key)}`;
|
|
1037
|
+
try {
|
|
1038
|
+
const res = await fetchFn(url, {
|
|
1039
|
+
method: "POST",
|
|
1040
|
+
headers: { "Content-Type": "application/json", ...options.headers ?? {} },
|
|
1041
|
+
credentials: options.credentials ?? "include",
|
|
1042
|
+
signal: options.signal ?? AbortSignal.timeout(options.timeoutMs ?? 1e4)
|
|
1043
|
+
});
|
|
1044
|
+
if (!res.ok) {
|
|
1045
|
+
if (res.status === 403) {
|
|
1046
|
+
try {
|
|
1047
|
+
const body = await res.json();
|
|
1048
|
+
if (body.error === "ScopeInsufficient") {
|
|
1049
|
+
return {
|
|
1050
|
+
ok: false,
|
|
1051
|
+
error: { type: "scope_insufficient", requiredScope: body.requiredScope }
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
} catch {
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
return { ok: false, error: { type: "error" } };
|
|
1058
|
+
}
|
|
1059
|
+
const data = await res.json();
|
|
1060
|
+
return { ok: true, data };
|
|
1061
|
+
} catch {
|
|
1062
|
+
return { ok: false, error: { type: "error" } };
|
|
1063
|
+
}
|
|
1036
1064
|
}
|
|
1037
1065
|
function retractRoadmapVote(config, key, options = {}) {
|
|
1038
1066
|
return apiWrite(config, `/api/roadmap/votes/${encodeURIComponent(key)}`, "DELETE", options);
|
|
@@ -2217,7 +2245,7 @@ function useCastRoadmapVote(options) {
|
|
|
2217
2245
|
return useMutation({
|
|
2218
2246
|
mutationFn: (key) => castRoadmapVote(config, key),
|
|
2219
2247
|
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
2220
|
-
if (result.
|
|
2248
|
+
if (result.ok) {
|
|
2221
2249
|
await invalidateRoadmap(queryClient);
|
|
2222
2250
|
}
|
|
2223
2251
|
await options?.onSuccess?.(result, variables, onMutateResult, context);
|