import {
  ProductSearchResponse as ApiProductSearchResponse,
  ProductSearchResponseAttributes as ApiProductSearchResponseAttributes,
  SearchResponseProduct,
} from '@spiffy-ai/commerce-api-client';
import { CamelCasedPropertiesDeep } from 'src/application/models/utilityTypes';

// Transform API types using CamelCasedPropertiesDeep
export interface ProductSearchResponse extends CamelCasedPropertiesDeep<ApiProductSearchResponse> {}
export interface ProductSearchResponseAttributes extends CamelCasedPropertiesDeep<ApiProductSearchResponseAttributes> {}

// Custom search result interface (flattened structure)
export interface SearchResult {
  products: SearchResponseProduct[]; // Flattened from all responses
  filters: string[]; // Combined from all responses
  generatedQuery?: string;
  totalProductCount: number;
  searchResponseId: string;
}

// Search parameters interface
export interface SearchParams {
  query: string;
  limit?: number;
}
