import { apiRequest } from "@/shared/api/request";
import { API_OPERATIONS, apiEndpointPath } from "@/shared/api/generated/endpoints";
import type { SearchResultDto } from "@/shared/api/types";

export function searchGlobal(keyword: string): Promise<SearchResultDto[]> {
  return apiRequest<SearchResultDto[]>(apiEndpointPath(API_OPERATIONS.search), { query: { keyword } });
}
