import { Result } from "@webiny/feature/api"; import type { AdminUser } from "../../../features/users/shared/types.js"; import type { UpdateUserInput } from "../../../features/users/shared/types.js"; import { AdminUsersRepository } from "../../../features/users/shared/abstractions.js"; import { NotAuthorizedError, EmailTakenError, UserValidationError } from "../../../features/users/shared/errors.js"; export interface IUpdateUserErrors { notAuthorized: NotAuthorizedError; validation: UserValidationError; userExists: EmailTakenError; } type UpdateUserError = IUpdateUserErrors[keyof IUpdateUserErrors] | AdminUsersRepository.Error; export interface IUpdateUser { execute(id: string, input: UpdateUserInput): Promise>; } /** Update an existing admin user. */ export declare const UpdateUserUseCase: import("@webiny/di").Abstraction; export declare namespace UpdateUserUseCase { type Interface = IUpdateUser; type Error = UpdateUserError; } export interface UserBeforeUpdatePayload { user: AdminUser; updateData: Partial; input: UpdateUserInput; } export interface UserAfterUpdatePayload { originalUser: AdminUser; updatedUser: AdminUser; input: UpdateUserInput; } export {};