import httpClient from '@/api/httpClient'; import { API_URLS } from '@/api/URLs'; import { AxiosResponse } from 'axios'; import { businessAboutDetailRes, businessAboutRes, Categories, CompanyBody, CountryBody, ProductBody, States, } from './types'; export const products_api = { async getProducts(params: { page?: number; page_size?: number; search?: string; }): Promise> { const res = await httpClient.get(API_URLS.Get_Products, { params }); return res; }, async getCompany(params: { page?: number; page_size?: number; search?: string; }): Promise> { const res = await httpClient.get(API_URLS.Get_Company, { params }); return res; }, async getCountry(params: { page?: number; page_size?: number; search?: string; }): Promise> { const res = await httpClient.get(API_URLS.Get_Countries, { params }); return res; }, async getStates(): Promise> { const res = await httpClient.get(API_URLS.Get_States); return res; }, async getCategorys(params?: { parent: number }): Promise> { const res = await httpClient.get(API_URLS.Get_Categories, { params }); return res; }, async getCategoryChild(id: number): Promise> { const res = await httpClient.get(API_URLS.Get_Categories_Child(id)); return res; }, async businessAbout(params: { country?: string; district: string; page?: number; page_size?: number; region?: string; types?: number; }): Promise> { const res = await httpClient.get(API_URLS.Business_About, { params }); return res; }, async businessAboutDetail(id: number): Promise> { const res = await httpClient.get(API_URLS.Business_About_Detail(id)); return res; }, };