import type { Contract } from '@entities' import type { HttpClient } from '@services' import type { ApiError, Response } from '@types' export type GetContractByIdOldInput = { houseId: string contractId: string } const getContractById = (http: HttpClient) => { return { query: ( input: GetContractByIdOldInput, ): Promise< Response< Contract<{ serialized: true withRelationships: true attributeOptions: | 'approvedByClientAt' | 'approvedByOwnerAt' | 'clientCompanyRepresentativeFirstname' | 'clientCompanyRepresentativeLastname' | 'clientFirstname' | 'clientIsCompany' | 'clientLastname' | 'negociatedOwnerPrice' | 'ownerPrivateToken' | 'ownerUploadYousignFileToken' }>, undefined, ApiError > > => { return http.get( `v2/user/houses/${input.houseId}/contracts/${input.contractId}`, ) }, } } export default getContractById