import { Result } from "@webiny/feature/api"; import type { IEventHandler, DomainEvent } from "../../../features/eventPublisher/index.js"; import { InstallSystemError, SystemAlreadyInstalledError } from "./errors.js"; import { type AppInstallationData, InstallTenantUseCase } from "../../../features/tenancy/InstallTenant/index.js"; import { CreateTenantUseCase } from "../../../features/tenancy/CreateTenant/index.js"; /** * Errors */ export interface IInstallSystemErrors { base: InstallSystemError | SystemAlreadyInstalledError | CreateTenantUseCase.Errors | InstallTenantUseCase.Errors; } /** * Types */ export type InstallSystemInput = AppInstallationData[]; /** * Use Case Abstraction */ export interface IInstallSystemUseCase { execute(input: InstallSystemInput): Promise>; } /** Run system-wide installation. */ export declare const InstallSystemUseCase: import("@webiny/di").Abstraction; export declare namespace InstallSystemUseCase { type Interface = IInstallSystemUseCase; type Input = InstallSystemInput; } /** Hook into system lifecycle after the system is installed. */ export declare const SystemInstalledEventHandler: import("@webiny/di").Abstraction>>; export declare namespace SystemInstalledEventHandler { type Interface = IEventHandler; type Event = DomainEvent; }