import type { UmbCurrentUserModel } from './types.js'; import { UmbContextBase } from '../../../libs/class-api/index.js'; import type { UmbControllerHost } from '../../../libs/controller-api/index.js'; import type { UmbReferenceByUnique } from '../../core/models/index.js'; export declare class UmbCurrentUserContext extends UmbContextBase { #private; readonly currentUser: import("rxjs").Observable; readonly allowedSections: import("rxjs").Observable; readonly avatarUrls: import("rxjs").Observable; readonly documentStartNodeUniques: import("rxjs").Observable; readonly elementStartNodeUniques: import("rxjs").Observable; readonly email: import("rxjs").Observable; readonly fallbackPermissions: import("rxjs").Observable; readonly hasAccessToAllLanguages: import("rxjs").Observable; readonly hasAccessToSensitiveData: import("rxjs").Observable; readonly hasDocumentRootAccess: import("rxjs").Observable; readonly hasElementRootAccess: import("rxjs").Observable; readonly hasMediaRootAccess: import("rxjs").Observable; readonly isAdmin: import("rxjs").Observable; readonly languageIsoCode: import("rxjs").Observable; readonly languages: import("rxjs").Observable; readonly mediaStartNodeUniques: import("rxjs").Observable; readonly name: import("rxjs").Observable; readonly permissions: import("rxjs").Observable; readonly unique: import("rxjs").Observable; readonly userName: import("rxjs").Observable; constructor(host: UmbControllerHost); /** * Loads the current user. Concurrent callers share the same in-flight promise, * so awaiting `load()` always waits for `#currentUser` to be populated. * @returns {Promise} Resolves once the current user observable has emitted. */ load(): Promise; /** * Invalidates the loaded current user, so that the next call to {@link load} fetches it from the server again. * Call this when the loaded user can no longer be trusted, e.g. when authorization is lost — a subsequent * sign-in may be for a different user. * @remarks The `#currentUser` state is deliberately NOT cleared here. The backoffice stays mounted behind * the login overlay during a session timeout, and several consumers observe the unfiltered observable * parts (e.g. recycle-bin conditions, sensitive-data property gating, language read-only checks) without * guarding against `undefined` — clearing would tear down or read-only-flip open workspaces mid-edit for * the common case of the same user signing back in. Consumers of the filtered {@link currentUser} * observable hold their last value until the fresh user has been fetched and then re-evaluate. */ invalidate(): void; /** * Checks if a user is the current user. * @param {string} userUnique The user id to check * @returns {Promise} True if the user is the current user, otherwise false */ isUserCurrentUser(userUnique: string): Promise; /** * Checks if the current user is an admin. * @returns {Promise} True if the current user is an admin, otherwise false */ isCurrentUserAdmin(): Promise; /** * Get the allowed sections for the current user * @returns {Array | undefined} The allowed sections for the current user */ getAllowedSection(): Array | undefined; /** * Get the avatar urls for the current user * @returns {Array | undefined} The avatar urls for the current user */ getAvatarUrls(): Array | undefined; /** * Get the document start node uniques for the current user * @returns {Array | undefined} The document start node uniques for the current user */ getDocumentStartNodeUniques(): Array | undefined; /** * Get the email for the current user * @returns {string | undefined} The email for the current user */ getEmail(): string | undefined; /** * Get the fallback permissions for the current user * @returns {Array | undefined} The fallback permissions for the current user */ getFallbackPermissions(): Array | undefined; /** * Get if the current user has access to all languages * @returns {boolean | undefined} True if the current user has access to all languages, otherwise false */ getHasAccessToAllLanguages(): boolean | undefined; /** * Get if the current user has access to sensitive data * @returns {boolean | undefined} True if the current user has access to sensitive data, otherwise false */ getHasAccessToSensitiveData(): boolean | undefined; /** * Get if the current user has document root access * @returns {boolean | undefined} True if the current user has document root access, otherwise false */ getHasDocumentRootAccess(): boolean | undefined; /** * Get if the current user has media root access * @returns {boolean | undefined} True if the current user has media root access, otherwise false */ getHasMediaRootAccess(): boolean | undefined; /** * Get if the current user is an admin * @returns {boolean | undefined} True if the current user is an admin, otherwise false */ getIsAdmin(): boolean | undefined; /** * Get the language iso code for the current user * @returns {string | undefined} The language iso code for the current user */ getLanguageIsoCode(): string | undefined; /** * Get the languages for the current user * @returns {Array | undefined} The languages for the current user */ getLanguages(): Array | undefined; /** * Get the media start node uniques for the current user * @returns {Array | undefined} The media start node uniques for the current user */ getMediaStartNodeUniques(): Array | undefined; /** * Get the name for the current user * @returns {string | undefined} The name for the current user */ getName(): string | undefined; /** * Get the permissions for the current user * @returns {unknown[] | undefined} The permissions for the current user */ getPermissions(): unknown[] | undefined; /** * Get the unique for the current user * @returns {string | undefined} The unique for the current user */ getUnique(): string | undefined; /** * Get the user name for the current user * @returns {string | undefined} The user name for the current user */ getUserName(): string | undefined; destroy(): void; } export default UmbCurrentUserContext;