import * as plugins from '../plugins.ts';
import * as data from '../data/index.ts';

export interface IReq_ForceScanSecrets extends plugins.typedrequestInterfaces.implementsTR<
  plugins.typedrequestInterfaces.ITypedRequest,
  IReq_ForceScanSecrets
> {
  method: 'forceScanSecrets';
  request: {
    identity: data.IIdentity;
  };
  response: {
    ok: boolean;
    connectionsScanned: number;
    secretsFound: number;
    errors: string[];
    durationMs: number;
  };
}

export interface IReq_GetScanStatus extends plugins.typedrequestInterfaces.implementsTR<
  plugins.typedrequestInterfaces.ITypedRequest,
  IReq_GetScanStatus
> {
  method: 'getScanStatus';
  request: {
    identity: data.IIdentity;
  };
  response: {
    lastScanTimestamp: number;
    isScanning: boolean;
    lastResult: {
      connectionsScanned: number;
      secretsFound: number;
      errors: string[];
      durationMs: number;
    } | null;
  };
}
