@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.
Files changed (137) hide show
  1. package/LICENSE +21 -0
  2. package/README.de.md +555 -0
  3. package/README.md +427 -0
  4. package/dist/credentials/LearningSuiteApi.credentials.d.ts +10 -0
  5. package/dist/credentials/LearningSuiteApi.credentials.js +49 -0
  6. package/dist/credentials/learningsuite.svg +1 -0
  7. package/dist/nodes/LearningSuite/LearningSuite.node.d.ts +65 -0
  8. package/dist/nodes/LearningSuite/LearningSuite.node.js +221 -0
  9. package/dist/nodes/LearningSuite/LearningSuiteTrigger.node.d.ts +66 -0
  10. package/dist/nodes/LearningSuite/LearningSuiteTrigger.node.js +433 -0
  11. package/dist/nodes/LearningSuite/descriptions/ai.properties.d.ts +2 -0
  12. package/dist/nodes/LearningSuite/descriptions/ai.properties.js +141 -0
  13. package/dist/nodes/LearningSuite/descriptions/apiCall.properties.d.ts +2 -0
  14. package/dist/nodes/LearningSuite/descriptions/apiCall.properties.js +87 -0
  15. package/dist/nodes/LearningSuite/descriptions/bundle.properties.d.ts +2 -0
  16. package/dist/nodes/LearningSuite/descriptions/bundle.properties.js +32 -0
  17. package/dist/nodes/LearningSuite/descriptions/community.properties.d.ts +2 -0
  18. package/dist/nodes/LearningSuite/descriptions/community.properties.js +229 -0
  19. package/dist/nodes/LearningSuite/descriptions/course.properties.d.ts +2 -0
  20. package/dist/nodes/LearningSuite/descriptions/course.properties.js +248 -0
  21. package/dist/nodes/LearningSuite/descriptions/customFields.properties.d.ts +2 -0
  22. package/dist/nodes/LearningSuite/descriptions/customFields.properties.js +452 -0
  23. package/dist/nodes/LearningSuite/descriptions/group.properties.d.ts +2 -0
  24. package/dist/nodes/LearningSuite/descriptions/group.properties.js +165 -0
  25. package/dist/nodes/LearningSuite/descriptions/hub.properties.d.ts +2 -0
  26. package/dist/nodes/LearningSuite/descriptions/hub.properties.js +167 -0
  27. package/dist/nodes/LearningSuite/descriptions/member.properties.d.ts +2 -0
  28. package/dist/nodes/LearningSuite/descriptions/member.properties.js +625 -0
  29. package/dist/nodes/LearningSuite/descriptions/module.properties.d.ts +2 -0
  30. package/dist/nodes/LearningSuite/descriptions/module.properties.js +84 -0
  31. package/dist/nodes/LearningSuite/descriptions/popup.properties.d.ts +2 -0
  32. package/dist/nodes/LearningSuite/descriptions/popup.properties.js +73 -0
  33. package/dist/nodes/LearningSuite/descriptions/resource.selector.d.ts +2 -0
  34. package/dist/nodes/LearningSuite/descriptions/resource.selector.js +87 -0
  35. package/dist/nodes/LearningSuite/descriptions/role.properties.d.ts +2 -0
  36. package/dist/nodes/LearningSuite/descriptions/role.properties.js +14 -0
  37. package/dist/nodes/LearningSuite/descriptions/teamMember.properties.d.ts +2 -0
  38. package/dist/nodes/LearningSuite/descriptions/teamMember.properties.js +74 -0
  39. package/dist/nodes/LearningSuite/descriptions/trigger.instant.properties.d.ts +2 -0
  40. package/dist/nodes/LearningSuite/descriptions/trigger.instant.properties.js +542 -0
  41. package/dist/nodes/LearningSuite/descriptions/user.properties.d.ts +2 -0
  42. package/dist/nodes/LearningSuite/descriptions/user.properties.js +135 -0
  43. package/dist/nodes/LearningSuite/descriptions/webhook.properties.d.ts +2 -0
  44. package/dist/nodes/LearningSuite/descriptions/webhook.properties.js +672 -0
  45. package/dist/nodes/LearningSuite/descriptions/webhook.sampleData.properties.d.ts +2 -0
  46. package/dist/nodes/LearningSuite/descriptions/webhook.sampleData.properties.js +401 -0
  47. package/dist/nodes/LearningSuite/exec.types.d.ts +5 -0
  48. package/dist/nodes/LearningSuite/exec.types.js +2 -0
  49. package/dist/nodes/LearningSuite/execute/ai.handlers.d.ts +4 -0
  50. package/dist/nodes/LearningSuite/execute/ai.handlers.js +23 -0
  51. package/dist/nodes/LearningSuite/execute/apiCall.handlers.d.ts +4 -0
  52. package/dist/nodes/LearningSuite/execute/apiCall.handlers.js +46 -0
  53. package/dist/nodes/LearningSuite/execute/bundle.handlers.d.ts +5 -0
  54. package/dist/nodes/LearningSuite/execute/bundle.handlers.js +12 -0
  55. package/dist/nodes/LearningSuite/execute/community.handlers.d.ts +11 -0
  56. package/dist/nodes/LearningSuite/execute/community.handlers.js +94 -0
  57. package/dist/nodes/LearningSuite/execute/course.handlers.d.ts +10 -0
  58. package/dist/nodes/LearningSuite/execute/course.handlers.js +87 -0
  59. package/dist/nodes/LearningSuite/execute/customFields.handlers.d.ts +16 -0
  60. package/dist/nodes/LearningSuite/execute/customFields.handlers.js +342 -0
  61. package/dist/nodes/LearningSuite/execute/group.handlers.d.ts +15 -0
  62. package/dist/nodes/LearningSuite/execute/group.handlers.js +99 -0
  63. package/dist/nodes/LearningSuite/execute/hub.handlers.d.ts +9 -0
  64. package/dist/nodes/LearningSuite/execute/hub.handlers.js +65 -0
  65. package/dist/nodes/LearningSuite/execute/member.handlers.d.ts +23 -0
  66. package/dist/nodes/LearningSuite/execute/member.handlers.js +244 -0
  67. package/dist/nodes/LearningSuite/execute/module.handlers.d.ts +6 -0
  68. package/dist/nodes/LearningSuite/execute/module.handlers.js +36 -0
  69. package/dist/nodes/LearningSuite/execute/popup.handlers.d.ts +7 -0
  70. package/dist/nodes/LearningSuite/execute/popup.handlers.js +24 -0
  71. package/dist/nodes/LearningSuite/execute/registry.d.ts +2 -0
  72. package/dist/nodes/LearningSuite/execute/registry.js +35 -0
  73. package/dist/nodes/LearningSuite/execute/role.handlers.d.ts +4 -0
  74. package/dist/nodes/LearningSuite/execute/role.handlers.js +6 -0
  75. package/dist/nodes/LearningSuite/execute/teamMember.handlers.d.ts +6 -0
  76. package/dist/nodes/LearningSuite/execute/teamMember.handlers.js +21 -0
  77. package/dist/nodes/LearningSuite/execute/user.handlers.d.ts +4 -0
  78. package/dist/nodes/LearningSuite/execute/user.handlers.js +32 -0
  79. package/dist/nodes/LearningSuite/execute/webhook.handlers.d.ts +9 -0
  80. package/dist/nodes/LearningSuite/execute/webhook.handlers.js +306 -0
  81. package/dist/nodes/LearningSuite/icons/learningsuite-icon-dark.svg +1 -0
  82. package/dist/nodes/LearningSuite/icons/learningsuite-icon-light.svg +1 -0
  83. package/dist/nodes/LearningSuite/index.d.ts +1 -0
  84. package/dist/nodes/LearningSuite/index.js +17 -0
  85. package/dist/nodes/LearningSuite/methods/loadOptions/apiCall.loadOptions.d.ts +1 -0
  86. package/dist/nodes/LearningSuite/methods/loadOptions/apiCall.loadOptions.js +2 -0
  87. package/dist/nodes/LearningSuite/methods/loadOptions/bundle.loadOptions.d.ts +2 -0
  88. package/dist/nodes/LearningSuite/methods/loadOptions/bundle.loadOptions.js +7 -0
  89. package/dist/nodes/LearningSuite/methods/loadOptions/common.d.ts +7 -0
  90. package/dist/nodes/LearningSuite/methods/loadOptions/common.js +22 -0
  91. package/dist/nodes/LearningSuite/methods/loadOptions/community.loadOptions.d.ts +5 -0
  92. package/dist/nodes/LearningSuite/methods/loadOptions/community.loadOptions.js +80 -0
  93. package/dist/nodes/LearningSuite/methods/loadOptions/course.loadOptions.d.ts +5 -0
  94. package/dist/nodes/LearningSuite/methods/loadOptions/course.loadOptions.js +58 -0
  95. package/dist/nodes/LearningSuite/methods/loadOptions/customFields.loadOptions.d.ts +12 -0
  96. package/dist/nodes/LearningSuite/methods/loadOptions/customFields.loadOptions.js +55 -0
  97. package/dist/nodes/LearningSuite/methods/loadOptions/group.loadOptions.d.ts +2 -0
  98. package/dist/nodes/LearningSuite/methods/loadOptions/group.loadOptions.js +7 -0
  99. package/dist/nodes/LearningSuite/methods/loadOptions/hub.loadOptions.d.ts +3 -0
  100. package/dist/nodes/LearningSuite/methods/loadOptions/hub.loadOptions.js +11 -0
  101. package/dist/nodes/LearningSuite/methods/loadOptions/member.loadOptions.d.ts +9 -0
  102. package/dist/nodes/LearningSuite/methods/loadOptions/member.loadOptions.js +27 -0
  103. package/dist/nodes/LearningSuite/methods/loadOptions/module.loadOptions.d.ts +5 -0
  104. package/dist/nodes/LearningSuite/methods/loadOptions/module.loadOptions.js +29 -0
  105. package/dist/nodes/LearningSuite/methods/loadOptions/popup.loadOptions.d.ts +2 -0
  106. package/dist/nodes/LearningSuite/methods/loadOptions/popup.loadOptions.js +7 -0
  107. package/dist/nodes/LearningSuite/methods/loadOptions/role.loadOptions.d.ts +2 -0
  108. package/dist/nodes/LearningSuite/methods/loadOptions/role.loadOptions.js +7 -0
  109. package/dist/nodes/LearningSuite/methods/loadOptions/teamMember.loadOptions.d.ts +9 -0
  110. package/dist/nodes/LearningSuite/methods/loadOptions/teamMember.loadOptions.js +35 -0
  111. package/dist/nodes/LearningSuite/methods/loadOptions/webhook.loadOptions.d.ts +6 -0
  112. package/dist/nodes/LearningSuite/methods/loadOptions/webhook.loadOptions.js +18 -0
  113. package/dist/nodes/LearningSuite/methods/resourceMappers/customFields.resourceMapper.d.ts +2 -0
  114. package/dist/nodes/LearningSuite/methods/resourceMappers/customFields.resourceMapper.js +35 -0
  115. package/dist/nodes/LearningSuite/methods/resourceMappers/hub.resourceMapper.d.ts +2 -0
  116. package/dist/nodes/LearningSuite/methods/resourceMappers/hub.resourceMapper.js +34 -0
  117. package/dist/nodes/LearningSuite/shared/customFields.helpers.d.ts +4 -0
  118. package/dist/nodes/LearningSuite/shared/customFields.helpers.js +56 -0
  119. package/dist/nodes/LearningSuite/shared/customFields.shared.d.ts +42 -0
  120. package/dist/nodes/LearningSuite/shared/customFields.shared.js +101 -0
  121. package/dist/nodes/LearningSuite/shared/customFields.upload.d.ts +13 -0
  122. package/dist/nodes/LearningSuite/shared/customFields.upload.js +198 -0
  123. package/dist/nodes/LearningSuite/shared/errors.d.ts +1 -0
  124. package/dist/nodes/LearningSuite/shared/errors.js +16 -0
  125. package/dist/nodes/LearningSuite/shared/getScopedParam.d.ts +2 -0
  126. package/dist/nodes/LearningSuite/shared/getScopedParam.js +39 -0
  127. package/dist/nodes/LearningSuite/shared/index.d.ts +4 -0
  128. package/dist/nodes/LearningSuite/shared/index.js +20 -0
  129. package/dist/nodes/LearningSuite/shared/parsing.d.ts +1 -0
  130. package/dist/nodes/LearningSuite/shared/parsing.js +15 -0
  131. package/dist/nodes/LearningSuite/shared/request.d.ts +13 -0
  132. package/dist/nodes/LearningSuite/shared/request.js +53 -0
  133. package/dist/nodes/LearningSuitePollingTrigger/LearningSuitePollingTrigger.node.d.ts +11 -0
  134. package/dist/nodes/LearningSuitePollingTrigger/LearningSuitePollingTrigger.node.js +278 -0
  135. package/dist/nodes/LearningSuitePollingTrigger/descriptions/trigger.polling.properties.d.ts +2 -0
  136. package/dist/nodes/LearningSuitePollingTrigger/descriptions/trigger.polling.properties.js +193 -0
  137. package/package.json +65 -0
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bundleProperties = void 0;
4
+ exports.bundleProperties = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ default: 'getAll',
11
+ displayOptions: { show: { resource: ['bundle'] } },
12
+ options: [
13
+ { name: 'Get Many', value: 'getAll', description: 'List bundles', action: 'Get bundles' },
14
+ {
15
+ name: 'Get Bundle Members',
16
+ value: 'getMembers',
17
+ description: 'List members of a bundle, including access information if available',
18
+ action: 'Get bundle members',
19
+ },
20
+ ],
21
+ },
22
+ {
23
+ displayName: 'Bundle Name or ID',
24
+ name: 'bundleId',
25
+ type: 'options',
26
+ displayOptions: { show: { resource: ['bundle'], operation: ['getMembers'] } },
27
+ typeOptions: { loadOptionsMethod: 'bundle_getBundles' },
28
+ default: '',
29
+ required: true,
30
+ description: 'ID of the bundle. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
31
+ },
32
+ ];
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const communityProperties: INodeProperties[];
@@ -0,0 +1,229 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.communityProperties = void 0;
4
+ exports.communityProperties = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ default: 'getAreas',
11
+ displayOptions: { show: { resource: ['community'] } },
12
+ options: [
13
+ {
14
+ name: 'Assign Badges to Member',
15
+ value: 'assignBadgesToUser',
16
+ description: 'Assign one or more badges to a member',
17
+ action: 'Assign badges to member',
18
+ },
19
+ {
20
+ name: 'Create Community Post Comment',
21
+ value: 'commentOnPost',
22
+ description: 'Comment on a community post or reply to an existing comment',
23
+ action: 'Add comment to post',
24
+ },
25
+ {
26
+ name: 'Get Community Areas',
27
+ value: 'getAreas',
28
+ description: 'List community areas',
29
+ action: 'Get community areas',
30
+ },
31
+ {
32
+ name: 'Get Community Badges',
33
+ value: 'getBadges',
34
+ description: 'List community badges (optionally filtered by badge group)',
35
+ action: 'Get community badges',
36
+ },
37
+ {
38
+ name: 'Get Community Forums',
39
+ value: 'getForums',
40
+ description: 'List community forums (optionally filtered by area)',
41
+ action: 'Get community forums',
42
+ },
43
+ {
44
+ name: 'Get Community Posts',
45
+ value: 'getCommunityPosts',
46
+ description: 'List all published community posts (optionally filtered by area or forum)',
47
+ action: 'Get community posts',
48
+ },
49
+ {
50
+ name: 'Remove Community Badges From Member',
51
+ value: 'removeBadgesFromUser',
52
+ description: 'Remove one or more badges from a member',
53
+ action: 'Remove badges from member',
54
+ },
55
+ ],
56
+ },
57
+ {
58
+ displayName: 'Area Name or ID',
59
+ name: 'areaId',
60
+ type: 'options',
61
+ displayOptions: { show: { resource: ['community'], operation: ['getForums'] } },
62
+ default: '',
63
+ typeOptions: { loadOptionsMethod: 'community_getAreas' },
64
+ description: 'ID of the community area to filter forums. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
65
+ },
66
+ // Optional filter for badges (for listing + for LoadOptions when assigning/removing)
67
+ {
68
+ displayName: 'Badge Group ID',
69
+ name: 'badgeGroupId',
70
+ type: 'string',
71
+ displayOptions: {
72
+ show: {
73
+ resource: ['community'],
74
+ operation: ['getBadges', 'assignBadgesToUser', 'removeBadgesFromUser'],
75
+ },
76
+ },
77
+ default: '',
78
+ description: 'If set, only badges from this badge group will be used/displayed',
79
+ },
80
+ // Member selection for assign/remove
81
+ {
82
+ displayName: 'Member Name or ID',
83
+ name: 'memberId',
84
+ type: 'options',
85
+ typeOptions: { loadOptionsMethod: 'member_getMembers' },
86
+ displayOptions: {
87
+ show: { resource: ['community'], operation: ['assignBadgesToUser', 'removeBadgesFromUser'] },
88
+ },
89
+ default: '',
90
+ required: true,
91
+ description: 'Member to whom badges are assigned or revoked. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
92
+ },
93
+ {
94
+ displayName: 'Badge Names or IDs',
95
+ name: 'badgeIds',
96
+ type: 'multiOptions',
97
+ typeOptions: {
98
+ loadOptionsMethod: 'community_getBadges',
99
+ loadOptionsDependsOn: ['badgeGroupId'],
100
+ },
101
+ displayOptions: {
102
+ show: { resource: ['community'], operation: ['assignBadgesToUser', 'removeBadgesFromUser'] },
103
+ },
104
+ default: [],
105
+ required: true,
106
+ description: 'Select one or more badges. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
107
+ },
108
+ {
109
+ displayName: 'You can select multiple badges. The badge selector can optionally be filtered by <b>Badge Group ID</b>.',
110
+ name: 'notice',
111
+ type: 'notice',
112
+ displayOptions: {
113
+ show: { resource: ['community'], operation: ['assignBadgesToUser', 'removeBadgesFromUser'] },
114
+ },
115
+ default: '',
116
+ description: 'You can select multiple badges. The badge selector can optionally be filtered by <b>Badge Group ID</b>.',
117
+ },
118
+ {
119
+ displayName: 'Community Post Name or ID',
120
+ name: 'postId',
121
+ type: 'options',
122
+ typeOptions: {
123
+ loadOptionsMethod: 'community_getLatestPosts',
124
+ },
125
+ displayOptions: { show: { resource: ['community'], operation: ['commentOnPost'] } },
126
+ default: '',
127
+ required: true,
128
+ description: 'The community post to comment on. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
129
+ },
130
+ {
131
+ displayName: 'Author Name or ID',
132
+ name: 'authorUserId',
133
+ type: 'options',
134
+ typeOptions: { loadOptionsMethod: 'teamMember_getTeamMembersById' },
135
+ displayOptions: { show: { resource: ['community'], operation: ['commentOnPost'] } },
136
+ default: '',
137
+ description: 'Select a team member as author who writes the comment. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
138
+ },
139
+ {
140
+ displayName: 'Comment Text',
141
+ name: 'commentText',
142
+ type: 'string',
143
+ typeOptions: { rows: 4 },
144
+ displayOptions: { show: { resource: ['community'], operation: ['commentOnPost'] } },
145
+ default: '',
146
+ required: true,
147
+ description: 'Text of your comment to be added to the post',
148
+ },
149
+ {
150
+ displayName: 'Answer to Comment ID',
151
+ name: 'answerToCommentId',
152
+ type: 'string',
153
+ displayOptions: { show: { resource: ['community'], operation: ['commentOnPost'] } },
154
+ default: '',
155
+ description: 'If set, this comment will be posted as a reply to another comment',
156
+ },
157
+ {
158
+ displayName: 'Enable Webhook Triggering',
159
+ name: 'enableWebhookTriggering',
160
+ type: 'boolean',
161
+ displayOptions: { show: { resource: ['community'], operation: ['commentOnPost'] } },
162
+ default: false,
163
+ description: 'Whether commenting via API should trigger webhooks. By default, API comments do NOT trigger webhooks. Enabling this can fire events like community.post.commented. WARNING: This may cause infinite loops if the webhook triggers the same API again',
164
+ },
165
+ {
166
+ displayName: 'Limit',
167
+ name: 'limit',
168
+ type: 'number',
169
+ description: 'Max number of results to return',
170
+ displayOptions: {
171
+ show: { resource: ['community'], operation: ['getAreas', 'getBadges', 'getForums', 'getCommunityPosts'] },
172
+ },
173
+ typeOptions: { minValue: 1 },
174
+ default: 50,
175
+ },
176
+ {
177
+ displayName: 'Offset',
178
+ name: 'offset',
179
+ type: 'number',
180
+ displayOptions: {
181
+ show: { resource: ['community'], operation: ['getAreas', 'getBadges', 'getForums', 'getCommunityPosts'] },
182
+ },
183
+ typeOptions: { minValue: 0 },
184
+ default: 0,
185
+ description: 'Number of results to skip for pagination',
186
+ },
187
+ // === Get Community Posts ===
188
+ {
189
+ displayName: 'Area Name or ID',
190
+ name: 'areaId',
191
+ type: 'options',
192
+ typeOptions: { loadOptionsMethod: 'community_getAreas' },
193
+ displayOptions: {
194
+ show: { resource: ['community'], operation: ['getCommunityPosts'] },
195
+ },
196
+ default: '',
197
+ placeholder: 'Select Area (optional)',
198
+ description: 'Filter posts by community area. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
199
+ },
200
+ {
201
+ displayName: 'Forum Name or ID',
202
+ name: 'forumId',
203
+ type: 'options',
204
+ typeOptions: { loadOptionsMethod: 'community_getForums' },
205
+ displayOptions: {
206
+ show: { resource: ['community'], operation: ['getCommunityPosts'] },
207
+ },
208
+ default: '',
209
+ placeholder: 'Select Forum (optional)',
210
+ description: 'Filter posts by community forum. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
211
+ },
212
+ {
213
+ displayName: 'Order',
214
+ name: 'order',
215
+ type: 'options',
216
+ displayOptions: {
217
+ show: { resource: ['community'], operation: ['getCommunityPosts'] },
218
+ },
219
+ options: [
220
+ { name: 'Latest', value: 'latest' },
221
+ { name: 'Latest Content', value: 'latestContent' },
222
+ { name: 'Top', value: 'top' },
223
+ { name: 'Relevance', value: 'relevance' },
224
+ ],
225
+ default: 'latest',
226
+ description: 'Order of posts to return',
227
+ },
228
+ // === END getPosts ===
229
+ ];
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const courseProperties: INodeProperties[];
@@ -0,0 +1,248 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.courseProperties = void 0;
4
+ exports.courseProperties = [
5
+ {
6
+ displayName: 'Operation',
7
+ name: 'operation',
8
+ type: 'options',
9
+ noDataExpression: true,
10
+ default: 'getPublished',
11
+ displayOptions: { show: { resource: ['course'] } },
12
+ options: [
13
+ {
14
+ name: 'Create Lesson',
15
+ value: 'createLesson',
16
+ description: 'Create a lesson in a course section (optional page content)',
17
+ action: 'Create lesson',
18
+ },
19
+ {
20
+ name: 'Get Course Access Requests',
21
+ value: 'getAccessRequests',
22
+ description: 'List access requests for a course',
23
+ action: 'Get course access requests',
24
+ },
25
+ {
26
+ name: 'Get Course Members',
27
+ value: 'getMembers',
28
+ description: 'List members of a course with access information (and optional progress)',
29
+ action: 'Get course members',
30
+ },
31
+ {
32
+ name: 'Get Course Modules',
33
+ value: 'getModules',
34
+ description: 'List modules for a course',
35
+ action: 'Get course modules',
36
+ },
37
+ {
38
+ name: 'Get Course Modules for Member',
39
+ value: 'getModulesForMember',
40
+ description: 'List course modules with member-specific drip access information',
41
+ action: 'Get course modules for member',
42
+ },
43
+ {
44
+ name: 'Get Course Submissions',
45
+ value: 'getSubmissions',
46
+ description: 'List submissions in a course (newest first)',
47
+ action: 'Get course submissions',
48
+ },
49
+ {
50
+ name: 'Get Published Courses',
51
+ value: 'getPublished',
52
+ description: 'List published courses',
53
+ action: 'Get published courses',
54
+ },
55
+ ],
56
+ },
57
+ {
58
+ displayName: 'Course Name or ID',
59
+ name: 'courseId',
60
+ type: 'options',
61
+ typeOptions: { loadOptionsMethod: 'course_getCourses' },
62
+ displayOptions: {
63
+ show: {
64
+ resource: ['course'],
65
+ operation: [
66
+ 'getModules',
67
+ 'getModulesForMember',
68
+ 'getMembers',
69
+ 'getAccessRequests',
70
+ 'getSubmissions',
71
+ 'createLesson',
72
+ ],
73
+ },
74
+ },
75
+ default: '',
76
+ required: true,
77
+ description: 'ID of the course. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
78
+ },
79
+ {
80
+ displayName: 'Module Name or ID',
81
+ name: 'moduleId',
82
+ type: 'options',
83
+ displayOptions: {
84
+ show: {
85
+ resource: ['course'],
86
+ operation: ['createLesson'],
87
+ },
88
+ },
89
+ typeOptions: {
90
+ loadOptionsMethod: 'course_getModules',
91
+ loadOptionsDependsOn: ['courseId'],
92
+ },
93
+ default: '',
94
+ required: true,
95
+ description: 'Select a module. Optionally, select a course first to filter the list. Or enter an ID using an expression. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
96
+ },
97
+ {
98
+ displayName: 'Section Name or ID',
99
+ name: 'sectionId',
100
+ type: 'options',
101
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
102
+ typeOptions: {
103
+ loadOptionsMethod: 'module_getSections',
104
+ loadOptionsDependsOn: ['moduleId'],
105
+ },
106
+ displayOptions: {
107
+ show: {
108
+ resource: ['course'],
109
+ operation: ['createLesson'],
110
+ },
111
+ },
112
+ default: '',
113
+ required: true,
114
+ },
115
+ {
116
+ displayName: 'Member Name or ID',
117
+ name: 'memberId',
118
+ type: 'options',
119
+ typeOptions: { loadOptionsMethod: 'member_getMembers' },
120
+ displayOptions: { show: { resource: ['course'], operation: ['getModulesForMember'] } },
121
+ default: '',
122
+ required: true,
123
+ description: 'Member for whom to load modules. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
124
+ },
125
+ {
126
+ displayName: 'Lesson Name',
127
+ name: 'lessonName',
128
+ type: 'string',
129
+ displayOptions: { show: { resource: ['course'], operation: ['createLesson'] } },
130
+ default: '',
131
+ required: true,
132
+ description: 'Name of the lesson',
133
+ },
134
+ {
135
+ displayName: 'Lesson Sort Position',
136
+ name: 'lessonSortPosition',
137
+ type: 'options',
138
+ options: [
139
+ { name: 'First', value: 'first' },
140
+ { name: 'Last', value: 'last' },
141
+ ],
142
+ default: 'last',
143
+ description: 'Place the new lesson at the beginning or end of the section',
144
+ displayOptions: { show: { resource: ['course'], operation: ['createLesson'] } },
145
+ },
146
+ {
147
+ displayName: 'Immediately Publish Course',
148
+ name: 'immediatelyPublishCourse',
149
+ type: 'boolean',
150
+ default: false,
151
+ displayOptions: { show: { resource: ['course'], operation: ['createLesson'] } },
152
+ description: 'Whether the course should be published immediately after the lesson and page are created. Warning: this will also publish any changes since the last release of a new course version.',
153
+ },
154
+ {
155
+ displayName: '<b>If you enable "Immediately Publish Course":</b>Publishing the course will go live immediately and will include ALL changes since the last published version. <br><br> Ensure that the content and settings are final.',
156
+ name: 'notice_immediatelyPublishCourse',
157
+ type: 'notice',
158
+ default: '',
159
+ displayOptions: { show: { resource: ['course'], operation: ['createLesson'] } },
160
+ },
161
+ {
162
+ displayName: 'Additional Options',
163
+ name: 'additionalOptions',
164
+ type: 'collection',
165
+ placeholder: 'Add Option',
166
+ default: {},
167
+ displayOptions: { show: { resource: ['course'], operation: ['createLesson'] } },
168
+ options: [
169
+ {
170
+ displayName: 'HTML Content',
171
+ name: 'htmlContent',
172
+ type: 'string',
173
+ default: '',
174
+ description: 'HTML content will be parsed to LearningSuite content and inserted into the Page of the created Lesson. The content will be inserted after the video if a video URL is provided. Only formatted text and images can be inserted.',
175
+ },
176
+ {
177
+ displayName: 'Lesson Description (Deprecated)',
178
+ name: 'lessonDescription',
179
+ type: 'string',
180
+ default: '',
181
+ description: 'Deprecated. This field is no longer processed by the API and will be ignored.',
182
+ },
183
+ {
184
+ displayName: 'Thumbnail Timestamp (Sec)',
185
+ name: 'timestampInSecondsToGenerateThumbnail',
186
+ type: 'number',
187
+ default: '',
188
+ description: 'Second mark of the video to capture the thumbnail from. Only relevant if a Video URL is provided.',
189
+ },
190
+ {
191
+ displayName: 'Thumbnail URL',
192
+ name: 'thumbnailUrl',
193
+ type: 'string',
194
+ default: '',
195
+ description: 'A direct-downloadable image URL to be set as lesson and video thumbnail (no auth headers)',
196
+ },
197
+ {
198
+ displayName: 'Video URL',
199
+ name: 'videoUrl',
200
+ type: 'string',
201
+ default: '',
202
+ description: 'A direct-downloadable video URL to be inserted as the first element on the lesson page. If no explicit thumbnail is set, the first frame of the video will be used as thumbnail.',
203
+ },
204
+ ],
205
+ },
206
+ {
207
+ displayName: 'Limit',
208
+ name: 'limit',
209
+ type: 'number',
210
+ typeOptions: {
211
+ minValue: 1,
212
+ },
213
+ default: 50,
214
+ description: 'Max number of results to return',
215
+ displayOptions: {
216
+ show: {
217
+ resource: ['course'],
218
+ operation: ['getMembers', 'getAccessRequests', 'getSubmissions'],
219
+ },
220
+ },
221
+ },
222
+ {
223
+ displayName: 'Offset',
224
+ name: 'offset',
225
+ type: 'number',
226
+ default: 0,
227
+ description: 'Number of records to skip',
228
+ displayOptions: {
229
+ show: {
230
+ resource: ['course'],
231
+ operation: ['getMembers', 'getAccessRequests', 'getSubmissions'],
232
+ },
233
+ },
234
+ },
235
+ {
236
+ displayName: 'Include Progress',
237
+ name: 'includeProgress',
238
+ type: 'boolean',
239
+ default: false,
240
+ description: 'Whether to include member progress in the response',
241
+ displayOptions: {
242
+ show: {
243
+ resource: ['course'],
244
+ operation: ['getMembers'],
245
+ },
246
+ },
247
+ },
248
+ ];
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const customFieldsProperties: INodeProperties[];