import { type Result } from "@webiny/feature/api"; import type { IEventHandler, DomainEvent } from "../../../features/eventPublisher/index.js"; import type { Tenant } from "../../../types/tenancy.js"; import type { TenantBeforeUpdatePayload, TenantAfterUpdatePayload } from "./events.js"; export type UpdateTenantError = { type: "NOT_FOUND"; } | { type: "UNKNOWN"; cause: Error; }; export interface IUpdateTenantUseCase { execute(id: string, data: Partial): Promise>; } /** Update an existing tenant. */ export declare const UpdateTenantUseCase: import("@webiny/di").Abstraction; export declare namespace UpdateTenantUseCase { type Interface = IUpdateTenantUseCase; } export interface IUpdateTenantRepository { update(tenant: Tenant): Promise; } /** Persist tenant updates. */ export declare const UpdateTenantRepository: import("@webiny/di").Abstraction; export declare namespace UpdateTenantRepository { type Interface = IUpdateTenantRepository; } export interface IUpdateTenantGateway { updateTenant(data: Tenant): Promise; } /** Storage gateway for tenant updates. */ export declare const UpdateTenantGateway: import("@webiny/di").Abstraction; export declare namespace UpdateTenantGateway { type Interface = IUpdateTenantGateway; } /** Hook into tenant lifecycle before a tenant is updated. */ export declare const TenantBeforeUpdateEventHandler: import("@webiny/di").Abstraction>>; export declare namespace TenantBeforeUpdateEventHandler { type Interface = IEventHandler>; type Event = DomainEvent; } /** Hook into tenant lifecycle after a tenant is updated. */ export declare const TenantAfterUpdateEventHandler: import("@webiny/di").Abstraction>>; export declare namespace TenantAfterUpdateEventHandler { type Interface = IEventHandler>; type Event = DomainEvent; }