@probo/n8n-nodes-probo 0.102.0 → 0.105.0
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/index.js +2 -0
- package/dist/nodes/Probo/actions/index.js.map +1 -1
- package/dist/nodes/Probo/actions/risk/create.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/create.operation.js +232 -0
- package/dist/nodes/Probo/actions/risk/create.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/delete.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/delete.operation.js +37 -0
- package/dist/nodes/Probo/actions/risk/delete.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/get.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/get.operation.js +55 -0
- package/dist/nodes/Probo/actions/risk/get.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/getAll.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/getAll.operation.js +98 -0
- package/dist/nodes/Probo/actions/risk/getAll.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/index.d.ts +14 -0
- package/dist/nodes/Probo/actions/risk/index.js +152 -0
- package/dist/nodes/Probo/actions/risk/index.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/linkDocument.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/linkDocument.operation.js +63 -0
- package/dist/nodes/Probo/actions/risk/linkDocument.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/linkMeasure.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/linkMeasure.operation.js +63 -0
- package/dist/nodes/Probo/actions/risk/linkMeasure.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/linkObligation.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/linkObligation.operation.js +63 -0
- package/dist/nodes/Probo/actions/risk/linkObligation.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/unlinkDocument.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/unlinkDocument.operation.js +53 -0
- package/dist/nodes/Probo/actions/risk/unlinkDocument.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/unlinkMeasure.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/unlinkMeasure.operation.js +53 -0
- package/dist/nodes/Probo/actions/risk/unlinkMeasure.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/unlinkObligation.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/unlinkObligation.operation.js +53 -0
- package/dist/nodes/Probo/actions/risk/unlinkObligation.operation.js.map +1 -0
- package/dist/nodes/Probo/actions/risk/update.operation.d.ts +3 -0
- package/dist/nodes/Probo/actions/risk/update.operation.js +214 -0
- package/dist/nodes/Probo/actions/risk/update.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,214 @@
|
|
|
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 ID',
|
|
9
|
+
name: 'riskId',
|
|
10
|
+
type: 'string',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['risk'],
|
|
14
|
+
operation: ['update'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'The ID of the risk to update',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Name',
|
|
23
|
+
name: 'name',
|
|
24
|
+
type: 'string',
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: {
|
|
27
|
+
resource: ['risk'],
|
|
28
|
+
operation: ['update'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
default: '',
|
|
32
|
+
description: 'The name of the risk',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Category',
|
|
36
|
+
name: 'category',
|
|
37
|
+
type: 'string',
|
|
38
|
+
displayOptions: {
|
|
39
|
+
show: {
|
|
40
|
+
resource: ['risk'],
|
|
41
|
+
operation: ['update'],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
default: '',
|
|
45
|
+
description: 'The category of the risk',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
displayName: 'Treatment',
|
|
49
|
+
name: 'treatment',
|
|
50
|
+
type: 'options',
|
|
51
|
+
displayOptions: {
|
|
52
|
+
show: {
|
|
53
|
+
resource: ['risk'],
|
|
54
|
+
operation: ['update'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
options: [
|
|
58
|
+
{
|
|
59
|
+
name: 'Mitigated',
|
|
60
|
+
value: 'MITIGATED',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'Accepted',
|
|
64
|
+
value: 'ACCEPTED',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Avoided',
|
|
68
|
+
value: 'AVOIDED',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: 'Transferred',
|
|
72
|
+
value: 'TRANSFERRED',
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
default: 'MITIGATED',
|
|
76
|
+
description: 'The treatment strategy for the risk',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Additional Fields',
|
|
80
|
+
name: 'additionalFields',
|
|
81
|
+
type: 'collection',
|
|
82
|
+
placeholder: 'Add Field',
|
|
83
|
+
default: {},
|
|
84
|
+
displayOptions: {
|
|
85
|
+
show: {
|
|
86
|
+
resource: ['risk'],
|
|
87
|
+
operation: ['update'],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
options: [
|
|
91
|
+
{
|
|
92
|
+
displayName: 'Description',
|
|
93
|
+
name: 'description',
|
|
94
|
+
type: 'string',
|
|
95
|
+
default: '',
|
|
96
|
+
description: 'The description of the risk',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
displayName: 'Inherent Impact',
|
|
100
|
+
name: 'inherentImpact',
|
|
101
|
+
type: 'number',
|
|
102
|
+
typeOptions: {
|
|
103
|
+
minValue: 1,
|
|
104
|
+
maxValue: 5,
|
|
105
|
+
},
|
|
106
|
+
default: 1,
|
|
107
|
+
description: 'The inherent impact of the risk (1-5)',
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
displayName: 'Inherent Likelihood',
|
|
111
|
+
name: 'inherentLikelihood',
|
|
112
|
+
type: 'number',
|
|
113
|
+
typeOptions: {
|
|
114
|
+
minValue: 1,
|
|
115
|
+
maxValue: 5,
|
|
116
|
+
},
|
|
117
|
+
default: 1,
|
|
118
|
+
description: 'The inherent likelihood of the risk (1-5)',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
displayName: 'Note',
|
|
122
|
+
name: 'note',
|
|
123
|
+
type: 'string',
|
|
124
|
+
default: '',
|
|
125
|
+
description: 'Additional notes about the risk',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
displayName: 'Owner ID',
|
|
129
|
+
name: 'ownerId',
|
|
130
|
+
type: 'string',
|
|
131
|
+
default: '',
|
|
132
|
+
description: 'The ID of the person who owns this risk',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
displayName: 'Residual Impact',
|
|
136
|
+
name: 'residualImpact',
|
|
137
|
+
type: 'number',
|
|
138
|
+
typeOptions: {
|
|
139
|
+
minValue: 1,
|
|
140
|
+
maxValue: 5,
|
|
141
|
+
},
|
|
142
|
+
default: 1,
|
|
143
|
+
description: 'The residual impact of the risk (1-5)',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
displayName: 'Residual Likelihood',
|
|
147
|
+
name: 'residualLikelihood',
|
|
148
|
+
type: 'number',
|
|
149
|
+
typeOptions: {
|
|
150
|
+
minValue: 1,
|
|
151
|
+
maxValue: 5,
|
|
152
|
+
},
|
|
153
|
+
default: 1,
|
|
154
|
+
description: 'The residual likelihood of the risk (1-5)',
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
];
|
|
159
|
+
async function execute(itemIndex) {
|
|
160
|
+
const riskId = this.getNodeParameter('riskId', itemIndex);
|
|
161
|
+
const name = this.getNodeParameter('name', itemIndex, '');
|
|
162
|
+
const category = this.getNodeParameter('category', itemIndex, '');
|
|
163
|
+
const treatment = this.getNodeParameter('treatment', itemIndex, '');
|
|
164
|
+
const additionalFields = this.getNodeParameter('additionalFields', itemIndex, {});
|
|
165
|
+
const query = `
|
|
166
|
+
mutation UpdateRisk($input: UpdateRiskInput!) {
|
|
167
|
+
updateRisk(input: $input) {
|
|
168
|
+
risk {
|
|
169
|
+
id
|
|
170
|
+
name
|
|
171
|
+
description
|
|
172
|
+
category
|
|
173
|
+
treatment
|
|
174
|
+
inherentLikelihood
|
|
175
|
+
inherentImpact
|
|
176
|
+
inherentRiskScore
|
|
177
|
+
residualLikelihood
|
|
178
|
+
residualImpact
|
|
179
|
+
residualRiskScore
|
|
180
|
+
note
|
|
181
|
+
createdAt
|
|
182
|
+
updatedAt
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
`;
|
|
187
|
+
const input = { id: riskId };
|
|
188
|
+
if (name)
|
|
189
|
+
input.name = name;
|
|
190
|
+
if (category)
|
|
191
|
+
input.category = category;
|
|
192
|
+
if (treatment)
|
|
193
|
+
input.treatment = treatment;
|
|
194
|
+
if (additionalFields.description !== undefined)
|
|
195
|
+
input.description = additionalFields.description === '' ? null : additionalFields.description;
|
|
196
|
+
if (additionalFields.ownerId !== undefined)
|
|
197
|
+
input.ownerId = additionalFields.ownerId === '' ? null : additionalFields.ownerId;
|
|
198
|
+
if (additionalFields.inherentLikelihood !== undefined)
|
|
199
|
+
input.inherentLikelihood = additionalFields.inherentLikelihood;
|
|
200
|
+
if (additionalFields.inherentImpact !== undefined)
|
|
201
|
+
input.inherentImpact = additionalFields.inherentImpact;
|
|
202
|
+
if (additionalFields.residualLikelihood !== undefined)
|
|
203
|
+
input.residualLikelihood = additionalFields.residualLikelihood;
|
|
204
|
+
if (additionalFields.residualImpact !== undefined)
|
|
205
|
+
input.residualImpact = additionalFields.residualImpact;
|
|
206
|
+
if (additionalFields.note !== undefined)
|
|
207
|
+
input.note = additionalFields.note === '' ? null : additionalFields.note;
|
|
208
|
+
const responseData = await GenericFunctions_1.proboApiRequest.call(this, query, { input });
|
|
209
|
+
return {
|
|
210
|
+
json: responseData,
|
|
211
|
+
pairedItem: { item: itemIndex },
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=update.operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.operation.js","sourceRoot":"","sources":["../../../../../nodes/Probo/actions/risk/update.operation.ts"],"names":[],"mappings":";;;AA6JA,0BA2DC;AAvND,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,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,IAAI;KACd;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAA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