@singi-labs/sifa-sdk 0.9.11 → 0.9.12

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.
@@ -716,6 +716,19 @@ interface ResolveQuotedPostsOptions extends ApiFetchOptions {
716
716
  */
717
717
  declare function resolveQuotedPosts(config: SifaApiConfig, uris: string[], options?: ResolveQuotedPostsOptions): Promise<Record<string, QuotedPostResult>>;
718
718
 
719
+ /**
720
+ * Reachability of an activity card's external destination, as reported by
721
+ * sifa-api's `/api/activity` enrichment (see sifa-api `url-health-checker`).
722
+ *
723
+ * ok -- last HEAD returned 2xx/3xx
724
+ * broken -- confirmed dead (>=2 consecutive 4xx, or >=5 consecutive 5xx)
725
+ * unverifiable -- 403/429/network error; anti-bot or rate-limited, NOT dead
726
+ * unknown -- newly seen, not yet checked
727
+ *
728
+ * Consumers should only suppress UI on `'broken'`. All other values
729
+ * (including missing) mean "render normally".
730
+ */
731
+ type ActivityItemLinkHealth = 'ok' | 'broken' | 'unverifiable' | 'unknown';
719
732
  interface HeatmapDay {
720
733
  date: string;
721
734
  total: number;
@@ -754,6 +767,12 @@ interface ActivityItem {
754
767
  * Mutually exclusive with `quotedPost`.
755
768
  */
756
769
  quotedPostUri?: string;
770
+ /**
771
+ * Reachability of the card's external destination as last checked by
772
+ * sifa-api. Undefined for legacy responses; treat as 'unknown'.
773
+ * See {@link ActivityItemLinkHealth}.
774
+ */
775
+ linkHealth?: ActivityItemLinkHealth;
757
776
  }
758
777
  interface ActivityTeaserResponse {
759
778
  items: ActivityItem[];
@@ -1126,4 +1145,4 @@ declare const sifaQueryKeys: {
1126
1145
  };
1127
1146
  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.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>;
1128
1147
 
1129
- export { type AccountCheckResult, type ActivityFeedResponse, type ActivityItem, type ActivityTeaserResponse, ApiError, type ApiFetchOptions, type AppRegistryEntry, type BulkHideProfileItemInput, type CheckAppAccountOptions, type CreateExternalAccountResult, type CreateResult, type DeleteAccountResult, type EndorsementInput, type ExternalAccountInput, type FeaturedProfile, type FetchActivityFeedOptions, type FetchActivityTeaserOptions, type FetchHiddenAppsOptions, type FetchMyRoadmapVotesOptions, type FetchNetworkStreamCountOptions, type FetchReactionStatusOptions, type FetchSuggestionsOptions, type FilterOptions, type FollowProfile, type FollowingResponse, HIDDEN_ITEM_SOURCES, HIDDEN_ITEM_TYPES, type HeatmapDay, type HeatmapResponse, type HiddenApp, type HiddenItemSource, type HiddenItemType, type HideProfileItemInput, type NetworkMapEdge, type NetworkMapGenerationJob, type NetworkMapGraphData, type NetworkMapNode, type NetworkMapPendingJob, type NetworkMapResponse, type ProfileIndustryInput, type ProfileLocationAddress, type ProfileLocationInput, type ProfileSearchResult, type ProfileSelfLocation, QUOTED_POSTS_BATCH_MAX, type QuotedPostAuthor, type QuotedPostImage, type QuotedPostResult, type QuotedPostView, type ReactionError, type ReactionResult, type ReactionStatus, type RefreshOrcidPublicationsResult, type RefreshPdsResult, type ResolveQuotedPostsOptions, type RoadmapVoter, type RoadmapVotesResponse, type SearchFilters, type SearchResponse, type SifaApiConfig, type SifaQueryKey, type SimilarProfile, type SkillSearchResult, type StatsResponse, type SuggestionProfile, type SuggestionsResponse, type UpdateProfileOverrideInput, type UpdateProfileSelfInput, type UploadAvatarResult, type VerifyExternalAccountResult, type WriteResult, 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, hideKeytraceClaim, hideOrcidPublication, hideProfileItem, hideSifaPublication, hideStandardPublication, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, refreshOrcidPublications, refreshPds, resetProfile, resolveQuotedPosts, retractRoadmapVote, searchSkills, setExternalAccountPrimary, setPositionPrimary, sifaQueryKeys, unhideKeytraceClaim, unhideOrcidPublication, unhideProfileItem, unhideSifaPublication, unhideStandardPublication, unlinkSkillFromPosition, unsetExternalAccountPrimary, unsetPositionPrimary, updateEducation, updateExternalAccount, updatePosition, updateProfileLocation, updateProfileOverride, updateProfileSelf, updateRecord, updateSkill, uploadAvatar, verifyExternalAccount };
1148
+ export { type AccountCheckResult, type ActivityFeedResponse, type ActivityItem, type ActivityItemLinkHealth, type ActivityTeaserResponse, ApiError, type ApiFetchOptions, type AppRegistryEntry, type BulkHideProfileItemInput, type CheckAppAccountOptions, type CreateExternalAccountResult, type CreateResult, type DeleteAccountResult, type EndorsementInput, type ExternalAccountInput, type FeaturedProfile, type FetchActivityFeedOptions, type FetchActivityTeaserOptions, type FetchHiddenAppsOptions, type FetchMyRoadmapVotesOptions, type FetchNetworkStreamCountOptions, type FetchReactionStatusOptions, type FetchSuggestionsOptions, type FilterOptions, type FollowProfile, type FollowingResponse, HIDDEN_ITEM_SOURCES, HIDDEN_ITEM_TYPES, type HeatmapDay, type HeatmapResponse, type HiddenApp, type HiddenItemSource, type HiddenItemType, type HideProfileItemInput, type NetworkMapEdge, type NetworkMapGenerationJob, type NetworkMapGraphData, type NetworkMapNode, type NetworkMapPendingJob, type NetworkMapResponse, type ProfileIndustryInput, type ProfileLocationAddress, type ProfileLocationInput, type ProfileSearchResult, type ProfileSelfLocation, QUOTED_POSTS_BATCH_MAX, type QuotedPostAuthor, type QuotedPostImage, type QuotedPostResult, type QuotedPostView, type ReactionError, type ReactionResult, type ReactionStatus, type RefreshOrcidPublicationsResult, type RefreshPdsResult, type ResolveQuotedPostsOptions, type RoadmapVoter, type RoadmapVotesResponse, type SearchFilters, type SearchResponse, type SifaApiConfig, type SifaQueryKey, type SimilarProfile, type SkillSearchResult, type StatsResponse, type SuggestionProfile, type SuggestionsResponse, type UpdateProfileOverrideInput, type UpdateProfileSelfInput, type UploadAvatarResult, type VerifyExternalAccountResult, type WriteResult, 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, hideKeytraceClaim, hideOrcidPublication, hideProfileItem, hideSifaPublication, hideStandardPublication, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, refreshOrcidPublications, refreshPds, resetProfile, resolveQuotedPosts, retractRoadmapVote, searchSkills, setExternalAccountPrimary, setPositionPrimary, sifaQueryKeys, unhideKeytraceClaim, unhideOrcidPublication, unhideProfileItem, unhideSifaPublication, unhideStandardPublication, unlinkSkillFromPosition, unsetExternalAccountPrimary, unsetPositionPrimary, updateEducation, updateExternalAccount, updatePosition, updateProfileLocation, updateProfileOverride, updateProfileSelf, updateRecord, updateSkill, uploadAvatar, verifyExternalAccount };
@@ -716,6 +716,19 @@ interface ResolveQuotedPostsOptions extends ApiFetchOptions {
716
716
  */
717
717
  declare function resolveQuotedPosts(config: SifaApiConfig, uris: string[], options?: ResolveQuotedPostsOptions): Promise<Record<string, QuotedPostResult>>;
718
718
 
719
+ /**
720
+ * Reachability of an activity card's external destination, as reported by
721
+ * sifa-api's `/api/activity` enrichment (see sifa-api `url-health-checker`).
722
+ *
723
+ * ok -- last HEAD returned 2xx/3xx
724
+ * broken -- confirmed dead (>=2 consecutive 4xx, or >=5 consecutive 5xx)
725
+ * unverifiable -- 403/429/network error; anti-bot or rate-limited, NOT dead
726
+ * unknown -- newly seen, not yet checked
727
+ *
728
+ * Consumers should only suppress UI on `'broken'`. All other values
729
+ * (including missing) mean "render normally".
730
+ */
731
+ type ActivityItemLinkHealth = 'ok' | 'broken' | 'unverifiable' | 'unknown';
719
732
  interface HeatmapDay {
720
733
  date: string;
721
734
  total: number;
@@ -754,6 +767,12 @@ interface ActivityItem {
754
767
  * Mutually exclusive with `quotedPost`.
755
768
  */
756
769
  quotedPostUri?: string;
770
+ /**
771
+ * Reachability of the card's external destination as last checked by
772
+ * sifa-api. Undefined for legacy responses; treat as 'unknown'.
773
+ * See {@link ActivityItemLinkHealth}.
774
+ */
775
+ linkHealth?: ActivityItemLinkHealth;
757
776
  }
758
777
  interface ActivityTeaserResponse {
759
778
  items: ActivityItem[];
@@ -1126,4 +1145,4 @@ declare const sifaQueryKeys: {
1126
1145
  };
1127
1146
  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.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>;
1128
1147
 
1129
- export { type AccountCheckResult, type ActivityFeedResponse, type ActivityItem, type ActivityTeaserResponse, ApiError, type ApiFetchOptions, type AppRegistryEntry, type BulkHideProfileItemInput, type CheckAppAccountOptions, type CreateExternalAccountResult, type CreateResult, type DeleteAccountResult, type EndorsementInput, type ExternalAccountInput, type FeaturedProfile, type FetchActivityFeedOptions, type FetchActivityTeaserOptions, type FetchHiddenAppsOptions, type FetchMyRoadmapVotesOptions, type FetchNetworkStreamCountOptions, type FetchReactionStatusOptions, type FetchSuggestionsOptions, type FilterOptions, type FollowProfile, type FollowingResponse, HIDDEN_ITEM_SOURCES, HIDDEN_ITEM_TYPES, type HeatmapDay, type HeatmapResponse, type HiddenApp, type HiddenItemSource, type HiddenItemType, type HideProfileItemInput, type NetworkMapEdge, type NetworkMapGenerationJob, type NetworkMapGraphData, type NetworkMapNode, type NetworkMapPendingJob, type NetworkMapResponse, type ProfileIndustryInput, type ProfileLocationAddress, type ProfileLocationInput, type ProfileSearchResult, type ProfileSelfLocation, QUOTED_POSTS_BATCH_MAX, type QuotedPostAuthor, type QuotedPostImage, type QuotedPostResult, type QuotedPostView, type ReactionError, type ReactionResult, type ReactionStatus, type RefreshOrcidPublicationsResult, type RefreshPdsResult, type ResolveQuotedPostsOptions, type RoadmapVoter, type RoadmapVotesResponse, type SearchFilters, type SearchResponse, type SifaApiConfig, type SifaQueryKey, type SimilarProfile, type SkillSearchResult, type StatsResponse, type SuggestionProfile, type SuggestionsResponse, type UpdateProfileOverrideInput, type UpdateProfileSelfInput, type UploadAvatarResult, type VerifyExternalAccountResult, type WriteResult, 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, hideKeytraceClaim, hideOrcidPublication, hideProfileItem, hideSifaPublication, hideStandardPublication, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, refreshOrcidPublications, refreshPds, resetProfile, resolveQuotedPosts, retractRoadmapVote, searchSkills, setExternalAccountPrimary, setPositionPrimary, sifaQueryKeys, unhideKeytraceClaim, unhideOrcidPublication, unhideProfileItem, unhideSifaPublication, unhideStandardPublication, unlinkSkillFromPosition, unsetExternalAccountPrimary, unsetPositionPrimary, updateEducation, updateExternalAccount, updatePosition, updateProfileLocation, updateProfileOverride, updateProfileSelf, updateRecord, updateSkill, uploadAvatar, verifyExternalAccount };
1148
+ export { type AccountCheckResult, type ActivityFeedResponse, type ActivityItem, type ActivityItemLinkHealth, type ActivityTeaserResponse, ApiError, type ApiFetchOptions, type AppRegistryEntry, type BulkHideProfileItemInput, type CheckAppAccountOptions, type CreateExternalAccountResult, type CreateResult, type DeleteAccountResult, type EndorsementInput, type ExternalAccountInput, type FeaturedProfile, type FetchActivityFeedOptions, type FetchActivityTeaserOptions, type FetchHiddenAppsOptions, type FetchMyRoadmapVotesOptions, type FetchNetworkStreamCountOptions, type FetchReactionStatusOptions, type FetchSuggestionsOptions, type FilterOptions, type FollowProfile, type FollowingResponse, HIDDEN_ITEM_SOURCES, HIDDEN_ITEM_TYPES, type HeatmapDay, type HeatmapResponse, type HiddenApp, type HiddenItemSource, type HiddenItemType, type HideProfileItemInput, type NetworkMapEdge, type NetworkMapGenerationJob, type NetworkMapGraphData, type NetworkMapNode, type NetworkMapPendingJob, type NetworkMapResponse, type ProfileIndustryInput, type ProfileLocationAddress, type ProfileLocationInput, type ProfileSearchResult, type ProfileSelfLocation, QUOTED_POSTS_BATCH_MAX, type QuotedPostAuthor, type QuotedPostImage, type QuotedPostResult, type QuotedPostView, type ReactionError, type ReactionResult, type ReactionStatus, type RefreshOrcidPublicationsResult, type RefreshPdsResult, type ResolveQuotedPostsOptions, type RoadmapVoter, type RoadmapVotesResponse, type SearchFilters, type SearchResponse, type SifaApiConfig, type SifaQueryKey, type SimilarProfile, type SkillSearchResult, type StatsResponse, type SuggestionProfile, type SuggestionsResponse, type UpdateProfileOverrideInput, type UpdateProfileSelfInput, type UploadAvatarResult, type VerifyExternalAccountResult, type WriteResult, 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, hideKeytraceClaim, hideOrcidPublication, hideProfileItem, hideSifaPublication, hideStandardPublication, initiateNetworkMapGeneration, isNetworkMapResponse, linkSkillToPosition, refreshOrcidPublications, refreshPds, resetProfile, resolveQuotedPosts, retractRoadmapVote, searchSkills, setExternalAccountPrimary, setPositionPrimary, sifaQueryKeys, unhideKeytraceClaim, unhideOrcidPublication, unhideProfileItem, unhideSifaPublication, unhideStandardPublication, unlinkSkillFromPosition, unsetExternalAccountPrimary, unsetPositionPrimary, updateEducation, updateExternalAccount, updatePosition, updateProfileLocation, updateProfileOverride, updateProfileSelf, updateRecord, updateSkill, uploadAvatar, verifyExternalAccount };