@burdenoff/microfe-integrations 2026.1102.2 → 2026.1107.2
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/generated/global-types.d.ts +406 -203
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-operations.d.ts +412 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +230 -100
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +9819 -363
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +11 -3
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/integrations/components/ConnectorSubmissionCard.d.ts.map +1 -1
- package/dist/integrations/components/ConnectorSubmissionCard.js +137 -83
- package/dist/integrations/components/ConnectorSubmissionCard.js.map +1 -1
- package/dist/integrations/components/MailMessageBody.d.ts +7 -0
- package/dist/integrations/components/MailMessageBody.d.ts.map +1 -0
- package/dist/integrations/components/MailMessageBody.js +175 -0
- package/dist/integrations/components/MailMessageBody.js.map +1 -0
- package/dist/integrations/hooks/useConnectorSubmissions.d.ts +9 -1
- package/dist/integrations/hooks/useConnectorSubmissions.d.ts.map +1 -1
- package/dist/integrations/hooks/useConnectorSubmissions.js +35 -25
- package/dist/integrations/hooks/useConnectorSubmissions.js.map +1 -1
- package/dist/integrations/hooks/useMailbox.d.ts +65 -4
- package/dist/integrations/hooks/useMailbox.d.ts.map +1 -1
- package/dist/integrations/hooks/useMailbox.js +108 -29
- package/dist/integrations/hooks/useMailbox.js.map +1 -1
- package/dist/integrations/pages/ConnectorSubmissionsPage.d.ts.map +1 -1
- package/dist/integrations/pages/ConnectorSubmissionsPage.js +606 -319
- package/dist/integrations/pages/ConnectorSubmissionsPage.js.map +1 -1
- package/dist/integrations/pages/MailboxInbox.d.ts.map +1 -1
- package/dist/integrations/pages/MailboxInbox.js +418 -251
- package/dist/integrations/pages/MailboxInbox.js.map +1 -1
- package/dist/integrations/store/mailboxStore.d.ts +3 -0
- package/dist/integrations/store/mailboxStore.d.ts.map +1 -1
- package/dist/integrations/store/mailboxStore.js +7 -0
- package/dist/integrations/store/mailboxStore.js.map +1 -1
- package/dist/integrations/utils/mailHtml.d.ts +33 -0
- package/dist/integrations/utils/mailHtml.d.ts.map +1 -0
- package/dist/integrations/utils/mailHtml.js +127 -0
- package/dist/integrations/utils/mailHtml.js.map +1 -0
- package/dist/node_modules/dompurify/dist/purify.es.js +894 -0
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -0
- package/package.json +5 -2
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
|
|
2
2
|
import { useTr as t } from "../hooks/useTr.js";
|
|
3
3
|
import { joinPath as n } from "../utils/navigation.js";
|
|
4
|
-
import { AuthType as r, ConnectorApiKeyPlacement as i,
|
|
5
|
-
import { ConfirmDialog as
|
|
6
|
-
import { useMyConnectorSubmissions as
|
|
7
|
-
import { ConnectorSubmissionCard as
|
|
8
|
-
import { ConnectorSubmissionPager as
|
|
9
|
-
import { useId as
|
|
10
|
-
import { ArrowLeft as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { Button as
|
|
4
|
+
import { AuthType as r, ConnectorApiKeyPlacement as i, ConnectorOAuthScopeSeparator as a, ConnectorOAuthTokenAuthMethod as o, ConnectorSubmissionStatus as s, ProviderCategory as c } from "../../generated/wspace-types.js";
|
|
5
|
+
import { ConfirmDialog as l } from "../components/ConfirmDialog.js";
|
|
6
|
+
import { useMyConnectorSubmissions as u, useSubmitConnector as d, useUpdateConnectorSubmissionOAuthClient as f, useWithdrawConnectorSubmission as p } from "../hooks/useConnectorSubmissions.js";
|
|
7
|
+
import { ConnectorSubmissionCard as m } from "../components/ConnectorSubmissionCard.js";
|
|
8
|
+
import { ConnectorSubmissionPager as h } from "../components/ConnectorSubmissionPager.js";
|
|
9
|
+
import { useId as g, useState as _ } from "react";
|
|
10
|
+
import { ArrowLeft as v, KeyRound as y, Loader2 as b, Plus as x, Send as S, Upload as C, X as w } from "lucide-react";
|
|
11
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
12
|
+
import { Button as O, EmphasisPanel as k, IllustratedEmptyState as A, PagePurpose as j } from "@burdenoff/fe-libs/ui";
|
|
13
13
|
//#region src/integrations/pages/ConnectorSubmissionsPage.tsx
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
],
|
|
14
|
+
var M = [
|
|
15
|
+
c.Productivity,
|
|
16
|
+
c.Communication,
|
|
17
|
+
c.Crm,
|
|
18
|
+
c.Email,
|
|
19
|
+
c.Calendar,
|
|
20
|
+
c.CloudStorage,
|
|
21
|
+
c.Development,
|
|
22
|
+
c.Social,
|
|
23
|
+
c.Payment,
|
|
24
|
+
c.Analytics,
|
|
25
|
+
c.Accounting,
|
|
26
|
+
c.Custom
|
|
27
|
+
], N = [
|
|
28
28
|
[
|
|
29
29
|
r.ApiKey,
|
|
30
30
|
"integrations.connectorSubmissions.auth.apiKey",
|
|
@@ -39,16 +39,31 @@ var D = [
|
|
|
39
39
|
r.BasicAuth,
|
|
40
40
|
"integrations.connectorSubmissions.auth.basic",
|
|
41
41
|
"Basic auth"
|
|
42
|
+
],
|
|
43
|
+
[
|
|
44
|
+
r.Oauth2,
|
|
45
|
+
"integrations.connectorSubmissions.auth.oauth2",
|
|
46
|
+
"OAuth 2.0"
|
|
42
47
|
]
|
|
43
|
-
],
|
|
48
|
+
], P = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2.5 text-sm text-text-primary", F = `${P} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`, I = {
|
|
44
49
|
key: "",
|
|
45
50
|
name: "",
|
|
46
51
|
description: "",
|
|
47
|
-
category:
|
|
52
|
+
category: c.Productivity,
|
|
48
53
|
authType: r.ApiKey,
|
|
49
54
|
apiKeyPlacement: i.Header,
|
|
50
55
|
apiKeyName: "",
|
|
51
56
|
apiKeyPrefix: "",
|
|
57
|
+
oauthAuthorizeUrl: "",
|
|
58
|
+
oauthTokenUrl: "",
|
|
59
|
+
oauthRevokeUrl: "",
|
|
60
|
+
oauthUserInfoUrl: "",
|
|
61
|
+
oauthScopes: "",
|
|
62
|
+
oauthScopeSeparator: a.Space,
|
|
63
|
+
oauthPkce: !0,
|
|
64
|
+
oauthTokenAuthMethod: o.ClientSecretPost,
|
|
65
|
+
oauthClientId: "",
|
|
66
|
+
oauthClientSecret: "",
|
|
52
67
|
website: "",
|
|
53
68
|
docsUrl: "",
|
|
54
69
|
baseUrl: "",
|
|
@@ -65,12 +80,15 @@ var D = [
|
|
|
65
80
|
submitterNotes: "",
|
|
66
81
|
acceptedPolicy: !1
|
|
67
82
|
};
|
|
68
|
-
function
|
|
83
|
+
function L(e) {
|
|
69
84
|
let t = e.trim();
|
|
70
85
|
return t.length > 0 ? t : null;
|
|
71
86
|
}
|
|
72
|
-
function
|
|
73
|
-
|
|
87
|
+
function R(e) {
|
|
88
|
+
return e.split(/[\s,]+/).map((e) => e.trim()).filter(Boolean);
|
|
89
|
+
}
|
|
90
|
+
function z(e) {
|
|
91
|
+
let t = e.authType === r.ApiKey, n = e.authType === r.Oauth2;
|
|
74
92
|
return {
|
|
75
93
|
key: e.key.trim().toLowerCase(),
|
|
76
94
|
name: e.name.trim(),
|
|
@@ -78,267 +96,518 @@ function N(e) {
|
|
|
78
96
|
category: e.category,
|
|
79
97
|
authType: e.authType,
|
|
80
98
|
apiKeyPlacement: t ? e.apiKeyPlacement : null,
|
|
81
|
-
apiKeyName: t ?
|
|
82
|
-
apiKeyPrefix: t && e.apiKeyPlacement === i.Header ?
|
|
99
|
+
apiKeyName: t ? L(e.apiKeyName) : null,
|
|
100
|
+
apiKeyPrefix: t && e.apiKeyPlacement === i.Header ? L(e.apiKeyPrefix) : null,
|
|
101
|
+
oauth: n ? {
|
|
102
|
+
authorizeUrl: e.oauthAuthorizeUrl.trim(),
|
|
103
|
+
tokenUrl: e.oauthTokenUrl.trim(),
|
|
104
|
+
revokeUrl: L(e.oauthRevokeUrl),
|
|
105
|
+
userInfoUrl: L(e.oauthUserInfoUrl),
|
|
106
|
+
scopes: R(e.oauthScopes),
|
|
107
|
+
scopeSeparator: e.oauthScopeSeparator,
|
|
108
|
+
pkce: e.oauthPkce,
|
|
109
|
+
tokenAuthMethod: e.oauthTokenAuthMethod,
|
|
110
|
+
clientId: e.oauthClientId.trim(),
|
|
111
|
+
clientSecret: e.oauthClientSecret
|
|
112
|
+
} : null,
|
|
83
113
|
website: e.website.trim(),
|
|
84
114
|
docsUrl: e.docsUrl.trim(),
|
|
85
115
|
baseUrl: e.baseUrl.trim(),
|
|
86
|
-
apiVersion:
|
|
87
|
-
icon:
|
|
88
|
-
color:
|
|
116
|
+
apiVersion: L(e.apiVersion),
|
|
117
|
+
icon: L(e.icon),
|
|
118
|
+
color: L(e.color),
|
|
89
119
|
supportedFeatures: e.supportedFeatures.split(",").map((e) => e.trim()).filter(Boolean),
|
|
90
120
|
publisherName: e.publisherName.trim(),
|
|
91
121
|
supportEmail: e.supportEmail.trim(),
|
|
92
122
|
privacyPolicyUrl: e.privacyPolicyUrl.trim(),
|
|
93
|
-
termsUrl:
|
|
94
|
-
repositoryUrl:
|
|
95
|
-
version:
|
|
96
|
-
submitterNotes:
|
|
123
|
+
termsUrl: L(e.termsUrl),
|
|
124
|
+
repositoryUrl: L(e.repositoryUrl),
|
|
125
|
+
version: L(e.version),
|
|
126
|
+
submitterNotes: L(e.submitterNotes)
|
|
97
127
|
};
|
|
98
128
|
}
|
|
99
|
-
function
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
129
|
+
function B({ id: e, label: t, hint: n, required: r = !1, children: i }) {
|
|
130
|
+
return /* @__PURE__ */ D("div", { children: [
|
|
131
|
+
/* @__PURE__ */ D("label", {
|
|
102
132
|
htmlFor: e,
|
|
103
133
|
className: "block text-sm font-medium mb-1.5 text-text-primary",
|
|
104
|
-
children: [t, r && /* @__PURE__ */
|
|
134
|
+
children: [t, r && /* @__PURE__ */ D("span", {
|
|
105
135
|
"aria-hidden": "true",
|
|
106
136
|
className: "text-status-error-text",
|
|
107
137
|
children: [" ", "*"]
|
|
108
138
|
})]
|
|
109
139
|
}),
|
|
110
140
|
i,
|
|
111
|
-
n && /* @__PURE__ */
|
|
141
|
+
n && /* @__PURE__ */ E("p", {
|
|
112
142
|
className: "mt-1 text-xs text-text-secondary",
|
|
113
143
|
children: n
|
|
114
144
|
})
|
|
115
145
|
] });
|
|
116
146
|
}
|
|
117
|
-
function
|
|
118
|
-
let
|
|
147
|
+
function V() {
|
|
148
|
+
let { apiGatewayUrl: t } = e();
|
|
149
|
+
return t ? `${t}/integrations/oauth/callback` : `${typeof window < "u" ? window.location.origin : ""}/integrations/oauth/callback`;
|
|
150
|
+
}
|
|
151
|
+
function H({ form: e, set: n, text: r, id: a }) {
|
|
152
|
+
let o = t();
|
|
153
|
+
return /* @__PURE__ */ D("div", {
|
|
154
|
+
className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ E(B, {
|
|
157
|
+
id: a("apiKeyPlacement"),
|
|
158
|
+
label: o("integrations.connectorSubmissions.fields.apiKeyPlacement", "Sent in"),
|
|
159
|
+
required: !0,
|
|
160
|
+
children: /* @__PURE__ */ D("select", {
|
|
161
|
+
id: a("apiKeyPlacement"),
|
|
162
|
+
value: e.apiKeyPlacement,
|
|
163
|
+
onChange: (e) => n("apiKeyPlacement", e.target.value),
|
|
164
|
+
className: F,
|
|
165
|
+
children: [/* @__PURE__ */ E("option", {
|
|
166
|
+
value: i.Header,
|
|
167
|
+
children: o("integrations.connectorSubmissions.placement.header", "Header")
|
|
168
|
+
}), /* @__PURE__ */ E("option", {
|
|
169
|
+
value: i.Query,
|
|
170
|
+
children: o("integrations.connectorSubmissions.placement.query", "Query parameter")
|
|
171
|
+
})]
|
|
172
|
+
})
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ E(B, {
|
|
175
|
+
id: a("apiKeyName"),
|
|
176
|
+
label: o("integrations.connectorSubmissions.fields.apiKeyName", "Name"),
|
|
177
|
+
required: !0,
|
|
178
|
+
children: /* @__PURE__ */ E("input", {
|
|
179
|
+
...r("apiKeyName"),
|
|
180
|
+
required: !0,
|
|
181
|
+
maxLength: 64,
|
|
182
|
+
placeholder: e.apiKeyPlacement === i.Header ? "X-Api-Key" : "api_key"
|
|
183
|
+
})
|
|
184
|
+
}),
|
|
185
|
+
e.apiKeyPlacement === i.Header && /* @__PURE__ */ E(B, {
|
|
186
|
+
id: a("apiKeyPrefix"),
|
|
187
|
+
label: o("integrations.connectorSubmissions.fields.apiKeyPrefix", "Prefix"),
|
|
188
|
+
children: /* @__PURE__ */ E("input", {
|
|
189
|
+
...r("apiKeyPrefix"),
|
|
190
|
+
maxLength: 32,
|
|
191
|
+
placeholder: "Token"
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
]
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
function U({ form: e, set: n, text: r, id: i }) {
|
|
198
|
+
let s = t(), c = V();
|
|
199
|
+
return /* @__PURE__ */ D("div", {
|
|
200
|
+
className: "space-y-4 rounded-lg border border-border-subtle p-4",
|
|
201
|
+
"data-testid": "oauth-settings",
|
|
202
|
+
children: [
|
|
203
|
+
/* @__PURE__ */ D("div", {
|
|
204
|
+
className: "rounded-lg bg-bg-sunken px-3 py-2 text-xs text-text-secondary",
|
|
205
|
+
children: [/* @__PURE__ */ E("p", { children: s("integrations.connectorSubmissions.oauth.redirectHint", "Register this redirect URI with your OAuth app. Alpha and production are separate catalogs: submit in each with the client registered for it.") }), /* @__PURE__ */ E("p", {
|
|
206
|
+
className: "mt-1 font-mono text-text-primary break-all",
|
|
207
|
+
"data-testid": "oauth-redirect-uri",
|
|
208
|
+
children: c
|
|
209
|
+
})]
|
|
210
|
+
}),
|
|
211
|
+
/* @__PURE__ */ D("div", {
|
|
212
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ E(B, {
|
|
215
|
+
id: i("oauthAuthorizeUrl"),
|
|
216
|
+
label: s("integrations.connectorSubmissions.fields.oauthAuthorizeUrl", "Authorization URL"),
|
|
217
|
+
required: !0,
|
|
218
|
+
children: /* @__PURE__ */ E("input", {
|
|
219
|
+
...r("oauthAuthorizeUrl"),
|
|
220
|
+
required: !0,
|
|
221
|
+
type: "url",
|
|
222
|
+
placeholder: "https://auth.example.com/oauth/authorize"
|
|
223
|
+
})
|
|
224
|
+
}),
|
|
225
|
+
/* @__PURE__ */ E(B, {
|
|
226
|
+
id: i("oauthTokenUrl"),
|
|
227
|
+
label: s("integrations.connectorSubmissions.fields.oauthTokenUrl", "Token URL"),
|
|
228
|
+
required: !0,
|
|
229
|
+
children: /* @__PURE__ */ E("input", {
|
|
230
|
+
...r("oauthTokenUrl"),
|
|
231
|
+
required: !0,
|
|
232
|
+
type: "url",
|
|
233
|
+
placeholder: "https://auth.example.com/oauth/token"
|
|
234
|
+
})
|
|
235
|
+
}),
|
|
236
|
+
/* @__PURE__ */ E(B, {
|
|
237
|
+
id: i("oauthRevokeUrl"),
|
|
238
|
+
label: s("integrations.connectorSubmissions.fields.oauthRevokeUrl", "Revocation URL"),
|
|
239
|
+
children: /* @__PURE__ */ E("input", {
|
|
240
|
+
...r("oauthRevokeUrl"),
|
|
241
|
+
type: "url"
|
|
242
|
+
})
|
|
243
|
+
}),
|
|
244
|
+
/* @__PURE__ */ E(B, {
|
|
245
|
+
id: i("oauthUserInfoUrl"),
|
|
246
|
+
label: s("integrations.connectorSubmissions.fields.oauthUserInfoUrl", "User info URL"),
|
|
247
|
+
children: /* @__PURE__ */ E("input", {
|
|
248
|
+
...r("oauthUserInfoUrl"),
|
|
249
|
+
type: "url"
|
|
250
|
+
})
|
|
251
|
+
})
|
|
252
|
+
]
|
|
253
|
+
}),
|
|
254
|
+
/* @__PURE__ */ E(B, {
|
|
255
|
+
id: i("oauthScopes"),
|
|
256
|
+
label: s("integrations.connectorSubmissions.fields.oauthScopes", "Scopes"),
|
|
257
|
+
hint: s("integrations.connectorSubmissions.fields.oauthScopesHint", "Separated by spaces or commas, e.g. contacts.read deals.write"),
|
|
258
|
+
children: /* @__PURE__ */ E("input", { ...r("oauthScopes") })
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ D("div", {
|
|
261
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
262
|
+
children: [/* @__PURE__ */ E(B, {
|
|
263
|
+
id: i("oauthScopeSeparator"),
|
|
264
|
+
label: s("integrations.connectorSubmissions.fields.oauthScopeSeparator", "Scope separator"),
|
|
265
|
+
children: /* @__PURE__ */ D("select", {
|
|
266
|
+
id: i("oauthScopeSeparator"),
|
|
267
|
+
value: e.oauthScopeSeparator,
|
|
268
|
+
onChange: (e) => n("oauthScopeSeparator", e.target.value),
|
|
269
|
+
className: F,
|
|
270
|
+
children: [/* @__PURE__ */ E("option", {
|
|
271
|
+
value: a.Space,
|
|
272
|
+
children: s("integrations.connectorSubmissions.oauth.separatorSpace", "Space")
|
|
273
|
+
}), /* @__PURE__ */ E("option", {
|
|
274
|
+
value: a.Comma,
|
|
275
|
+
children: s("integrations.connectorSubmissions.oauth.separatorComma", "Comma")
|
|
276
|
+
})]
|
|
277
|
+
})
|
|
278
|
+
}), /* @__PURE__ */ E(B, {
|
|
279
|
+
id: i("oauthTokenAuthMethod"),
|
|
280
|
+
label: s("integrations.connectorSubmissions.fields.oauthTokenAuthMethod", "Token endpoint authentication"),
|
|
281
|
+
children: /* @__PURE__ */ D("select", {
|
|
282
|
+
id: i("oauthTokenAuthMethod"),
|
|
283
|
+
value: e.oauthTokenAuthMethod,
|
|
284
|
+
onChange: (e) => n("oauthTokenAuthMethod", e.target.value),
|
|
285
|
+
className: F,
|
|
286
|
+
children: [/* @__PURE__ */ E("option", {
|
|
287
|
+
value: o.ClientSecretPost,
|
|
288
|
+
children: s("integrations.connectorSubmissions.oauth.clientSecretPost", "Client secret in the request body")
|
|
289
|
+
}), /* @__PURE__ */ E("option", {
|
|
290
|
+
value: o.ClientSecretBasic,
|
|
291
|
+
children: s("integrations.connectorSubmissions.oauth.clientSecretBasic", "HTTP Basic authentication")
|
|
292
|
+
})]
|
|
293
|
+
})
|
|
294
|
+
})]
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ D("label", {
|
|
297
|
+
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
298
|
+
children: [/* @__PURE__ */ E("input", {
|
|
299
|
+
type: "checkbox",
|
|
300
|
+
checked: e.oauthPkce,
|
|
301
|
+
onChange: (e) => n("oauthPkce", e.target.checked)
|
|
302
|
+
}), s("integrations.connectorSubmissions.fields.oauthPkce", "Use PKCE (recommended)")]
|
|
303
|
+
}),
|
|
304
|
+
/* @__PURE__ */ D("div", {
|
|
305
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
306
|
+
children: [/* @__PURE__ */ E(B, {
|
|
307
|
+
id: i("oauthClientId"),
|
|
308
|
+
label: s("integrations.connectorSubmissions.fields.oauthClientId", "OAuth client id"),
|
|
309
|
+
required: !0,
|
|
310
|
+
children: /* @__PURE__ */ E("input", {
|
|
311
|
+
...r("oauthClientId"),
|
|
312
|
+
required: !0,
|
|
313
|
+
maxLength: 256,
|
|
314
|
+
autoComplete: "off"
|
|
315
|
+
})
|
|
316
|
+
}), /* @__PURE__ */ E(B, {
|
|
317
|
+
id: i("oauthClientSecret"),
|
|
318
|
+
label: s("integrations.connectorSubmissions.fields.oauthClientSecret", "Client secret"),
|
|
319
|
+
hint: s("integrations.connectorSubmissions.oauth.secretHint", "Write-only: stored encrypted and never shown again."),
|
|
320
|
+
required: !0,
|
|
321
|
+
children: /* @__PURE__ */ E("input", {
|
|
322
|
+
...r("oauthClientSecret"),
|
|
323
|
+
required: !0,
|
|
324
|
+
type: "password",
|
|
325
|
+
maxLength: 1024,
|
|
326
|
+
autoComplete: "new-password"
|
|
327
|
+
})
|
|
328
|
+
})]
|
|
329
|
+
})
|
|
330
|
+
]
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
function W({ form: e, set: n, text: r, id: i }) {
|
|
334
|
+
let a = t();
|
|
335
|
+
return /* @__PURE__ */ D(k, {
|
|
336
|
+
className: "p-5 space-y-4 lg:col-span-2",
|
|
337
|
+
children: [
|
|
338
|
+
/* @__PURE__ */ E("h2", {
|
|
339
|
+
className: "font-semibold text-text-primary",
|
|
340
|
+
children: a("integrations.connectorSubmissions.form.publisher", "Publisher")
|
|
341
|
+
}),
|
|
342
|
+
/* @__PURE__ */ D("div", {
|
|
343
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
344
|
+
children: [
|
|
345
|
+
/* @__PURE__ */ E(B, {
|
|
346
|
+
id: i("publisherName"),
|
|
347
|
+
label: a("integrations.connectorSubmissions.fields.publisherName", "Publisher name"),
|
|
348
|
+
required: !0,
|
|
349
|
+
children: /* @__PURE__ */ E("input", {
|
|
350
|
+
...r("publisherName"),
|
|
351
|
+
required: !0,
|
|
352
|
+
maxLength: 100
|
|
353
|
+
})
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ E(B, {
|
|
356
|
+
id: i("supportEmail"),
|
|
357
|
+
label: a("integrations.connectorSubmissions.fields.supportEmail", "Support email"),
|
|
358
|
+
required: !0,
|
|
359
|
+
children: /* @__PURE__ */ E("input", {
|
|
360
|
+
...r("supportEmail"),
|
|
361
|
+
required: !0,
|
|
362
|
+
type: "email"
|
|
363
|
+
})
|
|
364
|
+
}),
|
|
365
|
+
/* @__PURE__ */ E(B, {
|
|
366
|
+
id: i("privacyPolicyUrl"),
|
|
367
|
+
label: a("integrations.connectorSubmissions.fields.privacyPolicyUrl", "Privacy policy URL"),
|
|
368
|
+
required: !0,
|
|
369
|
+
children: /* @__PURE__ */ E("input", {
|
|
370
|
+
...r("privacyPolicyUrl"),
|
|
371
|
+
required: !0,
|
|
372
|
+
type: "url"
|
|
373
|
+
})
|
|
374
|
+
}),
|
|
375
|
+
/* @__PURE__ */ E(B, {
|
|
376
|
+
id: i("termsUrl"),
|
|
377
|
+
label: a("integrations.connectorSubmissions.fields.termsUrl", "Terms of service URL"),
|
|
378
|
+
children: /* @__PURE__ */ E("input", {
|
|
379
|
+
...r("termsUrl"),
|
|
380
|
+
type: "url"
|
|
381
|
+
})
|
|
382
|
+
}),
|
|
383
|
+
/* @__PURE__ */ E(B, {
|
|
384
|
+
id: i("repositoryUrl"),
|
|
385
|
+
label: a("integrations.connectorSubmissions.fields.repositoryUrl", "Repository URL"),
|
|
386
|
+
children: /* @__PURE__ */ E("input", {
|
|
387
|
+
...r("repositoryUrl"),
|
|
388
|
+
type: "url"
|
|
389
|
+
})
|
|
390
|
+
})
|
|
391
|
+
]
|
|
392
|
+
}),
|
|
393
|
+
/* @__PURE__ */ E(B, {
|
|
394
|
+
id: i("submitterNotes"),
|
|
395
|
+
label: a("integrations.connectorSubmissions.fields.submitterNotes", "Notes for the reviewer"),
|
|
396
|
+
children: /* @__PURE__ */ E("textarea", {
|
|
397
|
+
...r("submitterNotes"),
|
|
398
|
+
rows: 2,
|
|
399
|
+
maxLength: 2e3
|
|
400
|
+
})
|
|
401
|
+
}),
|
|
402
|
+
/* @__PURE__ */ D("label", {
|
|
403
|
+
className: "flex items-start gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
404
|
+
children: [/* @__PURE__ */ E("input", {
|
|
405
|
+
type: "checkbox",
|
|
406
|
+
className: "mt-0.5",
|
|
407
|
+
checked: e.acceptedPolicy,
|
|
408
|
+
onChange: (e) => n("acceptedPolicy", e.target.checked)
|
|
409
|
+
}), /* @__PURE__ */ E("span", {
|
|
410
|
+
className: "text-sm text-text-primary",
|
|
411
|
+
children: a("integrations.connectorSubmissions.form.policy", "I am authorised to publish a connector for this service, the details above are accurate, and I accept the Connector Developer Terms. Users enter their own credentials; they are encrypted by the platform and sent only to the base URL above.")
|
|
412
|
+
})]
|
|
413
|
+
})
|
|
414
|
+
]
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
function G({ onDone: e }) {
|
|
418
|
+
let n = t(), i = g(), a = (e) => `${i}-${e}`, [o, s] = _(I), [c, l] = _(""), { submitConnector: u, loading: f } = d(), p = (e, t) => s((n) => ({
|
|
119
419
|
...n,
|
|
120
420
|
[e]: t
|
|
121
|
-
})),
|
|
122
|
-
id:
|
|
123
|
-
value:
|
|
124
|
-
onChange: (t) =>
|
|
125
|
-
className:
|
|
421
|
+
})), m = (e) => ({
|
|
422
|
+
id: a(e),
|
|
423
|
+
value: o[e],
|
|
424
|
+
onChange: (t) => p(e, t.target.value),
|
|
425
|
+
className: P
|
|
126
426
|
});
|
|
127
|
-
return /* @__PURE__ */
|
|
427
|
+
return /* @__PURE__ */ D("form", {
|
|
128
428
|
onSubmit: async (t) => {
|
|
129
|
-
t.preventDefault(),
|
|
429
|
+
t.preventDefault(), l("");
|
|
130
430
|
try {
|
|
131
|
-
await
|
|
431
|
+
await u(z(o)), s(I), e();
|
|
132
432
|
} catch (e) {
|
|
133
|
-
|
|
433
|
+
l(e instanceof Error ? e.message : n("integrations.connectorSubmissions.errors.submitFailed", "Could not submit the connector"));
|
|
134
434
|
}
|
|
135
435
|
},
|
|
136
436
|
className: "space-y-4",
|
|
137
437
|
"aria-label": n("integrations.connectorSubmissions.form.title", "Submit a connector"),
|
|
138
438
|
children: [
|
|
139
|
-
|
|
439
|
+
c && /* @__PURE__ */ E("div", {
|
|
140
440
|
role: "alert",
|
|
141
441
|
className: "rounded-xl border border-border-seam bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
142
|
-
children:
|
|
442
|
+
children: c
|
|
143
443
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ D("div", {
|
|
145
445
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
146
446
|
children: [
|
|
147
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ D(k, {
|
|
148
448
|
className: "p-5 space-y-4",
|
|
149
449
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ E("h2", {
|
|
151
451
|
className: "font-semibold text-text-primary",
|
|
152
452
|
children: n("integrations.connectorSubmissions.form.connector", "Connector")
|
|
153
453
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
id:
|
|
454
|
+
/* @__PURE__ */ E(B, {
|
|
455
|
+
id: a("name"),
|
|
156
456
|
label: n("integrations.connectorSubmissions.fields.name", "Name"),
|
|
157
457
|
required: !0,
|
|
158
|
-
children: /* @__PURE__ */
|
|
159
|
-
...
|
|
458
|
+
children: /* @__PURE__ */ E("input", {
|
|
459
|
+
...m("name"),
|
|
160
460
|
required: !0,
|
|
161
461
|
maxLength: 80
|
|
162
462
|
})
|
|
163
463
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
id:
|
|
464
|
+
/* @__PURE__ */ E(B, {
|
|
465
|
+
id: a("key"),
|
|
166
466
|
label: n("integrations.connectorSubmissions.fields.key", "Catalog key"),
|
|
167
467
|
hint: n("integrations.connectorSubmissions.fields.keyHint", "Lowercase letters, digits and hyphens, e.g. acme-crm. It cannot be changed later."),
|
|
168
468
|
required: !0,
|
|
169
|
-
children: /* @__PURE__ */
|
|
170
|
-
...
|
|
469
|
+
children: /* @__PURE__ */ E("input", {
|
|
470
|
+
...m("key"),
|
|
171
471
|
required: !0,
|
|
172
472
|
maxLength: 50,
|
|
173
473
|
placeholder: "acme-crm"
|
|
174
474
|
})
|
|
175
475
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
id:
|
|
476
|
+
/* @__PURE__ */ E(B, {
|
|
477
|
+
id: a("description"),
|
|
178
478
|
label: n("integrations.connectorSubmissions.fields.description", "Description"),
|
|
179
479
|
hint: n("integrations.connectorSubmissions.fields.descriptionHint", "What a workspace can do with this connector (10 to 1000 characters)."),
|
|
180
480
|
required: !0,
|
|
181
|
-
children: /* @__PURE__ */
|
|
182
|
-
...
|
|
481
|
+
children: /* @__PURE__ */ E("textarea", {
|
|
482
|
+
...m("description"),
|
|
183
483
|
required: !0,
|
|
184
484
|
rows: 3,
|
|
185
485
|
maxLength: 1e3
|
|
186
486
|
})
|
|
187
487
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ D("div", {
|
|
189
489
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
191
|
-
id:
|
|
490
|
+
children: [/* @__PURE__ */ E(B, {
|
|
491
|
+
id: a("category"),
|
|
192
492
|
label: n("integrations.connectorSubmissions.fields.category", "Category"),
|
|
193
493
|
required: !0,
|
|
194
|
-
children: /* @__PURE__ */
|
|
195
|
-
id:
|
|
196
|
-
value:
|
|
197
|
-
onChange: (e) =>
|
|
198
|
-
className:
|
|
199
|
-
children:
|
|
494
|
+
children: /* @__PURE__ */ E("select", {
|
|
495
|
+
id: a("category"),
|
|
496
|
+
value: o.category,
|
|
497
|
+
onChange: (e) => p("category", e.target.value),
|
|
498
|
+
className: F,
|
|
499
|
+
children: M.map((e) => /* @__PURE__ */ E("option", {
|
|
200
500
|
value: e,
|
|
201
501
|
children: n(`integrations.category.${e}`, e)
|
|
202
502
|
}, e))
|
|
203
503
|
})
|
|
204
|
-
}), /* @__PURE__ */
|
|
205
|
-
id:
|
|
504
|
+
}), /* @__PURE__ */ E(B, {
|
|
505
|
+
id: a("version"),
|
|
206
506
|
label: n("integrations.connectorSubmissions.fields.version", "Version"),
|
|
207
|
-
children: /* @__PURE__ */
|
|
208
|
-
...
|
|
507
|
+
children: /* @__PURE__ */ E("input", {
|
|
508
|
+
...m("version"),
|
|
209
509
|
placeholder: "1.0.0"
|
|
210
510
|
})
|
|
211
511
|
})]
|
|
212
512
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ D("div", {
|
|
214
514
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
216
|
-
id:
|
|
515
|
+
children: [/* @__PURE__ */ E(B, {
|
|
516
|
+
id: a("icon"),
|
|
217
517
|
label: n("integrations.connectorSubmissions.fields.icon", "Icon"),
|
|
218
518
|
hint: n("integrations.connectorSubmissions.fields.iconHint", "An https image URL or iconify:set:name"),
|
|
219
|
-
children: /* @__PURE__ */
|
|
220
|
-
}), /* @__PURE__ */
|
|
221
|
-
id:
|
|
519
|
+
children: /* @__PURE__ */ E("input", { ...m("icon") })
|
|
520
|
+
}), /* @__PURE__ */ E(B, {
|
|
521
|
+
id: a("color"),
|
|
222
522
|
label: n("integrations.connectorSubmissions.fields.color", "Brand color"),
|
|
223
523
|
hint: "#RRGGBB",
|
|
224
|
-
children: /* @__PURE__ */
|
|
225
|
-
...
|
|
524
|
+
children: /* @__PURE__ */ E("input", {
|
|
525
|
+
...m("color"),
|
|
226
526
|
maxLength: 7
|
|
227
527
|
})
|
|
228
528
|
})]
|
|
229
529
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
id:
|
|
530
|
+
/* @__PURE__ */ E(B, {
|
|
531
|
+
id: a("supportedFeatures"),
|
|
232
532
|
label: n("integrations.connectorSubmissions.fields.supportedFeatures", "Supported features"),
|
|
233
533
|
hint: n("integrations.connectorSubmissions.fields.supportedFeaturesHint", "Comma separated, e.g. contacts, deals"),
|
|
234
|
-
children: /* @__PURE__ */
|
|
534
|
+
children: /* @__PURE__ */ E("input", { ...m("supportedFeatures") })
|
|
235
535
|
})
|
|
236
536
|
]
|
|
237
537
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ D(k, {
|
|
239
539
|
className: "p-5 space-y-4",
|
|
240
540
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ E("h2", {
|
|
242
542
|
className: "font-semibold text-text-primary",
|
|
243
543
|
children: n("integrations.connectorSubmissions.form.api", "API and authentication")
|
|
244
544
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
-
id:
|
|
545
|
+
/* @__PURE__ */ E(B, {
|
|
546
|
+
id: a("baseUrl"),
|
|
247
547
|
label: n("integrations.connectorSubmissions.fields.baseUrl", "API base URL"),
|
|
248
548
|
hint: n("integrations.connectorSubmissions.fields.baseUrlHint", "https only, on a public host name"),
|
|
249
549
|
required: !0,
|
|
250
|
-
children: /* @__PURE__ */
|
|
251
|
-
...
|
|
550
|
+
children: /* @__PURE__ */ E("input", {
|
|
551
|
+
...m("baseUrl"),
|
|
252
552
|
required: !0,
|
|
253
553
|
type: "url",
|
|
254
554
|
placeholder: "https://api.example.com/v1"
|
|
255
555
|
})
|
|
256
556
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ D("div", {
|
|
258
558
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
260
|
-
id:
|
|
559
|
+
children: [/* @__PURE__ */ E(B, {
|
|
560
|
+
id: a("authType"),
|
|
261
561
|
label: n("integrations.connectorSubmissions.fields.authType", "Authentication"),
|
|
262
562
|
required: !0,
|
|
263
|
-
children: /* @__PURE__ */
|
|
264
|
-
id:
|
|
265
|
-
value:
|
|
266
|
-
onChange: (e) =>
|
|
267
|
-
className:
|
|
268
|
-
children:
|
|
563
|
+
children: /* @__PURE__ */ E("select", {
|
|
564
|
+
id: a("authType"),
|
|
565
|
+
value: o.authType,
|
|
566
|
+
onChange: (e) => p("authType", e.target.value),
|
|
567
|
+
className: F,
|
|
568
|
+
children: N.map(([e, t, r]) => /* @__PURE__ */ E("option", {
|
|
269
569
|
value: e,
|
|
270
570
|
children: n(t, r)
|
|
271
571
|
}, e))
|
|
272
572
|
})
|
|
273
|
-
}), /* @__PURE__ */
|
|
274
|
-
id:
|
|
573
|
+
}), /* @__PURE__ */ E(B, {
|
|
574
|
+
id: a("apiVersion"),
|
|
275
575
|
label: n("integrations.connectorSubmissions.fields.apiVersion", "API version"),
|
|
276
|
-
children: /* @__PURE__ */
|
|
277
|
-
...
|
|
576
|
+
children: /* @__PURE__ */ E("input", {
|
|
577
|
+
...m("apiVersion"),
|
|
278
578
|
maxLength: 32
|
|
279
579
|
})
|
|
280
580
|
})]
|
|
281
581
|
}),
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
className: A,
|
|
294
|
-
children: [/* @__PURE__ */ x("option", {
|
|
295
|
-
value: i.Header,
|
|
296
|
-
children: n("integrations.connectorSubmissions.placement.header", "Header")
|
|
297
|
-
}), /* @__PURE__ */ x("option", {
|
|
298
|
-
value: i.Query,
|
|
299
|
-
children: n("integrations.connectorSubmissions.placement.query", "Query parameter")
|
|
300
|
-
})]
|
|
301
|
-
})
|
|
302
|
-
}),
|
|
303
|
-
/* @__PURE__ */ x(P, {
|
|
304
|
-
id: o("apiKeyName"),
|
|
305
|
-
label: n("integrations.connectorSubmissions.fields.apiKeyName", "Name"),
|
|
306
|
-
required: !0,
|
|
307
|
-
children: /* @__PURE__ */ x("input", {
|
|
308
|
-
...y("apiKeyName"),
|
|
309
|
-
required: !0,
|
|
310
|
-
maxLength: 64,
|
|
311
|
-
placeholder: s.apiKeyPlacement === i.Header ? "X-Api-Key" : "api_key"
|
|
312
|
-
})
|
|
313
|
-
}),
|
|
314
|
-
s.apiKeyPlacement === i.Header && /* @__PURE__ */ x(P, {
|
|
315
|
-
id: o("apiKeyPrefix"),
|
|
316
|
-
label: n("integrations.connectorSubmissions.fields.apiKeyPrefix", "Prefix"),
|
|
317
|
-
children: /* @__PURE__ */ x("input", {
|
|
318
|
-
...y("apiKeyPrefix"),
|
|
319
|
-
maxLength: 32,
|
|
320
|
-
placeholder: "Token"
|
|
321
|
-
})
|
|
322
|
-
})
|
|
323
|
-
]
|
|
582
|
+
o.authType === r.ApiKey && /* @__PURE__ */ E(H, {
|
|
583
|
+
form: o,
|
|
584
|
+
set: p,
|
|
585
|
+
text: m,
|
|
586
|
+
id: a
|
|
587
|
+
}),
|
|
588
|
+
o.authType === r.Oauth2 && /* @__PURE__ */ E(U, {
|
|
589
|
+
form: o,
|
|
590
|
+
set: p,
|
|
591
|
+
text: m,
|
|
592
|
+
id: a
|
|
324
593
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ D("div", {
|
|
326
595
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
328
|
-
id:
|
|
596
|
+
children: [/* @__PURE__ */ E(B, {
|
|
597
|
+
id: a("website"),
|
|
329
598
|
label: n("integrations.connectorSubmissions.fields.website", "Website"),
|
|
330
599
|
required: !0,
|
|
331
|
-
children: /* @__PURE__ */
|
|
332
|
-
...
|
|
600
|
+
children: /* @__PURE__ */ E("input", {
|
|
601
|
+
...m("website"),
|
|
333
602
|
required: !0,
|
|
334
603
|
type: "url"
|
|
335
604
|
})
|
|
336
|
-
}), /* @__PURE__ */
|
|
337
|
-
id:
|
|
605
|
+
}), /* @__PURE__ */ E(B, {
|
|
606
|
+
id: a("docsUrl"),
|
|
338
607
|
label: n("integrations.connectorSubmissions.fields.docsUrl", "API docs URL"),
|
|
339
608
|
required: !0,
|
|
340
|
-
children: /* @__PURE__ */
|
|
341
|
-
...
|
|
609
|
+
children: /* @__PURE__ */ E("input", {
|
|
610
|
+
...m("docsUrl"),
|
|
342
611
|
required: !0,
|
|
343
612
|
type: "url"
|
|
344
613
|
})
|
|
@@ -346,231 +615,249 @@ function F({ onDone: e }) {
|
|
|
346
615
|
})
|
|
347
616
|
]
|
|
348
617
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
children: n("integrations.connectorSubmissions.form.publisher", "Publisher")
|
|
355
|
-
}),
|
|
356
|
-
/* @__PURE__ */ S("div", {
|
|
357
|
-
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
358
|
-
children: [
|
|
359
|
-
/* @__PURE__ */ x(P, {
|
|
360
|
-
id: o("publisherName"),
|
|
361
|
-
label: n("integrations.connectorSubmissions.fields.publisherName", "Publisher name"),
|
|
362
|
-
required: !0,
|
|
363
|
-
children: /* @__PURE__ */ x("input", {
|
|
364
|
-
...y("publisherName"),
|
|
365
|
-
required: !0,
|
|
366
|
-
maxLength: 100
|
|
367
|
-
})
|
|
368
|
-
}),
|
|
369
|
-
/* @__PURE__ */ x(P, {
|
|
370
|
-
id: o("supportEmail"),
|
|
371
|
-
label: n("integrations.connectorSubmissions.fields.supportEmail", "Support email"),
|
|
372
|
-
required: !0,
|
|
373
|
-
children: /* @__PURE__ */ x("input", {
|
|
374
|
-
...y("supportEmail"),
|
|
375
|
-
required: !0,
|
|
376
|
-
type: "email"
|
|
377
|
-
})
|
|
378
|
-
}),
|
|
379
|
-
/* @__PURE__ */ x(P, {
|
|
380
|
-
id: o("privacyPolicyUrl"),
|
|
381
|
-
label: n("integrations.connectorSubmissions.fields.privacyPolicyUrl", "Privacy policy URL"),
|
|
382
|
-
required: !0,
|
|
383
|
-
children: /* @__PURE__ */ x("input", {
|
|
384
|
-
...y("privacyPolicyUrl"),
|
|
385
|
-
required: !0,
|
|
386
|
-
type: "url"
|
|
387
|
-
})
|
|
388
|
-
}),
|
|
389
|
-
/* @__PURE__ */ x(P, {
|
|
390
|
-
id: o("termsUrl"),
|
|
391
|
-
label: n("integrations.connectorSubmissions.fields.termsUrl", "Terms of service URL"),
|
|
392
|
-
children: /* @__PURE__ */ x("input", {
|
|
393
|
-
...y("termsUrl"),
|
|
394
|
-
type: "url"
|
|
395
|
-
})
|
|
396
|
-
}),
|
|
397
|
-
/* @__PURE__ */ x(P, {
|
|
398
|
-
id: o("repositoryUrl"),
|
|
399
|
-
label: n("integrations.connectorSubmissions.fields.repositoryUrl", "Repository URL"),
|
|
400
|
-
children: /* @__PURE__ */ x("input", {
|
|
401
|
-
...y("repositoryUrl"),
|
|
402
|
-
type: "url"
|
|
403
|
-
})
|
|
404
|
-
})
|
|
405
|
-
]
|
|
406
|
-
}),
|
|
407
|
-
/* @__PURE__ */ x(P, {
|
|
408
|
-
id: o("submitterNotes"),
|
|
409
|
-
label: n("integrations.connectorSubmissions.fields.submitterNotes", "Notes for the reviewer"),
|
|
410
|
-
children: /* @__PURE__ */ x("textarea", {
|
|
411
|
-
...y("submitterNotes"),
|
|
412
|
-
rows: 2,
|
|
413
|
-
maxLength: 2e3
|
|
414
|
-
})
|
|
415
|
-
}),
|
|
416
|
-
/* @__PURE__ */ S("label", {
|
|
417
|
-
className: "flex items-start gap-3 rounded-lg border border-border-seam bg-bg-surface px-3 py-2.5",
|
|
418
|
-
children: [/* @__PURE__ */ x("input", {
|
|
419
|
-
type: "checkbox",
|
|
420
|
-
className: "mt-0.5",
|
|
421
|
-
checked: s.acceptedPolicy,
|
|
422
|
-
onChange: (e) => _("acceptedPolicy", e.target.checked)
|
|
423
|
-
}), /* @__PURE__ */ x("span", {
|
|
424
|
-
className: "text-sm text-text-primary",
|
|
425
|
-
children: n("integrations.connectorSubmissions.form.policy", "I am authorised to publish a connector for this service, the details above are accurate, and I accept the Connector Developer Terms. Users enter their own credentials; they are encrypted by the platform and sent only to the base URL above.")
|
|
426
|
-
})]
|
|
427
|
-
})
|
|
428
|
-
]
|
|
618
|
+
/* @__PURE__ */ E(W, {
|
|
619
|
+
form: o,
|
|
620
|
+
set: p,
|
|
621
|
+
text: m,
|
|
622
|
+
id: a
|
|
429
623
|
})
|
|
430
624
|
]
|
|
431
625
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ D("div", {
|
|
433
627
|
className: "flex flex-wrap justify-end gap-2",
|
|
434
|
-
children: [/* @__PURE__ */
|
|
628
|
+
children: [/* @__PURE__ */ D(O, {
|
|
435
629
|
type: "button",
|
|
436
630
|
variant: "ghost",
|
|
437
631
|
onClick: e,
|
|
438
|
-
children: [/* @__PURE__ */
|
|
439
|
-
}), /* @__PURE__ */
|
|
632
|
+
children: [/* @__PURE__ */ E(w, { size: 16 }), n("integrations.common.cancel", "Cancel")]
|
|
633
|
+
}), /* @__PURE__ */ D(O, {
|
|
440
634
|
type: "submit",
|
|
441
|
-
disabled:
|
|
442
|
-
children: [
|
|
635
|
+
disabled: f || !o.acceptedPolicy,
|
|
636
|
+
children: [f ? /* @__PURE__ */ E(b, {
|
|
443
637
|
size: 16,
|
|
444
638
|
className: "animate-spin"
|
|
445
|
-
}) : /* @__PURE__ */
|
|
639
|
+
}) : /* @__PURE__ */ E(S, { size: 16 }), n("integrations.connectorSubmissions.form.submit", "Submit for review")]
|
|
640
|
+
})]
|
|
641
|
+
})
|
|
642
|
+
]
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
function K({ submissionId: e, initialClientId: n, onDone: r }) {
|
|
646
|
+
let i = t(), a = g(), [o, s] = _(n), [c, l] = _(""), [u, d] = _(""), { updateOAuthClient: p, loading: m } = f();
|
|
647
|
+
return /* @__PURE__ */ D("form", {
|
|
648
|
+
onSubmit: async (t) => {
|
|
649
|
+
t.preventDefault(), d("");
|
|
650
|
+
try {
|
|
651
|
+
await p(e, {
|
|
652
|
+
clientId: o.trim(),
|
|
653
|
+
clientSecret: c
|
|
654
|
+
}), l(""), r();
|
|
655
|
+
} catch (e) {
|
|
656
|
+
d(e instanceof Error ? e.message : String(e));
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
className: "rounded-xl border border-border-seam bg-bg-surface p-4 space-y-3",
|
|
660
|
+
"aria-label": i("integrations.connectorSubmissions.oauth.updateTitle", "Update OAuth client"),
|
|
661
|
+
children: [
|
|
662
|
+
u && /* @__PURE__ */ E("div", {
|
|
663
|
+
role: "alert",
|
|
664
|
+
className: "rounded-lg border border-border-seam bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
665
|
+
children: u
|
|
666
|
+
}),
|
|
667
|
+
/* @__PURE__ */ E("p", {
|
|
668
|
+
className: "text-xs text-text-secondary",
|
|
669
|
+
children: i("integrations.connectorSubmissions.oauth.updateHint", "The new client replaces the stored one, including on the published connector. The secret is never shown.")
|
|
670
|
+
}),
|
|
671
|
+
/* @__PURE__ */ D("div", {
|
|
672
|
+
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
673
|
+
children: [/* @__PURE__ */ E(B, {
|
|
674
|
+
id: `${a}-clientId`,
|
|
675
|
+
label: i("integrations.connectorSubmissions.fields.oauthClientId", "OAuth client id"),
|
|
676
|
+
required: !0,
|
|
677
|
+
children: /* @__PURE__ */ E("input", {
|
|
678
|
+
id: `${a}-clientId`,
|
|
679
|
+
value: o,
|
|
680
|
+
onChange: (e) => s(e.target.value),
|
|
681
|
+
required: !0,
|
|
682
|
+
maxLength: 256,
|
|
683
|
+
autoComplete: "off",
|
|
684
|
+
className: P
|
|
685
|
+
})
|
|
686
|
+
}), /* @__PURE__ */ E(B, {
|
|
687
|
+
id: `${a}-clientSecret`,
|
|
688
|
+
label: i("integrations.connectorSubmissions.fields.oauthClientSecret", "Client secret"),
|
|
689
|
+
required: !0,
|
|
690
|
+
children: /* @__PURE__ */ E("input", {
|
|
691
|
+
id: `${a}-clientSecret`,
|
|
692
|
+
value: c,
|
|
693
|
+
onChange: (e) => l(e.target.value),
|
|
694
|
+
required: !0,
|
|
695
|
+
type: "password",
|
|
696
|
+
maxLength: 1024,
|
|
697
|
+
autoComplete: "new-password",
|
|
698
|
+
className: P
|
|
699
|
+
})
|
|
700
|
+
})]
|
|
701
|
+
}),
|
|
702
|
+
/* @__PURE__ */ D("div", {
|
|
703
|
+
className: "flex justify-end gap-2",
|
|
704
|
+
children: [/* @__PURE__ */ E(O, {
|
|
705
|
+
type: "button",
|
|
706
|
+
variant: "ghost",
|
|
707
|
+
size: "sm",
|
|
708
|
+
onClick: r,
|
|
709
|
+
children: i("integrations.common.cancel", "Cancel")
|
|
710
|
+
}), /* @__PURE__ */ D(O, {
|
|
711
|
+
type: "submit",
|
|
712
|
+
size: "sm",
|
|
713
|
+
disabled: m,
|
|
714
|
+
children: [m ? /* @__PURE__ */ E(b, {
|
|
715
|
+
size: 14,
|
|
716
|
+
className: "animate-spin"
|
|
717
|
+
}) : /* @__PURE__ */ E(y, { size: 14 }), i("integrations.connectorSubmissions.oauth.updateSave", "Save OAuth client")]
|
|
446
718
|
})]
|
|
447
719
|
})
|
|
448
720
|
]
|
|
449
721
|
});
|
|
450
722
|
}
|
|
451
|
-
function
|
|
452
|
-
let { basePath: r = "/", navigate: i } = e(),
|
|
453
|
-
return /* @__PURE__ */
|
|
723
|
+
function q() {
|
|
724
|
+
let { basePath: r = "/", navigate: i } = e(), a = t(), [o, c] = _(!1), [d, f] = _(null), [g, S] = _(null), [w, k] = _(""), [M, N] = _(0), { submissions: P, total: F, hasMore: I, loading: L, error: R } = u(M), { withdraw: z, loading: B } = p();
|
|
725
|
+
return /* @__PURE__ */ D("div", {
|
|
454
726
|
className: "space-y-6 p-4 sm:p-6 max-w-5xl mx-auto",
|
|
455
727
|
children: [
|
|
456
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ D("div", {
|
|
457
729
|
className: "rounded-xl border border-border-seam bg-accent-wash p-6 flex flex-wrap items-center gap-4",
|
|
458
730
|
children: [
|
|
459
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ E(O, {
|
|
460
732
|
variant: "ghost",
|
|
461
733
|
size: "icon",
|
|
462
734
|
onClick: () => i?.(n(r, "providers")),
|
|
463
|
-
"aria-label":
|
|
464
|
-
children: /* @__PURE__ */
|
|
735
|
+
"aria-label": a("integrations.common.back", "Back"),
|
|
736
|
+
children: /* @__PURE__ */ E(v, { size: 20 })
|
|
465
737
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ E("div", {
|
|
467
739
|
className: "p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
468
|
-
children: /* @__PURE__ */
|
|
740
|
+
children: /* @__PURE__ */ E(C, {
|
|
469
741
|
size: 24,
|
|
470
742
|
className: "text-primary"
|
|
471
743
|
})
|
|
472
744
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ D("div", {
|
|
474
746
|
className: "min-w-0 flex-1",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
747
|
+
children: [/* @__PURE__ */ E("h1", {
|
|
476
748
|
className: "text-2xl font-bold text-text-primary",
|
|
477
|
-
children:
|
|
478
|
-
}), /* @__PURE__ */
|
|
749
|
+
children: a("integrations.connectorSubmissions.title", "Publish a connector")
|
|
750
|
+
}), /* @__PURE__ */ E("p", {
|
|
479
751
|
className: "text-sm text-text-secondary mt-1",
|
|
480
|
-
children:
|
|
752
|
+
children: a("integrations.connectorSubmissions.subtitle", "Submit your service to the integrations catalog and follow its review.")
|
|
481
753
|
})]
|
|
482
754
|
}),
|
|
483
|
-
!
|
|
484
|
-
onClick: () =>
|
|
485
|
-
children: [/* @__PURE__ */ x
|
|
755
|
+
!o && /* @__PURE__ */ D(O, {
|
|
756
|
+
onClick: () => c(!0),
|
|
757
|
+
children: [/* @__PURE__ */ E(x, { size: 16 }), a("integrations.connectorSubmissions.actions.new", "Submit a connector")]
|
|
486
758
|
})
|
|
487
759
|
]
|
|
488
760
|
}),
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
icon: /* @__PURE__ */
|
|
491
|
-
children:
|
|
761
|
+
/* @__PURE__ */ E(j, {
|
|
762
|
+
icon: /* @__PURE__ */ E(C, { size: 16 }),
|
|
763
|
+
children: a("integrations.connectorSubmissions.purpose", "Third-party developers can list their service in the integrations catalog. Connectors use an API key, a bearer token or basic auth that each workspace enters for itself, or OAuth 2.0 with your own OAuth app, whose secret is stored encrypted and never shown. A Burdenoff reviewer checks every submission within five business days; once approved, every workspace can connect to it.")
|
|
492
764
|
}),
|
|
493
|
-
|
|
494
|
-
w && /* @__PURE__ */
|
|
765
|
+
o && /* @__PURE__ */ E(G, { onDone: () => c(!1) }),
|
|
766
|
+
w && /* @__PURE__ */ E("div", {
|
|
495
767
|
role: "alert",
|
|
496
768
|
className: "rounded-xl border border-border-seam bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
497
769
|
children: w
|
|
498
770
|
}),
|
|
499
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ D("section", {
|
|
500
772
|
className: "space-y-3",
|
|
501
773
|
"aria-labelledby": "connector-submissions-heading",
|
|
502
774
|
children: [
|
|
503
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ E("h2", {
|
|
504
776
|
id: "connector-submissions-heading",
|
|
505
777
|
className: "text-lg font-semibold text-text-primary",
|
|
506
|
-
children:
|
|
778
|
+
children: a("integrations.connectorSubmissions.mine", "Your submissions")
|
|
507
779
|
}),
|
|
508
|
-
|
|
780
|
+
L && P.length === 0 ? /* @__PURE__ */ E("div", {
|
|
509
781
|
className: "flex justify-center py-10",
|
|
510
|
-
children: /* @__PURE__ */
|
|
782
|
+
children: /* @__PURE__ */ E(b, {
|
|
511
783
|
size: 32,
|
|
512
784
|
className: "animate-spin text-primary"
|
|
513
785
|
})
|
|
514
|
-
}) :
|
|
786
|
+
}) : R && P.length === 0 ? /* @__PURE__ */ E("div", {
|
|
515
787
|
role: "alert",
|
|
516
788
|
className: "rounded-xl border border-border-seam bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
517
|
-
children:
|
|
518
|
-
}) :
|
|
789
|
+
children: R.message
|
|
790
|
+
}) : P.length === 0 ? /* @__PURE__ */ E(A, {
|
|
519
791
|
illustration: "empty-data",
|
|
520
|
-
title:
|
|
521
|
-
description:
|
|
522
|
-
}) :
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
792
|
+
title: a("integrations.connectorSubmissions.empty.title", "No submissions yet"),
|
|
793
|
+
description: a("integrations.connectorSubmissions.empty.description", "Submit a connector to see it here while it is reviewed.")
|
|
794
|
+
}) : P.map((e) => {
|
|
795
|
+
let t = e.status === s.PendingReview, o = e.status === s.Approved, c = !!e.oauth && (t || o);
|
|
796
|
+
return /* @__PURE__ */ D("div", {
|
|
797
|
+
className: "space-y-2",
|
|
798
|
+
children: [/* @__PURE__ */ E(m, {
|
|
799
|
+
submission: e,
|
|
800
|
+
actions: /* @__PURE__ */ D(T, { children: [c && /* @__PURE__ */ D(O, {
|
|
801
|
+
variant: "ghost",
|
|
802
|
+
size: "sm",
|
|
803
|
+
onClick: () => S((t) => t === e.id ? null : e.id),
|
|
804
|
+
children: [/* @__PURE__ */ E(y, { size: 14 }), a("integrations.connectorSubmissions.actions.updateOAuthClient", "Update OAuth client")]
|
|
805
|
+
}), t ? /* @__PURE__ */ E(O, {
|
|
806
|
+
variant: "ghost",
|
|
807
|
+
size: "sm",
|
|
808
|
+
onClick: () => f(e.id),
|
|
809
|
+
disabled: B,
|
|
810
|
+
children: a("integrations.connectorSubmissions.actions.withdraw", "Withdraw")
|
|
811
|
+
}) : o && e.providerId ? /* @__PURE__ */ E(O, {
|
|
812
|
+
variant: "ghost",
|
|
813
|
+
size: "sm",
|
|
814
|
+
onClick: () => i?.(n(r, `providers/${e.providerId}`)),
|
|
815
|
+
children: a("integrations.connectorSubmissions.actions.viewListing", "View listing")
|
|
816
|
+
}) : null] })
|
|
817
|
+
}), c && g === e.id && e.oauth && /* @__PURE__ */ E(K, {
|
|
818
|
+
submissionId: e.id,
|
|
819
|
+
initialClientId: e.oauth.clientId,
|
|
820
|
+
onDone: () => S(null)
|
|
821
|
+
})]
|
|
822
|
+
}, e.id);
|
|
823
|
+
}),
|
|
824
|
+
/* @__PURE__ */ E(h, {
|
|
825
|
+
offset: M,
|
|
826
|
+
count: P.length,
|
|
827
|
+
total: F,
|
|
828
|
+
hasMore: I,
|
|
542
829
|
pageSize: 25,
|
|
543
|
-
disabled:
|
|
544
|
-
onOffsetChange:
|
|
830
|
+
disabled: L,
|
|
831
|
+
onOffsetChange: N
|
|
545
832
|
})
|
|
546
833
|
]
|
|
547
834
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
549
|
-
open:
|
|
550
|
-
title:
|
|
551
|
-
description:
|
|
552
|
-
confirmLabel:
|
|
553
|
-
cancelLabel:
|
|
554
|
-
loading:
|
|
835
|
+
/* @__PURE__ */ E(l, {
|
|
836
|
+
open: d !== null,
|
|
837
|
+
title: a("integrations.connectorSubmissions.withdraw.title", "Withdraw this submission?"),
|
|
838
|
+
description: a("integrations.connectorSubmissions.withdraw.description", "The reviewer will no longer see it. You can submit the connector again later."),
|
|
839
|
+
confirmLabel: a("integrations.connectorSubmissions.actions.withdraw", "Withdraw"),
|
|
840
|
+
cancelLabel: a("integrations.common.cancel", "Cancel"),
|
|
841
|
+
loading: B,
|
|
555
842
|
destructive: !0,
|
|
556
843
|
onConfirm: async () => {
|
|
557
|
-
if (
|
|
558
|
-
|
|
844
|
+
if (d) {
|
|
845
|
+
k("");
|
|
559
846
|
try {
|
|
560
|
-
await
|
|
847
|
+
await z(d);
|
|
561
848
|
} catch (e) {
|
|
562
|
-
|
|
849
|
+
k(e instanceof Error ? e.message : String(e));
|
|
563
850
|
} finally {
|
|
564
|
-
|
|
851
|
+
f(null);
|
|
565
852
|
}
|
|
566
853
|
}
|
|
567
854
|
},
|
|
568
|
-
onCancel: () =>
|
|
855
|
+
onCancel: () => f(null)
|
|
569
856
|
})
|
|
570
857
|
]
|
|
571
858
|
});
|
|
572
859
|
}
|
|
573
860
|
//#endregion
|
|
574
|
-
export {
|
|
861
|
+
export { q as ConnectorSubmissionsPage };
|
|
575
862
|
|
|
576
863
|
//# sourceMappingURL=ConnectorSubmissionsPage.js.map
|