@singi-labs/sifa-sdk 0.12.3 → 0.12.5
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/{adult-content-DDGP8W1e.d.cts → adult-content-BOY_T6j3.d.cts} +295 -1
- package/dist/{adult-content-DDGP8W1e.d.ts → adult-content-BOY_T6j3.d.ts} +295 -1
- package/dist/{index-CNh-GI9A.d.cts → index-BJV2XHOP.d.cts} +16 -3
- package/dist/{index-IMvNS08M.d.ts → index-C1SIpwOj.d.ts} +16 -3
- package/dist/{index-iAzeLOcz.d.ts → index-m5MELVUQ.d.ts} +95 -3
- package/dist/{index-BS7zO7KI.d.cts → index-xcu81B4E.d.cts} +95 -3
- package/dist/index.cjs +73 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -5
- package/dist/index.d.ts +96 -5
- package/dist/index.js +68 -2
- package/dist/index.js.map +1 -1
- package/dist/{keys-Bn36IA8Q.d.cts → org-92bvwL8H.d.cts} +89 -2
- package/dist/{keys-5oyp950_.d.ts → org-Bxz__jbx.d.ts} +89 -2
- package/dist/org-settings-CmaSX5ZI.d.cts +74 -0
- package/dist/org-settings-CmaSX5ZI.d.ts +74 -0
- package/dist/query/fetchers/index.cjs +60 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +4 -3
- package/dist/query/fetchers/index.d.ts +4 -3
- package/dist/query/fetchers/index.js +54 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +144 -0
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +4 -3
- package/dist/query/hooks/index.d.ts +4 -3
- package/dist/query/hooks/index.js +137 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +147 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +6 -5
- package/dist/query/index.d.ts +6 -5
- package/dist/query/index.js +133 -1
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/index.cjs +27 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +67 -1
- package/dist/schemas/index.d.ts +67 -1
- package/dist/schemas/index.js +26 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/write/index.cjs +36 -0
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +1 -0
- package/dist/schemas/write/index.d.ts +1 -0
- package/dist/schemas/write/index.js +32 -1
- package/dist/schemas/write/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './
|
|
2
|
-
import { d as Profile, e as ProfilePosition,
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-Bxz__jbx.js';
|
|
2
|
+
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef } from './adult-content-BOY_T6j3.js';
|
|
3
3
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-D2ZV8Eaj.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -18,6 +18,19 @@ declare function fetchProfile(config: SifaApiConfig, handleOrDid: string, option
|
|
|
18
18
|
*/
|
|
19
19
|
declare function fetchAtFundLink(config: SifaApiConfig, did: string, options?: ApiFetchOptions): Promise<string | null>;
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Read the aggregated public profile view via the `id.sifa.getProfileView`
|
|
23
|
+
* XRPC query. This is the AppView-only join (positions, education, skills,
|
|
24
|
+
* endorsements, and more) exposed as a standard lexicon method, distinct from
|
|
25
|
+
* the internal `/api/profile/*` REST surface.
|
|
26
|
+
*
|
|
27
|
+
* Returns `null` when the AppView has no profile for the actor
|
|
28
|
+
* (`ProfileNotFound`). Throws {@link ApiError} on other non-2xx responses.
|
|
29
|
+
*
|
|
30
|
+
* Server-callable (Next.js RSC) and client-callable (Expo, browser).
|
|
31
|
+
*/
|
|
32
|
+
declare function fetchGetProfileView(config: SifaApiConfig, actor: string, options?: ApiFetchOptions): Promise<ProfileView | null>;
|
|
33
|
+
|
|
21
34
|
/**
|
|
22
35
|
* Create a new `id.sifa.profile.position` record on the authenticated
|
|
23
36
|
* user's PDS. The AppView signs and writes via the user's OAuth session.
|
|
@@ -258,4 +271,4 @@ declare function checkNetworkMapJobStatus(config: SifaApiConfig, jobId: string,
|
|
|
258
271
|
*/
|
|
259
272
|
declare function fetchNetworkMap(config: SifaApiConfig, options?: ApiFetchOptions): Promise<NetworkMapResponse | null>;
|
|
260
273
|
|
|
261
|
-
export {
|
|
274
|
+
export { mintEntityDomain as A, resolveEntityDomain as B, revealMarqueDomain as C, selectEntity as D, setPositionPrimary as E, type FetchNetworkStreamCountOptions as F, unhideKeytraceClaim as G, unlinkSkillFromPosition as H, unrevealMarqueDomain as I, unsetPositionPrimary as J, updateEducation as K, updatePosition as L, updateRecord as M, type NetworkMapEdge as N, updateSkill as O, type NetworkMapGenerationJob as a, type NetworkMapGraphData as b, type NetworkMapNode as c, type NetworkMapPendingJob as d, type NetworkMapResponse as e, checkNetworkMapJobStatus as f, createEducation as g, createPosition as h, createRecord as i, createSkill as j, deleteEducation as k, deletePosition as l, deleteRecord as m, deleteSkill as n, fetchAtFundLink as o, fetchEndorsementCount as p, fetchEntitySearch as q, fetchGetProfileView as r, fetchNetworkMap as s, fetchNetworkStreamCount as t, fetchProfile as u, hideKeytraceClaim as v, importSearchEntities as w, initiateNetworkMapGeneration as x, isNetworkMapResponse as y, linkSkillToPosition as z };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult,
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ad as RefreshPdsResult, ar as UpdateProfileOverrideInput, as as UpdateProfileSelfInput, at as UploadAvatarResult, j as CreateResult, a1 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, au as VerifyExternalAccountResult, E as EndorsementInput, ac as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ao as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, aj as SearchFilters, ak as SearchResponse, an as SkillSearchResult, l as FeaturedProfile, am as SimilarProfile, v as FetchSuggestionsOptions, aq as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, ab as ReactionStatus, aa as ReactionResult, a9 as ReactionError, ai as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, T as OrgClaimResult, _ as OrgProfileUpdateResult, U as OrgDomainChallengeResult, V as OrgDomainVerifyResult, X as OrgNotificationEmailAddResult, Y as OrgNotificationEmailRemoveResult } from './org-Bxz__jbx.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { d as Profile, e as ProfilePosition,
|
|
6
|
+
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef, E as ExternalAccount, S as SkillSuggestion, O as OrgFloorVerdict } from './adult-content-BOY_T6j3.js';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.js';
|
|
8
|
+
import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-CmaSX5ZI.js';
|
|
8
9
|
|
|
9
10
|
interface SifaProviderProps {
|
|
10
11
|
config: SifaApiConfig;
|
|
@@ -44,6 +45,15 @@ declare function useProfile(handleOrDid: string | undefined | null, options?: Om
|
|
|
44
45
|
*/
|
|
45
46
|
declare function useAtFundLink(did: string | undefined | null, options?: Omit<UseQueryOptions<string | null, Error, string | null, ReturnType<typeof sifaQueryKeys.profile.atFundLink>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<string | null, Error>;
|
|
46
47
|
|
|
48
|
+
/**
|
|
49
|
+
* React hook that reads the aggregated public profile view via the
|
|
50
|
+
* `id.sifa.getProfileView` XRPC query. Returns `null` data when the profile
|
|
51
|
+
* does not exist.
|
|
52
|
+
*
|
|
53
|
+
* Pass `{ enabled: false }` (or an empty `actor`) to defer the fetch.
|
|
54
|
+
*/
|
|
55
|
+
declare function useGetProfileView(actor: string | undefined | null, options?: Omit<UseQueryOptions<ProfileView | null, Error, ProfileView | null, ReturnType<typeof sifaQueryKeys.profile.view>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<NoInfer<ProfileView | null>, Error>;
|
|
56
|
+
|
|
47
57
|
/**
|
|
48
58
|
* React hook for updating the authenticated user's profile self record.
|
|
49
59
|
* On success, invalidates the owner's profile cache.
|
|
@@ -608,4 +618,86 @@ declare function useResetProfile(options?: Omit<UseMutationOptions<WriteResult,
|
|
|
608
618
|
*/
|
|
609
619
|
declare function useDeleteAccount(options?: Omit<UseMutationOptions<DeleteAccountResult, Error, boolean>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<DeleteAccountResult, Error, boolean, unknown>;
|
|
610
620
|
|
|
611
|
-
|
|
621
|
+
/**
|
|
622
|
+
* Read the server-computed org rendering-floor verdict for a handle or DID.
|
|
623
|
+
*
|
|
624
|
+
* The verdict rides the profile resolve (`GET /api/profile/:handleOrDid`), so
|
|
625
|
+
* this hook reuses the `profile.byHandle` query key -- it shares the cache with
|
|
626
|
+
* {@link useProfile} and never triggers a second round-trip. Returns
|
|
627
|
+
* `OrgFloorVerdict | null` (`null` when the profile is missing or predates the
|
|
628
|
+
* `org` field).
|
|
629
|
+
*/
|
|
630
|
+
declare function useOrgProfile(handleOrDid: string | undefined | null, options?: Omit<UseQueryOptions<Profile | null, Error, OrgFloorVerdict | null, ReturnType<typeof sifaQueryKeys.profile.byHandle>>, 'queryKey' | 'queryFn' | 'select'>): _tanstack_react_query.UseQueryResult<NoInfer<OrgFloorVerdict | null>, Error>;
|
|
631
|
+
|
|
632
|
+
type OrgClaimMutationResult = WriteResult & Partial<OrgClaimResult>;
|
|
633
|
+
/**
|
|
634
|
+
* Finalize an org profile claim (`POST /api/org/claim`). Pass the org's
|
|
635
|
+
* handle/DID so the profile cache (which carries the org floor verdict) is
|
|
636
|
+
* invalidated on success; pass `null` to skip invalidation.
|
|
637
|
+
*/
|
|
638
|
+
declare function useOrgClaim(handleOrDid: string | null, options?: Omit<UseMutationOptions<OrgClaimMutationResult, Error, OrgClaimRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgClaimResult>, Error, {
|
|
639
|
+
name: string;
|
|
640
|
+
entityRefs: string[];
|
|
641
|
+
authorityAck: true;
|
|
642
|
+
description?: string | undefined;
|
|
643
|
+
website?: string | undefined;
|
|
644
|
+
contact?: string | undefined;
|
|
645
|
+
}, unknown>;
|
|
646
|
+
|
|
647
|
+
type OrgProfileUpdateMutationResult = WriteResult & Partial<OrgProfileUpdateResult>;
|
|
648
|
+
/**
|
|
649
|
+
* Edit the org record (`PUT /api/org/profile`). Pass the org's handle/DID to
|
|
650
|
+
* invalidate the profile cache (org floor verdict + fields) on success.
|
|
651
|
+
*/
|
|
652
|
+
declare function useUpdateOrgProfile(handleOrDid: string | null, options?: Omit<UseMutationOptions<OrgProfileUpdateMutationResult, Error, OrgProfileUpdateRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgProfileUpdateResult>, Error, {
|
|
653
|
+
name: string;
|
|
654
|
+
entityRefs: string[];
|
|
655
|
+
description?: string | undefined;
|
|
656
|
+
website?: string | undefined;
|
|
657
|
+
contact?: string | undefined;
|
|
658
|
+
logo?: {
|
|
659
|
+
$type: "blob";
|
|
660
|
+
ref: {
|
|
661
|
+
$link: string;
|
|
662
|
+
};
|
|
663
|
+
mimeType: string;
|
|
664
|
+
size: number;
|
|
665
|
+
} | undefined;
|
|
666
|
+
}, unknown>;
|
|
667
|
+
|
|
668
|
+
type OrgDomainChallengeMutationResult = WriteResult & Partial<OrgDomainChallengeResult>;
|
|
669
|
+
type OrgDomainVerifyMutationResult = WriteResult & Partial<OrgDomainVerifyResult>;
|
|
670
|
+
/**
|
|
671
|
+
* Issue a one-time DNS TXT domain challenge (`POST /api/org/domains/challenge`).
|
|
672
|
+
* The result carries the TXT record name + value for the org to publish.
|
|
673
|
+
*/
|
|
674
|
+
declare function useOrgDomainChallenge(options?: Omit<UseMutationOptions<OrgDomainChallengeMutationResult, Error, OrgDomainChallengeRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgDomainChallengeResult>, Error, {
|
|
675
|
+
domain: string;
|
|
676
|
+
}, unknown>;
|
|
677
|
+
/**
|
|
678
|
+
* Verify a DNS TXT domain challenge (`POST /api/org/domains/verify`). On success
|
|
679
|
+
* `status` is `verified` or `pending`; other outcomes surface as
|
|
680
|
+
* `{ success: false }`.
|
|
681
|
+
*/
|
|
682
|
+
declare function useOrgDomainVerify(options?: Omit<UseMutationOptions<OrgDomainVerifyMutationResult, Error, OrgDomainVerifyRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgDomainVerifyResult>, Error, {
|
|
683
|
+
token: string;
|
|
684
|
+
}, unknown>;
|
|
685
|
+
|
|
686
|
+
type OrgNotificationEmailAddMutationResult = WriteResult & Partial<OrgNotificationEmailAddResult>;
|
|
687
|
+
type OrgNotificationEmailRemoveMutationResult = WriteResult & Partial<OrgNotificationEmailRemoveResult>;
|
|
688
|
+
/**
|
|
689
|
+
* Add an org notification email (`POST /api/org/notification-emails`). The
|
|
690
|
+
* address must use a domain the org controls (checked server-side). Sending is
|
|
691
|
+
* gated behind the dormant email pipeline until activated.
|
|
692
|
+
*/
|
|
693
|
+
declare function useAddOrgNotificationEmail(options?: Omit<UseMutationOptions<OrgNotificationEmailAddMutationResult, Error, OrgNotificationEmailRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgNotificationEmailAddResult>, Error, {
|
|
694
|
+
email: string;
|
|
695
|
+
}, unknown>;
|
|
696
|
+
/**
|
|
697
|
+
* Remove an org notification email (`DELETE /api/org/notification-emails`).
|
|
698
|
+
*/
|
|
699
|
+
declare function useRemoveOrgNotificationEmail(options?: Omit<UseMutationOptions<OrgNotificationEmailRemoveMutationResult, Error, OrgNotificationEmailRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgNotificationEmailRemoveResult>, Error, {
|
|
700
|
+
email: string;
|
|
701
|
+
}, unknown>;
|
|
702
|
+
|
|
703
|
+
export { useFeatureAllowlist as $, type AddFeatureAllowlistVariables as A, useCreateExternalAccount as B, type CreateReactionVariables as C, type DeleteReactionVariables as D, useCreatePosition as E, type FollowVariables as F, useCreateProfileLocation as G, useCreateReaction as H, useCreateRecord as I, useCreateSkill as J, useDebouncedValue as K, useDeleteAccount as L, useDeleteAvatarOverride as M, useDeleteEducation as N, useDeleteExternalAccount as O, type PositionSkillLinkVariables as P, useDeletePosition as Q, type RemoveFeatureAllowlistVariables as R, SifaProvider as S, useDeleteProfileLocation as T, type UnfollowVariables as U, useDeleteReaction as V, useDeleteRecord as W, useDeleteSkill as X, useEndorsementCount as Y, useEntitySearch as Z, useExternalAccounts as _, type CreateRecordVariables as a, useUpdateRecord as a$, useFeaturedProfile as a0, useFollow as a1, useFollowers as a2, useFollowing as a3, useFollowingFeed as a4, useFollowingList as a5, useGetProfileView as a6, useHeatmapData as a7, useHiddenApps as a8, useHideKeytraceClaim as a9, useSearchProfiles as aA, useSelectEntity as aB, useSetExternalAccountPrimary as aC, useSetPositionPrimary as aD, useSifaConfig as aE, useSimilarProfiles as aF, useSkillSuggestions as aG, useStats as aH, useSuggestionCount as aI, useSuggestions as aJ, useUnfollow as aK, useUnhideKeytraceClaim as aL, useUnhideOrcidPublication as aM, useUnhideProfileItem as aN, useUnhideSifaPublication as aO, useUnhideStandardPublication as aP, useUnlinkSkillFromPosition as aQ, useUnrevealMarqueDomain as aR, useUnsetExternalAccountPrimary as aS, useUnsetPositionPrimary as aT, useUpdateEducation as aU, useUpdateExternalAccount as aV, useUpdateOrgProfile as aW, useUpdatePosition as aX, useUpdateProfileLocation as aY, useUpdateProfileOverride as aZ, useUpdateProfileSelf as a_, useHideOrcidPublication as aa, useHideProfileItem as ab, useHideSifaPublication as ac, useHideStandardPublication as ad, useImportSearchEntities as ae, useLinkSkillToPosition as af, useMintEntityDomain as ag, useMutuals as ah, useMyRoadmapVotes as ai, useNetworkStreamCount as aj, useOrgClaim as ak, useOrgDomainChallenge as al, useOrgDomainVerify as am, useOrgProfile as an, useProfile as ao, useReactionStatus as ap, useRefreshOrcidPublications as aq, useRefreshPds as ar, useRemoveFeatureAllowlist as as, useRemoveOrgNotificationEmail as at, useResetProfile as au, useResolveEntityDomain as av, useRetractRoadmapVote as aw, useRevealMarqueDomain as ax, useRoadmapVotes as ay, useSearchFilters as az, type DeleteRecordVariables as b, useUpdateSkill as b0, useUploadAvatar as b1, useVerifyExternalAccount as b2, type SifaProviderProps as c, type UpdateEducationVariables as d, type UpdateExternalAccountVariables as e, type UpdatePositionVariables as f, type UpdateProfileLocationVariables as g, type UpdateRecordVariables as h, type UpdateSkillVariables as i, type UseEntitySearchOptions as j, useActivityTeaser as k, useAddFeatureAllowlist as l, useAddOrgNotificationEmail as m, useAppAccountCheck as n, useAppsRegistry as o, useAtFundLink as p, useBlueskySuggestions as q, useBulkHideProfileItems as r, useBulkHideStandardPublications as s, useBulkUnhideProfileItems as t, useActivityFeed as u, useBulkUnhideStandardPublications as v, useCanonicalSkillSearch as w, useCastRoadmapVote as x, useCreateEducation as y, useCreateEndorsement as z };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult,
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ad as RefreshPdsResult, ar as UpdateProfileOverrideInput, as as UpdateProfileSelfInput, at as UploadAvatarResult, j as CreateResult, a1 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, au as VerifyExternalAccountResult, E as EndorsementInput, ac as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, P as HideProfileItemInput, ao as StatsResponse, g as AppRegistryEntry, M as HiddenApp, w as FilterOptions, aj as SearchFilters, ak as SearchResponse, an as SkillSearchResult, l as FeaturedProfile, am as SimilarProfile, v as FetchSuggestionsOptions, aq as SuggestionsResponse, G as FollowUserResult, o as FetchFollowListOptions, x as FollowListPage, H as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, z as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, L as HeatmapResponse, a as AccountCheckResult, ab as ReactionStatus, aa as ReactionResult, a9 as ReactionError, ai as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, T as OrgClaimResult, _ as OrgProfileUpdateResult, U as OrgDomainChallengeResult, V as OrgDomainVerifyResult, X as OrgNotificationEmailAddResult, Y as OrgNotificationEmailRemoveResult } from './org-92bvwL8H.cjs';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { d as Profile, e as ProfilePosition,
|
|
6
|
+
import { d as Profile, _ as ProfileView, e as ProfilePosition, a3 as SkillRef, E as ExternalAccount, S as SkillSuggestion, O as OrgFloorVerdict } from './adult-content-BOY_T6j3.cjs';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.cjs';
|
|
8
|
+
import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-CmaSX5ZI.cjs';
|
|
8
9
|
|
|
9
10
|
interface SifaProviderProps {
|
|
10
11
|
config: SifaApiConfig;
|
|
@@ -44,6 +45,15 @@ declare function useProfile(handleOrDid: string | undefined | null, options?: Om
|
|
|
44
45
|
*/
|
|
45
46
|
declare function useAtFundLink(did: string | undefined | null, options?: Omit<UseQueryOptions<string | null, Error, string | null, ReturnType<typeof sifaQueryKeys.profile.atFundLink>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<string | null, Error>;
|
|
46
47
|
|
|
48
|
+
/**
|
|
49
|
+
* React hook that reads the aggregated public profile view via the
|
|
50
|
+
* `id.sifa.getProfileView` XRPC query. Returns `null` data when the profile
|
|
51
|
+
* does not exist.
|
|
52
|
+
*
|
|
53
|
+
* Pass `{ enabled: false }` (or an empty `actor`) to defer the fetch.
|
|
54
|
+
*/
|
|
55
|
+
declare function useGetProfileView(actor: string | undefined | null, options?: Omit<UseQueryOptions<ProfileView | null, Error, ProfileView | null, ReturnType<typeof sifaQueryKeys.profile.view>>, 'queryKey' | 'queryFn'>): _tanstack_react_query.UseQueryResult<NoInfer<ProfileView | null>, Error>;
|
|
56
|
+
|
|
47
57
|
/**
|
|
48
58
|
* React hook for updating the authenticated user's profile self record.
|
|
49
59
|
* On success, invalidates the owner's profile cache.
|
|
@@ -608,4 +618,86 @@ declare function useResetProfile(options?: Omit<UseMutationOptions<WriteResult,
|
|
|
608
618
|
*/
|
|
609
619
|
declare function useDeleteAccount(options?: Omit<UseMutationOptions<DeleteAccountResult, Error, boolean>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<DeleteAccountResult, Error, boolean, unknown>;
|
|
610
620
|
|
|
611
|
-
|
|
621
|
+
/**
|
|
622
|
+
* Read the server-computed org rendering-floor verdict for a handle or DID.
|
|
623
|
+
*
|
|
624
|
+
* The verdict rides the profile resolve (`GET /api/profile/:handleOrDid`), so
|
|
625
|
+
* this hook reuses the `profile.byHandle` query key -- it shares the cache with
|
|
626
|
+
* {@link useProfile} and never triggers a second round-trip. Returns
|
|
627
|
+
* `OrgFloorVerdict | null` (`null` when the profile is missing or predates the
|
|
628
|
+
* `org` field).
|
|
629
|
+
*/
|
|
630
|
+
declare function useOrgProfile(handleOrDid: string | undefined | null, options?: Omit<UseQueryOptions<Profile | null, Error, OrgFloorVerdict | null, ReturnType<typeof sifaQueryKeys.profile.byHandle>>, 'queryKey' | 'queryFn' | 'select'>): _tanstack_react_query.UseQueryResult<NoInfer<OrgFloorVerdict | null>, Error>;
|
|
631
|
+
|
|
632
|
+
type OrgClaimMutationResult = WriteResult & Partial<OrgClaimResult>;
|
|
633
|
+
/**
|
|
634
|
+
* Finalize an org profile claim (`POST /api/org/claim`). Pass the org's
|
|
635
|
+
* handle/DID so the profile cache (which carries the org floor verdict) is
|
|
636
|
+
* invalidated on success; pass `null` to skip invalidation.
|
|
637
|
+
*/
|
|
638
|
+
declare function useOrgClaim(handleOrDid: string | null, options?: Omit<UseMutationOptions<OrgClaimMutationResult, Error, OrgClaimRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgClaimResult>, Error, {
|
|
639
|
+
name: string;
|
|
640
|
+
entityRefs: string[];
|
|
641
|
+
authorityAck: true;
|
|
642
|
+
description?: string | undefined;
|
|
643
|
+
website?: string | undefined;
|
|
644
|
+
contact?: string | undefined;
|
|
645
|
+
}, unknown>;
|
|
646
|
+
|
|
647
|
+
type OrgProfileUpdateMutationResult = WriteResult & Partial<OrgProfileUpdateResult>;
|
|
648
|
+
/**
|
|
649
|
+
* Edit the org record (`PUT /api/org/profile`). Pass the org's handle/DID to
|
|
650
|
+
* invalidate the profile cache (org floor verdict + fields) on success.
|
|
651
|
+
*/
|
|
652
|
+
declare function useUpdateOrgProfile(handleOrDid: string | null, options?: Omit<UseMutationOptions<OrgProfileUpdateMutationResult, Error, OrgProfileUpdateRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgProfileUpdateResult>, Error, {
|
|
653
|
+
name: string;
|
|
654
|
+
entityRefs: string[];
|
|
655
|
+
description?: string | undefined;
|
|
656
|
+
website?: string | undefined;
|
|
657
|
+
contact?: string | undefined;
|
|
658
|
+
logo?: {
|
|
659
|
+
$type: "blob";
|
|
660
|
+
ref: {
|
|
661
|
+
$link: string;
|
|
662
|
+
};
|
|
663
|
+
mimeType: string;
|
|
664
|
+
size: number;
|
|
665
|
+
} | undefined;
|
|
666
|
+
}, unknown>;
|
|
667
|
+
|
|
668
|
+
type OrgDomainChallengeMutationResult = WriteResult & Partial<OrgDomainChallengeResult>;
|
|
669
|
+
type OrgDomainVerifyMutationResult = WriteResult & Partial<OrgDomainVerifyResult>;
|
|
670
|
+
/**
|
|
671
|
+
* Issue a one-time DNS TXT domain challenge (`POST /api/org/domains/challenge`).
|
|
672
|
+
* The result carries the TXT record name + value for the org to publish.
|
|
673
|
+
*/
|
|
674
|
+
declare function useOrgDomainChallenge(options?: Omit<UseMutationOptions<OrgDomainChallengeMutationResult, Error, OrgDomainChallengeRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgDomainChallengeResult>, Error, {
|
|
675
|
+
domain: string;
|
|
676
|
+
}, unknown>;
|
|
677
|
+
/**
|
|
678
|
+
* Verify a DNS TXT domain challenge (`POST /api/org/domains/verify`). On success
|
|
679
|
+
* `status` is `verified` or `pending`; other outcomes surface as
|
|
680
|
+
* `{ success: false }`.
|
|
681
|
+
*/
|
|
682
|
+
declare function useOrgDomainVerify(options?: Omit<UseMutationOptions<OrgDomainVerifyMutationResult, Error, OrgDomainVerifyRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgDomainVerifyResult>, Error, {
|
|
683
|
+
token: string;
|
|
684
|
+
}, unknown>;
|
|
685
|
+
|
|
686
|
+
type OrgNotificationEmailAddMutationResult = WriteResult & Partial<OrgNotificationEmailAddResult>;
|
|
687
|
+
type OrgNotificationEmailRemoveMutationResult = WriteResult & Partial<OrgNotificationEmailRemoveResult>;
|
|
688
|
+
/**
|
|
689
|
+
* Add an org notification email (`POST /api/org/notification-emails`). The
|
|
690
|
+
* address must use a domain the org controls (checked server-side). Sending is
|
|
691
|
+
* gated behind the dormant email pipeline until activated.
|
|
692
|
+
*/
|
|
693
|
+
declare function useAddOrgNotificationEmail(options?: Omit<UseMutationOptions<OrgNotificationEmailAddMutationResult, Error, OrgNotificationEmailRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgNotificationEmailAddResult>, Error, {
|
|
694
|
+
email: string;
|
|
695
|
+
}, unknown>;
|
|
696
|
+
/**
|
|
697
|
+
* Remove an org notification email (`DELETE /api/org/notification-emails`).
|
|
698
|
+
*/
|
|
699
|
+
declare function useRemoveOrgNotificationEmail(options?: Omit<UseMutationOptions<OrgNotificationEmailRemoveMutationResult, Error, OrgNotificationEmailRequestInput>, 'mutationFn'>): _tanstack_react_query.UseMutationResult<WriteResult & Partial<OrgNotificationEmailRemoveResult>, Error, {
|
|
700
|
+
email: string;
|
|
701
|
+
}, unknown>;
|
|
702
|
+
|
|
703
|
+
export { useFeatureAllowlist as $, type AddFeatureAllowlistVariables as A, useCreateExternalAccount as B, type CreateReactionVariables as C, type DeleteReactionVariables as D, useCreatePosition as E, type FollowVariables as F, useCreateProfileLocation as G, useCreateReaction as H, useCreateRecord as I, useCreateSkill as J, useDebouncedValue as K, useDeleteAccount as L, useDeleteAvatarOverride as M, useDeleteEducation as N, useDeleteExternalAccount as O, type PositionSkillLinkVariables as P, useDeletePosition as Q, type RemoveFeatureAllowlistVariables as R, SifaProvider as S, useDeleteProfileLocation as T, type UnfollowVariables as U, useDeleteReaction as V, useDeleteRecord as W, useDeleteSkill as X, useEndorsementCount as Y, useEntitySearch as Z, useExternalAccounts as _, type CreateRecordVariables as a, useUpdateRecord as a$, useFeaturedProfile as a0, useFollow as a1, useFollowers as a2, useFollowing as a3, useFollowingFeed as a4, useFollowingList as a5, useGetProfileView as a6, useHeatmapData as a7, useHiddenApps as a8, useHideKeytraceClaim as a9, useSearchProfiles as aA, useSelectEntity as aB, useSetExternalAccountPrimary as aC, useSetPositionPrimary as aD, useSifaConfig as aE, useSimilarProfiles as aF, useSkillSuggestions as aG, useStats as aH, useSuggestionCount as aI, useSuggestions as aJ, useUnfollow as aK, useUnhideKeytraceClaim as aL, useUnhideOrcidPublication as aM, useUnhideProfileItem as aN, useUnhideSifaPublication as aO, useUnhideStandardPublication as aP, useUnlinkSkillFromPosition as aQ, useUnrevealMarqueDomain as aR, useUnsetExternalAccountPrimary as aS, useUnsetPositionPrimary as aT, useUpdateEducation as aU, useUpdateExternalAccount as aV, useUpdateOrgProfile as aW, useUpdatePosition as aX, useUpdateProfileLocation as aY, useUpdateProfileOverride as aZ, useUpdateProfileSelf as a_, useHideOrcidPublication as aa, useHideProfileItem as ab, useHideSifaPublication as ac, useHideStandardPublication as ad, useImportSearchEntities as ae, useLinkSkillToPosition as af, useMintEntityDomain as ag, useMutuals as ah, useMyRoadmapVotes as ai, useNetworkStreamCount as aj, useOrgClaim as ak, useOrgDomainChallenge as al, useOrgDomainVerify as am, useOrgProfile as an, useProfile as ao, useReactionStatus as ap, useRefreshOrcidPublications as aq, useRefreshPds as ar, useRemoveFeatureAllowlist as as, useRemoveOrgNotificationEmail as at, useResetProfile as au, useResolveEntityDomain as av, useRetractRoadmapVote as aw, useRevealMarqueDomain as ax, useRoadmapVotes as ay, useSearchFilters as az, type DeleteRecordVariables as b, useUpdateSkill as b0, useUploadAvatar as b1, useVerifyExternalAccount as b2, type SifaProviderProps as c, type UpdateEducationVariables as d, type UpdateExternalAccountVariables as e, type UpdatePositionVariables as f, type UpdateProfileLocationVariables as g, type UpdateRecordVariables as h, type UpdateSkillVariables as i, type UseEntitySearchOptions as j, useActivityTeaser as k, useAddFeatureAllowlist as l, useAddOrgNotificationEmail as m, useAppAccountCheck as n, useAppsRegistry as o, useAtFundLink as p, useBlueskySuggestions as q, useBulkHideProfileItems as r, useBulkHideStandardPublications as s, useBulkUnhideProfileItems as t, useActivityFeed as u, useBulkUnhideStandardPublications as v, useCanonicalSkillSearch as w, useCastRoadmapVote as x, useCreateEducation as y, useCreateEndorsement as z };
|
package/dist/index.cjs
CHANGED
|
@@ -2788,6 +2788,47 @@ function isLinked(entityRef) {
|
|
|
2788
2788
|
return classifyEntityRef(entityRef) !== "unlinked";
|
|
2789
2789
|
}
|
|
2790
2790
|
|
|
2791
|
+
// src/logic/org-floor.ts
|
|
2792
|
+
var KNOWN_HANDLE_HOST_SUFFIXES = [
|
|
2793
|
+
".bsky.social",
|
|
2794
|
+
".blacksky.app",
|
|
2795
|
+
".eurosky.social",
|
|
2796
|
+
".northsky.social"
|
|
2797
|
+
];
|
|
2798
|
+
function isRegistrableDomainHandle(handle) {
|
|
2799
|
+
const h = handle.trim().toLowerCase();
|
|
2800
|
+
if (!h) return false;
|
|
2801
|
+
if (h.startsWith("did:")) return false;
|
|
2802
|
+
if (!looksLikeDomain(h)) return false;
|
|
2803
|
+
for (const suffix of KNOWN_HANDLE_HOST_SUFFIXES) {
|
|
2804
|
+
if (h.endsWith(suffix)) return false;
|
|
2805
|
+
}
|
|
2806
|
+
return true;
|
|
2807
|
+
}
|
|
2808
|
+
function qualifiesAsOrg(record, handle) {
|
|
2809
|
+
if (record === null || record === void 0) return false;
|
|
2810
|
+
return isRegistrableDomainHandle(handle);
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2813
|
+
// src/logic/company-page-indexable.ts
|
|
2814
|
+
var COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS = 2;
|
|
2815
|
+
function isNonEmptyString2(value) {
|
|
2816
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
2817
|
+
}
|
|
2818
|
+
function isPresentNumber(value) {
|
|
2819
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
2820
|
+
}
|
|
2821
|
+
function isCompanyPageIndexable(company) {
|
|
2822
|
+
if (!isNonEmptyString2(company.canonicalName)) return false;
|
|
2823
|
+
let present = 0;
|
|
2824
|
+
if (isNonEmptyString2(company.description)) present += 1;
|
|
2825
|
+
if (isNonEmptyString2(company.industry)) present += 1;
|
|
2826
|
+
if (isNonEmptyString2(company.logoUrl)) present += 1;
|
|
2827
|
+
if (isPresentNumber(company.employeeCount)) present += 1;
|
|
2828
|
+
if (isPresentNumber(company.founded) || isNonEmptyString2(company.founded)) present += 1;
|
|
2829
|
+
return present >= COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS;
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2791
2832
|
// src/profile/section-model.ts
|
|
2792
2833
|
var SECTION_GROUPS = [
|
|
2793
2834
|
{ id: "overview", labelKey: "groupOverview" },
|
|
@@ -3061,6 +3102,31 @@ var EndorsementRecordSchema = zod.z.object({
|
|
|
3061
3102
|
comment: zod.z.string().refine(maxGraphemes(300)).max(3e3).optional(),
|
|
3062
3103
|
createdAt: datetimeSchema
|
|
3063
3104
|
});
|
|
3105
|
+
var OrgProfileRecordSchema = zod.z.object({
|
|
3106
|
+
name: zod.z.string().min(1).refine(maxGraphemes(200)).max(2e3),
|
|
3107
|
+
description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
|
|
3108
|
+
/** Blob ref for the org logo (`image/png` | `image/jpeg`). Not deeply validated client-side. */
|
|
3109
|
+
logo: zod.z.unknown().optional(),
|
|
3110
|
+
website: uriSchema.optional(),
|
|
3111
|
+
entityRefs: zod.z.array(uriSchema).max(20).optional(),
|
|
3112
|
+
/** Contact email. NOT rendered publicly; validated as email at the app layer. */
|
|
3113
|
+
contact: zod.z.string().optional(),
|
|
3114
|
+
labels: selfLabelsSchema.optional(),
|
|
3115
|
+
createdAt: datetimeSchema
|
|
3116
|
+
});
|
|
3117
|
+
var OrgEmploymentAttestationRecordSchema = zod.z.object({
|
|
3118
|
+
subject: didSchema,
|
|
3119
|
+
position: strongRefSchema,
|
|
3120
|
+
status: zod.z.enum(["current", "past"]),
|
|
3121
|
+
title: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
|
|
3122
|
+
startedAt: partialDateSchema,
|
|
3123
|
+
entityRef: uriSchema.optional(),
|
|
3124
|
+
companyDid: didSchema.optional(),
|
|
3125
|
+
endedAt: partialDateSchema.optional(),
|
|
3126
|
+
comment: zod.z.string().refine(maxGraphemes(300)).max(3e3).optional(),
|
|
3127
|
+
labels: selfLabelsSchema.optional(),
|
|
3128
|
+
createdAt: datetimeSchema
|
|
3129
|
+
});
|
|
3064
3130
|
var GraphFollowRecordSchema = zod.z.object({
|
|
3065
3131
|
subject: didSchema,
|
|
3066
3132
|
createdAt: datetimeSchema,
|
|
@@ -3366,7 +3432,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
3366
3432
|
});
|
|
3367
3433
|
|
|
3368
3434
|
// src/index.ts
|
|
3369
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
3435
|
+
var SIFA_SDK_VERSION = "0.12.5";
|
|
3370
3436
|
|
|
3371
3437
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
3372
3438
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|
|
@@ -3386,6 +3452,7 @@ exports.CATEGORY_LABELS = CATEGORY_LABELS;
|
|
|
3386
3452
|
exports.CATEGORY_ORDER = CATEGORY_ORDER;
|
|
3387
3453
|
exports.COLLECTION_TO_APP = COLLECTION_TO_APP;
|
|
3388
3454
|
exports.COMPANY_OPTIONAL_EMPLOYMENT_TYPES = COMPANY_OPTIONAL_EMPLOYMENT_TYPES;
|
|
3455
|
+
exports.COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS = COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS;
|
|
3389
3456
|
exports.COMPLETENESS_MAX_SCORE = COMPLETENESS_MAX_SCORE;
|
|
3390
3457
|
exports.CONTINENTS = CONTINENTS;
|
|
3391
3458
|
exports.COUNTRIES = COUNTRIES;
|
|
@@ -3421,6 +3488,8 @@ exports.OPEN_TO_OPTIONS = OPEN_TO_OPTIONS;
|
|
|
3421
3488
|
exports.OPEN_TO_TOKENS = OPEN_TO_TOKENS;
|
|
3422
3489
|
exports.OPEN_TO_TOKEN_TO_VALUE = OPEN_TO_TOKEN_TO_VALUE;
|
|
3423
3490
|
exports.OPEN_TO_VALUE_TO_TOKEN = OPEN_TO_VALUE_TO_TOKEN;
|
|
3491
|
+
exports.OrgEmploymentAttestationRecordSchema = OrgEmploymentAttestationRecordSchema;
|
|
3492
|
+
exports.OrgProfileRecordSchema = OrgProfileRecordSchema;
|
|
3424
3493
|
exports.PLATFORM_LABELS = PLATFORM_LABELS;
|
|
3425
3494
|
exports.PLATFORM_OPTIONS = PLATFORM_OPTIONS;
|
|
3426
3495
|
exports.PRESENTATION_LINK_TYPE_LABELS = PRESENTATION_LINK_TYPE_LABELS;
|
|
@@ -3521,12 +3590,14 @@ exports.groupSkillsByCategory = groupSkillsByCategory;
|
|
|
3521
3590
|
exports.hasAdultContent = hasAdultContent;
|
|
3522
3591
|
exports.hoistPrimary = hoistPrimary;
|
|
3523
3592
|
exports.isAppCategory = isAppCategory;
|
|
3593
|
+
exports.isCompanyPageIndexable = isCompanyPageIndexable;
|
|
3524
3594
|
exports.isCompanyRequired = isCompanyRequired;
|
|
3525
3595
|
exports.isKnownAppId = isKnownAppId;
|
|
3526
3596
|
exports.isKnownPlatform = isKnownPlatform;
|
|
3527
3597
|
exports.isKnownVerificationProvider = isKnownVerificationProvider;
|
|
3528
3598
|
exports.isLinked = isLinked;
|
|
3529
3599
|
exports.isPseudoEmployer = isPseudoEmployer;
|
|
3600
|
+
exports.isRegistrableDomainHandle = isRegistrableDomainHandle;
|
|
3530
3601
|
exports.isSectionPopulated = isSectionPopulated;
|
|
3531
3602
|
exports.isValidRgbColor = isValidRgbColor;
|
|
3532
3603
|
exports.isVisibleActivityItem = isVisibleActivityItem;
|
|
@@ -3556,6 +3627,7 @@ exports.presentationCsvRowToRecord = presentationCsvRowToRecord;
|
|
|
3556
3627
|
exports.presentationDeliveryCsvRowToRecord = presentationDeliveryCsvRowToRecord;
|
|
3557
3628
|
exports.primaryVerification = primaryVerification;
|
|
3558
3629
|
exports.profileToDimensionInputs = profileToDimensionInputs;
|
|
3630
|
+
exports.qualifiesAsOrg = qualifiesAsOrg;
|
|
3559
3631
|
exports.relativeLuminance = relativeLuminance;
|
|
3560
3632
|
exports.resolveCardHealth = resolveCardHealth;
|
|
3561
3633
|
exports.resolveCardUrl = resolveCardUrl;
|