@envoy/envoy-integrations-sdk 1.4.0 → 1.4.1
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/lib/EnvoyAPI.js +18 -0
- package/package.json +1 -1
package/lib/EnvoyAPI.js
CHANGED
|
@@ -362,6 +362,24 @@ class EnvoyAPI {
|
|
|
362
362
|
return EnvoyAPI.getDataFromBody(body);
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
+
/**
|
|
366
|
+
* Fetches a plugin install.
|
|
367
|
+
*
|
|
368
|
+
* @param {number} installId
|
|
369
|
+
* @returns {Promise<{}>}
|
|
370
|
+
*/
|
|
371
|
+
async getPluginInstall(installId) {
|
|
372
|
+
return new Promise((resolve, reject) => {
|
|
373
|
+
this.request({
|
|
374
|
+
method: 'GET',
|
|
375
|
+
url: `/api/v2/plugin-services/installs/${installId}`,
|
|
376
|
+
}).then(body => resolve(EnvoyAPI.getDataFromBody(body)))
|
|
377
|
+
.catch((error) => {
|
|
378
|
+
EnvoyAPI.safeRequestsError(error).catch((err) => reject(err));
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
|
|
365
383
|
/**
|
|
366
384
|
* Gets the plugin install's config.
|
|
367
385
|
*
|