@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,306 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webhookHandlers = void 0;
|
|
4
|
+
const shared_1 = require("../shared");
|
|
5
|
+
const parsing_1 = require("../shared/parsing");
|
|
6
|
+
const getCol = (ctx, i, name) => {
|
|
7
|
+
try {
|
|
8
|
+
const v = ctx.getNodeParameter(name, i, {});
|
|
9
|
+
return v && typeof v === 'object' ? v : {};
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return {};
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const getStr = (ctx, i, name, def = '') => {
|
|
16
|
+
try {
|
|
17
|
+
const v = ctx.getNodeParameter(name, i, def);
|
|
18
|
+
return (v !== null && v !== void 0 ? v : def).toString().trim();
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return def;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const getNum = (ctx, i, name, fallback = 0) => {
|
|
25
|
+
try {
|
|
26
|
+
const v = ctx.getNodeParameter(name, i, fallback);
|
|
27
|
+
return Number.isFinite(v) ? v : fallback;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return fallback;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
function buildDesiredFilter(ctx, i, eventType) {
|
|
34
|
+
var _a;
|
|
35
|
+
const filter = {};
|
|
36
|
+
switch (eventType) {
|
|
37
|
+
// ---------------- Community
|
|
38
|
+
case 'communityPost.commented': {
|
|
39
|
+
const col = getCol(ctx, i, 'additionalCommunityPostCommented');
|
|
40
|
+
if (col === null || col === void 0 ? void 0 : col.areaId)
|
|
41
|
+
filter.areaId = String(col.areaId);
|
|
42
|
+
if (col === null || col === void 0 ? void 0 : col.forumId)
|
|
43
|
+
filter.forumId = String(col.forumId);
|
|
44
|
+
const ids = (0, parsing_1.toIdArray)((_a = col === null || col === void 0 ? void 0 : col.mentionedUserIds) !== null && _a !== void 0 ? _a : []);
|
|
45
|
+
if (ids.length)
|
|
46
|
+
filter.mentionedUserIds = ids;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
case 'communityPost.created': {
|
|
50
|
+
const col = getCol(ctx, i, 'additionalCommunityPostCreated');
|
|
51
|
+
if (col === null || col === void 0 ? void 0 : col.areaId)
|
|
52
|
+
filter.areaId = String(col.areaId);
|
|
53
|
+
if (col === null || col === void 0 ? void 0 : col.forumId)
|
|
54
|
+
filter.forumId = String(col.forumId);
|
|
55
|
+
if ((col === null || col === void 0 ? void 0 : col.publishStatus) && col.publishStatus !== 'both') {
|
|
56
|
+
filter.published = col.publishStatus === 'published'; // boolean
|
|
57
|
+
}
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
case 'communityPost.moderated': {
|
|
61
|
+
const col = getCol(ctx, i, 'additionalCommunityPostModerated');
|
|
62
|
+
if (col === null || col === void 0 ? void 0 : col.areaId)
|
|
63
|
+
filter.areaId = String(col.areaId);
|
|
64
|
+
if (col === null || col === void 0 ? void 0 : col.forumId)
|
|
65
|
+
filter.forumId = String(col.forumId);
|
|
66
|
+
if ((col === null || col === void 0 ? void 0 : col.approved) && col.approved !== 'both') {
|
|
67
|
+
filter.approved = col.approved === 'approved'; // boolean
|
|
68
|
+
}
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
// ---------------- Login
|
|
72
|
+
case 'login.new': {
|
|
73
|
+
const col = getCol(ctx, i, 'additionalLoginNew');
|
|
74
|
+
if (col === null || col === void 0 ? void 0 : col.loginType) {
|
|
75
|
+
filter.loginType = String(col.loginType);
|
|
76
|
+
}
|
|
77
|
+
if (col === null || col === void 0 ? void 0 : col.userRoleId) {
|
|
78
|
+
filter.userRoleId = String(col.userRoleId);
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
// ---------------- Custom Popup
|
|
83
|
+
case 'customPopup.interaction': {
|
|
84
|
+
const col = getCol(ctx, i, 'additionalPopupInteraction');
|
|
85
|
+
if (col === null || col === void 0 ? void 0 : col.customPopupId) {
|
|
86
|
+
filter.customPopupId = String(col.customPopupId);
|
|
87
|
+
}
|
|
88
|
+
if (col === null || col === void 0 ? void 0 : col.interactionType) {
|
|
89
|
+
filter.interactionType = String(col.interactionType);
|
|
90
|
+
}
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
// ---------------- Custom Field Value Changed
|
|
94
|
+
case 'customField.valueChanged': {
|
|
95
|
+
const col = getCol(ctx, i, 'additionalCustomFieldValueChanged');
|
|
96
|
+
if (col === null || col === void 0 ? void 0 : col.customFieldCardId) {
|
|
97
|
+
filter.customFieldCardId = String(col.customFieldCardId);
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
// ---------------- Progress
|
|
102
|
+
case 'courseProgress.changed': {
|
|
103
|
+
const aboveRaw = getNum(ctx, i, 'threshold', 0);
|
|
104
|
+
filter.above = Math.max(0, Math.floor(aboveRaw));
|
|
105
|
+
const col = getCol(ctx, i, 'additionalCourseProgress');
|
|
106
|
+
if (col.courseId)
|
|
107
|
+
filter.courseInstanceId = String(col.courseId);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
// ---------------- Exams
|
|
111
|
+
case 'exam.completed':
|
|
112
|
+
case 'exam.graded': {
|
|
113
|
+
const exam = getCol(ctx, i, 'additionalExamOptions');
|
|
114
|
+
const legacy = Object.keys(exam).length
|
|
115
|
+
? undefined
|
|
116
|
+
: getCol(ctx, i, 'additionalFeedbackExam');
|
|
117
|
+
const c = (Object.keys(exam).length ? exam : legacy) || {};
|
|
118
|
+
if (c === null || c === void 0 ? void 0 : c.courseId)
|
|
119
|
+
filter.courseInstanceId = String(c.courseId);
|
|
120
|
+
if (c === null || c === void 0 ? void 0 : c.examModuleId)
|
|
121
|
+
filter.examModuleId = String(c.examModuleId);
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
// ---------------- Course
|
|
125
|
+
case 'course.memberAdded':
|
|
126
|
+
case 'course.updated': {
|
|
127
|
+
const fb = getCol(ctx, i, 'additionalCourseOptions');
|
|
128
|
+
const legacy = Object.keys(fb).length
|
|
129
|
+
? undefined
|
|
130
|
+
: getCol(ctx, i, 'additionalCourseOptions');
|
|
131
|
+
const c = (Object.keys(fb).length ? fb : legacy) || {};
|
|
132
|
+
if (c === null || c === void 0 ? void 0 : c.courseId)
|
|
133
|
+
filter.courseInstanceId = String(c.courseId);
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
// ---------------- Feedback
|
|
137
|
+
case 'feedback.created': {
|
|
138
|
+
const fb = getCol(ctx, i, 'additionalFeedbackOptions');
|
|
139
|
+
const legacy = Object.keys(fb).length
|
|
140
|
+
? undefined
|
|
141
|
+
: getCol(ctx, i, 'additionalFeedbackExam');
|
|
142
|
+
const c = (Object.keys(fb).length ? fb : legacy) || {};
|
|
143
|
+
if (c === null || c === void 0 ? void 0 : c.courseId)
|
|
144
|
+
filter.courseInstanceId = String(c.courseId);
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
// ---------------- Access Request (required in UI)
|
|
148
|
+
case 'accessRequest.created': {
|
|
149
|
+
const courseId = getStr(ctx, i, 'courseId');
|
|
150
|
+
if (courseId)
|
|
151
|
+
filter.courseInstanceId = courseId;
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
// ---------------- Group Access
|
|
155
|
+
case 'group.userAccessChanged': {
|
|
156
|
+
const col = getCol(ctx, i, 'additionalGroupAccess');
|
|
157
|
+
const actionType = getStr(ctx, i, 'actionType');
|
|
158
|
+
if (actionType)
|
|
159
|
+
filter.actionType = actionType; // 'added' | 'removed'
|
|
160
|
+
if (col.groupId)
|
|
161
|
+
filter.groupId = String(col.groupId);
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
// ---------------- Lesson Completed (kaskadiert)
|
|
165
|
+
case 'lesson.completed': {
|
|
166
|
+
const col = getCol(ctx, i, 'additionalLessonCompleted');
|
|
167
|
+
if (col.courseId)
|
|
168
|
+
filter.courseInstanceId = String(col.courseId);
|
|
169
|
+
if (col.moduleId)
|
|
170
|
+
filter.moduleId = String(col.moduleId);
|
|
171
|
+
if (col.lessonId)
|
|
172
|
+
filter.lessonId = String(col.lessonId);
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
// ---------------- Submission (optional course)
|
|
176
|
+
case 'submission.created': {
|
|
177
|
+
const col = getCol(ctx, i, 'additionalSubmission');
|
|
178
|
+
if (col.courseId)
|
|
179
|
+
filter.courseInstanceId = String(col.courseId);
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
// ---------------- User Activation Status Changed
|
|
183
|
+
case 'user.activationStatusChanged': {
|
|
184
|
+
const col = getCol(ctx, i, 'additionalUserActivationStatus');
|
|
185
|
+
if (col === null || col === void 0 ? void 0 : col.action)
|
|
186
|
+
filter.action = String(col.action);
|
|
187
|
+
if (col === null || col === void 0 ? void 0 : col.roleId)
|
|
188
|
+
filter.roleId = String(col.roleId);
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
default:
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
return filter;
|
|
195
|
+
}
|
|
196
|
+
// ---------------------------------------------------------
|
|
197
|
+
// Handlers
|
|
198
|
+
const getSubscriptions = async (ctx) => shared_1.lsRequest.call(ctx, 'GET', '/webhooks/subscription');
|
|
199
|
+
const getSubscription = async (ctx, i) => {
|
|
200
|
+
const subscriptionId = ctx.getNodeParameter('subscriptionId', i);
|
|
201
|
+
return await shared_1.lsRequest.call(ctx, 'GET', `/webhooks/subscription/${encodeURIComponent(subscriptionId)}`);
|
|
202
|
+
};
|
|
203
|
+
const createSubscription = async (ctx, i) => {
|
|
204
|
+
const hookUrl = ctx.getNodeParameter('hookUrl', i);
|
|
205
|
+
const eventType = ctx.getNodeParameter('eventType', i);
|
|
206
|
+
const filter = buildDesiredFilter(ctx, i, eventType) || {};
|
|
207
|
+
const body = { hookUrl, type: eventType, filter };
|
|
208
|
+
return await shared_1.lsRequest.call(ctx, 'POST', '/webhooks/subscription', { body });
|
|
209
|
+
};
|
|
210
|
+
const updateSubscription = async (ctx, i) => {
|
|
211
|
+
const subscriptionId = ctx.getNodeParameter('subscriptionId', i);
|
|
212
|
+
const hookUrl = ctx.getNodeParameter('hookUrl', i);
|
|
213
|
+
const eventType = ctx.getNodeParameter('eventType', i);
|
|
214
|
+
const filter = buildDesiredFilter(ctx, i, eventType) || {};
|
|
215
|
+
const body = { hookUrl, type: eventType, filter };
|
|
216
|
+
return await shared_1.lsRequest.call(ctx, 'PUT', `/webhooks/subscription/${encodeURIComponent(subscriptionId)}`, { body });
|
|
217
|
+
};
|
|
218
|
+
const deleteSubscription = async (ctx, i) => {
|
|
219
|
+
const subscriptionId = ctx.getNodeParameter('subscriptionId', i);
|
|
220
|
+
return await shared_1.lsRequest.call(ctx, 'DELETE', `/webhooks/subscription/${encodeURIComponent(subscriptionId)}`);
|
|
221
|
+
};
|
|
222
|
+
const getSampleData = async (ctx, i) => {
|
|
223
|
+
const sampleDataType = ctx.getNodeParameter('sampleDataType', i);
|
|
224
|
+
let qs = {};
|
|
225
|
+
switch (sampleDataType) {
|
|
226
|
+
case 'progress-changed-events': {
|
|
227
|
+
const col = ctx.getNodeParameter('additionalProgressChangedSample', i, {});
|
|
228
|
+
qs = col;
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
case 'lesson-completed-events': {
|
|
232
|
+
const col = ctx.getNodeParameter('additionalLessonCompletedSample', i, {});
|
|
233
|
+
qs = col;
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
case 'new-login-events': {
|
|
237
|
+
const col = ctx.getNodeParameter('additionalNewLoginSample', i, {});
|
|
238
|
+
qs = col;
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
case 'exam-completed-events': {
|
|
242
|
+
const col = ctx.getNodeParameter('additionalExamCompletedSample', i, {});
|
|
243
|
+
qs = col;
|
|
244
|
+
break;
|
|
245
|
+
}
|
|
246
|
+
case 'exam-graded-events': {
|
|
247
|
+
const col = ctx.getNodeParameter('additionalExamGradedSample', i, {});
|
|
248
|
+
qs = col;
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
case 'custom-popup-interaction-events': {
|
|
252
|
+
const col = ctx.getNodeParameter('additionalCustomPopupInteractionSample', i, {});
|
|
253
|
+
qs = col;
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
case 'community-post-created-events': {
|
|
257
|
+
const col = ctx.getNodeParameter('additionalCommunityPostCreatedSample', i, {});
|
|
258
|
+
qs = col;
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
case 'community-post-moderated-events': {
|
|
262
|
+
const col = ctx.getNodeParameter('additionalCommunityPostModeratedSample', i, {});
|
|
263
|
+
qs = col;
|
|
264
|
+
break;
|
|
265
|
+
}
|
|
266
|
+
case 'community-post-commented-events': {
|
|
267
|
+
const col = ctx.getNodeParameter('additionalCommunityPostCommentedSample', i, {});
|
|
268
|
+
qs = col;
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
case 'group-user-access-changed-events': {
|
|
272
|
+
const col = ctx.getNodeParameter('additionalGroupUserAccessChangedSample', i, {});
|
|
273
|
+
qs = col;
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
case 'course-updated-events': {
|
|
277
|
+
const col = ctx.getNodeParameter('additionalCourseUpdatedSample', i, {});
|
|
278
|
+
qs = col;
|
|
279
|
+
break;
|
|
280
|
+
}
|
|
281
|
+
case 'course-member-added-events': {
|
|
282
|
+
const col = ctx.getNodeParameter('additionalCourseMemberAddedSample', i, {});
|
|
283
|
+
qs = col;
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
case 'custom-field-value-changed': {
|
|
287
|
+
const col = ctx.getNodeParameter('additionalCustomFieldValueChangedSample', i, {});
|
|
288
|
+
qs = col;
|
|
289
|
+
break;
|
|
290
|
+
}
|
|
291
|
+
case 'user-activation-status-changed-events': {
|
|
292
|
+
const col = ctx.getNodeParameter('additionalUserActivationStatusChangedSample', i, {});
|
|
293
|
+
qs = col;
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return await shared_1.lsRequest.call(ctx, 'GET', `/webhooks/sample-data/${encodeURIComponent(sampleDataType)}`, { qs });
|
|
298
|
+
};
|
|
299
|
+
exports.webhookHandlers = {
|
|
300
|
+
getSubscriptions,
|
|
301
|
+
getSubscription,
|
|
302
|
+
createSubscription,
|
|
303
|
+
updateSubscription,
|
|
304
|
+
deleteSubscription,
|
|
305
|
+
getSampleData,
|
|
306
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" zoomAndPan="magnify" viewBox="0 0 384 391.91998" height="512" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="c6dad2e7c9"><path d="M 127 2.066406 L 318 2.066406 L 318 214 L 127 214 Z M 127 2.066406 " clip-rule="nonzero"/></clipPath><clipPath id="a9b7033811"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="46b7644509"><path d="M 224 54 L 369 54 L 369 293 L 224 293 Z M 224 54 " clip-rule="nonzero"/></clipPath><clipPath id="c0984bbd50"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="4745944fd5"><path d="M 121 219 L 367 219 L 367 339 L 121 339 Z M 121 219 " clip-rule="nonzero"/></clipPath><clipPath id="dd2bba544f"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="856a11e52a"><path d="M 66 170 L 258 170 L 258 381.488281 L 66 381.488281 Z M 66 170 " clip-rule="nonzero"/></clipPath><clipPath id="9bf386bdf1"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="51e32676fa"><path d="M 15 89 L 160 89 L 160 329 L 15 329 Z M 15 89 " clip-rule="nonzero"/></clipPath><clipPath id="9db504f912"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="32eae5f4c2"><path d="M 15 47 L 261 47 L 261 167 L 15 167 Z M 15 47 " clip-rule="nonzero"/></clipPath><clipPath id="6d7e40857c"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="2d9abcf565"><path d="M 153 147 L 237 147 L 237 239 L 153 239 Z M 153 147 " clip-rule="nonzero"/></clipPath><clipPath id="13bfd7577d"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#c6dad2e7c9)"><g clip-path="url(#a9b7033811)"><path fill="#1871d4" d="M 291.535156 213.332031 C 292.109375 198.699219 291.632812 184.101562 290.113281 169.539062 C 288.46875 153 285.269531 136.765625 280.519531 120.835938 C 275.351562 103.136719 267.582031 86.667969 257.210938 71.421875 C 252.648438 64.417969 247.363281 58.007812 241.367188 52.183594 C 235.367188 46.363281 228.796875 41.273438 221.660156 36.917969 C 217.097656 34.246094 212.265625 32.203125 207.164062 30.789062 C 202.066406 29.375 196.871094 28.640625 191.582031 28.582031 C 184.460938 28.492188 177.65625 29.90625 171.160156 32.824219 L 127.105469 27.867188 C 131.582031 24.050781 136.292969 20.554688 141.246094 17.378906 C 147.621094 13.257812 154.351562 9.84375 161.441406 7.132812 C 169.316406 4.101562 177.46875 2.425781 185.898438 2.097656 C 186.707031 2.0625 187.480469 2.0625 188.433594 2.0625 C 196.859375 2.078125 205.132812 3.210938 213.253906 5.464844 C 221.339844 7.722656 229.035156 10.925781 236.339844 15.070312 C 243.792969 19.347656 250.710938 24.367188 257.089844 30.128906 C 263.464844 35.894531 269.160156 42.265625 274.171875 49.253906 C 274.933594 50.308594 275.875 51.582031 277.121094 53.246094 L 277.1875 53.328125 C 282.804688 60.648438 287.882812 68.328125 292.425781 76.363281 C 298.816406 88.066406 303.621094 100.386719 306.84375 113.324219 C 315.109375 145.753906 317.941406 165.265625 317.882812 172.113281 C 311.984375 187.832031 298.851562 204.675781 291.550781 213.324219 Z M 291.535156 213.332031 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#46b7644509)"><g clip-path="url(#c0984bbd50)"><path fill="#ffffff" d="M 258.074219 292.765625 C 246.785156 292.621094 235.589844 291.515625 224.488281 289.449219 C 237.445312 282.628906 249.847656 274.914062 261.695312 266.3125 C 275.195312 256.617188 287.65625 245.730469 299.070312 233.652344 C 311.8125 220.3125 322.199219 205.34375 330.230469 188.738281 C 334.007812 181.285156 336.914062 173.503906 338.953125 165.398438 C 340.988281 157.292969 342.105469 149.0625 342.304688 140.707031 C 342.339844 135.414062 341.695312 130.207031 340.371094 125.085938 C 339.046875 119.964844 337.085938 115.097656 334.488281 110.488281 C 331.003906 104.289062 326.382812 99.113281 320.617188 94.949219 L 302.882812 54.304688 C 308.472656 56.289062 313.898438 58.648438 319.167969 61.375 C 325.898438 64.828125 332.199219 68.945312 338.058594 73.730469 C 344.605469 79.023438 350.117188 85.230469 354.605469 92.347656 C 355.050781 93.066406 355.449219 93.761719 355.894531 94.523438 C 360.101562 101.828125 363.261719 109.5625 365.371094 117.722656 C 367.460938 125.859375 368.539062 134.125 368.601562 142.523438 C 368.617188 151.117188 367.722656 159.617188 365.917969 168.019531 C 364.109375 176.421875 361.433594 184.539062 357.886719 192.367188 L 357.617188 192.992188 C 357.402344 193.484375 357.171875 193.980469 356.960938 194.492188 C 356.683594 195.140625 356.402344 195.792969 356.109375 196.46875 L 355.910156 196.910156 L 355.753906 197.25 C 352.265625 205.699219 348.191406 213.855469 343.535156 221.722656 C 336.609375 233.117188 328.34375 243.433594 318.734375 252.679688 C 294.765625 276.109375 279.289062 288.3125 273.339844 291.640625 C 268.28125 292.429688 263.191406 292.804688 258.074219 292.765625 Z M 258.074219 292.765625 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#4745944fd5)"><g clip-path="url(#dd2bba544f)"><path fill="#1871d4" d="M 243.128906 338.347656 C 241.90625 338.347656 240.941406 338.347656 240.097656 338.316406 C 226.773438 338.011719 213.703125 336.015625 200.894531 332.324219 C 168.550781 323.234375 150.28125 315.96875 144.445312 312.503906 C 133.777344 299.507812 125.765625 279.71875 121.9375 269.078125 C 134.3125 276.894531 147.1875 283.78125 160.558594 289.734375 C 175.699219 296.59375 191.355469 301.949219 207.527344 305.796875 C 221.261719 309.070312 235.191406 310.753906 249.308594 310.847656 C 253.585938 310.847656 257.851562 310.675781 261.988281 310.328125 C 270.335938 309.875 278.527344 308.507812 286.566406 306.222656 C 294.609375 303.933594 302.296875 300.789062 309.632812 296.78125 C 314.234375 294.164062 318.421875 291 322.199219 287.289062 C 325.976562 283.578125 329.214844 279.441406 331.917969 274.886719 C 335.550781 268.777344 337.730469 262.183594 338.445312 255.105469 L 364.765625 219.398438 C 365.851562 225.230469 366.523438 231.109375 366.777344 237.035156 C 367.164062 244.59375 366.746094 252.105469 365.53125 259.578125 C 364.21875 267.886719 361.59375 275.761719 357.664062 283.203125 C 357.359375 283.789062 357.011719 284.382812 356.679688 284.976562 L 356.480469 285.308594 L 356.414062 285.429688 C 352.191406 292.71875 347.078125 299.316406 341.074219 305.222656 C 335.070312 311.097656 328.445312 316.164062 321.203125 320.421875 C 313.765625 324.734375 305.957031 328.210938 297.777344 330.851562 C 289.59375 333.492188 281.226562 335.238281 272.667969 336.089844 C 271.019531 336.246094 269.246094 336.457031 267.742188 336.636719 L 267.640625 336.636719 C 259.503906 337.699219 251.335938 338.269531 243.128906 338.347656 Z M 243.128906 338.347656 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#856a11e52a)"><g clip-path="url(#9bf386bdf1)"><path fill="#ffffff" d="M 195.902344 381.847656 C 187.472656 381.835938 179.199219 380.703125 171.082031 378.449219 C 162.988281 376.199219 155.292969 372.996094 147.996094 368.839844 C 140.542969 364.558594 133.628906 359.539062 127.25 353.777344 C 120.871094 348.011719 115.175781 341.640625 110.164062 334.660156 C 109.390625 333.59375 108.359375 332.167969 107.210938 330.664062 L 107.015625 330.390625 C 101.457031 323.121094 96.425781 315.496094 91.921875 307.527344 C 85.523438 295.828125 80.71875 283.507812 77.507812 270.5625 C 69.207031 238.128906 66.367188 218.625 66.449219 211.796875 C 72.363281 196.050781 85.5 179.21875 92.804688 170.578125 C 92.222656 185.214844 92.695312 199.8125 94.226562 214.378906 C 95.859375 230.921875 99.046875 247.15625 103.789062 263.082031 C 108.96875 280.78125 116.742188 297.257812 127.105469 312.511719 C 131.671875 319.507812 136.957031 325.917969 142.957031 331.738281 C 148.957031 337.554688 155.523438 342.640625 162.660156 346.992188 C 167.226562 349.664062 172.0625 351.710938 177.164062 353.121094 C 182.261719 354.53125 187.460938 355.265625 192.753906 355.320312 C 199.871094 355.414062 206.679688 354.003906 213.175781 351.089844 L 257.242188 356.035156 C 252.738281 359.890625 247.988281 363.410156 242.984375 366.59375 C 236.621094 370.707031 229.902344 374.113281 222.820312 376.804688 C 214.976562 379.832031 206.851562 381.503906 198.449219 381.820312 C 197.597656 381.832031 196.816406 381.847656 195.902344 381.847656 Z M 195.902344 381.847656 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#51e32676fa)"><g clip-path="url(#9db504f912)"><path fill="#1871d4" d="M 81.433594 328.332031 C 75.847656 326.363281 70.429688 324.015625 65.171875 321.289062 C 58.4375 317.828125 52.136719 313.707031 46.265625 308.925781 C 39.730469 303.632812 34.21875 297.425781 29.738281 290.308594 C 29.292969 289.59375 28.851562 288.871094 28.429688 288.144531 C 24.222656 280.84375 21.070312 273.113281 18.972656 264.953125 C 16.882812 256.816406 15.800781 248.550781 15.730469 240.152344 C 15.71875 231.554688 16.613281 223.050781 18.417969 214.644531 C 20.21875 206.238281 22.890625 198.117188 26.425781 190.28125 C 27.074219 188.84375 27.757812 187.304688 28.378906 185.839844 L 28.425781 185.730469 L 28.492188 185.582031 L 28.492188 185.53125 C 32.007812 177.035156 36.109375 168.832031 40.800781 160.921875 C 47.726562 149.535156 55.988281 139.21875 65.585938 129.972656 C 89.53125 106.597656 104.734375 94.515625 110.980469 91.003906 C 116.046875 90.222656 121.144531 89.851562 126.269531 89.894531 C 137.558594 90.050781 148.75 91.160156 159.847656 93.214844 C 146.890625 100.03125 134.484375 107.742188 122.636719 116.347656 C 109.128906 126.03125 96.667969 136.910156 85.25 148.988281 C 72.511719 162.320312 62.128906 177.285156 54.097656 193.878906 C 50.316406 201.335938 47.40625 209.117188 45.367188 217.226562 C 43.324219 225.332031 42.203125 233.5625 42 241.921875 C 41.972656 247.214844 42.621094 252.425781 43.945312 257.550781 C 45.269531 262.675781 47.230469 267.546875 49.820312 272.164062 C 53.292969 278.367188 57.917969 283.546875 63.691406 287.699219 L 81.445312 328.328125 Z M 81.433594 328.332031 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#32eae5f4c2)"><g clip-path="url(#6d7e40857c)"><path fill="#ffffff" d="M 17.367188 166.121094 C 16.308594 160.292969 15.640625 154.421875 15.359375 148.503906 C 14.984375 140.945312 15.398438 133.425781 16.605469 125.953125 C 17.910156 117.644531 20.527344 109.765625 24.449219 102.324219 L 24.695312 101.878906 C 24.9375 101.4375 25.195312 100.96875 25.449219 100.523438 L 25.683594 100.109375 C 29.914062 92.820312 35.035156 86.230469 41.050781 80.332031 C 47.039062 74.441406 53.660156 69.371094 60.90625 65.117188 C 68.34375 60.808594 76.152344 57.335938 84.332031 54.699219 C 92.511719 52.058594 100.878906 50.316406 109.433594 49.464844 L 111.035156 49.285156 L 114.363281 48.910156 L 114.78125 48.855469 L 114.816406 48.855469 C 122.839844 47.824219 130.898438 47.269531 138.988281 47.1875 C 140.089844 47.1875 141.023438 47.1875 142.03125 47.222656 C 155.367188 47.527344 168.445312 49.523438 181.265625 53.210938 C 213.554688 62.28125 231.582031 69.40625 237.6875 73.039062 C 248.34375 86.046875 256.367188 105.820312 260.1875 116.457031 C 247.808594 108.644531 234.933594 101.757812 221.5625 95.792969 C 206.421875 88.945312 190.769531 83.59375 174.605469 79.738281 C 160.886719 76.476562 146.976562 74.800781 132.875 74.710938 C 128.609375 74.710938 124.316406 74.890625 120.140625 75.25 C 111.796875 75.695312 103.601562 77.058594 95.5625 79.339844 C 87.523438 81.621094 79.835938 84.765625 72.5 88.765625 C 67.902344 91.386719 63.710938 94.550781 59.9375 98.265625 C 56.164062 101.976562 52.929688 106.113281 50.234375 110.667969 C 46.59375 116.785156 44.417969 123.382812 43.703125 130.464844 L 17.367188 166.117188 Z M 17.367188 166.121094 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#2d9abcf565)"><g clip-path="url(#13bfd7577d)"><path fill="#ffffff" d="M 228.609375 179.730469 C 229.753906 180.390625 230.792969 181.1875 231.726562 182.121094 C 232.660156 183.054688 233.457031 184.09375 234.121094 185.238281 C 234.78125 186.382812 235.28125 187.59375 235.625 188.867188 C 235.964844 190.144531 236.136719 191.441406 236.136719 192.761719 C 236.136719 194.085938 235.964844 195.382812 235.625 196.660156 C 235.28125 197.933594 234.78125 199.144531 234.121094 200.289062 C 233.457031 201.429688 232.660156 202.46875 231.726562 203.402344 C 230.792969 204.335938 229.753906 205.136719 228.609375 205.792969 L 175.996094 236.15625 C 175.425781 236.484375 174.835938 236.773438 174.230469 237.023438 C 173.625 237.277344 173.003906 237.484375 172.367188 237.65625 C 171.730469 237.824219 171.089844 237.953125 170.4375 238.039062 C 169.785156 238.125 169.132812 238.167969 168.472656 238.167969 C 167.816406 238.167969 167.164062 238.125 166.511719 238.039062 C 165.859375 237.953125 165.21875 237.824219 164.582031 237.652344 C 163.949219 237.484375 163.328125 237.273438 162.71875 237.019531 C 162.113281 236.769531 161.523438 236.480469 160.957031 236.148438 C 160.386719 235.820312 159.839844 235.457031 159.320312 235.058594 C 158.796875 234.65625 158.304688 234.226562 157.839844 233.761719 C 157.375 233.296875 156.945312 232.800781 156.542969 232.28125 C 156.144531 231.757812 155.777344 231.214844 155.449219 230.644531 C 155.121094 230.078125 154.832031 229.488281 154.582031 228.882812 C 154.328125 228.273438 154.117188 227.652344 153.949219 227.019531 C 153.777344 226.382812 153.648438 225.742188 153.5625 225.089844 C 153.476562 224.4375 153.433594 223.78125 153.433594 223.125 L 153.433594 162.390625 C 153.433594 161.734375 153.476562 161.082031 153.5625 160.429688 C 153.648438 159.777344 153.777344 159.132812 153.949219 158.5 C 154.117188 157.863281 154.328125 157.242188 154.582031 156.636719 C 154.832031 156.03125 155.121094 155.441406 155.449219 154.871094 C 155.777344 154.304688 156.144531 153.757812 156.542969 153.238281 C 156.945312 152.714844 157.375 152.222656 157.839844 151.757812 C 158.304688 151.292969 158.796875 150.859375 159.320312 150.460938 C 159.839844 150.058594 160.386719 149.695312 160.957031 149.367188 C 161.523438 149.039062 162.113281 148.75 162.71875 148.496094 C 163.328125 148.246094 163.949219 148.035156 164.582031 147.863281 C 165.21875 147.695312 165.859375 147.566406 166.511719 147.480469 C 167.164062 147.394531 167.816406 147.351562 168.472656 147.351562 C 169.132812 147.351562 169.785156 147.394531 170.4375 147.480469 C 171.089844 147.5625 171.730469 147.691406 172.367188 147.863281 C 173.003906 148.03125 173.625 148.242188 174.230469 148.492188 C 174.835938 148.746094 175.425781 149.035156 175.996094 149.363281 Z M 228.609375 179.730469 " fill-opacity="1" fill-rule="nonzero"/></g></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" zoomAndPan="magnify" viewBox="0 0 384 391.91998" height="512" preserveAspectRatio="xMidYMid meet" version="1.0"><defs><clipPath id="6e6c1ae191"><path d="M 127 2.066406 L 318 2.066406 L 318 214 L 127 214 Z M 127 2.066406 " clip-rule="nonzero"/></clipPath><clipPath id="d43b364f1c"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="b01eb270cc"><path d="M 224 54 L 369 54 L 369 293 L 224 293 Z M 224 54 " clip-rule="nonzero"/></clipPath><clipPath id="55f83de6eb"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="b192d6d655"><path d="M 121 219 L 367 219 L 367 339 L 121 339 Z M 121 219 " clip-rule="nonzero"/></clipPath><clipPath id="d86f66000d"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="ceec2f0e47"><path d="M 66 170 L 258 170 L 258 381.488281 L 66 381.488281 Z M 66 170 " clip-rule="nonzero"/></clipPath><clipPath id="44123b8dc5"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="c4b59ff950"><path d="M 15 89 L 160 89 L 160 329 L 15 329 Z M 15 89 " clip-rule="nonzero"/></clipPath><clipPath id="ea0ae54dc4"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="162f5ad0d5"><path d="M 15 47 L 261 47 L 261 166 L 15 166 Z M 15 47 " clip-rule="nonzero"/></clipPath><clipPath id="7a740aa3aa"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath><clipPath id="f801f6698e"><path d="M 153 147 L 237 147 L 237 238 L 153 238 Z M 153 147 " clip-rule="nonzero"/></clipPath><clipPath id="3192d50a54"><path d="M 14.773438 75.550781 L 14.773438 308.371094 C 14.773438 348.953125 47.671875 381.855469 88.257812 381.855469 L 295.742188 381.855469 C 336.328125 381.855469 369.226562 348.953125 369.226562 308.371094 L 369.226562 75.550781 C 369.226562 34.96875 336.328125 2.066406 295.742188 2.066406 L 88.257812 2.066406 C 47.671875 2.066406 14.773438 34.96875 14.773438 75.550781 Z M 14.773438 75.550781 " clip-rule="nonzero"/></clipPath></defs><g clip-path="url(#6e6c1ae191)"><g clip-path="url(#d43b364f1c)"><path fill="#1871d4" d="M 291.515625 213.128906 C 292.085938 198.511719 291.609375 183.929688 290.089844 169.378906 C 288.445312 152.855469 285.25 136.636719 280.496094 120.722656 C 275.328125 103.039062 267.5625 86.585938 257.191406 71.355469 C 252.628906 64.359375 247.34375 57.953125 241.347656 52.136719 C 235.347656 46.320312 228.78125 41.234375 221.644531 36.886719 C 217.082031 34.214844 212.25 32.171875 207.148438 30.761719 C 202.050781 29.347656 196.855469 28.613281 191.566406 28.558594 C 184.449219 28.46875 177.640625 29.878906 171.148438 32.792969 L 127.097656 27.84375 C 131.570312 24.03125 136.285156 20.539062 141.234375 17.363281 C 147.609375 13.246094 154.339844 9.835938 161.429688 7.128906 C 169.304688 4.101562 177.457031 2.421875 185.886719 2.097656 C 186.691406 2.0625 187.464844 2.0625 188.417969 2.0625 C 196.847656 2.078125 205.117188 3.207031 213.238281 5.460938 C 221.324219 7.714844 229.019531 10.914062 236.320312 15.058594 C 243.777344 19.332031 250.691406 24.347656 257.070312 30.105469 C 263.445312 35.859375 269.140625 42.230469 274.148438 49.207031 C 274.914062 50.261719 275.851562 51.535156 277.101562 53.199219 L 277.167969 53.277344 C 282.785156 60.59375 287.863281 68.265625 292.402344 76.292969 C 298.792969 87.984375 303.597656 100.292969 306.820312 113.21875 C 315.085938 145.617188 317.917969 165.109375 317.859375 171.953125 C 311.960938 187.65625 298.828125 204.480469 291.527344 213.121094 Z M 291.515625 213.128906 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#b01eb270cc)"><g clip-path="url(#55f83de6eb)"><path fill="#042344" d="M 258.054688 292.488281 C 246.765625 292.34375 235.570312 291.238281 224.472656 289.175781 C 237.425781 282.359375 249.828125 274.652344 261.675781 266.058594 C 275.175781 256.375 287.632812 245.496094 299.046875 233.429688 C 311.785156 220.105469 322.171875 205.148438 330.203125 188.5625 C 333.980469 181.113281 336.886719 173.339844 338.925781 165.242188 C 340.964844 157.144531 342.082031 148.921875 342.277344 140.574219 C 342.3125 135.289062 341.671875 130.085938 340.34375 124.96875 C 339.019531 119.851562 337.058594 114.988281 334.460938 110.382812 C 330.976562 104.191406 326.355469 99.019531 320.59375 94.863281 L 302.859375 54.253906 C 308.449219 56.238281 313.875 58.59375 319.140625 61.320312 C 325.875 64.769531 332.171875 68.882812 338.035156 73.660156 C 344.578125 78.949219 350.09375 85.148438 354.578125 92.261719 C 355.023438 92.980469 355.421875 93.671875 355.863281 94.4375 C 360.074219 101.734375 363.230469 109.460938 365.34375 117.613281 C 367.433594 125.738281 368.507812 133.996094 368.574219 142.386719 C 368.589844 150.972656 367.695312 159.464844 365.886719 167.859375 C 364.082031 176.253906 361.40625 184.363281 357.859375 192.183594 L 357.585938 192.808594 C 357.375 193.300781 357.144531 193.796875 356.933594 194.308594 C 356.65625 194.957031 356.375 195.609375 356.082031 196.28125 L 355.882812 196.726562 L 355.726562 197.0625 C 352.238281 205.503906 348.164062 213.652344 343.507812 221.511719 C 336.582031 232.894531 328.316406 243.203125 318.710938 252.4375 C 294.742188 275.847656 279.265625 288.039062 273.320312 291.363281 C 268.261719 292.152344 263.171875 292.527344 258.054688 292.488281 Z M 258.054688 292.488281 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#b192d6d655)"><g clip-path="url(#d86f66000d)"><path fill="#1871d4" d="M 243.113281 338.027344 C 241.886719 338.027344 240.921875 338.027344 240.082031 337.996094 C 226.753906 337.691406 213.6875 335.695312 200.878906 332.007812 C 168.539062 322.929688 150.273438 315.667969 144.433594 312.207031 C 133.769531 299.222656 125.753906 279.453125 121.929688 268.820312 C 134.304688 276.632812 147.175781 283.511719 160.546875 289.457031 C 175.6875 296.3125 191.34375 301.660156 207.511719 305.507812 C 221.246094 308.777344 235.171875 310.457031 249.289062 310.550781 C 253.566406 310.550781 257.832031 310.382812 261.96875 310.03125 C 270.3125 309.582031 278.507812 308.214844 286.546875 305.929688 C 294.585938 303.648438 302.273438 300.503906 309.605469 296.5 C 314.207031 293.882812 318.398438 290.722656 322.175781 287.015625 C 325.953125 283.308594 329.191406 279.179688 331.890625 274.628906 C 335.527344 268.519531 337.703125 261.933594 338.421875 254.863281 L 364.738281 219.1875 C 365.824219 225.015625 366.492188 230.890625 366.75 236.808594 C 367.132812 244.359375 366.71875 251.867188 365.503906 259.332031 C 364.1875 267.632812 361.566406 275.5 357.636719 282.933594 C 357.328125 283.519531 356.984375 284.113281 356.652344 284.707031 L 356.449219 285.035156 L 356.382812 285.160156 C 352.164062 292.441406 347.050781 299.03125 341.046875 304.933594 C 335.042969 310.800781 328.421875 315.863281 321.179688 320.117188 C 313.742188 324.425781 305.933594 327.898438 297.753906 330.539062 C 289.570312 333.175781 281.203125 334.921875 272.648438 335.769531 C 270.996094 335.929688 269.226562 336.136719 267.722656 336.320312 L 267.621094 336.320312 C 259.484375 337.378906 251.316406 337.945312 243.113281 338.027344 Z M 243.113281 338.027344 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#ceec2f0e47)"><g clip-path="url(#44123b8dc5)"><path fill="#042344" d="M 195.886719 381.484375 C 187.460938 381.472656 179.1875 380.339844 171.066406 378.085938 C 162.976562 375.839844 155.285156 372.640625 147.984375 368.492188 C 140.53125 364.214844 133.617188 359.195312 127.242188 353.4375 C 120.863281 347.683594 115.167969 341.316406 110.15625 334.339844 C 109.382812 333.277344 108.351562 331.851562 107.207031 330.347656 L 107.066406 330.160156 L 107.011719 330.078125 C 101.449219 322.8125 96.417969 315.199219 91.917969 307.234375 C 85.519531 295.546875 80.714844 283.238281 77.503906 270.308594 C 69.203125 237.90625 66.363281 218.417969 66.445312 211.597656 C 72.359375 195.863281 85.496094 179.046875 92.796875 170.417969 C 92.214844 185.039062 92.691406 199.625 94.222656 214.175781 C 95.851562 230.703125 99.039062 246.921875 103.78125 262.835938 C 108.960938 280.515625 116.730469 296.976562 127.097656 312.214844 C 131.664062 319.207031 136.945312 325.609375 142.945312 331.421875 C 148.945312 337.234375 155.511719 342.3125 162.648438 346.660156 C 167.214844 349.332031 172.046875 351.375 177.148438 352.785156 C 182.25 354.195312 187.445312 354.925781 192.738281 354.980469 C 199.855469 355.078125 206.664062 353.667969 213.15625 350.753906 L 257.222656 355.695312 C 252.71875 359.550781 247.96875 363.066406 242.964844 366.246094 C 236.605469 370.355469 229.882812 373.757812 222.804688 376.445312 C 214.960938 379.472656 206.835938 381.140625 198.433594 381.457031 C 197.582031 381.46875 196.800781 381.484375 195.886719 381.484375 Z M 195.886719 381.484375 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#c4b59ff950)"><g clip-path="url(#ea0ae54dc4)"><path fill="#1871d4" d="M 81.429688 328.019531 C 75.84375 326.050781 70.425781 323.707031 65.167969 320.980469 C 58.433594 317.523438 52.132812 313.40625 46.261719 308.628906 C 39.726562 303.34375 34.21875 297.144531 29.738281 290.035156 C 29.292969 289.320312 28.847656 288.597656 28.425781 287.871094 C 24.222656 280.578125 21.070312 272.855469 18.972656 264.703125 C 16.882812 256.574219 15.800781 248.3125 15.730469 239.921875 C 15.71875 231.332031 16.613281 222.839844 18.417969 214.441406 C 20.21875 206.042969 22.890625 197.929688 26.425781 190.097656 C 27.074219 188.667969 27.757812 187.128906 28.378906 185.664062 L 28.421875 185.554688 L 28.488281 185.40625 L 28.488281 185.355469 C 32.003906 176.867188 36.109375 168.671875 40.800781 160.769531 C 47.722656 149.394531 55.984375 139.085938 65.582031 129.847656 C 89.523438 106.5 104.726562 94.425781 110.972656 90.917969 C 116.039062 90.136719 121.136719 89.769531 126.261719 89.808594 C 137.546875 89.96875 148.738281 91.074219 159.835938 93.128906 C 146.878906 99.9375 134.472656 107.640625 122.625 116.238281 C 109.121094 125.910156 96.660156 136.78125 85.246094 148.847656 C 72.507812 162.167969 62.125 177.117188 54.09375 193.695312 C 50.3125 201.144531 47.402344 208.921875 45.363281 217.019531 C 43.320312 225.117188 42.199219 233.34375 41.996094 241.691406 C 41.96875 246.980469 42.617188 252.1875 43.941406 257.304688 C 45.269531 262.425781 47.226562 267.292969 49.820312 271.902344 C 53.292969 278.105469 57.914062 283.277344 63.6875 287.425781 L 81.441406 328.015625 Z M 81.429688 328.019531 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#162f5ad0d5)"><g clip-path="url(#7a740aa3aa)"><path fill="#042344" d="M 17.367188 165.964844 C 16.308594 160.140625 15.640625 154.277344 15.359375 148.367188 C 14.984375 140.8125 15.398438 133.300781 16.605469 125.835938 C 17.910156 117.53125 20.527344 109.664062 24.449219 102.226562 L 24.695312 101.785156 C 24.9375 101.339844 25.195312 100.875 25.449219 100.425781 L 25.683594 100.015625 C 29.910156 92.734375 35.03125 86.148438 41.046875 80.257812 C 47.039062 74.371094 53.65625 69.304688 60.902344 65.058594 C 68.339844 60.753906 76.148438 57.285156 84.328125 54.648438 C 92.507812 52.011719 100.871094 50.269531 109.425781 49.421875 L 111.027344 49.238281 L 114.355469 48.867188 L 114.773438 48.8125 L 114.808594 48.8125 C 122.832031 47.78125 130.890625 47.226562 138.980469 47.144531 C 140.078125 47.144531 141.011719 47.144531 142.019531 47.179688 C 155.355469 47.484375 168.433594 49.476562 181.25 53.164062 C 213.539062 62.222656 231.566406 69.34375 237.667969 72.96875 C 248.324219 85.964844 256.347656 105.722656 260.167969 116.347656 C 247.789062 108.542969 234.914062 101.660156 221.546875 95.703125 C 206.40625 88.863281 190.757812 83.515625 174.59375 79.664062 C 160.875 76.40625 146.964844 74.730469 132.867188 74.640625 C 128.601562 74.640625 124.308594 74.820312 120.132812 75.179688 C 111.789062 75.625 103.597656 76.988281 95.558594 79.265625 C 87.519531 81.546875 79.832031 84.683594 72.496094 88.683594 C 67.894531 91.300781 63.707031 94.460938 59.933594 98.171875 C 56.160156 101.882812 52.925781 106.011719 50.230469 110.566406 C 46.589844 116.675781 44.414062 123.265625 43.703125 130.339844 L 17.367188 165.960938 Z M 17.367188 165.964844 " fill-opacity="1" fill-rule="nonzero"/></g></g><g clip-path="url(#f801f6698e)"><g clip-path="url(#3192d50a54)"><path fill="#042344" d="M 228.59375 179.5625 C 229.734375 180.222656 230.773438 181.015625 231.710938 181.949219 C 232.644531 182.882812 233.441406 183.921875 234.101562 185.0625 C 234.761719 186.207031 235.261719 187.414062 235.605469 188.691406 C 235.945312 189.964844 236.117188 191.261719 236.117188 192.582031 C 236.117188 193.902344 235.945312 195.199219 235.605469 196.472656 C 235.261719 197.746094 234.761719 198.957031 234.101562 200.097656 C 233.441406 201.242188 232.644531 202.277344 231.710938 203.210938 C 230.773438 204.144531 229.734375 204.941406 228.59375 205.601562 L 175.980469 235.929688 C 175.414062 236.257812 174.824219 236.546875 174.21875 236.800781 C 173.609375 237.050781 172.988281 237.261719 172.355469 237.429688 C 171.71875 237.601562 171.078125 237.726562 170.425781 237.8125 C 169.773438 237.898438 169.117188 237.941406 168.460938 237.941406 C 167.804688 237.941406 167.152344 237.898438 166.5 237.8125 C 165.847656 237.726562 165.203125 237.597656 164.570312 237.429688 C 163.933594 237.257812 163.316406 237.046875 162.707031 236.796875 C 162.101562 236.542969 161.511719 236.253906 160.945312 235.925781 C 160.375 235.597656 159.828125 235.234375 159.308594 234.835938 C 158.785156 234.433594 158.292969 234.003906 157.828125 233.539062 C 157.363281 233.074219 156.933594 232.582031 156.53125 232.0625 C 156.132812 231.539062 155.769531 230.996094 155.4375 230.425781 C 155.109375 229.859375 154.820312 229.269531 154.570312 228.664062 C 154.316406 228.058594 154.105469 227.4375 153.9375 226.804688 C 153.765625 226.167969 153.636719 225.527344 153.550781 224.875 C 153.464844 224.226562 153.421875 223.570312 153.421875 222.914062 L 153.421875 162.238281 C 153.421875 161.582031 153.464844 160.929688 153.550781 160.277344 C 153.636719 159.625 153.765625 158.984375 153.9375 158.351562 C 154.105469 157.714844 154.316406 157.09375 154.570312 156.488281 C 154.820312 155.882812 155.109375 155.292969 155.4375 154.726562 C 155.769531 154.15625 156.132812 153.613281 156.53125 153.09375 C 156.933594 152.570312 157.363281 152.078125 157.828125 151.613281 C 158.292969 151.148438 158.785156 150.71875 159.308594 150.320312 C 159.828125 149.917969 160.375 149.554688 160.945312 149.226562 C 161.511719 148.898438 162.101562 148.609375 162.707031 148.355469 C 163.316406 148.105469 163.933594 147.894531 164.570312 147.726562 C 165.203125 147.554688 165.847656 147.425781 166.5 147.339844 C 167.152344 147.253906 167.804688 147.210938 168.460938 147.210938 C 169.117188 147.210938 169.773438 147.253906 170.425781 147.339844 C 171.078125 147.425781 171.71875 147.554688 172.355469 147.722656 C 172.988281 147.890625 173.609375 148.101562 174.21875 148.351562 C 174.824219 148.605469 175.414062 148.894531 175.980469 149.222656 Z M 228.59375 179.5625 " fill-opacity="1" fill-rule="nonzero"/></g></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LearningSuite.node';
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./LearningSuite.node"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bundle_getBundles = bundle_getBundles;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
async function bundle_getBundles() {
|
|
6
|
+
return common_1.fetchOptions.call(this, '/bundles', undefined, ['name', 'title'], ['id', 'sid', 'slug']);
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions, IDataObject, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export type Option = INodePropertyOptions;
|
|
3
|
+
type LoadOptionRow = IDataObject;
|
|
4
|
+
export declare function toOptions(rows: LoadOptionRow[], labelKeys?: string[], valueKeys?: string[]): INodePropertyOptions[];
|
|
5
|
+
export declare function ensureArray<T>(res: T | T[]): T[];
|
|
6
|
+
export declare function fetchOptions(this: ILoadOptionsFunctions, endpoint: string, qs?: IDataObject, labelKeys?: string[], valueKeys?: string[]): Promise<INodePropertyOptions[]>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toOptions = toOptions;
|
|
4
|
+
exports.ensureArray = ensureArray;
|
|
5
|
+
exports.fetchOptions = fetchOptions;
|
|
6
|
+
const shared_1 = require("../../shared");
|
|
7
|
+
function toOptions(rows, labelKeys = ['name', 'title', 'email'], valueKeys = ['id', 'sid', 'slug']) {
|
|
8
|
+
return rows.map((r) => {
|
|
9
|
+
var _a, _b, _c, _d, _e;
|
|
10
|
+
const label = (_d = (_c = (_b = (_a = labelKeys.map((k) => r === null || r === void 0 ? void 0 : r[k]).find((v) => v)) !== null && _a !== void 0 ? _a : r === null || r === void 0 ? void 0 : r.id) !== null && _b !== void 0 ? _b : r === null || r === void 0 ? void 0 : r.sid) !== null && _c !== void 0 ? _c : r === null || r === void 0 ? void 0 : r.slug) !== null && _d !== void 0 ? _d : 'Unknown';
|
|
11
|
+
const value = (_e = valueKeys.map((k) => r === null || r === void 0 ? void 0 : r[k]).find((v) => v)) !== null && _e !== void 0 ? _e : label;
|
|
12
|
+
return { name: String(label), value: String(value) };
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function ensureArray(res) {
|
|
16
|
+
return Array.isArray(res) ? res : [res];
|
|
17
|
+
}
|
|
18
|
+
async function fetchOptions(endpoint, qs, labelKeys, valueKeys) {
|
|
19
|
+
const res = await shared_1.lsRequest.call(this, 'GET', endpoint, { qs });
|
|
20
|
+
const rows = ensureArray(res);
|
|
21
|
+
return toOptions(rows, labelKeys, valueKeys);
|
|
22
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export declare function community_getAreas(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
3
|
+
export declare function community_getForums(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
4
|
+
export declare function community_getBadges(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
5
|
+
export declare function community_getLatestPosts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.community_getAreas = community_getAreas;
|
|
4
|
+
exports.community_getForums = community_getForums;
|
|
5
|
+
exports.community_getBadges = community_getBadges;
|
|
6
|
+
exports.community_getLatestPosts = community_getLatestPosts;
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const shared_1 = require("../../shared");
|
|
9
|
+
async function community_getAreas() {
|
|
10
|
+
return common_1.fetchOptions.call(this, '/community/areas', undefined, ['name', 'title'], ['id', 'sid']);
|
|
11
|
+
}
|
|
12
|
+
async function community_getForums() {
|
|
13
|
+
let qs = undefined;
|
|
14
|
+
try {
|
|
15
|
+
const areaId = this.getNodeParameter('areaId', 0);
|
|
16
|
+
if (areaId)
|
|
17
|
+
qs = { areaId };
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
// Some loadOptions contexts do not expose the optional areaId parameter.
|
|
21
|
+
}
|
|
22
|
+
return common_1.fetchOptions.call(this, '/community/forums', qs, ['name', 'title'], ['id', 'sid']);
|
|
23
|
+
}
|
|
24
|
+
async function community_getBadges() {
|
|
25
|
+
var _a, _b, _c;
|
|
26
|
+
const qs = {
|
|
27
|
+
limit: 100,
|
|
28
|
+
offset: 0,
|
|
29
|
+
};
|
|
30
|
+
try {
|
|
31
|
+
const badgeGroupId = this.getNodeParameter('badgeGroupId', 0);
|
|
32
|
+
if (badgeGroupId) {
|
|
33
|
+
qs.badgeGroupId = badgeGroupId;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
// badgeGroupId is optional and may be unavailable outside the current UI scope.
|
|
38
|
+
}
|
|
39
|
+
const res = await shared_1.lsRequest.call(this, 'GET', '/community/badges', { qs });
|
|
40
|
+
const rows = Array.isArray(res)
|
|
41
|
+
? res
|
|
42
|
+
: typeof res === 'object' && res !== null && Array.isArray(res.items)
|
|
43
|
+
? res.items
|
|
44
|
+
: res
|
|
45
|
+
? [res]
|
|
46
|
+
: [];
|
|
47
|
+
const options = [];
|
|
48
|
+
for (const r of rows) {
|
|
49
|
+
if (!r)
|
|
50
|
+
continue;
|
|
51
|
+
const id = ((_a = r.id) !== null && _a !== void 0 ? _a : r.sid);
|
|
52
|
+
if (!id)
|
|
53
|
+
continue;
|
|
54
|
+
const label = ((_c = (_b = r.name) !== null && _b !== void 0 ? _b : r.title) !== null && _c !== void 0 ? _c : '').toString().trim();
|
|
55
|
+
if (!label)
|
|
56
|
+
continue;
|
|
57
|
+
options.push({
|
|
58
|
+
name: label,
|
|
59
|
+
value: id,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return options;
|
|
63
|
+
}
|
|
64
|
+
async function community_getLatestPosts() {
|
|
65
|
+
const qs = { order: 'latest', limit: 100, offset: 0 };
|
|
66
|
+
const res = await shared_1.lsRequest.call(this, 'GET', '/community/posts', { qs });
|
|
67
|
+
const rows = (Array.isArray(res) ? res : res ? [res] : []);
|
|
68
|
+
const options = [];
|
|
69
|
+
for (const r of rows) {
|
|
70
|
+
const id = typeof r.id === 'string' ? r.id : typeof r.id === 'number' ? String(r.id) : undefined;
|
|
71
|
+
if (!id)
|
|
72
|
+
continue;
|
|
73
|
+
const bodyText = typeof r.bodyText === 'string' ? r.bodyText.trim() : '';
|
|
74
|
+
const authorObj = typeof r.author === 'object' && r.author !== null ? r.author : undefined;
|
|
75
|
+
const author = typeof (authorObj === null || authorObj === void 0 ? void 0 : authorObj.fullName) === 'string' ? authorObj.fullName.trim() : '';
|
|
76
|
+
const name = author ? `${bodyText} - ${author}` : bodyText;
|
|
77
|
+
options.push({ name, value: id });
|
|
78
|
+
}
|
|
79
|
+
return options;
|
|
80
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
|
2
|
+
export declare function course_getCourses(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
3
|
+
export declare function course_getModules(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
4
|
+
export declare function course_getSectionsInCourse(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
5
|
+
export declare function course_getLessonsInCourse(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.course_getCourses = course_getCourses;
|
|
4
|
+
exports.course_getModules = course_getModules;
|
|
5
|
+
exports.course_getSectionsInCourse = course_getSectionsInCourse;
|
|
6
|
+
exports.course_getLessonsInCourse = course_getLessonsInCourse;
|
|
7
|
+
const common_1 = require("./common");
|
|
8
|
+
const shared_1 = require("../../shared");
|
|
9
|
+
const getScopedParam_1 = require("../../shared/getScopedParam");
|
|
10
|
+
async function course_getCourses() {
|
|
11
|
+
return common_1.fetchOptions.call(this, '/courses/published', undefined, ['name', 'title'], ['id', 'sid']);
|
|
12
|
+
}
|
|
13
|
+
async function course_getModules() {
|
|
14
|
+
const courseId = getScopedParam_1.getScopedParam.call(this, 'courseId');
|
|
15
|
+
if (!courseId)
|
|
16
|
+
return [];
|
|
17
|
+
return common_1.fetchOptions.call(this, `/courses/${courseId}/modules`, undefined, ['title', 'name'], ['id', 'sid']);
|
|
18
|
+
}
|
|
19
|
+
async function course_getSectionsInCourse() {
|
|
20
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
21
|
+
const courseId = getScopedParam_1.getScopedParam.call(this, 'courseId');
|
|
22
|
+
if (!courseId)
|
|
23
|
+
return [];
|
|
24
|
+
const modules = (0, common_1.ensureArray)(await shared_1.lsRequest.call(this, 'GET', `/courses/${courseId}/modules`));
|
|
25
|
+
const allSections = [];
|
|
26
|
+
for (const m of modules) {
|
|
27
|
+
if (!(m === null || m === void 0 ? void 0 : m.id))
|
|
28
|
+
continue;
|
|
29
|
+
const sections = (0, common_1.ensureArray)(await shared_1.lsRequest.call(this, 'GET', `/modules/${m.id}/sections`));
|
|
30
|
+
for (const s of sections) {
|
|
31
|
+
allSections.push({
|
|
32
|
+
name: `${(_b = (_a = m.title) !== null && _a !== void 0 ? _a : m.name) !== null && _b !== void 0 ? _b : m.id} — ${(_d = (_c = s.title) !== null && _c !== void 0 ? _c : s.name) !== null && _d !== void 0 ? _d : s.id}`,
|
|
33
|
+
value: String((_g = (_f = (_e = s.id) !== null && _e !== void 0 ? _e : s.sid) !== null && _f !== void 0 ? _f : s.slug) !== null && _g !== void 0 ? _g : s.title),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return allSections;
|
|
38
|
+
}
|
|
39
|
+
async function course_getLessonsInCourse() {
|
|
40
|
+
var _a, _b, _c, _d, _e;
|
|
41
|
+
const courseId = getScopedParam_1.getScopedParam.call(this, 'courseId');
|
|
42
|
+
if (!courseId)
|
|
43
|
+
return [];
|
|
44
|
+
const modules = (0, common_1.ensureArray)(await shared_1.lsRequest.call(this, 'GET', `/courses/${courseId}/modules`));
|
|
45
|
+
const allLessons = [];
|
|
46
|
+
for (const m of modules) {
|
|
47
|
+
if (!(m === null || m === void 0 ? void 0 : m.id))
|
|
48
|
+
continue;
|
|
49
|
+
const lessons = (0, common_1.ensureArray)(await shared_1.lsRequest.call(this, 'GET', `/modules/${m.id}/lessons`));
|
|
50
|
+
for (const l of lessons) {
|
|
51
|
+
allLessons.push({
|
|
52
|
+
name: `${(_b = (_a = l.title) !== null && _a !== void 0 ? _a : l.name) !== null && _b !== void 0 ? _b : l.id}`,
|
|
53
|
+
value: String((_e = (_d = (_c = l.id) !== null && _c !== void 0 ? _c : l.sid) !== null && _d !== void 0 ? _d : l.slug) !== null && _e !== void 0 ? _e : l.title),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return allLessons;
|
|
58
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ILoadOptionsFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare function customFields_getCards(this: ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
3
|
+
export declare function customFields_getDefinitions(this: ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
4
|
+
export declare function customFields_getCategories(this: ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
5
|
+
export declare function customFields_getFieldType(this: ILoadOptionsFunctions): Promise<{
|
|
6
|
+
name: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}[]>;
|
|
9
|
+
export declare function customFields_getFieldOptions(this: ILoadOptionsFunctions): Promise<{
|
|
10
|
+
name: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[]>;
|