@stackfactor/client-api 1.0.61 → 1.0.63

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.
@@ -1,4 +1,5 @@
1
1
  import axios from "axios";
2
+ import { RESPONSE_TYPE } from "./constants.js";
2
3
  import https from "https";
3
4
  import utils from "./utils.js";
4
5
 
@@ -47,7 +48,7 @@ const errorToString = (error) => {
47
48
  const getErrorType = (error) => {
48
49
  if (error?.response?.status) {
49
50
  return error.response.status;
50
- } else return responseType.SERVICE_UNAVAILABLE;
51
+ } else return RESPONSE_TYPE.SERVICE_UNAVAILABLE;
51
52
  };
52
53
 
53
54
  /**
@@ -68,7 +69,7 @@ const getErrorInformation = (error) => {
68
69
  * @param {Object} error - The error returned by the server
69
70
  */
70
71
  const shouldReturnError = (returnAllExceptions, error) => {
71
- if (getErrorType(error) === responseType.UNAUTHORIZED) {
72
+ if (getErrorType(error) === RESPONSE_TYPE.UNAUTHORIZED) {
72
73
  return returnAllExceptions;
73
74
  } else {
74
75
  return true;
@@ -137,14 +137,9 @@ export const getSkillTemplateList = (
137
137
  */
138
138
  export const getTechnologyStacks = (token) => {
139
139
  return new Promise(function (resolve, reject) {
140
- const requestData = {};
141
- let confirmationRequest = client.get(
142
- `api/v1/skilltemplates/stacks`,
143
- requestData,
144
- {
145
- headers: { authorization: token },
146
- }
147
- );
140
+ let confirmationRequest = client.get(`api/v1/skilltemplates/stacks`, {
141
+ headers: { authorization: token },
142
+ });
148
143
  confirmationRequest
149
144
  .then((response) => {
150
145
  resolve(response.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.0.61",
3
+ "version": "1.0.63",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {