package com.vaessl.app.search;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.vaessl.app.shared.ServiceItem;
import com.vaessl.app.shared.ServiceProvider;

/**
 * Implemented by any service that supports querying its remote API for items.
 */
public interface SearchProvider extends ServiceProvider {

    /**
     * Executes a search query against the remote service and returns matching results.
     *
     * @param request the search request containing the query string, app URL, and user credentials
     * @param pageable the Pageable interface
     * @return a list of Page<SearchResponse> items matching the query
     */
    Page<ServiceItem> getSearchResults(SearchRequest request, Pageable pageable);
}
