import type { DeploymentCapabilities } from '@/types/capabilities'; import { type DeploymentSessionScope } from '@/widget/types/session'; import type { WidgetFeatureFlags, WidgetFeatureOverrides } from '@/types/features'; export type DeploymentConfigResult = { data?: unknown; error?: unknown; status?: number; }; export type DeploymentConfigInput = { result: DeploymentConfigResult; /** Present for a mount bound to a deployment; absent only for the legacy `chatflowid` path. */ deploymentId?: string; /** Embed-time switches, honoured only when no deployment answers for itself. */ featureOverrides?: WidgetFeatureOverrides; }; /** * Everything the widget concludes from one `/config` answer, as a plain value. * * Kept apart from the signals it feeds so the conclusions can be tested without rendering a * widget — Solid effects do not run in this project's unit tests, so logic left inside the * loading effect is logic nothing exercises. That is how `configResolved` came to be published * before `sessionScope`: the widget announced it had a config while the scope was still empty, * and the effect that picks which conversation to open decided against nothing. */ export type DeploymentConfigOutcome = { /** Core could not be reached, or answered for itself with a 5xx. Retrying may work. */ unreachable: boolean; /** Core answered that this deployment does not exist. Retrying cannot help. */ deploymentMissing: boolean; /** Absent when the request failed; nothing below it is meaningful then. */ capabilities?: DeploymentCapabilities; sessionScope?: DeploymentSessionScope; features?: WidgetFeatureFlags; authMode?: string; }; export declare function resolveDeploymentConfigOutcome(input: DeploymentConfigInput): DeploymentConfigOutcome;