export interface BookStackPage {
  id: number;
  name: string;
  slug: string;
  book_id: number;
  book_slug: string;
  chapter_id: number;
  draft: boolean;
  template: boolean;
  created_at: string;
  updated_at: string;
  url: string;
  book?: { name: string };
  updatedBy?: { name: string };
}

export interface BookStackSearchResult {
  id: number;
  name: string;
  slug: string;
  book_id: number;
  book_slug: string;
  url: string;
  preview_html: { content: string };
  tags: { name: string; value: string; order: number }[];
}

export interface BookStackRecentResponse {
  configured: boolean;
  data: BookStackPage[];
}

export interface BookStackSearchResponse {
  configured: boolean;
  data: BookStackSearchResult[];
}

export interface BookStackPageDetail {
  id: number;
  name: string;
  slug: string;
  book_id: number;
  book_slug: string;
  chapter_id: number;
  html: string;
  created_at: string;
  updated_at: string;
  url: string;
  book?: { name: string };
  createdBy?: { name: string };
  updatedBy?: { name: string };
}

export interface BookStackPageDetailResponse {
  configured: boolean;
  data: BookStackPageDetail | null;
}
