@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.d.cts CHANGED
@@ -13573,6 +13573,10 @@ type IntegrationPack = {
13573
13573
  * The name of the integration pack.
13574
13574
  */
13575
13575
  name?: string;
13576
+ /**
13577
+ * Is this integration pack an agent type?
13578
+ */
13579
+ isAgent?: boolean;
13576
13580
  };
13577
13581
  declare namespace IntegrationPack {
13578
13582
  /**
@@ -14376,6 +14380,8 @@ declare class IntegrationPackInstanceService {
14376
14380
  */
14377
14381
  listAccountGroupPublisherPacks(params: {
14378
14382
  accountGroup: string;
14383
+ renderType?: string;
14384
+ notAllowedIds?: string[];
14379
14385
  }): Promise<any[]>;
14380
14386
  private resolvePackNameFromAccountGroup;
14381
14387
  }
package/dist/index.d.ts CHANGED
@@ -13573,6 +13573,10 @@ type IntegrationPack = {
13573
13573
  * The name of the integration pack.
13574
13574
  */
13575
13575
  name?: string;
13576
+ /**
13577
+ * Is this integration pack an agent type?
13578
+ */
13579
+ isAgent?: boolean;
13576
13580
  };
13577
13581
  declare namespace IntegrationPack {
13578
13582
  /**
@@ -14376,6 +14380,8 @@ declare class IntegrationPackInstanceService {
14376
14380
  */
14377
14381
  listAccountGroupPublisherPacks(params: {
14378
14382
  accountGroup: string;
14383
+ renderType?: string;
14384
+ notAllowedIds?: string[];
14379
14385
  }): Promise<any[]>;
14380
14386
  private resolvePackNameFromAccountGroup;
14381
14387
  }
package/dist/index.js CHANGED
@@ -7092,14 +7092,19 @@ var IntegrationPackInstanceService = class {
7092
7092
  )
7093
7093
  });
7094
7094
  const allInstances = instResp?.result ?? [];
7095
- const searchLc = search?.toLowerCase();
7096
- const filtered = (searchLc ? allInstances.filter(
7097
- (inst) => (inst?.integrationPackInstancName?.toLowerCase?.().includes(searchLc) ?? false) || (inst?.integrationPackOverrideName?.toLowerCase?.().includes(searchLc) ?? false)
7098
- ) : allInstances).filter((inst) => {
7099
- const isAgentInstance = hasAgentTag(inst?.integrationPackDescription);
7100
- if (renderTypeFilter === "agent" && !isAgentInstance) return false;
7101
- if (renderTypeFilter === "integration" && isAgentInstance) return false;
7095
+ const searchLc = search?.toLowerCase().trim() || "";
7096
+ const filtered = allInstances.filter((inst) => {
7097
+ const ipId = inst.integrationPackId;
7098
+ inst.integrationPackDescription = packDescById.get(ipId);
7099
+ const isAgentInstance = hasAgentTag(inst.integrationPackDescription);
7100
+ if (renderTypeFilter === "agent") return isAgentInstance;
7101
+ if (renderTypeFilter === "integration") return !isAgentInstance;
7102
7102
  return true;
7103
+ }).filter((inst) => {
7104
+ if (!searchLc) return true;
7105
+ const name = inst?.integrationPackInstanceName?.toLowerCase?.() ?? "";
7106
+ const override = inst?.integrationPackOverrideName?.toLowerCase?.() ?? "";
7107
+ return name.includes(searchLc) || override.includes(searchLc);
7103
7108
  });
7104
7109
  const total = filtered.length;
7105
7110
  const totalPages = Math.max(1, Math.ceil(total / pageSize));
@@ -7217,7 +7222,9 @@ var IntegrationPackInstanceService = class {
7217
7222
  * @throws ApiError
7218
7223
  */
7219
7224
  async listAccountGroupPublisherPacks(params) {
7220
- const { accountGroup } = params;
7225
+ const { accountGroup, renderType, notAllowedIds } = params;
7226
+ const renderTypeFilter = renderType === "agent" || renderType === "integration" ? renderType : "all";
7227
+ const hasAgentTag = (s) => typeof s === "string" && /{{\s*AGENT\s*}}/i.test(s);
7221
7228
  const agResp = await this.httpRequest.request({
7222
7229
  method: "POST",
7223
7230
  url: "/AccountGroup/query",
@@ -7262,7 +7269,16 @@ var IntegrationPackInstanceService = class {
7262
7269
  });
7263
7270
  const existing = instResp?.result ?? [];
7264
7271
  const existingIds = new Set(existing.map((i) => i.integrationPackId));
7265
- return fetched.filter((pack) => !(typeById.get(pack.id) === "SINGLE" && existingIds.has(pack.id)));
7272
+ const filtered = fetched.filter((pack) => !(typeById.get(pack.id) === "SINGLE" && existingIds.has(pack.id))).filter((pack) => {
7273
+ const isAgent = hasAgentTag(pack.Description);
7274
+ if (renderTypeFilter === "agent") return isAgent;
7275
+ if (renderTypeFilter === "integration") return !isAgent;
7276
+ return true;
7277
+ }).filter((pack) => {
7278
+ if (!notAllowedIds || notAllowedIds.length === 0) return true;
7279
+ return !notAllowedIds.includes(pack.id);
7280
+ });
7281
+ return filtered;
7266
7282
  }
7267
7283
  /* =============== private =============== */
7268
7284
  async resolvePackNameFromAccountGroup(accountGroupName, integrationPackId) {