@boomi/embedkit-sdk 1.2.17 → 1.2.19
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 +25 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +25 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7509,14 +7509,19 @@ var IntegrationPackInstanceService = class {
|
|
|
7509
7509
|
)
|
|
7510
7510
|
});
|
|
7511
7511
|
const allInstances = instResp?.result ?? [];
|
|
7512
|
-
const searchLc = search?.toLowerCase();
|
|
7513
|
-
const filtered =
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
const isAgentInstance = hasAgentTag(inst
|
|
7517
|
-
if (renderTypeFilter === "agent"
|
|
7518
|
-
if (renderTypeFilter === "integration"
|
|
7512
|
+
const searchLc = search?.toLowerCase().trim() || "";
|
|
7513
|
+
const filtered = allInstances.filter((inst) => {
|
|
7514
|
+
const ipId = inst.integrationPackId;
|
|
7515
|
+
inst.integrationPackDescription = packDescById.get(ipId);
|
|
7516
|
+
const isAgentInstance = hasAgentTag(inst.integrationPackDescription);
|
|
7517
|
+
if (renderTypeFilter === "agent") return isAgentInstance;
|
|
7518
|
+
if (renderTypeFilter === "integration") return !isAgentInstance;
|
|
7519
7519
|
return true;
|
|
7520
|
+
}).filter((inst) => {
|
|
7521
|
+
if (!searchLc) return true;
|
|
7522
|
+
const name = inst?.integrationPackInstanceName?.toLowerCase?.() ?? "";
|
|
7523
|
+
const override = inst?.integrationPackOverrideName?.toLowerCase?.() ?? "";
|
|
7524
|
+
return name.includes(searchLc) || override.includes(searchLc);
|
|
7520
7525
|
});
|
|
7521
7526
|
const total = filtered.length;
|
|
7522
7527
|
const totalPages = Math.max(1, Math.ceil(total / pageSize));
|
|
@@ -7634,7 +7639,9 @@ var IntegrationPackInstanceService = class {
|
|
|
7634
7639
|
* @throws ApiError
|
|
7635
7640
|
*/
|
|
7636
7641
|
async listAccountGroupPublisherPacks(params) {
|
|
7637
|
-
const { accountGroup } = params;
|
|
7642
|
+
const { accountGroup, renderType, notAllowedIds } = params;
|
|
7643
|
+
const renderTypeFilter = renderType === "agent" || renderType === "integration" ? renderType : "all";
|
|
7644
|
+
const hasAgentTag = (s) => typeof s === "string" && /{{\s*AGENT\s*}}/i.test(s);
|
|
7638
7645
|
const agResp = await this.httpRequest.request({
|
|
7639
7646
|
method: "POST",
|
|
7640
7647
|
url: "/AccountGroup/query",
|
|
@@ -7679,7 +7686,16 @@ var IntegrationPackInstanceService = class {
|
|
|
7679
7686
|
});
|
|
7680
7687
|
const existing = instResp?.result ?? [];
|
|
7681
7688
|
const existingIds = new Set(existing.map((i) => i.integrationPackId));
|
|
7682
|
-
|
|
7689
|
+
const filtered = fetched.filter((pack) => !(typeById.get(pack.id) === "SINGLE" && existingIds.has(pack.id))).filter((pack) => {
|
|
7690
|
+
const isAgent = hasAgentTag(pack.Description);
|
|
7691
|
+
if (renderTypeFilter === "agent") return isAgent;
|
|
7692
|
+
if (renderTypeFilter === "integration") return !isAgent;
|
|
7693
|
+
return true;
|
|
7694
|
+
}).filter((pack) => {
|
|
7695
|
+
if (!notAllowedIds || notAllowedIds.length === 0) return true;
|
|
7696
|
+
return !notAllowedIds.includes(pack.id);
|
|
7697
|
+
});
|
|
7698
|
+
return filtered;
|
|
7683
7699
|
}
|
|
7684
7700
|
/* =============== private =============== */
|
|
7685
7701
|
async resolvePackNameFromAccountGroup(accountGroupName, integrationPackId) {
|