14 lines
396 B
TypeScript
14 lines
396 B
TypeScript
import type { IDataSource } from "@erp/core/client";
|
|
|
|
import type { GetSupplierByIdResponseDTO } from "../../../common";
|
|
|
|
export type SupplierGetOutput = GetSupplierByIdResponseDTO;
|
|
|
|
export async function getSupplierById(dataSource: IDataSource, id: string, signal: AbortSignal) {
|
|
const response = dataSource.getOne<SupplierGetOutput>("suppliers", id, {
|
|
signal,
|
|
});
|
|
|
|
return response;
|
|
}
|