@rjsebening/n8n-nodes-learningsuite 1.2.0 → 1.2.1
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.js +1 -0
- package/dist/nodes/LearningSuite/descriptions/ai.properties.js +12 -0
- package/dist/nodes/LearningSuite/descriptions/trigger.instant.properties.js +5 -0
- package/dist/nodes/LearningSuite/descriptions/webhook.properties.js +2 -0
- package/dist/nodes/LearningSuite/descriptions/webhook.sampleData.properties.js +24 -0
- package/dist/nodes/LearningSuite/execute/ai.handlers.d.ts +2 -0
- package/dist/nodes/LearningSuite/execute/ai.handlers.js +8 -0
- package/dist/nodes/LearningSuite/execute/webhook.handlers.js +5 -0
- package/dist/nodes/LearningSuite/shared/customFields.upload.js +1 -3
- package/package.json +1 -1
|
@@ -52,6 +52,7 @@ const loWebhook = __importStar(require("./methods/loadOptions/webhook.loadOption
|
|
|
52
52
|
const loTeamMember = __importStar(require("./methods/loadOptions/teamMember.loadOptions"));
|
|
53
53
|
const loCustomFields = __importStar(require("./methods/loadOptions/customFields.loadOptions"));
|
|
54
54
|
const INSTANT_EVENTS = new Set([
|
|
55
|
+
'agentAction.executed',
|
|
55
56
|
'accessRequest.created',
|
|
56
57
|
'communityPost.created',
|
|
57
58
|
'communityPost.commented',
|
|
@@ -10,6 +10,18 @@ exports.aiProperties = [
|
|
|
10
10
|
default: 'ragChat',
|
|
11
11
|
displayOptions: { show: { resource: ['ai'] } },
|
|
12
12
|
options: [
|
|
13
|
+
{
|
|
14
|
+
name: 'Get Agent Actions',
|
|
15
|
+
value: 'getAgentActions',
|
|
16
|
+
description: 'List all agent actions for the tenant',
|
|
17
|
+
action: 'List agent actions',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'Get AI Agents',
|
|
21
|
+
value: 'getAiAgents',
|
|
22
|
+
description: 'List all enabled AI agents for the tenant',
|
|
23
|
+
action: 'List AI agents',
|
|
24
|
+
},
|
|
13
25
|
{
|
|
14
26
|
name: 'RAG Chat',
|
|
15
27
|
value: 'ragChat',
|
|
@@ -10,6 +10,11 @@ exports.instantProperties = [
|
|
|
10
10
|
default: 'communityPost.created',
|
|
11
11
|
description: 'Select the LearningSuite instant (webhook) event',
|
|
12
12
|
options: [
|
|
13
|
+
{
|
|
14
|
+
name: 'Agent Action Executed',
|
|
15
|
+
value: 'agentAction.executed',
|
|
16
|
+
description: 'Triggers when an AI agent action has been executed',
|
|
17
|
+
},
|
|
13
18
|
{
|
|
14
19
|
name: 'Community Post Commented',
|
|
15
20
|
value: 'communityPost.commented',
|
|
@@ -80,6 +80,7 @@ exports.webhookProperties = [
|
|
|
80
80
|
displayOptions: { show: { resource: ['webhook'], operation: ['createSubscription', 'updateSubscription'] } },
|
|
81
81
|
description: 'Type of event to subscribe to',
|
|
82
82
|
options: [
|
|
83
|
+
{ name: 'Agent Action Executed', value: 'agentAction.executed' },
|
|
83
84
|
{ name: 'Community Post Commented', value: 'communityPost.commented' },
|
|
84
85
|
{ name: 'Community Post Created', value: 'communityPost.created' },
|
|
85
86
|
{ name: 'Community Post Moderated', value: 'communityPost.moderated' },
|
|
@@ -109,6 +110,7 @@ exports.webhookProperties = [
|
|
|
109
110
|
required: true,
|
|
110
111
|
description: 'Type of sample data to retrieve',
|
|
111
112
|
options: [
|
|
113
|
+
{ name: 'Agent Action Executed Events', value: 'agent-action-executed-events' },
|
|
112
114
|
{ name: 'Community Post Commented', value: 'community-post-commented-events' },
|
|
113
115
|
{ name: 'Community Post Created Events', value: 'community-post-created-events' },
|
|
114
116
|
{ name: 'Community Post Moderated Events', value: 'community-post-moderated-events' },
|
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.webhookSampleDataProperties = void 0;
|
|
5
5
|
exports.webhookSampleDataProperties = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Agent Action Executed Options',
|
|
8
|
+
name: 'additionalAgentActionExecutedSample',
|
|
9
|
+
type: 'collection',
|
|
10
|
+
default: {},
|
|
11
|
+
placeholder: 'Add option',
|
|
12
|
+
displayOptions: { show: { sampleDataType: ['agent-action-executed-events'] } },
|
|
13
|
+
options: [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'Tool Key',
|
|
16
|
+
name: 'toolKey',
|
|
17
|
+
type: 'string',
|
|
18
|
+
default: '',
|
|
19
|
+
description: 'Optional tool key to filter agent action executions',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Agent ID',
|
|
23
|
+
name: 'agentId',
|
|
24
|
+
type: 'string',
|
|
25
|
+
default: '',
|
|
26
|
+
description: 'Optional agent ID to filter agent action executions',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
},
|
|
6
30
|
{
|
|
7
31
|
displayName: 'Progress Changed Options',
|
|
8
32
|
name: 'additionalProgressChangedSample',
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.aiHandlers = void 0;
|
|
4
4
|
const shared_1 = require("../shared");
|
|
5
|
+
const getAgentActions = async (ctx) => {
|
|
6
|
+
return await shared_1.lsRequest.call(ctx, 'GET', '/ai/agent-actions');
|
|
7
|
+
};
|
|
8
|
+
const getAiAgents = async (ctx) => {
|
|
9
|
+
return await shared_1.lsRequest.call(ctx, 'GET', '/ai/ai-agents');
|
|
10
|
+
};
|
|
5
11
|
const ragChat = async (ctx, i) => {
|
|
6
12
|
const body = {
|
|
7
13
|
question: ctx.getNodeParameter('question', i),
|
|
@@ -19,5 +25,7 @@ const ragChat = async (ctx, i) => {
|
|
|
19
25
|
return await shared_1.lsRequest.call(ctx, 'POST', '/ai/rag-chat', { body: cleanBody });
|
|
20
26
|
};
|
|
21
27
|
exports.aiHandlers = {
|
|
28
|
+
getAgentActions,
|
|
29
|
+
getAiAgents,
|
|
22
30
|
ragChat,
|
|
23
31
|
};
|
|
@@ -223,6 +223,11 @@ const getSampleData = async (ctx, i) => {
|
|
|
223
223
|
const sampleDataType = ctx.getNodeParameter('sampleDataType', i);
|
|
224
224
|
let qs = {};
|
|
225
225
|
switch (sampleDataType) {
|
|
226
|
+
case 'agent-action-executed-events': {
|
|
227
|
+
const col = ctx.getNodeParameter('additionalAgentActionExecutedSample', i, {});
|
|
228
|
+
qs = col;
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
226
231
|
case 'progress-changed-events': {
|
|
227
232
|
const col = ctx.getNodeParameter('additionalProgressChangedSample', i, {});
|
|
228
233
|
qs = col;
|
|
@@ -68,9 +68,7 @@ async function uploadViaTus(ctx, uploadSpec, buffer, fileName, contentType) {
|
|
|
68
68
|
if (!location) {
|
|
69
69
|
throw new n8n_workflow_1.NodeOperationError(ctx.getNode(), 'tus creation response missing Location header');
|
|
70
70
|
}
|
|
71
|
-
const uploadUrl = location.startsWith('http')
|
|
72
|
-
? location
|
|
73
|
-
: new URL(location, uploadSpec.uploadUrl).toString();
|
|
71
|
+
const uploadUrl = location.startsWith('http') ? location : new URL(location, uploadSpec.uploadUrl).toString();
|
|
74
72
|
let offset = 0;
|
|
75
73
|
while (offset < buffer.length) {
|
|
76
74
|
const chunk = buffer.subarray(offset, Math.min(offset + TUS_CHUNK_SIZE, buffer.length));
|