import { apiGet, apiPost } from "./axios"; import type { AxiosResponse } from "axios"; import type { ApiListResponse } from "../types/api"; export interface ImpTransaction { id: string; study_id: string; site_id: string; batch_id: string; subject_id?: string | null; tx_type: string; quantity: number; tx_date: string; reference?: string | null; notes?: string | null; created_by: string; created_at: string; } export const fetchImpTransactions = ( studyId: string, params?: Record ): Promise>> => apiGet(`/api/v1/studies/${studyId}/imp/transactions/`, { params }); export const createImpTransaction = ( studyId: string, payload: Record ): Promise> => apiPost(`/api/v1/studies/${studyId}/imp/transactions/`, payload);