import axios from "@/lib/axios";

class ProductApiService {
  async sync(items: ISyncItem[]) {
    try {
      const { data } = await axios.post("/products/sync", {
        items,
      });
      console.log("[NestJS] Response (bulk):", data);
      return data;
    } catch (err) {
      console.error("[NestJS] Error (bulk):", err);
      throw err;
    }
  }
}

export const productApi = new ProductApiService();
