@bpinternal/integration-hub 0.5.0 → 0.6.1

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/README.md CHANGED
@@ -447,3 +447,5 @@ pnpm --filter @bpinternal/integration-hub exec npm publish --access public
447
447
  ```
448
448
 
449
449
  `prepack` runs `clean && build` automatically before publish.
450
+
451
+ **Note:** Depending on options passed to the botpress client (x-multiple-integrations = true), the integrations from Botpress Cloud are keyed by their ALIAS, not their ID. For edits that intend to use the integration ID, make sure to explicitly use the .id parameter.
@@ -4,7 +4,7 @@ import { useState as H, useEffect as L, useCallback as D, useRef as ee, useMemo
4
4
  import { motion as ft } from "framer-motion";
5
5
  import { clsx as ht } from "clsx";
6
6
  import { twMerge as bt } from "tailwind-merge";
7
- import { Menu as S } from "@base-ui/react/menu";
7
+ import { Menu as E } from "@base-ui/react/menu";
8
8
  const pt = [
9
9
  { name: "Popular", icon: Ge, description: "Most used integrations" },
10
10
  { name: "Communication & Channels", icon: _e, description: "Chat, email, SMS, and more" },
@@ -74,7 +74,7 @@ const pt = [
74
74
  focusCategoryButton: R,
75
75
  renderNoResults: K
76
76
  }) => {
77
- var G, B;
77
+ var G, S;
78
78
  const [q, z] = H(/* @__PURE__ */ new Set());
79
79
  L(() => {
80
80
  z(/* @__PURE__ */ new Set());
@@ -142,7 +142,7 @@ const pt = [
142
142
  /* @__PURE__ */ r("div", { className: "flex items-center h-full gap-6", children: [
143
143
  /* @__PURE__ */ r("div", { className: "flex flex-col justify-between h-full flex-1 min-w-0", children: [
144
144
  /* @__PURE__ */ e("h2", { className: "text-2xl font-semibold text-white leading-snug", children: (G = g[f]) == null ? void 0 : G.title }),
145
- /* @__PURE__ */ e("p", { className: "text-sm text-white/80", children: ((B = g[f]) == null ? void 0 : B.subtitle) ?? "" }),
145
+ /* @__PURE__ */ e("p", { className: "text-sm text-white/80", children: ((S = g[f]) == null ? void 0 : S.subtitle) ?? "" }),
146
146
  d && /* @__PURE__ */ e(
147
147
  "button",
148
148
  {
@@ -460,10 +460,10 @@ const pt = [
460
460
  renderIntegrationDetails: z,
461
461
  noResultsContent: O
462
462
  }) => {
463
- const G = l ?? a, B = I(() => {
463
+ const G = l ?? a, S = I(() => {
464
464
  var j;
465
465
  return ((j = b[0]) == null ? void 0 : j.name) ?? "Popular";
466
- }, [b]), [h, C] = H(i ?? B), k = ee(i), A = ee(!1), P = D(
466
+ }, [b]), [h, C] = H(i ?? S), k = ee(i), A = ee(!1), P = D(
467
467
  (j) => {
468
468
  C((me) => {
469
469
  const te = typeof j == "function" ? j(me) : j;
@@ -475,9 +475,9 @@ const pt = [
475
475
  integrationsByCategory: M,
476
476
  visibleCategories: T,
477
477
  sidebarCategories: U,
478
- visibleCategoryNames: Se,
479
- sidebarCategoryNames: Ee,
480
- installedCategoryOrder: Be
478
+ visibleCategoryNames: Ee,
479
+ sidebarCategoryNames: Be,
480
+ installedCategoryOrder: Se
481
481
  } = Ct({
482
482
  hubIntegrations: g,
483
483
  sidebarIntegrations: m,
@@ -485,8 +485,8 @@ const pt = [
485
485
  }), { categoryScrollContainerRef: Ae, focusFirstCardInCategory: Te, scrollToCategorySection: X, focusCategoryButton: je } = wt({
486
486
  view: n,
487
487
  isHubLoading: f,
488
- sidebarCategoryNames: Ee,
489
- visibleCategoryNames: Se,
488
+ sidebarCategoryNames: Be,
489
+ visibleCategoryNames: Ee,
490
490
  setSelectedCategory: P
491
491
  }), { currentSlide: De, goToPreviousSlide: Re, goToNextSlide: Pe, goToSlide: Fe } = Nt({
492
492
  isOpen: t,
@@ -536,7 +536,7 @@ const pt = [
536
536
  isInstalledLoading: u,
537
537
  installedIntegrations: d,
538
538
  effectiveSearchTerm: G,
539
- installedCategoryOrder: Be,
539
+ installedCategoryOrder: Se,
540
540
  renderInstalledIntegrations: q
541
541
  }
542
542
  ) : /* @__PURE__ */ e(
@@ -565,28 +565,28 @@ const pt = [
565
565
  renderNoResults: Oe
566
566
  }
567
567
  );
568
- }, E = "flex items-center gap-2 px-3 py-2 text-sm text-[var(--gray-11)] rounded-md cursor-pointer hover:bg-[var(--gray-a3)] outline-none", re = "bg-[var(--gray-2)] border border-[var(--gray-a4)] rounded-lg p-1 shadow-lg min-w-[160px]", ne = "flex items-center gap-1.5 mt-2 px-2 py-1 rounded-md bg-[var(--gray-a3)] text-xs text-[var(--gray-11)] whitespace-nowrap hover:bg-[var(--gray-a4)] cursor-pointer focus-visible:ring-2 focus-visible:ring-[var(--accent-9)]", kt = (t) => /* @__PURE__ */ e(S.Root, { ...t }), It = (t) => /* @__PURE__ */ e(S.Trigger, { ...t }), Ie = ({
568
+ }, B = "flex items-center gap-2 px-3 py-2 text-sm text-[var(--gray-11)] rounded-md cursor-pointer hover:bg-[var(--gray-a3)] outline-none", re = "bg-[var(--gray-2)] border border-[var(--gray-a4)] rounded-lg p-1 shadow-lg min-w-[160px]", ne = "flex items-center gap-1.5 mt-2 px-2 py-1 rounded-md bg-[var(--gray-a3)] text-xs text-[var(--gray-11)] whitespace-nowrap hover:bg-[var(--gray-a4)] cursor-pointer focus-visible:ring-2 focus-visible:ring-[var(--accent-9)]", kt = (t) => /* @__PURE__ */ e(E.Root, { ...t }), It = (t) => /* @__PURE__ */ e(E.Trigger, { ...t }), Ie = ({
569
569
  align: t = "start",
570
570
  alignOffset: n = 0,
571
571
  side: a = "bottom",
572
572
  sideOffset: l = 4,
573
573
  className: s,
574
574
  ...i
575
- }) => /* @__PURE__ */ e(S.Portal, { children: /* @__PURE__ */ e(
576
- S.Positioner,
575
+ }) => /* @__PURE__ */ e(E.Portal, { children: /* @__PURE__ */ e(
576
+ E.Positioner,
577
577
  {
578
578
  className: "isolate z-50 outline-none",
579
579
  align: t,
580
580
  alignOffset: n,
581
581
  side: a,
582
582
  sideOffset: l,
583
- children: /* @__PURE__ */ e(S.Popup, { className: x(s), ...i })
583
+ children: /* @__PURE__ */ e(E.Popup, { className: x(s), ...i })
584
584
  }
585
- ) }), ie = (t) => /* @__PURE__ */ e(S.SubmenuRoot, { ...t }), se = ({
585
+ ) }), ie = (t) => /* @__PURE__ */ e(E.SubmenuRoot, { ...t }), se = ({
586
586
  className: t,
587
587
  children: n,
588
588
  ...a
589
- }) => /* @__PURE__ */ r(S.SubmenuTrigger, { className: x(t), ...a, children: [
589
+ }) => /* @__PURE__ */ r(E.SubmenuTrigger, { className: x(t), ...a, children: [
590
590
  n,
591
591
  /* @__PURE__ */ e(ye, { className: "ml-auto w-4 h-4" })
592
592
  ] }), oe = ({
@@ -606,7 +606,7 @@ const pt = [
606
606
  sideOffset: l,
607
607
  ...i
608
608
  }
609
- ), _ = (t) => /* @__PURE__ */ e(S.Item, { ...t }), Ht = ({
609
+ ), _ = (t) => /* @__PURE__ */ e(E.Item, { ...t }), Ht = ({
610
610
  visibility: t,
611
611
  verification: n,
612
612
  sortMethod: a,
@@ -655,13 +655,13 @@ const pt = [
655
655
  className: "bg-[var(--gray-2)] border border-[var(--gray-a4)] rounded-lg p-1 shadow-lg min-w-[180px]",
656
656
  children: [
657
657
  /* @__PURE__ */ r(ie, { children: [
658
- /* @__PURE__ */ e(se, { className: E, children: g.visibilityGroup }),
658
+ /* @__PURE__ */ e(se, { className: B, children: g.visibilityGroup }),
659
659
  /* @__PURE__ */ r(oe, { className: re, children: [
660
660
  /* @__PURE__ */ r(
661
661
  _,
662
662
  {
663
- className: x(E, t === "private" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
664
- onSelect: () => f("private"),
663
+ className: x(B, t === "private" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
664
+ onClick: () => f("private"),
665
665
  "aria-checked": t === "private",
666
666
  children: [
667
667
  /* @__PURE__ */ e(W, { className: "w-4 h-4" }),
@@ -673,8 +673,8 @@ const pt = [
673
673
  /* @__PURE__ */ r(
674
674
  _,
675
675
  {
676
- className: x(E, t === "public" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
677
- onSelect: () => f("public"),
676
+ className: x(B, t === "public" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
677
+ onClick: () => f("public"),
678
678
  "aria-checked": t === "public",
679
679
  children: [
680
680
  /* @__PURE__ */ e(ue, { className: "w-4 h-4" }),
@@ -686,16 +686,16 @@ const pt = [
686
686
  ] })
687
687
  ] }),
688
688
  /* @__PURE__ */ r(ie, { children: [
689
- /* @__PURE__ */ e(se, { className: E, children: g.verificationGroup }),
689
+ /* @__PURE__ */ e(se, { className: B, children: g.verificationGroup }),
690
690
  /* @__PURE__ */ r(oe, { className: `${re} min-w-[180px]`, children: [
691
691
  /* @__PURE__ */ r(
692
692
  _,
693
693
  {
694
694
  className: x(
695
- E,
695
+ B,
696
696
  c.includes("official") && "bg-[var(--gray-a3)] text-[var(--gray-12)]"
697
697
  ),
698
- onSelect: () => m("official"),
698
+ onClick: () => m("official"),
699
699
  "aria-checked": c.includes("official"),
700
700
  children: [
701
701
  /* @__PURE__ */ e(J, { className: "w-4 h-4 text-blue-500" }),
@@ -708,10 +708,10 @@ const pt = [
708
708
  _,
709
709
  {
710
710
  className: x(
711
- E,
711
+ B,
712
712
  c.includes("verified") && "bg-[var(--gray-a3)] text-[var(--gray-12)]"
713
713
  ),
714
- onSelect: () => m("verified"),
714
+ onClick: () => m("verified"),
715
715
  "aria-checked": c.includes("verified"),
716
716
  children: [
717
717
  /* @__PURE__ */ e(Q, { className: "w-4 h-4 text-green-500" }),
@@ -723,13 +723,13 @@ const pt = [
723
723
  ] })
724
724
  ] }),
725
725
  /* @__PURE__ */ r(ie, { children: [
726
- /* @__PURE__ */ e(se, { className: E, children: g.sortGroup }),
726
+ /* @__PURE__ */ e(se, { className: B, children: g.sortGroup }),
727
727
  /* @__PURE__ */ r(oe, { className: re, children: [
728
728
  /* @__PURE__ */ r(
729
729
  _,
730
730
  {
731
- className: x(E, a === "asc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
732
- onSelect: () => o("asc"),
731
+ className: x(B, a === "asc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
732
+ onClick: () => o("asc"),
733
733
  "aria-checked": a === "asc",
734
734
  children: [
735
735
  g.sort.asc,
@@ -740,8 +740,8 @@ const pt = [
740
740
  /* @__PURE__ */ r(
741
741
  _,
742
742
  {
743
- className: x(E, a === "desc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
744
- onSelect: () => o("desc"),
743
+ className: x(B, a === "desc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
744
+ onClick: () => o("desc"),
745
745
  "aria-checked": a === "desc",
746
746
  children: [
747
747
  g.sort.desc,
@@ -752,8 +752,8 @@ const pt = [
752
752
  /* @__PURE__ */ r(
753
753
  _,
754
754
  {
755
- className: x(E, a === "newest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
756
- onSelect: () => o("newest"),
755
+ className: x(B, a === "newest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
756
+ onClick: () => o("newest"),
757
757
  "aria-checked": a === "newest",
758
758
  children: [
759
759
  g.sort.newest,
@@ -764,8 +764,8 @@ const pt = [
764
764
  /* @__PURE__ */ r(
765
765
  _,
766
766
  {
767
- className: x(E, a === "oldest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
768
- onSelect: () => o("oldest"),
767
+ className: x(B, a === "oldest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
768
+ onClick: () => o("oldest"),
769
769
  "aria-checked": a === "oldest",
770
770
  children: [
771
771
  g.sort.oldest,
@@ -874,12 +874,12 @@ const pt = [
874
874
  ] })
875
875
  }
876
876
  );
877
- }, St = (t) => t.title || t.name || "", qt = ({
877
+ }, Et = (t) => t.title || t.name || "", qt = ({
878
878
  integrations: t,
879
879
  searchTerm: n,
880
880
  categoryOrder: a,
881
881
  onSelectIntegration: l,
882
- getDisplayName: s = St,
882
+ getDisplayName: s = Et,
883
883
  actionLabel: i = "Manage"
884
884
  }) => {
885
885
  const o = I(
@@ -975,13 +975,13 @@ const pt = [
975
975
  onBackToSetup: z,
976
976
  notifications: O,
977
977
  children: G,
978
- selectedDetailPanel: B,
978
+ selectedDetailPanel: S,
979
979
  onDismissSelectedDetailPanel: h
980
980
  }) => {
981
- const [C, k] = H(!!B), A = !!B && C;
981
+ const [C, k] = H(!!S), A = !!S && C;
982
982
  L(() => {
983
- k(!!B);
984
- }, [B]);
983
+ k(!!S);
984
+ }, [S]);
985
985
  const P = D(() => {
986
986
  if (h) {
987
987
  h();
@@ -1123,18 +1123,18 @@ const pt = [
1123
1123
  "div",
1124
1124
  {
1125
1125
  className: "fixed top-3 right-3 bottom-3 w-[500px] z-50 bg-[var(--gray-2)] border border-[var(--gray-6)] rounded-xl shadow-lg overflow-y-auto",
1126
- children: B
1126
+ children: S
1127
1127
  }
1128
1128
  )
1129
1129
  ] })
1130
1130
  ] });
1131
- }, Et = (t) => t.startsWith("http") ? t : `https://${t}`, Bt = (t) => "Source Code", At = (t) => "Documentation", Wt = ({
1131
+ }, Bt = (t) => t.startsWith("http") ? t : `https://${t}`, St = (t) => "Source Code", At = (t) => "Documentation", Wt = ({
1132
1132
  version: t,
1133
1133
  githubUrl: n,
1134
1134
  guideUrl: a,
1135
1135
  onAboutClick: l,
1136
1136
  aboutLabel: s = "About Integration",
1137
- formatGithubLabel: i = Bt,
1137
+ formatGithubLabel: i = St,
1138
1138
  formatGuideLabel: o = At
1139
1139
  }) => /* @__PURE__ */ r("div", { className: "flex items-start gap-12 px-6 py-4 rounded-lg border border-[var(--gray-a4)] bg-[var(--gray-a2)]", children: [
1140
1140
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
@@ -1146,7 +1146,7 @@ const pt = [
1146
1146
  /* @__PURE__ */ r(
1147
1147
  "a",
1148
1148
  {
1149
- href: Et(n),
1149
+ href: Bt(n),
1150
1150
  target: "_blank",
1151
1151
  rel: "noopener noreferrer",
1152
1152
  className: "inline-flex w-fit items-center gap-1 text-sm font-medium text-[var(--blue-11)] hover:underline",
@@ -1381,9 +1381,9 @@ const pt = [
1381
1381
  if (t.length <= 1)
1382
1382
  return null;
1383
1383
  const s = ((i = t.find((o) => o.value === n)) == null ? void 0 : i.label) ?? String(n ?? "");
1384
- return /* @__PURE__ */ r(S.Root, { children: [
1384
+ return /* @__PURE__ */ r(E.Root, { children: [
1385
1385
  /* @__PURE__ */ r(
1386
- S.Trigger,
1386
+ E.Trigger,
1387
1387
  {
1388
1388
  disabled: l,
1389
1389
  className: "flex items-center gap-2 px-4 py-2 rounded-lg bg-[var(--gray-a3)] text-sm text-[var(--gray-12)] hover:bg-[var(--gray-a4)] cursor-pointer border-none outline-none w-[165px] disabled:opacity-60 disabled:cursor-not-allowed",
@@ -1393,13 +1393,13 @@ const pt = [
1393
1393
  ]
1394
1394
  }
1395
1395
  ),
1396
- /* @__PURE__ */ e(S.Portal, { children: /* @__PURE__ */ e(S.Positioner, { className: "isolate z-50 outline-none", align: "end", side: "bottom", sideOffset: 6, children: /* @__PURE__ */ e(
1397
- S.Popup,
1396
+ /* @__PURE__ */ e(E.Portal, { children: /* @__PURE__ */ e(E.Positioner, { className: "isolate z-50 outline-none", align: "end", side: "bottom", sideOffset: 6, children: /* @__PURE__ */ e(
1397
+ E.Popup,
1398
1398
  {
1399
1399
  role: "menu",
1400
1400
  className: "bg-[var(--gray-2)] rounded-lg p-1 shadow-lg w-(--anchor-width) overflow-hidden",
1401
1401
  children: t.map((o) => /* @__PURE__ */ e(
1402
- S.Item,
1402
+ E.Item,
1403
1403
  {
1404
1404
  onClick: () => a(o.value),
1405
1405
  className: x(
@@ -13,7 +13,7 @@ export type IntegrationPatchTransformers = Partial<Record<'install' | 'uninstall
13
13
  export interface BotpressInstalledIntegration extends BotIntegrationEntry {
14
14
  id: string;
15
15
  name: string;
16
- botIntegrationId: string;
16
+ integrationAlias: string;
17
17
  }
18
18
  export interface BotpressIntegrationHubItem {
19
19
  id: string;
@@ -1,9 +1,9 @@
1
- import { jsx as v, jsxs as z } from "react/jsx-runtime";
2
- import { Loader2 as yt } from "lucide-react";
1
+ import { jsx as v, jsxs as K } from "react/jsx-runtime";
2
+ import { Loader2 as It } from "lucide-react";
3
3
  import { useState as P, useRef as ut, useEffect as ct, useMemo as L, useCallback as J } from "react";
4
4
  import { I as Gt, c as lt, a as Zt, b as Jt, d as Xt, e as Yt, f as mt, g as tn, h as nn, i as en, j as on, k as an } from "../chunks/index.js";
5
5
  import { StaticZuiForm as sn } from "@bpinternal/static-zui-form";
6
- import { useQueryClient as St, useQuery as At, useMutation as j } from "@tanstack/react-query";
6
+ import { useQueryClient as At, useQuery as St, useMutation as j } from "@tanstack/react-query";
7
7
  import "framer-motion";
8
8
  import "clsx";
9
9
  import "tailwind-merge";
@@ -69,11 +69,11 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
69
69
  onAuthorized: s,
70
70
  onError: d
71
71
  }) => {
72
- const [u, C] = P(null), [b, y] = P(!1), [O, x] = P(!1), M = i ?? dn(o), h = !!(i || o), p = ut(d);
72
+ const [u, C] = P(null), [b, I] = P(!1), [O, x] = P(!1), M = i ?? dn(o), h = !!(i || o), p = ut(d);
73
73
  ct(() => {
74
74
  p.current = d;
75
75
  }, [d]);
76
- const A = L(() => {
76
+ const S = L(() => {
77
77
  try {
78
78
  return JSON.stringify(a ?? {});
79
79
  } catch {
@@ -82,15 +82,15 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
82
82
  }, [a]);
83
83
  ct(() => {
84
84
  if (!h) {
85
- C(null), y(!1);
85
+ C(null), I(!1);
86
86
  return;
87
87
  }
88
88
  let f = !1;
89
89
  return (async () => {
90
- var I;
90
+ var y;
91
91
  let k = {};
92
92
  try {
93
- k = JSON.parse(A);
93
+ k = JSON.parse(S);
94
94
  } catch {
95
95
  k = {};
96
96
  }
@@ -99,7 +99,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
99
99
  webhookId: M,
100
100
  ...k
101
101
  };
102
- y(!0);
102
+ I(!0);
103
103
  try {
104
104
  const N = await un({
105
105
  client: n,
@@ -108,16 +108,16 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
108
108
  });
109
109
  f || C(N);
110
110
  } catch (N) {
111
- f || (C(null), (I = p.current) == null || I.call(p, fn(N)));
111
+ f || (C(null), (y = p.current) == null || y.call(p, fn(N)));
112
112
  } finally {
113
- f || y(!1);
113
+ f || I(!1);
114
114
  }
115
115
  })(), () => {
116
116
  f = !0;
117
117
  };
118
- }, [n, h, e, A, o, M]);
119
- const _ = h && !!u && !b && !c, K = async () => {
120
- var f, S, k;
118
+ }, [n, h, e, S, o, M]);
119
+ const _ = h && !!u && !b && !c, H = async () => {
120
+ var f, A, k;
121
121
  if (!(!u || O)) {
122
122
  x(!0);
123
123
  try {
@@ -132,7 +132,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
132
132
  return;
133
133
  }
134
134
  if (E === "timeout") {
135
- (S = p.current) == null || S.call(p, new Error("OAuth popup did not close in time. Please close it and try again."));
135
+ (A = p.current) == null || A.call(p, new Error("OAuth popup did not close in time. Please close it and try again."));
136
136
  return;
137
137
  }
138
138
  (k = p.current) == null || k.call(p, new Error("OAuth authorization finished but refresh failed."));
@@ -151,7 +151,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
151
151
  disabled: c,
152
152
  showInstallHint: !h,
153
153
  onClick: () => {
154
- K();
154
+ H();
155
155
  }
156
156
  }
157
157
  );
@@ -167,7 +167,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
167
167
  return [];
168
168
  const t = n.properties;
169
169
  return !t || typeof t != "object" ? [] : Object.keys(t);
170
- }, at = (n) => !n || typeof n != "object" || Array.isArray(n) ? {} : n, It = (n, t) => {
170
+ }, at = (n) => !n || typeof n != "object" || Array.isArray(n) ? {} : n, yt = (n, t) => {
171
171
  if (t.length === 0)
172
172
  return {};
173
173
  const e = t.filter((i) => Object.prototype.hasOwnProperty.call(n, i)).map((i) => [i, n[i]]);
@@ -198,34 +198,34 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
198
198
  () => Tt({ definition: n, selectedConnectionMethod: e }),
199
199
  [n, e]
200
200
  ), c = L(() => Ot(l), [l]), s = L(
201
- () => It(at(t == null ? void 0 : t.configuration), c),
201
+ () => yt(at(t == null ? void 0 : t.configuration), c),
202
202
  [t == null ? void 0 : t.configuration, c]
203
- ), d = L(() => c.join("\0"), [c]), [u, C] = P({}), [b, y] = P(null), [O, x] = P(0), M = ut(null);
203
+ ), d = L(() => c.join("\0"), [c]), [u, C] = P({}), [b, I] = P(null), [O, x] = P(0), M = ut(null);
204
204
  return ct(() => {
205
205
  const h = {
206
- botIntegrationId: (t == null ? void 0 : t.botIntegrationId) ?? null,
206
+ integrationAlias: (t == null ? void 0 : t.integrationAlias) ?? null,
207
207
  configurationType: (t == null ? void 0 : t.configurationType) ?? null,
208
208
  schemaKeySignature: d,
209
209
  configuration: s
210
210
  }, p = M.current;
211
- p && p.botIntegrationId === h.botIntegrationId && p.configurationType === h.configurationType && p.schemaKeySignature === h.schemaKeySignature && dt(p.configuration, h.configuration) || (M.current = h, C(s), y(null), x((A) => A + 1));
212
- }, [s, t == null ? void 0 : t.botIntegrationId, t == null ? void 0 : t.configurationType, d]), !l || c.length === 0 ? null : /* @__PURE__ */ z("div", { className: "flex flex-col gap-3", children: [
211
+ p && p.integrationAlias === h.integrationAlias && p.configurationType === h.configurationType && p.schemaKeySignature === h.schemaKeySignature && dt(p.configuration, h.configuration) || (M.current = h, C(s), I(null), x((S) => S + 1));
212
+ }, [s, t == null ? void 0 : t.integrationAlias, t == null ? void 0 : t.configurationType, d]), !l || c.length === 0 ? null : /* @__PURE__ */ K("div", { className: "flex flex-col gap-3", children: [
213
213
  /* @__PURE__ */ v(
214
214
  sn,
215
215
  {
216
216
  schema: l,
217
217
  value: u,
218
218
  onChange: (h) => {
219
- const p = It(at(h), c);
219
+ const p = yt(at(h), c);
220
220
  C(p);
221
221
  },
222
222
  onValidation: ({ formValid: h }) => {
223
- y(h);
223
+ I(h);
224
224
  }
225
225
  },
226
226
  O
227
227
  ),
228
- /* @__PURE__ */ z(
228
+ /* @__PURE__ */ K(
229
229
  "button",
230
230
  {
231
231
  type: "button",
@@ -243,7 +243,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
243
243
  ),
244
244
  children: [
245
245
  /* @__PURE__ */ v("span", { className: o ? "invisible" : "", children: "Save Configuration" }),
246
- o && /* @__PURE__ */ v(yt, { className: "absolute inset-0 m-auto h-4 w-4 animate-spin" })
246
+ o && /* @__PURE__ */ v(It, { className: "absolute inset-0 m-auto h-4 w-4 animate-spin" })
247
247
  ]
248
248
  }
249
249
  )
@@ -264,13 +264,13 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
264
264
  ...i,
265
265
  id: typeof i.id == "string" && i.id.length > 0 ? i.id : t,
266
266
  name: typeof i.name == "string" && i.name.length > 0 ? i.name : t,
267
- botIntegrationId: t
267
+ integrationAlias: t
268
268
  };
269
269
  }) : [], ft = ({
270
270
  installedIntegrations: n,
271
271
  integrationId: t,
272
272
  integrationName: e
273
- }) => n.find((i) => i.id === t) ?? n.find((i) => i.botIntegrationId === t) ?? (e ? n.find((i) => i.name === e) : void 0), Cn = ({
273
+ }) => n.find((i) => i.id === t) ?? n.find((i) => i.integrationAlias === t) ?? (e ? n.find((i) => i.name === e) : void 0), Cn = ({
274
274
  summary: n,
275
275
  installedByName: t,
276
276
  categoryResolver: e
@@ -279,7 +279,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
279
279
  const i = t.get(n.name), o = xt((s = n.ownerWorkspace) == null ? void 0 : s.handle), a = (i == null ? void 0 : i.version) ?? null, l = n.version ?? null, c = a && l ? a !== l : !1;
280
280
  return {
281
281
  id: n.id,
282
- installedId: i == null ? void 0 : i.botIntegrationId,
282
+ installedId: i == null ? void 0 : i.id,
283
283
  name: n.name,
284
284
  title: n.title,
285
285
  description: n.description,
@@ -311,7 +311,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
311
311
  const i = xt((a = t == null ? void 0 : t.ownerWorkspace) == null ? void 0 : a.handle), o = n.version && (t != null && t.version) ? n.version !== (t == null ? void 0 : t.version) : !1;
312
312
  return {
313
313
  id: (t == null ? void 0 : t.id) ?? n.id,
314
- installedId: n.botIntegrationId,
314
+ installedId: n.id,
315
315
  name: (t == null ? void 0 : t.name) ?? n.name,
316
316
  title: (t == null ? void 0 : t.title) ?? n.name,
317
317
  description: (t == null ? void 0 : t.description) ?? null,
@@ -336,7 +336,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
336
336
  version: (t == null ? void 0 : t.version) ?? n.version,
337
337
  updatedAt: t == null ? void 0 : t.updatedAt
338
338
  };
339
- }, In = (n) => {
339
+ }, yn = (n) => {
340
340
  if (!n)
341
341
  return {
342
342
  actionCards: [],
@@ -373,7 +373,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
373
373
  eventCards: e,
374
374
  channelCards: i
375
375
  };
376
- }, yn = (n) => {
376
+ }, In = (n) => {
377
377
  var a, l, c, s;
378
378
  if (!n)
379
379
  return [];
@@ -389,14 +389,14 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
389
389
  label: vn(u.description) || u.title || d
390
390
  });
391
391
  return !!((c = n.sandbox) == null ? void 0 : c.identifierExtractScript) && !!((s = n.configurations) != null && s[st]) && e.push({ value: st, label: "Connect to a Playground" }), e;
392
- }, Sn = ({
392
+ }, An = ({
393
393
  installedState: n,
394
394
  connectionMethods: t
395
395
  }) => {
396
396
  var i;
397
397
  const e = (n == null ? void 0 : n.configurationType) ?? null;
398
398
  return t.some((o) => o.value === e) ? e : ((i = t[0]) == null ? void 0 : i.value) ?? null;
399
- }, An = ({
399
+ }, Sn = ({
400
400
  integrations: n,
401
401
  searchTerm: t,
402
402
  visibility: e,
@@ -459,13 +459,13 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
459
459
  installedIntegrations: a,
460
460
  integrationId: e,
461
461
  integrationName: i.name
462
- }), c = yn(i);
462
+ }), c = In(i);
463
463
  return {
464
464
  definition: i,
465
465
  installedState: l,
466
- capabilities: In(i),
466
+ capabilities: yn(i),
467
467
  connectionMethods: c,
468
- selectedConnectionMethod: Sn({ installedState: l, connectionMethods: c })
468
+ selectedConnectionMethod: An({ installedState: l, connectionMethods: c })
469
469
  };
470
470
  }, kt = ({
471
471
  client: n,
@@ -475,32 +475,32 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
475
475
  enabled: o = !0,
476
476
  transformIntegrationPatch: a
477
477
  }) => {
478
- const l = St(), c = L(() => Tn(t, e), [t, e]), { data: s, isLoading: d, error: u, refetch: C } = At({
478
+ const l = At(), c = L(() => Tn(t, e), [t, e]), { data: s, isLoading: d, error: u, refetch: C } = St({
479
479
  queryKey: [...c, "details", i],
480
480
  enabled: o && !!i,
481
481
  queryFn: () => xn({ client: n, workspaceId: t, botId: e, integrationId: i, enabled: o })
482
482
  }), b = J(async () => {
483
483
  await l.invalidateQueries({ queryKey: c });
484
- }, [l, c]), y = () => {
484
+ }, [l, c]), I = () => {
485
485
  if (!(s != null && s.installedState))
486
486
  throw new Error("Integration is not installed on this bot");
487
487
  return s.installedState;
488
488
  }, O = Ut({ client: n, botId: e, transformIntegrationPatch: a }), x = j({
489
489
  mutationFn: async (p) => {
490
- const A = y();
490
+ const S = I();
491
491
  await O("configure", {
492
- [A.botIntegrationId]: {
492
+ [S.integrationAlias]: {
493
493
  configuration: p,
494
- configurationType: A.configurationType ?? null
494
+ configurationType: S.configurationType ?? null
495
495
  }
496
496
  });
497
497
  },
498
498
  onSuccess: b
499
499
  }), M = j({
500
500
  mutationFn: async () => {
501
- const p = y(), A = p.enabled ? "disable" : "enable";
502
- await O(A, {
503
- [p.botIntegrationId]: {
501
+ const p = I(), S = p.enabled ? "disable" : "enable";
502
+ await O(S, {
503
+ [p.integrationAlias]: {
504
504
  enabled: !p.enabled
505
505
  }
506
506
  });
@@ -508,9 +508,9 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
508
508
  onSuccess: b
509
509
  }), h = j({
510
510
  mutationFn: async (p) => {
511
- const A = y();
511
+ const S = I();
512
512
  await O("configure", {
513
- [A.botIntegrationId]: {
513
+ [S.integrationAlias]: {
514
514
  configurationType: p
515
515
  }
516
516
  });
@@ -598,7 +598,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
598
598
  installedIntegrations: t
599
599
  }) => {
600
600
  const e = ft({ installedIntegrations: t, integrationId: n });
601
- return (e == null ? void 0 : e.botIntegrationId) ?? n;
601
+ return (e == null ? void 0 : e.integrationAlias) ?? n;
602
602
  }, Fn = async ({ client: n, botId: t, categoryResolver: e }) => {
603
603
  const [i, o, a] = await Promise.all([
604
604
  kn({ client: n }),
@@ -629,22 +629,22 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
629
629
  enabled: o = !0,
630
630
  transformIntegrationPatch: a
631
631
  }) => {
632
- const l = St(), c = L(() => Bn(t, e), [t, e]), s = ut(Promise.resolve()), { data: d, isLoading: u, error: C, refetch: b } = At({
632
+ const l = At(), c = L(() => Bn(t, e), [t, e]), s = ut(Promise.resolve()), { data: d, isLoading: u, error: C, refetch: b } = St({
633
633
  queryKey: [...c, "catalog"],
634
634
  enabled: o,
635
635
  queryFn: () => Fn({ client: n, workspaceId: t, botId: e, categoryResolver: i })
636
- }), y = J(async () => {
636
+ }), I = J(async () => {
637
637
  await l.invalidateQueries({ queryKey: c });
638
638
  }, [l, c]), O = J(async (f) => {
639
- const S = s.current.then(f, f);
640
- return s.current = S.then(
639
+ const A = s.current.then(f, f);
640
+ return s.current = A.then(
641
641
  () => {
642
642
  },
643
643
  () => {
644
644
  }
645
- ), S;
645
+ ), A;
646
646
  }, []), x = Ut({ client: n, botId: e, transformIntegrationPatch: a }), M = async (f) => {
647
- const { bot: S } = await n.getBot({ id: e }), k = X(S.integrations);
647
+ const { bot: A } = await n.getBot({ id: e }), k = X(A.integrations);
648
648
  return Nn({ integrationId: f, installedIntegrations: k });
649
649
  }, h = j({
650
650
  mutationFn: async (f) => {
@@ -652,49 +652,49 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
652
652
  await x("install", { [f]: { enabled: !0 } });
653
653
  });
654
654
  },
655
- onSuccess: y
655
+ onSuccess: I
656
656
  }), p = j({
657
657
  mutationFn: async (f) => {
658
658
  await O(async () => {
659
- const S = await M(f);
660
- await x("uninstall", { [S]: null });
659
+ const A = await M(f);
660
+ await x("uninstall", { [A]: null });
661
661
  });
662
662
  },
663
- onSuccess: y
664
- }), A = j({
663
+ onSuccess: I
664
+ }), S = j({
665
665
  mutationFn: async (f) => {
666
666
  await O(async () => {
667
- const S = await M(f);
668
- await x("enable", { [S]: { enabled: !0 } });
667
+ const A = await M(f);
668
+ await x("enable", { [A]: { enabled: !0 } });
669
669
  });
670
670
  },
671
- onSuccess: y
671
+ onSuccess: I
672
672
  }), _ = j({
673
673
  mutationFn: async (f) => {
674
674
  await O(async () => {
675
- const S = await M(f);
676
- await x("disable", { [S]: { enabled: !1 } });
675
+ const A = await M(f);
676
+ await x("disable", { [A]: { enabled: !1 } });
677
677
  });
678
678
  },
679
- onSuccess: y
680
- }), K = j({
679
+ onSuccess: I
680
+ }), H = j({
681
681
  mutationFn: async (f) => {
682
682
  await O(async () => {
683
- const { bot: S } = await n.getBot({ id: e }), k = X(S.integrations), E = await Ln({ client: n, integrationId: f }), I = ft({
683
+ const { bot: A } = await n.getBot({ id: e }), k = X(A.integrations), E = await Ln({ client: n, integrationId: f }), y = ft({
684
684
  installedIntegrations: k,
685
685
  integrationId: f,
686
686
  integrationName: E
687
687
  }), N = {
688
- enabled: (I == null ? void 0 : I.enabled) ?? !0,
689
- configuration: (I == null ? void 0 : I.configuration) ?? {},
690
- configurationType: (I == null ? void 0 : I.configurationType) ?? null
688
+ enabled: (y == null ? void 0 : y.enabled) ?? !0,
689
+ configuration: (y == null ? void 0 : y.configuration) ?? {},
690
+ configurationType: (y == null ? void 0 : y.configurationType) ?? null
691
691
  }, V = {
692
692
  [f]: N
693
693
  };
694
- I && I.botIntegrationId !== f && (V[I.botIntegrationId] = null), await x("upgrade", V);
694
+ y && y.integrationAlias !== f && (V[y.integrationAlias] = null), await x("upgrade", V);
695
695
  });
696
696
  },
697
- onSuccess: y
697
+ onSuccess: I
698
698
  });
699
699
  return {
700
700
  integrations: (d == null ? void 0 : d.integrations) ?? [],
@@ -703,28 +703,28 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
703
703
  error: C ? pt(C) : null,
704
704
  install: h.mutateAsync,
705
705
  uninstall: p.mutateAsync,
706
- enable: A.mutateAsync,
706
+ enable: S.mutateAsync,
707
707
  disable: _.mutateAsync,
708
- upgrade: K.mutateAsync,
708
+ upgrade: H.mutateAsync,
709
709
  refresh: () => {
710
710
  b();
711
711
  },
712
712
  isInstalling: h.isPending,
713
713
  isUninstalling: p.isPending,
714
- isEnabling: A.isPending,
714
+ isEnabling: S.isPending,
715
715
  isDisabling: _.isPending,
716
- isUpgrading: K.isPending
716
+ isUpgrading: H.isPending
717
717
  };
718
- }, te = Nt, Dn = ["official", "verified"], jn = () => /* @__PURE__ */ v("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ v(yt, { className: "h-6 w-6 animate-spin text-[var(--gray-9)]" }) }), Vn = () => /* @__PURE__ */ v("div", { className: "flex items-center justify-center py-16 text-sm text-[var(--gray-11)]", children: "Integration details are unavailable for this selection." }), _n = (n) => n ? {
718
+ }, te = Nt, Dn = ["official", "verified"], jn = () => /* @__PURE__ */ v("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ v(It, { className: "h-6 w-6 animate-spin text-[var(--gray-9)]" }) }), Vn = () => /* @__PURE__ */ v("div", { className: "flex items-center justify-center py-16 text-sm text-[var(--gray-11)]", children: "Integration details are unavailable for this selection." }), _n = (n) => n ? {
719
719
  key: n.key,
720
720
  type: n.type
721
- } : null, Kn = ({
721
+ } : null, Hn = ({
722
722
  definition: n,
723
723
  selectedConnectionMethod: t
724
724
  }) => {
725
725
  var e, i, o, a, l;
726
726
  return t ? ((o = (i = (e = n.configurations) == null ? void 0 : e[t]) == null ? void 0 : i.identifier) == null ? void 0 : o.linkTemplateScript) ?? null : ((l = (a = n.configuration) == null ? void 0 : a.identifier) == null ? void 0 : l.linkTemplateScript) ?? null;
727
- }, Hn = ({
727
+ }, zn = ({
728
728
  client: n,
729
729
  workspaceId: t,
730
730
  botId: e,
@@ -738,31 +738,31 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
738
738
  transformIntegrationPatch: u,
739
739
  categoryResolver: C,
740
740
  filterMenuLabels: b,
741
- defaultVisibility: y,
741
+ defaultVisibility: I,
742
742
  defaultVerification: O,
743
743
  defaultSortMethod: x,
744
744
  renderConfigurationForm: M,
745
745
  renderConnectionsContent: h,
746
746
  oauthTemplateData: p,
747
- renderDetailPanel: A,
747
+ renderDetailPanel: S,
748
748
  onInstall: _,
749
- onUninstall: K,
749
+ onUninstall: H,
750
750
  onEnable: f,
751
- onDisable: S,
751
+ onDisable: A,
752
752
  onUpgrade: k,
753
753
  onError: E
754
754
  }) => {
755
- const [I, N] = P(i), [V, Ft] = P(""), [H, Q] = P(null), [gt, W] = P(null), [Y, q] = P(null), [m, Dt] = P(y), [tt, jt] = P(
755
+ const [y, N] = P(i), [V, Ft] = P(""), [z, Q] = P(null), [gt, W] = P(null), [Y, q] = P(null), [m, Dt] = P(I), [tt, jt] = P(
756
756
  O ?? [...Dn]
757
- ), [nt, Vt] = P(x), [_t, et] = P("connections"), [Kt, it] = P("connections"), w = Nt({
757
+ ), [nt, Vt] = P(x), [_t, et] = P("connections"), [Ht, it] = P("connections"), w = Nt({
758
758
  client: n,
759
759
  workspaceId: t,
760
760
  botId: e,
761
761
  categoryResolver: C,
762
762
  enabled: !0,
763
763
  transformIntegrationPatch: u
764
- }), Ht = L(
765
- () => An({
764
+ }), zt = L(
765
+ () => Sn({
766
766
  integrations: w.integrations,
767
767
  searchTerm: V,
768
768
  visibility: m,
@@ -772,9 +772,9 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
772
772
  [w.integrations, V, m, tt, nt]
773
773
  ), U = L(
774
774
  () => [...w.integrations, ...w.installedIntegrations].find(
775
- (g) => g.id === H
775
+ (g) => g.id === z
776
776
  ) ?? null,
777
- [w.integrations, w.installedIntegrations, H]
777
+ [w.integrations, w.installedIntegrations, z]
778
778
  ), r = kt({
779
779
  client: n,
780
780
  workspaceId: t,
@@ -782,7 +782,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
782
782
  integrationId: gt,
783
783
  enabled: !!gt,
784
784
  transformIntegrationPatch: u
785
- }), zt = L(
785
+ }), Kt = L(
786
786
  () => (o == null ? void 0 : o.filter((g) => g.name !== "Popular").map((g) => g.name)) ?? [],
787
787
  [o]
788
788
  ), R = J(
@@ -805,13 +805,13 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
805
805
  }
806
806
  }, qt = (g) => {
807
807
  var bt, vt, Ct, wt;
808
- if (!H || g !== H)
808
+ if (!z || g !== z)
809
809
  return null;
810
810
  if (r.isLoading)
811
811
  return jn();
812
812
  if (!r.definition || !U)
813
813
  return Vn();
814
- const B = !!r.installedState, F = Kn({
814
+ const B = !!r.installedState, F = Hn({
815
815
  definition: r.definition,
816
816
  selectedConnectionMethod: r.selectedConnectionMethod
817
817
  }), D = r.connectionMethods.length > 1 || !!F, ot = Tt({
@@ -830,7 +830,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
830
830
  selectedConnectionMethod: r.selectedConnectionMethod,
831
831
  onConnectionMethodChange: r.setConnectionMethod,
832
832
  isSettingConnectionMethod: r.isSettingConnectionMethod
833
- }) : /* @__PURE__ */ z("div", { className: "flex flex-col gap-4", children: [
833
+ }) : /* @__PURE__ */ K("div", { className: "flex flex-col gap-4", children: [
834
834
  /* @__PURE__ */ v("div", { className: "self-end", children: /* @__PURE__ */ v(
835
835
  mt,
836
836
  {
@@ -857,7 +857,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
857
857
  },
858
858
  onError: R
859
859
  }
860
- ) : /* @__PURE__ */ z("p", { className: "text-sm text-[var(--gray-11)]", children: [
860
+ ) : /* @__PURE__ */ K("p", { className: "text-sm text-[var(--gray-11)]", children: [
861
861
  "No custom connection UI was provided. Use ",
862
862
  /* @__PURE__ */ v("code", { children: "renderConnectionsContent" }),
863
863
  " to plug your OAuth/manual connection flow."
@@ -917,7 +917,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
917
917
  }
918
918
  await w.enable(T.id);
919
919
  },
920
- onSuccess: G ? S : f,
920
+ onSuccess: G ? A : f,
921
921
  integration: U
922
922
  });
923
923
  },
@@ -929,7 +929,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
929
929
  throw new Error("Integration is not installed");
930
930
  await w.uninstall(T.id);
931
931
  },
932
- onSuccess: K,
932
+ onSuccess: H,
933
933
  integration: U
934
934
  });
935
935
  },
@@ -949,7 +949,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
949
949
  hasUpdate: U.hasUpdate,
950
950
  isUpgrading: w.isUpgrading,
951
951
  toggleButtonLabel: (wt = r.installedState) != null && wt.enabled ? "Disable" : "Enable",
952
- selectedDetailPanel: Y && A ? A({
952
+ selectedDetailPanel: Y && S ? S({
953
953
  definition: r.definition,
954
954
  selectedCard: Y,
955
955
  onClose: () => q(null)
@@ -964,7 +964,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
964
964
  hasConfigurationStep: Wt,
965
965
  configuredTab: _t,
966
966
  onConfiguredTabChange: et,
967
- setupTab: Kt,
967
+ setupTab: Ht,
968
968
  onSetupTabChange: it,
969
969
  onCancelSetup: () => {
970
970
  Q(null), W(null), q(null);
@@ -1003,8 +1003,8 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
1003
1003
  }
1004
1004
  );
1005
1005
  };
1006
- return /* @__PURE__ */ z("div", { className: "flex h-full min-h-0 flex-col", children: [
1007
- !H && /* @__PURE__ */ v("div", { className: "flex justify-end px-6 pt-4", children: /* @__PURE__ */ z("div", { className: "flex rounded-lg bg-[var(--gray-a3)] p-1", children: [
1006
+ return /* @__PURE__ */ K("div", { className: "flex h-full min-h-0 flex-col", children: [
1007
+ !z && /* @__PURE__ */ v("div", { className: "flex justify-end px-6 pt-4", children: /* @__PURE__ */ K("div", { className: "flex rounded-lg bg-[var(--gray-a3)] p-1", children: [
1008
1008
  /* @__PURE__ */ v(
1009
1009
  "button",
1010
1010
  {
@@ -1012,7 +1012,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
1012
1012
  onClick: () => N("hub"),
1013
1013
  className: lt(
1014
1014
  "cursor-pointer rounded-md px-3 py-1.5 text-sm text-[var(--gray-11)] transition-colors",
1015
- I === "hub" && "bg-[var(--gray-1)] text-[var(--gray-12)] shadow-sm"
1015
+ y === "hub" && "bg-[var(--gray-1)] text-[var(--gray-12)] shadow-sm"
1016
1016
  ),
1017
1017
  children: "Integration Hub"
1018
1018
  }
@@ -1024,7 +1024,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
1024
1024
  onClick: () => N("installed"),
1025
1025
  className: lt(
1026
1026
  "cursor-pointer rounded-md px-3 py-1.5 text-sm text-[var(--gray-11)] transition-colors",
1027
- I === "installed" && "bg-[var(--gray-1)] text-[var(--gray-12)] shadow-sm"
1027
+ y === "installed" && "bg-[var(--gray-1)] text-[var(--gray-12)] shadow-sm"
1028
1028
  ),
1029
1029
  children: "Installed Integrations"
1030
1030
  }
@@ -1033,12 +1033,12 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
1033
1033
  /* @__PURE__ */ v(
1034
1034
  Zt,
1035
1035
  {
1036
- view: I,
1036
+ view: y,
1037
1037
  searchInput: V,
1038
1038
  searchTerm: V,
1039
1039
  onSearchInputChange: Ft,
1040
- selectedIntegrationId: H,
1041
- hubIntegrations: Ht,
1040
+ selectedIntegrationId: z,
1041
+ hubIntegrations: zt,
1042
1042
  sidebarIntegrations: w.integrations,
1043
1043
  installedIntegrations: w.installedIntegrations,
1044
1044
  isHubLoading: w.isLoading,
@@ -1082,7 +1082,7 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
1082
1082
  {
1083
1083
  integrations: g,
1084
1084
  searchTerm: B,
1085
- categoryOrder: F.length > 0 ? F : zt,
1085
+ categoryOrder: F.length > 0 ? F : Kt,
1086
1086
  onSelectIntegration: (D) => {
1087
1087
  Q(D.id), W(D.installedId ?? D.id), et("connections"), it("connections");
1088
1088
  }
@@ -1092,24 +1092,24 @@ const rn = "width=650,height=800,popup=true", cn = 500, ln = 5 * 60 * 1e3, dn =
1092
1092
  }
1093
1093
  )
1094
1094
  ] });
1095
- }, ne = Hn;
1095
+ }, ne = zn;
1096
1096
  export {
1097
1097
  ne as BotpressIntegrationHub,
1098
- Hn as BotpressIntegrationHubScreen,
1098
+ zn as BotpressIntegrationHubScreen,
1099
1099
  gn as IntegrationOAuthButton,
1100
1100
  hn as IntegrationStaticZuiConfigurationForm,
1101
1101
  Yn as dedupeById,
1102
1102
  un as fetchOAuthAuthorizationUrl,
1103
- An as filterAndSortIntegrations,
1103
+ Sn as filterAndSortIntegrations,
1104
1104
  ft as findInstalledIntegration,
1105
1105
  X as getInstalledIntegrations,
1106
- Sn as getSelectedConnectionMethod,
1106
+ An as getSelectedConnectionMethod,
1107
1107
  dn as getWebhookIdFromUrl,
1108
1108
  xt as isOfficialWorkspace,
1109
1109
  pn as openOAuthPopup,
1110
1110
  Bt as resolveCategory,
1111
- In as toCapabilityCards,
1112
- yn as toConnectionMethods,
1111
+ yn as toCapabilityCards,
1112
+ In as toConnectionMethods,
1113
1113
  pt as toError,
1114
1114
  Cn as toHubItem,
1115
1115
  wn as toInstalledItem,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpinternal/integration-hub",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "Reusable Integration Hub for Botpress-style integration catalogs",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",