@stackfactor/client-api 1.0.28 → 1.0.29
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/index.js +1 -1
- package/lib/actionNotifications.js +1 -1
- package/lib/address.js +1 -1
- package/lib/config.js +1 -1
- package/lib/dashboard.js +1 -1
- package/lib/departmentTrainingPlans.js +1 -1
- package/lib/groups.js +1 -1
- package/lib/integration.js +1 -1
- package/lib/integrationConfiguration.js +1 -1
- package/lib/integrations/contentGenerator.js +1 -1
- package/lib/learningContent.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/role.js +1 -1
- package/lib/roleTemplate.js +1 -1
- package/lib/skill.js +1 -1
- package/lib/skillAssessmentTestingSession.js +1 -1
- package/lib/skillAssessments.js +1 -1
- package/lib/skillTemplate.js +1 -1
- package/lib/teams.js +1 -1
- package/lib/templates.js +1 -1
- package/lib/tenants.js +1 -1
- package/lib/trainingPlanTemplate.js +1 -1
- package/lib/trainingPlans.js +1 -1
- package/lib/userInformation.js +1 -1
- package/lib/users.js +1 -1
- package/package.json +1 -1
- package/lib/templateDocument.js +0 -123
- package/lib/templatePhase.js +0 -126
- package/lib/templateRelease.js +0 -92
- /package/lib/{axios.js → axiosClient.js} +0 -0
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const actionNotifications = require("./lib/actionNotifications");
|
|
2
|
-
const axios = require("./lib/
|
|
2
|
+
const axios = require("./lib/axiosClient");
|
|
3
3
|
const address = require("./lib/address");
|
|
4
4
|
const config = require("./lib/config");
|
|
5
5
|
const constants = require("./lib/constants");
|
package/lib/address.js
CHANGED
package/lib/config.js
CHANGED
package/lib/dashboard.js
CHANGED
package/lib/groups.js
CHANGED
package/lib/integration.js
CHANGED
package/lib/learningContent.js
CHANGED
package/lib/logger.js
CHANGED
package/lib/role.js
CHANGED
package/lib/roleTemplate.js
CHANGED
package/lib/skill.js
CHANGED
package/lib/skillAssessments.js
CHANGED
package/lib/skillTemplate.js
CHANGED
package/lib/teams.js
CHANGED
package/lib/templates.js
CHANGED
package/lib/tenants.js
CHANGED
package/lib/trainingPlans.js
CHANGED
package/lib/userInformation.js
CHANGED
package/lib/users.js
CHANGED
package/package.json
CHANGED
package/lib/templateDocument.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
const { axios } = require("./axios");
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
/**
|
|
5
|
-
* Create a new document to an existing template
|
|
6
|
-
* @param {String} templateId - the template id
|
|
7
|
-
* @param {String} parentPhaseId - the parent of the new phase. If null, it will add the phase to the
|
|
8
|
-
* root of the template
|
|
9
|
-
* @param {Object} data - new phase data information
|
|
10
|
-
* @param {String} token - authorization token
|
|
11
|
-
*/
|
|
12
|
-
create: (templateId, parentPhaseId, data, token) => {
|
|
13
|
-
return new Promise(function (resolve, reject) {
|
|
14
|
-
const requestData = {
|
|
15
|
-
templateId: templateId,
|
|
16
|
-
parentPhaseId: parentPhaseId,
|
|
17
|
-
data: data,
|
|
18
|
-
};
|
|
19
|
-
let confirmationRequest = axios.put(
|
|
20
|
-
"api/v1/templates/template/phases/phase/document",
|
|
21
|
-
requestData,
|
|
22
|
-
{
|
|
23
|
-
headers: { authorization: token },
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
confirmationRequest
|
|
27
|
-
.then((response) => {
|
|
28
|
-
resolve(response.data);
|
|
29
|
-
})
|
|
30
|
-
.catch((error) => {
|
|
31
|
-
reject(error);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Delete an existing document from a template
|
|
38
|
-
* @param {String} templateId - the template id
|
|
39
|
-
* @param {String} documentId - the document id
|
|
40
|
-
* @param {String} token - authorization token
|
|
41
|
-
*/
|
|
42
|
-
delete: (templateId, documentId, token) => {
|
|
43
|
-
return new Promise(function (resolve, reject) {
|
|
44
|
-
const requestData = {
|
|
45
|
-
templateId: templateId,
|
|
46
|
-
documentId: documentId,
|
|
47
|
-
};
|
|
48
|
-
let confirmationRequest = axios.delete(
|
|
49
|
-
`api/v1/templates/template/phases/phase/document`,
|
|
50
|
-
{ headers: { authorization: token }, data: requestData }
|
|
51
|
-
);
|
|
52
|
-
confirmationRequest
|
|
53
|
-
.then((response) => {
|
|
54
|
-
resolve(response.data);
|
|
55
|
-
})
|
|
56
|
-
.catch((error) => {
|
|
57
|
-
reject(error);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Move an existing document
|
|
64
|
-
* @param {String} templateId - the template id
|
|
65
|
-
* @param {String} documentId - the id of the document to be moved
|
|
66
|
-
* @param {String} newParentPhaseId - the new parent phase id
|
|
67
|
-
* @param {String} token - authorization token
|
|
68
|
-
*/
|
|
69
|
-
move: (templateId, documentId, newParentPhaseId, token) => {
|
|
70
|
-
return new Promise(function (resolve, reject) {
|
|
71
|
-
const requestData = {
|
|
72
|
-
templateId: templateId,
|
|
73
|
-
documentId: documentId,
|
|
74
|
-
newParentPhaseId: newParentPhaseId,
|
|
75
|
-
};
|
|
76
|
-
let confirmationRequest = axios.patch(
|
|
77
|
-
"api/v1/templates/template/phases/phase/document/move",
|
|
78
|
-
requestData,
|
|
79
|
-
{
|
|
80
|
-
headers: { authorization: token },
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
confirmationRequest
|
|
84
|
-
.then((response) => {
|
|
85
|
-
resolve(response.data);
|
|
86
|
-
})
|
|
87
|
-
.catch((error) => {
|
|
88
|
-
reject(error);
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Update an existing document phase
|
|
95
|
-
* @param {String} templateId - template id
|
|
96
|
-
* @param {String} documentId - document id
|
|
97
|
-
* @param {Object} data - data containing the updated document information
|
|
98
|
-
* @param {String} token - authorization token
|
|
99
|
-
*/
|
|
100
|
-
update: (templateId, documentId, data, token) => {
|
|
101
|
-
return new Promise(function (resolve, reject) {
|
|
102
|
-
const requestData = {
|
|
103
|
-
templateId: templateId,
|
|
104
|
-
documentId: documentId,
|
|
105
|
-
data: data,
|
|
106
|
-
};
|
|
107
|
-
let confirmationRequest = axios.patch(
|
|
108
|
-
"api/v1/templates/template/phases/phase/document",
|
|
109
|
-
requestData,
|
|
110
|
-
{
|
|
111
|
-
headers: { authorization: token },
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
confirmationRequest
|
|
115
|
-
.then((response) => {
|
|
116
|
-
resolve(response.data);
|
|
117
|
-
})
|
|
118
|
-
.catch((error) => {
|
|
119
|
-
reject(error);
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
};
|
package/lib/templatePhase.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
const { axios } = require("./axios");
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
/**
|
|
5
|
-
* Add a new phase to an existing template
|
|
6
|
-
* @param {String} templateId - the template id
|
|
7
|
-
* @param {String} parentPhaseId - the parent of the new phase. If null, it will add the phase to the root
|
|
8
|
-
* of the template
|
|
9
|
-
* @param {Object} data - new phase data information
|
|
10
|
-
* @param {String} token - authorization token
|
|
11
|
-
*/
|
|
12
|
-
create: (templateId, parentPhaseId, data, token) => {
|
|
13
|
-
return new Promise(function (resolve, reject) {
|
|
14
|
-
const requestData = {
|
|
15
|
-
templateId: templateId,
|
|
16
|
-
data: data,
|
|
17
|
-
};
|
|
18
|
-
if (parentPhaseId) requestData.parentPhaseId = parentPhaseId;
|
|
19
|
-
let confirmationRequest = axios.put(
|
|
20
|
-
"api/v1/templates/template/phases/phase",
|
|
21
|
-
requestData,
|
|
22
|
-
{
|
|
23
|
-
headers: { authorization: token },
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
confirmationRequest
|
|
27
|
-
.then((response) => {
|
|
28
|
-
resolve(response.data);
|
|
29
|
-
})
|
|
30
|
-
.catch((error) => {
|
|
31
|
-
reject(error);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Delete an existing phase
|
|
38
|
-
* @param {String} templateId - the template id
|
|
39
|
-
* @param {String} phaseId - the phase id
|
|
40
|
-
* @param {String} token - authorization token
|
|
41
|
-
*/
|
|
42
|
-
delete: (templateId, phaseId, token) => {
|
|
43
|
-
return new Promise(function (resolve, reject) {
|
|
44
|
-
const requestData = {
|
|
45
|
-
templateId: templateId,
|
|
46
|
-
phaseId: phaseId,
|
|
47
|
-
};
|
|
48
|
-
let confirmationRequest = axios.delete(
|
|
49
|
-
`api/v1/templates/template/phases/phase`,
|
|
50
|
-
{
|
|
51
|
-
headers: { authorization: token },
|
|
52
|
-
data: requestData,
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
confirmationRequest
|
|
56
|
-
.then((response) => {
|
|
57
|
-
resolve(response.data);
|
|
58
|
-
})
|
|
59
|
-
.catch((error) => {
|
|
60
|
-
reject(error);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Move an existing phase
|
|
67
|
-
* @param {String} templateId - the template id
|
|
68
|
-
* @param {String} phaseId - the id of the phase to be moved
|
|
69
|
-
* @param {String} newParentPhaseId - the new parent phase id
|
|
70
|
-
* @param {String} token - authorization token
|
|
71
|
-
*/
|
|
72
|
-
move: (templateId, phaseId, newParentPhaseId, token) => {
|
|
73
|
-
return new Promise(function (resolve, reject) {
|
|
74
|
-
const requestData = {
|
|
75
|
-
templateId: templateId,
|
|
76
|
-
phaseId: phaseId,
|
|
77
|
-
newParentPhaseId: newParentPhaseId,
|
|
78
|
-
};
|
|
79
|
-
let confirmationRequest = axios.patch(
|
|
80
|
-
"api/v1/templates/template/phases/phase/move",
|
|
81
|
-
requestData,
|
|
82
|
-
{
|
|
83
|
-
headers: { authorization: token },
|
|
84
|
-
}
|
|
85
|
-
);
|
|
86
|
-
confirmationRequest
|
|
87
|
-
.then((response) => {
|
|
88
|
-
resolve(response.data);
|
|
89
|
-
})
|
|
90
|
-
.catch((error) => {
|
|
91
|
-
reject(error);
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Update an existing template phase
|
|
98
|
-
* @param {String} templateId - template id
|
|
99
|
-
* @param {String} phaseId - phase id
|
|
100
|
-
* @param {Object} data - data containing the new phase information
|
|
101
|
-
* @param {String} token - authorization token
|
|
102
|
-
*/
|
|
103
|
-
update: (templateId, phaseId, data, token) => {
|
|
104
|
-
return new Promise(function (resolve, reject) {
|
|
105
|
-
const requestData = {
|
|
106
|
-
templateId: templateId,
|
|
107
|
-
phaseId: phaseId,
|
|
108
|
-
data: data,
|
|
109
|
-
};
|
|
110
|
-
let confirmationRequest = axios.patch(
|
|
111
|
-
"api/v1/templates/template/phases/phase",
|
|
112
|
-
requestData,
|
|
113
|
-
{
|
|
114
|
-
headers: { authorization: token },
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
confirmationRequest
|
|
118
|
-
.then((response) => {
|
|
119
|
-
resolve(response.data);
|
|
120
|
-
})
|
|
121
|
-
.catch((error) => {
|
|
122
|
-
reject(error);
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
},
|
|
126
|
-
};
|
package/lib/templateRelease.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
const { axios } = require("./axios");
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
/**
|
|
5
|
-
* Create a new release to an existing template
|
|
6
|
-
* @param {string} templateId - the template id
|
|
7
|
-
* @param {Object} data - new phase data information
|
|
8
|
-
* @param {string} token - authorization token
|
|
9
|
-
*/
|
|
10
|
-
create: (templateId, data, token) => {
|
|
11
|
-
return new Promise(function (resolve, reject) {
|
|
12
|
-
const requestData = {
|
|
13
|
-
templateId: templateId,
|
|
14
|
-
data: data,
|
|
15
|
-
};
|
|
16
|
-
let confirmationRequest = axios.put(
|
|
17
|
-
"api/v1/templates/template/releases/release",
|
|
18
|
-
requestData,
|
|
19
|
-
{
|
|
20
|
-
headers: { authorization: token },
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
confirmationRequest
|
|
24
|
-
.then((response) => {
|
|
25
|
-
resolve(response.data);
|
|
26
|
-
})
|
|
27
|
-
.catch((error) => {
|
|
28
|
-
reject(error);
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Delete an existing release from a template
|
|
35
|
-
* @param {string} templateId - the template id
|
|
36
|
-
* @param {string} releaseId - the document id
|
|
37
|
-
* @param {string} token - authorization token
|
|
38
|
-
*/
|
|
39
|
-
delete: (templateId, releaseId, token) => {
|
|
40
|
-
return new Promise(function (resolve, reject) {
|
|
41
|
-
const requestData = {
|
|
42
|
-
templateId: templateId,
|
|
43
|
-
releaseId: releaseId,
|
|
44
|
-
};
|
|
45
|
-
let confirmationRequest = axios.delete(
|
|
46
|
-
`api/v1/templates/template/releases/release`,
|
|
47
|
-
{
|
|
48
|
-
data: requestData,
|
|
49
|
-
headers: { authorization: token },
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
confirmationRequest
|
|
53
|
-
.then((response) => {
|
|
54
|
-
resolve(response.data);
|
|
55
|
-
})
|
|
56
|
-
.catch((error) => {
|
|
57
|
-
reject(error);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Update an existing release
|
|
64
|
-
* @param {string} templateId - template id
|
|
65
|
-
* @param {string} releaseId - release id
|
|
66
|
-
* @param {Object} data - data containing the updated document information
|
|
67
|
-
* @param {string} token - authorization token
|
|
68
|
-
*/
|
|
69
|
-
update: (templateId, releaseId, data, token) => {
|
|
70
|
-
return new Promise(function (resolve, reject) {
|
|
71
|
-
const requestData = {
|
|
72
|
-
templateId: templateId,
|
|
73
|
-
releaseId: releaseId,
|
|
74
|
-
data: data,
|
|
75
|
-
};
|
|
76
|
-
let confirmationRequest = axios.patch(
|
|
77
|
-
"api/v1/templates/template/releases/release",
|
|
78
|
-
requestData,
|
|
79
|
-
{
|
|
80
|
-
headers: { authorization: token },
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
confirmationRequest
|
|
84
|
-
.then((response) => {
|
|
85
|
-
resolve(response.data);
|
|
86
|
-
})
|
|
87
|
-
.catch((error) => {
|
|
88
|
-
reject(error);
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
},
|
|
92
|
-
};
|
|
File without changes
|