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.
- package/LICENSE +21 -0
- package/README.md +107 -0
- package/dist/credentials/orbotoApi.credentials.d.ts +34 -0
- package/dist/credentials/orbotoApi.credentials.js +76 -0
- package/dist/credentials/orbotoApi.credentials.js.map +1 -0
- package/dist/credentials/orbotoOAuth2Api.credentials.d.ts +10 -0
- package/dist/credentials/orbotoOAuth2Api.credentials.js +73 -0
- package/dist/credentials/orbotoOAuth2Api.credentials.js.map +1 -0
- package/dist/nodes/index.d.ts +2 -0
- package/dist/nodes/index.js +19 -0
- package/dist/nodes/index.js.map +1 -0
- package/dist/nodes/orboto/orboto.node.d.ts +18 -0
- package/dist/nodes/orboto/orboto.node.js +192 -0
- package/dist/nodes/orboto/orboto.node.js.map +1 -0
- package/dist/nodes/orboto/orboto.svg +4 -0
- package/dist/nodes/orboto/orbotoTrigger.node.d.ts +19 -0
- package/dist/nodes/orboto/orbotoTrigger.node.js +243 -0
- package/dist/nodes/orboto/orbotoTrigger.node.js.map +1 -0
- package/dist/nodes/orboto/orbotoTrigger.svg +4 -0
- package/dist/nodes/orboto/resources/agent/agent.resource.d.ts +7 -0
- package/dist/nodes/orboto/resources/agent/agent.resource.js +183 -0
- package/dist/nodes/orboto/resources/agent/agent.resource.js.map +1 -0
- package/dist/nodes/orboto/resources/doc/doc.resource.d.ts +3 -0
- package/dist/nodes/orboto/resources/doc/doc.resource.js +206 -0
- package/dist/nodes/orboto/resources/doc/doc.resource.js.map +1 -0
- package/dist/nodes/orboto/resources/milestone/milestone.resource.d.ts +3 -0
- package/dist/nodes/orboto/resources/milestone/milestone.resource.js +197 -0
- package/dist/nodes/orboto/resources/milestone/milestone.resource.js.map +1 -0
- package/dist/nodes/orboto/resources/misc/misc.resources.d.ts +8 -0
- package/dist/nodes/orboto/resources/misc/misc.resources.js +232 -0
- package/dist/nodes/orboto/resources/misc/misc.resources.js.map +1 -0
- package/dist/nodes/orboto/resources/project/project.resource.d.ts +3 -0
- package/dist/nodes/orboto/resources/project/project.resource.js +144 -0
- package/dist/nodes/orboto/resources/project/project.resource.js.map +1 -0
- package/dist/nodes/orboto/resources/ticket/Ticket.resource.d.ts +11 -0
- package/dist/nodes/orboto/resources/ticket/Ticket.resource.js +1072 -0
- package/dist/nodes/orboto/resources/ticket/Ticket.resource.js.map +1 -0
- package/dist/nodes/orboto/resources/time/time.resource.d.ts +3 -0
- package/dist/nodes/orboto/resources/time/time.resource.js +140 -0
- package/dist/nodes/orboto/resources/time/time.resource.js.map +1 -0
- package/dist/nodes/orboto/shared/ApiClient.d.ts +97 -0
- package/dist/nodes/orboto/shared/ApiClient.js +261 -0
- package/dist/nodes/orboto/shared/ApiClient.js.map +1 -0
- package/dist/nodes/orboto/shared/GenericFunctions.d.ts +47 -0
- package/dist/nodes/orboto/shared/GenericFunctions.js +186 -0
- package/dist/nodes/orboto/shared/GenericFunctions.js.map +1 -0
- package/dist/nodes/orboto/shared/Types.d.ts +54 -0
- package/dist/nodes/orboto/shared/Types.js +10 -0
- package/dist/nodes/orboto/shared/Types.js.map +1 -0
- package/dist/nodes/orboto/shared/loadOptions.d.ts +17 -0
- package/dist/nodes/orboto/shared/loadOptions.js +85 -0
- package/dist/nodes/orboto/shared/loadOptions.js.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.docOperations = void 0;
|
|
4
|
+
exports.executeDocOperation = executeDocOperation;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const ApiClient_1 = require("../../shared/ApiClient");
|
|
7
|
+
const GenericFunctions_1 = require("../../shared/GenericFunctions");
|
|
8
|
+
const SHOW = { resource: ['doc'] };
|
|
9
|
+
exports.docOperations = [
|
|
10
|
+
{
|
|
11
|
+
displayName: 'Operation',
|
|
12
|
+
name: 'operation',
|
|
13
|
+
type: 'options',
|
|
14
|
+
noDataExpression: true,
|
|
15
|
+
displayOptions: { show: SHOW },
|
|
16
|
+
required: true,
|
|
17
|
+
default: 'getAll',
|
|
18
|
+
options: [
|
|
19
|
+
{ name: 'Ask Docs (RAG)', value: 'askDocs' },
|
|
20
|
+
{ name: 'Create', value: 'create' },
|
|
21
|
+
{ name: 'Get', value: 'get' },
|
|
22
|
+
{ name: 'Get Many', value: 'getAll' },
|
|
23
|
+
{ name: 'Ingest URL', value: 'ingestUrl' },
|
|
24
|
+
{ name: 'Update', value: 'update' },
|
|
25
|
+
].sort((a, b) => a.value.localeCompare(b.value)),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Space Name or ID',
|
|
29
|
+
name: 'space',
|
|
30
|
+
type: 'options',
|
|
31
|
+
typeOptions: {
|
|
32
|
+
loadOptionsMethod: 'getSpaces',
|
|
33
|
+
},
|
|
34
|
+
required: true,
|
|
35
|
+
displayOptions: { show: { ...SHOW, operation: ['create', 'getAll', 'ingestUrl'] } },
|
|
36
|
+
default: '',
|
|
37
|
+
description: 'The wiki space. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: 'Doc Key or ID',
|
|
41
|
+
name: 'doc',
|
|
42
|
+
type: 'string',
|
|
43
|
+
required: true,
|
|
44
|
+
displayOptions: { show: { ...SHOW, operation: ['get', 'update'] } },
|
|
45
|
+
default: '',
|
|
46
|
+
description: 'Doc key (DOC-42) or ID',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Title',
|
|
50
|
+
name: 'title',
|
|
51
|
+
type: 'string',
|
|
52
|
+
required: true,
|
|
53
|
+
displayOptions: { show: { ...SHOW, operation: ['create'] } },
|
|
54
|
+
default: '',
|
|
55
|
+
description: 'Doc title',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
displayName: 'Content',
|
|
59
|
+
name: 'content',
|
|
60
|
+
type: 'string',
|
|
61
|
+
typeOptions: { rows: 8 },
|
|
62
|
+
displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
|
|
63
|
+
default: '',
|
|
64
|
+
description: 'Doc content (Markdown)',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
displayName: 'Visibility',
|
|
68
|
+
name: 'visibility',
|
|
69
|
+
type: 'options',
|
|
70
|
+
options: ['public', 'workspace', 'members', 'specific'].map((v) => ({ name: v, value: v })),
|
|
71
|
+
displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
|
|
72
|
+
default: 'workspace',
|
|
73
|
+
description: 'Who can read the doc',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
displayName: 'Question',
|
|
77
|
+
name: 'question',
|
|
78
|
+
type: 'string',
|
|
79
|
+
typeOptions: { rows: 4 },
|
|
80
|
+
required: true,
|
|
81
|
+
displayOptions: { show: { ...SHOW, operation: ['askDocs'] } },
|
|
82
|
+
default: '',
|
|
83
|
+
description: 'Question to answer from the docs (RAG)',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
displayName: 'Limit Results',
|
|
87
|
+
name: 'limit',
|
|
88
|
+
type: 'number',
|
|
89
|
+
typeOptions: { numberPrecision: 0 },
|
|
90
|
+
displayOptions: { show: { ...SHOW, operation: ['askDocs'] } },
|
|
91
|
+
default: 50,
|
|
92
|
+
description: 'Max number of results to return',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'URL',
|
|
96
|
+
name: 'url',
|
|
97
|
+
type: 'string',
|
|
98
|
+
required: true,
|
|
99
|
+
displayOptions: { show: { ...SHOW, operation: ['ingestUrl'] } },
|
|
100
|
+
default: '',
|
|
101
|
+
placeholder: 'https://example.com/article',
|
|
102
|
+
description: 'URL to ingest as a new doc in the space',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
displayName: 'Raw HTML',
|
|
106
|
+
name: 'html',
|
|
107
|
+
type: 'string',
|
|
108
|
+
displayOptions: { show: { ...SHOW, operation: ['ingestUrl'] } },
|
|
109
|
+
default: '',
|
|
110
|
+
description: 'Optional pre-fetched HTML to ingest instead of letting orboto fetch the URL',
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
async function resolveDocId(client, doc) {
|
|
114
|
+
const value = doc.trim();
|
|
115
|
+
if ((0, GenericFunctions_1.isUuid)(value))
|
|
116
|
+
return value;
|
|
117
|
+
const found = await client.request(`/docs/by-key/${encodeURIComponent(value)}`);
|
|
118
|
+
return found.id;
|
|
119
|
+
}
|
|
120
|
+
async function executeDocOperation(context, itemIndex) {
|
|
121
|
+
const node = context.getNode();
|
|
122
|
+
const operation = context.getNodeParameter('operation', itemIndex);
|
|
123
|
+
try {
|
|
124
|
+
const client = await (0, GenericFunctions_1.getClient)(context);
|
|
125
|
+
switch (operation) {
|
|
126
|
+
case 'create': {
|
|
127
|
+
const space = String(context.getNodeParameter('space', itemIndex));
|
|
128
|
+
const body = {
|
|
129
|
+
title: context.getNodeParameter('title', itemIndex),
|
|
130
|
+
};
|
|
131
|
+
const content = context.getNodeParameter('content', itemIndex, '');
|
|
132
|
+
if (content !== '')
|
|
133
|
+
body.content = content;
|
|
134
|
+
const visibility = context.getNodeParameter('visibility', itemIndex, '');
|
|
135
|
+
if (visibility !== '')
|
|
136
|
+
body.visibility = visibility;
|
|
137
|
+
const created = await client.request(`/spaces/${encodeURIComponent(space)}/docs`, {
|
|
138
|
+
method: 'POST',
|
|
139
|
+
body,
|
|
140
|
+
});
|
|
141
|
+
return [(0, GenericFunctions_1.jsonOutput)(created)];
|
|
142
|
+
}
|
|
143
|
+
case 'get': {
|
|
144
|
+
const doc = String(context.getNodeParameter('doc', itemIndex));
|
|
145
|
+
const id = await resolveDocId(client, doc);
|
|
146
|
+
const found = await client.request(`/docs/${id}`);
|
|
147
|
+
return [(0, GenericFunctions_1.jsonOutput)(found)];
|
|
148
|
+
}
|
|
149
|
+
case 'getAll': {
|
|
150
|
+
const space = String(context.getNodeParameter('space', itemIndex));
|
|
151
|
+
const docs = await client.request(`/spaces/${encodeURIComponent(space)}/docs`);
|
|
152
|
+
const items = Array.isArray(docs) ? docs : [];
|
|
153
|
+
return items.map(GenericFunctions_1.jsonOutput);
|
|
154
|
+
}
|
|
155
|
+
case 'update': {
|
|
156
|
+
const doc = String(context.getNodeParameter('doc', itemIndex));
|
|
157
|
+
const id = await resolveDocId(client, doc);
|
|
158
|
+
const body = {};
|
|
159
|
+
for (const field of ['title', 'content', 'visibility']) {
|
|
160
|
+
const value = context.getNodeParameter(field, itemIndex, '');
|
|
161
|
+
if (value !== '')
|
|
162
|
+
body[field] = value;
|
|
163
|
+
}
|
|
164
|
+
const updated = await client.request(`/docs/${id}`, { method: 'PATCH', body });
|
|
165
|
+
return [(0, GenericFunctions_1.jsonOutput)(updated)];
|
|
166
|
+
}
|
|
167
|
+
case 'askDocs': {
|
|
168
|
+
const question = context.getNodeParameter('question', itemIndex);
|
|
169
|
+
const limit = context.getNodeParameter('limit', itemIndex, 5);
|
|
170
|
+
const body = { question, limit };
|
|
171
|
+
try {
|
|
172
|
+
const answer = await client.request('/ai/ask-docs', { method: 'POST', body });
|
|
173
|
+
return [(0, GenericFunctions_1.jsonOutput)(answer)];
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
// Surface an embeddings/configuration problem as a clear message
|
|
177
|
+
// instead of a bare 400 (ticket: ask-docs must degrade gracefully).
|
|
178
|
+
if (error instanceof ApiClient_1.ApiError && error.status === 400) {
|
|
179
|
+
throw new n8n_workflow_1.NodeOperationError(node, `Ask Docs failed: ${error.message}. If the error mentions embeddings, the instance has no embedding provider configured - ask-docs requires one.`, { itemIndex });
|
|
180
|
+
}
|
|
181
|
+
throw error;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
case 'ingestUrl': {
|
|
185
|
+
const space = String(context.getNodeParameter('space', itemIndex));
|
|
186
|
+
const body = {
|
|
187
|
+
url: context.getNodeParameter('url', itemIndex),
|
|
188
|
+
};
|
|
189
|
+
const html = context.getNodeParameter('html', itemIndex, '');
|
|
190
|
+
if (html !== '')
|
|
191
|
+
body.html = html;
|
|
192
|
+
const ingested = await client.request(`/spaces/${encodeURIComponent(space)}/docs/ingest-url`, {
|
|
193
|
+
method: 'POST',
|
|
194
|
+
body,
|
|
195
|
+
});
|
|
196
|
+
return [(0, GenericFunctions_1.jsonOutput)(ingested)];
|
|
197
|
+
}
|
|
198
|
+
default:
|
|
199
|
+
throw new Error(`Unknown doc operation: ${operation}`);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
throw (0, GenericFunctions_1.toNodeError)(node, error, itemIndex);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=doc.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.resource.js","sourceRoot":"","sources":["../../../../../nodes/orboto/resources/doc/doc.resource.ts"],"names":[],"mappings":";;;AA2HA,kDAuFC;AAjND,+CAAkD;AAClD,sDAAkD;AAClD,oEAA2F;AAE3F,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;AAEtB,QAAA,aAAa,GAAsB;IAC/C;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;QAC9B,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE;YAC5C,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;YACnC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;YAC7B,E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AAI;iBACJ,CAAC,CAAC;gBACH,OAAO,CAAC,IAAA,6BAAU,EAAC,QAAQ,CAAC,CAAC,CAAC;YAC/B,CAAC;YACD;gBACC,MAAM,IAAI,KAAK,CAAC,0BAA0B,SAAS,EAAE,CAAC,CAAC;QACzD,CAAC;IACF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,IAAA,8BAAW,EAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC3C,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare const milestoneOperations: INodeProperties[];
|
|
3
|
+
export declare function executeMilestoneOperation(context: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData[]>;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.milestoneOperations = void 0;
|
|
4
|
+
exports.executeMilestoneOperation = executeMilestoneOperation;
|
|
5
|
+
const GenericFunctions_1 = require("../../shared/GenericFunctions");
|
|
6
|
+
const SHOW = { resource: ['milestone'] };
|
|
7
|
+
const MILESTONE_PROJECT_OPERATIONS = ['close', 'create', 'get', 'getAll', 'update'];
|
|
8
|
+
exports.milestoneOperations = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Operation',
|
|
11
|
+
name: 'operation',
|
|
12
|
+
type: 'options',
|
|
13
|
+
noDataExpression: true,
|
|
14
|
+
displayOptions: { show: SHOW },
|
|
15
|
+
required: true,
|
|
16
|
+
default: 'getAll',
|
|
17
|
+
options: [
|
|
18
|
+
{ name: 'Close', value: 'close' },
|
|
19
|
+
{ name: 'Create', value: 'create' },
|
|
20
|
+
{ name: 'Get', value: 'get' },
|
|
21
|
+
{ name: 'Get Many', value: 'getAll' },
|
|
22
|
+
{ name: 'Update', value: 'update' },
|
|
23
|
+
].sort((a, b) => a.value.localeCompare(b.value)),
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
displayName: 'Project Name or ID',
|
|
27
|
+
name: 'project',
|
|
28
|
+
type: 'options',
|
|
29
|
+
typeOptions: {
|
|
30
|
+
loadOptionsMethod: 'getProjects',
|
|
31
|
+
},
|
|
32
|
+
required: true,
|
|
33
|
+
displayOptions: { show: { ...SHOW, operation: MILESTONE_PROJECT_OPERATIONS } },
|
|
34
|
+
default: '',
|
|
35
|
+
description: 'The orboto project the milestone belongs to. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
displayName: 'Milestone Key or ID',
|
|
39
|
+
name: 'milestone',
|
|
40
|
+
type: 'string',
|
|
41
|
+
required: true,
|
|
42
|
+
displayOptions: { show: { ...SHOW, operation: ['close', 'get', 'update'] } },
|
|
43
|
+
default: '',
|
|
44
|
+
description: 'Milestone key (M-3) or ID',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Name',
|
|
48
|
+
name: 'name',
|
|
49
|
+
type: 'string',
|
|
50
|
+
required: true,
|
|
51
|
+
displayOptions: { show: { ...SHOW, operation: ['create'] } },
|
|
52
|
+
default: '',
|
|
53
|
+
description: 'Milestone name',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Milestone Key',
|
|
57
|
+
name: 'milestoneKey',
|
|
58
|
+
type: 'string',
|
|
59
|
+
typeOptions: { password: true },
|
|
60
|
+
displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
|
|
61
|
+
default: '',
|
|
62
|
+
description: 'Optional custom key for the milestone (uppercase, unique per project)',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
displayName: 'Start Date',
|
|
66
|
+
name: 'startDate',
|
|
67
|
+
type: 'string',
|
|
68
|
+
placeholder: 'YYYY-MM-DD',
|
|
69
|
+
displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
|
|
70
|
+
default: '',
|
|
71
|
+
description: 'Start date (YYYY-MM-DD)',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'End Date',
|
|
75
|
+
name: 'endDate',
|
|
76
|
+
type: 'string',
|
|
77
|
+
placeholder: 'YYYY-MM-DD',
|
|
78
|
+
displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
|
|
79
|
+
default: '',
|
|
80
|
+
description: 'End date (YYYY-MM-DD)',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
displayName: 'Status',
|
|
84
|
+
name: 'status',
|
|
85
|
+
type: 'options',
|
|
86
|
+
options: ['active', 'completed', 'archived'].map((v) => ({ name: v, value: v })),
|
|
87
|
+
displayOptions: { show: { ...SHOW, operation: ['update'] } },
|
|
88
|
+
default: 'active',
|
|
89
|
+
description: 'Milestone status',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Budget Amount',
|
|
93
|
+
name: 'budgetAmount',
|
|
94
|
+
type: 'string',
|
|
95
|
+
displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
|
|
96
|
+
default: '',
|
|
97
|
+
description: 'Planned budget amount',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
displayName: 'Budget Hours',
|
|
101
|
+
name: 'budgetHours',
|
|
102
|
+
type: 'string',
|
|
103
|
+
displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
|
|
104
|
+
default: '',
|
|
105
|
+
description: 'Planned budget hours',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
displayName: 'Private',
|
|
109
|
+
name: 'isPrivate',
|
|
110
|
+
type: 'boolean',
|
|
111
|
+
displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
|
|
112
|
+
default: false,
|
|
113
|
+
description: 'Whether the milestone is private',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
displayName: 'Include Closed',
|
|
117
|
+
name: 'includeClosed',
|
|
118
|
+
type: 'boolean',
|
|
119
|
+
displayOptions: { show: { ...SHOW, operation: ['getAll'] } },
|
|
120
|
+
default: false,
|
|
121
|
+
description: 'Whether to include completed milestones',
|
|
122
|
+
},
|
|
123
|
+
];
|
|
124
|
+
function collectBody(context, itemIndex, isCreate) {
|
|
125
|
+
const body = {};
|
|
126
|
+
if (isCreate)
|
|
127
|
+
body.name = context.getNodeParameter('name', itemIndex);
|
|
128
|
+
const strings = ['milestoneKey', 'startDate', 'endDate', 'budgetAmount', 'budgetHours'];
|
|
129
|
+
for (const field of strings) {
|
|
130
|
+
const value = context.getNodeParameter(field, itemIndex, '');
|
|
131
|
+
// budgetAmount/budgetHours are string-typed in the orboto API - pass through untouched.
|
|
132
|
+
if (value !== '')
|
|
133
|
+
body[field] = value;
|
|
134
|
+
}
|
|
135
|
+
if (!isCreate) {
|
|
136
|
+
const status = context.getNodeParameter('status', itemIndex, '');
|
|
137
|
+
if (status !== '')
|
|
138
|
+
body.status = status;
|
|
139
|
+
}
|
|
140
|
+
const isPrivate = context.getNodeParameter('isPrivate', itemIndex, false);
|
|
141
|
+
if (isPrivate)
|
|
142
|
+
body.isPrivate = isPrivate;
|
|
143
|
+
return body;
|
|
144
|
+
}
|
|
145
|
+
async function executeMilestoneOperation(context, itemIndex) {
|
|
146
|
+
const node = context.getNode();
|
|
147
|
+
const operation = context.getNodeParameter('operation', itemIndex);
|
|
148
|
+
try {
|
|
149
|
+
const client = await (0, GenericFunctions_1.getClient)(context);
|
|
150
|
+
const project = String(context.getNodeParameter('project', itemIndex, '') ?? '');
|
|
151
|
+
const base = `/projects/${encodeURIComponent(project)}/milestones`;
|
|
152
|
+
switch (operation) {
|
|
153
|
+
case 'create': {
|
|
154
|
+
const created = await client.request(base, { method: 'POST', body: collectBody(context, itemIndex, true) });
|
|
155
|
+
return [(0, GenericFunctions_1.jsonOutput)(created)];
|
|
156
|
+
}
|
|
157
|
+
case 'get': {
|
|
158
|
+
const milestone = String(context.getNodeParameter('milestone', itemIndex));
|
|
159
|
+
const id = await (0, GenericFunctions_1.resolveMilestoneId)(client, project, milestone);
|
|
160
|
+
const found = await client.request(`${base}/${id}`);
|
|
161
|
+
return [(0, GenericFunctions_1.jsonOutput)(found)];
|
|
162
|
+
}
|
|
163
|
+
case 'getAll': {
|
|
164
|
+
const includeClosed = context.getNodeParameter('includeClosed', itemIndex, false);
|
|
165
|
+
const milestones = await client.request(base, {
|
|
166
|
+
query: (0, GenericFunctions_1.collectQuery)([['includeClosed', includeClosed || undefined]]),
|
|
167
|
+
});
|
|
168
|
+
const items = Array.isArray(milestones) ? milestones : [];
|
|
169
|
+
return items.map(GenericFunctions_1.jsonOutput);
|
|
170
|
+
}
|
|
171
|
+
case 'update': {
|
|
172
|
+
const milestone = String(context.getNodeParameter('milestone', itemIndex));
|
|
173
|
+
const id = await (0, GenericFunctions_1.resolveMilestoneId)(client, project, milestone);
|
|
174
|
+
const updated = await client.request(`${base}/${id}`, {
|
|
175
|
+
method: 'PATCH',
|
|
176
|
+
body: collectBody(context, itemIndex, false),
|
|
177
|
+
});
|
|
178
|
+
return [(0, GenericFunctions_1.jsonOutput)(updated)];
|
|
179
|
+
}
|
|
180
|
+
case 'close': {
|
|
181
|
+
const milestone = String(context.getNodeParameter('milestone', itemIndex));
|
|
182
|
+
const id = await (0, GenericFunctions_1.resolveMilestoneId)(client, project, milestone);
|
|
183
|
+
const closed = await client.request(`${base}/${id}`, {
|
|
184
|
+
method: 'PATCH',
|
|
185
|
+
body: { status: 'completed' },
|
|
186
|
+
});
|
|
187
|
+
return [(0, GenericFunctions_1.jsonOutput)(closed)];
|
|
188
|
+
}
|
|
189
|
+
default:
|
|
190
|
+
throw new Error(`Unknown milestone operation: ${operation}`);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
throw (0, GenericFunctions_1.toNodeError)(node, error, itemIndex);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=milestone.resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"milestone.resource.js","sourceRoot":"","sources":["../../../../../nodes/orboto/resources/milestone/milestone.resource.ts"],"names":[],"mappings":";;;AA+IA,8DAsDC;AApMD,oEAAqH;AAErH,MAAM,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;AAEzC,MAAM,4BAA4B,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAEvE,QAAA,mBAAmB,GAAsB;IACrD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;QAC9B,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;YACjC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;YACnC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;YAC7B,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE;YACrC,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,oBAAoB;QACjC,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;YACZ,iBAAiB,EAAE,aAAa;SAChC;QACD,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,IAA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AAE,SAAS,CAAC,CAAC,CAAC;gBAC3E,MAAM,EAAE,GAAG,MAAM,IAAA,qCAAkB,EAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;gBAChE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,IAAI,EAAE,EAAE,EAAE;oBACpD,MAAM,EAAE,OAAO;oBACf,IAAI,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;iBAC7B,CAAC,CAAC;gBACH,OAAO,CAAC,IAAA,6BAAU,EAAC,MAAM,CAAC,CAAC,CAAC;YAC7B,CAAC;YACD;gBACC,MAAM,IAAI,KAAK,CAAC,gCAAgC,SAAS,EAAE,CAAC,CAAC;QAC/D,CAAC;IACF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,IAAA,8BAAW,EAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC3C,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
/** Users resource - there is no global /users route; directory reads are project-scoped. */
|
|
3
|
+
export declare const userOperations: INodeProperties[];
|
|
4
|
+
export declare const labelOperations: INodeProperties[];
|
|
5
|
+
export declare const savedSearchOperations: INodeProperties[];
|
|
6
|
+
export declare function executeUserOperation(context: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData[]>;
|
|
7
|
+
export declare function executeLabelOperation(context: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData[]>;
|
|
8
|
+
export declare function executeSavedSearchOperation(context: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData[]>;
|