@probo/n8n-nodes-probo 0.186.0 → 0.187.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/Probo/Probo.node.js +5 -0
- package/dist/nodes/Probo/Probo.node.js.map +1 -1
- package/dist/nodes/Probo/actions/document/getAllSignatures.operation.js +14 -0
- package/dist/nodes/Probo/actions/document/getAllSignatures.operation.js.map +1 -1
- package/dist/nodes/Probo/actions/index.js +2 -0
- package/dist/nodes/Probo/actions/index.js.map +1 -1
- package/dist/nodes/Probo/actions/riskAssessment/create.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/create.operation.js +89 -0
- package/dist/nodes/Probo/actions/riskAssessment/create.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/createNode.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/createNode.operation.js +96 -0
- package/dist/nodes/Probo/actions/riskAssessment/createNode.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/createProcess.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/createProcess.operation.js +94 -0
- package/dist/nodes/Probo/actions/riskAssessment/createProcess.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/createScenario.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/createScenario.operation.js +90 -0
- package/dist/nodes/Probo/actions/riskAssessment/createScenario.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/createScope.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/createScope.operation.js +62 -0
- package/dist/nodes/Probo/actions/riskAssessment/createScope.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/createThreat.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/createThreat.operation.js +94 -0
- package/dist/nodes/Probo/actions/riskAssessment/createThreat.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/delete.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/delete.operation.js +37 -0
- package/dist/nodes/Probo/actions/riskAssessment/delete.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteNode.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteNode.operation.js +39 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteNode.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteProcess.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteProcess.operation.js +39 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteProcess.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteScenario.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteScenario.operation.js +39 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteScenario.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteScope.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteScope.operation.js +39 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteScope.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteThreat.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteThreat.operation.js +39 -0
- package/dist/nodes/Probo/actions/riskAssessment/deleteThreat.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/get.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/get.operation.js +46 -0
- package/dist/nodes/Probo/actions/riskAssessment/get.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAll.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAll.operation.js +89 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAll.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllNodes.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllNodes.operation.js +90 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllNodes.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllProcesses.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllProcesses.operation.js +91 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllProcesses.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllScenarios.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllScenarios.operation.js +90 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllScenarios.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllScopes.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllScopes.operation.js +89 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllScopes.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllThreats.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllThreats.operation.js +91 -0
- package/dist/nodes/Probo/actions/riskAssessment/getAllThreats.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getNode.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getNode.operation.js +44 -0
- package/dist/nodes/Probo/actions/riskAssessment/getNode.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getProcess.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getProcess.operation.js +45 -0
- package/dist/nodes/Probo/actions/riskAssessment/getProcess.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getScenario.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getScenario.operation.js +44 -0
- package/dist/nodes/Probo/actions/riskAssessment/getScenario.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getScope.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getScope.operation.js +43 -0
- package/dist/nodes/Probo/actions/riskAssessment/getScope.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getScopeMermaidChart.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getScopeMermaidChart.operation.js +41 -0
- package/dist/nodes/Probo/actions/riskAssessment/getScopeMermaidChart.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/getThreat.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/getThreat.operation.js +45 -0
- package/dist/nodes/Probo/actions/riskAssessment/getThreat.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/index.d.ts +38 -0
- package/dist/nodes/Probo/actions/riskAssessment/index.js +363 -0
- package/dist/nodes/Probo/actions/riskAssessment/index.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/linkScenarioRisk.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/linkScenarioRisk.operation.js +57 -0
- package/dist/nodes/Probo/actions/riskAssessment/linkScenarioRisk.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/linkScenarioThreat.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/linkScenarioThreat.operation.js +57 -0
- package/dist/nodes/Probo/actions/riskAssessment/linkScenarioThreat.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/unlinkScenarioRisk.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/unlinkScenarioRisk.operation.js +57 -0
- package/dist/nodes/Probo/actions/riskAssessment/unlinkScenarioRisk.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/unlinkScenarioThreat.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/unlinkScenarioThreat.operation.js +57 -0
- package/dist/nodes/Probo/actions/riskAssessment/unlinkScenarioThreat.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/update.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/update.operation.js +81 -0
- package/dist/nodes/Probo/actions/riskAssessment/update.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateNode.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateNode.operation.js +100 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateNode.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateProcess.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateProcess.operation.js +92 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateProcess.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateScenario.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateScenario.operation.js +82 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateScenario.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateScope.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateScope.operation.js +72 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateScope.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateThreat.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateThreat.operation.js +92 -0
- package/dist/nodes/Probo/actions/riskAssessment/updateThreat.operation.js.map +1 -0
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Scenario ID',
|
|
9
|
+
name: 'riskAssessmentScenarioId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['riskAssessment'],
|
|
14
|
+
operation: ['unlinkScenarioRisk'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the scenario',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Risk ID',
|
|
23
|
+
name: 'riskId',
|
|
24
|
+
type: 'string',
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: {
|
|
27
|
+
resource: ['riskAssessment'],
|
|
28
|
+
operation: ['unlinkScenarioRisk'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
default: '',
|
|
32
|
+
description: 'The ID of the risk to unlink',
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
async function execute(itemIndex) {
|
|
37
|
+
const riskAssessmentScenarioId = this.getNodeParameter('riskAssessmentScenarioId', itemIndex);
|
|
38
|
+
const riskId = this.getNodeParameter('riskId', itemIndex);
|
|
39
|
+
const query = `
|
|
40
|
+
mutation UnlinkRiskAssessmentScenarioRisk($input: UnlinkRiskAssessmentScenarioRiskInput!) {
|
|
41
|
+
unlinkRiskAssessmentScenarioRisk(input: $input) {
|
|
42
|
+
riskAssessmentScenario {
|
|
43
|
+
id
|
|
44
|
+
name
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, {
|
|
50
|
+
input: { riskAssessmentScenarioId, riskId },
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
json: responseData,
|
|
54
|
+
pairedItem: { item: itemIndex },
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=unlinkScenarioRisk.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unlinkScenarioRisk.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/riskAssessment/unlinkScenarioRisk.operation.ts"],"names":[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"__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Scenario ID',
|
|
9
|
+
name: 'riskAssessmentScenarioId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['riskAssessment'],
|
|
14
|
+
operation: ['unlinkScenarioThreat'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the scenario',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Threat ID',
|
|
23
|
+
name: 'threatId',
|
|
24
|
+
type: 'string',
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: {
|
|
27
|
+
resource: ['riskAssessment'],
|
|
28
|
+
operation: ['unlinkScenarioThreat'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
default: '',
|
|
32
|
+
description: 'The ID of the threat to unlink',
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
async function execute(itemIndex) {
|
|
37
|
+
const riskAssessmentScenarioId = this.getNodeParameter('riskAssessmentScenarioId', itemIndex);
|
|
38
|
+
const threatId = this.getNodeParameter('threatId', itemIndex);
|
|
39
|
+
const query = `
|
|
40
|
+
mutation UnlinkRiskAssessmentScenarioThreat($input: UnlinkRiskAssessmentScenarioThreatInput!) {
|
|
41
|
+
unlinkRiskAssessmentScenarioThreat(input: $input) {
|
|
42
|
+
riskAssessmentScenario {
|
|
43
|
+
id
|
|
44
|
+
name
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, {
|
|
50
|
+
input: { riskAssessmentScenarioId, threatId },
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
json: responseData,
|
|
54
|
+
pairedItem: { item: itemIndex },
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=unlinkScenarioThreat.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unlinkScenarioThreat.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/riskAssessment/unlinkScenarioThreat.operation.ts"],"names":[],"mappings":";;;AAgDA,0BA0BC;AA3DD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,0BAA0B;QAChC,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,sBAAsB,CAAC;aACnC;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,wBAAwB;QACrC,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,sBAAsB,CAAC;aACnC;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,gCAAgC;QAC7C,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,SAAiB;IAEjB,MAAM,wBAAwB,GAAG,IAAI,CAAC,gBAAgB,CAAC,0BAA0B,EAAE,SAAS,CAAW,CAAC;IACxG,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAW,CAAC;IAExE,MAAM,KAAK,GAAG;;;;;;;;;EASb,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,kCAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE;QAC5D,KAAK,EAAE,EAAE,wBAAwB,EAAE,QAAQ,EAAE;KAC7C,CAAC,CAAC;IAEH,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Risk Assessment ID',
|
|
9
|
+
name: 'riskAssessmentId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['riskAssessment'],
|
|
14
|
+
operation: ['update'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the risk assessment to update',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Additional Fields',
|
|
23
|
+
name: 'additionalFields',
|
|
24
|
+
type: 'collection',
|
|
25
|
+
placeholder: 'Add Field',
|
|
26
|
+
default: {},
|
|
27
|
+
displayOptions: {
|
|
28
|
+
show: {
|
|
29
|
+
resource: ['riskAssessment'],
|
|
30
|
+
operation: ['update'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Description',
|
|
36
|
+
name: 'description',
|
|
37
|
+
type: 'string',
|
|
38
|
+
default: '',
|
|
39
|
+
description: 'The description of the risk assessment',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Name',
|
|
43
|
+
name: 'name',
|
|
44
|
+
type: 'string',
|
|
45
|
+
default: '',
|
|
46
|
+
description: 'The name of the risk assessment',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
async function execute(itemIndex) {
|
|
52
|
+
const riskAssessmentId = this.getNodeParameter('riskAssessmentId', itemIndex);
|
|
53
|
+
const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {});
|
|
54
|
+
const query = `
|
|
55
|
+
mutation UpdateRiskAssessment($input: UpdateRiskAssessmentInput!) {
|
|
56
|
+
updateRiskAssessment(input: $input) {
|
|
57
|
+
riskAssessment {
|
|
58
|
+
id
|
|
59
|
+
name
|
|
60
|
+
description
|
|
61
|
+
createdAt
|
|
62
|
+
updatedAt
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
const input = { id: riskAssessmentId };
|
|
68
|
+
if (additionalFields.name)
|
|
69
|
+
input.name = additionalFields.name;
|
|
70
|
+
if (additionalFields.description !== undefined)
|
|
71
|
+
input.description = additionalFields.description === '' ? null : additionalFields.description;
|
|
72
|
+
if (Object.keys(input).length === 1) {
|
|
73
|
+
throw new Error('At least one field must be provided to update');
|
|
74
|
+
}
|
|
75
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input });
|
|
76
|
+
return {
|
|
77
|
+
json: responseData,
|
|
78
|
+
pairedItem: { item: itemIndex },
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=update.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/riskAssessment/update.operation.ts"],"names":[],"mappings":";;;AA+DA,0BAsCC;AAtFD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC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,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC;IAE9I,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,kCAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAExE,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Node ID',
|
|
9
|
+
name: 'nodeId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['riskAssessment'],
|
|
14
|
+
operation: ['updateNode'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the node to update',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Additional Fields',
|
|
23
|
+
name: 'additionalFields',
|
|
24
|
+
type: 'collection',
|
|
25
|
+
placeholder: 'Add Field',
|
|
26
|
+
default: {},
|
|
27
|
+
displayOptions: {
|
|
28
|
+
show: {
|
|
29
|
+
resource: ['riskAssessment'],
|
|
30
|
+
operation: ['updateNode'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Name',
|
|
36
|
+
name: 'name',
|
|
37
|
+
type: 'string',
|
|
38
|
+
default: '',
|
|
39
|
+
description: 'The name of the node',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Node Type',
|
|
43
|
+
name: 'nodeType',
|
|
44
|
+
type: 'options',
|
|
45
|
+
options: [
|
|
46
|
+
{
|
|
47
|
+
name: 'Entity',
|
|
48
|
+
value: 'ENTITY',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Boundary',
|
|
52
|
+
value: 'BOUNDARY',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Asset',
|
|
56
|
+
value: 'ASSET',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Data',
|
|
60
|
+
value: 'DATA',
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
default: 'ENTITY',
|
|
64
|
+
description: 'The type of the node',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
async function execute(itemIndex) {
|
|
70
|
+
const nodeId = this.getNodeParameter('nodeId', itemIndex);
|
|
71
|
+
const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {});
|
|
72
|
+
const query = `
|
|
73
|
+
mutation UpdateRiskAssessmentNode($input: UpdateRiskAssessmentNodeInput!) {
|
|
74
|
+
updateRiskAssessmentNode(input: $input) {
|
|
75
|
+
riskAssessmentNode {
|
|
76
|
+
id
|
|
77
|
+
riskAssessmentScopeId
|
|
78
|
+
nodeType
|
|
79
|
+
name
|
|
80
|
+
createdAt
|
|
81
|
+
updatedAt
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
`;
|
|
86
|
+
const input = { id: nodeId };
|
|
87
|
+
if (additionalFields.name)
|
|
88
|
+
input.name = additionalFields.name;
|
|
89
|
+
if (additionalFields.nodeType)
|
|
90
|
+
input.nodeType = additionalFields.nodeType;
|
|
91
|
+
if (Object.keys(input).length === 1) {
|
|
92
|
+
throw new Error('At least one field must be provided to update');
|
|
93
|
+
}
|
|
94
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input });
|
|
95
|
+
return {
|
|
96
|
+
json: responseData,
|
|
97
|
+
pairedItem: { item: itemIndex },
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=updateNode.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateNode.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/riskAssessment/updateNode.operation.ts"],"names":[],"mappings":";;;AAiFA,0BAuCC;AAzGD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,YAAY,CAAC;aACzB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,YAAY,CAAC;aACzB;SACD;QACD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,sBAAsB;aACnC;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;gBACf,OAAO,EA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,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Process ID',
|
|
9
|
+
name: 'processId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['riskAssessment'],
|
|
14
|
+
operation: ['updateProcess'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the process to update',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Additional Fields',
|
|
23
|
+
name: 'additionalFields',
|
|
24
|
+
type: 'collection',
|
|
25
|
+
placeholder: 'Add Field',
|
|
26
|
+
default: {},
|
|
27
|
+
displayOptions: {
|
|
28
|
+
show: {
|
|
29
|
+
resource: ['riskAssessment'],
|
|
30
|
+
operation: ['updateProcess'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Name',
|
|
36
|
+
name: 'name',
|
|
37
|
+
type: 'string',
|
|
38
|
+
default: '',
|
|
39
|
+
description: 'The name of the process',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Source Node ID',
|
|
43
|
+
name: 'sourceNodeId',
|
|
44
|
+
type: 'string',
|
|
45
|
+
default: '',
|
|
46
|
+
description: 'The ID of the source node',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Target Node ID',
|
|
50
|
+
name: 'targetNodeId',
|
|
51
|
+
type: 'string',
|
|
52
|
+
default: '',
|
|
53
|
+
description: 'The ID of the target node',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
];
|
|
58
|
+
async function execute(itemIndex) {
|
|
59
|
+
const processId = this.getNodeParameter('processId', itemIndex);
|
|
60
|
+
const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {});
|
|
61
|
+
const query = `
|
|
62
|
+
mutation UpdateRiskAssessmentProcess($input: UpdateRiskAssessmentProcessInput!) {
|
|
63
|
+
updateRiskAssessmentProcess(input: $input) {
|
|
64
|
+
riskAssessmentProcess {
|
|
65
|
+
id
|
|
66
|
+
riskAssessmentScopeId
|
|
67
|
+
sourceNodeId
|
|
68
|
+
targetNodeId
|
|
69
|
+
name
|
|
70
|
+
createdAt
|
|
71
|
+
updatedAt
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
const input = { id: processId };
|
|
77
|
+
if (additionalFields.name)
|
|
78
|
+
input.name = additionalFields.name;
|
|
79
|
+
if (additionalFields.sourceNodeId)
|
|
80
|
+
input.sourceNodeId = additionalFields.sourceNodeId;
|
|
81
|
+
if (additionalFields.targetNodeId)
|
|
82
|
+
input.targetNodeId = additionalFields.targetNodeId;
|
|
83
|
+
if (Object.keys(input).length === 1) {
|
|
84
|
+
throw new Error('At least one field must be provided to update');
|
|
85
|
+
}
|
|
86
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input });
|
|
87
|
+
return {
|
|
88
|
+
json: responseData,
|
|
89
|
+
pairedItem: { item: itemIndex },
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=updateProcess.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateProcess.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/riskAssessment/updateProcess.operation.ts"],"names":[],"mappings":";;;AAsEA,0BA0CC;AAjGD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,QAAQ;QACd,cAAc,EAA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ACzD,IAAI,gBAAgB,CAAC,IAAI;QAAE,KAAK,CAAC,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC;IAC9D,IAAI,gBAAgB,CAAC,YAAY;QAAE,KAAK,CAAC,YAAY,GAAG,gBAAgB,CAAC,YAAY,CAAC;IACtF,IAAI,gBAAgB,CAAC,YAAY;QAAE,KAAK,CAAC,YAAY,GAAG,gBAAgB,CAAC,YAAY,CAAC;IAEtF,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,kCAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAExE,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Scenario ID',
|
|
9
|
+
name: 'scenarioId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['riskAssessment'],
|
|
14
|
+
operation: ['updateScenario'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the scenario to update',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Additional Fields',
|
|
23
|
+
name: 'additionalFields',
|
|
24
|
+
type: 'collection',
|
|
25
|
+
placeholder: 'Add Field',
|
|
26
|
+
default: {},
|
|
27
|
+
displayOptions: {
|
|
28
|
+
show: {
|
|
29
|
+
resource: ['riskAssessment'],
|
|
30
|
+
operation: ['updateScenario'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Description',
|
|
36
|
+
name: 'description',
|
|
37
|
+
type: 'string',
|
|
38
|
+
default: '',
|
|
39
|
+
description: 'The description of the scenario',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Name',
|
|
43
|
+
name: 'name',
|
|
44
|
+
type: 'string',
|
|
45
|
+
default: '',
|
|
46
|
+
description: 'The name of the scenario',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
async function execute(itemIndex) {
|
|
52
|
+
const scenarioId = this.getNodeParameter('scenarioId', itemIndex);
|
|
53
|
+
const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {});
|
|
54
|
+
const query = `
|
|
55
|
+
mutation UpdateRiskAssessmentScenario($input: UpdateRiskAssessmentScenarioInput!) {
|
|
56
|
+
updateRiskAssessmentScenario(input: $input) {
|
|
57
|
+
riskAssessmentScenario {
|
|
58
|
+
id
|
|
59
|
+
riskAssessmentScopeId
|
|
60
|
+
name
|
|
61
|
+
description
|
|
62
|
+
createdAt
|
|
63
|
+
updatedAt
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`;
|
|
68
|
+
const input = { id: scenarioId };
|
|
69
|
+
if (additionalFields.name)
|
|
70
|
+
input.name = additionalFields.name;
|
|
71
|
+
if (additionalFields.description !== undefined)
|
|
72
|
+
input.description = additionalFields.description === '' ? null : additionalFields.description;
|
|
73
|
+
if (Object.keys(input).length === 1) {
|
|
74
|
+
throw new Error('At least one field must be provided to update');
|
|
75
|
+
}
|
|
76
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input });
|
|
77
|
+
return {
|
|
78
|
+
json: responseData,
|
|
79
|
+
pairedItem: { item: itemIndex },
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=updateScenario.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateScenario.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/riskAssessment/updateScenario.operation.ts"],"names":[],"mappings":";;;AA+DA,0BAuCC;AAvFD,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC7B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kCAAkC;QAC/C,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,gBAAgB,CAAC;aAC7B;SACD;QACD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,iCAAiC;aAC9C;YACD;gBACC,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,0BAA0B;aACvC;SACD;KACD;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,SAAiB;IAEjB,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,SAAS,CAAW,CAAC;IAC5E,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,SAAS,EAAE,EAAE,CAG/E,CAAC;IAEF,MAAM,KAAK,GAAG;;;;;;;;;;;;;EAab,CAAC;IAEF,MAAM,KAAK,GAA4B,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC;IAC1D,IAAI,gBAAgB,CAAC,IAAI;QAAE,KAAK,CAAC,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC;IAC9D,IAAI,gBAAgB,CAAC,WAAW,KAAK,SAAS;QAAE,KAAK,CAAC,WAAW,GAAG,gBAAgB,CAAC,WAAW,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC;IAE9I,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,YAAY,GAAG,MAAM,kCAAe,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAExE,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.description = void 0;
|
|
4
|
+
exports.execute = execute;
|
|
5
|
+
const GenericFunctions_1 = require("../../GenericFunctions");
|
|
6
|
+
exports.description = [
|
|
7
|
+
{
|
|
8
|
+
displayName: 'Scope ID',
|
|
9
|
+
name: 'scopeId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['riskAssessment'],
|
|
14
|
+
operation: ['updateScope'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the scope to update',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Additional Fields',
|
|
23
|
+
name: 'additionalFields',
|
|
24
|
+
type: 'collection',
|
|
25
|
+
placeholder: 'Add Field',
|
|
26
|
+
default: {},
|
|
27
|
+
displayOptions: {
|
|
28
|
+
show: {
|
|
29
|
+
resource: ['riskAssessment'],
|
|
30
|
+
operation: ['updateScope'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
options: [
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Name',
|
|
36
|
+
name: 'name',
|
|
37
|
+
type: 'string',
|
|
38
|
+
default: '',
|
|
39
|
+
description: 'The name of the scope',
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
async function execute(itemIndex) {
|
|
45
|
+
const scopeId = this.getNodeParameter('scopeId', itemIndex);
|
|
46
|
+
const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {});
|
|
47
|
+
const query = `
|
|
48
|
+
mutation UpdateRiskAssessmentScope($input: UpdateRiskAssessmentScopeInput!) {
|
|
49
|
+
updateRiskAssessmentScope(input: $input) {
|
|
50
|
+
riskAssessmentScope {
|
|
51
|
+
id
|
|
52
|
+
riskAssessmentId
|
|
53
|
+
name
|
|
54
|
+
createdAt
|
|
55
|
+
updatedAt
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
60
|
+
const input = { id: scopeId };
|
|
61
|
+
if (additionalFields.name)
|
|
62
|
+
input.name = additionalFields.name;
|
|
63
|
+
if (Object.keys(input).length === 1) {
|
|
64
|
+
throw new Error('At least one field must be provided to update');
|
|
65
|
+
}
|
|
66
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input });
|
|
67
|
+
return {
|
|
68
|
+
json: responseData,
|
|
69
|
+
pairedItem: { item: itemIndex },
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=updateScope.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateScope.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/riskAssessment/updateScope.operation.ts"],"names":[],"mappings":";;;AAwDA,0BAoCC;AA7ED,6DAAyD;AAE5C,QAAA,WAAW,GAAsB;IAC7C;QACC,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,aAAa,CAAC;aAC1B;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,+BAA+B;QAC5C,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,gBAAgB,CAAC;gBAC5B,SAAS,EAAE,CAAC,aAAa,CAAC;aAC1B;SACD;QACD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,uBAAuB;aACpC;SACD;KACD;CACD,CAAC;AAEK,KAAK,UAAU,OAAO,CAE5B,SAAiB;IAEjB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAW,CAAC;IACtE,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EA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