23 lines
657 B
TypeScript
23 lines
657 B
TypeScript
import { PagedResultDto } from '../proxy'
|
|
import { GlobalSearchInputDto, GlobalSearchResultDto } from '../proxy/global-search/models'
|
|
import apiService from './api.service'
|
|
|
|
export const getSystems = () =>
|
|
apiService.fetchData<string[], void>({
|
|
method: 'GET',
|
|
url: '/api/app/global-search/systems',
|
|
})
|
|
|
|
export const getSearch = (input: GlobalSearchInputDto) =>
|
|
apiService.fetchData<PagedResultDto<GlobalSearchResultDto>, GlobalSearchInputDto>({
|
|
method: 'GET',
|
|
url: '/api/app/global-search',
|
|
params: {
|
|
q: input.query,
|
|
s: input.system,
|
|
p: input.page,
|
|
},
|
|
paramsSerializer: {
|
|
indexes: null,
|
|
},
|
|
})
|