@boomi/embedkit-sdk 1.2.1 → 1.2.3
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/dist/index.cjs +28 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -6
- package/dist/index.d.ts +5 -6
- package/dist/index.js +28 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4787,20 +4787,29 @@ async function fetchEnvironmentExtensions(httpRequest, requestBody) {
|
|
|
4787
4787
|
}
|
|
4788
4788
|
|
|
4789
4789
|
// lib/helpers/fetchExtensionsForPair.ts
|
|
4790
|
-
async function fetchExtensionsForPair(httpRequest, processId, envId) {
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4790
|
+
async function fetchExtensionsForPair(httpRequest, processId, envId, isSingleInstall) {
|
|
4791
|
+
let extensionFilter;
|
|
4792
|
+
if (isSingleInstall) {
|
|
4793
|
+
const aFilter = queryFilter(
|
|
4794
|
+
"environmentId",
|
|
4795
|
+
"EQUALS",
|
|
4796
|
+
[envId]
|
|
4797
|
+
);
|
|
4798
|
+
} else {
|
|
4799
|
+
extensionFilter = nestedQueryFilter(
|
|
4800
|
+
[
|
|
4801
|
+
{ property: "environmentId", operator: "EQUALS", value: envId },
|
|
4802
|
+
{ property: "extensionGroupId", operator: "EQUALS", value: processId }
|
|
4803
|
+
],
|
|
4804
|
+
"and"
|
|
4805
|
+
);
|
|
4806
|
+
}
|
|
4798
4807
|
const extResponse = await fetchEnvironmentExtensions(httpRequest, extensionFilter);
|
|
4799
4808
|
return extResponse?.result || [];
|
|
4800
4809
|
}
|
|
4801
4810
|
|
|
4802
4811
|
// lib/helpers/fetchExtensions.ts
|
|
4803
|
-
async function fetchExtensions(httpRequest, integrationPackInstanceId, environmentId, environments) {
|
|
4812
|
+
async function fetchExtensions(httpRequest, integrationPackInstanceId, environmentId, environments, isSingleInstall) {
|
|
4804
4813
|
const resp = await fetchProcesses(httpRequest, integrationPackInstanceId);
|
|
4805
4814
|
if (!resp?.result) {
|
|
4806
4815
|
throw new Error(
|
|
@@ -4817,12 +4826,12 @@ async function fetchExtensions(httpRequest, integrationPackInstanceId, environme
|
|
|
4817
4826
|
);
|
|
4818
4827
|
}
|
|
4819
4828
|
if (!targetEnvs?.length) {
|
|
4820
|
-
const exts = await fetchExtensionsForPair(httpRequest, process.id, environmentId);
|
|
4829
|
+
const exts = await fetchExtensionsForPair(httpRequest, process.id, environmentId, isSingleInstall);
|
|
4821
4830
|
allExtensions.push(...exts);
|
|
4822
4831
|
} else {
|
|
4823
4832
|
for (const env of targetEnvs) {
|
|
4824
4833
|
const envId = env.id || "";
|
|
4825
|
-
const exts = await fetchExtensionsForPair(httpRequest, process.id, envId);
|
|
4834
|
+
const exts = await fetchExtensionsForPair(httpRequest, process.id, envId, isSingleInstall);
|
|
4826
4835
|
allExtensions.push(...exts);
|
|
4827
4836
|
}
|
|
4828
4837
|
}
|
|
@@ -5329,7 +5338,7 @@ var EnvironmentExtensionsService = class {
|
|
|
5329
5338
|
* @throws ApiError
|
|
5330
5339
|
*/
|
|
5331
5340
|
async fetchEnvironmentExtensions(params) {
|
|
5332
|
-
const { integrationPackInstanceId, environmentId, environmentIds } = params;
|
|
5341
|
+
const { integrationPackInstanceId, environmentId, environmentIds, isSingleInstall } = params;
|
|
5333
5342
|
if (!integrationPackInstanceId) {
|
|
5334
5343
|
throw Object.assign(new Error("integrationPackInstanceId is required"), { status: 400 });
|
|
5335
5344
|
}
|
|
@@ -5342,7 +5351,13 @@ var EnvironmentExtensionsService = class {
|
|
|
5342
5351
|
}
|
|
5343
5352
|
const chunks = [];
|
|
5344
5353
|
for (const envId of targets) {
|
|
5345
|
-
const list = await fetchExtensions(
|
|
5354
|
+
const list = await fetchExtensions(
|
|
5355
|
+
this.httpRequest,
|
|
5356
|
+
integrationPackInstanceId,
|
|
5357
|
+
envId,
|
|
5358
|
+
environmentIds || [],
|
|
5359
|
+
isSingleInstall
|
|
5360
|
+
);
|
|
5346
5361
|
chunks.push(list ?? []);
|
|
5347
5362
|
}
|
|
5348
5363
|
const items = [].concat(...chunks);
|