@learningsuite/n8n-nodes-learningsuite 1.2.2
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/LICENSE +21 -0
- package/README.de.md +555 -0
- package/README.md +427 -0
- package/dist/credentials/LearningSuiteApi.credentials.d.ts +10 -0
- package/dist/credentials/LearningSuiteApi.credentials.js +49 -0
- package/dist/credentials/learningsuite.svg +1 -0
- package/dist/nodes/LearningSuite/LearningSuite.node.d.ts +65 -0
- package/dist/nodes/LearningSuite/LearningSuite.node.js +221 -0
- package/dist/nodes/LearningSuite/LearningSuiteTrigger.node.d.ts +66 -0
- package/dist/nodes/LearningSuite/LearningSuiteTrigger.node.js +433 -0
- package/dist/nodes/LearningSuite/descriptions/ai.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/ai.properties.js +141 -0
- package/dist/nodes/LearningSuite/descriptions/apiCall.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/apiCall.properties.js +87 -0
- package/dist/nodes/LearningSuite/descriptions/bundle.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/bundle.properties.js +32 -0
- package/dist/nodes/LearningSuite/descriptions/community.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/community.properties.js +229 -0
- package/dist/nodes/LearningSuite/descriptions/course.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/course.properties.js +248 -0
- package/dist/nodes/LearningSuite/descriptions/customFields.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/customFields.properties.js +452 -0
- package/dist/nodes/LearningSuite/descriptions/group.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/group.properties.js +165 -0
- package/dist/nodes/LearningSuite/descriptions/hub.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/hub.properties.js +167 -0
- package/dist/nodes/LearningSuite/descriptions/member.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/member.properties.js +625 -0
- package/dist/nodes/LearningSuite/descriptions/module.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/module.properties.js +84 -0
- package/dist/nodes/LearningSuite/descriptions/popup.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/popup.properties.js +73 -0
- package/dist/nodes/LearningSuite/descriptions/resource.selector.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/resource.selector.js +87 -0
- package/dist/nodes/LearningSuite/descriptions/role.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/role.properties.js +14 -0
- package/dist/nodes/LearningSuite/descriptions/teamMember.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/teamMember.properties.js +74 -0
- package/dist/nodes/LearningSuite/descriptions/trigger.instant.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/trigger.instant.properties.js +542 -0
- package/dist/nodes/LearningSuite/descriptions/user.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/user.properties.js +135 -0
- package/dist/nodes/LearningSuite/descriptions/webhook.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/webhook.properties.js +672 -0
- package/dist/nodes/LearningSuite/descriptions/webhook.sampleData.properties.d.ts +2 -0
- package/dist/nodes/LearningSuite/descriptions/webhook.sampleData.properties.js +401 -0
- package/dist/nodes/LearningSuite/exec.types.d.ts +5 -0
- package/dist/nodes/LearningSuite/exec.types.js +2 -0
- package/dist/nodes/LearningSuite/execute/ai.handlers.d.ts +4 -0
- package/dist/nodes/LearningSuite/execute/ai.handlers.js +23 -0
- package/dist/nodes/LearningSuite/execute/apiCall.handlers.d.ts +4 -0
- package/dist/nodes/LearningSuite/execute/apiCall.handlers.js +46 -0
- package/dist/nodes/LearningSuite/execute/bundle.handlers.d.ts +5 -0
- package/dist/nodes/LearningSuite/execute/bundle.handlers.js +12 -0
- package/dist/nodes/LearningSuite/execute/community.handlers.d.ts +11 -0
- package/dist/nodes/LearningSuite/execute/community.handlers.js +94 -0
- package/dist/nodes/LearningSuite/execute/course.handlers.d.ts +10 -0
- package/dist/nodes/LearningSuite/execute/course.handlers.js +87 -0
- package/dist/nodes/LearningSuite/execute/customFields.handlers.d.ts +16 -0
- package/dist/nodes/LearningSuite/execute/customFields.handlers.js +342 -0
- package/dist/nodes/LearningSuite/execute/group.handlers.d.ts +15 -0
- package/dist/nodes/LearningSuite/execute/group.handlers.js +99 -0
- package/dist/nodes/LearningSuite/execute/hub.handlers.d.ts +9 -0
- package/dist/nodes/LearningSuite/execute/hub.handlers.js +65 -0
- package/dist/nodes/LearningSuite/execute/member.handlers.d.ts +23 -0
- package/dist/nodes/LearningSuite/execute/member.handlers.js +244 -0
- package/dist/nodes/LearningSuite/execute/module.handlers.d.ts +6 -0
- package/dist/nodes/LearningSuite/execute/module.handlers.js +36 -0
- package/dist/nodes/LearningSuite/execute/popup.handlers.d.ts +7 -0
- package/dist/nodes/LearningSuite/execute/popup.handlers.js +24 -0
- package/dist/nodes/LearningSuite/execute/registry.d.ts +2 -0
- package/dist/nodes/LearningSuite/execute/registry.js +35 -0
- package/dist/nodes/LearningSuite/execute/role.handlers.d.ts +4 -0
- package/dist/nodes/LearningSuite/execute/role.handlers.js +6 -0
- package/dist/nodes/LearningSuite/execute/teamMember.handlers.d.ts +6 -0
- package/dist/nodes/LearningSuite/execute/teamMember.handlers.js +21 -0
- package/dist/nodes/LearningSuite/execute/user.handlers.d.ts +4 -0
- package/dist/nodes/LearningSuite/execute/user.handlers.js +32 -0
- package/dist/nodes/LearningSuite/execute/webhook.handlers.d.ts +9 -0
- package/dist/nodes/LearningSuite/execute/webhook.handlers.js +306 -0
- package/dist/nodes/LearningSuite/icons/learningsuite-icon-dark.svg +1 -0
- package/dist/nodes/LearningSuite/icons/learningsuite-icon-light.svg +1 -0
- package/dist/nodes/LearningSuite/index.d.ts +1 -0
- package/dist/nodes/LearningSuite/index.js +17 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/apiCall.loadOptions.d.ts +1 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/apiCall.loadOptions.js +2 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/bundle.loadOptions.d.ts +2 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/bundle.loadOptions.js +7 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/common.d.ts +7 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/common.js +22 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/community.loadOptions.d.ts +5 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/community.loadOptions.js +80 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/course.loadOptions.d.ts +5 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/course.loadOptions.js +58 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/customFields.loadOptions.d.ts +12 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/customFields.loadOptions.js +55 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/group.loadOptions.d.ts +2 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/group.loadOptions.js +7 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/hub.loadOptions.d.ts +3 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/hub.loadOptions.js +11 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/member.loadOptions.d.ts +9 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/member.loadOptions.js +27 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/module.loadOptions.d.ts +5 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/module.loadOptions.js +29 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/popup.loadOptions.d.ts +2 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/popup.loadOptions.js +7 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/role.loadOptions.d.ts +2 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/role.loadOptions.js +7 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/teamMember.loadOptions.d.ts +9 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/teamMember.loadOptions.js +35 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/webhook.loadOptions.d.ts +6 -0
- package/dist/nodes/LearningSuite/methods/loadOptions/webhook.loadOptions.js +18 -0
- package/dist/nodes/LearningSuite/methods/resourceMappers/customFields.resourceMapper.d.ts +2 -0
- package/dist/nodes/LearningSuite/methods/resourceMappers/customFields.resourceMapper.js +35 -0
- package/dist/nodes/LearningSuite/methods/resourceMappers/hub.resourceMapper.d.ts +2 -0
- package/dist/nodes/LearningSuite/methods/resourceMappers/hub.resourceMapper.js +34 -0
- package/dist/nodes/LearningSuite/shared/customFields.helpers.d.ts +4 -0
- package/dist/nodes/LearningSuite/shared/customFields.helpers.js +56 -0
- package/dist/nodes/LearningSuite/shared/customFields.shared.d.ts +42 -0
- package/dist/nodes/LearningSuite/shared/customFields.shared.js +101 -0
- package/dist/nodes/LearningSuite/shared/customFields.upload.d.ts +13 -0
- package/dist/nodes/LearningSuite/shared/customFields.upload.js +198 -0
- package/dist/nodes/LearningSuite/shared/errors.d.ts +1 -0
- package/dist/nodes/LearningSuite/shared/errors.js +16 -0
- package/dist/nodes/LearningSuite/shared/getScopedParam.d.ts +2 -0
- package/dist/nodes/LearningSuite/shared/getScopedParam.js +39 -0
- package/dist/nodes/LearningSuite/shared/index.d.ts +4 -0
- package/dist/nodes/LearningSuite/shared/index.js +20 -0
- package/dist/nodes/LearningSuite/shared/parsing.d.ts +1 -0
- package/dist/nodes/LearningSuite/shared/parsing.js +15 -0
- package/dist/nodes/LearningSuite/shared/request.d.ts +13 -0
- package/dist/nodes/LearningSuite/shared/request.js +53 -0
- package/dist/nodes/LearningSuitePollingTrigger/LearningSuitePollingTrigger.node.d.ts +11 -0
- package/dist/nodes/LearningSuitePollingTrigger/LearningSuitePollingTrigger.node.js +278 -0
- package/dist/nodes/LearningSuitePollingTrigger/descriptions/trigger.polling.properties.d.ts +2 -0
- package/dist/nodes/LearningSuitePollingTrigger/descriptions/trigger.polling.properties.js +193 -0
- package/package.json +65 -0
|
@@ -0,0 +1,221 @@
|
|
|
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
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.LearningSuite = void 0;
|
|
37
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
38
|
+
// methods - loadOptions
|
|
39
|
+
const loBundle = __importStar(require("./methods/loadOptions/bundle.loadOptions"));
|
|
40
|
+
const loCommunity = __importStar(require("./methods/loadOptions/community.loadOptions"));
|
|
41
|
+
const loCourse = __importStar(require("./methods/loadOptions/course.loadOptions"));
|
|
42
|
+
const loGroup = __importStar(require("./methods/loadOptions/group.loadOptions"));
|
|
43
|
+
const loHub = __importStar(require("./methods/loadOptions/hub.loadOptions"));
|
|
44
|
+
const loMember = __importStar(require("./methods/loadOptions/member.loadOptions"));
|
|
45
|
+
const loModule = __importStar(require("./methods/loadOptions/module.loadOptions"));
|
|
46
|
+
const loPopup = __importStar(require("./methods/loadOptions/popup.loadOptions"));
|
|
47
|
+
const loRole = __importStar(require("./methods/loadOptions/role.loadOptions"));
|
|
48
|
+
const loWebhook = __importStar(require("./methods/loadOptions/webhook.loadOptions"));
|
|
49
|
+
const loTeamMember = __importStar(require("./methods/loadOptions/teamMember.loadOptions"));
|
|
50
|
+
const loCustomFields = __importStar(require("./methods/loadOptions/customFields.loadOptions"));
|
|
51
|
+
const hub_resourceMapper_1 = require("./methods/resourceMappers/hub.resourceMapper");
|
|
52
|
+
const customFields_resourceMapper_1 = require("./methods/resourceMappers/customFields.resourceMapper");
|
|
53
|
+
// properties
|
|
54
|
+
const resource_selector_1 = require("./descriptions/resource.selector");
|
|
55
|
+
const apiCall_properties_1 = require("./descriptions/apiCall.properties");
|
|
56
|
+
const bundle_properties_1 = require("./descriptions/bundle.properties");
|
|
57
|
+
const community_properties_1 = require("./descriptions/community.properties");
|
|
58
|
+
const course_properties_1 = require("./descriptions/course.properties");
|
|
59
|
+
const group_properties_1 = require("./descriptions/group.properties");
|
|
60
|
+
const hub_properties_1 = require("./descriptions/hub.properties");
|
|
61
|
+
const member_properties_1 = require("./descriptions/member.properties");
|
|
62
|
+
const module_properties_1 = require("./descriptions/module.properties");
|
|
63
|
+
const popup_properties_1 = require("./descriptions/popup.properties");
|
|
64
|
+
const role_properties_1 = require("./descriptions/role.properties");
|
|
65
|
+
const teamMember_properties_1 = require("./descriptions/teamMember.properties");
|
|
66
|
+
const user_properties_1 = require("./descriptions/user.properties");
|
|
67
|
+
const webhook_properties_1 = require("./descriptions/webhook.properties");
|
|
68
|
+
const customFields_properties_1 = require("./descriptions/customFields.properties");
|
|
69
|
+
const ai_properties_1 = require("./descriptions/ai.properties");
|
|
70
|
+
// handlers
|
|
71
|
+
const apiCall_handlers_1 = require("./execute/apiCall.handlers");
|
|
72
|
+
const bundle_handlers_1 = require("./execute/bundle.handlers");
|
|
73
|
+
const community_handlers_1 = require("./execute/community.handlers");
|
|
74
|
+
const course_handlers_1 = require("./execute/course.handlers");
|
|
75
|
+
const group_handlers_1 = require("./execute/group.handlers");
|
|
76
|
+
const hub_handlers_1 = require("./execute/hub.handlers");
|
|
77
|
+
const member_handlers_1 = require("./execute/member.handlers");
|
|
78
|
+
const module_handlers_1 = require("./execute/module.handlers");
|
|
79
|
+
const popup_handlers_1 = require("./execute/popup.handlers");
|
|
80
|
+
const role_handlers_1 = require("./execute/role.handlers");
|
|
81
|
+
const teamMember_handlers_1 = require("./execute/teamMember.handlers");
|
|
82
|
+
const user_handlers_1 = require("./execute/user.handlers");
|
|
83
|
+
const webhook_handlers_1 = require("./execute/webhook.handlers");
|
|
84
|
+
const customFields_handlers_1 = require("./execute/customFields.handlers");
|
|
85
|
+
const ai_handlers_1 = require("./execute/ai.handlers");
|
|
86
|
+
const registry = {
|
|
87
|
+
ai: { ...ai_handlers_1.aiHandlers },
|
|
88
|
+
apiCall: { ...apiCall_handlers_1.apiCallHandlers },
|
|
89
|
+
bundle: { ...bundle_handlers_1.bundleHandlers },
|
|
90
|
+
community: { ...community_handlers_1.communityHandlers },
|
|
91
|
+
course: { ...course_handlers_1.courseHandlers },
|
|
92
|
+
customFields: { ...customFields_handlers_1.customFieldsHandlers },
|
|
93
|
+
group: { ...group_handlers_1.groupHandlers },
|
|
94
|
+
hub: { ...hub_handlers_1.hubHandlers },
|
|
95
|
+
member: { ...member_handlers_1.memberHandlers },
|
|
96
|
+
module: { ...module_handlers_1.moduleHandlers },
|
|
97
|
+
popup: { ...popup_handlers_1.popupHandlers },
|
|
98
|
+
role: { ...role_handlers_1.roleHandlers },
|
|
99
|
+
teamMember: { ...teamMember_handlers_1.teamMemberHandlers },
|
|
100
|
+
user: { ...user_handlers_1.userHandlers },
|
|
101
|
+
webhook: { ...webhook_handlers_1.webhookHandlers },
|
|
102
|
+
};
|
|
103
|
+
class LearningSuite {
|
|
104
|
+
constructor() {
|
|
105
|
+
this.description = {
|
|
106
|
+
displayName: 'LearningSuite',
|
|
107
|
+
name: 'learningSuite',
|
|
108
|
+
icon: {
|
|
109
|
+
light: 'file:./icons/learningsuite-icon-light.svg',
|
|
110
|
+
dark: 'file:./icons/learningsuite-icon-dark.svg',
|
|
111
|
+
},
|
|
112
|
+
group: ['transform'],
|
|
113
|
+
version: 1,
|
|
114
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
115
|
+
description: 'Interact with LearningSuite API (powered by agentur-systeme.de)',
|
|
116
|
+
defaults: {
|
|
117
|
+
name: 'LearningSuite',
|
|
118
|
+
// @ts-expect-error -- description required by linter
|
|
119
|
+
description: 'Interact with LearningSuite API (powered by agentur-systeme.de)',
|
|
120
|
+
},
|
|
121
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
122
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
123
|
+
usableAsTool: true,
|
|
124
|
+
credentials: [
|
|
125
|
+
{
|
|
126
|
+
name: 'learningSuiteApi',
|
|
127
|
+
required: true,
|
|
128
|
+
// @ts-expect-error -- description required by linter
|
|
129
|
+
description: 'LearningSuite API Test',
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
requestDefaults: {
|
|
133
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
134
|
+
headers: { Accept: 'application/json', 'Content-Type': 'application/json' },
|
|
135
|
+
},
|
|
136
|
+
properties: [
|
|
137
|
+
resource_selector_1.resourceSelector,
|
|
138
|
+
...ai_properties_1.aiProperties,
|
|
139
|
+
...apiCall_properties_1.apiCallProperties,
|
|
140
|
+
...bundle_properties_1.bundleProperties,
|
|
141
|
+
...community_properties_1.communityProperties,
|
|
142
|
+
...course_properties_1.courseProperties,
|
|
143
|
+
...customFields_properties_1.customFieldsProperties,
|
|
144
|
+
...group_properties_1.groupProperties,
|
|
145
|
+
...hub_properties_1.hubProperties,
|
|
146
|
+
...member_properties_1.memberProperties,
|
|
147
|
+
...module_properties_1.moduleProperties,
|
|
148
|
+
...popup_properties_1.popupProperties,
|
|
149
|
+
...role_properties_1.roleProperties,
|
|
150
|
+
...teamMember_properties_1.teamMemberProperties,
|
|
151
|
+
...user_properties_1.userProperties,
|
|
152
|
+
...webhook_properties_1.webhookProperties,
|
|
153
|
+
],
|
|
154
|
+
};
|
|
155
|
+
this.methods = {
|
|
156
|
+
loadOptions: {
|
|
157
|
+
...loBundle,
|
|
158
|
+
...loCommunity,
|
|
159
|
+
...loCourse,
|
|
160
|
+
...loCustomFields,
|
|
161
|
+
...loGroup,
|
|
162
|
+
...loHub,
|
|
163
|
+
...loMember,
|
|
164
|
+
...loModule,
|
|
165
|
+
...loPopup,
|
|
166
|
+
...loRole,
|
|
167
|
+
...loTeamMember,
|
|
168
|
+
...loWebhook,
|
|
169
|
+
},
|
|
170
|
+
resourceMapping: {
|
|
171
|
+
getTemplateVariablesResourceMapperFields: hub_resourceMapper_1.getTemplateVariablesResourceMapperFields,
|
|
172
|
+
getMultipleCustomFieldValueResourceMapperFields: customFields_resourceMapper_1.getMultipleCustomFieldValueResourceMapperFields,
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
async execute() {
|
|
177
|
+
var _a;
|
|
178
|
+
const items = this.getInputData();
|
|
179
|
+
const returnData = [];
|
|
180
|
+
for (let i = 0; i < items.length; i++) {
|
|
181
|
+
try {
|
|
182
|
+
const resource = this.getNodeParameter('resource', i);
|
|
183
|
+
const operation = this.getNodeParameter('operation', i);
|
|
184
|
+
const handler = (_a = registry[resource]) === null || _a === void 0 ? void 0 : _a[operation];
|
|
185
|
+
if (!handler) {
|
|
186
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `No handler for resource "${resource}" and operation "${operation}"`, { itemIndex: i });
|
|
187
|
+
}
|
|
188
|
+
const response = await handler(this, i);
|
|
189
|
+
if (Array.isArray(response)) {
|
|
190
|
+
for (const item of response) {
|
|
191
|
+
returnData.push({
|
|
192
|
+
json: item,
|
|
193
|
+
pairedItem: { item: i },
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
else if (response && typeof response === 'object') {
|
|
198
|
+
returnData.push({
|
|
199
|
+
json: response,
|
|
200
|
+
pairedItem: { item: i },
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
if (this.continueOnFail()) {
|
|
206
|
+
returnData.push({
|
|
207
|
+
json: items[i].json,
|
|
208
|
+
error: error instanceof n8n_workflow_1.NodeApiError || error instanceof n8n_workflow_1.NodeOperationError
|
|
209
|
+
? error
|
|
210
|
+
: new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i }),
|
|
211
|
+
pairedItem: { item: i },
|
|
212
|
+
});
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
throw error;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return [returnData];
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
exports.LearningSuite = LearningSuite;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IHookFunctions, IWebhookFunctions, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow';
|
|
2
|
+
export declare class LearningSuiteTrigger implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
customFields_getCards(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
7
|
+
customFields_getDefinitions(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
8
|
+
customFields_getCategories(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
9
|
+
customFields_getFieldType(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<{
|
|
10
|
+
name: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[]>;
|
|
13
|
+
customFields_getFieldOptions(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<{
|
|
14
|
+
name: string;
|
|
15
|
+
value: string;
|
|
16
|
+
}[]>;
|
|
17
|
+
webhook_getSubscriptions(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<{
|
|
18
|
+
name: string;
|
|
19
|
+
description: string;
|
|
20
|
+
value: string;
|
|
21
|
+
}[]>;
|
|
22
|
+
teamMember_getTeamMembersById(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<{
|
|
23
|
+
name: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}[]>;
|
|
26
|
+
teamMember_getTeamMembersByEmail(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<{
|
|
27
|
+
name: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}[]>;
|
|
30
|
+
role_getRoles(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
31
|
+
popup_getPopups(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
32
|
+
module_getAllModules(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
33
|
+
module_getModules(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
34
|
+
module_getSections(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
35
|
+
module_getLessons(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
36
|
+
member_getMembers(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<{
|
|
37
|
+
name: string;
|
|
38
|
+
value: string;
|
|
39
|
+
}[]>;
|
|
40
|
+
member_getMembersByEmail(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<{
|
|
41
|
+
name: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}[]>;
|
|
44
|
+
hub_getHubs(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
45
|
+
hub_getTemplates(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
46
|
+
group_getGroups(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
47
|
+
course_getCourses(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
48
|
+
course_getModules(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
49
|
+
course_getSectionsInCourse(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
50
|
+
course_getLessonsInCourse(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
51
|
+
community_getAreas(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
52
|
+
community_getForums(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
53
|
+
community_getBadges(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
54
|
+
community_getLatestPosts(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
55
|
+
bundle_getBundles(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
webhookMethods: {
|
|
59
|
+
default: {
|
|
60
|
+
checkExists(this: IHookFunctions): Promise<boolean>;
|
|
61
|
+
create(this: IHookFunctions): Promise<boolean>;
|
|
62
|
+
delete(this: IHookFunctions): Promise<boolean>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
webhook(this: IWebhookFunctions): Promise<IWebhookResponseData>;
|
|
66
|
+
}
|