@bpinternal/integration-hub 0.6.1 → 0.8.0
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/chunks/index.js +16990 -1081
- package/dist/details/IntegrationReadmeContent.d.ts +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -14
- package/dist/runtime/BotpressIntegrationHubScreen.d.ts +2 -2
- package/dist/runtime/botpressTypes.d.ts +11 -0
- package/dist/runtime/index.d.ts +4 -1
- package/dist/runtime/index.js +928 -751
- package/dist/runtime/usePersistedNavigationState.d.ts +31 -0
- package/dist/theme.css +28 -0
- package/package.json +5 -1
package/dist/runtime/index.js
CHANGED
|
@@ -1,1120 +1,1297 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Loader2 as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { I as
|
|
5
|
-
import { StaticZuiForm as
|
|
6
|
-
import { useQueryClient as
|
|
1
|
+
import { jsx as I, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
+
import { Loader2 as Lt } from "lucide-react";
|
|
3
|
+
import { useState as x, useRef as G, useEffect as Z, useMemo as F, useCallback as N } from "react";
|
|
4
|
+
import { I as ue, c as bt, u as fe, a as ge, b as pe, d as he, e as be, f as ve, g as Ce, h as ye, i as Ie, j as we, k as Se, l as Ae } from "../chunks/index.js";
|
|
5
|
+
import { StaticZuiForm as Me } from "@bpinternal/static-zui-form";
|
|
6
|
+
import { useQueryClient as kt, useQuery as Et, useMutation as Q } from "@tanstack/react-query";
|
|
7
7
|
import "framer-motion";
|
|
8
8
|
import "clsx";
|
|
9
9
|
import "tailwind-merge";
|
|
10
10
|
import "@base-ui/react/menu";
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
11
|
+
const Te = "width=650,height=800,popup=true", Oe = 500, Pe = 5 * 60 * 1e3, Be = (t) => {
|
|
12
|
+
if (!t)
|
|
13
13
|
return null;
|
|
14
14
|
try {
|
|
15
|
-
return new URL(
|
|
15
|
+
return new URL(t).pathname.split("/").filter(Boolean).at(-1) ?? null;
|
|
16
16
|
} catch {
|
|
17
|
-
return
|
|
17
|
+
return t.split("/").filter(Boolean).at(-1) ?? null;
|
|
18
18
|
}
|
|
19
|
-
},
|
|
20
|
-
client:
|
|
21
|
-
linkTemplateScript:
|
|
22
|
-
data:
|
|
19
|
+
}, Ue = async ({
|
|
20
|
+
client: t,
|
|
21
|
+
linkTemplateScript: e,
|
|
22
|
+
data: i
|
|
23
23
|
}) => {
|
|
24
|
-
const { result:
|
|
25
|
-
script:
|
|
26
|
-
data:
|
|
24
|
+
const { result: n } = await t.runVrl({
|
|
25
|
+
script: e,
|
|
26
|
+
data: i ?? {}
|
|
27
27
|
});
|
|
28
|
-
if (typeof
|
|
28
|
+
if (typeof n != "string")
|
|
29
29
|
throw new Error("Authorization URL is not a string");
|
|
30
|
-
return
|
|
31
|
-
},
|
|
32
|
-
authorizationUrl:
|
|
33
|
-
onClose:
|
|
34
|
-
popupFeatures:
|
|
35
|
-
pollIntervalMs:
|
|
36
|
-
timeoutMs: o =
|
|
30
|
+
return n;
|
|
31
|
+
}, xe = async ({
|
|
32
|
+
authorizationUrl: t,
|
|
33
|
+
onClose: e,
|
|
34
|
+
popupFeatures: i = Te,
|
|
35
|
+
pollIntervalMs: n = Oe,
|
|
36
|
+
timeoutMs: o = Pe
|
|
37
37
|
}) => {
|
|
38
|
-
const a = window.open(
|
|
38
|
+
const a = window.open(t, "OAuth", i);
|
|
39
39
|
if (!a)
|
|
40
40
|
return "blocked";
|
|
41
41
|
if (!await new Promise((c) => {
|
|
42
|
-
const
|
|
42
|
+
const r = window.setInterval(() => {
|
|
43
43
|
try {
|
|
44
44
|
if (!a.closed)
|
|
45
45
|
return;
|
|
46
|
-
window.clearInterval(
|
|
46
|
+
window.clearInterval(r), window.clearTimeout(l), c(!0);
|
|
47
47
|
} catch {
|
|
48
|
-
window.clearInterval(
|
|
48
|
+
window.clearInterval(r), window.clearTimeout(l), c(!1);
|
|
49
49
|
}
|
|
50
|
-
},
|
|
51
|
-
window.clearInterval(
|
|
50
|
+
}, n), l = window.setTimeout(() => {
|
|
51
|
+
window.clearInterval(r), a.closed || a.close(), c(!1);
|
|
52
52
|
}, o);
|
|
53
53
|
}))
|
|
54
54
|
return "timeout";
|
|
55
55
|
try {
|
|
56
|
-
return await (
|
|
56
|
+
return await (e == null ? void 0 : e()), "completed";
|
|
57
57
|
} catch {
|
|
58
58
|
return "failed";
|
|
59
59
|
}
|
|
60
|
-
},
|
|
61
|
-
client:
|
|
62
|
-
integrationName:
|
|
63
|
-
linkTemplateScript:
|
|
64
|
-
webhookId:
|
|
60
|
+
}, De = (t) => t instanceof Error ? t : new Error("OAuth authorization failed"), Le = ({
|
|
61
|
+
client: t,
|
|
62
|
+
integrationName: e,
|
|
63
|
+
linkTemplateScript: i,
|
|
64
|
+
webhookId: n,
|
|
65
65
|
webhookUrl: o,
|
|
66
66
|
oauthTemplateData: a,
|
|
67
|
-
isAuthorized:
|
|
67
|
+
isAuthorized: d = !1,
|
|
68
68
|
disabled: c = !1,
|
|
69
|
-
onAuthorized:
|
|
70
|
-
onError:
|
|
69
|
+
onAuthorized: r,
|
|
70
|
+
onError: l
|
|
71
71
|
}) => {
|
|
72
|
-
const [u,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}, [
|
|
76
|
-
const
|
|
72
|
+
const [u, v] = x(null), [C, S] = x(!1), [T, O] = x(!1), B = n ?? Be(o), h = !!(n || o), g = G(l);
|
|
73
|
+
Z(() => {
|
|
74
|
+
g.current = l;
|
|
75
|
+
}, [l]);
|
|
76
|
+
const M = F(() => {
|
|
77
77
|
try {
|
|
78
78
|
return JSON.stringify(a ?? {});
|
|
79
79
|
} catch {
|
|
80
80
|
return "{}";
|
|
81
81
|
}
|
|
82
82
|
}, [a]);
|
|
83
|
-
|
|
83
|
+
Z(() => {
|
|
84
84
|
if (!h) {
|
|
85
|
-
|
|
85
|
+
v(null), S(!1);
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
-
let
|
|
88
|
+
let p = !1;
|
|
89
89
|
return (async () => {
|
|
90
|
-
var
|
|
90
|
+
var P;
|
|
91
91
|
let k = {};
|
|
92
92
|
try {
|
|
93
|
-
k = JSON.parse(
|
|
93
|
+
k = JSON.parse(M);
|
|
94
94
|
} catch {
|
|
95
95
|
k = {};
|
|
96
96
|
}
|
|
97
|
-
const
|
|
97
|
+
const y = {
|
|
98
98
|
webhookUrl: o ?? null,
|
|
99
|
-
webhookId:
|
|
99
|
+
webhookId: B,
|
|
100
100
|
...k
|
|
101
101
|
};
|
|
102
|
-
|
|
102
|
+
S(!0);
|
|
103
103
|
try {
|
|
104
|
-
const
|
|
105
|
-
client:
|
|
106
|
-
linkTemplateScript:
|
|
107
|
-
data:
|
|
104
|
+
const V = await Ue({
|
|
105
|
+
client: t,
|
|
106
|
+
linkTemplateScript: i,
|
|
107
|
+
data: y
|
|
108
108
|
});
|
|
109
|
-
|
|
110
|
-
} catch (
|
|
111
|
-
|
|
109
|
+
p || v(V);
|
|
110
|
+
} catch (V) {
|
|
111
|
+
p || (v(null), (P = g.current) == null || P.call(g, De(V)));
|
|
112
112
|
} finally {
|
|
113
|
-
|
|
113
|
+
p || S(!1);
|
|
114
114
|
}
|
|
115
115
|
})(), () => {
|
|
116
|
-
|
|
116
|
+
p = !0;
|
|
117
117
|
};
|
|
118
|
-
}, [
|
|
119
|
-
const
|
|
120
|
-
var
|
|
121
|
-
if (!(!u ||
|
|
122
|
-
|
|
118
|
+
}, [t, h, i, M, o, B]);
|
|
119
|
+
const j = h && !!u && !C && !c, _ = async () => {
|
|
120
|
+
var p, A, k;
|
|
121
|
+
if (!(!u || T)) {
|
|
122
|
+
O(!0);
|
|
123
123
|
try {
|
|
124
|
-
const
|
|
124
|
+
const y = await xe({
|
|
125
125
|
authorizationUrl: u,
|
|
126
|
-
onClose:
|
|
126
|
+
onClose: r
|
|
127
127
|
});
|
|
128
|
-
if (
|
|
128
|
+
if (y === "completed")
|
|
129
129
|
return;
|
|
130
|
-
if (
|
|
131
|
-
(
|
|
130
|
+
if (y === "blocked") {
|
|
131
|
+
(p = g.current) == null || p.call(g, new Error("Please allow browser popups to authorize this integration."));
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
|
-
if (
|
|
135
|
-
(A =
|
|
134
|
+
if (y === "timeout") {
|
|
135
|
+
(A = g.current) == null || A.call(g, new Error("OAuth popup did not close in time. Please close it and try again."));
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
-
(k =
|
|
138
|
+
(k = g.current) == null || k.call(g, new Error("OAuth authorization finished but refresh failed."));
|
|
139
139
|
} finally {
|
|
140
|
-
|
|
140
|
+
O(!1);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
};
|
|
144
|
-
return /* @__PURE__ */
|
|
145
|
-
|
|
144
|
+
return /* @__PURE__ */ I(
|
|
145
|
+
ue,
|
|
146
146
|
{
|
|
147
|
-
integrationName:
|
|
148
|
-
canAuthorize:
|
|
149
|
-
isAuthorizing:
|
|
150
|
-
isAuthorized:
|
|
147
|
+
integrationName: e,
|
|
148
|
+
canAuthorize: j,
|
|
149
|
+
isAuthorizing: T,
|
|
150
|
+
isAuthorized: d,
|
|
151
151
|
disabled: c,
|
|
152
152
|
showInstallHint: !h,
|
|
153
153
|
onClick: () => {
|
|
154
|
-
|
|
154
|
+
_();
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
);
|
|
158
|
-
},
|
|
159
|
-
definition:
|
|
160
|
-
selectedConnectionMethod:
|
|
158
|
+
}, Nt = ({
|
|
159
|
+
definition: t,
|
|
160
|
+
selectedConnectionMethod: e
|
|
161
161
|
}) => {
|
|
162
|
-
var
|
|
163
|
-
const
|
|
164
|
-
return !
|
|
165
|
-
},
|
|
166
|
-
if (!
|
|
162
|
+
var n, o, a;
|
|
163
|
+
const i = e != null ? (o = (n = t.configurations) == null ? void 0 : n[e]) == null ? void 0 : o.schema : (a = t.configuration) == null ? void 0 : a.schema;
|
|
164
|
+
return !i || typeof i != "object" ? null : i;
|
|
165
|
+
}, Vt = (t) => {
|
|
166
|
+
if (!t || typeof t != "object")
|
|
167
167
|
return [];
|
|
168
|
-
const
|
|
169
|
-
return !
|
|
170
|
-
},
|
|
171
|
-
if (
|
|
168
|
+
const e = t.properties;
|
|
169
|
+
return !e || typeof e != "object" ? [] : Object.keys(e);
|
|
170
|
+
}, gt = (t) => !t || typeof t != "object" || Array.isArray(t) ? {} : t, Ut = (t, e) => {
|
|
171
|
+
if (e.length === 0)
|
|
172
172
|
return {};
|
|
173
|
-
const
|
|
174
|
-
return Object.fromEntries(
|
|
175
|
-
},
|
|
176
|
-
if (Object.is(
|
|
173
|
+
const i = e.filter((n) => Object.prototype.hasOwnProperty.call(t, n)).map((n) => [n, t[n]]);
|
|
174
|
+
return Object.fromEntries(i);
|
|
175
|
+
}, it = (t) => !!t && typeof t == "object" && !Array.isArray(t), vt = (t, e) => {
|
|
176
|
+
if (Object.is(t, e))
|
|
177
177
|
return !0;
|
|
178
|
-
if (Array.isArray(
|
|
179
|
-
return !Array.isArray(
|
|
180
|
-
if (
|
|
181
|
-
if (!
|
|
178
|
+
if (Array.isArray(t) || Array.isArray(e))
|
|
179
|
+
return !Array.isArray(t) || !Array.isArray(e) || t.length !== e.length ? !1 : t.every((i, n) => vt(i, e[n]));
|
|
180
|
+
if (it(t) || it(e)) {
|
|
181
|
+
if (!it(t) || !it(e))
|
|
182
182
|
return !1;
|
|
183
|
-
const
|
|
184
|
-
return
|
|
185
|
-
(o) => Object.prototype.hasOwnProperty.call(
|
|
183
|
+
const i = Object.keys(t), n = Object.keys(e);
|
|
184
|
+
return i.length !== n.length ? !1 : i.every(
|
|
185
|
+
(o) => Object.prototype.hasOwnProperty.call(e, o) && vt(t[o], e[o])
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
return !1;
|
|
189
|
-
},
|
|
190
|
-
definition:
|
|
191
|
-
installedState:
|
|
192
|
-
selectedConnectionMethod:
|
|
193
|
-
onSave:
|
|
189
|
+
}, ke = ({
|
|
190
|
+
definition: t,
|
|
191
|
+
installedState: e,
|
|
192
|
+
selectedConnectionMethod: i,
|
|
193
|
+
onSave: n,
|
|
194
194
|
isSaving: o,
|
|
195
195
|
disabled: a = !1
|
|
196
196
|
}) => {
|
|
197
|
-
const
|
|
198
|
-
() =>
|
|
199
|
-
[
|
|
200
|
-
), c =
|
|
201
|
-
() =>
|
|
202
|
-
[
|
|
203
|
-
),
|
|
204
|
-
return
|
|
197
|
+
const d = F(
|
|
198
|
+
() => Nt({ definition: t, selectedConnectionMethod: i }),
|
|
199
|
+
[t, i]
|
|
200
|
+
), c = F(() => Vt(d), [d]), r = F(
|
|
201
|
+
() => Ut(gt(e == null ? void 0 : e.configuration), c),
|
|
202
|
+
[e == null ? void 0 : e.configuration, c]
|
|
203
|
+
), l = F(() => c.join("\0"), [c]), [u, v] = x({}), [C, S] = x(null), [T, O] = x(0), B = G(null);
|
|
204
|
+
return Z(() => {
|
|
205
205
|
const h = {
|
|
206
|
-
integrationAlias: (
|
|
207
|
-
configurationType: (
|
|
208
|
-
schemaKeySignature:
|
|
209
|
-
configuration:
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
}, [
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
|
|
206
|
+
integrationAlias: (e == null ? void 0 : e.integrationAlias) ?? null,
|
|
207
|
+
configurationType: (e == null ? void 0 : e.configurationType) ?? null,
|
|
208
|
+
schemaKeySignature: l,
|
|
209
|
+
configuration: r
|
|
210
|
+
}, g = B.current;
|
|
211
|
+
g && g.integrationAlias === h.integrationAlias && g.configurationType === h.configurationType && g.schemaKeySignature === h.schemaKeySignature && vt(g.configuration, h.configuration) || (B.current = h, v(r), S(null), O((M) => M + 1));
|
|
212
|
+
}, [r, e == null ? void 0 : e.integrationAlias, e == null ? void 0 : e.configurationType, l]), !d || c.length === 0 ? null : /* @__PURE__ */ $("div", { className: "flex flex-col gap-3", children: [
|
|
213
|
+
/* @__PURE__ */ I(
|
|
214
|
+
Me,
|
|
215
215
|
{
|
|
216
|
-
schema:
|
|
216
|
+
schema: d,
|
|
217
217
|
value: u,
|
|
218
218
|
onChange: (h) => {
|
|
219
|
-
const
|
|
220
|
-
|
|
219
|
+
const g = Ut(gt(h), c);
|
|
220
|
+
v(g);
|
|
221
221
|
},
|
|
222
222
|
onValidation: ({ formValid: h }) => {
|
|
223
|
-
|
|
223
|
+
S(h);
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
|
-
|
|
226
|
+
T
|
|
227
227
|
),
|
|
228
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ $(
|
|
229
229
|
"button",
|
|
230
230
|
{
|
|
231
231
|
type: "button",
|
|
232
|
-
disabled: a || o ||
|
|
232
|
+
disabled: a || o || C !== !0,
|
|
233
233
|
onClick: () => {
|
|
234
|
-
const h =
|
|
235
|
-
|
|
234
|
+
const h = gt(e == null ? void 0 : e.configuration);
|
|
235
|
+
n({
|
|
236
236
|
...h,
|
|
237
237
|
...u
|
|
238
238
|
});
|
|
239
239
|
},
|
|
240
|
-
className:
|
|
240
|
+
className: bt(
|
|
241
241
|
"relative self-end rounded-lg bg-[var(--gray-12)] px-6 py-2 text-sm text-[var(--gray-1)] hover:opacity-90 cursor-pointer",
|
|
242
242
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
243
243
|
),
|
|
244
244
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
o && /* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ I("span", { className: o ? "invisible" : "", children: "Save Configuration" }),
|
|
246
|
+
o && /* @__PURE__ */ I(Lt, { className: "absolute inset-0 m-auto h-4 w-4 animate-spin" })
|
|
247
247
|
]
|
|
248
248
|
}
|
|
249
249
|
)
|
|
250
250
|
] });
|
|
251
|
-
},
|
|
252
|
-
var
|
|
253
|
-
return
|
|
254
|
-
},
|
|
251
|
+
}, Ft = "Other", Ee = "team-cloud-services", pt = "sandbox", ht = (t) => t.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/[_.:/-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (e) => e.toUpperCase()), Ne = (t) => t == null ? void 0 : t.replace(/\.$/, ""), jt = (t) => {
|
|
252
|
+
var e;
|
|
253
|
+
return t && "meta" in t ? ((e = t.meta) == null ? void 0 : e.installs) ?? null : null;
|
|
254
|
+
}, Ct = (t) => t instanceof Error ? t : new Error("An unknown error occurred while loading integrations"), _t = (t) => t === Ee, Kt = (t, e) => {
|
|
255
255
|
var o;
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
return
|
|
259
|
-
const
|
|
260
|
-
return typeof
|
|
261
|
-
},
|
|
262
|
-
const
|
|
256
|
+
const i = e == null ? void 0 : e(t);
|
|
257
|
+
if (i)
|
|
258
|
+
return i;
|
|
259
|
+
const n = (o = t.attributes) == null ? void 0 : o.category;
|
|
260
|
+
return typeof n == "string" && n.length > 0 ? n : Ft;
|
|
261
|
+
}, ot = (t) => t ? Object.entries(t).map(([e, i]) => {
|
|
262
|
+
const n = i;
|
|
263
263
|
return {
|
|
264
|
-
...
|
|
265
|
-
id: typeof
|
|
266
|
-
name: typeof
|
|
267
|
-
integrationAlias:
|
|
264
|
+
...n,
|
|
265
|
+
id: typeof n.id == "string" && n.id.length > 0 ? n.id : e,
|
|
266
|
+
name: typeof n.name == "string" && n.name.length > 0 ? n.name : e,
|
|
267
|
+
integrationAlias: e
|
|
268
268
|
};
|
|
269
|
-
}) : [],
|
|
270
|
-
installedIntegrations:
|
|
271
|
-
integrationId:
|
|
272
|
-
integrationName:
|
|
273
|
-
}) =>
|
|
274
|
-
summary:
|
|
275
|
-
installedByName:
|
|
276
|
-
categoryResolver:
|
|
269
|
+
}) : [], yt = ({
|
|
270
|
+
installedIntegrations: t,
|
|
271
|
+
integrationId: e,
|
|
272
|
+
integrationName: i
|
|
273
|
+
}) => t.find((n) => n.id === e) ?? t.find((n) => n.integrationAlias === e) ?? (i ? t.find((n) => n.name === i) : void 0), Ve = ({
|
|
274
|
+
summary: t,
|
|
275
|
+
installedByName: e,
|
|
276
|
+
categoryResolver: i
|
|
277
277
|
}) => {
|
|
278
|
-
var
|
|
279
|
-
const
|
|
278
|
+
var r, l, u;
|
|
279
|
+
const n = e.get(t.name), o = _t((r = t.ownerWorkspace) == null ? void 0 : r.handle), a = (n == null ? void 0 : n.version) ?? null, d = t.version ?? null, c = a && d ? a !== d : !1;
|
|
280
280
|
return {
|
|
281
|
-
id:
|
|
282
|
-
installedId:
|
|
283
|
-
name:
|
|
284
|
-
title:
|
|
285
|
-
description:
|
|
286
|
-
iconUrl:
|
|
287
|
-
attributes: { category:
|
|
281
|
+
id: t.id,
|
|
282
|
+
installedId: n == null ? void 0 : n.id,
|
|
283
|
+
name: t.name,
|
|
284
|
+
title: t.title,
|
|
285
|
+
description: t.description,
|
|
286
|
+
iconUrl: t.iconUrl,
|
|
287
|
+
attributes: { category: Kt(t, i) },
|
|
288
288
|
meta: {
|
|
289
|
-
installs:
|
|
289
|
+
installs: jt(t)
|
|
290
290
|
},
|
|
291
|
-
installed: !!
|
|
292
|
-
enabled:
|
|
291
|
+
installed: !!n,
|
|
292
|
+
enabled: n == null ? void 0 : n.enabled,
|
|
293
293
|
hasUpdate: c,
|
|
294
|
-
deprecated: (
|
|
295
|
-
author: ((
|
|
294
|
+
deprecated: (n == null ? void 0 : n.lifecycleStatus) === "deprecated" || t.lifecycleStatus === "deprecated",
|
|
295
|
+
author: ((l = t.ownerWorkspace) == null ? void 0 : l.handle) ?? ((u = t.ownerWorkspace) == null ? void 0 : u.name) ?? null,
|
|
296
296
|
isOfficial: o,
|
|
297
|
-
isVerified:
|
|
298
|
-
isPrivate:
|
|
299
|
-
visibility:
|
|
300
|
-
verificationStatus:
|
|
301
|
-
ownerWorkspace:
|
|
302
|
-
version:
|
|
303
|
-
updatedAt:
|
|
297
|
+
isVerified: t.verificationStatus === "approved",
|
|
298
|
+
isPrivate: t.visibility === "private",
|
|
299
|
+
visibility: t.visibility,
|
|
300
|
+
verificationStatus: t.verificationStatus,
|
|
301
|
+
ownerWorkspace: t.ownerWorkspace,
|
|
302
|
+
version: t.version,
|
|
303
|
+
updatedAt: t.updatedAt
|
|
304
304
|
};
|
|
305
|
-
},
|
|
306
|
-
installedIntegration:
|
|
307
|
-
summary:
|
|
308
|
-
categoryResolver:
|
|
305
|
+
}, Fe = ({
|
|
306
|
+
installedIntegration: t,
|
|
307
|
+
summary: e,
|
|
308
|
+
categoryResolver: i
|
|
309
309
|
}) => {
|
|
310
|
-
var a,
|
|
311
|
-
const
|
|
310
|
+
var a, d, c;
|
|
311
|
+
const n = _t((a = e == null ? void 0 : e.ownerWorkspace) == null ? void 0 : a.handle), o = t.version && (e != null && e.version) ? t.version !== (e == null ? void 0 : e.version) : !1;
|
|
312
312
|
return {
|
|
313
|
-
id: (
|
|
314
|
-
installedId:
|
|
315
|
-
name: (
|
|
316
|
-
title: (
|
|
317
|
-
description: (
|
|
318
|
-
iconUrl:
|
|
313
|
+
id: (e == null ? void 0 : e.id) ?? t.id,
|
|
314
|
+
installedId: t.id,
|
|
315
|
+
name: (e == null ? void 0 : e.name) ?? t.name,
|
|
316
|
+
title: (e == null ? void 0 : e.title) ?? t.name,
|
|
317
|
+
description: (e == null ? void 0 : e.description) ?? null,
|
|
318
|
+
iconUrl: e == null ? void 0 : e.iconUrl,
|
|
319
319
|
attributes: {
|
|
320
|
-
category:
|
|
320
|
+
category: e ? Kt(e, i) : Ft
|
|
321
321
|
},
|
|
322
322
|
meta: {
|
|
323
|
-
installs:
|
|
323
|
+
installs: jt(e)
|
|
324
324
|
},
|
|
325
325
|
installed: !0,
|
|
326
|
-
enabled:
|
|
326
|
+
enabled: t.enabled,
|
|
327
327
|
hasUpdate: o,
|
|
328
|
-
deprecated:
|
|
329
|
-
author: ((
|
|
330
|
-
isOfficial:
|
|
331
|
-
isVerified: (
|
|
332
|
-
isPrivate: (
|
|
333
|
-
visibility:
|
|
334
|
-
verificationStatus:
|
|
335
|
-
ownerWorkspace:
|
|
336
|
-
version: (
|
|
337
|
-
updatedAt:
|
|
328
|
+
deprecated: t.lifecycleStatus === "deprecated",
|
|
329
|
+
author: ((d = e == null ? void 0 : e.ownerWorkspace) == null ? void 0 : d.handle) ?? ((c = e == null ? void 0 : e.ownerWorkspace) == null ? void 0 : c.name) ?? null,
|
|
330
|
+
isOfficial: n,
|
|
331
|
+
isVerified: (e == null ? void 0 : e.verificationStatus) === "approved",
|
|
332
|
+
isPrivate: (e == null ? void 0 : e.visibility) === "private",
|
|
333
|
+
visibility: e == null ? void 0 : e.visibility,
|
|
334
|
+
verificationStatus: e == null ? void 0 : e.verificationStatus,
|
|
335
|
+
ownerWorkspace: e == null ? void 0 : e.ownerWorkspace,
|
|
336
|
+
version: (e == null ? void 0 : e.version) ?? t.version,
|
|
337
|
+
updatedAt: e == null ? void 0 : e.updatedAt
|
|
338
338
|
};
|
|
339
|
-
},
|
|
340
|
-
if (!
|
|
339
|
+
}, je = (t) => {
|
|
340
|
+
if (!t)
|
|
341
341
|
return {
|
|
342
342
|
actionCards: [],
|
|
343
343
|
eventCards: [],
|
|
344
344
|
channelCards: []
|
|
345
345
|
};
|
|
346
|
-
const
|
|
346
|
+
const e = Object.entries(t.actions ?? {}).filter(([, o]) => {
|
|
347
347
|
var a;
|
|
348
348
|
return ((a = o.attributes) == null ? void 0 : a.bpActionHiddenInStudio) !== "true";
|
|
349
349
|
}).map(([o, a]) => {
|
|
350
|
-
var
|
|
350
|
+
var d;
|
|
351
351
|
return {
|
|
352
352
|
key: o,
|
|
353
|
-
name:
|
|
353
|
+
name: ht(o),
|
|
354
354
|
description: a.description ?? "",
|
|
355
355
|
type: "action",
|
|
356
|
-
billable: ((
|
|
356
|
+
billable: ((d = a.attributes) == null ? void 0 : d.billable) === "true"
|
|
357
357
|
};
|
|
358
|
-
}),
|
|
358
|
+
}), i = Object.entries(t.events ?? {}).map(([o, a]) => ({
|
|
359
359
|
key: o,
|
|
360
|
-
name:
|
|
360
|
+
name: ht(o),
|
|
361
361
|
description: a.description ?? "",
|
|
362
362
|
type: "event",
|
|
363
363
|
enabled: !0
|
|
364
|
-
})),
|
|
364
|
+
})), n = Object.keys(t.channels ?? {}).map((o) => ({
|
|
365
365
|
key: o,
|
|
366
|
-
name:
|
|
366
|
+
name: ht(o),
|
|
367
367
|
description: "Channel communication support",
|
|
368
368
|
type: "channel",
|
|
369
369
|
enabled: !0
|
|
370
370
|
}));
|
|
371
371
|
return {
|
|
372
|
-
actionCards:
|
|
373
|
-
eventCards:
|
|
374
|
-
channelCards:
|
|
372
|
+
actionCards: e,
|
|
373
|
+
eventCards: i,
|
|
374
|
+
channelCards: n
|
|
375
375
|
};
|
|
376
|
-
},
|
|
377
|
-
var a,
|
|
378
|
-
if (!
|
|
376
|
+
}, _e = (t) => {
|
|
377
|
+
var a, d, c, r;
|
|
378
|
+
if (!t)
|
|
379
379
|
return [];
|
|
380
|
-
const
|
|
380
|
+
const i = [
|
|
381
381
|
{
|
|
382
382
|
value: null,
|
|
383
|
-
label: !!((
|
|
383
|
+
label: !!((d = (a = t.configuration) == null ? void 0 : a.identifier) != null && d.linkTemplateScript) ? "Connect with OAuth" : "Default configuration"
|
|
384
384
|
}
|
|
385
385
|
];
|
|
386
|
-
for (const [
|
|
387
|
-
|
|
388
|
-
value:
|
|
389
|
-
label:
|
|
386
|
+
for (const [l, u] of Object.entries(t.configurations ?? {}))
|
|
387
|
+
l !== pt && i.push({
|
|
388
|
+
value: l,
|
|
389
|
+
label: Ne(u.description) || u.title || l
|
|
390
390
|
});
|
|
391
|
-
return !!((c =
|
|
392
|
-
},
|
|
393
|
-
installedState:
|
|
394
|
-
connectionMethods:
|
|
391
|
+
return !!((c = t.sandbox) == null ? void 0 : c.identifierExtractScript) && !!((r = t.configurations) != null && r[pt]) && i.push({ value: pt, label: "Connect to a Playground" }), i;
|
|
392
|
+
}, Ke = ({
|
|
393
|
+
installedState: t,
|
|
394
|
+
connectionMethods: e
|
|
395
395
|
}) => {
|
|
396
|
-
var
|
|
397
|
-
const
|
|
398
|
-
return
|
|
399
|
-
},
|
|
400
|
-
integrations:
|
|
401
|
-
searchTerm:
|
|
402
|
-
visibility:
|
|
403
|
-
verification:
|
|
396
|
+
var n;
|
|
397
|
+
const i = (t == null ? void 0 : t.configurationType) ?? null;
|
|
398
|
+
return e.some((o) => o.value === i) ? i : ((n = e[0]) == null ? void 0 : n.value) ?? null;
|
|
399
|
+
}, He = ({
|
|
400
|
+
integrations: t,
|
|
401
|
+
searchTerm: e,
|
|
402
|
+
visibility: i,
|
|
403
|
+
verification: n,
|
|
404
404
|
sortMethod: o
|
|
405
405
|
}) => {
|
|
406
|
-
const a =
|
|
407
|
-
let c =
|
|
408
|
-
if (a && (c = c.filter((u) => (u.title || u.name).toLowerCase().includes(a))),
|
|
409
|
-
const
|
|
410
|
-
return
|
|
406
|
+
const a = e.trim().toLowerCase(), d = n ?? [];
|
|
407
|
+
let c = t;
|
|
408
|
+
if (a && (c = c.filter((u) => (u.title || u.name).toLowerCase().includes(a))), i && i !== "all" && (c = c.filter((u) => i === "private" ? u.isPrivate : !u.isPrivate)), d.length > 0 && (c = c.filter((u) => {
|
|
409
|
+
const v = d.includes("official") && u.isOfficial, C = d.includes("verified") && u.isVerified;
|
|
410
|
+
return v || C;
|
|
411
411
|
})), !o)
|
|
412
412
|
return c;
|
|
413
|
-
const
|
|
414
|
-
return [...c].sort((u,
|
|
415
|
-
},
|
|
416
|
-
const
|
|
417
|
-
for (const
|
|
418
|
-
|
|
419
|
-
return [...
|
|
420
|
-
},
|
|
421
|
-
client:
|
|
422
|
-
botId:
|
|
423
|
-
transformIntegrationPatch:
|
|
424
|
-
}) => async (
|
|
425
|
-
const a =
|
|
426
|
-
await
|
|
427
|
-
},
|
|
428
|
-
var
|
|
429
|
-
if (!
|
|
413
|
+
const r = (u) => (u.title || u.name).toLowerCase(), l = (u) => u.updatedAt ? new Date(u.updatedAt).getTime() : 0;
|
|
414
|
+
return [...c].sort((u, v) => o === "asc" ? r(u).localeCompare(r(v), void 0, { sensitivity: "base" }) : o === "desc" ? r(v).localeCompare(r(u), void 0, { sensitivity: "base" }) : o === "newest" ? l(v) - l(u) : l(u) - l(v));
|
|
415
|
+
}, wn = (t) => {
|
|
416
|
+
const e = /* @__PURE__ */ new Map();
|
|
417
|
+
for (const i of t)
|
|
418
|
+
e.set(i.id, i);
|
|
419
|
+
return [...e.values()];
|
|
420
|
+
}, Ht = ({
|
|
421
|
+
client: t,
|
|
422
|
+
botId: e,
|
|
423
|
+
transformIntegrationPatch: i
|
|
424
|
+
}) => async (n, o) => {
|
|
425
|
+
const a = i == null ? void 0 : i[n], d = a ? await a(o) : o;
|
|
426
|
+
await t.updateBot({ id: e, integrations: d });
|
|
427
|
+
}, ze = (t, e) => ["integration-hub", t, e], Re = (t) => {
|
|
428
|
+
var i;
|
|
429
|
+
if (!t || typeof t != "object")
|
|
430
430
|
return !1;
|
|
431
|
-
const
|
|
432
|
-
return
|
|
433
|
-
},
|
|
434
|
-
client:
|
|
435
|
-
integrationId:
|
|
431
|
+
const e = t;
|
|
432
|
+
return e.status === 404 || e.statusCode === 404 || ((i = e.response) == null ? void 0 : i.status) === 404;
|
|
433
|
+
}, qe = async ({
|
|
434
|
+
client: t,
|
|
435
|
+
integrationId: e
|
|
436
436
|
}) => {
|
|
437
437
|
try {
|
|
438
|
-
return (await
|
|
439
|
-
} catch (
|
|
440
|
-
if (!
|
|
441
|
-
throw
|
|
442
|
-
return (await
|
|
438
|
+
return (await t.getPublicIntegrationById({ id: e })).integration;
|
|
439
|
+
} catch (i) {
|
|
440
|
+
if (!Re(i))
|
|
441
|
+
throw i;
|
|
442
|
+
return (await t.getIntegration({ id: e })).integration;
|
|
443
443
|
}
|
|
444
|
-
},
|
|
445
|
-
installedIntegrations:
|
|
446
|
-
integrationId:
|
|
447
|
-
integrationName:
|
|
448
|
-
}) =>
|
|
449
|
-
installedIntegrations:
|
|
450
|
-
integrationId:
|
|
451
|
-
integrationName:
|
|
452
|
-
}) ?? null,
|
|
453
|
-
if (!
|
|
444
|
+
}, Qe = ({
|
|
445
|
+
installedIntegrations: t,
|
|
446
|
+
integrationId: e,
|
|
447
|
+
integrationName: i
|
|
448
|
+
}) => yt({
|
|
449
|
+
installedIntegrations: t,
|
|
450
|
+
integrationId: e,
|
|
451
|
+
integrationName: i
|
|
452
|
+
}) ?? null, We = async ({ client: t, botId: e, integrationId: i }) => {
|
|
453
|
+
if (!i)
|
|
454
454
|
return null;
|
|
455
|
-
const [
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
]), a =
|
|
455
|
+
const [n, o] = await Promise.all([
|
|
456
|
+
qe({ client: t, integrationId: i }),
|
|
457
|
+
t.getBot({ id: e })
|
|
458
|
+
]), a = ot(o.bot.integrations), d = Qe({
|
|
459
459
|
installedIntegrations: a,
|
|
460
|
-
integrationId:
|
|
461
|
-
integrationName:
|
|
462
|
-
}), c =
|
|
460
|
+
integrationId: i,
|
|
461
|
+
integrationName: n.name
|
|
462
|
+
}), c = _e(n);
|
|
463
463
|
return {
|
|
464
|
-
definition:
|
|
465
|
-
installedState:
|
|
466
|
-
capabilities:
|
|
464
|
+
definition: n,
|
|
465
|
+
installedState: d,
|
|
466
|
+
capabilities: je(n),
|
|
467
467
|
connectionMethods: c,
|
|
468
|
-
selectedConnectionMethod:
|
|
468
|
+
selectedConnectionMethod: Ke({ installedState: d, connectionMethods: c })
|
|
469
469
|
};
|
|
470
|
-
},
|
|
471
|
-
client:
|
|
472
|
-
workspaceId:
|
|
473
|
-
botId:
|
|
474
|
-
integrationId:
|
|
470
|
+
}, zt = ({
|
|
471
|
+
client: t,
|
|
472
|
+
workspaceId: e,
|
|
473
|
+
botId: i,
|
|
474
|
+
integrationId: n,
|
|
475
475
|
enabled: o = !0,
|
|
476
476
|
transformIntegrationPatch: a
|
|
477
477
|
}) => {
|
|
478
|
-
const
|
|
479
|
-
queryKey: [...c, "details",
|
|
480
|
-
enabled: o && !!
|
|
481
|
-
queryFn: () =>
|
|
482
|
-
}),
|
|
483
|
-
await
|
|
484
|
-
}, [
|
|
485
|
-
if (!(
|
|
478
|
+
const d = kt(), c = F(() => ze(e, i), [e, i]), { data: r, isLoading: l, error: u, refetch: v } = Et({
|
|
479
|
+
queryKey: [...c, "details", n],
|
|
480
|
+
enabled: o && !!n,
|
|
481
|
+
queryFn: () => We({ client: t, workspaceId: e, botId: i, integrationId: n, enabled: o })
|
|
482
|
+
}), C = N(async () => {
|
|
483
|
+
await d.invalidateQueries({ queryKey: c });
|
|
484
|
+
}, [d, c]), S = () => {
|
|
485
|
+
if (!(r != null && r.installedState))
|
|
486
486
|
throw new Error("Integration is not installed on this bot");
|
|
487
|
-
return
|
|
488
|
-
},
|
|
489
|
-
mutationFn: async (
|
|
490
|
-
const
|
|
491
|
-
await
|
|
492
|
-
[
|
|
493
|
-
configuration:
|
|
494
|
-
configurationType:
|
|
487
|
+
return r.installedState;
|
|
488
|
+
}, T = Ht({ client: t, botId: i, transformIntegrationPatch: a }), O = Q({
|
|
489
|
+
mutationFn: async (g) => {
|
|
490
|
+
const M = S();
|
|
491
|
+
await T("configure", {
|
|
492
|
+
[M.integrationAlias]: {
|
|
493
|
+
configuration: g,
|
|
494
|
+
configurationType: M.configurationType ?? null
|
|
495
495
|
}
|
|
496
496
|
});
|
|
497
497
|
},
|
|
498
|
-
onSuccess:
|
|
499
|
-
}),
|
|
498
|
+
onSuccess: C
|
|
499
|
+
}), B = Q({
|
|
500
500
|
mutationFn: async () => {
|
|
501
|
-
const
|
|
502
|
-
await
|
|
503
|
-
[
|
|
504
|
-
enabled: !
|
|
501
|
+
const g = S(), M = g.enabled ? "disable" : "enable";
|
|
502
|
+
await T(M, {
|
|
503
|
+
[g.integrationAlias]: {
|
|
504
|
+
enabled: !g.enabled
|
|
505
505
|
}
|
|
506
506
|
});
|
|
507
507
|
},
|
|
508
|
-
onSuccess:
|
|
509
|
-
}), h =
|
|
510
|
-
mutationFn: async (
|
|
511
|
-
const
|
|
512
|
-
await
|
|
513
|
-
[
|
|
514
|
-
configurationType:
|
|
508
|
+
onSuccess: C
|
|
509
|
+
}), h = Q({
|
|
510
|
+
mutationFn: async (g) => {
|
|
511
|
+
const M = S();
|
|
512
|
+
await T("configure", {
|
|
513
|
+
[M.integrationAlias]: {
|
|
514
|
+
configurationType: g
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
517
|
},
|
|
518
|
-
onSuccess:
|
|
518
|
+
onSuccess: C
|
|
519
519
|
});
|
|
520
520
|
return {
|
|
521
|
-
definition: (
|
|
522
|
-
installedState: (
|
|
523
|
-
selectedConnectionMethod: (
|
|
524
|
-
capabilities: (
|
|
521
|
+
definition: (r == null ? void 0 : r.definition) ?? null,
|
|
522
|
+
installedState: (r == null ? void 0 : r.installedState) ?? null,
|
|
523
|
+
selectedConnectionMethod: (r == null ? void 0 : r.selectedConnectionMethod) ?? null,
|
|
524
|
+
capabilities: (r == null ? void 0 : r.capabilities) ?? {
|
|
525
525
|
actionCards: [],
|
|
526
526
|
eventCards: [],
|
|
527
527
|
channelCards: []
|
|
528
528
|
},
|
|
529
|
-
connectionMethods: (
|
|
530
|
-
isLoading:
|
|
531
|
-
error: u ?
|
|
532
|
-
saveConfig:
|
|
533
|
-
toggleEnabled:
|
|
529
|
+
connectionMethods: (r == null ? void 0 : r.connectionMethods) ?? [],
|
|
530
|
+
isLoading: l,
|
|
531
|
+
error: u ? Ct(u) : null,
|
|
532
|
+
saveConfig: O.mutateAsync,
|
|
533
|
+
toggleEnabled: B.mutateAsync,
|
|
534
534
|
setConnectionMethod: h.mutateAsync,
|
|
535
535
|
refresh: () => {
|
|
536
|
-
|
|
536
|
+
v();
|
|
537
537
|
},
|
|
538
|
-
isSavingConfig:
|
|
539
|
-
isTogglingEnabled:
|
|
538
|
+
isSavingConfig: O.isPending,
|
|
539
|
+
isTogglingEnabled: B.isPending,
|
|
540
540
|
isSettingConnectionMethod: h.isPending
|
|
541
541
|
};
|
|
542
|
-
},
|
|
543
|
-
publicIntegrations:
|
|
544
|
-
privateIntegrations:
|
|
542
|
+
}, Sn = zt, Rt = 100, qt = 200, $e = (t, e) => ["integration-hub", t, e], Ge = ({
|
|
543
|
+
publicIntegrations: t,
|
|
544
|
+
privateIntegrations: e
|
|
545
545
|
}) => {
|
|
546
|
-
const
|
|
547
|
-
for (const
|
|
548
|
-
|
|
549
|
-
for (const
|
|
550
|
-
|
|
551
|
-
return [...
|
|
552
|
-
},
|
|
553
|
-
const
|
|
554
|
-
let
|
|
546
|
+
const i = /* @__PURE__ */ new Map();
|
|
547
|
+
for (const n of t)
|
|
548
|
+
i.has(n.id) || i.set(n.id, n);
|
|
549
|
+
for (const n of e)
|
|
550
|
+
i.set(n.id, n);
|
|
551
|
+
return [...i.values()];
|
|
552
|
+
}, Je = async ({ client: t }) => {
|
|
553
|
+
const e = [];
|
|
554
|
+
let i, n = 0;
|
|
555
555
|
do {
|
|
556
|
-
const o =
|
|
557
|
-
limit:
|
|
556
|
+
const o = i, a = await t.listPublicIntegrations({
|
|
557
|
+
limit: Rt,
|
|
558
558
|
version: "latest",
|
|
559
|
-
nextToken:
|
|
559
|
+
nextToken: i
|
|
560
560
|
});
|
|
561
|
-
if (
|
|
561
|
+
if (e.push(...a.integrations), i = a.meta.nextToken, n += 1, n >= qt)
|
|
562
562
|
throw new Error("Public integration pagination exceeded safety limit");
|
|
563
|
-
if (
|
|
563
|
+
if (i && i === o)
|
|
564
564
|
break;
|
|
565
|
-
} while (
|
|
566
|
-
return
|
|
567
|
-
},
|
|
568
|
-
const
|
|
569
|
-
let
|
|
565
|
+
} while (i);
|
|
566
|
+
return e;
|
|
567
|
+
}, Ze = async ({ client: t }) => {
|
|
568
|
+
const e = [];
|
|
569
|
+
let i, n = 0;
|
|
570
570
|
do {
|
|
571
|
-
const o =
|
|
572
|
-
limit:
|
|
571
|
+
const o = i, a = await t.listIntegrations({
|
|
572
|
+
limit: Rt,
|
|
573
573
|
version: "latest",
|
|
574
574
|
visibility: "private",
|
|
575
|
-
nextToken:
|
|
575
|
+
nextToken: i
|
|
576
576
|
});
|
|
577
|
-
if (
|
|
577
|
+
if (e.push(...a.integrations), i = a.meta.nextToken, n += 1, n >= qt)
|
|
578
578
|
throw new Error("Private integration pagination exceeded safety limit");
|
|
579
|
-
if (
|
|
579
|
+
if (i && i === o)
|
|
580
580
|
break;
|
|
581
|
-
} while (
|
|
582
|
-
return
|
|
583
|
-
},
|
|
584
|
-
client:
|
|
585
|
-
integrationId:
|
|
581
|
+
} while (i);
|
|
582
|
+
return e;
|
|
583
|
+
}, Xe = async ({
|
|
584
|
+
client: t,
|
|
585
|
+
integrationId: e
|
|
586
586
|
}) => {
|
|
587
587
|
try {
|
|
588
|
-
return (await
|
|
588
|
+
return (await t.getPublicIntegrationById({ id: e })).integration.name;
|
|
589
589
|
} catch {
|
|
590
590
|
try {
|
|
591
|
-
return (await
|
|
591
|
+
return (await t.getIntegration({ id: e })).integration.name;
|
|
592
592
|
} catch {
|
|
593
593
|
return;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
},
|
|
597
|
-
integrationId:
|
|
598
|
-
installedIntegrations:
|
|
596
|
+
}, Ye = ({
|
|
597
|
+
integrationId: t,
|
|
598
|
+
installedIntegrations: e
|
|
599
599
|
}) => {
|
|
600
|
-
const
|
|
601
|
-
return (
|
|
602
|
-
},
|
|
603
|
-
const [
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
]),
|
|
608
|
-
(
|
|
609
|
-
summary:
|
|
610
|
-
installedByName:
|
|
611
|
-
categoryResolver:
|
|
600
|
+
const i = yt({ installedIntegrations: e, integrationId: t });
|
|
601
|
+
return (i == null ? void 0 : i.integrationAlias) ?? t;
|
|
602
|
+
}, me = async ({ client: t, botId: e, categoryResolver: i }) => {
|
|
603
|
+
const [n, o, a] = await Promise.all([
|
|
604
|
+
Je({ client: t }),
|
|
605
|
+
Ze({ client: t }),
|
|
606
|
+
t.getBot({ id: e })
|
|
607
|
+
]), d = ot(a.bot.integrations), c = Ge({ publicIntegrations: n, privateIntegrations: o }), r = new Map(d.map((C) => [C.name, C])), l = new Map(c.map((C) => [C.name, C])), u = c.map(
|
|
608
|
+
(C) => Ve({
|
|
609
|
+
summary: C,
|
|
610
|
+
installedByName: r,
|
|
611
|
+
categoryResolver: i
|
|
612
612
|
})
|
|
613
|
-
),
|
|
614
|
-
(
|
|
615
|
-
installedIntegration:
|
|
616
|
-
summary:
|
|
617
|
-
categoryResolver:
|
|
613
|
+
), v = d.map(
|
|
614
|
+
(C) => Fe({
|
|
615
|
+
installedIntegration: C,
|
|
616
|
+
summary: l.get(C.name),
|
|
617
|
+
categoryResolver: i
|
|
618
618
|
})
|
|
619
619
|
);
|
|
620
620
|
return {
|
|
621
621
|
integrations: u,
|
|
622
|
-
installedIntegrations:
|
|
622
|
+
installedIntegrations: v
|
|
623
623
|
};
|
|
624
|
-
},
|
|
625
|
-
client:
|
|
626
|
-
workspaceId:
|
|
627
|
-
botId:
|
|
628
|
-
categoryResolver:
|
|
624
|
+
}, Qt = ({
|
|
625
|
+
client: t,
|
|
626
|
+
workspaceId: e,
|
|
627
|
+
botId: i,
|
|
628
|
+
categoryResolver: n,
|
|
629
629
|
enabled: o = !0,
|
|
630
630
|
transformIntegrationPatch: a
|
|
631
631
|
}) => {
|
|
632
|
-
const
|
|
632
|
+
const d = kt(), c = F(() => $e(e, i), [e, i]), r = G(Promise.resolve()), { data: l, isLoading: u, error: v, refetch: C } = Et({
|
|
633
633
|
queryKey: [...c, "catalog"],
|
|
634
634
|
enabled: o,
|
|
635
|
-
queryFn: () =>
|
|
636
|
-
}),
|
|
637
|
-
await
|
|
638
|
-
}, [
|
|
639
|
-
const A =
|
|
640
|
-
return
|
|
635
|
+
queryFn: () => me({ client: t, workspaceId: e, botId: i, categoryResolver: n })
|
|
636
|
+
}), S = N(async () => {
|
|
637
|
+
await d.invalidateQueries({ queryKey: c });
|
|
638
|
+
}, [d, c]), T = N(async (p) => {
|
|
639
|
+
const A = r.current.then(p, p);
|
|
640
|
+
return r.current = A.then(
|
|
641
641
|
() => {
|
|
642
642
|
},
|
|
643
643
|
() => {
|
|
644
644
|
}
|
|
645
645
|
), A;
|
|
646
|
-
}, []),
|
|
647
|
-
const { bot: A } = await
|
|
648
|
-
return
|
|
649
|
-
}, h =
|
|
650
|
-
mutationFn: async (
|
|
651
|
-
await
|
|
652
|
-
await
|
|
646
|
+
}, []), O = Ht({ client: t, botId: i, transformIntegrationPatch: a }), B = async (p) => {
|
|
647
|
+
const { bot: A } = await t.getBot({ id: i }), k = ot(A.integrations);
|
|
648
|
+
return Ye({ integrationId: p, installedIntegrations: k });
|
|
649
|
+
}, h = Q({
|
|
650
|
+
mutationFn: async (p) => {
|
|
651
|
+
await T(async () => {
|
|
652
|
+
await O("install", { [p]: { enabled: !0 } });
|
|
653
653
|
});
|
|
654
654
|
},
|
|
655
|
-
onSuccess:
|
|
656
|
-
}),
|
|
657
|
-
mutationFn: async (
|
|
658
|
-
await
|
|
659
|
-
const A = await
|
|
660
|
-
await
|
|
655
|
+
onSuccess: S
|
|
656
|
+
}), g = Q({
|
|
657
|
+
mutationFn: async (p) => {
|
|
658
|
+
await T(async () => {
|
|
659
|
+
const A = await B(p);
|
|
660
|
+
await O("uninstall", { [A]: null });
|
|
661
661
|
});
|
|
662
662
|
},
|
|
663
|
-
onSuccess:
|
|
664
|
-
}),
|
|
665
|
-
mutationFn: async (
|
|
666
|
-
await
|
|
667
|
-
const A = await
|
|
668
|
-
await
|
|
663
|
+
onSuccess: S
|
|
664
|
+
}), M = Q({
|
|
665
|
+
mutationFn: async (p) => {
|
|
666
|
+
await T(async () => {
|
|
667
|
+
const A = await B(p);
|
|
668
|
+
await O("enable", { [A]: { enabled: !0 } });
|
|
669
669
|
});
|
|
670
670
|
},
|
|
671
|
-
onSuccess:
|
|
672
|
-
}),
|
|
673
|
-
mutationFn: async (
|
|
674
|
-
await
|
|
675
|
-
const A = await
|
|
676
|
-
await
|
|
671
|
+
onSuccess: S
|
|
672
|
+
}), j = Q({
|
|
673
|
+
mutationFn: async (p) => {
|
|
674
|
+
await T(async () => {
|
|
675
|
+
const A = await B(p);
|
|
676
|
+
await O("disable", { [A]: { enabled: !1 } });
|
|
677
677
|
});
|
|
678
678
|
},
|
|
679
|
-
onSuccess:
|
|
680
|
-
}),
|
|
681
|
-
mutationFn: async (
|
|
682
|
-
await
|
|
683
|
-
const { bot: A } = await
|
|
679
|
+
onSuccess: S
|
|
680
|
+
}), _ = Q({
|
|
681
|
+
mutationFn: async (p) => {
|
|
682
|
+
await T(async () => {
|
|
683
|
+
const { bot: A } = await t.getBot({ id: i }), k = ot(A.integrations), y = await Xe({ client: t, integrationId: p }), P = yt({
|
|
684
684
|
installedIntegrations: k,
|
|
685
|
-
integrationId:
|
|
686
|
-
integrationName:
|
|
687
|
-
}),
|
|
688
|
-
enabled: (
|
|
689
|
-
configuration: (
|
|
690
|
-
configurationType: (
|
|
691
|
-
},
|
|
692
|
-
[
|
|
685
|
+
integrationId: p,
|
|
686
|
+
integrationName: y
|
|
687
|
+
}), V = {
|
|
688
|
+
enabled: (P == null ? void 0 : P.enabled) ?? !0,
|
|
689
|
+
configuration: (P == null ? void 0 : P.configuration) ?? {},
|
|
690
|
+
configurationType: (P == null ? void 0 : P.configurationType) ?? null
|
|
691
|
+
}, J = {
|
|
692
|
+
[p]: V
|
|
693
693
|
};
|
|
694
|
-
|
|
694
|
+
P && P.integrationAlias !== p && (J[P.integrationAlias] = null), await O("upgrade", J);
|
|
695
695
|
});
|
|
696
696
|
},
|
|
697
|
-
onSuccess:
|
|
697
|
+
onSuccess: S
|
|
698
698
|
});
|
|
699
699
|
return {
|
|
700
|
-
integrations: (
|
|
701
|
-
installedIntegrations: (
|
|
700
|
+
integrations: (l == null ? void 0 : l.integrations) ?? [],
|
|
701
|
+
installedIntegrations: (l == null ? void 0 : l.installedIntegrations) ?? [],
|
|
702
702
|
isLoading: u,
|
|
703
|
-
error:
|
|
703
|
+
error: v ? Ct(v) : null,
|
|
704
704
|
install: h.mutateAsync,
|
|
705
|
-
uninstall:
|
|
706
|
-
enable:
|
|
707
|
-
disable:
|
|
708
|
-
upgrade:
|
|
705
|
+
uninstall: g.mutateAsync,
|
|
706
|
+
enable: M.mutateAsync,
|
|
707
|
+
disable: j.mutateAsync,
|
|
708
|
+
upgrade: _.mutateAsync,
|
|
709
709
|
refresh: () => {
|
|
710
|
-
|
|
710
|
+
C();
|
|
711
711
|
},
|
|
712
712
|
isInstalling: h.isPending,
|
|
713
|
-
isUninstalling:
|
|
714
|
-
isEnabling:
|
|
715
|
-
isDisabling:
|
|
716
|
-
isUpgrading:
|
|
713
|
+
isUninstalling: g.isPending,
|
|
714
|
+
isEnabling: M.isPending,
|
|
715
|
+
isDisabling: j.isPending,
|
|
716
|
+
isUpgrading: _.isPending
|
|
717
717
|
};
|
|
718
|
-
},
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
718
|
+
}, An = Qt, tn = ["hub", "installed"], en = (t, e) => `integration-hub:nav:${t}:${e}`, xt = (t) => {
|
|
719
|
+
try {
|
|
720
|
+
const e = sessionStorage.getItem(t);
|
|
721
|
+
if (!e)
|
|
722
|
+
return null;
|
|
723
|
+
const i = JSON.parse(e);
|
|
724
|
+
if (typeof i != "object" || i === null)
|
|
725
|
+
return null;
|
|
726
|
+
const n = i, o = {};
|
|
727
|
+
return typeof n.view == "string" && tn.includes(n.view) && (o.view = n.view), (typeof n.selectedIntegrationId == "string" || n.selectedIntegrationId === null) && (o.selectedIntegrationId = n.selectedIntegrationId), (typeof n.selectedDefinitionId == "string" || n.selectedDefinitionId === null) && (o.selectedDefinitionId = n.selectedDefinitionId), typeof n.searchInput == "string" && (o.searchInput = n.searchInput), typeof n.visibility == "string" ? o.visibility = n.visibility : "visibility" in n && (o.visibility = void 0), Array.isArray(n.verification) && n.verification.every((a) => typeof a == "string") ? o.verification = n.verification : "verification" in n && (o.verification = void 0), typeof n.sortMethod == "string" ? o.sortMethod = n.sortMethod : "sortMethod" in n && (o.sortMethod = void 0), typeof n.selectedCategory == "string" ? o.selectedCategory = n.selectedCategory : "selectedCategory" in n && (o.selectedCategory = void 0), o;
|
|
728
|
+
} catch {
|
|
729
|
+
return null;
|
|
730
|
+
}
|
|
731
|
+
}, nn = (t, e) => {
|
|
732
|
+
try {
|
|
733
|
+
sessionStorage.setItem(
|
|
734
|
+
t,
|
|
735
|
+
JSON.stringify(e, (i, n) => n === void 0 ? null : n)
|
|
736
|
+
);
|
|
737
|
+
} catch {
|
|
738
|
+
}
|
|
739
|
+
}, Dt = (t, e) => ({
|
|
740
|
+
view: (t == null ? void 0 : t.view) ?? e.initialView,
|
|
741
|
+
selectedIntegrationId: (t == null ? void 0 : t.selectedIntegrationId) ?? null,
|
|
742
|
+
selectedDefinitionId: (t == null ? void 0 : t.selectedDefinitionId) ?? null,
|
|
743
|
+
searchInput: (t == null ? void 0 : t.searchInput) ?? "",
|
|
744
|
+
visibility: t && "visibility" in t ? t.visibility : e.defaultVisibility,
|
|
745
|
+
verification: t && "verification" in t ? t.verification ? [...t.verification] : void 0 : e.defaultVerification,
|
|
746
|
+
sortMethod: t && "sortMethod" in t ? t.sortMethod : e.defaultSortMethod,
|
|
747
|
+
selectedCategory: t == null ? void 0 : t.selectedCategory
|
|
748
|
+
}), on = ({
|
|
729
749
|
workspaceId: t,
|
|
730
750
|
botId: e,
|
|
731
|
-
|
|
751
|
+
enabled: i,
|
|
752
|
+
defaults: n
|
|
753
|
+
}) => {
|
|
754
|
+
const o = en(t, e), a = G(null);
|
|
755
|
+
if (a.current === null) {
|
|
756
|
+
const f = i ? xt(o) : null;
|
|
757
|
+
a.current = Dt(f, n);
|
|
758
|
+
}
|
|
759
|
+
const [d, c] = x(a.current.view), [r, l] = x(
|
|
760
|
+
a.current.selectedIntegrationId
|
|
761
|
+
), [u, v] = x(
|
|
762
|
+
a.current.selectedDefinitionId
|
|
763
|
+
), [C, S] = x(a.current.searchInput), [T, O] = x(a.current.visibility), [B, h] = x(a.current.verification), [g, M] = x(a.current.sortMethod), [j, _] = x(
|
|
764
|
+
a.current.selectedCategory
|
|
765
|
+
), p = G(a.current), A = G(i);
|
|
766
|
+
A.current = i;
|
|
767
|
+
const k = G(o);
|
|
768
|
+
Z(() => {
|
|
769
|
+
if (o === k.current)
|
|
770
|
+
return;
|
|
771
|
+
k.current = o;
|
|
772
|
+
const f = i ? xt(o) : null, E = Dt(f, n);
|
|
773
|
+
p.current = E, c(E.view), l(E.selectedIntegrationId), v(E.selectedDefinitionId), S(E.searchInput), O(E.visibility), h(E.verification), M(E.sortMethod), _(E.selectedCategory);
|
|
774
|
+
}, [o, i, n]);
|
|
775
|
+
const y = N((f) => {
|
|
776
|
+
f.verification !== void 0 && (f = { ...f, verification: f.verification ? [...f.verification] : void 0 }), Object.assign(p.current, f), A.current && nn(k.current, p.current);
|
|
777
|
+
}, []), P = N(
|
|
778
|
+
(f) => {
|
|
779
|
+
c(f), y({ view: f });
|
|
780
|
+
},
|
|
781
|
+
[y]
|
|
782
|
+
), V = N(
|
|
783
|
+
(f) => {
|
|
784
|
+
l(f), y({ selectedIntegrationId: f });
|
|
785
|
+
},
|
|
786
|
+
[y]
|
|
787
|
+
), J = N(
|
|
788
|
+
(f) => {
|
|
789
|
+
v(f), y({ selectedDefinitionId: f });
|
|
790
|
+
},
|
|
791
|
+
[y]
|
|
792
|
+
), at = N(
|
|
793
|
+
(f) => {
|
|
794
|
+
S(f), y({ searchInput: f });
|
|
795
|
+
},
|
|
796
|
+
[y]
|
|
797
|
+
), X = N(
|
|
798
|
+
(f) => {
|
|
799
|
+
O(f), y({ visibility: f });
|
|
800
|
+
},
|
|
801
|
+
[y]
|
|
802
|
+
), Y = N(
|
|
803
|
+
(f) => {
|
|
804
|
+
h(f), y({ verification: f });
|
|
805
|
+
},
|
|
806
|
+
[y]
|
|
807
|
+
), K = N(
|
|
808
|
+
(f) => {
|
|
809
|
+
M(f), y({ sortMethod: f });
|
|
810
|
+
},
|
|
811
|
+
[y]
|
|
812
|
+
), H = N(
|
|
813
|
+
(f) => {
|
|
814
|
+
_(f), y({ selectedCategory: f });
|
|
815
|
+
},
|
|
816
|
+
[y]
|
|
817
|
+
);
|
|
818
|
+
return {
|
|
819
|
+
view: d,
|
|
820
|
+
setView: P,
|
|
821
|
+
selectedIntegrationId: r,
|
|
822
|
+
setSelectedIntegrationId: V,
|
|
823
|
+
selectedDefinitionId: u,
|
|
824
|
+
setSelectedDefinitionId: J,
|
|
825
|
+
searchInput: C,
|
|
826
|
+
setSearchInput: at,
|
|
827
|
+
visibility: T,
|
|
828
|
+
setVisibility: X,
|
|
829
|
+
verification: B,
|
|
830
|
+
setVerification: Y,
|
|
831
|
+
sortMethod: g,
|
|
832
|
+
setSortMethod: K,
|
|
833
|
+
selectedCategory: j,
|
|
834
|
+
setSelectedCategory: H
|
|
835
|
+
};
|
|
836
|
+
}, an = ["official", "verified"], sn = () => /* @__PURE__ */ I("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ I(Lt, { className: "h-6 w-6 animate-spin text-[var(--gray-9)]" }) }), rn = () => /* @__PURE__ */ I("div", { className: "flex items-center justify-center py-16 text-sm text-[var(--gray-11)]", children: "Integration details are unavailable for this selection." }), cn = (t) => t ? {
|
|
837
|
+
key: t.key,
|
|
838
|
+
type: t.type
|
|
839
|
+
} : null, ln = ({
|
|
840
|
+
definition: t,
|
|
841
|
+
selectedConnectionMethod: e
|
|
842
|
+
}) => {
|
|
843
|
+
var i, n, o, a, d;
|
|
844
|
+
return e ? ((o = (n = (i = t.configurations) == null ? void 0 : i[e]) == null ? void 0 : n.identifier) == null ? void 0 : o.linkTemplateScript) ?? null : ((d = (a = t.configuration) == null ? void 0 : a.identifier) == null ? void 0 : d.linkTemplateScript) ?? null;
|
|
845
|
+
}, dn = ({
|
|
846
|
+
client: t,
|
|
847
|
+
workspaceId: e,
|
|
848
|
+
botId: i,
|
|
849
|
+
initialView: n,
|
|
732
850
|
categories: o,
|
|
733
851
|
bannerSlides: a,
|
|
734
|
-
bannerIconUrl:
|
|
852
|
+
bannerIconUrl: d,
|
|
735
853
|
noResultsDocumentationLink: c,
|
|
736
|
-
disableInstallation:
|
|
737
|
-
hasWriteAccess:
|
|
854
|
+
disableInstallation: r = !1,
|
|
855
|
+
hasWriteAccess: l = !0,
|
|
738
856
|
transformIntegrationPatch: u,
|
|
739
|
-
categoryResolver:
|
|
740
|
-
filterMenuLabels:
|
|
741
|
-
defaultVisibility:
|
|
742
|
-
defaultVerification:
|
|
743
|
-
defaultSortMethod:
|
|
744
|
-
renderConfigurationForm:
|
|
857
|
+
categoryResolver: v,
|
|
858
|
+
filterMenuLabels: C,
|
|
859
|
+
defaultVisibility: S,
|
|
860
|
+
defaultVerification: T,
|
|
861
|
+
defaultSortMethod: O,
|
|
862
|
+
renderConfigurationForm: B,
|
|
745
863
|
renderConnectionsContent: h,
|
|
746
|
-
oauthTemplateData:
|
|
747
|
-
renderDetailPanel:
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
864
|
+
oauthTemplateData: g,
|
|
865
|
+
renderDetailPanel: M,
|
|
866
|
+
renderNotifications: j,
|
|
867
|
+
onShare: _,
|
|
868
|
+
onInstall: p,
|
|
869
|
+
onUninstall: A,
|
|
870
|
+
onEnable: k,
|
|
871
|
+
onDisable: y,
|
|
872
|
+
onUpgrade: P,
|
|
873
|
+
onError: V,
|
|
874
|
+
persistNavigationState: J = !1
|
|
754
875
|
}) => {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
876
|
+
var It;
|
|
877
|
+
const at = F(
|
|
878
|
+
() => ({
|
|
879
|
+
initialView: n ?? "hub",
|
|
880
|
+
defaultVisibility: S,
|
|
881
|
+
defaultVerification: T ?? [...an],
|
|
882
|
+
defaultSortMethod: O
|
|
883
|
+
}),
|
|
884
|
+
[n, S, T, O]
|
|
885
|
+
), {
|
|
886
|
+
view: X,
|
|
887
|
+
setView: Y,
|
|
888
|
+
selectedIntegrationId: K,
|
|
889
|
+
setSelectedIntegrationId: H,
|
|
890
|
+
selectedDefinitionId: f,
|
|
891
|
+
setSelectedDefinitionId: E,
|
|
892
|
+
searchInput: m,
|
|
893
|
+
setSearchInput: Wt,
|
|
894
|
+
visibility: st,
|
|
895
|
+
setVisibility: $t,
|
|
896
|
+
verification: rt,
|
|
897
|
+
setVerification: Gt,
|
|
898
|
+
sortMethod: ct,
|
|
899
|
+
setSortMethod: Jt,
|
|
900
|
+
selectedCategory: Zt,
|
|
901
|
+
setSelectedCategory: Xt
|
|
902
|
+
} = on({
|
|
903
|
+
workspaceId: e,
|
|
904
|
+
botId: i,
|
|
905
|
+
enabled: J,
|
|
906
|
+
defaults: at
|
|
907
|
+
}), [lt, z] = x(null), [Yt, W] = x(!1), [mt, dt] = x("connections"), [te, ut] = x("connections"), w = Qt({
|
|
908
|
+
client: t,
|
|
909
|
+
workspaceId: e,
|
|
910
|
+
botId: i,
|
|
911
|
+
categoryResolver: v,
|
|
762
912
|
enabled: !0,
|
|
763
913
|
transformIntegrationPatch: u
|
|
764
|
-
}),
|
|
765
|
-
() =>
|
|
914
|
+
}), ee = F(
|
|
915
|
+
() => He({
|
|
766
916
|
integrations: w.integrations,
|
|
767
|
-
searchTerm:
|
|
768
|
-
visibility:
|
|
769
|
-
verification:
|
|
770
|
-
sortMethod:
|
|
917
|
+
searchTerm: m,
|
|
918
|
+
visibility: st,
|
|
919
|
+
verification: rt,
|
|
920
|
+
sortMethod: ct
|
|
771
921
|
}),
|
|
772
|
-
[w.integrations,
|
|
773
|
-
),
|
|
922
|
+
[w.integrations, m, st, rt, ct]
|
|
923
|
+
), D = F(
|
|
774
924
|
() => [...w.integrations, ...w.installedIntegrations].find(
|
|
775
|
-
(
|
|
925
|
+
(b) => b.id === K
|
|
776
926
|
) ?? null,
|
|
777
|
-
[w.integrations, w.installedIntegrations,
|
|
778
|
-
)
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
927
|
+
[w.integrations, w.installedIntegrations, K]
|
|
928
|
+
);
|
|
929
|
+
Z(() => {
|
|
930
|
+
K && !w.isLoading && !D && (H(null), E(null));
|
|
931
|
+
}, [K, D, w.isLoading, H, E]);
|
|
932
|
+
const s = zt({
|
|
933
|
+
client: t,
|
|
934
|
+
workspaceId: e,
|
|
935
|
+
botId: i,
|
|
936
|
+
integrationId: f,
|
|
937
|
+
enabled: !!f,
|
|
784
938
|
transformIntegrationPatch: u
|
|
785
|
-
}),
|
|
786
|
-
() => (o == null ? void 0 : o.filter((
|
|
939
|
+
}), ne = F(
|
|
940
|
+
() => (o == null ? void 0 : o.filter((b) => b.name !== "Popular").map((b) => b.name)) ?? [],
|
|
787
941
|
[o]
|
|
788
|
-
),
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
942
|
+
), { readme: ie, isLoading: oe } = fe((It = s.definition) == null ? void 0 : It.readmeUrl);
|
|
943
|
+
Z(() => {
|
|
944
|
+
W(!1), z(null);
|
|
945
|
+
}, [f]);
|
|
946
|
+
const tt = N(
|
|
947
|
+
(b) => {
|
|
948
|
+
const U = Ct(b);
|
|
949
|
+
V == null || V(U);
|
|
792
950
|
},
|
|
793
|
-
[
|
|
794
|
-
),
|
|
795
|
-
operation:
|
|
796
|
-
onSuccess:
|
|
797
|
-
integration:
|
|
951
|
+
[V]
|
|
952
|
+
), et = async ({
|
|
953
|
+
operation: b,
|
|
954
|
+
onSuccess: U,
|
|
955
|
+
integration: R
|
|
798
956
|
}) => {
|
|
799
|
-
const
|
|
800
|
-
if (
|
|
957
|
+
const q = R ?? D;
|
|
958
|
+
if (q)
|
|
801
959
|
try {
|
|
802
|
-
await
|
|
803
|
-
} catch (
|
|
804
|
-
|
|
960
|
+
await b(), U == null || U(q);
|
|
961
|
+
} catch (ft) {
|
|
962
|
+
tt(ft);
|
|
805
963
|
}
|
|
806
|
-
},
|
|
807
|
-
var
|
|
808
|
-
if (!
|
|
964
|
+
}, ae = (b) => {
|
|
965
|
+
var Tt, Ot, Pt, Bt;
|
|
966
|
+
if (!K || b !== K)
|
|
809
967
|
return null;
|
|
810
|
-
if (
|
|
811
|
-
return
|
|
812
|
-
if (!
|
|
813
|
-
return
|
|
814
|
-
const
|
|
815
|
-
definition:
|
|
816
|
-
selectedConnectionMethod:
|
|
817
|
-
}),
|
|
818
|
-
definition:
|
|
819
|
-
selectedConnectionMethod:
|
|
820
|
-
}),
|
|
968
|
+
if (s.isLoading)
|
|
969
|
+
return sn();
|
|
970
|
+
if (!s.definition || !D)
|
|
971
|
+
return rn();
|
|
972
|
+
const U = !!s.installedState, R = ln({
|
|
973
|
+
definition: s.definition,
|
|
974
|
+
selectedConnectionMethod: s.selectedConnectionMethod
|
|
975
|
+
}), q = s.connectionMethods.length > 1 || !!R, ft = Nt({
|
|
976
|
+
definition: s.definition,
|
|
977
|
+
selectedConnectionMethod: s.selectedConnectionMethod
|
|
978
|
+
}), se = Vt(ft).length > 0, re = !!B || se, wt = !U || Yt, St = {
|
|
979
|
+
integration: D,
|
|
980
|
+
definition: s.definition,
|
|
981
|
+
installedState: s.installedState,
|
|
982
|
+
workspaceId: e,
|
|
983
|
+
botId: i
|
|
984
|
+
}, At = async (L) => {
|
|
821
985
|
try {
|
|
822
|
-
await
|
|
823
|
-
} catch (
|
|
824
|
-
|
|
986
|
+
await s.saveConfig(L);
|
|
987
|
+
} catch (nt) {
|
|
988
|
+
tt(nt);
|
|
825
989
|
}
|
|
826
|
-
},
|
|
827
|
-
definition:
|
|
828
|
-
installedState:
|
|
829
|
-
connectionMethods:
|
|
830
|
-
selectedConnectionMethod:
|
|
831
|
-
onConnectionMethodChange:
|
|
832
|
-
isSettingConnectionMethod:
|
|
833
|
-
}) : /* @__PURE__ */
|
|
834
|
-
/* @__PURE__ */
|
|
835
|
-
|
|
990
|
+
}, ce = h ? h({
|
|
991
|
+
definition: s.definition,
|
|
992
|
+
installedState: s.installedState,
|
|
993
|
+
connectionMethods: s.connectionMethods,
|
|
994
|
+
selectedConnectionMethod: s.selectedConnectionMethod,
|
|
995
|
+
onConnectionMethodChange: s.setConnectionMethod,
|
|
996
|
+
isSettingConnectionMethod: s.isSettingConnectionMethod
|
|
997
|
+
}) : /* @__PURE__ */ $("div", { className: "flex flex-col gap-4", children: [
|
|
998
|
+
/* @__PURE__ */ I("div", { className: "self-end", children: /* @__PURE__ */ I(
|
|
999
|
+
ve,
|
|
836
1000
|
{
|
|
837
|
-
options:
|
|
838
|
-
value:
|
|
839
|
-
disabled: !
|
|
840
|
-
onChange: (
|
|
841
|
-
|
|
1001
|
+
options: s.connectionMethods,
|
|
1002
|
+
value: s.selectedConnectionMethod,
|
|
1003
|
+
disabled: !l,
|
|
1004
|
+
onChange: (L) => {
|
|
1005
|
+
l && s.setConnectionMethod(L).catch(tt);
|
|
842
1006
|
}
|
|
843
1007
|
}
|
|
844
1008
|
) }),
|
|
845
|
-
|
|
846
|
-
|
|
1009
|
+
R ? /* @__PURE__ */ I(
|
|
1010
|
+
Le,
|
|
847
1011
|
{
|
|
848
|
-
client:
|
|
849
|
-
integrationName:
|
|
850
|
-
linkTemplateScript:
|
|
851
|
-
webhookUrl: (
|
|
852
|
-
oauthTemplateData:
|
|
853
|
-
isAuthorized: !!((
|
|
854
|
-
disabled: !
|
|
1012
|
+
client: t,
|
|
1013
|
+
integrationName: s.definition.title ?? s.definition.name,
|
|
1014
|
+
linkTemplateScript: R,
|
|
1015
|
+
webhookUrl: (Tt = s.installedState) == null ? void 0 : Tt.webhookUrl,
|
|
1016
|
+
oauthTemplateData: g,
|
|
1017
|
+
isAuthorized: !!((Ot = s.installedState) != null && Ot.identifier),
|
|
1018
|
+
disabled: !l,
|
|
855
1019
|
onAuthorized: async () => {
|
|
856
|
-
|
|
1020
|
+
s.refresh(), w.refresh();
|
|
857
1021
|
},
|
|
858
|
-
onError:
|
|
1022
|
+
onError: tt
|
|
859
1023
|
}
|
|
860
|
-
) : /* @__PURE__ */
|
|
1024
|
+
) : /* @__PURE__ */ $("p", { className: "text-sm text-[var(--gray-11)]", children: [
|
|
861
1025
|
"No custom connection UI was provided. Use ",
|
|
862
|
-
/* @__PURE__ */
|
|
1026
|
+
/* @__PURE__ */ I("code", { children: "renderConnectionsContent" }),
|
|
863
1027
|
" to plug your OAuth/manual connection flow."
|
|
864
1028
|
] })
|
|
865
|
-
] }),
|
|
866
|
-
|
|
1029
|
+
] }), le = /* @__PURE__ */ I(
|
|
1030
|
+
Ce,
|
|
867
1031
|
{
|
|
868
|
-
webhookUrl: (
|
|
869
|
-
isBlocked: !
|
|
870
|
-
children:
|
|
871
|
-
definition:
|
|
872
|
-
installedState:
|
|
873
|
-
selectedConnectionMethod:
|
|
874
|
-
onSave:
|
|
875
|
-
isSaving:
|
|
876
|
-
}) : /* @__PURE__ */
|
|
877
|
-
|
|
1032
|
+
webhookUrl: (Pt = s.installedState) == null ? void 0 : Pt.webhookUrl,
|
|
1033
|
+
isBlocked: !s.installedState,
|
|
1034
|
+
children: B ? B({
|
|
1035
|
+
definition: s.definition,
|
|
1036
|
+
installedState: s.installedState,
|
|
1037
|
+
selectedConnectionMethod: s.selectedConnectionMethod,
|
|
1038
|
+
onSave: At,
|
|
1039
|
+
isSaving: s.isSavingConfig
|
|
1040
|
+
}) : /* @__PURE__ */ I(
|
|
1041
|
+
ke,
|
|
878
1042
|
{
|
|
879
|
-
definition:
|
|
880
|
-
installedState:
|
|
881
|
-
selectedConnectionMethod:
|
|
882
|
-
onSave:
|
|
883
|
-
isSaving:
|
|
884
|
-
disabled: !
|
|
1043
|
+
definition: s.definition,
|
|
1044
|
+
installedState: s.installedState,
|
|
1045
|
+
selectedConnectionMethod: s.selectedConnectionMethod,
|
|
1046
|
+
onSave: At,
|
|
1047
|
+
isSaving: s.isSavingConfig,
|
|
1048
|
+
disabled: !l || !s.installedState
|
|
885
1049
|
}
|
|
886
1050
|
)
|
|
887
1051
|
}
|
|
1052
|
+
), Mt = /* @__PURE__ */ I(
|
|
1053
|
+
ye,
|
|
1054
|
+
{
|
|
1055
|
+
actionCards: s.capabilities.actionCards,
|
|
1056
|
+
eventCards: s.capabilities.eventCards,
|
|
1057
|
+
channelCards: s.capabilities.channelCards,
|
|
1058
|
+
selectedCard: lt,
|
|
1059
|
+
onCardSelect: (L) => {
|
|
1060
|
+
z(
|
|
1061
|
+
cn(
|
|
1062
|
+
L ? {
|
|
1063
|
+
key: L.key,
|
|
1064
|
+
type: L.type
|
|
1065
|
+
} : null
|
|
1066
|
+
)
|
|
1067
|
+
);
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
), de = /* @__PURE__ */ I(
|
|
1071
|
+
Ie,
|
|
1072
|
+
{
|
|
1073
|
+
version: s.definition.version,
|
|
1074
|
+
githubUrl: s.definition.url,
|
|
1075
|
+
aboutLabel: "About Integration",
|
|
1076
|
+
onAboutClick: U ? () => W(!0) : void 0
|
|
1077
|
+
}
|
|
888
1078
|
);
|
|
889
|
-
return /* @__PURE__ */
|
|
890
|
-
|
|
1079
|
+
return /* @__PURE__ */ I(
|
|
1080
|
+
we,
|
|
891
1081
|
{
|
|
892
|
-
title:
|
|
893
|
-
iconUrl:
|
|
894
|
-
contributorName:
|
|
895
|
-
isOfficial:
|
|
896
|
-
isVerified:
|
|
897
|
-
isPrivate:
|
|
1082
|
+
title: s.definition.title ?? s.definition.name,
|
|
1083
|
+
iconUrl: s.definition.iconUrl,
|
|
1084
|
+
contributorName: D.author,
|
|
1085
|
+
isOfficial: D.isOfficial,
|
|
1086
|
+
isVerified: D.isVerified,
|
|
1087
|
+
isPrivate: D.isPrivate,
|
|
898
1088
|
onBack: () => {
|
|
899
|
-
|
|
1089
|
+
H(null), E(null), z(null), W(!1);
|
|
900
1090
|
},
|
|
901
|
-
onInstall:
|
|
902
|
-
|
|
903
|
-
operation: () => w.install(
|
|
904
|
-
onSuccess:
|
|
905
|
-
integration:
|
|
1091
|
+
onInstall: U || r || !l ? void 0 : () => {
|
|
1092
|
+
et({
|
|
1093
|
+
operation: () => w.install(D.id),
|
|
1094
|
+
onSuccess: p,
|
|
1095
|
+
integration: D
|
|
906
1096
|
});
|
|
907
1097
|
},
|
|
908
|
-
onToggleEnabled: !
|
|
909
|
-
const
|
|
910
|
-
|
|
1098
|
+
onToggleEnabled: !U || !l ? void 0 : () => {
|
|
1099
|
+
const L = s.installedState, nt = !!(L != null && L.enabled);
|
|
1100
|
+
et({
|
|
911
1101
|
operation: async () => {
|
|
912
|
-
if (!
|
|
1102
|
+
if (!L)
|
|
913
1103
|
throw new Error("Integration is not installed");
|
|
914
|
-
if (
|
|
915
|
-
await w.disable(
|
|
1104
|
+
if (nt) {
|
|
1105
|
+
await w.disable(L.id);
|
|
916
1106
|
return;
|
|
917
1107
|
}
|
|
918
|
-
await w.enable(
|
|
1108
|
+
await w.enable(L.id);
|
|
919
1109
|
},
|
|
920
|
-
onSuccess:
|
|
921
|
-
integration:
|
|
1110
|
+
onSuccess: nt ? y : k,
|
|
1111
|
+
integration: D
|
|
922
1112
|
});
|
|
923
1113
|
},
|
|
924
|
-
onUninstall: !
|
|
925
|
-
const
|
|
926
|
-
|
|
1114
|
+
onUninstall: !U || !l ? void 0 : () => {
|
|
1115
|
+
const L = s.installedState;
|
|
1116
|
+
et({
|
|
927
1117
|
operation: async () => {
|
|
928
|
-
if (!
|
|
1118
|
+
if (!L)
|
|
929
1119
|
throw new Error("Integration is not installed");
|
|
930
|
-
await w.uninstall(
|
|
1120
|
+
await w.uninstall(L.id);
|
|
931
1121
|
},
|
|
932
|
-
onSuccess:
|
|
933
|
-
integration:
|
|
1122
|
+
onSuccess: A,
|
|
1123
|
+
integration: D
|
|
934
1124
|
});
|
|
935
1125
|
},
|
|
936
|
-
onUpgrade: !
|
|
937
|
-
|
|
938
|
-
operation: () => w.upgrade(
|
|
939
|
-
onSuccess:
|
|
940
|
-
integration:
|
|
1126
|
+
onUpgrade: !D.hasUpdate || !l ? void 0 : () => {
|
|
1127
|
+
et({
|
|
1128
|
+
operation: () => w.upgrade(D.id),
|
|
1129
|
+
onSuccess: P,
|
|
1130
|
+
integration: D
|
|
941
1131
|
});
|
|
942
1132
|
},
|
|
943
|
-
isInstalled:
|
|
944
|
-
disableInstallation:
|
|
945
|
-
hasWriteAccess:
|
|
1133
|
+
isInstalled: U,
|
|
1134
|
+
disableInstallation: r,
|
|
1135
|
+
hasWriteAccess: l,
|
|
946
1136
|
isInstalling: w.isInstalling,
|
|
947
1137
|
isUninstalling: w.isUninstalling,
|
|
948
1138
|
isTogglingEnabled: w.isEnabling || w.isDisabling,
|
|
949
|
-
hasUpdate:
|
|
1139
|
+
hasUpdate: D.hasUpdate,
|
|
950
1140
|
isUpgrading: w.isUpgrading,
|
|
951
|
-
toggleButtonLabel: (
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1141
|
+
toggleButtonLabel: (Bt = s.installedState) != null && Bt.enabled ? "Disable" : "Enable",
|
|
1142
|
+
onShare: _ ? () => _(St) : void 0,
|
|
1143
|
+
showBackToSetup: U && wt,
|
|
1144
|
+
onBackToSetup: () => W(!1),
|
|
1145
|
+
notifications: j == null ? void 0 : j(St),
|
|
1146
|
+
selectedDetailPanel: lt && M ? M({
|
|
1147
|
+
definition: s.definition,
|
|
1148
|
+
selectedCard: lt,
|
|
1149
|
+
onClose: () => z(null)
|
|
956
1150
|
}) : void 0,
|
|
957
|
-
onDismissSelectedDetailPanel: () =>
|
|
958
|
-
children: /* @__PURE__ */
|
|
959
|
-
|
|
1151
|
+
onDismissSelectedDetailPanel: () => z(null),
|
|
1152
|
+
children: wt ? /* @__PURE__ */ $("div", { className: "flex flex-col gap-6 mt-6", children: [
|
|
1153
|
+
/* @__PURE__ */ I(Se, { readme: ie, isLoading: oe }),
|
|
1154
|
+
Mt
|
|
1155
|
+
] }) : /* @__PURE__ */ I(
|
|
1156
|
+
Ae,
|
|
960
1157
|
{
|
|
961
|
-
integrationTitle:
|
|
962
|
-
isFullyConfigured:
|
|
963
|
-
hasConnectionStep:
|
|
964
|
-
hasConfigurationStep:
|
|
965
|
-
configuredTab:
|
|
966
|
-
onConfiguredTabChange:
|
|
967
|
-
setupTab:
|
|
968
|
-
onSetupTabChange:
|
|
1158
|
+
integrationTitle: s.definition.title ?? s.definition.name,
|
|
1159
|
+
isFullyConfigured: U,
|
|
1160
|
+
hasConnectionStep: q,
|
|
1161
|
+
hasConfigurationStep: re,
|
|
1162
|
+
configuredTab: mt,
|
|
1163
|
+
onConfiguredTabChange: dt,
|
|
1164
|
+
setupTab: te,
|
|
1165
|
+
onSetupTabChange: ut,
|
|
969
1166
|
onCancelSetup: () => {
|
|
970
|
-
|
|
1167
|
+
H(null), E(null), z(null), W(!1);
|
|
971
1168
|
},
|
|
972
|
-
metadata:
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
githubUrl: r.definition.url,
|
|
977
|
-
aboutLabel: "About Integration"
|
|
978
|
-
}
|
|
979
|
-
),
|
|
980
|
-
connectionsContent: Rt,
|
|
981
|
-
configurationContent: $t,
|
|
982
|
-
capabilitiesContent: /* @__PURE__ */ v(
|
|
983
|
-
an,
|
|
984
|
-
{
|
|
985
|
-
actionCards: r.capabilities.actionCards,
|
|
986
|
-
eventCards: r.capabilities.eventCards,
|
|
987
|
-
channelCards: r.capabilities.channelCards,
|
|
988
|
-
selectedCard: Y,
|
|
989
|
-
onCardSelect: (T) => {
|
|
990
|
-
q(
|
|
991
|
-
_n(
|
|
992
|
-
T ? {
|
|
993
|
-
key: T.key,
|
|
994
|
-
type: T.type
|
|
995
|
-
} : null
|
|
996
|
-
)
|
|
997
|
-
);
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
)
|
|
1169
|
+
metadata: de,
|
|
1170
|
+
connectionsContent: ce,
|
|
1171
|
+
configurationContent: le,
|
|
1172
|
+
capabilitiesContent: Mt
|
|
1001
1173
|
}
|
|
1002
1174
|
)
|
|
1003
1175
|
}
|
|
1004
1176
|
);
|
|
1005
1177
|
};
|
|
1006
|
-
return /* @__PURE__ */
|
|
1007
|
-
!
|
|
1008
|
-
/* @__PURE__ */
|
|
1178
|
+
return /* @__PURE__ */ $("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
1179
|
+
!K && /* @__PURE__ */ I("div", { className: "flex justify-end px-6 pt-4", children: /* @__PURE__ */ $("div", { className: "flex rounded-lg bg-[var(--gray-a3)] p-1", children: [
|
|
1180
|
+
/* @__PURE__ */ I(
|
|
1009
1181
|
"button",
|
|
1010
1182
|
{
|
|
1011
1183
|
type: "button",
|
|
1012
|
-
onClick: () =>
|
|
1013
|
-
className:
|
|
1184
|
+
onClick: () => Y("hub"),
|
|
1185
|
+
className: bt(
|
|
1014
1186
|
"cursor-pointer rounded-md px-3 py-1.5 text-sm text-[var(--gray-11)] transition-colors",
|
|
1015
|
-
|
|
1187
|
+
X === "hub" && "bg-[var(--gray-1)] text-[var(--gray-12)] shadow-sm"
|
|
1016
1188
|
),
|
|
1017
1189
|
children: "Integration Hub"
|
|
1018
1190
|
}
|
|
1019
1191
|
),
|
|
1020
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ I(
|
|
1021
1193
|
"button",
|
|
1022
1194
|
{
|
|
1023
1195
|
type: "button",
|
|
1024
|
-
onClick: () =>
|
|
1025
|
-
className:
|
|
1196
|
+
onClick: () => Y("installed"),
|
|
1197
|
+
className: bt(
|
|
1026
1198
|
"cursor-pointer rounded-md px-3 py-1.5 text-sm text-[var(--gray-11)] transition-colors",
|
|
1027
|
-
|
|
1199
|
+
X === "installed" && "bg-[var(--gray-1)] text-[var(--gray-12)] shadow-sm"
|
|
1028
1200
|
),
|
|
1029
1201
|
children: "Installed Integrations"
|
|
1030
1202
|
}
|
|
1031
1203
|
)
|
|
1032
1204
|
] }) }),
|
|
1033
|
-
/* @__PURE__ */
|
|
1034
|
-
|
|
1205
|
+
/* @__PURE__ */ I(
|
|
1206
|
+
ge,
|
|
1035
1207
|
{
|
|
1036
|
-
view:
|
|
1037
|
-
searchInput:
|
|
1038
|
-
searchTerm:
|
|
1039
|
-
onSearchInputChange:
|
|
1040
|
-
|
|
1041
|
-
|
|
1208
|
+
view: X,
|
|
1209
|
+
searchInput: m,
|
|
1210
|
+
searchTerm: m,
|
|
1211
|
+
onSearchInputChange: Wt,
|
|
1212
|
+
selectedCategory: Zt,
|
|
1213
|
+
onSelectedCategoryChange: Xt,
|
|
1214
|
+
selectedIntegrationId: K,
|
|
1215
|
+
hubIntegrations: ee,
|
|
1042
1216
|
sidebarIntegrations: w.integrations,
|
|
1043
1217
|
installedIntegrations: w.installedIntegrations,
|
|
1044
1218
|
isHubLoading: w.isLoading,
|
|
1045
1219
|
isInstalledLoading: w.isLoading,
|
|
1046
|
-
filterMenu: /* @__PURE__ */
|
|
1047
|
-
|
|
1220
|
+
filterMenu: /* @__PURE__ */ I(
|
|
1221
|
+
pe,
|
|
1048
1222
|
{
|
|
1049
|
-
visibility:
|
|
1050
|
-
verification:
|
|
1051
|
-
sortMethod:
|
|
1052
|
-
labels:
|
|
1053
|
-
onVisibilityChange:
|
|
1054
|
-
onVerificationChange:
|
|
1055
|
-
onSortMethodChange:
|
|
1223
|
+
visibility: st,
|
|
1224
|
+
verification: rt,
|
|
1225
|
+
sortMethod: ct,
|
|
1226
|
+
labels: C,
|
|
1227
|
+
onVisibilityChange: $t,
|
|
1228
|
+
onVerificationChange: Gt,
|
|
1229
|
+
onSortMethodChange: Jt
|
|
1056
1230
|
}
|
|
1057
1231
|
),
|
|
1058
1232
|
categories: o,
|
|
1059
1233
|
bannerSlides: a,
|
|
1060
|
-
bannerIconUrl:
|
|
1234
|
+
bannerIconUrl: d,
|
|
1061
1235
|
noResultsDocumentationLink: c,
|
|
1062
|
-
renderIntegrationCard: (
|
|
1063
|
-
|
|
1236
|
+
renderIntegrationCard: (b, { onEscape: U }) => /* @__PURE__ */ I(
|
|
1237
|
+
he,
|
|
1064
1238
|
{
|
|
1065
|
-
name:
|
|
1066
|
-
description:
|
|
1067
|
-
author:
|
|
1068
|
-
installed:
|
|
1069
|
-
updateAvailable:
|
|
1070
|
-
verified:
|
|
1071
|
-
official:
|
|
1072
|
-
private:
|
|
1073
|
-
iconUrl:
|
|
1239
|
+
name: b.title ?? b.name,
|
|
1240
|
+
description: b.description,
|
|
1241
|
+
author: b.author,
|
|
1242
|
+
installed: b.installed,
|
|
1243
|
+
updateAvailable: b.hasUpdate,
|
|
1244
|
+
verified: b.isVerified,
|
|
1245
|
+
official: b.isOfficial,
|
|
1246
|
+
private: b.isPrivate,
|
|
1247
|
+
iconUrl: b.iconUrl,
|
|
1074
1248
|
onClick: () => {
|
|
1075
|
-
|
|
1249
|
+
H(b.id), E(b.installedId ?? b.id), dt("connections"), ut("connections"), W(!1), z(null);
|
|
1076
1250
|
},
|
|
1077
|
-
onEscape:
|
|
1251
|
+
onEscape: U
|
|
1078
1252
|
}
|
|
1079
1253
|
),
|
|
1080
|
-
renderInstalledIntegrations: ({ integrations:
|
|
1081
|
-
|
|
1254
|
+
renderInstalledIntegrations: ({ integrations: b, searchTerm: U, categoryOrder: R }) => /* @__PURE__ */ I(
|
|
1255
|
+
be,
|
|
1082
1256
|
{
|
|
1083
|
-
integrations:
|
|
1084
|
-
searchTerm:
|
|
1085
|
-
categoryOrder:
|
|
1086
|
-
onSelectIntegration: (
|
|
1087
|
-
|
|
1257
|
+
integrations: b,
|
|
1258
|
+
searchTerm: U,
|
|
1259
|
+
categoryOrder: R.length > 0 ? R : ne,
|
|
1260
|
+
onSelectIntegration: (q) => {
|
|
1261
|
+
H(q.id), E(q.installedId ?? q.id), dt("connections"), ut("connections"), W(!1), z(null);
|
|
1088
1262
|
}
|
|
1089
1263
|
}
|
|
1090
1264
|
),
|
|
1091
|
-
renderIntegrationDetails:
|
|
1265
|
+
renderIntegrationDetails: ae
|
|
1092
1266
|
}
|
|
1093
1267
|
)
|
|
1094
1268
|
] });
|
|
1095
|
-
},
|
|
1269
|
+
}, Mn = dn;
|
|
1096
1270
|
export {
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1271
|
+
Mn as BotpressIntegrationHub,
|
|
1272
|
+
dn as BotpressIntegrationHubScreen,
|
|
1273
|
+
Le as IntegrationOAuthButton,
|
|
1274
|
+
Se as IntegrationReadmeContent,
|
|
1275
|
+
ke as IntegrationStaticZuiConfigurationForm,
|
|
1276
|
+
wn as dedupeById,
|
|
1277
|
+
Ue as fetchOAuthAuthorizationUrl,
|
|
1278
|
+
He as filterAndSortIntegrations,
|
|
1279
|
+
yt as findInstalledIntegration,
|
|
1280
|
+
ot as getInstalledIntegrations,
|
|
1281
|
+
Ke as getSelectedConnectionMethod,
|
|
1282
|
+
Be as getWebhookIdFromUrl,
|
|
1283
|
+
_t as isOfficialWorkspace,
|
|
1284
|
+
xe as openOAuthPopup,
|
|
1285
|
+
Kt as resolveCategory,
|
|
1286
|
+
je as toCapabilityCards,
|
|
1287
|
+
_e as toConnectionMethods,
|
|
1288
|
+
Ct as toError,
|
|
1289
|
+
Ve as toHubItem,
|
|
1290
|
+
Fe as toInstalledItem,
|
|
1291
|
+
zt as useBotpressIntegrationDetails,
|
|
1292
|
+
Qt as useBotpressIntegrationHub,
|
|
1293
|
+
Sn as useIntegrationDetails,
|
|
1294
|
+
An as useIntegrationHub,
|
|
1295
|
+
fe as useIntegrationReadme,
|
|
1296
|
+
on as usePersistedNavigationState
|
|
1120
1297
|
};
|