@stackfactor/client-api 1.0.15 → 1.0.17

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.
@@ -127,6 +127,35 @@ module.exports = {
127
127
  });
128
128
  },
129
129
 
130
+ /**
131
+ * Import role templates
132
+ * @param {Array<String>} data The list of role templates to be imported
133
+ * @param {String} token
134
+ * @returns
135
+ */
136
+ importRoleTemplates: (data, token) => {
137
+ return new Promise(function (resolve, reject) {
138
+ const requestData = {
139
+ data: data,
140
+ };
141
+ let confirmationRequest = axios.post(
142
+ `api/v1/roletemplates/import`,
143
+ requestData,
144
+ {
145
+ headers: { authorization: token },
146
+ }
147
+ );
148
+ confirmationRequest
149
+
150
+ .then((response) => {
151
+ resolve(response.data);
152
+ })
153
+ .catch((error) => {
154
+ reject(error);
155
+ });
156
+ });
157
+ },
158
+
130
159
  /**
131
160
  * Publish template
132
161
  * @param {number} id The id of the template to be published
@@ -131,6 +131,30 @@ module.exports = {
131
131
  });
132
132
  },
133
133
 
134
+ /**
135
+ * Get skill tecnology stacks template list
136
+ * @param {String} token Authorization token
137
+ */
138
+ getTechnologyStacks: (token) => {
139
+ return new Promise(function (resolve, reject) {
140
+ const requestData = {};
141
+ let confirmationRequest = axios.get(
142
+ `api/v1/skilltemplates/stacks`,
143
+ requestData,
144
+ {
145
+ headers: { authorization: token },
146
+ }
147
+ );
148
+ confirmationRequest
149
+ .then((response) => {
150
+ resolve(response.data);
151
+ })
152
+ .catch((error) => {
153
+ reject(error);
154
+ });
155
+ });
156
+ },
157
+
134
158
  /**
135
159
  * Publish template
136
160
  * @param {number} id The id of the template to be published
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {