@rjsebening/n8n-nodes-learningsuite 1.3.1 → 1.3.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/dist/nodes/LearningSuite/LearningSuiteTrigger.node.d.ts +2 -0
- package/dist/nodes/LearningSuite/LearningSuiteTrigger.node.js +13 -0
- package/dist/nodes/LearningSuite/descriptions/trigger.instant.properties.js +27 -0
- package/dist/nodes/LearningSuite/descriptions/webhook.properties.js +33 -0
- package/dist/nodes/LearningSuite/execute/webhook.handlers.js +11 -0
- package/package.json +1 -1
|
@@ -57,6 +57,8 @@ export declare class LearningSuiteTrigger implements INodeType {
|
|
|
57
57
|
community_getBadges(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
58
58
|
community_getLatestPosts(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
59
59
|
bundle_getBundles(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
60
|
+
ai_getAgentActions(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
61
|
+
ai_getAiAgents(this: import("n8n-workflow").ILoadOptionsFunctions): Promise<import("n8n-workflow").INodePropertyOptions[]>;
|
|
60
62
|
};
|
|
61
63
|
};
|
|
62
64
|
webhookMethods: {
|
|
@@ -39,6 +39,7 @@ const request_1 = require("./shared/request");
|
|
|
39
39
|
const trigger_instant_properties_1 = require("./descriptions/trigger.instant.properties");
|
|
40
40
|
const parsing_1 = require("./shared/parsing");
|
|
41
41
|
// methods - loadOptions
|
|
42
|
+
const loAi = __importStar(require("./methods/loadOptions/ai.loadOptions"));
|
|
42
43
|
const loBundle = __importStar(require("./methods/loadOptions/bundle.loadOptions"));
|
|
43
44
|
const loCommunity = __importStar(require("./methods/loadOptions/community.loadOptions"));
|
|
44
45
|
const loCourse = __importStar(require("./methods/loadOptions/course.loadOptions"));
|
|
@@ -102,6 +103,17 @@ function buildDesiredFilter(event) {
|
|
|
102
103
|
}
|
|
103
104
|
};
|
|
104
105
|
switch (event) {
|
|
106
|
+
// ---------------- Agent Action
|
|
107
|
+
case 'agentAction.executed': {
|
|
108
|
+
const col = getCol('additionalAgentActionExecuted');
|
|
109
|
+
if (col === null || col === void 0 ? void 0 : col.toolKey) {
|
|
110
|
+
filter.toolKey = String(col.toolKey);
|
|
111
|
+
}
|
|
112
|
+
if (col === null || col === void 0 ? void 0 : col.agentId) {
|
|
113
|
+
filter.agentId = String(col.agentId);
|
|
114
|
+
}
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
105
117
|
// ---------------- Community
|
|
106
118
|
case 'communityPost.commented': {
|
|
107
119
|
const col = getCol('additionalCommunityPostCommented');
|
|
@@ -291,6 +303,7 @@ class LearningSuiteTrigger {
|
|
|
291
303
|
};
|
|
292
304
|
this.methods = {
|
|
293
305
|
loadOptions: {
|
|
306
|
+
...loAi,
|
|
294
307
|
...loBundle,
|
|
295
308
|
...loCommunity,
|
|
296
309
|
...loCourse,
|
|
@@ -94,6 +94,33 @@ exports.instantProperties = [
|
|
|
94
94
|
},
|
|
95
95
|
],
|
|
96
96
|
},
|
|
97
|
+
// Agent Action Executed
|
|
98
|
+
{
|
|
99
|
+
displayName: 'Agent Action Executed Options',
|
|
100
|
+
name: 'additionalAgentActionExecuted',
|
|
101
|
+
type: 'collection',
|
|
102
|
+
default: {},
|
|
103
|
+
placeholder: 'Add option',
|
|
104
|
+
displayOptions: { show: { event: ['agentAction.executed'] } },
|
|
105
|
+
options: [
|
|
106
|
+
{
|
|
107
|
+
displayName: 'Tool Key Name or ID',
|
|
108
|
+
name: 'toolKey',
|
|
109
|
+
type: 'options',
|
|
110
|
+
default: '',
|
|
111
|
+
description: 'Optional: Only trigger for a specific agent action. Leave empty to trigger for all actions. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
112
|
+
typeOptions: { loadOptionsMethod: 'ai_getAgentActions' },
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
displayName: 'Agent Name or ID',
|
|
116
|
+
name: 'agentId',
|
|
117
|
+
type: 'options',
|
|
118
|
+
default: '',
|
|
119
|
+
description: 'Optional: Only trigger for actions executed by a specific AI agent. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
120
|
+
typeOptions: { loadOptionsMethod: 'ai_getAiAgents' },
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
97
124
|
// New Login
|
|
98
125
|
{
|
|
99
126
|
displayName: 'Login Options',
|
|
@@ -129,6 +129,39 @@ exports.webhookProperties = [
|
|
|
129
129
|
],
|
|
130
130
|
},
|
|
131
131
|
// ====== Optionen pro Event (identisch zu instantProperties) ======
|
|
132
|
+
// Agent Action Executed
|
|
133
|
+
{
|
|
134
|
+
displayName: 'Agent Action Executed Options',
|
|
135
|
+
name: 'additionalAgentActionExecuted',
|
|
136
|
+
type: 'collection',
|
|
137
|
+
default: {},
|
|
138
|
+
placeholder: 'Add option',
|
|
139
|
+
displayOptions: {
|
|
140
|
+
show: {
|
|
141
|
+
resource: ['webhook'],
|
|
142
|
+
operation: ['createSubscription', 'updateSubscription'],
|
|
143
|
+
eventType: ['agentAction.executed'],
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
options: [
|
|
147
|
+
{
|
|
148
|
+
displayName: 'Tool Key Name or ID',
|
|
149
|
+
name: 'toolKey',
|
|
150
|
+
type: 'options',
|
|
151
|
+
default: '',
|
|
152
|
+
description: 'Optional: Only trigger for a specific agent action. Leave empty to trigger for all actions. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
153
|
+
typeOptions: { loadOptionsMethod: 'ai_getAgentActions' },
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
displayName: 'Agent Name or ID',
|
|
157
|
+
name: 'agentId',
|
|
158
|
+
type: 'options',
|
|
159
|
+
default: '',
|
|
160
|
+
description: 'Optional: Only trigger for actions executed by a specific AI agent. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
161
|
+
typeOptions: { loadOptionsMethod: 'ai_getAiAgents' },
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
},
|
|
132
165
|
// Login Options
|
|
133
166
|
{
|
|
134
167
|
displayName: 'Login Options',
|
|
@@ -34,6 +34,17 @@ function buildDesiredFilter(ctx, i, eventType) {
|
|
|
34
34
|
var _a;
|
|
35
35
|
const filter = {};
|
|
36
36
|
switch (eventType) {
|
|
37
|
+
// ---------------- Agent Action
|
|
38
|
+
case 'agentAction.executed': {
|
|
39
|
+
const col = getCol(ctx, i, 'additionalAgentActionExecuted');
|
|
40
|
+
if (col === null || col === void 0 ? void 0 : col.toolKey) {
|
|
41
|
+
filter.toolKey = String(col.toolKey);
|
|
42
|
+
}
|
|
43
|
+
if (col === null || col === void 0 ? void 0 : col.agentId) {
|
|
44
|
+
filter.agentId = String(col.agentId);
|
|
45
|
+
}
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
37
48
|
// ---------------- Community
|
|
38
49
|
case 'communityPost.commented': {
|
|
39
50
|
const col = getCol(ctx, i, 'additionalCommunityPostCommented');
|