package com.vaessl.app.search;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.vaessl.app.connection.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
     * @return a list of {@link SearchResponse} items matching the query
     */
    Page<SearchResponse> getSearchResults(SearchRequest request, Pageable pageable);
}
