@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,401 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// webhook.sampleData.properties.ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.webhookSampleDataProperties = void 0;
|
|
5
|
+
exports.webhookSampleDataProperties = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Progress Changed Options',
|
|
8
|
+
name: 'additionalProgressChangedSample',
|
|
9
|
+
type: 'collection',
|
|
10
|
+
default: {},
|
|
11
|
+
placeholder: 'Add option',
|
|
12
|
+
displayOptions: { show: { sampleDataType: ['progress-changed-events'] } },
|
|
13
|
+
options: [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'User Name or ID',
|
|
16
|
+
name: 'userId',
|
|
17
|
+
type: 'options',
|
|
18
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
19
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
20
|
+
default: '',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
displayName: 'Course Name or ID',
|
|
24
|
+
name: 'courseId',
|
|
25
|
+
type: 'options',
|
|
26
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
27
|
+
typeOptions: { loadOptionsMethod: 'course_getCourses' },
|
|
28
|
+
default: '',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Lesson Completed Options',
|
|
34
|
+
name: 'additionalLessonCompletedSample',
|
|
35
|
+
type: 'collection',
|
|
36
|
+
default: {},
|
|
37
|
+
placeholder: 'Add option',
|
|
38
|
+
displayOptions: { show: { sampleDataType: ['lesson-completed-events'] } },
|
|
39
|
+
options: [
|
|
40
|
+
{
|
|
41
|
+
displayName: 'User Name or ID',
|
|
42
|
+
name: 'userId',
|
|
43
|
+
type: 'options',
|
|
44
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
45
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
46
|
+
default: '',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Course Name or ID',
|
|
50
|
+
name: 'courseId',
|
|
51
|
+
type: 'options',
|
|
52
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
53
|
+
typeOptions: { loadOptionsMethod: 'course_getCourses' },
|
|
54
|
+
default: '',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Module Name or ID',
|
|
58
|
+
name: 'moduleId',
|
|
59
|
+
type: 'options',
|
|
60
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
61
|
+
typeOptions: {
|
|
62
|
+
loadOptionsMethod: 'course_getModules',
|
|
63
|
+
loadOptionsDependsOn: ['additionalLessonCompletedSample.courseId'],
|
|
64
|
+
},
|
|
65
|
+
default: '',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
displayName: 'Lesson Name or ID',
|
|
69
|
+
name: 'lessonId',
|
|
70
|
+
type: 'options',
|
|
71
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
72
|
+
typeOptions: {
|
|
73
|
+
loadOptionsMethod: 'module_getLessons',
|
|
74
|
+
loadOptionsDependsOn: ['additionalLessonCompletedSample.moduleId'],
|
|
75
|
+
},
|
|
76
|
+
default: '',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
displayName: 'New Login Options',
|
|
82
|
+
name: 'additionalNewLoginSample',
|
|
83
|
+
type: 'collection',
|
|
84
|
+
default: {},
|
|
85
|
+
placeholder: 'Add option',
|
|
86
|
+
displayOptions: { show: { sampleDataType: ['new-login-events'] } },
|
|
87
|
+
options: [
|
|
88
|
+
{
|
|
89
|
+
displayName: 'User Name or ID',
|
|
90
|
+
name: 'userId',
|
|
91
|
+
type: 'options',
|
|
92
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
93
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
94
|
+
default: '',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
displayName: 'Login Type',
|
|
98
|
+
name: 'loginType',
|
|
99
|
+
type: 'options',
|
|
100
|
+
default: 'email-password',
|
|
101
|
+
options: [
|
|
102
|
+
{ name: 'Auto Login', value: 'auto-login' },
|
|
103
|
+
{ name: 'Email & Password', value: 'email-password' },
|
|
104
|
+
{ name: 'Google', value: 'google' },
|
|
105
|
+
{ name: 'Impersonated by Admin', value: 'impersonated-by-admin' },
|
|
106
|
+
{ name: 'Impersonation (as Member)', value: 'impersonation' },
|
|
107
|
+
{ name: 'Magic Link', value: 'magic-link' },
|
|
108
|
+
{ name: 'OIDC', value: 'oidc' },
|
|
109
|
+
{ name: 'Password Reset', value: 'password-reset' },
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Exam Completed Options',
|
|
116
|
+
name: 'additionalExamCompletedSample',
|
|
117
|
+
type: 'collection',
|
|
118
|
+
default: {},
|
|
119
|
+
placeholder: 'Add option',
|
|
120
|
+
displayOptions: { show: { sampleDataType: ['exam-completed-events'] } },
|
|
121
|
+
options: [
|
|
122
|
+
{
|
|
123
|
+
displayName: 'User Name or ID',
|
|
124
|
+
name: 'userId',
|
|
125
|
+
type: 'options',
|
|
126
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
127
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
128
|
+
default: '',
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
displayName: 'Exam Graded Options',
|
|
134
|
+
name: 'additionalExamGradedSample',
|
|
135
|
+
type: 'collection',
|
|
136
|
+
default: {},
|
|
137
|
+
placeholder: 'Add option',
|
|
138
|
+
displayOptions: { show: { sampleDataType: ['exam-graded-events'] } },
|
|
139
|
+
options: [
|
|
140
|
+
{
|
|
141
|
+
displayName: 'User Name or ID',
|
|
142
|
+
name: 'userId',
|
|
143
|
+
type: 'options',
|
|
144
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
145
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
146
|
+
default: '',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
displayName: 'Custom Popup Interaction Options',
|
|
152
|
+
name: 'additionalCustomPopupInteractionSample',
|
|
153
|
+
type: 'collection',
|
|
154
|
+
default: {},
|
|
155
|
+
placeholder: 'Add option',
|
|
156
|
+
displayOptions: { show: { sampleDataType: ['custom-popup-interaction-events'] } },
|
|
157
|
+
options: [
|
|
158
|
+
{
|
|
159
|
+
displayName: 'Popup Name or ID',
|
|
160
|
+
name: 'customPopupId',
|
|
161
|
+
type: 'options',
|
|
162
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
163
|
+
typeOptions: { loadOptionsMethod: 'popup_getPopups' },
|
|
164
|
+
default: '',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
displayName: 'User Name or ID',
|
|
168
|
+
name: 'userId',
|
|
169
|
+
type: 'options',
|
|
170
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
171
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
172
|
+
default: '',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
displayName: 'Interaction Type',
|
|
176
|
+
name: 'interactionType',
|
|
177
|
+
type: 'options',
|
|
178
|
+
default: 'dismissed',
|
|
179
|
+
options: [
|
|
180
|
+
{ name: 'Dismissed', value: 'dismissed' },
|
|
181
|
+
{ name: 'Actioned', value: 'actioned' },
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
displayName: 'Community Post Created Options',
|
|
188
|
+
name: 'additionalCommunityPostCreatedSample',
|
|
189
|
+
type: 'collection',
|
|
190
|
+
default: {},
|
|
191
|
+
placeholder: 'Add option',
|
|
192
|
+
displayOptions: { show: { sampleDataType: ['community-post-created-events'] } },
|
|
193
|
+
options: [
|
|
194
|
+
{
|
|
195
|
+
displayName: 'User Name or ID',
|
|
196
|
+
name: 'userId',
|
|
197
|
+
type: 'options',
|
|
198
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
199
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
200
|
+
default: '',
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
displayName: 'Area Name or ID',
|
|
204
|
+
name: 'areaId',
|
|
205
|
+
type: 'options',
|
|
206
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
207
|
+
typeOptions: { loadOptionsMethod: 'community_getAreas' },
|
|
208
|
+
default: '',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
displayName: 'Forum Name or ID',
|
|
212
|
+
name: 'forumId',
|
|
213
|
+
type: 'options',
|
|
214
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
215
|
+
typeOptions: {
|
|
216
|
+
loadOptionsMethod: 'community_getForums',
|
|
217
|
+
loadOptionsDependsOn: ['additionalCommunityPostCreatedSample.areaId'],
|
|
218
|
+
},
|
|
219
|
+
default: '',
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
displayName: 'Community Post Moderated Options',
|
|
225
|
+
name: 'additionalCommunityPostModeratedSample',
|
|
226
|
+
type: 'collection',
|
|
227
|
+
default: {},
|
|
228
|
+
placeholder: 'Add option',
|
|
229
|
+
displayOptions: { show: { sampleDataType: ['community-post-moderated-events'] } },
|
|
230
|
+
options: [
|
|
231
|
+
{
|
|
232
|
+
displayName: 'User Name or ID',
|
|
233
|
+
name: 'userId',
|
|
234
|
+
type: 'options',
|
|
235
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
236
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
237
|
+
default: '',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
displayName: 'Area Name or ID',
|
|
241
|
+
name: 'areaId',
|
|
242
|
+
type: 'options',
|
|
243
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
244
|
+
typeOptions: { loadOptionsMethod: 'community_getAreas' },
|
|
245
|
+
default: '',
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
displayName: 'Forum Name or ID',
|
|
249
|
+
name: 'forumId',
|
|
250
|
+
type: 'options',
|
|
251
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
252
|
+
typeOptions: {
|
|
253
|
+
loadOptionsMethod: 'community_getForums',
|
|
254
|
+
loadOptionsDependsOn: ['additionalCommunityPostModeratedSample.areaId'],
|
|
255
|
+
},
|
|
256
|
+
default: '',
|
|
257
|
+
},
|
|
258
|
+
],
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
displayName: 'Community Post Commented Options',
|
|
262
|
+
name: 'additionalCommunityPostCommentedSample',
|
|
263
|
+
type: 'collection',
|
|
264
|
+
default: {},
|
|
265
|
+
placeholder: 'Add option',
|
|
266
|
+
displayOptions: { show: { sampleDataType: ['community-post-commented-events'] } },
|
|
267
|
+
options: [
|
|
268
|
+
{
|
|
269
|
+
displayName: 'User Name or ID',
|
|
270
|
+
name: 'userId',
|
|
271
|
+
type: 'options',
|
|
272
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
273
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
274
|
+
default: '',
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
displayName: 'Post ID',
|
|
278
|
+
name: 'postId',
|
|
279
|
+
type: 'string',
|
|
280
|
+
default: '',
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
displayName: 'Group User Access Changed Options',
|
|
286
|
+
name: 'additionalGroupUserAccessChangedSample',
|
|
287
|
+
type: 'collection',
|
|
288
|
+
default: {},
|
|
289
|
+
placeholder: 'Add option',
|
|
290
|
+
displayOptions: { show: { sampleDataType: ['group-user-access-changed-events'] } },
|
|
291
|
+
options: [
|
|
292
|
+
{
|
|
293
|
+
displayName: 'Group Name or ID',
|
|
294
|
+
name: 'groupId',
|
|
295
|
+
type: 'options',
|
|
296
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
297
|
+
typeOptions: { loadOptionsMethod: 'group_getGroups' },
|
|
298
|
+
default: '',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
displayName: 'User Name or ID',
|
|
302
|
+
name: 'userId',
|
|
303
|
+
type: 'options',
|
|
304
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
305
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
306
|
+
default: '',
|
|
307
|
+
},
|
|
308
|
+
],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
displayName: 'Course Updated Options',
|
|
312
|
+
name: 'additionalCourseUpdatedSample',
|
|
313
|
+
type: 'collection',
|
|
314
|
+
default: {},
|
|
315
|
+
placeholder: 'Add option',
|
|
316
|
+
displayOptions: { show: { sampleDataType: ['course-updated-events'] } },
|
|
317
|
+
options: [
|
|
318
|
+
{
|
|
319
|
+
displayName: 'Course Name or ID',
|
|
320
|
+
name: 'courseInstanceId',
|
|
321
|
+
type: 'options',
|
|
322
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
323
|
+
typeOptions: { loadOptionsMethod: 'course_getCourses' },
|
|
324
|
+
default: '',
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
displayName: 'Course Member Added Options',
|
|
330
|
+
name: 'additionalCourseMemberAddedSample',
|
|
331
|
+
type: 'collection',
|
|
332
|
+
default: {},
|
|
333
|
+
placeholder: 'Add option',
|
|
334
|
+
displayOptions: { show: { sampleDataType: ['course-member-added-events'] } },
|
|
335
|
+
options: [
|
|
336
|
+
{
|
|
337
|
+
displayName: 'Course Name or ID',
|
|
338
|
+
name: 'courseInstanceId',
|
|
339
|
+
type: 'options',
|
|
340
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
341
|
+
typeOptions: { loadOptionsMethod: 'course_getCourses' },
|
|
342
|
+
default: '',
|
|
343
|
+
},
|
|
344
|
+
],
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
displayName: 'User Activation Status Changed Options',
|
|
348
|
+
name: 'additionalUserActivationStatusChangedSample',
|
|
349
|
+
type: 'collection',
|
|
350
|
+
default: {},
|
|
351
|
+
placeholder: 'Add option',
|
|
352
|
+
displayOptions: { show: { sampleDataType: ['user-activation-status-changed-events'] } },
|
|
353
|
+
options: [
|
|
354
|
+
{
|
|
355
|
+
displayName: 'User Name or ID',
|
|
356
|
+
name: 'userId',
|
|
357
|
+
type: 'options',
|
|
358
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
359
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
360
|
+
default: '',
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
displayName: 'Action',
|
|
364
|
+
name: 'action',
|
|
365
|
+
type: 'options',
|
|
366
|
+
default: 'activated',
|
|
367
|
+
description: 'The activation status action to use for sample data',
|
|
368
|
+
options: [
|
|
369
|
+
{ name: 'Activated', value: 'activated' },
|
|
370
|
+
{ name: 'Deactivated', value: 'deactivated' },
|
|
371
|
+
],
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
displayName: 'Custom Field Value Changed Options',
|
|
377
|
+
name: 'additionalCustomFieldValueChangedSample',
|
|
378
|
+
type: 'collection',
|
|
379
|
+
default: {},
|
|
380
|
+
placeholder: 'Add option',
|
|
381
|
+
displayOptions: { show: { sampleDataType: ['custom-field-value-changed'] } },
|
|
382
|
+
options: [
|
|
383
|
+
{
|
|
384
|
+
displayName: 'Custom Field Card Name or ID',
|
|
385
|
+
name: 'customFieldCardId',
|
|
386
|
+
type: 'options',
|
|
387
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
388
|
+
typeOptions: { loadOptionsMethod: 'customFields_getCards' },
|
|
389
|
+
default: '',
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
displayName: 'User Name or ID',
|
|
393
|
+
name: 'userId',
|
|
394
|
+
type: 'options',
|
|
395
|
+
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
|
|
396
|
+
typeOptions: { loadOptionsMethod: 'member_getMembers' },
|
|
397
|
+
default: '',
|
|
398
|
+
},
|
|
399
|
+
],
|
|
400
|
+
},
|
|
401
|
+
];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
/** Einheitlicher Funktions-Typ für alle Execute-Handler. */
|
|
3
|
+
export type ExecuteHandler = (ctx: IExecuteFunctions, itemIndex: number) => Promise<IDataObject | IDataObject[]>;
|
|
4
|
+
/** Registry-Typ: resource -> operation -> handler */
|
|
5
|
+
export type HandlersRegistry = Record<string, Record<string, ExecuteHandler>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aiHandlers = void 0;
|
|
4
|
+
const shared_1 = require("../shared");
|
|
5
|
+
const ragChat = async (ctx, i) => {
|
|
6
|
+
const body = {
|
|
7
|
+
question: ctx.getNodeParameter('question', i),
|
|
8
|
+
userId: ctx.getNodeParameter('userId', i, undefined),
|
|
9
|
+
conversationId: ctx.getNodeParameter('conversationId', i, undefined),
|
|
10
|
+
addCitations: ctx.getNodeParameter('addCitations', i, false),
|
|
11
|
+
systemPromptAddition: ctx.getNodeParameter('systemPromptAddition', i, undefined),
|
|
12
|
+
answerLength: ctx.getNodeParameter('answerLength', i, 'standard'),
|
|
13
|
+
tone: ctx.getNodeParameter('tone', i, 'neutral'),
|
|
14
|
+
format: ctx.getNodeParameter('format', i, 'markdown'),
|
|
15
|
+
unlockContentDrip: ctx.getNodeParameter('unlockContentDrip', i, false),
|
|
16
|
+
};
|
|
17
|
+
// Remove keys with undefined or empty string values so optional params are not sent as empty
|
|
18
|
+
const cleanBody = Object.fromEntries(Object.entries(body).filter(([, v]) => v !== undefined && v !== ''));
|
|
19
|
+
return await shared_1.lsRequest.call(ctx, 'POST', '/ai/rag-chat', { body: cleanBody });
|
|
20
|
+
};
|
|
21
|
+
exports.aiHandlers = {
|
|
22
|
+
ragChat,
|
|
23
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.apiCallHandlers = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const shared_1 = require("../shared");
|
|
6
|
+
function isQueryValue(value) {
|
|
7
|
+
return (typeof value === 'string' ||
|
|
8
|
+
typeof value === 'number' ||
|
|
9
|
+
typeof value === 'boolean' ||
|
|
10
|
+
Array.isArray(value) ||
|
|
11
|
+
(typeof value === 'object' && value !== null));
|
|
12
|
+
}
|
|
13
|
+
const makeRequest = async (ctx, i) => {
|
|
14
|
+
const httpMethod = ctx.getNodeParameter('httpMethod', i);
|
|
15
|
+
const endpoint = ctx.getNodeParameter('endpoint', i);
|
|
16
|
+
const queryParameters = ctx.getNodeParameter('queryParameters', i, {});
|
|
17
|
+
let qs;
|
|
18
|
+
const arr = queryParameters.parameter;
|
|
19
|
+
if (Array.isArray(arr)) {
|
|
20
|
+
qs = {};
|
|
21
|
+
for (const p of arr) {
|
|
22
|
+
if ((p === null || p === void 0 ? void 0 : p.name) && isQueryValue(p.value)) {
|
|
23
|
+
qs[p.name] = p.value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (qs && Object.keys(qs).length === 0)
|
|
27
|
+
qs = undefined;
|
|
28
|
+
}
|
|
29
|
+
let body;
|
|
30
|
+
if (['POST', 'PUT', 'PATCH'].includes(httpMethod)) {
|
|
31
|
+
const requestBody = ctx.getNodeParameter('requestBody', i, '{}');
|
|
32
|
+
let parsed;
|
|
33
|
+
try {
|
|
34
|
+
parsed = JSON.parse(requestBody);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), `Invalid JSON in request body: ${String(err)}`);
|
|
38
|
+
}
|
|
39
|
+
if (parsed && typeof parsed === 'object')
|
|
40
|
+
body = parsed;
|
|
41
|
+
else
|
|
42
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Request body must be a JSON object');
|
|
43
|
+
}
|
|
44
|
+
return await shared_1.lsRequest.call(ctx, httpMethod, endpoint, { qs, body });
|
|
45
|
+
};
|
|
46
|
+
exports.apiCallHandlers = { makeRequest };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bundleHandlers = void 0;
|
|
4
|
+
const shared_1 = require("../shared");
|
|
5
|
+
const getAll = async function (ctx) {
|
|
6
|
+
return await shared_1.lsRequest.call(ctx, 'GET', '/bundles');
|
|
7
|
+
};
|
|
8
|
+
const getMembers = async (ctx, i) => {
|
|
9
|
+
const bundleId = ctx.getNodeParameter('bundleId', i);
|
|
10
|
+
return await shared_1.lsRequest.call(ctx, 'GET', `/bundle/${bundleId}/members`);
|
|
11
|
+
};
|
|
12
|
+
exports.bundleHandlers = { getAll, getMembers };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExecuteHandler } from '../exec.types';
|
|
2
|
+
export declare const commentOnPost: ExecuteHandler;
|
|
3
|
+
export declare const communityHandlers: {
|
|
4
|
+
getAreas: ExecuteHandler;
|
|
5
|
+
getForums: ExecuteHandler;
|
|
6
|
+
getBadges: ExecuteHandler;
|
|
7
|
+
assignBadgesToUser: ExecuteHandler;
|
|
8
|
+
removeBadgesFromUser: ExecuteHandler;
|
|
9
|
+
commentOnPost: ExecuteHandler;
|
|
10
|
+
getCommunityPosts: ExecuteHandler;
|
|
11
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.communityHandlers = exports.commentOnPost = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const shared_1 = require("../shared");
|
|
6
|
+
const getAreas = async (ctx, i) => {
|
|
7
|
+
const limit = ctx.getNodeParameter('limit', i, 50);
|
|
8
|
+
const offset = ctx.getNodeParameter('offset', i, 0);
|
|
9
|
+
return await shared_1.lsRequest.call(ctx, 'GET', '/community/areas', { qs: { limit, offset } });
|
|
10
|
+
};
|
|
11
|
+
const getForums = async (ctx, i) => {
|
|
12
|
+
const limit = ctx.getNodeParameter('limit', i, 50);
|
|
13
|
+
const offset = ctx.getNodeParameter('offset', i, 0);
|
|
14
|
+
const areaId = ctx.getNodeParameter('areaId', i, '');
|
|
15
|
+
const qs = { limit, offset };
|
|
16
|
+
if (areaId)
|
|
17
|
+
qs.areaId = areaId;
|
|
18
|
+
return await shared_1.lsRequest.call(ctx, 'GET', '/community/forums', { qs });
|
|
19
|
+
};
|
|
20
|
+
const getCommunityPosts = async (ctx, i) => {
|
|
21
|
+
const limit = ctx.getNodeParameter('limit', i, 15);
|
|
22
|
+
const offset = ctx.getNodeParameter('offset', i, 0);
|
|
23
|
+
const areaId = ctx.getNodeParameter('areaId', i, '');
|
|
24
|
+
const forumId = ctx.getNodeParameter('forumId', i, '');
|
|
25
|
+
const order = ctx.getNodeParameter('order', i, 'latest');
|
|
26
|
+
const qs = { limit, offset, order };
|
|
27
|
+
if (areaId)
|
|
28
|
+
qs.areaId = areaId;
|
|
29
|
+
if (forumId)
|
|
30
|
+
qs.forumId = forumId;
|
|
31
|
+
return await shared_1.lsRequest.call(ctx, 'GET', '/community/posts', { qs });
|
|
32
|
+
};
|
|
33
|
+
const getBadges = async (ctx, i) => {
|
|
34
|
+
const limit = ctx.getNodeParameter('limit', i, 15);
|
|
35
|
+
const offset = ctx.getNodeParameter('offset', i, 0);
|
|
36
|
+
const badgeGroupId = ctx.getNodeParameter('badgeGroupId', i, '');
|
|
37
|
+
const qs = { limit, offset };
|
|
38
|
+
if (badgeGroupId)
|
|
39
|
+
qs.badgeGroupId = badgeGroupId;
|
|
40
|
+
return await shared_1.lsRequest.call(ctx, 'GET', '/community/badges', { qs });
|
|
41
|
+
};
|
|
42
|
+
const assignBadgesToUser = async (ctx, i) => {
|
|
43
|
+
const memberId = ctx.getNodeParameter('memberId', i);
|
|
44
|
+
const badgeIds = (0, shared_1.toIdArray)(ctx.getNodeParameter('badgeIds', i));
|
|
45
|
+
if (!badgeIds.length) {
|
|
46
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Please select at least one badge.');
|
|
47
|
+
}
|
|
48
|
+
const body = { userId: memberId, badgeIds };
|
|
49
|
+
return await shared_1.lsRequest.call(ctx, 'PUT', '/community/badges/user', { body });
|
|
50
|
+
};
|
|
51
|
+
const removeBadgesFromUser = async (ctx, i) => {
|
|
52
|
+
const memberId = ctx.getNodeParameter('memberId', i);
|
|
53
|
+
const badgeIds = (0, shared_1.toIdArray)(ctx.getNodeParameter('badgeIds', i));
|
|
54
|
+
if (!badgeIds.length) {
|
|
55
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Please select at least one badge.');
|
|
56
|
+
}
|
|
57
|
+
const body = { userId: memberId, badgeIds };
|
|
58
|
+
return await shared_1.lsRequest.call(ctx, 'DELETE', '/community/badges/user', { body });
|
|
59
|
+
};
|
|
60
|
+
const commentOnPost = async (ctx, i) => {
|
|
61
|
+
const postId = String(ctx.getNodeParameter('postId', i, '') || '').trim();
|
|
62
|
+
const authorUserId = String(ctx.getNodeParameter('authorUserId', i, '') || '').trim();
|
|
63
|
+
const commentText = String(ctx.getNodeParameter('commentText', i, '') || '').trim();
|
|
64
|
+
const answerToCommentId = String(ctx.getNodeParameter('answerToCommentId', i, '') || '').trim();
|
|
65
|
+
const enableWebhookTriggering = ctx.getNodeParameter('enableWebhookTriggering', i, false);
|
|
66
|
+
if (!postId) {
|
|
67
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Please provide a post ID.');
|
|
68
|
+
}
|
|
69
|
+
if (!authorUserId) {
|
|
70
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'Please provide authorUserId (must be an admin user).');
|
|
71
|
+
}
|
|
72
|
+
if (!commentText) {
|
|
73
|
+
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'The comment text cannot be empty (plain text only).');
|
|
74
|
+
}
|
|
75
|
+
const body = {
|
|
76
|
+
authorUserId,
|
|
77
|
+
commentText,
|
|
78
|
+
enableWebhookTriggering,
|
|
79
|
+
};
|
|
80
|
+
if (answerToCommentId) {
|
|
81
|
+
body.answerToCommentId = answerToCommentId;
|
|
82
|
+
}
|
|
83
|
+
return shared_1.lsRequest.call(ctx, 'POST', `/community/posts/${postId}/comments`, { body });
|
|
84
|
+
};
|
|
85
|
+
exports.commentOnPost = commentOnPost;
|
|
86
|
+
exports.communityHandlers = {
|
|
87
|
+
getAreas,
|
|
88
|
+
getForums,
|
|
89
|
+
getBadges,
|
|
90
|
+
assignBadgesToUser,
|
|
91
|
+
removeBadgesFromUser,
|
|
92
|
+
commentOnPost: exports.commentOnPost,
|
|
93
|
+
getCommunityPosts,
|
|
94
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ExecuteHandler } from '../exec.types';
|
|
2
|
+
export declare const courseHandlers: {
|
|
3
|
+
getPublished: ExecuteHandler;
|
|
4
|
+
getModules: ExecuteHandler;
|
|
5
|
+
getModulesForMember: ExecuteHandler;
|
|
6
|
+
getMembers: ExecuteHandler;
|
|
7
|
+
getAccessRequests: ExecuteHandler;
|
|
8
|
+
getSubmissions: ExecuteHandler;
|
|
9
|
+
createLesson: ExecuteHandler;
|
|
10
|
+
};
|