@stackfactor/client-api 1.1.52 → 1.1.54

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.
@@ -7,7 +7,7 @@ import { client } from "./axiosClient.js";
7
7
  * @param {Boolean} saveAsDraft Save as draft flag
8
8
  * @param {String} token Authorization token
9
9
  */
10
- export const createTrainingPlan = (data, type, saveAsDraft, token) => {
10
+ const createTrainingPlan = (data, type, saveAsDraft, token) => {
11
11
  return new Promise(function (resolve, reject) {
12
12
  const requestData = {
13
13
  data: {
@@ -35,7 +35,7 @@ export const createTrainingPlan = (data, type, saveAsDraft, token) => {
35
35
  * @param {String} comments The comments for approver
36
36
  * @param {String} token Authorization token
37
37
  */
38
- export const deleteTrainingPlan = (id, comments, token) => {
38
+ const deleteTrainingPlan = (id, comments, token) => {
39
39
  return new Promise(function (resolve, reject) {
40
40
  const data = {
41
41
  id: id,
@@ -60,7 +60,7 @@ export const deleteTrainingPlan = (id, comments, token) => {
60
60
  * @param {String} id The id of the training plan to be deleted
61
61
  * @param {String} token Authorization token
62
62
  */
63
- export const discardTrainingPlanChanges = (id, token) => {
63
+ const discardTrainingPlanChanges = (id, token) => {
64
64
  return new Promise(function (resolve, reject) {
65
65
  const request = client.get(`api/v1/trainingplans/discard/${id}`, {
66
66
  headers: { authorization: token },
@@ -83,7 +83,7 @@ export const discardTrainingPlanChanges = (id, token) => {
83
83
  * @param {Boolean} saveBaseline If set to true it will save the baseline
84
84
  * @param {String} token Authorization token
85
85
  */
86
- export const generateNewBaseline = (
86
+ const generateNewBaseline = (
87
87
  id,
88
88
  data,
89
89
  returnMinimized,
@@ -119,7 +119,7 @@ export const generateNewBaseline = (
119
119
  * @param {String} id The id of the training plan
120
120
  * @param {String} token Authorization token
121
121
  */
122
- export const getTrainingPlanById = (id, version, token) => {
122
+ const getTrainingPlanById = (id, version, token) => {
123
123
  return new Promise(function (resolve, reject) {
124
124
  let confirmationRequest = client.get(
125
125
  `api/v1/trainingplans/${id}/${version}`,
@@ -165,7 +165,7 @@ const getAllTrainingPlansTasksSummary = async (token = null) => {
165
165
  * @param {Boolean} returnDefaultIfVersionNotAvailable If set to true it will load the draft information if the plan was never published
166
166
  * @param {String} token Authorization token
167
167
  */
168
- export const getListOfTrainingPlans = (
168
+ const getListOfTrainingPlans = (
169
169
  users,
170
170
  types,
171
171
  version,
@@ -204,7 +204,7 @@ export const getListOfTrainingPlans = (
204
204
  * @param {String} comments The comments to be include with the request
205
205
  * @param {String} token Authorization token
206
206
  */
207
- export const publishTrainingPlan = (id, comments, token) => {
207
+ const publishTrainingPlan = (id, comments, token) => {
208
208
  return new Promise(function (resolve, reject) {
209
209
  let data = {};
210
210
  if (comments) data.comments = comments;
@@ -231,7 +231,7 @@ export const publishTrainingPlan = (id, comments, token) => {
231
231
  * @param {Object} data The updated data
232
232
  * @param {String} token Authorization token
233
233
  */
234
- export const updateTrainingPlan = (planId, data, saveAsDraft, token) => {
234
+ const updateTrainingPlan = (planId, data, saveAsDraft, token) => {
235
235
  return new Promise(function (resolve, reject) {
236
236
  const requestData = {
237
237
  data: data,
@@ -289,7 +289,7 @@ const updateTrainingPlanTaskStatus = (id, status, token) => {
289
289
  * @param {Function} failCallBack
290
290
  * @returns {Object} An object containing the task information
291
291
  */
292
- export const updateActivities = (planId, data, token) => {
292
+ const updateActivities = (planId, data, token) => {
293
293
  return new Promise(function (resolve, reject) {
294
294
  let confirmationRequest = client.post(
295
295
  `api/v1/trainingplans/${planId}/activities`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.1.52",
3
+ "version": "1.1.54",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {