import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { environment } from '../../../../environments/environment'; import { DatasetExternalAutocompleteCriteria } from '../../query/dataset/daatset-external-autocomplete-criteria'; import { RequestItem } from '../../query/request-item'; import { DatasetProfileService } from '../dataset-profile/dataset-profile.service'; import { ConfigurationService } from '../configuration/configuration.service'; @Injectable() export class DatasetExternalAutocompleteService { private actionUrl: string; constructor( private httpClient: HttpClient, private datasetProfileService: DatasetProfileService, private configurationService: ConfigurationService) { this.actionUrl = configurationService.server + 'datasetwizard/'; } getDatasetProfileById(datasetProfileID) { return this.datasetProfileService.getDatasetProfileById(datasetProfileID); } queryAutocomplete(lookUpItem: RequestItem): Observable { return this.httpClient.post(this.configurationService.server + 'search/autocomplete', lookUpItem); } }