// @ts-nocheck
import { queryEndpoint } from "../endpoint/endpoint-client.ts";
import { catalogMakerSql } from "../sql/catalog-maker.ts";

export async function listManufacturers(config) {
  const result = await queryEndpoint(config, catalogMakerSql.manufacturers);
  return {
    ...result,
    items: result.items.map((row) => ({
      id: row.id_manufacturer,
      name: row.name,
    })),
  };
}
