@envoy/envoy-integrations-sdk 1.4.1 → 1.5.0
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 +7 -26
- package/package.json +1 -1
package/lib/EnvoyAPI.js
CHANGED
|
@@ -362,24 +362,6 @@ 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
|
-
|
|
383
365
|
/**
|
|
384
366
|
* Gets the plugin install's config.
|
|
385
367
|
*
|
|
@@ -387,15 +369,14 @@ class EnvoyAPI {
|
|
|
387
369
|
* @returns {Promise<{}>}
|
|
388
370
|
*/
|
|
389
371
|
async getPluginInstallConfig(installId) {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
.catch((error) => {
|
|
396
|
-
EnvoyAPI.safeRequestsError(error).catch((err) => reject(err));
|
|
397
|
-
});
|
|
372
|
+
const body = await this.request({
|
|
373
|
+
method: 'GET',
|
|
374
|
+
url: `/api/v2/plugin-services/installs/${installId}/config`,
|
|
375
|
+
}).catch((error) => {
|
|
376
|
+
return EnvoyAPI.safeRequestsError(error);
|
|
398
377
|
});
|
|
378
|
+
|
|
379
|
+
return EnvoyAPI.getDataFromBody(body);
|
|
399
380
|
}
|
|
400
381
|
|
|
401
382
|
/**
|