Preferences
The Preferences class manages user preferences and consent states.
Class: Preferences
Constructor
constructor(client: Client): Initializes a new preferences instance.
Instance Methods
sync(): Promise<number>: Synchronizes the user's preferences from the network.async inboxState(refreshFromNetwork?: boolean): Promise<SafeInboxState>: Retrieves the current inbox state.async inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork?: boolean): Promise<SafeInboxState[]>: Retrieves inbox state for specific inbox IDs.async getLatestInboxState(inboxId: string): Promise<SafeInboxState>: Gets the latest inbox state for a specific inbox.async setConsentStates(records: SafeConsent[]): Promise<void>: Updates consent states for multiple records.async getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>: Retrieves consent state for a specific entity.async streamConsent(callback?: StreamCallback<SafeConsent[]>): Promise<AsyncStream<SafeConsent[]>>: Creates a stream of consent state updates.async streamPreferences(callback?: StreamCallback<UserPreference[]>): Promise<AsyncStream<UserPreference[]>>: Creates a stream of user preference updates.
Last updated