@singi-labs/sifa-sdk 0.18.11 → 0.18.13
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 +29 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -3
- package/dist/index.d.ts +28 -3
- package/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/dist/{network-map-CMod-9od.d.ts → network-map-5WbfyFed.d.ts} +12 -3
- package/dist/{network-map-CH37aj_Q.d.cts → network-map-Cwv7SsL0.d.cts} +12 -3
- package/dist/{org-3gFPQ_pC.d.cts → org-BHz9ymjp.d.cts} +122 -4
- package/dist/{org-CTSJ5zTZ.d.ts → org-Bgz5parA.d.ts} +122 -4
- package/dist/{profile-investment-CmiQxk5C.d.cts → profile-investment-CIG7Hy8g.d.cts} +16 -1
- package/dist/{profile-investment-CmiQxk5C.d.ts → profile-investment-CIG7Hy8g.d.ts} +16 -1
- package/dist/publishing/index.cjs +5 -0
- package/dist/publishing/index.cjs.map +1 -1
- package/dist/publishing/index.js +5 -0
- package/dist/publishing/index.js.map +1 -1
- package/dist/query/fetchers/index.cjs +121 -5
- 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 +118 -6
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +157 -4
- 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 +155 -5
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +161 -5
- 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 +155 -6
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/index.cjs +6 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +6 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/write/index.cjs +7 -2
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.js +7 -2
- package/dist/schemas/write/index.js.map +1 -1
- package/dist/{use-org-notification-emails-J29DcsSu.d.ts → use-org-notification-emails-C9CWyhSC.d.ts} +24 -2
- package/dist/{use-org-notification-emails-CdRgTAj4.d.cts → use-org-notification-emails-vNekuQKF.d.cts} +24 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AddFeatureAllowlistVariables, C as CreateReactionVariables, a as CreateRecordVariables, D as DeleteReactionVariables, b as DeleteRecordVariables, F as FollowVariables, P as PositionSkillLinkVariables, R as RemoveFeatureAllowlistVariables, S as SifaProvider, c as SifaProviderProps, U as UnfollowVariables, d as UpdateEducationVariables, e as UpdateExternalAccountVariables, f as UpdatePositionVariables, g as UpdateProfileLocationVariables, h as UpdateRecordVariables, i as UpdateSkillSubCategoriesVariables, j as UpdateSkillVariables, k as UseEntitySearchOptions, l as UseMyGithubPullRequestsParams, u as useAccounts, m as useActivityFeed, n as useActivityTeaser, o as useAddFeatureAllowlist, p as useAddOrgNotificationEmail, q as useAdminReviewQueues, r as useAppAccountCheck, s as useAppsRegistry, t as useAtFundLink, v as useBlueskySuggestions, w as useBulkHideProfileItems, x as useBulkHideStandardPublications, y as useBulkUnhideProfileItems, z as useBulkUnhideStandardPublications, B as useCanonicalSkillSearch, E as useCastRoadmapVote, G as useCreateConfirmation, H as useCreateEducation, I as useCreateEndorsement, J as useCreateExternalAccount, K as useCreatePosition, L as useCreateProfileLocation, M as useCreateReaction, N as useCreateRecord, O as useCreateSkill, Q as useDebouncedValue, T as useDeleteAccount, V as useDeleteAvatarOverride, W as useDeleteEducation, X as useDeleteExternalAccount, Y as useDeleteNamePronunciationAudio, Z as useDeletePosition, _ as useDeleteProfileLocation, $ as useDeleteReaction, a0 as useDeleteRecord, a1 as useDeleteRepoRecords, a2 as useDeleteSkill, a3 as useDismissConfirmation, a4 as useEndorsementCount, a5 as useEntitySearch, a6 as useExternalAccounts, a7 as useFeatureAllowlist, a8 as useFeaturedProfile, a9 as useFollow, aa as useFollowers, ab as useFollowing, ac as useFollowingFeed, ad as useFollowingList, ae as useGetProfileView, af as useGivenConfirmations, ag as useHeatmapData, ah as useHiddenActivityItems, ai as useHiddenApps, aj as useHideActivityItem, ak as useHideKeytraceClaim, al as useHideOrcidPublication, am as useHideProfileItem, an as useHideSifaPublication, ao as useHideStandardPublication, ap as useImportSearchEntities, aq as
|
|
2
|
-
import { C as CreateResult, W as WriteResult } from '../../org-
|
|
3
|
-
export {
|
|
1
|
+
export { A as AddFeatureAllowlistVariables, C as CreateReactionVariables, a as CreateRecordVariables, D as DeleteReactionVariables, b as DeleteRecordVariables, F as FollowVariables, P as PositionSkillLinkVariables, R as RemoveFeatureAllowlistVariables, S as SifaProvider, c as SifaProviderProps, U as UnfollowVariables, d as UpdateEducationVariables, e as UpdateExternalAccountVariables, f as UpdatePositionVariables, g as UpdateProfileLocationVariables, h as UpdateRecordVariables, i as UpdateSkillSubCategoriesVariables, j as UpdateSkillVariables, k as UseEntitySearchOptions, l as UseMyGithubPullRequestsParams, u as useAccounts, m as useActivityFeed, n as useActivityTeaser, o as useAddFeatureAllowlist, p as useAddOrgNotificationEmail, q as useAdminReviewQueues, r as useAppAccountCheck, s as useAppsRegistry, t as useAtFundLink, v as useBlueskySuggestions, w as useBulkHideProfileItems, x as useBulkHideStandardPublications, y as useBulkUnhideProfileItems, z as useBulkUnhideStandardPublications, B as useCanonicalSkillSearch, E as useCastRoadmapVote, G as useCreateConfirmation, H as useCreateEducation, I as useCreateEndorsement, J as useCreateExternalAccount, K as useCreatePosition, L as useCreateProfileLocation, M as useCreateReaction, N as useCreateRecord, O as useCreateSkill, Q as useDebouncedValue, T as useDeleteAccount, V as useDeleteAvatarOverride, W as useDeleteEducation, X as useDeleteExternalAccount, Y as useDeleteNamePronunciationAudio, Z as useDeletePosition, _ as useDeleteProfileLocation, $ as useDeleteReaction, a0 as useDeleteRecord, a1 as useDeleteRepoRecords, a2 as useDeleteSkill, a3 as useDismissConfirmation, a4 as useEndorsementCount, a5 as useEntitySearch, a6 as useExternalAccounts, a7 as useFeatureAllowlist, a8 as useFeaturedProfile, a9 as useFollow, aa as useFollowers, ab as useFollowing, ac as useFollowingFeed, ad as useFollowingList, ae as useGetProfileView, af as useGivenConfirmations, ag as useHeatmapData, ah as useHiddenActivityItems, ai as useHiddenApps, aj as useHideActivityItem, ak as useHideKeytraceClaim, al as useHideOrcidPublication, am as useHideProfileItem, an as useHideSifaPublication, ao as useHideStandardPublication, ap as useImportSearchEntities, aq as useInboxCounts, ar as useLinkSkillToPosition, at as useMutuals, au as useMyGithubPullRequests, av as useMyRoadmapVotes, aw as useNetworkStreamCount, ax as useOrgClaim, ay as useOrgDomainChallenge, az as useOrgDomainVerify, aA as useOrgProfile, aB as usePendingConfirmations, aC as useProfile, aD as useProfileCompleteness, aE as useReactionStatus, aF as useRefreshOrcidPublications, aG as useRefreshPds, aH as useRemoveFeatureAllowlist, aI as useRemoveOrgNotificationEmail, aJ as useRepoInventory, aK as useResetProfile, aM as useRetractRoadmapVote, aN as useRevealMarqueDomain, aO as useRevokeConfirmation, aP as useRoadmapVotes, bp as useSearchCompanies, aQ as useSearchFilters, aR as useSearchProfiles, aS as useSelectEntity, aT as useSetExternalAccountPrimary, aU as useSetPositionPrimary, aV as useSifaConfig, aW as useSimilarProfiles, aX as useSkillSuggestions, aY as useStats, aZ as useSuggestionCount, a_ as useSuggestions, a$ as useUnfollow, b0 as useUnhideActivityItem, b1 as useUnhideKeytraceClaim, b2 as useUnhideOrcidPublication, b3 as useUnhideProfileItem, b4 as useUnhideSifaPublication, b5 as useUnhideStandardPublication, b6 as useUnlinkSkillFromPosition, b7 as useUnlinkedPositions, b8 as useUnrevealMarqueDomain, b9 as useUnsetExternalAccountPrimary, ba as useUnsetPositionPrimary, bb as useUpdateEducation, bc as useUpdateExternalAccount, bd as useUpdateOrgProfile, be as useUpdatePosition, bf as useUpdateProfileLocation, bg as useUpdateProfileOverride, bh as useUpdateProfileSelf, bi as useUpdateRecord, bj as useUpdateSkill, bk as useUpdateSkillSubCategories, bl as useUploadAvatar, bm as useUploadNamePronunciationAudio, bn as useVerifyExternalAccount, bo as useWipePreview } from '../../use-org-notification-emails-vNekuQKF.cjs';
|
|
2
|
+
import { C as CreateResult, W as WriteResult } from '../../org-BHz9ymjp.cjs';
|
|
3
|
+
export { aN as SifaQueryKey, s as sifaQueryKeys } from '../../org-BHz9ymjp.cjs';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
6
6
|
import 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { A as AddFeatureAllowlistVariables, C as CreateReactionVariables, a as CreateRecordVariables, D as DeleteReactionVariables, b as DeleteRecordVariables, F as FollowVariables, P as PositionSkillLinkVariables, R as RemoveFeatureAllowlistVariables, S as SifaProvider, c as SifaProviderProps, U as UnfollowVariables, d as UpdateEducationVariables, e as UpdateExternalAccountVariables, f as UpdatePositionVariables, g as UpdateProfileLocationVariables, h as UpdateRecordVariables, i as UpdateSkillSubCategoriesVariables, j as UpdateSkillVariables, k as UseEntitySearchOptions, l as UseMyGithubPullRequestsParams, u as useAccounts, m as useActivityFeed, n as useActivityTeaser, o as useAddFeatureAllowlist, p as useAddOrgNotificationEmail, q as useAdminReviewQueues, r as useAppAccountCheck, s as useAppsRegistry, t as useAtFundLink, v as useBlueskySuggestions, w as useBulkHideProfileItems, x as useBulkHideStandardPublications, y as useBulkUnhideProfileItems, z as useBulkUnhideStandardPublications, B as useCanonicalSkillSearch, E as useCastRoadmapVote, G as useCreateConfirmation, H as useCreateEducation, I as useCreateEndorsement, J as useCreateExternalAccount, K as useCreatePosition, L as useCreateProfileLocation, M as useCreateReaction, N as useCreateRecord, O as useCreateSkill, Q as useDebouncedValue, T as useDeleteAccount, V as useDeleteAvatarOverride, W as useDeleteEducation, X as useDeleteExternalAccount, Y as useDeleteNamePronunciationAudio, Z as useDeletePosition, _ as useDeleteProfileLocation, $ as useDeleteReaction, a0 as useDeleteRecord, a1 as useDeleteRepoRecords, a2 as useDeleteSkill, a3 as useDismissConfirmation, a4 as useEndorsementCount, a5 as useEntitySearch, a6 as useExternalAccounts, a7 as useFeatureAllowlist, a8 as useFeaturedProfile, a9 as useFollow, aa as useFollowers, ab as useFollowing, ac as useFollowingFeed, ad as useFollowingList, ae as useGetProfileView, af as useGivenConfirmations, ag as useHeatmapData, ah as useHiddenActivityItems, ai as useHiddenApps, aj as useHideActivityItem, ak as useHideKeytraceClaim, al as useHideOrcidPublication, am as useHideProfileItem, an as useHideSifaPublication, ao as useHideStandardPublication, ap as useImportSearchEntities, aq as
|
|
2
|
-
import { C as CreateResult, W as WriteResult } from '../../org-
|
|
3
|
-
export {
|
|
1
|
+
export { A as AddFeatureAllowlistVariables, C as CreateReactionVariables, a as CreateRecordVariables, D as DeleteReactionVariables, b as DeleteRecordVariables, F as FollowVariables, P as PositionSkillLinkVariables, R as RemoveFeatureAllowlistVariables, S as SifaProvider, c as SifaProviderProps, U as UnfollowVariables, d as UpdateEducationVariables, e as UpdateExternalAccountVariables, f as UpdatePositionVariables, g as UpdateProfileLocationVariables, h as UpdateRecordVariables, i as UpdateSkillSubCategoriesVariables, j as UpdateSkillVariables, k as UseEntitySearchOptions, l as UseMyGithubPullRequestsParams, u as useAccounts, m as useActivityFeed, n as useActivityTeaser, o as useAddFeatureAllowlist, p as useAddOrgNotificationEmail, q as useAdminReviewQueues, r as useAppAccountCheck, s as useAppsRegistry, t as useAtFundLink, v as useBlueskySuggestions, w as useBulkHideProfileItems, x as useBulkHideStandardPublications, y as useBulkUnhideProfileItems, z as useBulkUnhideStandardPublications, B as useCanonicalSkillSearch, E as useCastRoadmapVote, G as useCreateConfirmation, H as useCreateEducation, I as useCreateEndorsement, J as useCreateExternalAccount, K as useCreatePosition, L as useCreateProfileLocation, M as useCreateReaction, N as useCreateRecord, O as useCreateSkill, Q as useDebouncedValue, T as useDeleteAccount, V as useDeleteAvatarOverride, W as useDeleteEducation, X as useDeleteExternalAccount, Y as useDeleteNamePronunciationAudio, Z as useDeletePosition, _ as useDeleteProfileLocation, $ as useDeleteReaction, a0 as useDeleteRecord, a1 as useDeleteRepoRecords, a2 as useDeleteSkill, a3 as useDismissConfirmation, a4 as useEndorsementCount, a5 as useEntitySearch, a6 as useExternalAccounts, a7 as useFeatureAllowlist, a8 as useFeaturedProfile, a9 as useFollow, aa as useFollowers, ab as useFollowing, ac as useFollowingFeed, ad as useFollowingList, ae as useGetProfileView, af as useGivenConfirmations, ag as useHeatmapData, ah as useHiddenActivityItems, ai as useHiddenApps, aj as useHideActivityItem, ak as useHideKeytraceClaim, al as useHideOrcidPublication, am as useHideProfileItem, an as useHideSifaPublication, ao as useHideStandardPublication, ap as useImportSearchEntities, aq as useInboxCounts, ar as useLinkSkillToPosition, at as useMutuals, au as useMyGithubPullRequests, av as useMyRoadmapVotes, aw as useNetworkStreamCount, ax as useOrgClaim, ay as useOrgDomainChallenge, az as useOrgDomainVerify, aA as useOrgProfile, aB as usePendingConfirmations, aC as useProfile, aD as useProfileCompleteness, aE as useReactionStatus, aF as useRefreshOrcidPublications, aG as useRefreshPds, aH as useRemoveFeatureAllowlist, aI as useRemoveOrgNotificationEmail, aJ as useRepoInventory, aK as useResetProfile, aM as useRetractRoadmapVote, aN as useRevealMarqueDomain, aO as useRevokeConfirmation, aP as useRoadmapVotes, bp as useSearchCompanies, aQ as useSearchFilters, aR as useSearchProfiles, aS as useSelectEntity, aT as useSetExternalAccountPrimary, aU as useSetPositionPrimary, aV as useSifaConfig, aW as useSimilarProfiles, aX as useSkillSuggestions, aY as useStats, aZ as useSuggestionCount, a_ as useSuggestions, a$ as useUnfollow, b0 as useUnhideActivityItem, b1 as useUnhideKeytraceClaim, b2 as useUnhideOrcidPublication, b3 as useUnhideProfileItem, b4 as useUnhideSifaPublication, b5 as useUnhideStandardPublication, b6 as useUnlinkSkillFromPosition, b7 as useUnlinkedPositions, b8 as useUnrevealMarqueDomain, b9 as useUnsetExternalAccountPrimary, ba as useUnsetPositionPrimary, bb as useUpdateEducation, bc as useUpdateExternalAccount, bd as useUpdateOrgProfile, be as useUpdatePosition, bf as useUpdateProfileLocation, bg as useUpdateProfileOverride, bh as useUpdateProfileSelf, bi as useUpdateRecord, bj as useUpdateSkill, bk as useUpdateSkillSubCategories, bl as useUploadAvatar, bm as useUploadNamePronunciationAudio, bn as useVerifyExternalAccount, bo as useWipePreview } from '../../use-org-notification-emails-C9CWyhSC.js';
|
|
2
|
+
import { C as CreateResult, W as WriteResult } from '../../org-Bgz5parA.js';
|
|
3
|
+
export { aN as SifaQueryKey, s as sifaQueryKeys } from '../../org-Bgz5parA.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
6
6
|
import 'react';
|
|
@@ -159,11 +159,23 @@ var sifaQueryKeys = {
|
|
|
159
159
|
byHandle: (handleOrDid) => ["sifa", "profile", handleOrDid],
|
|
160
160
|
atFundLink: (did) => ["sifa", "profile", "at-fund-link", did],
|
|
161
161
|
view: (actor) => ["sifa", "profile", "view", actor],
|
|
162
|
-
externalAccounts: (handleOrDid) => ["sifa", "profile", "external-accounts", handleOrDid]
|
|
162
|
+
externalAccounts: (handleOrDid) => ["sifa", "profile", "external-accounts", handleOrDid],
|
|
163
|
+
// Session-scoped: the AppView reads the owner from the session cookie, so
|
|
164
|
+
// there is only ever one completeness result per client.
|
|
165
|
+
completeness: () => ["sifa", "profile", "completeness"]
|
|
163
166
|
},
|
|
164
167
|
position: {
|
|
165
168
|
all: () => ["sifa", "position"],
|
|
166
|
-
byOwner: (did) => ["sifa", "position", "by-owner", did]
|
|
169
|
+
byOwner: (did) => ["sifa", "position", "by-owner", did],
|
|
170
|
+
// Session-scoped: the AppView reads the owner from the session cookie.
|
|
171
|
+
unlinked: () => ["sifa", "position", "unlinked"]
|
|
172
|
+
},
|
|
173
|
+
// Aggregate inbox counts for the header bell badge (session-scoped). The first
|
|
174
|
+
// aggregate namespace: it fans in across confirmations, endorsements, drift,
|
|
175
|
+
// unlinked positions and profile completeness on the server.
|
|
176
|
+
inbox: {
|
|
177
|
+
all: () => ["sifa", "inbox"],
|
|
178
|
+
counts: () => ["sifa", "inbox", "counts"]
|
|
167
179
|
},
|
|
168
180
|
search: {
|
|
169
181
|
all: () => ["sifa", "search"],
|
|
@@ -1205,12 +1217,16 @@ function useCreateEndorsement(endorsedHandleOrDid, options) {
|
|
|
1205
1217
|
|
|
1206
1218
|
// src/query/fetchers/confirmations.ts
|
|
1207
1219
|
async function fetchPendingConfirmations(config, options = {}) {
|
|
1220
|
+
const { cookieHeader, ...rest } = options;
|
|
1221
|
+
const headers = { ...rest.headers ?? {} };
|
|
1222
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
1208
1223
|
try {
|
|
1209
1224
|
const data = await apiFetch(config, "/api/confirmations/pending", {
|
|
1210
1225
|
cache: "no-store",
|
|
1211
1226
|
credentials: "include",
|
|
1212
1227
|
timeoutMs: 5e3,
|
|
1213
|
-
...
|
|
1228
|
+
...rest,
|
|
1229
|
+
headers
|
|
1214
1230
|
});
|
|
1215
1231
|
return { confirmations: data?.confirmations ?? [], cursor: data?.cursor };
|
|
1216
1232
|
} catch {
|
|
@@ -1218,11 +1234,14 @@ async function fetchPendingConfirmations(config, options = {}) {
|
|
|
1218
1234
|
}
|
|
1219
1235
|
}
|
|
1220
1236
|
async function fetchGivenConfirmations(config, options = {}) {
|
|
1237
|
+
const { cookieHeader, ...rest } = options;
|
|
1238
|
+
const headers = { ...rest.headers ?? {} };
|
|
1239
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
1221
1240
|
try {
|
|
1222
1241
|
const data = await apiFetch(
|
|
1223
1242
|
config,
|
|
1224
1243
|
"/api/confirmations/mine",
|
|
1225
|
-
{ cache: "no-store", credentials: "include", timeoutMs: 5e3, ...
|
|
1244
|
+
{ cache: "no-store", credentials: "include", timeoutMs: 5e3, ...rest, headers }
|
|
1226
1245
|
);
|
|
1227
1246
|
return { confirmations: data?.confirmations ?? [] };
|
|
1228
1247
|
} catch {
|
|
@@ -1272,6 +1291,9 @@ function useCreateConfirmation(claimerHandleOrDid, options) {
|
|
|
1272
1291
|
await queryClient.invalidateQueries({
|
|
1273
1292
|
queryKey: sifaQueryKeys.confirmation.given()
|
|
1274
1293
|
});
|
|
1294
|
+
await queryClient.invalidateQueries({
|
|
1295
|
+
queryKey: sifaQueryKeys.inbox.counts()
|
|
1296
|
+
});
|
|
1275
1297
|
if (claimerHandleOrDid) {
|
|
1276
1298
|
await queryClient.invalidateQueries({
|
|
1277
1299
|
queryKey: sifaQueryKeys.profile.byHandle(claimerHandleOrDid)
|
|
@@ -1295,6 +1317,9 @@ function useDismissConfirmation(options) {
|
|
|
1295
1317
|
await queryClient.invalidateQueries({
|
|
1296
1318
|
queryKey: sifaQueryKeys.confirmation.pending()
|
|
1297
1319
|
});
|
|
1320
|
+
await queryClient.invalidateQueries({
|
|
1321
|
+
queryKey: sifaQueryKeys.inbox.counts()
|
|
1322
|
+
});
|
|
1298
1323
|
}
|
|
1299
1324
|
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
1300
1325
|
}
|
|
@@ -1313,6 +1338,12 @@ function useRevokeConfirmation(claimerHandleOrDid, options) {
|
|
|
1313
1338
|
await queryClient.invalidateQueries({
|
|
1314
1339
|
queryKey: sifaQueryKeys.confirmation.pending()
|
|
1315
1340
|
});
|
|
1341
|
+
await queryClient.invalidateQueries({
|
|
1342
|
+
queryKey: sifaQueryKeys.confirmation.given()
|
|
1343
|
+
});
|
|
1344
|
+
await queryClient.invalidateQueries({
|
|
1345
|
+
queryKey: sifaQueryKeys.inbox.counts()
|
|
1346
|
+
});
|
|
1316
1347
|
if (claimerHandleOrDid) {
|
|
1317
1348
|
await queryClient.invalidateQueries({
|
|
1318
1349
|
queryKey: sifaQueryKeys.profile.byHandle(claimerHandleOrDid)
|
|
@@ -1324,6 +1355,120 @@ function useRevokeConfirmation(claimerHandleOrDid, options) {
|
|
|
1324
1355
|
});
|
|
1325
1356
|
}
|
|
1326
1357
|
|
|
1358
|
+
// src/query/fetchers/inbox.ts
|
|
1359
|
+
function toCount(value) {
|
|
1360
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? Math.trunc(value) : 0;
|
|
1361
|
+
}
|
|
1362
|
+
async function fetchInboxCounts(config, options = {}) {
|
|
1363
|
+
const { cookieHeader, ...rest } = options;
|
|
1364
|
+
const headers = { ...rest.headers ?? {} };
|
|
1365
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
1366
|
+
try {
|
|
1367
|
+
const data = await apiFetch(config, "/api/inbox/counts", {
|
|
1368
|
+
cache: "no-store",
|
|
1369
|
+
credentials: "include",
|
|
1370
|
+
timeoutMs: 5e3,
|
|
1371
|
+
...rest,
|
|
1372
|
+
headers
|
|
1373
|
+
});
|
|
1374
|
+
return {
|
|
1375
|
+
tasks: toCount(data?.tasks),
|
|
1376
|
+
unreadNotifications: toCount(data?.unreadNotifications)
|
|
1377
|
+
};
|
|
1378
|
+
} catch {
|
|
1379
|
+
return { tasks: 0, unreadNotifications: 0 };
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
// src/query/hooks/use-inbox.ts
|
|
1384
|
+
function useInboxCounts(options) {
|
|
1385
|
+
const config = useSifaConfig();
|
|
1386
|
+
return useQuery({
|
|
1387
|
+
queryKey: sifaQueryKeys.inbox.counts(),
|
|
1388
|
+
queryFn: () => fetchInboxCounts(config),
|
|
1389
|
+
...options
|
|
1390
|
+
});
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
// src/query/fetchers/unlinked-positions.ts
|
|
1394
|
+
async function fetchUnlinkedPositions(config, options = {}) {
|
|
1395
|
+
const { cookieHeader, ...rest } = options;
|
|
1396
|
+
const headers = { ...rest.headers ?? {} };
|
|
1397
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
1398
|
+
try {
|
|
1399
|
+
const data = await apiFetch(config, "/api/positions/unlinked", {
|
|
1400
|
+
cache: "no-store",
|
|
1401
|
+
credentials: "include",
|
|
1402
|
+
timeoutMs: 5e3,
|
|
1403
|
+
...rest,
|
|
1404
|
+
headers
|
|
1405
|
+
});
|
|
1406
|
+
return { positions: Array.isArray(data?.positions) ? data.positions : [] };
|
|
1407
|
+
} catch {
|
|
1408
|
+
return { positions: [] };
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
// src/query/hooks/use-unlinked-positions.ts
|
|
1413
|
+
function useUnlinkedPositions(options) {
|
|
1414
|
+
const config = useSifaConfig();
|
|
1415
|
+
return useQuery({
|
|
1416
|
+
queryKey: sifaQueryKeys.position.unlinked(),
|
|
1417
|
+
queryFn: () => fetchUnlinkedPositions(config),
|
|
1418
|
+
...options
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
// src/query/fetchers/profile-completeness.ts
|
|
1423
|
+
var PROFILE_COMPLETENESS_SIGNALS = [
|
|
1424
|
+
"headline",
|
|
1425
|
+
"about",
|
|
1426
|
+
"position",
|
|
1427
|
+
"education",
|
|
1428
|
+
"skill",
|
|
1429
|
+
"certification"
|
|
1430
|
+
];
|
|
1431
|
+
async function fetchProfileCompleteness(config, options = {}) {
|
|
1432
|
+
const { cookieHeader, ...rest } = options;
|
|
1433
|
+
const headers = { ...rest.headers ?? {} };
|
|
1434
|
+
if (cookieHeader) headers.cookie = cookieHeader;
|
|
1435
|
+
const empty = {
|
|
1436
|
+
complete: true,
|
|
1437
|
+
score: PROFILE_COMPLETENESS_SIGNALS.length,
|
|
1438
|
+
total: PROFILE_COMPLETENESS_SIGNALS.length,
|
|
1439
|
+
missing: []
|
|
1440
|
+
};
|
|
1441
|
+
try {
|
|
1442
|
+
const data = await apiFetch(config, "/api/profile/completeness", {
|
|
1443
|
+
cache: "no-store",
|
|
1444
|
+
credentials: "include",
|
|
1445
|
+
timeoutMs: 5e3,
|
|
1446
|
+
...rest,
|
|
1447
|
+
headers
|
|
1448
|
+
});
|
|
1449
|
+
if (!data) return empty;
|
|
1450
|
+
const missing = Array.isArray(data.missing) ? data.missing : [];
|
|
1451
|
+
return {
|
|
1452
|
+
complete: data.complete ?? missing.length === 0,
|
|
1453
|
+
score: data.score ?? PROFILE_COMPLETENESS_SIGNALS.length - missing.length,
|
|
1454
|
+
total: data.total ?? PROFILE_COMPLETENESS_SIGNALS.length,
|
|
1455
|
+
missing
|
|
1456
|
+
};
|
|
1457
|
+
} catch {
|
|
1458
|
+
return empty;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
// src/query/hooks/use-profile-completeness.ts
|
|
1463
|
+
function useProfileCompleteness(options) {
|
|
1464
|
+
const config = useSifaConfig();
|
|
1465
|
+
return useQuery({
|
|
1466
|
+
queryKey: sifaQueryKeys.profile.completeness(),
|
|
1467
|
+
queryFn: () => fetchProfileCompleteness(config),
|
|
1468
|
+
...options
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1327
1472
|
// src/query/fetchers/keytrace-claims.ts
|
|
1328
1473
|
function hideKeytraceClaim(config, rkey, options = {}) {
|
|
1329
1474
|
return apiWrite(
|
|
@@ -3160,6 +3305,11 @@ var externalRecordRefSchema = z.object({
|
|
|
3160
3305
|
uri: atUriSchema,
|
|
3161
3306
|
cid: cidSchema.optional()
|
|
3162
3307
|
});
|
|
3308
|
+
z.object({
|
|
3309
|
+
name: z.string().min(1).refine(maxGraphemes(256)).max(2560),
|
|
3310
|
+
did: didSchema.optional(),
|
|
3311
|
+
entityRef: uriSchema.optional()
|
|
3312
|
+
}).passthrough();
|
|
3163
3313
|
var selfLabelsSchema = z.object({
|
|
3164
3314
|
$type: z.literal("com.atproto.label.defs#selfLabels").optional(),
|
|
3165
3315
|
values: z.array(z.object({ val: z.string() }))
|
|
@@ -3317,6 +3467,6 @@ function useDeleteInvestment(ownerDid, options) {
|
|
|
3317
3467
|
});
|
|
3318
3468
|
}
|
|
3319
3469
|
|
|
3320
|
-
export { SifaProvider, sifaQueryKeys, useAccounts, useActivityFeed, useActivityTeaser, useAddFeatureAllowlist, useAddOrgNotificationEmail, useAdminReviewQueues, useAppAccountCheck, useAppsRegistry, useAtFundLink, useBlueskySuggestions, useBulkHideProfileItems, useBulkHideStandardPublications, useBulkUnhideProfileItems, useBulkUnhideStandardPublications, useCanonicalSkillSearch, useCastRoadmapVote, useCreateConfirmation, useCreateEducation, useCreateEndorsement, useCreateExternalAccount, useCreateInvestment, useCreatePosition, useCreateProfileLocation, useCreateReaction, useCreateRecord, useCreateSkill, useDebouncedValue, useDeleteAccount, useDeleteAvatarOverride, useDeleteEducation, useDeleteExternalAccount, useDeleteInvestment, useDeleteNamePronunciationAudio, useDeletePosition, useDeleteProfileLocation, useDeleteReaction, useDeleteRecord, useDeleteRepoRecords, useDeleteSkill, useDismissConfirmation, useEndorsementCount, useEntitySearch, useExternalAccounts, useFeatureAllowlist, useFeaturedProfile, useFollow, useFollowers, useFollowing, useFollowingFeed, useFollowingList, useGetProfileView, useGivenConfirmations, useHeatmapData, useHiddenActivityItems, useHiddenApps, useHideActivityItem, useHideKeytraceClaim, useHideOrcidPublication, useHideProfileItem, useHideSifaPublication, useHideStandardPublication, useImportSearchEntities, useLinkSkillToPosition, useMutuals, useMyGithubPullRequests, useMyRoadmapVotes, useNetworkStreamCount, useOrgClaim, useOrgDomainChallenge, useOrgDomainVerify, useOrgProfile, usePendingConfirmations, useProfile, useReactionStatus, useRefreshOrcidPublications, useRefreshPds, useRemoveFeatureAllowlist, useRemoveOrgNotificationEmail, useRepoInventory, useResetProfile, useRetractRoadmapVote, useRevealMarqueDomain, useRevokeConfirmation, useRoadmapVotes, useSearchCompanies, useSearchFilters, useSearchProfiles, useSelectEntity, useSetExternalAccountPrimary, useSetPositionPrimary, useSifaConfig, useSimilarProfiles, useSkillSuggestions, useStats, useSuggestionCount, useSuggestions, useUnfollow, useUnhideActivityItem, useUnhideKeytraceClaim, useUnhideOrcidPublication, useUnhideProfileItem, useUnhideSifaPublication, useUnhideStandardPublication, useUnlinkSkillFromPosition, useUnrevealMarqueDomain, useUnsetExternalAccountPrimary, useUnsetPositionPrimary, useUpdateEducation, useUpdateExternalAccount, useUpdateInvestment, useUpdateOrgProfile, useUpdatePosition, useUpdateProfileLocation, useUpdateProfileOverride, useUpdateProfileSelf, useUpdateRecord, useUpdateSkill, useUpdateSkillSubCategories, useUploadAvatar, useUploadNamePronunciationAudio, useVerifyExternalAccount, useWipePreview };
|
|
3470
|
+
export { SifaProvider, sifaQueryKeys, useAccounts, useActivityFeed, useActivityTeaser, useAddFeatureAllowlist, useAddOrgNotificationEmail, useAdminReviewQueues, useAppAccountCheck, useAppsRegistry, useAtFundLink, useBlueskySuggestions, useBulkHideProfileItems, useBulkHideStandardPublications, useBulkUnhideProfileItems, useBulkUnhideStandardPublications, useCanonicalSkillSearch, useCastRoadmapVote, useCreateConfirmation, useCreateEducation, useCreateEndorsement, useCreateExternalAccount, useCreateInvestment, useCreatePosition, useCreateProfileLocation, useCreateReaction, useCreateRecord, useCreateSkill, useDebouncedValue, useDeleteAccount, useDeleteAvatarOverride, useDeleteEducation, useDeleteExternalAccount, useDeleteInvestment, useDeleteNamePronunciationAudio, useDeletePosition, useDeleteProfileLocation, useDeleteReaction, useDeleteRecord, useDeleteRepoRecords, useDeleteSkill, useDismissConfirmation, useEndorsementCount, useEntitySearch, useExternalAccounts, useFeatureAllowlist, useFeaturedProfile, useFollow, useFollowers, useFollowing, useFollowingFeed, useFollowingList, useGetProfileView, useGivenConfirmations, useHeatmapData, useHiddenActivityItems, useHiddenApps, useHideActivityItem, useHideKeytraceClaim, useHideOrcidPublication, useHideProfileItem, useHideSifaPublication, useHideStandardPublication, useImportSearchEntities, useInboxCounts, useLinkSkillToPosition, useMutuals, useMyGithubPullRequests, useMyRoadmapVotes, useNetworkStreamCount, useOrgClaim, useOrgDomainChallenge, useOrgDomainVerify, useOrgProfile, usePendingConfirmations, useProfile, useProfileCompleteness, useReactionStatus, useRefreshOrcidPublications, useRefreshPds, useRemoveFeatureAllowlist, useRemoveOrgNotificationEmail, useRepoInventory, useResetProfile, useRetractRoadmapVote, useRevealMarqueDomain, useRevokeConfirmation, useRoadmapVotes, useSearchCompanies, useSearchFilters, useSearchProfiles, useSelectEntity, useSetExternalAccountPrimary, useSetPositionPrimary, useSifaConfig, useSimilarProfiles, useSkillSuggestions, useStats, useSuggestionCount, useSuggestions, useUnfollow, useUnhideActivityItem, useUnhideKeytraceClaim, useUnhideOrcidPublication, useUnhideProfileItem, useUnhideSifaPublication, useUnhideStandardPublication, useUnlinkSkillFromPosition, useUnlinkedPositions, useUnrevealMarqueDomain, useUnsetExternalAccountPrimary, useUnsetPositionPrimary, useUpdateEducation, useUpdateExternalAccount, useUpdateInvestment, useUpdateOrgProfile, useUpdatePosition, useUpdateProfileLocation, useUpdateProfileOverride, useUpdateProfileSelf, useUpdateRecord, useUpdateSkill, useUpdateSkillSubCategories, useUploadAvatar, useUploadNamePronunciationAudio, useVerifyExternalAccount, useWipePreview };
|
|
3321
3471
|
//# sourceMappingURL=index.js.map
|
|
3322
3472
|
//# sourceMappingURL=index.js.map
|