@singi-labs/sifa-sdk 0.12.91 → 0.12.92

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 CHANGED
@@ -5835,7 +5835,7 @@ function describeSifaRecord(collection, value) {
5835
5835
  }
5836
5836
 
5837
5837
  // src/index.ts
5838
- var SIFA_SDK_VERSION = "0.12.91";
5838
+ var SIFA_SDK_VERSION = "0.12.92";
5839
5839
 
5840
5840
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
5841
5841
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
package/dist/index.js CHANGED
@@ -5833,7 +5833,7 @@ function describeSifaRecord(collection, value) {
5833
5833
  }
5834
5834
 
5835
5835
  // src/index.ts
5836
- var SIFA_SDK_VERSION = "0.12.91";
5836
+ var SIFA_SDK_VERSION = "0.12.92";
5837
5837
 
5838
5838
  export { ACTIVITY_TIERS, ACTIVITY_VERBS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, ALL_SECTIONS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, ARTIFACT_LINK_KIND_LABELS, ARTIFACT_LINK_KIND_OPTIONS, ArtifactLinkSchema, AtmosphereFeedItemSchema, BlobRefSchema, CALENDAR_EVENT_MODE_LABELS, CALENDAR_EVENT_STATUS_LABELS, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, ENTITY_REF_ANCHORS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, EntityImportSearchResponseSchema, EntityMintDomainResponseSchema, EntityResolveDomainRequestSchema, EntityResolveDomainResponseSchema, EntitySearchResponseSchema, EntitySearchResultSchema, EntitySelectRequestSchema, EntitySelectResponseSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, INVESTMENT_ROLE_LABELS, INVESTMENT_ROLE_OPTIONS, INVESTMENT_STAGE_LABELS, INVESTMENT_STAGE_OPTIONS, INVESTMENT_STATUS_LABELS, INVESTMENT_STATUS_OPTIONS, INVOLVEMENT_HEADING_ORDER, INVOLVEMENT_KIND_HEADINGS, INVOLVEMENT_KIND_LABELS, INVOLVEMENT_KIND_OPTIONS, InvestmentAmountSchema, MIN_SKILLS, ON_BEHALF_OF_EMPLOYMENT_TYPES, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, OrgEmploymentAttestationRecordSchema, OrgProfileRecordSchema, PLATFORM_LABELS, PLATFORM_OPTIONS, PRESENTATION_LINK_TYPE_LABELS, PRESENTATION_LINK_TYPE_OPTIONS, PRESENTATION_ROLE_LABELS, PRESENTATION_ROLE_OPTIONS, PROFILE_INVESTMENT_NSID, PROFILE_INVOLVEMENT_NSID, PROJECT_ROLES, PUBLISHERS, PresentationDurationSchema, PresentationLinkSchema, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileInvestmentRecordSchema, ProfileInvolvementRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfilePresentationDeliveryRecordSchema, ProfilePresentationRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, ROADMAP_ISSUES_REPO, ROADMAP_ITEM_META, SECTION_GROUPS, SECTION_LABELS, SIFA_REPO_GROUPS, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, STREAM_VERBS, SifaFeedItemSchema, VERIFICATION_PROVIDERS, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, buildMetaDescription, buildTalkSlug, categoryForApp, certDateExtractor, cidSchema, classifyEntityRef, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, describeSifaRecord, detectPdsProvider, didSchema, dimensionsFromInputs, durationFromMinutes, encodeFeedCursor, entityDisambiguationLabel, entityResultKey, externalRecordRefSchema, filterHidden, findIndustry, formatCompanyName, formatDateRange, formatDistanceToNow, formatLocation, formatPresentationDuration, formatRelativeTime, formatTimelineDate, getActivityTaxonomyVersion, getActivityTier, getActivityVerbsVersion, getAppCategoryIcon, getAppIdForCollection, getArtifactLinkKindLabel, getCalendarEventModeLabel, getCalendarEventStatusLabel, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getInvestmentRoleLabel, getInvestmentStageLabel, getInvestmentStatusLabel, getInvolvementKindHeading, getInvolvementKindLabel, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPresentationLinkTypeLabel, getPresentationRoleLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getVerificationProvider, getVisibleSectionIds, getWorkplaceTypeLabel, groupInvolvementByHeading, groupSkillsByCategory, groupSkillsBySubCategory, groupSkillsForDisplay, hasAdultContent, hasPersonalProfileContent, hoistPrimary, isAppCategory, isCompanyPageIndexable, isCompanyRequired, isKnownAppId, isKnownPlatform, isKnownVerificationProvider, isLinked, isOnBehalfOfApplicable, isPseudoEmployer, isRegistrableDomainHandle, isSectionPopulated, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, locationSegments, looksLikeDomain, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeCompanyKey, normalizeLegalForm, normalizeOpenTo, normalizePlatformId, normalizePresentationMode, normalizePresentationRole, normalizeSkillCategory, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseIntendedAudiences, parseLocationString, parsePresentationDuration, parseTalkRkey, partialDateSchema, pdsProviderFromApi, pickPrimaryPosition, presentationCsvRowToRecord, presentationDeliveryCsvRowToRecord, primaryVerification, profileToDimensionInputs, qualifiesAsOrg, relativeLuminance, rendersCompanyProfile, rendersPersonalProfile, repoGroupForCollection, resolveAccountFacetMode, resolveCardHealth, resolveCardUrl, resolveEmbed, resolveVerifierProvider, rgbToString, roadmapIssueUrl, sanitizeDisplayText, sanitizeHandleInput, searchResultDisambiguation, selfLabelsSchema, singleDateExtractor, skillRefSchema, slugifyTitle, sortByActiveDateRange, sortByDateDesc, sortCertifications, sortEducation, sortHonors, sortLanguages, sortLanguagesByProficiency, sortPositions, sortProjects, sortPublications, streamAddressSchema, streamAuthorSchema, streamCardBodySchema, streamCardSubjectSchema, streamCardVMSchema, streamExternalLinkSchema, streamGeoSchema, streamMediaSchema, streamRichSegmentSchema, streamSourceSchema, streamThemeSchema, streamVerbSchema, stripHtmlToText, strongRefSchema, summarizePresentationDeliveries, summarizeProfileView, toStreamCardVM, toStreamCardVMs, truncateGraphemes, uriSchema, verbForCollection, visibleItems, youtubeThumbnailUrl, youtubeVideoId };
5839
5839
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import { c as Profile, d as ProfilePosition, S as SkillRef } from './index-jNyd5QP7.cjs';
2
- import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-ClDqS3CM.cjs';
2
+ import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-DCHb1xhw.cjs';
3
3
  import { n as ProfileView } from './types-8wAWvS-T.cjs';
4
4
  import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-DY78IoL9.cjs';
5
5
  import { j as EntitySearchResponse, E as EntitySearchResult, d as EntityMintDomainResponse, h as EntityResolveDomainResponse, m as EntitySelectRequest, o as EntitySelectResponse } from './feed-BMm9Pkew.cjs';
@@ -1,5 +1,5 @@
1
1
  import { c as Profile, d as ProfilePosition, S as SkillRef } from './index-jNyd5QP7.js';
2
- import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-GlACA06R.js';
2
+ import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-zMZg_r7v.js';
3
3
  import { n as ProfileView } from './types-8JaS6abh.js';
4
4
  import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-8fapqzHv.js';
5
5
  import { j as EntitySearchResponse, E as EntitySearchResult, d as EntityMintDomainResponse, h as EntityResolveDomainResponse, m as EntitySelectRequest, o as EntitySelectResponse } from './feed-BMm9Pkew.js';
@@ -593,6 +593,37 @@ declare function fetchAppsRegistry(config: SifaApiConfig, options?: ApiFetchOpti
593
593
  */
594
594
  declare function fetchHiddenApps(config: SifaApiConfig, options?: FetchHiddenAppsOptions): Promise<HiddenApp[]>;
595
595
 
596
+ /** One account attached to the current browser, for the account switcher. */
597
+ interface AccountSummary {
598
+ did: string;
599
+ handle: string | null;
600
+ displayName: string | null;
601
+ avatarUrl: string | null;
602
+ /** Whether this is the currently-active account. */
603
+ active: boolean;
604
+ }
605
+ interface FetchAccountsOptions extends ApiFetchOptions {
606
+ /**
607
+ * Pass the caller's `Cookie` header on Next.js RSC server-side calls.
608
+ * `credentials: 'include'` does NOT propagate browser cookies in RSC,
609
+ * so authenticated server fetches must forward the header explicitly.
610
+ */
611
+ cookieHeader?: string;
612
+ }
613
+ /**
614
+ * Accounts attached to this browser (the account switcher). Requires an
615
+ * authenticated session. Returns `[]` on any error, including the
616
+ * unauthenticated case.
617
+ */
618
+ declare function fetchAccounts(config: SifaApiConfig, options?: FetchAccountsOptions): Promise<AccountSummary[]>;
619
+ /**
620
+ * Make an already-attached account the active one. Keyed by DID (public); the
621
+ * server maps it to the browser's session id. Browser-only: the endpoint
622
+ * requires an Origin header, which browsers set automatically on POST. Callers
623
+ * typically reload the app afterwards to reset session-seeded state.
624
+ */
625
+ declare function switchAccount(config: SifaApiConfig, did: string, options?: ApiFetchOptions): Promise<void>;
626
+
596
627
  /** Profile entry returned by the search endpoint. */
597
628
  interface ProfileSearchResult {
598
629
  did?: string;
@@ -1532,6 +1563,10 @@ declare const sifaQueryKeys: {
1532
1563
  readonly registry: () => readonly ["sifa", "apps", "registry"];
1533
1564
  readonly hidden: () => readonly ["sifa", "apps", "hidden"];
1534
1565
  };
1566
+ readonly auth: {
1567
+ readonly all: () => readonly ["sifa", "auth"];
1568
+ readonly accounts: () => readonly ["sifa", "auth", "accounts"];
1569
+ };
1535
1570
  readonly activity: {
1536
1571
  readonly all: () => readonly ["sifa", "activity"];
1537
1572
  readonly heatmap: (handleOrDid: string, days: number) => readonly ["sifa", "activity", "heatmap", string, number];
@@ -1675,4 +1710,4 @@ declare function addOrgNotificationEmail(config: SifaApiConfig, body: OrgNotific
1675
1710
  */
1676
1711
  declare function removeOrgNotificationEmail(config: SifaApiConfig, body: OrgNotificationEmailRequestInput, options?: Omit<ApiFetchOptions, 'method' | 'body'>): Promise<WriteResult & Partial<OrgNotificationEmailRemoveResult>>;
1677
1712
 
1678
- export { type ListFeatureAllowlistOptions as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CreateResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FetchReactionStatusOptions as G, type FetchSuggestionsOptions as H, type FilterOptions as I, type FollowListPage as J, type FollowProfile as K, type FollowProfilePageResponse as L, type FollowUserResult as M, type FollowingResponse as N, type GetAdminReviewQueuesOptions as O, type GithubPullRequest as P, type GivenConfirmation as Q, HIDDEN_ITEM_SOURCES as R, type SifaApiConfig as S, HIDDEN_ITEM_TYPES as T, type HeatmapDay as U, type HeatmapResponse as V, type WriteResult as W, type HiddenApp as X, type HiddenItemSource as Y, type HiddenItemType as Z, type HideProfileItemInput as _, type ConfirmEndorsementInput as a, createEndorsement as a$, type MyGithubPullRequestsResponse as a0, type OrgClaimBinding as a1, type OrgClaimResult as a2, type OrgDomainChallengeResult as a3, type OrgDomainVerifyResult as a4, type OrgNotificationEmailAddResult as a5, type OrgNotificationEmailRemoveResult as a6, type OrgProfileEcho as a7, type OrgProfileUpdateResult as a8, type PdsWipeOutcome as a9, type SifaQueryKey as aA, type SimilarProfile as aB, type SkillSearchResult as aC, type StatsResponse as aD, type SubCategoryBulkResult as aE, type SuggestionProfile as aF, type SuggestionsResponse as aG, type UpdateProfileOverrideInput as aH, type UpdateProfileSelfInput as aI, type UploadAvatarResult as aJ, type UploadPronunciationAudioResult as aK, type VerifyExternalAccountResult as aL, type WipePreview as aM, addFeatureAllowlist as aN, addOrgNotificationEmail as aO, apiFetch as aP, apiFetchOrNull as aQ, apiWrite as aR, apiWriteCreate as aS, bulkHideProfileItems as aT, bulkHideStandardPublications as aU, bulkUnhideProfileItems as aV, bulkUnhideStandardPublications as aW, castRoadmapVote as aX, checkAppAccount as aY, confirmEndorsement as aZ, createConfirmation as a_, type PendingConfirmation as aa, type PendingConfirmationsPage as ab, type ProfileIndustryInput as ac, type ProfileLocationAddress as ad, type ProfileLocationInput as ae, type ProfileSearchResult as af, type ProfileSelfLocation as ag, QUOTED_POSTS_BATCH_MAX as ah, type QuotedPostAuthor as ai, type QuotedPostImage as aj, type QuotedPostResult as ak, type QuotedPostView as al, type ReactionError as am, type ReactionResult as an, type ReactionStatus as ao, type RefreshOrcidPublicationsResult as ap, type RefreshPdsResult as aq, type RepoDeleteInput as ar, type ResetProfileResult as as, type ResolveQuotedPostsOptions as at, type RoadmapVoteError as au, type RoadmapVoteResult as av, type RoadmapVoter as aw, type RoadmapVotesResponse as ax, type SearchFilters as ay, type SearchResponse as az, type ConfirmEndorsementResult as b, unhideProfileItem as b$, createExternalAccount as b0, createProfileLocation as b1, createReaction as b2, createSkill as b3, deleteAccount as b4, deleteAvatarOverride as b5, deleteExternalAccount as b6, deleteNamePronunciationAudio as b7, deleteProfileLocation as b8, deleteReaction as b9, followUser as bA, getAdminReviewQueues as bB, getBlueskySuggestions as bC, getFollowers as bD, getFollowing as bE, getFollowingFeed as bF, getMutuals as bG, hideOrcidPublication as bH, hideProfileItem as bI, hideSifaPublication as bJ, hideStandardPublication as bK, listFeatureAllowlist as bL, refreshOrcidPublications as bM, refreshPds as bN, removeFeatureAllowlist as bO, removeOrgNotificationEmail as bP, repoExportUrl as bQ, requestOrgDomainChallenge as bR, resetProfile as bS, resolveQuotedPosts as bT, retractRoadmapVote as bU, revokeConfirmation as bV, searchSkills as bW, setExternalAccountPrimary as bX, submitOrgClaim as bY, unfollowUser as bZ, unhideOrcidPublication as b_, deleteRepoRecords as ba, deleteSkill as bb, dismissConfirmation as bc, fetchActivityFeed as bd, fetchActivityTeaser as be, fetchAppsRegistry as bf, fetchExternalAccounts as bg, fetchFeaturedProfile as bh, fetchFollowing as bi, fetchGivenConfirmations as bj, fetchHeatmapData as bk, fetchHiddenApps as bl, fetchMyGithubPullRequests as bm, fetchMyRoadmapVotes as bn, fetchPendingConfirmations as bo, fetchReactionStatus as bp, fetchRepoInventory as bq, fetchRoadmapVotes as br, fetchSearchFilters as bs, fetchSearchProfiles as bt, fetchSimilarProfiles as bu, fetchSkillSuggestions as bv, fetchStats as bw, fetchSuggestionCount as bx, fetchSuggestions as by, fetchWipePreview as bz, type AccountCheckResult as c, unhideSifaPublication as c0, unhideStandardPublication as c1, unsetExternalAccountPrimary as c2, updateExternalAccount as c3, updateOrgProfile as c4, updateProfileLocation as c5, updateProfileOverride as c6, updateProfileSelf as c7, updateSkill as c8, updateSkillSubCategories as c9, uploadAvatar as ca, uploadNamePronunciationAudio as cb, verifyExternalAccount as cc, verifyOrgDomain as cd, type CompanySearchFilters as ce, type CompanySearchResponse as cf, type CompanySearchResult as cg, fetchSearchCompanies as ch, type ActivityFeedResponse as d, type ActivityItem as e, type ActivityItemLinkHealth as f, type ActivityTeaserResponse as g, type AdminReviewQueues as h, ApiError as i, type AppRegistryEntry as j, type CastRoadmapVoteResult as k, type CheckAppAccountOptions as l, type ConfirmationInput as m, type ConfirmationSubjectInput as n, type CreateExternalAccountResult as o, type ExternalAccountInput as p, type FeaturedProfile as q, type FetchActivityFeedOptions as r, sifaQueryKeys as s, type FetchActivityTeaserOptions as t, type FetchFollowListOptions as u, type FetchFollowProfilePageOptions as v, type FetchFollowingFeedOptions as w, type FetchHiddenAppsOptions as x, type FetchMyGithubPullRequestsOptions as y, type FetchMyRoadmapVotesOptions as z };
1713
+ export { type HiddenItemType as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CreateResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FetchMyGithubPullRequestsOptions as G, type FetchMyRoadmapVotesOptions as H, type FetchReactionStatusOptions as I, type FetchSuggestionsOptions as J, type FilterOptions as K, type FollowListPage as L, type FollowProfile as M, type FollowProfilePageResponse as N, type FollowUserResult as O, type FollowingResponse as P, type GetAdminReviewQueuesOptions as Q, type GithubPullRequest as R, type SifaApiConfig as S, type GivenConfirmation as T, HIDDEN_ITEM_SOURCES as U, HIDDEN_ITEM_TYPES as V, type WriteResult as W, type HeatmapDay as X, type HeatmapResponse as Y, type HiddenApp as Z, type HiddenItemSource as _, type ConfirmEndorsementInput as a, confirmEndorsement as a$, type HideProfileItemInput as a0, type ListFeatureAllowlistOptions as a1, type MyGithubPullRequestsResponse as a2, type OrgClaimBinding as a3, type OrgClaimResult as a4, type OrgDomainChallengeResult as a5, type OrgDomainVerifyResult as a6, type OrgNotificationEmailAddResult as a7, type OrgNotificationEmailRemoveResult as a8, type OrgProfileEcho as a9, type SearchFilters as aA, type SearchResponse as aB, type SifaQueryKey as aC, type SimilarProfile as aD, type SkillSearchResult as aE, type StatsResponse as aF, type SubCategoryBulkResult as aG, type SuggestionProfile as aH, type SuggestionsResponse as aI, type UpdateProfileOverrideInput as aJ, type UpdateProfileSelfInput as aK, type UploadAvatarResult as aL, type UploadPronunciationAudioResult as aM, type VerifyExternalAccountResult as aN, type WipePreview as aO, addFeatureAllowlist as aP, addOrgNotificationEmail as aQ, apiFetch as aR, apiFetchOrNull as aS, apiWrite as aT, apiWriteCreate as aU, bulkHideProfileItems as aV, bulkHideStandardPublications as aW, bulkUnhideProfileItems as aX, bulkUnhideStandardPublications as aY, castRoadmapVote as aZ, checkAppAccount as a_, type OrgProfileUpdateResult as aa, type PdsWipeOutcome as ab, type PendingConfirmation as ac, type PendingConfirmationsPage as ad, type ProfileIndustryInput as ae, type ProfileLocationAddress as af, type ProfileLocationInput as ag, type ProfileSearchResult as ah, type ProfileSelfLocation as ai, QUOTED_POSTS_BATCH_MAX as aj, type QuotedPostAuthor as ak, type QuotedPostImage as al, type QuotedPostResult as am, type QuotedPostView as an, type ReactionError as ao, type ReactionResult as ap, type ReactionStatus as aq, type RefreshOrcidPublicationsResult as ar, type RefreshPdsResult as as, type RepoDeleteInput as at, type ResetProfileResult as au, type ResolveQuotedPostsOptions as av, type RoadmapVoteError as aw, type RoadmapVoteResult as ax, type RoadmapVoter as ay, type RoadmapVotesResponse as az, type ConfirmEndorsementResult as b, submitOrgClaim as b$, createConfirmation as b0, createEndorsement as b1, createExternalAccount as b2, createProfileLocation as b3, createReaction as b4, createSkill as b5, deleteAccount as b6, deleteAvatarOverride as b7, deleteExternalAccount as b8, deleteNamePronunciationAudio as b9, fetchSuggestionCount as bA, fetchSuggestions as bB, fetchWipePreview as bC, followUser as bD, getAdminReviewQueues as bE, getBlueskySuggestions as bF, getFollowers as bG, getFollowing as bH, getFollowingFeed as bI, getMutuals as bJ, hideOrcidPublication as bK, hideProfileItem as bL, hideSifaPublication as bM, hideStandardPublication as bN, listFeatureAllowlist as bO, refreshOrcidPublications as bP, refreshPds as bQ, removeFeatureAllowlist as bR, removeOrgNotificationEmail as bS, repoExportUrl as bT, requestOrgDomainChallenge as bU, resetProfile as bV, resolveQuotedPosts as bW, retractRoadmapVote as bX, revokeConfirmation as bY, searchSkills as bZ, setExternalAccountPrimary as b_, deleteProfileLocation as ba, deleteReaction as bb, deleteRepoRecords as bc, deleteSkill as bd, dismissConfirmation as be, fetchAccounts as bf, fetchActivityFeed as bg, fetchActivityTeaser as bh, fetchAppsRegistry as bi, fetchExternalAccounts as bj, fetchFeaturedProfile as bk, fetchFollowing as bl, fetchGivenConfirmations as bm, fetchHeatmapData as bn, fetchHiddenApps as bo, fetchMyGithubPullRequests as bp, fetchMyRoadmapVotes as bq, fetchPendingConfirmations as br, fetchReactionStatus as bs, fetchRepoInventory as bt, fetchRoadmapVotes as bu, fetchSearchFilters as bv, fetchSearchProfiles as bw, fetchSimilarProfiles as bx, fetchSkillSuggestions as by, fetchStats as bz, type AccountCheckResult as c, switchAccount as c0, unfollowUser as c1, unhideOrcidPublication as c2, unhideProfileItem as c3, unhideSifaPublication as c4, unhideStandardPublication as c5, unsetExternalAccountPrimary as c6, updateExternalAccount as c7, updateOrgProfile as c8, updateProfileLocation as c9, updateProfileOverride as ca, updateProfileSelf as cb, updateSkill as cc, updateSkillSubCategories as cd, uploadAvatar as ce, uploadNamePronunciationAudio as cf, verifyExternalAccount as cg, verifyOrgDomain as ch, type CompanySearchFilters as ci, type CompanySearchResponse as cj, type CompanySearchResult as ck, fetchSearchCompanies as cl, type AccountSummary as d, type ActivityFeedResponse as e, type ActivityItem as f, type ActivityItemLinkHealth as g, type ActivityTeaserResponse as h, type AdminReviewQueues as i, ApiError as j, type AppRegistryEntry as k, type CastRoadmapVoteResult as l, type CheckAppAccountOptions as m, type ConfirmationInput as n, type ConfirmationSubjectInput as o, type CreateExternalAccountResult as p, type ExternalAccountInput as q, type FeaturedProfile as r, sifaQueryKeys as s, type FetchAccountsOptions as t, type FetchActivityFeedOptions as u, type FetchActivityTeaserOptions as v, type FetchFollowListOptions as w, type FetchFollowProfilePageOptions as x, type FetchFollowingFeedOptions as y, type FetchHiddenAppsOptions as z };
@@ -593,6 +593,37 @@ declare function fetchAppsRegistry(config: SifaApiConfig, options?: ApiFetchOpti
593
593
  */
594
594
  declare function fetchHiddenApps(config: SifaApiConfig, options?: FetchHiddenAppsOptions): Promise<HiddenApp[]>;
595
595
 
596
+ /** One account attached to the current browser, for the account switcher. */
597
+ interface AccountSummary {
598
+ did: string;
599
+ handle: string | null;
600
+ displayName: string | null;
601
+ avatarUrl: string | null;
602
+ /** Whether this is the currently-active account. */
603
+ active: boolean;
604
+ }
605
+ interface FetchAccountsOptions extends ApiFetchOptions {
606
+ /**
607
+ * Pass the caller's `Cookie` header on Next.js RSC server-side calls.
608
+ * `credentials: 'include'` does NOT propagate browser cookies in RSC,
609
+ * so authenticated server fetches must forward the header explicitly.
610
+ */
611
+ cookieHeader?: string;
612
+ }
613
+ /**
614
+ * Accounts attached to this browser (the account switcher). Requires an
615
+ * authenticated session. Returns `[]` on any error, including the
616
+ * unauthenticated case.
617
+ */
618
+ declare function fetchAccounts(config: SifaApiConfig, options?: FetchAccountsOptions): Promise<AccountSummary[]>;
619
+ /**
620
+ * Make an already-attached account the active one. Keyed by DID (public); the
621
+ * server maps it to the browser's session id. Browser-only: the endpoint
622
+ * requires an Origin header, which browsers set automatically on POST. Callers
623
+ * typically reload the app afterwards to reset session-seeded state.
624
+ */
625
+ declare function switchAccount(config: SifaApiConfig, did: string, options?: ApiFetchOptions): Promise<void>;
626
+
596
627
  /** Profile entry returned by the search endpoint. */
597
628
  interface ProfileSearchResult {
598
629
  did?: string;
@@ -1532,6 +1563,10 @@ declare const sifaQueryKeys: {
1532
1563
  readonly registry: () => readonly ["sifa", "apps", "registry"];
1533
1564
  readonly hidden: () => readonly ["sifa", "apps", "hidden"];
1534
1565
  };
1566
+ readonly auth: {
1567
+ readonly all: () => readonly ["sifa", "auth"];
1568
+ readonly accounts: () => readonly ["sifa", "auth", "accounts"];
1569
+ };
1535
1570
  readonly activity: {
1536
1571
  readonly all: () => readonly ["sifa", "activity"];
1537
1572
  readonly heatmap: (handleOrDid: string, days: number) => readonly ["sifa", "activity", "heatmap", string, number];
@@ -1675,4 +1710,4 @@ declare function addOrgNotificationEmail(config: SifaApiConfig, body: OrgNotific
1675
1710
  */
1676
1711
  declare function removeOrgNotificationEmail(config: SifaApiConfig, body: OrgNotificationEmailRequestInput, options?: Omit<ApiFetchOptions, 'method' | 'body'>): Promise<WriteResult & Partial<OrgNotificationEmailRemoveResult>>;
1677
1712
 
1678
- export { type ListFeatureAllowlistOptions as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CreateResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FetchReactionStatusOptions as G, type FetchSuggestionsOptions as H, type FilterOptions as I, type FollowListPage as J, type FollowProfile as K, type FollowProfilePageResponse as L, type FollowUserResult as M, type FollowingResponse as N, type GetAdminReviewQueuesOptions as O, type GithubPullRequest as P, type GivenConfirmation as Q, HIDDEN_ITEM_SOURCES as R, type SifaApiConfig as S, HIDDEN_ITEM_TYPES as T, type HeatmapDay as U, type HeatmapResponse as V, type WriteResult as W, type HiddenApp as X, type HiddenItemSource as Y, type HiddenItemType as Z, type HideProfileItemInput as _, type ConfirmEndorsementInput as a, createEndorsement as a$, type MyGithubPullRequestsResponse as a0, type OrgClaimBinding as a1, type OrgClaimResult as a2, type OrgDomainChallengeResult as a3, type OrgDomainVerifyResult as a4, type OrgNotificationEmailAddResult as a5, type OrgNotificationEmailRemoveResult as a6, type OrgProfileEcho as a7, type OrgProfileUpdateResult as a8, type PdsWipeOutcome as a9, type SifaQueryKey as aA, type SimilarProfile as aB, type SkillSearchResult as aC, type StatsResponse as aD, type SubCategoryBulkResult as aE, type SuggestionProfile as aF, type SuggestionsResponse as aG, type UpdateProfileOverrideInput as aH, type UpdateProfileSelfInput as aI, type UploadAvatarResult as aJ, type UploadPronunciationAudioResult as aK, type VerifyExternalAccountResult as aL, type WipePreview as aM, addFeatureAllowlist as aN, addOrgNotificationEmail as aO, apiFetch as aP, apiFetchOrNull as aQ, apiWrite as aR, apiWriteCreate as aS, bulkHideProfileItems as aT, bulkHideStandardPublications as aU, bulkUnhideProfileItems as aV, bulkUnhideStandardPublications as aW, castRoadmapVote as aX, checkAppAccount as aY, confirmEndorsement as aZ, createConfirmation as a_, type PendingConfirmation as aa, type PendingConfirmationsPage as ab, type ProfileIndustryInput as ac, type ProfileLocationAddress as ad, type ProfileLocationInput as ae, type ProfileSearchResult as af, type ProfileSelfLocation as ag, QUOTED_POSTS_BATCH_MAX as ah, type QuotedPostAuthor as ai, type QuotedPostImage as aj, type QuotedPostResult as ak, type QuotedPostView as al, type ReactionError as am, type ReactionResult as an, type ReactionStatus as ao, type RefreshOrcidPublicationsResult as ap, type RefreshPdsResult as aq, type RepoDeleteInput as ar, type ResetProfileResult as as, type ResolveQuotedPostsOptions as at, type RoadmapVoteError as au, type RoadmapVoteResult as av, type RoadmapVoter as aw, type RoadmapVotesResponse as ax, type SearchFilters as ay, type SearchResponse as az, type ConfirmEndorsementResult as b, unhideProfileItem as b$, createExternalAccount as b0, createProfileLocation as b1, createReaction as b2, createSkill as b3, deleteAccount as b4, deleteAvatarOverride as b5, deleteExternalAccount as b6, deleteNamePronunciationAudio as b7, deleteProfileLocation as b8, deleteReaction as b9, followUser as bA, getAdminReviewQueues as bB, getBlueskySuggestions as bC, getFollowers as bD, getFollowing as bE, getFollowingFeed as bF, getMutuals as bG, hideOrcidPublication as bH, hideProfileItem as bI, hideSifaPublication as bJ, hideStandardPublication as bK, listFeatureAllowlist as bL, refreshOrcidPublications as bM, refreshPds as bN, removeFeatureAllowlist as bO, removeOrgNotificationEmail as bP, repoExportUrl as bQ, requestOrgDomainChallenge as bR, resetProfile as bS, resolveQuotedPosts as bT, retractRoadmapVote as bU, revokeConfirmation as bV, searchSkills as bW, setExternalAccountPrimary as bX, submitOrgClaim as bY, unfollowUser as bZ, unhideOrcidPublication as b_, deleteRepoRecords as ba, deleteSkill as bb, dismissConfirmation as bc, fetchActivityFeed as bd, fetchActivityTeaser as be, fetchAppsRegistry as bf, fetchExternalAccounts as bg, fetchFeaturedProfile as bh, fetchFollowing as bi, fetchGivenConfirmations as bj, fetchHeatmapData as bk, fetchHiddenApps as bl, fetchMyGithubPullRequests as bm, fetchMyRoadmapVotes as bn, fetchPendingConfirmations as bo, fetchReactionStatus as bp, fetchRepoInventory as bq, fetchRoadmapVotes as br, fetchSearchFilters as bs, fetchSearchProfiles as bt, fetchSimilarProfiles as bu, fetchSkillSuggestions as bv, fetchStats as bw, fetchSuggestionCount as bx, fetchSuggestions as by, fetchWipePreview as bz, type AccountCheckResult as c, unhideSifaPublication as c0, unhideStandardPublication as c1, unsetExternalAccountPrimary as c2, updateExternalAccount as c3, updateOrgProfile as c4, updateProfileLocation as c5, updateProfileOverride as c6, updateProfileSelf as c7, updateSkill as c8, updateSkillSubCategories as c9, uploadAvatar as ca, uploadNamePronunciationAudio as cb, verifyExternalAccount as cc, verifyOrgDomain as cd, type CompanySearchFilters as ce, type CompanySearchResponse as cf, type CompanySearchResult as cg, fetchSearchCompanies as ch, type ActivityFeedResponse as d, type ActivityItem as e, type ActivityItemLinkHealth as f, type ActivityTeaserResponse as g, type AdminReviewQueues as h, ApiError as i, type AppRegistryEntry as j, type CastRoadmapVoteResult as k, type CheckAppAccountOptions as l, type ConfirmationInput as m, type ConfirmationSubjectInput as n, type CreateExternalAccountResult as o, type ExternalAccountInput as p, type FeaturedProfile as q, type FetchActivityFeedOptions as r, sifaQueryKeys as s, type FetchActivityTeaserOptions as t, type FetchFollowListOptions as u, type FetchFollowProfilePageOptions as v, type FetchFollowingFeedOptions as w, type FetchHiddenAppsOptions as x, type FetchMyGithubPullRequestsOptions as y, type FetchMyRoadmapVotesOptions as z };
1713
+ export { type HiddenItemType as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CreateResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FetchMyGithubPullRequestsOptions as G, type FetchMyRoadmapVotesOptions as H, type FetchReactionStatusOptions as I, type FetchSuggestionsOptions as J, type FilterOptions as K, type FollowListPage as L, type FollowProfile as M, type FollowProfilePageResponse as N, type FollowUserResult as O, type FollowingResponse as P, type GetAdminReviewQueuesOptions as Q, type GithubPullRequest as R, type SifaApiConfig as S, type GivenConfirmation as T, HIDDEN_ITEM_SOURCES as U, HIDDEN_ITEM_TYPES as V, type WriteResult as W, type HeatmapDay as X, type HeatmapResponse as Y, type HiddenApp as Z, type HiddenItemSource as _, type ConfirmEndorsementInput as a, confirmEndorsement as a$, type HideProfileItemInput as a0, type ListFeatureAllowlistOptions as a1, type MyGithubPullRequestsResponse as a2, type OrgClaimBinding as a3, type OrgClaimResult as a4, type OrgDomainChallengeResult as a5, type OrgDomainVerifyResult as a6, type OrgNotificationEmailAddResult as a7, type OrgNotificationEmailRemoveResult as a8, type OrgProfileEcho as a9, type SearchFilters as aA, type SearchResponse as aB, type SifaQueryKey as aC, type SimilarProfile as aD, type SkillSearchResult as aE, type StatsResponse as aF, type SubCategoryBulkResult as aG, type SuggestionProfile as aH, type SuggestionsResponse as aI, type UpdateProfileOverrideInput as aJ, type UpdateProfileSelfInput as aK, type UploadAvatarResult as aL, type UploadPronunciationAudioResult as aM, type VerifyExternalAccountResult as aN, type WipePreview as aO, addFeatureAllowlist as aP, addOrgNotificationEmail as aQ, apiFetch as aR, apiFetchOrNull as aS, apiWrite as aT, apiWriteCreate as aU, bulkHideProfileItems as aV, bulkHideStandardPublications as aW, bulkUnhideProfileItems as aX, bulkUnhideStandardPublications as aY, castRoadmapVote as aZ, checkAppAccount as a_, type OrgProfileUpdateResult as aa, type PdsWipeOutcome as ab, type PendingConfirmation as ac, type PendingConfirmationsPage as ad, type ProfileIndustryInput as ae, type ProfileLocationAddress as af, type ProfileLocationInput as ag, type ProfileSearchResult as ah, type ProfileSelfLocation as ai, QUOTED_POSTS_BATCH_MAX as aj, type QuotedPostAuthor as ak, type QuotedPostImage as al, type QuotedPostResult as am, type QuotedPostView as an, type ReactionError as ao, type ReactionResult as ap, type ReactionStatus as aq, type RefreshOrcidPublicationsResult as ar, type RefreshPdsResult as as, type RepoDeleteInput as at, type ResetProfileResult as au, type ResolveQuotedPostsOptions as av, type RoadmapVoteError as aw, type RoadmapVoteResult as ax, type RoadmapVoter as ay, type RoadmapVotesResponse as az, type ConfirmEndorsementResult as b, submitOrgClaim as b$, createConfirmation as b0, createEndorsement as b1, createExternalAccount as b2, createProfileLocation as b3, createReaction as b4, createSkill as b5, deleteAccount as b6, deleteAvatarOverride as b7, deleteExternalAccount as b8, deleteNamePronunciationAudio as b9, fetchSuggestionCount as bA, fetchSuggestions as bB, fetchWipePreview as bC, followUser as bD, getAdminReviewQueues as bE, getBlueskySuggestions as bF, getFollowers as bG, getFollowing as bH, getFollowingFeed as bI, getMutuals as bJ, hideOrcidPublication as bK, hideProfileItem as bL, hideSifaPublication as bM, hideStandardPublication as bN, listFeatureAllowlist as bO, refreshOrcidPublications as bP, refreshPds as bQ, removeFeatureAllowlist as bR, removeOrgNotificationEmail as bS, repoExportUrl as bT, requestOrgDomainChallenge as bU, resetProfile as bV, resolveQuotedPosts as bW, retractRoadmapVote as bX, revokeConfirmation as bY, searchSkills as bZ, setExternalAccountPrimary as b_, deleteProfileLocation as ba, deleteReaction as bb, deleteRepoRecords as bc, deleteSkill as bd, dismissConfirmation as be, fetchAccounts as bf, fetchActivityFeed as bg, fetchActivityTeaser as bh, fetchAppsRegistry as bi, fetchExternalAccounts as bj, fetchFeaturedProfile as bk, fetchFollowing as bl, fetchGivenConfirmations as bm, fetchHeatmapData as bn, fetchHiddenApps as bo, fetchMyGithubPullRequests as bp, fetchMyRoadmapVotes as bq, fetchPendingConfirmations as br, fetchReactionStatus as bs, fetchRepoInventory as bt, fetchRoadmapVotes as bu, fetchSearchFilters as bv, fetchSearchProfiles as bw, fetchSimilarProfiles as bx, fetchSkillSuggestions as by, fetchStats as bz, type AccountCheckResult as c, switchAccount as c0, unfollowUser as c1, unhideOrcidPublication as c2, unhideProfileItem as c3, unhideSifaPublication as c4, unhideStandardPublication as c5, unsetExternalAccountPrimary as c6, updateExternalAccount as c7, updateOrgProfile as c8, updateProfileLocation as c9, updateProfileOverride as ca, updateProfileSelf as cb, updateSkill as cc, updateSkillSubCategories as cd, uploadAvatar as ce, uploadNamePronunciationAudio as cf, verifyExternalAccount as cg, verifyOrgDomain as ch, type CompanySearchFilters as ci, type CompanySearchResponse as cj, type CompanySearchResult as ck, fetchSearchCompanies as cl, type AccountSummary as d, type ActivityFeedResponse as e, type ActivityItem as f, type ActivityItemLinkHealth as g, type ActivityTeaserResponse as h, type AdminReviewQueues as i, ApiError as j, type AppRegistryEntry as k, type CastRoadmapVoteResult as l, type CheckAppAccountOptions as m, type ConfirmationInput as n, type ConfirmationSubjectInput as o, type CreateExternalAccountResult as p, type ExternalAccountInput as q, type FeaturedProfile as r, sifaQueryKeys as s, type FetchAccountsOptions as t, type FetchActivityFeedOptions as u, type FetchActivityTeaserOptions as v, type FetchFollowListOptions as w, type FetchFollowProfilePageOptions as x, type FetchFollowingFeedOptions as y, type FetchHiddenAppsOptions as z };
@@ -661,6 +661,30 @@ async function fetchHiddenApps(config, options = {}) {
661
661
  }
662
662
  }
663
663
 
664
+ // src/query/fetchers/accounts.ts
665
+ async function fetchAccounts(config, options = {}) {
666
+ const headers = { ...options.headers ?? {} };
667
+ if (options.cookieHeader) headers.cookie = options.cookieHeader;
668
+ try {
669
+ const data = await apiFetch(config, "/api/auth/accounts", {
670
+ credentials: "include",
671
+ ...options,
672
+ headers
673
+ });
674
+ return data.accounts;
675
+ } catch {
676
+ return [];
677
+ }
678
+ }
679
+ async function switchAccount(config, did, options = {}) {
680
+ await apiFetch(config, "/oauth/switch", {
681
+ method: "POST",
682
+ body: { did },
683
+ credentials: "include",
684
+ ...options
685
+ });
686
+ }
687
+
664
688
  // src/query/fetchers/search.ts
665
689
  var EMPTY_SEARCH = { profiles: [], total: 0, limit: 20, offset: 0 };
666
690
  var EMPTY_FILTERS = { countries: [], industries: [], apps: [], openTo: [] };
@@ -1572,6 +1596,12 @@ var sifaQueryKeys = {
1572
1596
  registry: () => ["sifa", "apps", "registry"],
1573
1597
  hidden: () => ["sifa", "apps", "hidden"]
1574
1598
  },
1599
+ auth: {
1600
+ all: () => ["sifa", "auth"],
1601
+ // Session-scoped: the AppView reads the account list from the browser's
1602
+ // cookies, so there is only ever one list per client.
1603
+ accounts: () => ["sifa", "auth", "accounts"]
1604
+ },
1575
1605
  activity: {
1576
1606
  all: () => ["sifa", "activity"],
1577
1607
  heatmap: (handleOrDid, days) => ["sifa", "activity", "heatmap", handleOrDid, days],
@@ -1807,6 +1837,7 @@ exports.deleteRepoRecords = deleteRepoRecords;
1807
1837
  exports.deleteSkill = deleteSkill;
1808
1838
  exports.dismissConfirmation = dismissConfirmation;
1809
1839
  exports.dismissEndorsement = dismissEndorsement;
1840
+ exports.fetchAccounts = fetchAccounts;
1810
1841
  exports.fetchActivityFeed = fetchActivityFeed;
1811
1842
  exports.fetchActivityTeaser = fetchActivityTeaser;
1812
1843
  exports.fetchAppsRegistry = fetchAppsRegistry;
@@ -1876,6 +1907,7 @@ exports.setExternalAccountPrimary = setExternalAccountPrimary;
1876
1907
  exports.setPositionPrimary = setPositionPrimary;
1877
1908
  exports.sifaQueryKeys = sifaQueryKeys;
1878
1909
  exports.submitOrgClaim = submitOrgClaim;
1910
+ exports.switchAccount = switchAccount;
1879
1911
  exports.unfollowUser = unfollowUser;
1880
1912
  exports.unhideKeytraceClaim = unhideKeytraceClaim;
1881
1913
  exports.unhideOrcidPublication = unhideOrcidPublication;