/**
 * Generated by tsnapi — public API snapshot of `@devframes/plugin-code-server/types`
 */
// #region Interfaces
export interface CodeServerConnect {
  url?: string;
  path?: string;
  cookie?: {
    name: string;
    value: string;
  };
}
export interface CodeServerDetection {
  checked: boolean;
  installed: boolean;
  version?: string;
  bin: string;
  backend: CodeServerBackend;
  mode: CodeServerMode;
}
export interface CodeServerLogin {
  url: string;
  code: string;
}
export interface CodeServerOptions {
  mode?: CodeServerMode;
  backend?: CodeServerBackend;
  bin?: string;
  cwd?: string;
  serverPort?: number;
  host?: string;
  args?: string[];
  env?: Record<string, string>;
  cookieSuffix?: string;
  startTimeout?: number;
  startOnBoot?: boolean;
  reuseExistingServer?: boolean;
  tunnel?: CodeServerTunnelOptions;
  basePath?: string;
  distDir?: string;
  command?: string;
  port?: number;
  portRange?: [number, number];
  random?: boolean;
  auth?: boolean;
}
export interface CodeServerServerInfo {
  status: CodeServerStatus;
  port?: number;
  startedAt?: number;
  pid?: number;
  error?: string;
  login?: CodeServerLogin;
}
export interface CodeServerSharedState {
  detection: CodeServerDetection;
  server: CodeServerServerInfo;
}
export interface CodeServerStartRequest {
  folder?: string;
}
export interface CodeServerStatusResult extends CodeServerSharedState {
  connect?: CodeServerConnect;
}
export interface CodeServerTunnelOptions {
  name?: string;
}
// #endregion

// #region Types
export type CodeServerBackend = 'code-server' | 'ms-code-serve-web';
export type CodeServerMode = 'local' | 'tunnel';
export type CodeServerStartResult = CodeServerStatusResult;
export type CodeServerStatus = 'stopped' | 'starting' | 'running' | 'error';
// #endregion