import {
  SCArticle,
  SCBook,
  SCPeriodical,
  SCSearchResultPagination,
} from '@openstapps/core';

export interface SCHebisSearchResponse {
  /**
   * Response Array of SCBook type or Object
   */
  data: Array<SCBook | SCArticle | SCPeriodical>;

  /**
   * Pagination information
   */
  pagination: SCSearchResultPagination;
}

export interface SCDaiaAvailabilityResponse {
  document: Array<{
    item: Array<{
      id: string;
      label: string;
      department: SCDaiaSimpleContent;
      available: SCDaiaService[];
      unavailable: SCDaiaService[];
      debugInfo: string;
      about?: string;
      storage?: SCDaiaSimpleContent;
    }>;
  }>;
  institution: SCDaiaSimpleContent;
  timestamp: string;
}

export interface SCDaiaSimpleContent {
  id: string;
  content: string;
  href?: string;
}

export interface SCDaiaService {
  delay?: string;
  href?: string;
  service: string;
  limitations?: SCDaiaSimpleContent[];
}

export interface SCDaiaHoldings {
  id: string;
  label: string;
  href?: string;
  signature: string;
  storage?: SCDaiaSimpleContent;
  available?: SCDaiaService;
  about?: string;
}
