13 lines
445 B
TypeScript
13 lines
445 B
TypeScript
import type { RequestTransTax, ResponseTransTax } from './types';
|
|
import getUrls from '@/config/urls';
|
|
import type { QueryFunctionContext } from '@tanstack/react-query';
|
|
import axios from 'axios';
|
|
|
|
const { URL_1C_TRANSTAX } = getUrls();
|
|
|
|
export async function getTransTax(payload: RequestTransTax, { signal }: QueryFunctionContext) {
|
|
const { data } = await axios.post<ResponseTransTax>(URL_1C_TRANSTAX, payload, { signal });
|
|
|
|
return data;
|
|
}
|