@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 +1 -1
- package/dist/index.js +1 -1
- package/dist/{network-map-y6U7m-hX.d.cts → network-map-BcugllI5.d.cts} +1 -1
- package/dist/{network-map-GfIVEYpr.d.ts → network-map-C3KyOHRU.d.ts} +1 -1
- package/dist/{org-ClDqS3CM.d.cts → org-DCHb1xhw.d.cts} +36 -1
- package/dist/{org-GlACA06R.d.ts → org-zMZg_r7v.d.ts} +36 -1
- package/dist/query/fetchers/index.cjs +32 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +3 -3
- package/dist/query/fetchers/index.d.ts +3 -3
- package/dist/query/fetchers/index.js +31 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +33 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +3 -3
- package/dist/query/hooks/index.d.ts +3 -3
- package/dist/query/hooks/index.js +33 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +41 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/query/index.js +39 -1
- package/dist/query/index.js.map +1 -1
- package/dist/{use-org-notification-emails-DGzW9MH6.d.ts → use-org-notification-emails-Bt-h3SAB.d.ts} +9 -2
- package/dist/{use-org-notification-emails-B-oGiDHo.d.cts → use-org-notification-emails-ByAvxb0x.d.cts} +9 -2
- package/package.json +1 -1
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.
|
|
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.
|
|
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-
|
|
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-
|
|
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
|
|
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
|
|
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;
|