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,232 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.savedSearchOperations = exports.labelOperations = exports.userOperations = void 0;
4
+ exports.executeUserOperation = executeUserOperation;
5
+ exports.executeLabelOperation = executeLabelOperation;
6
+ exports.executeSavedSearchOperation = executeSavedSearchOperation;
7
+ const GenericFunctions_1 = require("../../shared/GenericFunctions");
8
+ /** Users resource - there is no global /users route; directory reads are project-scoped. */
9
+ exports.userOperations = [
10
+ {
11
+ displayName: 'Operation',
12
+ name: 'operation',
13
+ type: 'options',
14
+ noDataExpression: true,
15
+ displayOptions: { show: { resource: ['user'] } },
16
+ required: true,
17
+ default: 'getMembers',
18
+ options: [
19
+ {
20
+ name: 'Get Project Members',
21
+ value: 'getMembers',
22
+ action: 'Get the project members of a user',
23
+ },
24
+ ],
25
+ },
26
+ {
27
+ displayName: 'Project Name or ID',
28
+ name: 'project',
29
+ type: 'options',
30
+ typeOptions: {
31
+ loadOptionsMethod: 'getProjects',
32
+ },
33
+ required: true,
34
+ displayOptions: { show: { resource: ['user'], operation: ['getMembers'] } },
35
+ default: '',
36
+ description: 'Project whose members to list. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
37
+ },
38
+ ];
39
+ exports.labelOperations = [
40
+ {
41
+ displayName: 'Operation',
42
+ name: 'operation',
43
+ type: 'options',
44
+ noDataExpression: true,
45
+ displayOptions: { show: { resource: ['label'] } },
46
+ required: true,
47
+ default: 'getAll',
48
+ options: [
49
+ { name: 'Create', value: 'create' },
50
+ { name: 'Get Many', value: 'getAll' },
51
+ ].sort((a, b) => a.value.localeCompare(b.value)),
52
+ },
53
+ {
54
+ displayName: 'Project Name or ID',
55
+ name: 'project',
56
+ type: 'options',
57
+ typeOptions: {
58
+ loadOptionsMethod: 'getProjects',
59
+ },
60
+ required: true,
61
+ displayOptions: { show: { resource: ['label'], operation: ['create', 'getAll'] } },
62
+ default: '',
63
+ description: 'Project of the labels. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
64
+ },
65
+ {
66
+ displayName: 'Name',
67
+ name: 'name',
68
+ type: 'string',
69
+ required: true,
70
+ displayOptions: { show: { resource: ['label'], operation: ['create'] } },
71
+ default: '',
72
+ description: 'Label name',
73
+ },
74
+ {
75
+ displayName: 'Color',
76
+ name: 'color',
77
+ type: 'color',
78
+ displayOptions: { show: { resource: ['label'], operation: ['create'] } },
79
+ default: '#4f46e5',
80
+ description: 'Label color',
81
+ },
82
+ ];
83
+ exports.savedSearchOperations = [
84
+ {
85
+ displayName: 'Operation',
86
+ name: 'operation',
87
+ type: 'options',
88
+ noDataExpression: true,
89
+ displayOptions: { show: { resource: ['savedSearch'] } },
90
+ required: true,
91
+ default: 'getAll',
92
+ options: [
93
+ { name: 'Create', value: 'create' },
94
+ { name: 'Get Many', value: 'getAll' },
95
+ { name: 'Run', value: 'run' },
96
+ ].sort((a, b) => a.value.localeCompare(b.value)),
97
+ },
98
+ {
99
+ displayName: 'Name',
100
+ name: 'name',
101
+ type: 'string',
102
+ required: true,
103
+ displayOptions: { show: { resource: ['savedSearch'], operation: ['create'] } },
104
+ default: '',
105
+ description: 'Saved search name',
106
+ },
107
+ {
108
+ displayName: 'Query Type',
109
+ name: 'queryType',
110
+ type: 'options',
111
+ options: [
112
+ { name: 'OQL', value: 'oql' },
113
+ { name: 'JQL', value: 'jql' },
114
+ { name: 'Legacy', value: 'legacy' },
115
+ ],
116
+ displayOptions: { show: { resource: ['savedSearch'], operation: ['create'] } },
117
+ default: 'oql',
118
+ description: 'Syntax of the saved query',
119
+ },
120
+ {
121
+ displayName: 'OQL Query',
122
+ name: 'oql',
123
+ type: 'string',
124
+ typeOptions: { rows: 4 },
125
+ displayOptions: { show: { resource: ['savedSearch'], operation: ['create'], queryType: ['oql', 'jql'] } },
126
+ default: '',
127
+ description: 'The OQL/JQL query text',
128
+ },
129
+ {
130
+ displayName: 'Search Name or ID',
131
+ name: 'savedSearch',
132
+ type: 'string',
133
+ required: true,
134
+ displayOptions: { show: { resource: ['savedSearch'], operation: ['run'] } },
135
+ default: '',
136
+ description: 'Name or ID of the saved search to run',
137
+ },
138
+ ];
139
+ async function executeUserOperation(context, itemIndex) {
140
+ try {
141
+ const client = await (0, GenericFunctions_1.getClient)(context);
142
+ const project = String(context.getNodeParameter('project', itemIndex));
143
+ const projectId = await (0, GenericFunctions_1.resolveProjectId)(client, project);
144
+ const members = await client.request(`/projects/${projectId}/members`);
145
+ const items = Array.isArray(members) ? members : [];
146
+ return items.map(GenericFunctions_1.jsonOutput);
147
+ }
148
+ catch (error) {
149
+ throw (0, GenericFunctions_1.toNodeError)(context.getNode(), error, itemIndex);
150
+ }
151
+ }
152
+ async function executeLabelOperation(context, itemIndex) {
153
+ const operation = context.getNodeParameter('operation', itemIndex);
154
+ try {
155
+ const client = await (0, GenericFunctions_1.getClient)(context);
156
+ const project = String(context.getNodeParameter('project', itemIndex));
157
+ switch (operation) {
158
+ case 'getAll': {
159
+ const labels = await client.request(`/projects/${encodeURIComponent(project)}/labels`);
160
+ const items = Array.isArray(labels) ? labels : [];
161
+ return items.map(GenericFunctions_1.jsonOutput);
162
+ }
163
+ case 'create': {
164
+ const created = await client.request(`/projects/${encodeURIComponent(project)}/labels`, {
165
+ method: 'POST',
166
+ body: {
167
+ name: context.getNodeParameter('name', itemIndex),
168
+ color: context.getNodeParameter('color', itemIndex, '#4f46e5'),
169
+ },
170
+ });
171
+ return [(0, GenericFunctions_1.jsonOutput)(created)];
172
+ }
173
+ default:
174
+ throw new Error(`Unknown label operation: ${operation}`);
175
+ }
176
+ }
177
+ catch (error) {
178
+ throw (0, GenericFunctions_1.toNodeError)(context.getNode(), error, itemIndex);
179
+ }
180
+ }
181
+ async function executeSavedSearchOperation(context, itemIndex) {
182
+ const node = context.getNode();
183
+ const operation = context.getNodeParameter('operation', itemIndex);
184
+ try {
185
+ const client = await (0, GenericFunctions_1.getClient)(context);
186
+ switch (operation) {
187
+ case 'getAll': {
188
+ const searches = await client.request('/saved-searches');
189
+ const items = Array.isArray(searches) ? searches : [];
190
+ return items.map(GenericFunctions_1.jsonOutput);
191
+ }
192
+ case 'create': {
193
+ const queryType = context.getNodeParameter('queryType', itemIndex, 'oql');
194
+ const body = {
195
+ name: context.getNodeParameter('name', itemIndex),
196
+ queryType,
197
+ };
198
+ if (queryType === 'oql' || queryType === 'jql') {
199
+ body.oql = context.getNodeParameter('oql', itemIndex);
200
+ }
201
+ const created = await client.request('/saved-searches', { method: 'POST', body });
202
+ return [(0, GenericFunctions_1.jsonOutput)(created)];
203
+ }
204
+ case 'run': {
205
+ const reference = String(context.getNodeParameter('savedSearch', itemIndex)).trim();
206
+ const searches = (await client.request('/saved-searches'));
207
+ const list = Array.isArray(searches) ? searches : [];
208
+ const match = list.find((s) => s.id === reference) ?? list.find((s) => s.name === reference);
209
+ if (!match) {
210
+ throw new Error(`Saved search not found: ${reference}`);
211
+ }
212
+ const oql = typeof match.oql === 'string' ? match.oql : '';
213
+ const queryType = match.queryType ?? 'legacy';
214
+ if (!oql || queryType === 'legacy') {
215
+ throw new Error(`Saved search "${String(match.name)}" uses a legacy query; only OQL/JQL saved searches can be run from n8n`);
216
+ }
217
+ const results = await client.request('/query', {
218
+ method: 'POST',
219
+ body: { oql, syntax: queryType },
220
+ });
221
+ const page = results;
222
+ return (page?.items ?? []).map(GenericFunctions_1.jsonOutput);
223
+ }
224
+ default:
225
+ throw new Error(`Unknown saved search operation: ${operation}`);
226
+ }
227
+ }
228
+ catch (error) {
229
+ throw (0, GenericFunctions_1.toNodeError)(node, error, itemIndex);
230
+ }
231
+ }
232
+ //# sourceMappingURL=misc.resources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc.resources.js","sourceRoot":"","sources":["../../../../../nodes/orboto/resources/misc/misc.resources.ts"],"names":[],"mappings":";;;AA2IA,oDAcC;AAED,sDA8BC;AAED,kEAyDC;AAnPD,oEAAqG;AAErG,4FAA4F;AAC/E,QAAA,cAAc,GAAsB;IAChD;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,MAAM,CAAC,EAAE,EAAE;QAChD,QAAQ,EAAE,IAAI;QACd,OAAO,EAA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;QAClE,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 projectOperations: INodeProperties[];
3
+ export declare function executeProjectOperation(context: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData[]>;
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.projectOperations = void 0;
4
+ exports.executeProjectOperation = executeProjectOperation;
5
+ const GenericFunctions_1 = require("../../shared/GenericFunctions");
6
+ const SHOW = { resource: ['project'] };
7
+ exports.projectOperations = [
8
+ {
9
+ displayName: 'Operation',
10
+ name: 'operation',
11
+ type: 'options',
12
+ noDataExpression: true,
13
+ displayOptions: { show: SHOW },
14
+ required: true,
15
+ default: 'getAll',
16
+ options: [
17
+ { name: 'Create', value: 'create' },
18
+ { name: 'Get', value: 'get' },
19
+ { name: 'Get AI Primer', value: 'getAiPrimer' },
20
+ { name: 'Get Many', value: 'getAll' },
21
+ { name: 'Get Primer Facts', value: 'getPrimerFacts' },
22
+ { name: 'Update', value: 'update' },
23
+ ].sort((a, b) => a.value.localeCompare(b.value)),
24
+ },
25
+ {
26
+ displayName: 'Project Key or ID',
27
+ name: 'project',
28
+ type: 'string',
29
+ required: true,
30
+ displayOptions: { show: { ...SHOW, operation: ['get', 'getAiPrimer', 'getPrimerFacts', 'update'] } },
31
+ default: '',
32
+ description: 'Project key (ONN) or ID',
33
+ },
34
+ {
35
+ displayName: 'Name',
36
+ name: 'name',
37
+ type: 'string',
38
+ required: true,
39
+ displayOptions: { show: { ...SHOW, operation: ['create'] } },
40
+ default: '',
41
+ description: 'Project name',
42
+ },
43
+ {
44
+ displayName: 'Key',
45
+ name: 'key',
46
+ type: 'string',
47
+ typeOptions: { password: true },
48
+ displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
49
+ default: '',
50
+ placeholder: 'ONN',
51
+ description: 'Short uppercase project key (2-10 characters, A-Z and digits)',
52
+ },
53
+ {
54
+ displayName: 'Description',
55
+ name: 'description',
56
+ type: 'string',
57
+ typeOptions: { rows: 6 },
58
+ displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
59
+ default: '',
60
+ description: 'Project description (Markdown)',
61
+ },
62
+ {
63
+ displayName: 'Language',
64
+ name: 'language',
65
+ type: 'options',
66
+ options: ['en', 'de', 'fr', 'es', 'it', 'nl', 'pt', 'ru', 'pl', 'tr', 'cs', 'da', 'sv', 'no', 'fi', 'ja', 'zh', 'ko'].map((v) => ({ name: v, value: v })),
67
+ displayOptions: { show: { ...SHOW, operation: ['create', 'update'] } },
68
+ default: 'en',
69
+ description: 'Ticket language enforced for this project',
70
+ },
71
+ {
72
+ displayName: 'Status',
73
+ name: 'status',
74
+ type: 'options',
75
+ options: ['draft', 'active', 'archived', 'closed'].map((v) => ({ name: v, value: v })),
76
+ displayOptions: { show: { ...SHOW, operation: ['update'] } },
77
+ default: 'active',
78
+ description: 'Project status',
79
+ },
80
+ ];
81
+ async function executeProjectOperation(context, itemIndex) {
82
+ const node = context.getNode();
83
+ const operation = context.getNodeParameter('operation', itemIndex);
84
+ try {
85
+ const client = await (0, GenericFunctions_1.getClient)(context);
86
+ switch (operation) {
87
+ case 'create': {
88
+ const body = {
89
+ name: context.getNodeParameter('name', itemIndex),
90
+ };
91
+ for (const field of ['key', 'description', 'language']) {
92
+ const value = context.getNodeParameter(field, itemIndex, '');
93
+ if (value !== '')
94
+ body[field] = value;
95
+ }
96
+ const created = await client.request('/projects/', { method: 'POST', body });
97
+ return [(0, GenericFunctions_1.jsonOutput)(created)];
98
+ }
99
+ case 'get': {
100
+ const project = String(context.getNodeParameter('project', itemIndex));
101
+ const found = (0, GenericFunctions_1.isUuid)(project.trim())
102
+ ? await client.request(`/projects/${project.trim()}`)
103
+ : await client.request(`/projects/by-key/${encodeURIComponent(project.trim())}`);
104
+ return [(0, GenericFunctions_1.jsonOutput)(found)];
105
+ }
106
+ case 'getAll': {
107
+ const projects = await client.request('/projects/');
108
+ const items = Array.isArray(projects) ? projects : [];
109
+ return items.map(GenericFunctions_1.jsonOutput);
110
+ }
111
+ case 'update': {
112
+ const project = String(context.getNodeParameter('project', itemIndex));
113
+ const id = await (0, GenericFunctions_1.resolveProjectId)(client, project);
114
+ const body = {};
115
+ for (const field of ['name', 'key', 'description', 'language', 'status']) {
116
+ const value = context.getNodeParameter(field, itemIndex, '');
117
+ if (value !== '')
118
+ body[field] = value;
119
+ }
120
+ const updated = await client.request(`/projects/${id}`, { method: 'PATCH', body });
121
+ return [(0, GenericFunctions_1.jsonOutput)(updated)];
122
+ }
123
+ case 'getPrimerFacts': {
124
+ const project = String(context.getNodeParameter('project', itemIndex));
125
+ const id = await (0, GenericFunctions_1.resolveProjectId)(client, project);
126
+ const facts = await client.request(`/projects/${id}/primer-facts`);
127
+ const items = Array.isArray(facts) ? facts : [];
128
+ return items.map(GenericFunctions_1.jsonOutput);
129
+ }
130
+ case 'getAiPrimer': {
131
+ const project = String(context.getNodeParameter('project', itemIndex));
132
+ const id = await (0, GenericFunctions_1.resolveProjectId)(client, project);
133
+ const primer = await client.request(`/projects/${id}/ai-primer`);
134
+ return [(0, GenericFunctions_1.jsonOutput)(primer)];
135
+ }
136
+ default:
137
+ throw new Error(`Unknown project operation: ${operation}`);
138
+ }
139
+ }
140
+ catch (error) {
141
+ throw (0, GenericFunctions_1.toNodeError)(node, error, itemIndex);
142
+ }
143
+ }
144
+ //# sourceMappingURL=project.resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.resource.js","sourceRoot":"","sources":["../../../../../nodes/orboto/resources/project/project.resource.ts"],"names":[],"mappings":";;;AAgFA,0DA+DC;AA9ID,oEAA6G;AAE7G,MAAM,IAAI,GAAG,EAAE,QAAQ,EAA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MAAM,IAAA,mCAAgB,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBACnD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;gBACjE,OAAO,CAAC,IAAA,6BAAU,EAAC,MAAM,CAAC,CAAC,CAAC;YAC7B,CAAC;YACD;gBACC,MAAM,IAAI,KAAK,CAAC,8BAA8B,SAAS,EAAE,CAAC,CAAC;QAC7D,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,11 @@
1
+ import type { IDataObject, IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
2
+ export declare const ticketOperations: INodeProperties[];
3
+ /**
4
+ * Builds the PATCH body for the update operation from the Update Fields
5
+ * collection. Only fields the user explicitly added are present in the
6
+ * collection, so whatever is present is sent as-is - including an explicit
7
+ * `false` for booleans (the only way to clear them) - and untouched ticket
8
+ * fields are never reset by a defaulted options parameter.
9
+ */
10
+ export declare function buildUpdateBody(updateFields: IDataObject): IDataObject;
11
+ export declare function executeTicketOperation(context: IExecuteFunctions, itemIndex: number): Promise<INodeExecutionData[]>;