n8n-nodes-ticktick 1.2.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -140
- package/dist/credentials/TickTickOAuth2Api.credentials.d.ts +2 -1
- package/dist/credentials/TickTickOAuth2Api.credentials.js +32 -31
- package/dist/credentials/TickTickOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/TickTickSessionApi.credentials.d.ts +8 -0
- package/dist/credentials/TickTickSessionApi.credentials.js +40 -0
- package/dist/credentials/TickTickSessionApi.credentials.js.map +1 -0
- package/dist/credentials/TickTickTokenApi.credentials.d.ts +2 -1
- package/dist/credentials/TickTickTokenApi.credentials.js +1 -0
- package/dist/credentials/TickTickTokenApi.credentials.js.map +1 -1
- package/dist/nodes/TickTick/GenericFunctions.d.ts +4 -16
- package/dist/nodes/TickTick/GenericFunctions.js +18 -132
- package/dist/nodes/TickTick/GenericFunctions.js.map +1 -1
- package/dist/nodes/TickTick/TickTick.node.d.ts +20 -2
- package/dist/nodes/TickTick/TickTick.node.js +335 -274
- package/dist/nodes/TickTick/TickTick.node.js.map +1 -1
- package/dist/nodes/TickTick/helpers/apiRequest.d.ts +5 -0
- package/dist/nodes/TickTick/helpers/apiRequest.js +115 -0
- package/dist/nodes/TickTick/helpers/apiRequest.js.map +1 -0
- package/dist/nodes/TickTick/helpers/constants.d.ts +4 -0
- package/dist/nodes/TickTick/helpers/constants.js +54 -0
- package/dist/nodes/TickTick/helpers/constants.js.map +1 -0
- package/dist/nodes/TickTick/helpers/loadOptions.d.ts +42 -0
- package/dist/nodes/TickTick/helpers/loadOptions.js +327 -0
- package/dist/nodes/TickTick/helpers/loadOptions.js.map +1 -0
- package/dist/nodes/TickTick/helpers/sessionManager.d.ts +13 -0
- package/dist/nodes/TickTick/helpers/sessionManager.js +161 -0
- package/dist/nodes/TickTick/helpers/sessionManager.js.map +1 -0
- package/dist/nodes/TickTick/helpers/utils.d.ts +1 -0
- package/dist/nodes/TickTick/helpers/utils.js +15 -0
- package/dist/nodes/TickTick/helpers/utils.js.map +1 -0
- package/dist/nodes/TickTick/resources/focus/FocusDescription.d.ts +3 -0
- package/dist/nodes/TickTick/resources/focus/FocusDescription.js +37 -0
- package/dist/nodes/TickTick/resources/focus/FocusDescription.js.map +1 -0
- package/dist/nodes/TickTick/resources/focus/index.d.ts +2 -0
- package/dist/nodes/TickTick/{descriptions → resources/focus}/index.js +2 -2
- package/dist/nodes/TickTick/resources/focus/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/focus/operations/FocusGetDistribution.d.ts +3 -0
- package/dist/nodes/TickTick/resources/focus/operations/FocusGetDistribution.js +53 -0
- package/dist/nodes/TickTick/resources/focus/operations/FocusGetDistribution.js.map +1 -0
- package/dist/nodes/TickTick/resources/focus/operations/FocusGetHeatmap.d.ts +3 -0
- package/dist/nodes/TickTick/resources/focus/operations/FocusGetHeatmap.js +56 -0
- package/dist/nodes/TickTick/resources/focus/operations/FocusGetHeatmap.js.map +1 -0
- package/dist/nodes/TickTick/resources/focus/operations/index.d.ts +2 -0
- package/dist/nodes/TickTick/resources/focus/operations/index.js +10 -0
- package/dist/nodes/TickTick/resources/focus/operations/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/HabitsDescription.d.ts +3 -0
- package/dist/nodes/TickTick/resources/habits/HabitsDescription.js +79 -0
- package/dist/nodes/TickTick/resources/habits/HabitsDescription.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/index.d.ts +2 -0
- package/dist/nodes/TickTick/resources/habits/index.js +19 -0
- package/dist/nodes/TickTick/resources/habits/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitArchive.d.ts +3 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitArchive.js +30 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitArchive.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitCheckin.d.ts +3 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitCheckin.js +66 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitCheckin.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitCreate.d.ts +3 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitCreate.js +137 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitCreate.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitDelete.d.ts +3 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitDelete.js +37 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitDelete.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitGet.d.ts +3 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitGet.js +30 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitGet.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitList.d.ts +3 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitList.js +30 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitList.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitUnarchive.d.ts +3 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitUnarchive.js +30 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitUnarchive.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitUpdate.d.ts +3 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitUpdate.js +145 -0
- package/dist/nodes/TickTick/resources/habits/operations/HabitUpdate.js.map +1 -0
- package/dist/nodes/TickTick/resources/habits/operations/index.d.ts +8 -0
- package/dist/nodes/TickTick/resources/habits/operations/index.js +28 -0
- package/dist/nodes/TickTick/resources/habits/operations/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/index.d.ts +34 -0
- package/dist/nodes/TickTick/resources/index.js +46 -0
- package/dist/nodes/TickTick/resources/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/projectGroups/ProjectGroupsDescription.d.ts +3 -0
- package/dist/nodes/TickTick/resources/projectGroups/ProjectGroupsDescription.js +51 -0
- package/dist/nodes/TickTick/resources/projectGroups/ProjectGroupsDescription.js.map +1 -0
- package/dist/nodes/TickTick/resources/projectGroups/index.d.ts +2 -0
- package/dist/nodes/TickTick/resources/projectGroups/index.js +19 -0
- package/dist/nodes/TickTick/resources/projectGroups/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupCreate.d.ts +3 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupCreate.js +59 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupCreate.js.map +1 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupDelete.d.ts +3 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupDelete.js +41 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupDelete.js.map +1 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupList.d.ts +3 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupList.js +14 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupList.js.map +1 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupUpdate.d.ts +3 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupUpdate.js +68 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/ProjectGroupUpdate.js.map +1 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/index.d.ts +4 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/index.js +16 -0
- package/dist/nodes/TickTick/resources/projectGroups/operations/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/projects/ProjectsDescription.js +56 -0
- package/dist/nodes/TickTick/resources/projects/ProjectsDescription.js.map +1 -0
- package/dist/nodes/TickTick/resources/projects/index.d.ts +1 -0
- package/dist/nodes/TickTick/resources/projects/index.js +18 -0
- package/dist/nodes/TickTick/resources/projects/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectCreate.d.ts +5 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectCreate.js +136 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectCreate.js.map +1 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectDelete.d.ts +9 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectDelete.js +77 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectDelete.js.map +1 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectGet.d.ts +5 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectGet.js +151 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectGet.js.map +1 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectUpdate.d.ts +5 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectUpdate.js +186 -0
- package/dist/nodes/TickTick/resources/projects/operations/ProjectUpdate.js.map +1 -0
- package/dist/nodes/TickTick/resources/projects/operations/index.d.ts +4 -0
- package/dist/nodes/TickTick/resources/projects/operations/index.js +21 -0
- package/dist/nodes/TickTick/resources/projects/operations/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/sync/SyncDescription.d.ts +3 -0
- package/dist/nodes/TickTick/resources/sync/SyncDescription.js +28 -0
- package/dist/nodes/TickTick/resources/sync/SyncDescription.js.map +1 -0
- package/dist/nodes/TickTick/resources/sync/index.d.ts +2 -0
- package/dist/nodes/TickTick/resources/sync/index.js +19 -0
- package/dist/nodes/TickTick/resources/sync/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/sync/operations/SyncAll.d.ts +3 -0
- package/dist/nodes/TickTick/resources/sync/operations/SyncAll.js +11 -0
- package/dist/nodes/TickTick/resources/sync/operations/SyncAll.js.map +1 -0
- package/dist/nodes/TickTick/resources/sync/operations/index.d.ts +1 -0
- package/dist/nodes/TickTick/resources/sync/operations/index.js +7 -0
- package/dist/nodes/TickTick/resources/sync/operations/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/tags/TagsDescription.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tags/TagsDescription.js +65 -0
- package/dist/nodes/TickTick/resources/tags/TagsDescription.js.map +1 -0
- package/dist/nodes/TickTick/resources/tags/index.d.ts +2 -0
- package/dist/nodes/TickTick/resources/tags/index.js +19 -0
- package/dist/nodes/TickTick/resources/tags/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagCreate.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagCreate.js +73 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagCreate.js.map +1 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagDelete.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagDelete.js +60 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagDelete.js.map +1 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagList.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagList.js +12 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagList.js.map +1 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagMerge.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagMerge.js +105 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagMerge.js.map +1 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagRename.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagRename.js +81 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagRename.js.map +1 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagUpdate.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagUpdate.js +131 -0
- package/dist/nodes/TickTick/resources/tags/operations/TagUpdate.js.map +1 -0
- package/dist/nodes/TickTick/resources/tags/operations/index.d.ts +6 -0
- package/dist/nodes/TickTick/resources/tags/operations/index.js +22 -0
- package/dist/nodes/TickTick/resources/tags/operations/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/TasksDescription.js +102 -0
- package/dist/nodes/TickTick/resources/tasks/TasksDescription.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/index.d.ts +1 -0
- package/dist/nodes/TickTick/resources/tasks/index.js +18 -0
- package/dist/nodes/TickTick/resources/tasks/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskComplete.d.ts +10 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskComplete.js +113 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskComplete.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskCreate.d.ts +5 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskCreate.js +366 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskCreate.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskDelete.d.ts +10 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskDelete.js +120 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskDelete.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskGet.d.ts +5 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskGet.js +93 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskGet.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskListAll.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskListAll.js +170 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskListAll.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskListCompleted.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskListCompleted.js +71 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskListCompleted.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskListDeleted.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskListDeleted.js +41 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskListDeleted.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskMove.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskMove.js +117 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskMove.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskSetParent.d.ts +3 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskSetParent.js +161 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskSetParent.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskUpdate.d.ts +5 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskUpdate.js +405 -0
- package/dist/nodes/TickTick/resources/tasks/operations/TaskUpdate.js.map +1 -0
- package/dist/nodes/TickTick/resources/tasks/operations/index.d.ts +10 -0
- package/dist/nodes/TickTick/resources/tasks/operations/index.js +27 -0
- package/dist/nodes/TickTick/resources/tasks/operations/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/user/UserDescription.d.ts +3 -0
- package/dist/nodes/TickTick/resources/user/UserDescription.js +44 -0
- package/dist/nodes/TickTick/resources/user/UserDescription.js.map +1 -0
- package/dist/nodes/TickTick/resources/user/index.d.ts +2 -0
- package/dist/nodes/TickTick/resources/user/index.js +19 -0
- package/dist/nodes/TickTick/resources/user/index.js.map +1 -0
- package/dist/nodes/TickTick/resources/user/operations/UserGetPreferences.d.ts +3 -0
- package/dist/nodes/TickTick/resources/user/operations/UserGetPreferences.js +11 -0
- package/dist/nodes/TickTick/resources/user/operations/UserGetPreferences.js.map +1 -0
- package/dist/nodes/TickTick/resources/user/operations/UserGetProfile.d.ts +3 -0
- package/dist/nodes/TickTick/resources/user/operations/UserGetProfile.js +11 -0
- package/dist/nodes/TickTick/resources/user/operations/UserGetProfile.js.map +1 -0
- package/dist/nodes/TickTick/resources/user/operations/UserGetStatus.d.ts +3 -0
- package/dist/nodes/TickTick/resources/user/operations/UserGetStatus.js +11 -0
- package/dist/nodes/TickTick/resources/user/operations/UserGetStatus.js.map +1 -0
- package/dist/nodes/TickTick/resources/user/operations/index.d.ts +3 -0
- package/dist/nodes/TickTick/resources/user/operations/index.js +13 -0
- package/dist/nodes/TickTick/resources/user/operations/index.js.map +1 -0
- package/dist/package.json +21 -10
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +88 -75
- package/dist/nodes/TickTick/descriptions/ProjectDescription.js +0 -306
- package/dist/nodes/TickTick/descriptions/ProjectDescription.js.map +0 -1
- package/dist/nodes/TickTick/descriptions/TaskDescription.js +0 -450
- package/dist/nodes/TickTick/descriptions/TaskDescription.js.map +0 -1
- package/dist/nodes/TickTick/descriptions/index.d.ts +0 -2
- package/dist/nodes/TickTick/descriptions/index.js.map +0 -1
- package/dist/nodes/TickTick/ticktick.svg +0 -8
- /package/dist/nodes/TickTick/{descriptions/ProjectDescription.d.ts → resources/projects/ProjectsDescription.d.ts} +0 -0
- /package/dist/nodes/TickTick/{descriptions/TaskDescription.d.ts → resources/tasks/TasksDescription.d.ts} +0 -0
|
@@ -1,30 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.TickTick = void 0;
|
|
4
37
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
38
|
+
const taskOps = __importStar(require("./resources/tasks/operations"));
|
|
39
|
+
const projectOps = __importStar(require("./resources/projects/operations"));
|
|
40
|
+
const tagOps = __importStar(require("./resources/tags/operations"));
|
|
41
|
+
const habitOps = __importStar(require("./resources/habits/operations"));
|
|
42
|
+
const focusOps = __importStar(require("./resources/focus/operations"));
|
|
43
|
+
const projectGroupOps = __importStar(require("./resources/projectGroups/operations"));
|
|
44
|
+
const userOps = __importStar(require("./resources/user/operations"));
|
|
45
|
+
const syncOps = __importStar(require("./resources/sync/operations"));
|
|
46
|
+
const TasksDescription_1 = require("./resources/tasks/TasksDescription");
|
|
47
|
+
const ProjectsDescription_1 = require("./resources/projects/ProjectsDescription");
|
|
48
|
+
const TagsDescription_1 = require("./resources/tags/TagsDescription");
|
|
49
|
+
const HabitsDescription_1 = require("./resources/habits/HabitsDescription");
|
|
50
|
+
const FocusDescription_1 = require("./resources/focus/FocusDescription");
|
|
51
|
+
const ProjectGroupsDescription_1 = require("./resources/projectGroups/ProjectGroupsDescription");
|
|
52
|
+
const UserDescription_1 = require("./resources/user/UserDescription");
|
|
53
|
+
const SyncDescription_1 = require("./resources/sync/SyncDescription");
|
|
5
54
|
const GenericFunctions_1 = require("./GenericFunctions");
|
|
6
|
-
const descriptions_1 = require("./descriptions");
|
|
7
55
|
class TickTick {
|
|
8
56
|
constructor() {
|
|
9
|
-
this.methods = {
|
|
10
|
-
loadOptions: {
|
|
11
|
-
async getProjects() {
|
|
12
|
-
return await GenericFunctions_1.getProjects.call(this);
|
|
13
|
-
},
|
|
14
|
-
async getTasks() {
|
|
15
|
-
const projectId = this.getCurrentNodeParameter("projectId");
|
|
16
|
-
return await GenericFunctions_1.getTasks.call(this, projectId);
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
57
|
this.description = {
|
|
21
58
|
displayName: "TickTick",
|
|
22
59
|
name: "tickTick",
|
|
23
|
-
icon: "file
|
|
60
|
+
icon: "file:../../icons/ticktick.svg",
|
|
24
61
|
group: ["transform"],
|
|
25
|
-
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
62
|
+
subtitle: '={{ $parameter["operation"] + ": " + $parameter["resource"] }}',
|
|
26
63
|
version: 1,
|
|
27
|
-
description: "
|
|
64
|
+
description: "Interact with TickTick tasks and projects",
|
|
28
65
|
defaults: {
|
|
29
66
|
name: "TickTick",
|
|
30
67
|
},
|
|
@@ -35,18 +72,21 @@ class TickTick {
|
|
|
35
72
|
name: "tickTickTokenApi",
|
|
36
73
|
required: true,
|
|
37
74
|
displayOptions: {
|
|
38
|
-
show: {
|
|
39
|
-
authentication: ["tickTickTokenApi"],
|
|
40
|
-
},
|
|
75
|
+
show: { authentication: ["tickTickTokenApi"] },
|
|
41
76
|
},
|
|
42
77
|
},
|
|
43
78
|
{
|
|
44
79
|
name: "tickTickOAuth2Api",
|
|
45
80
|
required: true,
|
|
46
81
|
displayOptions: {
|
|
47
|
-
show: {
|
|
48
|
-
|
|
49
|
-
|
|
82
|
+
show: { authentication: ["tickTickOAuth2Api"] },
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "tickTickSessionApi",
|
|
87
|
+
required: true,
|
|
88
|
+
displayOptions: {
|
|
89
|
+
show: { authentication: ["tickTickSessionApi"] },
|
|
50
90
|
},
|
|
51
91
|
},
|
|
52
92
|
],
|
|
@@ -56,14 +96,9 @@ class TickTick {
|
|
|
56
96
|
name: "authentication",
|
|
57
97
|
type: "options",
|
|
58
98
|
options: [
|
|
59
|
-
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: "OAuth2",
|
|
65
|
-
value: "tickTickOAuth2Api",
|
|
66
|
-
},
|
|
99
|
+
{ name: "Access Token (V1 API)", value: "tickTickTokenApi" },
|
|
100
|
+
{ name: "OAuth2 (V1 API)", value: "tickTickOAuth2Api" },
|
|
101
|
+
{ name: "Email/Password (V2 API)", value: "tickTickSessionApi" },
|
|
67
102
|
],
|
|
68
103
|
default: "tickTickTokenApi",
|
|
69
104
|
},
|
|
@@ -72,277 +107,303 @@ class TickTick {
|
|
|
72
107
|
name: "resource",
|
|
73
108
|
type: "options",
|
|
74
109
|
noDataExpression: true,
|
|
75
|
-
|
|
76
|
-
{
|
|
77
|
-
|
|
78
|
-
value: "task",
|
|
110
|
+
displayOptions: {
|
|
111
|
+
show: {
|
|
112
|
+
authentication: ["tickTickTokenApi", "tickTickOAuth2Api"],
|
|
79
113
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
114
|
+
},
|
|
115
|
+
options: [
|
|
116
|
+
{ name: "Project", value: "project" },
|
|
117
|
+
{ name: "Task", value: "task" },
|
|
118
|
+
],
|
|
119
|
+
default: "task",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
displayName: "Resource",
|
|
123
|
+
name: "resource",
|
|
124
|
+
type: "options",
|
|
125
|
+
noDataExpression: true,
|
|
126
|
+
displayOptions: {
|
|
127
|
+
show: {
|
|
128
|
+
authentication: ["tickTickSessionApi"],
|
|
83
129
|
},
|
|
130
|
+
},
|
|
131
|
+
options: [
|
|
132
|
+
{ name: "Project", value: "project" },
|
|
133
|
+
{ name: "Sync", value: "sync" },
|
|
134
|
+
{ name: "Tag", value: "tag" },
|
|
135
|
+
{ name: "Task", value: "task" },
|
|
136
|
+
{ name: "User", value: "user" },
|
|
84
137
|
],
|
|
85
138
|
default: "task",
|
|
86
139
|
},
|
|
87
|
-
...
|
|
88
|
-
...
|
|
89
|
-
...
|
|
90
|
-
...
|
|
140
|
+
...TasksDescription_1.taskOperations,
|
|
141
|
+
...TasksDescription_1.taskFields,
|
|
142
|
+
...ProjectsDescription_1.projectOperations,
|
|
143
|
+
...ProjectsDescription_1.projectFields,
|
|
144
|
+
...TagsDescription_1.tagOperations,
|
|
145
|
+
...TagsDescription_1.tagFields,
|
|
146
|
+
...HabitsDescription_1.habitOperations,
|
|
147
|
+
...HabitsDescription_1.habitFields,
|
|
148
|
+
...FocusDescription_1.focusOperations,
|
|
149
|
+
...FocusDescription_1.focusFields,
|
|
150
|
+
...ProjectGroupsDescription_1.projectGroupOperations,
|
|
151
|
+
...ProjectGroupsDescription_1.projectGroupFields,
|
|
152
|
+
...UserDescription_1.userOperations,
|
|
153
|
+
...UserDescription_1.userFields,
|
|
154
|
+
...SyncDescription_1.syncOperations,
|
|
155
|
+
...SyncDescription_1.syncFields,
|
|
91
156
|
],
|
|
92
157
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
158
|
+
this.methods = {
|
|
159
|
+
loadOptions: {
|
|
160
|
+
async getProjects() {
|
|
161
|
+
return await GenericFunctions_1.getProjects.call(this);
|
|
162
|
+
},
|
|
163
|
+
async getTasks() {
|
|
164
|
+
const projectId = this.getCurrentNodeParameter("projectId");
|
|
165
|
+
return await GenericFunctions_1.getTasks.call(this, projectId);
|
|
166
|
+
},
|
|
167
|
+
async getHabits() {
|
|
168
|
+
return await GenericFunctions_1.getHabits.call(this);
|
|
169
|
+
},
|
|
170
|
+
async getTags() {
|
|
171
|
+
return await GenericFunctions_1.getTags.call(this);
|
|
172
|
+
},
|
|
173
|
+
async getProjectGroups() {
|
|
174
|
+
return await GenericFunctions_1.getProjectGroups.call(this);
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
listSearch: {
|
|
178
|
+
async searchProjects(filter) {
|
|
179
|
+
const results = await GenericFunctions_1.searchProjects.call(this, filter);
|
|
180
|
+
return { results };
|
|
181
|
+
},
|
|
182
|
+
async searchProjectsForMove(filter) {
|
|
183
|
+
var _a;
|
|
184
|
+
const results = await GenericFunctions_1.searchProjects.call(this, filter);
|
|
185
|
+
try {
|
|
186
|
+
const taskIdValue = this.getCurrentNodeParameter("taskId");
|
|
187
|
+
let taskId;
|
|
188
|
+
if (typeof taskIdValue === "object" && taskIdValue !== null) {
|
|
189
|
+
taskId = taskIdValue.value || "";
|
|
118
190
|
}
|
|
119
191
|
else {
|
|
120
|
-
|
|
121
|
-
body = {
|
|
122
|
-
name: this.getNodeParameter("name", i),
|
|
123
|
-
viewMode: additionalFields.viewMode || "list",
|
|
124
|
-
kind: additionalFields.kind || "task",
|
|
125
|
-
color: additionalFields.color || undefined,
|
|
126
|
-
};
|
|
127
|
-
Object.keys(body).forEach((key) => body[key] === undefined && delete body[key]);
|
|
192
|
+
taskId = taskIdValue || "";
|
|
128
193
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
else {
|
|
141
|
-
endpoint = "/open/v1/project";
|
|
142
|
-
if (projectId) {
|
|
143
|
-
endpoint += `/${projectId}`;
|
|
144
|
-
if (projectData) {
|
|
145
|
-
endpoint += "/data";
|
|
194
|
+
if (taskId) {
|
|
195
|
+
const authType = this.getCurrentNodeParameter("authentication");
|
|
196
|
+
if (authType === "tickTickSessionApi") {
|
|
197
|
+
const { tickTickApiRequestV2 } = await Promise.resolve().then(() => __importStar(require("./helpers/apiRequest")));
|
|
198
|
+
const syncResponse = (await tickTickApiRequestV2.call(this, "GET", "/batch/check/0"));
|
|
199
|
+
const tasks = ((_a = syncResponse === null || syncResponse === void 0 ? void 0 : syncResponse.syncTaskBean) === null || _a === void 0 ? void 0 : _a.update) || [];
|
|
200
|
+
const task = tasks.find((t) => String(t.id) === taskId);
|
|
201
|
+
if (task && task.projectId) {
|
|
202
|
+
return {
|
|
203
|
+
results: results.filter((r) => r.value !== task.projectId),
|
|
204
|
+
};
|
|
146
205
|
}
|
|
147
206
|
}
|
|
148
207
|
}
|
|
149
|
-
responseData = await GenericFunctions_1.tickTickApiRequest.call(this, "GET", endpoint);
|
|
150
|
-
break;
|
|
151
208
|
}
|
|
152
|
-
|
|
153
|
-
let projectId = this.getNodeParameter("projectId", i, "");
|
|
154
|
-
const useJsonParameters = this.getNodeParameter("jsonParameters", i);
|
|
155
|
-
let body = {};
|
|
156
|
-
if (useJsonParameters) {
|
|
157
|
-
const jsonInput = this.getNodeParameter("additionalFieldsJson", i, "");
|
|
158
|
-
try {
|
|
159
|
-
if (jsonInput) {
|
|
160
|
-
body = JSON.parse(jsonInput);
|
|
161
|
-
projectId = body.projectId
|
|
162
|
-
? body.projectId
|
|
163
|
-
: projectId;
|
|
164
|
-
if (!projectId) {
|
|
165
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Project ID must be provided within the JSON input");
|
|
166
|
-
}
|
|
167
|
-
delete body.projectId;
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "JSON input is empty.");
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
catch (error) {
|
|
174
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid JSON input: ${error.message}`);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
const additionalFields = this.getNodeParameter("additionalFields", i);
|
|
179
|
-
body = {
|
|
180
|
-
name: additionalFields.name || undefined,
|
|
181
|
-
viewMode: additionalFields.viewMode || "list",
|
|
182
|
-
kind: additionalFields.kind || "task",
|
|
183
|
-
color: additionalFields.color || undefined,
|
|
184
|
-
};
|
|
185
|
-
Object.keys(body).forEach((key) => body[key] === undefined && delete body[key]);
|
|
186
|
-
}
|
|
187
|
-
if (!projectId) {
|
|
188
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), "Project ID is required");
|
|
189
|
-
}
|
|
190
|
-
const endpoint = `/open/v1/project/${projectId}`;
|
|
191
|
-
responseData = await GenericFunctions_1.tickTickApiRequest.call(this, "POST", endpoint, body);
|
|
192
|
-
break;
|
|
209
|
+
catch (error) {
|
|
193
210
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
211
|
+
return { results };
|
|
212
|
+
},
|
|
213
|
+
async searchTags(filter) {
|
|
214
|
+
const results = await GenericFunctions_1.searchTags.call(this, filter);
|
|
215
|
+
return { results };
|
|
216
|
+
},
|
|
217
|
+
async searchTasks(filter) {
|
|
218
|
+
const results = await GenericFunctions_1.searchTasks.call(this, filter);
|
|
219
|
+
return { results };
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
async execute() {
|
|
225
|
+
const items = this.getInputData();
|
|
226
|
+
const returnData = [];
|
|
227
|
+
for (let i = 0; i < items.length; i++) {
|
|
228
|
+
try {
|
|
229
|
+
const resource = this.getNodeParameter("resource", i);
|
|
230
|
+
const operation = this.getNodeParameter("operation", i);
|
|
231
|
+
let result = [];
|
|
232
|
+
if (resource === "task") {
|
|
233
|
+
switch (operation) {
|
|
234
|
+
case "create":
|
|
235
|
+
result = await taskOps.taskCreateExecute.call(this, i);
|
|
236
|
+
break;
|
|
237
|
+
case "get":
|
|
238
|
+
result = await taskOps.taskGetExecute.call(this, i);
|
|
239
|
+
break;
|
|
240
|
+
case "listAll":
|
|
241
|
+
result = await taskOps.taskListAllExecute.call(this, i);
|
|
242
|
+
break;
|
|
243
|
+
case "update":
|
|
244
|
+
result = await taskOps.taskUpdateExecute.call(this, i);
|
|
245
|
+
break;
|
|
246
|
+
case "complete":
|
|
247
|
+
result = await taskOps.taskCompleteExecute.call(this, i);
|
|
248
|
+
break;
|
|
249
|
+
case "delete":
|
|
250
|
+
result = await taskOps.taskDeleteExecute.call(this, i);
|
|
251
|
+
break;
|
|
252
|
+
case "listCompleted":
|
|
253
|
+
result = await taskOps.taskListCompletedExecute.call(this, i);
|
|
254
|
+
break;
|
|
255
|
+
case "listDeleted":
|
|
256
|
+
result = await taskOps.taskListDeletedExecute.call(this, i);
|
|
257
|
+
break;
|
|
258
|
+
case "move":
|
|
259
|
+
result = await taskOps.taskMoveExecute.call(this, i);
|
|
260
|
+
break;
|
|
261
|
+
default:
|
|
262
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${resource}.${operation}`);
|
|
206
263
|
}
|
|
207
|
-
default:
|
|
208
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
|
209
264
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
const additionalFields = this.getNodeParameter("additionalFields", i);
|
|
230
|
-
body = {
|
|
231
|
-
title: this.getNodeParameter("title", i),
|
|
232
|
-
projectId: this.getNodeParameter("projectId", i),
|
|
233
|
-
content: additionalFields.content || undefined,
|
|
234
|
-
desc: additionalFields.desc || undefined,
|
|
235
|
-
isAllDay: additionalFields.isAllDay || false,
|
|
236
|
-
startDate: (0, GenericFunctions_1.formatTickTickDate)(additionalFields.startDate),
|
|
237
|
-
dueDate: (0, GenericFunctions_1.formatTickTickDate)(additionalFields.dueDate),
|
|
238
|
-
timeZone: additionalFields.timeZone || undefined,
|
|
239
|
-
priority: additionalFields.priority || 0,
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
Object.keys(body).forEach((key) => {
|
|
243
|
-
if (body[key] === undefined || body[key] === "") {
|
|
244
|
-
delete body[key];
|
|
245
|
-
}
|
|
246
|
-
});
|
|
247
|
-
const endpoint = "/open/v1/task";
|
|
248
|
-
responseData = await GenericFunctions_1.tickTickApiRequest.call(this, "POST", endpoint, body);
|
|
249
|
-
break;
|
|
265
|
+
else if (resource === "project") {
|
|
266
|
+
switch (operation) {
|
|
267
|
+
case "create":
|
|
268
|
+
result = await projectOps.projectCreateExecute.call(this, i);
|
|
269
|
+
break;
|
|
270
|
+
case "get":
|
|
271
|
+
result = await projectOps.projectGetExecute.call(this, i);
|
|
272
|
+
break;
|
|
273
|
+
case "update":
|
|
274
|
+
result = await projectOps.projectUpdateExecute.call(this, i);
|
|
275
|
+
break;
|
|
276
|
+
case "delete":
|
|
277
|
+
result = await projectOps.projectDeleteExecute.call(this, i);
|
|
278
|
+
break;
|
|
279
|
+
default:
|
|
280
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${resource}.${operation}`);
|
|
250
281
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
282
|
+
}
|
|
283
|
+
else if (resource === "tag") {
|
|
284
|
+
switch (operation) {
|
|
285
|
+
case "list":
|
|
286
|
+
result = await tagOps.tagListExecute.call(this, i);
|
|
287
|
+
break;
|
|
288
|
+
case "create":
|
|
289
|
+
result = await tagOps.tagCreateExecute.call(this, i);
|
|
290
|
+
break;
|
|
291
|
+
case "update":
|
|
292
|
+
result = await tagOps.tagUpdateExecute.call(this, i);
|
|
293
|
+
break;
|
|
294
|
+
case "delete":
|
|
295
|
+
result = await tagOps.tagDeleteExecute.call(this, i);
|
|
296
|
+
break;
|
|
297
|
+
case "rename":
|
|
298
|
+
result = await tagOps.tagRenameExecute.call(this, i);
|
|
299
|
+
break;
|
|
300
|
+
case "merge":
|
|
301
|
+
result = await tagOps.tagMergeExecute.call(this, i);
|
|
302
|
+
break;
|
|
303
|
+
default:
|
|
304
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${resource}.${operation}`);
|
|
258
305
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
dueDate: (0, GenericFunctions_1.formatTickTickDate)(additionalFields.dueDate),
|
|
289
|
-
timeZone: additionalFields.timeZone || undefined,
|
|
290
|
-
priority: additionalFields.priority || 0,
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
Object.keys(body).forEach((key) => {
|
|
294
|
-
if (body[key] === undefined || body[key] === "") {
|
|
295
|
-
delete body[key];
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
const taskId = this.getNodeParameter("taskId", i);
|
|
299
|
-
const endpoint = `/open/v1/task/${taskId}`;
|
|
300
|
-
responseData = await GenericFunctions_1.tickTickApiRequest.call(this, "POST", endpoint, body);
|
|
301
|
-
break;
|
|
306
|
+
}
|
|
307
|
+
else if (resource === "habit") {
|
|
308
|
+
switch (operation) {
|
|
309
|
+
case "list":
|
|
310
|
+
result = await habitOps.habitListExecute.call(this, i);
|
|
311
|
+
break;
|
|
312
|
+
case "get":
|
|
313
|
+
result = await habitOps.habitGetExecute.call(this, i);
|
|
314
|
+
break;
|
|
315
|
+
case "create":
|
|
316
|
+
result = await habitOps.habitCreateExecute.call(this, i);
|
|
317
|
+
break;
|
|
318
|
+
case "update":
|
|
319
|
+
result = await habitOps.habitUpdateExecute.call(this, i);
|
|
320
|
+
break;
|
|
321
|
+
case "delete":
|
|
322
|
+
result = await habitOps.habitDeleteExecute.call(this, i);
|
|
323
|
+
break;
|
|
324
|
+
case "checkin":
|
|
325
|
+
result = await habitOps.habitCheckinExecute.call(this, i);
|
|
326
|
+
break;
|
|
327
|
+
case "archive":
|
|
328
|
+
result = await habitOps.habitArchiveExecute.call(this, i);
|
|
329
|
+
break;
|
|
330
|
+
case "unarchive":
|
|
331
|
+
result = await habitOps.habitUnarchiveExecute.call(this, i);
|
|
332
|
+
break;
|
|
333
|
+
default:
|
|
334
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${resource}.${operation}`);
|
|
302
335
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
projectId,
|
|
315
|
-
};
|
|
316
|
-
break;
|
|
336
|
+
}
|
|
337
|
+
else if (resource === "focus") {
|
|
338
|
+
switch (operation) {
|
|
339
|
+
case "getHeatmap":
|
|
340
|
+
result = await focusOps.focusGetHeatmapExecute.call(this, i);
|
|
341
|
+
break;
|
|
342
|
+
case "getDistribution":
|
|
343
|
+
result = await focusOps.focusGetDistributionExecute.call(this, i);
|
|
344
|
+
break;
|
|
345
|
+
default:
|
|
346
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${resource}.${operation}`);
|
|
317
347
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
projectId,
|
|
336
|
-
};
|
|
337
|
-
break;
|
|
348
|
+
}
|
|
349
|
+
else if (resource === "projectGroup") {
|
|
350
|
+
switch (operation) {
|
|
351
|
+
case "list":
|
|
352
|
+
result = await projectGroupOps.projectGroupListExecute.call(this, i);
|
|
353
|
+
break;
|
|
354
|
+
case "create":
|
|
355
|
+
result = await projectGroupOps.projectGroupCreateExecute.call(this, i);
|
|
356
|
+
break;
|
|
357
|
+
case "update":
|
|
358
|
+
result = await projectGroupOps.projectGroupUpdateExecute.call(this, i);
|
|
359
|
+
break;
|
|
360
|
+
case "delete":
|
|
361
|
+
result = await projectGroupOps.projectGroupDeleteExecute.call(this, i);
|
|
362
|
+
break;
|
|
363
|
+
default:
|
|
364
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${resource}.${operation}`);
|
|
338
365
|
}
|
|
339
366
|
}
|
|
367
|
+
else if (resource === "user") {
|
|
368
|
+
switch (operation) {
|
|
369
|
+
case "getProfile":
|
|
370
|
+
result = await userOps.userGetProfileExecute.call(this, i);
|
|
371
|
+
break;
|
|
372
|
+
case "getStatus":
|
|
373
|
+
result = await userOps.userGetStatusExecute.call(this, i);
|
|
374
|
+
break;
|
|
375
|
+
case "getPreferences":
|
|
376
|
+
result = await userOps.userGetPreferencesExecute.call(this, i);
|
|
377
|
+
break;
|
|
378
|
+
default:
|
|
379
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${resource}.${operation}`);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
else if (resource === "sync") {
|
|
383
|
+
switch (operation) {
|
|
384
|
+
case "syncAll":
|
|
385
|
+
result = await syncOps.syncAllExecute.call(this, i);
|
|
386
|
+
break;
|
|
387
|
+
default:
|
|
388
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported operation: ${resource}.${operation}`);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unknown resource type: ${resource}`);
|
|
393
|
+
}
|
|
394
|
+
returnData.push(...result);
|
|
340
395
|
}
|
|
341
|
-
|
|
342
|
-
|
|
396
|
+
catch (error) {
|
|
397
|
+
if (this.continueOnFail()) {
|
|
398
|
+
returnData.push({
|
|
399
|
+
json: { error: error.message },
|
|
400
|
+
});
|
|
401
|
+
continue;
|
|
402
|
+
}
|
|
403
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
|
|
343
404
|
}
|
|
344
405
|
}
|
|
345
|
-
return [
|
|
406
|
+
return [returnData];
|
|
346
407
|
}
|
|
347
408
|
}
|
|
348
409
|
exports.TickTick = TickTick;
|