import type { UserExternalLoginProviderModel, UserTwoFactorProviderModel } from '../../core/backend-api/index.js'; import type { UmbReferenceByUnique } from '../../core/models/index.js'; import type { UmbApiError, UmbCancelError } from '../../core/resources/index.js'; export type * from './user-profile-app.extension.js'; export type * from './current-user-action.extension.js'; export type * from './conditions/types.js'; export interface UmbCurrentUserModel { allowedSections: Array; avatarUrls: Array; documentStartNodeUniques: Array; email: string; fallbackPermissions: Array; hasAccessToAllLanguages: boolean; hasAccessToSensitiveData: boolean; hasDocumentRootAccess: boolean; hasMediaRootAccess: boolean; isAdmin: boolean; languageIsoCode: string; languages: Array; mediaStartNodeUniques: Array; name: string; permissions: Array; unique: string; userName: string; userGroupUniques: string[]; } export type UmbCurrentUserExternalLoginProviderModel = UserExternalLoginProviderModel; export type UmbCurrentUserMfaProviderModel = UserTwoFactorProviderModel; export type UmbMfaProviderConfigurationCallback = Promise<{ error?: UmbApiError | UmbCancelError; }>; export interface UmbMfaProviderConfigurationElementProps { /** * The name of the provider reflecting the provider name in the backend. */ providerName: string; /** * The display name of the provider. If this is not set, the provider name will be used. */ displayName: string; /** * Call this function to execute the action for the given provider, e.g. to enable or disable it. * @param providerName The name of the provider to enable. * @param code The authentication code from the authentication method. * @param secret The secret from the authentication backend. * @returns A promise that resolves when the action is completed with an error if the action failed. */ callback: (providerName: string, code: string, secret: string) => UmbMfaProviderConfigurationCallback; /** * Call this function to close the modal. */ close: () => void; }