-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
50 lines (42 loc) · 1.13 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { height } from "./setup.js";
import { log } from "./database.js";
import { roughSizeOfObject } from "./utils.js";
import fs from "fs";
const res = await height.fieldTemplates.all();
fs.writeFileSync(
"./attributes-of-workspace.json",
JSON.stringify(res),
(err) => {
if (err) {
console.log("Error writing file", err);
} else {
console.log("Successfully wrote file");
process.exit(0);
}
}
);
process.exit(0);
// const lfTasksListId = "52facafa-3afc-4190-bff5-8fcdf8c4fa4d";
// const taskId = "112d7251-862e-4586-977b-7ca0b8cf2c2e";
// const req = "All comments";
// let res = await height.activities.get({
// // taskId: "7ca67d01-9180-4703-894f-a08638156ac1",
// });
// res = {
// ...res,
// list: res.list.filter((activity) => activity.type === "comment"),
// };
// const size = roughSizeOfObject(res);
// await log({
// req,
// res,
// size,
// });
// fs.writeFileSync("./comments-of-task.json", JSON.stringify(res), (err) => {
// if (err) {
// console.log("Error writing file", err);
// } else {
// console.log("Successfully wrote file");
// process.exit(0);
// }
// });