import { t as ResolvedMediaLibraryConfig } from "./resolveWorkbenchConfig-KhXnVKZ6.js";
import { a as DeployableWorkbenchApp, n as DeployedView, r as DeployedWebWorker } from "./summarizeInterfaces-noqbAtVC.js";
import "node:zlib";
import { UndeployAdapter, UndeployApplicationTarget, UndeployConfigTarget } from "@sanity/cli-core/undeploy";
interface ConfigSnapshot {
  id: string;
  createdAt?: string;
  deployedBy?: string;
  /** Whether this snapshot is the one being served; at most one per installation. */
  isActive?: boolean;
}
/** The workbench extension of the shared target; serializes into `--json` as-is. */
type WorkbenchUndeployTarget = (UndeployApplicationTarget & {
  services: DeployedWebWorker[];
  views: DeployedView[];
}) | (UndeployConfigTarget & {
  configs: ConfigSnapshot[];
});
/**
 * The undeploy adapter for workbench apps and configs, mirroring what a
 * workbench deploy creates: an app that exposes interfaces deletes its Brett
 * application (the server soft-deletes its deployments and refuses singletons
 * with active installations); a config — the media library — deletes its
 * installation's config snapshots instead. The two are severed at the source,
 * so exactly one of `workbench`/`config` is supplied and the brand decides the path.
 */
declare function createWorkbenchUndeployAdapter(options: {
  appId: string | undefined;
  config?: ResolvedMediaLibraryConfig;
  organizationId: string | undefined;
  type: 'coreApp' | 'studio';
  workbench?: DeployableWorkbenchApp;
}): UndeployAdapter<WorkbenchUndeployTarget>;
export { createWorkbenchUndeployAdapter };
//# sourceMappingURL=undeploy.d.ts.map