// ============================================
// Common Types
// ============================================

/** Pagination information */
export interface PageInfo {
  hasNextPage: boolean;
  hasPreviousPage: boolean;
  startCursor?: string | null;
  endCursor?: string | null;
}

/** Generic edge type for connections */
export interface Edge<T> {
  node: T;
  cursor: string;
}

/** Generic connection type for paginated results */
export interface Connection<T> {
  edges: Edge<T>[];
  pageInfo: PageInfo;
  totalCount: number;
}

/** Paginated response for REST API */
export interface PaginatedResponse<T> {
  items: T[];
  total: number;
  page: number;
  pageSize: number;
  pages: number;
}

/** Sort order */
export type SortOrder = 'asc' | 'desc';

/** Sort parameters */
export interface SortParams {
  field: string;
  order: SortOrder;
}

/** Pagination parameters */
export interface PaginationParams {
  page?: number;
  pageSize?: number;
}
