@boomi/embedkit-sdk 1.2.6 → 1.2.8

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
@@ -7456,6 +7456,7 @@ var IntegrationPackInstanceService = class {
7456
7456
  */
7457
7457
  async fetchIntegrationPackInstances(params) {
7458
7458
  const { accountGroup, search, page = 1, pageSize = 12 } = params;
7459
+ const hasAgentTag = (s) => typeof s === "string" && /{{\s*AGENT\s*}}/i.test(s);
7459
7460
  const agResp = await this.httpRequest.request({
7460
7461
  method: "POST",
7461
7462
  url: "/AccountGroup/query",
@@ -7525,6 +7526,10 @@ var IntegrationPackInstanceService = class {
7525
7526
  inst.installationType = rawType === "SINGLE" || rawType === "MULTI" ? rawType : "SINGLE";
7526
7527
  inst.integrationPackName = packNameById.get(ipId);
7527
7528
  inst.integrationPackDescription = packDescById.get(ipId);
7529
+ inst.isAgent = hasAgentTag(inst.integrationPackDescription);
7530
+ if (inst.integrationPackName && hasAgentTag(inst.integrationPackName)) {
7531
+ inst.integrationPackName = inst.integrationPackName.replace(/{{\s*AGENT\s*}}/gi, "").trim();
7532
+ }
7528
7533
  const ipeResp = await this.httpRequest.request({
7529
7534
  method: "POST",
7530
7535
  url: "/IntegrationPackEnvironmentAttachment/query",
@@ -7554,6 +7559,7 @@ var IntegrationPackInstanceService = class {
7554
7559
  */
7555
7560
  async createAndAttachIntegrationPackInstance(params) {
7556
7561
  const { integrationPackId, isSingleInstall, environmentId, integrationPackOverrideName, accountGroupName } = params;
7562
+ const hasAgentTag = (s) => typeof s === "string" && /{{\s*AGENT\s*}}/i.test(s);
7557
7563
  if (!integrationPackId) throw new Error("Code [2001] - integrationPackId is required");
7558
7564
  if (!environmentId) throw new Error("Code [2002] - environmentId is required");
7559
7565
  const instance = await this.httpRequest.request({
@@ -7590,6 +7596,9 @@ var IntegrationPackInstanceService = class {
7590
7596
  });
7591
7597
  const pack = ipResp?.result?.[0];
7592
7598
  if (pack?.Description) integrationPackDescription = pack.Description;
7599
+ if (pack?.description && hasAgentTag(pack.description)) {
7600
+ integrationPackName = pack.name.replace(/{{\s*AGENT\s*}}/gi, "").trim();
7601
+ }
7593
7602
  if (!integrationPackOverrideName && accountGroupName) {
7594
7603
  integrationPackName = await this.resolvePackNameFromAccountGroup(accountGroupName, integrationPackId);
7595
7604
  if (!integrationPackName) integrationPackName = pack?.name || "";
@@ -7605,7 +7614,8 @@ var IntegrationPackInstanceService = class {
7605
7614
  integrationPackDescription: integrationPackDescription || "",
7606
7615
  installationType: isSingleInstall ? "SINGLE" : "MULTI",
7607
7616
  installed: true,
7608
- environmentId
7617
+ environmentId,
7618
+ isAgent: hasAgentTag(integrationPackDescription)
7609
7619
  };
7610
7620
  }
7611
7621
  /**