declare namespace Knowledge {
  interface RiskLevelDto {
    id: number;
    value: string;
    description: string;
    responsible: string;
    standard: string;
  }

  interface RiskLevelDtoWithColor extends RiskLevelDto {
    color: string;
  }

  interface RiskLevelResponse {
    data: RiskLevelDto[];
    updateDate: string;
  }

  interface RiskCategoryDto {
    id: number;
    company: string;
    departments: number[];
    value: string;
    status: number;
    isDelete: number;
  }

  interface RiskTypeDto {
    id: number;
    company: string;
    value: string;
    status: number;
    isDelete: number;
    categories: RiskCategoryDto[];
  }

  interface RiskCategoryResponse {
    list: RiskTypeDto[];
    updateDate: string;
  }
  // type RiskCategoryResponse = RiskTypeDto[];

  interface RiskItem {
    company: string;
    type: number;
    category: number;
    title: string;
    consequences: number[];
    level: string;
    involvedPositions: number[];
    involvedOperations: number[];
    involvedEquipments: number[];
    responsiblePositions: number[];
    associations: Array<{
      title: string;
      content: string;
      consequence: string;
    }>;
    regulations: number[];
    requirement: string;
    otherMeasure: string;
    responsiblePerson: string;
    specificUnit: string;
    status: number;
    id: number;
    riskPointId?: number;
    updateReason?: string;
    updatedDate?: string;
    updateBy?: string;
  }

  interface GetRiskItemListParams {
    company: string;
    type?: number;
    level?: string;
    page: number;
    size: number;
  }

  interface GetRiskItemHistoryParams {
    company: string;
    type?: number;
    category?: string;
    title?: string;
    page: number;
    size: number;
    riskPointId?: number;
  }

  interface GetRiskItemListResponse {
    items: RiskItem[];
    total: number;
  }

  interface Doc {
    id: number;
    company: string;
    category: string;
    level: string;
    name: string;
    url: string;
    status: number;
    updatedDate: string;
    updateBy: string;
  }
  interface GetDocListParams {
    company: string;
    category?: string;
    type?: string;
    level?: string;
    page: number;
    size: number;
  }
  interface GetDocListResponse {
    items: Doc[];
    total: number;
  }
}
