import type { UmbCurrentUserExternalLoginProviderModel, UmbCurrentUserMfaProviderModel, UmbCurrentUserModel } from '../types.js'; import type { UmbControllerHost } from '../../../../libs/controller-api/index.js'; import { UmbRepositoryBase } from '../../../core/repository/index.js'; import type { UmbDataSourceErrorResponse, UmbRepositoryResponse, UmbRepositoryResponseWithAsObservable } from '../../../core/repository/index.js'; import { UMB_NOTIFICATION_CONTEXT } from '../../../core/notification/index.js'; /** * A repository for the current user * @class UmbCurrentUserRepository * @augments {UmbRepositoryBase} */ export declare class UmbCurrentUserRepository extends UmbRepositoryBase { #private; protected notificationContext?: typeof UMB_NOTIFICATION_CONTEXT.TYPE; constructor(host: UmbControllerHost); /** * Request the current user * @returns {Promise>} The current user data, error and an observable of the current user store * @memberof UmbCurrentUserRepository */ requestCurrentUser(): Promise>; /** * Request the current user's external login providers * @returns {Promise | undefined, Array>>} The external login providers data, error and an observable of the external login providers store * @memberof UmbCurrentUserRepository */ requestExternalLoginProviders(): Promise | undefined, Array>>; /** * Request the current user's available MFA login providers * @returns {Promise | undefined, Array>>} The MFA login providers data, error and an observable of the MFA providers store * @memberof UmbCurrentUserRepository */ requestMfaLoginProviders(): Promise | undefined, Array>>; /** * Enable an MFA provider * @param {string} providerName The name of the provider to enable * @param {string} code The activation code of the provider to enable * @param {string} secret The secret used to verify the provider's activation code * @returns {Promise} An error if the provider could not be enabled * @memberof UmbCurrentUserRepository */ enableMfaProvider(providerName: string, code: string, secret: string): Promise; /** * Disable an MFA provider * @param {string} providerName The name of the provider to disable * @param {string} code The activation code of the provider to disable * @returns {Promise} An error if the provider could not be disabled * @memberof UmbCurrentUserRepository */ disableMfaProvider(providerName: string, code: string): Promise; /** * Change password for current user * @param {string} newPassword The new password * @param {string} oldPassword The old password * @returns {Promise>} The result of the change password request */ changePassword(newPassword: string, oldPassword: string): Promise>; /** * Upload an avatar for the current user * @param {File} file - The image file to use as avatar * @returns {Promise} An error if the avatar upload failed */ uploadAvatar(file: File): Promise; /** * Delete the current user's avatar * @returns {Promise} An error if the avatar deletion failed */ deleteAvatar(): Promise; /** * Update the current user's profile settings * @param {string} languageIsoCode The ISO code of the language to set for the current user * @returns {Promise} An error if the profile update failed */ updateProfile(languageIsoCode: string): Promise; } export default UmbCurrentUserRepository;