@stackfactor/client-api 1.1.86 → 1.1.88

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.
@@ -4,12 +4,13 @@ import { client } from "./axiosClient.js";
4
4
  * End an existing testing session
5
5
  * @param {String} testingSessionId
6
6
  * @param {String} token Authorization token
7
+ * @param {Boolean} deletePartial
7
8
  */
8
- const endSession = (testingSessionId, token) => {
9
+ const endSession = (testingSessionId, token, keepPartial = false) => {
9
10
  return new Promise(function (resolve, reject) {
10
11
  let confirmationRequest = client.put(
11
12
  "api/v1/skillassessmenttestingsession/endsession",
12
- { id: testingSessionId },
13
+ { id: testingSessionId, keepPartial: keepPartial },
13
14
  {
14
15
  headers: { authorization: token },
15
16
  }
package/lib/users.js CHANGED
@@ -389,13 +389,17 @@ const login = (email, password) => {
389
389
 
390
390
  /**
391
391
  * Logout from the server. It returns a promise
392
- * @param {String} refreshToken Authorization token
392
+ * @param {String} token Authorization token
393
393
  */
394
- const logout = (refreshToken) => {
394
+ const logout = (token) => {
395
395
  return new Promise(function (resolve, reject) {
396
- let request = client.post("api/v1/auth/logout", {
397
- refreshToken,
398
- });
396
+ let request = client.post(
397
+ "api/v1/auth/logout",
398
+ {},
399
+ {
400
+ headers: { authorization: token },
401
+ }
402
+ );
399
403
  request
400
404
  .then((response) => {
401
405
  resolve(response.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.1.86",
3
+ "version": "1.1.88",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {