@singi-labs/sifa-sdk 0.19.73 → 0.19.75
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 +63 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/logic/index.js +26 -0
- package/dist/logic/index.js.map +1 -1
- package/dist/logic/site-activity-preset.js +68 -0
- package/dist/logic/site-activity-preset.js.map +1 -0
- package/dist/{network-map-D-VXi2yc.d.ts → network-map-73EK_ow8.d.ts} +4 -2
- package/dist/{network-map-DfXwB2Eq.d.cts → network-map-DPt0o-vA.d.cts} +4 -2
- package/dist/{org-A9Tz-Uv9.d.cts → org-Bb1cRhJu.d.cts} +63 -3
- package/dist/{org-Spq8yU-B.d.ts → org-aUopODEW.d.ts} +63 -3
- package/dist/{profile-summary-6GySSJvO.d.ts → profile-summary-8TYJWh1y.d.ts} +1 -1
- package/dist/{profile-summary-X4MGExfS.d.cts → profile-summary-CaPVQo_x.d.cts} +1 -1
- package/dist/query/fetchers/activity-preferences.js +43 -0
- package/dist/query/fetchers/activity-preferences.js.map +1 -0
- package/dist/query/fetchers/activity.js +3 -0
- package/dist/query/fetchers/activity.js.map +1 -1
- package/dist/query/fetchers/index.cjs +48 -1
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +5 -5
- package/dist/query/fetchers/index.d.ts +5 -5
- package/dist/query/fetchers/index.js +8 -0
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/fetchers/rpg.js +5 -0
- package/dist/query/fetchers/rpg.js.map +1 -1
- package/dist/query/hooks/index.cjs +76 -1
- 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 +8 -0
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/hooks/use-activity-preferences.js +53 -0
- package/dist/query/hooks/use-activity-preferences.js.map +1 -0
- package/dist/query/hooks/use-activity.js.map +1 -1
- package/dist/query/index.cjs +82 -1
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +8 -8
- package/dist/query/index.d.ts +8 -8
- package/dist/query/index.js +16 -0
- package/dist/query/index.js.map +1 -1
- package/dist/query/keys.js +4 -1
- package/dist/query/keys.js.map +1 -1
- package/dist/{types-DXep6553.d.cts → types-BY3qFPDf.d.cts} +67 -1
- package/dist/{types-DxMMqOJo.d.ts → types-Dl-uk0Ds.d.ts} +67 -1
- package/dist/{use-org-notification-emails-CfDfHwBl.d.ts → use-org-notification-emails-ObFoUWP3.d.ts} +11 -4
- package/dist/{use-org-notification-emails-5V3ZAlRd.d.cts → use-org-notification-emails-u0AQu9Ez.d.cts} +11 -4
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as AddFeatureAllowlistVariables, e as CreateReactionVariables, f as CreateRecordVariables, D as DeleteReactionVariables, g as DeleteRecordVariables, i as FollowVariables, P as PositionSkillLinkVariables, R as RemoveFeatureAllowlistVariables, S as SifaProvider, m as SifaProviderProps, U as UnfollowVariables, n as UpdateEducationVariables, o as UpdateExternalAccountVariables, p as UpdatePositionVariables, q as UpdateProfileLocationVariables, r as UpdateRecordVariables, s as UpdateSkillSubCategoriesVariables, t as UpdateSkillVariables, u as UseEntitySearchOptions, v as UseMyGithubPullRequestsParams, N as useAccounts, Q as useActivityFeed, T as
|
|
2
|
-
export {
|
|
1
|
+
export { A as AddFeatureAllowlistVariables, e as CreateReactionVariables, f as CreateRecordVariables, D as DeleteReactionVariables, g as DeleteRecordVariables, i as FollowVariables, P as PositionSkillLinkVariables, R as RemoveFeatureAllowlistVariables, S as SifaProvider, m as SifaProviderProps, U as UnfollowVariables, n as UpdateEducationVariables, o as UpdateExternalAccountVariables, p as UpdatePositionVariables, q as UpdateProfileLocationVariables, r as UpdateRecordVariables, s as UpdateSkillSubCategoriesVariables, t as UpdateSkillVariables, u as UseEntitySearchOptions, v as UseMyGithubPullRequestsParams, N as useAccounts, Q as useActivityFeed, T as useActivityPreferences, W as useActivityTeaser, X as useAddFeatureAllowlist, Y as useAddOrgNotificationEmail, Z as useAdminReviewQueues, _ as useAppAccountCheck, $ as useAppsRegistry, a0 as useAtFundLink, a1 as useAttestationRequests, a2 as useBlueskySuggestions, a3 as useBulkHideProfileItems, a4 as useBulkHideStandardPublications, a5 as useBulkUnhideProfileItems, a6 as useBulkUnhideStandardPublications, a7 as useCanonicalSkillSearch, a8 as useCastRoadmapVote, a9 as useCreateConfirmation, aa as useCreateEducation, ab as useCreateEndorsement, ac as useCreateExternalAccount, ad as useCreateOrgAttestation, ae as useCreatePosition, af as useCreateProfileLocation, ag as useCreateReaction, ah as useCreateRecord, ai as useCreateSkill, aj as useDebouncedValue, ak as useDeleteAccount, al as useDeleteAvatarOverride, am as useDeleteEducation, an as useDeleteExternalAccount, ao as useDeleteNamePronunciationAudio, ap as useDeletePosition, aq as useDeleteProfileLocation, ar as useDeleteReaction, as as useDeleteRecord, at as useDeleteRepoRecords, au as useDeleteSkill, av as useDismissConfirmation, aw as useDismissUnlinkedPosition, ax as useEndorsementCount, ay as useEntitySearch, az as useExternalAccounts, aA as useFeatureAllowlist, aB as useFeaturedProfile, aC as useFollow, aD as useFollowers, aE as useFollowing, aF as useFollowingFeed, aG as useFollowingFeedVersion, aH as useFollowingList, aI as useGetProfileView, aJ as useGivenConfirmations, aK as useHeatmapData, aL as useHiddenActivityItems, aM as useHiddenApps, aN as useHideActivityItem, aO as useHideKeytraceClaim, aP as useHideOrcidPublication, aQ as useHideProfileItem, aR as useHideSifaPublication, aS as useHideStandardPublication, aT as useImportSearchEntities, aU as useInboxCounts, aV as useLinkSkillToPosition, aX as useMutuals, aY as useMyGithubPullRequests, aZ as useMyRoadmapVotes, a_ as useNetworkStreamCount, a$ as useOffboardOrgAttestation, b0 as useOrgAttestations, b1 as useOrgClaim, b2 as useOrgDomainChallenge, b3 as useOrgDomainVerify, b4 as useOrgProfile, b5 as usePendingConfirmations, b6 as useProfile, b7 as useProfileCompleteness, b8 as useReactionStatus, b9 as useRefreshOrcidPublications, ba as useRefreshPds, bb as useRejectAttestationRequest, bc as useRemoveFeatureAllowlist, bd as useRemoveOrgNotificationEmail, be as useRepoInventory, bf as useRequestEmploymentConfirmation, bg as useResetProfile, bi as useRetractRoadmapVote, bj as useRevealMarqueDomain, bk as useRevokeConfirmation, bl as useRevokeOrgAttestation, bm as useRoadmapVotes, c1 as useSearchCompanies, bn as useSearchFilters, bo as useSearchProfiles, bp as useSelectEntity, bq as useSetExternalAccountPrimary, br as useSetPositionPrimary, bs as useSetSectionPrimary, bt as useSifaConfig, bu as useSimilarProfiles, bv as useSiteActivityPreset, bw as useSkillSuggestions, bx as useStats, by as useSuggestionCount, bz as useSuggestions, bA as useUnfollow, bB as useUnhideActivityItem, bC as useUnhideKeytraceClaim, bD as useUnhideOrcidPublication, bE as useUnhideProfileItem, bF as useUnhideSifaPublication, bG as useUnhideStandardPublication, bH as useUnlinkSkillFromPosition, bI as useUnlinkedPositions, bJ as useUnrevealMarqueDomain, bK as useUnsetExternalAccountPrimary, bL as useUnsetPositionPrimary, bM as useUnsetSectionPrimary, bN as useUpdateActivityPreferences, bO as useUpdateEducation, bP as useUpdateExternalAccount, bQ as useUpdateOrgProfile, bR as useUpdatePosition, bS as useUpdateProfileLocation, bT as useUpdateProfileOverride, bU as useUpdateProfileSelf, bV as useUpdateRecord, bW as useUpdateSkill, bX as useUpdateSkillSubCategories, bY as useUploadAvatar, bZ as useUploadNamePronunciationAudio, b_ as useVerificationLog, b$ as useVerifyExternalAccount, c0 as useWipePreview } from '../../use-org-notification-emails-u0AQu9Ez.cjs';
|
|
2
|
+
export { aN as SifaQueryKey, s as sifaQueryKeys } from '../../org-Bb1cRhJu.cjs';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
5
|
-
import {
|
|
5
|
+
import { a2 as CreateResult, a3 as WriteResult } from '../../types-BY3qFPDf.cjs';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../index-BzkaABDb.cjs';
|
|
8
8
|
import '../../verification-providers-7il3kPQS.cjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { A as AddFeatureAllowlistVariables, e as CreateReactionVariables, f as CreateRecordVariables, D as DeleteReactionVariables, g as DeleteRecordVariables, i as FollowVariables, P as PositionSkillLinkVariables, R as RemoveFeatureAllowlistVariables, S as SifaProvider, m as SifaProviderProps, U as UnfollowVariables, n as UpdateEducationVariables, o as UpdateExternalAccountVariables, p as UpdatePositionVariables, q as UpdateProfileLocationVariables, r as UpdateRecordVariables, s as UpdateSkillSubCategoriesVariables, t as UpdateSkillVariables, u as UseEntitySearchOptions, v as UseMyGithubPullRequestsParams, N as useAccounts, Q as useActivityFeed, T as
|
|
2
|
-
export {
|
|
1
|
+
export { A as AddFeatureAllowlistVariables, e as CreateReactionVariables, f as CreateRecordVariables, D as DeleteReactionVariables, g as DeleteRecordVariables, i as FollowVariables, P as PositionSkillLinkVariables, R as RemoveFeatureAllowlistVariables, S as SifaProvider, m as SifaProviderProps, U as UnfollowVariables, n as UpdateEducationVariables, o as UpdateExternalAccountVariables, p as UpdatePositionVariables, q as UpdateProfileLocationVariables, r as UpdateRecordVariables, s as UpdateSkillSubCategoriesVariables, t as UpdateSkillVariables, u as UseEntitySearchOptions, v as UseMyGithubPullRequestsParams, N as useAccounts, Q as useActivityFeed, T as useActivityPreferences, W as useActivityTeaser, X as useAddFeatureAllowlist, Y as useAddOrgNotificationEmail, Z as useAdminReviewQueues, _ as useAppAccountCheck, $ as useAppsRegistry, a0 as useAtFundLink, a1 as useAttestationRequests, a2 as useBlueskySuggestions, a3 as useBulkHideProfileItems, a4 as useBulkHideStandardPublications, a5 as useBulkUnhideProfileItems, a6 as useBulkUnhideStandardPublications, a7 as useCanonicalSkillSearch, a8 as useCastRoadmapVote, a9 as useCreateConfirmation, aa as useCreateEducation, ab as useCreateEndorsement, ac as useCreateExternalAccount, ad as useCreateOrgAttestation, ae as useCreatePosition, af as useCreateProfileLocation, ag as useCreateReaction, ah as useCreateRecord, ai as useCreateSkill, aj as useDebouncedValue, ak as useDeleteAccount, al as useDeleteAvatarOverride, am as useDeleteEducation, an as useDeleteExternalAccount, ao as useDeleteNamePronunciationAudio, ap as useDeletePosition, aq as useDeleteProfileLocation, ar as useDeleteReaction, as as useDeleteRecord, at as useDeleteRepoRecords, au as useDeleteSkill, av as useDismissConfirmation, aw as useDismissUnlinkedPosition, ax as useEndorsementCount, ay as useEntitySearch, az as useExternalAccounts, aA as useFeatureAllowlist, aB as useFeaturedProfile, aC as useFollow, aD as useFollowers, aE as useFollowing, aF as useFollowingFeed, aG as useFollowingFeedVersion, aH as useFollowingList, aI as useGetProfileView, aJ as useGivenConfirmations, aK as useHeatmapData, aL as useHiddenActivityItems, aM as useHiddenApps, aN as useHideActivityItem, aO as useHideKeytraceClaim, aP as useHideOrcidPublication, aQ as useHideProfileItem, aR as useHideSifaPublication, aS as useHideStandardPublication, aT as useImportSearchEntities, aU as useInboxCounts, aV as useLinkSkillToPosition, aX as useMutuals, aY as useMyGithubPullRequests, aZ as useMyRoadmapVotes, a_ as useNetworkStreamCount, a$ as useOffboardOrgAttestation, b0 as useOrgAttestations, b1 as useOrgClaim, b2 as useOrgDomainChallenge, b3 as useOrgDomainVerify, b4 as useOrgProfile, b5 as usePendingConfirmations, b6 as useProfile, b7 as useProfileCompleteness, b8 as useReactionStatus, b9 as useRefreshOrcidPublications, ba as useRefreshPds, bb as useRejectAttestationRequest, bc as useRemoveFeatureAllowlist, bd as useRemoveOrgNotificationEmail, be as useRepoInventory, bf as useRequestEmploymentConfirmation, bg as useResetProfile, bi as useRetractRoadmapVote, bj as useRevealMarqueDomain, bk as useRevokeConfirmation, bl as useRevokeOrgAttestation, bm as useRoadmapVotes, c1 as useSearchCompanies, bn as useSearchFilters, bo as useSearchProfiles, bp as useSelectEntity, bq as useSetExternalAccountPrimary, br as useSetPositionPrimary, bs as useSetSectionPrimary, bt as useSifaConfig, bu as useSimilarProfiles, bv as useSiteActivityPreset, bw as useSkillSuggestions, bx as useStats, by as useSuggestionCount, bz as useSuggestions, bA as useUnfollow, bB as useUnhideActivityItem, bC as useUnhideKeytraceClaim, bD as useUnhideOrcidPublication, bE as useUnhideProfileItem, bF as useUnhideSifaPublication, bG as useUnhideStandardPublication, bH as useUnlinkSkillFromPosition, bI as useUnlinkedPositions, bJ as useUnrevealMarqueDomain, bK as useUnsetExternalAccountPrimary, bL as useUnsetPositionPrimary, bM as useUnsetSectionPrimary, bN as useUpdateActivityPreferences, bO as useUpdateEducation, bP as useUpdateExternalAccount, bQ as useUpdateOrgProfile, bR as useUpdatePosition, bS as useUpdateProfileLocation, bT as useUpdateProfileOverride, bU as useUpdateProfileSelf, bV as useUpdateRecord, bW as useUpdateSkill, bX as useUpdateSkillSubCategories, bY as useUploadAvatar, bZ as useUploadNamePronunciationAudio, b_ as useVerificationLog, b$ as useVerifyExternalAccount, c0 as useWipePreview } from '../../use-org-notification-emails-ObFoUWP3.js';
|
|
2
|
+
export { aN as SifaQueryKey, s as sifaQueryKeys } from '../../org-aUopODEW.js';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
5
|
-
import {
|
|
5
|
+
import { a2 as CreateResult, a3 as WriteResult } from '../../types-Dl-uk0Ds.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../index-BFdNI6jA.js';
|
|
8
8
|
import '../../verification-providers-7il3kPQS.js';
|
|
@@ -96,6 +96,11 @@ import {
|
|
|
96
96
|
useHideActivityItem,
|
|
97
97
|
useUnhideActivityItem
|
|
98
98
|
} from "./use-activity-items-hide.js";
|
|
99
|
+
import {
|
|
100
|
+
useActivityPreferences,
|
|
101
|
+
useSiteActivityPreset,
|
|
102
|
+
useUpdateActivityPreferences
|
|
103
|
+
} from "./use-activity-preferences.js";
|
|
99
104
|
import { useStats } from "./use-stats.js";
|
|
100
105
|
import { useAppsRegistry, useHiddenApps } from "./use-apps.js";
|
|
101
106
|
import { useAccounts } from "./use-accounts.js";
|
|
@@ -166,6 +171,7 @@ export {
|
|
|
166
171
|
sifaQueryKeys,
|
|
167
172
|
useAccounts,
|
|
168
173
|
useActivityFeed,
|
|
174
|
+
useActivityPreferences,
|
|
169
175
|
useActivityTeaser,
|
|
170
176
|
useAddFeatureAllowlist,
|
|
171
177
|
useAddOrgNotificationEmail,
|
|
@@ -268,6 +274,7 @@ export {
|
|
|
268
274
|
useSetSectionPrimary,
|
|
269
275
|
useSifaConfig,
|
|
270
276
|
useSimilarProfiles,
|
|
277
|
+
useSiteActivityPreset,
|
|
271
278
|
useSkillSuggestions,
|
|
272
279
|
useStats,
|
|
273
280
|
useSuggestionCount,
|
|
@@ -285,6 +292,7 @@ export {
|
|
|
285
292
|
useUnsetExternalAccountPrimary,
|
|
286
293
|
useUnsetPositionPrimary,
|
|
287
294
|
useUnsetSectionPrimary,
|
|
295
|
+
useUpdateActivityPreferences,
|
|
288
296
|
useUpdateEducation,
|
|
289
297
|
useUpdateExternalAccount,
|
|
290
298
|
useUpdateInvestment,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/query/hooks/index.ts"],"sourcesContent":["/**\n * Hook-only barrel for `@singi-labs/sifa-sdk/query/hooks`.\n *\n * Re-exports every hook plus the Provider so consumers can do\n * `import { useFollow, SifaProvider } from '@singi-labs/sifa-sdk/query/hooks'`.\n * The full `/query` barrel re-exports these plus the fetcher layer; this\n * subpath is for callers who want the hook surface only.\n *\n * Keep in sync with `../index.ts` — every hook exported there should\n * also be exported here.\n */\n\nexport { SifaProvider, useSifaConfig, type SifaProviderProps } from '../config.js';\n\nexport { useAtFundLink, useProfile } from './use-profile.js';\nexport { useGetProfileView } from './use-get-profile-view.js';\nexport {\n useDeleteAvatarOverride,\n useDeleteNamePronunciationAudio,\n useRefreshPds,\n useUpdateProfileOverride,\n useUpdateProfileSelf,\n useUploadAvatar,\n useUploadNamePronunciationAudio,\n} from './use-profile-mutations.js';\nexport { useCreatePosition } from './use-create-position.js';\nexport {\n useDeletePosition,\n useLinkSkillToPosition,\n useSetPositionPrimary,\n useUnlinkSkillFromPosition,\n useUnsetPositionPrimary,\n useUpdatePosition,\n type PositionSkillLinkVariables,\n type UpdatePositionVariables,\n} from './use-position-mutations.js';\nexport {\n useCreateEducation,\n useDeleteEducation,\n useUpdateEducation,\n type UpdateEducationVariables,\n} from './use-education-mutations.js';\nexport { useSetSectionPrimary, useUnsetSectionPrimary } from './use-section-primary-mutations.js';\nexport {\n useCreateSkill,\n useDeleteSkill,\n useUpdateSkill,\n useUpdateSkillSubCategories,\n type UpdateSkillVariables,\n type UpdateSkillSubCategoriesVariables,\n} from './use-skill-mutations.js';\nexport {\n useCreateRecord,\n useDeleteRecord,\n useUpdateRecord,\n type CreateRecordVariables,\n type DeleteRecordVariables,\n type UpdateRecordVariables,\n} from './use-record-mutations.js';\nexport {\n useCreateProfileLocation,\n useDeleteProfileLocation,\n useUpdateProfileLocation,\n type UpdateProfileLocationVariables,\n} from './use-location-mutations.js';\nexport {\n useCreateExternalAccount,\n useDeleteExternalAccount,\n useExternalAccounts,\n useSetExternalAccountPrimary,\n useUnsetExternalAccountPrimary,\n useUpdateExternalAccount,\n useVerifyExternalAccount,\n type UpdateExternalAccountVariables,\n} from './use-external-accounts.js';\nexport { useCreateEndorsement } from './use-endorsement-mutations.js';\nexport {\n usePendingConfirmations,\n useGivenConfirmations,\n useCreateConfirmation,\n useDismissConfirmation,\n useRevokeConfirmation,\n} from './use-confirmations.js';\nexport { useInboxCounts } from './use-inbox.js';\nexport { useVerificationLog } from './use-verification.js';\nexport {\n useOrgAttestations,\n useAttestationRequests,\n useCreateOrgAttestation,\n useOffboardOrgAttestation,\n useRevokeOrgAttestation,\n useRejectAttestationRequest,\n useRequestEmploymentConfirmation,\n} from './use-org-attestations.js';\nexport { useUnlinkedPositions, useDismissUnlinkedPosition } from './use-unlinked-positions.js';\nexport { useProfileCompleteness } from './use-profile-completeness.js';\nexport { useHideKeytraceClaim, useUnhideKeytraceClaim } from './use-keytrace-claims.js';\nexport { useRevealMarqueDomain, useUnrevealMarqueDomain } from './use-marque-domains.js';\nexport {\n useBulkHideStandardPublications,\n useBulkUnhideStandardPublications,\n useHideOrcidPublication,\n useHideSifaPublication,\n useHideStandardPublication,\n useRefreshOrcidPublications,\n useUnhideOrcidPublication,\n useUnhideSifaPublication,\n useUnhideStandardPublication,\n} from './use-publication-mutations.js';\nexport {\n useBulkHideProfileItems,\n useBulkUnhideProfileItems,\n useHideProfileItem,\n useUnhideProfileItem,\n} from './use-profile-items-hide.js';\nexport {\n useHiddenActivityItems,\n useHideActivityItem,\n useUnhideActivityItem,\n} from './use-activity-items-hide.js';\nexport { useStats } from './use-stats.js';\nexport { useAppsRegistry, useHiddenApps } from './use-apps.js';\nexport { useAccounts } from './use-accounts.js';\nexport {\n useCanonicalSkillSearch,\n useSearchCompanies,\n useSearchFilters,\n useSearchProfiles,\n useSkillSuggestions,\n} from './use-search.js';\nexport {\n useFeaturedProfile,\n useSimilarProfiles,\n useSuggestionCount,\n useSuggestions,\n} from './use-discovery.js';\nexport {\n useFollow,\n useFollowers,\n useFollowing,\n useFollowingFeed,\n useFollowingFeedVersion,\n useFollowingList,\n useUnfollow,\n type FollowVariables,\n type UnfollowVariables,\n} from './use-follow.js';\nexport { useBlueskySuggestions, useMutuals } from './use-follow-extras.js';\nexport {\n useAddFeatureAllowlist,\n useFeatureAllowlist,\n useRemoveFeatureAllowlist,\n type AddFeatureAllowlistVariables,\n type RemoveFeatureAllowlistVariables,\n} from './use-feature-allowlist.js';\nexport { useAdminReviewQueues } from './use-admin-review-queues.js';\nexport { useActivityFeed, useActivityTeaser, useHeatmapData } from './use-activity.js';\nexport { useMyGithubPullRequests, type UseMyGithubPullRequestsParams } from './use-github-prs.js';\nexport { useEndorsementCount } from './use-endorsement.js';\nexport { useNetworkStreamCount } from './use-stream.js';\nexport { useAppAccountCheck, useReactionStatus } from './use-reactions.js';\nexport {\n useCreateReaction,\n useDeleteReaction,\n type CreateReactionVariables,\n type DeleteReactionVariables,\n} from './use-reaction-mutations.js';\nexport { useMyRoadmapVotes, useRoadmapVotes } from './use-roadmap.js';\nexport { useCastRoadmapVote, useRetractRoadmapVote } from './use-roadmap-mutations.js';\nexport { useDeleteAccount, useResetProfile, useWipePreview } from './use-destructive.js';\nexport { useDeleteRepoRecords, useRepoInventory } from './use-repo-inventory.js';\n\nexport {\n useEntitySearch,\n useSelectEntity,\n useImportSearchEntities,\n useDebouncedValue,\n type UseEntitySearchOptions,\n} from './use-entity-search.js';\n\nexport { useOrgProfile } from './use-org-profile.js';\nexport { useOrgClaim } from './use-org-claim.js';\nexport { useUpdateOrgProfile } from './use-org-profile-settings.js';\nexport { useOrgDomainChallenge, useOrgDomainVerify } from './use-org-domains.js';\nexport {\n useAddOrgNotificationEmail,\n useRemoveOrgNotificationEmail,\n} from './use-org-notification-emails.js';\n\nexport { sifaQueryKeys, type SifaQueryKey } from '../keys.js';\nexport {\n useCreateInvestment,\n useUpdateInvestment,\n useDeleteInvestment,\n} from './use-investment-mutations.js';\n"],"mappings":";AAYA,SAAS,cAAc,qBAA6C;AAEpE,SAAS,eAAe,kBAAkB;AAC1C,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,sBAAsB,8BAA8B;AAC7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB,kCAAkC;AACjE,SAAS,8BAA8B;AACvC,SAAS,sBAAsB,8BAA8B;AAC7D,SAAS,uBAAuB,+BAA+B;AAC/D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB;AACzB,SAAS,iBAAiB,qBAAqB;AAC/C,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,uBAAuB,kBAAkB;AAClD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,4BAA4B;AACrC,SAAS,iBAAiB,mBAAmB,sBAAsB;AACnE,SAAS,+BAAmE;AAC5E,SAAS,2BAA2B;AACpC,SAAS,6BAA6B;AACtC,SAAS,oBAAoB,yBAAyB;AACtD;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,mBAAmB,uBAAuB;AACnD,SAAS,oBAAoB,6BAA6B;AAC1D,SAAS,kBAAkB,iBAAiB,sBAAsB;AAClE,SAAS,sBAAsB,wBAAwB;AAEvD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAEP,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,uBAAuB,0BAA0B;AAC1D;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEP,SAAS,qBAAwC;AACjD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/query/hooks/index.ts"],"sourcesContent":["/**\n * Hook-only barrel for `@singi-labs/sifa-sdk/query/hooks`.\n *\n * Re-exports every hook plus the Provider so consumers can do\n * `import { useFollow, SifaProvider } from '@singi-labs/sifa-sdk/query/hooks'`.\n * The full `/query` barrel re-exports these plus the fetcher layer; this\n * subpath is for callers who want the hook surface only.\n *\n * Keep in sync with `../index.ts` — every hook exported there should\n * also be exported here.\n */\n\nexport { SifaProvider, useSifaConfig, type SifaProviderProps } from '../config.js';\n\nexport { useAtFundLink, useProfile } from './use-profile.js';\nexport { useGetProfileView } from './use-get-profile-view.js';\nexport {\n useDeleteAvatarOverride,\n useDeleteNamePronunciationAudio,\n useRefreshPds,\n useUpdateProfileOverride,\n useUpdateProfileSelf,\n useUploadAvatar,\n useUploadNamePronunciationAudio,\n} from './use-profile-mutations.js';\nexport { useCreatePosition } from './use-create-position.js';\nexport {\n useDeletePosition,\n useLinkSkillToPosition,\n useSetPositionPrimary,\n useUnlinkSkillFromPosition,\n useUnsetPositionPrimary,\n useUpdatePosition,\n type PositionSkillLinkVariables,\n type UpdatePositionVariables,\n} from './use-position-mutations.js';\nexport {\n useCreateEducation,\n useDeleteEducation,\n useUpdateEducation,\n type UpdateEducationVariables,\n} from './use-education-mutations.js';\nexport { useSetSectionPrimary, useUnsetSectionPrimary } from './use-section-primary-mutations.js';\nexport {\n useCreateSkill,\n useDeleteSkill,\n useUpdateSkill,\n useUpdateSkillSubCategories,\n type UpdateSkillVariables,\n type UpdateSkillSubCategoriesVariables,\n} from './use-skill-mutations.js';\nexport {\n useCreateRecord,\n useDeleteRecord,\n useUpdateRecord,\n type CreateRecordVariables,\n type DeleteRecordVariables,\n type UpdateRecordVariables,\n} from './use-record-mutations.js';\nexport {\n useCreateProfileLocation,\n useDeleteProfileLocation,\n useUpdateProfileLocation,\n type UpdateProfileLocationVariables,\n} from './use-location-mutations.js';\nexport {\n useCreateExternalAccount,\n useDeleteExternalAccount,\n useExternalAccounts,\n useSetExternalAccountPrimary,\n useUnsetExternalAccountPrimary,\n useUpdateExternalAccount,\n useVerifyExternalAccount,\n type UpdateExternalAccountVariables,\n} from './use-external-accounts.js';\nexport { useCreateEndorsement } from './use-endorsement-mutations.js';\nexport {\n usePendingConfirmations,\n useGivenConfirmations,\n useCreateConfirmation,\n useDismissConfirmation,\n useRevokeConfirmation,\n} from './use-confirmations.js';\nexport { useInboxCounts } from './use-inbox.js';\nexport { useVerificationLog } from './use-verification.js';\nexport {\n useOrgAttestations,\n useAttestationRequests,\n useCreateOrgAttestation,\n useOffboardOrgAttestation,\n useRevokeOrgAttestation,\n useRejectAttestationRequest,\n useRequestEmploymentConfirmation,\n} from './use-org-attestations.js';\nexport { useUnlinkedPositions, useDismissUnlinkedPosition } from './use-unlinked-positions.js';\nexport { useProfileCompleteness } from './use-profile-completeness.js';\nexport { useHideKeytraceClaim, useUnhideKeytraceClaim } from './use-keytrace-claims.js';\nexport { useRevealMarqueDomain, useUnrevealMarqueDomain } from './use-marque-domains.js';\nexport {\n useBulkHideStandardPublications,\n useBulkUnhideStandardPublications,\n useHideOrcidPublication,\n useHideSifaPublication,\n useHideStandardPublication,\n useRefreshOrcidPublications,\n useUnhideOrcidPublication,\n useUnhideSifaPublication,\n useUnhideStandardPublication,\n} from './use-publication-mutations.js';\nexport {\n useBulkHideProfileItems,\n useBulkUnhideProfileItems,\n useHideProfileItem,\n useUnhideProfileItem,\n} from './use-profile-items-hide.js';\nexport {\n useHiddenActivityItems,\n useHideActivityItem,\n useUnhideActivityItem,\n} from './use-activity-items-hide.js';\nexport {\n useActivityPreferences,\n useSiteActivityPreset,\n useUpdateActivityPreferences,\n} from './use-activity-preferences.js';\nexport { useStats } from './use-stats.js';\nexport { useAppsRegistry, useHiddenApps } from './use-apps.js';\nexport { useAccounts } from './use-accounts.js';\nexport {\n useCanonicalSkillSearch,\n useSearchCompanies,\n useSearchFilters,\n useSearchProfiles,\n useSkillSuggestions,\n} from './use-search.js';\nexport {\n useFeaturedProfile,\n useSimilarProfiles,\n useSuggestionCount,\n useSuggestions,\n} from './use-discovery.js';\nexport {\n useFollow,\n useFollowers,\n useFollowing,\n useFollowingFeed,\n useFollowingFeedVersion,\n useFollowingList,\n useUnfollow,\n type FollowVariables,\n type UnfollowVariables,\n} from './use-follow.js';\nexport { useBlueskySuggestions, useMutuals } from './use-follow-extras.js';\nexport {\n useAddFeatureAllowlist,\n useFeatureAllowlist,\n useRemoveFeatureAllowlist,\n type AddFeatureAllowlistVariables,\n type RemoveFeatureAllowlistVariables,\n} from './use-feature-allowlist.js';\nexport { useAdminReviewQueues } from './use-admin-review-queues.js';\nexport { useActivityFeed, useActivityTeaser, useHeatmapData } from './use-activity.js';\nexport { useMyGithubPullRequests, type UseMyGithubPullRequestsParams } from './use-github-prs.js';\nexport { useEndorsementCount } from './use-endorsement.js';\nexport { useNetworkStreamCount } from './use-stream.js';\nexport { useAppAccountCheck, useReactionStatus } from './use-reactions.js';\nexport {\n useCreateReaction,\n useDeleteReaction,\n type CreateReactionVariables,\n type DeleteReactionVariables,\n} from './use-reaction-mutations.js';\nexport { useMyRoadmapVotes, useRoadmapVotes } from './use-roadmap.js';\nexport { useCastRoadmapVote, useRetractRoadmapVote } from './use-roadmap-mutations.js';\nexport { useDeleteAccount, useResetProfile, useWipePreview } from './use-destructive.js';\nexport { useDeleteRepoRecords, useRepoInventory } from './use-repo-inventory.js';\n\nexport {\n useEntitySearch,\n useSelectEntity,\n useImportSearchEntities,\n useDebouncedValue,\n type UseEntitySearchOptions,\n} from './use-entity-search.js';\n\nexport { useOrgProfile } from './use-org-profile.js';\nexport { useOrgClaim } from './use-org-claim.js';\nexport { useUpdateOrgProfile } from './use-org-profile-settings.js';\nexport { useOrgDomainChallenge, useOrgDomainVerify } from './use-org-domains.js';\nexport {\n useAddOrgNotificationEmail,\n useRemoveOrgNotificationEmail,\n} from './use-org-notification-emails.js';\n\nexport { sifaQueryKeys, type SifaQueryKey } from '../keys.js';\nexport {\n useCreateInvestment,\n useUpdateInvestment,\n useDeleteInvestment,\n} from './use-investment-mutations.js';\n"],"mappings":";AAYA,SAAS,cAAc,qBAA6C;AAEpE,SAAS,eAAe,kBAAkB;AAC1C,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,sBAAsB,8BAA8B;AAC7D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAC/B,SAAS,0BAA0B;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB,kCAAkC;AACjE,SAAS,8BAA8B;AACvC,SAAS,sBAAsB,8BAA8B;AAC7D,SAAS,uBAAuB,+BAA+B;AAC/D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB;AACzB,SAAS,iBAAiB,qBAAqB;AAC/C,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,uBAAuB,kBAAkB;AAClD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SAAS,4BAA4B;AACrC,SAAS,iBAAiB,mBAAmB,sBAAsB;AACnE,SAAS,+BAAmE;AAC5E,SAAS,2BAA2B;AACpC,SAAS,6BAA6B;AACtC,SAAS,oBAAoB,yBAAyB;AACtD;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,mBAAmB,uBAAuB;AACnD,SAAS,oBAAoB,6BAA6B;AAC1D,SAAS,kBAAkB,iBAAiB,sBAAsB;AAClE,SAAS,sBAAsB,wBAAwB;AAEvD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAEP,SAAS,qBAAqB;AAC9B,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,uBAAuB,0BAA0B;AAC1D;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEP,SAAS,qBAAwC;AACjD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/query/hooks/use-activity-preferences.ts
|
|
4
|
+
import {
|
|
5
|
+
useMutation,
|
|
6
|
+
useQuery,
|
|
7
|
+
useQueryClient
|
|
8
|
+
} from "@tanstack/react-query";
|
|
9
|
+
import "../client.js";
|
|
10
|
+
import { useSifaConfig } from "../config.js";
|
|
11
|
+
import {
|
|
12
|
+
fetchActivityPreferences,
|
|
13
|
+
fetchSiteActivityPreset,
|
|
14
|
+
updateActivityPreferences
|
|
15
|
+
} from "../fetchers/activity-preferences.js";
|
|
16
|
+
import { sifaQueryKeys } from "../keys.js";
|
|
17
|
+
function useActivityPreferences(options) {
|
|
18
|
+
const config = useSifaConfig();
|
|
19
|
+
return useQuery({
|
|
20
|
+
queryKey: sifaQueryKeys.activity.preferences(),
|
|
21
|
+
queryFn: () => fetchActivityPreferences(config),
|
|
22
|
+
...options
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function useSiteActivityPreset(handleOrDid, options) {
|
|
26
|
+
const config = useSifaConfig();
|
|
27
|
+
return useQuery({
|
|
28
|
+
queryKey: sifaQueryKeys.activity.sitePreset(handleOrDid ?? ""),
|
|
29
|
+
queryFn: () => fetchSiteActivityPreset(config, handleOrDid ?? ""),
|
|
30
|
+
enabled: Boolean(handleOrDid) && (options?.enabled ?? true),
|
|
31
|
+
...options
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function useUpdateActivityPreferences(options) {
|
|
35
|
+
const config = useSifaConfig();
|
|
36
|
+
const queryClient = useQueryClient();
|
|
37
|
+
return useMutation({
|
|
38
|
+
...options,
|
|
39
|
+
mutationFn: (input) => updateActivityPreferences(config, input),
|
|
40
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
41
|
+
if (result.success) {
|
|
42
|
+
await queryClient.invalidateQueries({ queryKey: sifaQueryKeys.activity.all() });
|
|
43
|
+
}
|
|
44
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
useActivityPreferences,
|
|
50
|
+
useSiteActivityPreset,
|
|
51
|
+
useUpdateActivityPreferences
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=use-activity-preferences.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/query/hooks/use-activity-preferences.ts"],"sourcesContent":["'use client';\n\nimport {\n useMutation,\n useQuery,\n useQueryClient,\n type UseMutationOptions,\n type UseQueryOptions,\n} from '@tanstack/react-query';\n\nimport { type WriteResult } from '../client.js';\nimport { useSifaConfig } from '../config.js';\nimport {\n fetchActivityPreferences,\n fetchSiteActivityPreset,\n updateActivityPreferences,\n type ActivityPreferences,\n type SiteActivityPresetResponse,\n type UpdateActivityPreferencesInput,\n} from '../fetchers/activity-preferences.js';\nimport { sifaQueryKeys } from '../keys.js';\n\n/** The authenticated user's own activity preferences. */\nexport function useActivityPreferences(\n options?: Omit<\n UseQueryOptions<\n ActivityPreferences | null,\n Error,\n ActivityPreferences | null,\n ReturnType<typeof sifaQueryKeys.activity.preferences>\n >,\n 'queryKey' | 'queryFn'\n >,\n) {\n const config = useSifaConfig();\n return useQuery({\n queryKey: sifaQueryKeys.activity.preferences(),\n queryFn: () => fetchActivityPreferences(config),\n ...options,\n });\n}\n\n/** Anyone's personal-site preset, by handle or DID. */\nexport function useSiteActivityPreset(\n handleOrDid: string | undefined | null,\n options?: Omit<\n UseQueryOptions<\n SiteActivityPresetResponse | null,\n Error,\n SiteActivityPresetResponse | null,\n ReturnType<typeof sifaQueryKeys.activity.sitePreset>\n >,\n 'queryKey' | 'queryFn'\n >,\n) {\n const config = useSifaConfig();\n return useQuery({\n queryKey: sifaQueryKeys.activity.sitePreset(handleOrDid ?? ''),\n queryFn: () => fetchSiteActivityPreset(config, handleOrDid ?? ''),\n enabled: Boolean(handleOrDid) && (options?.enabled ?? true),\n ...options,\n });\n}\n\n/** Update the caller's own preferences, then refresh every activity query. */\nexport function useUpdateActivityPreferences(\n options?: Omit<\n UseMutationOptions<\n WriteResult<Partial<ActivityPreferences>>,\n Error,\n UpdateActivityPreferencesInput\n >,\n 'mutationFn'\n >,\n) {\n const config = useSifaConfig();\n const queryClient = useQueryClient();\n return useMutation({\n ...options,\n mutationFn: (input: UpdateActivityPreferencesInput) => updateActivityPreferences(config, input),\n onSuccess: async (result, variables, onMutateResult, context) => {\n if (result.success) {\n await queryClient.invalidateQueries({ queryKey: sifaQueryKeys.activity.all() });\n }\n await options?.onSuccess?.(result, variables, onMutateResult, context);\n },\n });\n}\n"],"mappings":";;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAEP,OAAiC;AACjC,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP,SAAS,qBAAqB;AAGvB,SAAS,uBACd,SASA;AACA,QAAM,SAAS,cAAc;AAC7B,SAAO,SAAS;AAAA,IACd,UAAU,cAAc,SAAS,YAAY;AAAA,IAC7C,SAAS,MAAM,yBAAyB,MAAM;AAAA,IAC9C,GAAG;AAAA,EACL,CAAC;AACH;AAGO,SAAS,sBACd,aACA,SASA;AACA,QAAM,SAAS,cAAc;AAC7B,SAAO,SAAS;AAAA,IACd,UAAU,cAAc,SAAS,WAAW,eAAe,EAAE;AAAA,IAC7D,SAAS,MAAM,wBAAwB,QAAQ,eAAe,EAAE;AAAA,IAChE,SAAS,QAAQ,WAAW,MAAM,SAAS,WAAW;AAAA,IACtD,GAAG;AAAA,EACL,CAAC;AACH;AAGO,SAAS,6BACd,SAQA;AACA,QAAM,SAAS,cAAc;AAC7B,QAAM,cAAc,eAAe;AACnC,SAAO,YAAY;AAAA,IACjB,GAAG;AAAA,IACH,YAAY,CAAC,UAA0C,0BAA0B,QAAQ,KAAK;AAAA,IAC9F,WAAW,OAAO,QAAQ,WAAW,gBAAgB,YAAY;AAC/D,UAAI,OAAO,SAAS;AAClB,cAAM,YAAY,kBAAkB,EAAE,UAAU,cAAc,SAAS,IAAI,EAAE,CAAC;AAAA,MAChF;AACA,YAAM,SAAS,YAAY,QAAQ,WAAW,gBAAgB,OAAO;AAAA,IACvE;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/query/hooks/use-activity.ts"],"sourcesContent":["'use client';\n\nimport { useQuery, type UseQueryOptions } from '@tanstack/react-query';\n\nimport { useSifaConfig } from '../config.js';\nimport {\n fetchActivityFeed,\n fetchActivityTeaser,\n fetchHeatmapData,\n type ActivityFeedResponse,\n type ActivityTeaserResponse,\n type FetchActivityFeedOptions,\n type HeatmapResponse,\n} from '../fetchers/activity.js';\nimport { sifaQueryKeys } from '../keys.js';\n\nexport function useHeatmapData(\n handleOrDid: string | undefined | null,\n days: number,\n options?: Omit<\n UseQueryOptions<\n HeatmapResponse | null,\n Error,\n HeatmapResponse | null,\n ReturnType<typeof sifaQueryKeys.activity.heatmap>\n >,\n 'queryKey' | 'queryFn'\n >,\n) {\n const config = useSifaConfig();\n return useQuery({\n queryKey: sifaQueryKeys.activity.heatmap(handleOrDid ?? '', days),\n queryFn: () => fetchHeatmapData(config, handleOrDid ?? '', days),\n enabled: Boolean(handleOrDid) && (options?.enabled ?? true),\n ...options,\n });\n}\n\nexport function useActivityTeaser(\n handleOrDid: string | undefined | null,\n options?: Omit<\n UseQueryOptions<\n ActivityTeaserResponse | null,\n Error,\n ActivityTeaserResponse | null,\n ReturnType<typeof sifaQueryKeys.activity.teaser>\n >,\n 'queryKey' | 'queryFn'\n >,\n) {\n const config = useSifaConfig();\n return useQuery({\n queryKey: sifaQueryKeys.activity.teaser(handleOrDid ?? ''),\n queryFn: () => fetchActivityTeaser(config, handleOrDid ?? ''),\n enabled: Boolean(handleOrDid) && (options?.enabled ?? true),\n ...options,\n });\n}\n\nexport function useActivityFeed(\n handleOrDid: string | undefined | null,\n opts: Pick
|
|
1
|
+
{"version":3,"sources":["../../../src/query/hooks/use-activity.ts"],"sourcesContent":["'use client';\n\nimport { useQuery, type UseQueryOptions } from '@tanstack/react-query';\n\nimport { useSifaConfig } from '../config.js';\nimport {\n fetchActivityFeed,\n fetchActivityTeaser,\n fetchHeatmapData,\n type ActivityFeedResponse,\n type ActivityTeaserResponse,\n type FetchActivityFeedOptions,\n type HeatmapResponse,\n} from '../fetchers/activity.js';\nimport { sifaQueryKeys } from '../keys.js';\n\nexport function useHeatmapData(\n handleOrDid: string | undefined | null,\n days: number,\n options?: Omit<\n UseQueryOptions<\n HeatmapResponse | null,\n Error,\n HeatmapResponse | null,\n ReturnType<typeof sifaQueryKeys.activity.heatmap>\n >,\n 'queryKey' | 'queryFn'\n >,\n) {\n const config = useSifaConfig();\n return useQuery({\n queryKey: sifaQueryKeys.activity.heatmap(handleOrDid ?? '', days),\n queryFn: () => fetchHeatmapData(config, handleOrDid ?? '', days),\n enabled: Boolean(handleOrDid) && (options?.enabled ?? true),\n ...options,\n });\n}\n\nexport function useActivityTeaser(\n handleOrDid: string | undefined | null,\n options?: Omit<\n UseQueryOptions<\n ActivityTeaserResponse | null,\n Error,\n ActivityTeaserResponse | null,\n ReturnType<typeof sifaQueryKeys.activity.teaser>\n >,\n 'queryKey' | 'queryFn'\n >,\n) {\n const config = useSifaConfig();\n return useQuery({\n queryKey: sifaQueryKeys.activity.teaser(handleOrDid ?? ''),\n queryFn: () => fetchActivityTeaser(config, handleOrDid ?? ''),\n enabled: Boolean(handleOrDid) && (options?.enabled ?? true),\n ...options,\n });\n}\n\nexport function useActivityFeed(\n handleOrDid: string | undefined | null,\n opts: Pick<\n FetchActivityFeedOptions,\n 'category' | 'categories' | 'tags' | 'preset' | 'limit' | 'cursor'\n > = {},\n options?: Omit<\n UseQueryOptions<\n ActivityFeedResponse | null,\n Error,\n ActivityFeedResponse | null,\n ReturnType<typeof sifaQueryKeys.activity.feed>\n >,\n 'queryKey' | 'queryFn'\n >,\n) {\n const config = useSifaConfig();\n return useQuery({\n queryKey: sifaQueryKeys.activity.feed(handleOrDid ?? '', opts as Record<string, unknown>),\n queryFn: () => fetchActivityFeed(config, handleOrDid ?? '', opts),\n enabled: Boolean(handleOrDid) && (options?.enabled ?? true),\n ...options,\n });\n}\n"],"mappings":";;;AAEA,SAAS,gBAAsC;AAE/C,SAAS,qBAAqB;AAC9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,SAAS,qBAAqB;AAEvB,SAAS,eACd,aACA,MACA,SASA;AACA,QAAM,SAAS,cAAc;AAC7B,SAAO,SAAS;AAAA,IACd,UAAU,cAAc,SAAS,QAAQ,eAAe,IAAI,IAAI;AAAA,IAChE,SAAS,MAAM,iBAAiB,QAAQ,eAAe,IAAI,IAAI;AAAA,IAC/D,SAAS,QAAQ,WAAW,MAAM,SAAS,WAAW;AAAA,IACtD,GAAG;AAAA,EACL,CAAC;AACH;AAEO,SAAS,kBACd,aACA,SASA;AACA,QAAM,SAAS,cAAc;AAC7B,SAAO,SAAS;AAAA,IACd,UAAU,cAAc,SAAS,OAAO,eAAe,EAAE;AAAA,IACzD,SAAS,MAAM,oBAAoB,QAAQ,eAAe,EAAE;AAAA,IAC5D,SAAS,QAAQ,WAAW,MAAM,SAAS,WAAW;AAAA,IACtD,GAAG;AAAA,EACL,CAAC;AACH;AAEO,SAAS,gBACd,aACA,OAGI,CAAC,GACL,SASA;AACA,QAAM,SAAS,cAAc;AAC7B,SAAO,SAAS;AAAA,IACd,UAAU,cAAc,SAAS,KAAK,eAAe,IAAI,IAA+B;AAAA,IACxF,SAAS,MAAM,kBAAkB,QAAQ,eAAe,IAAI,IAAI;AAAA,IAChE,SAAS,QAAQ,WAAW,MAAM,SAAS,WAAW;AAAA,IACtD,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
|
package/dist/query/index.cjs
CHANGED
|
@@ -1038,6 +1038,39 @@ async function fetchHiddenActivityItems(config, options = {}) {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
1041
|
+
// src/query/fetchers/activity-preferences.ts
|
|
1042
|
+
async function fetchActivityPreferences(config, options = {}) {
|
|
1043
|
+
const headers = { ...options.headers ?? {} };
|
|
1044
|
+
if (options.cookieHeader) headers.cookie = options.cookieHeader;
|
|
1045
|
+
try {
|
|
1046
|
+
return await apiFetch(config, "/api/activity-preferences", {
|
|
1047
|
+
credentials: "include",
|
|
1048
|
+
cache: "no-store",
|
|
1049
|
+
...options,
|
|
1050
|
+
headers
|
|
1051
|
+
});
|
|
1052
|
+
} catch {
|
|
1053
|
+
return null;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
function updateActivityPreferences(config, input, options = {}) {
|
|
1057
|
+
return apiWrite(config, "/api/activity-preferences", "PUT", {
|
|
1058
|
+
...options,
|
|
1059
|
+
body: input
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
async function fetchSiteActivityPreset(config, handleOrDid, options = {}) {
|
|
1063
|
+
try {
|
|
1064
|
+
return await apiFetch(
|
|
1065
|
+
config,
|
|
1066
|
+
`/api/activity-preferences/site-preset/${encodeIdentifier(handleOrDid)}`,
|
|
1067
|
+
options
|
|
1068
|
+
);
|
|
1069
|
+
} catch {
|
|
1070
|
+
return null;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1041
1074
|
// src/query/fetchers/stats.ts
|
|
1042
1075
|
async function fetchStats(config, options = {}) {
|
|
1043
1076
|
try {
|
|
@@ -1617,6 +1650,9 @@ async function fetchActivityTeaser(config, handleOrDid, options = {}) {
|
|
|
1617
1650
|
async function fetchActivityFeed(config, handleOrDid, options = {}) {
|
|
1618
1651
|
const params = new URLSearchParams();
|
|
1619
1652
|
if (options.category) params.set("category", options.category);
|
|
1653
|
+
if (options.categories?.length) params.set("categories", options.categories.join(","));
|
|
1654
|
+
if (options.tags?.length) params.set("tags", options.tags.join(","));
|
|
1655
|
+
if (options.preset) params.set("preset", options.preset);
|
|
1620
1656
|
if (options.limit) params.set("limit", String(options.limit));
|
|
1621
1657
|
if (options.cursor) params.set("cursor", options.cursor);
|
|
1622
1658
|
const qs = params.toString();
|
|
@@ -1680,6 +1716,11 @@ var RpgItemStatusSchema = zod.z.object({
|
|
|
1680
1716
|
category: zod.z.string(),
|
|
1681
1717
|
earned: zod.z.boolean(),
|
|
1682
1718
|
state: zod.z.enum(["locked", "earned", "given", "claimed"]),
|
|
1719
|
+
/**
|
|
1720
|
+
* True when the viewer's rpg.actor character wears this (claimed) item.
|
|
1721
|
+
* Defaults to false for an older API that does not send it.
|
|
1722
|
+
*/
|
|
1723
|
+
worn: zod.z.boolean().default(false),
|
|
1683
1724
|
iconUrl: zod.z.string().url().nullable()
|
|
1684
1725
|
});
|
|
1685
1726
|
var RpgStatusResponseSchema = zod.z.object({
|
|
@@ -2074,7 +2115,10 @@ var sifaQueryKeys = {
|
|
|
2074
2115
|
feed: (handleOrDid, opts) => ["sifa", "activity", "feed", handleOrDid, opts],
|
|
2075
2116
|
// Session-scoped: the AppView reads the caller's own hides from their
|
|
2076
2117
|
// cookie, so there is only ever one list per client.
|
|
2077
|
-
hiddenItems: () => ["sifa", "activity", "hidden-items"]
|
|
2118
|
+
hiddenItems: () => ["sifa", "activity", "hidden-items"],
|
|
2119
|
+
// Session-scoped, like hiddenItems: the caller's own preferences.
|
|
2120
|
+
preferences: () => ["sifa", "activity", "preferences"],
|
|
2121
|
+
sitePreset: (handleOrDid) => ["sifa", "activity", "site-preset", handleOrDid]
|
|
2078
2122
|
},
|
|
2079
2123
|
github: {
|
|
2080
2124
|
all: () => ["sifa", "github"],
|
|
@@ -3302,6 +3346,37 @@ var useHideActivityItem = makeHideHook(
|
|
|
3302
3346
|
var useUnhideActivityItem = makeHideHook(
|
|
3303
3347
|
(config, input) => unhideActivityItem(config, input)
|
|
3304
3348
|
);
|
|
3349
|
+
function useActivityPreferences(options) {
|
|
3350
|
+
const config = useSifaConfig();
|
|
3351
|
+
return reactQuery.useQuery({
|
|
3352
|
+
queryKey: sifaQueryKeys.activity.preferences(),
|
|
3353
|
+
queryFn: () => fetchActivityPreferences(config),
|
|
3354
|
+
...options
|
|
3355
|
+
});
|
|
3356
|
+
}
|
|
3357
|
+
function useSiteActivityPreset(handleOrDid, options) {
|
|
3358
|
+
const config = useSifaConfig();
|
|
3359
|
+
return reactQuery.useQuery({
|
|
3360
|
+
queryKey: sifaQueryKeys.activity.sitePreset(handleOrDid ?? ""),
|
|
3361
|
+
queryFn: () => fetchSiteActivityPreset(config, handleOrDid ?? ""),
|
|
3362
|
+
enabled: Boolean(handleOrDid) && (options?.enabled ?? true),
|
|
3363
|
+
...options
|
|
3364
|
+
});
|
|
3365
|
+
}
|
|
3366
|
+
function useUpdateActivityPreferences(options) {
|
|
3367
|
+
const config = useSifaConfig();
|
|
3368
|
+
const queryClient = reactQuery.useQueryClient();
|
|
3369
|
+
return reactQuery.useMutation({
|
|
3370
|
+
...options,
|
|
3371
|
+
mutationFn: (input) => updateActivityPreferences(config, input),
|
|
3372
|
+
onSuccess: async (result, variables, onMutateResult, context) => {
|
|
3373
|
+
if (result.success) {
|
|
3374
|
+
await queryClient.invalidateQueries({ queryKey: sifaQueryKeys.activity.all() });
|
|
3375
|
+
}
|
|
3376
|
+
await options?.onSuccess?.(result, variables, onMutateResult, context);
|
|
3377
|
+
}
|
|
3378
|
+
});
|
|
3379
|
+
}
|
|
3305
3380
|
function useStats(options) {
|
|
3306
3381
|
const config = useSifaConfig();
|
|
3307
3382
|
return reactQuery.useQuery({
|
|
@@ -4128,6 +4203,7 @@ exports.dismissUnlinkedPosition = dismissUnlinkedPosition;
|
|
|
4128
4203
|
exports.effectiveContentVisibility = effectiveContentVisibility;
|
|
4129
4204
|
exports.fetchAccounts = fetchAccounts;
|
|
4130
4205
|
exports.fetchActivityFeed = fetchActivityFeed;
|
|
4206
|
+
exports.fetchActivityPreferences = fetchActivityPreferences;
|
|
4131
4207
|
exports.fetchActivityTeaser = fetchActivityTeaser;
|
|
4132
4208
|
exports.fetchAppsRegistry = fetchAppsRegistry;
|
|
4133
4209
|
exports.fetchAtFundLink = fetchAtFundLink;
|
|
@@ -4166,6 +4242,7 @@ exports.fetchRpgStatus = fetchRpgStatus;
|
|
|
4166
4242
|
exports.fetchSearchFilters = fetchSearchFilters;
|
|
4167
4243
|
exports.fetchSearchProfiles = fetchSearchProfiles;
|
|
4168
4244
|
exports.fetchSimilarProfiles = fetchSimilarProfiles;
|
|
4245
|
+
exports.fetchSiteActivityPreset = fetchSiteActivityPreset;
|
|
4169
4246
|
exports.fetchSkillSuggestions = fetchSkillSuggestions;
|
|
4170
4247
|
exports.fetchSpeakers = fetchSpeakers;
|
|
4171
4248
|
exports.fetchStats = fetchStats;
|
|
@@ -4233,6 +4310,7 @@ exports.unrevealMarqueDomain = unrevealMarqueDomain;
|
|
|
4233
4310
|
exports.unsetExternalAccountPrimary = unsetExternalAccountPrimary;
|
|
4234
4311
|
exports.unsetPositionPrimary = unsetPositionPrimary;
|
|
4235
4312
|
exports.unsetSectionPrimary = unsetSectionPrimary;
|
|
4313
|
+
exports.updateActivityPreferences = updateActivityPreferences;
|
|
4236
4314
|
exports.updateBskyContentLabelPrefs = updateBskyContentLabelPrefs;
|
|
4237
4315
|
exports.updateEducation = updateEducation;
|
|
4238
4316
|
exports.updateExternalAccount = updateExternalAccount;
|
|
@@ -4248,6 +4326,7 @@ exports.uploadAvatar = uploadAvatar;
|
|
|
4248
4326
|
exports.uploadNamePronunciationAudio = uploadNamePronunciationAudio;
|
|
4249
4327
|
exports.useAccounts = useAccounts;
|
|
4250
4328
|
exports.useActivityFeed = useActivityFeed;
|
|
4329
|
+
exports.useActivityPreferences = useActivityPreferences;
|
|
4251
4330
|
exports.useActivityTeaser = useActivityTeaser;
|
|
4252
4331
|
exports.useAddFeatureAllowlist = useAddFeatureAllowlist;
|
|
4253
4332
|
exports.useAddOrgNotificationEmail = useAddOrgNotificationEmail;
|
|
@@ -4355,6 +4434,7 @@ exports.useSetPositionPrimary = useSetPositionPrimary;
|
|
|
4355
4434
|
exports.useSetSectionPrimary = useSetSectionPrimary;
|
|
4356
4435
|
exports.useSifaConfig = useSifaConfig;
|
|
4357
4436
|
exports.useSimilarProfiles = useSimilarProfiles;
|
|
4437
|
+
exports.useSiteActivityPreset = useSiteActivityPreset;
|
|
4358
4438
|
exports.useSkillSuggestions = useSkillSuggestions;
|
|
4359
4439
|
exports.useStats = useStats;
|
|
4360
4440
|
exports.useSuggestionCount = useSuggestionCount;
|
|
@@ -4372,6 +4452,7 @@ exports.useUnrevealMarqueDomain = useUnrevealMarqueDomain;
|
|
|
4372
4452
|
exports.useUnsetExternalAccountPrimary = useUnsetExternalAccountPrimary;
|
|
4373
4453
|
exports.useUnsetPositionPrimary = useUnsetPositionPrimary;
|
|
4374
4454
|
exports.useUnsetSectionPrimary = useUnsetSectionPrimary;
|
|
4455
|
+
exports.useUpdateActivityPreferences = useUpdateActivityPreferences;
|
|
4375
4456
|
exports.useUpdateBskyContentLabelPrefs = useUpdateBskyContentLabelPrefs;
|
|
4376
4457
|
exports.useUpdateEducation = useUpdateEducation;
|
|
4377
4458
|
exports.useUpdateExternalAccount = useUpdateExternalAccount;
|