import type { Destination } from '@entities' import type { FilterType, HttpClient, IncludeType } from '@services' import { endpointMaker } from '@services' import type { ApiError, Response } from '@types' export type GetDestinationInput = { destinationId: string include?: IncludeType filter?: FilterType pagination?: { per: string; page: string } } const getDestination = (http: HttpClient) => ({ query: ( input: GetDestinationInput, ): Promise> => { const query = endpointMaker({ includes: input.include, filter: input.filter, pagination: input.pagination, }) return http.get(`v3/destinations/${input.destinationId}${query}`) }, }) export default getDestination