@vouchfor/sdk 1.1.23 → 1.1.25

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.
@@ -6,4 +6,5 @@ module.exports = Object.freeze({
6
6
  vouches: require('./rest/vouchService'),
7
7
  files: require('./rest/fileService'),
8
8
  advocacy: require('./rest/advocacyService'),
9
+ utilities: require('./rest/utilityService'),
9
10
  });
@@ -0,0 +1,15 @@
1
+ const BaseRestService = require('./base');
2
+
3
+ class UtilityService extends BaseRestService {
4
+ constructor(client, config, logger) {
5
+ super(client, config, '', logger);
6
+ }
7
+
8
+ commit() {
9
+ return this._request({
10
+ path: 'commit', // no slash needed here
11
+ });
12
+ }
13
+ }
14
+
15
+ module.exports = UtilityService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vouchfor/sdk",
3
- "version": "1.1.23",
3
+ "version": "1.1.25",
4
4
  "description": "Vouch API SDK",
5
5
  "main": "lib/index.js",
6
6
  "repository": {
package/test-commit.js ADDED
@@ -0,0 +1,10 @@
1
+ const Vouch = require("./lib/vouch");
2
+
3
+ const vouchClient = new Vouch({
4
+ env: 'dev',
5
+ integrationKey: 'b0883f06-84af-4108-8543-31874c335c36-kkr3Wy4CLY8C2g65UT79sgUfOIR2ZzkA9uQam3bTs4ZNdlSs7M',
6
+ }, console);
7
+
8
+ (async () => {
9
+ vouchClient.utilities.commit();
10
+ })();