/**
 * Shared API types
 * Common types for API requests and responses
 */

export interface ApiResponse<T = any> {
  data: T;
  message?: string;
  success: boolean;
}

export interface PaginatedResponse<T> {
  items: T[];
  total: number;
  skip: number;
  limit: number;
  hasMore: boolean;
}

export interface PaginationParams {
  skip?: number;
  limit?: number;
  sortBy?: string;
  sortOrder?: 'asc' | 'desc';
}

export interface ApiError {
  message: string;
  status: number;
  data?: any;
  code?: string;
}

export interface ListResponse<T> {
  workflows?: T[]; // For backward compatibility
  items?: T[];
  total: number;
  skip: number;
  limit: number;
}
