import { type Action, type Service } from '@atproto/lex'; import type { AtUriString, DatetimeString, DidString } from '@atproto/syntax'; import type { app } from '../lexicons/index.js'; import type { LabelPreference } from '../moderation/index.js'; import type { BskyFeedViewPreference, BskyPreferences, BskyThreadViewPreference } from './types.js'; type Preferences = app.bsky.actor.defs.Preferences; type SavedFeed = app.bsky.actor.defs.SavedFeed; /** * Preference reads/writes target the user's account host by default (like * the client's own record helpers), regardless of the client's `service` * default — preferences live on the PDS, not behind the AppView proxy. * Pass `service` to override. */ export interface PrefsServiceOptions { service?: Service | null; } type UpdatePreferencesInput = ((prefs: Preferences) => Preferences | false) | ({ update: (prefs: Preferences) => Preferences | false; } & PrefsServiceOptions); /** * Low-level helper to update the raw preferences array on the server. * * Concurrent calls on the same Client are automatically serialized: each * read-modify-write cycle waits for the previous one to complete before * starting, matching the old Agent's per-instance AwaitLock behavior. */ export declare const updatePreferences: Action; /** * Fetches and interprets the current user's preferences into a structured BskyPreferences object. * Migrates v1 savedFeeds to v2 on first read. */ export declare const getPreferences: Action; export declare const setAdultContentEnabled: Action; export declare const setContentLabelPref: Action<{ key: string; value: LabelPreference; labelerDid?: DidString; }, void>; export declare const addSavedFeeds: Action[], SavedFeed[]>; export declare const removeSavedFeeds: Action; export declare const updateSavedFeeds: Action; export declare const overwriteSavedFeeds: Action; /** * @deprecated use updateSavedFeeds or removeSavedFeeds * (old agent.ts:856-862 addPinnedFeed) */ export declare const addPinnedFeed: Action; /** * @deprecated use updateSavedFeeds or removeSavedFeeds * (old agent.ts:864-870 removePinnedFeed) */ export declare const removePinnedFeed: Action; export declare const setFeedViewPrefs: Action<{ feed: string; } & Partial, void>; export declare const setThreadViewPrefs: Action, void>; export declare const setPersonalDetails: Action<{ birthDate: Date | DatetimeString | undefined; }, void>; export declare const setInterestsPref: Action<{ tags: string[]; }, void>; /** * Add a single muted word. (old agent.ts:1070-1112) */ export declare const addMutedWord: Action, void>; /** * Convenience method to add multiple muted words. (old agent.ts:1117-1119) */ export declare const addMutedWords: Action; /** * @deprecated use addMutedWords or addMutedWord instead (old agent.ts:1124-1131) */ export declare const upsertMutedWords: Action[], void>; /** * Update a muted word in user preferences. (old agent.ts:1136-1176) */ export declare const updateMutedWord: Action; /** * Remove a single muted word (old agent.ts:1182-1209) */ export declare const removeMutedWord: Action; /** * Convenience method to remove multiple muted words. (old agent.ts:1214-1216) */ export declare const removeMutedWords: Action; export declare const hidePost: Action; export declare const unhidePost: Action; export declare const addLabeler: Action; export declare const removeLabeler: Action; export declare const queueNudges: Action; export declare const dismissNudges: Action; /** * Set the flag for participating in the beta features program. * (upstream agent.ts setIsBetaUser, atproto#5178) */ export declare const setIsBetaUser: Action; export declare const setActiveProgressGuide: Action; export declare const upsertNux: Action; export declare const removeNuxs: Action; export declare const setVerificationPrefs: Action; export declare const setPostInteractionSettings: Action; /** * Update live event preferences. (old agent.ts:1380-1413) */ export declare const updateLiveEventPreferences: Action<{ type: 'hideFeed'; id: string; } | { type: 'unhideFeed'; id: string; } | { type: 'toggleHideAllFeeds'; }, void>; export {}; //# sourceMappingURL=preferences.d.ts.map