import type { ContractFormatted, GetContractByTypeIncluded } from '@entities' import type { FilterType, HttpClient, IncludeType } from '@services' import { endpointMaker } from '@services' import type { ApiError, Response } from '@types' export type GetContractsByIdInput = { contractId: string type: string filters?: FilterType includes?: IncludeType } const getContractsById = (http: HttpClient) => { return { query: ( input: GetContractsByIdInput, ): Promise< Response > => { const query = endpointMaker({ filter: input.filters, includes: input.includes, }) return http.get( `v3/user/contracts/${input.type}/${input.contractId}${query}`, ) }, } } export default getContractsById