import type { UmbCurrentUserModel } from '../types.js'; import type { UserExternalLoginProviderModel, UserTwoFactorProviderModel } from '../../../core/backend-api/index.js'; import { UmbControllerBase } from '../../../../libs/class-api/index.js'; import type { UmbDataSourceErrorResponse, UmbDataSourceResponse } from '../../../core/repository/index.js'; /** * A data source for the current user that fetches data from the server * @class UmbCurrentUserServerDataSource */ export declare class UmbCurrentUserServerDataSource extends UmbControllerBase { #private; /** * Get the current user * @returns {Promise>} The current user data or an error * @memberof UmbCurrentUserServerDataSource */ getCurrentUser(): Promise>; /** * Get the current user's external login providers * @returns {Promise>>} The external login providers data or an error * @memberof UmbCurrentUserServerDataSource */ getExternalLoginProviders(): Promise>>; /** * Get the current user's available MFA login providers * @returns {Promise>>} The MFA login providers data or an error * @memberof UmbCurrentUserServerDataSource */ getMfaLoginProviders(): Promise>>; /** * 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 */ 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 */ disableMfaProvider(providerName: string, code: string): Promise; /** * Change the 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 using a temporary file unique * @param {string} fileUnique The unique of the temporary file to use as avatar * @returns {Promise} An error if the avatar upload failed */ uploadCurrentUserAvatar(fileUnique: string): Promise; /** * Delete the current user's avatar * @returns {Promise} An error if the avatar deletion failed */ deleteCurrentUserAvatar(): Promise; /** * Update the current user's profile * @param {string} languageIsoCode The ISO code of the language to set for the current user * @returns {Promise} An error if the profile update failed */ updateCurrentUserProfile(languageIsoCode: string): Promise; }