{"size": 610, "ext": "js", "max_stars_repo_path": "vizhub-v2/packages/useCases/src/interactors/getSearchResultsPageData.js", "max_stars_repo_name": "pravalliyaram/vizhub", "max_stars_repo_stars_event_min_datetime": "2021-12-10T20:50:43.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-23T13:10:49.000Z", "max_issues_repo_path": "vizhub-v2/packages/useCases/src/interactors/getSearchResultsPageData.js", "max_issues_repo_name": "pravalliyaram/vizhub", "max_issues_repo_issues_event_min_datetime": "2021-12-09T21:24:00.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-27T17:32:47.000Z", "max_forks_repo_path": "vizhub-v2/packages/useCases/src/interactors/getSearchResultsPageData.js", "max_forks_repo_name": "pravalliyaram/vizhub", "max_forks_repo_forks_event_min_datetime": "2021-12-13T14:12:40.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T02:04:45.000Z"}
{"max_stars_count": 29, "max_issues_count": 7, "max_forks_count": 20, "avg_line_length": 25.4166666667, "max_line_length": 77, "alphanum_fraction": 0.7393442623}
import { GetVisualizationsOwners } from './getVisualizationsOwners';

export class GetSearchResultsPageData {
  constructor({ visualizationGateway, userGateway }) {
    this.visualizationGateway = visualizationGateway;

    this.getOwnersInteractor = new GetVisualizationsOwners({ userGateway });
  }

  async execute(requestModel) {
    const visualizationInfos =
      await this.visualizationGateway.searchVisualizationInfos(requestModel);

    const ownerUsers = await this.getOwnersInteractor.execute(
      visualizationInfos
    );

    return {
      visualizationInfos,
      ownerUsers,
    };
  }
}
