n8n-nodes-keephub 1.2.2 โ 1.3.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/README.md +9 -3
- package/dist/nodes/Keephub/Keephub.node.d.ts.map +1 -1
- package/dist/nodes/Keephub/Keephub.node.js +1 -0
- package/dist/nodes/Keephub/Keephub.node.js.map +1 -1
- package/dist/nodes/Keephub/actions/formSubmission/getSubmissionOrgunits.d.ts.map +1 -1
- package/dist/nodes/Keephub/actions/formSubmission/getSubmissionOrgunits.js +16 -17
- package/dist/nodes/Keephub/actions/formSubmission/getSubmissionOrgunits.js.map +1 -1
- package/dist/nodes/Keephub/actions/orgchart/getByExternalRef.d.ts +9 -0
- package/dist/nodes/Keephub/actions/orgchart/getByExternalRef.d.ts.map +1 -0
- package/dist/nodes/Keephub/actions/orgchart/getByExternalRef.js +26 -0
- package/dist/nodes/Keephub/actions/orgchart/getByExternalRef.js.map +1 -0
- package/dist/nodes/Keephub/actions/orgchart/index.d.ts +2 -1
- package/dist/nodes/Keephub/actions/orgchart/index.d.ts.map +1 -1
- package/dist/nodes/Keephub/actions/orgchart/index.js +3 -1
- package/dist/nodes/Keephub/actions/orgchart/index.js.map +1 -1
- package/dist/nodes/Keephub/descriptions/OrgchartDescription.d.ts.map +1 -1
- package/dist/nodes/Keephub/descriptions/OrgchartDescription.js +34 -12
- package/dist/nodes/Keephub/descriptions/OrgchartDescription.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
Unlock the power of employee engagement and communication automation with this comprehensive n8n community node for Keephub.
|
|
19
19
|
|
|
20
|
-
[๐ง Installation](#-installation) โข [๐ Documentation](#-operations) โข [๐ Quick Start](#-quick-start) โข [๐ค Contributing](#-contributing)
|
|
20
|
+
[๐ง Installation](#-installation) โข [๐ Documentation](#-operations) โข [๐ Quick Start](#-quick-start) โข [๐ Changelog](#-version-history) โข [๐ค Contributing](#-contributing)
|
|
21
21
|
|
|
22
22
|
</div>
|
|
23
23
|
|
|
@@ -296,10 +296,11 @@ Start Date Before: Filter tasks created/updated before this date (dateTime picke
|
|
|
296
296
|
|
|
297
297
|
| Operation | Description |
|
|
298
298
|
|-----------|-------------|
|
|
299
|
-
| **Get by ID** | Retrieve an orgchart node by ID |
|
|
300
|
-
| **Get Parent** | Fetch the parent node of an orgchart node |
|
|
301
299
|
| **Get Ancestors** | Get all ancestors in the org hierarchy |
|
|
300
|
+
| **Get by External Ref** | Retrieve an orgchart node by its externalRef value |
|
|
301
|
+
| **Get by ID** | Retrieve an orgchart node by ID |
|
|
302
302
|
| **Get Children** | Retrieve all children/descendants |
|
|
303
|
+
| **Get Parent** | Fetch the parent node of an orgchart node |
|
|
303
304
|
|
|
304
305
|
**Example:**
|
|
305
306
|
```javascript
|
|
@@ -506,6 +507,11 @@ npm run lint
|
|
|
506
507
|
### v1.2.2 (2025-11-20)
|
|
507
508
|
- ๐งน Build process improvements (added dist folder cleanup script)
|
|
508
509
|
|
|
510
|
+
### v1.3.0 (2025-12-04)
|
|
511
|
+
- ๐ Added Get by External Ref operation to Orgchart resource for querying nodes by external reference
|
|
512
|
+
|
|
513
|
+
### v1.3.1 (2025-12-08)
|
|
514
|
+
- ๐ง Added externalRef of orgunit to the output of the Get sumission orgunits node
|
|
509
515
|
---
|
|
510
516
|
|
|
511
517
|
## ๐ค Contributing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keephub.node.d.ts","sourceRoot":"","sources":["../../../nodes/Keephub/Keephub.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAElB,SAAS,EACT,oBAAoB,EAEpB,MAAM,cAAc,CAAC;AAYtB,qBAAa,OAAQ,YAAW,SAAS;IACxC,WAAW,EAAE,oBAAoB,CAwC/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Keephub.node.d.ts","sourceRoot":"","sources":["../../../nodes/Keephub/Keephub.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,kBAAkB,EAElB,SAAS,EACT,oBAAoB,EAEpB,MAAM,cAAc,CAAC;AAYtB,qBAAa,OAAQ,YAAW,SAAS;IACxC,WAAW,EAAE,oBAAoB,CAwC/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA2EvE"}
|
|
@@ -110,6 +110,7 @@ class Keephub {
|
|
|
110
110
|
calculateResponseDuration: formSubmissionActions.calculateResponseDurationExecute,
|
|
111
111
|
},
|
|
112
112
|
orgchart: {
|
|
113
|
+
getByExternalRef: orgchartActions.getByExternalRefExecute,
|
|
113
114
|
getById: orgchartActions.getByIdExecute,
|
|
114
115
|
getParent: orgchartActions.getParentExecute,
|
|
115
116
|
getAncestors: orgchartActions.getAncestorsExecute,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keephub.node.js","sourceRoot":"","sources":["../../../nodes/Keephub/Keephub.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAOsB;AACtB,kEAAoD;AACpD,sFAAwE;AACxE,0EAA4D;AAC5D,4DAA8C;AAC9C,4DAA8C;AAC9C,0EAAkE;AAClE,wFAAgF;AAChF,4EAAoE;AACpE,oEAA4D;AAC5D,oEAA4D;AAE5D,MAAa,OAAO;IAApB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;aACf;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;wBACrC,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;wBACpD,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;wBACvC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;wBAC/B,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;qBAC/B;oBACD,OAAO,EAAE,SAAS;iBAClB;gBACD,GAAG,kCAAa;gBAChB,GAAG,gDAAoB;gBACvB,GAAG,oCAAc;gBACjB,GAAG,4BAAU;gBACb,GAAG,4BAAU;aACQ;YACtB,YAAY,EAAE,IAAI;SAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"Keephub.node.js","sourceRoot":"","sources":["../../../nodes/Keephub/Keephub.node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAOsB;AACtB,kEAAoD;AACpD,sFAAwE;AACxE,0EAA4D;AAC5D,4DAA8C;AAC9C,4DAA8C;AAC9C,0EAAkE;AAClE,wFAAgF;AAChF,4EAAoE;AACpE,oEAA4D;AAC5D,oEAA4D;AAE5D,MAAa,OAAO;IAApB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,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B,CAAC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;QAE7D,IAAI,CAAC,OAAO,EAAE,CAAC;YACd,MAAM,IAAI,iCAAkB,CAC3B,IAAI,CAAC,OAAO,EAAE,EACd,sBAAsB,SAAS,mBAAmB,QAAQ,GAAG,CAC7D,CAAC;QACH,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC;gBACJ,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBACrD,UAAU,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC;YAC5B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,UAAU,CAAC,IAAI,CAAC;wBACf,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE;wBACzE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;qBACvB,CAAC,CAAC;oBACH,SAAS;gBACV,CAAC;gBACD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACrB,CAAC;CACD;AAtHD,0BAsHC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSubmissionOrgunits.d.ts","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/formSubmission/getSubmissionOrgunits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAe,iBAAiB,
|
|
1
|
+
{"version":3,"file":"getSubmissionOrgunits.d.ts","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/formSubmission/getSubmissionOrgunits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAe,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAIvF,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,wBAAsB,OAAO,CAC5B,IAAI,EAAE,iBAAiB,EACvB,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAiE/B"}
|
|
@@ -15,31 +15,30 @@ async function execute(item, index) {
|
|
|
15
15
|
helpers_1.validateMongoId.call(this, formSubmissionId, 'Form Submission ID', index);
|
|
16
16
|
const formSubmission = (await helpers_1.apiRequest.call(this, 'GET', `/formvalues/${formSubmissionId}`));
|
|
17
17
|
if (!formSubmission || !formSubmission.createdBy) {
|
|
18
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Form submission or submitter not found', {
|
|
18
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Form submission or submitter not found', {
|
|
19
|
+
itemIndex: index,
|
|
20
|
+
});
|
|
19
21
|
}
|
|
20
22
|
const submitterId = typeof formSubmission.createdBy === 'string'
|
|
21
23
|
? formSubmission.createdBy
|
|
22
24
|
: formSubmission.createdBy._id;
|
|
23
25
|
const submitterData = (await helpers_1.apiRequest.call(this, 'GET', `/users/${submitterId}`));
|
|
26
|
+
// Fetch ALL orgunits with externalRef param, then filter
|
|
27
|
+
const orgunitsResponse = (await helpers_1.apiRequest.call(this, 'GET', `/orgchart/?externalRef=true&limit=1000`));
|
|
28
|
+
const allOrgunits = (orgunitsResponse.data || []);
|
|
29
|
+
const orgunitMap = new Map();
|
|
30
|
+
allOrgunits.forEach((org) => orgunitMap.set(org.id, org));
|
|
24
31
|
// Fetch each orgunit details
|
|
25
32
|
const orgunitDetails = [];
|
|
26
33
|
for (const orgunitId of submitterData.orgunits || []) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
catch {
|
|
36
|
-
// Skip if orgunit fetch fails
|
|
37
|
-
orgunitDetails.push({
|
|
38
|
-
id: orgunitId,
|
|
39
|
-
name: 'Error fetching',
|
|
40
|
-
path: '',
|
|
41
|
-
});
|
|
42
|
-
}
|
|
34
|
+
const orgunitData = orgunitMap.get(orgunitId) ||
|
|
35
|
+
(await helpers_1.apiRequest.call(this, 'GET', `/orgchart/${orgunitId}`));
|
|
36
|
+
orgunitDetails.push({
|
|
37
|
+
id: orgunitId,
|
|
38
|
+
name: orgunitData.name || 'Unknown',
|
|
39
|
+
path: (orgunitData.namepath || '').slice(1),
|
|
40
|
+
externalRef: orgunitData.externalRef || '',
|
|
41
|
+
});
|
|
43
42
|
}
|
|
44
43
|
return [
|
|
45
44
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSubmissionOrgunits.js","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/formSubmission/getSubmissionOrgunits.ts"],"names":[],"mappings":";;;AAWA,
|
|
1
|
+
{"version":3,"file":"getSubmissionOrgunits.js","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/formSubmission/getSubmissionOrgunits.ts"],"names":[],"mappings":";;;AAWA,0BAqEC;AA/ED,+CAAkD;AAClD,iDAAkE;AAErD,QAAA,WAAW,GAAG;IAC1B,WAAW,EAAE,qBAAqB;IAClC,IAAI,EAAE,uBAAuB;IAC7B,MAAM,EAAE,qBAAqB;IAC7B,WAAW,EAAE,6DAA6D;CAC1E,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,IAAwB,EACxB,KAAa;IAEb,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,KAAK,CAAW,CAAC;IAEpF,yBAAe,CAAC,IAAI,CAAC,IAAI,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,KAAK,CAAC,CAAC;IAE1E,MAAM,cAAc,GAAG,CA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E,CAAC,CAAiB,CAAC;QAEjF,cAAc,CAAC,IAAI,CAAC;YACnB,EAAE,EAAE,SAAS;YACb,IAAI,EAAE,WAAW,CAAC,IAAI,IAAI,SAAS;YACnC,IAAI,EAAE,CAAE,WAAW,CAAC,QAAmB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACvD,WAAW,EAAG,WAAW,CAAC,WAAsB,IAAI,EAAE;SACtD,CAAC,CAAC;IACJ,CAAC;IAED,OAAO;QACN;YACC,IAAI,EAAE;gBACL,GAAG,EAAE,aAAa,CAAC,GAAG;gBACtB,IAAI,EAAE,aAAa,CAAC,IAAI;gBACxB,QAAQ,EAAE,cAAc;aACxB;YACD,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;SAC3B;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { INodeExecutionData, IExecuteFunctions } from 'n8n-workflow';
|
|
2
|
+
export declare const description: {
|
|
3
|
+
displayName: string;
|
|
4
|
+
name: string;
|
|
5
|
+
action: string;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function execute(this: IExecuteFunctions, item: INodeExecutionData, index: number): Promise<INodeExecutionData[]>;
|
|
9
|
+
//# sourceMappingURL=getByExternalRef.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getByExternalRef.d.ts","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/orgchart/getByExternalRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAe,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAIvF,eAAO,MAAM,WAAW;;;;;CAKvB,CAAC;AAEF,wBAAsB,OAAO,CACzB,IAAI,EAAE,iBAAiB,EACvB,IAAI,EAAE,kBAAkB,EACxB,KAAK,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAmB/B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const helpers_1 = require("../../utils/helpers");
|
|
7
|
+
exports.description = {
|
|
8
|
+
displayName: 'Get by External Ref',
|
|
9
|
+
name: 'getByExternalRef',
|
|
10
|
+
action: 'Get an orgchart node by external reference',
|
|
11
|
+
description: 'Retrieve a single orgchart node by external reference',
|
|
12
|
+
};
|
|
13
|
+
async function execute(item, index) {
|
|
14
|
+
const externalRef = this.getNodeParameter('externalRef', index);
|
|
15
|
+
if (!externalRef) {
|
|
16
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'External Reference is required', { itemIndex: index });
|
|
17
|
+
}
|
|
18
|
+
const response = (await helpers_1.apiRequest.call(this, 'GET', `/orgchart/?externalRef=${encodeURIComponent(externalRef)}`));
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
json: response,
|
|
22
|
+
pairedItem: { item: index },
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=getByExternalRef.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getByExternalRef.js","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/orgchart/getByExternalRef.ts"],"names":[],"mappings":";;;AAWA,0BAuBC;AAjCD,+CAAkD;AAClD,iDAAiD;AAEpC,QAAA,WAAW,GAAG;IACvB,WAAW,EAAE,qBAAqB;IAClC,IAAI,EAAE,kBAAkB;IACxB,MAAM,EAAE,4CAA4C;IACpD,WAAW,EAAE,uDAAuD;CACvE,CAAC;AAEK,KAAK,UAAU,OAAO,CAEzB,IAAwB,EACxB,KAAa;IAEb,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,KAAK,CAAW,CAAC;IAE1E,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,gCAAgC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,MAAM,oBAAU,CAAC,IAAI,CACnC,IAAI,EACJ,KAAK,EACL,0BAA0B,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAC9D,CAAgB,CAAC;IAElB,OAAO;QACH;YACI,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;SAC9B;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -2,5 +2,6 @@ import { execute as getByIdExecute } from './getById';
|
|
|
2
2
|
import { execute as getParentExecute } from './getParent';
|
|
3
3
|
import { execute as getAncestorsExecute } from './getAncestors';
|
|
4
4
|
import { execute as getChildrenExecute } from './getChildren';
|
|
5
|
-
|
|
5
|
+
import { execute as getByExternalRefExecute } from './getByExternalRef';
|
|
6
|
+
export { getByIdExecute, getParentExecute, getAncestorsExecute, getChildrenExecute, getByExternalRefExecute };
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/orgchart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/orgchart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getChildrenExecute = exports.getAncestorsExecute = exports.getParentExecute = exports.getByIdExecute = void 0;
|
|
3
|
+
exports.getByExternalRefExecute = exports.getChildrenExecute = exports.getAncestorsExecute = exports.getParentExecute = exports.getByIdExecute = void 0;
|
|
4
4
|
const getById_1 = require("./getById");
|
|
5
5
|
Object.defineProperty(exports, "getByIdExecute", { enumerable: true, get: function () { return getById_1.execute; } });
|
|
6
6
|
const getParent_1 = require("./getParent");
|
|
@@ -9,4 +9,6 @@ const getAncestors_1 = require("./getAncestors");
|
|
|
9
9
|
Object.defineProperty(exports, "getAncestorsExecute", { enumerable: true, get: function () { return getAncestors_1.execute; } });
|
|
10
10
|
const getChildren_1 = require("./getChildren");
|
|
11
11
|
Object.defineProperty(exports, "getChildrenExecute", { enumerable: true, get: function () { return getChildren_1.execute; } });
|
|
12
|
+
const getByExternalRef_1 = require("./getByExternalRef");
|
|
13
|
+
Object.defineProperty(exports, "getByExternalRefExecute", { enumerable: true, get: function () { return getByExternalRef_1.execute; } });
|
|
12
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/orgchart/index.ts"],"names":[],"mappings":";;;AAAA,uCAAsD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Keephub/actions/orgchart/index.ts"],"names":[],"mappings":";;;AAAA,uCAAsD;AAM7C,+FANW,iBAAc,OAMX;AALvB,2CAA0D;AAKjC,iGALL,mBAAgB,OAKK;AAJzC,iDAAgE;AAIrB,oGAJvB,sBAAmB,OAIuB;AAH9D,+CAA8D;AAGE,mGAH5C,qBAAkB,OAG4C;AAFlF,yDAAwE;AAEY,wGAFhE,0BAAuB,OAEgE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrgchartDescription.d.ts","sourceRoot":"","sources":["../../../../nodes/Keephub/descriptions/OrgchartDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,cAAc,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"OrgchartDescription.d.ts","sourceRoot":"","sources":["../../../../nodes/Keephub/descriptions/OrgchartDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,cAAc,EAAE,eAAe,EAwG3C,CAAC"}
|
|
@@ -13,30 +13,36 @@ exports.orgchartFields = [
|
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
15
|
options: [
|
|
16
|
-
{
|
|
17
|
-
name: 'Get by ID',
|
|
18
|
-
value: 'getById',
|
|
19
|
-
description: 'Get a single orgchart node by ID',
|
|
20
|
-
action: 'Get an orgchart node',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'Get Parent',
|
|
24
|
-
value: 'getParent',
|
|
25
|
-
description: 'Get the parent of an orgchart node by ID',
|
|
26
|
-
action: 'Get parent of an orgchart node',
|
|
27
|
-
},
|
|
28
16
|
{
|
|
29
17
|
name: 'Get Ancestors',
|
|
30
18
|
value: 'getAncestors',
|
|
31
19
|
description: 'Get all ancestors of an orgchart node by ID',
|
|
32
20
|
action: 'Get ancestors of an orgchart node',
|
|
33
21
|
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get by External Ref',
|
|
24
|
+
value: 'getByExternalRef',
|
|
25
|
+
description: 'Get a single orgchart node by external reference',
|
|
26
|
+
action: 'Get an orgchart node by external reference',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Get by ID',
|
|
30
|
+
value: 'getById',
|
|
31
|
+
description: 'Get a single orgchart node by ID',
|
|
32
|
+
action: 'Get an orgchart node',
|
|
33
|
+
},
|
|
34
34
|
{
|
|
35
35
|
name: 'Get Children',
|
|
36
36
|
value: 'getChildren',
|
|
37
37
|
description: 'Get all children/descendants of an orgchart node by ID',
|
|
38
38
|
action: 'Get children of an orgchart node',
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Get Parent',
|
|
42
|
+
value: 'getParent',
|
|
43
|
+
description: 'Get the parent of an orgchart node by ID',
|
|
44
|
+
action: 'Get parent of an orgchart node',
|
|
45
|
+
},
|
|
40
46
|
],
|
|
41
47
|
default: 'getById',
|
|
42
48
|
},
|
|
@@ -49,11 +55,27 @@ exports.orgchartFields = [
|
|
|
49
55
|
displayOptions: {
|
|
50
56
|
show: {
|
|
51
57
|
resource: ['orgchart'],
|
|
58
|
+
operation: ['getById', 'getParent', 'getAncestors', 'getChildren'],
|
|
52
59
|
},
|
|
53
60
|
},
|
|
54
61
|
placeholder: 'e.g., 123456',
|
|
55
62
|
description: 'The ID of the orgchart node to operate on',
|
|
56
63
|
},
|
|
64
|
+
{
|
|
65
|
+
displayName: 'External Reference',
|
|
66
|
+
name: 'externalRef',
|
|
67
|
+
type: 'string',
|
|
68
|
+
required: true,
|
|
69
|
+
default: '',
|
|
70
|
+
displayOptions: {
|
|
71
|
+
show: {
|
|
72
|
+
resource: ['orgchart'],
|
|
73
|
+
operation: ['getByExternalRef'],
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
placeholder: 'e.g., department_finance',
|
|
77
|
+
description: 'The external reference of the orgchart node to retrieve',
|
|
78
|
+
},
|
|
57
79
|
{
|
|
58
80
|
displayName: 'Depth Limit',
|
|
59
81
|
name: 'depthLimit',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrgchartDescription.js","sourceRoot":"","sources":["../../../../nodes/Keephub/descriptions/OrgchartDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAChD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;aACtB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"OrgchartDescription.js","sourceRoot":"","sources":["../../../../nodes/Keephub/descriptions/OrgchartDescription.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAChD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;aACtB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,cAAc;gBACrB,WAAW,EAAE,6CAA6C;gBAC1D,MAAM,EAAE,mCAAmC;aAC3C;YACD;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,kDAAkD;gBAC/D,MAAM,EAAE,4CAA4C;aACpD;YACD;gBACC,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,kCAAkC;gBAC/C,MAAM,EAAE,sBAAsB;aAC9B;YACD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