@boomi/embedkit-sdk 1.2.18 → 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 CHANGED
@@ -7639,7 +7639,9 @@ var IntegrationPackInstanceService = class {
7639
7639
  * @throws ApiError
7640
7640
  */
7641
7641
  async listAccountGroupPublisherPacks(params) {
7642
- 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);
7643
7645
  const agResp = await this.httpRequest.request({
7644
7646
  method: "POST",
7645
7647
  url: "/AccountGroup/query",
@@ -7684,7 +7686,16 @@ var IntegrationPackInstanceService = class {
7684
7686
  });
7685
7687
  const existing = instResp?.result ?? [];
7686
7688
  const existingIds = new Set(existing.map((i) => i.integrationPackId));
7687
- return fetched.filter((pack) => !(typeById.get(pack.id) === "SINGLE" && existingIds.has(pack.id)));
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;
7688
7699
  }
7689
7700
  /* =============== private =============== */
7690
7701
  async resolvePackNameFromAccountGroup(accountGroupName, integrationPackId) {