@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.
Files changed (38) hide show
  1. package/README.md +43 -0
  2. package/dist/{adult-content-BpZD_3ow.d.cts → adult-content-C0XGPU5A.d.cts} +6 -0
  3. package/dist/{adult-content-BpZD_3ow.d.ts → adult-content-C0XGPU5A.d.ts} +6 -0
  4. package/dist/{feed-DHTy7fUN.d.cts → feed-BaHtJXYR.d.cts} +98 -1
  5. package/dist/{feed-DHTy7fUN.d.ts → feed-BaHtJXYR.d.ts} +98 -1
  6. package/dist/index.cjs +105 -1
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +28 -4
  9. package/dist/index.d.ts +28 -4
  10. package/dist/index.js +97 -2
  11. package/dist/index.js.map +1 -1
  12. package/dist/{keys-DuICaiIq.d.ts → keys-Cdu3x0cr.d.ts} +7 -3
  13. package/dist/{keys-K8kCuA5J.d.cts → keys-DdIxFB-C.d.cts} +7 -3
  14. package/dist/query/fetchers/index.cjs +83 -0
  15. package/dist/query/fetchers/index.cjs.map +1 -1
  16. package/dist/query/fetchers/index.d.cts +23 -5
  17. package/dist/query/fetchers/index.d.ts +23 -5
  18. package/dist/query/fetchers/index.js +81 -1
  19. package/dist/query/fetchers/index.js.map +1 -1
  20. package/dist/query/hooks/index.cjs +118 -0
  21. package/dist/query/hooks/index.cjs.map +1 -1
  22. package/dist/query/hooks/index.d.cts +74 -5
  23. package/dist/query/hooks/index.d.ts +74 -5
  24. package/dist/query/hooks/index.js +116 -2
  25. package/dist/query/hooks/index.js.map +1 -1
  26. package/dist/query/index.cjs +119 -0
  27. package/dist/query/index.cjs.map +1 -1
  28. package/dist/query/index.d.cts +6 -6
  29. package/dist/query/index.d.ts +6 -6
  30. package/dist/query/index.js +114 -2
  31. package/dist/query/index.js.map +1 -1
  32. package/dist/schemas/index.cjs +50 -0
  33. package/dist/schemas/index.cjs.map +1 -1
  34. package/dist/schemas/index.d.cts +2 -1
  35. package/dist/schemas/index.d.ts +2 -1
  36. package/dist/schemas/index.js +46 -1
  37. package/dist/schemas/index.js.map +1 -1
  38. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-BpZD_3ow.js';
2
- import { F as FollowFeedPage, a as FollowProfileItem, b as FeatureAllowlistEntry, c as FeatureFlag } from './feed-DHTy7fUN.js';
1
+ import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-C0XGPU5A.js';
2
+ import { F as FollowFeedPage, a as FollowProfileItem, b as FeatureAllowlistEntry, c as FeatureFlag } from './feed-BaHtJXYR.js';
3
3
 
4
4
  /**
5
5
  * Foundation HTTP client for talking to the Sifa AppView.
@@ -1091,6 +1091,10 @@ declare const sifaQueryKeys: {
1091
1091
  readonly canonicalSkills: (query: string, limit: number) => readonly ["sifa", "search", "canonical-skills", string, number];
1092
1092
  readonly filters: () => readonly ["sifa", "search", "filters"];
1093
1093
  };
1094
+ readonly entity: {
1095
+ readonly all: () => readonly ["sifa", "entity"];
1096
+ readonly search: (query: string, limit: number) => readonly ["sifa", "entity", "search", string, number];
1097
+ };
1094
1098
  readonly discovery: {
1095
1099
  readonly all: () => readonly ["sifa", "discovery"];
1096
1100
  readonly similar: (did: string, limit: number) => readonly ["sifa", "discovery", "similar", string, number];
@@ -1149,6 +1153,6 @@ declare const sifaQueryKeys: {
1149
1153
  readonly contentLabels: () => readonly ["sifa", "bsky-preferences", "content-labels"];
1150
1154
  };
1151
1155
  };
1152
- 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.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | 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.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.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.endorsement.all> | ReturnType<typeof sifaQueryKeys.endorsement.count> | 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.roadmap.all> | ReturnType<typeof sifaQueryKeys.roadmap.votes> | ReturnType<typeof sifaQueryKeys.roadmap.myVotes> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels>;
1156
+ 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.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | 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.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.endorsement.all> | ReturnType<typeof sifaQueryKeys.endorsement.count> | 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.roadmap.all> | ReturnType<typeof sifaQueryKeys.roadmap.votes> | ReturnType<typeof sifaQueryKeys.roadmap.myVotes> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels>;
1153
1157
 
1154
1158
  export { type QuotedPostResult as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CastRoadmapVoteResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FollowUserResult as G, type FollowingResponse as H, HIDDEN_ITEM_SOURCES as I, HIDDEN_ITEM_TYPES as J, type HeatmapDay as K, type HeatmapResponse as L, type HiddenApp as M, type HiddenItemSource as N, type HiddenItemType as O, type HideProfileItemInput as P, type ListFeatureAllowlistOptions as Q, type ProfileIndustryInput as R, type SifaApiConfig as S, type ProfileLocationAddress as T, type ProfileLocationInput as U, type ProfileSearchResult as V, type WriteResult as W, type ProfileSelfLocation as X, QUOTED_POSTS_BATCH_MAX as Y, type QuotedPostAuthor as Z, type QuotedPostImage as _, type AccountCheckResult as a, getFollowers as a$, type QuotedPostView as a0, type ReactionError as a1, type ReactionResult as a2, type ReactionStatus as a3, type RefreshOrcidPublicationsResult as a4, type RefreshPdsResult as a5, type ResolveQuotedPostsOptions as a6, type RoadmapVoteError as a7, type RoadmapVoteResult as a8, type RoadmapVoter as a9, createProfileLocation as aA, createReaction as aB, deleteAccount as aC, deleteAvatarOverride as aD, deleteExternalAccount as aE, deleteProfileLocation as aF, deleteReaction as aG, fetchActivityFeed as aH, fetchActivityTeaser as aI, fetchAppsRegistry as aJ, fetchExternalAccounts as aK, fetchFeaturedProfile as aL, fetchFollowing as aM, fetchHeatmapData as aN, fetchHiddenApps as aO, fetchMyRoadmapVotes as aP, fetchReactionStatus as aQ, fetchRoadmapVotes as aR, fetchSearchFilters as aS, fetchSearchProfiles as aT, fetchSimilarProfiles as aU, fetchSkillSuggestions as aV, fetchStats as aW, fetchSuggestionCount as aX, fetchSuggestions as aY, followUser as aZ, getBlueskySuggestions as a_, type RoadmapVotesResponse as aa, type SearchFilters as ab, type SearchResponse as ac, type SifaQueryKey as ad, type SimilarProfile as ae, type SkillSearchResult as af, type StatsResponse as ag, type SuggestionProfile as ah, type SuggestionsResponse as ai, type UpdateProfileOverrideInput as aj, type UpdateProfileSelfInput as ak, type UploadAvatarResult as al, type VerifyExternalAccountResult as am, addFeatureAllowlist as an, apiFetch as ao, apiFetchOrNull as ap, apiWrite as aq, apiWriteCreate as ar, bulkHideProfileItems as as, bulkHideStandardPublications as at, bulkUnhideProfileItems as au, bulkUnhideStandardPublications as av, castRoadmapVote as aw, checkAppAccount as ax, createEndorsement as ay, createExternalAccount as az, type ActivityFeedResponse as b, getFollowing as b0, getFollowingFeed as b1, getMutuals as b2, hideOrcidPublication as b3, hideProfileItem as b4, hideSifaPublication as b5, hideStandardPublication as b6, listFeatureAllowlist as b7, refreshOrcidPublications as b8, refreshPds as b9, removeFeatureAllowlist as ba, resetProfile as bb, resolveQuotedPosts as bc, retractRoadmapVote as bd, searchSkills as be, setExternalAccountPrimary as bf, unfollowUser as bg, unhideOrcidPublication as bh, unhideProfileItem as bi, unhideSifaPublication as bj, unhideStandardPublication as bk, unsetExternalAccountPrimary as bl, updateExternalAccount as bm, updateProfileLocation as bn, updateProfileOverride as bo, updateProfileSelf as bp, uploadAvatar as bq, verifyExternalAccount as br, type ActivityItem as c, type ActivityItemLinkHealth as d, type ActivityTeaserResponse as e, ApiError as f, type AppRegistryEntry as g, type CheckAppAccountOptions as h, type CreateExternalAccountResult as i, type CreateResult as j, type ExternalAccountInput as k, type FeaturedProfile as l, type FetchActivityFeedOptions as m, type FetchActivityTeaserOptions as n, type FetchFollowListOptions as o, type FetchFollowProfilePageOptions as p, type FetchFollowingFeedOptions as q, type FetchHiddenAppsOptions as r, sifaQueryKeys as s, type FetchMyRoadmapVotesOptions as t, type FetchReactionStatusOptions as u, type FetchSuggestionsOptions as v, type FilterOptions as w, type FollowListPage as x, type FollowProfile as y, type FollowProfilePageResponse as z };
@@ -1,5 +1,5 @@
1
- import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-BpZD_3ow.cjs';
2
- import { F as FollowFeedPage, a as FollowProfileItem, b as FeatureAllowlistEntry, c as FeatureFlag } from './feed-DHTy7fUN.cjs';
1
+ import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-C0XGPU5A.cjs';
2
+ import { F as FollowFeedPage, a as FollowProfileItem, b as FeatureAllowlistEntry, c as FeatureFlag } from './feed-BaHtJXYR.cjs';
3
3
 
4
4
  /**
5
5
  * Foundation HTTP client for talking to the Sifa AppView.
@@ -1091,6 +1091,10 @@ declare const sifaQueryKeys: {
1091
1091
  readonly canonicalSkills: (query: string, limit: number) => readonly ["sifa", "search", "canonical-skills", string, number];
1092
1092
  readonly filters: () => readonly ["sifa", "search", "filters"];
1093
1093
  };
1094
+ readonly entity: {
1095
+ readonly all: () => readonly ["sifa", "entity"];
1096
+ readonly search: (query: string, limit: number) => readonly ["sifa", "entity", "search", string, number];
1097
+ };
1094
1098
  readonly discovery: {
1095
1099
  readonly all: () => readonly ["sifa", "discovery"];
1096
1100
  readonly similar: (did: string, limit: number) => readonly ["sifa", "discovery", "similar", string, number];
@@ -1149,6 +1153,6 @@ declare const sifaQueryKeys: {
1149
1153
  readonly contentLabels: () => readonly ["sifa", "bsky-preferences", "content-labels"];
1150
1154
  };
1151
1155
  };
1152
- 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.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | 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.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.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.endorsement.all> | ReturnType<typeof sifaQueryKeys.endorsement.count> | 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.roadmap.all> | ReturnType<typeof sifaQueryKeys.roadmap.votes> | ReturnType<typeof sifaQueryKeys.roadmap.myVotes> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels>;
1156
+ 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.position.all> | ReturnType<typeof sifaQueryKeys.position.byOwner> | 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.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.endorsement.all> | ReturnType<typeof sifaQueryKeys.endorsement.count> | 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.roadmap.all> | ReturnType<typeof sifaQueryKeys.roadmap.votes> | ReturnType<typeof sifaQueryKeys.roadmap.myVotes> | ReturnType<typeof sifaQueryKeys.bskyPreferences.all> | ReturnType<typeof sifaQueryKeys.bskyPreferences.contentLabels>;
1153
1157
 
1154
1158
  export { type QuotedPostResult as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CastRoadmapVoteResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FollowUserResult as G, type FollowingResponse as H, HIDDEN_ITEM_SOURCES as I, HIDDEN_ITEM_TYPES as J, type HeatmapDay as K, type HeatmapResponse as L, type HiddenApp as M, type HiddenItemSource as N, type HiddenItemType as O, type HideProfileItemInput as P, type ListFeatureAllowlistOptions as Q, type ProfileIndustryInput as R, type SifaApiConfig as S, type ProfileLocationAddress as T, type ProfileLocationInput as U, type ProfileSearchResult as V, type WriteResult as W, type ProfileSelfLocation as X, QUOTED_POSTS_BATCH_MAX as Y, type QuotedPostAuthor as Z, type QuotedPostImage as _, type AccountCheckResult as a, getFollowers as a$, type QuotedPostView as a0, type ReactionError as a1, type ReactionResult as a2, type ReactionStatus as a3, type RefreshOrcidPublicationsResult as a4, type RefreshPdsResult as a5, type ResolveQuotedPostsOptions as a6, type RoadmapVoteError as a7, type RoadmapVoteResult as a8, type RoadmapVoter as a9, createProfileLocation as aA, createReaction as aB, deleteAccount as aC, deleteAvatarOverride as aD, deleteExternalAccount as aE, deleteProfileLocation as aF, deleteReaction as aG, fetchActivityFeed as aH, fetchActivityTeaser as aI, fetchAppsRegistry as aJ, fetchExternalAccounts as aK, fetchFeaturedProfile as aL, fetchFollowing as aM, fetchHeatmapData as aN, fetchHiddenApps as aO, fetchMyRoadmapVotes as aP, fetchReactionStatus as aQ, fetchRoadmapVotes as aR, fetchSearchFilters as aS, fetchSearchProfiles as aT, fetchSimilarProfiles as aU, fetchSkillSuggestions as aV, fetchStats as aW, fetchSuggestionCount as aX, fetchSuggestions as aY, followUser as aZ, getBlueskySuggestions as a_, type RoadmapVotesResponse as aa, type SearchFilters as ab, type SearchResponse as ac, type SifaQueryKey as ad, type SimilarProfile as ae, type SkillSearchResult as af, type StatsResponse as ag, type SuggestionProfile as ah, type SuggestionsResponse as ai, type UpdateProfileOverrideInput as aj, type UpdateProfileSelfInput as ak, type UploadAvatarResult as al, type VerifyExternalAccountResult as am, addFeatureAllowlist as an, apiFetch as ao, apiFetchOrNull as ap, apiWrite as aq, apiWriteCreate as ar, bulkHideProfileItems as as, bulkHideStandardPublications as at, bulkUnhideProfileItems as au, bulkUnhideStandardPublications as av, castRoadmapVote as aw, checkAppAccount as ax, createEndorsement as ay, createExternalAccount as az, type ActivityFeedResponse as b, getFollowing as b0, getFollowingFeed as b1, getMutuals as b2, hideOrcidPublication as b3, hideProfileItem as b4, hideSifaPublication as b5, hideStandardPublication as b6, listFeatureAllowlist as b7, refreshOrcidPublications as b8, refreshPds as b9, removeFeatureAllowlist as ba, resetProfile as bb, resolveQuotedPosts as bc, retractRoadmapVote as bd, searchSkills as be, setExternalAccountPrimary as bf, unfollowUser as bg, unhideOrcidPublication as bh, unhideProfileItem as bi, unhideSifaPublication as bj, unhideStandardPublication as bk, unsetExternalAccountPrimary as bl, updateExternalAccount as bm, updateProfileLocation as bn, updateProfileOverride as bo, updateProfileSelf as bp, uploadAvatar as bq, verifyExternalAccount as br, type ActivityItem as c, type ActivityItemLinkHealth as d, type ActivityTeaserResponse as e, ApiError as f, type AppRegistryEntry as g, type CheckAppAccountOptions as h, type CreateExternalAccountResult as i, type CreateResult as j, type ExternalAccountInput as k, type FeaturedProfile as l, type FetchActivityFeedOptions as m, type FetchActivityTeaserOptions as n, type FetchFollowListOptions as o, type FetchFollowProfilePageOptions as p, type FetchFollowingFeedOptions as q, type FetchHiddenAppsOptions as r, sifaQueryKeys as s, type FetchMyRoadmapVotesOptions as t, type FetchReactionStatusOptions as u, type FetchSuggestionsOptions as v, type FilterOptions as w, type FollowListPage as x, type FollowProfile as y, type FollowProfilePageResponse as z };
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var zod = require('zod');
4
+
3
5
  // src/query/client.ts
4
6
  var ApiError = class extends Error {
5
7
  status;
@@ -1093,6 +1095,80 @@ async function fetchNetworkMap(config, options = {}) {
1093
1095
  ...options
1094
1096
  });
1095
1097
  }
1098
+ var httpUrlNullable = zod.z.string().refine((s) => /^https?:\/\//i.test(s), { message: "must be an http(s) URL" }).nullable();
1099
+ var searchResultCommon = {
1100
+ kind: zod.z.string(),
1101
+ name: zod.z.string(),
1102
+ domain: zod.z.string().nullable(),
1103
+ country: zod.z.string().nullable(),
1104
+ logoUrl: httpUrlNullable,
1105
+ parentName: zod.z.string().nullable()
1106
+ };
1107
+ var EntitySearchResultSchema = zod.z.discriminatedUnion("source", [
1108
+ zod.z.object({
1109
+ source: zod.z.literal("entity"),
1110
+ entityId: zod.z.number().int().positive(),
1111
+ ...searchResultCommon
1112
+ }),
1113
+ zod.z.object({
1114
+ source: zod.z.literal("pdl"),
1115
+ pdlId: zod.z.string().min(1),
1116
+ ...searchResultCommon
1117
+ })
1118
+ ]);
1119
+ var EntitySearchResponseSchema = zod.z.object({
1120
+ results: zod.z.array(EntitySearchResultSchema),
1121
+ hasMore: zod.z.boolean()
1122
+ });
1123
+ zod.z.object({
1124
+ entityId: zod.z.number().int().positive().optional(),
1125
+ pdlId: zod.z.string().min(1).optional()
1126
+ }).refine((v) => v.entityId != null !== (v.pdlId != null), {
1127
+ message: "exactly one of entityId or pdlId is required"
1128
+ });
1129
+ var EntitySelectResponseSchema = zod.z.object({
1130
+ entityId: zod.z.number().int().positive(),
1131
+ slug: zod.z.string(),
1132
+ kind: zod.z.string(),
1133
+ canonicalName: zod.z.string(),
1134
+ domain: zod.z.string().nullable(),
1135
+ entityRef: httpUrlNullable
1136
+ });
1137
+ var EntityImportSearchResponseSchema = zod.z.object({
1138
+ results: zod.z.array(EntitySearchResultSchema)
1139
+ });
1140
+
1141
+ // src/query/fetchers/entities.ts
1142
+ var EMPTY_SEARCH2 = { results: [], hasMore: false };
1143
+ async function fetchEntitySearch(config, query, limit, options = {}) {
1144
+ if (!query.trim()) return EMPTY_SEARCH2;
1145
+ const params = new URLSearchParams({ q: query });
1146
+ if (limit !== void 0) params.set("limit", String(limit));
1147
+ const data = await apiFetch(config, `/api/entities/search?${params.toString()}`, {
1148
+ cache: "no-store",
1149
+ ...options
1150
+ });
1151
+ return EntitySearchResponseSchema.parse(data);
1152
+ }
1153
+ async function selectEntity(config, body, options = {}) {
1154
+ const data = await apiFetch(config, "/api/entities/select", {
1155
+ method: "POST",
1156
+ body,
1157
+ credentials: "include",
1158
+ ...options
1159
+ });
1160
+ return EntitySelectResponseSchema.parse(data);
1161
+ }
1162
+ async function importSearchEntities(config, query, options = {}) {
1163
+ if (!query.trim()) return [];
1164
+ const data = await apiFetch(config, "/api/entities/import-search", {
1165
+ method: "POST",
1166
+ body: { q: query },
1167
+ credentials: "include",
1168
+ ...options
1169
+ });
1170
+ return EntityImportSearchResponseSchema.parse(data).results;
1171
+ }
1096
1172
 
1097
1173
  // src/query/keys.ts
1098
1174
  var sifaQueryKeys = {
@@ -1114,6 +1190,10 @@ var sifaQueryKeys = {
1114
1190
  canonicalSkills: (query, limit) => ["sifa", "search", "canonical-skills", query, limit],
1115
1191
  filters: () => ["sifa", "search", "filters"]
1116
1192
  },
1193
+ entity: {
1194
+ all: () => ["sifa", "entity"],
1195
+ search: (query, limit) => ["sifa", "entity", "search", query, limit]
1196
+ },
1117
1197
  discovery: {
1118
1198
  all: () => ["sifa", "discovery"],
1119
1199
  similar: (did, limit) => ["sifa", "discovery", "similar", did, limit],
@@ -1211,6 +1291,7 @@ exports.fetchActivityTeaser = fetchActivityTeaser;
1211
1291
  exports.fetchAppsRegistry = fetchAppsRegistry;
1212
1292
  exports.fetchAtFundLink = fetchAtFundLink;
1213
1293
  exports.fetchEndorsementCount = fetchEndorsementCount;
1294
+ exports.fetchEntitySearch = fetchEntitySearch;
1214
1295
  exports.fetchExternalAccounts = fetchExternalAccounts;
1215
1296
  exports.fetchFeaturedProfile = fetchFeaturedProfile;
1216
1297
  exports.fetchFollowing = fetchFollowing;
@@ -1240,6 +1321,7 @@ exports.hideOrcidPublication = hideOrcidPublication;
1240
1321
  exports.hideProfileItem = hideProfileItem;
1241
1322
  exports.hideSifaPublication = hideSifaPublication;
1242
1323
  exports.hideStandardPublication = hideStandardPublication;
1324
+ exports.importSearchEntities = importSearchEntities;
1243
1325
  exports.initiateNetworkMapGeneration = initiateNetworkMapGeneration;
1244
1326
  exports.isNetworkMapResponse = isNetworkMapResponse;
1245
1327
  exports.linkSkillToPosition = linkSkillToPosition;
@@ -1252,6 +1334,7 @@ exports.resolveQuotedPosts = resolveQuotedPosts;
1252
1334
  exports.retractRoadmapVote = retractRoadmapVote;
1253
1335
  exports.revealMarqueDomain = revealMarqueDomain;
1254
1336
  exports.searchSkills = searchSkills;
1337
+ exports.selectEntity = selectEntity;
1255
1338
  exports.setExternalAccountPrimary = setExternalAccountPrimary;
1256
1339
  exports.setPositionPrimary = setPositionPrimary;
1257
1340
  exports.sifaQueryKeys = sifaQueryKeys;