@stackfactor/client-api 1.1.223 → 1.1.224
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/cjs/package.json +1 -0
- package/dist/esm/lib/actionNotifications.js +7 -13
- package/dist/esm/lib/actionNotifications.js.map +1 -1
- package/dist/esm/lib/address.js +3 -7
- package/dist/esm/lib/address.js.map +1 -1
- package/dist/esm/lib/aiAssistant.js +11 -19
- package/dist/esm/lib/aiAssistant.js.map +1 -1
- package/dist/esm/lib/avatar.js +3 -7
- package/dist/esm/lib/avatar.js.map +1 -1
- package/dist/esm/lib/axiosClient.d.ts +2 -2
- package/dist/esm/lib/axiosClient.d.ts.map +1 -1
- package/dist/esm/lib/axiosClient.js +12 -55
- package/dist/esm/lib/axiosClient.js.map +1 -1
- package/dist/esm/lib/config.js +7 -13
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/constants.js +4 -7
- package/dist/esm/lib/constants.js.map +1 -1
- package/dist/esm/lib/control.js +27 -43
- package/dist/esm/lib/control.js.map +1 -1
- package/dist/esm/lib/controlTemplate.js +23 -37
- package/dist/esm/lib/controlTemplate.js.map +1 -1
- package/dist/esm/lib/customFields.js +3 -7
- package/dist/esm/lib/customFields.js.map +1 -1
- package/dist/esm/lib/dashboard.js +7 -13
- package/dist/esm/lib/dashboard.js.map +1 -1
- package/dist/esm/lib/departmentTrainingPlans.js +13 -22
- package/dist/esm/lib/departmentTrainingPlans.js.map +1 -1
- package/dist/esm/lib/groups.js +25 -40
- package/dist/esm/lib/groups.js.map +1 -1
- package/dist/esm/lib/index.js +44 -89
- package/dist/esm/lib/index.js.map +1 -1
- package/dist/esm/lib/integration.js +29 -46
- package/dist/esm/lib/integration.js.map +1 -1
- package/dist/esm/lib/integrationConfiguration.js +7 -13
- package/dist/esm/lib/integrationConfiguration.js.map +1 -1
- package/dist/esm/lib/integrations/contentGenerator.js +7 -12
- package/dist/esm/lib/integrations/contentGenerator.js.map +1 -1
- package/dist/esm/lib/labSessions.js +17 -27
- package/dist/esm/lib/labSessions.js.map +1 -1
- package/dist/esm/lib/learningContent.js +51 -78
- package/dist/esm/lib/learningContent.js.map +1 -1
- package/dist/esm/lib/learningPath.js +17 -28
- package/dist/esm/lib/learningPath.js.map +1 -1
- package/dist/esm/lib/logger.js +5 -10
- package/dist/esm/lib/logger.js.map +1 -1
- package/dist/esm/lib/microSkillsQuizes.js +5 -10
- package/dist/esm/lib/microSkillsQuizes.js.map +1 -1
- package/dist/esm/lib/policy.js +27 -43
- package/dist/esm/lib/policy.js.map +1 -1
- package/dist/esm/lib/policyTemplate.js +23 -37
- package/dist/esm/lib/policyTemplate.js.map +1 -1
- package/dist/esm/lib/quotas.js +5 -10
- package/dist/esm/lib/quotas.js.map +1 -1
- package/dist/esm/lib/reports.js +9 -16
- package/dist/esm/lib/reports.js.map +1 -1
- package/dist/esm/lib/requirement.js +27 -43
- package/dist/esm/lib/requirement.js.map +1 -1
- package/dist/esm/lib/requirementTemplate.js +23 -37
- package/dist/esm/lib/requirementTemplate.js.map +1 -1
- package/dist/esm/lib/role.js +31 -48
- package/dist/esm/lib/role.js.map +1 -1
- package/dist/esm/lib/roleTemplate.js +19 -31
- package/dist/esm/lib/roleTemplate.js.map +1 -1
- package/dist/esm/lib/security.js +9 -16
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/lib/skill.js +37 -58
- package/dist/esm/lib/skill.js.map +1 -1
- package/dist/esm/lib/skillAssessmentTestingSession.js +23 -37
- package/dist/esm/lib/skillAssessmentTestingSession.js.map +1 -1
- package/dist/esm/lib/skillAssessments.js +13 -22
- package/dist/esm/lib/skillAssessments.js.map +1 -1
- package/dist/esm/lib/skillTemplate.js +23 -37
- package/dist/esm/lib/skillTemplate.js.map +1 -1
- package/dist/esm/lib/socketError.js +1 -5
- package/dist/esm/lib/socketError.js.map +1 -1
- package/dist/esm/lib/standard.js +27 -43
- package/dist/esm/lib/standard.js.map +1 -1
- package/dist/esm/lib/standardTemplate.js +23 -37
- package/dist/esm/lib/standardTemplate.js.map +1 -1
- package/dist/esm/lib/talentTransfromation.js +9 -16
- package/dist/esm/lib/talentTransfromation.js.map +1 -1
- package/dist/esm/lib/teams.js +25 -40
- package/dist/esm/lib/teams.js.map +1 -1
- package/dist/esm/lib/tenants.js +7 -13
- package/dist/esm/lib/tenants.js.map +1 -1
- package/dist/esm/lib/trainingPlans.js +27 -42
- package/dist/esm/lib/trainingPlans.js.map +1 -1
- package/dist/esm/lib/trainingPlansProficiencyLevels.js +9 -16
- package/dist/esm/lib/trainingPlansProficiencyLevels.js.map +1 -1
- package/dist/esm/lib/userInformation.js +7 -13
- package/dist/esm/lib/userInformation.js.map +1 -1
- package/dist/esm/lib/users.js +55 -85
- package/dist/esm/lib/users.js.map +1 -1
- package/dist/esm/lib/utils.js +5 -13
- package/dist/esm/lib/utils.js.map +1 -1
- package/dist/esm/package.json +1 -0
- package/package.json +3 -3
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRequirementControls = exports.getRequirementRelatedStandards = exports.getRequirementRelatedPolicies = exports.watchRequirement = exports.setRequirementInformationFromTemplate = exports.setRequirementInformation = exports.publishRequirement = exports.getRequirementList = exports.getRequirementInformationById = exports.discardRequirementChanges = exports.deleteRequirement = exports.createRequirementsFromTemplates = exports.createRequirement = void 0;
|
|
4
|
-
const axiosClient_js_1 = require("./axiosClient.js");
|
|
1
|
+
import { client } from "./axiosClient.js";
|
|
5
2
|
/**
|
|
6
3
|
* Create requirement and set information
|
|
7
4
|
* @param {Object} data
|
|
8
5
|
* @param {String} token Authorization token
|
|
9
6
|
* @returns {Promise<object>}
|
|
10
7
|
*/
|
|
11
|
-
const createRequirement = (data, token) => {
|
|
8
|
+
export const createRequirement = (data, token) => {
|
|
12
9
|
return new Promise((resolve, reject) => {
|
|
13
|
-
const confirmationRequest =
|
|
10
|
+
const confirmationRequest = client.put("/api/v1/requirements", { data: data }, {
|
|
14
11
|
headers: { authorization: token },
|
|
15
12
|
});
|
|
16
13
|
confirmationRequest
|
|
@@ -22,19 +19,18 @@ const createRequirement = (data, token) => {
|
|
|
22
19
|
});
|
|
23
20
|
});
|
|
24
21
|
};
|
|
25
|
-
exports.createRequirement = createRequirement;
|
|
26
22
|
/**
|
|
27
23
|
* Create requirements from templates
|
|
28
24
|
* @param {Array<String>} templateIds
|
|
29
25
|
* @param {String} token Authorization token
|
|
30
26
|
* @returns {Promise<object>}
|
|
31
27
|
*/
|
|
32
|
-
const createRequirementsFromTemplates = (templateIds, token) => {
|
|
28
|
+
export const createRequirementsFromTemplates = (templateIds, token) => {
|
|
33
29
|
return new Promise((resolve, reject) => {
|
|
34
30
|
const requestData = {
|
|
35
31
|
templateIds: templateIds,
|
|
36
32
|
};
|
|
37
|
-
const confirmationRequest =
|
|
33
|
+
const confirmationRequest = client.put("/api/v1/requirements/createfromtemplate/", requestData, {
|
|
38
34
|
headers: { authorization: token },
|
|
39
35
|
});
|
|
40
36
|
confirmationRequest
|
|
@@ -46,7 +42,6 @@ const createRequirementsFromTemplates = (templateIds, token) => {
|
|
|
46
42
|
});
|
|
47
43
|
});
|
|
48
44
|
};
|
|
49
|
-
exports.createRequirementsFromTemplates = createRequirementsFromTemplates;
|
|
50
45
|
/**
|
|
51
46
|
* Delete requirement
|
|
52
47
|
* @param {String} id The id of the requirement to be deleted
|
|
@@ -54,14 +49,14 @@ exports.createRequirementsFromTemplates = createRequirementsFromTemplates;
|
|
|
54
49
|
* @param {String} token Authorization token
|
|
55
50
|
* @returns {Promise<object>}
|
|
56
51
|
*/
|
|
57
|
-
const deleteRequirement = (id, comments, token) => {
|
|
52
|
+
export const deleteRequirement = (id, comments, token) => {
|
|
58
53
|
return new Promise((resolve, reject) => {
|
|
59
54
|
const data = {
|
|
60
55
|
id: id,
|
|
61
56
|
};
|
|
62
57
|
if (comments)
|
|
63
58
|
data.comments = comments;
|
|
64
|
-
const request =
|
|
59
|
+
const request = client.delete(`/api/v1/requirements/`, {
|
|
65
60
|
headers: { authorization: token },
|
|
66
61
|
data: data,
|
|
67
62
|
});
|
|
@@ -74,17 +69,16 @@ const deleteRequirement = (id, comments, token) => {
|
|
|
74
69
|
});
|
|
75
70
|
});
|
|
76
71
|
};
|
|
77
|
-
exports.deleteRequirement = deleteRequirement;
|
|
78
72
|
/**
|
|
79
73
|
* Discard the requirement draft changes
|
|
80
74
|
* @param {String} id The id of the requirement to be discarded
|
|
81
75
|
* @param {String} token Authorization token
|
|
82
76
|
* @returns {Promise<object>}
|
|
83
77
|
*/
|
|
84
|
-
const discardRequirementChanges = (id, token) => {
|
|
78
|
+
export const discardRequirementChanges = (id, token) => {
|
|
85
79
|
return new Promise((resolve, reject) => {
|
|
86
80
|
const data = {};
|
|
87
|
-
const request =
|
|
81
|
+
const request = client.get(`/api/v1/requirements/discard/${id}`, {
|
|
88
82
|
headers: { authorization: token },
|
|
89
83
|
data: data,
|
|
90
84
|
});
|
|
@@ -97,7 +91,6 @@ const discardRequirementChanges = (id, token) => {
|
|
|
97
91
|
});
|
|
98
92
|
});
|
|
99
93
|
};
|
|
100
|
-
exports.discardRequirementChanges = discardRequirementChanges;
|
|
101
94
|
/**
|
|
102
95
|
* Get requirement information
|
|
103
96
|
* @param {String} id The id of the requirement
|
|
@@ -106,9 +99,9 @@ exports.discardRequirementChanges = discardRequirementChanges;
|
|
|
106
99
|
* @param {String} token Authorization token
|
|
107
100
|
* @returns {Promise<object>}
|
|
108
101
|
*/
|
|
109
|
-
const getRequirementInformationById = (id, version, returnNullIfVersionNotFound, token) => {
|
|
102
|
+
export const getRequirementInformationById = (id, version, returnNullIfVersionNotFound, token) => {
|
|
110
103
|
return new Promise((resolve, reject) => {
|
|
111
|
-
const confirmationRequest =
|
|
104
|
+
const confirmationRequest = client.get(`/api/v1/requirements/${id}/${version}/${returnNullIfVersionNotFound}`, {
|
|
112
105
|
headers: { authorization: token },
|
|
113
106
|
});
|
|
114
107
|
confirmationRequest
|
|
@@ -120,7 +113,6 @@ const getRequirementInformationById = (id, version, returnNullIfVersionNotFound,
|
|
|
120
113
|
});
|
|
121
114
|
});
|
|
122
115
|
};
|
|
123
|
-
exports.getRequirementInformationById = getRequirementInformationById;
|
|
124
116
|
/**
|
|
125
117
|
* Get requirement list
|
|
126
118
|
* @param {Array<String>} filter The filter used to select the requirement
|
|
@@ -131,7 +123,7 @@ exports.getRequirementInformationById = getRequirementInformationById;
|
|
|
131
123
|
* @param {String} token Authorization token
|
|
132
124
|
* @returns {Promise<object>}
|
|
133
125
|
*/
|
|
134
|
-
const getRequirementList = (filter, version, includeDeleted, returnDefaultIfVersionNotAvailable, details, token) => {
|
|
126
|
+
export const getRequirementList = (filter, version, includeDeleted, returnDefaultIfVersionNotAvailable, details, token) => {
|
|
135
127
|
return new Promise((resolve, reject) => {
|
|
136
128
|
const requestData = {
|
|
137
129
|
includeDeleted: includeDeleted,
|
|
@@ -142,7 +134,7 @@ const getRequirementList = (filter, version, includeDeleted, returnDefaultIfVers
|
|
|
142
134
|
};
|
|
143
135
|
if (filter)
|
|
144
136
|
requestData.filter = filter;
|
|
145
|
-
const confirmationRequest =
|
|
137
|
+
const confirmationRequest = client.post(`/api/v1/requirements`, requestData, {
|
|
146
138
|
headers: { authorization: token },
|
|
147
139
|
});
|
|
148
140
|
confirmationRequest
|
|
@@ -154,7 +146,6 @@ const getRequirementList = (filter, version, includeDeleted, returnDefaultIfVers
|
|
|
154
146
|
});
|
|
155
147
|
});
|
|
156
148
|
};
|
|
157
|
-
exports.getRequirementList = getRequirementList;
|
|
158
149
|
/**
|
|
159
150
|
* Publish requirement
|
|
160
151
|
* @param {String} id The id of the requirement to be published
|
|
@@ -162,12 +153,12 @@ exports.getRequirementList = getRequirementList;
|
|
|
162
153
|
* @param {String} token Authorization token
|
|
163
154
|
* @returns {Promise<object>}
|
|
164
155
|
*/
|
|
165
|
-
const publishRequirement = (id, comments, token) => {
|
|
156
|
+
export const publishRequirement = (id, comments, token) => {
|
|
166
157
|
return new Promise((resolve, reject) => {
|
|
167
158
|
const data = {};
|
|
168
159
|
if (comments)
|
|
169
160
|
data.comments = comments;
|
|
170
|
-
const confirmationRequest =
|
|
161
|
+
const confirmationRequest = client.post(`/api/v1/requirements/publish/${id}`, data, {
|
|
171
162
|
headers: { authorization: token },
|
|
172
163
|
});
|
|
173
164
|
confirmationRequest
|
|
@@ -179,7 +170,6 @@ const publishRequirement = (id, comments, token) => {
|
|
|
179
170
|
});
|
|
180
171
|
});
|
|
181
172
|
};
|
|
182
|
-
exports.publishRequirement = publishRequirement;
|
|
183
173
|
/**
|
|
184
174
|
* Set requirement information
|
|
185
175
|
* @param {String} id The id of the requirement to be updated
|
|
@@ -187,13 +177,13 @@ exports.publishRequirement = publishRequirement;
|
|
|
187
177
|
* @param {String} token Authorization token
|
|
188
178
|
* @returns {Promise<object>}
|
|
189
179
|
*/
|
|
190
|
-
const setRequirementInformation = (id, data, token) => {
|
|
180
|
+
export const setRequirementInformation = (id, data, token) => {
|
|
191
181
|
return new Promise((resolve, reject) => {
|
|
192
182
|
const requestData = {
|
|
193
183
|
data: data,
|
|
194
184
|
id: id,
|
|
195
185
|
};
|
|
196
|
-
const confirmationRequest =
|
|
186
|
+
const confirmationRequest = client.post(`/api/v1/requirements/update`, requestData, {
|
|
197
187
|
headers: { authorization: token },
|
|
198
188
|
});
|
|
199
189
|
confirmationRequest
|
|
@@ -205,7 +195,6 @@ const setRequirementInformation = (id, data, token) => {
|
|
|
205
195
|
});
|
|
206
196
|
});
|
|
207
197
|
};
|
|
208
|
-
exports.setRequirementInformation = setRequirementInformation;
|
|
209
198
|
/**
|
|
210
199
|
* Set the requirement information from template
|
|
211
200
|
* @param {String} id The id of the requirement to be updated
|
|
@@ -213,13 +202,13 @@ exports.setRequirementInformation = setRequirementInformation;
|
|
|
213
202
|
* @param {String} token Authorization token
|
|
214
203
|
* @returns {Promise<object>}
|
|
215
204
|
*/
|
|
216
|
-
const setRequirementInformationFromTemplate = (id, data, token) => {
|
|
205
|
+
export const setRequirementInformationFromTemplate = (id, data, token) => {
|
|
217
206
|
return new Promise((resolve, reject) => {
|
|
218
207
|
const requestData = {
|
|
219
208
|
data: data,
|
|
220
209
|
id: id,
|
|
221
210
|
};
|
|
222
|
-
const confirmationRequest =
|
|
211
|
+
const confirmationRequest = client.post(`/api/v1/requirements/updatefromtemplate/`, requestData, {
|
|
223
212
|
headers: { authorization: token },
|
|
224
213
|
});
|
|
225
214
|
confirmationRequest
|
|
@@ -231,7 +220,6 @@ const setRequirementInformationFromTemplate = (id, data, token) => {
|
|
|
231
220
|
});
|
|
232
221
|
});
|
|
233
222
|
};
|
|
234
|
-
exports.setRequirementInformationFromTemplate = setRequirementInformationFromTemplate;
|
|
235
223
|
/**
|
|
236
224
|
* Watch requirement
|
|
237
225
|
* @param {String} id The id of the requirement to be updated
|
|
@@ -239,13 +227,13 @@ exports.setRequirementInformationFromTemplate = setRequirementInformationFromTem
|
|
|
239
227
|
* @param {String} token Authorization token
|
|
240
228
|
* @returns {Promise<object>}
|
|
241
229
|
*/
|
|
242
|
-
const watchRequirement = (id, watch, token) => {
|
|
230
|
+
export const watchRequirement = (id, watch, token) => {
|
|
243
231
|
return new Promise((resolve, reject) => {
|
|
244
232
|
const requestData = {
|
|
245
233
|
id: id,
|
|
246
234
|
watch: watch,
|
|
247
235
|
};
|
|
248
|
-
const confirmationRequest =
|
|
236
|
+
const confirmationRequest = client.post(`/api/v1/requirements/watch`, requestData, {
|
|
249
237
|
headers: { authorization: token },
|
|
250
238
|
});
|
|
251
239
|
confirmationRequest
|
|
@@ -257,16 +245,15 @@ const watchRequirement = (id, watch, token) => {
|
|
|
257
245
|
});
|
|
258
246
|
});
|
|
259
247
|
};
|
|
260
|
-
exports.watchRequirement = watchRequirement;
|
|
261
248
|
/**
|
|
262
249
|
* Get the requirement related policies
|
|
263
250
|
* @param {String} id The requirement id
|
|
264
251
|
* @param {String} token Authorization token
|
|
265
252
|
* @returns {Promise<object>}
|
|
266
253
|
*/
|
|
267
|
-
const getRequirementRelatedPolicies = (id, token) => {
|
|
254
|
+
export const getRequirementRelatedPolicies = (id, token) => {
|
|
268
255
|
return new Promise((resolve, reject) => {
|
|
269
|
-
const confirmationRequest =
|
|
256
|
+
const confirmationRequest = client.get(`/api/v1/requirements/policies/${id}`, {
|
|
270
257
|
headers: { authorization: token },
|
|
271
258
|
});
|
|
272
259
|
confirmationRequest
|
|
@@ -278,16 +265,15 @@ const getRequirementRelatedPolicies = (id, token) => {
|
|
|
278
265
|
});
|
|
279
266
|
});
|
|
280
267
|
};
|
|
281
|
-
exports.getRequirementRelatedPolicies = getRequirementRelatedPolicies;
|
|
282
268
|
/**
|
|
283
269
|
* Get the requirement related standards
|
|
284
270
|
* @param {String} id The requirement id
|
|
285
271
|
* @param {String} token Authorization token
|
|
286
272
|
* @returns {Promise<object>}
|
|
287
273
|
*/
|
|
288
|
-
const getRequirementRelatedStandards = (id, token) => {
|
|
274
|
+
export const getRequirementRelatedStandards = (id, token) => {
|
|
289
275
|
return new Promise((resolve, reject) => {
|
|
290
|
-
const confirmationRequest =
|
|
276
|
+
const confirmationRequest = client.get(`/api/v1/requirements/standards/${id}`, {
|
|
291
277
|
headers: { authorization: token },
|
|
292
278
|
});
|
|
293
279
|
confirmationRequest
|
|
@@ -299,16 +285,15 @@ const getRequirementRelatedStandards = (id, token) => {
|
|
|
299
285
|
});
|
|
300
286
|
});
|
|
301
287
|
};
|
|
302
|
-
exports.getRequirementRelatedStandards = getRequirementRelatedStandards;
|
|
303
288
|
/**
|
|
304
289
|
* Get the requirement related controls
|
|
305
290
|
* @param {String} id The requirement id
|
|
306
291
|
* @param {String} token Authorization token
|
|
307
292
|
* @returns {Promise<object>}
|
|
308
293
|
*/
|
|
309
|
-
const getRequirementControls = (id, token) => {
|
|
294
|
+
export const getRequirementControls = (id, token) => {
|
|
310
295
|
return new Promise((resolve, reject) => {
|
|
311
|
-
const confirmationRequest =
|
|
296
|
+
const confirmationRequest = client.get(`/api/v1/requirements/controls/${id}`, {
|
|
312
297
|
headers: { authorization: token },
|
|
313
298
|
});
|
|
314
299
|
confirmationRequest
|
|
@@ -320,5 +305,4 @@ const getRequirementControls = (id, token) => {
|
|
|
320
305
|
});
|
|
321
306
|
});
|
|
322
307
|
};
|
|
323
|
-
exports.getRequirementControls = getRequirementControls;
|
|
324
308
|
//# sourceMappingURL=requirement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirement.js","sourceRoot":"","sources":["../../../src/lib/requirement.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"requirement.js","sourceRoot":"","sources":["../../../src/lib/requirement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,IAAY,EACZ,KAAa,EACI,EAAE;IACnB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CACpC,sBAAsB,EACtB,EAAE,IAAI,EAAE,IAAI,EAAE,EACd;YACE,OAAO,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE;SAClC,CACF,CAAC;QACF,mBAAmB;aAChB,IAAI,CAAC,CAAC,QAAuB,EAAE,EAAE;YAChC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAiB,EAAE,EAAE;YAC3B,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,WAAqB,EACrB,KAAa,EACI,EAAE;IACnB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE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OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAiB,EAAE,EAAE;YAC3B,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRequirementTemplateRelatedControlTemplates = exports.getRequirementTemplateRelatedStandardTemplates = exports.getRequirementTemplateRelatedPolicyTemplates = exports.setRequirementTemplateTags = exports.setRequirementTemplateInformation = exports.publishRequirementTemplate = exports.getRequirementTemplateList = exports.getRequirementTemplateInformationById = exports.discardRequirementTemplateChanges = exports.deleteRequirementTemplate = exports.createRequirementTemplate = void 0;
|
|
4
|
-
const axiosClient_js_1 = require("./axiosClient.js");
|
|
1
|
+
import { client } from "./axiosClient.js";
|
|
5
2
|
/**
|
|
6
3
|
* Create requirement template and set information
|
|
7
4
|
* @param {Object} data
|
|
8
5
|
* @param {String} token Authorization token
|
|
9
6
|
* @returns {Promise<object>}
|
|
10
7
|
*/
|
|
11
|
-
const createRequirementTemplate = (data, token) => {
|
|
8
|
+
export const createRequirementTemplate = (data, token) => {
|
|
12
9
|
return new Promise((resolve, reject) => {
|
|
13
10
|
const requestData = {
|
|
14
11
|
data: data,
|
|
15
12
|
};
|
|
16
|
-
const confirmationRequest =
|
|
13
|
+
const confirmationRequest = client.put("/api/v1/requirementtemplates", requestData, {
|
|
17
14
|
headers: { authorization: token },
|
|
18
15
|
});
|
|
19
16
|
confirmationRequest
|
|
@@ -25,7 +22,6 @@ const createRequirementTemplate = (data, token) => {
|
|
|
25
22
|
});
|
|
26
23
|
});
|
|
27
24
|
};
|
|
28
|
-
exports.createRequirementTemplate = createRequirementTemplate;
|
|
29
25
|
/**
|
|
30
26
|
* Delete requirement template
|
|
31
27
|
* @param {number} id The id of the template to be deleted
|
|
@@ -33,14 +29,14 @@ exports.createRequirementTemplate = createRequirementTemplate;
|
|
|
33
29
|
* @param {String} token Authorization token
|
|
34
30
|
* @returns {Promise<object>}
|
|
35
31
|
*/
|
|
36
|
-
const deleteRequirementTemplate = (id, comments, token) => {
|
|
32
|
+
export const deleteRequirementTemplate = (id, comments, token) => {
|
|
37
33
|
const data = {
|
|
38
34
|
id: id,
|
|
39
35
|
};
|
|
40
36
|
if (comments)
|
|
41
37
|
data.comments = comments;
|
|
42
38
|
return new Promise((resolve, reject) => {
|
|
43
|
-
const request =
|
|
39
|
+
const request = client.delete(`/api/v1/requirementtemplates/`, {
|
|
44
40
|
headers: { authorization: token },
|
|
45
41
|
data: data,
|
|
46
42
|
});
|
|
@@ -53,17 +49,16 @@ const deleteRequirementTemplate = (id, comments, token) => {
|
|
|
53
49
|
});
|
|
54
50
|
});
|
|
55
51
|
};
|
|
56
|
-
exports.deleteRequirementTemplate = deleteRequirementTemplate;
|
|
57
52
|
/**
|
|
58
53
|
* Discard the requirement template draft changes
|
|
59
54
|
* @param {String} id The id of the requirement template to be discarded
|
|
60
55
|
* @param {String} token Authorization token
|
|
61
56
|
* @returns {Promise<object>}
|
|
62
57
|
*/
|
|
63
|
-
const discardRequirementTemplateChanges = (id, token) => {
|
|
58
|
+
export const discardRequirementTemplateChanges = (id, token) => {
|
|
64
59
|
return new Promise((resolve, reject) => {
|
|
65
60
|
const data = {};
|
|
66
|
-
const request =
|
|
61
|
+
const request = client.get(`/api/v1/requirementtemplates/discard/${id}`, {
|
|
67
62
|
headers: { authorization: token },
|
|
68
63
|
data: data,
|
|
69
64
|
});
|
|
@@ -76,7 +71,6 @@ const discardRequirementTemplateChanges = (id, token) => {
|
|
|
76
71
|
});
|
|
77
72
|
});
|
|
78
73
|
};
|
|
79
|
-
exports.discardRequirementTemplateChanges = discardRequirementTemplateChanges;
|
|
80
74
|
/**
|
|
81
75
|
* Get requirement template information
|
|
82
76
|
* @param {String} id The id of the template
|
|
@@ -85,9 +79,9 @@ exports.discardRequirementTemplateChanges = discardRequirementTemplateChanges;
|
|
|
85
79
|
* @param {String} token Authorization token
|
|
86
80
|
* @returns {Promise<object>}
|
|
87
81
|
*/
|
|
88
|
-
const getRequirementTemplateInformationById = (id, version, returnNullIfVersionNotFound, token) => {
|
|
82
|
+
export const getRequirementTemplateInformationById = (id, version, returnNullIfVersionNotFound, token) => {
|
|
89
83
|
return new Promise((resolve, reject) => {
|
|
90
|
-
const confirmationRequest =
|
|
84
|
+
const confirmationRequest = client.get(`/api/v1/requirementtemplates/${id}/${version}/${returnNullIfVersionNotFound}`, {
|
|
91
85
|
headers: { authorization: token },
|
|
92
86
|
});
|
|
93
87
|
confirmationRequest
|
|
@@ -99,7 +93,6 @@ const getRequirementTemplateInformationById = (id, version, returnNullIfVersionN
|
|
|
99
93
|
});
|
|
100
94
|
});
|
|
101
95
|
};
|
|
102
|
-
exports.getRequirementTemplateInformationById = getRequirementTemplateInformationById;
|
|
103
96
|
/**
|
|
104
97
|
* Get requirement template list
|
|
105
98
|
* @param {Array<String>} filter The filter used to select the template
|
|
@@ -109,7 +102,7 @@ exports.getRequirementTemplateInformationById = getRequirementTemplateInformatio
|
|
|
109
102
|
* @param {String} token Authorization token
|
|
110
103
|
* @returns {Promise<object>}
|
|
111
104
|
*/
|
|
112
|
-
const getRequirementTemplateList = (filter, version, includeDeleted, details, token) => {
|
|
105
|
+
export const getRequirementTemplateList = (filter, version, includeDeleted, details, token) => {
|
|
113
106
|
return new Promise((resolve, reject) => {
|
|
114
107
|
const requestData = {
|
|
115
108
|
includeDeleted: includeDeleted,
|
|
@@ -118,7 +111,7 @@ const getRequirementTemplateList = (filter, version, includeDeleted, details, to
|
|
|
118
111
|
};
|
|
119
112
|
if (filter)
|
|
120
113
|
requestData.filter = filter;
|
|
121
|
-
const confirmationRequest =
|
|
114
|
+
const confirmationRequest = client.post(`/api/v1/requirementtemplates`, requestData, {
|
|
122
115
|
headers: { authorization: token },
|
|
123
116
|
});
|
|
124
117
|
confirmationRequest
|
|
@@ -130,7 +123,6 @@ const getRequirementTemplateList = (filter, version, includeDeleted, details, to
|
|
|
130
123
|
});
|
|
131
124
|
});
|
|
132
125
|
};
|
|
133
|
-
exports.getRequirementTemplateList = getRequirementTemplateList;
|
|
134
126
|
/**
|
|
135
127
|
* Publish requirement template
|
|
136
128
|
* @param {number} id The id of the template to be published
|
|
@@ -138,12 +130,12 @@ exports.getRequirementTemplateList = getRequirementTemplateList;
|
|
|
138
130
|
* @param {String} token Authorization token
|
|
139
131
|
* @returns {Promise<object>}
|
|
140
132
|
*/
|
|
141
|
-
const publishRequirementTemplate = (id, comments, token) => {
|
|
133
|
+
export const publishRequirementTemplate = (id, comments, token) => {
|
|
142
134
|
return new Promise((resolve, reject) => {
|
|
143
135
|
const data = {};
|
|
144
136
|
if (comments)
|
|
145
137
|
data.comments = comments;
|
|
146
|
-
const confirmationRequest =
|
|
138
|
+
const confirmationRequest = client.post(`/api/v1/requirementtemplates/publish/${id}`, data, {
|
|
147
139
|
headers: { authorization: token },
|
|
148
140
|
});
|
|
149
141
|
confirmationRequest
|
|
@@ -155,7 +147,6 @@ const publishRequirementTemplate = (id, comments, token) => {
|
|
|
155
147
|
});
|
|
156
148
|
});
|
|
157
149
|
};
|
|
158
|
-
exports.publishRequirementTemplate = publishRequirementTemplate;
|
|
159
150
|
/**
|
|
160
151
|
* Set requirement template information
|
|
161
152
|
* @param {String} id The id of the template to be updated
|
|
@@ -163,13 +154,13 @@ exports.publishRequirementTemplate = publishRequirementTemplate;
|
|
|
163
154
|
* @param {String} token Authorization token
|
|
164
155
|
* @returns {Promise<object>}
|
|
165
156
|
*/
|
|
166
|
-
const setRequirementTemplateInformation = (id, data, token) => {
|
|
157
|
+
export const setRequirementTemplateInformation = (id, data, token) => {
|
|
167
158
|
return new Promise((resolve, reject) => {
|
|
168
159
|
const requestData = {
|
|
169
160
|
data: data,
|
|
170
161
|
id: id,
|
|
171
162
|
};
|
|
172
|
-
const confirmationRequest =
|
|
163
|
+
const confirmationRequest = client.post(`/api/v1/requirementtemplates/update`, requestData, {
|
|
173
164
|
headers: { authorization: token },
|
|
174
165
|
});
|
|
175
166
|
confirmationRequest
|
|
@@ -181,7 +172,6 @@ const setRequirementTemplateInformation = (id, data, token) => {
|
|
|
181
172
|
});
|
|
182
173
|
});
|
|
183
174
|
};
|
|
184
|
-
exports.setRequirementTemplateInformation = setRequirementTemplateInformation;
|
|
185
175
|
/**
|
|
186
176
|
* Update the requirement template tags
|
|
187
177
|
* @param {String} id The id of the template to be updated
|
|
@@ -189,13 +179,13 @@ exports.setRequirementTemplateInformation = setRequirementTemplateInformation;
|
|
|
189
179
|
* @param {String} token Authorization token
|
|
190
180
|
* @returns {Promise<object>}
|
|
191
181
|
*/
|
|
192
|
-
const setRequirementTemplateTags = (id, tags, token) => {
|
|
182
|
+
export const setRequirementTemplateTags = (id, tags, token) => {
|
|
193
183
|
return new Promise((resolve, reject) => {
|
|
194
184
|
const requestData = {
|
|
195
185
|
tags: tags,
|
|
196
186
|
id: id,
|
|
197
187
|
};
|
|
198
|
-
const confirmationRequest =
|
|
188
|
+
const confirmationRequest = client.post(`/api/v1/requirementtemplates/updatetags`, requestData, {
|
|
199
189
|
headers: { authorization: token },
|
|
200
190
|
});
|
|
201
191
|
confirmationRequest
|
|
@@ -207,16 +197,15 @@ const setRequirementTemplateTags = (id, tags, token) => {
|
|
|
207
197
|
});
|
|
208
198
|
});
|
|
209
199
|
};
|
|
210
|
-
exports.setRequirementTemplateTags = setRequirementTemplateTags;
|
|
211
200
|
/**
|
|
212
201
|
* Get the requirement template related policy templates
|
|
213
202
|
* @param {String} id The requirement template id
|
|
214
203
|
* @param {String} token Authorization token
|
|
215
204
|
* @returns {Promise<object>}
|
|
216
205
|
*/
|
|
217
|
-
const getRequirementTemplateRelatedPolicyTemplates = (id, token) => {
|
|
206
|
+
export const getRequirementTemplateRelatedPolicyTemplates = (id, token) => {
|
|
218
207
|
return new Promise((resolve, reject) => {
|
|
219
|
-
const confirmationRequest =
|
|
208
|
+
const confirmationRequest = client.get(`/api/v1/requirementtemplates/policytemplates/${id}`, {
|
|
220
209
|
headers: { authorization: token },
|
|
221
210
|
});
|
|
222
211
|
confirmationRequest
|
|
@@ -228,16 +217,15 @@ const getRequirementTemplateRelatedPolicyTemplates = (id, token) => {
|
|
|
228
217
|
});
|
|
229
218
|
});
|
|
230
219
|
};
|
|
231
|
-
exports.getRequirementTemplateRelatedPolicyTemplates = getRequirementTemplateRelatedPolicyTemplates;
|
|
232
220
|
/**
|
|
233
221
|
* Get the requirement template related standard templates
|
|
234
222
|
* @param {String} id The requirement template id
|
|
235
223
|
* @param {String} token Authorization token
|
|
236
224
|
* @returns {Promise<object>}
|
|
237
225
|
*/
|
|
238
|
-
const getRequirementTemplateRelatedStandardTemplates = (id, token) => {
|
|
226
|
+
export const getRequirementTemplateRelatedStandardTemplates = (id, token) => {
|
|
239
227
|
return new Promise((resolve, reject) => {
|
|
240
|
-
const confirmationRequest =
|
|
228
|
+
const confirmationRequest = client.get(`/api/v1/requirementtemplates/standardtemplates/${id}`, {
|
|
241
229
|
headers: { authorization: token },
|
|
242
230
|
});
|
|
243
231
|
confirmationRequest
|
|
@@ -249,16 +237,15 @@ const getRequirementTemplateRelatedStandardTemplates = (id, token) => {
|
|
|
249
237
|
});
|
|
250
238
|
});
|
|
251
239
|
};
|
|
252
|
-
exports.getRequirementTemplateRelatedStandardTemplates = getRequirementTemplateRelatedStandardTemplates;
|
|
253
240
|
/**
|
|
254
241
|
* Get the requirement template related control templates
|
|
255
242
|
* @param {String} id The requirement template id
|
|
256
243
|
* @param {String} token Authorization token
|
|
257
244
|
* @returns {Promise<object>}
|
|
258
245
|
*/
|
|
259
|
-
const getRequirementTemplateRelatedControlTemplates = (id, token) => {
|
|
246
|
+
export const getRequirementTemplateRelatedControlTemplates = (id, token) => {
|
|
260
247
|
return new Promise((resolve, reject) => {
|
|
261
|
-
const confirmationRequest =
|
|
248
|
+
const confirmationRequest = client.get(`/api/v1/requirementtemplates/controltemplates/${id}`, {
|
|
262
249
|
headers: { authorization: token },
|
|
263
250
|
});
|
|
264
251
|
confirmationRequest
|
|
@@ -270,5 +257,4 @@ const getRequirementTemplateRelatedControlTemplates = (id, token) => {
|
|
|
270
257
|
});
|
|
271
258
|
});
|
|
272
259
|
};
|
|
273
|
-
exports.getRequirementTemplateRelatedControlTemplates = getRequirementTemplateRelatedControlTemplates;
|
|
274
260
|
//# sourceMappingURL=requirementTemplate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirementTemplate.js","sourceRoot":"","sources":["../../../src/lib/requirementTemplate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"requirementTemplate.js","sourceRoot":"","sources":["../../../src/lib/requirementTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,IAAY,EACZ,KAAa,EACI,EAAE;IACnB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,WAAW,GAAG;YAClB,IAAI,EAAE,IAAI;SACX,CAAC;QACF,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CACpC,8BAA8B,EAC9B,WAAW,EACX;YACE,OAAO,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE;SAClC,CACF,CAAC;QACF,mBAAmB;aAChB,IAAI,CAAC,CAAC,QAAuB,EAAE,EAAE;YAChC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAiB,EAAE,EAAE;YAC3B,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBA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