n8n-nodes-orboto 1.0.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.
Files changed (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +107 -0
  3. package/dist/credentials/orbotoApi.credentials.d.ts +34 -0
  4. package/dist/credentials/orbotoApi.credentials.js +76 -0
  5. package/dist/credentials/orbotoApi.credentials.js.map +1 -0
  6. package/dist/credentials/orbotoOAuth2Api.credentials.d.ts +10 -0
  7. package/dist/credentials/orbotoOAuth2Api.credentials.js +73 -0
  8. package/dist/credentials/orbotoOAuth2Api.credentials.js.map +1 -0
  9. package/dist/nodes/index.d.ts +2 -0
  10. package/dist/nodes/index.js +19 -0
  11. package/dist/nodes/index.js.map +1 -0
  12. package/dist/nodes/orboto/orboto.node.d.ts +18 -0
  13. package/dist/nodes/orboto/orboto.node.js +192 -0
  14. package/dist/nodes/orboto/orboto.node.js.map +1 -0
  15. package/dist/nodes/orboto/orboto.svg +4 -0
  16. package/dist/nodes/orboto/orbotoTrigger.node.d.ts +19 -0
  17. package/dist/nodes/orboto/orbotoTrigger.node.js +243 -0
  18. package/dist/nodes/orboto/orbotoTrigger.node.js.map +1 -0
  19. package/dist/nodes/orboto/orbotoTrigger.svg +4 -0
  20. package/dist/nodes/orboto/resources/agent/agent.resource.d.ts +7 -0
  21. package/dist/nodes/orboto/resources/agent/agent.resource.js +183 -0
  22. package/dist/nodes/orboto/resources/agent/agent.resource.js.map +1 -0
  23. package/dist/nodes/orboto/resources/doc/doc.resource.d.ts +3 -0
  24. package/dist/nodes/orboto/resources/doc/doc.resource.js +206 -0
  25. package/dist/nodes/orboto/resources/doc/doc.resource.js.map +1 -0
  26. package/dist/nodes/orboto/resources/milestone/milestone.resource.d.ts +3 -0
  27. package/dist/nodes/orboto/resources/milestone/milestone.resource.js +197 -0
  28. package/dist/nodes/orboto/resources/milestone/milestone.resource.js.map +1 -0
  29. package/dist/nodes/orboto/resources/misc/misc.resources.d.ts +8 -0
  30. package/dist/nodes/orboto/resources/misc/misc.resources.js +232 -0
  31. package/dist/nodes/orboto/resources/misc/misc.resources.js.map +1 -0
  32. package/dist/nodes/orboto/resources/project/project.resource.d.ts +3 -0
  33. package/dist/nodes/orboto/resources/project/project.resource.js +144 -0
  34. package/dist/nodes/orboto/resources/project/project.resource.js.map +1 -0
  35. package/dist/nodes/orboto/resources/ticket/Ticket.resource.d.ts +11 -0
  36. package/dist/nodes/orboto/resources/ticket/Ticket.resource.js +1072 -0
  37. package/dist/nodes/orboto/resources/ticket/Ticket.resource.js.map +1 -0
  38. package/dist/nodes/orboto/resources/time/time.resource.d.ts +3 -0
  39. package/dist/nodes/orboto/resources/time/time.resource.js +140 -0
  40. package/dist/nodes/orboto/resources/time/time.resource.js.map +1 -0
  41. package/dist/nodes/orboto/shared/ApiClient.d.ts +97 -0
  42. package/dist/nodes/orboto/shared/ApiClient.js +261 -0
  43. package/dist/nodes/orboto/shared/ApiClient.js.map +1 -0
  44. package/dist/nodes/orboto/shared/GenericFunctions.d.ts +47 -0
  45. package/dist/nodes/orboto/shared/GenericFunctions.js +186 -0
  46. package/dist/nodes/orboto/shared/GenericFunctions.js.map +1 -0
  47. package/dist/nodes/orboto/shared/Types.d.ts +54 -0
  48. package/dist/nodes/orboto/shared/Types.js +10 -0
  49. package/dist/nodes/orboto/shared/Types.js.map +1 -0
  50. package/dist/nodes/orboto/shared/loadOptions.d.ts +17 -0
  51. package/dist/nodes/orboto/shared/loadOptions.js +85 -0
  52. package/dist/nodes/orboto/shared/loadOptions.js.map +1 -0
  53. package/package.json +68 -0
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.orbotoTrigger = exports.ORBOTO_WEBHOOK_EVENTS = void 0;
4
+ exports.signatureMatches = signatureMatches;
5
+ const node_crypto_1 = require("node:crypto");
6
+ const n8n_workflow_1 = require("n8n-workflow");
7
+ const GenericFunctions_1 = require("./shared/GenericFunctions");
8
+ /** The orboto webhook event catalog (16 events), versioned with this package. */
9
+ exports.ORBOTO_WEBHOOK_EVENTS = [
10
+ 'ticket.created',
11
+ 'ticket.updated',
12
+ 'ticket.deleted',
13
+ 'ticket.ready',
14
+ 'ticket.checklist_item.completed',
15
+ 'comment.created',
16
+ 'comment.updated',
17
+ 'comment.deleted',
18
+ 'project.member_added',
19
+ 'project.member_removed',
20
+ 'milestone.created',
21
+ 'milestone.updated',
22
+ 'version.released',
23
+ 'symphony.candidates_changed',
24
+ 'inbound.signal.received',
25
+ 'agent.escalation_raised',
26
+ ];
27
+ function selectedEvents(context) {
28
+ const chosen = context.getNodeParameter('events', 0, []) ?? [];
29
+ const extra = String(context.getNodeParameter('additionalEvents', 0, '') ?? '');
30
+ const extras = extra
31
+ .split(',')
32
+ .map((e) => e.trim())
33
+ .filter(Boolean);
34
+ return [...new Set([...chosen, ...extras])];
35
+ }
36
+ /** Constant-time hex comparison; length-mismatched input is rejected outright. */
37
+ function signatureMatches(received, expectedHex) {
38
+ if (!received)
39
+ return false;
40
+ const match = /^sha256=([0-9a-fA-F]{64})$/.exec(received.trim());
41
+ if (!match)
42
+ return false;
43
+ const receivedBuf = Buffer.from(match[1].toLowerCase(), 'utf8');
44
+ const expectedBuf = Buffer.from(expectedHex.toLowerCase(), 'utf8');
45
+ return receivedBuf.length === expectedBuf.length && (0, node_crypto_1.timingSafeEqual)(receivedBuf, expectedBuf);
46
+ }
47
+ class orbotoTrigger {
48
+ description = {
49
+ displayName: 'orboto Trigger',
50
+ name: 'orbotoTrigger',
51
+ icon: 'file:orbotoTrigger.svg',
52
+ group: ['trigger'],
53
+ version: 1,
54
+ subtitle: '={{$parameter["events"].join(", ")}}',
55
+ description: 'Starts a workflow when events happen in orboto (ticket created/updated/deleted/ready, comments, milestones, agent escalations and more). Deliveries are HMAC-verified.',
56
+ defaults: {
57
+ name: 'orboto Trigger',
58
+ },
59
+ inputs: [],
60
+ outputs: ['main'],
61
+ credentials: [
62
+ {
63
+ name: 'orbotoApi',
64
+ required: true,
65
+ displayOptions: {
66
+ show: {
67
+ authType: ['apiKey'],
68
+ },
69
+ },
70
+ },
71
+ {
72
+ name: 'orbotoOAuth2Api',
73
+ required: true,
74
+ displayOptions: {
75
+ show: {
76
+ authType: ['oauth'],
77
+ },
78
+ },
79
+ },
80
+ ],
81
+ webhooks: [
82
+ {
83
+ name: 'default',
84
+ httpMethod: 'POST',
85
+ path: 'webhook',
86
+ responseMode: 'onReceived',
87
+ },
88
+ ],
89
+ properties: [
90
+ {
91
+ displayName: 'Authentication',
92
+ name: 'authType',
93
+ type: 'options',
94
+ noDataExpression: true,
95
+ options: [
96
+ {
97
+ name: 'API Key',
98
+ value: 'apiKey',
99
+ },
100
+ {
101
+ name: 'OAuth2',
102
+ value: 'oauth',
103
+ },
104
+ ],
105
+ default: 'apiKey',
106
+ description: 'Which orboto credential style this node uses',
107
+ },
108
+ {
109
+ displayName: 'Project Name or ID',
110
+ name: 'project',
111
+ type: 'options',
112
+ typeOptions: {
113
+ loadOptionsMethod: 'getProjects',
114
+ },
115
+ required: true,
116
+ default: '',
117
+ description: 'The orboto project whose events to listen to (webhooks are project-scoped). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
118
+ },
119
+ {
120
+ displayName: 'Events',
121
+ name: 'events',
122
+ type: 'multiOptions',
123
+ required: true,
124
+ options: exports.ORBOTO_WEBHOOK_EVENTS.map((value) => ({ name: value, value })),
125
+ default: ['ticket.created'],
126
+ description: 'The events that fire this trigger',
127
+ },
128
+ {
129
+ displayName: 'Additional Events',
130
+ name: 'additionalEvents',
131
+ type: 'string',
132
+ default: '',
133
+ placeholder: 'some.future.event, another.event',
134
+ description: 'Comma-separated event types beyond the catalog above, for orboto versions newer than this package',
135
+ },
136
+ ],
137
+ };
138
+ webhookMethods = {
139
+ default: {
140
+ /** n8n calls this on activation: is a matching webhook already registered? */
141
+ async checkExists() {
142
+ const webhookData = this.getWorkflowStaticData('node');
143
+ const webhookUrl = this.getNodeWebhookUrl('default');
144
+ const client = await (0, GenericFunctions_1.getLoadOptionsClient)(this);
145
+ const projectId = String(this.getNodeParameter('project', 0));
146
+ const registered = (await client.request(`/projects/${encodeURIComponent(projectId)}/webhooks`));
147
+ const list = Array.isArray(registered) ? registered : [];
148
+ const match = list.find((w) => w.url === webhookUrl);
149
+ if (!match)
150
+ return false;
151
+ // A matching registration is only reusable when we still hold its
152
+ // secret (it is returned once, at creation). Otherwise delete the
153
+ // orphan so create() can register a fresh one with a new secret.
154
+ const wanted = selectedEvents(this);
155
+ const eventsMatch = Array.isArray(match.events) &&
156
+ match.events.length === wanted.length &&
157
+ wanted.every((e) => match.events.includes(e));
158
+ if (webhookData.webhookId === match.id && webhookData.secret && eventsMatch) {
159
+ return true;
160
+ }
161
+ await client.request(`/webhooks/${match.id}`, { method: 'DELETE' });
162
+ delete webhookData.webhookId;
163
+ delete webhookData.secret;
164
+ return false;
165
+ },
166
+ /** n8n calls this on activation when checkExists returned false. */
167
+ async create() {
168
+ const webhookData = this.getWorkflowStaticData('node');
169
+ const webhookUrl = this.getNodeWebhookUrl('default');
170
+ if (!webhookUrl) {
171
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No webhook URL available - set the WEBHOOK_URL environment variable in n8n');
172
+ }
173
+ const client = await (0, GenericFunctions_1.getLoadOptionsClient)(this);
174
+ const projectId = String(this.getNodeParameter('project', 0));
175
+ const events = selectedEvents(this);
176
+ if (events.length === 0) {
177
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Select at least one event for the trigger');
178
+ }
179
+ const created = await client.request(`/projects/${encodeURIComponent(projectId)}/webhooks`, {
180
+ method: 'POST',
181
+ body: {
182
+ // The default (orboto-shaped) payload format is the only one
183
+ // that is HMAC-signed - vendor shapes skip the signature.
184
+ payloadFormat: 'generic',
185
+ name: `n8n workflow ${this.getWorkflow().id} - ${this.getNode().name}`.slice(0, 100),
186
+ url: webhookUrl,
187
+ events,
188
+ },
189
+ });
190
+ webhookData.webhookId = created.id;
191
+ webhookData.secret = created.secret;
192
+ return true;
193
+ },
194
+ /** n8n calls this on deactivation. */
195
+ async delete() {
196
+ const webhookData = this.getWorkflowStaticData('node');
197
+ const client = await (0, GenericFunctions_1.getLoadOptionsClient)(this);
198
+ if (webhookData.webhookId) {
199
+ await client.request(`/webhooks/${webhookData.webhookId}`, { method: 'DELETE' });
200
+ }
201
+ delete webhookData.webhookId;
202
+ delete webhookData.secret;
203
+ return true;
204
+ },
205
+ },
206
+ };
207
+ async webhook() {
208
+ const bodyData = this.getBodyData();
209
+ const req = this.getRequestObject();
210
+ const headerData = this.getHeaderData();
211
+ const webhookData = this.getWorkflowStaticData('node');
212
+ const secret = webhookData.secret;
213
+ if (!secret) {
214
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'The stored webhook secret is missing', {
215
+ description: 'Deactivate and re-activate the workflow so n8n can re-register the webhook with orboto.',
216
+ });
217
+ }
218
+ const received = headerData['x-orboto-signature'];
219
+ const raw = req.rawBody;
220
+ if (!raw || !signatureMatches(received, (0, node_crypto_1.createHmac)('sha256', secret).update(raw).digest('hex'))) {
221
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), new Error('Invalid webhook signature'), {
222
+ description: 'Delivery rejected: the X-Orboto-Signature header does not match the body (missing, forged, or wrong secret).',
223
+ httpCode: '401',
224
+ });
225
+ }
226
+ const event = String(headerData['x-orboto-event'] ?? '');
227
+ const subscribed = selectedEvents(this);
228
+ if (event && !subscribed.includes(event)) {
229
+ // orboto should only deliver subscribed events; ignore anything else.
230
+ return {};
231
+ }
232
+ const payload = bodyData && typeof bodyData === 'object' && Object.keys(bodyData).length > 0
233
+ ? { ...bodyData }
234
+ : { raw: raw.toString('utf8') };
235
+ if (event && payload.event === undefined)
236
+ payload.event = event;
237
+ return {
238
+ workflowData: [[{ json: payload }]],
239
+ };
240
+ }
241
+ }
242
+ exports.orbotoTrigger = orbotoTrigger;
243
+ //# sourceMappingURL=orbotoTrigger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MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YACvH,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,KAAK,CAAC,2BAA2B,CAAU,EAAE;gBACvF,WAAW,EACV,8GAA8G;gBAC/G,QAAQ,EAAE,KAAK;aACf,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC;QACzD,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,KAAK,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1C,sEAAsE;YACtE,OAAO,EAAE,CAAC;QACX,CAAC;QAED,MAAM,OAAO,GACZ,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC;YAC3E,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE;YACjB,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,IAAI,KAAK,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS;YAAE,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;QAEhE,OAAO;YACN,YAAY,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;SACnC,CAAC;IACH,CAAC;CACD;AArND,sCAqNC"}
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
2
+ <circle cx="12" cy="12" r="10" fill="#4f46e5"/>
3
+ <circle cx="12" cy="12" r="4.5" fill="#ffffff"/>
4
+ </svg>
@@ -0,0 +1,7 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ /**
3
+ * Agent resource - the n8n-to-AI-agent bridge (added in the 2026-08-29 design
4
+ * review): notify an agent identity, fetch its inbox, acknowledge messages.
5
+ */
6
+ export declare const agentOperations: INodeProperties[];
7
+ export declare function executeAgentOperation(context: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.agentOperations = void 0;
4
+ exports.executeAgentOperation = executeAgentOperation;
5
+ const GenericFunctions_1 = require("../../shared/GenericFunctions");
6
+ /**
7
+ * Agent resource - the n8n-to-AI-agent bridge (added in the 2026-08-29 design
8
+ * review): notify an agent identity, fetch its inbox, acknowledge messages.
9
+ */
10
+ exports.agentOperations = [
11
+ {
12
+ displayName: 'Operation',
13
+ name: 'operation',
14
+ type: 'options',
15
+ noDataExpression: true,
16
+ displayOptions: { show: { resource: ['agent'] } },
17
+ required: true,
18
+ default: 'notify',
19
+ options: [
20
+ { name: 'Ack Messages', value: 'ack' },
21
+ { name: 'Get Messages', value: 'getMessages' },
22
+ { name: 'Notify', value: 'notify' },
23
+ ].sort((a, b) => a.value.localeCompare(b.value)),
24
+ },
25
+ {
26
+ displayName: 'Target Email',
27
+ name: 'targetEmail',
28
+ type: 'string',
29
+ required: true,
30
+ displayOptions: { show: { resource: ['agent'], operation: ['notify'] } },
31
+ default: '',
32
+ placeholder: 'agent@orboto.io',
33
+ description: 'Email of the agent identity to notify',
34
+ },
35
+ {
36
+ displayName: 'Subject',
37
+ name: 'subject',
38
+ type: 'string',
39
+ required: true,
40
+ displayOptions: { show: { resource: ['agent'], operation: ['notify'] } },
41
+ default: '',
42
+ description: 'Subject line (max 200 characters)',
43
+ },
44
+ {
45
+ displayName: 'Kind',
46
+ name: 'kind',
47
+ type: 'options',
48
+ options: [
49
+ { name: 'Info', value: 'info' },
50
+ { name: 'Request', value: 'request' },
51
+ { name: 'Complete', value: 'complete' },
52
+ { name: 'Error', value: 'error' },
53
+ ],
54
+ displayOptions: { show: { resource: ['agent'], operation: ['notify'] } },
55
+ default: 'info',
56
+ description: 'Info is FYI, request expects an answer, complete closes a request, error reports failure',
57
+ },
58
+ {
59
+ displayName: 'Payload (JSON)',
60
+ name: 'payloadJson',
61
+ type: 'json',
62
+ displayOptions: { show: { resource: ['agent'], operation: ['notify'] } },
63
+ default: '',
64
+ description: 'Structured payload for the agent to read',
65
+ },
66
+ {
67
+ displayName: 'Thread ID',
68
+ name: 'threadId',
69
+ type: 'string',
70
+ displayOptions: { show: { resource: ['agent'], operation: ['notify'] } },
71
+ default: '',
72
+ description: 'Thread ID to chain a conversation',
73
+ },
74
+ {
75
+ displayName: 'Project Scope',
76
+ name: 'project',
77
+ type: 'string',
78
+ displayOptions: { show: { resource: ['agent'], operation: ['notify', 'getMessages'] } },
79
+ default: '',
80
+ placeholder: 'ONN',
81
+ description: 'Project key so the message routes to the right session',
82
+ },
83
+ {
84
+ displayName: 'Sender Reference',
85
+ name: 'senderRef',
86
+ type: 'string',
87
+ displayOptions: { show: { resource: ['agent'], operation: ['notify'] } },
88
+ default: '',
89
+ description: 'Stable reference of the sender (e.g. the workflow name)',
90
+ },
91
+ {
92
+ displayName: 'Include Already-Delivered',
93
+ name: 'all',
94
+ type: 'boolean',
95
+ displayOptions: { show: { resource: ['agent'], operation: ['getMessages'] } },
96
+ default: false,
97
+ description: 'Whether to include messages the agent already received',
98
+ },
99
+ {
100
+ displayName: 'Limit',
101
+ name: 'limit',
102
+ type: 'number',
103
+ typeOptions: { numberPrecision: 0 },
104
+ displayOptions: { show: { resource: ['agent'], operation: ['getMessages'] } },
105
+ default: 50,
106
+ description: 'Max number of results to return',
107
+ },
108
+ {
109
+ displayName: 'Exclude Reference',
110
+ name: 'excludeRef',
111
+ type: 'string',
112
+ displayOptions: { show: { resource: ['agent'], operation: ['getMessages'] } },
113
+ default: '',
114
+ description: 'Skip messages sent from this sender reference',
115
+ },
116
+ {
117
+ displayName: 'Message IDs',
118
+ name: 'ids',
119
+ type: 'string',
120
+ required: true,
121
+ displayOptions: { show: { resource: ['agent'], operation: ['ack'] } },
122
+ default: '',
123
+ description: 'Comma-separated message IDs to acknowledge',
124
+ },
125
+ ];
126
+ async function executeAgentOperation(context, itemIndex) {
127
+ const operation = context.getNodeParameter('operation', itemIndex);
128
+ try {
129
+ const client = await (0, GenericFunctions_1.getClient)(context);
130
+ switch (operation) {
131
+ case 'notify': {
132
+ const body = {
133
+ targetEmail: context.getNodeParameter('targetEmail', itemIndex),
134
+ subject: context.getNodeParameter('subject', itemIndex),
135
+ kind: context.getNodeParameter('kind', itemIndex, 'info'),
136
+ };
137
+ const payloadJson = context.getNodeParameter('payloadJson', itemIndex, '');
138
+ if (payloadJson !== '' && payloadJson !== undefined && payloadJson !== null) {
139
+ body.payload = typeof payloadJson === 'string' ? JSON.parse(payloadJson) : payloadJson;
140
+ }
141
+ const threadId = context.getNodeParameter('threadId', itemIndex, '');
142
+ if (threadId !== '')
143
+ body.threadId = threadId;
144
+ const project = context.getNodeParameter('project', itemIndex, '');
145
+ if (project !== '')
146
+ body.project = project;
147
+ const senderRef = context.getNodeParameter('senderRef', itemIndex, '');
148
+ if (senderRef !== '')
149
+ body.senderRef = senderRef;
150
+ const sent = await client.request('/v1/agent/notify', { method: 'POST', body });
151
+ return [(0, GenericFunctions_1.jsonOutput)(sent)];
152
+ }
153
+ case 'getMessages': {
154
+ const messages = await client.request('/v1/agent/messages', {
155
+ query: {
156
+ all: context.getNodeParameter('all', itemIndex, false) || undefined,
157
+ limit: context.getNodeParameter('limit', itemIndex, 20),
158
+ project: context.getNodeParameter('project', itemIndex, '') || undefined,
159
+ excludeRef: context.getNodeParameter('excludeRef', itemIndex, '') || undefined,
160
+ },
161
+ });
162
+ return [(0, GenericFunctions_1.jsonOutput)(messages)];
163
+ }
164
+ case 'ack': {
165
+ const ids = String(context.getNodeParameter('ids', itemIndex) ?? '')
166
+ .split(',')
167
+ .map((id) => id.trim())
168
+ .filter(Boolean);
169
+ const result = await client.request('/v1/agent/messages/ack', {
170
+ method: 'POST',
171
+ body: { ids },
172
+ });
173
+ return [(0, GenericFunctions_1.jsonOutput)(result)];
174
+ }
175
+ default:
176
+ throw new Error(`Unknown agent operation: ${operation}`);
177
+ }
178
+ }
179
+ catch (error) {
180
+ throw (0, GenericFunctions_1.toNodeError)(context.getNode(), error, itemIndex);
181
+ }
182
+ }
183
+ //# sourceMappingURL=agent.resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.resource.js","sourceRoot":"","sources":["../../../../../nodes/orboto/resources/agent/agent.resource.ts"],"names":[],"mappings":";;;AA4HA,sDAwDC;AAnLD,oEAAmF;AAEnF;;;GAGG;AACU,QAAA,eAAe,GAAsB;IACjD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;QACjD,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAE;YACtC,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE;YAC9C,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;SACnC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;KAChD;IACD;QACC,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SA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AC,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,EAAE,CAAW;wBACjE,OAAO,EAAG,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAY,IAAI,SAAS;wBACpF,UAAU,EAAG,OAAO,CAAC,gBAAgB,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,CAAY,IAAI,SAAS;qBAC1F;iBACD,CAAC,CAAC;gBACH,OAAO,CAAC,IAAA,6BAAU,EAAC,QAAQ,CAAC,CAAC,CAAC;YAC/B,CAAC;YACD,KAAK,KAAK,CAAC,CAAC,CAAC;gBACZ,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;qBAClE,KAAK,CAAC,GAAG,CAAC;qBACV,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;qBACtB,MAAM,CAAC,OAAO,CAAC,CAAC;gBAClB,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,wBAAwB,EAAE;oBAC7D,MAAM,EAAE,MAAM;oBACd,IAAI,EAAE,EAAE,GAAG,EAAE;iBACb,CAAC,CAAC;gBACH,OAAO,CAAC,IAAA,6BAAU,EAAC,MAAM,CAAC,CAAC,CAAC;YAC7B,CAAC;YACD;gBACC,MAAM,IAAI,KAAK,CAAC,4BAA4B,SAAS,EAAE,CAAC,CAAC;QAC3D,CAAC;IACF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,IAAA,8BAAW,EAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACxD,CAAC;AACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const docOperations: INodeProperties[];
3
+ export declare function executeDocOperation(context: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData[]>;