@singi-labs/sifa-sdk 0.19.97 → 0.19.99
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-BEAuoL6l.d.ts → index-5T1grOo4.d.ts} +14 -1
- package/dist/{index-DU0pYHch.d.cts → index-CL8l5aB-.d.cts} +14 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/jsonld/index.d.cts +1 -1
- package/dist/jsonld/index.d.ts +1 -1
- package/dist/{network-map-D39CQj9J.d.cts → network-map-CkmtsHDY.d.cts} +3 -3
- package/dist/{network-map-Bx5ohCEV.d.ts → network-map-v2LJbj0p.d.ts} +3 -3
- package/dist/{profile-summary-DPNTzeDv.d.ts → profile-summary-BpDqAdtX.d.ts} +1 -1
- package/dist/{profile-summary-D56VII1x.d.cts → profile-summary-yoljNqGz.d.cts} +1 -1
- package/dist/query/fetchers/email-verification.js +64 -0
- package/dist/query/fetchers/email-verification.js.map +1 -0
- package/dist/query/fetchers/index.cjs +5 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +6 -6
- package/dist/query/fetchers/index.d.ts +6 -6
- package/dist/query/fetchers/profile-emails.js +66 -0
- package/dist/query/fetchers/profile-emails.js.map +1 -0
- package/dist/query/hooks/index.cjs +111 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +4 -4
- package/dist/query/hooks/index.d.ts +4 -4
- package/dist/query/hooks/index.js +10 -0
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/hooks/use-profile-emails.js +73 -0
- package/dist/query/hooks/use-profile-emails.js.map +1 -0
- package/dist/query/index.cjs +168 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +55 -11
- package/dist/query/index.d.ts +55 -11
- package/dist/query/index.js +34 -0
- package/dist/query/index.js.map +1 -1
- package/dist/query/keys.js +5 -0
- package/dist/query/keys.js.map +1 -1
- package/dist/resume/index.d.cts +1 -1
- package/dist/resume/index.d.ts +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/{types-BqxbmLY6.d.ts → types-B9nkqX3O.d.ts} +2 -2
- package/dist/{types-Dd7UMXIz.d.cts → types-C6ghq8Fv.d.cts} +2 -2
- package/dist/{use-user-settings-GNjzBIGz.d.ts → use-user-settings-BNhxzw2f.d.ts} +91 -4
- package/dist/{use-user-settings-CNbF2SR5.d.cts → use-user-settings-Bah9kEqH.d.cts} +91 -4
- package/dist/{user-settings-D77MWX_w.d.ts → user-settings-C_8R5XSQ.d.ts} +7 -2
- package/dist/{user-settings-DWNbF59w.d.cts → user-settings-CdXeV4lU.d.cts} +7 -2
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { a4 as ApiError, ai as CompanySearchFilters, aj as CompanySearchResponse, ak as CompanySearchResult, a5 as FilterOptions, a6 as ProfileSearchResult, a7 as ProfileSearchSuggestion, S as SearchFilters, a8 as SearchResponse, a9 as SkillSearchResult, aa as apiFetch, ab as apiFetchOrNull, ac as apiWrite, ad as apiWriteCreate, al as fetchSearchCompanies, ae as fetchSearchFilters, af as fetchSearchProfiles, ag as fetchSkillSuggestions, ah as searchSkills } from '../../types-
|
|
3
|
-
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, b as FetchPendingEndorsementsOptions, N as NetworkMapEdge, c as NetworkMapGenerationJob, d as NetworkMapGraphData, e as NetworkMapNode, f as NetworkMapPendingJob, g as NetworkMapResponse, h as PendingEndorsement, P as PendingEndorsementsPage, i as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, j as ReciprocitySkill, S as SpeakerCard, k as SpeakerDirectoryFilters, l as SpeakerGroup, m as SpeakersResponse, T as TalkEvent, n as TalkRow, o as TalkSpeaker, p as TalksResponse, q as checkNetworkMapJobStatus, r as createEducation, s as createPosition, t as createRecord, u as deleteEducation, v as deletePosition, w as deleteRecord, x as dismissEndorsement, y as fetchAtFundLink, z as fetchEndorsementCount, A as fetchEntitySearch, B as fetchGetProfileView, C as fetchNetworkMap, E as fetchNetworkStreamCount, G as fetchPendingEndorsements, H as fetchProfile, I as fetchProfileSummary, J as fetchReceivedEndorsements, K as fetchReciprocityCandidate, L as fetchSpeakers, M as fetchTalks, O as hideKeytraceClaim, Q as importSearchEntities, U as initiateNetworkMapGeneration, V as isNetworkMapResponse, W as linkSkillToPosition, Z as revealMarqueDomain, _ as selectEntity, $ as setPositionPrimary, a0 as unhideKeytraceClaim, a1 as unlinkSkillFromPosition, a2 as unrevealMarqueDomain, a3 as unsetPositionPrimary, a4 as updateEducation, a5 as updatePosition, a6 as updateRecord } from '../../network-map-
|
|
4
|
-
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityPreferences, g as ActivityTeaserResponse, h as AdminReviewQueues, i as AppRegistryEntry, B as BulkHideProfileItemInput, j as CastRoadmapVoteResult, k as CheckAppAccountOptions, C as ConfirmEndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, n as CreateExternalAccountResult, D as DeleteAccountResult, o as DismissCompletenessSignalInput, p as DismissUnlinkedPositionInput, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityPreferencesOptions, w as FetchActivityTeaserOptions, x as FetchConfirmationsOptions, y as FetchFollowListOptions, z as FetchFollowProfilePageOptions, G as FetchFollowingFeedOptions, H as FetchHiddenActivityItemsOptions, I as FetchHiddenAppsOptions, J as FetchInboxCountsOptions, K as FetchMyGithubPullRequestsOptions, L as FetchMyRoadmapVotesOptions, M as FetchProfileCompletenessOptions, N as FetchReactionStatusOptions, O as FetchRpgClaimableOptions, P as FetchRpgStatusOptions, Q as FetchSuggestionsOptions, R as FetchUnlinkedPositionsOptions, S as FetchUserSettingsOptions, T as FollowListPage, U as FollowProfile, V as FollowProfilePageResponse, W as FollowUserResult, X as FollowingFeedApp, Y as FollowingFeedBuild, Z as FollowingFeedEmptyReason, _ as FollowingFeedResponse, $ as FollowingFeedVersion, a0 as FollowingResponse, a1 as GetAdminReviewQueuesOptions, a2 as GithubPullRequest, a3 as GivenConfirmation, a4 as HIDDEN_ITEM_SOURCES, a5 as HIDDEN_ITEM_TYPES, a6 as HeatmapDay, a7 as HeatmapResponse, a8 as HiddenActivityItem, a9 as HiddenApp, aa as HiddenItemSource, ab as HiddenItemType, ac as HideActivityItemInput, ad as HideProfileItemInput, ae as InboxCounts, af as ListFeatureAllowlistOptions, ag as MyGithubPullRequestsResponse, ah as OrgClaimBinding, ai as OrgClaimResult, aj as OrgDomainChallengeResult, ak as OrgDomainVerifyResult, al as OrgNotificationEmailAddResult, am as OrgNotificationEmailRemoveResult, an as OrgProfileEcho, ao as OrgProfileUpdateResult, ap as PROFILE_COMPLETENESS_SIGNALS, aq as PdsWipeOutcome, ar as PendingConfirmation, as as PendingConfirmationsPage, at as PrimarySection, au as ProfileCompleteness, av as ProfileCompletenessSignal, aw as ProfileIndustryInput, ax as ProfileLocationAddress, ay as ProfileLocationInput, az as ProfileSelfLocation, aA as QUOTED_POSTS_BATCH_MAX, aB as QuotedPostAuthor, aC as QuotedPostImage, aD as QuotedPostResult, aE as QuotedPostView, aF as ReactionError, aG as ReactionResult, aH as ReactionStatus, aI as RefreshOrcidPublicationsResult, aJ as RefreshPdsResult, aK as RepoDeleteInput, aL as ResetProfileResult, aM as ResolveQuotedPostsOptions, aN as RoadmapVoteError, aO as RoadmapVoteResult, aP as RoadmapVoter, aQ as RoadmapVotesResponse, aR as RpgClaimableResponse, aS as RpgClaimableResponseSchema, aT as RpgItemStatus, aU as RpgItemStatusSchema, aV as RpgStatusResponse, aW as RpgStatusResponseSchema, aX as SifaQueryKey, aY as SimilarProfile, aZ as SiteActivityPresetResponse, a_ as StatsResponse, b0 as SuggestionProfile, b1 as SuggestionsResponse, b2 as UnhideActivityItemInput, b3 as UnlinkedPosition, b4 as UnlinkedPositionsResult, b5 as UpdateActivityPreferencesInput, b6 as UpdateProfileOverrideInput, b7 as UpdateProfileSelfInput, b8 as UploadAvatarResult, b9 as UploadPronunciationAudioResult, ba as UserSettings, bb as UserSettingsPatch, bc as UserSettingsSchema, bd as VerifyExternalAccountResult, be as WipePreview, bf as addFeatureAllowlist, bg as addOrgNotificationEmail, bh as bulkHideProfileItems, bi as bulkHideStandardPublications, bj as bulkUnhideProfileItems, bk as bulkUnhideStandardPublications, bl as castRoadmapVote, bm as checkAppAccount, bn as clearCompletenessDismissals, bo as confirmEndorsement, bp as createConfirmation, bq as createEndorsement, br as createExternalAccount, bs as createProfileLocation, bt as createReaction, bu as createSkill, bv as deleteAccount, bw as deleteAvatarOverride, bx as deleteExternalAccount, by as deleteNamePronunciationAudio, bz as deleteProfileLocation, bA as deleteReaction, bB as deleteRepoRecords, bC as deleteSkill, bD as dismissCompletenessSignal, bE as dismissConfirmation, bF as dismissUnlinkedPosition, bG as fetchAccounts, bH as fetchActivityFeed, bI as fetchActivityPreferences, bJ as fetchActivityTeaser, bK as fetchAppsRegistry, bL as fetchExternalAccounts, bM as fetchFeaturedProfile, bN as fetchFollowing, bO as fetchFollowingFeed, bP as fetchFollowingFeedVersion, bQ as fetchGivenConfirmations, bR as fetchHeatmapData, bS as fetchHiddenActivityItems, bT as fetchHiddenApps, bU as fetchInboxCounts, bV as fetchMyGithubPullRequests, bW as fetchMyRoadmapVotes, bX as fetchPendingConfirmations, bY as fetchProfileCompleteness, bZ as fetchReactionStatus, b_ as fetchRepoInventory, b$ as fetchRoadmapVotes, c0 as fetchRpgClaimable, c1 as fetchRpgStatus, c2 as fetchSimilarProfiles, c3 as fetchSiteActivityPreset, c4 as fetchStats, c5 as fetchSuggestionCount, c6 as fetchSuggestions, c7 as fetchUnlinkedPositions, c8 as fetchUserSettings, c9 as fetchViewerPositionConfirmations, ca as fetchWipePreview, cb as followUser, cc as getAdminReviewQueues, cd as getBlueskySuggestions, ce as getFollowers, cf as getFollowing, cg as getMutuals, ch as hideActivityItem, ci as hideOrcidPublication, cj as hideProfileItem, ck as hideSifaPublication, cl as hideStandardPublication, cm as isNewerFollowingFeed, cn as listFeatureAllowlist, co as refreshOrcidPublications, cp as refreshPds, cq as removeFeatureAllowlist, cr as removeOrgNotificationEmail, cs as repoExportUrl, ct as requestOrgDomainChallenge, cu as resetProfile, cv as resolveQuotedPosts, cw as retractRoadmapVote, cx as revokeConfirmation, cy as setExternalAccountPrimary, cz as setSectionPrimary, s as sifaQueryKeys, cA as submitOrgClaim, cB as switchAccount, cC as unfollowUser, cD as unhideActivityItem, cE as unhideOrcidPublication, cF as unhideProfileItem, cG as unhideSifaPublication, cH as unhideStandardPublication, cI as unsetExternalAccountPrimary, cJ as unsetSectionPrimary, cK as updateActivityPreferences, cL as updateExternalAccount, cM as updateOrgProfile, cN as updateProfileLocation, cO as updateProfileOverride, cP as updateProfileSelf, cQ as updateSkill, cS as updateUserSettings, cT as uploadAvatar, cU as uploadNamePronunciationAudio, cV as verifyExternalAccount, cW as verifyOrgDomain } from '../../user-settings-
|
|
5
|
-
import '../../index-
|
|
1
|
+
import { a1 as SifaApiConfig, a0 as ApiFetchOptions, a3 as CreateResult, a2 as WriteResult } from '../../types-C6ghq8Fv.cjs';
|
|
2
|
+
export { a4 as ApiError, ai as CompanySearchFilters, aj as CompanySearchResponse, ak as CompanySearchResult, a5 as FilterOptions, a6 as ProfileSearchResult, a7 as ProfileSearchSuggestion, S as SearchFilters, a8 as SearchResponse, a9 as SkillSearchResult, aa as apiFetch, ab as apiFetchOrNull, ac as apiWrite, ad as apiWriteCreate, al as fetchSearchCompanies, ae as fetchSearchFilters, af as fetchSearchProfiles, ag as fetchSkillSuggestions, ah as searchSkills } from '../../types-C6ghq8Fv.cjs';
|
|
3
|
+
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, b as FetchPendingEndorsementsOptions, N as NetworkMapEdge, c as NetworkMapGenerationJob, d as NetworkMapGraphData, e as NetworkMapNode, f as NetworkMapPendingJob, g as NetworkMapResponse, h as PendingEndorsement, P as PendingEndorsementsPage, i as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, j as ReciprocitySkill, S as SpeakerCard, k as SpeakerDirectoryFilters, l as SpeakerGroup, m as SpeakersResponse, T as TalkEvent, n as TalkRow, o as TalkSpeaker, p as TalksResponse, q as checkNetworkMapJobStatus, r as createEducation, s as createPosition, t as createRecord, u as deleteEducation, v as deletePosition, w as deleteRecord, x as dismissEndorsement, y as fetchAtFundLink, z as fetchEndorsementCount, A as fetchEntitySearch, B as fetchGetProfileView, C as fetchNetworkMap, E as fetchNetworkStreamCount, G as fetchPendingEndorsements, H as fetchProfile, I as fetchProfileSummary, J as fetchReceivedEndorsements, K as fetchReciprocityCandidate, L as fetchSpeakers, M as fetchTalks, O as hideKeytraceClaim, Q as importSearchEntities, U as initiateNetworkMapGeneration, V as isNetworkMapResponse, W as linkSkillToPosition, Z as revealMarqueDomain, _ as selectEntity, $ as setPositionPrimary, a0 as unhideKeytraceClaim, a1 as unlinkSkillFromPosition, a2 as unrevealMarqueDomain, a3 as unsetPositionPrimary, a4 as updateEducation, a5 as updatePosition, a6 as updateRecord } from '../../network-map-CkmtsHDY.cjs';
|
|
4
|
+
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityPreferences, g as ActivityTeaserResponse, h as AdminReviewQueues, i as AppRegistryEntry, B as BulkHideProfileItemInput, j as CastRoadmapVoteResult, k as CheckAppAccountOptions, C as ConfirmEndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, n as CreateExternalAccountResult, D as DeleteAccountResult, o as DismissCompletenessSignalInput, p as DismissUnlinkedPositionInput, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityPreferencesOptions, w as FetchActivityTeaserOptions, x as FetchConfirmationsOptions, y as FetchFollowListOptions, z as FetchFollowProfilePageOptions, G as FetchFollowingFeedOptions, H as FetchHiddenActivityItemsOptions, I as FetchHiddenAppsOptions, J as FetchInboxCountsOptions, K as FetchMyGithubPullRequestsOptions, L as FetchMyRoadmapVotesOptions, M as FetchProfileCompletenessOptions, N as FetchReactionStatusOptions, O as FetchRpgClaimableOptions, P as FetchRpgStatusOptions, Q as FetchSuggestionsOptions, R as FetchUnlinkedPositionsOptions, S as FetchUserSettingsOptions, T as FollowListPage, U as FollowProfile, V as FollowProfilePageResponse, W as FollowUserResult, X as FollowingFeedApp, Y as FollowingFeedBuild, Z as FollowingFeedEmptyReason, _ as FollowingFeedResponse, $ as FollowingFeedVersion, a0 as FollowingResponse, a1 as GetAdminReviewQueuesOptions, a2 as GithubPullRequest, a3 as GivenConfirmation, a4 as HIDDEN_ITEM_SOURCES, a5 as HIDDEN_ITEM_TYPES, a6 as HeatmapDay, a7 as HeatmapResponse, a8 as HiddenActivityItem, a9 as HiddenApp, aa as HiddenItemSource, ab as HiddenItemType, ac as HideActivityItemInput, ad as HideProfileItemInput, ae as InboxCounts, af as ListFeatureAllowlistOptions, ag as MyGithubPullRequestsResponse, ah as OrgClaimBinding, ai as OrgClaimResult, aj as OrgDomainChallengeResult, ak as OrgDomainVerifyResult, al as OrgNotificationEmailAddResult, am as OrgNotificationEmailRemoveResult, an as OrgProfileEcho, ao as OrgProfileUpdateResult, ap as PROFILE_COMPLETENESS_SIGNALS, aq as PdsWipeOutcome, ar as PendingConfirmation, as as PendingConfirmationsPage, at as PrimarySection, au as ProfileCompleteness, av as ProfileCompletenessSignal, aw as ProfileIndustryInput, ax as ProfileLocationAddress, ay as ProfileLocationInput, az as ProfileSelfLocation, aA as QUOTED_POSTS_BATCH_MAX, aB as QuotedPostAuthor, aC as QuotedPostImage, aD as QuotedPostResult, aE as QuotedPostView, aF as ReactionError, aG as ReactionResult, aH as ReactionStatus, aI as RefreshOrcidPublicationsResult, aJ as RefreshPdsResult, aK as RepoDeleteInput, aL as ResetProfileResult, aM as ResolveQuotedPostsOptions, aN as RoadmapVoteError, aO as RoadmapVoteResult, aP as RoadmapVoter, aQ as RoadmapVotesResponse, aR as RpgClaimableResponse, aS as RpgClaimableResponseSchema, aT as RpgItemStatus, aU as RpgItemStatusSchema, aV as RpgStatusResponse, aW as RpgStatusResponseSchema, aX as SifaQueryKey, aY as SimilarProfile, aZ as SiteActivityPresetResponse, a_ as StatsResponse, b0 as SuggestionProfile, b1 as SuggestionsResponse, b2 as UnhideActivityItemInput, b3 as UnlinkedPosition, b4 as UnlinkedPositionsResult, b5 as UpdateActivityPreferencesInput, b6 as UpdateProfileOverrideInput, b7 as UpdateProfileSelfInput, b8 as UploadAvatarResult, b9 as UploadPronunciationAudioResult, ba as UserSettings, bb as UserSettingsPatch, bc as UserSettingsSchema, bd as VerifyExternalAccountResult, be as WipePreview, bf as addFeatureAllowlist, bg as addOrgNotificationEmail, bh as bulkHideProfileItems, bi as bulkHideStandardPublications, bj as bulkUnhideProfileItems, bk as bulkUnhideStandardPublications, bl as castRoadmapVote, bm as checkAppAccount, bn as clearCompletenessDismissals, bo as confirmEndorsement, bp as createConfirmation, bq as createEndorsement, br as createExternalAccount, bs as createProfileLocation, bt as createReaction, bu as createSkill, bv as deleteAccount, bw as deleteAvatarOverride, bx as deleteExternalAccount, by as deleteNamePronunciationAudio, bz as deleteProfileLocation, bA as deleteReaction, bB as deleteRepoRecords, bC as deleteSkill, bD as dismissCompletenessSignal, bE as dismissConfirmation, bF as dismissUnlinkedPosition, bG as fetchAccounts, bH as fetchActivityFeed, bI as fetchActivityPreferences, bJ as fetchActivityTeaser, bK as fetchAppsRegistry, bL as fetchExternalAccounts, bM as fetchFeaturedProfile, bN as fetchFollowing, bO as fetchFollowingFeed, bP as fetchFollowingFeedVersion, bQ as fetchGivenConfirmations, bR as fetchHeatmapData, bS as fetchHiddenActivityItems, bT as fetchHiddenApps, bU as fetchInboxCounts, bV as fetchMyGithubPullRequests, bW as fetchMyRoadmapVotes, bX as fetchPendingConfirmations, bY as fetchProfileCompleteness, bZ as fetchReactionStatus, b_ as fetchRepoInventory, b$ as fetchRoadmapVotes, c0 as fetchRpgClaimable, c1 as fetchRpgStatus, c2 as fetchSimilarProfiles, c3 as fetchSiteActivityPreset, c4 as fetchStats, c5 as fetchSuggestionCount, c6 as fetchSuggestions, c7 as fetchUnlinkedPositions, c8 as fetchUserSettings, c9 as fetchViewerPositionConfirmations, ca as fetchWipePreview, cb as followUser, cc as getAdminReviewQueues, cd as getBlueskySuggestions, ce as getFollowers, cf as getFollowing, cg as getMutuals, ch as hideActivityItem, ci as hideOrcidPublication, cj as hideProfileItem, ck as hideSifaPublication, cl as hideStandardPublication, cm as isNewerFollowingFeed, cn as listFeatureAllowlist, co as refreshOrcidPublications, cp as refreshPds, cq as removeFeatureAllowlist, cr as removeOrgNotificationEmail, cs as repoExportUrl, ct as requestOrgDomainChallenge, cu as resetProfile, cv as resolveQuotedPosts, cw as retractRoadmapVote, cx as revokeConfirmation, cy as setExternalAccountPrimary, cz as setSectionPrimary, s as sifaQueryKeys, cA as submitOrgClaim, cB as switchAccount, cC as unfollowUser, cD as unhideActivityItem, cE as unhideOrcidPublication, cF as unhideProfileItem, cG as unhideSifaPublication, cH as unhideStandardPublication, cI as unsetExternalAccountPrimary, cJ as unsetSectionPrimary, cK as updateActivityPreferences, cL as updateExternalAccount, cM as updateOrgProfile, cN as updateProfileLocation, cO as updateProfileOverride, cP as updateProfileSelf, cQ as updateSkill, cS as updateUserSettings, cT as uploadAvatar, cU as uploadNamePronunciationAudio, cV as verifyExternalAccount, cW as verifyOrgDomain } from '../../user-settings-CdXeV4lU.cjs';
|
|
5
|
+
import '../../index-CL8l5aB-.cjs';
|
|
6
6
|
import '../../verification-providers-DeyGqaoC.cjs';
|
|
7
7
|
import 'zod';
|
|
8
|
-
import '../../profile-summary-
|
|
8
|
+
import '../../profile-summary-yoljNqGz.cjs';
|
|
9
9
|
import '../../follow-profile-CgLLLQtJ.cjs';
|
|
10
10
|
import '../../org-settings-C73Sin5E.cjs';
|
|
11
11
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { a4 as ApiError, ai as CompanySearchFilters, aj as CompanySearchResponse, ak as CompanySearchResult, a5 as FilterOptions, a6 as ProfileSearchResult, a7 as ProfileSearchSuggestion, S as SearchFilters, a8 as SearchResponse, a9 as SkillSearchResult, aa as apiFetch, ab as apiFetchOrNull, ac as apiWrite, ad as apiWriteCreate, al as fetchSearchCompanies, ae as fetchSearchFilters, af as fetchSearchProfiles, ag as fetchSkillSuggestions, ah as searchSkills } from '../../types-
|
|
3
|
-
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, b as FetchPendingEndorsementsOptions, N as NetworkMapEdge, c as NetworkMapGenerationJob, d as NetworkMapGraphData, e as NetworkMapNode, f as NetworkMapPendingJob, g as NetworkMapResponse, h as PendingEndorsement, P as PendingEndorsementsPage, i as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, j as ReciprocitySkill, S as SpeakerCard, k as SpeakerDirectoryFilters, l as SpeakerGroup, m as SpeakersResponse, T as TalkEvent, n as TalkRow, o as TalkSpeaker, p as TalksResponse, q as checkNetworkMapJobStatus, r as createEducation, s as createPosition, t as createRecord, u as deleteEducation, v as deletePosition, w as deleteRecord, x as dismissEndorsement, y as fetchAtFundLink, z as fetchEndorsementCount, A as fetchEntitySearch, B as fetchGetProfileView, C as fetchNetworkMap, E as fetchNetworkStreamCount, G as fetchPendingEndorsements, H as fetchProfile, I as fetchProfileSummary, J as fetchReceivedEndorsements, K as fetchReciprocityCandidate, L as fetchSpeakers, M as fetchTalks, O as hideKeytraceClaim, Q as importSearchEntities, U as initiateNetworkMapGeneration, V as isNetworkMapResponse, W as linkSkillToPosition, Z as revealMarqueDomain, _ as selectEntity, $ as setPositionPrimary, a0 as unhideKeytraceClaim, a1 as unlinkSkillFromPosition, a2 as unrevealMarqueDomain, a3 as unsetPositionPrimary, a4 as updateEducation, a5 as updatePosition, a6 as updateRecord } from '../../network-map-
|
|
4
|
-
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityPreferences, g as ActivityTeaserResponse, h as AdminReviewQueues, i as AppRegistryEntry, B as BulkHideProfileItemInput, j as CastRoadmapVoteResult, k as CheckAppAccountOptions, C as ConfirmEndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, n as CreateExternalAccountResult, D as DeleteAccountResult, o as DismissCompletenessSignalInput, p as DismissUnlinkedPositionInput, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityPreferencesOptions, w as FetchActivityTeaserOptions, x as FetchConfirmationsOptions, y as FetchFollowListOptions, z as FetchFollowProfilePageOptions, G as FetchFollowingFeedOptions, H as FetchHiddenActivityItemsOptions, I as FetchHiddenAppsOptions, J as FetchInboxCountsOptions, K as FetchMyGithubPullRequestsOptions, L as FetchMyRoadmapVotesOptions, M as FetchProfileCompletenessOptions, N as FetchReactionStatusOptions, O as FetchRpgClaimableOptions, P as FetchRpgStatusOptions, Q as FetchSuggestionsOptions, R as FetchUnlinkedPositionsOptions, S as FetchUserSettingsOptions, T as FollowListPage, U as FollowProfile, V as FollowProfilePageResponse, W as FollowUserResult, X as FollowingFeedApp, Y as FollowingFeedBuild, Z as FollowingFeedEmptyReason, _ as FollowingFeedResponse, $ as FollowingFeedVersion, a0 as FollowingResponse, a1 as GetAdminReviewQueuesOptions, a2 as GithubPullRequest, a3 as GivenConfirmation, a4 as HIDDEN_ITEM_SOURCES, a5 as HIDDEN_ITEM_TYPES, a6 as HeatmapDay, a7 as HeatmapResponse, a8 as HiddenActivityItem, a9 as HiddenApp, aa as HiddenItemSource, ab as HiddenItemType, ac as HideActivityItemInput, ad as HideProfileItemInput, ae as InboxCounts, af as ListFeatureAllowlistOptions, ag as MyGithubPullRequestsResponse, ah as OrgClaimBinding, ai as OrgClaimResult, aj as OrgDomainChallengeResult, ak as OrgDomainVerifyResult, al as OrgNotificationEmailAddResult, am as OrgNotificationEmailRemoveResult, an as OrgProfileEcho, ao as OrgProfileUpdateResult, ap as PROFILE_COMPLETENESS_SIGNALS, aq as PdsWipeOutcome, ar as PendingConfirmation, as as PendingConfirmationsPage, at as PrimarySection, au as ProfileCompleteness, av as ProfileCompletenessSignal, aw as ProfileIndustryInput, ax as ProfileLocationAddress, ay as ProfileLocationInput, az as ProfileSelfLocation, aA as QUOTED_POSTS_BATCH_MAX, aB as QuotedPostAuthor, aC as QuotedPostImage, aD as QuotedPostResult, aE as QuotedPostView, aF as ReactionError, aG as ReactionResult, aH as ReactionStatus, aI as RefreshOrcidPublicationsResult, aJ as RefreshPdsResult, aK as RepoDeleteInput, aL as ResetProfileResult, aM as ResolveQuotedPostsOptions, aN as RoadmapVoteError, aO as RoadmapVoteResult, aP as RoadmapVoter, aQ as RoadmapVotesResponse, aR as RpgClaimableResponse, aS as RpgClaimableResponseSchema, aT as RpgItemStatus, aU as RpgItemStatusSchema, aV as RpgStatusResponse, aW as RpgStatusResponseSchema, aX as SifaQueryKey, aY as SimilarProfile, aZ as SiteActivityPresetResponse, a_ as StatsResponse, b0 as SuggestionProfile, b1 as SuggestionsResponse, b2 as UnhideActivityItemInput, b3 as UnlinkedPosition, b4 as UnlinkedPositionsResult, b5 as UpdateActivityPreferencesInput, b6 as UpdateProfileOverrideInput, b7 as UpdateProfileSelfInput, b8 as UploadAvatarResult, b9 as UploadPronunciationAudioResult, ba as UserSettings, bb as UserSettingsPatch, bc as UserSettingsSchema, bd as VerifyExternalAccountResult, be as WipePreview, bf as addFeatureAllowlist, bg as addOrgNotificationEmail, bh as bulkHideProfileItems, bi as bulkHideStandardPublications, bj as bulkUnhideProfileItems, bk as bulkUnhideStandardPublications, bl as castRoadmapVote, bm as checkAppAccount, bn as clearCompletenessDismissals, bo as confirmEndorsement, bp as createConfirmation, bq as createEndorsement, br as createExternalAccount, bs as createProfileLocation, bt as createReaction, bu as createSkill, bv as deleteAccount, bw as deleteAvatarOverride, bx as deleteExternalAccount, by as deleteNamePronunciationAudio, bz as deleteProfileLocation, bA as deleteReaction, bB as deleteRepoRecords, bC as deleteSkill, bD as dismissCompletenessSignal, bE as dismissConfirmation, bF as dismissUnlinkedPosition, bG as fetchAccounts, bH as fetchActivityFeed, bI as fetchActivityPreferences, bJ as fetchActivityTeaser, bK as fetchAppsRegistry, bL as fetchExternalAccounts, bM as fetchFeaturedProfile, bN as fetchFollowing, bO as fetchFollowingFeed, bP as fetchFollowingFeedVersion, bQ as fetchGivenConfirmations, bR as fetchHeatmapData, bS as fetchHiddenActivityItems, bT as fetchHiddenApps, bU as fetchInboxCounts, bV as fetchMyGithubPullRequests, bW as fetchMyRoadmapVotes, bX as fetchPendingConfirmations, bY as fetchProfileCompleteness, bZ as fetchReactionStatus, b_ as fetchRepoInventory, b$ as fetchRoadmapVotes, c0 as fetchRpgClaimable, c1 as fetchRpgStatus, c2 as fetchSimilarProfiles, c3 as fetchSiteActivityPreset, c4 as fetchStats, c5 as fetchSuggestionCount, c6 as fetchSuggestions, c7 as fetchUnlinkedPositions, c8 as fetchUserSettings, c9 as fetchViewerPositionConfirmations, ca as fetchWipePreview, cb as followUser, cc as getAdminReviewQueues, cd as getBlueskySuggestions, ce as getFollowers, cf as getFollowing, cg as getMutuals, ch as hideActivityItem, ci as hideOrcidPublication, cj as hideProfileItem, ck as hideSifaPublication, cl as hideStandardPublication, cm as isNewerFollowingFeed, cn as listFeatureAllowlist, co as refreshOrcidPublications, cp as refreshPds, cq as removeFeatureAllowlist, cr as removeOrgNotificationEmail, cs as repoExportUrl, ct as requestOrgDomainChallenge, cu as resetProfile, cv as resolveQuotedPosts, cw as retractRoadmapVote, cx as revokeConfirmation, cy as setExternalAccountPrimary, cz as setSectionPrimary, s as sifaQueryKeys, cA as submitOrgClaim, cB as switchAccount, cC as unfollowUser, cD as unhideActivityItem, cE as unhideOrcidPublication, cF as unhideProfileItem, cG as unhideSifaPublication, cH as unhideStandardPublication, cI as unsetExternalAccountPrimary, cJ as unsetSectionPrimary, cK as updateActivityPreferences, cL as updateExternalAccount, cM as updateOrgProfile, cN as updateProfileLocation, cO as updateProfileOverride, cP as updateProfileSelf, cQ as updateSkill, cS as updateUserSettings, cT as uploadAvatar, cU as uploadNamePronunciationAudio, cV as verifyExternalAccount, cW as verifyOrgDomain } from '../../user-settings-
|
|
5
|
-
import '../../index-
|
|
1
|
+
import { a1 as SifaApiConfig, a0 as ApiFetchOptions, a3 as CreateResult, a2 as WriteResult } from '../../types-B9nkqX3O.js';
|
|
2
|
+
export { a4 as ApiError, ai as CompanySearchFilters, aj as CompanySearchResponse, ak as CompanySearchResult, a5 as FilterOptions, a6 as ProfileSearchResult, a7 as ProfileSearchSuggestion, S as SearchFilters, a8 as SearchResponse, a9 as SkillSearchResult, aa as apiFetch, ab as apiFetchOrNull, ac as apiWrite, ad as apiWriteCreate, al as fetchSearchCompanies, ae as fetchSearchFilters, af as fetchSearchProfiles, ag as fetchSkillSuggestions, ah as searchSkills } from '../../types-B9nkqX3O.js';
|
|
3
|
+
export { D as DismissEndorsementInput, F as FetchNetworkStreamCountOptions, b as FetchPendingEndorsementsOptions, N as NetworkMapEdge, c as NetworkMapGenerationJob, d as NetworkMapGraphData, e as NetworkMapNode, f as NetworkMapPendingJob, g as NetworkMapResponse, h as PendingEndorsement, P as PendingEndorsementsPage, i as ReceivedEndorsement, R as ReceivedEndorsementsPage, a as ReciprocityCandidate, j as ReciprocitySkill, S as SpeakerCard, k as SpeakerDirectoryFilters, l as SpeakerGroup, m as SpeakersResponse, T as TalkEvent, n as TalkRow, o as TalkSpeaker, p as TalksResponse, q as checkNetworkMapJobStatus, r as createEducation, s as createPosition, t as createRecord, u as deleteEducation, v as deletePosition, w as deleteRecord, x as dismissEndorsement, y as fetchAtFundLink, z as fetchEndorsementCount, A as fetchEntitySearch, B as fetchGetProfileView, C as fetchNetworkMap, E as fetchNetworkStreamCount, G as fetchPendingEndorsements, H as fetchProfile, I as fetchProfileSummary, J as fetchReceivedEndorsements, K as fetchReciprocityCandidate, L as fetchSpeakers, M as fetchTalks, O as hideKeytraceClaim, Q as importSearchEntities, U as initiateNetworkMapGeneration, V as isNetworkMapResponse, W as linkSkillToPosition, Z as revealMarqueDomain, _ as selectEntity, $ as setPositionPrimary, a0 as unhideKeytraceClaim, a1 as unlinkSkillFromPosition, a2 as unrevealMarqueDomain, a3 as unsetPositionPrimary, a4 as updateEducation, a5 as updatePosition, a6 as updateRecord } from '../../network-map-v2LJbj0p.js';
|
|
4
|
+
export { A as AccountCheckResult, b as AccountSummary, c as ActivityFeedResponse, d as ActivityItem, e as ActivityItemLinkHealth, f as ActivityPreferences, g as ActivityTeaserResponse, h as AdminReviewQueues, i as AppRegistryEntry, B as BulkHideProfileItemInput, j as CastRoadmapVoteResult, k as CheckAppAccountOptions, C as ConfirmEndorsementInput, l as ConfirmationInput, m as ConfirmationSubjectInput, n as CreateExternalAccountResult, D as DeleteAccountResult, o as DismissCompletenessSignalInput, p as DismissUnlinkedPositionInput, E as EndorsementInput, q as ExternalAccountInput, F as FeatureAllowlistResponse, r as FeaturedProfile, t as FetchAccountsOptions, u as FetchActivityFeedOptions, v as FetchActivityPreferencesOptions, w as FetchActivityTeaserOptions, x as FetchConfirmationsOptions, y as FetchFollowListOptions, z as FetchFollowProfilePageOptions, G as FetchFollowingFeedOptions, H as FetchHiddenActivityItemsOptions, I as FetchHiddenAppsOptions, J as FetchInboxCountsOptions, K as FetchMyGithubPullRequestsOptions, L as FetchMyRoadmapVotesOptions, M as FetchProfileCompletenessOptions, N as FetchReactionStatusOptions, O as FetchRpgClaimableOptions, P as FetchRpgStatusOptions, Q as FetchSuggestionsOptions, R as FetchUnlinkedPositionsOptions, S as FetchUserSettingsOptions, T as FollowListPage, U as FollowProfile, V as FollowProfilePageResponse, W as FollowUserResult, X as FollowingFeedApp, Y as FollowingFeedBuild, Z as FollowingFeedEmptyReason, _ as FollowingFeedResponse, $ as FollowingFeedVersion, a0 as FollowingResponse, a1 as GetAdminReviewQueuesOptions, a2 as GithubPullRequest, a3 as GivenConfirmation, a4 as HIDDEN_ITEM_SOURCES, a5 as HIDDEN_ITEM_TYPES, a6 as HeatmapDay, a7 as HeatmapResponse, a8 as HiddenActivityItem, a9 as HiddenApp, aa as HiddenItemSource, ab as HiddenItemType, ac as HideActivityItemInput, ad as HideProfileItemInput, ae as InboxCounts, af as ListFeatureAllowlistOptions, ag as MyGithubPullRequestsResponse, ah as OrgClaimBinding, ai as OrgClaimResult, aj as OrgDomainChallengeResult, ak as OrgDomainVerifyResult, al as OrgNotificationEmailAddResult, am as OrgNotificationEmailRemoveResult, an as OrgProfileEcho, ao as OrgProfileUpdateResult, ap as PROFILE_COMPLETENESS_SIGNALS, aq as PdsWipeOutcome, ar as PendingConfirmation, as as PendingConfirmationsPage, at as PrimarySection, au as ProfileCompleteness, av as ProfileCompletenessSignal, aw as ProfileIndustryInput, ax as ProfileLocationAddress, ay as ProfileLocationInput, az as ProfileSelfLocation, aA as QUOTED_POSTS_BATCH_MAX, aB as QuotedPostAuthor, aC as QuotedPostImage, aD as QuotedPostResult, aE as QuotedPostView, aF as ReactionError, aG as ReactionResult, aH as ReactionStatus, aI as RefreshOrcidPublicationsResult, aJ as RefreshPdsResult, aK as RepoDeleteInput, aL as ResetProfileResult, aM as ResolveQuotedPostsOptions, aN as RoadmapVoteError, aO as RoadmapVoteResult, aP as RoadmapVoter, aQ as RoadmapVotesResponse, aR as RpgClaimableResponse, aS as RpgClaimableResponseSchema, aT as RpgItemStatus, aU as RpgItemStatusSchema, aV as RpgStatusResponse, aW as RpgStatusResponseSchema, aX as SifaQueryKey, aY as SimilarProfile, aZ as SiteActivityPresetResponse, a_ as StatsResponse, b0 as SuggestionProfile, b1 as SuggestionsResponse, b2 as UnhideActivityItemInput, b3 as UnlinkedPosition, b4 as UnlinkedPositionsResult, b5 as UpdateActivityPreferencesInput, b6 as UpdateProfileOverrideInput, b7 as UpdateProfileSelfInput, b8 as UploadAvatarResult, b9 as UploadPronunciationAudioResult, ba as UserSettings, bb as UserSettingsPatch, bc as UserSettingsSchema, bd as VerifyExternalAccountResult, be as WipePreview, bf as addFeatureAllowlist, bg as addOrgNotificationEmail, bh as bulkHideProfileItems, bi as bulkHideStandardPublications, bj as bulkUnhideProfileItems, bk as bulkUnhideStandardPublications, bl as castRoadmapVote, bm as checkAppAccount, bn as clearCompletenessDismissals, bo as confirmEndorsement, bp as createConfirmation, bq as createEndorsement, br as createExternalAccount, bs as createProfileLocation, bt as createReaction, bu as createSkill, bv as deleteAccount, bw as deleteAvatarOverride, bx as deleteExternalAccount, by as deleteNamePronunciationAudio, bz as deleteProfileLocation, bA as deleteReaction, bB as deleteRepoRecords, bC as deleteSkill, bD as dismissCompletenessSignal, bE as dismissConfirmation, bF as dismissUnlinkedPosition, bG as fetchAccounts, bH as fetchActivityFeed, bI as fetchActivityPreferences, bJ as fetchActivityTeaser, bK as fetchAppsRegistry, bL as fetchExternalAccounts, bM as fetchFeaturedProfile, bN as fetchFollowing, bO as fetchFollowingFeed, bP as fetchFollowingFeedVersion, bQ as fetchGivenConfirmations, bR as fetchHeatmapData, bS as fetchHiddenActivityItems, bT as fetchHiddenApps, bU as fetchInboxCounts, bV as fetchMyGithubPullRequests, bW as fetchMyRoadmapVotes, bX as fetchPendingConfirmations, bY as fetchProfileCompleteness, bZ as fetchReactionStatus, b_ as fetchRepoInventory, b$ as fetchRoadmapVotes, c0 as fetchRpgClaimable, c1 as fetchRpgStatus, c2 as fetchSimilarProfiles, c3 as fetchSiteActivityPreset, c4 as fetchStats, c5 as fetchSuggestionCount, c6 as fetchSuggestions, c7 as fetchUnlinkedPositions, c8 as fetchUserSettings, c9 as fetchViewerPositionConfirmations, ca as fetchWipePreview, cb as followUser, cc as getAdminReviewQueues, cd as getBlueskySuggestions, ce as getFollowers, cf as getFollowing, cg as getMutuals, ch as hideActivityItem, ci as hideOrcidPublication, cj as hideProfileItem, ck as hideSifaPublication, cl as hideStandardPublication, cm as isNewerFollowingFeed, cn as listFeatureAllowlist, co as refreshOrcidPublications, cp as refreshPds, cq as removeFeatureAllowlist, cr as removeOrgNotificationEmail, cs as repoExportUrl, ct as requestOrgDomainChallenge, cu as resetProfile, cv as resolveQuotedPosts, cw as retractRoadmapVote, cx as revokeConfirmation, cy as setExternalAccountPrimary, cz as setSectionPrimary, s as sifaQueryKeys, cA as submitOrgClaim, cB as switchAccount, cC as unfollowUser, cD as unhideActivityItem, cE as unhideOrcidPublication, cF as unhideProfileItem, cG as unhideSifaPublication, cH as unhideStandardPublication, cI as unsetExternalAccountPrimary, cJ as unsetSectionPrimary, cK as updateActivityPreferences, cL as updateExternalAccount, cM as updateOrgProfile, cN as updateProfileLocation, cO as updateProfileOverride, cP as updateProfileSelf, cQ as updateSkill, cS as updateUserSettings, cT as uploadAvatar, cU as uploadNamePronunciationAudio, cV as verifyExternalAccount, cW as verifyOrgDomain } from '../../user-settings-C_8R5XSQ.js';
|
|
5
|
+
import '../../index-5T1grOo4.js';
|
|
6
6
|
import '../../verification-providers-DeyGqaoC.js';
|
|
7
7
|
import 'zod';
|
|
8
|
-
import '../../profile-summary-
|
|
8
|
+
import '../../profile-summary-BpDqAdtX.js';
|
|
9
9
|
import '../../follow-profile-CVcA2w1v.js';
|
|
10
10
|
import '../../org-settings-BShvhyFp.js';
|
|
11
11
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// src/query/fetchers/profile-emails.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import {
|
|
4
|
+
apiFetch,
|
|
5
|
+
apiWrite,
|
|
6
|
+
apiWriteCreate
|
|
7
|
+
} from "../client.js";
|
|
8
|
+
var ProfileEmailSchema = z.object({
|
|
9
|
+
id: z.number(),
|
|
10
|
+
email: z.string(),
|
|
11
|
+
emailDomain: z.string(),
|
|
12
|
+
status: z.enum(["verified", "pending", "expired"]),
|
|
13
|
+
verifiedAt: z.string().nullable(),
|
|
14
|
+
verificationSentAt: z.string().nullable(),
|
|
15
|
+
createdAt: z.string()
|
|
16
|
+
}).passthrough();
|
|
17
|
+
var ProfileEmailsSchema = z.object({
|
|
18
|
+
emails: z.array(ProfileEmailSchema).default([]),
|
|
19
|
+
/** False while Sifa does not send email; links are not sent then. */
|
|
20
|
+
sending: z.boolean().default(false)
|
|
21
|
+
});
|
|
22
|
+
async function fetchProfileEmails(config, options = {}) {
|
|
23
|
+
const { cookieHeader, ...rest } = options;
|
|
24
|
+
const headers = { ...rest.headers ?? {} };
|
|
25
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
26
|
+
try {
|
|
27
|
+
const data = await apiFetch(config, "/api/profile-emails", {
|
|
28
|
+
cache: "no-store",
|
|
29
|
+
credentials: "include",
|
|
30
|
+
timeoutMs: 5e3,
|
|
31
|
+
...rest,
|
|
32
|
+
headers
|
|
33
|
+
});
|
|
34
|
+
const parsed = ProfileEmailsSchema.safeParse(data);
|
|
35
|
+
return parsed.success ? parsed.data : { emails: [], sending: false };
|
|
36
|
+
} catch {
|
|
37
|
+
return { emails: [], sending: false };
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function addProfileEmail(config, email, options = {}) {
|
|
41
|
+
return apiWriteCreate(
|
|
42
|
+
config,
|
|
43
|
+
"/api/profile-emails",
|
|
44
|
+
{ email },
|
|
45
|
+
options
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
function resendProfileEmailVerification(config, id, options = {}) {
|
|
49
|
+
return apiWrite(
|
|
50
|
+
config,
|
|
51
|
+
`/api/profile-emails/${id}/resend`,
|
|
52
|
+
"POST",
|
|
53
|
+
options
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
function removeProfileEmail(config, id, options = {}) {
|
|
57
|
+
return apiWrite(config, `/api/profile-emails/${id}`, "DELETE", options);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
ProfileEmailSchema,
|
|
61
|
+
addProfileEmail,
|
|
62
|
+
fetchProfileEmails,
|
|
63
|
+
removeProfileEmail,
|
|
64
|
+
resendProfileEmailVerification
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=profile-emails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/query/fetchers/profile-emails.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 * Personal email addresses (sifa-workspace#158), managed in settings and\n * verified one by one through a link. Employment verification by email\n * (#162) builds on the verified ones. Owner-only AppView shapes.\n */\n\nexport const ProfileEmailSchema = z\n .object({\n id: z.number(),\n email: z.string(),\n emailDomain: z.string(),\n status: z.enum(['verified', 'pending', 'expired']),\n verifiedAt: z.string().nullable(),\n verificationSentAt: z.string().nullable(),\n createdAt: z.string(),\n })\n .passthrough();\n\nexport type ProfileEmail = z.infer<typeof ProfileEmailSchema>;\n\nconst ProfileEmailsSchema = z.object({\n emails: z.array(ProfileEmailSchema).default([]),\n /** False while Sifa does not send email; links are not sent then. */\n sending: z.boolean().default(false),\n});\n\nexport type ProfileEmails = z.infer<typeof ProfileEmailsSchema>;\n\n/** `sends_paused` means the address is stored but no link went out. */\nexport type ProfileEmailSendStatus =\n 'verification_sent' | 'sends_paused' | 'send_failed' | 'already_verified';\n\nexport interface FetchProfileEmailsOptions extends ApiFetchOptions {\n /** Forward the caller's Cookie header on Next.js RSC server-side calls. */\n cookieHeader?: string;\n}\n\n/** The signed-in account's addresses. Empty on any failure. */\nexport async function fetchProfileEmails(\n config: SifaApiConfig,\n options: FetchProfileEmailsOptions = {},\n): Promise<ProfileEmails> {\n const { cookieHeader, ...rest } = options;\n const headers: Record<string, string> = { ...(rest.headers ?? {}) };\n if (cookieHeader) headers.cookie = cookieHeader;\n try {\n const data = await apiFetch<unknown>(config, '/api/profile-emails', {\n cache: 'no-store',\n credentials: 'include',\n timeoutMs: 5000,\n ...rest,\n headers,\n });\n const parsed = ProfileEmailsSchema.safeParse(data);\n return parsed.success ? parsed.data : { emails: [], sending: false };\n } catch {\n return { emails: [], sending: false };\n }\n}\n\nexport function addProfileEmail(\n config: SifaApiConfig,\n email: string,\n options: ApiFetchOptions = {},\n): Promise<WriteResult<ProfileEmail & { sendStatus: ProfileEmailSendStatus }>> {\n return apiWriteCreate<ProfileEmail & { sendStatus: ProfileEmailSendStatus }>(\n config,\n '/api/profile-emails',\n { email },\n options,\n );\n}\n\nexport function resendProfileEmailVerification(\n config: SifaApiConfig,\n id: number,\n options: ApiFetchOptions = {},\n): Promise<WriteResult<{ sendStatus: ProfileEmailSendStatus }>> {\n return apiWrite<{ sendStatus: ProfileEmailSendStatus }>(\n config,\n `/api/profile-emails/${id}/resend`,\n 'POST',\n options,\n );\n}\n\nexport function removeProfileEmail(\n config: SifaApiConfig,\n id: number,\n options: ApiFetchOptions = {},\n): Promise<WriteResult> {\n return apiWrite(config, `/api/profile-emails/${id}`, 'DELETE', options);\n}\n"],"mappings":";AAAA,SAAS,SAAS;AAElB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAQA,IAAM,qBAAqB,EAC/B,OAAO;AAAA,EACN,IAAI,EAAE,OAAO;AAAA,EACb,OAAO,EAAE,OAAO;AAAA,EAChB,aAAa,EAAE,OAAO;AAAA,EACtB,QAAQ,EAAE,KAAK,CAAC,YAAY,WAAW,SAAS,CAAC;AAAA,EACjD,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAAA,EACxC,WAAW,EAAE,OAAO;AACtB,CAAC,EACA,YAAY;AAIf,IAAM,sBAAsB,EAAE,OAAO;AAAA,EACnC,QAAQ,EAAE,MAAM,kBAAkB,EAAE,QAAQ,CAAC,CAAC;AAAA;AAAA,EAE9C,SAAS,EAAE,QAAQ,EAAE,QAAQ,KAAK;AACpC,CAAC;AAcD,eAAsB,mBACpB,QACA,UAAqC,CAAC,GACd;AACxB,QAAM,EAAE,cAAc,GAAG,KAAK,IAAI;AAClC,QAAM,UAAkC,EAAE,GAAI,KAAK,WAAW,CAAC,EAAG;AAClE,MAAI,aAAc,SAAQ,SAAS;AACnC,MAAI;AACF,UAAM,OAAO,MAAM,SAAkB,QAAQ,uBAAuB;AAAA,MAClE,OAAO;AAAA,MACP,aAAa;AAAA,MACb,WAAW;AAAA,MACX,GAAG;AAAA,MACH;AAAA,IACF,CAAC;AACD,UAAM,SAAS,oBAAoB,UAAU,IAAI;AACjD,WAAO,OAAO,UAAU,OAAO,OAAO,EAAE,QAAQ,CAAC,GAAG,SAAS,MAAM;AAAA,EACrE,QAAQ;AACN,WAAO,EAAE,QAAQ,CAAC,GAAG,SAAS,MAAM;AAAA,EACtC;AACF;AAEO,SAAS,gBACd,QACA,OACA,UAA2B,CAAC,GACiD;AAC7E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,EAAE,MAAM;AAAA,IACR;AAAA,EACF;AACF;AAEO,SAAS,+BACd,QACA,IACA,UAA2B,CAAC,GACkC;AAC9D,SAAO;AAAA,IACL;AAAA,IACA,uBAAuB,EAAE;AAAA,IACzB;AAAA,IACA;AAAA,EACF;AACF;AAEO,SAAS,mBACd,QACA,IACA,UAA2B,CAAC,GACN;AACtB,SAAO,SAAS,QAAQ,uBAAuB,EAAE,IAAI,UAAU,OAAO;AACxE;","names":[]}
|
|
@@ -298,6 +298,11 @@ var sifaQueryKeys = {
|
|
|
298
298
|
/** Pending confirmation requests addressed to the signed-in organization. */
|
|
299
299
|
attestationRequests: () => ["sifa", "org", "attestation-requests"]
|
|
300
300
|
},
|
|
301
|
+
profileEmails: {
|
|
302
|
+
all: () => ["sifa", "profile-emails"],
|
|
303
|
+
/** The signed-in account's email addresses (#158). */
|
|
304
|
+
list: () => ["sifa", "profile-emails", "list"]
|
|
305
|
+
},
|
|
301
306
|
verification: {
|
|
302
307
|
all: () => ["sifa", "verification"],
|
|
303
308
|
/** The append-only verification log of one position. */
|
|
@@ -1532,6 +1537,108 @@ function useVerificationLog(did, positionRkey, options) {
|
|
|
1532
1537
|
...options
|
|
1533
1538
|
});
|
|
1534
1539
|
}
|
|
1540
|
+
var ProfileEmailSchema = zod.z.object({
|
|
1541
|
+
id: zod.z.number(),
|
|
1542
|
+
email: zod.z.string(),
|
|
1543
|
+
emailDomain: zod.z.string(),
|
|
1544
|
+
status: zod.z.enum(["verified", "pending", "expired"]),
|
|
1545
|
+
verifiedAt: zod.z.string().nullable(),
|
|
1546
|
+
verificationSentAt: zod.z.string().nullable(),
|
|
1547
|
+
createdAt: zod.z.string()
|
|
1548
|
+
}).passthrough();
|
|
1549
|
+
var ProfileEmailsSchema = zod.z.object({
|
|
1550
|
+
emails: zod.z.array(ProfileEmailSchema).default([]),
|
|
1551
|
+
/** False while Sifa does not send email; links are not sent then. */
|
|
1552
|
+
sending: zod.z.boolean().default(false)
|
|
1553
|
+
});
|
|
1554
|
+
async function fetchProfileEmails(config, options = {}) {
|
|
1555
|
+
const { cookieHeader, ...rest } = options;
|
|
1556
|
+
const headers = { ...rest.headers ?? {} };
|
|
1557
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
1558
|
+
try {
|
|
1559
|
+
const data = await apiFetch(config, "/api/profile-emails", {
|
|
1560
|
+
cache: "no-store",
|
|
1561
|
+
credentials: "include",
|
|
1562
|
+
timeoutMs: 5e3,
|
|
1563
|
+
...rest,
|
|
1564
|
+
headers
|
|
1565
|
+
});
|
|
1566
|
+
const parsed = ProfileEmailsSchema.safeParse(data);
|
|
1567
|
+
return parsed.success ? parsed.data : { emails: [], sending: false };
|
|
1568
|
+
} catch {
|
|
1569
|
+
return { emails: [], sending: false };
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
function addProfileEmail(config, email, options = {}) {
|
|
1573
|
+
return apiWriteCreate(
|
|
1574
|
+
config,
|
|
1575
|
+
"/api/profile-emails",
|
|
1576
|
+
{ email },
|
|
1577
|
+
options
|
|
1578
|
+
);
|
|
1579
|
+
}
|
|
1580
|
+
function resendProfileEmailVerification(config, id, options = {}) {
|
|
1581
|
+
return apiWrite(
|
|
1582
|
+
config,
|
|
1583
|
+
`/api/profile-emails/${id}/resend`,
|
|
1584
|
+
"POST",
|
|
1585
|
+
options
|
|
1586
|
+
);
|
|
1587
|
+
}
|
|
1588
|
+
function removeProfileEmail(config, id, options = {}) {
|
|
1589
|
+
return apiWrite(config, `/api/profile-emails/${id}`, "DELETE", options);
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
// src/query/hooks/use-profile-emails.ts
|
|
1593
|
+
function useProfileEmails(options) {
|
|
1594
|
+
const config = useSifaConfig();
|
|
1595
|
+
return reactQuery.useQuery({
|
|
1596
|
+
queryKey: sifaQueryKeys.profileEmails.list(),
|
|
1597
|
+
queryFn: () => fetchProfileEmails(config),
|
|
1598
|
+
...options
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
function useInvalidate() {
|
|
1602
|
+
const queryClient = reactQuery.useQueryClient();
|
|
1603
|
+
return () => queryClient.invalidateQueries({ queryKey: sifaQueryKeys.profileEmails.all() });
|
|
1604
|
+
}
|
|
1605
|
+
function useAddProfileEmail(options) {
|
|
1606
|
+
const config = useSifaConfig();
|
|
1607
|
+
const invalidate = useInvalidate();
|
|
1608
|
+
return reactQuery.useMutation({
|
|
1609
|
+
// Spread first so a consumer handler cannot drop the invalidation.
|
|
1610
|
+
...options,
|
|
1611
|
+
mutationFn: (email) => addProfileEmail(config, email),
|
|
1612
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1613
|
+
if (result.success) await invalidate();
|
|
1614
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1615
|
+
}
|
|
1616
|
+
});
|
|
1617
|
+
}
|
|
1618
|
+
function useResendProfileEmailVerification(options) {
|
|
1619
|
+
const config = useSifaConfig();
|
|
1620
|
+
const invalidate = useInvalidate();
|
|
1621
|
+
return reactQuery.useMutation({
|
|
1622
|
+
...options,
|
|
1623
|
+
mutationFn: (id) => resendProfileEmailVerification(config, id),
|
|
1624
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1625
|
+
if (result.success) await invalidate();
|
|
1626
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1627
|
+
}
|
|
1628
|
+
});
|
|
1629
|
+
}
|
|
1630
|
+
function useRemoveProfileEmail(options) {
|
|
1631
|
+
const config = useSifaConfig();
|
|
1632
|
+
const invalidate = useInvalidate();
|
|
1633
|
+
return reactQuery.useMutation({
|
|
1634
|
+
...options,
|
|
1635
|
+
mutationFn: (id) => removeProfileEmail(config, id),
|
|
1636
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
1637
|
+
if (result.success) await invalidate();
|
|
1638
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1639
|
+
}
|
|
1640
|
+
});
|
|
1641
|
+
}
|
|
1535
1642
|
function createOrgAttestation(config, input, options = {}) {
|
|
1536
1643
|
return apiWriteCreate(
|
|
1537
1644
|
config,
|
|
@@ -4127,6 +4234,7 @@ exports.useActivityPreferences = useActivityPreferences;
|
|
|
4127
4234
|
exports.useActivityTeaser = useActivityTeaser;
|
|
4128
4235
|
exports.useAddFeatureAllowlist = useAddFeatureAllowlist;
|
|
4129
4236
|
exports.useAddOrgNotificationEmail = useAddOrgNotificationEmail;
|
|
4237
|
+
exports.useAddProfileEmail = useAddProfileEmail;
|
|
4130
4238
|
exports.useAdminReviewQueues = useAdminReviewQueues;
|
|
4131
4239
|
exports.useAppAccountCheck = useAppAccountCheck;
|
|
4132
4240
|
exports.useAppsRegistry = useAppsRegistry;
|
|
@@ -4205,14 +4313,17 @@ exports.useOrgProfile = useOrgProfile;
|
|
|
4205
4313
|
exports.usePendingConfirmations = usePendingConfirmations;
|
|
4206
4314
|
exports.useProfile = useProfile;
|
|
4207
4315
|
exports.useProfileCompleteness = useProfileCompleteness;
|
|
4316
|
+
exports.useProfileEmails = useProfileEmails;
|
|
4208
4317
|
exports.useReactionStatus = useReactionStatus;
|
|
4209
4318
|
exports.useRefreshOrcidPublications = useRefreshOrcidPublications;
|
|
4210
4319
|
exports.useRefreshPds = useRefreshPds;
|
|
4211
4320
|
exports.useRejectAttestationRequest = useRejectAttestationRequest;
|
|
4212
4321
|
exports.useRemoveFeatureAllowlist = useRemoveFeatureAllowlist;
|
|
4213
4322
|
exports.useRemoveOrgNotificationEmail = useRemoveOrgNotificationEmail;
|
|
4323
|
+
exports.useRemoveProfileEmail = useRemoveProfileEmail;
|
|
4214
4324
|
exports.useRepoInventory = useRepoInventory;
|
|
4215
4325
|
exports.useRequestEmploymentConfirmation = useRequestEmploymentConfirmation;
|
|
4326
|
+
exports.useResendProfileEmailVerification = useResendProfileEmailVerification;
|
|
4216
4327
|
exports.useResetProfile = useResetProfile;
|
|
4217
4328
|
exports.useRetractRoadmapVote = useRetractRoadmapVote;
|
|
4218
4329
|
exports.useRevealMarqueDomain = useRevealMarqueDomain;
|