@envoy/envoy-integrations-sdk 1.4.0 → 1.4.2

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.
Files changed (2) hide show
  1. package/lib/EnvoyAPI.js +20 -3
  2. package/package.json +1 -1
package/lib/EnvoyAPI.js CHANGED
@@ -363,16 +363,16 @@ class EnvoyAPI {
363
363
  }
364
364
 
365
365
  /**
366
- * Gets the plugin install's config.
366
+ * Fetches a plugin install.
367
367
  *
368
368
  * @param {number} installId
369
369
  * @returns {Promise<{}>}
370
370
  */
371
- async getPluginInstallConfig(installId) {
371
+ async getPluginInstall(installId) {
372
372
  return new Promise((resolve, reject) => {
373
373
  this.request({
374
374
  method: 'GET',
375
- url: `/api/v2/plugin-services/installs/${installId}/config`,
375
+ url: `/api/v2/plugin-services/installs/${installId}`,
376
376
  }).then(body => resolve(EnvoyAPI.getDataFromBody(body)))
377
377
  .catch((error) => {
378
378
  EnvoyAPI.safeRequestsError(error).catch((err) => reject(err));
@@ -380,6 +380,23 @@ class EnvoyAPI {
380
380
  });
381
381
  }
382
382
 
383
+ /**
384
+ * Gets the plugin install's config.
385
+ *
386
+ * @param {number} installId
387
+ * @returns {Promise<{}>}
388
+ */
389
+ async getPluginInstallConfig(installId) {
390
+ const body = await this.request({
391
+ method: 'GET',
392
+ url: `/api/v2/plugin-services/installs/${installId}/config`,
393
+ }).catch((error) => {
394
+ return EnvoyAPI.safeRequestsError(error);
395
+ });
396
+
397
+ return EnvoyAPI.getDataFromBody(body);
398
+ }
399
+
383
400
  /**
384
401
  * Sets the plugin install's config.
385
402
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envoy/envoy-integrations-sdk",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {