@singi-labs/sifa-sdk 0.11.13 → 0.11.15
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/README.md +43 -0
- package/dist/{adult-content-BpZD_3ow.d.cts → adult-content-C0XGPU5A.d.cts} +6 -0
- package/dist/{adult-content-BpZD_3ow.d.ts → adult-content-C0XGPU5A.d.ts} +6 -0
- package/dist/{feed-DHTy7fUN.d.cts → feed-BaHtJXYR.d.cts} +98 -1
- package/dist/{feed-DHTy7fUN.d.ts → feed-BaHtJXYR.d.ts} +98 -1
- package/dist/index.cjs +105 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -4
- package/dist/index.d.ts +28 -4
- package/dist/index.js +97 -2
- package/dist/index.js.map +1 -1
- package/dist/{keys-DuICaiIq.d.ts → keys-Cdu3x0cr.d.ts} +7 -3
- package/dist/{keys-K8kCuA5J.d.cts → keys-DdIxFB-C.d.cts} +7 -3
- package/dist/query/fetchers/index.cjs +83 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +23 -5
- package/dist/query/fetchers/index.d.ts +23 -5
- package/dist/query/fetchers/index.js +81 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +118 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +74 -5
- package/dist/query/hooks/index.d.ts +74 -5
- package/dist/query/hooks/index.js +116 -2
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +119 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +6 -6
- package/dist/query/index.d.ts +6 -6
- package/dist/query/index.js +114 -2
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/index.cjs +50 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +2 -1
- package/dist/schemas/index.d.ts +2 -1
- package/dist/schemas/index.js +46 -1
- package/dist/schemas/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } 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 CastRoadmapVoteResult, h as CheckAppAccountOptions, i as CreateExternalAccountResult, 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, s as sifaQueryKeys, 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-
|
|
3
|
-
import { d as Profile, t as ProfilePosition, z as SkillRef } from '../../adult-content-
|
|
4
|
-
import '../../feed-
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from '../../keys-DdIxFB-C.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, 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, s as sifaQueryKeys, 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-DdIxFB-C.cjs';
|
|
3
|
+
import { d as Profile, t as ProfilePosition, z as SkillRef } from '../../adult-content-C0XGPU5A.cjs';
|
|
4
|
+
import { g as EntitySearchResponse, E as EntitySearchResult, j as EntitySelectRequest, l as EntitySelectResponse } from '../../feed-BaHtJXYR.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -106,6 +106,24 @@ declare function revealMarqueDomain(config: SifaApiConfig, domain: string, optio
|
|
|
106
106
|
/** Make a previously-revealed Marque domain owner-only again. */
|
|
107
107
|
declare function unrevealMarqueDomain(config: SifaApiConfig, domain: string, options?: ApiFetchOptions): Promise<WriteResult>;
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Organization typeahead. Returns curated entities first, then the PDL crawl,
|
|
111
|
+
* deduped by domain. Empty input returns an empty result without a network call.
|
|
112
|
+
*/
|
|
113
|
+
declare function fetchEntitySearch(config: SifaApiConfig, query: string, limit?: number, options?: ApiFetchOptions): Promise<EntitySearchResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Record a selection: promote a PDL row into a canonical entity (dedupe by
|
|
116
|
+
* domain) or bump an existing entity's usage counter. Returns the entity plus
|
|
117
|
+
* its portable `entityRef` (null for PDL-only entities). Requires a session.
|
|
118
|
+
*/
|
|
119
|
+
declare function selectEntity(config: SifaApiConfig, body: EntitySelectRequest, options?: ApiFetchOptions): Promise<EntitySelectResponse>;
|
|
120
|
+
/**
|
|
121
|
+
* Grow-on-demand: when the local typeahead misses, resolve the query live via
|
|
122
|
+
* Wikidata, import the org-class matches, and return them. Requires a session.
|
|
123
|
+
* Empty input returns an empty array without a network call.
|
|
124
|
+
*/
|
|
125
|
+
declare function importSearchEntities(config: SifaApiConfig, query: string, options?: ApiFetchOptions): Promise<EntitySearchResult[]>;
|
|
126
|
+
|
|
109
127
|
/**
|
|
110
128
|
* Counts confirmed endorsements received by a DID. The backend's
|
|
111
129
|
* `GET /api/endorsement/:did` already returns only confirmed endorsements
|
|
@@ -227,4 +245,4 @@ declare function checkNetworkMapJobStatus(config: SifaApiConfig, jobId: string,
|
|
|
227
245
|
*/
|
|
228
246
|
declare function fetchNetworkMap(config: SifaApiConfig, options?: ApiFetchOptions): Promise<NetworkMapResponse | null>;
|
|
229
247
|
|
|
230
|
-
export { ApiFetchOptions, CreateResult, type FetchNetworkStreamCountOptions, type NetworkMapEdge, type NetworkMapGenerationJob, type NetworkMapGraphData, type NetworkMapNode, type NetworkMapPendingJob, type NetworkMapResponse, SifaApiConfig, WriteResult, 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 };
|
|
248
|
+
export { ApiFetchOptions, CreateResult, type FetchNetworkStreamCountOptions, type NetworkMapEdge, type NetworkMapGenerationJob, type NetworkMapGraphData, type NetworkMapNode, type NetworkMapPendingJob, type NetworkMapResponse, SifaApiConfig, WriteResult, checkNetworkMapJobStatus, createEducation, createPosition, createRecord, createSkill, deleteEducation, deletePosition, deleteRecord, deleteSkill, fetchAtFundLink, fetchEndorsementCount, fetchEntitySearch, fetchNetworkMap, fetchNetworkStreamCount, fetchProfile, hideKeytraceClaim, importSearchEntities, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, revealMarqueDomain, selectEntity, setPositionPrimary, unhideKeytraceClaim, unlinkSkillFromPosition, unrevealMarqueDomain, unsetPositionPrimary, updateEducation, updatePosition, updateRecord, updateSkill };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } 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 CastRoadmapVoteResult, h as CheckAppAccountOptions, i as CreateExternalAccountResult, 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, s as sifaQueryKeys, 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-
|
|
3
|
-
import { d as Profile, t as ProfilePosition, z as SkillRef } from '../../adult-content-
|
|
4
|
-
import '../../feed-
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from '../../keys-Cdu3x0cr.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, 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, s as sifaQueryKeys, 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-Cdu3x0cr.js';
|
|
3
|
+
import { d as Profile, t as ProfilePosition, z as SkillRef } from '../../adult-content-C0XGPU5A.js';
|
|
4
|
+
import { g as EntitySearchResponse, E as EntitySearchResult, j as EntitySelectRequest, l as EntitySelectResponse } from '../../feed-BaHtJXYR.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -106,6 +106,24 @@ declare function revealMarqueDomain(config: SifaApiConfig, domain: string, optio
|
|
|
106
106
|
/** Make a previously-revealed Marque domain owner-only again. */
|
|
107
107
|
declare function unrevealMarqueDomain(config: SifaApiConfig, domain: string, options?: ApiFetchOptions): Promise<WriteResult>;
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Organization typeahead. Returns curated entities first, then the PDL crawl,
|
|
111
|
+
* deduped by domain. Empty input returns an empty result without a network call.
|
|
112
|
+
*/
|
|
113
|
+
declare function fetchEntitySearch(config: SifaApiConfig, query: string, limit?: number, options?: ApiFetchOptions): Promise<EntitySearchResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Record a selection: promote a PDL row into a canonical entity (dedupe by
|
|
116
|
+
* domain) or bump an existing entity's usage counter. Returns the entity plus
|
|
117
|
+
* its portable `entityRef` (null for PDL-only entities). Requires a session.
|
|
118
|
+
*/
|
|
119
|
+
declare function selectEntity(config: SifaApiConfig, body: EntitySelectRequest, options?: ApiFetchOptions): Promise<EntitySelectResponse>;
|
|
120
|
+
/**
|
|
121
|
+
* Grow-on-demand: when the local typeahead misses, resolve the query live via
|
|
122
|
+
* Wikidata, import the org-class matches, and return them. Requires a session.
|
|
123
|
+
* Empty input returns an empty array without a network call.
|
|
124
|
+
*/
|
|
125
|
+
declare function importSearchEntities(config: SifaApiConfig, query: string, options?: ApiFetchOptions): Promise<EntitySearchResult[]>;
|
|
126
|
+
|
|
109
127
|
/**
|
|
110
128
|
* Counts confirmed endorsements received by a DID. The backend's
|
|
111
129
|
* `GET /api/endorsement/:did` already returns only confirmed endorsements
|
|
@@ -227,4 +245,4 @@ declare function checkNetworkMapJobStatus(config: SifaApiConfig, jobId: string,
|
|
|
227
245
|
*/
|
|
228
246
|
declare function fetchNetworkMap(config: SifaApiConfig, options?: ApiFetchOptions): Promise<NetworkMapResponse | null>;
|
|
229
247
|
|
|
230
|
-
export { ApiFetchOptions, CreateResult, type FetchNetworkStreamCountOptions, type NetworkMapEdge, type NetworkMapGenerationJob, type NetworkMapGraphData, type NetworkMapNode, type NetworkMapPendingJob, type NetworkMapResponse, SifaApiConfig, WriteResult, 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 };
|
|
248
|
+
export { ApiFetchOptions, CreateResult, type FetchNetworkStreamCountOptions, type NetworkMapEdge, type NetworkMapGenerationJob, type NetworkMapGraphData, type NetworkMapNode, type NetworkMapPendingJob, type NetworkMapResponse, SifaApiConfig, WriteResult, checkNetworkMapJobStatus, createEducation, createPosition, createRecord, createSkill, deleteEducation, deletePosition, deleteRecord, deleteSkill, fetchAtFundLink, fetchEndorsementCount, fetchEntitySearch, fetchNetworkMap, fetchNetworkStreamCount, fetchProfile, hideKeytraceClaim, importSearchEntities, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, revealMarqueDomain, selectEntity, setPositionPrimary, unhideKeytraceClaim, unlinkSkillFromPosition, unrevealMarqueDomain, unsetPositionPrimary, updateEducation, updatePosition, updateRecord, updateSkill };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
1
3
|
// src/query/client.ts
|
|
2
4
|
var ApiError = class extends Error {
|
|
3
5
|
status;
|
|
@@ -1091,6 +1093,80 @@ async function fetchNetworkMap(config, options = {}) {
|
|
|
1091
1093
|
...options
|
|
1092
1094
|
});
|
|
1093
1095
|
}
|
|
1096
|
+
var httpUrlNullable = z.string().refine((s) => /^https?:\/\//i.test(s), { message: "must be an http(s) URL" }).nullable();
|
|
1097
|
+
var searchResultCommon = {
|
|
1098
|
+
kind: z.string(),
|
|
1099
|
+
name: z.string(),
|
|
1100
|
+
domain: z.string().nullable(),
|
|
1101
|
+
country: z.string().nullable(),
|
|
1102
|
+
logoUrl: httpUrlNullable,
|
|
1103
|
+
parentName: z.string().nullable()
|
|
1104
|
+
};
|
|
1105
|
+
var EntitySearchResultSchema = z.discriminatedUnion("source", [
|
|
1106
|
+
z.object({
|
|
1107
|
+
source: z.literal("entity"),
|
|
1108
|
+
entityId: z.number().int().positive(),
|
|
1109
|
+
...searchResultCommon
|
|
1110
|
+
}),
|
|
1111
|
+
z.object({
|
|
1112
|
+
source: z.literal("pdl"),
|
|
1113
|
+
pdlId: z.string().min(1),
|
|
1114
|
+
...searchResultCommon
|
|
1115
|
+
})
|
|
1116
|
+
]);
|
|
1117
|
+
var EntitySearchResponseSchema = z.object({
|
|
1118
|
+
results: z.array(EntitySearchResultSchema),
|
|
1119
|
+
hasMore: z.boolean()
|
|
1120
|
+
});
|
|
1121
|
+
z.object({
|
|
1122
|
+
entityId: z.number().int().positive().optional(),
|
|
1123
|
+
pdlId: z.string().min(1).optional()
|
|
1124
|
+
}).refine((v) => v.entityId != null !== (v.pdlId != null), {
|
|
1125
|
+
message: "exactly one of entityId or pdlId is required"
|
|
1126
|
+
});
|
|
1127
|
+
var EntitySelectResponseSchema = z.object({
|
|
1128
|
+
entityId: z.number().int().positive(),
|
|
1129
|
+
slug: z.string(),
|
|
1130
|
+
kind: z.string(),
|
|
1131
|
+
canonicalName: z.string(),
|
|
1132
|
+
domain: z.string().nullable(),
|
|
1133
|
+
entityRef: httpUrlNullable
|
|
1134
|
+
});
|
|
1135
|
+
var EntityImportSearchResponseSchema = z.object({
|
|
1136
|
+
results: z.array(EntitySearchResultSchema)
|
|
1137
|
+
});
|
|
1138
|
+
|
|
1139
|
+
// src/query/fetchers/entities.ts
|
|
1140
|
+
var EMPTY_SEARCH2 = { results: [], hasMore: false };
|
|
1141
|
+
async function fetchEntitySearch(config, query, limit, options = {}) {
|
|
1142
|
+
if (!query.trim()) return EMPTY_SEARCH2;
|
|
1143
|
+
const params = new URLSearchParams({ q: query });
|
|
1144
|
+
if (limit !== void 0) params.set("limit", String(limit));
|
|
1145
|
+
const data = await apiFetch(config, `/api/entities/search?${params.toString()}`, {
|
|
1146
|
+
cache: "no-store",
|
|
1147
|
+
...options
|
|
1148
|
+
});
|
|
1149
|
+
return EntitySearchResponseSchema.parse(data);
|
|
1150
|
+
}
|
|
1151
|
+
async function selectEntity(config, body, options = {}) {
|
|
1152
|
+
const data = await apiFetch(config, "/api/entities/select", {
|
|
1153
|
+
method: "POST",
|
|
1154
|
+
body,
|
|
1155
|
+
credentials: "include",
|
|
1156
|
+
...options
|
|
1157
|
+
});
|
|
1158
|
+
return EntitySelectResponseSchema.parse(data);
|
|
1159
|
+
}
|
|
1160
|
+
async function importSearchEntities(config, query, options = {}) {
|
|
1161
|
+
if (!query.trim()) return [];
|
|
1162
|
+
const data = await apiFetch(config, "/api/entities/import-search", {
|
|
1163
|
+
method: "POST",
|
|
1164
|
+
body: { q: query },
|
|
1165
|
+
credentials: "include",
|
|
1166
|
+
...options
|
|
1167
|
+
});
|
|
1168
|
+
return EntityImportSearchResponseSchema.parse(data).results;
|
|
1169
|
+
}
|
|
1094
1170
|
|
|
1095
1171
|
// src/query/keys.ts
|
|
1096
1172
|
var sifaQueryKeys = {
|
|
@@ -1112,6 +1188,10 @@ var sifaQueryKeys = {
|
|
|
1112
1188
|
canonicalSkills: (query, limit) => ["sifa", "search", "canonical-skills", query, limit],
|
|
1113
1189
|
filters: () => ["sifa", "search", "filters"]
|
|
1114
1190
|
},
|
|
1191
|
+
entity: {
|
|
1192
|
+
all: () => ["sifa", "entity"],
|
|
1193
|
+
search: (query, limit) => ["sifa", "entity", "search", query, limit]
|
|
1194
|
+
},
|
|
1115
1195
|
discovery: {
|
|
1116
1196
|
all: () => ["sifa", "discovery"],
|
|
1117
1197
|
similar: (did, limit) => ["sifa", "discovery", "similar", did, limit],
|
|
@@ -1171,6 +1251,6 @@ var sifaQueryKeys = {
|
|
|
1171
1251
|
}
|
|
1172
1252
|
};
|
|
1173
1253
|
|
|
1174
|
-
export { ApiError, HIDDEN_ITEM_SOURCES, HIDDEN_ITEM_TYPES, QUOTED_POSTS_BATCH_MAX, addFeatureAllowlist, apiFetch, apiFetchOrNull, apiWrite, apiWriteCreate, bulkHideProfileItems, bulkHideStandardPublications, bulkUnhideProfileItems, bulkUnhideStandardPublications, castRoadmapVote, checkAppAccount, checkNetworkMapJobStatus, createEducation, createEndorsement, createExternalAccount, createPosition, createProfileLocation, createReaction, createRecord, createSkill, deleteAccount, deleteAvatarOverride, deleteEducation, deleteExternalAccount, deletePosition, deleteProfileLocation, deleteReaction, deleteRecord, deleteSkill, fetchActivityFeed, fetchActivityTeaser, fetchAppsRegistry, fetchAtFundLink, fetchEndorsementCount, fetchExternalAccounts, fetchFeaturedProfile, fetchFollowing, fetchHeatmapData, fetchHiddenApps, fetchMyRoadmapVotes, fetchNetworkMap, fetchNetworkStreamCount, fetchProfile, fetchReactionStatus, fetchRoadmapVotes, fetchSearchFilters, fetchSearchProfiles, fetchSimilarProfiles, fetchSkillSuggestions, fetchStats, fetchSuggestionCount, fetchSuggestions, followUser, getBlueskySuggestions, getFollowers, getFollowing, getFollowingFeed, getMutuals, hideKeytraceClaim, hideOrcidPublication, hideProfileItem, hideSifaPublication, hideStandardPublication, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, listFeatureAllowlist, refreshOrcidPublications, refreshPds, removeFeatureAllowlist, resetProfile, resolveQuotedPosts, retractRoadmapVote, revealMarqueDomain, searchSkills, setExternalAccountPrimary, setPositionPrimary, sifaQueryKeys, unfollowUser, unhideKeytraceClaim, unhideOrcidPublication, unhideProfileItem, unhideSifaPublication, unhideStandardPublication, unlinkSkillFromPosition, unrevealMarqueDomain, unsetExternalAccountPrimary, unsetPositionPrimary, updateEducation, updateExternalAccount, updatePosition, updateProfileLocation, updateProfileOverride, updateProfileSelf, updateRecord, updateSkill, uploadAvatar, verifyExternalAccount };
|
|
1254
|
+
export { ApiError, HIDDEN_ITEM_SOURCES, HIDDEN_ITEM_TYPES, QUOTED_POSTS_BATCH_MAX, addFeatureAllowlist, apiFetch, apiFetchOrNull, apiWrite, apiWriteCreate, bulkHideProfileItems, bulkHideStandardPublications, bulkUnhideProfileItems, bulkUnhideStandardPublications, castRoadmapVote, checkAppAccount, checkNetworkMapJobStatus, createEducation, createEndorsement, createExternalAccount, createPosition, createProfileLocation, createReaction, createRecord, createSkill, deleteAccount, deleteAvatarOverride, deleteEducation, deleteExternalAccount, deletePosition, deleteProfileLocation, deleteReaction, deleteRecord, deleteSkill, fetchActivityFeed, fetchActivityTeaser, fetchAppsRegistry, fetchAtFundLink, fetchEndorsementCount, fetchEntitySearch, fetchExternalAccounts, fetchFeaturedProfile, fetchFollowing, fetchHeatmapData, fetchHiddenApps, fetchMyRoadmapVotes, fetchNetworkMap, fetchNetworkStreamCount, fetchProfile, fetchReactionStatus, fetchRoadmapVotes, fetchSearchFilters, fetchSearchProfiles, fetchSimilarProfiles, fetchSkillSuggestions, fetchStats, fetchSuggestionCount, fetchSuggestions, followUser, getBlueskySuggestions, getFollowers, getFollowing, getFollowingFeed, getMutuals, hideKeytraceClaim, hideOrcidPublication, hideProfileItem, hideSifaPublication, hideStandardPublication, importSearchEntities, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, listFeatureAllowlist, refreshOrcidPublications, refreshPds, removeFeatureAllowlist, resetProfile, resolveQuotedPosts, retractRoadmapVote, revealMarqueDomain, searchSkills, selectEntity, setExternalAccountPrimary, setPositionPrimary, sifaQueryKeys, unfollowUser, unhideKeytraceClaim, unhideOrcidPublication, unhideProfileItem, unhideSifaPublication, unhideStandardPublication, unlinkSkillFromPosition, unrevealMarqueDomain, unsetExternalAccountPrimary, unsetPositionPrimary, updateEducation, updateExternalAccount, updatePosition, updateProfileLocation, updateProfileOverride, updateProfileSelf, updateRecord, updateSkill, uploadAvatar, verifyExternalAccount };
|
|
1175
1255
|
//# sourceMappingURL=index.js.map
|
|
1176
1256
|
//# sourceMappingURL=index.js.map
|