import fetchOpportunities from "./old-src/collectors/fetchOpportunities";

fetchOpportunities({
  include: [
    "company",
    "activities",
    "opportunityNotes",
    "forecastItems",
    "contacts",
  ],
}).then((opportunities) => {
  const jsonData = JSON.stringify(opportunities, null, 2);
  const { writeFileSync } = require("fs");
  writeFileSync("examples/opportunity-with-relations.json", jsonData);
  console.log(
    `Exported ${opportunities.length} opportunities to examples/opportunity-with-relations.json`
  );
  process.exit(0);
});
