@vouchfor/sdk 1.1.31 → 1.1.33

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.
@@ -11,6 +11,9 @@ module.exports = Object.freeze({
11
11
  compositions: require('./rest/compositionService'),
12
12
  files: require('./rest/fileService'),
13
13
  images: require('./rest/imageService'),
14
+ audios: require('./rest/audioService'),
15
+ documents: require('./rest/documentService'),
16
+ links: require('./rest/linkService'),
14
17
  advocacy: require('./rest/advocacyService'),
15
18
  utilities: require('./rest/utilityService'),
16
19
  });
@@ -0,0 +1,35 @@
1
+ const BaseRestService = require('./base');
2
+
3
+ class AudioService extends BaseRestService {
4
+ constructor(client, config, logger) {
5
+ super(client, config, 'audio', logger);
6
+ }
7
+
8
+ get(id, apiKey, opts = {}) {
9
+ return this._request({
10
+ apiKey,
11
+ path: `${id}`+ this._utils.queryString(opts)
12
+ });
13
+ }
14
+
15
+ delete(id, apiKey) {
16
+ return this._request({ apiKey, path: `${id}/delete` });
17
+ }
18
+
19
+ search(params = {}, apiKey) {
20
+ return this._request({
21
+ apiKey,
22
+ path: 'search' + this._utils.queryString(params)
23
+ });
24
+ }
25
+
26
+ upload(payload, apiKey) {
27
+ return this._request({
28
+ apiKey,
29
+ body: payload,
30
+ path: 'upload',
31
+ });
32
+ }
33
+ }
34
+
35
+ module.exports = AudioService;
@@ -0,0 +1,35 @@
1
+ const BaseRestService = require('./base');
2
+
3
+ class DocumentService extends BaseRestService {
4
+ constructor(client, config, logger) {
5
+ super(client, config, 'documents', logger);
6
+ }
7
+
8
+ get(id, apiKey, opts = {}) {
9
+ return this._request({
10
+ apiKey,
11
+ path: `${id}`+ this._utils.queryString(opts)
12
+ });
13
+ }
14
+
15
+ delete(id, apiKey) {
16
+ return this._request({ apiKey, path: `${id}/delete` });
17
+ }
18
+
19
+ search(params = {}, apiKey) {
20
+ return this._request({
21
+ apiKey,
22
+ path: 'search' + this._utils.queryString(params)
23
+ });
24
+ }
25
+
26
+ upload(payload, apiKey) {
27
+ return this._request({
28
+ apiKey,
29
+ body: payload,
30
+ path: 'upload',
31
+ });
32
+ }
33
+ }
34
+
35
+ module.exports = DocumentService;
@@ -0,0 +1,35 @@
1
+ const BaseRestService = require('./base');
2
+
3
+ class LinkService extends BaseRestService {
4
+ constructor(client, config, logger) {
5
+ super(client, config, 'links', logger);
6
+ }
7
+
8
+ get(id, apiKey, opts = {}) {
9
+ return this._request({
10
+ apiKey,
11
+ path: `${id}`+ this._utils.queryString(opts)
12
+ });
13
+ }
14
+
15
+ delete(id, apiKey) {
16
+ return this._request({ apiKey, path: `${id}/delete` });
17
+ }
18
+
19
+ search(params = {}, apiKey) {
20
+ return this._request({
21
+ apiKey,
22
+ path: 'search' + this._utils.queryString(params)
23
+ });
24
+ }
25
+
26
+ import(payload, apiKey) {
27
+ return this._request({
28
+ apiKey,
29
+ body: payload,
30
+ path: 'import',
31
+ });
32
+ }
33
+ }
34
+
35
+ module.exports = LinkService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vouchfor/sdk",
3
- "version": "1.1.31",
3
+ "version": "1.1.33",
4
4
  "description": "Vouch API SDK",
5
5
  "main": "lib/index.js",
6
6
  "repository": {