@singi-labs/sifa-sdk 0.19.68 → 0.19.69
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/{org-DZZNwznR.d.cts → org-DLl_2oY6.d.cts} +7 -0
- package/dist/{org-BmKMu2h9.d.ts → org-PkrUsjXq.d.ts} +7 -0
- package/dist/query/fetchers/index.cjs +7 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +1 -1
- package/dist/query/fetchers/index.d.ts +1 -1
- package/dist/query/fetchers/org-attestations.js +120 -0
- package/dist/query/fetchers/org-attestations.js.map +1 -0
- package/dist/query/hooks/index.cjs +195 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +2 -2
- package/dist/query/hooks/index.d.ts +2 -2
- package/dist/query/hooks/index.js +16 -0
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/hooks/use-org-attestations.js +108 -0
- package/dist/query/hooks/use-org-attestations.js.map +1 -0
- package/dist/query/index.cjs +202 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +36 -0
- package/dist/query/index.js.map +1 -1
- package/dist/query/keys.js +7 -0
- package/dist/query/keys.js.map +1 -1
- package/dist/{use-org-notification-emails-jVBPNbUy.d.cts → use-org-notification-emails-CcOMI3qF.d.cts} +125 -3
- package/dist/{use-org-notification-emails-BKXLY0Nx.d.ts → use-org-notification-emails-i5dhCaw8.d.ts} +125 -3
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { K as SifaApiConfig, M as ApiFetchOptions, N as CreateResult, W as WriteResult } from '../../types-BV-qBo9i.cjs';
|
|
2
2
|
export { O as ApiError, a5 as CompanySearchFilters, a6 as CompanySearchResponse, a7 as CompanySearchResult, Q as FilterOptions, T as ProfileSearchResult, U as ProfileSearchSuggestion, S as SearchFilters, X as SearchResponse, Y as SkillSearchResult, Z as apiFetch, _ as apiFetchOrNull, $ as apiWrite, a0 as apiWriteCreate, a8 as fetchSearchCompanies, a1 as fetchSearchFilters, a2 as fetchSearchProfiles, a3 as fetchSkillSuggestions, a4 as searchSkills } from '../../types-BV-qBo9i.cjs';
|
|
3
3
|
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, b as FetchPendingEndorsementsOptions, c as FetchRpgStatusOptions, N as NetworkMapEdge, d as NetworkMapGenerationJob, e as NetworkMapGraphData, f as NetworkMapNode, g as NetworkMapPendingJob, h as NetworkMapResponse, i as PendingEndorsement, P as PendingEndorsementsPage, j as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, k as ReciprocitySkill, l as RpgItemStatus, m as RpgItemStatusSchema, n as RpgStatusResponse, o as RpgStatusResponseSchema, S as SpeakerCard, p as SpeakerDirectoryFilters, q as SpeakerGroup, r as SpeakersResponse, T as TalkEvent, s as TalkRow, t as TalkSpeaker, u as TalksResponse, v as checkNetworkMapJobStatus, w as createEducation, x as createPosition, y as createRecord, z as deleteEducation, A as deletePosition, B as deleteRecord, C as dismissEndorsement, E as fetchAtFundLink, G as fetchEndorsementCount, H as fetchEntitySearch, I as fetchGetProfileView, J as fetchNetworkMap, K as fetchNetworkStreamCount, L as fetchPendingEndorsements, M as fetchProfile, O as fetchProfileSummary, Q as fetchReceivedEndorsements, U as fetchReciprocityCandidate, V as fetchRpgStatus, W as fetchSpeakers, X as fetchTalks, Y as hideKeytraceClaim, Z as importSearchEntities, _ as initiateNetworkMapGeneration, $ as isNetworkMapResponse, a0 as linkSkillToPosition, a3 as revealMarqueDomain, a4 as selectEntity, a5 as setPositionPrimary, a6 as unhideKeytraceClaim, a7 as unlinkSkillFromPosition, a8 as unrevealMarqueDomain, a9 as unsetPositionPrimary, aa as updateEducation, ab as updatePosition, ac as updateRecord } from '../../network-map-CU7oqvKW.cjs';
|
|
4
|
-
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityTeaserResponse, g as AdminReviewQueues, h as AppRegistryEntry, B as BulkHideProfileItemInput, i as CastRoadmapVoteResult, j as CheckAppAccountOptions, C as ConfirmEndorsementInput, k as ConfirmationInput, l as ConfirmationSubjectInput, m as CreateExternalAccountResult, D as DeleteAccountResult, n as DismissUnlinkedPositionInput, E as EndorsementInput, o as ExternalAccountInput, F as FeatureAllowlistResponse, p as FeaturedProfile, q as FetchAccountsOptions, r as FetchActivityFeedOptions, t as FetchActivityTeaserOptions, u as FetchConfirmationsOptions, v as FetchFollowListOptions, w as FetchFollowProfilePageOptions, x as FetchFollowingFeedOptions, y as FetchHiddenActivityItemsOptions, z as FetchHiddenAppsOptions, G as FetchInboxCountsOptions, H as FetchMyGithubPullRequestsOptions, I as FetchMyRoadmapVotesOptions, J as FetchProfileCompletenessOptions, K as FetchReactionStatusOptions, L as FetchSuggestionsOptions, M as FetchUnlinkedPositionsOptions, N as FollowListPage, O as FollowProfile, P as FollowProfilePageResponse, Q as FollowUserResult, R as FollowingFeedApp, S as FollowingFeedBuild, T as FollowingFeedEmptyReason, U as FollowingFeedResponse, V as FollowingFeedVersion, W as FollowingResponse, X as GetAdminReviewQueuesOptions, Y as GithubPullRequest, Z as GivenConfirmation, _ as HIDDEN_ITEM_SOURCES, $ as HIDDEN_ITEM_TYPES, a0 as HeatmapDay, a1 as HeatmapResponse, a2 as HiddenActivityItem, a3 as HiddenApp, a4 as HiddenItemSource, a5 as HiddenItemType, a6 as HideActivityItemInput, a7 as HideProfileItemInput, a8 as InboxCounts, a9 as ListFeatureAllowlistOptions, aa as MyGithubPullRequestsResponse, ab as OrgClaimBinding, ac as OrgClaimResult, ad as OrgDomainChallengeResult, ae as OrgDomainVerifyResult, af as OrgNotificationEmailAddResult, ag as OrgNotificationEmailRemoveResult, ah as OrgProfileEcho, ai as OrgProfileUpdateResult, aj as PROFILE_COMPLETENESS_SIGNALS, ak as PdsWipeOutcome, al as PendingConfirmation, am as PendingConfirmationsPage, an as PrimarySection, ao as ProfileCompleteness, ap as ProfileCompletenessSignal, aq as ProfileIndustryInput, ar as ProfileLocationAddress, as as ProfileLocationInput, at as ProfileSelfLocation, au as QUOTED_POSTS_BATCH_MAX, av as QuotedPostAuthor, aw as QuotedPostImage, ax as QuotedPostResult, ay as QuotedPostView, az as ReactionError, aA as ReactionResult, aB as ReactionStatus, aC as RefreshOrcidPublicationsResult, aD as RefreshPdsResult, aE as RepoDeleteInput, aF as ResetProfileResult, aG as ResolveQuotedPostsOptions, aH as RoadmapVoteError, aI as RoadmapVoteResult, aJ as RoadmapVoter, aK as RoadmapVotesResponse, aL as SifaQueryKey, aM as SimilarProfile, aN as StatsResponse, aP as SuggestionProfile, aQ as SuggestionsResponse, aR as UnhideActivityItemInput, aS as UnlinkedPosition, aT as UnlinkedPositionsResult, aU as UpdateProfileOverrideInput, aV as UpdateProfileSelfInput, aW as UploadAvatarResult, aX as UploadPronunciationAudioResult, aY as VerifyExternalAccountResult, aZ as WipePreview, a_ as addFeatureAllowlist, a$ as addOrgNotificationEmail, b0 as bulkHideProfileItems, b1 as bulkHideStandardPublications, b2 as bulkUnhideProfileItems, b3 as bulkUnhideStandardPublications, b4 as castRoadmapVote, b5 as checkAppAccount, b6 as confirmEndorsement, b7 as createConfirmation, b8 as createEndorsement, b9 as createExternalAccount, ba as createProfileLocation, bb as createReaction, bc as createSkill, bd as deleteAccount, be as deleteAvatarOverride, bf as deleteExternalAccount, bg as deleteNamePronunciationAudio, bh as deleteProfileLocation, bi as deleteReaction, bj as deleteRepoRecords, bk as deleteSkill, bl as dismissConfirmation, bm as dismissUnlinkedPosition, bn as fetchAccounts, bo as fetchActivityFeed, bp as fetchActivityTeaser, bq as fetchAppsRegistry, br as fetchExternalAccounts, bs as fetchFeaturedProfile, bt as fetchFollowing, bu as fetchFollowingFeed, bv as fetchFollowingFeedVersion, bw as fetchGivenConfirmations, bx as fetchHeatmapData, by as fetchHiddenActivityItems, bz as fetchHiddenApps, bA as fetchInboxCounts, bB as fetchMyGithubPullRequests, bC as fetchMyRoadmapVotes, bD as fetchPendingConfirmations, bE as fetchProfileCompleteness, bF as fetchReactionStatus, bG as fetchRepoInventory, bH as fetchRoadmapVotes, bI as fetchSimilarProfiles, bJ as fetchStats, bK as fetchSuggestionCount, bL as fetchSuggestions, bM as fetchUnlinkedPositions, bN as fetchViewerPositionConfirmations, bO as fetchWipePreview, bP as followUser, bQ as getAdminReviewQueues, bR as getBlueskySuggestions, bS as getFollowers, bT as getFollowing, bU as getMutuals, bV as hideActivityItem, bW as hideOrcidPublication, bX as hideProfileItem, bY as hideSifaPublication, bZ as hideStandardPublication, b_ as isNewerFollowingFeed, b$ as listFeatureAllowlist, c0 as refreshOrcidPublications, c1 as refreshPds, c2 as removeFeatureAllowlist, c3 as removeOrgNotificationEmail, c4 as repoExportUrl, c5 as requestOrgDomainChallenge, c6 as resetProfile, c7 as resolveQuotedPosts, c8 as retractRoadmapVote, c9 as revokeConfirmation, ca as setExternalAccountPrimary, cb as setSectionPrimary, s as sifaQueryKeys, cc as submitOrgClaim, cd as switchAccount, ce as unfollowUser, cf as unhideActivityItem, cg as unhideOrcidPublication, ch as unhideProfileItem, ci as unhideSifaPublication, cj as unhideStandardPublication, ck as unsetExternalAccountPrimary, cl as unsetSectionPrimary, cm as updateExternalAccount, cn as updateOrgProfile, co as updateProfileLocation, cp as updateProfileOverride, cq as updateProfileSelf, cr as updateSkill, ct as uploadAvatar, cu as uploadNamePronunciationAudio, cv as verifyExternalAccount, cw as verifyOrgDomain } from '../../org-
|
|
4
|
+
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityTeaserResponse, g as AdminReviewQueues, h as AppRegistryEntry, B as BulkHideProfileItemInput, i as CastRoadmapVoteResult, j as CheckAppAccountOptions, C as ConfirmEndorsementInput, k as ConfirmationInput, l as ConfirmationSubjectInput, m as CreateExternalAccountResult, D as DeleteAccountResult, n as DismissUnlinkedPositionInput, E as EndorsementInput, o as ExternalAccountInput, F as FeatureAllowlistResponse, p as FeaturedProfile, q as FetchAccountsOptions, r as FetchActivityFeedOptions, t as FetchActivityTeaserOptions, u as FetchConfirmationsOptions, v as FetchFollowListOptions, w as FetchFollowProfilePageOptions, x as FetchFollowingFeedOptions, y as FetchHiddenActivityItemsOptions, z as FetchHiddenAppsOptions, G as FetchInboxCountsOptions, H as FetchMyGithubPullRequestsOptions, I as FetchMyRoadmapVotesOptions, J as FetchProfileCompletenessOptions, K as FetchReactionStatusOptions, L as FetchSuggestionsOptions, M as FetchUnlinkedPositionsOptions, N as FollowListPage, O as FollowProfile, P as FollowProfilePageResponse, Q as FollowUserResult, R as FollowingFeedApp, S as FollowingFeedBuild, T as FollowingFeedEmptyReason, U as FollowingFeedResponse, V as FollowingFeedVersion, W as FollowingResponse, X as GetAdminReviewQueuesOptions, Y as GithubPullRequest, Z as GivenConfirmation, _ as HIDDEN_ITEM_SOURCES, $ as HIDDEN_ITEM_TYPES, a0 as HeatmapDay, a1 as HeatmapResponse, a2 as HiddenActivityItem, a3 as HiddenApp, a4 as HiddenItemSource, a5 as HiddenItemType, a6 as HideActivityItemInput, a7 as HideProfileItemInput, a8 as InboxCounts, a9 as ListFeatureAllowlistOptions, aa as MyGithubPullRequestsResponse, ab as OrgClaimBinding, ac as OrgClaimResult, ad as OrgDomainChallengeResult, ae as OrgDomainVerifyResult, af as OrgNotificationEmailAddResult, ag as OrgNotificationEmailRemoveResult, ah as OrgProfileEcho, ai as OrgProfileUpdateResult, aj as PROFILE_COMPLETENESS_SIGNALS, ak as PdsWipeOutcome, al as PendingConfirmation, am as PendingConfirmationsPage, an as PrimarySection, ao as ProfileCompleteness, ap as ProfileCompletenessSignal, aq as ProfileIndustryInput, ar as ProfileLocationAddress, as as ProfileLocationInput, at as ProfileSelfLocation, au as QUOTED_POSTS_BATCH_MAX, av as QuotedPostAuthor, aw as QuotedPostImage, ax as QuotedPostResult, ay as QuotedPostView, az as ReactionError, aA as ReactionResult, aB as ReactionStatus, aC as RefreshOrcidPublicationsResult, aD as RefreshPdsResult, aE as RepoDeleteInput, aF as ResetProfileResult, aG as ResolveQuotedPostsOptions, aH as RoadmapVoteError, aI as RoadmapVoteResult, aJ as RoadmapVoter, aK as RoadmapVotesResponse, aL as SifaQueryKey, aM as SimilarProfile, aN as StatsResponse, aP as SuggestionProfile, aQ as SuggestionsResponse, aR as UnhideActivityItemInput, aS as UnlinkedPosition, aT as UnlinkedPositionsResult, aU as UpdateProfileOverrideInput, aV as UpdateProfileSelfInput, aW as UploadAvatarResult, aX as UploadPronunciationAudioResult, aY as VerifyExternalAccountResult, aZ as WipePreview, a_ as addFeatureAllowlist, a$ as addOrgNotificationEmail, b0 as bulkHideProfileItems, b1 as bulkHideStandardPublications, b2 as bulkUnhideProfileItems, b3 as bulkUnhideStandardPublications, b4 as castRoadmapVote, b5 as checkAppAccount, b6 as confirmEndorsement, b7 as createConfirmation, b8 as createEndorsement, b9 as createExternalAccount, ba as createProfileLocation, bb as createReaction, bc as createSkill, bd as deleteAccount, be as deleteAvatarOverride, bf as deleteExternalAccount, bg as deleteNamePronunciationAudio, bh as deleteProfileLocation, bi as deleteReaction, bj as deleteRepoRecords, bk as deleteSkill, bl as dismissConfirmation, bm as dismissUnlinkedPosition, bn as fetchAccounts, bo as fetchActivityFeed, bp as fetchActivityTeaser, bq as fetchAppsRegistry, br as fetchExternalAccounts, bs as fetchFeaturedProfile, bt as fetchFollowing, bu as fetchFollowingFeed, bv as fetchFollowingFeedVersion, bw as fetchGivenConfirmations, bx as fetchHeatmapData, by as fetchHiddenActivityItems, bz as fetchHiddenApps, bA as fetchInboxCounts, bB as fetchMyGithubPullRequests, bC as fetchMyRoadmapVotes, bD as fetchPendingConfirmations, bE as fetchProfileCompleteness, bF as fetchReactionStatus, bG as fetchRepoInventory, bH as fetchRoadmapVotes, bI as fetchSimilarProfiles, bJ as fetchStats, bK as fetchSuggestionCount, bL as fetchSuggestions, bM as fetchUnlinkedPositions, bN as fetchViewerPositionConfirmations, bO as fetchWipePreview, bP as followUser, bQ as getAdminReviewQueues, bR as getBlueskySuggestions, bS as getFollowers, bT as getFollowing, bU as getMutuals, bV as hideActivityItem, bW as hideOrcidPublication, bX as hideProfileItem, bY as hideSifaPublication, bZ as hideStandardPublication, b_ as isNewerFollowingFeed, b$ as listFeatureAllowlist, c0 as refreshOrcidPublications, c1 as refreshPds, c2 as removeFeatureAllowlist, c3 as removeOrgNotificationEmail, c4 as repoExportUrl, c5 as requestOrgDomainChallenge, c6 as resetProfile, c7 as resolveQuotedPosts, c8 as retractRoadmapVote, c9 as revokeConfirmation, ca as setExternalAccountPrimary, cb as setSectionPrimary, s as sifaQueryKeys, cc as submitOrgClaim, cd as switchAccount, ce as unfollowUser, cf as unhideActivityItem, cg as unhideOrcidPublication, ch as unhideProfileItem, ci as unhideSifaPublication, cj as unhideStandardPublication, ck as unsetExternalAccountPrimary, cl as unsetSectionPrimary, cm as updateExternalAccount, cn as updateOrgProfile, co as updateProfileLocation, cp as updateProfileOverride, cq as updateProfileSelf, cr as updateSkill, ct as uploadAvatar, cu as uploadNamePronunciationAudio, cv as verifyExternalAccount, cw as verifyOrgDomain } from '../../org-DLl_2oY6.cjs';
|
|
5
5
|
import '../../index-syVBnrbI.cjs';
|
|
6
6
|
import '../../verification-providers-7il3kPQS.cjs';
|
|
7
7
|
import 'zod';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { K as SifaApiConfig, M as ApiFetchOptions, N as CreateResult, W as WriteResult } from '../../types-Jb4KKbn9.js';
|
|
2
2
|
export { O as ApiError, a5 as CompanySearchFilters, a6 as CompanySearchResponse, a7 as CompanySearchResult, Q as FilterOptions, T as ProfileSearchResult, U as ProfileSearchSuggestion, S as SearchFilters, X as SearchResponse, Y as SkillSearchResult, Z as apiFetch, _ as apiFetchOrNull, $ as apiWrite, a0 as apiWriteCreate, a8 as fetchSearchCompanies, a1 as fetchSearchFilters, a2 as fetchSearchProfiles, a3 as fetchSkillSuggestions, a4 as searchSkills } from '../../types-Jb4KKbn9.js';
|
|
3
3
|
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, b as FetchPendingEndorsementsOptions, c as FetchRpgStatusOptions, N as NetworkMapEdge, d as NetworkMapGenerationJob, e as NetworkMapGraphData, f as NetworkMapNode, g as NetworkMapPendingJob, h as NetworkMapResponse, i as PendingEndorsement, P as PendingEndorsementsPage, j as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, k as ReciprocitySkill, l as RpgItemStatus, m as RpgItemStatusSchema, n as RpgStatusResponse, o as RpgStatusResponseSchema, S as SpeakerCard, p as SpeakerDirectoryFilters, q as SpeakerGroup, r as SpeakersResponse, T as TalkEvent, s as TalkRow, t as TalkSpeaker, u as TalksResponse, v as checkNetworkMapJobStatus, w as createEducation, x as createPosition, y as createRecord, z as deleteEducation, A as deletePosition, B as deleteRecord, C as dismissEndorsement, E as fetchAtFundLink, G as fetchEndorsementCount, H as fetchEntitySearch, I as fetchGetProfileView, J as fetchNetworkMap, K as fetchNetworkStreamCount, L as fetchPendingEndorsements, M as fetchProfile, O as fetchProfileSummary, Q as fetchReceivedEndorsements, U as fetchReciprocityCandidate, V as fetchRpgStatus, W as fetchSpeakers, X as fetchTalks, Y as hideKeytraceClaim, Z as importSearchEntities, _ as initiateNetworkMapGeneration, $ as isNetworkMapResponse, a0 as linkSkillToPosition, a3 as revealMarqueDomain, a4 as selectEntity, a5 as setPositionPrimary, a6 as unhideKeytraceClaim, a7 as unlinkSkillFromPosition, a8 as unrevealMarqueDomain, a9 as unsetPositionPrimary, aa as updateEducation, ab as updatePosition, ac as updateRecord } from '../../network-map-Af1MVn5j.js';
|
|
4
|
-
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityTeaserResponse, g as AdminReviewQueues, h as AppRegistryEntry, B as BulkHideProfileItemInput, i as CastRoadmapVoteResult, j as CheckAppAccountOptions, C as ConfirmEndorsementInput, k as ConfirmationInput, l as ConfirmationSubjectInput, m as CreateExternalAccountResult, D as DeleteAccountResult, n as DismissUnlinkedPositionInput, E as EndorsementInput, o as ExternalAccountInput, F as FeatureAllowlistResponse, p as FeaturedProfile, q as FetchAccountsOptions, r as FetchActivityFeedOptions, t as FetchActivityTeaserOptions, u as FetchConfirmationsOptions, v as FetchFollowListOptions, w as FetchFollowProfilePageOptions, x as FetchFollowingFeedOptions, y as FetchHiddenActivityItemsOptions, z as FetchHiddenAppsOptions, G as FetchInboxCountsOptions, H as FetchMyGithubPullRequestsOptions, I as FetchMyRoadmapVotesOptions, J as FetchProfileCompletenessOptions, K as FetchReactionStatusOptions, L as FetchSuggestionsOptions, M as FetchUnlinkedPositionsOptions, N as FollowListPage, O as FollowProfile, P as FollowProfilePageResponse, Q as FollowUserResult, R as FollowingFeedApp, S as FollowingFeedBuild, T as FollowingFeedEmptyReason, U as FollowingFeedResponse, V as FollowingFeedVersion, W as FollowingResponse, X as GetAdminReviewQueuesOptions, Y as GithubPullRequest, Z as GivenConfirmation, _ as HIDDEN_ITEM_SOURCES, $ as HIDDEN_ITEM_TYPES, a0 as HeatmapDay, a1 as HeatmapResponse, a2 as HiddenActivityItem, a3 as HiddenApp, a4 as HiddenItemSource, a5 as HiddenItemType, a6 as HideActivityItemInput, a7 as HideProfileItemInput, a8 as InboxCounts, a9 as ListFeatureAllowlistOptions, aa as MyGithubPullRequestsResponse, ab as OrgClaimBinding, ac as OrgClaimResult, ad as OrgDomainChallengeResult, ae as OrgDomainVerifyResult, af as OrgNotificationEmailAddResult, ag as OrgNotificationEmailRemoveResult, ah as OrgProfileEcho, ai as OrgProfileUpdateResult, aj as PROFILE_COMPLETENESS_SIGNALS, ak as PdsWipeOutcome, al as PendingConfirmation, am as PendingConfirmationsPage, an as PrimarySection, ao as ProfileCompleteness, ap as ProfileCompletenessSignal, aq as ProfileIndustryInput, ar as ProfileLocationAddress, as as ProfileLocationInput, at as ProfileSelfLocation, au as QUOTED_POSTS_BATCH_MAX, av as QuotedPostAuthor, aw as QuotedPostImage, ax as QuotedPostResult, ay as QuotedPostView, az as ReactionError, aA as ReactionResult, aB as ReactionStatus, aC as RefreshOrcidPublicationsResult, aD as RefreshPdsResult, aE as RepoDeleteInput, aF as ResetProfileResult, aG as ResolveQuotedPostsOptions, aH as RoadmapVoteError, aI as RoadmapVoteResult, aJ as RoadmapVoter, aK as RoadmapVotesResponse, aL as SifaQueryKey, aM as SimilarProfile, aN as StatsResponse, aP as SuggestionProfile, aQ as SuggestionsResponse, aR as UnhideActivityItemInput, aS as UnlinkedPosition, aT as UnlinkedPositionsResult, aU as UpdateProfileOverrideInput, aV as UpdateProfileSelfInput, aW as UploadAvatarResult, aX as UploadPronunciationAudioResult, aY as VerifyExternalAccountResult, aZ as WipePreview, a_ as addFeatureAllowlist, a$ as addOrgNotificationEmail, b0 as bulkHideProfileItems, b1 as bulkHideStandardPublications, b2 as bulkUnhideProfileItems, b3 as bulkUnhideStandardPublications, b4 as castRoadmapVote, b5 as checkAppAccount, b6 as confirmEndorsement, b7 as createConfirmation, b8 as createEndorsement, b9 as createExternalAccount, ba as createProfileLocation, bb as createReaction, bc as createSkill, bd as deleteAccount, be as deleteAvatarOverride, bf as deleteExternalAccount, bg as deleteNamePronunciationAudio, bh as deleteProfileLocation, bi as deleteReaction, bj as deleteRepoRecords, bk as deleteSkill, bl as dismissConfirmation, bm as dismissUnlinkedPosition, bn as fetchAccounts, bo as fetchActivityFeed, bp as fetchActivityTeaser, bq as fetchAppsRegistry, br as fetchExternalAccounts, bs as fetchFeaturedProfile, bt as fetchFollowing, bu as fetchFollowingFeed, bv as fetchFollowingFeedVersion, bw as fetchGivenConfirmations, bx as fetchHeatmapData, by as fetchHiddenActivityItems, bz as fetchHiddenApps, bA as fetchInboxCounts, bB as fetchMyGithubPullRequests, bC as fetchMyRoadmapVotes, bD as fetchPendingConfirmations, bE as fetchProfileCompleteness, bF as fetchReactionStatus, bG as fetchRepoInventory, bH as fetchRoadmapVotes, bI as fetchSimilarProfiles, bJ as fetchStats, bK as fetchSuggestionCount, bL as fetchSuggestions, bM as fetchUnlinkedPositions, bN as fetchViewerPositionConfirmations, bO as fetchWipePreview, bP as followUser, bQ as getAdminReviewQueues, bR as getBlueskySuggestions, bS as getFollowers, bT as getFollowing, bU as getMutuals, bV as hideActivityItem, bW as hideOrcidPublication, bX as hideProfileItem, bY as hideSifaPublication, bZ as hideStandardPublication, b_ as isNewerFollowingFeed, b$ as listFeatureAllowlist, c0 as refreshOrcidPublications, c1 as refreshPds, c2 as removeFeatureAllowlist, c3 as removeOrgNotificationEmail, c4 as repoExportUrl, c5 as requestOrgDomainChallenge, c6 as resetProfile, c7 as resolveQuotedPosts, c8 as retractRoadmapVote, c9 as revokeConfirmation, ca as setExternalAccountPrimary, cb as setSectionPrimary, s as sifaQueryKeys, cc as submitOrgClaim, cd as switchAccount, ce as unfollowUser, cf as unhideActivityItem, cg as unhideOrcidPublication, ch as unhideProfileItem, ci as unhideSifaPublication, cj as unhideStandardPublication, ck as unsetExternalAccountPrimary, cl as unsetSectionPrimary, cm as updateExternalAccount, cn as updateOrgProfile, co as updateProfileLocation, cp as updateProfileOverride, cq as updateProfileSelf, cr as updateSkill, ct as uploadAvatar, cu as uploadNamePronunciationAudio, cv as verifyExternalAccount, cw as verifyOrgDomain } from '../../org-
|
|
4
|
+
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityTeaserResponse, g as AdminReviewQueues, h as AppRegistryEntry, B as BulkHideProfileItemInput, i as CastRoadmapVoteResult, j as CheckAppAccountOptions, C as ConfirmEndorsementInput, k as ConfirmationInput, l as ConfirmationSubjectInput, m as CreateExternalAccountResult, D as DeleteAccountResult, n as DismissUnlinkedPositionInput, E as EndorsementInput, o as ExternalAccountInput, F as FeatureAllowlistResponse, p as FeaturedProfile, q as FetchAccountsOptions, r as FetchActivityFeedOptions, t as FetchActivityTeaserOptions, u as FetchConfirmationsOptions, v as FetchFollowListOptions, w as FetchFollowProfilePageOptions, x as FetchFollowingFeedOptions, y as FetchHiddenActivityItemsOptions, z as FetchHiddenAppsOptions, G as FetchInboxCountsOptions, H as FetchMyGithubPullRequestsOptions, I as FetchMyRoadmapVotesOptions, J as FetchProfileCompletenessOptions, K as FetchReactionStatusOptions, L as FetchSuggestionsOptions, M as FetchUnlinkedPositionsOptions, N as FollowListPage, O as FollowProfile, P as FollowProfilePageResponse, Q as FollowUserResult, R as FollowingFeedApp, S as FollowingFeedBuild, T as FollowingFeedEmptyReason, U as FollowingFeedResponse, V as FollowingFeedVersion, W as FollowingResponse, X as GetAdminReviewQueuesOptions, Y as GithubPullRequest, Z as GivenConfirmation, _ as HIDDEN_ITEM_SOURCES, $ as HIDDEN_ITEM_TYPES, a0 as HeatmapDay, a1 as HeatmapResponse, a2 as HiddenActivityItem, a3 as HiddenApp, a4 as HiddenItemSource, a5 as HiddenItemType, a6 as HideActivityItemInput, a7 as HideProfileItemInput, a8 as InboxCounts, a9 as ListFeatureAllowlistOptions, aa as MyGithubPullRequestsResponse, ab as OrgClaimBinding, ac as OrgClaimResult, ad as OrgDomainChallengeResult, ae as OrgDomainVerifyResult, af as OrgNotificationEmailAddResult, ag as OrgNotificationEmailRemoveResult, ah as OrgProfileEcho, ai as OrgProfileUpdateResult, aj as PROFILE_COMPLETENESS_SIGNALS, ak as PdsWipeOutcome, al as PendingConfirmation, am as PendingConfirmationsPage, an as PrimarySection, ao as ProfileCompleteness, ap as ProfileCompletenessSignal, aq as ProfileIndustryInput, ar as ProfileLocationAddress, as as ProfileLocationInput, at as ProfileSelfLocation, au as QUOTED_POSTS_BATCH_MAX, av as QuotedPostAuthor, aw as QuotedPostImage, ax as QuotedPostResult, ay as QuotedPostView, az as ReactionError, aA as ReactionResult, aB as ReactionStatus, aC as RefreshOrcidPublicationsResult, aD as RefreshPdsResult, aE as RepoDeleteInput, aF as ResetProfileResult, aG as ResolveQuotedPostsOptions, aH as RoadmapVoteError, aI as RoadmapVoteResult, aJ as RoadmapVoter, aK as RoadmapVotesResponse, aL as SifaQueryKey, aM as SimilarProfile, aN as StatsResponse, aP as SuggestionProfile, aQ as SuggestionsResponse, aR as UnhideActivityItemInput, aS as UnlinkedPosition, aT as UnlinkedPositionsResult, aU as UpdateProfileOverrideInput, aV as UpdateProfileSelfInput, aW as UploadAvatarResult, aX as UploadPronunciationAudioResult, aY as VerifyExternalAccountResult, aZ as WipePreview, a_ as addFeatureAllowlist, a$ as addOrgNotificationEmail, b0 as bulkHideProfileItems, b1 as bulkHideStandardPublications, b2 as bulkUnhideProfileItems, b3 as bulkUnhideStandardPublications, b4 as castRoadmapVote, b5 as checkAppAccount, b6 as confirmEndorsement, b7 as createConfirmation, b8 as createEndorsement, b9 as createExternalAccount, ba as createProfileLocation, bb as createReaction, bc as createSkill, bd as deleteAccount, be as deleteAvatarOverride, bf as deleteExternalAccount, bg as deleteNamePronunciationAudio, bh as deleteProfileLocation, bi as deleteReaction, bj as deleteRepoRecords, bk as deleteSkill, bl as dismissConfirmation, bm as dismissUnlinkedPosition, bn as fetchAccounts, bo as fetchActivityFeed, bp as fetchActivityTeaser, bq as fetchAppsRegistry, br as fetchExternalAccounts, bs as fetchFeaturedProfile, bt as fetchFollowing, bu as fetchFollowingFeed, bv as fetchFollowingFeedVersion, bw as fetchGivenConfirmations, bx as fetchHeatmapData, by as fetchHiddenActivityItems, bz as fetchHiddenApps, bA as fetchInboxCounts, bB as fetchMyGithubPullRequests, bC as fetchMyRoadmapVotes, bD as fetchPendingConfirmations, bE as fetchProfileCompleteness, bF as fetchReactionStatus, bG as fetchRepoInventory, bH as fetchRoadmapVotes, bI as fetchSimilarProfiles, bJ as fetchStats, bK as fetchSuggestionCount, bL as fetchSuggestions, bM as fetchUnlinkedPositions, bN as fetchViewerPositionConfirmations, bO as fetchWipePreview, bP as followUser, bQ as getAdminReviewQueues, bR as getBlueskySuggestions, bS as getFollowers, bT as getFollowing, bU as getMutuals, bV as hideActivityItem, bW as hideOrcidPublication, bX as hideProfileItem, bY as hideSifaPublication, bZ as hideStandardPublication, b_ as isNewerFollowingFeed, b$ as listFeatureAllowlist, c0 as refreshOrcidPublications, c1 as refreshPds, c2 as removeFeatureAllowlist, c3 as removeOrgNotificationEmail, c4 as repoExportUrl, c5 as requestOrgDomainChallenge, c6 as resetProfile, c7 as resolveQuotedPosts, c8 as retractRoadmapVote, c9 as revokeConfirmation, ca as setExternalAccountPrimary, cb as setSectionPrimary, s as sifaQueryKeys, cc as submitOrgClaim, cd as switchAccount, ce as unfollowUser, cf as unhideActivityItem, cg as unhideOrcidPublication, ch as unhideProfileItem, ci as unhideSifaPublication, cj as unhideStandardPublication, ck as unsetExternalAccountPrimary, cl as unsetSectionPrimary, cm as updateExternalAccount, cn as updateOrgProfile, co as updateProfileLocation, cp as updateProfileOverride, cq as updateProfileSelf, cr as updateSkill, ct as uploadAvatar, cu as uploadNamePronunciationAudio, cv as verifyExternalAccount, cw as verifyOrgDomain } from '../../org-PkrUsjXq.js';
|
|
5
5
|
import '../../index-IeuOpcIB.js';
|
|
6
6
|
import '../../verification-providers-7il3kPQS.js';
|
|
7
7
|
import 'zod';
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// src/query/fetchers/org-attestations.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import {
|
|
4
|
+
apiFetch,
|
|
5
|
+
apiWrite,
|
|
6
|
+
apiWriteCreate
|
|
7
|
+
} from "../client.js";
|
|
8
|
+
function createOrgAttestation(config, input, options = {}) {
|
|
9
|
+
return apiWriteCreate(
|
|
10
|
+
config,
|
|
11
|
+
"/api/org/attestations",
|
|
12
|
+
input,
|
|
13
|
+
options
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function offboardOrgAttestation(config, rkey, input, options = {}) {
|
|
17
|
+
return apiWrite(config, `/api/org/attestations/${encodeURIComponent(rkey)}`, "PATCH", {
|
|
18
|
+
body: { status: "past", ...input },
|
|
19
|
+
...options
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function revokeOrgAttestation(config, rkey, options = {}) {
|
|
23
|
+
return apiWrite(config, `/api/org/attestations/${encodeURIComponent(rkey)}`, "DELETE", options);
|
|
24
|
+
}
|
|
25
|
+
var OrgAttestationSchema = z.object({
|
|
26
|
+
rkey: z.string(),
|
|
27
|
+
uri: z.string(),
|
|
28
|
+
subjectDid: z.string(),
|
|
29
|
+
subjectHandle: z.string().nullable().optional(),
|
|
30
|
+
subjectDisplayName: z.string().nullable().optional(),
|
|
31
|
+
subjectAvatar: z.string().nullable().optional(),
|
|
32
|
+
status: z.string(),
|
|
33
|
+
source: z.string().nullable().optional(),
|
|
34
|
+
title: z.string().nullable().optional(),
|
|
35
|
+
startedAt: z.string().nullable().optional(),
|
|
36
|
+
endedAt: z.string().nullable().optional(),
|
|
37
|
+
positionUri: z.string().nullable().optional(),
|
|
38
|
+
renderState: z.string(),
|
|
39
|
+
matchedRkeys: z.array(z.string()).default([]),
|
|
40
|
+
createdAt: z.string()
|
|
41
|
+
}).passthrough();
|
|
42
|
+
var OrgAttestationsSchema = z.object({ attestations: z.array(OrgAttestationSchema).default([]) });
|
|
43
|
+
var AttestationRequestSchema = z.object({
|
|
44
|
+
id: z.number(),
|
|
45
|
+
subjectDid: z.string(),
|
|
46
|
+
subjectHandle: z.string().nullable().optional(),
|
|
47
|
+
subjectDisplayName: z.string().nullable().optional(),
|
|
48
|
+
subjectAvatar: z.string().nullable().optional(),
|
|
49
|
+
positionRkey: z.string(),
|
|
50
|
+
positionTitle: z.string().nullable().optional(),
|
|
51
|
+
positionStartedAt: z.string().nullable().optional(),
|
|
52
|
+
positionEndedAt: z.string().nullable().optional(),
|
|
53
|
+
note: z.string().nullable().optional(),
|
|
54
|
+
status: z.string(),
|
|
55
|
+
createdAt: z.string()
|
|
56
|
+
}).passthrough();
|
|
57
|
+
var AttestationRequestsSchema = z.object({
|
|
58
|
+
requests: z.array(AttestationRequestSchema).default([])
|
|
59
|
+
});
|
|
60
|
+
function withCookie(options) {
|
|
61
|
+
const { cookieHeader, ...rest } = options;
|
|
62
|
+
const headers = { ...rest.headers ?? {} };
|
|
63
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
64
|
+
return { rest, headers };
|
|
65
|
+
}
|
|
66
|
+
async function fetchOrgAttestations(config, options = {}) {
|
|
67
|
+
const { rest, headers } = withCookie(options);
|
|
68
|
+
try {
|
|
69
|
+
const data = await apiFetch(config, "/api/org/attestations", {
|
|
70
|
+
cache: "no-store",
|
|
71
|
+
credentials: "include",
|
|
72
|
+
timeoutMs: 5e3,
|
|
73
|
+
...rest,
|
|
74
|
+
headers
|
|
75
|
+
});
|
|
76
|
+
const parsed = OrgAttestationsSchema.safeParse(data);
|
|
77
|
+
return parsed.success ? parsed.data : { attestations: [] };
|
|
78
|
+
} catch {
|
|
79
|
+
return { attestations: [] };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async function fetchAttestationRequests(config, options = {}) {
|
|
83
|
+
const { rest, headers } = withCookie(options);
|
|
84
|
+
try {
|
|
85
|
+
const data = await apiFetch(config, "/api/org/attestations/requests", {
|
|
86
|
+
cache: "no-store",
|
|
87
|
+
credentials: "include",
|
|
88
|
+
timeoutMs: 5e3,
|
|
89
|
+
...rest,
|
|
90
|
+
headers
|
|
91
|
+
});
|
|
92
|
+
const parsed = AttestationRequestsSchema.safeParse(data);
|
|
93
|
+
return parsed.success ? parsed.data : { requests: [] };
|
|
94
|
+
} catch {
|
|
95
|
+
return { requests: [] };
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function rejectAttestationRequest(config, id, options = {}) {
|
|
99
|
+
return apiWrite(config, `/api/org/attestations/requests/${id}/reject`, "POST", options);
|
|
100
|
+
}
|
|
101
|
+
function requestEmploymentConfirmation(config, input, options = {}) {
|
|
102
|
+
return apiWriteCreate(
|
|
103
|
+
config,
|
|
104
|
+
"/api/verification/org/request",
|
|
105
|
+
input,
|
|
106
|
+
options
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
export {
|
|
110
|
+
AttestationRequestSchema,
|
|
111
|
+
OrgAttestationSchema,
|
|
112
|
+
createOrgAttestation,
|
|
113
|
+
fetchAttestationRequests,
|
|
114
|
+
fetchOrgAttestations,
|
|
115
|
+
offboardOrgAttestation,
|
|
116
|
+
rejectAttestationRequest,
|
|
117
|
+
requestEmploymentConfirmation,
|
|
118
|
+
revokeOrgAttestation
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=org-attestations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/query/fetchers/org-attestations.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport {\n apiFetch,\n apiWrite,\n apiWriteCreate,\n type ApiFetchOptions,\n type SifaApiConfig,\n type WriteResult,\n} from '../client.js';\n\n/**\n * Organization employment attestations (sifa-workspace#623). The org side\n * writes `id.sifa.org.employmentAttestation` records through the AppView,\n * which indexes them at once; the employee side asks for one.\n *\n * These are AppView READ and WRITE shapes, not PDS records: the record itself\n * is built server-side from the input, so a client never assembles one.\n */\n\nexport type AttestationStatus = 'current' | 'past';\n\n/** Body accepted by {@link createOrgAttestation}. */\nexport interface CreateOrgAttestationInput {\n subjectDid: string;\n status: AttestationStatus;\n /** Portable entity id (Wikidata, ROR, LEI or sifa.id/company URI); omit to attest at the account. */\n entityRef?: string;\n title?: string;\n /** YYYY-MM or YYYY-MM-DD. */\n startedAt?: string;\n endedAt?: string;\n /** AT-URI of one of the subject's own positions; omit to attest employment at the entity. */\n positionUri?: string;\n positionCid?: string;\n comment?: string;\n}\n\nexport interface CreateOrgAttestationResult {\n uri: string;\n rkey: string;\n renderState: string;\n matchedRkeys: string[];\n /** True when an equivalent attestation already existed and nothing was written. */\n existing: boolean;\n}\n\nexport function createOrgAttestation(\n config: SifaApiConfig,\n input: CreateOrgAttestationInput,\n options: ApiFetchOptions = {},\n): Promise<WriteResult<CreateOrgAttestationResult>> {\n return apiWriteCreate<CreateOrgAttestationResult>(\n config,\n '/api/org/attestations',\n input,\n options,\n );\n}\n\n/** Offboarding: the record stays, its status becomes past with an end date. */\nexport function offboardOrgAttestation(\n config: SifaApiConfig,\n rkey: string,\n input: { endedAt?: string },\n options: ApiFetchOptions = {},\n): Promise<WriteResult> {\n return apiWrite(config, `/api/org/attestations/${encodeURIComponent(rkey)}`, 'PATCH', {\n body: { status: 'past', ...input },\n ...options,\n });\n}\n\n/** Revocation: deletes the record; the subject's log keeps an org_revoked entry. */\nexport function revokeOrgAttestation(\n config: SifaApiConfig,\n rkey: string,\n options: ApiFetchOptions = {},\n): Promise<WriteResult> {\n return apiWrite(config, `/api/org/attestations/${encodeURIComponent(rkey)}`, 'DELETE', options);\n}\n\nexport const OrgAttestationSchema = z\n .object({\n rkey: z.string(),\n uri: z.string(),\n subjectDid: z.string(),\n subjectHandle: z.string().nullable().optional(),\n subjectDisplayName: z.string().nullable().optional(),\n subjectAvatar: z.string().nullable().optional(),\n status: z.string(),\n source: z.string().nullable().optional(),\n title: z.string().nullable().optional(),\n startedAt: z.string().nullable().optional(),\n endedAt: z.string().nullable().optional(),\n positionUri: z.string().nullable().optional(),\n renderState: z.string(),\n matchedRkeys: z.array(z.string()).default([]),\n createdAt: z.string(),\n })\n .passthrough();\nexport type OrgAttestation = z.infer<typeof OrgAttestationSchema>;\n\nconst OrgAttestationsSchema = z.object({ attestations: z.array(OrgAttestationSchema).default([]) });\n\nexport const AttestationRequestSchema = z\n .object({\n id: z.number(),\n subjectDid: z.string(),\n subjectHandle: z.string().nullable().optional(),\n subjectDisplayName: z.string().nullable().optional(),\n subjectAvatar: z.string().nullable().optional(),\n positionRkey: z.string(),\n positionTitle: z.string().nullable().optional(),\n positionStartedAt: z.string().nullable().optional(),\n positionEndedAt: z.string().nullable().optional(),\n note: z.string().nullable().optional(),\n status: z.string(),\n createdAt: z.string(),\n })\n .passthrough();\nexport type AttestationRequest = z.infer<typeof AttestationRequestSchema>;\n\nconst AttestationRequestsSchema = z.object({\n requests: z.array(AttestationRequestSchema).default([]),\n});\n\n/** Options for the org-side reads, adding the RSC cookie-forwarding escape hatch. */\nexport interface FetchOrgAttestationOptions extends ApiFetchOptions {\n cookieHeader?: string;\n}\n\nfunction withCookie(options: FetchOrgAttestationOptions) {\n const { cookieHeader, ...rest } = options;\n const headers: Record<string, string> = { ...(rest.headers ?? {}) };\n if (cookieHeader) headers.cookie = cookieHeader;\n return { rest, headers };\n}\n\n/** Every attestation the signed-in organization wrote, newest first. Empty on failure. */\nexport async function fetchOrgAttestations(\n config: SifaApiConfig,\n options: FetchOrgAttestationOptions = {},\n): Promise<{ attestations: OrgAttestation[] }> {\n const { rest, headers } = withCookie(options);\n try {\n const data = await apiFetch<unknown>(config, '/api/org/attestations', {\n cache: 'no-store',\n credentials: 'include',\n timeoutMs: 5000,\n ...rest,\n headers,\n });\n const parsed = OrgAttestationsSchema.safeParse(data);\n return parsed.success ? parsed.data : { attestations: [] };\n } catch {\n return { attestations: [] };\n }\n}\n\n/** Pending confirmation requests addressed to the signed-in organization. Empty on failure. */\nexport async function fetchAttestationRequests(\n config: SifaApiConfig,\n options: FetchOrgAttestationOptions = {},\n): Promise<{ requests: AttestationRequest[] }> {\n const { rest, headers } = withCookie(options);\n try {\n const data = await apiFetch<unknown>(config, '/api/org/attestations/requests', {\n cache: 'no-store',\n credentials: 'include',\n timeoutMs: 5000,\n ...rest,\n headers,\n });\n const parsed = AttestationRequestsSchema.safeParse(data);\n return parsed.success ? parsed.data : { requests: [] };\n } catch {\n return { requests: [] };\n }\n}\n\nexport function rejectAttestationRequest(\n config: SifaApiConfig,\n id: number,\n options: ApiFetchOptions = {},\n): Promise<WriteResult> {\n return apiWrite(config, `/api/org/attestations/requests/${id}/reject`, 'POST', options);\n}\n\n/** Body accepted by {@link requestEmploymentConfirmation}. */\nexport interface RequestEmploymentConfirmationInput {\n positionRkey: string;\n note?: string;\n}\n\nexport interface RequestEmploymentConfirmationResult {\n orgDid: string;\n id: number;\n /** False when a request was already pending; the same one is returned. */\n created: boolean;\n}\n\n/** Employee side: ask the organization behind one of your positions to confirm it. */\nexport function requestEmploymentConfirmation(\n config: SifaApiConfig,\n input: RequestEmploymentConfirmationInput,\n options: ApiFetchOptions = {},\n): Promise<WriteResult<RequestEmploymentConfirmationResult>> {\n return apiWriteCreate<RequestEmploymentConfirmationResult>(\n config,\n '/api/verification/org/request',\n input,\n options,\n );\n}\n"],"mappings":"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","names":[]}
|
|
@@ -281,6 +281,13 @@ var sifaQueryKeys = {
|
|
|
281
281
|
/** Confirmations this session has given, for the withdraw surface. */
|
|
282
282
|
given: () => ["sifa", "confirmation", "given"]
|
|
283
283
|
},
|
|
284
|
+
org: {
|
|
285
|
+
all: () => ["sifa", "org"],
|
|
286
|
+
/** Attestations the signed-in organization wrote. */
|
|
287
|
+
attestations: () => ["sifa", "org", "attestations"],
|
|
288
|
+
/** Pending confirmation requests addressed to the signed-in organization. */
|
|
289
|
+
attestationRequests: () => ["sifa", "org", "attestation-requests"]
|
|
290
|
+
},
|
|
284
291
|
verification: {
|
|
285
292
|
all: () => ["sifa", "verification"],
|
|
286
293
|
/** The append-only verification log of one position. */
|
|
@@ -1512,6 +1519,187 @@ function useVerificationLog(did, positionRkey, options) {
|
|
|
1512
1519
|
...options
|
|
1513
1520
|
});
|
|
1514
1521
|
}
|
|
1522
|
+
function createOrgAttestation(config, input, options = {}) {
|
|
1523
|
+
return apiWriteCreate(
|
|
1524
|
+
config,
|
|
1525
|
+
"/api/org/attestations",
|
|
1526
|
+
input,
|
|
1527
|
+
options
|
|
1528
|
+
);
|
|
1529
|
+
}
|
|
1530
|
+
function offboardOrgAttestation(config, rkey, input, options = {}) {
|
|
1531
|
+
return apiWrite(config, `/api/org/attestations/${encodeURIComponent(rkey)}`, "PATCH", {
|
|
1532
|
+
body: { status: "past", ...input },
|
|
1533
|
+
...options
|
|
1534
|
+
});
|
|
1535
|
+
}
|
|
1536
|
+
function revokeOrgAttestation(config, rkey, options = {}) {
|
|
1537
|
+
return apiWrite(config, `/api/org/attestations/${encodeURIComponent(rkey)}`, "DELETE", options);
|
|
1538
|
+
}
|
|
1539
|
+
var OrgAttestationSchema = zod.z.object({
|
|
1540
|
+
rkey: zod.z.string(),
|
|
1541
|
+
uri: zod.z.string(),
|
|
1542
|
+
subjectDid: zod.z.string(),
|
|
1543
|
+
subjectHandle: zod.z.string().nullable().optional(),
|
|
1544
|
+
subjectDisplayName: zod.z.string().nullable().optional(),
|
|
1545
|
+
subjectAvatar: zod.z.string().nullable().optional(),
|
|
1546
|
+
status: zod.z.string(),
|
|
1547
|
+
source: zod.z.string().nullable().optional(),
|
|
1548
|
+
title: zod.z.string().nullable().optional(),
|
|
1549
|
+
startedAt: zod.z.string().nullable().optional(),
|
|
1550
|
+
endedAt: zod.z.string().nullable().optional(),
|
|
1551
|
+
positionUri: zod.z.string().nullable().optional(),
|
|
1552
|
+
renderState: zod.z.string(),
|
|
1553
|
+
matchedRkeys: zod.z.array(zod.z.string()).default([]),
|
|
1554
|
+
createdAt: zod.z.string()
|
|
1555
|
+
}).passthrough();
|
|
1556
|
+
var OrgAttestationsSchema = zod.z.object({ attestations: zod.z.array(OrgAttestationSchema).default([]) });
|
|
1557
|
+
var AttestationRequestSchema = zod.z.object({
|
|
1558
|
+
id: zod.z.number(),
|
|
1559
|
+
subjectDid: zod.z.string(),
|
|
1560
|
+
subjectHandle: zod.z.string().nullable().optional(),
|
|
1561
|
+
subjectDisplayName: zod.z.string().nullable().optional(),
|
|
1562
|
+
subjectAvatar: zod.z.string().nullable().optional(),
|
|
1563
|
+
positionRkey: zod.z.string(),
|
|
1564
|
+
positionTitle: zod.z.string().nullable().optional(),
|
|
1565
|
+
positionStartedAt: zod.z.string().nullable().optional(),
|
|
1566
|
+
positionEndedAt: zod.z.string().nullable().optional(),
|
|
1567
|
+
note: zod.z.string().nullable().optional(),
|
|
1568
|
+
status: zod.z.string(),
|
|
1569
|
+
createdAt: zod.z.string()
|
|
1570
|
+
}).passthrough();
|
|
1571
|
+
var AttestationRequestsSchema = zod.z.object({
|
|
1572
|
+
requests: zod.z.array(AttestationRequestSchema).default([])
|
|
1573
|
+
});
|
|
1574
|
+
function withCookie(options) {
|
|
1575
|
+
const { cookieHeader, ...rest } = options;
|
|
1576
|
+
const headers = { ...rest.headers ?? {} };
|
|
1577
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
1578
|
+
return { rest, headers };
|
|
1579
|
+
}
|
|
1580
|
+
async function fetchOrgAttestations(config, options = {}) {
|
|
1581
|
+
const { rest, headers } = withCookie(options);
|
|
1582
|
+
try {
|
|
1583
|
+
const data = await apiFetch(config, "/api/org/attestations", {
|
|
1584
|
+
cache: "no-store",
|
|
1585
|
+
credentials: "include",
|
|
1586
|
+
timeoutMs: 5e3,
|
|
1587
|
+
...rest,
|
|
1588
|
+
headers
|
|
1589
|
+
});
|
|
1590
|
+
const parsed = OrgAttestationsSchema.safeParse(data);
|
|
1591
|
+
return parsed.success ? parsed.data : { attestations: [] };
|
|
1592
|
+
} catch {
|
|
1593
|
+
return { attestations: [] };
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
async function fetchAttestationRequests(config, options = {}) {
|
|
1597
|
+
const { rest, headers } = withCookie(options);
|
|
1598
|
+
try {
|
|
1599
|
+
const data = await apiFetch(config, "/api/org/attestations/requests", {
|
|
1600
|
+
cache: "no-store",
|
|
1601
|
+
credentials: "include",
|
|
1602
|
+
timeoutMs: 5e3,
|
|
1603
|
+
...rest,
|
|
1604
|
+
headers
|
|
1605
|
+
});
|
|
1606
|
+
const parsed = AttestationRequestsSchema.safeParse(data);
|
|
1607
|
+
return parsed.success ? parsed.data : { requests: [] };
|
|
1608
|
+
} catch {
|
|
1609
|
+
return { requests: [] };
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
function rejectAttestationRequest(config, id, options = {}) {
|
|
1613
|
+
return apiWrite(config, `/api/org/attestations/requests/${id}/reject`, "POST", options);
|
|
1614
|
+
}
|
|
1615
|
+
function requestEmploymentConfirmation(config, input, options = {}) {
|
|
1616
|
+
return apiWriteCreate(
|
|
1617
|
+
config,
|
|
1618
|
+
"/api/verification/org/request",
|
|
1619
|
+
input,
|
|
1620
|
+
options
|
|
1621
|
+
);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
// src/query/hooks/use-org-attestations.ts
|
|
1625
|
+
function useOrgAttestations(options) {
|
|
1626
|
+
const config = useSifaConfig();
|
|
1627
|
+
return reactQuery.useQuery({
|
|
1628
|
+
queryKey: sifaQueryKeys.org.attestations(),
|
|
1629
|
+
queryFn: () => fetchOrgAttestations(config),
|
|
1630
|
+
...options
|
|
1631
|
+
});
|
|
1632
|
+
}
|
|
1633
|
+
function useAttestationRequests(options) {
|
|
1634
|
+
const config = useSifaConfig();
|
|
1635
|
+
return reactQuery.useQuery({
|
|
1636
|
+
queryKey: sifaQueryKeys.org.attestationRequests(),
|
|
1637
|
+
queryFn: () => fetchAttestationRequests(config),
|
|
1638
|
+
...options
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
function useInvalidateOrg() {
|
|
1642
|
+
const queryClient = reactQuery.useQueryClient();
|
|
1643
|
+
return async () => {
|
|
1644
|
+
await queryClient.invalidateQueries({ queryKey: sifaQueryKeys.org.all() });
|
|
1645
|
+
};
|
|
1646
|
+
}
|
|
1647
|
+
function useCreateOrgAttestation(options) {
|
|
1648
|
+
const config = useSifaConfig();
|
|
1649
|
+
const invalidate = useInvalidateOrg();
|
|
1650
|
+
return reactQuery.useMutation({
|
|
1651
|
+
// Spread first so a consumer handler cannot drop the invalidation.
|
|
1652
|
+
...options,
|
|
1653
|
+
mutationFn: (input) => createOrgAttestation(config, input),
|
|
1654
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1655
|
+
if (result.success) await invalidate();
|
|
1656
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1659
|
+
}
|
|
1660
|
+
function useOffboardOrgAttestation(options) {
|
|
1661
|
+
const config = useSifaConfig();
|
|
1662
|
+
const invalidate = useInvalidateOrg();
|
|
1663
|
+
return reactQuery.useMutation({
|
|
1664
|
+
...options,
|
|
1665
|
+
mutationFn: ({ rkey, endedAt }) => offboardOrgAttestation(config, rkey, { endedAt }),
|
|
1666
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1667
|
+
if (result.success) await invalidate();
|
|
1668
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
}
|
|
1672
|
+
function useRevokeOrgAttestation(options) {
|
|
1673
|
+
const config = useSifaConfig();
|
|
1674
|
+
const invalidate = useInvalidateOrg();
|
|
1675
|
+
return reactQuery.useMutation({
|
|
1676
|
+
...options,
|
|
1677
|
+
mutationFn: (rkey) => revokeOrgAttestation(config, rkey),
|
|
1678
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1679
|
+
if (result.success) await invalidate();
|
|
1680
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1681
|
+
}
|
|
1682
|
+
});
|
|
1683
|
+
}
|
|
1684
|
+
function useRejectAttestationRequest(options) {
|
|
1685
|
+
const config = useSifaConfig();
|
|
1686
|
+
const invalidate = useInvalidateOrg();
|
|
1687
|
+
return reactQuery.useMutation({
|
|
1688
|
+
...options,
|
|
1689
|
+
mutationFn: (id) => rejectAttestationRequest(config, id),
|
|
1690
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1691
|
+
if (result.success) await invalidate();
|
|
1692
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1693
|
+
}
|
|
1694
|
+
});
|
|
1695
|
+
}
|
|
1696
|
+
function useRequestEmploymentConfirmation(options) {
|
|
1697
|
+
const config = useSifaConfig();
|
|
1698
|
+
return reactQuery.useMutation({
|
|
1699
|
+
...options,
|
|
1700
|
+
mutationFn: (input) => requestEmploymentConfirmation(config, input)
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1515
1703
|
|
|
1516
1704
|
// src/query/fetchers/unlinked-positions.ts
|
|
1517
1705
|
async function fetchUnlinkedPositions(config, options = {}) {
|
|
@@ -3678,6 +3866,7 @@ exports.useAdminReviewQueues = useAdminReviewQueues;
|
|
|
3678
3866
|
exports.useAppAccountCheck = useAppAccountCheck;
|
|
3679
3867
|
exports.useAppsRegistry = useAppsRegistry;
|
|
3680
3868
|
exports.useAtFundLink = useAtFundLink;
|
|
3869
|
+
exports.useAttestationRequests = useAttestationRequests;
|
|
3681
3870
|
exports.useBlueskySuggestions = useBlueskySuggestions;
|
|
3682
3871
|
exports.useBulkHideProfileItems = useBulkHideProfileItems;
|
|
3683
3872
|
exports.useBulkHideStandardPublications = useBulkHideStandardPublications;
|
|
@@ -3690,6 +3879,7 @@ exports.useCreateEducation = useCreateEducation;
|
|
|
3690
3879
|
exports.useCreateEndorsement = useCreateEndorsement;
|
|
3691
3880
|
exports.useCreateExternalAccount = useCreateExternalAccount;
|
|
3692
3881
|
exports.useCreateInvestment = useCreateInvestment;
|
|
3882
|
+
exports.useCreateOrgAttestation = useCreateOrgAttestation;
|
|
3693
3883
|
exports.useCreatePosition = useCreatePosition;
|
|
3694
3884
|
exports.useCreateProfileLocation = useCreateProfileLocation;
|
|
3695
3885
|
exports.useCreateReaction = useCreateReaction;
|
|
@@ -3739,6 +3929,8 @@ exports.useMutuals = useMutuals;
|
|
|
3739
3929
|
exports.useMyGithubPullRequests = useMyGithubPullRequests;
|
|
3740
3930
|
exports.useMyRoadmapVotes = useMyRoadmapVotes;
|
|
3741
3931
|
exports.useNetworkStreamCount = useNetworkStreamCount;
|
|
3932
|
+
exports.useOffboardOrgAttestation = useOffboardOrgAttestation;
|
|
3933
|
+
exports.useOrgAttestations = useOrgAttestations;
|
|
3742
3934
|
exports.useOrgClaim = useOrgClaim;
|
|
3743
3935
|
exports.useOrgDomainChallenge = useOrgDomainChallenge;
|
|
3744
3936
|
exports.useOrgDomainVerify = useOrgDomainVerify;
|
|
@@ -3749,13 +3941,16 @@ exports.useProfileCompleteness = useProfileCompleteness;
|
|
|
3749
3941
|
exports.useReactionStatus = useReactionStatus;
|
|
3750
3942
|
exports.useRefreshOrcidPublications = useRefreshOrcidPublications;
|
|
3751
3943
|
exports.useRefreshPds = useRefreshPds;
|
|
3944
|
+
exports.useRejectAttestationRequest = useRejectAttestationRequest;
|
|
3752
3945
|
exports.useRemoveFeatureAllowlist = useRemoveFeatureAllowlist;
|
|
3753
3946
|
exports.useRemoveOrgNotificationEmail = useRemoveOrgNotificationEmail;
|
|
3754
3947
|
exports.useRepoInventory = useRepoInventory;
|
|
3948
|
+
exports.useRequestEmploymentConfirmation = useRequestEmploymentConfirmation;
|
|
3755
3949
|
exports.useResetProfile = useResetProfile;
|
|
3756
3950
|
exports.useRetractRoadmapVote = useRetractRoadmapVote;
|
|
3757
3951
|
exports.useRevealMarqueDomain = useRevealMarqueDomain;
|
|
3758
3952
|
exports.useRevokeConfirmation = useRevokeConfirmation;
|
|
3953
|
+
exports.useRevokeOrgAttestation = useRevokeOrgAttestation;
|
|
3759
3954
|
exports.useRoadmapVotes = useRoadmapVotes;
|
|
3760
3955
|
exports.useSearchCompanies = useSearchCompanies;
|
|
3761
3956
|
exports.useSearchFilters = useSearchFilters;
|