import type { OwnerReceipt } from '@entities' import type { HttpClient } from '@services' import type { ApiError, Response } from '@types' export type CreateOwnerReceipByContractIdInput = { contractId: string receipt: { address: string city: string company_name?: string country: string first_name: string last_name: string payment_transaction_ids: number[] zip_code: string comment?: string } } const createOwnerReceiptByContractId = (http: HttpClient) => ({ query: ( input: CreateOwnerReceipByContractIdInput, ): Promise> => { return http.post( `v3/admin/contracts/${input.contractId}/owner_receipts`, { ...input.receipt }, { responseType: 'blob' }, ) }, }) export default createOwnerReceiptByContractId