import type { PlaceHistoryPageResponse, PlaceHistoryQueryInput, PlacesLibraryKind } from '@trek/shared'; import apiClient from './client'; const base = '/addons/collections/library/places'; /** PLC-14: what changed in the details of an entry of All places, opened from a trip place or a saved place. */ export const placeHistoryApi = { history: ( kind: PlacesLibraryKind, id: number, query: PlaceHistoryQueryInput = {}, signal?: AbortSignal ): Promise => apiClient.get(`${base}/${kind}/${id}/history`, { params: query, signal }).then((r) => r.data), };