/*
 * This file is generated by ui/scripts/api_codegen.mjs.
 * Do not edit this file directly.
 */

import type {
  CameraCreate,
  CameraListResponse,
  CameraResponse,
  CameraUpdate,
  ClipListResponse,
  ClipResponse,
  ConfigChangeResponse,
  DiagnosticsResponse,
  DiscoverRequest,
  DiscoveredCameraResponse,
  FinalizeRequest,
  FinalizeResponse,
  HealthResponse,
  ListClipsQuery,
  PreflightResponse,
  TestConnectionRequest,
  TestConnectionResponse,
  ProbeRequest,
  ProbeResponse,
  RuntimeReloadResponse,
  RuntimeStatusResponse,
  SetupStatusResponse,
  StatsResponse,
} from './types'

export interface ApiRequestOptions {
  signal?: AbortSignal
  apiKey?: string | null
}

export interface CameraMutationOptions extends ApiRequestOptions {
  applyChanges?: boolean
}

export type ApiResponseWithStatus<TPayload extends object> = TPayload & { httpStatus: number }

export interface GeneratedHomeSecClient {
  getCameras(options?: ApiRequestOptions): Promise<CameraListResponse>
  getCamera(name: string, options?: ApiRequestOptions): Promise<CameraResponse>
  createCamera(
    payload: CameraCreate,
    options?: CameraMutationOptions,
  ): Promise<ApiResponseWithStatus<ConfigChangeResponse>>
  updateCamera(
    name: string,
    payload: CameraUpdate,
    options?: CameraMutationOptions,
  ): Promise<ApiResponseWithStatus<ConfigChangeResponse>>
  deleteCamera(
    name: string,
    options?: CameraMutationOptions,
  ): Promise<ApiResponseWithStatus<ConfigChangeResponse>>
  getSetupStatus(options?: ApiRequestOptions): Promise<ApiResponseWithStatus<SetupStatusResponse>>
  finalizeSetup(
    payload: FinalizeRequest,
    options?: ApiRequestOptions,
  ): Promise<ApiResponseWithStatus<FinalizeResponse>>
  runSetupPreflight(options?: ApiRequestOptions): Promise<ApiResponseWithStatus<PreflightResponse>>
  runSetupTestConnection(
    payload: TestConnectionRequest,
    options?: ApiRequestOptions,
  ): Promise<ApiResponseWithStatus<TestConnectionResponse>>
  getHealth(options?: ApiRequestOptions): Promise<ApiResponseWithStatus<HealthResponse>>
  getStats(options?: ApiRequestOptions): Promise<ApiResponseWithStatus<StatsResponse>>
  getDiagnostics(options?: ApiRequestOptions): Promise<ApiResponseWithStatus<DiagnosticsResponse>>
  reloadRuntime(options?: ApiRequestOptions): Promise<ApiResponseWithStatus<RuntimeReloadResponse>>
  getRuntimeStatus(
    options?: ApiRequestOptions,
  ): Promise<ApiResponseWithStatus<RuntimeStatusResponse>>
  discoverOnvifCameras(
    payload?: DiscoverRequest,
    options?: ApiRequestOptions,
  ): Promise<DiscoveredCameraResponse[]>
  probeOnvifCamera(payload: ProbeRequest, options?: ApiRequestOptions): Promise<ProbeResponse>
  getClips(
    query?: ListClipsQuery,
    options?: ApiRequestOptions,
  ): Promise<ApiResponseWithStatus<ClipListResponse>>
  getClip(clipId: string, options?: ApiRequestOptions): Promise<ApiResponseWithStatus<ClipResponse>>
}
