688a9096c2
BREAKING CHANGE: refer to body
20 lines
550 B
TypeScript
20 lines
550 B
TypeScript
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);
|
|
});
|