@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.
- package/lib/EnvoyAPI.js +20 -3
- package/package.json +1 -1
package/lib/EnvoyAPI.js
CHANGED
|
@@ -363,16 +363,16 @@ class EnvoyAPI {
|
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
/**
|
|
366
|
-
*
|
|
366
|
+
* Fetches a plugin install.
|
|
367
367
|
*
|
|
368
368
|
* @param {number} installId
|
|
369
369
|
* @returns {Promise<{}>}
|
|
370
370
|
*/
|
|
371
|
-
async
|
|
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}
|
|
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
|
*
|