@veritree/services 2.17.0 → 2.18.1-0

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 CHANGED
@@ -28,6 +28,7 @@ import { Evidence } from './src/endpoints/evidence';
28
28
  import { Crumbs } from './src/endpoints/crumbs';
29
29
  import { Verifications } from './src/endpoints/verifications';
30
30
  import { ImagesAggregated } from './src/endpoints/images-aggregated';
31
+ import { ssoToken } from './src/endpoints/sso-token';
31
32
 
32
33
  export {
33
34
  BulkUploads,
@@ -59,5 +60,6 @@ export {
59
60
  Evidence,
60
61
  Crumbs,
61
62
  Verifications,
62
- ImagesAggregated
63
+ ImagesAggregated,
64
+ ssoToken
63
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veritree/services",
3
- "version": "2.17.0",
3
+ "version": "2.18.1-0",
4
4
  "description": "A collection of javascript functions/services to talk to veritree API",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -0,0 +1,5 @@
1
+ import Api from "../helpers/api";
2
+
3
+ const resource = "sso-token";
4
+
5
+ export const ssoToken = new Api(resource);
@@ -11,8 +11,9 @@ import { getSession } from './session';
11
11
  function addVersionArg(url) {
12
12
  if (!url || url.includes('_result=1')) return url;
13
13
 
14
+ const version = process.env.API_VERITREE_VERSION || '5.0.0';
14
15
  const urlHasArgs = url.includes('?');
15
- const urlVersionArg = urlHasArgs ? '&_v=5.0.0' : '?_v=5.0.0';
16
+ const urlVersionArg = urlHasArgs ? `&_v=${version}` : `?_v=${version}`;
16
17
 
17
18
  return `${url}${urlVersionArg}`;
18
19
  }