/**
 * Vault Secrets TypeScript Types
 *
 * Type definitions for vault secrets management
 */

export interface Secret {
  id: string;
  path: string;
  version: number;
  created_at: string;
  updated_at: string;
  created_by: string;
  metadata?: Record<string, any>;
}

export interface SecretWithValue extends Secret {
  value: string;
}

export interface SecretVersion {
  version: number;
  created_at: string;
  created_by: string;
  deleted: boolean;
}

export interface SecretHistory {
  path: string;
  versions: SecretVersion[];
}

export interface CreateSecretRequest {
  path: string;
  value: string;
  context?: string;
  metadata?: Record<string, any>;
}

export interface UpdateSecretRequest {
  value: string;
  context?: string;
  metadata?: Record<string, any>;
}

export interface ListSecretsQuery {
  prefix?: string;
  limit?: number;
  offset?: number;
}

export interface ListSecretsResponse {
  secrets: Secret[];
  total: number;
}

export interface ApiError {
  error: string;
  error_code: string;
  message: string;
  details?: Record<string, any>;
  timestamp: string;
}
